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 |
---|---|---|---|---|---|---|
Created by francisco on 22/03/16.
|
public interface OnLoadDeputadosHasFinished {
void onDeputadosFinishedLoading(ArrayList <Deputado> deputados);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\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}",
"public void mo38117a() {\n }",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"public void gored() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"private void kk12() {\n\n\t}",
"@Override\n\tpublic void anular() {\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\r\n\tpublic void rozmnozovat() {\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}",
"protected void mo6255a() {\n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"private void init() {\n\n\t}",
"@Override\n public void init() {\n\n }",
"private Rekenhulp()\n\t{\n\t}",
"public void mo6081a() {\n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n protected void getExras() {\n }",
"public void mo12628c() {\n }",
"public void mo21877s() {\n }",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo12930a() {\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 initialize() {\n }",
"public final void mo91715d() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"private void strin() {\n\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n protected void init() {\n }",
"public void method_4270() {}",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\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\r\n\tpublic void init() {\n\t\t\r\n\t}",
"public abstract void mo70713b();",
"@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\r\n\tpublic void init() {}",
"public void mo55254a() {\n }",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\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 int mettreAJour() {\n\t\treturn 0;\n\t}",
"public Pitonyak_09_02() {\r\n }",
"@Override\n public void init() {}",
"@Override\n void init() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"public void skystonePos4() {\n }",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }"
] |
[
"0.5979",
"0.58776987",
"0.58552814",
"0.5795572",
"0.5727793",
"0.56891346",
"0.56755143",
"0.5667001",
"0.5649971",
"0.56413907",
"0.56413907",
"0.56310725",
"0.56243795",
"0.5590578",
"0.5589998",
"0.5562152",
"0.555721",
"0.5546509",
"0.5540126",
"0.5533545",
"0.55280864",
"0.5523487",
"0.5522064",
"0.55055755",
"0.548239",
"0.54768103",
"0.5465186",
"0.5465069",
"0.5465069",
"0.5465069",
"0.5465069",
"0.5465069",
"0.5465069",
"0.5465069",
"0.5462992",
"0.545618",
"0.545618",
"0.545618",
"0.545618",
"0.545618",
"0.54514647",
"0.54484296",
"0.54424316",
"0.5442169",
"0.54250467",
"0.54250467",
"0.54006225",
"0.5397909",
"0.53723013",
"0.5362038",
"0.53521055",
"0.5343316",
"0.5342323",
"0.5339874",
"0.53381616",
"0.53361684",
"0.53358626",
"0.5335634",
"0.5335634",
"0.5335634",
"0.5335634",
"0.5335634",
"0.5335634",
"0.53343225",
"0.53339595",
"0.5327576",
"0.53273034",
"0.53222495",
"0.53214777",
"0.5320598",
"0.5318125",
"0.5309047",
"0.53064066",
"0.53064066",
"0.53064066",
"0.53030837",
"0.52973276",
"0.52973276",
"0.52973276",
"0.52968884",
"0.5294642",
"0.52904105",
"0.528841",
"0.528841",
"0.528841",
"0.5287635",
"0.5287635",
"0.5285763",
"0.5284049",
"0.52821213",
"0.5274552",
"0.5272803",
"0.5272792",
"0.5270927",
"0.52698404",
"0.52644557",
"0.5259219",
"0.52547246",
"0.525019",
"0.5242761",
"0.5242761"
] |
0.0
|
-1
|
Created by Pablo Sevilla on 27/1/2017.
|
public interface PaisesDAO extends BaseGenericDAO<Paises, Integer> {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\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\tprotected void getExras() {\n\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n protected void getExras() {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"public void mo4359a() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void one() {\n\t\t\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 einkaufen() {\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"private Rekenhulp()\n\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\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\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n public void init() {\n }",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\n public int getSize() {\n return 1;\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override public int describeContents() { return 0; }",
"@Override\n void init() {\n }",
"@Override\n public int getOrder() {\n return 0;\n }",
"Petunia() {\r\n\t\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n protected void initialize() \n {\n \n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\n public void init() {}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\r\n\tpublic void init() {}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n public int getOrder() {\n return 4;\n }",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void init() {\n }",
"public void Tyre() {\n\t\t\r\n\t}",
"Consumable() {\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public String toString() {\n return \"\";\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"private void init() {\n\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 strin() {\n\n\t}",
"@Override\r\n\tpublic void just() {\n\t\t\r\n\t}",
"private void kk12() {\n\n\t}"
] |
[
"0.6080143",
"0.58261967",
"0.5717967",
"0.5714783",
"0.571355",
"0.56938505",
"0.56938505",
"0.5653645",
"0.56497014",
"0.56431836",
"0.5636894",
"0.5623622",
"0.5584829",
"0.55845195",
"0.5555285",
"0.55174285",
"0.5509828",
"0.5504572",
"0.5503619",
"0.5500531",
"0.5468986",
"0.54604024",
"0.5430699",
"0.54154396",
"0.539958",
"0.5392821",
"0.53908384",
"0.53892815",
"0.5377432",
"0.5370798",
"0.5355332",
"0.5348457",
"0.5330506",
"0.53204995",
"0.5314396",
"0.53027976",
"0.53027976",
"0.5301771",
"0.52818406",
"0.5279833",
"0.5279272",
"0.52765775",
"0.52765775",
"0.52765775",
"0.52765775",
"0.52765775",
"0.52765775",
"0.5272158",
"0.5272158",
"0.5272158",
"0.5272158",
"0.5272158",
"0.5269244",
"0.5267379",
"0.5261863",
"0.5260601",
"0.5252416",
"0.52507174",
"0.5242694",
"0.5239333",
"0.52391434",
"0.5235461",
"0.52346",
"0.52270854",
"0.5225807",
"0.5223947",
"0.5223947",
"0.5217741",
"0.521761",
"0.5206276",
"0.5206276",
"0.5206276",
"0.5206276",
"0.5206276",
"0.5206276",
"0.5206276",
"0.51849526",
"0.5181868",
"0.51696724",
"0.515906",
"0.51543033",
"0.51538044",
"0.5151879",
"0.5148425",
"0.5148425",
"0.5148425",
"0.5147474",
"0.51352704",
"0.5127624",
"0.51230145",
"0.5122473",
"0.5122473",
"0.51206696",
"0.5119471",
"0.5117998",
"0.5116662",
"0.5116662",
"0.5116662",
"0.5105395",
"0.51029223",
"0.5102758"
] |
0.0
|
-1
|
It is not necessary for this method of area calculation.
|
@Override
public void postProcess(NodeCT node) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n public double calculateArea() {\n double area = 0;\r\n return area;\r\n }",
"public abstract double calculateArea();",
"public abstract double calculateArea();",
"double calculateArea();",
"public abstract double computeArea();",
"@Override\r\n\tpublic void calcArea() {\n\t\t\r\n\t}",
"abstract double area();",
"abstract double area();",
"abstract double area();",
"abstract double area();",
"public abstract float calArea();",
"@Override\n\tpublic void calcularArea() {\n\t\t\n\t}",
"public double area();",
"double getArea();",
"double getArea();",
"public abstract double getArea();",
"public abstract double getArea();",
"public abstract double getArea();",
"public abstract float area();",
"public double getArea();",
"public double getArea();",
"public double getArea();",
"public double calculateArea(){\r\n\t\treturn this.getSide()*this.getSide();\r\n}",
"double area();",
"void calculateArea() {\n this.setArea(this.getArea()/2);\n }",
"@Override\n\tpublic double area() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}",
"public abstract float getArea();",
"@Override\r\n\tpublic double area() {\r\n\r\n\t\treturn this.sideA*this.sideB;\r\n\t}",
"static Double computeArea() {\n // Area is height x width\n Double area = height * width;\n return area;\n }",
"@Override\n\tpublic double area() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic double area() {\n\t\treturn 0;\n\t}",
"public double computeArea() {\n\t\treturn 0;\n\t}",
"public void calcArea(){\n double p=(side1+side2+side3)/2;\n area=p*(p-side1)*(p-side2)*(p-side3);\n area=Math.sqrt(area);\n\n\n }",
"protected double getArea()\r\n {\r\n return ( side * side ) / 2;\r\n }",
"public float get_area() {\r\n return 0;\r\n }",
"@Override\n\tpublic void computeArea() {\n\t\tthis.area = length * length;\t\t\t\t\n\t}",
"@Override\r\n public double area() {\n return height*width;\r\n }",
"Double getAreaValue();",
"public double calcArea()\n\t{\n\t\treturn (double) oneside * oneside;\n\t}",
"public double getArea(){\n return 3.14 * radius * radius;\n }",
"public void calArea()\n {\n //Start of the formula\n for(int i = 0; i < sides-1; i++)\n {\n area += (poly[i].getX()*poly[i+1].getY())-(poly[i].getY()*poly[i+1].getX());\n }\n\n //half the total calculation\n area = area/2;\n\n //if area is negative times by -1\n if(area <= 0)\n {\n area = area*-1;\n }\n }",
"@Override\n public double obtenerArea(){\n return c.obtenerArea() * 4;\n }",
"@Override\n\tpublic double area() {\n\t\treturn l*b;\n\t}",
"public double getArea()\n {\n return area;\n }",
"public double getArea(){\n return 0;\n }",
"@Override\n public double area()\n {\n\treturn (double) length * width;\n }",
"public abstract double calcBaseArea();",
"public double area()\r\n {\r\n float dx = tr.getX() - bl.getX();\r\n float dy = tr.getY() - bl.getY();\r\n return dx*dy;\r\n }",
"public double area(){\n return (base*height) / 2;\n }",
"public double area() \n {\n double area = 0;\n for (Line2D line : lines) \n {\n area += line.getP1().getX() * line.getP2().getY();\n area -= line.getP2().getX() * line.getP1().getY();\n }\n area /= 2.0;\n return Math.abs(area);\n }",
"double area() {\n System.out.println(\"Inside Area for Triangle.\");\n return dim1 * dim2 / 2;\n }",
"@Override\n public double area() {\n return Math.pow(lado, 2);\n }",
"double area() {\r\n\t\treturn Math.PI*r*r;\r\n\t\t//return (int)((Math.PI*r*r + 0.005) * 100) / 100.0;\r\n\t}",
"@Override\n public double area() {\n return width * length;\n }",
"@Override\n public double getArea() {\n return 0;\n }",
"@Override\r\n\tpublic double area() {\n\t\treturn pi*this.radi*this.radi;\r\n\t}",
"double getArea(){\n return 3.14 * raggio * raggio;\n }",
"public double area(){\r\n\t\treturn this.base()*this.altezza();\r\n\t}",
"double area() {\n System.out.println(\"Inside Area for Rectangle.\");\n return dim1 * dim2;\n }",
"public double Area() {\r\n \treturn(getLength() * getWidth());\r\n }",
"public float getArea(){\n return area;\n\t}",
"@Override\n public double area() {\n double P = this.perimeter() / 2;\n double result = Math.sqrt(P * (P - side1) * (P - side2) * (P - side3));\n return result;\n }",
"private double calculaArea(){\r\n double area;\r\n area= (double) (Math.pow((cir.getY()-cir.getX()), 2)*Math.PI);\r\n return area;\r\n \r\n }",
"@Override\n\tpublic float area() {\n\t\treturn 0;\n\t}",
"@Override\n public double getArea() {\n return width * width;\n }",
"public int area() {\n \tarea = width()*height();\n }",
"public float getArea() {\n return area;\n }",
"@Override\n\tpublic double area() {\n\t\treturn Shape.PI*radius*radius;\n\t}",
"@Override\n\tpublic double area() {\n\t\treturn getBase()*getAltura();\n\t}",
"public double getArea(){\n double p = (side1 + side2 + side3) / 2;\n return Math.sqrt(p * (p - side1) * (p - side2) * (p - side3));\n }",
"public double area(){\n\t\tdouble area=length*width;\r\n\t\treturn area;\r\n\t}",
"@Override\n public double getArea() {\n double s = (a + b + c) / 2;\n return Math.sqrt(s * (s - a) * (s - b) * (s - c));\n }",
"public double calculateArea()\n {\n return (Math.PI * radius) * (Math.PI * radius);\n }",
"@Override\n\tpublic double getArea(){\n\t\tdouble ab_ac_area = get_triangle_area(getVector_AB(),getVector_AC());\n\t\t\n\t\t//area of vector ac and ad\n\t\tdouble ac_ad_area = get_triangle_area(getVector_AC(),getVector_AD());\n\t\t\n\t\t//area of vector ab and ad\n\t\tdouble ab_ad_area = get_triangle_area(getVector_AC(),getVector_AD());\n\t\t\n\t\t//area of vector bc and bd\n\t\tdouble bc_ad_area = get_triangle_area(getVector_BC(),getVector_BD());\n\t\t\n\t\t//sum \n\t\treturn ab_ac_area + ac_ad_area + ab_ad_area + bc_ad_area;\n\t}",
"public double getArea() { return Math.sqrt(s * (s - d12) * (s - d23) * (s - d31)); }",
"@Override\n\tpublic double area() {\n\t\t\n\t\tdouble area = (Math.PI * Math.pow(radius, 2));\n\t\treturn area;\n\t\t\n\t}",
"public double area() {\n double sum = 0.0;\n for (int i = 0; i < N; i++) {\n sum = sum + (a[i].x * a[i+1].y) - (a[i].y * a[i+1].x);\n }\n return 0.5 * sum;\n }",
"@Override\n\tpublic double getArea() {\n\t\treturn (2 + 2 * (Math.sqrt(2))) * side * side; // JA\n\t}",
"public final double getArea() {\n\t\treturn (area < 0) ? computeArea() : area;\n\t}",
"public double area() {\n\t\treturn width * height;\n\t}",
"public double area()\r\n {\r\n double area;\r\n \r\n area = mRadius * mRadius * 3.14159;\r\n \r\n return area;\r\n }",
"public double getArea() {\n\t\treturn this.area;\n\t}",
"public float area() {\n return (getBase() * getAltura() )/ 2;\n }",
"public double getArea() {\n /*\n * area = base (1o lado ou 3o lado) x altura (2o lado ou 4o lado)\n */\n\n return this.getLado(1) * this.getLado(2);\n }",
"public double area()\n {\n double area = length * width;\n //System.out.println(area);\n return area;\n }",
"double getArea(double width){\n return width*width;\n }",
"@Override\n\tpublic double getArea() {\n\t\treturn (this.getPerimetro()*Math.sqrt(Math.pow(getLongitudLado(), 2))-(Math.pow((getLongitudLado()/2), 2)))/2;\n\t}",
"double getArea(){\n return height*width;\n }",
"@Override\n\tpublic double area() {\n\t\treturn edge*edge;\n\t}",
"public double area() {\n\t\treturn width*length;\n\t}",
"double area() {\nSystem.out.println(\"Inside Area for Rectangle.\");\nreturn dim1 * dim2;\n }",
"public double calculateArea() {\r\n return PI * radius * radius;\r\n }",
"public void getArea() {\n\t\ts = (double) (a + b + c) / 2;\n\t\tarea = Math.sqrt(s * (s - a) * (s - b) * (s - c));\n\t\tSystem.out.println(\"Area: \" + area);\n\t}",
"public double area() {\n return (width * height);\n }",
"double getArea() {\n return width * height;\n }",
"public double area() {\n return Math.PI * r * r;\n }",
"public double get_Area() {\n return this.Area;\n }",
"@Override\n public double getArea() {\n return this.length*this.width; //To change body of generated methods, choose Tools | Templates.\n }",
"@Override\n\tpublic double calculateArea() {\n\t\treturn Shape.PI * r*r;\n\t}",
"@Override\n\tpublic double getArea() {\n\t\tdouble p = getPerimeter() / 2;\n\t\tdouble s = p * ((p - side1) * (p - side2) * (p - side3));\n\t\tdouble Area = Math.sqrt(s);\n\t\treturn Area;\n\t}",
"public void claShapeArea(){\r\n\t\tshape.calArea();\r\n\t}"
] |
[
"0.85934645",
"0.8563371",
"0.8563371",
"0.85408694",
"0.8468977",
"0.84558",
"0.8430531",
"0.8430531",
"0.8430531",
"0.8430531",
"0.8375777",
"0.83612424",
"0.8266274",
"0.8262485",
"0.8262485",
"0.8250585",
"0.8250585",
"0.8250585",
"0.82462037",
"0.8190832",
"0.8190832",
"0.8190832",
"0.8127906",
"0.8096093",
"0.80402267",
"0.8036663",
"0.80112654",
"0.79863644",
"0.7961938",
"0.79476595",
"0.79476595",
"0.7920571",
"0.790675",
"0.790495",
"0.78796464",
"0.7877489",
"0.78687996",
"0.7855947",
"0.78541106",
"0.784752",
"0.78349894",
"0.783296",
"0.7819057",
"0.78181547",
"0.77877593",
"0.77874005",
"0.776497",
"0.776008",
"0.7748322",
"0.77473533",
"0.7739182",
"0.7723959",
"0.7712861",
"0.7704396",
"0.7697406",
"0.7697336",
"0.7689136",
"0.7678127",
"0.7667136",
"0.76656306",
"0.7660827",
"0.7657029",
"0.7633399",
"0.7630453",
"0.7626175",
"0.76171845",
"0.7617082",
"0.76143676",
"0.7611331",
"0.7607489",
"0.7607441",
"0.7596724",
"0.7594639",
"0.75897145",
"0.75828224",
"0.7574336",
"0.75712776",
"0.756685",
"0.7564814",
"0.7563254",
"0.7548394",
"0.7537971",
"0.7537695",
"0.75332046",
"0.75192624",
"0.75186324",
"0.7515363",
"0.7513261",
"0.75071347",
"0.7501817",
"0.74982136",
"0.7494299",
"0.7487052",
"0.7481794",
"0.7477574",
"0.7472439",
"0.74712074",
"0.7469363",
"0.74591154",
"0.7457593",
"0.74570465"
] |
0.0
|
-1
|
Guarda el contenido de la trama retornada a la base de datos
|
public Integer guardarTramaProcesoCompraBD(Map<String, String> parametros, String codFormaPago) {
try {
log.debug("MC- ingreso a guardar Trama");
if (!DBPinpad.guardarTramaPinpadMC(parametros.get("response_code"), parametros.get("amount"),
parametros.get("approval_code"), parametros.get("message"),
nroTarjetaBruto, //parametros.get("card"),
parametros.get("card_id"), parametros.get("month"), parametros.get("amount_quota"),
parametros.get("credit_type"), parametros.get("client_name"), parametros.get("ecr_currency_code"),
parametros.get("ecr_aplication"), parametros.get("ecr_transaccion"), parametros.get("merchant_id"),
parametros.get("print_data"), VariablesCaja.vNumPedVta, codFormaPago))
return VariablesPinpad.RET_NOK;
} catch (Exception e) {
log.debug(e.toString());
return VariablesPinpad.RET_NOK;
}
return VariablesPinpad.RET_OK;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_atencion_embarazada his_atencion_embarazada = new His_atencion_embarazada();\r\n\t\t\t\this_atencion_embarazada.setCodigo_empresa(empresa\r\n\t\t\t\t\t\t.getCodigo_empresa());\r\n\t\t\t\this_atencion_embarazada.setCodigo_sucursal(sucursal\r\n\t\t\t\t\t\t.getCodigo_sucursal());\r\n\t\t\t\this_atencion_embarazada.setCodigo_historia(tbxCodigo_historia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFecha_inicial(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_inicial.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCodigo_eps(tbxCodigo_eps.getValue());\r\n\t\t\t\this_atencion_embarazada.setCodigo_dpto(lbxCodigo_dpto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCodigo_municipio(lbxCodigo_municipio\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setIdentificacion(tbxIdentificacion\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDireccion(tbxMotivo.getValue());\r\n\t\t\t\this_atencion_embarazada.setTelefono(tbxTelefono.getValue());\r\n\t\t\t\this_atencion_embarazada.setSeleccion(rdbSeleccion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setGestaciones(lbxGestaciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPartos(lbxPartos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCesarias(lbxCesarias\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAbortos(lbxAbortos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEspontaneo(lbxEspontaneo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setProvocado(lbxProvocado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNacido_muerto(lbxNacido_muerto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPrematuro(lbxPrematuro\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_menos(lbxHijos_menos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_mayor(lbxHijos_mayor\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMalformado(lbxMalformado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHipertension(lbxHipertension\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_ultimo_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_ultimo_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCirugia(lbxCirugia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setOtro_antecedente(tbxOtro_antecedente\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemoclasificacion(lbxHemoclasificacion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRh(lbxRh.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_atencion_embarazada.setImc(tbxImc.getValue());\r\n\t\t\t\this_atencion_embarazada.setTa(tbxTa.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc(tbxFc.getValue());\r\n\t\t\t\this_atencion_embarazada.setFr(tbxFr.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemperatura(tbxTemperatura\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCroomb(tbxCroomb.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setFecha_ultima_mestruacion(new Timestamp(\r\n\t\t\t\t\t\t\t\tdtbxFecha_ultima_mestruacion.getValue()\r\n\t\t\t\t\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_atencion_embarazada.setFecha_probable_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_probable_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setEdad_gestacional(tbxEdad_gestacional\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setControl(lbxControl.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNum_control(tbxNum_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFetales(lbxFetales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFiebre(lbxFiebre.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido(lbxLiquido.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFlujo(lbxFlujo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEnfermedad(lbxEnfermedad\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_enfermedad(tbxCual_enfermedad\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo(lbxCigarrillo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol(lbxAlcohol.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_alcohol(tbxCual_alcohol\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDroga(lbxDroga.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_droga(tbxCual_droga.getValue());\r\n\t\t\t\this_atencion_embarazada.setViolencia(lbxViolencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_violencia(tbxCual_violencia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoide(lbxToxoide.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setDosis(lbxDosis.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_gestion(tbxObservaciones_gestion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setAltura_uterina(tbxAltura_uterina\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCorelacion(chbCorelacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEmbarazo_multiple(chbEmbarazo_multiple.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setTrasmision_sexual(chbTrasmision_sexual.isChecked());\r\n\t\t\t\this_atencion_embarazada.setAnomalia(rdbAnomalia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEdema_gestion(rdbEdema_gestion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPalidez(rdbPalidez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulciones(rdbConvulciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConciencia(rdbConciencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCavidad_bucal(rdbCavidad_bucal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto(tbxHto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb(tbxHb.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoplasma(tbxToxoplasma.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl1(tbxVdrl1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl2(tbxVdrl2.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih1(tbxVih1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih2(tbxVih2.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb(tbxHepb.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtro(tbxOtro.getValue());\r\n\t\t\t\this_atencion_embarazada.setEcografia(tbxEcografia.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_gestion(rdbClasificacion_gestion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setContracciones(lbxContracciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setNum_contracciones(lbxNum_contracciones\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHemorragia(lbxHemorragia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_vaginal(lbxLiquido_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setColor_liquido(tbxColor_liquido\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDolor_cabeza(lbxDolor_cabeza\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVision(lbxVision.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulcion(lbxConvulcion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_parto(tbxObservaciones_parto\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setContracciones_min(tbxContracciones_min.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_fera(tbxFc_fera.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDilatacion_cervical(tbxDilatacion_cervical\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setPreentacion(rdbPreentacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setOtra_presentacion(tbxOtra_presentacion.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdema(rdbEdema.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemorragia_vaginal(lbxHemorragia_vaginal\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto_parto(tbxHto_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb_parto(tbxHb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb_parto(tbxHepb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl_parto(tbxVdrl_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih_parto(tbxVih_parto.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_parto(rdbClasificacion_parto\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_nac(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_nac.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setIdentificacion_nac(tbxIdentificacion_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setSexo(lbxSexo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso_nac(tbxPeso_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla_nac(tbxTalla_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setPc_nac(tbxPc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_nac(tbxFc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemper_nac(tbxTemper_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdad(tbxEdad.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar1(tbxAdgar1.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar5(tbxAdgar5.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar10(tbxAdgar10.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar20(tbxAdgar20.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_nac(tbxObservaciones_nac.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_nac(rdbClasificacion_nac\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setReani_prematuro(chbReani_prematuro\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_meconio(chbReani_meconio\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_respiracion(chbReani_respiracion.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipotonico(chbReani_hipotonico\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_apnea(chbReani_apnea\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_jadeo(chbReani_jadeo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_deficultosa(chbReani_deficultosa.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_gianosis(chbReani_gianosis\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_bradicardia(chbReani_bradicardia.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipoxemia(chbReani_hipoxemia\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_estimulacion(chbReani_estimulacion\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_ventilacion(chbReani_ventilacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_comprensiones(chbReani_comprensiones\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_intubacion(chbReani_intubacion\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setMedicina(tbxMedicina.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_reani(rdbClasificacion_reani\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRuptura(lbxRuptura.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_ruptura(lbxTiempo_ruptura\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_neo(tbxLiquido_neo\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFiebre_neo(lbxFiebre_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_neo(lbxTiempo_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCoricamniotis(tbxCoricamniotis\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setIntrauterina(rdbIntrauterina\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMadre20(lbxMadre20.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol_neo(chbAlcohol_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDrogas_neo(chbDrogas_neo.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo_neo(chbCigarrillo_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setRespiracion_neo(rdbRespiracion_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLlanto_neo(rdbLlanto_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVetalidad_neo(rdbVetalidad_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTaquicardia_neo(chbTaquicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setBradicardia_neo(chbBradicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setPalidez_neo(chbPalidez_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCianosis_neo(chbCianosis_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setAnomalias_congenitas(lbxAnomalias_congenitas\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_anomalias(tbxCual_anomalias\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setLesiones(tbxLesiones.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtras_alter(tbxOtras_alter\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_neo(rdbClasificacion_neo\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlarma(tbxAlarma.getValue());\r\n\t\t\t\this_atencion_embarazada.setConsulta_control(tbxConsulta_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setMedidas_preventiva(tbxMedidas_preventiva.getValue());\r\n\t\t\t\this_atencion_embarazada.setRecomendaciones(tbxRecomendaciones\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDiagnostico(tbxDiagnostico\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCodigo_diagnostico(tbxCodigo_diagnostico.getValue());\r\n\t\t\t\this_atencion_embarazada.setTratamiento(tbxTratamiento\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setRecomendacion_alimentacion(tbxRecomendacion_alimentacion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEvolucion_servicio(tbxEvolucion_servicio.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_atencion_embarazada);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_atencion_embarazada = getServiceLocator()\r\n\t\t\t\t\t\t.getHis_atencion_embarazadaService().guardar(datos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\t\t\t\t/*\r\n\t\t\t\t * else{ int result =\r\n\t\t\t\t * getServiceLocator().getHis_atencion_embarazadaService\r\n\t\t\t\t * ().actualizar(his_atencion_embarazada); if(result==0){ throw\r\n\t\t\t\t * new Exception(\r\n\t\t\t\t * \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\"\r\n\t\t\t\t * ); } }\r\n\t\t\t\t */\r\n\r\n//\t\t\t\tcodigo_historia = his_atencion_embarazada.getCodigo_historia();\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}",
"public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_parto his_parto = new His_parto();\r\n\t\t\t\this_parto.setCodigo_empresa(empresa.getCodigo_empresa());\r\n\t\t\t\this_parto.setCodigo_sucursal(sucursal.getCodigo_sucursal());\r\n\t\t\t\this_parto.setCodigo_historia(tbxCodigo_historia.getValue());\r\n\t\t\t\this_parto.setIdentificacion(tbxIdentificacion.getValue());\r\n\t\t\t\this_parto.setFecha_inicial(new Timestamp(dtbxFecha_inicial\r\n\t\t\t\t\t\t.getValue().getTime()));\r\n\t\t\t\this_parto.setConyugue(tbxConyugue.getValue());\r\n\t\t\t\this_parto.setId_conyugue(tbxId_conyugue.getValue());\r\n\t\t\t\this_parto.setEdad_conyugue(tbxEdad_conyugue.getValue());\r\n\t\t\t\this_parto.setEscolaridad_conyugue(tbxEscolaridad_conyugue\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setMotivo(tbxMotivo.getValue());\r\n\t\t\t\this_parto.setEnfermedad_actual(tbxEnfermedad_actual.getValue());\r\n\t\t\t\this_parto.setAntecedentes_familiares(tbxAntecedentes_familiares\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setPreeclampsia(rdbPreeclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setHipertension(rdbHipertension.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEclampsia(rdbEclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setH1(rdbH1.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setH2(rdbH2.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPostimadurez(rdbPostimadurez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRot_pre(rdbRot_pre.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPolihidramnios(rdbPolihidramnios.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRcui(rdbRcui.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPelvis(rdbPelvis.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFeto_macrosonico(rdbFeto_macrosonico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setIsoinmunizacion(rdbIsoinmunizacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setAo(rdbAo.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCirc_cordon(rdbCirc_cordon.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setPostparto(rdbPostparto.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setDiabetes(rdbDiabetes.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCardiopatia(rdbCardiopatia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setAnemias(rdbAnemias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEnf_autoinmunes(rdbEnf_autoinmunes\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setEnf_renales(rdbEnf_renales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInf_urinaria(rdbInf_urinaria.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEpilepsia(rdbEpilepsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto\r\n\t\t\t\t\t\t.setTbc(rdbTbc.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setMiomas(rdbMiomas.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setHb(rdbHb.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFumadora(rdbFumadora.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setInf_puerperal(rdbInf_puerperal.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfertilidad(rdbInfertilidad.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMenarquia(tbxMenarquia.getValue());\r\n\t\t\t\this_parto.setCiclos(tbxCiclos.getValue());\r\n\t\t\t\this_parto.setVida_marital(tbxVida_marital.getValue());\r\n\t\t\t\this_parto.setVida_obstetrica(tbxVida_obstetrica.getValue());\r\n\t\t\t\this_parto.setNo_gestaciones(lbxNo_gestaciones.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setParto(lbxParto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setAborto(lbxAborto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCesarias(lbxCesarias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFecha_um(new Timestamp(dtbxFecha_um.getValue()\r\n\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_parto.setUm(tbxUm.getValue());\r\n\t\t\t\this_parto.setFep(tbxFep.getValue());\r\n\t\t\t\this_parto.setGemerales(lbxGemerales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMalformados(lbxMalformados.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_vivos(lbxNacidos_vivos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_muertos(lbxNacidos_muertos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPreterminos(lbxPreterminos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMedico(chbMedico.isChecked());\r\n\t\t\t\this_parto.setEnfermera(chbEnfermera.isChecked());\r\n\t\t\t\this_parto.setAuxiliar(chbAuxiliar.isChecked());\r\n\t\t\t\this_parto.setPartera(chbPartera.isChecked());\r\n\t\t\t\this_parto.setOtros(chbOtros.isChecked());\r\n\t\t\t\this_parto.setControlado(rdbControlado.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setLugar_consulta(rdbLugar_consulta.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNo_consultas(lbxNo_consultas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEspecialistas(chbEspecialistas.isChecked());\r\n\t\t\t\this_parto.setGeneral(chbGeneral.isChecked());\r\n\t\t\t\this_parto.setPartera_consulta(chbPartera_consulta.isChecked());\r\n\t\t\t\this_parto.setSangrado_vaginal(rdbSangrado_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCefalias(rdbCefalias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEdema(rdbEdema.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEpigastralgia(rdbEpigastralgia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setVomitos(rdbVomitos.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setTinutus(rdbTinutus.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEscotomas(rdbEscotomas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_urinaria(rdbInfeccion_urinaria\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_vaginal(rdbInfeccion_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setOtros_embarazo(tbxOtros_embarazo.getValue());\r\n\t\t\t\this_parto.setCardiaca(tbxCardiaca.getValue());\r\n\t\t\t\this_parto.setRespiratoria(tbxRespiratoria.getValue());\r\n\t\t\t\this_parto.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_parto.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_parto.setTempo(tbxTempo.getValue());\r\n\t\t\t\this_parto.setPresion(tbxPresion.getValue());\r\n\t\t\t\this_parto.setPresion2(tbxPresion2.getValue());\r\n\t\t\t\this_parto.setInd_masa(tbxInd_masa.getValue());\r\n\t\t\t\this_parto.setSus_masa(tbxSus_masa.getValue());\r\n\t\t\t\this_parto.setCabeza_cuello(tbxCabeza_cuello.getValue());\r\n\t\t\t\this_parto.setCardiovascular(tbxCardiovascular.getValue());\r\n\t\t\t\this_parto.setMamas(tbxMamas.getValue());\r\n\t\t\t\this_parto.setPulmones(tbxPulmones.getValue());\r\n\t\t\t\this_parto.setAbdomen(tbxAbdomen.getValue());\r\n\t\t\t\this_parto.setUterina(tbxUterina.getValue());\r\n\t\t\t\this_parto.setSituacion(tbxSituacion.getValue());\r\n\t\t\t\this_parto.setPresentacion(tbxPresentacion.getValue());\r\n\t\t\t\this_parto.setV_presentacion(tbxV_presentacion.getValue());\r\n\t\t\t\this_parto.setPosicion(tbxPosicion.getValue());\r\n\t\t\t\this_parto.setV_posicion(tbxV_posicion.getValue());\r\n\t\t\t\this_parto.setC_uterina(tbxC_uterina.getValue());\r\n\t\t\t\this_parto.setTono(tbxTono.getValue());\r\n\t\t\t\this_parto.setFcf(tbxFcf.getValue());\r\n\t\t\t\this_parto.setGenitales(tbxGenitales.getValue());\r\n\t\t\t\this_parto.setDilatacion(tbxDilatacion.getValue());\r\n\t\t\t\this_parto.setBorramiento(tbxBorramiento.getValue());\r\n\t\t\t\this_parto.setEstacion(tbxEstacion.getValue());\r\n\t\t\t\this_parto.setMembranas(tbxMembranas.getValue());\r\n\t\t\t\this_parto.setExtremidades(tbxExtremidades.getValue());\r\n\t\t\t\this_parto.setSnc(tbxSnc.getValue());\r\n\t\t\t\this_parto.setObservacion(tbxObservacion.getValue());\r\n\t\t\t\this_parto.setCodigo_consulta_pyp(lbxCodigo_consulta_pyp\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFinalidad_cons(lbxFinalidad_cons.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setCausas_externas(lbxCausas_externas\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_disnostico(lbxTipo_disnostico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_principal(tbxTipo_principal.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_1(tbxTipo_relacionado_1\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_2(tbxTipo_relacionado_2\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_3(tbxTipo_relacionado_3\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTratamiento(tbxTratamiento.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_parto);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_parto = getServiceLocator().getHis_partoService().guardar(\r\n\t\t\t\t\t\tdatos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}",
"private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }",
"public String guardar()\r\n/* 69: */ {\r\n/* 70: */ try\r\n/* 71: */ {\r\n/* 72: 85 */ this.motivoLlamadoAtencion.setIdOrganizacion(AppUtil.getOrganizacion().getIdOrganizacion());\r\n/* 73: 86 */ this.motivoLlamadoAtencion.setIdSucursal(AppUtil.getSucursal().getIdSucursal());\r\n/* 74: 87 */ this.servicioMotivoLlamadoAtencion.guardar(this.motivoLlamadoAtencion);\r\n/* 75: 88 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 76: 89 */ setEditado(false);\r\n/* 77: 90 */ limpiar();\r\n/* 78: */ }\r\n/* 79: */ catch (Exception e)\r\n/* 80: */ {\r\n/* 81: 92 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 82: 93 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 83: */ }\r\n/* 84: 95 */ return \"\";\r\n/* 85: */ }",
"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 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 void guardar() {\n String msj = \"\";\n int idpagoanulado = daoPagoCuotaAnulado.nuevoID();\n Date SYSDATE = new Date();\n java.sql.Timestamp fechaPagoCuotaAnuladoSQL = new java.sql.Timestamp(SYSDATE.getTime());\n String observacion = txtObservacion.getText();\n int idmotivo = Integer.parseInt(txtCodigoMotivo.getText());\n int idusuario = appLogin.IDUSUARIO;\n int idpago =Integer.parseInt(txtNumeroPago.getText());\n Date fechapago = daoCotizacion.parseFecha(txtFechaPago.getText());\n java.sql.Date fechapagoSQL = new java.sql.Date(fechapago.getTime());\n double mPago = montoPago;\n String numerocomprobante = txtComprobante.getText();\n String numerorecibo = txtRecibo.getText();\n //VALIDACIONES\n if (idmotivo == 0) {\n msj += \"CODIGO DEL MOTIVO DE ANULACION ESTA VACIO.\\n\";\n }\n if (idpago == 0) {\n msj += \"NO HA SELECCIONADO NINGUN PAGO PARA LA ANULACIÓN.\\n\";\n }\n if (msj.isEmpty()) {\n cpca.setIdpagoanulado(idpagoanulado);\n cpca.setFechahoranulado(fechaPagoCuotaAnuladoSQL);\n cpca.setObservacion(observacion);\n cpca.setIdmotivo(idmotivo);\n cpca.setIdusuario(idusuario);\n cpca.setIdpago(idpago);\n cpca.setFechapago(fechapagoSQL);\n cpca.setMonto(mPago);\n cpca.setNumerocomprobante(numerocomprobante);\n cpca.setNumerorecibo(numerorecibo);\n daoPagoCuotaAnulado.agregar(cpca);\n } else {\n JOptionPane.showMessageDialog(null, msj, \"ERRORES\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"@Override\n\tpublic DatosEnc obtenerDatos(DatosEnc datos) {\n\t\tConnection con = null;\n\t\tCallableStatement stmt = null;\n//\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\ttry{\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tString query = \"select * from pv_cotizaciones_det where no_cotizacion = ?\";\n//\t\t\tps = con.prepareStatement(query);\n//\t\t\tps.setString(1, datos.getNoDocumento());\n//\t\t\trs = ps.executeQuery();\n//\t\t\texiste=0;\n//\t\t\twhile(rs.next()){\n//\t\t\t\tif(rs.getString(\"no_cotizacion\") == null){\n//\t\t\t\t\texiste=0;\n//\t\t\t\t}else if(rs.getString(\"no_cotizacion\").equals(datos.getNoDocumento())){\n//\t\t\t\t\texiste=1;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tps.close();\n//\t\t\trs.close();\n//\t\t\tif(existe==0){\n\t\t\t\tcon = new ConectarDB().getConnection();\n\t\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_InUp_Mov_Enc(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\t\tstmt.setString(1, datos.getCodigoCliente());\n\t\t\t\tstmt.setString(2, datos.getNit());\n\t\t\t\tstmt.setString(3, datos.getNombreCliente());\n\t\t\t\tstmt.setString(4, datos.getDirecFactura());\n\t\t\t\tstmt.setString(5, datos.getTel());\n\t\t\t\tstmt.setString(6, datos.getTarjeta());\n\t\t\t\tstmt.setString(7, datos.getDirecEnvio());\n\t\t\t\tstmt.setString(8, datos.getCodigoVendedor());\n\t\t\t\tstmt.setString(9, datos.getUsername());\n\t\t\t\tstmt.setString(10, datos.getTipoDocumento());\n\t\t\t\tstmt.setString(11, datos.getNoDocumento());\n\t\t\t\tstmt.setString(12, datos.getFechaVence());\n\t\t\t\tstmt.setString(13, datos.getTipoPago());\n\t\t\t\tstmt.setString(14, datos.getTipoCredito());\n\t\t\t\tstmt.setString(15, datos.getAutoriza());\n\t\t\t\tstmt.setString(16, datos.getFechaDocumento());\n\t\t\t\tstmt.setString(17, datos.getCargosEnvio());\n\t\t\t\tstmt.setString(18, datos.getOtrosCargos());\n\t\t\t\tstmt.setString(19, datos.getMontoVenta());\n\t\t\t\tstmt.setString(20, datos.getMontoTotal());\n\t\t\t\tstmt.setString(21, datos.getSerieDev());\n\t\t\t\tstmt.setString(22, datos.getNoDocDev());\n\t\t\t\tstmt.setString(23, datos.getObservaciones());\n\t\t\t\tstmt.setString(24, datos.getTipoNota());\n\t\t\t\tstmt.setString(25, datos.getCaja());\n\t\t\t\tstmt.setString(26, datos.getFechaEntrega());\n\t\t\t\tstmt.setString(27, datos.getCodigoDept());\n\t\t\t\tstmt.setString(28, datos.getCodGen());\n\t\t\t\tstmt.setString(29, datos.getNoConsigna());\n\t\t\t\tstmt.setString(30, datos.getCodMovDev());\n\t\t\t\tstmt.setString(31, datos.getGeneraSolicitud());\n\t\t\t\tstmt.setString(32, datos.getTipoPagoNC());\n\t\t\t\tstmt.setString(33, datos.getTipoCliente());\n\t\t\t\tstmt.setString(34, datos.getCodigoNegocio());\n\t\t\t\tstmt.setString(35, datos.getCantidadDevolver());\n\t\t\t\tstmt.setString(36, datos.getAutorizoDespacho());\n\t\t\t\tstmt.setString(37, datos.getSaldo());\n\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tif(rs.getString(1)!=null){\n\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n\t\t\t\t\t}\n\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tif(rs.getString(1)!=null){\n//\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n//\t\t\t\t\t}else{\n//\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n//\t\t\t\t\t}\n//\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tdocumento = rs.getInt(2);\n\t\t\t\t}\n\t\t\t\tcon.close();\n\t\t\t\tstmt.close();\n\t\t\t\trs.close();\n//\t\t\t}\n\t\t\t\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_Del_Mov_Det(?,?,?)}\");\n//\t\t\tstmt.setInt(1, Integer.parseInt(datos.getTipoDocumento()));\n//\t\t\tstmt.setString(2, \"\");\n//\t\t\tstmt.setInt(3, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"limpiado\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_udpv_VerificaCotiza(?,?)}\");\n//\t\t\tstmt.setString(1, \"\");\n//\t\t\tstmt.setInt(2, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"error\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n\t\t}catch(SQLException e ){\n\t\t\tSystem.out.println(\"Error Enc: \" + e.getMessage());\n\t\t}\n\t\treturn datos;\n\t}",
"public void processInsertar() {\n }",
"public EncabezadoRespuesta bajaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t//Mandamos a log el objeto de entrada\n\t\tLogHandler.debug(uid, this.getClass(), \"bajaAsistencia - Datos Entrada: \" + asistencia);\n\t\t//Variable de resultado\n\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\ttry {\n\t\t\tif (asistencia.getIdEmpleado() == null) {\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n \t}\n \tif (asistencia.getUsuarioBaja() == null || asistencia.getUsuarioBaja().trim().isEmpty())\n \t{\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario para la baja.\");\n \t}\n \tif (asistencia.getUsuarioUltMod() == null || asistencia.getUsuarioUltMod().trim().isEmpty())\n \t{\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario para la modificacion.\");\n \t}\n \tAsistenciaDAO dao = new AsistenciaDAO();\n \trespuesta = dao.bajaAsistencia(uid, asistencia);\n\t\t}\n\t\tcatch (ExcepcionesCuadrillas ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"bajaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"bajaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tLogHandler.debug(uid, this.getClass(), \"bajaAsistencia - Datos Salida: \" + respuesta);\n\t\treturn respuesta;\n\t}",
"@Override\r\n\tpublic void guardar() {\n\t\ttab_cuenta.guardar();\r\n\t\tguardarPantalla();\r\n\t\t\r\n\t}",
"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}",
"Reserva Obtener();",
"public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\n }",
"@Override\n\tpublic void borrarDatosOk() {\n\n\t}",
"public void guardarTransferenteAlcabala(RaTransferenteAlcabala raTransferenteAlcabala)throws Exception;",
"public long save(Registro r) {\n\n long id = r.getCodigo();\n SQLiteDatabase db = banco.getWritableDatabase();\n try {\n\n\n ContentValues values = new ContentValues();\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-M-d\");\n String dateString = sdf.format(r.getData());\n values.put(\"data\", dateString);\n values.put(\"distancia\", r.getDistancia());\n values.put(\"consumo\", r.getConsumo());\n values.put(\"mediaAceleracao\", r.getMediaAberturaBorboleta());\n values.put(\"mediaConsumo\", r.getMediaConsumo());\n values.put(\"codTipoCombustivel\", r.getTipoCombustivel().getCodigo());\n values.put(\"codCarro\", r.getCarro().getCodigo());\n values.put(\"codUsuario\", r.getUsuario().getCodigo());\n\n if (id != 0) {//SE O ID É DIFERENTE DE 0 ATUALIZA,\n\n System.out.println(\"Entrou !!\");\n String _id = String.valueOf(r.getCodigo());\n String[] whereArgs = new String[]{_id};\n\n // update registro set values = ... where _id=?\n int count = db.update(TABELA, values, \"codigo=?\", whereArgs);\n\n return count;\n } else {\n\n id = db.insert(TABELA, \"\", values);\n System.out.println(\"Deu certo !! \\n \" + values);\n return id;\n }\n } finally {\n db.close();\n }\n }",
"public Integer guardarTramaAnulacionBD(Map<String, String> parametros, String formaPago) {\r\n try {\r\n if (!DBPinpad.guardarTramaAnulPinpadMC(parametros.get(\"response_code\"), parametros.get(\"amount\"),\r\n parametros.get(\"approval_code\"), parametros.get(\"message\"),\r\n parametros.get(\"card\"), parametros.get(\"month\"),\r\n parametros.get(\"amount_quota\"), parametros.get(\"credit_type\"),\r\n parametros.get(\"client_name\"), parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"), parametros.get(\"ecr_transaccion\"),\r\n parametros.get(\"merchant_id\"), parametros.get(\"print_data\"),\r\n lblDatoPedidoEnv, //VariablesCaja.vNumPedVta\r\n formaPago))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"private void saveTempRojoBhcs(String estado) {\n int c = mTempRojoBhcs.size();\n for (TempRojoBhc temp : mTempRojoBhcs) {\n temp.setEstado(estado);\n estudioAdapter.updateTrojosSent(temp);\n publishProgress(\"Actualizando TempRojoBhc\", Integer.valueOf(mTempRojoBhcs.indexOf(temp)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public String guardarComentario(){\r\n\t\tcomDao.save(com);\r\n\t\tinit();\r\n\t\treturn null;\r\n\t}",
"public Integer guardarTramaRepDetalladoBD(Map<String, String> parametros) {\r\n try {\r\n if (!DBPinpad.guardarTramaRepDetPinpadMC(parametros.get(\"response_code\"), parametros.get(\"message\"),\r\n parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"),\r\n parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"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 Integer guardarTramaCierreBD(Map<String, String> parametros) {\r\n try {\r\n if (!DBPinpad.guardarTramaCierrePinpadMC(parametros.get(\"response_code\"), parametros.get(\"message\"),\r\n parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"),\r\n parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"public void buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}",
"public String guardar()\r\n/* 446: */ {\r\n/* 447:455 */ String url = \"\";\r\n/* 448: */ try\r\n/* 449: */ {\r\n/* 450:458 */ if ((this.facturaProveedorSRI.getMensajeSRI() == null) || (this.facturaProveedorSRI.getMensajeSRI().toLowerCase().contains(\"guardado\")) || \r\n/* 451:459 */ (!this.facturaProveedorSRI.isTraCorregirDatos()))\r\n/* 452: */ {\r\n/* 453:461 */ if (this.facturaProveedorSRI.getDocumento().isIndicadorDocumentoElectronico()) {\r\n/* 454:462 */ this.facturaProveedorSRI.setAutorizacionRetencion(\"0000000000\");\r\n/* 455: */ }\r\n/* 456:464 */ if (isMostrarBaseImponible()) {\r\n/* 457:465 */ for (DetalleFacturaProveedorSRI detalleFacturaProveedorSRI : this.facturaProveedorSRI.getListaDetalleFacturaProveedorSRI())\r\n/* 458: */ {\r\n/* 459:466 */ detalleFacturaProveedorSRI.setBaseImponibleTarifaCero(BigDecimal.ZERO);\r\n/* 460:467 */ detalleFacturaProveedorSRI.setBaseImponibleDiferenteCero(BigDecimal.ZERO);\r\n/* 461:468 */ detalleFacturaProveedorSRI.setBaseImponibleNoObjetoIva(BigDecimal.ZERO);\r\n/* 462: */ }\r\n/* 463: */ }\r\n/* 464:471 */ if (isMostrarBasesDetalle()) {\r\n/* 465:472 */ for (DetalleFacturaProveedorSRI detalleFacturaProveedorSRI : this.facturaProveedorSRI.getListaDetalleFacturaProveedorSRI()) {\r\n/* 466:473 */ detalleFacturaProveedorSRI.setBaseImponibleRetencion(BigDecimal.ZERO);\r\n/* 467: */ }\r\n/* 468: */ }\r\n/* 469:477 */ this.servicioFacturaProveedorSRI.guardar(this.facturaProveedorSRI);\r\n/* 470: */ }\r\n/* 471: */ else\r\n/* 472: */ {\r\n/* 473:480 */ this.servicioFacturaProveedorSRI.actualizarRetencion(this.facturaProveedorSRI);\r\n/* 474: */ }\r\n/* 475:482 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 476:484 */ if (this.facturaProveedorSRI.getFacturaProveedor() == null) {\r\n/* 477:485 */ url = \"/paginas/financiero/contabilidad/procesos/compraCajaChica?faces-redirect=true\";\r\n/* 478: */ } else {\r\n/* 479:488 */ url = \"/paginas/compras/procesos/facturaProveedor?faces-redirect=true&numero=\" + this.facturaProveedorSRI.getFacturaProveedor().getNumero();\r\n/* 480: */ }\r\n/* 481: */ }\r\n/* 482: */ catch (ExcepcionAS2Financiero e)\r\n/* 483: */ {\r\n/* 484:492 */ e.printStackTrace();\r\n/* 485:493 */ addInfoMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 486:494 */ LOG.info(\"ERROR ExcepcionAS2Financiero AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 487: */ }\r\n/* 488: */ catch (ExcepcionAS2 e)\r\n/* 489: */ {\r\n/* 490:497 */ e.printStackTrace();\r\n/* 491:498 */ addInfoMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 492:499 */ LOG.info(\"ERROR ExcepcionAS2 AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 493: */ }\r\n/* 494: */ catch (Exception e)\r\n/* 495: */ {\r\n/* 496:502 */ e.printStackTrace();\r\n/* 497:503 */ addInfoMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 498:504 */ LOG.error(\"ERROR AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 499: */ }\r\n/* 500:507 */ return url;\r\n/* 501: */ }",
"public String save() {\r\n\t\ttry {\r\n\r\n\t\t\tif (obs != null && !obs.trim().isEmpty()) {\r\n\t\t\t\tconcurso.setObservacionReserva(obs);\r\n\t\t\t\tconcursoHome.setInstance(concurso);\r\n\t\t\t\tString res = concursoHome.update();\r\n\t\t\t}\r\n\r\n\t\t\tfor (PlantaCargoDetDTO dto : listaPlantaCargoDto) {\r\n\r\n\t\t\t\tif (dto.getReservar()) {\r\n\t\t\t\t\tEstadoDet est = buscarEstado(\"en reserva\");\r\n\t\t\t\t\tif (!existeEnDetalle(dto.getPlantaCargoDet(), est)) {\r\n\t\t\t\t\t\t// buscar\r\n\r\n\t\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\t\tp.setActivo(true);\r\n\t\t\t\t\t\tp.setFechaAlta(new Date());\r\n\t\t\t\t\t\tp.setUsuAlta(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\tp.setNroOrden(2);\r\n\t\t\t\t\t\tp.setPlantaCargoDet(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\t\tif (est != null)\r\n\t\t\t\t\t\t\tp.setEstadoDet(est);\r\n\t\t\t\t\t\tp.setConcurso(concursoHome.getInstance());\r\n\t\t\t\t\t\tem.persist(p);\r\n\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(est.getEstadoCab());\r\n\t\t\t\t\t\tplanta.setEstadoDet(est);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Incidencia 1079 */\r\n\t\t\t\trefreshListaPuestoReservados();\r\n\t\t\t\t/**/\r\n\t\t\t\tEstadoCab estadoCab = obtenerEstadosCabecera(\"VACANTE\");\r\n\t\t\t\tif (esta(dto.getPlantaCargoDet())) {\r\n\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\tp = recuperarConcurso(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\tif (!dto.getReservar()) {\r\n\t\t\t\t\t\tif (p.getConcursoPuestoAgr() != null) {\r\n\t\t\t\t\t\t\tstatusMessages.clear();\r\n\t\t\t\t\t\t\tstatusMessages.add(Severity.ERROR,\r\n\t\t\t\t\t\t\t\t\t\"El puesto pertenece a un grupo\");\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * p.setActivo(true); p.setNroOrden(1);\r\n\t\t\t\t\t\t * p.setFechaMod(new Date());\r\n\t\t\t\t\t\t * p.setUsuMod(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\t * EstadoDet est = buscarEstado(\"libre\");\r\n\t\t\t\t\t\t * p.setEstadoDet(est); em.merge(p);\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(estadoCab);\r\n\t\t\t\t\t\tplanta.setEstadoDet(null);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\t\t\t\t\t\tif (!concurso\r\n\t\t\t\t\t\t\t\t.getDatosEspecificosTipoConc()\r\n\t\t\t\t\t\t\t\t.getDescripcion()\r\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\r\n\t\t\t\t\t\t\t\t\t\tCONCURSO_INTERNO_INTERINSTITUCIONAL)\r\n\t\t\t\t\t\t\t\t&& planta.getPermanente())\r\n\t\t\t\t\t\t\treponerCategoriasController.reponerCategorias(p,\r\n\t\t\t\t\t\t\t\t\t\"PUESTO\", \"CONCURSO\");\r\n\t\t\t\t\t\tem.remove(p);\r\n\t\t\t\t\t\t// listaPlantaCargoDto.remove(dto);\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\tobs = null;\r\n\t\t\tem.flush();\r\n\t\t\tllenarListado1();\r\n\t\t\tstatusMessages.clear();\r\n\t\t\tstatusMessages.add(Severity.INFO, SeamResourceBundle.getBundle()\r\n\t\t\t\t\t.getString(\"GENERICO_MSG\"));\r\n\t\t\treturn \"persisted\";\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void trabajar() {\n\n\t}",
"public void guardar() {\n try {\n if (this.buscarCodApelacion()) {\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.INSERTA_APELACIONES(apelacionesBean); \n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.apelacionesBean.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"0\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue insertada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n this.apelacionesBean = new ApelacionesBean();\n addMessage(\"Guadado Exitosamente\", 1);\n } else {\n addMessage(\"La solicitud de apelacion especificada no existe\", 1);\n this.Listar();\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 }",
"private void guardarEstadoObjetosUsados() {\n }",
"@Override\n\tpublic int insertarEntrada(AlmacenDTO obj) {\n\t\tint rs=-1;\n\t\tConnection con=null;\n\t\tPreparedStatement pst=null;\n\t\ttry {\n\t\t\tcon=new MySqlDbConexion().getConexion();\n\t\t\tString sql=\"insert into MATERIAL_ENTRADA values (null,?,?,?)\";\n\t\t\tpst=con.prepareStatement(sql);\n\t\t\t\n\t\t\tpst.setInt(1,obj.getCodigo_producto());\n\t\t\tpst.setInt(2,obj.getCantidad_entrada());\n\t\t\tpst.setDate(3,obj.getFecha_entrada());\n\t\t\t\n\t\t\trs=pst.executeUpdate();\n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error en la Sentencia\"+e.getMessage());\n\t\t\t\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif(pst!=null) pst.close();\n\t\t\t\tif(con!=null) con.close();\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Error al cerrar\");\n\t\t\t}\n\t\t}\n\t\treturn rs;\n\t}",
"private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }",
"@Override\n\t@Transactional //los que no impliquen listados solo seran de tipo transactional\n\tpublic boolean grabar(Autoridad autoridad) {\n\t\tAutoridad objAutoridad = dAutoridad.save(autoridad);\n\t\tif (objAutoridad == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"private void remplirUtiliseData() {\n\t}",
"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 void persistirRemessaC17() throws Exception {\n if (this.remessa == null || this.remessa.getId() == null) { \n this.remessa = new RemessaVO();\n this.remessa.setDataHoraAbertura(new Date());\n this.remessa.setCodigoUsuarioAbertura(this.usuario.getNuMatricula());\n this.remessa.setUnidadeSolicitante(unidadeServiceRef.findUnidadeLotacaoUsuarioLogado());\n this.remessa = remessaService.salvarRascunhoRemessaAB(this.remessa);\n }\n }",
"public void guardar4(View view){\n bdboletas admin= new bdboletas(this, \"Boleta de Transito\", null, 1);\n SQLiteDatabase BaseDeDatos= admin.getWritableDatabase();\n\n placa= etplaca.getText ().toString ();\n modelo= etmodelo.getText ().toString ();\n marca= etmarca.getText ().toString ();\n color= etmodelo.getText ().toString ();\n\n año_string= etaño.getText ().toString ();\n\n int año_int=Integer.parseInt (año_string);\n\n serial= etserial.getText ().toString ();\n\n String seleccion=spinner_vehiculo.getSelectedItem ().toString ();\n\n if (!placa.isEmpty () && !modelo.isEmpty () && !marca.isEmpty ()\n && !color.isEmpty () && !año_string.isEmpty () && !serial.isEmpty ()\n && !seleccion.isEmpty ()){\n\n ContentValues registro= new ContentValues ();\n\n registro.put (\"placa\",placa);\n registro.put (\"marca\",marca);\n registro.put (\"modelo\",modelo);\n registro.put (\"tipo_vehiculo\",seleccion);\n registro.put (\"color\",color);\n registro.put (\"año\",año_int);\n registro.put (\"s_carroceria\",serial);\n\n BaseDeDatos.insert(\"boletas\",null , registro);\n\n BaseDeDatos.close();\n\n Toast.makeText(this,\"registo exitoso\",Toast.LENGTH_SHORT).show();\n // metodo boton siguiente\n Intent siguiente = new Intent (this, Remolque.class);\n startActivity (siguiente);\n }else{\n Toast.makeText(this,\"debe llenar todos los campos para poder continuar\",Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n\t\tpublic void guardar() {\n\t\t\t\n\t\t\tif (tab_presupuesto.guardar()){\n\t\t\t\tif (tab_asociacion_presupuestaria.guardar()) {\n\t\t\t\t\tguardarPantalla();\n\t\t\t\t\t//Actualizar el arbol\n\t\t\t\t\tarb_clasificador.ejecutarSql();\n\t\t\t\t\tutilitario.addUpdate(\"arb_clasificador\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t}",
"public RespuestaBD crearRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioInsercion) {\n/* 342 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* 344 */ int elSiguiente = siguienteRegistro(codigoFlujo);\n/* 345 */ if (elSiguiente == 0) {\n/* 346 */ rta.setMensaje(\"Generando secuencia\");\n/* 347 */ return rta;\n/* */ } \n/* */ \n/* */ try {\n/* 351 */ String s = \"insert into wkf_detalle(codigo_flujo,secuencia,servicio_inicio,accion,codigo_estado,servicio_destino,nombre_procedimiento,correo_destino,enviar_solicitud,ind_mismo_proveedor,ind_mismo_cliente,estado,caracteristica,valor_caracteristica,caracteristica_correo,metodo_seleccion_proveedor,ind_correo_clientes,enviar_hermana,enviar_si_hermana_cerrada,ind_cliente_inicial,usuario_insercion,fecha_insercion) values (\" + codigoFlujo + \",\" + \"\" + elSiguiente + \",\" + \"\" + servicioInicio + \",\" + \"\" + accion + \",\" + \"\" + codigoEstado + \",\" + \"\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \"'\" + nombreProcedimiento + \"',\" + \"'\" + correoDestino + \"',\" + \"'\" + enviar + \"',\" + \"'\" + mismoProveedor + \"',\" + \"'\" + mismoCliente + \"',\" + \"'\" + estado + \"',\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \"'\" + usuarioInsercion + \"',\" + \"\" + Utilidades.getFechaBD() + \"\" + \")\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 398 */ rta = this.dat.executeUpdate2(s);\n/* 399 */ rta.setSecuencia(elSiguiente);\n/* */ }\n/* 401 */ catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"%FlujoDetalleDAO:crearRegistro \", e);\n/* 404 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 406 */ return rta;\n/* */ }",
"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}",
"public boolean insertarCreacionHistorialCliente(Cliente cliente) {\n String queryDividido1 = \"INSERT INTO Historial_Cliente(Usuario_Codigo, Nombre, DPI, Direccion, Sexo, Password, Nacimiento, DPI_Escaneado, Tipo, Fecha_Cambio) \"\n + \"VALUES(?,?,?,?,?,aes_encrypt(?,'AES'),?,?,?,?)\";\n java.sql.Date fechaCreacion = new java.sql.Date(Calendar.getInstance().getTime().getTime());\n\n try {\n\n PreparedStatement enviarDividido1 = Conexion.conexion.prepareStatement(queryDividido1);\n\n //Envio de los Datos de Creacion de un Nuevo Cliente a la Tabla Historial_Cliente\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.setString(7, cliente.getNacimiento());\n enviarDividido1.setBlob(8, cliente.getDPIEscaneado());\n enviarDividido1.setString(9, \"Creacion\");\n enviarDividido1.setString(10, fechaCreacion.toString());\n enviarDividido1.executeUpdate();\n\n \n return true;\n\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n return false;\n }\n\n }",
"public Integer guardarTramaReimpresionBD(Map<String, String> parametros) {\r\n try {\r\n if (!DBPinpad.guardarTramaReimpPinpadMC(parametros.get(\"response_code\"), parametros.get(\"message\"),\r\n parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"),\r\n parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"public String insertar(Cargo cargo){\n String registrosInser=\"Registro insertado N°= \";\n long contador;\n ContentValues c=new ContentValues();\n //c.put(\"ID_CARGO\",cargo.getIdCargo());\n c.put(\"NOMBRE_CARGO\",cargo.getNombreCargo());\n c.put(\"DESCRIPCION_CARGO\",cargo.getDescripcionCargo());\n contador=db.insert(\"CARGO\",null,c);\n if(contador==-1||contador==0){\n registrosInser=\"Error al insertar\";\n }\n else{\n registrosInser=registrosInser+contador;\n }\n /* String registrosInser=\"Registro insertado N°= \";\n long contador= 0;\n ContentValues carg = new ContentValues();\n //carg.put(\"ID_CARGO\",cargo.getIdCargo());\n carg.put(\"NOMBRE_CARGO\",cargo.getNombreCargo());\n carg.put(\"DESCRIPCION_CARGO\",cargo.getDescripcionCargo());\n contador=db.insert(\"CARGO\",null,carg);\n if(contador==-1||contador==0){\n registrosInser=\"error al insertar\";\n }\n else{\n registrosInser=registrosInser+contador;\n }\n return registrosInser;*/\n return registrosInser;\n\n }",
"private void readAndSAVE(){\n boolean vaidation_status = true;\n\n achiv_title = edtxt_achiv_title.getText().toString();\n if (TextUtils.isEmpty(achiv_title)){\n edtxt_achiv_title.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_achiv_title.setError(null);\n }\n\n achiv_date = edtxt_achiv_date.getText().toString();\n if (TextUtils.isEmpty(achiv_date)){\n edtxt_achiv_date.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_achiv_date.setError(null);\n }\n\n\n\n achiv_details = edtxt_achiv_details.getText().toString();\n if(achiv_details.isEmpty()){\n vaidation_status = false;\n edtxt_achiv_details.setText(\"Please write Details!!\");\n }\n\n // if all vaidation is true then add all details into firbase database\n if(vaidation_status){\n\n //create Details model\n AchivmentsDetails addNewAchiv = new AchivmentsDetails();\n\n addNewAchiv.setAchv_titles(achiv_title);\n addNewAchiv.setAchv_date(achiv_date);\n addNewAchiv.setAchv_details(achiv_details);\n\n showProgressDialog();\n\n if(mAuth.getCurrentUser()!=null)\n {\n //CHECK IF new achivments has been added or update process.\n String achiv_key;\n if(operationStatus.equals(\"ADD_NEW\")) {\n\n // Get new push key\n achiv_key = mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").push().getKey();\n addNewAchiv.setAchv_firbase_ID(achiv_key);\n\n } else {\n achiv_key = operationStatus;\n addNewAchiv.setAchv_firbase_ID(achiv_key);\n }\n\n // save the user at UserNode under user UID\n mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").child(achiv_key).setValue(addNewAchiv, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n\n hideProgressDialog();\n\n if(databaseError==null)\n {\n Toast.makeText(AddNewAchivmentsActivity.this, \"Your Details has been saved !!\",\n Toast.LENGTH_SHORT).show();\n finish();\n }\n }\n });\n }\n\n\n\n }\n }",
"public void guardarSolicitud() {\n Map<String, String> paramMap = getParametrosSesion();\n String cadenaFirmada;\n try {\n if (paramMap != null) {\n cadenaFirmada = paramMap.get(firmaFormHelper.FIRMA_DIGITAL);\n firmaFormHelper.setSelloDigital(paramMap.get(FirmaFormHelper.FIRMA_DIGITAL));\n\n SimpleDateFormat formato = new SimpleDateFormat(\"dd/MM/yyyy\");\n produccion.setFechProduccion(new Date());\n desperdiciosHelper.setFechaAcuse(formato.format(produccion.getFechProduccion()));\n\n if (cadenaFirmada.length() > 0) {\n guardarRangosFolios();\n Acuse acuse = new Acuse();\n acuse.setSerieAcuse(TipoAcuse.DESPERDICIO);\n acuse.setIdProveedor(produccionCigarrosHelper.getProveedor().getIdProveedor());\n acuse.setSelloDigital(firmaFormHelper.getSelloDigital());\n acuse.setCadenaOriginal(firmaFormHelper.getCadenaOriginal());\n acuse.setFecCaptura(new Date());\n desperdiciosHelper.setIdAcuseRecibo(commonService.crearAcuse(acuse));\n habilitarPnlAcuse();\n registroMovimientoBitacora(getSession(), IdentificadorProcesoEnum.CONTRIBUYENTE_TRAMITES, new Date(), new Date(), MovimientosBitacoraEnum.DESPERDICIOS_DESTRUCCION);\n } else {\n habilitarPnlPrincipal();\n }\n }\n } catch (CommonServiceException e) {\n LOGGER.error(e.getMessage(), e);\n addErrorMessage(ERROR, \"No se pudo generar el acuse\");\n } catch (Exception ex) {\n LOGGER.error(ex.getMessage());\n }\n }",
"protected String cargarTempRojoBhcs(String url, String username,\n String password) throws Exception {\n try {\n getTempRojoBhcs();\n if(mTempRojoBhcs.size()>0){\n saveTempRojoBhcs(Constants.STATUS_SUBMITTED);\n // La URL de la solicitud POST\n final String urlRequest = url + \"/movil/trojos\";\n TempRojoBhc[] envio = mTempRojoBhcs.toArray(new TempRojoBhc[mTempRojoBhcs.size()]);\n HttpHeaders requestHeaders = new HttpHeaders();\n HttpAuthentication authHeader = new HttpBasicAuthentication(username, password);\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n requestHeaders.setAuthorization(authHeader);\n HttpEntity<TempRojoBhc[]> requestEntity =\n new HttpEntity<TempRojoBhc[]>(envio, requestHeaders);\n RestTemplate restTemplate = new RestTemplate();\n restTemplate.getMessageConverters().add(new StringHttpMessageConverter());\n restTemplate.getMessageConverters().add(new MappingJacksonHttpMessageConverter());\n // Hace la solicitud a la red, pone la vivienda y espera un mensaje de respuesta del servidor\n ResponseEntity<String> response = restTemplate.exchange(urlRequest, HttpMethod.POST, requestEntity,\n String.class);\n // Regresa la respuesta a mostrar al usuario\n if (!response.getBody().matches(\"Datos recibidos!\")) {\n saveTempRojoBhcs(Constants.STATUS_NOT_SUBMITTED);\n }\n return response.getBody();\n }\n else{\n return \"Datos recibidos!\";\n }\n } catch (Exception e) {\n Log.e(TAG, e.getMessage(), e);\n saveTempRojoBhcs(Constants.STATUS_NOT_SUBMITTED);\n return e.getMessage();\n }\n\n }",
"ParqueaderoEntidad actualizar(ParqueaderoEntidad parqueadero);",
"public String buscarTrabajadoresPorParametros() {\r\n try {\r\n inicializarFiltros();\r\n listaTrabajadores = null;\r\n //listaTrabajadores = administrarGestionarTrabajadoresBO.consultarTrabajadoresPorParametro(filtros);\r\n return null;\r\n } catch (Exception e) {\r\n System.out.println(\"Error ControllerAdministrarTrabajadores buscarTrabajadoresPorParametros : \" + e.toString());\r\n return null;\r\n }\r\n }",
"public Usuario buscarUsuario(String usuario) {\n Usuario usuario1 = new Usuario();\n try{\n\t\tString seleccion = \"SELECT usuario, nombre, clave FROM usuarios where usuario=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setString(1, usuario);\n \n\t\t//Savepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n \n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n usuario1.setUsuario(rs.getString(\"usuario\")); \n usuario1.setNombre(rs.getString(\"nombre\")); \n usuario1.setClave(rs.getString(\"clave\")); \n return usuario1;\n\t\t} \n \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return null; \n\n }",
"private void saveRazonNoData(String estado) {\n int c = mRazonNoData.size();\n for (RazonNoData rnd : mRazonNoData) {\n rnd.setEstado(estado);\n estudioAdapter.updateRazonNoDataSent(rnd);\n publishProgress(\"Actualizando Razones No Datos\", Integer.valueOf(mRazonNoData.indexOf(rnd)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public boolean Insert(String tipo, String lugar, String accion, String responsable, String vencimiento,String spinnerRiesgoSeleccion,\n String spinnerSectorSeleccion, String estado, String condicionInsegura, String usuario, String imagen, String site,\n String fecha, String Lider_recorrida, String Participantes, String Categoria){\n\n SQLiteDatabase BaseDeDatos=this.getWritableDatabase();\n ContentValues values=new ContentValues();\n\n if(tipo==\"Reporte de condiciones inseguras UAC\"){\n tipo = \"UAC\";\n }else if(tipo == \"Auditoria de primera parte\"){\n tipo = \"Auditoria\";\n }else {\n tipo = \"EHSS\";\n }\n values.put(\"tipo\", tipo);\n values.put(\"site\", site);\n values.put(\"fecha\", fecha);\n String fh = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date());\n values.put(\"fechaHoraCreacion\", fh);\n values.put(\"sector\",spinnerSectorSeleccion);\n values.put(\"lugar\", lugar);\n values.put(\"accion\", accion);\n values.put(\"responsable\", responsable);\n values.put(\"vencimiento\", vencimiento);\n values.put(\"riesgo\",spinnerRiesgoSeleccion);\n values.put(\"estado\",estado );\n values.put(\"condicionInsegura\", condicionInsegura);\n values.put(\"usuarioCreacion\",usuario);\n values.put(\"imagenUAC\",imagen);\n values.put(\"Lider_recorrida\",Lider_recorrida);\n values.put(\"Participantes\",Participantes);\n values.put(\"Categoria\",Categoria);\n values.put(\"syncro\", 0);\n\n boolean resultado=BaseDeDatos.insert(\"uac\",null,values)>0;\n BaseDeDatos.close();\n return resultado;\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 }",
"public void guardarDatos() throws Exception {\n\t\ttry {\n\t\t\tFormularioUtil.setUpperCase(groupboxEditar);\n\t\t\tif (validarForm()) {\n\t\t\t\t// Cargamos los componentes //\n\n\t\t\t\tHisc_urgencia_odontologico hisc_urgencia_odontologico = getBean();\n\n\t\t\t\tMap<String, Object> datos = new HashMap<String, Object>();\n\t\t\t\tdatos.put(\"hisc_urgencia_odontologico\",\n\t\t\t\t\t\thisc_urgencia_odontologico);\n\t\t\t\t// datos.put(\"sigvitales\", mcSignosVitales.obtenerSigvitales());\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getValue());\n\t\t\t\tdatos.put(\"admision\", admision);\n\t\t\t\tdatos.put(\"datos_procedimiento\", getProcedimientos());\n\n\t\t\t\tImpresion_diagnostica impresion_diagnostica = macroImpresion_diagnostica\n\t\t\t\t\t\t.obtenerImpresionDiagnostica();\n\t\t\t\tdatos.put(\"impresion_diagnostica\", impresion_diagnostica);\n\n\t\t\t\tgetServiceLocator().getHisc_urgencia_odontologicoService()\n\t\t\t\t\t\t.guardarDatos(datos);\n\n\t\t\t\ttbxAccion.setValue(\"modificar\");\n\t\t\t\tinfoPacientes.setCodigo_historia(hisc_urgencia_odontologico\n\t\t\t\t\t\t.getCodigo_historia());\n\n\t\t\t\tactualizarRemision(admision, getInformacionClinica(), this);\n\t\t\t\tcargarServicios();\n\n\t\t\t\tMensajesUtil.mensajeInformacion(\"Informacion ..\",\n\t\t\t\t\t\t\"Los datos se guardaron satisfactoriamente\");\n\t\t\t}\n\n\t\t} catch (ImpresionDiagnosticaException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t} catch (Exception e) {\n\t\t\tif (!(e instanceof WrongValueException)) {\n\t\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t\t}\n\t\t}\n\t}",
"public String adicionarubicacion(ubicacion ubicacion) {\n String miRespuesta;\n Conexion miConexion = new Conexion();\n Connection nuevaCon;\n nuevaCon = miConexion.getConn();\n \n //sentecia \n PreparedStatement sentencia;\n //try-catch \n try {\n // consulta \n String Query = \"INSERT INTO ubicacion (Departamento,municipio)\"\n + \"VALUES (?,?)\";\n sentencia = nuevaCon.prepareStatement(Query);\n sentencia.setString(1,ubicacion.getDepartamento());\n sentencia.setString(2,ubicacion.getMunicipio());\n \n sentencia.execute();\n miRespuesta = \"\";\n } catch (Exception ex){\n miRespuesta = ex.getMessage();\n System.err.println(\"Ocurrio un problea en ubicacionDAO\\n \" + ex.getMessage());\n }\n \n return miRespuesta;\n }",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Trabajo newTrabajo = (Trabajo) data.getSerializableExtra(\"resultado\");\n\n if(newTrabajo.getId() != 0) { // Si NO es un Trabajo Nuevo Vacío, osea que no hayan Cancelado la operación\n Toast.makeText(getBaseContext(), \"Nuevo Trabajo: \" + newTrabajo.getDescripcion(), Toast.LENGTH_LONG).show();\n\n // Insertamos en la Categoría correspondiente el Nuevo Trabajo\n Categoria.CATEGORIAS_MOCK[newTrabajo.getCategoria().getId()].addTrabajo(newTrabajo);\n\n // Incorporamos a la \"listaTrabajos\" el Nuevo Trabajo\n this.listaTotalTrabajos();\n\n //Se notifica al adaptador de que el ArrayList que tiene asociado ha sufrido cambios (forzando asi a ir al metodo getView())\n adaptador.notifyDataSetChanged();\n }\n }",
"public FlujoDetalleDTO leerRegistro() {\n/* */ try {\n/* 82 */ FlujoDetalleDTO reg = new FlujoDetalleDTO();\n/* */ \n/* 84 */ reg.setCodigoFlujo(this.rs.getInt(\"codigo_flujo\"));\n/* 85 */ reg.setSecuencia(this.rs.getInt(\"secuencia\"));\n/* 86 */ reg.setServicioInicio(this.rs.getInt(\"servicio_inicio\"));\n/* 87 */ reg.setCodigoEstado(this.rs.getInt(\"codigo_estado\"));\n/* 88 */ reg.setServicioDestino(this.rs.getInt(\"servicio_destino\"));\n/* 89 */ reg.setNombreProcedimiento(this.rs.getString(\"nombre_procedimiento\"));\n/* 90 */ reg.setCorreoDestino(this.rs.getString(\"correo_destino\"));\n/* 91 */ reg.setEnviarSolicitud(this.rs.getString(\"enviar_solicitud\"));\n/* 92 */ reg.setMismoProveedor(this.rs.getString(\"ind_mismo_proveedor\"));\n/* 93 */ reg.setMismoCliente(this.rs.getString(\"ind_mismo_cliente\"));\n/* 94 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 95 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 96 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 97 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 98 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 99 */ reg.setNombreServicioInicio(this.rs.getString(\"nombre_servicio_inicio\"));\n/* 100 */ reg.setNombreCodigoEstado(this.rs.getString(\"nombre_codigo_estado\"));\n/* 101 */ reg.setNombreServicioDestino(this.rs.getString(\"nombre_servicio_destino\"));\n/* 102 */ reg.setNombreEstado(this.rs.getString(\"nombre_estado\"));\n/* 103 */ reg.setCaracteristica(this.rs.getInt(\"caracteristica\"));\n/* 104 */ reg.setCaracteristicaValor(this.rs.getInt(\"valor_caracteristica\"));\n/* 105 */ reg.setCaracteristicaCorreo(this.rs.getInt(\"caracteristica_correo\"));\n/* 106 */ reg.setNombreCaracteristica(this.rs.getString(\"nombre_caracteristica\"));\n/* 107 */ reg.setDescripcionValor(this.rs.getString(\"descripcion_valor\"));\n/* 108 */ reg.setMetodoSeleccionProveedor(this.rs.getString(\"metodo_seleccion_proveedor\"));\n/* 109 */ reg.setIndCorreoCliente(this.rs.getString(\"ind_correo_clientes\"));\n/* */ \n/* */ try {\n/* 112 */ reg.setEnviar_hermana(this.rs.getString(\"enviar_hermana\"));\n/* 113 */ reg.setEnviar_si_hermana_cerrada(this.rs.getString(\"enviar_si_hermana_cerrada\"));\n/* 114 */ reg.setInd_cliente_inicial(this.rs.getString(\"ind_cliente_inicial\"));\n/* */ \n/* */ \n/* */ }\n/* 118 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 122 */ return reg;\n/* */ }\n/* 124 */ catch (Exception e) {\n/* 125 */ e.printStackTrace();\n/* 126 */ Utilidades.writeError(\"FlujoDetalleDAO:leerRegistro \", e);\n/* */ \n/* 128 */ return null;\n/* */ } \n/* */ }",
"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 }",
"private void controladorAtras(Controlador controlador){\n this.contAtras = controlador.getAtras();\n registro.setControlAtras(contAtras);\n login.setControlAtras(contAtras);\n }",
"public void guardarCV(String nombre, String Apellido,String dni,String mail,String cur ,File ruta,String mensaje){\r\n Alumnos alu=new Alumnos();\r\n alu.setNombre(nombre);\r\n alu.setApellido(Apellido);\r\n alu.setDni(dni);\r\n alu.setMail(mail);\r\n alu.setMensaje(mensaje);\r\n alu.setNom_archivo(cur);\r\n\r\n\r\n\r\n try{ //convierte el archivo pdf a bytes\r\n byte[] pdf= new byte[(int) ruta.length()];\r\n InputStream input= new FileInputStream(ruta);\r\n input.read(pdf);\r\n alu.setArchivo_cv(pdf);\r\n\r\n }catch(IOException e){\r\n alu.setArchivo_cv(null);\r\n }\r\n alu.insertarCV(alu);\r\n }",
"public void grabarConcepto(){\r\n try {\r\n Conexion conexion = new Conexion();\r\n String query = \"insert into concepto (descripcion, tipoConcepto, porcentaje, monto, fijo) values (?,?,?,?,?);\";\r\n PreparedStatement st = conexion.getConnection().prepareStatement(query);\r\n st.setString(1, this.getDescripcion());\r\n st.setString(2, this.getTipoConcepto());\r\n st.setDouble(3, this.getPorcentaje());\r\n st.setDouble(4, this.getMonto());\r\n st.setString(5, this.getFijo());\r\n st.execute();\r\n System.out.println(\"SE GRABO EL CONCEPTO EN LA BASE DE DATOS\");\r\n st.close();\r\n conexion.desconectar();\r\n } catch (SQLException ex) {\r\n System.err.println(ex.getMessage());\r\n }\r\n }",
"int insert(TCar record);",
"Lancamento persistir(Lancamento lancamento);",
"public void guardar() {\n try {\n objConec.conectar();\n objConec.Sql = objConec.con.prepareStatement(\"insert into contacto values(null,?,?,?,?,?)\");\n objConec.Sql.setString(1, getNom_con());\n objConec.Sql.setInt(2, getTel_con()); \n objConec.Sql.setString(3, getEma_con());\n objConec.Sql.setString(4, getAsu_con());\n objConec.Sql.setString(5, getMen_con());\n objConec.Sql.executeUpdate();\n objConec.cerrar();\n JOptionPane.showMessageDialog(null, \"Mensaje enviado correctamente\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Error al enviar el mensaje\");\n\n }\n\n }",
"private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }",
"public void save() {\n super.storageSave(listPedidosAssistencia.toArray());\n }",
"public EncabezadoRespuesta entradaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\t\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t\t\t//Mandamos a log el objeto de entrada\n\t\t\t\tLogHandler.debug(uid, this.getClass(), \"entradaAsistencia - Datos Entrada: \" + asistencia);\n\t\t\t\t//Variable de resultado\n\t\t\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\t try {\n\t\t \tif (asistencia.getIdEmpleado() == null) {\n\t\t \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n\t\t \t}\n\t\t \tif (asistencia.getUsuarioAlta() == null || asistencia.getUsuarioAlta().trim().isEmpty()) {\n\t\t \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario.\");\n\t\t \t}\n\t\t \tAsistenciaDAO dao = new AsistenciaDAO();\n\t\t \trespuesta = dao.entradaAsistencia(uid, asistencia);\n\n\t\t } catch (ExcepcionesCuadrillas ex) {\n\t\t\t\t\tLogHandler.error(uid, this.getClass(), \"entradaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\t\t\trespuesta.setUid(uid);\n\t\t\t\t\trespuesta.setEstatus(false);\n\t\t\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {\n\t\t\t\t\tLogHandler.error(uid, this.getClass(), \"entradaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\t\t\trespuesta.setUid(uid);\n\t\t\t\t\trespuesta.setEstatus(false);\n\t\t\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t\t\t}\n\t\t\t\tLogHandler.debug(uid, this.getClass(), \"entradaAsistencia - Datos Salida: \" + respuesta);\n\t\t\t\treturn respuesta;\n\t}",
"@Override\r\n public Assunto persistir(Assunto assunto) {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n em.getTransaction().begin();\r\n try {\r\n assunto = em.merge(assunto);\r\n em.getTransaction().commit();\r\n System.out.println(\"Registro Assunto gravado com sucesso\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return assunto;\r\n }",
"public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}",
"public void guardarEntrada(HashMap<String, Object> diccionario_datos){\n File file = new File(fichero_database);\n FileWriter writer = null;\n if(file.exists()){\n try{\n writer = new FileWriter(file, true);\n //crea un buffer o flujo intermedio antes de escribir directamente en el archivo\n BufferedWriter bfwriter = new BufferedWriter(writer);\n Iterator it = diccionario_datos.entrySet().iterator();\n while (it.hasNext()) {\n HashMap.Entry pair = (HashMap.Entry)it.next();\n bfwriter.write(pair.getKey() + \",\" );\n it.remove(); // para evitar ConcurrentModificationException\n }\n bfwriter.write(\"\\n\" );\n bfwriter.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (writer != null) {\n try {//cierra el flujo principal\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n }",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"public ArrayList<Mascota> obtenerDatos(){\n\n BaseDatos db = new BaseDatos(context);\n\n ArrayList<Mascota> aux = db.obtenerTodoslosContactos();\n\n if(aux.size()==0){\n insertarMascotas(db);\n aux = db.obtenerTodoslosContactos();\n }\n\n return aux;\n }",
"public void asociar(){\n abrirEntAntMaest();\n try{\n while(true){\n CuentaSerializada cuenta =\n (CuentaSerializada) entAntMaest.readObject();\n \n abrirEntTransaccion();\n empatarCuentaTransaccion(cuenta);\n cerrarEntTransaccion();\n agregarASalNuevoMaest(cuenta);\n }\n }\n catch(EOFException eOFException){\n System.out.printf(\"%nNo hay mas registros%n\");\n }\n catch(ClassNotFoundException classNotFoundException){\n System.err.println(\"Tipo de objeto invalido. Terminado.\");\n }\n catch(IOException iOException){\n System.err.println(\"Error al leer del archivo. Terminado.\");\n }\n }",
"@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 }",
"ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);",
"int insert(Movimiento record);",
"public String agregarCuenta(Cuenta cuenta) {\n String mensaje = \"\";\n try {\n PreparedStatement PrSt;\n String Query = \"INSERT INTO Cuenta VALUES(?,?,?,?)\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, cuenta.getCodigo());\n PrSt.setDate(2, cuenta.getCreacion());\n PrSt.setDouble(3, cuenta.getCredito());\n PrSt.setString(4, cuenta.getCodigo_cliente());\n int resultado = PrSt.executeUpdate();\n if (resultado > 0) {\n mensaje = \"Agregada Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente();\n } else {\n mensaje = \"Fallo al agregar Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente();\n }\n PrSt.close();\n } catch (SQLException e) {\n mensaje = \"Fallo al agregar Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente() + \" Error: \" + e.toString();\n }\n return mensaje;\n }",
"@Override\r\n\tprotected void process() {\n\t\tconsultarSustentoProxy.setCodigoActvidad(codigo_actividad);\r\n\t\tconsultarSustentoProxy.setCodigoCliente(codigo_cliente);\r\n\t\tconsultarSustentoProxy.setCodigoPLan(codigo_plan);\r\n\t\tconsultarSustentoProxy.execute();\r\n\t}",
"public void llenarDatosTransaccion(TransactionEntity entity, int indiceLayoutHose){\n //**********************************************************\n int contador = 0;\n Log.v(\"INICIO\",\"**********************************************************\");\n\n Log.v(\"Bomba\",String.valueOf(entity.getIdBomba()));\n //**********************************************************\n //EstadoActual\n int[] tramaEstadoActual = new int[1];\n contador = 0;\n for(int i = 8; i<= 8; i++){\n tramaEstadoActual[contador] = bufferRecepcion[i];\n contador++;\n }\n //String estadoActual = byteArrayToHexString(tramaEstadoActual,tramaEstadoActual.length);\n int estadoActual = Integer.parseInt(byteArrayToHexIntGeneral(tramaEstadoActual,1));\n entity.setEstadoActual(estadoActual);\n\n Log.v(\"Estado\",String.valueOf(entity.getEstadoActual()));\n cambioEstado(indiceLayoutHose, estadoActual);\n\n //**********************************************************\n //Capturar Nro Transaccion\n int[] tramaNroTransaccion = new int[3];\n contador = 0;\n for(int i = 9; i<= 11; i++){\n tramaNroTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n String nroTransaccion = \"\" + byteArrayToHexInt(tramaNroTransaccion,tramaNroTransaccion.length);\n entity.setNumeroTransaccion(nroTransaccion);\n Log.v(\"Nro. Transacción\",entity.getNumeroTransaccion());\n\n //**********************************************************\n //Capturar Fecha Inicio\n int[] tramaFechaInicio = new int[1];\n tramaFechaInicio[0] = bufferRecepcion[12];\n String dia = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[13];\n String mes = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[14];\n String anio = \"20\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[17];\n String hora = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[16];\n String minuto = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[15];\n String segundo = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n\n String fechaInicio = dia + \"-\" + mes + \"-\" + anio + \"\";\n String horaInicio = hora + \":\" + minuto + \":\" + segundo;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaInicio(fechaInicio);\n entity.setHoraInicio(horaInicio);\n Log.v(\"Fecha Inicio\",entity.getFechaInicio());\n Log.v(\"Hora Inicio\",entity.getHoraInicio());\n\n //**********************************************************\n //Capturar Turno\n int[] tramaTurno = new int[2];\n contador = 0;\n for(int i = 18; i<= 19; i++){\n tramaTurno[contador] = bufferRecepcion[i];\n contador++;\n }\n int turno = byteArrayToHexInt2(tramaTurno,tramaTurno.length);\n entity.setTurno(turno);\n Log.v(\"Turno\",\"\"+entity.getTurno());\n\n //**********************************************************\n //Numero de Tanque\n int[] tramaNumeroTanque = new int[1];\n contador = 0;\n for(int i = 21; i<= 21; i++){\n tramaNumeroTanque[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int numeroTanque = Integer.parseInt(byteArrayToHexIntGeneral(tramaNumeroTanque,1));\n entity.setNumeroTanque(numeroTanque);\n\n Log.v(\"Tanque\",\"\"+entity.getNumeroTanque());\n\n //**********************************************************\n //Tipo de Vehiculo\n int[] tramaTipoVehiculo = new int[1];\n contador = 0;\n for(int i = 22; i<= 22; i++){\n tramaTipoVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoVehiculo = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoVehiculo,1));\n entity.setTipoVehiculo(tipoVehiculo);\n\n Log.v(\"Tipo Vehiculo\",\"\"+entity.getTipoVehiculo());\n\n\n //**********************************************************\n //Capturar IdVehiculo\n int[] tramaIdVehiculo = new int[8];\n contador = 0;\n for(int i = 23; i<= 30; i++){\n tramaIdVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdVehiculo = hexToAscii(byteArrayToHexString(tramaIdVehiculo,tramaIdVehiculo.length));\n entity.setIdVehiculo(IdVehiculo);\n\n Log.v(\"IdVehiculo\",entity.getIdVehiculo());\n\n //**********************************************************\n //Capturar Placa\n int[] tramaPlaca = new int[10];\n contador = 0;\n for(int i = 31; i<= 40; i++){\n tramaPlaca[contador] = bufferRecepcion[i];\n contador++;\n }\n String placa = hexToAscii(byteArrayToHexString(tramaPlaca,tramaPlaca.length));\n entity.setPlaca(placa);\n\n Log.v(\"Placa\",entity.getPlaca());\n\n //**********************************************************\n //Capturar Kilometro\n\n int[] tramaKilometroParteEntera = new int[3];\n contador = 0;\n for(int i = 41; i<= 43; i++){\n tramaKilometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteEntera = byteArrayToHexInt(tramaKilometroParteEntera,tramaKilometroParteEntera.length);\n\n int[] tramaKilometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 44; i<= 44; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n\n //double kilometro = kilometroParteEntera + kilometroParteDecimal*0.1;\n double kilometro = Double.valueOf(kilometroParteEntera + \".\"+kilometroParteDecimal);\n entity.setKilometraje(\"\"+kilometro);\n\n Log.v(\"Kilometro\",\"\"+kilometro);\n\n //**********************************************************\n //Capturar Horometro\n\n int[] tramaHorometroParteEntera = new int[3];\n contador = 0;\n for(int i = 45; i<= 47; i++){\n tramaHorometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int horometroParteEntera = byteArrayToHexInt(tramaHorometroParteEntera,tramaHorometroParteEntera.length);\n\n int[] tramaHorometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 48; i<= 48; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n\n double horometro = 0.0;\n\n if(tramaHorometroParteDecimal[0]==255){\n horometro = horometroParteEntera/10D;\n }else{\n int horometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n //horometro = horometroParteEntera + horometroParteDecimal*0.1;\n horometro = Double.valueOf(horometroParteEntera + \".\"+horometroParteDecimal);\n }\n\n entity.setHorometro(\"\"+horometro);\n\n Log.v(\"Horometro\",\"\"+horometro);\n\n //**********************************************************\n //Capturar IdConductor\n int[] tramaIdConductor = new int[8];\n contador = 0;\n for(int i = 49; i<= 56; i++){\n tramaIdConductor[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdConductor = hexToAscii(byteArrayToHexString(tramaIdConductor,tramaIdConductor.length));\n entity.setIdConductor(IdConductor);\n\n Log.v(\"IdConductor\",entity.getIdConductor());\n\n //**********************************************************\n //Capturar IdOperador\n int[] tramaIdOperador = new int[8];\n contador = 0;\n for(int i = 57; i<= 64; i++){\n tramaIdOperador[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdOperador = hexToAscii(byteArrayToHexString(tramaIdOperador,tramaIdOperador.length));\n entity.setIdOperador(IdOperador);\n\n Log.v(\"IdOperador\",entity.getIdOperador());\n\n //**********************************************************\n //Tipo de Transacción\n int[] tramaTipoTransaccion = new int[1];\n contador = 0;\n for(int i = 65; i<= 65; i++){\n tramaTipoTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTransaccion = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTransaccion,1));\n entity.setTipoTransaccion(tipoTransaccion);\n\n Log.v(\"Tipo Transacción\",\"\"+entity.getTipoTransaccion());\n\n //**********************************************************\n //Capturar Latitud\n int[] tramaLatitud = new int[12];\n contador = 0;\n for(int i = 66; i<= 77; i++){\n tramaLatitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String latitud = hexToAscii(byteArrayToHexString(tramaLatitud,tramaLatitud.length));\n entity.setLatitud(latitud);\n\n Log.v(\"Latitud\",entity.getLatitud());\n\n //**********************************************************\n //Capturar Longitud\n int[] tramaLongitud = new int[12];\n contador = 0;\n for(int i = 78; i<= 89; i++){\n tramaLongitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String longitud = hexToAscii(byteArrayToHexString(tramaLongitud,tramaLongitud.length));\n entity.setLongitud(longitud);\n\n Log.v(\"Longitud\",entity.getLongitud());\n\n //**********************************************************\n //Capturar Tipo Error Pre-Seteo\n int[] tramaTipoErrorPreseteo = new int[1];\n contador = 0;\n for(int i = 90; i<= 90; i++){\n tramaTipoErrorPreseteo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoErrorPreseteo= Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoErrorPreseteo,1));\n entity.setTipoErrorPreseteo(tipoErrorPreseteo);\n\n Log.v(\"Tipo Error Preseteo\",\"\"+entity.getTipoErrorPreseteo());\n\n //**********************************************************\n //Capturar Volumen Autorizado\n int[] tramaVolumenAutorizado = new int[2];\n contador = 0;\n for(int i = 91; i<= 92; i++){\n tramaVolumenAutorizado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAutorizado = byteArrayToHexInt2(tramaVolumenAutorizado,tramaVolumenAutorizado.length);\n entity.setVolumenAutorizado(volumenAutorizado);\n Log.v(\"Volumen Autorizado\",\"\"+entity.getVolumenAutorizado());\n\n //**********************************************************\n //Capturar Volumen Aceptado\n int[] tramaVolumenAceptado = new int[2];\n contador = 0;\n for(int i = 93; i<= 94; i++){\n tramaVolumenAceptado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAceptado = byteArrayToHexInt2(tramaVolumenAceptado,tramaVolumenAceptado.length);\n entity.setVolumenAceptado(volumenAceptado);\n Log.v(\"Volumen Aceptado\",\"\"+entity.getVolumenAceptado());\n\n //**********************************************************\n //Capturar Código Cliente\n int[] tramaCodigoCliente = new int[2];\n contador = 0;\n for(int i = 100; i<= 101; i++){\n tramaCodigoCliente[contador] = bufferRecepcion[i];\n contador++;\n }\n int codigoCliente = byteArrayToHexInt2(tramaCodigoCliente,tramaCodigoCliente.length);\n entity.setCodigoCliente(codigoCliente);\n Log.v(\"Codigo Cliente\",\"\"+entity.getCodigoCliente());\n\n //**********************************************************\n //Capturar codigo area\n int[] tramaCodigoArea = new int[1];\n contador = 0;\n for(int i = 102; i<= 102; i++){\n tramaCodigoArea[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int CodigoArea = Integer.parseInt(byteArrayToHexIntGeneral(tramaCodigoArea,1));\n entity.setCodigoArea(CodigoArea);\n\n Log.v(\"Codigo Area\",\"\"+entity.getCodigoArea());\n\n //**********************************************************\n //Capturar tipo TAG\n int[] tramaTipoTAG = new int[1];\n contador = 0;\n for(int i = 103; i<= 103; i++){\n tramaTipoTAG[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTAG = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTAG,1));\n entity.setTipoTag(tipoTAG);\n\n Log.v(\"Tipo TAG\",\"\"+entity.getTipoTag());\n\n //**********************************************************\n //Capturar Volumen Abastecido\n int[] tramaVolumen = new int[9];\n contador = 0;\n for(int i = 104; i<= 112; i++){\n tramaVolumen[contador] = bufferRecepcion[i];\n contador++;\n }\n String volumen = \"\"+ hexToAscii(byteArrayToHexString(tramaVolumen,tramaVolumen.length));\n String[] parts = volumen.split(\"\\\\.\");\n if(parts.length > 1) {\n volumen = parts[0] + \".\" + parts[1].substring(0,(0+entity.getCantidadDecimales()));\n }\n\n entity.setVolumen(volumen);\n\n Log.v(\"Volumen Abastecido\",entity.getVolumen());\n\n //**********************************************************\n //Capturar Temperatura\n int[] tramaTemperatura = new int[5];\n contador = 0;\n for(int i = 113; i<= 117; i++){\n tramaTemperatura[contador] = bufferRecepcion[i];\n contador++;\n }\n String temperatura = \"\" + hexToAscii(byteArrayToHexString(tramaTemperatura,tramaTemperatura.length));\n temperatura = temperatura.substring(0,temperatura.length()-1);\n entity.setTemperatura(temperatura);\n\n Log.v(\"Temperatura\",entity.getTemperatura());\n\n //**********************************************************\n //Capturar Fecha Fin\n int[] tramaFechaFin = new int[1];\n tramaFechaFin[0] = bufferRecepcion[118];\n String diaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[119];\n String mesFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[120];\n String anioFin = \"20\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[123];\n String horaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[122];\n String minutoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[121];\n String segundoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n\n String fechaFin = diaFin + \"-\" + mesFin + \"-\" + anioFin + \"\" ;\n String horaFin1 = horaFin + \":\" + minutoFin + \":\" + segundoFin;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaFin(fechaFin);\n entity.setHoraFin(horaFin1);\n\n Log.v(\"Fecha Fin\",entity.getFechaFin());\n Log.v(\"Hora Fin\",entity.getHoraFin());\n\n //**********************************************************\n //Capturar Tipo de Cierre\n int[] tramaTipoCierre = new int[1];\n contador = 0;\n for(int i = 124; i<= 124; i++){\n tramaTipoCierre[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoCierre = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoCierre,1));\n entity.setTipoCierre(tipoCierre);\n\n Log.v(\"Tipo Cierre\",\"\"+entity.getTipoCierre());\n\n txt_galones = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_galones);\n txt_ultimo_ticket = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket);\n txt_placa = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_placa);\n txt_producto = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_producto);\n txt_ultimo_galon_p2 = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_galon_p2);\n txt_ultimo_ticket_p2= layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket_p2);\n\n txt_producto.setText(entity.getNombreProducto());\n txt_placa.setText(entity.getPlaca());\n txt_galones.setText(entity.getVolumen());\n txt_ultimo_galon_p2.setText(entity.getVolumen());\n txt_ultimo_ticket.setText(entity.getNumeroTransaccion());\n txt_ultimo_ticket_p2.setText(entity.getNumeroTransaccion());\n\n\n guardarTransaccionBD(entity);\n\n }",
"private byte[] processData(String peticion) {\n\t\t\n\t\tString respuesta = \"\";\n\t\t\n\t\tswitch (peticion) {\n\t\t\t\n\t\t\tcase \"noticias\": respuesta = \"¡Por fin la vacuna ya está en España!\"; break;\n\t\t\tcase \"hora\": respuesta = getFecha(); break;\n\t\t\tcase \"aleatorio\": respuesta = Double. toString(Math.random()*10); break;\n\t\t\tcase \"cerrar\": respuesta = \"Adios\"; break;\n\t\t\tcase \"cerrarServidor\": respuesta = \"Adios\"; break;\t\t\t\n\t\t\tdefault: respuesta = \"petición desconocida\";\n\t\t}\n\t\t\n\t\treturn respuesta.getBytes();\n\t}",
"public boolean Actualizar(String Usuario, String NombreMaterial, String Fecha, Integer NCampo, String NuevoCampo) throws IOException\n {\n System.out.println(\"Ëntro\");\n List<String> ListaLineaEliminar = BuscarIndice(Usuario, NombreMaterial, Fecha);\n if(ListaLineaEliminar.get(0) == \"404\"){ return false; }\n else{\n String LineaEliminar = ListaLineaEliminar.get(0);\n System.out.println(LineaEliminar);\n String[] Campos = LineaEliminar.split(\"\\\\|\");\n String NMaestro = Campos[1].substring(0,1);\n Integer NMaestroLinea = Integer.parseInt(Campos[1].substring(2,3));\n String L = ObtenerLinea(NMaestroLinea, \"C:\\\\MEIA\\\\Donaciones_\" + NMaestro + \".txt\");\n String[] CamposL = L.split(\"\\\\|\");\n Boolean Existe = Eliminar(Usuario, NombreMaterial, Fecha);\n System.out.println(Usuario);\n System.out.println(NombreMaterial);\n System.out.println(Fecha);\n if(NCampo == 0){\n Insertar(NuevoCampo, CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 1){\n Insertar(CamposL[0], CamposL[2], NuevoCampo, Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 2){\n Insertar(CamposL[0], NuevoCampo, CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 3){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(NuevoCampo), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 4){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), NuevoCampo, CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 5){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], NuevoCampo, CamposL[6]);\n return true;\n }\n else if(NCampo == 6){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], NuevoCampo);\n return true;\n }\n else{ return false; }\n }\n }",
"private void EnviarDatos(String user, String fecha, String pasos){\n\r\n HttpClient httpclient = new DefaultHttpClient();\r\n //Utilizamos la HttpPost para enviar lso datos\r\n //A la url donde se encuentre nuestro archivo receptor\r\n\r\n\r\n\r\n\r\n HttpPost httppost2 = new HttpPost(\"http://mets.itisol.com.mx/paciente/insertaActividad\");\r\n try {\r\n //Añadimos los datos a enviar en este caso solo uno\r\n //que le llamamos de nombre 'a'\r\n //La segunda linea podría repetirse tantas veces como queramos\r\n //siempre cambiando el nombre ('a')\r\n List<NameValuePair> postValues = new ArrayList<NameValuePair>(2);\r\n postValues.add(new BasicNameValuePair(\"usuario\", user));\r\n\r\n postValues.add(new BasicNameValuePair(\"fecha\", fecha));\r\n Log.d(\"la fecha es\", \"\" + cambiaFecha(fecha));\r\n postValues.add(new BasicNameValuePair(\"pasos\", pasos));\r\n\r\n // postValues.add(new BasicNameValuePair(\"tipo\", \"1\"));\r\n\r\n //Encapsulamos\r\n httppost2.setEntity(new UrlEncodedFormEntity(postValues));\r\n //Lanzamos la petición\r\n HttpResponse respuesta2 = httpclient.execute(httppost2);\r\n //Conectamos para recibir datos de respuesta\r\n HttpEntity entity2 = respuesta2.getEntity();\r\n //Creamos el InputStream como su propio nombre indica\r\n InputStream is2 = entity2.getContent();\r\n //Limpiamos el codigo obtenido atraves de la funcion\r\n //StreamToString explicada más abajo\r\n String resultado2= StreamToString(is2);\r\n\r\n //Enviamos el resultado LIMPIO al Handler para mostrarlo\r\n Message sms2 = new Message();\r\n sms2.obj = resultado2;\r\n\r\n puente.sendMessage(sms2);\r\n }catch (IOException e) {\r\n //TODO Auto-generated catch block\r\n }\r\n\r\n }",
"int insert(ParUsuarios record);",
"public static void guardarEstudianteBD(Estudiante estudiante) {\r\n //metimos este metodo dentro de la base de datos \r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n //ingresamos la direccion donde se encuntra la base de datos \r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.println(\"Conexion establecida!\");\r\n Statement sentencia = (Statement) conexion.createStatement();\r\n int insert = sentencia.executeUpdate(\"insert into estudiante values(\"\r\n + \"'\" + estudiante.getNro_de_ID()\r\n + \"','\" + estudiante.getNombres()\r\n + \"','\" + estudiante.getApellidos()\r\n + \"','\" + estudiante.getLaboratorio()\r\n + \"','\" + estudiante.getCarrera()\r\n + \"','\" + estudiante.getModulo()\r\n + \"','\" + estudiante.getMateria()\r\n + \"','\" + estudiante.getFecha()\r\n + \"','\" + estudiante.getHora_Ingreso()\r\n + \"','\" + estudiante.getHora_Salida()\r\n + \"')\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.println(\"Error en la conexion\" + ex);\r\n }\r\n }",
"private void limpiarDatos() {\n\t\t\n\t}",
"private void getTempRojoBhcs(){\n mTempRojoBhcs = estudioAdapter.getListaTempRojoBhcSinEnviar();\n //ca.close();\n }",
"public void guardarDatos() throws Exception {\r\n try {\r\n FormularioUtil.setUpperCase(groupboxEditar);\r\n if (validarForm()) {\r\n\r\n Admision admision = ((Admision) lbxNro_ingreso\r\n .getSelectedItem().getValue());\r\n\r\n Hospitalizacion hospitalizacion = new Hospitalizacion();\r\n hospitalizacion.setCodigo_empresa(empresa.getCodigo_empresa());\r\n hospitalizacion.setCodigo_sucursal(sucursal\r\n .getCodigo_sucursal());\r\n hospitalizacion.setNro_factura(tbxNro_factura.getValue());\r\n hospitalizacion = getServiceLocator()\r\n .getHospitalizacionService().consultar(hospitalizacion);\r\n if (hospitalizacion == null) {\r\n hospitalizacion = new Hospitalizacion();\r\n hospitalizacion.setCodigo_empresa(empresa\r\n .getCodigo_empresa());\r\n hospitalizacion.setCodigo_sucursal(sucursal\r\n .getCodigo_sucursal());\r\n hospitalizacion.setNro_factura(tbxNro_factura.getValue());\r\n }\r\n hospitalizacion.setTipo_identificacion((String) datos_seleccion\r\n .get(\"tipo_identificacion\"));\r\n hospitalizacion.setNro_identificacion(tbxNro_identificacion\r\n .getValue());\r\n hospitalizacion\r\n .setCodigo_administradora((String) datos_seleccion\r\n .get(\"codigo_administradora\"));\r\n hospitalizacion.setId_plan((String) datos_seleccion\r\n .get(\"id_plan\"));\r\n hospitalizacion.setNro_ingreso(admision.getNro_ingreso());\r\n hospitalizacion.setCodigo_prestador(tbxCodigo_prestador\r\n .getValue());\r\n hospitalizacion.setVia_ingreso(lbxVia_ingreso.getSelectedItem()\r\n .getValue().toString());\r\n hospitalizacion.setFecha_ingreso(new Timestamp(\r\n dtbxFecha_ingreso.getValue().getTime()));\r\n hospitalizacion.setNumero_autorizacion(tbxNumero_autorizacion\r\n .getValue());\r\n hospitalizacion.setCausa_externa((String) lbxCausa_externa\r\n .getSelectedItem().getValue().toString());\r\n hospitalizacion.setEstado_salida((String) lbxEstado_salida\r\n .getSelectedItem().getValue().toString());\r\n hospitalizacion.setFecha_egreso(new Timestamp(dtbxFecha_egreso\r\n .getValue().getTime()));\r\n hospitalizacion\r\n .setCodigo_diagnostico_principal(tbxCodigo_diagnostico_principal\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico1(tbxCodigo_diagnostico1\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico2(tbxCodigo_diagnostico2\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico3(tbxCodigo_diagnostico3\r\n .getValue());\r\n hospitalizacion.setComplicacion(tbxComplicacion.getValue());\r\n hospitalizacion.setCausa_muerte(tbxCausa_muerte.getValue());\r\n\r\n hospitalizacion.setCreacion_date(new Timestamp(\r\n new GregorianCalendar().getTimeInMillis()));\r\n hospitalizacion.setUltimo_update(new Timestamp(\r\n new GregorianCalendar().getTimeInMillis()));\r\n hospitalizacion.setCreacion_user(usuarios.getCodigo()\r\n .toString());\r\n hospitalizacion.setUltimo_user(usuarios.getCodigo().toString());\r\n\r\n String complemento = \"\";\r\n\r\n if (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n getServiceLocator().getHospitalizacionService().crear(\r\n hospitalizacion);\r\n if (FACTURACION_RIPS != null) {\r\n this.detach();\r\n } else {\r\n accionForm(true, \"registrar\");\r\n }\r\n } else {\r\n int result = getServiceLocator()\r\n .getHospitalizacionService().actualizar(\r\n hospitalizacion);\r\n if (result == 0) {\r\n throw new Exception(\r\n \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\");\r\n }\r\n }\r\n\r\n if (ionGuardar != null) {\r\n ionGuardar.guardar();\r\n } else {\r\n Messagebox.show(\r\n \"Los datos se guardaron satisfactoriamente.\"\r\n + complemento, \"Informacion? ..\",\r\n Messagebox.OK, Messagebox.INFORMATION);\r\n tbxNro_factura.setValue(hospitalizacion.getNro_factura());\r\n tbxAccion.setValue(\"modificar\");\r\n }\r\n\r\n if (this.getParent() instanceof Facturacion_ripsAction) {\r\n this.detach();\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n MensajesUtil.mensajeError(e, \"\", this);\r\n }\r\n }",
"private void saveEncLactancias(String estado) {\n int c = mLactanciasMaternas.size();\n for (LactanciaMaterna enclactancia : mLactanciasMaternas) {\n enclactancia.getMovilInfo().setEstado(estado);\n estudioAdapter.updateLacMatSent(enclactancia);\n publishProgress(\"Actualizando encuestas lactancia\", Integer.valueOf(mLactanciasMaternas.indexOf(enclactancia)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public void recargarDatos( ) {\n\t\tPAC_SHWEB_PROVEEDORES llamadaProv = null;\n\t\ttry {\n\t\t\tllamadaProv = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaCom = null;\n\n\t\ttry {\n\t\t\trespuestaCom = llamadaProv.ejecutaPAC_SHWEB_PROVEEDORES__F_COMUNICADOS_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t// Mostramos el estado del expediente\n\t\tPAC_SHWEB_PROVEEDORES llamada = null;\n\t\ttry {\n\t\t\tllamada = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuesta = null;\n\t\ttry {\n\t\t\trespuesta = llamada.ejecutaPAC_SHWEB_PROVEEDORES__F_ESTADO_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t\tMap<String, Object> retorno = new HashMap<String, Object>(respuesta);\n\n\t\t\tUI.getCurrent().getSession().setAttribute(\"estadoExpediente\",retorno.get(\"ESTADO\").toString());\n\t\t\t\n\t\t\tprovPantallaConsultaExpedienteInicial.setCaption(\"GESTIÓN DEL EXPEDIENTE Nº \" + UI.getCurrent().getSession().getAttribute(\"expediente\")\n\t\t\t\t\t+ \" ( \" + \n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\") + \" ) \");\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\t\n\t\t\n\t\t// Maestro comunicados\n\n\t\tWS_AMA llamadaAMA = null;\n\t\ttry {\n\t\t\tllamadaAMA = new WS_AMA(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaMaestro = null;\n\t\t\n\t\t//System.out.println(\"Llamammos maestro comunicados: \" + UI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1));;\n\t\ttry {\n\t\t\t// pPUSUARIO, pORIGEN, pTPCOMUNI, pTPUSUARIO, pESTADO)\n\t\t\t\n\t\t\trespuestaMaestro = llamadaAMA.ejecutaWS_AMA__MAESTRO_COMUNICADOS(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnull,\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\").toString()\n\t\t\t\t\t);\t\t\t\n\n\t\t\t\n\t\t\tMap<String, Object> retornoMaestro = new HashMap<String, Object>(respuestaMaestro);\n\t\t\tList<Map> valorMaestro = (List<Map>) retornoMaestro.get(\"COMUNICADOS\");\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",valorMaestro);\n\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",null);\n\t\t}\n\t\t\n\t\t// \t\n\t\t\n\t\t\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\t\t/*if ( !ValidarComunicado.EsValido(\"CA\") && !ValidarComunicado.EsValido(\"FT\") ) {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(true);\n\n\t\t\t\n\t\t\t\n\t\t}*/\n\t\t// Mostramos botonera de cerrar expediente\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\n\t}",
"@Override\n public Call<ResponseBody> registarMoviemientoEmpleado(@Body RootMovimiento movimiento) {\n movimiento.setId_dispositivo(Settings.Secure.getString(this.context.getContentResolver(), Settings.Secure.ANDROID_ID));\n return this.serviceInterface.registarMoviemientoEmpleado(movimiento);\n }",
"@Override\r\n\tprotected String requestText() {\n\t\tGuardarVtaCeroMotivoRequest guardarVtaCeroMotivoRequest = new GuardarVtaCeroMotivoRequest();\r\n\t\tguardarVtaCeroMotivoRequest.setAnio(Anio);\r\n\t\tguardarVtaCeroMotivoRequest.setCodCliente(codCliente);\r\n\t\tguardarVtaCeroMotivoRequest.setCodDeposito(codDeposito);\r\n\t\tguardarVtaCeroMotivoRequest.setMes(Mes);\r\n\t\tguardarVtaCeroMotivoRequest.setMotivo(Motivo);\r\n\t\tguardarVtaCeroMotivoRequest.setObservacion(observacion);\r\n\t\tguardarVtaCeroMotivoRequest.setSemana(Semana);\r\n\t\tguardarVtaCeroMotivoRequest.setUsuario(Usuario);\r\n\t\tString request = JSONHelper.serializar(guardarVtaCeroMotivoRequest);\r\n\t\treturn request;\r\n\t}",
"public String guardar()\r\n/* 104: */ {\r\n/* 105: */ try\r\n/* 106: */ {\r\n/* 107:132 */ this.servicioDimensionContable.guardar(this.dimensionContable);\r\n/* 108:133 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 109:134 */ setEditado(false);\r\n/* 110:135 */ cargarDatos();\r\n/* 111: */ }\r\n/* 112: */ catch (Exception e)\r\n/* 113: */ {\r\n/* 114:137 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 115:138 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 116: */ }\r\n/* 117:140 */ return \"\";\r\n/* 118: */ }",
"public String cambiarEstado() {\n\t\ttry {\n\t\t\tMensaje.crearMensajeINFO(managergest.cambioEstadoItem(getOfertadelsita().getOferId()));\n\t\t\tgetListaOferta().clear();\n\t\t\tgetListaOferta().addAll(managergest.findAllofertasOrdenadas());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"\";\n\t}",
"@Override\r\n\tprotected String requestText() {\n\t\tGuardarSustentoRequest guardarSustentoRequest = new GuardarSustentoRequest();\r\n\t\tguardarSustentoRequest.setCodigoActvidad(codigoActvidad);\r\n\t\tguardarSustentoRequest.setCodigoCliente(codigoCliente);\r\n\t\tguardarSustentoRequest.setCodigoPLan(codigoPLan);\r\n\t\tguardarSustentoRequest.setDescripcionActividad(descripcionActividad);\r\n\t\tguardarSustentoRequest.setFechaVisita(fechaVisita);\r\n\t\tguardarSustentoRequest.setTipoActividad(tipoActividad);\r\n\t\tguardarSustentoRequest.setUsuario(usuario);\r\n\t\tString request = JSONHelper.serializar(guardarSustentoRequest);\r\n\t\treturn request;\r\n\t}",
"private void agregarASalNuevoMaest(CuentaSerializada cuenta){\n try{\n salNuevoMaest.writeObject(cuenta);\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 }",
"public void enviarValoresCabecera(){\n }",
"public void guardarDestruccion() {\n try {\n produccion.setIdMarca(opcionMarca);\n produccion.setIdPlantaProd(opcionPlanta);\n produccion.setIdPaisOrigen(opcionOrigen);\n produccion.setIdTipoRetro(opcionTipo);\n produccion.setFechProduccion(new Date());\n produccion.setDescPaisOrigen(desperdiciosHelper.getNombrePais());\n\n if (!habilitarBtnValidarProd()) {\n if (produccion != null) {\n produccion = produccionService.guardaDestruccion(produccion);\n super.msgInfo(MSGEXITOVALIDAPROD);\n desperdiciosHelper.setDeshabilitaBtnValidarProd(true);\n desperdiciosHelper.setDeshabilitaCargaArchivo(false);\n } else {\n super.msgError(MSGERRORVALIDARPROD);\n }\n }\n } catch (ProduccionServiceException e) {\n LOGGER.error(\"ERROR: Al guardar los datos de produccion\" + e.getMessage(), e);\n }\n }",
"public void guardar(Modelo modelo) throws SipsaExcepcion;",
"@Override\n protected void onPostExecute(HttpResponse result) {\n if (result != null)\n\t\t\ttry {\n\t\t\t\tLog.i(\"Conexao\", \"Dentrodopost\");\n\t\t\t\t//result.getEntity().writeTo(new FileOutputStream(f));\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} \n }",
"private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }",
"public String cargarDatos()\r\n/* 514: */ {\r\n/* 515:540 */ return null;\r\n/* 516: */ }",
"@Override\n protected Response doInsert(JSONObject data) {\n return null;\n }"
] |
[
"0.6108867",
"0.6089659",
"0.59963566",
"0.59516066",
"0.59346324",
"0.5902984",
"0.5900754",
"0.580848",
"0.57809454",
"0.5766452",
"0.57644504",
"0.5763113",
"0.57480466",
"0.57415074",
"0.5709575",
"0.57050407",
"0.5672679",
"0.56660414",
"0.5664272",
"0.56620985",
"0.5660924",
"0.56539875",
"0.5652867",
"0.5640711",
"0.5639574",
"0.5621628",
"0.5621237",
"0.5618425",
"0.56115556",
"0.5598985",
"0.55770415",
"0.557137",
"0.55665624",
"0.5561801",
"0.55481106",
"0.5547554",
"0.5545583",
"0.55434704",
"0.5530123",
"0.55275875",
"0.5525662",
"0.5524151",
"0.5519947",
"0.55188763",
"0.5511981",
"0.5506241",
"0.55051416",
"0.5503129",
"0.55030775",
"0.54881",
"0.54847366",
"0.5480024",
"0.54506034",
"0.5445036",
"0.54418904",
"0.5441591",
"0.54324824",
"0.5428266",
"0.54233485",
"0.5421697",
"0.5421027",
"0.54141116",
"0.54127306",
"0.5408961",
"0.54024637",
"0.5396911",
"0.53968513",
"0.53895",
"0.53855276",
"0.53819346",
"0.53780955",
"0.53749156",
"0.5370826",
"0.5370472",
"0.53698844",
"0.5368954",
"0.53641844",
"0.5346846",
"0.53458077",
"0.53453165",
"0.53430814",
"0.5335295",
"0.5334208",
"0.5333388",
"0.53326344",
"0.53292847",
"0.53247714",
"0.53199583",
"0.5319406",
"0.53191096",
"0.5317003",
"0.53164697",
"0.53157854",
"0.53155106",
"0.5312124",
"0.53046227",
"0.5300779",
"0.5298598",
"0.5297596",
"0.52974415"
] |
0.59239954
|
5
|
Guarda el contenido de la trama retornada a la base de datos
|
public Integer guardarTramaAnulacionBD(Map<String, String> parametros, String formaPago) {
try {
if (!DBPinpad.guardarTramaAnulPinpadMC(parametros.get("response_code"), parametros.get("amount"),
parametros.get("approval_code"), parametros.get("message"),
parametros.get("card"), parametros.get("month"),
parametros.get("amount_quota"), parametros.get("credit_type"),
parametros.get("client_name"), parametros.get("ecr_currency_code"),
parametros.get("ecr_aplication"), parametros.get("ecr_transaccion"),
parametros.get("merchant_id"), parametros.get("print_data"),
lblDatoPedidoEnv, //VariablesCaja.vNumPedVta
formaPago))
return VariablesPinpad.RET_NOK;
} catch (Exception e) {
log.debug(e.toString());
return VariablesPinpad.RET_NOK;
}
return VariablesPinpad.RET_OK;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_atencion_embarazada his_atencion_embarazada = new His_atencion_embarazada();\r\n\t\t\t\this_atencion_embarazada.setCodigo_empresa(empresa\r\n\t\t\t\t\t\t.getCodigo_empresa());\r\n\t\t\t\this_atencion_embarazada.setCodigo_sucursal(sucursal\r\n\t\t\t\t\t\t.getCodigo_sucursal());\r\n\t\t\t\this_atencion_embarazada.setCodigo_historia(tbxCodigo_historia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFecha_inicial(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_inicial.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCodigo_eps(tbxCodigo_eps.getValue());\r\n\t\t\t\this_atencion_embarazada.setCodigo_dpto(lbxCodigo_dpto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCodigo_municipio(lbxCodigo_municipio\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setIdentificacion(tbxIdentificacion\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDireccion(tbxMotivo.getValue());\r\n\t\t\t\this_atencion_embarazada.setTelefono(tbxTelefono.getValue());\r\n\t\t\t\this_atencion_embarazada.setSeleccion(rdbSeleccion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setGestaciones(lbxGestaciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPartos(lbxPartos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCesarias(lbxCesarias\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAbortos(lbxAbortos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEspontaneo(lbxEspontaneo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setProvocado(lbxProvocado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNacido_muerto(lbxNacido_muerto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPrematuro(lbxPrematuro\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_menos(lbxHijos_menos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_mayor(lbxHijos_mayor\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMalformado(lbxMalformado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHipertension(lbxHipertension\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_ultimo_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_ultimo_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCirugia(lbxCirugia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setOtro_antecedente(tbxOtro_antecedente\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemoclasificacion(lbxHemoclasificacion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRh(lbxRh.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_atencion_embarazada.setImc(tbxImc.getValue());\r\n\t\t\t\this_atencion_embarazada.setTa(tbxTa.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc(tbxFc.getValue());\r\n\t\t\t\this_atencion_embarazada.setFr(tbxFr.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemperatura(tbxTemperatura\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCroomb(tbxCroomb.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setFecha_ultima_mestruacion(new Timestamp(\r\n\t\t\t\t\t\t\t\tdtbxFecha_ultima_mestruacion.getValue()\r\n\t\t\t\t\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_atencion_embarazada.setFecha_probable_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_probable_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setEdad_gestacional(tbxEdad_gestacional\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setControl(lbxControl.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNum_control(tbxNum_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFetales(lbxFetales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFiebre(lbxFiebre.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido(lbxLiquido.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFlujo(lbxFlujo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEnfermedad(lbxEnfermedad\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_enfermedad(tbxCual_enfermedad\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo(lbxCigarrillo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol(lbxAlcohol.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_alcohol(tbxCual_alcohol\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDroga(lbxDroga.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_droga(tbxCual_droga.getValue());\r\n\t\t\t\this_atencion_embarazada.setViolencia(lbxViolencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_violencia(tbxCual_violencia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoide(lbxToxoide.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setDosis(lbxDosis.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_gestion(tbxObservaciones_gestion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setAltura_uterina(tbxAltura_uterina\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCorelacion(chbCorelacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEmbarazo_multiple(chbEmbarazo_multiple.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setTrasmision_sexual(chbTrasmision_sexual.isChecked());\r\n\t\t\t\this_atencion_embarazada.setAnomalia(rdbAnomalia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEdema_gestion(rdbEdema_gestion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPalidez(rdbPalidez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulciones(rdbConvulciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConciencia(rdbConciencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCavidad_bucal(rdbCavidad_bucal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto(tbxHto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb(tbxHb.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoplasma(tbxToxoplasma.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl1(tbxVdrl1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl2(tbxVdrl2.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih1(tbxVih1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih2(tbxVih2.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb(tbxHepb.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtro(tbxOtro.getValue());\r\n\t\t\t\this_atencion_embarazada.setEcografia(tbxEcografia.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_gestion(rdbClasificacion_gestion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setContracciones(lbxContracciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setNum_contracciones(lbxNum_contracciones\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHemorragia(lbxHemorragia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_vaginal(lbxLiquido_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setColor_liquido(tbxColor_liquido\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDolor_cabeza(lbxDolor_cabeza\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVision(lbxVision.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulcion(lbxConvulcion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_parto(tbxObservaciones_parto\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setContracciones_min(tbxContracciones_min.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_fera(tbxFc_fera.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDilatacion_cervical(tbxDilatacion_cervical\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setPreentacion(rdbPreentacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setOtra_presentacion(tbxOtra_presentacion.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdema(rdbEdema.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemorragia_vaginal(lbxHemorragia_vaginal\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto_parto(tbxHto_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb_parto(tbxHb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb_parto(tbxHepb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl_parto(tbxVdrl_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih_parto(tbxVih_parto.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_parto(rdbClasificacion_parto\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_nac(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_nac.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setIdentificacion_nac(tbxIdentificacion_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setSexo(lbxSexo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso_nac(tbxPeso_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla_nac(tbxTalla_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setPc_nac(tbxPc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_nac(tbxFc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemper_nac(tbxTemper_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdad(tbxEdad.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar1(tbxAdgar1.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar5(tbxAdgar5.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar10(tbxAdgar10.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar20(tbxAdgar20.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_nac(tbxObservaciones_nac.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_nac(rdbClasificacion_nac\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setReani_prematuro(chbReani_prematuro\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_meconio(chbReani_meconio\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_respiracion(chbReani_respiracion.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipotonico(chbReani_hipotonico\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_apnea(chbReani_apnea\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_jadeo(chbReani_jadeo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_deficultosa(chbReani_deficultosa.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_gianosis(chbReani_gianosis\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_bradicardia(chbReani_bradicardia.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipoxemia(chbReani_hipoxemia\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_estimulacion(chbReani_estimulacion\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_ventilacion(chbReani_ventilacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_comprensiones(chbReani_comprensiones\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_intubacion(chbReani_intubacion\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setMedicina(tbxMedicina.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_reani(rdbClasificacion_reani\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRuptura(lbxRuptura.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_ruptura(lbxTiempo_ruptura\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_neo(tbxLiquido_neo\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFiebre_neo(lbxFiebre_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_neo(lbxTiempo_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCoricamniotis(tbxCoricamniotis\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setIntrauterina(rdbIntrauterina\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMadre20(lbxMadre20.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol_neo(chbAlcohol_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDrogas_neo(chbDrogas_neo.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo_neo(chbCigarrillo_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setRespiracion_neo(rdbRespiracion_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLlanto_neo(rdbLlanto_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVetalidad_neo(rdbVetalidad_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTaquicardia_neo(chbTaquicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setBradicardia_neo(chbBradicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setPalidez_neo(chbPalidez_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCianosis_neo(chbCianosis_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setAnomalias_congenitas(lbxAnomalias_congenitas\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_anomalias(tbxCual_anomalias\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setLesiones(tbxLesiones.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtras_alter(tbxOtras_alter\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_neo(rdbClasificacion_neo\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlarma(tbxAlarma.getValue());\r\n\t\t\t\this_atencion_embarazada.setConsulta_control(tbxConsulta_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setMedidas_preventiva(tbxMedidas_preventiva.getValue());\r\n\t\t\t\this_atencion_embarazada.setRecomendaciones(tbxRecomendaciones\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDiagnostico(tbxDiagnostico\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCodigo_diagnostico(tbxCodigo_diagnostico.getValue());\r\n\t\t\t\this_atencion_embarazada.setTratamiento(tbxTratamiento\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setRecomendacion_alimentacion(tbxRecomendacion_alimentacion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEvolucion_servicio(tbxEvolucion_servicio.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_atencion_embarazada);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_atencion_embarazada = getServiceLocator()\r\n\t\t\t\t\t\t.getHis_atencion_embarazadaService().guardar(datos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\t\t\t\t/*\r\n\t\t\t\t * else{ int result =\r\n\t\t\t\t * getServiceLocator().getHis_atencion_embarazadaService\r\n\t\t\t\t * ().actualizar(his_atencion_embarazada); if(result==0){ throw\r\n\t\t\t\t * new Exception(\r\n\t\t\t\t * \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\"\r\n\t\t\t\t * ); } }\r\n\t\t\t\t */\r\n\r\n//\t\t\t\tcodigo_historia = his_atencion_embarazada.getCodigo_historia();\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}",
"public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_parto his_parto = new His_parto();\r\n\t\t\t\this_parto.setCodigo_empresa(empresa.getCodigo_empresa());\r\n\t\t\t\this_parto.setCodigo_sucursal(sucursal.getCodigo_sucursal());\r\n\t\t\t\this_parto.setCodigo_historia(tbxCodigo_historia.getValue());\r\n\t\t\t\this_parto.setIdentificacion(tbxIdentificacion.getValue());\r\n\t\t\t\this_parto.setFecha_inicial(new Timestamp(dtbxFecha_inicial\r\n\t\t\t\t\t\t.getValue().getTime()));\r\n\t\t\t\this_parto.setConyugue(tbxConyugue.getValue());\r\n\t\t\t\this_parto.setId_conyugue(tbxId_conyugue.getValue());\r\n\t\t\t\this_parto.setEdad_conyugue(tbxEdad_conyugue.getValue());\r\n\t\t\t\this_parto.setEscolaridad_conyugue(tbxEscolaridad_conyugue\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setMotivo(tbxMotivo.getValue());\r\n\t\t\t\this_parto.setEnfermedad_actual(tbxEnfermedad_actual.getValue());\r\n\t\t\t\this_parto.setAntecedentes_familiares(tbxAntecedentes_familiares\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setPreeclampsia(rdbPreeclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setHipertension(rdbHipertension.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEclampsia(rdbEclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setH1(rdbH1.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setH2(rdbH2.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPostimadurez(rdbPostimadurez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRot_pre(rdbRot_pre.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPolihidramnios(rdbPolihidramnios.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRcui(rdbRcui.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPelvis(rdbPelvis.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFeto_macrosonico(rdbFeto_macrosonico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setIsoinmunizacion(rdbIsoinmunizacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setAo(rdbAo.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCirc_cordon(rdbCirc_cordon.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setPostparto(rdbPostparto.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setDiabetes(rdbDiabetes.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCardiopatia(rdbCardiopatia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setAnemias(rdbAnemias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEnf_autoinmunes(rdbEnf_autoinmunes\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setEnf_renales(rdbEnf_renales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInf_urinaria(rdbInf_urinaria.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEpilepsia(rdbEpilepsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto\r\n\t\t\t\t\t\t.setTbc(rdbTbc.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setMiomas(rdbMiomas.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setHb(rdbHb.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFumadora(rdbFumadora.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setInf_puerperal(rdbInf_puerperal.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfertilidad(rdbInfertilidad.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMenarquia(tbxMenarquia.getValue());\r\n\t\t\t\this_parto.setCiclos(tbxCiclos.getValue());\r\n\t\t\t\this_parto.setVida_marital(tbxVida_marital.getValue());\r\n\t\t\t\this_parto.setVida_obstetrica(tbxVida_obstetrica.getValue());\r\n\t\t\t\this_parto.setNo_gestaciones(lbxNo_gestaciones.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setParto(lbxParto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setAborto(lbxAborto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCesarias(lbxCesarias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFecha_um(new Timestamp(dtbxFecha_um.getValue()\r\n\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_parto.setUm(tbxUm.getValue());\r\n\t\t\t\this_parto.setFep(tbxFep.getValue());\r\n\t\t\t\this_parto.setGemerales(lbxGemerales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMalformados(lbxMalformados.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_vivos(lbxNacidos_vivos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_muertos(lbxNacidos_muertos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPreterminos(lbxPreterminos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMedico(chbMedico.isChecked());\r\n\t\t\t\this_parto.setEnfermera(chbEnfermera.isChecked());\r\n\t\t\t\this_parto.setAuxiliar(chbAuxiliar.isChecked());\r\n\t\t\t\this_parto.setPartera(chbPartera.isChecked());\r\n\t\t\t\this_parto.setOtros(chbOtros.isChecked());\r\n\t\t\t\this_parto.setControlado(rdbControlado.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setLugar_consulta(rdbLugar_consulta.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNo_consultas(lbxNo_consultas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEspecialistas(chbEspecialistas.isChecked());\r\n\t\t\t\this_parto.setGeneral(chbGeneral.isChecked());\r\n\t\t\t\this_parto.setPartera_consulta(chbPartera_consulta.isChecked());\r\n\t\t\t\this_parto.setSangrado_vaginal(rdbSangrado_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCefalias(rdbCefalias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEdema(rdbEdema.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEpigastralgia(rdbEpigastralgia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setVomitos(rdbVomitos.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setTinutus(rdbTinutus.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEscotomas(rdbEscotomas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_urinaria(rdbInfeccion_urinaria\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_vaginal(rdbInfeccion_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setOtros_embarazo(tbxOtros_embarazo.getValue());\r\n\t\t\t\this_parto.setCardiaca(tbxCardiaca.getValue());\r\n\t\t\t\this_parto.setRespiratoria(tbxRespiratoria.getValue());\r\n\t\t\t\this_parto.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_parto.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_parto.setTempo(tbxTempo.getValue());\r\n\t\t\t\this_parto.setPresion(tbxPresion.getValue());\r\n\t\t\t\this_parto.setPresion2(tbxPresion2.getValue());\r\n\t\t\t\this_parto.setInd_masa(tbxInd_masa.getValue());\r\n\t\t\t\this_parto.setSus_masa(tbxSus_masa.getValue());\r\n\t\t\t\this_parto.setCabeza_cuello(tbxCabeza_cuello.getValue());\r\n\t\t\t\this_parto.setCardiovascular(tbxCardiovascular.getValue());\r\n\t\t\t\this_parto.setMamas(tbxMamas.getValue());\r\n\t\t\t\this_parto.setPulmones(tbxPulmones.getValue());\r\n\t\t\t\this_parto.setAbdomen(tbxAbdomen.getValue());\r\n\t\t\t\this_parto.setUterina(tbxUterina.getValue());\r\n\t\t\t\this_parto.setSituacion(tbxSituacion.getValue());\r\n\t\t\t\this_parto.setPresentacion(tbxPresentacion.getValue());\r\n\t\t\t\this_parto.setV_presentacion(tbxV_presentacion.getValue());\r\n\t\t\t\this_parto.setPosicion(tbxPosicion.getValue());\r\n\t\t\t\this_parto.setV_posicion(tbxV_posicion.getValue());\r\n\t\t\t\this_parto.setC_uterina(tbxC_uterina.getValue());\r\n\t\t\t\this_parto.setTono(tbxTono.getValue());\r\n\t\t\t\this_parto.setFcf(tbxFcf.getValue());\r\n\t\t\t\this_parto.setGenitales(tbxGenitales.getValue());\r\n\t\t\t\this_parto.setDilatacion(tbxDilatacion.getValue());\r\n\t\t\t\this_parto.setBorramiento(tbxBorramiento.getValue());\r\n\t\t\t\this_parto.setEstacion(tbxEstacion.getValue());\r\n\t\t\t\this_parto.setMembranas(tbxMembranas.getValue());\r\n\t\t\t\this_parto.setExtremidades(tbxExtremidades.getValue());\r\n\t\t\t\this_parto.setSnc(tbxSnc.getValue());\r\n\t\t\t\this_parto.setObservacion(tbxObservacion.getValue());\r\n\t\t\t\this_parto.setCodigo_consulta_pyp(lbxCodigo_consulta_pyp\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFinalidad_cons(lbxFinalidad_cons.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setCausas_externas(lbxCausas_externas\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_disnostico(lbxTipo_disnostico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_principal(tbxTipo_principal.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_1(tbxTipo_relacionado_1\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_2(tbxTipo_relacionado_2\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_3(tbxTipo_relacionado_3\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTratamiento(tbxTratamiento.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_parto);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_parto = getServiceLocator().getHis_partoService().guardar(\r\n\t\t\t\t\t\tdatos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}",
"private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }",
"public String guardar()\r\n/* 69: */ {\r\n/* 70: */ try\r\n/* 71: */ {\r\n/* 72: 85 */ this.motivoLlamadoAtencion.setIdOrganizacion(AppUtil.getOrganizacion().getIdOrganizacion());\r\n/* 73: 86 */ this.motivoLlamadoAtencion.setIdSucursal(AppUtil.getSucursal().getIdSucursal());\r\n/* 74: 87 */ this.servicioMotivoLlamadoAtencion.guardar(this.motivoLlamadoAtencion);\r\n/* 75: 88 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 76: 89 */ setEditado(false);\r\n/* 77: 90 */ limpiar();\r\n/* 78: */ }\r\n/* 79: */ catch (Exception e)\r\n/* 80: */ {\r\n/* 81: 92 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 82: 93 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 83: */ }\r\n/* 84: 95 */ return \"\";\r\n/* 85: */ }",
"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 Integer guardarTramaProcesoCompraBD(Map<String, String> parametros, String codFormaPago) {\r\n try {\r\n log.debug(\"MC- ingreso a guardar Trama\");\r\n if (!DBPinpad.guardarTramaPinpadMC(parametros.get(\"response_code\"), parametros.get(\"amount\"),\r\n parametros.get(\"approval_code\"), parametros.get(\"message\"),\r\n nroTarjetaBruto, //parametros.get(\"card\"),\r\n parametros.get(\"card_id\"), parametros.get(\"month\"), parametros.get(\"amount_quota\"),\r\n parametros.get(\"credit_type\"), parametros.get(\"client_name\"), parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"), parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta, codFormaPago))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }",
"public void guardar() {\n String msj = \"\";\n int idpagoanulado = daoPagoCuotaAnulado.nuevoID();\n Date SYSDATE = new Date();\n java.sql.Timestamp fechaPagoCuotaAnuladoSQL = new java.sql.Timestamp(SYSDATE.getTime());\n String observacion = txtObservacion.getText();\n int idmotivo = Integer.parseInt(txtCodigoMotivo.getText());\n int idusuario = appLogin.IDUSUARIO;\n int idpago =Integer.parseInt(txtNumeroPago.getText());\n Date fechapago = daoCotizacion.parseFecha(txtFechaPago.getText());\n java.sql.Date fechapagoSQL = new java.sql.Date(fechapago.getTime());\n double mPago = montoPago;\n String numerocomprobante = txtComprobante.getText();\n String numerorecibo = txtRecibo.getText();\n //VALIDACIONES\n if (idmotivo == 0) {\n msj += \"CODIGO DEL MOTIVO DE ANULACION ESTA VACIO.\\n\";\n }\n if (idpago == 0) {\n msj += \"NO HA SELECCIONADO NINGUN PAGO PARA LA ANULACIÓN.\\n\";\n }\n if (msj.isEmpty()) {\n cpca.setIdpagoanulado(idpagoanulado);\n cpca.setFechahoranulado(fechaPagoCuotaAnuladoSQL);\n cpca.setObservacion(observacion);\n cpca.setIdmotivo(idmotivo);\n cpca.setIdusuario(idusuario);\n cpca.setIdpago(idpago);\n cpca.setFechapago(fechapagoSQL);\n cpca.setMonto(mPago);\n cpca.setNumerocomprobante(numerocomprobante);\n cpca.setNumerorecibo(numerorecibo);\n daoPagoCuotaAnulado.agregar(cpca);\n } else {\n JOptionPane.showMessageDialog(null, msj, \"ERRORES\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"@Override\n\tpublic DatosEnc obtenerDatos(DatosEnc datos) {\n\t\tConnection con = null;\n\t\tCallableStatement stmt = null;\n//\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\ttry{\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tString query = \"select * from pv_cotizaciones_det where no_cotizacion = ?\";\n//\t\t\tps = con.prepareStatement(query);\n//\t\t\tps.setString(1, datos.getNoDocumento());\n//\t\t\trs = ps.executeQuery();\n//\t\t\texiste=0;\n//\t\t\twhile(rs.next()){\n//\t\t\t\tif(rs.getString(\"no_cotizacion\") == null){\n//\t\t\t\t\texiste=0;\n//\t\t\t\t}else if(rs.getString(\"no_cotizacion\").equals(datos.getNoDocumento())){\n//\t\t\t\t\texiste=1;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tps.close();\n//\t\t\trs.close();\n//\t\t\tif(existe==0){\n\t\t\t\tcon = new ConectarDB().getConnection();\n\t\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_InUp_Mov_Enc(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\t\tstmt.setString(1, datos.getCodigoCliente());\n\t\t\t\tstmt.setString(2, datos.getNit());\n\t\t\t\tstmt.setString(3, datos.getNombreCliente());\n\t\t\t\tstmt.setString(4, datos.getDirecFactura());\n\t\t\t\tstmt.setString(5, datos.getTel());\n\t\t\t\tstmt.setString(6, datos.getTarjeta());\n\t\t\t\tstmt.setString(7, datos.getDirecEnvio());\n\t\t\t\tstmt.setString(8, datos.getCodigoVendedor());\n\t\t\t\tstmt.setString(9, datos.getUsername());\n\t\t\t\tstmt.setString(10, datos.getTipoDocumento());\n\t\t\t\tstmt.setString(11, datos.getNoDocumento());\n\t\t\t\tstmt.setString(12, datos.getFechaVence());\n\t\t\t\tstmt.setString(13, datos.getTipoPago());\n\t\t\t\tstmt.setString(14, datos.getTipoCredito());\n\t\t\t\tstmt.setString(15, datos.getAutoriza());\n\t\t\t\tstmt.setString(16, datos.getFechaDocumento());\n\t\t\t\tstmt.setString(17, datos.getCargosEnvio());\n\t\t\t\tstmt.setString(18, datos.getOtrosCargos());\n\t\t\t\tstmt.setString(19, datos.getMontoVenta());\n\t\t\t\tstmt.setString(20, datos.getMontoTotal());\n\t\t\t\tstmt.setString(21, datos.getSerieDev());\n\t\t\t\tstmt.setString(22, datos.getNoDocDev());\n\t\t\t\tstmt.setString(23, datos.getObservaciones());\n\t\t\t\tstmt.setString(24, datos.getTipoNota());\n\t\t\t\tstmt.setString(25, datos.getCaja());\n\t\t\t\tstmt.setString(26, datos.getFechaEntrega());\n\t\t\t\tstmt.setString(27, datos.getCodigoDept());\n\t\t\t\tstmt.setString(28, datos.getCodGen());\n\t\t\t\tstmt.setString(29, datos.getNoConsigna());\n\t\t\t\tstmt.setString(30, datos.getCodMovDev());\n\t\t\t\tstmt.setString(31, datos.getGeneraSolicitud());\n\t\t\t\tstmt.setString(32, datos.getTipoPagoNC());\n\t\t\t\tstmt.setString(33, datos.getTipoCliente());\n\t\t\t\tstmt.setString(34, datos.getCodigoNegocio());\n\t\t\t\tstmt.setString(35, datos.getCantidadDevolver());\n\t\t\t\tstmt.setString(36, datos.getAutorizoDespacho());\n\t\t\t\tstmt.setString(37, datos.getSaldo());\n\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tif(rs.getString(1)!=null){\n\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n\t\t\t\t\t}\n\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tif(rs.getString(1)!=null){\n//\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n//\t\t\t\t\t}else{\n//\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n//\t\t\t\t\t}\n//\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tdocumento = rs.getInt(2);\n\t\t\t\t}\n\t\t\t\tcon.close();\n\t\t\t\tstmt.close();\n\t\t\t\trs.close();\n//\t\t\t}\n\t\t\t\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_Del_Mov_Det(?,?,?)}\");\n//\t\t\tstmt.setInt(1, Integer.parseInt(datos.getTipoDocumento()));\n//\t\t\tstmt.setString(2, \"\");\n//\t\t\tstmt.setInt(3, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"limpiado\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_udpv_VerificaCotiza(?,?)}\");\n//\t\t\tstmt.setString(1, \"\");\n//\t\t\tstmt.setInt(2, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"error\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n\t\t}catch(SQLException e ){\n\t\t\tSystem.out.println(\"Error Enc: \" + e.getMessage());\n\t\t}\n\t\treturn datos;\n\t}",
"public void processInsertar() {\n }",
"public EncabezadoRespuesta bajaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t//Mandamos a log el objeto de entrada\n\t\tLogHandler.debug(uid, this.getClass(), \"bajaAsistencia - Datos Entrada: \" + asistencia);\n\t\t//Variable de resultado\n\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\ttry {\n\t\t\tif (asistencia.getIdEmpleado() == null) {\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n \t}\n \tif (asistencia.getUsuarioBaja() == null || asistencia.getUsuarioBaja().trim().isEmpty())\n \t{\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario para la baja.\");\n \t}\n \tif (asistencia.getUsuarioUltMod() == null || asistencia.getUsuarioUltMod().trim().isEmpty())\n \t{\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario para la modificacion.\");\n \t}\n \tAsistenciaDAO dao = new AsistenciaDAO();\n \trespuesta = dao.bajaAsistencia(uid, asistencia);\n\t\t}\n\t\tcatch (ExcepcionesCuadrillas ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"bajaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"bajaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tLogHandler.debug(uid, this.getClass(), \"bajaAsistencia - Datos Salida: \" + respuesta);\n\t\treturn respuesta;\n\t}",
"@Override\r\n\tpublic void guardar() {\n\t\ttab_cuenta.guardar();\r\n\t\tguardarPantalla();\r\n\t\t\r\n\t}",
"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}",
"Reserva Obtener();",
"public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\n }",
"@Override\n\tpublic void borrarDatosOk() {\n\n\t}",
"public void guardarTransferenteAlcabala(RaTransferenteAlcabala raTransferenteAlcabala)throws Exception;",
"public long save(Registro r) {\n\n long id = r.getCodigo();\n SQLiteDatabase db = banco.getWritableDatabase();\n try {\n\n\n ContentValues values = new ContentValues();\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-M-d\");\n String dateString = sdf.format(r.getData());\n values.put(\"data\", dateString);\n values.put(\"distancia\", r.getDistancia());\n values.put(\"consumo\", r.getConsumo());\n values.put(\"mediaAceleracao\", r.getMediaAberturaBorboleta());\n values.put(\"mediaConsumo\", r.getMediaConsumo());\n values.put(\"codTipoCombustivel\", r.getTipoCombustivel().getCodigo());\n values.put(\"codCarro\", r.getCarro().getCodigo());\n values.put(\"codUsuario\", r.getUsuario().getCodigo());\n\n if (id != 0) {//SE O ID É DIFERENTE DE 0 ATUALIZA,\n\n System.out.println(\"Entrou !!\");\n String _id = String.valueOf(r.getCodigo());\n String[] whereArgs = new String[]{_id};\n\n // update registro set values = ... where _id=?\n int count = db.update(TABELA, values, \"codigo=?\", whereArgs);\n\n return count;\n } else {\n\n id = db.insert(TABELA, \"\", values);\n System.out.println(\"Deu certo !! \\n \" + values);\n return id;\n }\n } finally {\n db.close();\n }\n }",
"private void saveTempRojoBhcs(String estado) {\n int c = mTempRojoBhcs.size();\n for (TempRojoBhc temp : mTempRojoBhcs) {\n temp.setEstado(estado);\n estudioAdapter.updateTrojosSent(temp);\n publishProgress(\"Actualizando TempRojoBhc\", Integer.valueOf(mTempRojoBhcs.indexOf(temp)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public String guardarComentario(){\r\n\t\tcomDao.save(com);\r\n\t\tinit();\r\n\t\treturn null;\r\n\t}",
"public Integer guardarTramaRepDetalladoBD(Map<String, String> parametros) {\r\n try {\r\n if (!DBPinpad.guardarTramaRepDetPinpadMC(parametros.get(\"response_code\"), parametros.get(\"message\"),\r\n parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"),\r\n parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"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 Integer guardarTramaCierreBD(Map<String, String> parametros) {\r\n try {\r\n if (!DBPinpad.guardarTramaCierrePinpadMC(parametros.get(\"response_code\"), parametros.get(\"message\"),\r\n parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"),\r\n parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"public void buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}",
"public String guardar()\r\n/* 446: */ {\r\n/* 447:455 */ String url = \"\";\r\n/* 448: */ try\r\n/* 449: */ {\r\n/* 450:458 */ if ((this.facturaProveedorSRI.getMensajeSRI() == null) || (this.facturaProveedorSRI.getMensajeSRI().toLowerCase().contains(\"guardado\")) || \r\n/* 451:459 */ (!this.facturaProveedorSRI.isTraCorregirDatos()))\r\n/* 452: */ {\r\n/* 453:461 */ if (this.facturaProveedorSRI.getDocumento().isIndicadorDocumentoElectronico()) {\r\n/* 454:462 */ this.facturaProveedorSRI.setAutorizacionRetencion(\"0000000000\");\r\n/* 455: */ }\r\n/* 456:464 */ if (isMostrarBaseImponible()) {\r\n/* 457:465 */ for (DetalleFacturaProveedorSRI detalleFacturaProveedorSRI : this.facturaProveedorSRI.getListaDetalleFacturaProveedorSRI())\r\n/* 458: */ {\r\n/* 459:466 */ detalleFacturaProveedorSRI.setBaseImponibleTarifaCero(BigDecimal.ZERO);\r\n/* 460:467 */ detalleFacturaProveedorSRI.setBaseImponibleDiferenteCero(BigDecimal.ZERO);\r\n/* 461:468 */ detalleFacturaProveedorSRI.setBaseImponibleNoObjetoIva(BigDecimal.ZERO);\r\n/* 462: */ }\r\n/* 463: */ }\r\n/* 464:471 */ if (isMostrarBasesDetalle()) {\r\n/* 465:472 */ for (DetalleFacturaProveedorSRI detalleFacturaProveedorSRI : this.facturaProveedorSRI.getListaDetalleFacturaProveedorSRI()) {\r\n/* 466:473 */ detalleFacturaProveedorSRI.setBaseImponibleRetencion(BigDecimal.ZERO);\r\n/* 467: */ }\r\n/* 468: */ }\r\n/* 469:477 */ this.servicioFacturaProveedorSRI.guardar(this.facturaProveedorSRI);\r\n/* 470: */ }\r\n/* 471: */ else\r\n/* 472: */ {\r\n/* 473:480 */ this.servicioFacturaProveedorSRI.actualizarRetencion(this.facturaProveedorSRI);\r\n/* 474: */ }\r\n/* 475:482 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 476:484 */ if (this.facturaProveedorSRI.getFacturaProveedor() == null) {\r\n/* 477:485 */ url = \"/paginas/financiero/contabilidad/procesos/compraCajaChica?faces-redirect=true\";\r\n/* 478: */ } else {\r\n/* 479:488 */ url = \"/paginas/compras/procesos/facturaProveedor?faces-redirect=true&numero=\" + this.facturaProveedorSRI.getFacturaProveedor().getNumero();\r\n/* 480: */ }\r\n/* 481: */ }\r\n/* 482: */ catch (ExcepcionAS2Financiero e)\r\n/* 483: */ {\r\n/* 484:492 */ e.printStackTrace();\r\n/* 485:493 */ addInfoMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 486:494 */ LOG.info(\"ERROR ExcepcionAS2Financiero AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 487: */ }\r\n/* 488: */ catch (ExcepcionAS2 e)\r\n/* 489: */ {\r\n/* 490:497 */ e.printStackTrace();\r\n/* 491:498 */ addInfoMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 492:499 */ LOG.info(\"ERROR ExcepcionAS2 AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 493: */ }\r\n/* 494: */ catch (Exception e)\r\n/* 495: */ {\r\n/* 496:502 */ e.printStackTrace();\r\n/* 497:503 */ addInfoMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 498:504 */ LOG.error(\"ERROR AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 499: */ }\r\n/* 500:507 */ return url;\r\n/* 501: */ }",
"public String save() {\r\n\t\ttry {\r\n\r\n\t\t\tif (obs != null && !obs.trim().isEmpty()) {\r\n\t\t\t\tconcurso.setObservacionReserva(obs);\r\n\t\t\t\tconcursoHome.setInstance(concurso);\r\n\t\t\t\tString res = concursoHome.update();\r\n\t\t\t}\r\n\r\n\t\t\tfor (PlantaCargoDetDTO dto : listaPlantaCargoDto) {\r\n\r\n\t\t\t\tif (dto.getReservar()) {\r\n\t\t\t\t\tEstadoDet est = buscarEstado(\"en reserva\");\r\n\t\t\t\t\tif (!existeEnDetalle(dto.getPlantaCargoDet(), est)) {\r\n\t\t\t\t\t\t// buscar\r\n\r\n\t\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\t\tp.setActivo(true);\r\n\t\t\t\t\t\tp.setFechaAlta(new Date());\r\n\t\t\t\t\t\tp.setUsuAlta(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\tp.setNroOrden(2);\r\n\t\t\t\t\t\tp.setPlantaCargoDet(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\t\tif (est != null)\r\n\t\t\t\t\t\t\tp.setEstadoDet(est);\r\n\t\t\t\t\t\tp.setConcurso(concursoHome.getInstance());\r\n\t\t\t\t\t\tem.persist(p);\r\n\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(est.getEstadoCab());\r\n\t\t\t\t\t\tplanta.setEstadoDet(est);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Incidencia 1079 */\r\n\t\t\t\trefreshListaPuestoReservados();\r\n\t\t\t\t/**/\r\n\t\t\t\tEstadoCab estadoCab = obtenerEstadosCabecera(\"VACANTE\");\r\n\t\t\t\tif (esta(dto.getPlantaCargoDet())) {\r\n\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\tp = recuperarConcurso(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\tif (!dto.getReservar()) {\r\n\t\t\t\t\t\tif (p.getConcursoPuestoAgr() != null) {\r\n\t\t\t\t\t\t\tstatusMessages.clear();\r\n\t\t\t\t\t\t\tstatusMessages.add(Severity.ERROR,\r\n\t\t\t\t\t\t\t\t\t\"El puesto pertenece a un grupo\");\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * p.setActivo(true); p.setNroOrden(1);\r\n\t\t\t\t\t\t * p.setFechaMod(new Date());\r\n\t\t\t\t\t\t * p.setUsuMod(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\t * EstadoDet est = buscarEstado(\"libre\");\r\n\t\t\t\t\t\t * p.setEstadoDet(est); em.merge(p);\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(estadoCab);\r\n\t\t\t\t\t\tplanta.setEstadoDet(null);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\t\t\t\t\t\tif (!concurso\r\n\t\t\t\t\t\t\t\t.getDatosEspecificosTipoConc()\r\n\t\t\t\t\t\t\t\t.getDescripcion()\r\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\r\n\t\t\t\t\t\t\t\t\t\tCONCURSO_INTERNO_INTERINSTITUCIONAL)\r\n\t\t\t\t\t\t\t\t&& planta.getPermanente())\r\n\t\t\t\t\t\t\treponerCategoriasController.reponerCategorias(p,\r\n\t\t\t\t\t\t\t\t\t\"PUESTO\", \"CONCURSO\");\r\n\t\t\t\t\t\tem.remove(p);\r\n\t\t\t\t\t\t// listaPlantaCargoDto.remove(dto);\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\tobs = null;\r\n\t\t\tem.flush();\r\n\t\t\tllenarListado1();\r\n\t\t\tstatusMessages.clear();\r\n\t\t\tstatusMessages.add(Severity.INFO, SeamResourceBundle.getBundle()\r\n\t\t\t\t\t.getString(\"GENERICO_MSG\"));\r\n\t\t\treturn \"persisted\";\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void trabajar() {\n\n\t}",
"public void guardar() {\n try {\n if (this.buscarCodApelacion()) {\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.INSERTA_APELACIONES(apelacionesBean); \n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.apelacionesBean.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"0\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue insertada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n this.apelacionesBean = new ApelacionesBean();\n addMessage(\"Guadado Exitosamente\", 1);\n } else {\n addMessage(\"La solicitud de apelacion especificada no existe\", 1);\n this.Listar();\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 }",
"private void guardarEstadoObjetosUsados() {\n }",
"@Override\n\tpublic int insertarEntrada(AlmacenDTO obj) {\n\t\tint rs=-1;\n\t\tConnection con=null;\n\t\tPreparedStatement pst=null;\n\t\ttry {\n\t\t\tcon=new MySqlDbConexion().getConexion();\n\t\t\tString sql=\"insert into MATERIAL_ENTRADA values (null,?,?,?)\";\n\t\t\tpst=con.prepareStatement(sql);\n\t\t\t\n\t\t\tpst.setInt(1,obj.getCodigo_producto());\n\t\t\tpst.setInt(2,obj.getCantidad_entrada());\n\t\t\tpst.setDate(3,obj.getFecha_entrada());\n\t\t\t\n\t\t\trs=pst.executeUpdate();\n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error en la Sentencia\"+e.getMessage());\n\t\t\t\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif(pst!=null) pst.close();\n\t\t\t\tif(con!=null) con.close();\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Error al cerrar\");\n\t\t\t}\n\t\t}\n\t\treturn rs;\n\t}",
"private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }",
"@Override\n\t@Transactional //los que no impliquen listados solo seran de tipo transactional\n\tpublic boolean grabar(Autoridad autoridad) {\n\t\tAutoridad objAutoridad = dAutoridad.save(autoridad);\n\t\tif (objAutoridad == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"private void remplirUtiliseData() {\n\t}",
"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 void persistirRemessaC17() throws Exception {\n if (this.remessa == null || this.remessa.getId() == null) { \n this.remessa = new RemessaVO();\n this.remessa.setDataHoraAbertura(new Date());\n this.remessa.setCodigoUsuarioAbertura(this.usuario.getNuMatricula());\n this.remessa.setUnidadeSolicitante(unidadeServiceRef.findUnidadeLotacaoUsuarioLogado());\n this.remessa = remessaService.salvarRascunhoRemessaAB(this.remessa);\n }\n }",
"public void guardar4(View view){\n bdboletas admin= new bdboletas(this, \"Boleta de Transito\", null, 1);\n SQLiteDatabase BaseDeDatos= admin.getWritableDatabase();\n\n placa= etplaca.getText ().toString ();\n modelo= etmodelo.getText ().toString ();\n marca= etmarca.getText ().toString ();\n color= etmodelo.getText ().toString ();\n\n año_string= etaño.getText ().toString ();\n\n int año_int=Integer.parseInt (año_string);\n\n serial= etserial.getText ().toString ();\n\n String seleccion=spinner_vehiculo.getSelectedItem ().toString ();\n\n if (!placa.isEmpty () && !modelo.isEmpty () && !marca.isEmpty ()\n && !color.isEmpty () && !año_string.isEmpty () && !serial.isEmpty ()\n && !seleccion.isEmpty ()){\n\n ContentValues registro= new ContentValues ();\n\n registro.put (\"placa\",placa);\n registro.put (\"marca\",marca);\n registro.put (\"modelo\",modelo);\n registro.put (\"tipo_vehiculo\",seleccion);\n registro.put (\"color\",color);\n registro.put (\"año\",año_int);\n registro.put (\"s_carroceria\",serial);\n\n BaseDeDatos.insert(\"boletas\",null , registro);\n\n BaseDeDatos.close();\n\n Toast.makeText(this,\"registo exitoso\",Toast.LENGTH_SHORT).show();\n // metodo boton siguiente\n Intent siguiente = new Intent (this, Remolque.class);\n startActivity (siguiente);\n }else{\n Toast.makeText(this,\"debe llenar todos los campos para poder continuar\",Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n\t\tpublic void guardar() {\n\t\t\t\n\t\t\tif (tab_presupuesto.guardar()){\n\t\t\t\tif (tab_asociacion_presupuestaria.guardar()) {\n\t\t\t\t\tguardarPantalla();\n\t\t\t\t\t//Actualizar el arbol\n\t\t\t\t\tarb_clasificador.ejecutarSql();\n\t\t\t\t\tutilitario.addUpdate(\"arb_clasificador\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t}",
"public RespuestaBD crearRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioInsercion) {\n/* 342 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* 344 */ int elSiguiente = siguienteRegistro(codigoFlujo);\n/* 345 */ if (elSiguiente == 0) {\n/* 346 */ rta.setMensaje(\"Generando secuencia\");\n/* 347 */ return rta;\n/* */ } \n/* */ \n/* */ try {\n/* 351 */ String s = \"insert into wkf_detalle(codigo_flujo,secuencia,servicio_inicio,accion,codigo_estado,servicio_destino,nombre_procedimiento,correo_destino,enviar_solicitud,ind_mismo_proveedor,ind_mismo_cliente,estado,caracteristica,valor_caracteristica,caracteristica_correo,metodo_seleccion_proveedor,ind_correo_clientes,enviar_hermana,enviar_si_hermana_cerrada,ind_cliente_inicial,usuario_insercion,fecha_insercion) values (\" + codigoFlujo + \",\" + \"\" + elSiguiente + \",\" + \"\" + servicioInicio + \",\" + \"\" + accion + \",\" + \"\" + codigoEstado + \",\" + \"\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \"'\" + nombreProcedimiento + \"',\" + \"'\" + correoDestino + \"',\" + \"'\" + enviar + \"',\" + \"'\" + mismoProveedor + \"',\" + \"'\" + mismoCliente + \"',\" + \"'\" + estado + \"',\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \"'\" + usuarioInsercion + \"',\" + \"\" + Utilidades.getFechaBD() + \"\" + \")\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 398 */ rta = this.dat.executeUpdate2(s);\n/* 399 */ rta.setSecuencia(elSiguiente);\n/* */ }\n/* 401 */ catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"%FlujoDetalleDAO:crearRegistro \", e);\n/* 404 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 406 */ return rta;\n/* */ }",
"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}",
"public boolean insertarCreacionHistorialCliente(Cliente cliente) {\n String queryDividido1 = \"INSERT INTO Historial_Cliente(Usuario_Codigo, Nombre, DPI, Direccion, Sexo, Password, Nacimiento, DPI_Escaneado, Tipo, Fecha_Cambio) \"\n + \"VALUES(?,?,?,?,?,aes_encrypt(?,'AES'),?,?,?,?)\";\n java.sql.Date fechaCreacion = new java.sql.Date(Calendar.getInstance().getTime().getTime());\n\n try {\n\n PreparedStatement enviarDividido1 = Conexion.conexion.prepareStatement(queryDividido1);\n\n //Envio de los Datos de Creacion de un Nuevo Cliente a la Tabla Historial_Cliente\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.setString(7, cliente.getNacimiento());\n enviarDividido1.setBlob(8, cliente.getDPIEscaneado());\n enviarDividido1.setString(9, \"Creacion\");\n enviarDividido1.setString(10, fechaCreacion.toString());\n enviarDividido1.executeUpdate();\n\n \n return true;\n\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n return false;\n }\n\n }",
"public Integer guardarTramaReimpresionBD(Map<String, String> parametros) {\r\n try {\r\n if (!DBPinpad.guardarTramaReimpPinpadMC(parametros.get(\"response_code\"), parametros.get(\"message\"),\r\n parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"),\r\n parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"public String insertar(Cargo cargo){\n String registrosInser=\"Registro insertado N°= \";\n long contador;\n ContentValues c=new ContentValues();\n //c.put(\"ID_CARGO\",cargo.getIdCargo());\n c.put(\"NOMBRE_CARGO\",cargo.getNombreCargo());\n c.put(\"DESCRIPCION_CARGO\",cargo.getDescripcionCargo());\n contador=db.insert(\"CARGO\",null,c);\n if(contador==-1||contador==0){\n registrosInser=\"Error al insertar\";\n }\n else{\n registrosInser=registrosInser+contador;\n }\n /* String registrosInser=\"Registro insertado N°= \";\n long contador= 0;\n ContentValues carg = new ContentValues();\n //carg.put(\"ID_CARGO\",cargo.getIdCargo());\n carg.put(\"NOMBRE_CARGO\",cargo.getNombreCargo());\n carg.put(\"DESCRIPCION_CARGO\",cargo.getDescripcionCargo());\n contador=db.insert(\"CARGO\",null,carg);\n if(contador==-1||contador==0){\n registrosInser=\"error al insertar\";\n }\n else{\n registrosInser=registrosInser+contador;\n }\n return registrosInser;*/\n return registrosInser;\n\n }",
"private void readAndSAVE(){\n boolean vaidation_status = true;\n\n achiv_title = edtxt_achiv_title.getText().toString();\n if (TextUtils.isEmpty(achiv_title)){\n edtxt_achiv_title.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_achiv_title.setError(null);\n }\n\n achiv_date = edtxt_achiv_date.getText().toString();\n if (TextUtils.isEmpty(achiv_date)){\n edtxt_achiv_date.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_achiv_date.setError(null);\n }\n\n\n\n achiv_details = edtxt_achiv_details.getText().toString();\n if(achiv_details.isEmpty()){\n vaidation_status = false;\n edtxt_achiv_details.setText(\"Please write Details!!\");\n }\n\n // if all vaidation is true then add all details into firbase database\n if(vaidation_status){\n\n //create Details model\n AchivmentsDetails addNewAchiv = new AchivmentsDetails();\n\n addNewAchiv.setAchv_titles(achiv_title);\n addNewAchiv.setAchv_date(achiv_date);\n addNewAchiv.setAchv_details(achiv_details);\n\n showProgressDialog();\n\n if(mAuth.getCurrentUser()!=null)\n {\n //CHECK IF new achivments has been added or update process.\n String achiv_key;\n if(operationStatus.equals(\"ADD_NEW\")) {\n\n // Get new push key\n achiv_key = mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").push().getKey();\n addNewAchiv.setAchv_firbase_ID(achiv_key);\n\n } else {\n achiv_key = operationStatus;\n addNewAchiv.setAchv_firbase_ID(achiv_key);\n }\n\n // save the user at UserNode under user UID\n mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").child(achiv_key).setValue(addNewAchiv, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n\n hideProgressDialog();\n\n if(databaseError==null)\n {\n Toast.makeText(AddNewAchivmentsActivity.this, \"Your Details has been saved !!\",\n Toast.LENGTH_SHORT).show();\n finish();\n }\n }\n });\n }\n\n\n\n }\n }",
"public void guardarSolicitud() {\n Map<String, String> paramMap = getParametrosSesion();\n String cadenaFirmada;\n try {\n if (paramMap != null) {\n cadenaFirmada = paramMap.get(firmaFormHelper.FIRMA_DIGITAL);\n firmaFormHelper.setSelloDigital(paramMap.get(FirmaFormHelper.FIRMA_DIGITAL));\n\n SimpleDateFormat formato = new SimpleDateFormat(\"dd/MM/yyyy\");\n produccion.setFechProduccion(new Date());\n desperdiciosHelper.setFechaAcuse(formato.format(produccion.getFechProduccion()));\n\n if (cadenaFirmada.length() > 0) {\n guardarRangosFolios();\n Acuse acuse = new Acuse();\n acuse.setSerieAcuse(TipoAcuse.DESPERDICIO);\n acuse.setIdProveedor(produccionCigarrosHelper.getProveedor().getIdProveedor());\n acuse.setSelloDigital(firmaFormHelper.getSelloDigital());\n acuse.setCadenaOriginal(firmaFormHelper.getCadenaOriginal());\n acuse.setFecCaptura(new Date());\n desperdiciosHelper.setIdAcuseRecibo(commonService.crearAcuse(acuse));\n habilitarPnlAcuse();\n registroMovimientoBitacora(getSession(), IdentificadorProcesoEnum.CONTRIBUYENTE_TRAMITES, new Date(), new Date(), MovimientosBitacoraEnum.DESPERDICIOS_DESTRUCCION);\n } else {\n habilitarPnlPrincipal();\n }\n }\n } catch (CommonServiceException e) {\n LOGGER.error(e.getMessage(), e);\n addErrorMessage(ERROR, \"No se pudo generar el acuse\");\n } catch (Exception ex) {\n LOGGER.error(ex.getMessage());\n }\n }",
"protected String cargarTempRojoBhcs(String url, String username,\n String password) throws Exception {\n try {\n getTempRojoBhcs();\n if(mTempRojoBhcs.size()>0){\n saveTempRojoBhcs(Constants.STATUS_SUBMITTED);\n // La URL de la solicitud POST\n final String urlRequest = url + \"/movil/trojos\";\n TempRojoBhc[] envio = mTempRojoBhcs.toArray(new TempRojoBhc[mTempRojoBhcs.size()]);\n HttpHeaders requestHeaders = new HttpHeaders();\n HttpAuthentication authHeader = new HttpBasicAuthentication(username, password);\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n requestHeaders.setAuthorization(authHeader);\n HttpEntity<TempRojoBhc[]> requestEntity =\n new HttpEntity<TempRojoBhc[]>(envio, requestHeaders);\n RestTemplate restTemplate = new RestTemplate();\n restTemplate.getMessageConverters().add(new StringHttpMessageConverter());\n restTemplate.getMessageConverters().add(new MappingJacksonHttpMessageConverter());\n // Hace la solicitud a la red, pone la vivienda y espera un mensaje de respuesta del servidor\n ResponseEntity<String> response = restTemplate.exchange(urlRequest, HttpMethod.POST, requestEntity,\n String.class);\n // Regresa la respuesta a mostrar al usuario\n if (!response.getBody().matches(\"Datos recibidos!\")) {\n saveTempRojoBhcs(Constants.STATUS_NOT_SUBMITTED);\n }\n return response.getBody();\n }\n else{\n return \"Datos recibidos!\";\n }\n } catch (Exception e) {\n Log.e(TAG, e.getMessage(), e);\n saveTempRojoBhcs(Constants.STATUS_NOT_SUBMITTED);\n return e.getMessage();\n }\n\n }",
"ParqueaderoEntidad actualizar(ParqueaderoEntidad parqueadero);",
"public String buscarTrabajadoresPorParametros() {\r\n try {\r\n inicializarFiltros();\r\n listaTrabajadores = null;\r\n //listaTrabajadores = administrarGestionarTrabajadoresBO.consultarTrabajadoresPorParametro(filtros);\r\n return null;\r\n } catch (Exception e) {\r\n System.out.println(\"Error ControllerAdministrarTrabajadores buscarTrabajadoresPorParametros : \" + e.toString());\r\n return null;\r\n }\r\n }",
"public Usuario buscarUsuario(String usuario) {\n Usuario usuario1 = new Usuario();\n try{\n\t\tString seleccion = \"SELECT usuario, nombre, clave FROM usuarios where usuario=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setString(1, usuario);\n \n\t\t//Savepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n \n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n usuario1.setUsuario(rs.getString(\"usuario\")); \n usuario1.setNombre(rs.getString(\"nombre\")); \n usuario1.setClave(rs.getString(\"clave\")); \n return usuario1;\n\t\t} \n \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return null; \n\n }",
"private void saveRazonNoData(String estado) {\n int c = mRazonNoData.size();\n for (RazonNoData rnd : mRazonNoData) {\n rnd.setEstado(estado);\n estudioAdapter.updateRazonNoDataSent(rnd);\n publishProgress(\"Actualizando Razones No Datos\", Integer.valueOf(mRazonNoData.indexOf(rnd)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public boolean Insert(String tipo, String lugar, String accion, String responsable, String vencimiento,String spinnerRiesgoSeleccion,\n String spinnerSectorSeleccion, String estado, String condicionInsegura, String usuario, String imagen, String site,\n String fecha, String Lider_recorrida, String Participantes, String Categoria){\n\n SQLiteDatabase BaseDeDatos=this.getWritableDatabase();\n ContentValues values=new ContentValues();\n\n if(tipo==\"Reporte de condiciones inseguras UAC\"){\n tipo = \"UAC\";\n }else if(tipo == \"Auditoria de primera parte\"){\n tipo = \"Auditoria\";\n }else {\n tipo = \"EHSS\";\n }\n values.put(\"tipo\", tipo);\n values.put(\"site\", site);\n values.put(\"fecha\", fecha);\n String fh = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date());\n values.put(\"fechaHoraCreacion\", fh);\n values.put(\"sector\",spinnerSectorSeleccion);\n values.put(\"lugar\", lugar);\n values.put(\"accion\", accion);\n values.put(\"responsable\", responsable);\n values.put(\"vencimiento\", vencimiento);\n values.put(\"riesgo\",spinnerRiesgoSeleccion);\n values.put(\"estado\",estado );\n values.put(\"condicionInsegura\", condicionInsegura);\n values.put(\"usuarioCreacion\",usuario);\n values.put(\"imagenUAC\",imagen);\n values.put(\"Lider_recorrida\",Lider_recorrida);\n values.put(\"Participantes\",Participantes);\n values.put(\"Categoria\",Categoria);\n values.put(\"syncro\", 0);\n\n boolean resultado=BaseDeDatos.insert(\"uac\",null,values)>0;\n BaseDeDatos.close();\n return resultado;\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 }",
"public void guardarDatos() throws Exception {\n\t\ttry {\n\t\t\tFormularioUtil.setUpperCase(groupboxEditar);\n\t\t\tif (validarForm()) {\n\t\t\t\t// Cargamos los componentes //\n\n\t\t\t\tHisc_urgencia_odontologico hisc_urgencia_odontologico = getBean();\n\n\t\t\t\tMap<String, Object> datos = new HashMap<String, Object>();\n\t\t\t\tdatos.put(\"hisc_urgencia_odontologico\",\n\t\t\t\t\t\thisc_urgencia_odontologico);\n\t\t\t\t// datos.put(\"sigvitales\", mcSignosVitales.obtenerSigvitales());\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getValue());\n\t\t\t\tdatos.put(\"admision\", admision);\n\t\t\t\tdatos.put(\"datos_procedimiento\", getProcedimientos());\n\n\t\t\t\tImpresion_diagnostica impresion_diagnostica = macroImpresion_diagnostica\n\t\t\t\t\t\t.obtenerImpresionDiagnostica();\n\t\t\t\tdatos.put(\"impresion_diagnostica\", impresion_diagnostica);\n\n\t\t\t\tgetServiceLocator().getHisc_urgencia_odontologicoService()\n\t\t\t\t\t\t.guardarDatos(datos);\n\n\t\t\t\ttbxAccion.setValue(\"modificar\");\n\t\t\t\tinfoPacientes.setCodigo_historia(hisc_urgencia_odontologico\n\t\t\t\t\t\t.getCodigo_historia());\n\n\t\t\t\tactualizarRemision(admision, getInformacionClinica(), this);\n\t\t\t\tcargarServicios();\n\n\t\t\t\tMensajesUtil.mensajeInformacion(\"Informacion ..\",\n\t\t\t\t\t\t\"Los datos se guardaron satisfactoriamente\");\n\t\t\t}\n\n\t\t} catch (ImpresionDiagnosticaException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t} catch (Exception e) {\n\t\t\tif (!(e instanceof WrongValueException)) {\n\t\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t\t}\n\t\t}\n\t}",
"public String adicionarubicacion(ubicacion ubicacion) {\n String miRespuesta;\n Conexion miConexion = new Conexion();\n Connection nuevaCon;\n nuevaCon = miConexion.getConn();\n \n //sentecia \n PreparedStatement sentencia;\n //try-catch \n try {\n // consulta \n String Query = \"INSERT INTO ubicacion (Departamento,municipio)\"\n + \"VALUES (?,?)\";\n sentencia = nuevaCon.prepareStatement(Query);\n sentencia.setString(1,ubicacion.getDepartamento());\n sentencia.setString(2,ubicacion.getMunicipio());\n \n sentencia.execute();\n miRespuesta = \"\";\n } catch (Exception ex){\n miRespuesta = ex.getMessage();\n System.err.println(\"Ocurrio un problea en ubicacionDAO\\n \" + ex.getMessage());\n }\n \n return miRespuesta;\n }",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Trabajo newTrabajo = (Trabajo) data.getSerializableExtra(\"resultado\");\n\n if(newTrabajo.getId() != 0) { // Si NO es un Trabajo Nuevo Vacío, osea que no hayan Cancelado la operación\n Toast.makeText(getBaseContext(), \"Nuevo Trabajo: \" + newTrabajo.getDescripcion(), Toast.LENGTH_LONG).show();\n\n // Insertamos en la Categoría correspondiente el Nuevo Trabajo\n Categoria.CATEGORIAS_MOCK[newTrabajo.getCategoria().getId()].addTrabajo(newTrabajo);\n\n // Incorporamos a la \"listaTrabajos\" el Nuevo Trabajo\n this.listaTotalTrabajos();\n\n //Se notifica al adaptador de que el ArrayList que tiene asociado ha sufrido cambios (forzando asi a ir al metodo getView())\n adaptador.notifyDataSetChanged();\n }\n }",
"public FlujoDetalleDTO leerRegistro() {\n/* */ try {\n/* 82 */ FlujoDetalleDTO reg = new FlujoDetalleDTO();\n/* */ \n/* 84 */ reg.setCodigoFlujo(this.rs.getInt(\"codigo_flujo\"));\n/* 85 */ reg.setSecuencia(this.rs.getInt(\"secuencia\"));\n/* 86 */ reg.setServicioInicio(this.rs.getInt(\"servicio_inicio\"));\n/* 87 */ reg.setCodigoEstado(this.rs.getInt(\"codigo_estado\"));\n/* 88 */ reg.setServicioDestino(this.rs.getInt(\"servicio_destino\"));\n/* 89 */ reg.setNombreProcedimiento(this.rs.getString(\"nombre_procedimiento\"));\n/* 90 */ reg.setCorreoDestino(this.rs.getString(\"correo_destino\"));\n/* 91 */ reg.setEnviarSolicitud(this.rs.getString(\"enviar_solicitud\"));\n/* 92 */ reg.setMismoProveedor(this.rs.getString(\"ind_mismo_proveedor\"));\n/* 93 */ reg.setMismoCliente(this.rs.getString(\"ind_mismo_cliente\"));\n/* 94 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 95 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 96 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 97 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 98 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 99 */ reg.setNombreServicioInicio(this.rs.getString(\"nombre_servicio_inicio\"));\n/* 100 */ reg.setNombreCodigoEstado(this.rs.getString(\"nombre_codigo_estado\"));\n/* 101 */ reg.setNombreServicioDestino(this.rs.getString(\"nombre_servicio_destino\"));\n/* 102 */ reg.setNombreEstado(this.rs.getString(\"nombre_estado\"));\n/* 103 */ reg.setCaracteristica(this.rs.getInt(\"caracteristica\"));\n/* 104 */ reg.setCaracteristicaValor(this.rs.getInt(\"valor_caracteristica\"));\n/* 105 */ reg.setCaracteristicaCorreo(this.rs.getInt(\"caracteristica_correo\"));\n/* 106 */ reg.setNombreCaracteristica(this.rs.getString(\"nombre_caracteristica\"));\n/* 107 */ reg.setDescripcionValor(this.rs.getString(\"descripcion_valor\"));\n/* 108 */ reg.setMetodoSeleccionProveedor(this.rs.getString(\"metodo_seleccion_proveedor\"));\n/* 109 */ reg.setIndCorreoCliente(this.rs.getString(\"ind_correo_clientes\"));\n/* */ \n/* */ try {\n/* 112 */ reg.setEnviar_hermana(this.rs.getString(\"enviar_hermana\"));\n/* 113 */ reg.setEnviar_si_hermana_cerrada(this.rs.getString(\"enviar_si_hermana_cerrada\"));\n/* 114 */ reg.setInd_cliente_inicial(this.rs.getString(\"ind_cliente_inicial\"));\n/* */ \n/* */ \n/* */ }\n/* 118 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 122 */ return reg;\n/* */ }\n/* 124 */ catch (Exception e) {\n/* 125 */ e.printStackTrace();\n/* 126 */ Utilidades.writeError(\"FlujoDetalleDAO:leerRegistro \", e);\n/* */ \n/* 128 */ return null;\n/* */ } \n/* */ }",
"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 }",
"private void controladorAtras(Controlador controlador){\n this.contAtras = controlador.getAtras();\n registro.setControlAtras(contAtras);\n login.setControlAtras(contAtras);\n }",
"public void guardarCV(String nombre, String Apellido,String dni,String mail,String cur ,File ruta,String mensaje){\r\n Alumnos alu=new Alumnos();\r\n alu.setNombre(nombre);\r\n alu.setApellido(Apellido);\r\n alu.setDni(dni);\r\n alu.setMail(mail);\r\n alu.setMensaje(mensaje);\r\n alu.setNom_archivo(cur);\r\n\r\n\r\n\r\n try{ //convierte el archivo pdf a bytes\r\n byte[] pdf= new byte[(int) ruta.length()];\r\n InputStream input= new FileInputStream(ruta);\r\n input.read(pdf);\r\n alu.setArchivo_cv(pdf);\r\n\r\n }catch(IOException e){\r\n alu.setArchivo_cv(null);\r\n }\r\n alu.insertarCV(alu);\r\n }",
"public void grabarConcepto(){\r\n try {\r\n Conexion conexion = new Conexion();\r\n String query = \"insert into concepto (descripcion, tipoConcepto, porcentaje, monto, fijo) values (?,?,?,?,?);\";\r\n PreparedStatement st = conexion.getConnection().prepareStatement(query);\r\n st.setString(1, this.getDescripcion());\r\n st.setString(2, this.getTipoConcepto());\r\n st.setDouble(3, this.getPorcentaje());\r\n st.setDouble(4, this.getMonto());\r\n st.setString(5, this.getFijo());\r\n st.execute();\r\n System.out.println(\"SE GRABO EL CONCEPTO EN LA BASE DE DATOS\");\r\n st.close();\r\n conexion.desconectar();\r\n } catch (SQLException ex) {\r\n System.err.println(ex.getMessage());\r\n }\r\n }",
"int insert(TCar record);",
"Lancamento persistir(Lancamento lancamento);",
"public void guardar() {\n try {\n objConec.conectar();\n objConec.Sql = objConec.con.prepareStatement(\"insert into contacto values(null,?,?,?,?,?)\");\n objConec.Sql.setString(1, getNom_con());\n objConec.Sql.setInt(2, getTel_con()); \n objConec.Sql.setString(3, getEma_con());\n objConec.Sql.setString(4, getAsu_con());\n objConec.Sql.setString(5, getMen_con());\n objConec.Sql.executeUpdate();\n objConec.cerrar();\n JOptionPane.showMessageDialog(null, \"Mensaje enviado correctamente\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Error al enviar el mensaje\");\n\n }\n\n }",
"private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }",
"public void save() {\n super.storageSave(listPedidosAssistencia.toArray());\n }",
"public EncabezadoRespuesta entradaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\t\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t\t\t//Mandamos a log el objeto de entrada\n\t\t\t\tLogHandler.debug(uid, this.getClass(), \"entradaAsistencia - Datos Entrada: \" + asistencia);\n\t\t\t\t//Variable de resultado\n\t\t\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\t try {\n\t\t \tif (asistencia.getIdEmpleado() == null) {\n\t\t \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n\t\t \t}\n\t\t \tif (asistencia.getUsuarioAlta() == null || asistencia.getUsuarioAlta().trim().isEmpty()) {\n\t\t \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario.\");\n\t\t \t}\n\t\t \tAsistenciaDAO dao = new AsistenciaDAO();\n\t\t \trespuesta = dao.entradaAsistencia(uid, asistencia);\n\n\t\t } catch (ExcepcionesCuadrillas ex) {\n\t\t\t\t\tLogHandler.error(uid, this.getClass(), \"entradaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\t\t\trespuesta.setUid(uid);\n\t\t\t\t\trespuesta.setEstatus(false);\n\t\t\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {\n\t\t\t\t\tLogHandler.error(uid, this.getClass(), \"entradaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\t\t\trespuesta.setUid(uid);\n\t\t\t\t\trespuesta.setEstatus(false);\n\t\t\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t\t\t}\n\t\t\t\tLogHandler.debug(uid, this.getClass(), \"entradaAsistencia - Datos Salida: \" + respuesta);\n\t\t\t\treturn respuesta;\n\t}",
"@Override\r\n public Assunto persistir(Assunto assunto) {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n em.getTransaction().begin();\r\n try {\r\n assunto = em.merge(assunto);\r\n em.getTransaction().commit();\r\n System.out.println(\"Registro Assunto gravado com sucesso\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return assunto;\r\n }",
"public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}",
"public void guardarEntrada(HashMap<String, Object> diccionario_datos){\n File file = new File(fichero_database);\n FileWriter writer = null;\n if(file.exists()){\n try{\n writer = new FileWriter(file, true);\n //crea un buffer o flujo intermedio antes de escribir directamente en el archivo\n BufferedWriter bfwriter = new BufferedWriter(writer);\n Iterator it = diccionario_datos.entrySet().iterator();\n while (it.hasNext()) {\n HashMap.Entry pair = (HashMap.Entry)it.next();\n bfwriter.write(pair.getKey() + \",\" );\n it.remove(); // para evitar ConcurrentModificationException\n }\n bfwriter.write(\"\\n\" );\n bfwriter.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (writer != null) {\n try {//cierra el flujo principal\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n }",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"public ArrayList<Mascota> obtenerDatos(){\n\n BaseDatos db = new BaseDatos(context);\n\n ArrayList<Mascota> aux = db.obtenerTodoslosContactos();\n\n if(aux.size()==0){\n insertarMascotas(db);\n aux = db.obtenerTodoslosContactos();\n }\n\n return aux;\n }",
"public void asociar(){\n abrirEntAntMaest();\n try{\n while(true){\n CuentaSerializada cuenta =\n (CuentaSerializada) entAntMaest.readObject();\n \n abrirEntTransaccion();\n empatarCuentaTransaccion(cuenta);\n cerrarEntTransaccion();\n agregarASalNuevoMaest(cuenta);\n }\n }\n catch(EOFException eOFException){\n System.out.printf(\"%nNo hay mas registros%n\");\n }\n catch(ClassNotFoundException classNotFoundException){\n System.err.println(\"Tipo de objeto invalido. Terminado.\");\n }\n catch(IOException iOException){\n System.err.println(\"Error al leer del archivo. Terminado.\");\n }\n }",
"@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 }",
"ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);",
"int insert(Movimiento record);",
"public String agregarCuenta(Cuenta cuenta) {\n String mensaje = \"\";\n try {\n PreparedStatement PrSt;\n String Query = \"INSERT INTO Cuenta VALUES(?,?,?,?)\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, cuenta.getCodigo());\n PrSt.setDate(2, cuenta.getCreacion());\n PrSt.setDouble(3, cuenta.getCredito());\n PrSt.setString(4, cuenta.getCodigo_cliente());\n int resultado = PrSt.executeUpdate();\n if (resultado > 0) {\n mensaje = \"Agregada Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente();\n } else {\n mensaje = \"Fallo al agregar Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente();\n }\n PrSt.close();\n } catch (SQLException e) {\n mensaje = \"Fallo al agregar Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente() + \" Error: \" + e.toString();\n }\n return mensaje;\n }",
"@Override\r\n\tprotected void process() {\n\t\tconsultarSustentoProxy.setCodigoActvidad(codigo_actividad);\r\n\t\tconsultarSustentoProxy.setCodigoCliente(codigo_cliente);\r\n\t\tconsultarSustentoProxy.setCodigoPLan(codigo_plan);\r\n\t\tconsultarSustentoProxy.execute();\r\n\t}",
"public void llenarDatosTransaccion(TransactionEntity entity, int indiceLayoutHose){\n //**********************************************************\n int contador = 0;\n Log.v(\"INICIO\",\"**********************************************************\");\n\n Log.v(\"Bomba\",String.valueOf(entity.getIdBomba()));\n //**********************************************************\n //EstadoActual\n int[] tramaEstadoActual = new int[1];\n contador = 0;\n for(int i = 8; i<= 8; i++){\n tramaEstadoActual[contador] = bufferRecepcion[i];\n contador++;\n }\n //String estadoActual = byteArrayToHexString(tramaEstadoActual,tramaEstadoActual.length);\n int estadoActual = Integer.parseInt(byteArrayToHexIntGeneral(tramaEstadoActual,1));\n entity.setEstadoActual(estadoActual);\n\n Log.v(\"Estado\",String.valueOf(entity.getEstadoActual()));\n cambioEstado(indiceLayoutHose, estadoActual);\n\n //**********************************************************\n //Capturar Nro Transaccion\n int[] tramaNroTransaccion = new int[3];\n contador = 0;\n for(int i = 9; i<= 11; i++){\n tramaNroTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n String nroTransaccion = \"\" + byteArrayToHexInt(tramaNroTransaccion,tramaNroTransaccion.length);\n entity.setNumeroTransaccion(nroTransaccion);\n Log.v(\"Nro. Transacción\",entity.getNumeroTransaccion());\n\n //**********************************************************\n //Capturar Fecha Inicio\n int[] tramaFechaInicio = new int[1];\n tramaFechaInicio[0] = bufferRecepcion[12];\n String dia = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[13];\n String mes = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[14];\n String anio = \"20\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[17];\n String hora = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[16];\n String minuto = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[15];\n String segundo = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n\n String fechaInicio = dia + \"-\" + mes + \"-\" + anio + \"\";\n String horaInicio = hora + \":\" + minuto + \":\" + segundo;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaInicio(fechaInicio);\n entity.setHoraInicio(horaInicio);\n Log.v(\"Fecha Inicio\",entity.getFechaInicio());\n Log.v(\"Hora Inicio\",entity.getHoraInicio());\n\n //**********************************************************\n //Capturar Turno\n int[] tramaTurno = new int[2];\n contador = 0;\n for(int i = 18; i<= 19; i++){\n tramaTurno[contador] = bufferRecepcion[i];\n contador++;\n }\n int turno = byteArrayToHexInt2(tramaTurno,tramaTurno.length);\n entity.setTurno(turno);\n Log.v(\"Turno\",\"\"+entity.getTurno());\n\n //**********************************************************\n //Numero de Tanque\n int[] tramaNumeroTanque = new int[1];\n contador = 0;\n for(int i = 21; i<= 21; i++){\n tramaNumeroTanque[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int numeroTanque = Integer.parseInt(byteArrayToHexIntGeneral(tramaNumeroTanque,1));\n entity.setNumeroTanque(numeroTanque);\n\n Log.v(\"Tanque\",\"\"+entity.getNumeroTanque());\n\n //**********************************************************\n //Tipo de Vehiculo\n int[] tramaTipoVehiculo = new int[1];\n contador = 0;\n for(int i = 22; i<= 22; i++){\n tramaTipoVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoVehiculo = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoVehiculo,1));\n entity.setTipoVehiculo(tipoVehiculo);\n\n Log.v(\"Tipo Vehiculo\",\"\"+entity.getTipoVehiculo());\n\n\n //**********************************************************\n //Capturar IdVehiculo\n int[] tramaIdVehiculo = new int[8];\n contador = 0;\n for(int i = 23; i<= 30; i++){\n tramaIdVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdVehiculo = hexToAscii(byteArrayToHexString(tramaIdVehiculo,tramaIdVehiculo.length));\n entity.setIdVehiculo(IdVehiculo);\n\n Log.v(\"IdVehiculo\",entity.getIdVehiculo());\n\n //**********************************************************\n //Capturar Placa\n int[] tramaPlaca = new int[10];\n contador = 0;\n for(int i = 31; i<= 40; i++){\n tramaPlaca[contador] = bufferRecepcion[i];\n contador++;\n }\n String placa = hexToAscii(byteArrayToHexString(tramaPlaca,tramaPlaca.length));\n entity.setPlaca(placa);\n\n Log.v(\"Placa\",entity.getPlaca());\n\n //**********************************************************\n //Capturar Kilometro\n\n int[] tramaKilometroParteEntera = new int[3];\n contador = 0;\n for(int i = 41; i<= 43; i++){\n tramaKilometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteEntera = byteArrayToHexInt(tramaKilometroParteEntera,tramaKilometroParteEntera.length);\n\n int[] tramaKilometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 44; i<= 44; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n\n //double kilometro = kilometroParteEntera + kilometroParteDecimal*0.1;\n double kilometro = Double.valueOf(kilometroParteEntera + \".\"+kilometroParteDecimal);\n entity.setKilometraje(\"\"+kilometro);\n\n Log.v(\"Kilometro\",\"\"+kilometro);\n\n //**********************************************************\n //Capturar Horometro\n\n int[] tramaHorometroParteEntera = new int[3];\n contador = 0;\n for(int i = 45; i<= 47; i++){\n tramaHorometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int horometroParteEntera = byteArrayToHexInt(tramaHorometroParteEntera,tramaHorometroParteEntera.length);\n\n int[] tramaHorometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 48; i<= 48; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n\n double horometro = 0.0;\n\n if(tramaHorometroParteDecimal[0]==255){\n horometro = horometroParteEntera/10D;\n }else{\n int horometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n //horometro = horometroParteEntera + horometroParteDecimal*0.1;\n horometro = Double.valueOf(horometroParteEntera + \".\"+horometroParteDecimal);\n }\n\n entity.setHorometro(\"\"+horometro);\n\n Log.v(\"Horometro\",\"\"+horometro);\n\n //**********************************************************\n //Capturar IdConductor\n int[] tramaIdConductor = new int[8];\n contador = 0;\n for(int i = 49; i<= 56; i++){\n tramaIdConductor[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdConductor = hexToAscii(byteArrayToHexString(tramaIdConductor,tramaIdConductor.length));\n entity.setIdConductor(IdConductor);\n\n Log.v(\"IdConductor\",entity.getIdConductor());\n\n //**********************************************************\n //Capturar IdOperador\n int[] tramaIdOperador = new int[8];\n contador = 0;\n for(int i = 57; i<= 64; i++){\n tramaIdOperador[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdOperador = hexToAscii(byteArrayToHexString(tramaIdOperador,tramaIdOperador.length));\n entity.setIdOperador(IdOperador);\n\n Log.v(\"IdOperador\",entity.getIdOperador());\n\n //**********************************************************\n //Tipo de Transacción\n int[] tramaTipoTransaccion = new int[1];\n contador = 0;\n for(int i = 65; i<= 65; i++){\n tramaTipoTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTransaccion = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTransaccion,1));\n entity.setTipoTransaccion(tipoTransaccion);\n\n Log.v(\"Tipo Transacción\",\"\"+entity.getTipoTransaccion());\n\n //**********************************************************\n //Capturar Latitud\n int[] tramaLatitud = new int[12];\n contador = 0;\n for(int i = 66; i<= 77; i++){\n tramaLatitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String latitud = hexToAscii(byteArrayToHexString(tramaLatitud,tramaLatitud.length));\n entity.setLatitud(latitud);\n\n Log.v(\"Latitud\",entity.getLatitud());\n\n //**********************************************************\n //Capturar Longitud\n int[] tramaLongitud = new int[12];\n contador = 0;\n for(int i = 78; i<= 89; i++){\n tramaLongitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String longitud = hexToAscii(byteArrayToHexString(tramaLongitud,tramaLongitud.length));\n entity.setLongitud(longitud);\n\n Log.v(\"Longitud\",entity.getLongitud());\n\n //**********************************************************\n //Capturar Tipo Error Pre-Seteo\n int[] tramaTipoErrorPreseteo = new int[1];\n contador = 0;\n for(int i = 90; i<= 90; i++){\n tramaTipoErrorPreseteo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoErrorPreseteo= Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoErrorPreseteo,1));\n entity.setTipoErrorPreseteo(tipoErrorPreseteo);\n\n Log.v(\"Tipo Error Preseteo\",\"\"+entity.getTipoErrorPreseteo());\n\n //**********************************************************\n //Capturar Volumen Autorizado\n int[] tramaVolumenAutorizado = new int[2];\n contador = 0;\n for(int i = 91; i<= 92; i++){\n tramaVolumenAutorizado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAutorizado = byteArrayToHexInt2(tramaVolumenAutorizado,tramaVolumenAutorizado.length);\n entity.setVolumenAutorizado(volumenAutorizado);\n Log.v(\"Volumen Autorizado\",\"\"+entity.getVolumenAutorizado());\n\n //**********************************************************\n //Capturar Volumen Aceptado\n int[] tramaVolumenAceptado = new int[2];\n contador = 0;\n for(int i = 93; i<= 94; i++){\n tramaVolumenAceptado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAceptado = byteArrayToHexInt2(tramaVolumenAceptado,tramaVolumenAceptado.length);\n entity.setVolumenAceptado(volumenAceptado);\n Log.v(\"Volumen Aceptado\",\"\"+entity.getVolumenAceptado());\n\n //**********************************************************\n //Capturar Código Cliente\n int[] tramaCodigoCliente = new int[2];\n contador = 0;\n for(int i = 100; i<= 101; i++){\n tramaCodigoCliente[contador] = bufferRecepcion[i];\n contador++;\n }\n int codigoCliente = byteArrayToHexInt2(tramaCodigoCliente,tramaCodigoCliente.length);\n entity.setCodigoCliente(codigoCliente);\n Log.v(\"Codigo Cliente\",\"\"+entity.getCodigoCliente());\n\n //**********************************************************\n //Capturar codigo area\n int[] tramaCodigoArea = new int[1];\n contador = 0;\n for(int i = 102; i<= 102; i++){\n tramaCodigoArea[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int CodigoArea = Integer.parseInt(byteArrayToHexIntGeneral(tramaCodigoArea,1));\n entity.setCodigoArea(CodigoArea);\n\n Log.v(\"Codigo Area\",\"\"+entity.getCodigoArea());\n\n //**********************************************************\n //Capturar tipo TAG\n int[] tramaTipoTAG = new int[1];\n contador = 0;\n for(int i = 103; i<= 103; i++){\n tramaTipoTAG[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTAG = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTAG,1));\n entity.setTipoTag(tipoTAG);\n\n Log.v(\"Tipo TAG\",\"\"+entity.getTipoTag());\n\n //**********************************************************\n //Capturar Volumen Abastecido\n int[] tramaVolumen = new int[9];\n contador = 0;\n for(int i = 104; i<= 112; i++){\n tramaVolumen[contador] = bufferRecepcion[i];\n contador++;\n }\n String volumen = \"\"+ hexToAscii(byteArrayToHexString(tramaVolumen,tramaVolumen.length));\n String[] parts = volumen.split(\"\\\\.\");\n if(parts.length > 1) {\n volumen = parts[0] + \".\" + parts[1].substring(0,(0+entity.getCantidadDecimales()));\n }\n\n entity.setVolumen(volumen);\n\n Log.v(\"Volumen Abastecido\",entity.getVolumen());\n\n //**********************************************************\n //Capturar Temperatura\n int[] tramaTemperatura = new int[5];\n contador = 0;\n for(int i = 113; i<= 117; i++){\n tramaTemperatura[contador] = bufferRecepcion[i];\n contador++;\n }\n String temperatura = \"\" + hexToAscii(byteArrayToHexString(tramaTemperatura,tramaTemperatura.length));\n temperatura = temperatura.substring(0,temperatura.length()-1);\n entity.setTemperatura(temperatura);\n\n Log.v(\"Temperatura\",entity.getTemperatura());\n\n //**********************************************************\n //Capturar Fecha Fin\n int[] tramaFechaFin = new int[1];\n tramaFechaFin[0] = bufferRecepcion[118];\n String diaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[119];\n String mesFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[120];\n String anioFin = \"20\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[123];\n String horaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[122];\n String minutoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[121];\n String segundoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n\n String fechaFin = diaFin + \"-\" + mesFin + \"-\" + anioFin + \"\" ;\n String horaFin1 = horaFin + \":\" + minutoFin + \":\" + segundoFin;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaFin(fechaFin);\n entity.setHoraFin(horaFin1);\n\n Log.v(\"Fecha Fin\",entity.getFechaFin());\n Log.v(\"Hora Fin\",entity.getHoraFin());\n\n //**********************************************************\n //Capturar Tipo de Cierre\n int[] tramaTipoCierre = new int[1];\n contador = 0;\n for(int i = 124; i<= 124; i++){\n tramaTipoCierre[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoCierre = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoCierre,1));\n entity.setTipoCierre(tipoCierre);\n\n Log.v(\"Tipo Cierre\",\"\"+entity.getTipoCierre());\n\n txt_galones = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_galones);\n txt_ultimo_ticket = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket);\n txt_placa = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_placa);\n txt_producto = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_producto);\n txt_ultimo_galon_p2 = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_galon_p2);\n txt_ultimo_ticket_p2= layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket_p2);\n\n txt_producto.setText(entity.getNombreProducto());\n txt_placa.setText(entity.getPlaca());\n txt_galones.setText(entity.getVolumen());\n txt_ultimo_galon_p2.setText(entity.getVolumen());\n txt_ultimo_ticket.setText(entity.getNumeroTransaccion());\n txt_ultimo_ticket_p2.setText(entity.getNumeroTransaccion());\n\n\n guardarTransaccionBD(entity);\n\n }",
"private byte[] processData(String peticion) {\n\t\t\n\t\tString respuesta = \"\";\n\t\t\n\t\tswitch (peticion) {\n\t\t\t\n\t\t\tcase \"noticias\": respuesta = \"¡Por fin la vacuna ya está en España!\"; break;\n\t\t\tcase \"hora\": respuesta = getFecha(); break;\n\t\t\tcase \"aleatorio\": respuesta = Double. toString(Math.random()*10); break;\n\t\t\tcase \"cerrar\": respuesta = \"Adios\"; break;\n\t\t\tcase \"cerrarServidor\": respuesta = \"Adios\"; break;\t\t\t\n\t\t\tdefault: respuesta = \"petición desconocida\";\n\t\t}\n\t\t\n\t\treturn respuesta.getBytes();\n\t}",
"public boolean Actualizar(String Usuario, String NombreMaterial, String Fecha, Integer NCampo, String NuevoCampo) throws IOException\n {\n System.out.println(\"Ëntro\");\n List<String> ListaLineaEliminar = BuscarIndice(Usuario, NombreMaterial, Fecha);\n if(ListaLineaEliminar.get(0) == \"404\"){ return false; }\n else{\n String LineaEliminar = ListaLineaEliminar.get(0);\n System.out.println(LineaEliminar);\n String[] Campos = LineaEliminar.split(\"\\\\|\");\n String NMaestro = Campos[1].substring(0,1);\n Integer NMaestroLinea = Integer.parseInt(Campos[1].substring(2,3));\n String L = ObtenerLinea(NMaestroLinea, \"C:\\\\MEIA\\\\Donaciones_\" + NMaestro + \".txt\");\n String[] CamposL = L.split(\"\\\\|\");\n Boolean Existe = Eliminar(Usuario, NombreMaterial, Fecha);\n System.out.println(Usuario);\n System.out.println(NombreMaterial);\n System.out.println(Fecha);\n if(NCampo == 0){\n Insertar(NuevoCampo, CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 1){\n Insertar(CamposL[0], CamposL[2], NuevoCampo, Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 2){\n Insertar(CamposL[0], NuevoCampo, CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 3){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(NuevoCampo), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 4){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), NuevoCampo, CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 5){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], NuevoCampo, CamposL[6]);\n return true;\n }\n else if(NCampo == 6){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], NuevoCampo);\n return true;\n }\n else{ return false; }\n }\n }",
"private void EnviarDatos(String user, String fecha, String pasos){\n\r\n HttpClient httpclient = new DefaultHttpClient();\r\n //Utilizamos la HttpPost para enviar lso datos\r\n //A la url donde se encuentre nuestro archivo receptor\r\n\r\n\r\n\r\n\r\n HttpPost httppost2 = new HttpPost(\"http://mets.itisol.com.mx/paciente/insertaActividad\");\r\n try {\r\n //Añadimos los datos a enviar en este caso solo uno\r\n //que le llamamos de nombre 'a'\r\n //La segunda linea podría repetirse tantas veces como queramos\r\n //siempre cambiando el nombre ('a')\r\n List<NameValuePair> postValues = new ArrayList<NameValuePair>(2);\r\n postValues.add(new BasicNameValuePair(\"usuario\", user));\r\n\r\n postValues.add(new BasicNameValuePair(\"fecha\", fecha));\r\n Log.d(\"la fecha es\", \"\" + cambiaFecha(fecha));\r\n postValues.add(new BasicNameValuePair(\"pasos\", pasos));\r\n\r\n // postValues.add(new BasicNameValuePair(\"tipo\", \"1\"));\r\n\r\n //Encapsulamos\r\n httppost2.setEntity(new UrlEncodedFormEntity(postValues));\r\n //Lanzamos la petición\r\n HttpResponse respuesta2 = httpclient.execute(httppost2);\r\n //Conectamos para recibir datos de respuesta\r\n HttpEntity entity2 = respuesta2.getEntity();\r\n //Creamos el InputStream como su propio nombre indica\r\n InputStream is2 = entity2.getContent();\r\n //Limpiamos el codigo obtenido atraves de la funcion\r\n //StreamToString explicada más abajo\r\n String resultado2= StreamToString(is2);\r\n\r\n //Enviamos el resultado LIMPIO al Handler para mostrarlo\r\n Message sms2 = new Message();\r\n sms2.obj = resultado2;\r\n\r\n puente.sendMessage(sms2);\r\n }catch (IOException e) {\r\n //TODO Auto-generated catch block\r\n }\r\n\r\n }",
"int insert(ParUsuarios record);",
"public static void guardarEstudianteBD(Estudiante estudiante) {\r\n //metimos este metodo dentro de la base de datos \r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n //ingresamos la direccion donde se encuntra la base de datos \r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.println(\"Conexion establecida!\");\r\n Statement sentencia = (Statement) conexion.createStatement();\r\n int insert = sentencia.executeUpdate(\"insert into estudiante values(\"\r\n + \"'\" + estudiante.getNro_de_ID()\r\n + \"','\" + estudiante.getNombres()\r\n + \"','\" + estudiante.getApellidos()\r\n + \"','\" + estudiante.getLaboratorio()\r\n + \"','\" + estudiante.getCarrera()\r\n + \"','\" + estudiante.getModulo()\r\n + \"','\" + estudiante.getMateria()\r\n + \"','\" + estudiante.getFecha()\r\n + \"','\" + estudiante.getHora_Ingreso()\r\n + \"','\" + estudiante.getHora_Salida()\r\n + \"')\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.println(\"Error en la conexion\" + ex);\r\n }\r\n }",
"private void limpiarDatos() {\n\t\t\n\t}",
"private void getTempRojoBhcs(){\n mTempRojoBhcs = estudioAdapter.getListaTempRojoBhcSinEnviar();\n //ca.close();\n }",
"public void guardarDatos() throws Exception {\r\n try {\r\n FormularioUtil.setUpperCase(groupboxEditar);\r\n if (validarForm()) {\r\n\r\n Admision admision = ((Admision) lbxNro_ingreso\r\n .getSelectedItem().getValue());\r\n\r\n Hospitalizacion hospitalizacion = new Hospitalizacion();\r\n hospitalizacion.setCodigo_empresa(empresa.getCodigo_empresa());\r\n hospitalizacion.setCodigo_sucursal(sucursal\r\n .getCodigo_sucursal());\r\n hospitalizacion.setNro_factura(tbxNro_factura.getValue());\r\n hospitalizacion = getServiceLocator()\r\n .getHospitalizacionService().consultar(hospitalizacion);\r\n if (hospitalizacion == null) {\r\n hospitalizacion = new Hospitalizacion();\r\n hospitalizacion.setCodigo_empresa(empresa\r\n .getCodigo_empresa());\r\n hospitalizacion.setCodigo_sucursal(sucursal\r\n .getCodigo_sucursal());\r\n hospitalizacion.setNro_factura(tbxNro_factura.getValue());\r\n }\r\n hospitalizacion.setTipo_identificacion((String) datos_seleccion\r\n .get(\"tipo_identificacion\"));\r\n hospitalizacion.setNro_identificacion(tbxNro_identificacion\r\n .getValue());\r\n hospitalizacion\r\n .setCodigo_administradora((String) datos_seleccion\r\n .get(\"codigo_administradora\"));\r\n hospitalizacion.setId_plan((String) datos_seleccion\r\n .get(\"id_plan\"));\r\n hospitalizacion.setNro_ingreso(admision.getNro_ingreso());\r\n hospitalizacion.setCodigo_prestador(tbxCodigo_prestador\r\n .getValue());\r\n hospitalizacion.setVia_ingreso(lbxVia_ingreso.getSelectedItem()\r\n .getValue().toString());\r\n hospitalizacion.setFecha_ingreso(new Timestamp(\r\n dtbxFecha_ingreso.getValue().getTime()));\r\n hospitalizacion.setNumero_autorizacion(tbxNumero_autorizacion\r\n .getValue());\r\n hospitalizacion.setCausa_externa((String) lbxCausa_externa\r\n .getSelectedItem().getValue().toString());\r\n hospitalizacion.setEstado_salida((String) lbxEstado_salida\r\n .getSelectedItem().getValue().toString());\r\n hospitalizacion.setFecha_egreso(new Timestamp(dtbxFecha_egreso\r\n .getValue().getTime()));\r\n hospitalizacion\r\n .setCodigo_diagnostico_principal(tbxCodigo_diagnostico_principal\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico1(tbxCodigo_diagnostico1\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico2(tbxCodigo_diagnostico2\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico3(tbxCodigo_diagnostico3\r\n .getValue());\r\n hospitalizacion.setComplicacion(tbxComplicacion.getValue());\r\n hospitalizacion.setCausa_muerte(tbxCausa_muerte.getValue());\r\n\r\n hospitalizacion.setCreacion_date(new Timestamp(\r\n new GregorianCalendar().getTimeInMillis()));\r\n hospitalizacion.setUltimo_update(new Timestamp(\r\n new GregorianCalendar().getTimeInMillis()));\r\n hospitalizacion.setCreacion_user(usuarios.getCodigo()\r\n .toString());\r\n hospitalizacion.setUltimo_user(usuarios.getCodigo().toString());\r\n\r\n String complemento = \"\";\r\n\r\n if (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n getServiceLocator().getHospitalizacionService().crear(\r\n hospitalizacion);\r\n if (FACTURACION_RIPS != null) {\r\n this.detach();\r\n } else {\r\n accionForm(true, \"registrar\");\r\n }\r\n } else {\r\n int result = getServiceLocator()\r\n .getHospitalizacionService().actualizar(\r\n hospitalizacion);\r\n if (result == 0) {\r\n throw new Exception(\r\n \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\");\r\n }\r\n }\r\n\r\n if (ionGuardar != null) {\r\n ionGuardar.guardar();\r\n } else {\r\n Messagebox.show(\r\n \"Los datos se guardaron satisfactoriamente.\"\r\n + complemento, \"Informacion? ..\",\r\n Messagebox.OK, Messagebox.INFORMATION);\r\n tbxNro_factura.setValue(hospitalizacion.getNro_factura());\r\n tbxAccion.setValue(\"modificar\");\r\n }\r\n\r\n if (this.getParent() instanceof Facturacion_ripsAction) {\r\n this.detach();\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n MensajesUtil.mensajeError(e, \"\", this);\r\n }\r\n }",
"private void saveEncLactancias(String estado) {\n int c = mLactanciasMaternas.size();\n for (LactanciaMaterna enclactancia : mLactanciasMaternas) {\n enclactancia.getMovilInfo().setEstado(estado);\n estudioAdapter.updateLacMatSent(enclactancia);\n publishProgress(\"Actualizando encuestas lactancia\", Integer.valueOf(mLactanciasMaternas.indexOf(enclactancia)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public void recargarDatos( ) {\n\t\tPAC_SHWEB_PROVEEDORES llamadaProv = null;\n\t\ttry {\n\t\t\tllamadaProv = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaCom = null;\n\n\t\ttry {\n\t\t\trespuestaCom = llamadaProv.ejecutaPAC_SHWEB_PROVEEDORES__F_COMUNICADOS_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t// Mostramos el estado del expediente\n\t\tPAC_SHWEB_PROVEEDORES llamada = null;\n\t\ttry {\n\t\t\tllamada = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuesta = null;\n\t\ttry {\n\t\t\trespuesta = llamada.ejecutaPAC_SHWEB_PROVEEDORES__F_ESTADO_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t\tMap<String, Object> retorno = new HashMap<String, Object>(respuesta);\n\n\t\t\tUI.getCurrent().getSession().setAttribute(\"estadoExpediente\",retorno.get(\"ESTADO\").toString());\n\t\t\t\n\t\t\tprovPantallaConsultaExpedienteInicial.setCaption(\"GESTIÓN DEL EXPEDIENTE Nº \" + UI.getCurrent().getSession().getAttribute(\"expediente\")\n\t\t\t\t\t+ \" ( \" + \n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\") + \" ) \");\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\t\n\t\t\n\t\t// Maestro comunicados\n\n\t\tWS_AMA llamadaAMA = null;\n\t\ttry {\n\t\t\tllamadaAMA = new WS_AMA(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaMaestro = null;\n\t\t\n\t\t//System.out.println(\"Llamammos maestro comunicados: \" + UI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1));;\n\t\ttry {\n\t\t\t// pPUSUARIO, pORIGEN, pTPCOMUNI, pTPUSUARIO, pESTADO)\n\t\t\t\n\t\t\trespuestaMaestro = llamadaAMA.ejecutaWS_AMA__MAESTRO_COMUNICADOS(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnull,\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\").toString()\n\t\t\t\t\t);\t\t\t\n\n\t\t\t\n\t\t\tMap<String, Object> retornoMaestro = new HashMap<String, Object>(respuestaMaestro);\n\t\t\tList<Map> valorMaestro = (List<Map>) retornoMaestro.get(\"COMUNICADOS\");\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",valorMaestro);\n\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",null);\n\t\t}\n\t\t\n\t\t// \t\n\t\t\n\t\t\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\t\t/*if ( !ValidarComunicado.EsValido(\"CA\") && !ValidarComunicado.EsValido(\"FT\") ) {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(true);\n\n\t\t\t\n\t\t\t\n\t\t}*/\n\t\t// Mostramos botonera de cerrar expediente\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\n\t}",
"@Override\n public Call<ResponseBody> registarMoviemientoEmpleado(@Body RootMovimiento movimiento) {\n movimiento.setId_dispositivo(Settings.Secure.getString(this.context.getContentResolver(), Settings.Secure.ANDROID_ID));\n return this.serviceInterface.registarMoviemientoEmpleado(movimiento);\n }",
"@Override\r\n\tprotected String requestText() {\n\t\tGuardarVtaCeroMotivoRequest guardarVtaCeroMotivoRequest = new GuardarVtaCeroMotivoRequest();\r\n\t\tguardarVtaCeroMotivoRequest.setAnio(Anio);\r\n\t\tguardarVtaCeroMotivoRequest.setCodCliente(codCliente);\r\n\t\tguardarVtaCeroMotivoRequest.setCodDeposito(codDeposito);\r\n\t\tguardarVtaCeroMotivoRequest.setMes(Mes);\r\n\t\tguardarVtaCeroMotivoRequest.setMotivo(Motivo);\r\n\t\tguardarVtaCeroMotivoRequest.setObservacion(observacion);\r\n\t\tguardarVtaCeroMotivoRequest.setSemana(Semana);\r\n\t\tguardarVtaCeroMotivoRequest.setUsuario(Usuario);\r\n\t\tString request = JSONHelper.serializar(guardarVtaCeroMotivoRequest);\r\n\t\treturn request;\r\n\t}",
"public String guardar()\r\n/* 104: */ {\r\n/* 105: */ try\r\n/* 106: */ {\r\n/* 107:132 */ this.servicioDimensionContable.guardar(this.dimensionContable);\r\n/* 108:133 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 109:134 */ setEditado(false);\r\n/* 110:135 */ cargarDatos();\r\n/* 111: */ }\r\n/* 112: */ catch (Exception e)\r\n/* 113: */ {\r\n/* 114:137 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 115:138 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 116: */ }\r\n/* 117:140 */ return \"\";\r\n/* 118: */ }",
"public String cambiarEstado() {\n\t\ttry {\n\t\t\tMensaje.crearMensajeINFO(managergest.cambioEstadoItem(getOfertadelsita().getOferId()));\n\t\t\tgetListaOferta().clear();\n\t\t\tgetListaOferta().addAll(managergest.findAllofertasOrdenadas());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"\";\n\t}",
"@Override\r\n\tprotected String requestText() {\n\t\tGuardarSustentoRequest guardarSustentoRequest = new GuardarSustentoRequest();\r\n\t\tguardarSustentoRequest.setCodigoActvidad(codigoActvidad);\r\n\t\tguardarSustentoRequest.setCodigoCliente(codigoCliente);\r\n\t\tguardarSustentoRequest.setCodigoPLan(codigoPLan);\r\n\t\tguardarSustentoRequest.setDescripcionActividad(descripcionActividad);\r\n\t\tguardarSustentoRequest.setFechaVisita(fechaVisita);\r\n\t\tguardarSustentoRequest.setTipoActividad(tipoActividad);\r\n\t\tguardarSustentoRequest.setUsuario(usuario);\r\n\t\tString request = JSONHelper.serializar(guardarSustentoRequest);\r\n\t\treturn request;\r\n\t}",
"private void agregarASalNuevoMaest(CuentaSerializada cuenta){\n try{\n salNuevoMaest.writeObject(cuenta);\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 }",
"public void enviarValoresCabecera(){\n }",
"public void guardarDestruccion() {\n try {\n produccion.setIdMarca(opcionMarca);\n produccion.setIdPlantaProd(opcionPlanta);\n produccion.setIdPaisOrigen(opcionOrigen);\n produccion.setIdTipoRetro(opcionTipo);\n produccion.setFechProduccion(new Date());\n produccion.setDescPaisOrigen(desperdiciosHelper.getNombrePais());\n\n if (!habilitarBtnValidarProd()) {\n if (produccion != null) {\n produccion = produccionService.guardaDestruccion(produccion);\n super.msgInfo(MSGEXITOVALIDAPROD);\n desperdiciosHelper.setDeshabilitaBtnValidarProd(true);\n desperdiciosHelper.setDeshabilitaCargaArchivo(false);\n } else {\n super.msgError(MSGERRORVALIDARPROD);\n }\n }\n } catch (ProduccionServiceException e) {\n LOGGER.error(\"ERROR: Al guardar los datos de produccion\" + e.getMessage(), e);\n }\n }",
"public void guardar(Modelo modelo) throws SipsaExcepcion;",
"@Override\n protected void onPostExecute(HttpResponse result) {\n if (result != null)\n\t\t\ttry {\n\t\t\t\tLog.i(\"Conexao\", \"Dentrodopost\");\n\t\t\t\t//result.getEntity().writeTo(new FileOutputStream(f));\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} \n }",
"private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }",
"public String cargarDatos()\r\n/* 514: */ {\r\n/* 515:540 */ return null;\r\n/* 516: */ }",
"@Override\n protected Response doInsert(JSONObject data) {\n return null;\n }"
] |
[
"0.6108867",
"0.6089659",
"0.59963566",
"0.59516066",
"0.59346324",
"0.59239954",
"0.5902984",
"0.5900754",
"0.580848",
"0.57809454",
"0.5766452",
"0.57644504",
"0.5763113",
"0.57480466",
"0.57415074",
"0.5709575",
"0.57050407",
"0.5672679",
"0.5664272",
"0.56620985",
"0.5660924",
"0.56539875",
"0.5652867",
"0.5640711",
"0.5639574",
"0.5621628",
"0.5621237",
"0.5618425",
"0.56115556",
"0.5598985",
"0.55770415",
"0.557137",
"0.55665624",
"0.5561801",
"0.55481106",
"0.5547554",
"0.5545583",
"0.55434704",
"0.5530123",
"0.55275875",
"0.5525662",
"0.5524151",
"0.5519947",
"0.55188763",
"0.5511981",
"0.5506241",
"0.55051416",
"0.5503129",
"0.55030775",
"0.54881",
"0.54847366",
"0.5480024",
"0.54506034",
"0.5445036",
"0.54418904",
"0.5441591",
"0.54324824",
"0.5428266",
"0.54233485",
"0.5421697",
"0.5421027",
"0.54141116",
"0.54127306",
"0.5408961",
"0.54024637",
"0.5396911",
"0.53968513",
"0.53895",
"0.53855276",
"0.53819346",
"0.53780955",
"0.53749156",
"0.5370826",
"0.5370472",
"0.53698844",
"0.5368954",
"0.53641844",
"0.5346846",
"0.53458077",
"0.53453165",
"0.53430814",
"0.5335295",
"0.5334208",
"0.5333388",
"0.53326344",
"0.53292847",
"0.53247714",
"0.53199583",
"0.5319406",
"0.53191096",
"0.5317003",
"0.53164697",
"0.53157854",
"0.53155106",
"0.5312124",
"0.53046227",
"0.5300779",
"0.5298598",
"0.5297596",
"0.52974415"
] |
0.56660414
|
18
|
Guarda el contenido de la trama retornada a la base de datos
|
public Integer guardarTramaReimpresionBD(Map<String, String> parametros) {
try {
if (!DBPinpad.guardarTramaReimpPinpadMC(parametros.get("response_code"), parametros.get("message"),
parametros.get("ecr_currency_code"),
parametros.get("ecr_aplication"),
parametros.get("ecr_transaccion"), parametros.get("merchant_id"),
parametros.get("print_data"), VariablesCaja.vNumPedVta))
return VariablesPinpad.RET_NOK;
} catch (Exception e) {
log.debug(e.toString());
return VariablesPinpad.RET_NOK;
}
return VariablesPinpad.RET_OK;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_atencion_embarazada his_atencion_embarazada = new His_atencion_embarazada();\r\n\t\t\t\this_atencion_embarazada.setCodigo_empresa(empresa\r\n\t\t\t\t\t\t.getCodigo_empresa());\r\n\t\t\t\this_atencion_embarazada.setCodigo_sucursal(sucursal\r\n\t\t\t\t\t\t.getCodigo_sucursal());\r\n\t\t\t\this_atencion_embarazada.setCodigo_historia(tbxCodigo_historia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFecha_inicial(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_inicial.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCodigo_eps(tbxCodigo_eps.getValue());\r\n\t\t\t\this_atencion_embarazada.setCodigo_dpto(lbxCodigo_dpto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCodigo_municipio(lbxCodigo_municipio\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setIdentificacion(tbxIdentificacion\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDireccion(tbxMotivo.getValue());\r\n\t\t\t\this_atencion_embarazada.setTelefono(tbxTelefono.getValue());\r\n\t\t\t\this_atencion_embarazada.setSeleccion(rdbSeleccion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setGestaciones(lbxGestaciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPartos(lbxPartos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCesarias(lbxCesarias\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAbortos(lbxAbortos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEspontaneo(lbxEspontaneo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setProvocado(lbxProvocado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNacido_muerto(lbxNacido_muerto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPrematuro(lbxPrematuro\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_menos(lbxHijos_menos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_mayor(lbxHijos_mayor\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMalformado(lbxMalformado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHipertension(lbxHipertension\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_ultimo_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_ultimo_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCirugia(lbxCirugia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setOtro_antecedente(tbxOtro_antecedente\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemoclasificacion(lbxHemoclasificacion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRh(lbxRh.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_atencion_embarazada.setImc(tbxImc.getValue());\r\n\t\t\t\this_atencion_embarazada.setTa(tbxTa.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc(tbxFc.getValue());\r\n\t\t\t\this_atencion_embarazada.setFr(tbxFr.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemperatura(tbxTemperatura\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCroomb(tbxCroomb.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setFecha_ultima_mestruacion(new Timestamp(\r\n\t\t\t\t\t\t\t\tdtbxFecha_ultima_mestruacion.getValue()\r\n\t\t\t\t\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_atencion_embarazada.setFecha_probable_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_probable_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setEdad_gestacional(tbxEdad_gestacional\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setControl(lbxControl.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNum_control(tbxNum_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFetales(lbxFetales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFiebre(lbxFiebre.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido(lbxLiquido.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFlujo(lbxFlujo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEnfermedad(lbxEnfermedad\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_enfermedad(tbxCual_enfermedad\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo(lbxCigarrillo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol(lbxAlcohol.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_alcohol(tbxCual_alcohol\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDroga(lbxDroga.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_droga(tbxCual_droga.getValue());\r\n\t\t\t\this_atencion_embarazada.setViolencia(lbxViolencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_violencia(tbxCual_violencia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoide(lbxToxoide.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setDosis(lbxDosis.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_gestion(tbxObservaciones_gestion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setAltura_uterina(tbxAltura_uterina\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCorelacion(chbCorelacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEmbarazo_multiple(chbEmbarazo_multiple.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setTrasmision_sexual(chbTrasmision_sexual.isChecked());\r\n\t\t\t\this_atencion_embarazada.setAnomalia(rdbAnomalia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEdema_gestion(rdbEdema_gestion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPalidez(rdbPalidez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulciones(rdbConvulciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConciencia(rdbConciencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCavidad_bucal(rdbCavidad_bucal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto(tbxHto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb(tbxHb.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoplasma(tbxToxoplasma.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl1(tbxVdrl1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl2(tbxVdrl2.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih1(tbxVih1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih2(tbxVih2.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb(tbxHepb.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtro(tbxOtro.getValue());\r\n\t\t\t\this_atencion_embarazada.setEcografia(tbxEcografia.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_gestion(rdbClasificacion_gestion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setContracciones(lbxContracciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setNum_contracciones(lbxNum_contracciones\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHemorragia(lbxHemorragia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_vaginal(lbxLiquido_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setColor_liquido(tbxColor_liquido\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDolor_cabeza(lbxDolor_cabeza\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVision(lbxVision.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulcion(lbxConvulcion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_parto(tbxObservaciones_parto\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setContracciones_min(tbxContracciones_min.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_fera(tbxFc_fera.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDilatacion_cervical(tbxDilatacion_cervical\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setPreentacion(rdbPreentacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setOtra_presentacion(tbxOtra_presentacion.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdema(rdbEdema.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemorragia_vaginal(lbxHemorragia_vaginal\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto_parto(tbxHto_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb_parto(tbxHb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb_parto(tbxHepb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl_parto(tbxVdrl_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih_parto(tbxVih_parto.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_parto(rdbClasificacion_parto\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_nac(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_nac.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setIdentificacion_nac(tbxIdentificacion_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setSexo(lbxSexo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso_nac(tbxPeso_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla_nac(tbxTalla_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setPc_nac(tbxPc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_nac(tbxFc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemper_nac(tbxTemper_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdad(tbxEdad.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar1(tbxAdgar1.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar5(tbxAdgar5.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar10(tbxAdgar10.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar20(tbxAdgar20.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_nac(tbxObservaciones_nac.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_nac(rdbClasificacion_nac\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setReani_prematuro(chbReani_prematuro\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_meconio(chbReani_meconio\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_respiracion(chbReani_respiracion.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipotonico(chbReani_hipotonico\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_apnea(chbReani_apnea\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_jadeo(chbReani_jadeo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_deficultosa(chbReani_deficultosa.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_gianosis(chbReani_gianosis\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_bradicardia(chbReani_bradicardia.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipoxemia(chbReani_hipoxemia\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_estimulacion(chbReani_estimulacion\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_ventilacion(chbReani_ventilacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_comprensiones(chbReani_comprensiones\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_intubacion(chbReani_intubacion\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setMedicina(tbxMedicina.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_reani(rdbClasificacion_reani\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRuptura(lbxRuptura.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_ruptura(lbxTiempo_ruptura\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_neo(tbxLiquido_neo\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFiebre_neo(lbxFiebre_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_neo(lbxTiempo_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCoricamniotis(tbxCoricamniotis\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setIntrauterina(rdbIntrauterina\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMadre20(lbxMadre20.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol_neo(chbAlcohol_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDrogas_neo(chbDrogas_neo.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo_neo(chbCigarrillo_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setRespiracion_neo(rdbRespiracion_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLlanto_neo(rdbLlanto_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVetalidad_neo(rdbVetalidad_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTaquicardia_neo(chbTaquicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setBradicardia_neo(chbBradicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setPalidez_neo(chbPalidez_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCianosis_neo(chbCianosis_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setAnomalias_congenitas(lbxAnomalias_congenitas\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_anomalias(tbxCual_anomalias\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setLesiones(tbxLesiones.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtras_alter(tbxOtras_alter\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_neo(rdbClasificacion_neo\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlarma(tbxAlarma.getValue());\r\n\t\t\t\this_atencion_embarazada.setConsulta_control(tbxConsulta_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setMedidas_preventiva(tbxMedidas_preventiva.getValue());\r\n\t\t\t\this_atencion_embarazada.setRecomendaciones(tbxRecomendaciones\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDiagnostico(tbxDiagnostico\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCodigo_diagnostico(tbxCodigo_diagnostico.getValue());\r\n\t\t\t\this_atencion_embarazada.setTratamiento(tbxTratamiento\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setRecomendacion_alimentacion(tbxRecomendacion_alimentacion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEvolucion_servicio(tbxEvolucion_servicio.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_atencion_embarazada);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_atencion_embarazada = getServiceLocator()\r\n\t\t\t\t\t\t.getHis_atencion_embarazadaService().guardar(datos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\t\t\t\t/*\r\n\t\t\t\t * else{ int result =\r\n\t\t\t\t * getServiceLocator().getHis_atencion_embarazadaService\r\n\t\t\t\t * ().actualizar(his_atencion_embarazada); if(result==0){ throw\r\n\t\t\t\t * new Exception(\r\n\t\t\t\t * \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\"\r\n\t\t\t\t * ); } }\r\n\t\t\t\t */\r\n\r\n//\t\t\t\tcodigo_historia = his_atencion_embarazada.getCodigo_historia();\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}",
"public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_parto his_parto = new His_parto();\r\n\t\t\t\this_parto.setCodigo_empresa(empresa.getCodigo_empresa());\r\n\t\t\t\this_parto.setCodigo_sucursal(sucursal.getCodigo_sucursal());\r\n\t\t\t\this_parto.setCodigo_historia(tbxCodigo_historia.getValue());\r\n\t\t\t\this_parto.setIdentificacion(tbxIdentificacion.getValue());\r\n\t\t\t\this_parto.setFecha_inicial(new Timestamp(dtbxFecha_inicial\r\n\t\t\t\t\t\t.getValue().getTime()));\r\n\t\t\t\this_parto.setConyugue(tbxConyugue.getValue());\r\n\t\t\t\this_parto.setId_conyugue(tbxId_conyugue.getValue());\r\n\t\t\t\this_parto.setEdad_conyugue(tbxEdad_conyugue.getValue());\r\n\t\t\t\this_parto.setEscolaridad_conyugue(tbxEscolaridad_conyugue\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setMotivo(tbxMotivo.getValue());\r\n\t\t\t\this_parto.setEnfermedad_actual(tbxEnfermedad_actual.getValue());\r\n\t\t\t\this_parto.setAntecedentes_familiares(tbxAntecedentes_familiares\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setPreeclampsia(rdbPreeclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setHipertension(rdbHipertension.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEclampsia(rdbEclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setH1(rdbH1.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setH2(rdbH2.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPostimadurez(rdbPostimadurez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRot_pre(rdbRot_pre.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPolihidramnios(rdbPolihidramnios.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRcui(rdbRcui.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPelvis(rdbPelvis.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFeto_macrosonico(rdbFeto_macrosonico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setIsoinmunizacion(rdbIsoinmunizacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setAo(rdbAo.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCirc_cordon(rdbCirc_cordon.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setPostparto(rdbPostparto.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setDiabetes(rdbDiabetes.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCardiopatia(rdbCardiopatia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setAnemias(rdbAnemias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEnf_autoinmunes(rdbEnf_autoinmunes\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setEnf_renales(rdbEnf_renales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInf_urinaria(rdbInf_urinaria.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEpilepsia(rdbEpilepsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto\r\n\t\t\t\t\t\t.setTbc(rdbTbc.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setMiomas(rdbMiomas.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setHb(rdbHb.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFumadora(rdbFumadora.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setInf_puerperal(rdbInf_puerperal.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfertilidad(rdbInfertilidad.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMenarquia(tbxMenarquia.getValue());\r\n\t\t\t\this_parto.setCiclos(tbxCiclos.getValue());\r\n\t\t\t\this_parto.setVida_marital(tbxVida_marital.getValue());\r\n\t\t\t\this_parto.setVida_obstetrica(tbxVida_obstetrica.getValue());\r\n\t\t\t\this_parto.setNo_gestaciones(lbxNo_gestaciones.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setParto(lbxParto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setAborto(lbxAborto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCesarias(lbxCesarias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFecha_um(new Timestamp(dtbxFecha_um.getValue()\r\n\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_parto.setUm(tbxUm.getValue());\r\n\t\t\t\this_parto.setFep(tbxFep.getValue());\r\n\t\t\t\this_parto.setGemerales(lbxGemerales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMalformados(lbxMalformados.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_vivos(lbxNacidos_vivos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_muertos(lbxNacidos_muertos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPreterminos(lbxPreterminos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMedico(chbMedico.isChecked());\r\n\t\t\t\this_parto.setEnfermera(chbEnfermera.isChecked());\r\n\t\t\t\this_parto.setAuxiliar(chbAuxiliar.isChecked());\r\n\t\t\t\this_parto.setPartera(chbPartera.isChecked());\r\n\t\t\t\this_parto.setOtros(chbOtros.isChecked());\r\n\t\t\t\this_parto.setControlado(rdbControlado.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setLugar_consulta(rdbLugar_consulta.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNo_consultas(lbxNo_consultas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEspecialistas(chbEspecialistas.isChecked());\r\n\t\t\t\this_parto.setGeneral(chbGeneral.isChecked());\r\n\t\t\t\this_parto.setPartera_consulta(chbPartera_consulta.isChecked());\r\n\t\t\t\this_parto.setSangrado_vaginal(rdbSangrado_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCefalias(rdbCefalias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEdema(rdbEdema.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEpigastralgia(rdbEpigastralgia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setVomitos(rdbVomitos.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setTinutus(rdbTinutus.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEscotomas(rdbEscotomas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_urinaria(rdbInfeccion_urinaria\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_vaginal(rdbInfeccion_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setOtros_embarazo(tbxOtros_embarazo.getValue());\r\n\t\t\t\this_parto.setCardiaca(tbxCardiaca.getValue());\r\n\t\t\t\this_parto.setRespiratoria(tbxRespiratoria.getValue());\r\n\t\t\t\this_parto.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_parto.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_parto.setTempo(tbxTempo.getValue());\r\n\t\t\t\this_parto.setPresion(tbxPresion.getValue());\r\n\t\t\t\this_parto.setPresion2(tbxPresion2.getValue());\r\n\t\t\t\this_parto.setInd_masa(tbxInd_masa.getValue());\r\n\t\t\t\this_parto.setSus_masa(tbxSus_masa.getValue());\r\n\t\t\t\this_parto.setCabeza_cuello(tbxCabeza_cuello.getValue());\r\n\t\t\t\this_parto.setCardiovascular(tbxCardiovascular.getValue());\r\n\t\t\t\this_parto.setMamas(tbxMamas.getValue());\r\n\t\t\t\this_parto.setPulmones(tbxPulmones.getValue());\r\n\t\t\t\this_parto.setAbdomen(tbxAbdomen.getValue());\r\n\t\t\t\this_parto.setUterina(tbxUterina.getValue());\r\n\t\t\t\this_parto.setSituacion(tbxSituacion.getValue());\r\n\t\t\t\this_parto.setPresentacion(tbxPresentacion.getValue());\r\n\t\t\t\this_parto.setV_presentacion(tbxV_presentacion.getValue());\r\n\t\t\t\this_parto.setPosicion(tbxPosicion.getValue());\r\n\t\t\t\this_parto.setV_posicion(tbxV_posicion.getValue());\r\n\t\t\t\this_parto.setC_uterina(tbxC_uterina.getValue());\r\n\t\t\t\this_parto.setTono(tbxTono.getValue());\r\n\t\t\t\this_parto.setFcf(tbxFcf.getValue());\r\n\t\t\t\this_parto.setGenitales(tbxGenitales.getValue());\r\n\t\t\t\this_parto.setDilatacion(tbxDilatacion.getValue());\r\n\t\t\t\this_parto.setBorramiento(tbxBorramiento.getValue());\r\n\t\t\t\this_parto.setEstacion(tbxEstacion.getValue());\r\n\t\t\t\this_parto.setMembranas(tbxMembranas.getValue());\r\n\t\t\t\this_parto.setExtremidades(tbxExtremidades.getValue());\r\n\t\t\t\this_parto.setSnc(tbxSnc.getValue());\r\n\t\t\t\this_parto.setObservacion(tbxObservacion.getValue());\r\n\t\t\t\this_parto.setCodigo_consulta_pyp(lbxCodigo_consulta_pyp\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFinalidad_cons(lbxFinalidad_cons.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setCausas_externas(lbxCausas_externas\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_disnostico(lbxTipo_disnostico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_principal(tbxTipo_principal.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_1(tbxTipo_relacionado_1\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_2(tbxTipo_relacionado_2\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_3(tbxTipo_relacionado_3\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTratamiento(tbxTratamiento.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_parto);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_parto = getServiceLocator().getHis_partoService().guardar(\r\n\t\t\t\t\t\tdatos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}",
"private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }",
"public String guardar()\r\n/* 69: */ {\r\n/* 70: */ try\r\n/* 71: */ {\r\n/* 72: 85 */ this.motivoLlamadoAtencion.setIdOrganizacion(AppUtil.getOrganizacion().getIdOrganizacion());\r\n/* 73: 86 */ this.motivoLlamadoAtencion.setIdSucursal(AppUtil.getSucursal().getIdSucursal());\r\n/* 74: 87 */ this.servicioMotivoLlamadoAtencion.guardar(this.motivoLlamadoAtencion);\r\n/* 75: 88 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 76: 89 */ setEditado(false);\r\n/* 77: 90 */ limpiar();\r\n/* 78: */ }\r\n/* 79: */ catch (Exception e)\r\n/* 80: */ {\r\n/* 81: 92 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 82: 93 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 83: */ }\r\n/* 84: 95 */ return \"\";\r\n/* 85: */ }",
"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 Integer guardarTramaProcesoCompraBD(Map<String, String> parametros, String codFormaPago) {\r\n try {\r\n log.debug(\"MC- ingreso a guardar Trama\");\r\n if (!DBPinpad.guardarTramaPinpadMC(parametros.get(\"response_code\"), parametros.get(\"amount\"),\r\n parametros.get(\"approval_code\"), parametros.get(\"message\"),\r\n nroTarjetaBruto, //parametros.get(\"card\"),\r\n parametros.get(\"card_id\"), parametros.get(\"month\"), parametros.get(\"amount_quota\"),\r\n parametros.get(\"credit_type\"), parametros.get(\"client_name\"), parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"), parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta, codFormaPago))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }",
"public void guardar() {\n String msj = \"\";\n int idpagoanulado = daoPagoCuotaAnulado.nuevoID();\n Date SYSDATE = new Date();\n java.sql.Timestamp fechaPagoCuotaAnuladoSQL = new java.sql.Timestamp(SYSDATE.getTime());\n String observacion = txtObservacion.getText();\n int idmotivo = Integer.parseInt(txtCodigoMotivo.getText());\n int idusuario = appLogin.IDUSUARIO;\n int idpago =Integer.parseInt(txtNumeroPago.getText());\n Date fechapago = daoCotizacion.parseFecha(txtFechaPago.getText());\n java.sql.Date fechapagoSQL = new java.sql.Date(fechapago.getTime());\n double mPago = montoPago;\n String numerocomprobante = txtComprobante.getText();\n String numerorecibo = txtRecibo.getText();\n //VALIDACIONES\n if (idmotivo == 0) {\n msj += \"CODIGO DEL MOTIVO DE ANULACION ESTA VACIO.\\n\";\n }\n if (idpago == 0) {\n msj += \"NO HA SELECCIONADO NINGUN PAGO PARA LA ANULACIÓN.\\n\";\n }\n if (msj.isEmpty()) {\n cpca.setIdpagoanulado(idpagoanulado);\n cpca.setFechahoranulado(fechaPagoCuotaAnuladoSQL);\n cpca.setObservacion(observacion);\n cpca.setIdmotivo(idmotivo);\n cpca.setIdusuario(idusuario);\n cpca.setIdpago(idpago);\n cpca.setFechapago(fechapagoSQL);\n cpca.setMonto(mPago);\n cpca.setNumerocomprobante(numerocomprobante);\n cpca.setNumerorecibo(numerorecibo);\n daoPagoCuotaAnulado.agregar(cpca);\n } else {\n JOptionPane.showMessageDialog(null, msj, \"ERRORES\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"@Override\n\tpublic DatosEnc obtenerDatos(DatosEnc datos) {\n\t\tConnection con = null;\n\t\tCallableStatement stmt = null;\n//\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\ttry{\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tString query = \"select * from pv_cotizaciones_det where no_cotizacion = ?\";\n//\t\t\tps = con.prepareStatement(query);\n//\t\t\tps.setString(1, datos.getNoDocumento());\n//\t\t\trs = ps.executeQuery();\n//\t\t\texiste=0;\n//\t\t\twhile(rs.next()){\n//\t\t\t\tif(rs.getString(\"no_cotizacion\") == null){\n//\t\t\t\t\texiste=0;\n//\t\t\t\t}else if(rs.getString(\"no_cotizacion\").equals(datos.getNoDocumento())){\n//\t\t\t\t\texiste=1;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tps.close();\n//\t\t\trs.close();\n//\t\t\tif(existe==0){\n\t\t\t\tcon = new ConectarDB().getConnection();\n\t\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_InUp_Mov_Enc(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\t\tstmt.setString(1, datos.getCodigoCliente());\n\t\t\t\tstmt.setString(2, datos.getNit());\n\t\t\t\tstmt.setString(3, datos.getNombreCliente());\n\t\t\t\tstmt.setString(4, datos.getDirecFactura());\n\t\t\t\tstmt.setString(5, datos.getTel());\n\t\t\t\tstmt.setString(6, datos.getTarjeta());\n\t\t\t\tstmt.setString(7, datos.getDirecEnvio());\n\t\t\t\tstmt.setString(8, datos.getCodigoVendedor());\n\t\t\t\tstmt.setString(9, datos.getUsername());\n\t\t\t\tstmt.setString(10, datos.getTipoDocumento());\n\t\t\t\tstmt.setString(11, datos.getNoDocumento());\n\t\t\t\tstmt.setString(12, datos.getFechaVence());\n\t\t\t\tstmt.setString(13, datos.getTipoPago());\n\t\t\t\tstmt.setString(14, datos.getTipoCredito());\n\t\t\t\tstmt.setString(15, datos.getAutoriza());\n\t\t\t\tstmt.setString(16, datos.getFechaDocumento());\n\t\t\t\tstmt.setString(17, datos.getCargosEnvio());\n\t\t\t\tstmt.setString(18, datos.getOtrosCargos());\n\t\t\t\tstmt.setString(19, datos.getMontoVenta());\n\t\t\t\tstmt.setString(20, datos.getMontoTotal());\n\t\t\t\tstmt.setString(21, datos.getSerieDev());\n\t\t\t\tstmt.setString(22, datos.getNoDocDev());\n\t\t\t\tstmt.setString(23, datos.getObservaciones());\n\t\t\t\tstmt.setString(24, datos.getTipoNota());\n\t\t\t\tstmt.setString(25, datos.getCaja());\n\t\t\t\tstmt.setString(26, datos.getFechaEntrega());\n\t\t\t\tstmt.setString(27, datos.getCodigoDept());\n\t\t\t\tstmt.setString(28, datos.getCodGen());\n\t\t\t\tstmt.setString(29, datos.getNoConsigna());\n\t\t\t\tstmt.setString(30, datos.getCodMovDev());\n\t\t\t\tstmt.setString(31, datos.getGeneraSolicitud());\n\t\t\t\tstmt.setString(32, datos.getTipoPagoNC());\n\t\t\t\tstmt.setString(33, datos.getTipoCliente());\n\t\t\t\tstmt.setString(34, datos.getCodigoNegocio());\n\t\t\t\tstmt.setString(35, datos.getCantidadDevolver());\n\t\t\t\tstmt.setString(36, datos.getAutorizoDespacho());\n\t\t\t\tstmt.setString(37, datos.getSaldo());\n\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tif(rs.getString(1)!=null){\n\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n\t\t\t\t\t}\n\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tif(rs.getString(1)!=null){\n//\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n//\t\t\t\t\t}else{\n//\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n//\t\t\t\t\t}\n//\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tdocumento = rs.getInt(2);\n\t\t\t\t}\n\t\t\t\tcon.close();\n\t\t\t\tstmt.close();\n\t\t\t\trs.close();\n//\t\t\t}\n\t\t\t\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_Del_Mov_Det(?,?,?)}\");\n//\t\t\tstmt.setInt(1, Integer.parseInt(datos.getTipoDocumento()));\n//\t\t\tstmt.setString(2, \"\");\n//\t\t\tstmt.setInt(3, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"limpiado\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_udpv_VerificaCotiza(?,?)}\");\n//\t\t\tstmt.setString(1, \"\");\n//\t\t\tstmt.setInt(2, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"error\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n\t\t}catch(SQLException e ){\n\t\t\tSystem.out.println(\"Error Enc: \" + e.getMessage());\n\t\t}\n\t\treturn datos;\n\t}",
"public void processInsertar() {\n }",
"public EncabezadoRespuesta bajaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t//Mandamos a log el objeto de entrada\n\t\tLogHandler.debug(uid, this.getClass(), \"bajaAsistencia - Datos Entrada: \" + asistencia);\n\t\t//Variable de resultado\n\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\ttry {\n\t\t\tif (asistencia.getIdEmpleado() == null) {\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n \t}\n \tif (asistencia.getUsuarioBaja() == null || asistencia.getUsuarioBaja().trim().isEmpty())\n \t{\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario para la baja.\");\n \t}\n \tif (asistencia.getUsuarioUltMod() == null || asistencia.getUsuarioUltMod().trim().isEmpty())\n \t{\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario para la modificacion.\");\n \t}\n \tAsistenciaDAO dao = new AsistenciaDAO();\n \trespuesta = dao.bajaAsistencia(uid, asistencia);\n\t\t}\n\t\tcatch (ExcepcionesCuadrillas ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"bajaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"bajaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tLogHandler.debug(uid, this.getClass(), \"bajaAsistencia - Datos Salida: \" + respuesta);\n\t\treturn respuesta;\n\t}",
"@Override\r\n\tpublic void guardar() {\n\t\ttab_cuenta.guardar();\r\n\t\tguardarPantalla();\r\n\t\t\r\n\t}",
"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}",
"Reserva Obtener();",
"public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\n }",
"@Override\n\tpublic void borrarDatosOk() {\n\n\t}",
"public void guardarTransferenteAlcabala(RaTransferenteAlcabala raTransferenteAlcabala)throws Exception;",
"public long save(Registro r) {\n\n long id = r.getCodigo();\n SQLiteDatabase db = banco.getWritableDatabase();\n try {\n\n\n ContentValues values = new ContentValues();\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-M-d\");\n String dateString = sdf.format(r.getData());\n values.put(\"data\", dateString);\n values.put(\"distancia\", r.getDistancia());\n values.put(\"consumo\", r.getConsumo());\n values.put(\"mediaAceleracao\", r.getMediaAberturaBorboleta());\n values.put(\"mediaConsumo\", r.getMediaConsumo());\n values.put(\"codTipoCombustivel\", r.getTipoCombustivel().getCodigo());\n values.put(\"codCarro\", r.getCarro().getCodigo());\n values.put(\"codUsuario\", r.getUsuario().getCodigo());\n\n if (id != 0) {//SE O ID É DIFERENTE DE 0 ATUALIZA,\n\n System.out.println(\"Entrou !!\");\n String _id = String.valueOf(r.getCodigo());\n String[] whereArgs = new String[]{_id};\n\n // update registro set values = ... where _id=?\n int count = db.update(TABELA, values, \"codigo=?\", whereArgs);\n\n return count;\n } else {\n\n id = db.insert(TABELA, \"\", values);\n System.out.println(\"Deu certo !! \\n \" + values);\n return id;\n }\n } finally {\n db.close();\n }\n }",
"public Integer guardarTramaAnulacionBD(Map<String, String> parametros, String formaPago) {\r\n try {\r\n if (!DBPinpad.guardarTramaAnulPinpadMC(parametros.get(\"response_code\"), parametros.get(\"amount\"),\r\n parametros.get(\"approval_code\"), parametros.get(\"message\"),\r\n parametros.get(\"card\"), parametros.get(\"month\"),\r\n parametros.get(\"amount_quota\"), parametros.get(\"credit_type\"),\r\n parametros.get(\"client_name\"), parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"), parametros.get(\"ecr_transaccion\"),\r\n parametros.get(\"merchant_id\"), parametros.get(\"print_data\"),\r\n lblDatoPedidoEnv, //VariablesCaja.vNumPedVta\r\n formaPago))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"private void saveTempRojoBhcs(String estado) {\n int c = mTempRojoBhcs.size();\n for (TempRojoBhc temp : mTempRojoBhcs) {\n temp.setEstado(estado);\n estudioAdapter.updateTrojosSent(temp);\n publishProgress(\"Actualizando TempRojoBhc\", Integer.valueOf(mTempRojoBhcs.indexOf(temp)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public String guardarComentario(){\r\n\t\tcomDao.save(com);\r\n\t\tinit();\r\n\t\treturn null;\r\n\t}",
"public Integer guardarTramaRepDetalladoBD(Map<String, String> parametros) {\r\n try {\r\n if (!DBPinpad.guardarTramaRepDetPinpadMC(parametros.get(\"response_code\"), parametros.get(\"message\"),\r\n parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"),\r\n parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"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 Integer guardarTramaCierreBD(Map<String, String> parametros) {\r\n try {\r\n if (!DBPinpad.guardarTramaCierrePinpadMC(parametros.get(\"response_code\"), parametros.get(\"message\"),\r\n parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"),\r\n parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"public void buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}",
"public String guardar()\r\n/* 446: */ {\r\n/* 447:455 */ String url = \"\";\r\n/* 448: */ try\r\n/* 449: */ {\r\n/* 450:458 */ if ((this.facturaProveedorSRI.getMensajeSRI() == null) || (this.facturaProveedorSRI.getMensajeSRI().toLowerCase().contains(\"guardado\")) || \r\n/* 451:459 */ (!this.facturaProveedorSRI.isTraCorregirDatos()))\r\n/* 452: */ {\r\n/* 453:461 */ if (this.facturaProveedorSRI.getDocumento().isIndicadorDocumentoElectronico()) {\r\n/* 454:462 */ this.facturaProveedorSRI.setAutorizacionRetencion(\"0000000000\");\r\n/* 455: */ }\r\n/* 456:464 */ if (isMostrarBaseImponible()) {\r\n/* 457:465 */ for (DetalleFacturaProveedorSRI detalleFacturaProveedorSRI : this.facturaProveedorSRI.getListaDetalleFacturaProveedorSRI())\r\n/* 458: */ {\r\n/* 459:466 */ detalleFacturaProveedorSRI.setBaseImponibleTarifaCero(BigDecimal.ZERO);\r\n/* 460:467 */ detalleFacturaProveedorSRI.setBaseImponibleDiferenteCero(BigDecimal.ZERO);\r\n/* 461:468 */ detalleFacturaProveedorSRI.setBaseImponibleNoObjetoIva(BigDecimal.ZERO);\r\n/* 462: */ }\r\n/* 463: */ }\r\n/* 464:471 */ if (isMostrarBasesDetalle()) {\r\n/* 465:472 */ for (DetalleFacturaProveedorSRI detalleFacturaProveedorSRI : this.facturaProveedorSRI.getListaDetalleFacturaProveedorSRI()) {\r\n/* 466:473 */ detalleFacturaProveedorSRI.setBaseImponibleRetencion(BigDecimal.ZERO);\r\n/* 467: */ }\r\n/* 468: */ }\r\n/* 469:477 */ this.servicioFacturaProveedorSRI.guardar(this.facturaProveedorSRI);\r\n/* 470: */ }\r\n/* 471: */ else\r\n/* 472: */ {\r\n/* 473:480 */ this.servicioFacturaProveedorSRI.actualizarRetencion(this.facturaProveedorSRI);\r\n/* 474: */ }\r\n/* 475:482 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 476:484 */ if (this.facturaProveedorSRI.getFacturaProveedor() == null) {\r\n/* 477:485 */ url = \"/paginas/financiero/contabilidad/procesos/compraCajaChica?faces-redirect=true\";\r\n/* 478: */ } else {\r\n/* 479:488 */ url = \"/paginas/compras/procesos/facturaProveedor?faces-redirect=true&numero=\" + this.facturaProveedorSRI.getFacturaProveedor().getNumero();\r\n/* 480: */ }\r\n/* 481: */ }\r\n/* 482: */ catch (ExcepcionAS2Financiero e)\r\n/* 483: */ {\r\n/* 484:492 */ e.printStackTrace();\r\n/* 485:493 */ addInfoMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 486:494 */ LOG.info(\"ERROR ExcepcionAS2Financiero AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 487: */ }\r\n/* 488: */ catch (ExcepcionAS2 e)\r\n/* 489: */ {\r\n/* 490:497 */ e.printStackTrace();\r\n/* 491:498 */ addInfoMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 492:499 */ LOG.info(\"ERROR ExcepcionAS2 AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 493: */ }\r\n/* 494: */ catch (Exception e)\r\n/* 495: */ {\r\n/* 496:502 */ e.printStackTrace();\r\n/* 497:503 */ addInfoMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 498:504 */ LOG.error(\"ERROR AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 499: */ }\r\n/* 500:507 */ return url;\r\n/* 501: */ }",
"public String save() {\r\n\t\ttry {\r\n\r\n\t\t\tif (obs != null && !obs.trim().isEmpty()) {\r\n\t\t\t\tconcurso.setObservacionReserva(obs);\r\n\t\t\t\tconcursoHome.setInstance(concurso);\r\n\t\t\t\tString res = concursoHome.update();\r\n\t\t\t}\r\n\r\n\t\t\tfor (PlantaCargoDetDTO dto : listaPlantaCargoDto) {\r\n\r\n\t\t\t\tif (dto.getReservar()) {\r\n\t\t\t\t\tEstadoDet est = buscarEstado(\"en reserva\");\r\n\t\t\t\t\tif (!existeEnDetalle(dto.getPlantaCargoDet(), est)) {\r\n\t\t\t\t\t\t// buscar\r\n\r\n\t\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\t\tp.setActivo(true);\r\n\t\t\t\t\t\tp.setFechaAlta(new Date());\r\n\t\t\t\t\t\tp.setUsuAlta(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\tp.setNroOrden(2);\r\n\t\t\t\t\t\tp.setPlantaCargoDet(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\t\tif (est != null)\r\n\t\t\t\t\t\t\tp.setEstadoDet(est);\r\n\t\t\t\t\t\tp.setConcurso(concursoHome.getInstance());\r\n\t\t\t\t\t\tem.persist(p);\r\n\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(est.getEstadoCab());\r\n\t\t\t\t\t\tplanta.setEstadoDet(est);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Incidencia 1079 */\r\n\t\t\t\trefreshListaPuestoReservados();\r\n\t\t\t\t/**/\r\n\t\t\t\tEstadoCab estadoCab = obtenerEstadosCabecera(\"VACANTE\");\r\n\t\t\t\tif (esta(dto.getPlantaCargoDet())) {\r\n\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\tp = recuperarConcurso(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\tif (!dto.getReservar()) {\r\n\t\t\t\t\t\tif (p.getConcursoPuestoAgr() != null) {\r\n\t\t\t\t\t\t\tstatusMessages.clear();\r\n\t\t\t\t\t\t\tstatusMessages.add(Severity.ERROR,\r\n\t\t\t\t\t\t\t\t\t\"El puesto pertenece a un grupo\");\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * p.setActivo(true); p.setNroOrden(1);\r\n\t\t\t\t\t\t * p.setFechaMod(new Date());\r\n\t\t\t\t\t\t * p.setUsuMod(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\t * EstadoDet est = buscarEstado(\"libre\");\r\n\t\t\t\t\t\t * p.setEstadoDet(est); em.merge(p);\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(estadoCab);\r\n\t\t\t\t\t\tplanta.setEstadoDet(null);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\t\t\t\t\t\tif (!concurso\r\n\t\t\t\t\t\t\t\t.getDatosEspecificosTipoConc()\r\n\t\t\t\t\t\t\t\t.getDescripcion()\r\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\r\n\t\t\t\t\t\t\t\t\t\tCONCURSO_INTERNO_INTERINSTITUCIONAL)\r\n\t\t\t\t\t\t\t\t&& planta.getPermanente())\r\n\t\t\t\t\t\t\treponerCategoriasController.reponerCategorias(p,\r\n\t\t\t\t\t\t\t\t\t\"PUESTO\", \"CONCURSO\");\r\n\t\t\t\t\t\tem.remove(p);\r\n\t\t\t\t\t\t// listaPlantaCargoDto.remove(dto);\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\tobs = null;\r\n\t\t\tem.flush();\r\n\t\t\tllenarListado1();\r\n\t\t\tstatusMessages.clear();\r\n\t\t\tstatusMessages.add(Severity.INFO, SeamResourceBundle.getBundle()\r\n\t\t\t\t\t.getString(\"GENERICO_MSG\"));\r\n\t\t\treturn \"persisted\";\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void trabajar() {\n\n\t}",
"public void guardar() {\n try {\n if (this.buscarCodApelacion()) {\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.INSERTA_APELACIONES(apelacionesBean); \n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.apelacionesBean.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"0\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue insertada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n this.apelacionesBean = new ApelacionesBean();\n addMessage(\"Guadado Exitosamente\", 1);\n } else {\n addMessage(\"La solicitud de apelacion especificada no existe\", 1);\n this.Listar();\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 }",
"private void guardarEstadoObjetosUsados() {\n }",
"@Override\n\tpublic int insertarEntrada(AlmacenDTO obj) {\n\t\tint rs=-1;\n\t\tConnection con=null;\n\t\tPreparedStatement pst=null;\n\t\ttry {\n\t\t\tcon=new MySqlDbConexion().getConexion();\n\t\t\tString sql=\"insert into MATERIAL_ENTRADA values (null,?,?,?)\";\n\t\t\tpst=con.prepareStatement(sql);\n\t\t\t\n\t\t\tpst.setInt(1,obj.getCodigo_producto());\n\t\t\tpst.setInt(2,obj.getCantidad_entrada());\n\t\t\tpst.setDate(3,obj.getFecha_entrada());\n\t\t\t\n\t\t\trs=pst.executeUpdate();\n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error en la Sentencia\"+e.getMessage());\n\t\t\t\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif(pst!=null) pst.close();\n\t\t\t\tif(con!=null) con.close();\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Error al cerrar\");\n\t\t\t}\n\t\t}\n\t\treturn rs;\n\t}",
"private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }",
"@Override\n\t@Transactional //los que no impliquen listados solo seran de tipo transactional\n\tpublic boolean grabar(Autoridad autoridad) {\n\t\tAutoridad objAutoridad = dAutoridad.save(autoridad);\n\t\tif (objAutoridad == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"private void remplirUtiliseData() {\n\t}",
"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 void persistirRemessaC17() throws Exception {\n if (this.remessa == null || this.remessa.getId() == null) { \n this.remessa = new RemessaVO();\n this.remessa.setDataHoraAbertura(new Date());\n this.remessa.setCodigoUsuarioAbertura(this.usuario.getNuMatricula());\n this.remessa.setUnidadeSolicitante(unidadeServiceRef.findUnidadeLotacaoUsuarioLogado());\n this.remessa = remessaService.salvarRascunhoRemessaAB(this.remessa);\n }\n }",
"public void guardar4(View view){\n bdboletas admin= new bdboletas(this, \"Boleta de Transito\", null, 1);\n SQLiteDatabase BaseDeDatos= admin.getWritableDatabase();\n\n placa= etplaca.getText ().toString ();\n modelo= etmodelo.getText ().toString ();\n marca= etmarca.getText ().toString ();\n color= etmodelo.getText ().toString ();\n\n año_string= etaño.getText ().toString ();\n\n int año_int=Integer.parseInt (año_string);\n\n serial= etserial.getText ().toString ();\n\n String seleccion=spinner_vehiculo.getSelectedItem ().toString ();\n\n if (!placa.isEmpty () && !modelo.isEmpty () && !marca.isEmpty ()\n && !color.isEmpty () && !año_string.isEmpty () && !serial.isEmpty ()\n && !seleccion.isEmpty ()){\n\n ContentValues registro= new ContentValues ();\n\n registro.put (\"placa\",placa);\n registro.put (\"marca\",marca);\n registro.put (\"modelo\",modelo);\n registro.put (\"tipo_vehiculo\",seleccion);\n registro.put (\"color\",color);\n registro.put (\"año\",año_int);\n registro.put (\"s_carroceria\",serial);\n\n BaseDeDatos.insert(\"boletas\",null , registro);\n\n BaseDeDatos.close();\n\n Toast.makeText(this,\"registo exitoso\",Toast.LENGTH_SHORT).show();\n // metodo boton siguiente\n Intent siguiente = new Intent (this, Remolque.class);\n startActivity (siguiente);\n }else{\n Toast.makeText(this,\"debe llenar todos los campos para poder continuar\",Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n\t\tpublic void guardar() {\n\t\t\t\n\t\t\tif (tab_presupuesto.guardar()){\n\t\t\t\tif (tab_asociacion_presupuestaria.guardar()) {\n\t\t\t\t\tguardarPantalla();\n\t\t\t\t\t//Actualizar el arbol\n\t\t\t\t\tarb_clasificador.ejecutarSql();\n\t\t\t\t\tutilitario.addUpdate(\"arb_clasificador\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t}",
"public RespuestaBD crearRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioInsercion) {\n/* 342 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* 344 */ int elSiguiente = siguienteRegistro(codigoFlujo);\n/* 345 */ if (elSiguiente == 0) {\n/* 346 */ rta.setMensaje(\"Generando secuencia\");\n/* 347 */ return rta;\n/* */ } \n/* */ \n/* */ try {\n/* 351 */ String s = \"insert into wkf_detalle(codigo_flujo,secuencia,servicio_inicio,accion,codigo_estado,servicio_destino,nombre_procedimiento,correo_destino,enviar_solicitud,ind_mismo_proveedor,ind_mismo_cliente,estado,caracteristica,valor_caracteristica,caracteristica_correo,metodo_seleccion_proveedor,ind_correo_clientes,enviar_hermana,enviar_si_hermana_cerrada,ind_cliente_inicial,usuario_insercion,fecha_insercion) values (\" + codigoFlujo + \",\" + \"\" + elSiguiente + \",\" + \"\" + servicioInicio + \",\" + \"\" + accion + \",\" + \"\" + codigoEstado + \",\" + \"\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \"'\" + nombreProcedimiento + \"',\" + \"'\" + correoDestino + \"',\" + \"'\" + enviar + \"',\" + \"'\" + mismoProveedor + \"',\" + \"'\" + mismoCliente + \"',\" + \"'\" + estado + \"',\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \"'\" + usuarioInsercion + \"',\" + \"\" + Utilidades.getFechaBD() + \"\" + \")\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 398 */ rta = this.dat.executeUpdate2(s);\n/* 399 */ rta.setSecuencia(elSiguiente);\n/* */ }\n/* 401 */ catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"%FlujoDetalleDAO:crearRegistro \", e);\n/* 404 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 406 */ return rta;\n/* */ }",
"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}",
"public boolean insertarCreacionHistorialCliente(Cliente cliente) {\n String queryDividido1 = \"INSERT INTO Historial_Cliente(Usuario_Codigo, Nombre, DPI, Direccion, Sexo, Password, Nacimiento, DPI_Escaneado, Tipo, Fecha_Cambio) \"\n + \"VALUES(?,?,?,?,?,aes_encrypt(?,'AES'),?,?,?,?)\";\n java.sql.Date fechaCreacion = new java.sql.Date(Calendar.getInstance().getTime().getTime());\n\n try {\n\n PreparedStatement enviarDividido1 = Conexion.conexion.prepareStatement(queryDividido1);\n\n //Envio de los Datos de Creacion de un Nuevo Cliente a la Tabla Historial_Cliente\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.setString(7, cliente.getNacimiento());\n enviarDividido1.setBlob(8, cliente.getDPIEscaneado());\n enviarDividido1.setString(9, \"Creacion\");\n enviarDividido1.setString(10, fechaCreacion.toString());\n enviarDividido1.executeUpdate();\n\n \n return true;\n\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n return false;\n }\n\n }",
"public String insertar(Cargo cargo){\n String registrosInser=\"Registro insertado N°= \";\n long contador;\n ContentValues c=new ContentValues();\n //c.put(\"ID_CARGO\",cargo.getIdCargo());\n c.put(\"NOMBRE_CARGO\",cargo.getNombreCargo());\n c.put(\"DESCRIPCION_CARGO\",cargo.getDescripcionCargo());\n contador=db.insert(\"CARGO\",null,c);\n if(contador==-1||contador==0){\n registrosInser=\"Error al insertar\";\n }\n else{\n registrosInser=registrosInser+contador;\n }\n /* String registrosInser=\"Registro insertado N°= \";\n long contador= 0;\n ContentValues carg = new ContentValues();\n //carg.put(\"ID_CARGO\",cargo.getIdCargo());\n carg.put(\"NOMBRE_CARGO\",cargo.getNombreCargo());\n carg.put(\"DESCRIPCION_CARGO\",cargo.getDescripcionCargo());\n contador=db.insert(\"CARGO\",null,carg);\n if(contador==-1||contador==0){\n registrosInser=\"error al insertar\";\n }\n else{\n registrosInser=registrosInser+contador;\n }\n return registrosInser;*/\n return registrosInser;\n\n }",
"private void readAndSAVE(){\n boolean vaidation_status = true;\n\n achiv_title = edtxt_achiv_title.getText().toString();\n if (TextUtils.isEmpty(achiv_title)){\n edtxt_achiv_title.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_achiv_title.setError(null);\n }\n\n achiv_date = edtxt_achiv_date.getText().toString();\n if (TextUtils.isEmpty(achiv_date)){\n edtxt_achiv_date.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_achiv_date.setError(null);\n }\n\n\n\n achiv_details = edtxt_achiv_details.getText().toString();\n if(achiv_details.isEmpty()){\n vaidation_status = false;\n edtxt_achiv_details.setText(\"Please write Details!!\");\n }\n\n // if all vaidation is true then add all details into firbase database\n if(vaidation_status){\n\n //create Details model\n AchivmentsDetails addNewAchiv = new AchivmentsDetails();\n\n addNewAchiv.setAchv_titles(achiv_title);\n addNewAchiv.setAchv_date(achiv_date);\n addNewAchiv.setAchv_details(achiv_details);\n\n showProgressDialog();\n\n if(mAuth.getCurrentUser()!=null)\n {\n //CHECK IF new achivments has been added or update process.\n String achiv_key;\n if(operationStatus.equals(\"ADD_NEW\")) {\n\n // Get new push key\n achiv_key = mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").push().getKey();\n addNewAchiv.setAchv_firbase_ID(achiv_key);\n\n } else {\n achiv_key = operationStatus;\n addNewAchiv.setAchv_firbase_ID(achiv_key);\n }\n\n // save the user at UserNode under user UID\n mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").child(achiv_key).setValue(addNewAchiv, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n\n hideProgressDialog();\n\n if(databaseError==null)\n {\n Toast.makeText(AddNewAchivmentsActivity.this, \"Your Details has been saved !!\",\n Toast.LENGTH_SHORT).show();\n finish();\n }\n }\n });\n }\n\n\n\n }\n }",
"public void guardarSolicitud() {\n Map<String, String> paramMap = getParametrosSesion();\n String cadenaFirmada;\n try {\n if (paramMap != null) {\n cadenaFirmada = paramMap.get(firmaFormHelper.FIRMA_DIGITAL);\n firmaFormHelper.setSelloDigital(paramMap.get(FirmaFormHelper.FIRMA_DIGITAL));\n\n SimpleDateFormat formato = new SimpleDateFormat(\"dd/MM/yyyy\");\n produccion.setFechProduccion(new Date());\n desperdiciosHelper.setFechaAcuse(formato.format(produccion.getFechProduccion()));\n\n if (cadenaFirmada.length() > 0) {\n guardarRangosFolios();\n Acuse acuse = new Acuse();\n acuse.setSerieAcuse(TipoAcuse.DESPERDICIO);\n acuse.setIdProveedor(produccionCigarrosHelper.getProveedor().getIdProveedor());\n acuse.setSelloDigital(firmaFormHelper.getSelloDigital());\n acuse.setCadenaOriginal(firmaFormHelper.getCadenaOriginal());\n acuse.setFecCaptura(new Date());\n desperdiciosHelper.setIdAcuseRecibo(commonService.crearAcuse(acuse));\n habilitarPnlAcuse();\n registroMovimientoBitacora(getSession(), IdentificadorProcesoEnum.CONTRIBUYENTE_TRAMITES, new Date(), new Date(), MovimientosBitacoraEnum.DESPERDICIOS_DESTRUCCION);\n } else {\n habilitarPnlPrincipal();\n }\n }\n } catch (CommonServiceException e) {\n LOGGER.error(e.getMessage(), e);\n addErrorMessage(ERROR, \"No se pudo generar el acuse\");\n } catch (Exception ex) {\n LOGGER.error(ex.getMessage());\n }\n }",
"protected String cargarTempRojoBhcs(String url, String username,\n String password) throws Exception {\n try {\n getTempRojoBhcs();\n if(mTempRojoBhcs.size()>0){\n saveTempRojoBhcs(Constants.STATUS_SUBMITTED);\n // La URL de la solicitud POST\n final String urlRequest = url + \"/movil/trojos\";\n TempRojoBhc[] envio = mTempRojoBhcs.toArray(new TempRojoBhc[mTempRojoBhcs.size()]);\n HttpHeaders requestHeaders = new HttpHeaders();\n HttpAuthentication authHeader = new HttpBasicAuthentication(username, password);\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n requestHeaders.setAuthorization(authHeader);\n HttpEntity<TempRojoBhc[]> requestEntity =\n new HttpEntity<TempRojoBhc[]>(envio, requestHeaders);\n RestTemplate restTemplate = new RestTemplate();\n restTemplate.getMessageConverters().add(new StringHttpMessageConverter());\n restTemplate.getMessageConverters().add(new MappingJacksonHttpMessageConverter());\n // Hace la solicitud a la red, pone la vivienda y espera un mensaje de respuesta del servidor\n ResponseEntity<String> response = restTemplate.exchange(urlRequest, HttpMethod.POST, requestEntity,\n String.class);\n // Regresa la respuesta a mostrar al usuario\n if (!response.getBody().matches(\"Datos recibidos!\")) {\n saveTempRojoBhcs(Constants.STATUS_NOT_SUBMITTED);\n }\n return response.getBody();\n }\n else{\n return \"Datos recibidos!\";\n }\n } catch (Exception e) {\n Log.e(TAG, e.getMessage(), e);\n saveTempRojoBhcs(Constants.STATUS_NOT_SUBMITTED);\n return e.getMessage();\n }\n\n }",
"ParqueaderoEntidad actualizar(ParqueaderoEntidad parqueadero);",
"public String buscarTrabajadoresPorParametros() {\r\n try {\r\n inicializarFiltros();\r\n listaTrabajadores = null;\r\n //listaTrabajadores = administrarGestionarTrabajadoresBO.consultarTrabajadoresPorParametro(filtros);\r\n return null;\r\n } catch (Exception e) {\r\n System.out.println(\"Error ControllerAdministrarTrabajadores buscarTrabajadoresPorParametros : \" + e.toString());\r\n return null;\r\n }\r\n }",
"public Usuario buscarUsuario(String usuario) {\n Usuario usuario1 = new Usuario();\n try{\n\t\tString seleccion = \"SELECT usuario, nombre, clave FROM usuarios where usuario=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setString(1, usuario);\n \n\t\t//Savepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n \n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n usuario1.setUsuario(rs.getString(\"usuario\")); \n usuario1.setNombre(rs.getString(\"nombre\")); \n usuario1.setClave(rs.getString(\"clave\")); \n return usuario1;\n\t\t} \n \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return null; \n\n }",
"private void saveRazonNoData(String estado) {\n int c = mRazonNoData.size();\n for (RazonNoData rnd : mRazonNoData) {\n rnd.setEstado(estado);\n estudioAdapter.updateRazonNoDataSent(rnd);\n publishProgress(\"Actualizando Razones No Datos\", Integer.valueOf(mRazonNoData.indexOf(rnd)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public boolean Insert(String tipo, String lugar, String accion, String responsable, String vencimiento,String spinnerRiesgoSeleccion,\n String spinnerSectorSeleccion, String estado, String condicionInsegura, String usuario, String imagen, String site,\n String fecha, String Lider_recorrida, String Participantes, String Categoria){\n\n SQLiteDatabase BaseDeDatos=this.getWritableDatabase();\n ContentValues values=new ContentValues();\n\n if(tipo==\"Reporte de condiciones inseguras UAC\"){\n tipo = \"UAC\";\n }else if(tipo == \"Auditoria de primera parte\"){\n tipo = \"Auditoria\";\n }else {\n tipo = \"EHSS\";\n }\n values.put(\"tipo\", tipo);\n values.put(\"site\", site);\n values.put(\"fecha\", fecha);\n String fh = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date());\n values.put(\"fechaHoraCreacion\", fh);\n values.put(\"sector\",spinnerSectorSeleccion);\n values.put(\"lugar\", lugar);\n values.put(\"accion\", accion);\n values.put(\"responsable\", responsable);\n values.put(\"vencimiento\", vencimiento);\n values.put(\"riesgo\",spinnerRiesgoSeleccion);\n values.put(\"estado\",estado );\n values.put(\"condicionInsegura\", condicionInsegura);\n values.put(\"usuarioCreacion\",usuario);\n values.put(\"imagenUAC\",imagen);\n values.put(\"Lider_recorrida\",Lider_recorrida);\n values.put(\"Participantes\",Participantes);\n values.put(\"Categoria\",Categoria);\n values.put(\"syncro\", 0);\n\n boolean resultado=BaseDeDatos.insert(\"uac\",null,values)>0;\n BaseDeDatos.close();\n return resultado;\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 }",
"public void guardarDatos() throws Exception {\n\t\ttry {\n\t\t\tFormularioUtil.setUpperCase(groupboxEditar);\n\t\t\tif (validarForm()) {\n\t\t\t\t// Cargamos los componentes //\n\n\t\t\t\tHisc_urgencia_odontologico hisc_urgencia_odontologico = getBean();\n\n\t\t\t\tMap<String, Object> datos = new HashMap<String, Object>();\n\t\t\t\tdatos.put(\"hisc_urgencia_odontologico\",\n\t\t\t\t\t\thisc_urgencia_odontologico);\n\t\t\t\t// datos.put(\"sigvitales\", mcSignosVitales.obtenerSigvitales());\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getValue());\n\t\t\t\tdatos.put(\"admision\", admision);\n\t\t\t\tdatos.put(\"datos_procedimiento\", getProcedimientos());\n\n\t\t\t\tImpresion_diagnostica impresion_diagnostica = macroImpresion_diagnostica\n\t\t\t\t\t\t.obtenerImpresionDiagnostica();\n\t\t\t\tdatos.put(\"impresion_diagnostica\", impresion_diagnostica);\n\n\t\t\t\tgetServiceLocator().getHisc_urgencia_odontologicoService()\n\t\t\t\t\t\t.guardarDatos(datos);\n\n\t\t\t\ttbxAccion.setValue(\"modificar\");\n\t\t\t\tinfoPacientes.setCodigo_historia(hisc_urgencia_odontologico\n\t\t\t\t\t\t.getCodigo_historia());\n\n\t\t\t\tactualizarRemision(admision, getInformacionClinica(), this);\n\t\t\t\tcargarServicios();\n\n\t\t\t\tMensajesUtil.mensajeInformacion(\"Informacion ..\",\n\t\t\t\t\t\t\"Los datos se guardaron satisfactoriamente\");\n\t\t\t}\n\n\t\t} catch (ImpresionDiagnosticaException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t} catch (Exception e) {\n\t\t\tif (!(e instanceof WrongValueException)) {\n\t\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t\t}\n\t\t}\n\t}",
"public String adicionarubicacion(ubicacion ubicacion) {\n String miRespuesta;\n Conexion miConexion = new Conexion();\n Connection nuevaCon;\n nuevaCon = miConexion.getConn();\n \n //sentecia \n PreparedStatement sentencia;\n //try-catch \n try {\n // consulta \n String Query = \"INSERT INTO ubicacion (Departamento,municipio)\"\n + \"VALUES (?,?)\";\n sentencia = nuevaCon.prepareStatement(Query);\n sentencia.setString(1,ubicacion.getDepartamento());\n sentencia.setString(2,ubicacion.getMunicipio());\n \n sentencia.execute();\n miRespuesta = \"\";\n } catch (Exception ex){\n miRespuesta = ex.getMessage();\n System.err.println(\"Ocurrio un problea en ubicacionDAO\\n \" + ex.getMessage());\n }\n \n return miRespuesta;\n }",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Trabajo newTrabajo = (Trabajo) data.getSerializableExtra(\"resultado\");\n\n if(newTrabajo.getId() != 0) { // Si NO es un Trabajo Nuevo Vacío, osea que no hayan Cancelado la operación\n Toast.makeText(getBaseContext(), \"Nuevo Trabajo: \" + newTrabajo.getDescripcion(), Toast.LENGTH_LONG).show();\n\n // Insertamos en la Categoría correspondiente el Nuevo Trabajo\n Categoria.CATEGORIAS_MOCK[newTrabajo.getCategoria().getId()].addTrabajo(newTrabajo);\n\n // Incorporamos a la \"listaTrabajos\" el Nuevo Trabajo\n this.listaTotalTrabajos();\n\n //Se notifica al adaptador de que el ArrayList que tiene asociado ha sufrido cambios (forzando asi a ir al metodo getView())\n adaptador.notifyDataSetChanged();\n }\n }",
"public FlujoDetalleDTO leerRegistro() {\n/* */ try {\n/* 82 */ FlujoDetalleDTO reg = new FlujoDetalleDTO();\n/* */ \n/* 84 */ reg.setCodigoFlujo(this.rs.getInt(\"codigo_flujo\"));\n/* 85 */ reg.setSecuencia(this.rs.getInt(\"secuencia\"));\n/* 86 */ reg.setServicioInicio(this.rs.getInt(\"servicio_inicio\"));\n/* 87 */ reg.setCodigoEstado(this.rs.getInt(\"codigo_estado\"));\n/* 88 */ reg.setServicioDestino(this.rs.getInt(\"servicio_destino\"));\n/* 89 */ reg.setNombreProcedimiento(this.rs.getString(\"nombre_procedimiento\"));\n/* 90 */ reg.setCorreoDestino(this.rs.getString(\"correo_destino\"));\n/* 91 */ reg.setEnviarSolicitud(this.rs.getString(\"enviar_solicitud\"));\n/* 92 */ reg.setMismoProveedor(this.rs.getString(\"ind_mismo_proveedor\"));\n/* 93 */ reg.setMismoCliente(this.rs.getString(\"ind_mismo_cliente\"));\n/* 94 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 95 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 96 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 97 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 98 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 99 */ reg.setNombreServicioInicio(this.rs.getString(\"nombre_servicio_inicio\"));\n/* 100 */ reg.setNombreCodigoEstado(this.rs.getString(\"nombre_codigo_estado\"));\n/* 101 */ reg.setNombreServicioDestino(this.rs.getString(\"nombre_servicio_destino\"));\n/* 102 */ reg.setNombreEstado(this.rs.getString(\"nombre_estado\"));\n/* 103 */ reg.setCaracteristica(this.rs.getInt(\"caracteristica\"));\n/* 104 */ reg.setCaracteristicaValor(this.rs.getInt(\"valor_caracteristica\"));\n/* 105 */ reg.setCaracteristicaCorreo(this.rs.getInt(\"caracteristica_correo\"));\n/* 106 */ reg.setNombreCaracteristica(this.rs.getString(\"nombre_caracteristica\"));\n/* 107 */ reg.setDescripcionValor(this.rs.getString(\"descripcion_valor\"));\n/* 108 */ reg.setMetodoSeleccionProveedor(this.rs.getString(\"metodo_seleccion_proveedor\"));\n/* 109 */ reg.setIndCorreoCliente(this.rs.getString(\"ind_correo_clientes\"));\n/* */ \n/* */ try {\n/* 112 */ reg.setEnviar_hermana(this.rs.getString(\"enviar_hermana\"));\n/* 113 */ reg.setEnviar_si_hermana_cerrada(this.rs.getString(\"enviar_si_hermana_cerrada\"));\n/* 114 */ reg.setInd_cliente_inicial(this.rs.getString(\"ind_cliente_inicial\"));\n/* */ \n/* */ \n/* */ }\n/* 118 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 122 */ return reg;\n/* */ }\n/* 124 */ catch (Exception e) {\n/* 125 */ e.printStackTrace();\n/* 126 */ Utilidades.writeError(\"FlujoDetalleDAO:leerRegistro \", e);\n/* */ \n/* 128 */ return null;\n/* */ } \n/* */ }",
"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 }",
"private void controladorAtras(Controlador controlador){\n this.contAtras = controlador.getAtras();\n registro.setControlAtras(contAtras);\n login.setControlAtras(contAtras);\n }",
"public void guardarCV(String nombre, String Apellido,String dni,String mail,String cur ,File ruta,String mensaje){\r\n Alumnos alu=new Alumnos();\r\n alu.setNombre(nombre);\r\n alu.setApellido(Apellido);\r\n alu.setDni(dni);\r\n alu.setMail(mail);\r\n alu.setMensaje(mensaje);\r\n alu.setNom_archivo(cur);\r\n\r\n\r\n\r\n try{ //convierte el archivo pdf a bytes\r\n byte[] pdf= new byte[(int) ruta.length()];\r\n InputStream input= new FileInputStream(ruta);\r\n input.read(pdf);\r\n alu.setArchivo_cv(pdf);\r\n\r\n }catch(IOException e){\r\n alu.setArchivo_cv(null);\r\n }\r\n alu.insertarCV(alu);\r\n }",
"public void grabarConcepto(){\r\n try {\r\n Conexion conexion = new Conexion();\r\n String query = \"insert into concepto (descripcion, tipoConcepto, porcentaje, monto, fijo) values (?,?,?,?,?);\";\r\n PreparedStatement st = conexion.getConnection().prepareStatement(query);\r\n st.setString(1, this.getDescripcion());\r\n st.setString(2, this.getTipoConcepto());\r\n st.setDouble(3, this.getPorcentaje());\r\n st.setDouble(4, this.getMonto());\r\n st.setString(5, this.getFijo());\r\n st.execute();\r\n System.out.println(\"SE GRABO EL CONCEPTO EN LA BASE DE DATOS\");\r\n st.close();\r\n conexion.desconectar();\r\n } catch (SQLException ex) {\r\n System.err.println(ex.getMessage());\r\n }\r\n }",
"int insert(TCar record);",
"Lancamento persistir(Lancamento lancamento);",
"public void guardar() {\n try {\n objConec.conectar();\n objConec.Sql = objConec.con.prepareStatement(\"insert into contacto values(null,?,?,?,?,?)\");\n objConec.Sql.setString(1, getNom_con());\n objConec.Sql.setInt(2, getTel_con()); \n objConec.Sql.setString(3, getEma_con());\n objConec.Sql.setString(4, getAsu_con());\n objConec.Sql.setString(5, getMen_con());\n objConec.Sql.executeUpdate();\n objConec.cerrar();\n JOptionPane.showMessageDialog(null, \"Mensaje enviado correctamente\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Error al enviar el mensaje\");\n\n }\n\n }",
"private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }",
"public void save() {\n super.storageSave(listPedidosAssistencia.toArray());\n }",
"public EncabezadoRespuesta entradaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\t\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t\t\t//Mandamos a log el objeto de entrada\n\t\t\t\tLogHandler.debug(uid, this.getClass(), \"entradaAsistencia - Datos Entrada: \" + asistencia);\n\t\t\t\t//Variable de resultado\n\t\t\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\t try {\n\t\t \tif (asistencia.getIdEmpleado() == null) {\n\t\t \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n\t\t \t}\n\t\t \tif (asistencia.getUsuarioAlta() == null || asistencia.getUsuarioAlta().trim().isEmpty()) {\n\t\t \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario.\");\n\t\t \t}\n\t\t \tAsistenciaDAO dao = new AsistenciaDAO();\n\t\t \trespuesta = dao.entradaAsistencia(uid, asistencia);\n\n\t\t } catch (ExcepcionesCuadrillas ex) {\n\t\t\t\t\tLogHandler.error(uid, this.getClass(), \"entradaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\t\t\trespuesta.setUid(uid);\n\t\t\t\t\trespuesta.setEstatus(false);\n\t\t\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {\n\t\t\t\t\tLogHandler.error(uid, this.getClass(), \"entradaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\t\t\trespuesta.setUid(uid);\n\t\t\t\t\trespuesta.setEstatus(false);\n\t\t\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t\t\t}\n\t\t\t\tLogHandler.debug(uid, this.getClass(), \"entradaAsistencia - Datos Salida: \" + respuesta);\n\t\t\t\treturn respuesta;\n\t}",
"@Override\r\n public Assunto persistir(Assunto assunto) {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n em.getTransaction().begin();\r\n try {\r\n assunto = em.merge(assunto);\r\n em.getTransaction().commit();\r\n System.out.println(\"Registro Assunto gravado com sucesso\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return assunto;\r\n }",
"public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}",
"public void guardarEntrada(HashMap<String, Object> diccionario_datos){\n File file = new File(fichero_database);\n FileWriter writer = null;\n if(file.exists()){\n try{\n writer = new FileWriter(file, true);\n //crea un buffer o flujo intermedio antes de escribir directamente en el archivo\n BufferedWriter bfwriter = new BufferedWriter(writer);\n Iterator it = diccionario_datos.entrySet().iterator();\n while (it.hasNext()) {\n HashMap.Entry pair = (HashMap.Entry)it.next();\n bfwriter.write(pair.getKey() + \",\" );\n it.remove(); // para evitar ConcurrentModificationException\n }\n bfwriter.write(\"\\n\" );\n bfwriter.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (writer != null) {\n try {//cierra el flujo principal\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n }",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"public ArrayList<Mascota> obtenerDatos(){\n\n BaseDatos db = new BaseDatos(context);\n\n ArrayList<Mascota> aux = db.obtenerTodoslosContactos();\n\n if(aux.size()==0){\n insertarMascotas(db);\n aux = db.obtenerTodoslosContactos();\n }\n\n return aux;\n }",
"public void asociar(){\n abrirEntAntMaest();\n try{\n while(true){\n CuentaSerializada cuenta =\n (CuentaSerializada) entAntMaest.readObject();\n \n abrirEntTransaccion();\n empatarCuentaTransaccion(cuenta);\n cerrarEntTransaccion();\n agregarASalNuevoMaest(cuenta);\n }\n }\n catch(EOFException eOFException){\n System.out.printf(\"%nNo hay mas registros%n\");\n }\n catch(ClassNotFoundException classNotFoundException){\n System.err.println(\"Tipo de objeto invalido. Terminado.\");\n }\n catch(IOException iOException){\n System.err.println(\"Error al leer del archivo. Terminado.\");\n }\n }",
"@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 }",
"ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);",
"int insert(Movimiento record);",
"public String agregarCuenta(Cuenta cuenta) {\n String mensaje = \"\";\n try {\n PreparedStatement PrSt;\n String Query = \"INSERT INTO Cuenta VALUES(?,?,?,?)\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, cuenta.getCodigo());\n PrSt.setDate(2, cuenta.getCreacion());\n PrSt.setDouble(3, cuenta.getCredito());\n PrSt.setString(4, cuenta.getCodigo_cliente());\n int resultado = PrSt.executeUpdate();\n if (resultado > 0) {\n mensaje = \"Agregada Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente();\n } else {\n mensaje = \"Fallo al agregar Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente();\n }\n PrSt.close();\n } catch (SQLException e) {\n mensaje = \"Fallo al agregar Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente() + \" Error: \" + e.toString();\n }\n return mensaje;\n }",
"@Override\r\n\tprotected void process() {\n\t\tconsultarSustentoProxy.setCodigoActvidad(codigo_actividad);\r\n\t\tconsultarSustentoProxy.setCodigoCliente(codigo_cliente);\r\n\t\tconsultarSustentoProxy.setCodigoPLan(codigo_plan);\r\n\t\tconsultarSustentoProxy.execute();\r\n\t}",
"public void llenarDatosTransaccion(TransactionEntity entity, int indiceLayoutHose){\n //**********************************************************\n int contador = 0;\n Log.v(\"INICIO\",\"**********************************************************\");\n\n Log.v(\"Bomba\",String.valueOf(entity.getIdBomba()));\n //**********************************************************\n //EstadoActual\n int[] tramaEstadoActual = new int[1];\n contador = 0;\n for(int i = 8; i<= 8; i++){\n tramaEstadoActual[contador] = bufferRecepcion[i];\n contador++;\n }\n //String estadoActual = byteArrayToHexString(tramaEstadoActual,tramaEstadoActual.length);\n int estadoActual = Integer.parseInt(byteArrayToHexIntGeneral(tramaEstadoActual,1));\n entity.setEstadoActual(estadoActual);\n\n Log.v(\"Estado\",String.valueOf(entity.getEstadoActual()));\n cambioEstado(indiceLayoutHose, estadoActual);\n\n //**********************************************************\n //Capturar Nro Transaccion\n int[] tramaNroTransaccion = new int[3];\n contador = 0;\n for(int i = 9; i<= 11; i++){\n tramaNroTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n String nroTransaccion = \"\" + byteArrayToHexInt(tramaNroTransaccion,tramaNroTransaccion.length);\n entity.setNumeroTransaccion(nroTransaccion);\n Log.v(\"Nro. Transacción\",entity.getNumeroTransaccion());\n\n //**********************************************************\n //Capturar Fecha Inicio\n int[] tramaFechaInicio = new int[1];\n tramaFechaInicio[0] = bufferRecepcion[12];\n String dia = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[13];\n String mes = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[14];\n String anio = \"20\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[17];\n String hora = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[16];\n String minuto = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[15];\n String segundo = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n\n String fechaInicio = dia + \"-\" + mes + \"-\" + anio + \"\";\n String horaInicio = hora + \":\" + minuto + \":\" + segundo;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaInicio(fechaInicio);\n entity.setHoraInicio(horaInicio);\n Log.v(\"Fecha Inicio\",entity.getFechaInicio());\n Log.v(\"Hora Inicio\",entity.getHoraInicio());\n\n //**********************************************************\n //Capturar Turno\n int[] tramaTurno = new int[2];\n contador = 0;\n for(int i = 18; i<= 19; i++){\n tramaTurno[contador] = bufferRecepcion[i];\n contador++;\n }\n int turno = byteArrayToHexInt2(tramaTurno,tramaTurno.length);\n entity.setTurno(turno);\n Log.v(\"Turno\",\"\"+entity.getTurno());\n\n //**********************************************************\n //Numero de Tanque\n int[] tramaNumeroTanque = new int[1];\n contador = 0;\n for(int i = 21; i<= 21; i++){\n tramaNumeroTanque[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int numeroTanque = Integer.parseInt(byteArrayToHexIntGeneral(tramaNumeroTanque,1));\n entity.setNumeroTanque(numeroTanque);\n\n Log.v(\"Tanque\",\"\"+entity.getNumeroTanque());\n\n //**********************************************************\n //Tipo de Vehiculo\n int[] tramaTipoVehiculo = new int[1];\n contador = 0;\n for(int i = 22; i<= 22; i++){\n tramaTipoVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoVehiculo = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoVehiculo,1));\n entity.setTipoVehiculo(tipoVehiculo);\n\n Log.v(\"Tipo Vehiculo\",\"\"+entity.getTipoVehiculo());\n\n\n //**********************************************************\n //Capturar IdVehiculo\n int[] tramaIdVehiculo = new int[8];\n contador = 0;\n for(int i = 23; i<= 30; i++){\n tramaIdVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdVehiculo = hexToAscii(byteArrayToHexString(tramaIdVehiculo,tramaIdVehiculo.length));\n entity.setIdVehiculo(IdVehiculo);\n\n Log.v(\"IdVehiculo\",entity.getIdVehiculo());\n\n //**********************************************************\n //Capturar Placa\n int[] tramaPlaca = new int[10];\n contador = 0;\n for(int i = 31; i<= 40; i++){\n tramaPlaca[contador] = bufferRecepcion[i];\n contador++;\n }\n String placa = hexToAscii(byteArrayToHexString(tramaPlaca,tramaPlaca.length));\n entity.setPlaca(placa);\n\n Log.v(\"Placa\",entity.getPlaca());\n\n //**********************************************************\n //Capturar Kilometro\n\n int[] tramaKilometroParteEntera = new int[3];\n contador = 0;\n for(int i = 41; i<= 43; i++){\n tramaKilometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteEntera = byteArrayToHexInt(tramaKilometroParteEntera,tramaKilometroParteEntera.length);\n\n int[] tramaKilometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 44; i<= 44; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n\n //double kilometro = kilometroParteEntera + kilometroParteDecimal*0.1;\n double kilometro = Double.valueOf(kilometroParteEntera + \".\"+kilometroParteDecimal);\n entity.setKilometraje(\"\"+kilometro);\n\n Log.v(\"Kilometro\",\"\"+kilometro);\n\n //**********************************************************\n //Capturar Horometro\n\n int[] tramaHorometroParteEntera = new int[3];\n contador = 0;\n for(int i = 45; i<= 47; i++){\n tramaHorometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int horometroParteEntera = byteArrayToHexInt(tramaHorometroParteEntera,tramaHorometroParteEntera.length);\n\n int[] tramaHorometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 48; i<= 48; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n\n double horometro = 0.0;\n\n if(tramaHorometroParteDecimal[0]==255){\n horometro = horometroParteEntera/10D;\n }else{\n int horometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n //horometro = horometroParteEntera + horometroParteDecimal*0.1;\n horometro = Double.valueOf(horometroParteEntera + \".\"+horometroParteDecimal);\n }\n\n entity.setHorometro(\"\"+horometro);\n\n Log.v(\"Horometro\",\"\"+horometro);\n\n //**********************************************************\n //Capturar IdConductor\n int[] tramaIdConductor = new int[8];\n contador = 0;\n for(int i = 49; i<= 56; i++){\n tramaIdConductor[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdConductor = hexToAscii(byteArrayToHexString(tramaIdConductor,tramaIdConductor.length));\n entity.setIdConductor(IdConductor);\n\n Log.v(\"IdConductor\",entity.getIdConductor());\n\n //**********************************************************\n //Capturar IdOperador\n int[] tramaIdOperador = new int[8];\n contador = 0;\n for(int i = 57; i<= 64; i++){\n tramaIdOperador[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdOperador = hexToAscii(byteArrayToHexString(tramaIdOperador,tramaIdOperador.length));\n entity.setIdOperador(IdOperador);\n\n Log.v(\"IdOperador\",entity.getIdOperador());\n\n //**********************************************************\n //Tipo de Transacción\n int[] tramaTipoTransaccion = new int[1];\n contador = 0;\n for(int i = 65; i<= 65; i++){\n tramaTipoTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTransaccion = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTransaccion,1));\n entity.setTipoTransaccion(tipoTransaccion);\n\n Log.v(\"Tipo Transacción\",\"\"+entity.getTipoTransaccion());\n\n //**********************************************************\n //Capturar Latitud\n int[] tramaLatitud = new int[12];\n contador = 0;\n for(int i = 66; i<= 77; i++){\n tramaLatitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String latitud = hexToAscii(byteArrayToHexString(tramaLatitud,tramaLatitud.length));\n entity.setLatitud(latitud);\n\n Log.v(\"Latitud\",entity.getLatitud());\n\n //**********************************************************\n //Capturar Longitud\n int[] tramaLongitud = new int[12];\n contador = 0;\n for(int i = 78; i<= 89; i++){\n tramaLongitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String longitud = hexToAscii(byteArrayToHexString(tramaLongitud,tramaLongitud.length));\n entity.setLongitud(longitud);\n\n Log.v(\"Longitud\",entity.getLongitud());\n\n //**********************************************************\n //Capturar Tipo Error Pre-Seteo\n int[] tramaTipoErrorPreseteo = new int[1];\n contador = 0;\n for(int i = 90; i<= 90; i++){\n tramaTipoErrorPreseteo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoErrorPreseteo= Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoErrorPreseteo,1));\n entity.setTipoErrorPreseteo(tipoErrorPreseteo);\n\n Log.v(\"Tipo Error Preseteo\",\"\"+entity.getTipoErrorPreseteo());\n\n //**********************************************************\n //Capturar Volumen Autorizado\n int[] tramaVolumenAutorizado = new int[2];\n contador = 0;\n for(int i = 91; i<= 92; i++){\n tramaVolumenAutorizado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAutorizado = byteArrayToHexInt2(tramaVolumenAutorizado,tramaVolumenAutorizado.length);\n entity.setVolumenAutorizado(volumenAutorizado);\n Log.v(\"Volumen Autorizado\",\"\"+entity.getVolumenAutorizado());\n\n //**********************************************************\n //Capturar Volumen Aceptado\n int[] tramaVolumenAceptado = new int[2];\n contador = 0;\n for(int i = 93; i<= 94; i++){\n tramaVolumenAceptado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAceptado = byteArrayToHexInt2(tramaVolumenAceptado,tramaVolumenAceptado.length);\n entity.setVolumenAceptado(volumenAceptado);\n Log.v(\"Volumen Aceptado\",\"\"+entity.getVolumenAceptado());\n\n //**********************************************************\n //Capturar Código Cliente\n int[] tramaCodigoCliente = new int[2];\n contador = 0;\n for(int i = 100; i<= 101; i++){\n tramaCodigoCliente[contador] = bufferRecepcion[i];\n contador++;\n }\n int codigoCliente = byteArrayToHexInt2(tramaCodigoCliente,tramaCodigoCliente.length);\n entity.setCodigoCliente(codigoCliente);\n Log.v(\"Codigo Cliente\",\"\"+entity.getCodigoCliente());\n\n //**********************************************************\n //Capturar codigo area\n int[] tramaCodigoArea = new int[1];\n contador = 0;\n for(int i = 102; i<= 102; i++){\n tramaCodigoArea[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int CodigoArea = Integer.parseInt(byteArrayToHexIntGeneral(tramaCodigoArea,1));\n entity.setCodigoArea(CodigoArea);\n\n Log.v(\"Codigo Area\",\"\"+entity.getCodigoArea());\n\n //**********************************************************\n //Capturar tipo TAG\n int[] tramaTipoTAG = new int[1];\n contador = 0;\n for(int i = 103; i<= 103; i++){\n tramaTipoTAG[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTAG = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTAG,1));\n entity.setTipoTag(tipoTAG);\n\n Log.v(\"Tipo TAG\",\"\"+entity.getTipoTag());\n\n //**********************************************************\n //Capturar Volumen Abastecido\n int[] tramaVolumen = new int[9];\n contador = 0;\n for(int i = 104; i<= 112; i++){\n tramaVolumen[contador] = bufferRecepcion[i];\n contador++;\n }\n String volumen = \"\"+ hexToAscii(byteArrayToHexString(tramaVolumen,tramaVolumen.length));\n String[] parts = volumen.split(\"\\\\.\");\n if(parts.length > 1) {\n volumen = parts[0] + \".\" + parts[1].substring(0,(0+entity.getCantidadDecimales()));\n }\n\n entity.setVolumen(volumen);\n\n Log.v(\"Volumen Abastecido\",entity.getVolumen());\n\n //**********************************************************\n //Capturar Temperatura\n int[] tramaTemperatura = new int[5];\n contador = 0;\n for(int i = 113; i<= 117; i++){\n tramaTemperatura[contador] = bufferRecepcion[i];\n contador++;\n }\n String temperatura = \"\" + hexToAscii(byteArrayToHexString(tramaTemperatura,tramaTemperatura.length));\n temperatura = temperatura.substring(0,temperatura.length()-1);\n entity.setTemperatura(temperatura);\n\n Log.v(\"Temperatura\",entity.getTemperatura());\n\n //**********************************************************\n //Capturar Fecha Fin\n int[] tramaFechaFin = new int[1];\n tramaFechaFin[0] = bufferRecepcion[118];\n String diaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[119];\n String mesFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[120];\n String anioFin = \"20\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[123];\n String horaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[122];\n String minutoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[121];\n String segundoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n\n String fechaFin = diaFin + \"-\" + mesFin + \"-\" + anioFin + \"\" ;\n String horaFin1 = horaFin + \":\" + minutoFin + \":\" + segundoFin;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaFin(fechaFin);\n entity.setHoraFin(horaFin1);\n\n Log.v(\"Fecha Fin\",entity.getFechaFin());\n Log.v(\"Hora Fin\",entity.getHoraFin());\n\n //**********************************************************\n //Capturar Tipo de Cierre\n int[] tramaTipoCierre = new int[1];\n contador = 0;\n for(int i = 124; i<= 124; i++){\n tramaTipoCierre[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoCierre = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoCierre,1));\n entity.setTipoCierre(tipoCierre);\n\n Log.v(\"Tipo Cierre\",\"\"+entity.getTipoCierre());\n\n txt_galones = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_galones);\n txt_ultimo_ticket = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket);\n txt_placa = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_placa);\n txt_producto = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_producto);\n txt_ultimo_galon_p2 = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_galon_p2);\n txt_ultimo_ticket_p2= layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket_p2);\n\n txt_producto.setText(entity.getNombreProducto());\n txt_placa.setText(entity.getPlaca());\n txt_galones.setText(entity.getVolumen());\n txt_ultimo_galon_p2.setText(entity.getVolumen());\n txt_ultimo_ticket.setText(entity.getNumeroTransaccion());\n txt_ultimo_ticket_p2.setText(entity.getNumeroTransaccion());\n\n\n guardarTransaccionBD(entity);\n\n }",
"private byte[] processData(String peticion) {\n\t\t\n\t\tString respuesta = \"\";\n\t\t\n\t\tswitch (peticion) {\n\t\t\t\n\t\t\tcase \"noticias\": respuesta = \"¡Por fin la vacuna ya está en España!\"; break;\n\t\t\tcase \"hora\": respuesta = getFecha(); break;\n\t\t\tcase \"aleatorio\": respuesta = Double. toString(Math.random()*10); break;\n\t\t\tcase \"cerrar\": respuesta = \"Adios\"; break;\n\t\t\tcase \"cerrarServidor\": respuesta = \"Adios\"; break;\t\t\t\n\t\t\tdefault: respuesta = \"petición desconocida\";\n\t\t}\n\t\t\n\t\treturn respuesta.getBytes();\n\t}",
"public boolean Actualizar(String Usuario, String NombreMaterial, String Fecha, Integer NCampo, String NuevoCampo) throws IOException\n {\n System.out.println(\"Ëntro\");\n List<String> ListaLineaEliminar = BuscarIndice(Usuario, NombreMaterial, Fecha);\n if(ListaLineaEliminar.get(0) == \"404\"){ return false; }\n else{\n String LineaEliminar = ListaLineaEliminar.get(0);\n System.out.println(LineaEliminar);\n String[] Campos = LineaEliminar.split(\"\\\\|\");\n String NMaestro = Campos[1].substring(0,1);\n Integer NMaestroLinea = Integer.parseInt(Campos[1].substring(2,3));\n String L = ObtenerLinea(NMaestroLinea, \"C:\\\\MEIA\\\\Donaciones_\" + NMaestro + \".txt\");\n String[] CamposL = L.split(\"\\\\|\");\n Boolean Existe = Eliminar(Usuario, NombreMaterial, Fecha);\n System.out.println(Usuario);\n System.out.println(NombreMaterial);\n System.out.println(Fecha);\n if(NCampo == 0){\n Insertar(NuevoCampo, CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 1){\n Insertar(CamposL[0], CamposL[2], NuevoCampo, Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 2){\n Insertar(CamposL[0], NuevoCampo, CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 3){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(NuevoCampo), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 4){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), NuevoCampo, CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 5){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], NuevoCampo, CamposL[6]);\n return true;\n }\n else if(NCampo == 6){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], NuevoCampo);\n return true;\n }\n else{ return false; }\n }\n }",
"private void EnviarDatos(String user, String fecha, String pasos){\n\r\n HttpClient httpclient = new DefaultHttpClient();\r\n //Utilizamos la HttpPost para enviar lso datos\r\n //A la url donde se encuentre nuestro archivo receptor\r\n\r\n\r\n\r\n\r\n HttpPost httppost2 = new HttpPost(\"http://mets.itisol.com.mx/paciente/insertaActividad\");\r\n try {\r\n //Añadimos los datos a enviar en este caso solo uno\r\n //que le llamamos de nombre 'a'\r\n //La segunda linea podría repetirse tantas veces como queramos\r\n //siempre cambiando el nombre ('a')\r\n List<NameValuePair> postValues = new ArrayList<NameValuePair>(2);\r\n postValues.add(new BasicNameValuePair(\"usuario\", user));\r\n\r\n postValues.add(new BasicNameValuePair(\"fecha\", fecha));\r\n Log.d(\"la fecha es\", \"\" + cambiaFecha(fecha));\r\n postValues.add(new BasicNameValuePair(\"pasos\", pasos));\r\n\r\n // postValues.add(new BasicNameValuePair(\"tipo\", \"1\"));\r\n\r\n //Encapsulamos\r\n httppost2.setEntity(new UrlEncodedFormEntity(postValues));\r\n //Lanzamos la petición\r\n HttpResponse respuesta2 = httpclient.execute(httppost2);\r\n //Conectamos para recibir datos de respuesta\r\n HttpEntity entity2 = respuesta2.getEntity();\r\n //Creamos el InputStream como su propio nombre indica\r\n InputStream is2 = entity2.getContent();\r\n //Limpiamos el codigo obtenido atraves de la funcion\r\n //StreamToString explicada más abajo\r\n String resultado2= StreamToString(is2);\r\n\r\n //Enviamos el resultado LIMPIO al Handler para mostrarlo\r\n Message sms2 = new Message();\r\n sms2.obj = resultado2;\r\n\r\n puente.sendMessage(sms2);\r\n }catch (IOException e) {\r\n //TODO Auto-generated catch block\r\n }\r\n\r\n }",
"int insert(ParUsuarios record);",
"public static void guardarEstudianteBD(Estudiante estudiante) {\r\n //metimos este metodo dentro de la base de datos \r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n //ingresamos la direccion donde se encuntra la base de datos \r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.println(\"Conexion establecida!\");\r\n Statement sentencia = (Statement) conexion.createStatement();\r\n int insert = sentencia.executeUpdate(\"insert into estudiante values(\"\r\n + \"'\" + estudiante.getNro_de_ID()\r\n + \"','\" + estudiante.getNombres()\r\n + \"','\" + estudiante.getApellidos()\r\n + \"','\" + estudiante.getLaboratorio()\r\n + \"','\" + estudiante.getCarrera()\r\n + \"','\" + estudiante.getModulo()\r\n + \"','\" + estudiante.getMateria()\r\n + \"','\" + estudiante.getFecha()\r\n + \"','\" + estudiante.getHora_Ingreso()\r\n + \"','\" + estudiante.getHora_Salida()\r\n + \"')\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.println(\"Error en la conexion\" + ex);\r\n }\r\n }",
"private void limpiarDatos() {\n\t\t\n\t}",
"private void getTempRojoBhcs(){\n mTempRojoBhcs = estudioAdapter.getListaTempRojoBhcSinEnviar();\n //ca.close();\n }",
"public void guardarDatos() throws Exception {\r\n try {\r\n FormularioUtil.setUpperCase(groupboxEditar);\r\n if (validarForm()) {\r\n\r\n Admision admision = ((Admision) lbxNro_ingreso\r\n .getSelectedItem().getValue());\r\n\r\n Hospitalizacion hospitalizacion = new Hospitalizacion();\r\n hospitalizacion.setCodigo_empresa(empresa.getCodigo_empresa());\r\n hospitalizacion.setCodigo_sucursal(sucursal\r\n .getCodigo_sucursal());\r\n hospitalizacion.setNro_factura(tbxNro_factura.getValue());\r\n hospitalizacion = getServiceLocator()\r\n .getHospitalizacionService().consultar(hospitalizacion);\r\n if (hospitalizacion == null) {\r\n hospitalizacion = new Hospitalizacion();\r\n hospitalizacion.setCodigo_empresa(empresa\r\n .getCodigo_empresa());\r\n hospitalizacion.setCodigo_sucursal(sucursal\r\n .getCodigo_sucursal());\r\n hospitalizacion.setNro_factura(tbxNro_factura.getValue());\r\n }\r\n hospitalizacion.setTipo_identificacion((String) datos_seleccion\r\n .get(\"tipo_identificacion\"));\r\n hospitalizacion.setNro_identificacion(tbxNro_identificacion\r\n .getValue());\r\n hospitalizacion\r\n .setCodigo_administradora((String) datos_seleccion\r\n .get(\"codigo_administradora\"));\r\n hospitalizacion.setId_plan((String) datos_seleccion\r\n .get(\"id_plan\"));\r\n hospitalizacion.setNro_ingreso(admision.getNro_ingreso());\r\n hospitalizacion.setCodigo_prestador(tbxCodigo_prestador\r\n .getValue());\r\n hospitalizacion.setVia_ingreso(lbxVia_ingreso.getSelectedItem()\r\n .getValue().toString());\r\n hospitalizacion.setFecha_ingreso(new Timestamp(\r\n dtbxFecha_ingreso.getValue().getTime()));\r\n hospitalizacion.setNumero_autorizacion(tbxNumero_autorizacion\r\n .getValue());\r\n hospitalizacion.setCausa_externa((String) lbxCausa_externa\r\n .getSelectedItem().getValue().toString());\r\n hospitalizacion.setEstado_salida((String) lbxEstado_salida\r\n .getSelectedItem().getValue().toString());\r\n hospitalizacion.setFecha_egreso(new Timestamp(dtbxFecha_egreso\r\n .getValue().getTime()));\r\n hospitalizacion\r\n .setCodigo_diagnostico_principal(tbxCodigo_diagnostico_principal\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico1(tbxCodigo_diagnostico1\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico2(tbxCodigo_diagnostico2\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico3(tbxCodigo_diagnostico3\r\n .getValue());\r\n hospitalizacion.setComplicacion(tbxComplicacion.getValue());\r\n hospitalizacion.setCausa_muerte(tbxCausa_muerte.getValue());\r\n\r\n hospitalizacion.setCreacion_date(new Timestamp(\r\n new GregorianCalendar().getTimeInMillis()));\r\n hospitalizacion.setUltimo_update(new Timestamp(\r\n new GregorianCalendar().getTimeInMillis()));\r\n hospitalizacion.setCreacion_user(usuarios.getCodigo()\r\n .toString());\r\n hospitalizacion.setUltimo_user(usuarios.getCodigo().toString());\r\n\r\n String complemento = \"\";\r\n\r\n if (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n getServiceLocator().getHospitalizacionService().crear(\r\n hospitalizacion);\r\n if (FACTURACION_RIPS != null) {\r\n this.detach();\r\n } else {\r\n accionForm(true, \"registrar\");\r\n }\r\n } else {\r\n int result = getServiceLocator()\r\n .getHospitalizacionService().actualizar(\r\n hospitalizacion);\r\n if (result == 0) {\r\n throw new Exception(\r\n \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\");\r\n }\r\n }\r\n\r\n if (ionGuardar != null) {\r\n ionGuardar.guardar();\r\n } else {\r\n Messagebox.show(\r\n \"Los datos se guardaron satisfactoriamente.\"\r\n + complemento, \"Informacion? ..\",\r\n Messagebox.OK, Messagebox.INFORMATION);\r\n tbxNro_factura.setValue(hospitalizacion.getNro_factura());\r\n tbxAccion.setValue(\"modificar\");\r\n }\r\n\r\n if (this.getParent() instanceof Facturacion_ripsAction) {\r\n this.detach();\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n MensajesUtil.mensajeError(e, \"\", this);\r\n }\r\n }",
"private void saveEncLactancias(String estado) {\n int c = mLactanciasMaternas.size();\n for (LactanciaMaterna enclactancia : mLactanciasMaternas) {\n enclactancia.getMovilInfo().setEstado(estado);\n estudioAdapter.updateLacMatSent(enclactancia);\n publishProgress(\"Actualizando encuestas lactancia\", Integer.valueOf(mLactanciasMaternas.indexOf(enclactancia)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public void recargarDatos( ) {\n\t\tPAC_SHWEB_PROVEEDORES llamadaProv = null;\n\t\ttry {\n\t\t\tllamadaProv = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaCom = null;\n\n\t\ttry {\n\t\t\trespuestaCom = llamadaProv.ejecutaPAC_SHWEB_PROVEEDORES__F_COMUNICADOS_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t// Mostramos el estado del expediente\n\t\tPAC_SHWEB_PROVEEDORES llamada = null;\n\t\ttry {\n\t\t\tllamada = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuesta = null;\n\t\ttry {\n\t\t\trespuesta = llamada.ejecutaPAC_SHWEB_PROVEEDORES__F_ESTADO_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t\tMap<String, Object> retorno = new HashMap<String, Object>(respuesta);\n\n\t\t\tUI.getCurrent().getSession().setAttribute(\"estadoExpediente\",retorno.get(\"ESTADO\").toString());\n\t\t\t\n\t\t\tprovPantallaConsultaExpedienteInicial.setCaption(\"GESTIÓN DEL EXPEDIENTE Nº \" + UI.getCurrent().getSession().getAttribute(\"expediente\")\n\t\t\t\t\t+ \" ( \" + \n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\") + \" ) \");\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\t\n\t\t\n\t\t// Maestro comunicados\n\n\t\tWS_AMA llamadaAMA = null;\n\t\ttry {\n\t\t\tllamadaAMA = new WS_AMA(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaMaestro = null;\n\t\t\n\t\t//System.out.println(\"Llamammos maestro comunicados: \" + UI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1));;\n\t\ttry {\n\t\t\t// pPUSUARIO, pORIGEN, pTPCOMUNI, pTPUSUARIO, pESTADO)\n\t\t\t\n\t\t\trespuestaMaestro = llamadaAMA.ejecutaWS_AMA__MAESTRO_COMUNICADOS(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnull,\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\").toString()\n\t\t\t\t\t);\t\t\t\n\n\t\t\t\n\t\t\tMap<String, Object> retornoMaestro = new HashMap<String, Object>(respuestaMaestro);\n\t\t\tList<Map> valorMaestro = (List<Map>) retornoMaestro.get(\"COMUNICADOS\");\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",valorMaestro);\n\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",null);\n\t\t}\n\t\t\n\t\t// \t\n\t\t\n\t\t\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\t\t/*if ( !ValidarComunicado.EsValido(\"CA\") && !ValidarComunicado.EsValido(\"FT\") ) {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(true);\n\n\t\t\t\n\t\t\t\n\t\t}*/\n\t\t// Mostramos botonera de cerrar expediente\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\n\t}",
"@Override\n public Call<ResponseBody> registarMoviemientoEmpleado(@Body RootMovimiento movimiento) {\n movimiento.setId_dispositivo(Settings.Secure.getString(this.context.getContentResolver(), Settings.Secure.ANDROID_ID));\n return this.serviceInterface.registarMoviemientoEmpleado(movimiento);\n }",
"@Override\r\n\tprotected String requestText() {\n\t\tGuardarVtaCeroMotivoRequest guardarVtaCeroMotivoRequest = new GuardarVtaCeroMotivoRequest();\r\n\t\tguardarVtaCeroMotivoRequest.setAnio(Anio);\r\n\t\tguardarVtaCeroMotivoRequest.setCodCliente(codCliente);\r\n\t\tguardarVtaCeroMotivoRequest.setCodDeposito(codDeposito);\r\n\t\tguardarVtaCeroMotivoRequest.setMes(Mes);\r\n\t\tguardarVtaCeroMotivoRequest.setMotivo(Motivo);\r\n\t\tguardarVtaCeroMotivoRequest.setObservacion(observacion);\r\n\t\tguardarVtaCeroMotivoRequest.setSemana(Semana);\r\n\t\tguardarVtaCeroMotivoRequest.setUsuario(Usuario);\r\n\t\tString request = JSONHelper.serializar(guardarVtaCeroMotivoRequest);\r\n\t\treturn request;\r\n\t}",
"public String guardar()\r\n/* 104: */ {\r\n/* 105: */ try\r\n/* 106: */ {\r\n/* 107:132 */ this.servicioDimensionContable.guardar(this.dimensionContable);\r\n/* 108:133 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 109:134 */ setEditado(false);\r\n/* 110:135 */ cargarDatos();\r\n/* 111: */ }\r\n/* 112: */ catch (Exception e)\r\n/* 113: */ {\r\n/* 114:137 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 115:138 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 116: */ }\r\n/* 117:140 */ return \"\";\r\n/* 118: */ }",
"public String cambiarEstado() {\n\t\ttry {\n\t\t\tMensaje.crearMensajeINFO(managergest.cambioEstadoItem(getOfertadelsita().getOferId()));\n\t\t\tgetListaOferta().clear();\n\t\t\tgetListaOferta().addAll(managergest.findAllofertasOrdenadas());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"\";\n\t}",
"@Override\r\n\tprotected String requestText() {\n\t\tGuardarSustentoRequest guardarSustentoRequest = new GuardarSustentoRequest();\r\n\t\tguardarSustentoRequest.setCodigoActvidad(codigoActvidad);\r\n\t\tguardarSustentoRequest.setCodigoCliente(codigoCliente);\r\n\t\tguardarSustentoRequest.setCodigoPLan(codigoPLan);\r\n\t\tguardarSustentoRequest.setDescripcionActividad(descripcionActividad);\r\n\t\tguardarSustentoRequest.setFechaVisita(fechaVisita);\r\n\t\tguardarSustentoRequest.setTipoActividad(tipoActividad);\r\n\t\tguardarSustentoRequest.setUsuario(usuario);\r\n\t\tString request = JSONHelper.serializar(guardarSustentoRequest);\r\n\t\treturn request;\r\n\t}",
"private void agregarASalNuevoMaest(CuentaSerializada cuenta){\n try{\n salNuevoMaest.writeObject(cuenta);\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 }",
"public void enviarValoresCabecera(){\n }",
"public void guardarDestruccion() {\n try {\n produccion.setIdMarca(opcionMarca);\n produccion.setIdPlantaProd(opcionPlanta);\n produccion.setIdPaisOrigen(opcionOrigen);\n produccion.setIdTipoRetro(opcionTipo);\n produccion.setFechProduccion(new Date());\n produccion.setDescPaisOrigen(desperdiciosHelper.getNombrePais());\n\n if (!habilitarBtnValidarProd()) {\n if (produccion != null) {\n produccion = produccionService.guardaDestruccion(produccion);\n super.msgInfo(MSGEXITOVALIDAPROD);\n desperdiciosHelper.setDeshabilitaBtnValidarProd(true);\n desperdiciosHelper.setDeshabilitaCargaArchivo(false);\n } else {\n super.msgError(MSGERRORVALIDARPROD);\n }\n }\n } catch (ProduccionServiceException e) {\n LOGGER.error(\"ERROR: Al guardar los datos de produccion\" + e.getMessage(), e);\n }\n }",
"public void guardar(Modelo modelo) throws SipsaExcepcion;",
"@Override\n protected void onPostExecute(HttpResponse result) {\n if (result != null)\n\t\t\ttry {\n\t\t\t\tLog.i(\"Conexao\", \"Dentrodopost\");\n\t\t\t\t//result.getEntity().writeTo(new FileOutputStream(f));\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} \n }",
"private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }",
"public String cargarDatos()\r\n/* 514: */ {\r\n/* 515:540 */ return null;\r\n/* 516: */ }",
"@Override\n protected Response doInsert(JSONObject data) {\n return null;\n }"
] |
[
"0.6108867",
"0.6089659",
"0.59963566",
"0.59516066",
"0.59346324",
"0.59239954",
"0.5902984",
"0.5900754",
"0.580848",
"0.57809454",
"0.5766452",
"0.57644504",
"0.5763113",
"0.57480466",
"0.57415074",
"0.5709575",
"0.57050407",
"0.5672679",
"0.56660414",
"0.5664272",
"0.56620985",
"0.5660924",
"0.56539875",
"0.5652867",
"0.5640711",
"0.5639574",
"0.5621628",
"0.5621237",
"0.5618425",
"0.56115556",
"0.5598985",
"0.55770415",
"0.557137",
"0.55665624",
"0.5561801",
"0.55481106",
"0.5547554",
"0.5545583",
"0.55434704",
"0.5530123",
"0.55275875",
"0.5524151",
"0.5519947",
"0.55188763",
"0.5511981",
"0.5506241",
"0.55051416",
"0.5503129",
"0.55030775",
"0.54881",
"0.54847366",
"0.5480024",
"0.54506034",
"0.5445036",
"0.54418904",
"0.5441591",
"0.54324824",
"0.5428266",
"0.54233485",
"0.5421697",
"0.5421027",
"0.54141116",
"0.54127306",
"0.5408961",
"0.54024637",
"0.5396911",
"0.53968513",
"0.53895",
"0.53855276",
"0.53819346",
"0.53780955",
"0.53749156",
"0.5370826",
"0.5370472",
"0.53698844",
"0.5368954",
"0.53641844",
"0.5346846",
"0.53458077",
"0.53453165",
"0.53430814",
"0.5335295",
"0.5334208",
"0.5333388",
"0.53326344",
"0.53292847",
"0.53247714",
"0.53199583",
"0.5319406",
"0.53191096",
"0.5317003",
"0.53164697",
"0.53157854",
"0.53155106",
"0.5312124",
"0.53046227",
"0.5300779",
"0.5298598",
"0.5297596",
"0.52974415"
] |
0.5525662
|
41
|
Guarda el contenido de la trama retornada a la base de datos
|
public Integer guardarTramaRepDetalladoBD(Map<String, String> parametros) {
try {
if (!DBPinpad.guardarTramaRepDetPinpadMC(parametros.get("response_code"), parametros.get("message"),
parametros.get("ecr_currency_code"),
parametros.get("ecr_aplication"),
parametros.get("ecr_transaccion"), parametros.get("merchant_id"),
parametros.get("print_data"), VariablesCaja.vNumPedVta))
return VariablesPinpad.RET_NOK;
} catch (Exception e) {
log.debug(e.toString());
return VariablesPinpad.RET_NOK;
}
return VariablesPinpad.RET_OK;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_atencion_embarazada his_atencion_embarazada = new His_atencion_embarazada();\r\n\t\t\t\this_atencion_embarazada.setCodigo_empresa(empresa\r\n\t\t\t\t\t\t.getCodigo_empresa());\r\n\t\t\t\this_atencion_embarazada.setCodigo_sucursal(sucursal\r\n\t\t\t\t\t\t.getCodigo_sucursal());\r\n\t\t\t\this_atencion_embarazada.setCodigo_historia(tbxCodigo_historia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFecha_inicial(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_inicial.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCodigo_eps(tbxCodigo_eps.getValue());\r\n\t\t\t\this_atencion_embarazada.setCodigo_dpto(lbxCodigo_dpto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCodigo_municipio(lbxCodigo_municipio\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setIdentificacion(tbxIdentificacion\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDireccion(tbxMotivo.getValue());\r\n\t\t\t\this_atencion_embarazada.setTelefono(tbxTelefono.getValue());\r\n\t\t\t\this_atencion_embarazada.setSeleccion(rdbSeleccion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setGestaciones(lbxGestaciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPartos(lbxPartos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCesarias(lbxCesarias\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAbortos(lbxAbortos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEspontaneo(lbxEspontaneo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setProvocado(lbxProvocado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNacido_muerto(lbxNacido_muerto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPrematuro(lbxPrematuro\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_menos(lbxHijos_menos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_mayor(lbxHijos_mayor\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMalformado(lbxMalformado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHipertension(lbxHipertension\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_ultimo_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_ultimo_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCirugia(lbxCirugia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setOtro_antecedente(tbxOtro_antecedente\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemoclasificacion(lbxHemoclasificacion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRh(lbxRh.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_atencion_embarazada.setImc(tbxImc.getValue());\r\n\t\t\t\this_atencion_embarazada.setTa(tbxTa.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc(tbxFc.getValue());\r\n\t\t\t\this_atencion_embarazada.setFr(tbxFr.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemperatura(tbxTemperatura\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCroomb(tbxCroomb.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setFecha_ultima_mestruacion(new Timestamp(\r\n\t\t\t\t\t\t\t\tdtbxFecha_ultima_mestruacion.getValue()\r\n\t\t\t\t\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_atencion_embarazada.setFecha_probable_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_probable_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setEdad_gestacional(tbxEdad_gestacional\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setControl(lbxControl.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNum_control(tbxNum_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFetales(lbxFetales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFiebre(lbxFiebre.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido(lbxLiquido.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFlujo(lbxFlujo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEnfermedad(lbxEnfermedad\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_enfermedad(tbxCual_enfermedad\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo(lbxCigarrillo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol(lbxAlcohol.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_alcohol(tbxCual_alcohol\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDroga(lbxDroga.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_droga(tbxCual_droga.getValue());\r\n\t\t\t\this_atencion_embarazada.setViolencia(lbxViolencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_violencia(tbxCual_violencia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoide(lbxToxoide.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setDosis(lbxDosis.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_gestion(tbxObservaciones_gestion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setAltura_uterina(tbxAltura_uterina\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCorelacion(chbCorelacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEmbarazo_multiple(chbEmbarazo_multiple.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setTrasmision_sexual(chbTrasmision_sexual.isChecked());\r\n\t\t\t\this_atencion_embarazada.setAnomalia(rdbAnomalia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEdema_gestion(rdbEdema_gestion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPalidez(rdbPalidez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulciones(rdbConvulciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConciencia(rdbConciencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCavidad_bucal(rdbCavidad_bucal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto(tbxHto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb(tbxHb.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoplasma(tbxToxoplasma.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl1(tbxVdrl1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl2(tbxVdrl2.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih1(tbxVih1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih2(tbxVih2.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb(tbxHepb.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtro(tbxOtro.getValue());\r\n\t\t\t\this_atencion_embarazada.setEcografia(tbxEcografia.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_gestion(rdbClasificacion_gestion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setContracciones(lbxContracciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setNum_contracciones(lbxNum_contracciones\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHemorragia(lbxHemorragia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_vaginal(lbxLiquido_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setColor_liquido(tbxColor_liquido\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDolor_cabeza(lbxDolor_cabeza\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVision(lbxVision.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulcion(lbxConvulcion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_parto(tbxObservaciones_parto\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setContracciones_min(tbxContracciones_min.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_fera(tbxFc_fera.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDilatacion_cervical(tbxDilatacion_cervical\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setPreentacion(rdbPreentacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setOtra_presentacion(tbxOtra_presentacion.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdema(rdbEdema.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemorragia_vaginal(lbxHemorragia_vaginal\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto_parto(tbxHto_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb_parto(tbxHb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb_parto(tbxHepb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl_parto(tbxVdrl_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih_parto(tbxVih_parto.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_parto(rdbClasificacion_parto\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_nac(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_nac.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setIdentificacion_nac(tbxIdentificacion_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setSexo(lbxSexo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso_nac(tbxPeso_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla_nac(tbxTalla_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setPc_nac(tbxPc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_nac(tbxFc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemper_nac(tbxTemper_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdad(tbxEdad.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar1(tbxAdgar1.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar5(tbxAdgar5.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar10(tbxAdgar10.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar20(tbxAdgar20.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_nac(tbxObservaciones_nac.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_nac(rdbClasificacion_nac\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setReani_prematuro(chbReani_prematuro\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_meconio(chbReani_meconio\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_respiracion(chbReani_respiracion.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipotonico(chbReani_hipotonico\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_apnea(chbReani_apnea\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_jadeo(chbReani_jadeo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_deficultosa(chbReani_deficultosa.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_gianosis(chbReani_gianosis\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_bradicardia(chbReani_bradicardia.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipoxemia(chbReani_hipoxemia\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_estimulacion(chbReani_estimulacion\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_ventilacion(chbReani_ventilacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_comprensiones(chbReani_comprensiones\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_intubacion(chbReani_intubacion\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setMedicina(tbxMedicina.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_reani(rdbClasificacion_reani\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRuptura(lbxRuptura.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_ruptura(lbxTiempo_ruptura\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_neo(tbxLiquido_neo\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFiebre_neo(lbxFiebre_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_neo(lbxTiempo_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCoricamniotis(tbxCoricamniotis\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setIntrauterina(rdbIntrauterina\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMadre20(lbxMadre20.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol_neo(chbAlcohol_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDrogas_neo(chbDrogas_neo.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo_neo(chbCigarrillo_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setRespiracion_neo(rdbRespiracion_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLlanto_neo(rdbLlanto_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVetalidad_neo(rdbVetalidad_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTaquicardia_neo(chbTaquicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setBradicardia_neo(chbBradicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setPalidez_neo(chbPalidez_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCianosis_neo(chbCianosis_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setAnomalias_congenitas(lbxAnomalias_congenitas\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_anomalias(tbxCual_anomalias\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setLesiones(tbxLesiones.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtras_alter(tbxOtras_alter\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_neo(rdbClasificacion_neo\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlarma(tbxAlarma.getValue());\r\n\t\t\t\this_atencion_embarazada.setConsulta_control(tbxConsulta_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setMedidas_preventiva(tbxMedidas_preventiva.getValue());\r\n\t\t\t\this_atencion_embarazada.setRecomendaciones(tbxRecomendaciones\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDiagnostico(tbxDiagnostico\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCodigo_diagnostico(tbxCodigo_diagnostico.getValue());\r\n\t\t\t\this_atencion_embarazada.setTratamiento(tbxTratamiento\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setRecomendacion_alimentacion(tbxRecomendacion_alimentacion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEvolucion_servicio(tbxEvolucion_servicio.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_atencion_embarazada);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_atencion_embarazada = getServiceLocator()\r\n\t\t\t\t\t\t.getHis_atencion_embarazadaService().guardar(datos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\t\t\t\t/*\r\n\t\t\t\t * else{ int result =\r\n\t\t\t\t * getServiceLocator().getHis_atencion_embarazadaService\r\n\t\t\t\t * ().actualizar(his_atencion_embarazada); if(result==0){ throw\r\n\t\t\t\t * new Exception(\r\n\t\t\t\t * \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\"\r\n\t\t\t\t * ); } }\r\n\t\t\t\t */\r\n\r\n//\t\t\t\tcodigo_historia = his_atencion_embarazada.getCodigo_historia();\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}",
"public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_parto his_parto = new His_parto();\r\n\t\t\t\this_parto.setCodigo_empresa(empresa.getCodigo_empresa());\r\n\t\t\t\this_parto.setCodigo_sucursal(sucursal.getCodigo_sucursal());\r\n\t\t\t\this_parto.setCodigo_historia(tbxCodigo_historia.getValue());\r\n\t\t\t\this_parto.setIdentificacion(tbxIdentificacion.getValue());\r\n\t\t\t\this_parto.setFecha_inicial(new Timestamp(dtbxFecha_inicial\r\n\t\t\t\t\t\t.getValue().getTime()));\r\n\t\t\t\this_parto.setConyugue(tbxConyugue.getValue());\r\n\t\t\t\this_parto.setId_conyugue(tbxId_conyugue.getValue());\r\n\t\t\t\this_parto.setEdad_conyugue(tbxEdad_conyugue.getValue());\r\n\t\t\t\this_parto.setEscolaridad_conyugue(tbxEscolaridad_conyugue\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setMotivo(tbxMotivo.getValue());\r\n\t\t\t\this_parto.setEnfermedad_actual(tbxEnfermedad_actual.getValue());\r\n\t\t\t\this_parto.setAntecedentes_familiares(tbxAntecedentes_familiares\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setPreeclampsia(rdbPreeclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setHipertension(rdbHipertension.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEclampsia(rdbEclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setH1(rdbH1.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setH2(rdbH2.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPostimadurez(rdbPostimadurez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRot_pre(rdbRot_pre.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPolihidramnios(rdbPolihidramnios.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRcui(rdbRcui.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPelvis(rdbPelvis.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFeto_macrosonico(rdbFeto_macrosonico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setIsoinmunizacion(rdbIsoinmunizacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setAo(rdbAo.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCirc_cordon(rdbCirc_cordon.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setPostparto(rdbPostparto.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setDiabetes(rdbDiabetes.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCardiopatia(rdbCardiopatia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setAnemias(rdbAnemias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEnf_autoinmunes(rdbEnf_autoinmunes\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setEnf_renales(rdbEnf_renales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInf_urinaria(rdbInf_urinaria.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEpilepsia(rdbEpilepsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto\r\n\t\t\t\t\t\t.setTbc(rdbTbc.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setMiomas(rdbMiomas.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setHb(rdbHb.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFumadora(rdbFumadora.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setInf_puerperal(rdbInf_puerperal.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfertilidad(rdbInfertilidad.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMenarquia(tbxMenarquia.getValue());\r\n\t\t\t\this_parto.setCiclos(tbxCiclos.getValue());\r\n\t\t\t\this_parto.setVida_marital(tbxVida_marital.getValue());\r\n\t\t\t\this_parto.setVida_obstetrica(tbxVida_obstetrica.getValue());\r\n\t\t\t\this_parto.setNo_gestaciones(lbxNo_gestaciones.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setParto(lbxParto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setAborto(lbxAborto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCesarias(lbxCesarias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFecha_um(new Timestamp(dtbxFecha_um.getValue()\r\n\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_parto.setUm(tbxUm.getValue());\r\n\t\t\t\this_parto.setFep(tbxFep.getValue());\r\n\t\t\t\this_parto.setGemerales(lbxGemerales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMalformados(lbxMalformados.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_vivos(lbxNacidos_vivos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_muertos(lbxNacidos_muertos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPreterminos(lbxPreterminos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMedico(chbMedico.isChecked());\r\n\t\t\t\this_parto.setEnfermera(chbEnfermera.isChecked());\r\n\t\t\t\this_parto.setAuxiliar(chbAuxiliar.isChecked());\r\n\t\t\t\this_parto.setPartera(chbPartera.isChecked());\r\n\t\t\t\this_parto.setOtros(chbOtros.isChecked());\r\n\t\t\t\this_parto.setControlado(rdbControlado.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setLugar_consulta(rdbLugar_consulta.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNo_consultas(lbxNo_consultas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEspecialistas(chbEspecialistas.isChecked());\r\n\t\t\t\this_parto.setGeneral(chbGeneral.isChecked());\r\n\t\t\t\this_parto.setPartera_consulta(chbPartera_consulta.isChecked());\r\n\t\t\t\this_parto.setSangrado_vaginal(rdbSangrado_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCefalias(rdbCefalias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEdema(rdbEdema.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEpigastralgia(rdbEpigastralgia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setVomitos(rdbVomitos.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setTinutus(rdbTinutus.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEscotomas(rdbEscotomas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_urinaria(rdbInfeccion_urinaria\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_vaginal(rdbInfeccion_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setOtros_embarazo(tbxOtros_embarazo.getValue());\r\n\t\t\t\this_parto.setCardiaca(tbxCardiaca.getValue());\r\n\t\t\t\this_parto.setRespiratoria(tbxRespiratoria.getValue());\r\n\t\t\t\this_parto.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_parto.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_parto.setTempo(tbxTempo.getValue());\r\n\t\t\t\this_parto.setPresion(tbxPresion.getValue());\r\n\t\t\t\this_parto.setPresion2(tbxPresion2.getValue());\r\n\t\t\t\this_parto.setInd_masa(tbxInd_masa.getValue());\r\n\t\t\t\this_parto.setSus_masa(tbxSus_masa.getValue());\r\n\t\t\t\this_parto.setCabeza_cuello(tbxCabeza_cuello.getValue());\r\n\t\t\t\this_parto.setCardiovascular(tbxCardiovascular.getValue());\r\n\t\t\t\this_parto.setMamas(tbxMamas.getValue());\r\n\t\t\t\this_parto.setPulmones(tbxPulmones.getValue());\r\n\t\t\t\this_parto.setAbdomen(tbxAbdomen.getValue());\r\n\t\t\t\this_parto.setUterina(tbxUterina.getValue());\r\n\t\t\t\this_parto.setSituacion(tbxSituacion.getValue());\r\n\t\t\t\this_parto.setPresentacion(tbxPresentacion.getValue());\r\n\t\t\t\this_parto.setV_presentacion(tbxV_presentacion.getValue());\r\n\t\t\t\this_parto.setPosicion(tbxPosicion.getValue());\r\n\t\t\t\this_parto.setV_posicion(tbxV_posicion.getValue());\r\n\t\t\t\this_parto.setC_uterina(tbxC_uterina.getValue());\r\n\t\t\t\this_parto.setTono(tbxTono.getValue());\r\n\t\t\t\this_parto.setFcf(tbxFcf.getValue());\r\n\t\t\t\this_parto.setGenitales(tbxGenitales.getValue());\r\n\t\t\t\this_parto.setDilatacion(tbxDilatacion.getValue());\r\n\t\t\t\this_parto.setBorramiento(tbxBorramiento.getValue());\r\n\t\t\t\this_parto.setEstacion(tbxEstacion.getValue());\r\n\t\t\t\this_parto.setMembranas(tbxMembranas.getValue());\r\n\t\t\t\this_parto.setExtremidades(tbxExtremidades.getValue());\r\n\t\t\t\this_parto.setSnc(tbxSnc.getValue());\r\n\t\t\t\this_parto.setObservacion(tbxObservacion.getValue());\r\n\t\t\t\this_parto.setCodigo_consulta_pyp(lbxCodigo_consulta_pyp\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFinalidad_cons(lbxFinalidad_cons.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setCausas_externas(lbxCausas_externas\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_disnostico(lbxTipo_disnostico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_principal(tbxTipo_principal.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_1(tbxTipo_relacionado_1\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_2(tbxTipo_relacionado_2\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_3(tbxTipo_relacionado_3\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTratamiento(tbxTratamiento.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_parto);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_parto = getServiceLocator().getHis_partoService().guardar(\r\n\t\t\t\t\t\tdatos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}",
"private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }",
"public String guardar()\r\n/* 69: */ {\r\n/* 70: */ try\r\n/* 71: */ {\r\n/* 72: 85 */ this.motivoLlamadoAtencion.setIdOrganizacion(AppUtil.getOrganizacion().getIdOrganizacion());\r\n/* 73: 86 */ this.motivoLlamadoAtencion.setIdSucursal(AppUtil.getSucursal().getIdSucursal());\r\n/* 74: 87 */ this.servicioMotivoLlamadoAtencion.guardar(this.motivoLlamadoAtencion);\r\n/* 75: 88 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 76: 89 */ setEditado(false);\r\n/* 77: 90 */ limpiar();\r\n/* 78: */ }\r\n/* 79: */ catch (Exception e)\r\n/* 80: */ {\r\n/* 81: 92 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 82: 93 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 83: */ }\r\n/* 84: 95 */ return \"\";\r\n/* 85: */ }",
"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 Integer guardarTramaProcesoCompraBD(Map<String, String> parametros, String codFormaPago) {\r\n try {\r\n log.debug(\"MC- ingreso a guardar Trama\");\r\n if (!DBPinpad.guardarTramaPinpadMC(parametros.get(\"response_code\"), parametros.get(\"amount\"),\r\n parametros.get(\"approval_code\"), parametros.get(\"message\"),\r\n nroTarjetaBruto, //parametros.get(\"card\"),\r\n parametros.get(\"card_id\"), parametros.get(\"month\"), parametros.get(\"amount_quota\"),\r\n parametros.get(\"credit_type\"), parametros.get(\"client_name\"), parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"), parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta, codFormaPago))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }",
"public void guardar() {\n String msj = \"\";\n int idpagoanulado = daoPagoCuotaAnulado.nuevoID();\n Date SYSDATE = new Date();\n java.sql.Timestamp fechaPagoCuotaAnuladoSQL = new java.sql.Timestamp(SYSDATE.getTime());\n String observacion = txtObservacion.getText();\n int idmotivo = Integer.parseInt(txtCodigoMotivo.getText());\n int idusuario = appLogin.IDUSUARIO;\n int idpago =Integer.parseInt(txtNumeroPago.getText());\n Date fechapago = daoCotizacion.parseFecha(txtFechaPago.getText());\n java.sql.Date fechapagoSQL = new java.sql.Date(fechapago.getTime());\n double mPago = montoPago;\n String numerocomprobante = txtComprobante.getText();\n String numerorecibo = txtRecibo.getText();\n //VALIDACIONES\n if (idmotivo == 0) {\n msj += \"CODIGO DEL MOTIVO DE ANULACION ESTA VACIO.\\n\";\n }\n if (idpago == 0) {\n msj += \"NO HA SELECCIONADO NINGUN PAGO PARA LA ANULACIÓN.\\n\";\n }\n if (msj.isEmpty()) {\n cpca.setIdpagoanulado(idpagoanulado);\n cpca.setFechahoranulado(fechaPagoCuotaAnuladoSQL);\n cpca.setObservacion(observacion);\n cpca.setIdmotivo(idmotivo);\n cpca.setIdusuario(idusuario);\n cpca.setIdpago(idpago);\n cpca.setFechapago(fechapagoSQL);\n cpca.setMonto(mPago);\n cpca.setNumerocomprobante(numerocomprobante);\n cpca.setNumerorecibo(numerorecibo);\n daoPagoCuotaAnulado.agregar(cpca);\n } else {\n JOptionPane.showMessageDialog(null, msj, \"ERRORES\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"@Override\n\tpublic DatosEnc obtenerDatos(DatosEnc datos) {\n\t\tConnection con = null;\n\t\tCallableStatement stmt = null;\n//\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\ttry{\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tString query = \"select * from pv_cotizaciones_det where no_cotizacion = ?\";\n//\t\t\tps = con.prepareStatement(query);\n//\t\t\tps.setString(1, datos.getNoDocumento());\n//\t\t\trs = ps.executeQuery();\n//\t\t\texiste=0;\n//\t\t\twhile(rs.next()){\n//\t\t\t\tif(rs.getString(\"no_cotizacion\") == null){\n//\t\t\t\t\texiste=0;\n//\t\t\t\t}else if(rs.getString(\"no_cotizacion\").equals(datos.getNoDocumento())){\n//\t\t\t\t\texiste=1;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tps.close();\n//\t\t\trs.close();\n//\t\t\tif(existe==0){\n\t\t\t\tcon = new ConectarDB().getConnection();\n\t\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_InUp_Mov_Enc(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\t\tstmt.setString(1, datos.getCodigoCliente());\n\t\t\t\tstmt.setString(2, datos.getNit());\n\t\t\t\tstmt.setString(3, datos.getNombreCliente());\n\t\t\t\tstmt.setString(4, datos.getDirecFactura());\n\t\t\t\tstmt.setString(5, datos.getTel());\n\t\t\t\tstmt.setString(6, datos.getTarjeta());\n\t\t\t\tstmt.setString(7, datos.getDirecEnvio());\n\t\t\t\tstmt.setString(8, datos.getCodigoVendedor());\n\t\t\t\tstmt.setString(9, datos.getUsername());\n\t\t\t\tstmt.setString(10, datos.getTipoDocumento());\n\t\t\t\tstmt.setString(11, datos.getNoDocumento());\n\t\t\t\tstmt.setString(12, datos.getFechaVence());\n\t\t\t\tstmt.setString(13, datos.getTipoPago());\n\t\t\t\tstmt.setString(14, datos.getTipoCredito());\n\t\t\t\tstmt.setString(15, datos.getAutoriza());\n\t\t\t\tstmt.setString(16, datos.getFechaDocumento());\n\t\t\t\tstmt.setString(17, datos.getCargosEnvio());\n\t\t\t\tstmt.setString(18, datos.getOtrosCargos());\n\t\t\t\tstmt.setString(19, datos.getMontoVenta());\n\t\t\t\tstmt.setString(20, datos.getMontoTotal());\n\t\t\t\tstmt.setString(21, datos.getSerieDev());\n\t\t\t\tstmt.setString(22, datos.getNoDocDev());\n\t\t\t\tstmt.setString(23, datos.getObservaciones());\n\t\t\t\tstmt.setString(24, datos.getTipoNota());\n\t\t\t\tstmt.setString(25, datos.getCaja());\n\t\t\t\tstmt.setString(26, datos.getFechaEntrega());\n\t\t\t\tstmt.setString(27, datos.getCodigoDept());\n\t\t\t\tstmt.setString(28, datos.getCodGen());\n\t\t\t\tstmt.setString(29, datos.getNoConsigna());\n\t\t\t\tstmt.setString(30, datos.getCodMovDev());\n\t\t\t\tstmt.setString(31, datos.getGeneraSolicitud());\n\t\t\t\tstmt.setString(32, datos.getTipoPagoNC());\n\t\t\t\tstmt.setString(33, datos.getTipoCliente());\n\t\t\t\tstmt.setString(34, datos.getCodigoNegocio());\n\t\t\t\tstmt.setString(35, datos.getCantidadDevolver());\n\t\t\t\tstmt.setString(36, datos.getAutorizoDespacho());\n\t\t\t\tstmt.setString(37, datos.getSaldo());\n\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tif(rs.getString(1)!=null){\n\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n\t\t\t\t\t}\n\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tif(rs.getString(1)!=null){\n//\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n//\t\t\t\t\t}else{\n//\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n//\t\t\t\t\t}\n//\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tdocumento = rs.getInt(2);\n\t\t\t\t}\n\t\t\t\tcon.close();\n\t\t\t\tstmt.close();\n\t\t\t\trs.close();\n//\t\t\t}\n\t\t\t\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_Del_Mov_Det(?,?,?)}\");\n//\t\t\tstmt.setInt(1, Integer.parseInt(datos.getTipoDocumento()));\n//\t\t\tstmt.setString(2, \"\");\n//\t\t\tstmt.setInt(3, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"limpiado\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_udpv_VerificaCotiza(?,?)}\");\n//\t\t\tstmt.setString(1, \"\");\n//\t\t\tstmt.setInt(2, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"error\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n\t\t}catch(SQLException e ){\n\t\t\tSystem.out.println(\"Error Enc: \" + e.getMessage());\n\t\t}\n\t\treturn datos;\n\t}",
"public void processInsertar() {\n }",
"public EncabezadoRespuesta bajaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t//Mandamos a log el objeto de entrada\n\t\tLogHandler.debug(uid, this.getClass(), \"bajaAsistencia - Datos Entrada: \" + asistencia);\n\t\t//Variable de resultado\n\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\ttry {\n\t\t\tif (asistencia.getIdEmpleado() == null) {\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n \t}\n \tif (asistencia.getUsuarioBaja() == null || asistencia.getUsuarioBaja().trim().isEmpty())\n \t{\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario para la baja.\");\n \t}\n \tif (asistencia.getUsuarioUltMod() == null || asistencia.getUsuarioUltMod().trim().isEmpty())\n \t{\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario para la modificacion.\");\n \t}\n \tAsistenciaDAO dao = new AsistenciaDAO();\n \trespuesta = dao.bajaAsistencia(uid, asistencia);\n\t\t}\n\t\tcatch (ExcepcionesCuadrillas ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"bajaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"bajaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tLogHandler.debug(uid, this.getClass(), \"bajaAsistencia - Datos Salida: \" + respuesta);\n\t\treturn respuesta;\n\t}",
"@Override\r\n\tpublic void guardar() {\n\t\ttab_cuenta.guardar();\r\n\t\tguardarPantalla();\r\n\t\t\r\n\t}",
"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}",
"Reserva Obtener();",
"public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\n }",
"@Override\n\tpublic void borrarDatosOk() {\n\n\t}",
"public void guardarTransferenteAlcabala(RaTransferenteAlcabala raTransferenteAlcabala)throws Exception;",
"public long save(Registro r) {\n\n long id = r.getCodigo();\n SQLiteDatabase db = banco.getWritableDatabase();\n try {\n\n\n ContentValues values = new ContentValues();\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-M-d\");\n String dateString = sdf.format(r.getData());\n values.put(\"data\", dateString);\n values.put(\"distancia\", r.getDistancia());\n values.put(\"consumo\", r.getConsumo());\n values.put(\"mediaAceleracao\", r.getMediaAberturaBorboleta());\n values.put(\"mediaConsumo\", r.getMediaConsumo());\n values.put(\"codTipoCombustivel\", r.getTipoCombustivel().getCodigo());\n values.put(\"codCarro\", r.getCarro().getCodigo());\n values.put(\"codUsuario\", r.getUsuario().getCodigo());\n\n if (id != 0) {//SE O ID É DIFERENTE DE 0 ATUALIZA,\n\n System.out.println(\"Entrou !!\");\n String _id = String.valueOf(r.getCodigo());\n String[] whereArgs = new String[]{_id};\n\n // update registro set values = ... where _id=?\n int count = db.update(TABELA, values, \"codigo=?\", whereArgs);\n\n return count;\n } else {\n\n id = db.insert(TABELA, \"\", values);\n System.out.println(\"Deu certo !! \\n \" + values);\n return id;\n }\n } finally {\n db.close();\n }\n }",
"public Integer guardarTramaAnulacionBD(Map<String, String> parametros, String formaPago) {\r\n try {\r\n if (!DBPinpad.guardarTramaAnulPinpadMC(parametros.get(\"response_code\"), parametros.get(\"amount\"),\r\n parametros.get(\"approval_code\"), parametros.get(\"message\"),\r\n parametros.get(\"card\"), parametros.get(\"month\"),\r\n parametros.get(\"amount_quota\"), parametros.get(\"credit_type\"),\r\n parametros.get(\"client_name\"), parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"), parametros.get(\"ecr_transaccion\"),\r\n parametros.get(\"merchant_id\"), parametros.get(\"print_data\"),\r\n lblDatoPedidoEnv, //VariablesCaja.vNumPedVta\r\n formaPago))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"private void saveTempRojoBhcs(String estado) {\n int c = mTempRojoBhcs.size();\n for (TempRojoBhc temp : mTempRojoBhcs) {\n temp.setEstado(estado);\n estudioAdapter.updateTrojosSent(temp);\n publishProgress(\"Actualizando TempRojoBhc\", Integer.valueOf(mTempRojoBhcs.indexOf(temp)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public String guardarComentario(){\r\n\t\tcomDao.save(com);\r\n\t\tinit();\r\n\t\treturn null;\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 Integer guardarTramaCierreBD(Map<String, String> parametros) {\r\n try {\r\n if (!DBPinpad.guardarTramaCierrePinpadMC(parametros.get(\"response_code\"), parametros.get(\"message\"),\r\n parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"),\r\n parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"public void buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}",
"public String guardar()\r\n/* 446: */ {\r\n/* 447:455 */ String url = \"\";\r\n/* 448: */ try\r\n/* 449: */ {\r\n/* 450:458 */ if ((this.facturaProveedorSRI.getMensajeSRI() == null) || (this.facturaProveedorSRI.getMensajeSRI().toLowerCase().contains(\"guardado\")) || \r\n/* 451:459 */ (!this.facturaProveedorSRI.isTraCorregirDatos()))\r\n/* 452: */ {\r\n/* 453:461 */ if (this.facturaProveedorSRI.getDocumento().isIndicadorDocumentoElectronico()) {\r\n/* 454:462 */ this.facturaProveedorSRI.setAutorizacionRetencion(\"0000000000\");\r\n/* 455: */ }\r\n/* 456:464 */ if (isMostrarBaseImponible()) {\r\n/* 457:465 */ for (DetalleFacturaProveedorSRI detalleFacturaProveedorSRI : this.facturaProveedorSRI.getListaDetalleFacturaProveedorSRI())\r\n/* 458: */ {\r\n/* 459:466 */ detalleFacturaProveedorSRI.setBaseImponibleTarifaCero(BigDecimal.ZERO);\r\n/* 460:467 */ detalleFacturaProveedorSRI.setBaseImponibleDiferenteCero(BigDecimal.ZERO);\r\n/* 461:468 */ detalleFacturaProveedorSRI.setBaseImponibleNoObjetoIva(BigDecimal.ZERO);\r\n/* 462: */ }\r\n/* 463: */ }\r\n/* 464:471 */ if (isMostrarBasesDetalle()) {\r\n/* 465:472 */ for (DetalleFacturaProveedorSRI detalleFacturaProveedorSRI : this.facturaProveedorSRI.getListaDetalleFacturaProveedorSRI()) {\r\n/* 466:473 */ detalleFacturaProveedorSRI.setBaseImponibleRetencion(BigDecimal.ZERO);\r\n/* 467: */ }\r\n/* 468: */ }\r\n/* 469:477 */ this.servicioFacturaProveedorSRI.guardar(this.facturaProveedorSRI);\r\n/* 470: */ }\r\n/* 471: */ else\r\n/* 472: */ {\r\n/* 473:480 */ this.servicioFacturaProveedorSRI.actualizarRetencion(this.facturaProveedorSRI);\r\n/* 474: */ }\r\n/* 475:482 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 476:484 */ if (this.facturaProveedorSRI.getFacturaProveedor() == null) {\r\n/* 477:485 */ url = \"/paginas/financiero/contabilidad/procesos/compraCajaChica?faces-redirect=true\";\r\n/* 478: */ } else {\r\n/* 479:488 */ url = \"/paginas/compras/procesos/facturaProveedor?faces-redirect=true&numero=\" + this.facturaProveedorSRI.getFacturaProveedor().getNumero();\r\n/* 480: */ }\r\n/* 481: */ }\r\n/* 482: */ catch (ExcepcionAS2Financiero e)\r\n/* 483: */ {\r\n/* 484:492 */ e.printStackTrace();\r\n/* 485:493 */ addInfoMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 486:494 */ LOG.info(\"ERROR ExcepcionAS2Financiero AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 487: */ }\r\n/* 488: */ catch (ExcepcionAS2 e)\r\n/* 489: */ {\r\n/* 490:497 */ e.printStackTrace();\r\n/* 491:498 */ addInfoMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 492:499 */ LOG.info(\"ERROR ExcepcionAS2 AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 493: */ }\r\n/* 494: */ catch (Exception e)\r\n/* 495: */ {\r\n/* 496:502 */ e.printStackTrace();\r\n/* 497:503 */ addInfoMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 498:504 */ LOG.error(\"ERROR AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 499: */ }\r\n/* 500:507 */ return url;\r\n/* 501: */ }",
"public String save() {\r\n\t\ttry {\r\n\r\n\t\t\tif (obs != null && !obs.trim().isEmpty()) {\r\n\t\t\t\tconcurso.setObservacionReserva(obs);\r\n\t\t\t\tconcursoHome.setInstance(concurso);\r\n\t\t\t\tString res = concursoHome.update();\r\n\t\t\t}\r\n\r\n\t\t\tfor (PlantaCargoDetDTO dto : listaPlantaCargoDto) {\r\n\r\n\t\t\t\tif (dto.getReservar()) {\r\n\t\t\t\t\tEstadoDet est = buscarEstado(\"en reserva\");\r\n\t\t\t\t\tif (!existeEnDetalle(dto.getPlantaCargoDet(), est)) {\r\n\t\t\t\t\t\t// buscar\r\n\r\n\t\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\t\tp.setActivo(true);\r\n\t\t\t\t\t\tp.setFechaAlta(new Date());\r\n\t\t\t\t\t\tp.setUsuAlta(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\tp.setNroOrden(2);\r\n\t\t\t\t\t\tp.setPlantaCargoDet(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\t\tif (est != null)\r\n\t\t\t\t\t\t\tp.setEstadoDet(est);\r\n\t\t\t\t\t\tp.setConcurso(concursoHome.getInstance());\r\n\t\t\t\t\t\tem.persist(p);\r\n\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(est.getEstadoCab());\r\n\t\t\t\t\t\tplanta.setEstadoDet(est);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Incidencia 1079 */\r\n\t\t\t\trefreshListaPuestoReservados();\r\n\t\t\t\t/**/\r\n\t\t\t\tEstadoCab estadoCab = obtenerEstadosCabecera(\"VACANTE\");\r\n\t\t\t\tif (esta(dto.getPlantaCargoDet())) {\r\n\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\tp = recuperarConcurso(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\tif (!dto.getReservar()) {\r\n\t\t\t\t\t\tif (p.getConcursoPuestoAgr() != null) {\r\n\t\t\t\t\t\t\tstatusMessages.clear();\r\n\t\t\t\t\t\t\tstatusMessages.add(Severity.ERROR,\r\n\t\t\t\t\t\t\t\t\t\"El puesto pertenece a un grupo\");\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * p.setActivo(true); p.setNroOrden(1);\r\n\t\t\t\t\t\t * p.setFechaMod(new Date());\r\n\t\t\t\t\t\t * p.setUsuMod(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\t * EstadoDet est = buscarEstado(\"libre\");\r\n\t\t\t\t\t\t * p.setEstadoDet(est); em.merge(p);\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(estadoCab);\r\n\t\t\t\t\t\tplanta.setEstadoDet(null);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\t\t\t\t\t\tif (!concurso\r\n\t\t\t\t\t\t\t\t.getDatosEspecificosTipoConc()\r\n\t\t\t\t\t\t\t\t.getDescripcion()\r\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\r\n\t\t\t\t\t\t\t\t\t\tCONCURSO_INTERNO_INTERINSTITUCIONAL)\r\n\t\t\t\t\t\t\t\t&& planta.getPermanente())\r\n\t\t\t\t\t\t\treponerCategoriasController.reponerCategorias(p,\r\n\t\t\t\t\t\t\t\t\t\"PUESTO\", \"CONCURSO\");\r\n\t\t\t\t\t\tem.remove(p);\r\n\t\t\t\t\t\t// listaPlantaCargoDto.remove(dto);\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\tobs = null;\r\n\t\t\tem.flush();\r\n\t\t\tllenarListado1();\r\n\t\t\tstatusMessages.clear();\r\n\t\t\tstatusMessages.add(Severity.INFO, SeamResourceBundle.getBundle()\r\n\t\t\t\t\t.getString(\"GENERICO_MSG\"));\r\n\t\t\treturn \"persisted\";\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void trabajar() {\n\n\t}",
"public void guardar() {\n try {\n if (this.buscarCodApelacion()) {\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.INSERTA_APELACIONES(apelacionesBean); \n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.apelacionesBean.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"0\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue insertada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n this.apelacionesBean = new ApelacionesBean();\n addMessage(\"Guadado Exitosamente\", 1);\n } else {\n addMessage(\"La solicitud de apelacion especificada no existe\", 1);\n this.Listar();\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 }",
"private void guardarEstadoObjetosUsados() {\n }",
"@Override\n\tpublic int insertarEntrada(AlmacenDTO obj) {\n\t\tint rs=-1;\n\t\tConnection con=null;\n\t\tPreparedStatement pst=null;\n\t\ttry {\n\t\t\tcon=new MySqlDbConexion().getConexion();\n\t\t\tString sql=\"insert into MATERIAL_ENTRADA values (null,?,?,?)\";\n\t\t\tpst=con.prepareStatement(sql);\n\t\t\t\n\t\t\tpst.setInt(1,obj.getCodigo_producto());\n\t\t\tpst.setInt(2,obj.getCantidad_entrada());\n\t\t\tpst.setDate(3,obj.getFecha_entrada());\n\t\t\t\n\t\t\trs=pst.executeUpdate();\n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error en la Sentencia\"+e.getMessage());\n\t\t\t\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif(pst!=null) pst.close();\n\t\t\t\tif(con!=null) con.close();\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Error al cerrar\");\n\t\t\t}\n\t\t}\n\t\treturn rs;\n\t}",
"private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }",
"@Override\n\t@Transactional //los que no impliquen listados solo seran de tipo transactional\n\tpublic boolean grabar(Autoridad autoridad) {\n\t\tAutoridad objAutoridad = dAutoridad.save(autoridad);\n\t\tif (objAutoridad == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"private void remplirUtiliseData() {\n\t}",
"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 void persistirRemessaC17() throws Exception {\n if (this.remessa == null || this.remessa.getId() == null) { \n this.remessa = new RemessaVO();\n this.remessa.setDataHoraAbertura(new Date());\n this.remessa.setCodigoUsuarioAbertura(this.usuario.getNuMatricula());\n this.remessa.setUnidadeSolicitante(unidadeServiceRef.findUnidadeLotacaoUsuarioLogado());\n this.remessa = remessaService.salvarRascunhoRemessaAB(this.remessa);\n }\n }",
"public void guardar4(View view){\n bdboletas admin= new bdboletas(this, \"Boleta de Transito\", null, 1);\n SQLiteDatabase BaseDeDatos= admin.getWritableDatabase();\n\n placa= etplaca.getText ().toString ();\n modelo= etmodelo.getText ().toString ();\n marca= etmarca.getText ().toString ();\n color= etmodelo.getText ().toString ();\n\n año_string= etaño.getText ().toString ();\n\n int año_int=Integer.parseInt (año_string);\n\n serial= etserial.getText ().toString ();\n\n String seleccion=spinner_vehiculo.getSelectedItem ().toString ();\n\n if (!placa.isEmpty () && !modelo.isEmpty () && !marca.isEmpty ()\n && !color.isEmpty () && !año_string.isEmpty () && !serial.isEmpty ()\n && !seleccion.isEmpty ()){\n\n ContentValues registro= new ContentValues ();\n\n registro.put (\"placa\",placa);\n registro.put (\"marca\",marca);\n registro.put (\"modelo\",modelo);\n registro.put (\"tipo_vehiculo\",seleccion);\n registro.put (\"color\",color);\n registro.put (\"año\",año_int);\n registro.put (\"s_carroceria\",serial);\n\n BaseDeDatos.insert(\"boletas\",null , registro);\n\n BaseDeDatos.close();\n\n Toast.makeText(this,\"registo exitoso\",Toast.LENGTH_SHORT).show();\n // metodo boton siguiente\n Intent siguiente = new Intent (this, Remolque.class);\n startActivity (siguiente);\n }else{\n Toast.makeText(this,\"debe llenar todos los campos para poder continuar\",Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n\t\tpublic void guardar() {\n\t\t\t\n\t\t\tif (tab_presupuesto.guardar()){\n\t\t\t\tif (tab_asociacion_presupuestaria.guardar()) {\n\t\t\t\t\tguardarPantalla();\n\t\t\t\t\t//Actualizar el arbol\n\t\t\t\t\tarb_clasificador.ejecutarSql();\n\t\t\t\t\tutilitario.addUpdate(\"arb_clasificador\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t}",
"public RespuestaBD crearRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioInsercion) {\n/* 342 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* 344 */ int elSiguiente = siguienteRegistro(codigoFlujo);\n/* 345 */ if (elSiguiente == 0) {\n/* 346 */ rta.setMensaje(\"Generando secuencia\");\n/* 347 */ return rta;\n/* */ } \n/* */ \n/* */ try {\n/* 351 */ String s = \"insert into wkf_detalle(codigo_flujo,secuencia,servicio_inicio,accion,codigo_estado,servicio_destino,nombre_procedimiento,correo_destino,enviar_solicitud,ind_mismo_proveedor,ind_mismo_cliente,estado,caracteristica,valor_caracteristica,caracteristica_correo,metodo_seleccion_proveedor,ind_correo_clientes,enviar_hermana,enviar_si_hermana_cerrada,ind_cliente_inicial,usuario_insercion,fecha_insercion) values (\" + codigoFlujo + \",\" + \"\" + elSiguiente + \",\" + \"\" + servicioInicio + \",\" + \"\" + accion + \",\" + \"\" + codigoEstado + \",\" + \"\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \"'\" + nombreProcedimiento + \"',\" + \"'\" + correoDestino + \"',\" + \"'\" + enviar + \"',\" + \"'\" + mismoProveedor + \"',\" + \"'\" + mismoCliente + \"',\" + \"'\" + estado + \"',\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \"'\" + usuarioInsercion + \"',\" + \"\" + Utilidades.getFechaBD() + \"\" + \")\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 398 */ rta = this.dat.executeUpdate2(s);\n/* 399 */ rta.setSecuencia(elSiguiente);\n/* */ }\n/* 401 */ catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"%FlujoDetalleDAO:crearRegistro \", e);\n/* 404 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 406 */ return rta;\n/* */ }",
"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}",
"public boolean insertarCreacionHistorialCliente(Cliente cliente) {\n String queryDividido1 = \"INSERT INTO Historial_Cliente(Usuario_Codigo, Nombre, DPI, Direccion, Sexo, Password, Nacimiento, DPI_Escaneado, Tipo, Fecha_Cambio) \"\n + \"VALUES(?,?,?,?,?,aes_encrypt(?,'AES'),?,?,?,?)\";\n java.sql.Date fechaCreacion = new java.sql.Date(Calendar.getInstance().getTime().getTime());\n\n try {\n\n PreparedStatement enviarDividido1 = Conexion.conexion.prepareStatement(queryDividido1);\n\n //Envio de los Datos de Creacion de un Nuevo Cliente a la Tabla Historial_Cliente\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.setString(7, cliente.getNacimiento());\n enviarDividido1.setBlob(8, cliente.getDPIEscaneado());\n enviarDividido1.setString(9, \"Creacion\");\n enviarDividido1.setString(10, fechaCreacion.toString());\n enviarDividido1.executeUpdate();\n\n \n return true;\n\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n return false;\n }\n\n }",
"public Integer guardarTramaReimpresionBD(Map<String, String> parametros) {\r\n try {\r\n if (!DBPinpad.guardarTramaReimpPinpadMC(parametros.get(\"response_code\"), parametros.get(\"message\"),\r\n parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"),\r\n parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"public String insertar(Cargo cargo){\n String registrosInser=\"Registro insertado N°= \";\n long contador;\n ContentValues c=new ContentValues();\n //c.put(\"ID_CARGO\",cargo.getIdCargo());\n c.put(\"NOMBRE_CARGO\",cargo.getNombreCargo());\n c.put(\"DESCRIPCION_CARGO\",cargo.getDescripcionCargo());\n contador=db.insert(\"CARGO\",null,c);\n if(contador==-1||contador==0){\n registrosInser=\"Error al insertar\";\n }\n else{\n registrosInser=registrosInser+contador;\n }\n /* String registrosInser=\"Registro insertado N°= \";\n long contador= 0;\n ContentValues carg = new ContentValues();\n //carg.put(\"ID_CARGO\",cargo.getIdCargo());\n carg.put(\"NOMBRE_CARGO\",cargo.getNombreCargo());\n carg.put(\"DESCRIPCION_CARGO\",cargo.getDescripcionCargo());\n contador=db.insert(\"CARGO\",null,carg);\n if(contador==-1||contador==0){\n registrosInser=\"error al insertar\";\n }\n else{\n registrosInser=registrosInser+contador;\n }\n return registrosInser;*/\n return registrosInser;\n\n }",
"private void readAndSAVE(){\n boolean vaidation_status = true;\n\n achiv_title = edtxt_achiv_title.getText().toString();\n if (TextUtils.isEmpty(achiv_title)){\n edtxt_achiv_title.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_achiv_title.setError(null);\n }\n\n achiv_date = edtxt_achiv_date.getText().toString();\n if (TextUtils.isEmpty(achiv_date)){\n edtxt_achiv_date.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_achiv_date.setError(null);\n }\n\n\n\n achiv_details = edtxt_achiv_details.getText().toString();\n if(achiv_details.isEmpty()){\n vaidation_status = false;\n edtxt_achiv_details.setText(\"Please write Details!!\");\n }\n\n // if all vaidation is true then add all details into firbase database\n if(vaidation_status){\n\n //create Details model\n AchivmentsDetails addNewAchiv = new AchivmentsDetails();\n\n addNewAchiv.setAchv_titles(achiv_title);\n addNewAchiv.setAchv_date(achiv_date);\n addNewAchiv.setAchv_details(achiv_details);\n\n showProgressDialog();\n\n if(mAuth.getCurrentUser()!=null)\n {\n //CHECK IF new achivments has been added or update process.\n String achiv_key;\n if(operationStatus.equals(\"ADD_NEW\")) {\n\n // Get new push key\n achiv_key = mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").push().getKey();\n addNewAchiv.setAchv_firbase_ID(achiv_key);\n\n } else {\n achiv_key = operationStatus;\n addNewAchiv.setAchv_firbase_ID(achiv_key);\n }\n\n // save the user at UserNode under user UID\n mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").child(achiv_key).setValue(addNewAchiv, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n\n hideProgressDialog();\n\n if(databaseError==null)\n {\n Toast.makeText(AddNewAchivmentsActivity.this, \"Your Details has been saved !!\",\n Toast.LENGTH_SHORT).show();\n finish();\n }\n }\n });\n }\n\n\n\n }\n }",
"public void guardarSolicitud() {\n Map<String, String> paramMap = getParametrosSesion();\n String cadenaFirmada;\n try {\n if (paramMap != null) {\n cadenaFirmada = paramMap.get(firmaFormHelper.FIRMA_DIGITAL);\n firmaFormHelper.setSelloDigital(paramMap.get(FirmaFormHelper.FIRMA_DIGITAL));\n\n SimpleDateFormat formato = new SimpleDateFormat(\"dd/MM/yyyy\");\n produccion.setFechProduccion(new Date());\n desperdiciosHelper.setFechaAcuse(formato.format(produccion.getFechProduccion()));\n\n if (cadenaFirmada.length() > 0) {\n guardarRangosFolios();\n Acuse acuse = new Acuse();\n acuse.setSerieAcuse(TipoAcuse.DESPERDICIO);\n acuse.setIdProveedor(produccionCigarrosHelper.getProveedor().getIdProveedor());\n acuse.setSelloDigital(firmaFormHelper.getSelloDigital());\n acuse.setCadenaOriginal(firmaFormHelper.getCadenaOriginal());\n acuse.setFecCaptura(new Date());\n desperdiciosHelper.setIdAcuseRecibo(commonService.crearAcuse(acuse));\n habilitarPnlAcuse();\n registroMovimientoBitacora(getSession(), IdentificadorProcesoEnum.CONTRIBUYENTE_TRAMITES, new Date(), new Date(), MovimientosBitacoraEnum.DESPERDICIOS_DESTRUCCION);\n } else {\n habilitarPnlPrincipal();\n }\n }\n } catch (CommonServiceException e) {\n LOGGER.error(e.getMessage(), e);\n addErrorMessage(ERROR, \"No se pudo generar el acuse\");\n } catch (Exception ex) {\n LOGGER.error(ex.getMessage());\n }\n }",
"protected String cargarTempRojoBhcs(String url, String username,\n String password) throws Exception {\n try {\n getTempRojoBhcs();\n if(mTempRojoBhcs.size()>0){\n saveTempRojoBhcs(Constants.STATUS_SUBMITTED);\n // La URL de la solicitud POST\n final String urlRequest = url + \"/movil/trojos\";\n TempRojoBhc[] envio = mTempRojoBhcs.toArray(new TempRojoBhc[mTempRojoBhcs.size()]);\n HttpHeaders requestHeaders = new HttpHeaders();\n HttpAuthentication authHeader = new HttpBasicAuthentication(username, password);\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n requestHeaders.setAuthorization(authHeader);\n HttpEntity<TempRojoBhc[]> requestEntity =\n new HttpEntity<TempRojoBhc[]>(envio, requestHeaders);\n RestTemplate restTemplate = new RestTemplate();\n restTemplate.getMessageConverters().add(new StringHttpMessageConverter());\n restTemplate.getMessageConverters().add(new MappingJacksonHttpMessageConverter());\n // Hace la solicitud a la red, pone la vivienda y espera un mensaje de respuesta del servidor\n ResponseEntity<String> response = restTemplate.exchange(urlRequest, HttpMethod.POST, requestEntity,\n String.class);\n // Regresa la respuesta a mostrar al usuario\n if (!response.getBody().matches(\"Datos recibidos!\")) {\n saveTempRojoBhcs(Constants.STATUS_NOT_SUBMITTED);\n }\n return response.getBody();\n }\n else{\n return \"Datos recibidos!\";\n }\n } catch (Exception e) {\n Log.e(TAG, e.getMessage(), e);\n saveTempRojoBhcs(Constants.STATUS_NOT_SUBMITTED);\n return e.getMessage();\n }\n\n }",
"ParqueaderoEntidad actualizar(ParqueaderoEntidad parqueadero);",
"public String buscarTrabajadoresPorParametros() {\r\n try {\r\n inicializarFiltros();\r\n listaTrabajadores = null;\r\n //listaTrabajadores = administrarGestionarTrabajadoresBO.consultarTrabajadoresPorParametro(filtros);\r\n return null;\r\n } catch (Exception e) {\r\n System.out.println(\"Error ControllerAdministrarTrabajadores buscarTrabajadoresPorParametros : \" + e.toString());\r\n return null;\r\n }\r\n }",
"public Usuario buscarUsuario(String usuario) {\n Usuario usuario1 = new Usuario();\n try{\n\t\tString seleccion = \"SELECT usuario, nombre, clave FROM usuarios where usuario=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setString(1, usuario);\n \n\t\t//Savepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n \n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n usuario1.setUsuario(rs.getString(\"usuario\")); \n usuario1.setNombre(rs.getString(\"nombre\")); \n usuario1.setClave(rs.getString(\"clave\")); \n return usuario1;\n\t\t} \n \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return null; \n\n }",
"private void saveRazonNoData(String estado) {\n int c = mRazonNoData.size();\n for (RazonNoData rnd : mRazonNoData) {\n rnd.setEstado(estado);\n estudioAdapter.updateRazonNoDataSent(rnd);\n publishProgress(\"Actualizando Razones No Datos\", Integer.valueOf(mRazonNoData.indexOf(rnd)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public boolean Insert(String tipo, String lugar, String accion, String responsable, String vencimiento,String spinnerRiesgoSeleccion,\n String spinnerSectorSeleccion, String estado, String condicionInsegura, String usuario, String imagen, String site,\n String fecha, String Lider_recorrida, String Participantes, String Categoria){\n\n SQLiteDatabase BaseDeDatos=this.getWritableDatabase();\n ContentValues values=new ContentValues();\n\n if(tipo==\"Reporte de condiciones inseguras UAC\"){\n tipo = \"UAC\";\n }else if(tipo == \"Auditoria de primera parte\"){\n tipo = \"Auditoria\";\n }else {\n tipo = \"EHSS\";\n }\n values.put(\"tipo\", tipo);\n values.put(\"site\", site);\n values.put(\"fecha\", fecha);\n String fh = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date());\n values.put(\"fechaHoraCreacion\", fh);\n values.put(\"sector\",spinnerSectorSeleccion);\n values.put(\"lugar\", lugar);\n values.put(\"accion\", accion);\n values.put(\"responsable\", responsable);\n values.put(\"vencimiento\", vencimiento);\n values.put(\"riesgo\",spinnerRiesgoSeleccion);\n values.put(\"estado\",estado );\n values.put(\"condicionInsegura\", condicionInsegura);\n values.put(\"usuarioCreacion\",usuario);\n values.put(\"imagenUAC\",imagen);\n values.put(\"Lider_recorrida\",Lider_recorrida);\n values.put(\"Participantes\",Participantes);\n values.put(\"Categoria\",Categoria);\n values.put(\"syncro\", 0);\n\n boolean resultado=BaseDeDatos.insert(\"uac\",null,values)>0;\n BaseDeDatos.close();\n return resultado;\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 }",
"public void guardarDatos() throws Exception {\n\t\ttry {\n\t\t\tFormularioUtil.setUpperCase(groupboxEditar);\n\t\t\tif (validarForm()) {\n\t\t\t\t// Cargamos los componentes //\n\n\t\t\t\tHisc_urgencia_odontologico hisc_urgencia_odontologico = getBean();\n\n\t\t\t\tMap<String, Object> datos = new HashMap<String, Object>();\n\t\t\t\tdatos.put(\"hisc_urgencia_odontologico\",\n\t\t\t\t\t\thisc_urgencia_odontologico);\n\t\t\t\t// datos.put(\"sigvitales\", mcSignosVitales.obtenerSigvitales());\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getValue());\n\t\t\t\tdatos.put(\"admision\", admision);\n\t\t\t\tdatos.put(\"datos_procedimiento\", getProcedimientos());\n\n\t\t\t\tImpresion_diagnostica impresion_diagnostica = macroImpresion_diagnostica\n\t\t\t\t\t\t.obtenerImpresionDiagnostica();\n\t\t\t\tdatos.put(\"impresion_diagnostica\", impresion_diagnostica);\n\n\t\t\t\tgetServiceLocator().getHisc_urgencia_odontologicoService()\n\t\t\t\t\t\t.guardarDatos(datos);\n\n\t\t\t\ttbxAccion.setValue(\"modificar\");\n\t\t\t\tinfoPacientes.setCodigo_historia(hisc_urgencia_odontologico\n\t\t\t\t\t\t.getCodigo_historia());\n\n\t\t\t\tactualizarRemision(admision, getInformacionClinica(), this);\n\t\t\t\tcargarServicios();\n\n\t\t\t\tMensajesUtil.mensajeInformacion(\"Informacion ..\",\n\t\t\t\t\t\t\"Los datos se guardaron satisfactoriamente\");\n\t\t\t}\n\n\t\t} catch (ImpresionDiagnosticaException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t} catch (Exception e) {\n\t\t\tif (!(e instanceof WrongValueException)) {\n\t\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t\t}\n\t\t}\n\t}",
"public String adicionarubicacion(ubicacion ubicacion) {\n String miRespuesta;\n Conexion miConexion = new Conexion();\n Connection nuevaCon;\n nuevaCon = miConexion.getConn();\n \n //sentecia \n PreparedStatement sentencia;\n //try-catch \n try {\n // consulta \n String Query = \"INSERT INTO ubicacion (Departamento,municipio)\"\n + \"VALUES (?,?)\";\n sentencia = nuevaCon.prepareStatement(Query);\n sentencia.setString(1,ubicacion.getDepartamento());\n sentencia.setString(2,ubicacion.getMunicipio());\n \n sentencia.execute();\n miRespuesta = \"\";\n } catch (Exception ex){\n miRespuesta = ex.getMessage();\n System.err.println(\"Ocurrio un problea en ubicacionDAO\\n \" + ex.getMessage());\n }\n \n return miRespuesta;\n }",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Trabajo newTrabajo = (Trabajo) data.getSerializableExtra(\"resultado\");\n\n if(newTrabajo.getId() != 0) { // Si NO es un Trabajo Nuevo Vacío, osea que no hayan Cancelado la operación\n Toast.makeText(getBaseContext(), \"Nuevo Trabajo: \" + newTrabajo.getDescripcion(), Toast.LENGTH_LONG).show();\n\n // Insertamos en la Categoría correspondiente el Nuevo Trabajo\n Categoria.CATEGORIAS_MOCK[newTrabajo.getCategoria().getId()].addTrabajo(newTrabajo);\n\n // Incorporamos a la \"listaTrabajos\" el Nuevo Trabajo\n this.listaTotalTrabajos();\n\n //Se notifica al adaptador de que el ArrayList que tiene asociado ha sufrido cambios (forzando asi a ir al metodo getView())\n adaptador.notifyDataSetChanged();\n }\n }",
"public FlujoDetalleDTO leerRegistro() {\n/* */ try {\n/* 82 */ FlujoDetalleDTO reg = new FlujoDetalleDTO();\n/* */ \n/* 84 */ reg.setCodigoFlujo(this.rs.getInt(\"codigo_flujo\"));\n/* 85 */ reg.setSecuencia(this.rs.getInt(\"secuencia\"));\n/* 86 */ reg.setServicioInicio(this.rs.getInt(\"servicio_inicio\"));\n/* 87 */ reg.setCodigoEstado(this.rs.getInt(\"codigo_estado\"));\n/* 88 */ reg.setServicioDestino(this.rs.getInt(\"servicio_destino\"));\n/* 89 */ reg.setNombreProcedimiento(this.rs.getString(\"nombre_procedimiento\"));\n/* 90 */ reg.setCorreoDestino(this.rs.getString(\"correo_destino\"));\n/* 91 */ reg.setEnviarSolicitud(this.rs.getString(\"enviar_solicitud\"));\n/* 92 */ reg.setMismoProveedor(this.rs.getString(\"ind_mismo_proveedor\"));\n/* 93 */ reg.setMismoCliente(this.rs.getString(\"ind_mismo_cliente\"));\n/* 94 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 95 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 96 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 97 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 98 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 99 */ reg.setNombreServicioInicio(this.rs.getString(\"nombre_servicio_inicio\"));\n/* 100 */ reg.setNombreCodigoEstado(this.rs.getString(\"nombre_codigo_estado\"));\n/* 101 */ reg.setNombreServicioDestino(this.rs.getString(\"nombre_servicio_destino\"));\n/* 102 */ reg.setNombreEstado(this.rs.getString(\"nombre_estado\"));\n/* 103 */ reg.setCaracteristica(this.rs.getInt(\"caracteristica\"));\n/* 104 */ reg.setCaracteristicaValor(this.rs.getInt(\"valor_caracteristica\"));\n/* 105 */ reg.setCaracteristicaCorreo(this.rs.getInt(\"caracteristica_correo\"));\n/* 106 */ reg.setNombreCaracteristica(this.rs.getString(\"nombre_caracteristica\"));\n/* 107 */ reg.setDescripcionValor(this.rs.getString(\"descripcion_valor\"));\n/* 108 */ reg.setMetodoSeleccionProveedor(this.rs.getString(\"metodo_seleccion_proveedor\"));\n/* 109 */ reg.setIndCorreoCliente(this.rs.getString(\"ind_correo_clientes\"));\n/* */ \n/* */ try {\n/* 112 */ reg.setEnviar_hermana(this.rs.getString(\"enviar_hermana\"));\n/* 113 */ reg.setEnviar_si_hermana_cerrada(this.rs.getString(\"enviar_si_hermana_cerrada\"));\n/* 114 */ reg.setInd_cliente_inicial(this.rs.getString(\"ind_cliente_inicial\"));\n/* */ \n/* */ \n/* */ }\n/* 118 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 122 */ return reg;\n/* */ }\n/* 124 */ catch (Exception e) {\n/* 125 */ e.printStackTrace();\n/* 126 */ Utilidades.writeError(\"FlujoDetalleDAO:leerRegistro \", e);\n/* */ \n/* 128 */ return null;\n/* */ } \n/* */ }",
"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 }",
"private void controladorAtras(Controlador controlador){\n this.contAtras = controlador.getAtras();\n registro.setControlAtras(contAtras);\n login.setControlAtras(contAtras);\n }",
"public void guardarCV(String nombre, String Apellido,String dni,String mail,String cur ,File ruta,String mensaje){\r\n Alumnos alu=new Alumnos();\r\n alu.setNombre(nombre);\r\n alu.setApellido(Apellido);\r\n alu.setDni(dni);\r\n alu.setMail(mail);\r\n alu.setMensaje(mensaje);\r\n alu.setNom_archivo(cur);\r\n\r\n\r\n\r\n try{ //convierte el archivo pdf a bytes\r\n byte[] pdf= new byte[(int) ruta.length()];\r\n InputStream input= new FileInputStream(ruta);\r\n input.read(pdf);\r\n alu.setArchivo_cv(pdf);\r\n\r\n }catch(IOException e){\r\n alu.setArchivo_cv(null);\r\n }\r\n alu.insertarCV(alu);\r\n }",
"public void grabarConcepto(){\r\n try {\r\n Conexion conexion = new Conexion();\r\n String query = \"insert into concepto (descripcion, tipoConcepto, porcentaje, monto, fijo) values (?,?,?,?,?);\";\r\n PreparedStatement st = conexion.getConnection().prepareStatement(query);\r\n st.setString(1, this.getDescripcion());\r\n st.setString(2, this.getTipoConcepto());\r\n st.setDouble(3, this.getPorcentaje());\r\n st.setDouble(4, this.getMonto());\r\n st.setString(5, this.getFijo());\r\n st.execute();\r\n System.out.println(\"SE GRABO EL CONCEPTO EN LA BASE DE DATOS\");\r\n st.close();\r\n conexion.desconectar();\r\n } catch (SQLException ex) {\r\n System.err.println(ex.getMessage());\r\n }\r\n }",
"int insert(TCar record);",
"Lancamento persistir(Lancamento lancamento);",
"public void guardar() {\n try {\n objConec.conectar();\n objConec.Sql = objConec.con.prepareStatement(\"insert into contacto values(null,?,?,?,?,?)\");\n objConec.Sql.setString(1, getNom_con());\n objConec.Sql.setInt(2, getTel_con()); \n objConec.Sql.setString(3, getEma_con());\n objConec.Sql.setString(4, getAsu_con());\n objConec.Sql.setString(5, getMen_con());\n objConec.Sql.executeUpdate();\n objConec.cerrar();\n JOptionPane.showMessageDialog(null, \"Mensaje enviado correctamente\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Error al enviar el mensaje\");\n\n }\n\n }",
"private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }",
"public void save() {\n super.storageSave(listPedidosAssistencia.toArray());\n }",
"public EncabezadoRespuesta entradaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\t\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t\t\t//Mandamos a log el objeto de entrada\n\t\t\t\tLogHandler.debug(uid, this.getClass(), \"entradaAsistencia - Datos Entrada: \" + asistencia);\n\t\t\t\t//Variable de resultado\n\t\t\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\t try {\n\t\t \tif (asistencia.getIdEmpleado() == null) {\n\t\t \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n\t\t \t}\n\t\t \tif (asistencia.getUsuarioAlta() == null || asistencia.getUsuarioAlta().trim().isEmpty()) {\n\t\t \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario.\");\n\t\t \t}\n\t\t \tAsistenciaDAO dao = new AsistenciaDAO();\n\t\t \trespuesta = dao.entradaAsistencia(uid, asistencia);\n\n\t\t } catch (ExcepcionesCuadrillas ex) {\n\t\t\t\t\tLogHandler.error(uid, this.getClass(), \"entradaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\t\t\trespuesta.setUid(uid);\n\t\t\t\t\trespuesta.setEstatus(false);\n\t\t\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {\n\t\t\t\t\tLogHandler.error(uid, this.getClass(), \"entradaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\t\t\trespuesta.setUid(uid);\n\t\t\t\t\trespuesta.setEstatus(false);\n\t\t\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t\t\t}\n\t\t\t\tLogHandler.debug(uid, this.getClass(), \"entradaAsistencia - Datos Salida: \" + respuesta);\n\t\t\t\treturn respuesta;\n\t}",
"@Override\r\n public Assunto persistir(Assunto assunto) {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n em.getTransaction().begin();\r\n try {\r\n assunto = em.merge(assunto);\r\n em.getTransaction().commit();\r\n System.out.println(\"Registro Assunto gravado com sucesso\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return assunto;\r\n }",
"public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}",
"public void guardarEntrada(HashMap<String, Object> diccionario_datos){\n File file = new File(fichero_database);\n FileWriter writer = null;\n if(file.exists()){\n try{\n writer = new FileWriter(file, true);\n //crea un buffer o flujo intermedio antes de escribir directamente en el archivo\n BufferedWriter bfwriter = new BufferedWriter(writer);\n Iterator it = diccionario_datos.entrySet().iterator();\n while (it.hasNext()) {\n HashMap.Entry pair = (HashMap.Entry)it.next();\n bfwriter.write(pair.getKey() + \",\" );\n it.remove(); // para evitar ConcurrentModificationException\n }\n bfwriter.write(\"\\n\" );\n bfwriter.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (writer != null) {\n try {//cierra el flujo principal\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n }",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"public ArrayList<Mascota> obtenerDatos(){\n\n BaseDatos db = new BaseDatos(context);\n\n ArrayList<Mascota> aux = db.obtenerTodoslosContactos();\n\n if(aux.size()==0){\n insertarMascotas(db);\n aux = db.obtenerTodoslosContactos();\n }\n\n return aux;\n }",
"public void asociar(){\n abrirEntAntMaest();\n try{\n while(true){\n CuentaSerializada cuenta =\n (CuentaSerializada) entAntMaest.readObject();\n \n abrirEntTransaccion();\n empatarCuentaTransaccion(cuenta);\n cerrarEntTransaccion();\n agregarASalNuevoMaest(cuenta);\n }\n }\n catch(EOFException eOFException){\n System.out.printf(\"%nNo hay mas registros%n\");\n }\n catch(ClassNotFoundException classNotFoundException){\n System.err.println(\"Tipo de objeto invalido. Terminado.\");\n }\n catch(IOException iOException){\n System.err.println(\"Error al leer del archivo. Terminado.\");\n }\n }",
"@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 }",
"ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);",
"int insert(Movimiento record);",
"public String agregarCuenta(Cuenta cuenta) {\n String mensaje = \"\";\n try {\n PreparedStatement PrSt;\n String Query = \"INSERT INTO Cuenta VALUES(?,?,?,?)\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, cuenta.getCodigo());\n PrSt.setDate(2, cuenta.getCreacion());\n PrSt.setDouble(3, cuenta.getCredito());\n PrSt.setString(4, cuenta.getCodigo_cliente());\n int resultado = PrSt.executeUpdate();\n if (resultado > 0) {\n mensaje = \"Agregada Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente();\n } else {\n mensaje = \"Fallo al agregar Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente();\n }\n PrSt.close();\n } catch (SQLException e) {\n mensaje = \"Fallo al agregar Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente() + \" Error: \" + e.toString();\n }\n return mensaje;\n }",
"@Override\r\n\tprotected void process() {\n\t\tconsultarSustentoProxy.setCodigoActvidad(codigo_actividad);\r\n\t\tconsultarSustentoProxy.setCodigoCliente(codigo_cliente);\r\n\t\tconsultarSustentoProxy.setCodigoPLan(codigo_plan);\r\n\t\tconsultarSustentoProxy.execute();\r\n\t}",
"public void llenarDatosTransaccion(TransactionEntity entity, int indiceLayoutHose){\n //**********************************************************\n int contador = 0;\n Log.v(\"INICIO\",\"**********************************************************\");\n\n Log.v(\"Bomba\",String.valueOf(entity.getIdBomba()));\n //**********************************************************\n //EstadoActual\n int[] tramaEstadoActual = new int[1];\n contador = 0;\n for(int i = 8; i<= 8; i++){\n tramaEstadoActual[contador] = bufferRecepcion[i];\n contador++;\n }\n //String estadoActual = byteArrayToHexString(tramaEstadoActual,tramaEstadoActual.length);\n int estadoActual = Integer.parseInt(byteArrayToHexIntGeneral(tramaEstadoActual,1));\n entity.setEstadoActual(estadoActual);\n\n Log.v(\"Estado\",String.valueOf(entity.getEstadoActual()));\n cambioEstado(indiceLayoutHose, estadoActual);\n\n //**********************************************************\n //Capturar Nro Transaccion\n int[] tramaNroTransaccion = new int[3];\n contador = 0;\n for(int i = 9; i<= 11; i++){\n tramaNroTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n String nroTransaccion = \"\" + byteArrayToHexInt(tramaNroTransaccion,tramaNroTransaccion.length);\n entity.setNumeroTransaccion(nroTransaccion);\n Log.v(\"Nro. Transacción\",entity.getNumeroTransaccion());\n\n //**********************************************************\n //Capturar Fecha Inicio\n int[] tramaFechaInicio = new int[1];\n tramaFechaInicio[0] = bufferRecepcion[12];\n String dia = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[13];\n String mes = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[14];\n String anio = \"20\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[17];\n String hora = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[16];\n String minuto = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[15];\n String segundo = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n\n String fechaInicio = dia + \"-\" + mes + \"-\" + anio + \"\";\n String horaInicio = hora + \":\" + minuto + \":\" + segundo;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaInicio(fechaInicio);\n entity.setHoraInicio(horaInicio);\n Log.v(\"Fecha Inicio\",entity.getFechaInicio());\n Log.v(\"Hora Inicio\",entity.getHoraInicio());\n\n //**********************************************************\n //Capturar Turno\n int[] tramaTurno = new int[2];\n contador = 0;\n for(int i = 18; i<= 19; i++){\n tramaTurno[contador] = bufferRecepcion[i];\n contador++;\n }\n int turno = byteArrayToHexInt2(tramaTurno,tramaTurno.length);\n entity.setTurno(turno);\n Log.v(\"Turno\",\"\"+entity.getTurno());\n\n //**********************************************************\n //Numero de Tanque\n int[] tramaNumeroTanque = new int[1];\n contador = 0;\n for(int i = 21; i<= 21; i++){\n tramaNumeroTanque[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int numeroTanque = Integer.parseInt(byteArrayToHexIntGeneral(tramaNumeroTanque,1));\n entity.setNumeroTanque(numeroTanque);\n\n Log.v(\"Tanque\",\"\"+entity.getNumeroTanque());\n\n //**********************************************************\n //Tipo de Vehiculo\n int[] tramaTipoVehiculo = new int[1];\n contador = 0;\n for(int i = 22; i<= 22; i++){\n tramaTipoVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoVehiculo = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoVehiculo,1));\n entity.setTipoVehiculo(tipoVehiculo);\n\n Log.v(\"Tipo Vehiculo\",\"\"+entity.getTipoVehiculo());\n\n\n //**********************************************************\n //Capturar IdVehiculo\n int[] tramaIdVehiculo = new int[8];\n contador = 0;\n for(int i = 23; i<= 30; i++){\n tramaIdVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdVehiculo = hexToAscii(byteArrayToHexString(tramaIdVehiculo,tramaIdVehiculo.length));\n entity.setIdVehiculo(IdVehiculo);\n\n Log.v(\"IdVehiculo\",entity.getIdVehiculo());\n\n //**********************************************************\n //Capturar Placa\n int[] tramaPlaca = new int[10];\n contador = 0;\n for(int i = 31; i<= 40; i++){\n tramaPlaca[contador] = bufferRecepcion[i];\n contador++;\n }\n String placa = hexToAscii(byteArrayToHexString(tramaPlaca,tramaPlaca.length));\n entity.setPlaca(placa);\n\n Log.v(\"Placa\",entity.getPlaca());\n\n //**********************************************************\n //Capturar Kilometro\n\n int[] tramaKilometroParteEntera = new int[3];\n contador = 0;\n for(int i = 41; i<= 43; i++){\n tramaKilometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteEntera = byteArrayToHexInt(tramaKilometroParteEntera,tramaKilometroParteEntera.length);\n\n int[] tramaKilometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 44; i<= 44; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n\n //double kilometro = kilometroParteEntera + kilometroParteDecimal*0.1;\n double kilometro = Double.valueOf(kilometroParteEntera + \".\"+kilometroParteDecimal);\n entity.setKilometraje(\"\"+kilometro);\n\n Log.v(\"Kilometro\",\"\"+kilometro);\n\n //**********************************************************\n //Capturar Horometro\n\n int[] tramaHorometroParteEntera = new int[3];\n contador = 0;\n for(int i = 45; i<= 47; i++){\n tramaHorometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int horometroParteEntera = byteArrayToHexInt(tramaHorometroParteEntera,tramaHorometroParteEntera.length);\n\n int[] tramaHorometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 48; i<= 48; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n\n double horometro = 0.0;\n\n if(tramaHorometroParteDecimal[0]==255){\n horometro = horometroParteEntera/10D;\n }else{\n int horometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n //horometro = horometroParteEntera + horometroParteDecimal*0.1;\n horometro = Double.valueOf(horometroParteEntera + \".\"+horometroParteDecimal);\n }\n\n entity.setHorometro(\"\"+horometro);\n\n Log.v(\"Horometro\",\"\"+horometro);\n\n //**********************************************************\n //Capturar IdConductor\n int[] tramaIdConductor = new int[8];\n contador = 0;\n for(int i = 49; i<= 56; i++){\n tramaIdConductor[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdConductor = hexToAscii(byteArrayToHexString(tramaIdConductor,tramaIdConductor.length));\n entity.setIdConductor(IdConductor);\n\n Log.v(\"IdConductor\",entity.getIdConductor());\n\n //**********************************************************\n //Capturar IdOperador\n int[] tramaIdOperador = new int[8];\n contador = 0;\n for(int i = 57; i<= 64; i++){\n tramaIdOperador[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdOperador = hexToAscii(byteArrayToHexString(tramaIdOperador,tramaIdOperador.length));\n entity.setIdOperador(IdOperador);\n\n Log.v(\"IdOperador\",entity.getIdOperador());\n\n //**********************************************************\n //Tipo de Transacción\n int[] tramaTipoTransaccion = new int[1];\n contador = 0;\n for(int i = 65; i<= 65; i++){\n tramaTipoTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTransaccion = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTransaccion,1));\n entity.setTipoTransaccion(tipoTransaccion);\n\n Log.v(\"Tipo Transacción\",\"\"+entity.getTipoTransaccion());\n\n //**********************************************************\n //Capturar Latitud\n int[] tramaLatitud = new int[12];\n contador = 0;\n for(int i = 66; i<= 77; i++){\n tramaLatitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String latitud = hexToAscii(byteArrayToHexString(tramaLatitud,tramaLatitud.length));\n entity.setLatitud(latitud);\n\n Log.v(\"Latitud\",entity.getLatitud());\n\n //**********************************************************\n //Capturar Longitud\n int[] tramaLongitud = new int[12];\n contador = 0;\n for(int i = 78; i<= 89; i++){\n tramaLongitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String longitud = hexToAscii(byteArrayToHexString(tramaLongitud,tramaLongitud.length));\n entity.setLongitud(longitud);\n\n Log.v(\"Longitud\",entity.getLongitud());\n\n //**********************************************************\n //Capturar Tipo Error Pre-Seteo\n int[] tramaTipoErrorPreseteo = new int[1];\n contador = 0;\n for(int i = 90; i<= 90; i++){\n tramaTipoErrorPreseteo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoErrorPreseteo= Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoErrorPreseteo,1));\n entity.setTipoErrorPreseteo(tipoErrorPreseteo);\n\n Log.v(\"Tipo Error Preseteo\",\"\"+entity.getTipoErrorPreseteo());\n\n //**********************************************************\n //Capturar Volumen Autorizado\n int[] tramaVolumenAutorizado = new int[2];\n contador = 0;\n for(int i = 91; i<= 92; i++){\n tramaVolumenAutorizado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAutorizado = byteArrayToHexInt2(tramaVolumenAutorizado,tramaVolumenAutorizado.length);\n entity.setVolumenAutorizado(volumenAutorizado);\n Log.v(\"Volumen Autorizado\",\"\"+entity.getVolumenAutorizado());\n\n //**********************************************************\n //Capturar Volumen Aceptado\n int[] tramaVolumenAceptado = new int[2];\n contador = 0;\n for(int i = 93; i<= 94; i++){\n tramaVolumenAceptado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAceptado = byteArrayToHexInt2(tramaVolumenAceptado,tramaVolumenAceptado.length);\n entity.setVolumenAceptado(volumenAceptado);\n Log.v(\"Volumen Aceptado\",\"\"+entity.getVolumenAceptado());\n\n //**********************************************************\n //Capturar Código Cliente\n int[] tramaCodigoCliente = new int[2];\n contador = 0;\n for(int i = 100; i<= 101; i++){\n tramaCodigoCliente[contador] = bufferRecepcion[i];\n contador++;\n }\n int codigoCliente = byteArrayToHexInt2(tramaCodigoCliente,tramaCodigoCliente.length);\n entity.setCodigoCliente(codigoCliente);\n Log.v(\"Codigo Cliente\",\"\"+entity.getCodigoCliente());\n\n //**********************************************************\n //Capturar codigo area\n int[] tramaCodigoArea = new int[1];\n contador = 0;\n for(int i = 102; i<= 102; i++){\n tramaCodigoArea[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int CodigoArea = Integer.parseInt(byteArrayToHexIntGeneral(tramaCodigoArea,1));\n entity.setCodigoArea(CodigoArea);\n\n Log.v(\"Codigo Area\",\"\"+entity.getCodigoArea());\n\n //**********************************************************\n //Capturar tipo TAG\n int[] tramaTipoTAG = new int[1];\n contador = 0;\n for(int i = 103; i<= 103; i++){\n tramaTipoTAG[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTAG = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTAG,1));\n entity.setTipoTag(tipoTAG);\n\n Log.v(\"Tipo TAG\",\"\"+entity.getTipoTag());\n\n //**********************************************************\n //Capturar Volumen Abastecido\n int[] tramaVolumen = new int[9];\n contador = 0;\n for(int i = 104; i<= 112; i++){\n tramaVolumen[contador] = bufferRecepcion[i];\n contador++;\n }\n String volumen = \"\"+ hexToAscii(byteArrayToHexString(tramaVolumen,tramaVolumen.length));\n String[] parts = volumen.split(\"\\\\.\");\n if(parts.length > 1) {\n volumen = parts[0] + \".\" + parts[1].substring(0,(0+entity.getCantidadDecimales()));\n }\n\n entity.setVolumen(volumen);\n\n Log.v(\"Volumen Abastecido\",entity.getVolumen());\n\n //**********************************************************\n //Capturar Temperatura\n int[] tramaTemperatura = new int[5];\n contador = 0;\n for(int i = 113; i<= 117; i++){\n tramaTemperatura[contador] = bufferRecepcion[i];\n contador++;\n }\n String temperatura = \"\" + hexToAscii(byteArrayToHexString(tramaTemperatura,tramaTemperatura.length));\n temperatura = temperatura.substring(0,temperatura.length()-1);\n entity.setTemperatura(temperatura);\n\n Log.v(\"Temperatura\",entity.getTemperatura());\n\n //**********************************************************\n //Capturar Fecha Fin\n int[] tramaFechaFin = new int[1];\n tramaFechaFin[0] = bufferRecepcion[118];\n String diaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[119];\n String mesFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[120];\n String anioFin = \"20\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[123];\n String horaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[122];\n String minutoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[121];\n String segundoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n\n String fechaFin = diaFin + \"-\" + mesFin + \"-\" + anioFin + \"\" ;\n String horaFin1 = horaFin + \":\" + minutoFin + \":\" + segundoFin;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaFin(fechaFin);\n entity.setHoraFin(horaFin1);\n\n Log.v(\"Fecha Fin\",entity.getFechaFin());\n Log.v(\"Hora Fin\",entity.getHoraFin());\n\n //**********************************************************\n //Capturar Tipo de Cierre\n int[] tramaTipoCierre = new int[1];\n contador = 0;\n for(int i = 124; i<= 124; i++){\n tramaTipoCierre[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoCierre = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoCierre,1));\n entity.setTipoCierre(tipoCierre);\n\n Log.v(\"Tipo Cierre\",\"\"+entity.getTipoCierre());\n\n txt_galones = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_galones);\n txt_ultimo_ticket = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket);\n txt_placa = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_placa);\n txt_producto = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_producto);\n txt_ultimo_galon_p2 = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_galon_p2);\n txt_ultimo_ticket_p2= layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket_p2);\n\n txt_producto.setText(entity.getNombreProducto());\n txt_placa.setText(entity.getPlaca());\n txt_galones.setText(entity.getVolumen());\n txt_ultimo_galon_p2.setText(entity.getVolumen());\n txt_ultimo_ticket.setText(entity.getNumeroTransaccion());\n txt_ultimo_ticket_p2.setText(entity.getNumeroTransaccion());\n\n\n guardarTransaccionBD(entity);\n\n }",
"private byte[] processData(String peticion) {\n\t\t\n\t\tString respuesta = \"\";\n\t\t\n\t\tswitch (peticion) {\n\t\t\t\n\t\t\tcase \"noticias\": respuesta = \"¡Por fin la vacuna ya está en España!\"; break;\n\t\t\tcase \"hora\": respuesta = getFecha(); break;\n\t\t\tcase \"aleatorio\": respuesta = Double. toString(Math.random()*10); break;\n\t\t\tcase \"cerrar\": respuesta = \"Adios\"; break;\n\t\t\tcase \"cerrarServidor\": respuesta = \"Adios\"; break;\t\t\t\n\t\t\tdefault: respuesta = \"petición desconocida\";\n\t\t}\n\t\t\n\t\treturn respuesta.getBytes();\n\t}",
"public boolean Actualizar(String Usuario, String NombreMaterial, String Fecha, Integer NCampo, String NuevoCampo) throws IOException\n {\n System.out.println(\"Ëntro\");\n List<String> ListaLineaEliminar = BuscarIndice(Usuario, NombreMaterial, Fecha);\n if(ListaLineaEliminar.get(0) == \"404\"){ return false; }\n else{\n String LineaEliminar = ListaLineaEliminar.get(0);\n System.out.println(LineaEliminar);\n String[] Campos = LineaEliminar.split(\"\\\\|\");\n String NMaestro = Campos[1].substring(0,1);\n Integer NMaestroLinea = Integer.parseInt(Campos[1].substring(2,3));\n String L = ObtenerLinea(NMaestroLinea, \"C:\\\\MEIA\\\\Donaciones_\" + NMaestro + \".txt\");\n String[] CamposL = L.split(\"\\\\|\");\n Boolean Existe = Eliminar(Usuario, NombreMaterial, Fecha);\n System.out.println(Usuario);\n System.out.println(NombreMaterial);\n System.out.println(Fecha);\n if(NCampo == 0){\n Insertar(NuevoCampo, CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 1){\n Insertar(CamposL[0], CamposL[2], NuevoCampo, Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 2){\n Insertar(CamposL[0], NuevoCampo, CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 3){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(NuevoCampo), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 4){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), NuevoCampo, CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 5){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], NuevoCampo, CamposL[6]);\n return true;\n }\n else if(NCampo == 6){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], NuevoCampo);\n return true;\n }\n else{ return false; }\n }\n }",
"private void EnviarDatos(String user, String fecha, String pasos){\n\r\n HttpClient httpclient = new DefaultHttpClient();\r\n //Utilizamos la HttpPost para enviar lso datos\r\n //A la url donde se encuentre nuestro archivo receptor\r\n\r\n\r\n\r\n\r\n HttpPost httppost2 = new HttpPost(\"http://mets.itisol.com.mx/paciente/insertaActividad\");\r\n try {\r\n //Añadimos los datos a enviar en este caso solo uno\r\n //que le llamamos de nombre 'a'\r\n //La segunda linea podría repetirse tantas veces como queramos\r\n //siempre cambiando el nombre ('a')\r\n List<NameValuePair> postValues = new ArrayList<NameValuePair>(2);\r\n postValues.add(new BasicNameValuePair(\"usuario\", user));\r\n\r\n postValues.add(new BasicNameValuePair(\"fecha\", fecha));\r\n Log.d(\"la fecha es\", \"\" + cambiaFecha(fecha));\r\n postValues.add(new BasicNameValuePair(\"pasos\", pasos));\r\n\r\n // postValues.add(new BasicNameValuePair(\"tipo\", \"1\"));\r\n\r\n //Encapsulamos\r\n httppost2.setEntity(new UrlEncodedFormEntity(postValues));\r\n //Lanzamos la petición\r\n HttpResponse respuesta2 = httpclient.execute(httppost2);\r\n //Conectamos para recibir datos de respuesta\r\n HttpEntity entity2 = respuesta2.getEntity();\r\n //Creamos el InputStream como su propio nombre indica\r\n InputStream is2 = entity2.getContent();\r\n //Limpiamos el codigo obtenido atraves de la funcion\r\n //StreamToString explicada más abajo\r\n String resultado2= StreamToString(is2);\r\n\r\n //Enviamos el resultado LIMPIO al Handler para mostrarlo\r\n Message sms2 = new Message();\r\n sms2.obj = resultado2;\r\n\r\n puente.sendMessage(sms2);\r\n }catch (IOException e) {\r\n //TODO Auto-generated catch block\r\n }\r\n\r\n }",
"int insert(ParUsuarios record);",
"public static void guardarEstudianteBD(Estudiante estudiante) {\r\n //metimos este metodo dentro de la base de datos \r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n //ingresamos la direccion donde se encuntra la base de datos \r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.println(\"Conexion establecida!\");\r\n Statement sentencia = (Statement) conexion.createStatement();\r\n int insert = sentencia.executeUpdate(\"insert into estudiante values(\"\r\n + \"'\" + estudiante.getNro_de_ID()\r\n + \"','\" + estudiante.getNombres()\r\n + \"','\" + estudiante.getApellidos()\r\n + \"','\" + estudiante.getLaboratorio()\r\n + \"','\" + estudiante.getCarrera()\r\n + \"','\" + estudiante.getModulo()\r\n + \"','\" + estudiante.getMateria()\r\n + \"','\" + estudiante.getFecha()\r\n + \"','\" + estudiante.getHora_Ingreso()\r\n + \"','\" + estudiante.getHora_Salida()\r\n + \"')\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.println(\"Error en la conexion\" + ex);\r\n }\r\n }",
"private void limpiarDatos() {\n\t\t\n\t}",
"private void getTempRojoBhcs(){\n mTempRojoBhcs = estudioAdapter.getListaTempRojoBhcSinEnviar();\n //ca.close();\n }",
"public void guardarDatos() throws Exception {\r\n try {\r\n FormularioUtil.setUpperCase(groupboxEditar);\r\n if (validarForm()) {\r\n\r\n Admision admision = ((Admision) lbxNro_ingreso\r\n .getSelectedItem().getValue());\r\n\r\n Hospitalizacion hospitalizacion = new Hospitalizacion();\r\n hospitalizacion.setCodigo_empresa(empresa.getCodigo_empresa());\r\n hospitalizacion.setCodigo_sucursal(sucursal\r\n .getCodigo_sucursal());\r\n hospitalizacion.setNro_factura(tbxNro_factura.getValue());\r\n hospitalizacion = getServiceLocator()\r\n .getHospitalizacionService().consultar(hospitalizacion);\r\n if (hospitalizacion == null) {\r\n hospitalizacion = new Hospitalizacion();\r\n hospitalizacion.setCodigo_empresa(empresa\r\n .getCodigo_empresa());\r\n hospitalizacion.setCodigo_sucursal(sucursal\r\n .getCodigo_sucursal());\r\n hospitalizacion.setNro_factura(tbxNro_factura.getValue());\r\n }\r\n hospitalizacion.setTipo_identificacion((String) datos_seleccion\r\n .get(\"tipo_identificacion\"));\r\n hospitalizacion.setNro_identificacion(tbxNro_identificacion\r\n .getValue());\r\n hospitalizacion\r\n .setCodigo_administradora((String) datos_seleccion\r\n .get(\"codigo_administradora\"));\r\n hospitalizacion.setId_plan((String) datos_seleccion\r\n .get(\"id_plan\"));\r\n hospitalizacion.setNro_ingreso(admision.getNro_ingreso());\r\n hospitalizacion.setCodigo_prestador(tbxCodigo_prestador\r\n .getValue());\r\n hospitalizacion.setVia_ingreso(lbxVia_ingreso.getSelectedItem()\r\n .getValue().toString());\r\n hospitalizacion.setFecha_ingreso(new Timestamp(\r\n dtbxFecha_ingreso.getValue().getTime()));\r\n hospitalizacion.setNumero_autorizacion(tbxNumero_autorizacion\r\n .getValue());\r\n hospitalizacion.setCausa_externa((String) lbxCausa_externa\r\n .getSelectedItem().getValue().toString());\r\n hospitalizacion.setEstado_salida((String) lbxEstado_salida\r\n .getSelectedItem().getValue().toString());\r\n hospitalizacion.setFecha_egreso(new Timestamp(dtbxFecha_egreso\r\n .getValue().getTime()));\r\n hospitalizacion\r\n .setCodigo_diagnostico_principal(tbxCodigo_diagnostico_principal\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico1(tbxCodigo_diagnostico1\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico2(tbxCodigo_diagnostico2\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico3(tbxCodigo_diagnostico3\r\n .getValue());\r\n hospitalizacion.setComplicacion(tbxComplicacion.getValue());\r\n hospitalizacion.setCausa_muerte(tbxCausa_muerte.getValue());\r\n\r\n hospitalizacion.setCreacion_date(new Timestamp(\r\n new GregorianCalendar().getTimeInMillis()));\r\n hospitalizacion.setUltimo_update(new Timestamp(\r\n new GregorianCalendar().getTimeInMillis()));\r\n hospitalizacion.setCreacion_user(usuarios.getCodigo()\r\n .toString());\r\n hospitalizacion.setUltimo_user(usuarios.getCodigo().toString());\r\n\r\n String complemento = \"\";\r\n\r\n if (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n getServiceLocator().getHospitalizacionService().crear(\r\n hospitalizacion);\r\n if (FACTURACION_RIPS != null) {\r\n this.detach();\r\n } else {\r\n accionForm(true, \"registrar\");\r\n }\r\n } else {\r\n int result = getServiceLocator()\r\n .getHospitalizacionService().actualizar(\r\n hospitalizacion);\r\n if (result == 0) {\r\n throw new Exception(\r\n \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\");\r\n }\r\n }\r\n\r\n if (ionGuardar != null) {\r\n ionGuardar.guardar();\r\n } else {\r\n Messagebox.show(\r\n \"Los datos se guardaron satisfactoriamente.\"\r\n + complemento, \"Informacion? ..\",\r\n Messagebox.OK, Messagebox.INFORMATION);\r\n tbxNro_factura.setValue(hospitalizacion.getNro_factura());\r\n tbxAccion.setValue(\"modificar\");\r\n }\r\n\r\n if (this.getParent() instanceof Facturacion_ripsAction) {\r\n this.detach();\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n MensajesUtil.mensajeError(e, \"\", this);\r\n }\r\n }",
"private void saveEncLactancias(String estado) {\n int c = mLactanciasMaternas.size();\n for (LactanciaMaterna enclactancia : mLactanciasMaternas) {\n enclactancia.getMovilInfo().setEstado(estado);\n estudioAdapter.updateLacMatSent(enclactancia);\n publishProgress(\"Actualizando encuestas lactancia\", Integer.valueOf(mLactanciasMaternas.indexOf(enclactancia)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public void recargarDatos( ) {\n\t\tPAC_SHWEB_PROVEEDORES llamadaProv = null;\n\t\ttry {\n\t\t\tllamadaProv = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaCom = null;\n\n\t\ttry {\n\t\t\trespuestaCom = llamadaProv.ejecutaPAC_SHWEB_PROVEEDORES__F_COMUNICADOS_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t// Mostramos el estado del expediente\n\t\tPAC_SHWEB_PROVEEDORES llamada = null;\n\t\ttry {\n\t\t\tllamada = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuesta = null;\n\t\ttry {\n\t\t\trespuesta = llamada.ejecutaPAC_SHWEB_PROVEEDORES__F_ESTADO_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t\tMap<String, Object> retorno = new HashMap<String, Object>(respuesta);\n\n\t\t\tUI.getCurrent().getSession().setAttribute(\"estadoExpediente\",retorno.get(\"ESTADO\").toString());\n\t\t\t\n\t\t\tprovPantallaConsultaExpedienteInicial.setCaption(\"GESTIÓN DEL EXPEDIENTE Nº \" + UI.getCurrent().getSession().getAttribute(\"expediente\")\n\t\t\t\t\t+ \" ( \" + \n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\") + \" ) \");\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\t\n\t\t\n\t\t// Maestro comunicados\n\n\t\tWS_AMA llamadaAMA = null;\n\t\ttry {\n\t\t\tllamadaAMA = new WS_AMA(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaMaestro = null;\n\t\t\n\t\t//System.out.println(\"Llamammos maestro comunicados: \" + UI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1));;\n\t\ttry {\n\t\t\t// pPUSUARIO, pORIGEN, pTPCOMUNI, pTPUSUARIO, pESTADO)\n\t\t\t\n\t\t\trespuestaMaestro = llamadaAMA.ejecutaWS_AMA__MAESTRO_COMUNICADOS(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnull,\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\").toString()\n\t\t\t\t\t);\t\t\t\n\n\t\t\t\n\t\t\tMap<String, Object> retornoMaestro = new HashMap<String, Object>(respuestaMaestro);\n\t\t\tList<Map> valorMaestro = (List<Map>) retornoMaestro.get(\"COMUNICADOS\");\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",valorMaestro);\n\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",null);\n\t\t}\n\t\t\n\t\t// \t\n\t\t\n\t\t\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\t\t/*if ( !ValidarComunicado.EsValido(\"CA\") && !ValidarComunicado.EsValido(\"FT\") ) {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(true);\n\n\t\t\t\n\t\t\t\n\t\t}*/\n\t\t// Mostramos botonera de cerrar expediente\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\n\t}",
"@Override\n public Call<ResponseBody> registarMoviemientoEmpleado(@Body RootMovimiento movimiento) {\n movimiento.setId_dispositivo(Settings.Secure.getString(this.context.getContentResolver(), Settings.Secure.ANDROID_ID));\n return this.serviceInterface.registarMoviemientoEmpleado(movimiento);\n }",
"@Override\r\n\tprotected String requestText() {\n\t\tGuardarVtaCeroMotivoRequest guardarVtaCeroMotivoRequest = new GuardarVtaCeroMotivoRequest();\r\n\t\tguardarVtaCeroMotivoRequest.setAnio(Anio);\r\n\t\tguardarVtaCeroMotivoRequest.setCodCliente(codCliente);\r\n\t\tguardarVtaCeroMotivoRequest.setCodDeposito(codDeposito);\r\n\t\tguardarVtaCeroMotivoRequest.setMes(Mes);\r\n\t\tguardarVtaCeroMotivoRequest.setMotivo(Motivo);\r\n\t\tguardarVtaCeroMotivoRequest.setObservacion(observacion);\r\n\t\tguardarVtaCeroMotivoRequest.setSemana(Semana);\r\n\t\tguardarVtaCeroMotivoRequest.setUsuario(Usuario);\r\n\t\tString request = JSONHelper.serializar(guardarVtaCeroMotivoRequest);\r\n\t\treturn request;\r\n\t}",
"public String guardar()\r\n/* 104: */ {\r\n/* 105: */ try\r\n/* 106: */ {\r\n/* 107:132 */ this.servicioDimensionContable.guardar(this.dimensionContable);\r\n/* 108:133 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 109:134 */ setEditado(false);\r\n/* 110:135 */ cargarDatos();\r\n/* 111: */ }\r\n/* 112: */ catch (Exception e)\r\n/* 113: */ {\r\n/* 114:137 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 115:138 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 116: */ }\r\n/* 117:140 */ return \"\";\r\n/* 118: */ }",
"public String cambiarEstado() {\n\t\ttry {\n\t\t\tMensaje.crearMensajeINFO(managergest.cambioEstadoItem(getOfertadelsita().getOferId()));\n\t\t\tgetListaOferta().clear();\n\t\t\tgetListaOferta().addAll(managergest.findAllofertasOrdenadas());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"\";\n\t}",
"@Override\r\n\tprotected String requestText() {\n\t\tGuardarSustentoRequest guardarSustentoRequest = new GuardarSustentoRequest();\r\n\t\tguardarSustentoRequest.setCodigoActvidad(codigoActvidad);\r\n\t\tguardarSustentoRequest.setCodigoCliente(codigoCliente);\r\n\t\tguardarSustentoRequest.setCodigoPLan(codigoPLan);\r\n\t\tguardarSustentoRequest.setDescripcionActividad(descripcionActividad);\r\n\t\tguardarSustentoRequest.setFechaVisita(fechaVisita);\r\n\t\tguardarSustentoRequest.setTipoActividad(tipoActividad);\r\n\t\tguardarSustentoRequest.setUsuario(usuario);\r\n\t\tString request = JSONHelper.serializar(guardarSustentoRequest);\r\n\t\treturn request;\r\n\t}",
"private void agregarASalNuevoMaest(CuentaSerializada cuenta){\n try{\n salNuevoMaest.writeObject(cuenta);\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 }",
"public void enviarValoresCabecera(){\n }",
"public void guardarDestruccion() {\n try {\n produccion.setIdMarca(opcionMarca);\n produccion.setIdPlantaProd(opcionPlanta);\n produccion.setIdPaisOrigen(opcionOrigen);\n produccion.setIdTipoRetro(opcionTipo);\n produccion.setFechProduccion(new Date());\n produccion.setDescPaisOrigen(desperdiciosHelper.getNombrePais());\n\n if (!habilitarBtnValidarProd()) {\n if (produccion != null) {\n produccion = produccionService.guardaDestruccion(produccion);\n super.msgInfo(MSGEXITOVALIDAPROD);\n desperdiciosHelper.setDeshabilitaBtnValidarProd(true);\n desperdiciosHelper.setDeshabilitaCargaArchivo(false);\n } else {\n super.msgError(MSGERRORVALIDARPROD);\n }\n }\n } catch (ProduccionServiceException e) {\n LOGGER.error(\"ERROR: Al guardar los datos de produccion\" + e.getMessage(), e);\n }\n }",
"public void guardar(Modelo modelo) throws SipsaExcepcion;",
"@Override\n protected void onPostExecute(HttpResponse result) {\n if (result != null)\n\t\t\ttry {\n\t\t\t\tLog.i(\"Conexao\", \"Dentrodopost\");\n\t\t\t\t//result.getEntity().writeTo(new FileOutputStream(f));\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} \n }",
"private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }",
"public String cargarDatos()\r\n/* 514: */ {\r\n/* 515:540 */ return null;\r\n/* 516: */ }",
"@Override\n protected Response doInsert(JSONObject data) {\n return null;\n }"
] |
[
"0.6108867",
"0.6089659",
"0.59963566",
"0.59516066",
"0.59346324",
"0.59239954",
"0.5902984",
"0.5900754",
"0.580848",
"0.57809454",
"0.5766452",
"0.57644504",
"0.5763113",
"0.57480466",
"0.57415074",
"0.5709575",
"0.57050407",
"0.5672679",
"0.56660414",
"0.5664272",
"0.56620985",
"0.56539875",
"0.5652867",
"0.5640711",
"0.5639574",
"0.5621628",
"0.5621237",
"0.5618425",
"0.56115556",
"0.5598985",
"0.55770415",
"0.557137",
"0.55665624",
"0.5561801",
"0.55481106",
"0.5547554",
"0.5545583",
"0.55434704",
"0.5530123",
"0.55275875",
"0.5525662",
"0.5524151",
"0.5519947",
"0.55188763",
"0.5511981",
"0.5506241",
"0.55051416",
"0.5503129",
"0.55030775",
"0.54881",
"0.54847366",
"0.5480024",
"0.54506034",
"0.5445036",
"0.54418904",
"0.5441591",
"0.54324824",
"0.5428266",
"0.54233485",
"0.5421697",
"0.5421027",
"0.54141116",
"0.54127306",
"0.5408961",
"0.54024637",
"0.5396911",
"0.53968513",
"0.53895",
"0.53855276",
"0.53819346",
"0.53780955",
"0.53749156",
"0.5370826",
"0.5370472",
"0.53698844",
"0.5368954",
"0.53641844",
"0.5346846",
"0.53458077",
"0.53453165",
"0.53430814",
"0.5335295",
"0.5334208",
"0.5333388",
"0.53326344",
"0.53292847",
"0.53247714",
"0.53199583",
"0.5319406",
"0.53191096",
"0.5317003",
"0.53164697",
"0.53157854",
"0.53155106",
"0.5312124",
"0.53046227",
"0.5300779",
"0.5298598",
"0.5297596",
"0.52974415"
] |
0.5660924
|
21
|
Guarda el contenido de la trama retornada a la base de datos
|
public Integer guardarTramaRepTotalBD(Map<String, String> parametros) {
try {
if (!DBPinpad.guardarTramaRepTotPinpadMC(parametros.get("response_code"), parametros.get("message"),
parametros.get("ecr_currency_code"),
parametros.get("ecr_aplication"),
parametros.get("ecr_transaccion"), parametros.get("merchant_id"),
parametros.get("print_data"), VariablesCaja.vNumPedVta))
return VariablesPinpad.RET_NOK;
} catch (Exception e) {
log.debug(e.toString());
return VariablesPinpad.RET_NOK;
}
return VariablesPinpad.RET_OK;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_atencion_embarazada his_atencion_embarazada = new His_atencion_embarazada();\r\n\t\t\t\this_atencion_embarazada.setCodigo_empresa(empresa\r\n\t\t\t\t\t\t.getCodigo_empresa());\r\n\t\t\t\this_atencion_embarazada.setCodigo_sucursal(sucursal\r\n\t\t\t\t\t\t.getCodigo_sucursal());\r\n\t\t\t\this_atencion_embarazada.setCodigo_historia(tbxCodigo_historia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFecha_inicial(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_inicial.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCodigo_eps(tbxCodigo_eps.getValue());\r\n\t\t\t\this_atencion_embarazada.setCodigo_dpto(lbxCodigo_dpto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCodigo_municipio(lbxCodigo_municipio\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setIdentificacion(tbxIdentificacion\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDireccion(tbxMotivo.getValue());\r\n\t\t\t\this_atencion_embarazada.setTelefono(tbxTelefono.getValue());\r\n\t\t\t\this_atencion_embarazada.setSeleccion(rdbSeleccion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setGestaciones(lbxGestaciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPartos(lbxPartos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCesarias(lbxCesarias\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAbortos(lbxAbortos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEspontaneo(lbxEspontaneo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setProvocado(lbxProvocado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNacido_muerto(lbxNacido_muerto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPrematuro(lbxPrematuro\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_menos(lbxHijos_menos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_mayor(lbxHijos_mayor\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMalformado(lbxMalformado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHipertension(lbxHipertension\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_ultimo_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_ultimo_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCirugia(lbxCirugia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setOtro_antecedente(tbxOtro_antecedente\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemoclasificacion(lbxHemoclasificacion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRh(lbxRh.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_atencion_embarazada.setImc(tbxImc.getValue());\r\n\t\t\t\this_atencion_embarazada.setTa(tbxTa.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc(tbxFc.getValue());\r\n\t\t\t\this_atencion_embarazada.setFr(tbxFr.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemperatura(tbxTemperatura\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCroomb(tbxCroomb.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setFecha_ultima_mestruacion(new Timestamp(\r\n\t\t\t\t\t\t\t\tdtbxFecha_ultima_mestruacion.getValue()\r\n\t\t\t\t\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_atencion_embarazada.setFecha_probable_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_probable_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setEdad_gestacional(tbxEdad_gestacional\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setControl(lbxControl.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNum_control(tbxNum_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFetales(lbxFetales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFiebre(lbxFiebre.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido(lbxLiquido.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFlujo(lbxFlujo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEnfermedad(lbxEnfermedad\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_enfermedad(tbxCual_enfermedad\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo(lbxCigarrillo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol(lbxAlcohol.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_alcohol(tbxCual_alcohol\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDroga(lbxDroga.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_droga(tbxCual_droga.getValue());\r\n\t\t\t\this_atencion_embarazada.setViolencia(lbxViolencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_violencia(tbxCual_violencia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoide(lbxToxoide.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setDosis(lbxDosis.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_gestion(tbxObservaciones_gestion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setAltura_uterina(tbxAltura_uterina\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCorelacion(chbCorelacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEmbarazo_multiple(chbEmbarazo_multiple.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setTrasmision_sexual(chbTrasmision_sexual.isChecked());\r\n\t\t\t\this_atencion_embarazada.setAnomalia(rdbAnomalia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEdema_gestion(rdbEdema_gestion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPalidez(rdbPalidez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulciones(rdbConvulciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConciencia(rdbConciencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCavidad_bucal(rdbCavidad_bucal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto(tbxHto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb(tbxHb.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoplasma(tbxToxoplasma.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl1(tbxVdrl1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl2(tbxVdrl2.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih1(tbxVih1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih2(tbxVih2.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb(tbxHepb.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtro(tbxOtro.getValue());\r\n\t\t\t\this_atencion_embarazada.setEcografia(tbxEcografia.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_gestion(rdbClasificacion_gestion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setContracciones(lbxContracciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setNum_contracciones(lbxNum_contracciones\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHemorragia(lbxHemorragia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_vaginal(lbxLiquido_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setColor_liquido(tbxColor_liquido\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDolor_cabeza(lbxDolor_cabeza\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVision(lbxVision.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulcion(lbxConvulcion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_parto(tbxObservaciones_parto\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setContracciones_min(tbxContracciones_min.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_fera(tbxFc_fera.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDilatacion_cervical(tbxDilatacion_cervical\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setPreentacion(rdbPreentacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setOtra_presentacion(tbxOtra_presentacion.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdema(rdbEdema.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemorragia_vaginal(lbxHemorragia_vaginal\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto_parto(tbxHto_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb_parto(tbxHb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb_parto(tbxHepb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl_parto(tbxVdrl_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih_parto(tbxVih_parto.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_parto(rdbClasificacion_parto\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_nac(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_nac.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setIdentificacion_nac(tbxIdentificacion_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setSexo(lbxSexo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso_nac(tbxPeso_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla_nac(tbxTalla_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setPc_nac(tbxPc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_nac(tbxFc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemper_nac(tbxTemper_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdad(tbxEdad.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar1(tbxAdgar1.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar5(tbxAdgar5.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar10(tbxAdgar10.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar20(tbxAdgar20.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_nac(tbxObservaciones_nac.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_nac(rdbClasificacion_nac\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setReani_prematuro(chbReani_prematuro\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_meconio(chbReani_meconio\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_respiracion(chbReani_respiracion.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipotonico(chbReani_hipotonico\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_apnea(chbReani_apnea\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_jadeo(chbReani_jadeo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_deficultosa(chbReani_deficultosa.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_gianosis(chbReani_gianosis\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_bradicardia(chbReani_bradicardia.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipoxemia(chbReani_hipoxemia\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_estimulacion(chbReani_estimulacion\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_ventilacion(chbReani_ventilacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_comprensiones(chbReani_comprensiones\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_intubacion(chbReani_intubacion\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setMedicina(tbxMedicina.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_reani(rdbClasificacion_reani\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRuptura(lbxRuptura.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_ruptura(lbxTiempo_ruptura\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_neo(tbxLiquido_neo\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFiebre_neo(lbxFiebre_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_neo(lbxTiempo_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCoricamniotis(tbxCoricamniotis\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setIntrauterina(rdbIntrauterina\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMadre20(lbxMadre20.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol_neo(chbAlcohol_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDrogas_neo(chbDrogas_neo.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo_neo(chbCigarrillo_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setRespiracion_neo(rdbRespiracion_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLlanto_neo(rdbLlanto_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVetalidad_neo(rdbVetalidad_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTaquicardia_neo(chbTaquicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setBradicardia_neo(chbBradicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setPalidez_neo(chbPalidez_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCianosis_neo(chbCianosis_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setAnomalias_congenitas(lbxAnomalias_congenitas\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_anomalias(tbxCual_anomalias\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setLesiones(tbxLesiones.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtras_alter(tbxOtras_alter\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_neo(rdbClasificacion_neo\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlarma(tbxAlarma.getValue());\r\n\t\t\t\this_atencion_embarazada.setConsulta_control(tbxConsulta_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setMedidas_preventiva(tbxMedidas_preventiva.getValue());\r\n\t\t\t\this_atencion_embarazada.setRecomendaciones(tbxRecomendaciones\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDiagnostico(tbxDiagnostico\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCodigo_diagnostico(tbxCodigo_diagnostico.getValue());\r\n\t\t\t\this_atencion_embarazada.setTratamiento(tbxTratamiento\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setRecomendacion_alimentacion(tbxRecomendacion_alimentacion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEvolucion_servicio(tbxEvolucion_servicio.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_atencion_embarazada);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_atencion_embarazada = getServiceLocator()\r\n\t\t\t\t\t\t.getHis_atencion_embarazadaService().guardar(datos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\t\t\t\t/*\r\n\t\t\t\t * else{ int result =\r\n\t\t\t\t * getServiceLocator().getHis_atencion_embarazadaService\r\n\t\t\t\t * ().actualizar(his_atencion_embarazada); if(result==0){ throw\r\n\t\t\t\t * new Exception(\r\n\t\t\t\t * \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\"\r\n\t\t\t\t * ); } }\r\n\t\t\t\t */\r\n\r\n//\t\t\t\tcodigo_historia = his_atencion_embarazada.getCodigo_historia();\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}",
"public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_parto his_parto = new His_parto();\r\n\t\t\t\this_parto.setCodigo_empresa(empresa.getCodigo_empresa());\r\n\t\t\t\this_parto.setCodigo_sucursal(sucursal.getCodigo_sucursal());\r\n\t\t\t\this_parto.setCodigo_historia(tbxCodigo_historia.getValue());\r\n\t\t\t\this_parto.setIdentificacion(tbxIdentificacion.getValue());\r\n\t\t\t\this_parto.setFecha_inicial(new Timestamp(dtbxFecha_inicial\r\n\t\t\t\t\t\t.getValue().getTime()));\r\n\t\t\t\this_parto.setConyugue(tbxConyugue.getValue());\r\n\t\t\t\this_parto.setId_conyugue(tbxId_conyugue.getValue());\r\n\t\t\t\this_parto.setEdad_conyugue(tbxEdad_conyugue.getValue());\r\n\t\t\t\this_parto.setEscolaridad_conyugue(tbxEscolaridad_conyugue\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setMotivo(tbxMotivo.getValue());\r\n\t\t\t\this_parto.setEnfermedad_actual(tbxEnfermedad_actual.getValue());\r\n\t\t\t\this_parto.setAntecedentes_familiares(tbxAntecedentes_familiares\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setPreeclampsia(rdbPreeclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setHipertension(rdbHipertension.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEclampsia(rdbEclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setH1(rdbH1.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setH2(rdbH2.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPostimadurez(rdbPostimadurez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRot_pre(rdbRot_pre.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPolihidramnios(rdbPolihidramnios.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRcui(rdbRcui.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPelvis(rdbPelvis.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFeto_macrosonico(rdbFeto_macrosonico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setIsoinmunizacion(rdbIsoinmunizacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setAo(rdbAo.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCirc_cordon(rdbCirc_cordon.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setPostparto(rdbPostparto.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setDiabetes(rdbDiabetes.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCardiopatia(rdbCardiopatia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setAnemias(rdbAnemias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEnf_autoinmunes(rdbEnf_autoinmunes\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setEnf_renales(rdbEnf_renales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInf_urinaria(rdbInf_urinaria.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEpilepsia(rdbEpilepsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto\r\n\t\t\t\t\t\t.setTbc(rdbTbc.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setMiomas(rdbMiomas.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setHb(rdbHb.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFumadora(rdbFumadora.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setInf_puerperal(rdbInf_puerperal.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfertilidad(rdbInfertilidad.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMenarquia(tbxMenarquia.getValue());\r\n\t\t\t\this_parto.setCiclos(tbxCiclos.getValue());\r\n\t\t\t\this_parto.setVida_marital(tbxVida_marital.getValue());\r\n\t\t\t\this_parto.setVida_obstetrica(tbxVida_obstetrica.getValue());\r\n\t\t\t\this_parto.setNo_gestaciones(lbxNo_gestaciones.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setParto(lbxParto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setAborto(lbxAborto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCesarias(lbxCesarias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFecha_um(new Timestamp(dtbxFecha_um.getValue()\r\n\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_parto.setUm(tbxUm.getValue());\r\n\t\t\t\this_parto.setFep(tbxFep.getValue());\r\n\t\t\t\this_parto.setGemerales(lbxGemerales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMalformados(lbxMalformados.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_vivos(lbxNacidos_vivos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_muertos(lbxNacidos_muertos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPreterminos(lbxPreterminos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMedico(chbMedico.isChecked());\r\n\t\t\t\this_parto.setEnfermera(chbEnfermera.isChecked());\r\n\t\t\t\this_parto.setAuxiliar(chbAuxiliar.isChecked());\r\n\t\t\t\this_parto.setPartera(chbPartera.isChecked());\r\n\t\t\t\this_parto.setOtros(chbOtros.isChecked());\r\n\t\t\t\this_parto.setControlado(rdbControlado.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setLugar_consulta(rdbLugar_consulta.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNo_consultas(lbxNo_consultas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEspecialistas(chbEspecialistas.isChecked());\r\n\t\t\t\this_parto.setGeneral(chbGeneral.isChecked());\r\n\t\t\t\this_parto.setPartera_consulta(chbPartera_consulta.isChecked());\r\n\t\t\t\this_parto.setSangrado_vaginal(rdbSangrado_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCefalias(rdbCefalias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEdema(rdbEdema.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEpigastralgia(rdbEpigastralgia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setVomitos(rdbVomitos.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setTinutus(rdbTinutus.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEscotomas(rdbEscotomas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_urinaria(rdbInfeccion_urinaria\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_vaginal(rdbInfeccion_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setOtros_embarazo(tbxOtros_embarazo.getValue());\r\n\t\t\t\this_parto.setCardiaca(tbxCardiaca.getValue());\r\n\t\t\t\this_parto.setRespiratoria(tbxRespiratoria.getValue());\r\n\t\t\t\this_parto.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_parto.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_parto.setTempo(tbxTempo.getValue());\r\n\t\t\t\this_parto.setPresion(tbxPresion.getValue());\r\n\t\t\t\this_parto.setPresion2(tbxPresion2.getValue());\r\n\t\t\t\this_parto.setInd_masa(tbxInd_masa.getValue());\r\n\t\t\t\this_parto.setSus_masa(tbxSus_masa.getValue());\r\n\t\t\t\this_parto.setCabeza_cuello(tbxCabeza_cuello.getValue());\r\n\t\t\t\this_parto.setCardiovascular(tbxCardiovascular.getValue());\r\n\t\t\t\this_parto.setMamas(tbxMamas.getValue());\r\n\t\t\t\this_parto.setPulmones(tbxPulmones.getValue());\r\n\t\t\t\this_parto.setAbdomen(tbxAbdomen.getValue());\r\n\t\t\t\this_parto.setUterina(tbxUterina.getValue());\r\n\t\t\t\this_parto.setSituacion(tbxSituacion.getValue());\r\n\t\t\t\this_parto.setPresentacion(tbxPresentacion.getValue());\r\n\t\t\t\this_parto.setV_presentacion(tbxV_presentacion.getValue());\r\n\t\t\t\this_parto.setPosicion(tbxPosicion.getValue());\r\n\t\t\t\this_parto.setV_posicion(tbxV_posicion.getValue());\r\n\t\t\t\this_parto.setC_uterina(tbxC_uterina.getValue());\r\n\t\t\t\this_parto.setTono(tbxTono.getValue());\r\n\t\t\t\this_parto.setFcf(tbxFcf.getValue());\r\n\t\t\t\this_parto.setGenitales(tbxGenitales.getValue());\r\n\t\t\t\this_parto.setDilatacion(tbxDilatacion.getValue());\r\n\t\t\t\this_parto.setBorramiento(tbxBorramiento.getValue());\r\n\t\t\t\this_parto.setEstacion(tbxEstacion.getValue());\r\n\t\t\t\this_parto.setMembranas(tbxMembranas.getValue());\r\n\t\t\t\this_parto.setExtremidades(tbxExtremidades.getValue());\r\n\t\t\t\this_parto.setSnc(tbxSnc.getValue());\r\n\t\t\t\this_parto.setObservacion(tbxObservacion.getValue());\r\n\t\t\t\this_parto.setCodigo_consulta_pyp(lbxCodigo_consulta_pyp\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFinalidad_cons(lbxFinalidad_cons.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setCausas_externas(lbxCausas_externas\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_disnostico(lbxTipo_disnostico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_principal(tbxTipo_principal.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_1(tbxTipo_relacionado_1\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_2(tbxTipo_relacionado_2\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_3(tbxTipo_relacionado_3\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTratamiento(tbxTratamiento.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_parto);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_parto = getServiceLocator().getHis_partoService().guardar(\r\n\t\t\t\t\t\tdatos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}",
"private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }",
"public String guardar()\r\n/* 69: */ {\r\n/* 70: */ try\r\n/* 71: */ {\r\n/* 72: 85 */ this.motivoLlamadoAtencion.setIdOrganizacion(AppUtil.getOrganizacion().getIdOrganizacion());\r\n/* 73: 86 */ this.motivoLlamadoAtencion.setIdSucursal(AppUtil.getSucursal().getIdSucursal());\r\n/* 74: 87 */ this.servicioMotivoLlamadoAtencion.guardar(this.motivoLlamadoAtencion);\r\n/* 75: 88 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 76: 89 */ setEditado(false);\r\n/* 77: 90 */ limpiar();\r\n/* 78: */ }\r\n/* 79: */ catch (Exception e)\r\n/* 80: */ {\r\n/* 81: 92 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 82: 93 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 83: */ }\r\n/* 84: 95 */ return \"\";\r\n/* 85: */ }",
"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 Integer guardarTramaProcesoCompraBD(Map<String, String> parametros, String codFormaPago) {\r\n try {\r\n log.debug(\"MC- ingreso a guardar Trama\");\r\n if (!DBPinpad.guardarTramaPinpadMC(parametros.get(\"response_code\"), parametros.get(\"amount\"),\r\n parametros.get(\"approval_code\"), parametros.get(\"message\"),\r\n nroTarjetaBruto, //parametros.get(\"card\"),\r\n parametros.get(\"card_id\"), parametros.get(\"month\"), parametros.get(\"amount_quota\"),\r\n parametros.get(\"credit_type\"), parametros.get(\"client_name\"), parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"), parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta, codFormaPago))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }",
"public void guardar() {\n String msj = \"\";\n int idpagoanulado = daoPagoCuotaAnulado.nuevoID();\n Date SYSDATE = new Date();\n java.sql.Timestamp fechaPagoCuotaAnuladoSQL = new java.sql.Timestamp(SYSDATE.getTime());\n String observacion = txtObservacion.getText();\n int idmotivo = Integer.parseInt(txtCodigoMotivo.getText());\n int idusuario = appLogin.IDUSUARIO;\n int idpago =Integer.parseInt(txtNumeroPago.getText());\n Date fechapago = daoCotizacion.parseFecha(txtFechaPago.getText());\n java.sql.Date fechapagoSQL = new java.sql.Date(fechapago.getTime());\n double mPago = montoPago;\n String numerocomprobante = txtComprobante.getText();\n String numerorecibo = txtRecibo.getText();\n //VALIDACIONES\n if (idmotivo == 0) {\n msj += \"CODIGO DEL MOTIVO DE ANULACION ESTA VACIO.\\n\";\n }\n if (idpago == 0) {\n msj += \"NO HA SELECCIONADO NINGUN PAGO PARA LA ANULACIÓN.\\n\";\n }\n if (msj.isEmpty()) {\n cpca.setIdpagoanulado(idpagoanulado);\n cpca.setFechahoranulado(fechaPagoCuotaAnuladoSQL);\n cpca.setObservacion(observacion);\n cpca.setIdmotivo(idmotivo);\n cpca.setIdusuario(idusuario);\n cpca.setIdpago(idpago);\n cpca.setFechapago(fechapagoSQL);\n cpca.setMonto(mPago);\n cpca.setNumerocomprobante(numerocomprobante);\n cpca.setNumerorecibo(numerorecibo);\n daoPagoCuotaAnulado.agregar(cpca);\n } else {\n JOptionPane.showMessageDialog(null, msj, \"ERRORES\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"@Override\n\tpublic DatosEnc obtenerDatos(DatosEnc datos) {\n\t\tConnection con = null;\n\t\tCallableStatement stmt = null;\n//\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\ttry{\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tString query = \"select * from pv_cotizaciones_det where no_cotizacion = ?\";\n//\t\t\tps = con.prepareStatement(query);\n//\t\t\tps.setString(1, datos.getNoDocumento());\n//\t\t\trs = ps.executeQuery();\n//\t\t\texiste=0;\n//\t\t\twhile(rs.next()){\n//\t\t\t\tif(rs.getString(\"no_cotizacion\") == null){\n//\t\t\t\t\texiste=0;\n//\t\t\t\t}else if(rs.getString(\"no_cotizacion\").equals(datos.getNoDocumento())){\n//\t\t\t\t\texiste=1;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tps.close();\n//\t\t\trs.close();\n//\t\t\tif(existe==0){\n\t\t\t\tcon = new ConectarDB().getConnection();\n\t\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_InUp_Mov_Enc(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\t\tstmt.setString(1, datos.getCodigoCliente());\n\t\t\t\tstmt.setString(2, datos.getNit());\n\t\t\t\tstmt.setString(3, datos.getNombreCliente());\n\t\t\t\tstmt.setString(4, datos.getDirecFactura());\n\t\t\t\tstmt.setString(5, datos.getTel());\n\t\t\t\tstmt.setString(6, datos.getTarjeta());\n\t\t\t\tstmt.setString(7, datos.getDirecEnvio());\n\t\t\t\tstmt.setString(8, datos.getCodigoVendedor());\n\t\t\t\tstmt.setString(9, datos.getUsername());\n\t\t\t\tstmt.setString(10, datos.getTipoDocumento());\n\t\t\t\tstmt.setString(11, datos.getNoDocumento());\n\t\t\t\tstmt.setString(12, datos.getFechaVence());\n\t\t\t\tstmt.setString(13, datos.getTipoPago());\n\t\t\t\tstmt.setString(14, datos.getTipoCredito());\n\t\t\t\tstmt.setString(15, datos.getAutoriza());\n\t\t\t\tstmt.setString(16, datos.getFechaDocumento());\n\t\t\t\tstmt.setString(17, datos.getCargosEnvio());\n\t\t\t\tstmt.setString(18, datos.getOtrosCargos());\n\t\t\t\tstmt.setString(19, datos.getMontoVenta());\n\t\t\t\tstmt.setString(20, datos.getMontoTotal());\n\t\t\t\tstmt.setString(21, datos.getSerieDev());\n\t\t\t\tstmt.setString(22, datos.getNoDocDev());\n\t\t\t\tstmt.setString(23, datos.getObservaciones());\n\t\t\t\tstmt.setString(24, datos.getTipoNota());\n\t\t\t\tstmt.setString(25, datos.getCaja());\n\t\t\t\tstmt.setString(26, datos.getFechaEntrega());\n\t\t\t\tstmt.setString(27, datos.getCodigoDept());\n\t\t\t\tstmt.setString(28, datos.getCodGen());\n\t\t\t\tstmt.setString(29, datos.getNoConsigna());\n\t\t\t\tstmt.setString(30, datos.getCodMovDev());\n\t\t\t\tstmt.setString(31, datos.getGeneraSolicitud());\n\t\t\t\tstmt.setString(32, datos.getTipoPagoNC());\n\t\t\t\tstmt.setString(33, datos.getTipoCliente());\n\t\t\t\tstmt.setString(34, datos.getCodigoNegocio());\n\t\t\t\tstmt.setString(35, datos.getCantidadDevolver());\n\t\t\t\tstmt.setString(36, datos.getAutorizoDespacho());\n\t\t\t\tstmt.setString(37, datos.getSaldo());\n\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tif(rs.getString(1)!=null){\n\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n\t\t\t\t\t}\n\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tif(rs.getString(1)!=null){\n//\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n//\t\t\t\t\t}else{\n//\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n//\t\t\t\t\t}\n//\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tdocumento = rs.getInt(2);\n\t\t\t\t}\n\t\t\t\tcon.close();\n\t\t\t\tstmt.close();\n\t\t\t\trs.close();\n//\t\t\t}\n\t\t\t\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_Del_Mov_Det(?,?,?)}\");\n//\t\t\tstmt.setInt(1, Integer.parseInt(datos.getTipoDocumento()));\n//\t\t\tstmt.setString(2, \"\");\n//\t\t\tstmt.setInt(3, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"limpiado\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_udpv_VerificaCotiza(?,?)}\");\n//\t\t\tstmt.setString(1, \"\");\n//\t\t\tstmt.setInt(2, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"error\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n\t\t}catch(SQLException e ){\n\t\t\tSystem.out.println(\"Error Enc: \" + e.getMessage());\n\t\t}\n\t\treturn datos;\n\t}",
"public void processInsertar() {\n }",
"public EncabezadoRespuesta bajaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t//Mandamos a log el objeto de entrada\n\t\tLogHandler.debug(uid, this.getClass(), \"bajaAsistencia - Datos Entrada: \" + asistencia);\n\t\t//Variable de resultado\n\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\ttry {\n\t\t\tif (asistencia.getIdEmpleado() == null) {\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n \t}\n \tif (asistencia.getUsuarioBaja() == null || asistencia.getUsuarioBaja().trim().isEmpty())\n \t{\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario para la baja.\");\n \t}\n \tif (asistencia.getUsuarioUltMod() == null || asistencia.getUsuarioUltMod().trim().isEmpty())\n \t{\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario para la modificacion.\");\n \t}\n \tAsistenciaDAO dao = new AsistenciaDAO();\n \trespuesta = dao.bajaAsistencia(uid, asistencia);\n\t\t}\n\t\tcatch (ExcepcionesCuadrillas ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"bajaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"bajaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tLogHandler.debug(uid, this.getClass(), \"bajaAsistencia - Datos Salida: \" + respuesta);\n\t\treturn respuesta;\n\t}",
"@Override\r\n\tpublic void guardar() {\n\t\ttab_cuenta.guardar();\r\n\t\tguardarPantalla();\r\n\t\t\r\n\t}",
"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}",
"Reserva Obtener();",
"public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\n }",
"@Override\n\tpublic void borrarDatosOk() {\n\n\t}",
"public void guardarTransferenteAlcabala(RaTransferenteAlcabala raTransferenteAlcabala)throws Exception;",
"public long save(Registro r) {\n\n long id = r.getCodigo();\n SQLiteDatabase db = banco.getWritableDatabase();\n try {\n\n\n ContentValues values = new ContentValues();\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-M-d\");\n String dateString = sdf.format(r.getData());\n values.put(\"data\", dateString);\n values.put(\"distancia\", r.getDistancia());\n values.put(\"consumo\", r.getConsumo());\n values.put(\"mediaAceleracao\", r.getMediaAberturaBorboleta());\n values.put(\"mediaConsumo\", r.getMediaConsumo());\n values.put(\"codTipoCombustivel\", r.getTipoCombustivel().getCodigo());\n values.put(\"codCarro\", r.getCarro().getCodigo());\n values.put(\"codUsuario\", r.getUsuario().getCodigo());\n\n if (id != 0) {//SE O ID É DIFERENTE DE 0 ATUALIZA,\n\n System.out.println(\"Entrou !!\");\n String _id = String.valueOf(r.getCodigo());\n String[] whereArgs = new String[]{_id};\n\n // update registro set values = ... where _id=?\n int count = db.update(TABELA, values, \"codigo=?\", whereArgs);\n\n return count;\n } else {\n\n id = db.insert(TABELA, \"\", values);\n System.out.println(\"Deu certo !! \\n \" + values);\n return id;\n }\n } finally {\n db.close();\n }\n }",
"public Integer guardarTramaAnulacionBD(Map<String, String> parametros, String formaPago) {\r\n try {\r\n if (!DBPinpad.guardarTramaAnulPinpadMC(parametros.get(\"response_code\"), parametros.get(\"amount\"),\r\n parametros.get(\"approval_code\"), parametros.get(\"message\"),\r\n parametros.get(\"card\"), parametros.get(\"month\"),\r\n parametros.get(\"amount_quota\"), parametros.get(\"credit_type\"),\r\n parametros.get(\"client_name\"), parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"), parametros.get(\"ecr_transaccion\"),\r\n parametros.get(\"merchant_id\"), parametros.get(\"print_data\"),\r\n lblDatoPedidoEnv, //VariablesCaja.vNumPedVta\r\n formaPago))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"private void saveTempRojoBhcs(String estado) {\n int c = mTempRojoBhcs.size();\n for (TempRojoBhc temp : mTempRojoBhcs) {\n temp.setEstado(estado);\n estudioAdapter.updateTrojosSent(temp);\n publishProgress(\"Actualizando TempRojoBhc\", Integer.valueOf(mTempRojoBhcs.indexOf(temp)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public String guardarComentario(){\r\n\t\tcomDao.save(com);\r\n\t\tinit();\r\n\t\treturn null;\r\n\t}",
"public Integer guardarTramaRepDetalladoBD(Map<String, String> parametros) {\r\n try {\r\n if (!DBPinpad.guardarTramaRepDetPinpadMC(parametros.get(\"response_code\"), parametros.get(\"message\"),\r\n parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"),\r\n parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"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 Integer guardarTramaCierreBD(Map<String, String> parametros) {\r\n try {\r\n if (!DBPinpad.guardarTramaCierrePinpadMC(parametros.get(\"response_code\"), parametros.get(\"message\"),\r\n parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"),\r\n parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"public void buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}",
"public String guardar()\r\n/* 446: */ {\r\n/* 447:455 */ String url = \"\";\r\n/* 448: */ try\r\n/* 449: */ {\r\n/* 450:458 */ if ((this.facturaProveedorSRI.getMensajeSRI() == null) || (this.facturaProveedorSRI.getMensajeSRI().toLowerCase().contains(\"guardado\")) || \r\n/* 451:459 */ (!this.facturaProveedorSRI.isTraCorregirDatos()))\r\n/* 452: */ {\r\n/* 453:461 */ if (this.facturaProveedorSRI.getDocumento().isIndicadorDocumentoElectronico()) {\r\n/* 454:462 */ this.facturaProveedorSRI.setAutorizacionRetencion(\"0000000000\");\r\n/* 455: */ }\r\n/* 456:464 */ if (isMostrarBaseImponible()) {\r\n/* 457:465 */ for (DetalleFacturaProveedorSRI detalleFacturaProveedorSRI : this.facturaProveedorSRI.getListaDetalleFacturaProveedorSRI())\r\n/* 458: */ {\r\n/* 459:466 */ detalleFacturaProveedorSRI.setBaseImponibleTarifaCero(BigDecimal.ZERO);\r\n/* 460:467 */ detalleFacturaProveedorSRI.setBaseImponibleDiferenteCero(BigDecimal.ZERO);\r\n/* 461:468 */ detalleFacturaProveedorSRI.setBaseImponibleNoObjetoIva(BigDecimal.ZERO);\r\n/* 462: */ }\r\n/* 463: */ }\r\n/* 464:471 */ if (isMostrarBasesDetalle()) {\r\n/* 465:472 */ for (DetalleFacturaProveedorSRI detalleFacturaProveedorSRI : this.facturaProveedorSRI.getListaDetalleFacturaProveedorSRI()) {\r\n/* 466:473 */ detalleFacturaProveedorSRI.setBaseImponibleRetencion(BigDecimal.ZERO);\r\n/* 467: */ }\r\n/* 468: */ }\r\n/* 469:477 */ this.servicioFacturaProveedorSRI.guardar(this.facturaProveedorSRI);\r\n/* 470: */ }\r\n/* 471: */ else\r\n/* 472: */ {\r\n/* 473:480 */ this.servicioFacturaProveedorSRI.actualizarRetencion(this.facturaProveedorSRI);\r\n/* 474: */ }\r\n/* 475:482 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 476:484 */ if (this.facturaProveedorSRI.getFacturaProveedor() == null) {\r\n/* 477:485 */ url = \"/paginas/financiero/contabilidad/procesos/compraCajaChica?faces-redirect=true\";\r\n/* 478: */ } else {\r\n/* 479:488 */ url = \"/paginas/compras/procesos/facturaProveedor?faces-redirect=true&numero=\" + this.facturaProveedorSRI.getFacturaProveedor().getNumero();\r\n/* 480: */ }\r\n/* 481: */ }\r\n/* 482: */ catch (ExcepcionAS2Financiero e)\r\n/* 483: */ {\r\n/* 484:492 */ e.printStackTrace();\r\n/* 485:493 */ addInfoMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 486:494 */ LOG.info(\"ERROR ExcepcionAS2Financiero AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 487: */ }\r\n/* 488: */ catch (ExcepcionAS2 e)\r\n/* 489: */ {\r\n/* 490:497 */ e.printStackTrace();\r\n/* 491:498 */ addInfoMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 492:499 */ LOG.info(\"ERROR ExcepcionAS2 AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 493: */ }\r\n/* 494: */ catch (Exception e)\r\n/* 495: */ {\r\n/* 496:502 */ e.printStackTrace();\r\n/* 497:503 */ addInfoMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 498:504 */ LOG.error(\"ERROR AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 499: */ }\r\n/* 500:507 */ return url;\r\n/* 501: */ }",
"public String save() {\r\n\t\ttry {\r\n\r\n\t\t\tif (obs != null && !obs.trim().isEmpty()) {\r\n\t\t\t\tconcurso.setObservacionReserva(obs);\r\n\t\t\t\tconcursoHome.setInstance(concurso);\r\n\t\t\t\tString res = concursoHome.update();\r\n\t\t\t}\r\n\r\n\t\t\tfor (PlantaCargoDetDTO dto : listaPlantaCargoDto) {\r\n\r\n\t\t\t\tif (dto.getReservar()) {\r\n\t\t\t\t\tEstadoDet est = buscarEstado(\"en reserva\");\r\n\t\t\t\t\tif (!existeEnDetalle(dto.getPlantaCargoDet(), est)) {\r\n\t\t\t\t\t\t// buscar\r\n\r\n\t\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\t\tp.setActivo(true);\r\n\t\t\t\t\t\tp.setFechaAlta(new Date());\r\n\t\t\t\t\t\tp.setUsuAlta(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\tp.setNroOrden(2);\r\n\t\t\t\t\t\tp.setPlantaCargoDet(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\t\tif (est != null)\r\n\t\t\t\t\t\t\tp.setEstadoDet(est);\r\n\t\t\t\t\t\tp.setConcurso(concursoHome.getInstance());\r\n\t\t\t\t\t\tem.persist(p);\r\n\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(est.getEstadoCab());\r\n\t\t\t\t\t\tplanta.setEstadoDet(est);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Incidencia 1079 */\r\n\t\t\t\trefreshListaPuestoReservados();\r\n\t\t\t\t/**/\r\n\t\t\t\tEstadoCab estadoCab = obtenerEstadosCabecera(\"VACANTE\");\r\n\t\t\t\tif (esta(dto.getPlantaCargoDet())) {\r\n\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\tp = recuperarConcurso(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\tif (!dto.getReservar()) {\r\n\t\t\t\t\t\tif (p.getConcursoPuestoAgr() != null) {\r\n\t\t\t\t\t\t\tstatusMessages.clear();\r\n\t\t\t\t\t\t\tstatusMessages.add(Severity.ERROR,\r\n\t\t\t\t\t\t\t\t\t\"El puesto pertenece a un grupo\");\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * p.setActivo(true); p.setNroOrden(1);\r\n\t\t\t\t\t\t * p.setFechaMod(new Date());\r\n\t\t\t\t\t\t * p.setUsuMod(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\t * EstadoDet est = buscarEstado(\"libre\");\r\n\t\t\t\t\t\t * p.setEstadoDet(est); em.merge(p);\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(estadoCab);\r\n\t\t\t\t\t\tplanta.setEstadoDet(null);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\t\t\t\t\t\tif (!concurso\r\n\t\t\t\t\t\t\t\t.getDatosEspecificosTipoConc()\r\n\t\t\t\t\t\t\t\t.getDescripcion()\r\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\r\n\t\t\t\t\t\t\t\t\t\tCONCURSO_INTERNO_INTERINSTITUCIONAL)\r\n\t\t\t\t\t\t\t\t&& planta.getPermanente())\r\n\t\t\t\t\t\t\treponerCategoriasController.reponerCategorias(p,\r\n\t\t\t\t\t\t\t\t\t\"PUESTO\", \"CONCURSO\");\r\n\t\t\t\t\t\tem.remove(p);\r\n\t\t\t\t\t\t// listaPlantaCargoDto.remove(dto);\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\tobs = null;\r\n\t\t\tem.flush();\r\n\t\t\tllenarListado1();\r\n\t\t\tstatusMessages.clear();\r\n\t\t\tstatusMessages.add(Severity.INFO, SeamResourceBundle.getBundle()\r\n\t\t\t\t\t.getString(\"GENERICO_MSG\"));\r\n\t\t\treturn \"persisted\";\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void trabajar() {\n\n\t}",
"public void guardar() {\n try {\n if (this.buscarCodApelacion()) {\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.INSERTA_APELACIONES(apelacionesBean); \n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.apelacionesBean.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"0\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue insertada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n this.apelacionesBean = new ApelacionesBean();\n addMessage(\"Guadado Exitosamente\", 1);\n } else {\n addMessage(\"La solicitud de apelacion especificada no existe\", 1);\n this.Listar();\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 }",
"private void guardarEstadoObjetosUsados() {\n }",
"@Override\n\tpublic int insertarEntrada(AlmacenDTO obj) {\n\t\tint rs=-1;\n\t\tConnection con=null;\n\t\tPreparedStatement pst=null;\n\t\ttry {\n\t\t\tcon=new MySqlDbConexion().getConexion();\n\t\t\tString sql=\"insert into MATERIAL_ENTRADA values (null,?,?,?)\";\n\t\t\tpst=con.prepareStatement(sql);\n\t\t\t\n\t\t\tpst.setInt(1,obj.getCodigo_producto());\n\t\t\tpst.setInt(2,obj.getCantidad_entrada());\n\t\t\tpst.setDate(3,obj.getFecha_entrada());\n\t\t\t\n\t\t\trs=pst.executeUpdate();\n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error en la Sentencia\"+e.getMessage());\n\t\t\t\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif(pst!=null) pst.close();\n\t\t\t\tif(con!=null) con.close();\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Error al cerrar\");\n\t\t\t}\n\t\t}\n\t\treturn rs;\n\t}",
"private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }",
"@Override\n\t@Transactional //los que no impliquen listados solo seran de tipo transactional\n\tpublic boolean grabar(Autoridad autoridad) {\n\t\tAutoridad objAutoridad = dAutoridad.save(autoridad);\n\t\tif (objAutoridad == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"private void remplirUtiliseData() {\n\t}",
"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 void persistirRemessaC17() throws Exception {\n if (this.remessa == null || this.remessa.getId() == null) { \n this.remessa = new RemessaVO();\n this.remessa.setDataHoraAbertura(new Date());\n this.remessa.setCodigoUsuarioAbertura(this.usuario.getNuMatricula());\n this.remessa.setUnidadeSolicitante(unidadeServiceRef.findUnidadeLotacaoUsuarioLogado());\n this.remessa = remessaService.salvarRascunhoRemessaAB(this.remessa);\n }\n }",
"public void guardar4(View view){\n bdboletas admin= new bdboletas(this, \"Boleta de Transito\", null, 1);\n SQLiteDatabase BaseDeDatos= admin.getWritableDatabase();\n\n placa= etplaca.getText ().toString ();\n modelo= etmodelo.getText ().toString ();\n marca= etmarca.getText ().toString ();\n color= etmodelo.getText ().toString ();\n\n año_string= etaño.getText ().toString ();\n\n int año_int=Integer.parseInt (año_string);\n\n serial= etserial.getText ().toString ();\n\n String seleccion=spinner_vehiculo.getSelectedItem ().toString ();\n\n if (!placa.isEmpty () && !modelo.isEmpty () && !marca.isEmpty ()\n && !color.isEmpty () && !año_string.isEmpty () && !serial.isEmpty ()\n && !seleccion.isEmpty ()){\n\n ContentValues registro= new ContentValues ();\n\n registro.put (\"placa\",placa);\n registro.put (\"marca\",marca);\n registro.put (\"modelo\",modelo);\n registro.put (\"tipo_vehiculo\",seleccion);\n registro.put (\"color\",color);\n registro.put (\"año\",año_int);\n registro.put (\"s_carroceria\",serial);\n\n BaseDeDatos.insert(\"boletas\",null , registro);\n\n BaseDeDatos.close();\n\n Toast.makeText(this,\"registo exitoso\",Toast.LENGTH_SHORT).show();\n // metodo boton siguiente\n Intent siguiente = new Intent (this, Remolque.class);\n startActivity (siguiente);\n }else{\n Toast.makeText(this,\"debe llenar todos los campos para poder continuar\",Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n\t\tpublic void guardar() {\n\t\t\t\n\t\t\tif (tab_presupuesto.guardar()){\n\t\t\t\tif (tab_asociacion_presupuestaria.guardar()) {\n\t\t\t\t\tguardarPantalla();\n\t\t\t\t\t//Actualizar el arbol\n\t\t\t\t\tarb_clasificador.ejecutarSql();\n\t\t\t\t\tutilitario.addUpdate(\"arb_clasificador\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t}",
"public RespuestaBD crearRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioInsercion) {\n/* 342 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* 344 */ int elSiguiente = siguienteRegistro(codigoFlujo);\n/* 345 */ if (elSiguiente == 0) {\n/* 346 */ rta.setMensaje(\"Generando secuencia\");\n/* 347 */ return rta;\n/* */ } \n/* */ \n/* */ try {\n/* 351 */ String s = \"insert into wkf_detalle(codigo_flujo,secuencia,servicio_inicio,accion,codigo_estado,servicio_destino,nombre_procedimiento,correo_destino,enviar_solicitud,ind_mismo_proveedor,ind_mismo_cliente,estado,caracteristica,valor_caracteristica,caracteristica_correo,metodo_seleccion_proveedor,ind_correo_clientes,enviar_hermana,enviar_si_hermana_cerrada,ind_cliente_inicial,usuario_insercion,fecha_insercion) values (\" + codigoFlujo + \",\" + \"\" + elSiguiente + \",\" + \"\" + servicioInicio + \",\" + \"\" + accion + \",\" + \"\" + codigoEstado + \",\" + \"\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \"'\" + nombreProcedimiento + \"',\" + \"'\" + correoDestino + \"',\" + \"'\" + enviar + \"',\" + \"'\" + mismoProveedor + \"',\" + \"'\" + mismoCliente + \"',\" + \"'\" + estado + \"',\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \"'\" + usuarioInsercion + \"',\" + \"\" + Utilidades.getFechaBD() + \"\" + \")\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 398 */ rta = this.dat.executeUpdate2(s);\n/* 399 */ rta.setSecuencia(elSiguiente);\n/* */ }\n/* 401 */ catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"%FlujoDetalleDAO:crearRegistro \", e);\n/* 404 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 406 */ return rta;\n/* */ }",
"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}",
"public boolean insertarCreacionHistorialCliente(Cliente cliente) {\n String queryDividido1 = \"INSERT INTO Historial_Cliente(Usuario_Codigo, Nombre, DPI, Direccion, Sexo, Password, Nacimiento, DPI_Escaneado, Tipo, Fecha_Cambio) \"\n + \"VALUES(?,?,?,?,?,aes_encrypt(?,'AES'),?,?,?,?)\";\n java.sql.Date fechaCreacion = new java.sql.Date(Calendar.getInstance().getTime().getTime());\n\n try {\n\n PreparedStatement enviarDividido1 = Conexion.conexion.prepareStatement(queryDividido1);\n\n //Envio de los Datos de Creacion de un Nuevo Cliente a la Tabla Historial_Cliente\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.setString(7, cliente.getNacimiento());\n enviarDividido1.setBlob(8, cliente.getDPIEscaneado());\n enviarDividido1.setString(9, \"Creacion\");\n enviarDividido1.setString(10, fechaCreacion.toString());\n enviarDividido1.executeUpdate();\n\n \n return true;\n\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n return false;\n }\n\n }",
"public Integer guardarTramaReimpresionBD(Map<String, String> parametros) {\r\n try {\r\n if (!DBPinpad.guardarTramaReimpPinpadMC(parametros.get(\"response_code\"), parametros.get(\"message\"),\r\n parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"),\r\n parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"public String insertar(Cargo cargo){\n String registrosInser=\"Registro insertado N°= \";\n long contador;\n ContentValues c=new ContentValues();\n //c.put(\"ID_CARGO\",cargo.getIdCargo());\n c.put(\"NOMBRE_CARGO\",cargo.getNombreCargo());\n c.put(\"DESCRIPCION_CARGO\",cargo.getDescripcionCargo());\n contador=db.insert(\"CARGO\",null,c);\n if(contador==-1||contador==0){\n registrosInser=\"Error al insertar\";\n }\n else{\n registrosInser=registrosInser+contador;\n }\n /* String registrosInser=\"Registro insertado N°= \";\n long contador= 0;\n ContentValues carg = new ContentValues();\n //carg.put(\"ID_CARGO\",cargo.getIdCargo());\n carg.put(\"NOMBRE_CARGO\",cargo.getNombreCargo());\n carg.put(\"DESCRIPCION_CARGO\",cargo.getDescripcionCargo());\n contador=db.insert(\"CARGO\",null,carg);\n if(contador==-1||contador==0){\n registrosInser=\"error al insertar\";\n }\n else{\n registrosInser=registrosInser+contador;\n }\n return registrosInser;*/\n return registrosInser;\n\n }",
"private void readAndSAVE(){\n boolean vaidation_status = true;\n\n achiv_title = edtxt_achiv_title.getText().toString();\n if (TextUtils.isEmpty(achiv_title)){\n edtxt_achiv_title.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_achiv_title.setError(null);\n }\n\n achiv_date = edtxt_achiv_date.getText().toString();\n if (TextUtils.isEmpty(achiv_date)){\n edtxt_achiv_date.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_achiv_date.setError(null);\n }\n\n\n\n achiv_details = edtxt_achiv_details.getText().toString();\n if(achiv_details.isEmpty()){\n vaidation_status = false;\n edtxt_achiv_details.setText(\"Please write Details!!\");\n }\n\n // if all vaidation is true then add all details into firbase database\n if(vaidation_status){\n\n //create Details model\n AchivmentsDetails addNewAchiv = new AchivmentsDetails();\n\n addNewAchiv.setAchv_titles(achiv_title);\n addNewAchiv.setAchv_date(achiv_date);\n addNewAchiv.setAchv_details(achiv_details);\n\n showProgressDialog();\n\n if(mAuth.getCurrentUser()!=null)\n {\n //CHECK IF new achivments has been added or update process.\n String achiv_key;\n if(operationStatus.equals(\"ADD_NEW\")) {\n\n // Get new push key\n achiv_key = mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").push().getKey();\n addNewAchiv.setAchv_firbase_ID(achiv_key);\n\n } else {\n achiv_key = operationStatus;\n addNewAchiv.setAchv_firbase_ID(achiv_key);\n }\n\n // save the user at UserNode under user UID\n mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").child(achiv_key).setValue(addNewAchiv, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n\n hideProgressDialog();\n\n if(databaseError==null)\n {\n Toast.makeText(AddNewAchivmentsActivity.this, \"Your Details has been saved !!\",\n Toast.LENGTH_SHORT).show();\n finish();\n }\n }\n });\n }\n\n\n\n }\n }",
"public void guardarSolicitud() {\n Map<String, String> paramMap = getParametrosSesion();\n String cadenaFirmada;\n try {\n if (paramMap != null) {\n cadenaFirmada = paramMap.get(firmaFormHelper.FIRMA_DIGITAL);\n firmaFormHelper.setSelloDigital(paramMap.get(FirmaFormHelper.FIRMA_DIGITAL));\n\n SimpleDateFormat formato = new SimpleDateFormat(\"dd/MM/yyyy\");\n produccion.setFechProduccion(new Date());\n desperdiciosHelper.setFechaAcuse(formato.format(produccion.getFechProduccion()));\n\n if (cadenaFirmada.length() > 0) {\n guardarRangosFolios();\n Acuse acuse = new Acuse();\n acuse.setSerieAcuse(TipoAcuse.DESPERDICIO);\n acuse.setIdProveedor(produccionCigarrosHelper.getProveedor().getIdProveedor());\n acuse.setSelloDigital(firmaFormHelper.getSelloDigital());\n acuse.setCadenaOriginal(firmaFormHelper.getCadenaOriginal());\n acuse.setFecCaptura(new Date());\n desperdiciosHelper.setIdAcuseRecibo(commonService.crearAcuse(acuse));\n habilitarPnlAcuse();\n registroMovimientoBitacora(getSession(), IdentificadorProcesoEnum.CONTRIBUYENTE_TRAMITES, new Date(), new Date(), MovimientosBitacoraEnum.DESPERDICIOS_DESTRUCCION);\n } else {\n habilitarPnlPrincipal();\n }\n }\n } catch (CommonServiceException e) {\n LOGGER.error(e.getMessage(), e);\n addErrorMessage(ERROR, \"No se pudo generar el acuse\");\n } catch (Exception ex) {\n LOGGER.error(ex.getMessage());\n }\n }",
"protected String cargarTempRojoBhcs(String url, String username,\n String password) throws Exception {\n try {\n getTempRojoBhcs();\n if(mTempRojoBhcs.size()>0){\n saveTempRojoBhcs(Constants.STATUS_SUBMITTED);\n // La URL de la solicitud POST\n final String urlRequest = url + \"/movil/trojos\";\n TempRojoBhc[] envio = mTempRojoBhcs.toArray(new TempRojoBhc[mTempRojoBhcs.size()]);\n HttpHeaders requestHeaders = new HttpHeaders();\n HttpAuthentication authHeader = new HttpBasicAuthentication(username, password);\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n requestHeaders.setAuthorization(authHeader);\n HttpEntity<TempRojoBhc[]> requestEntity =\n new HttpEntity<TempRojoBhc[]>(envio, requestHeaders);\n RestTemplate restTemplate = new RestTemplate();\n restTemplate.getMessageConverters().add(new StringHttpMessageConverter());\n restTemplate.getMessageConverters().add(new MappingJacksonHttpMessageConverter());\n // Hace la solicitud a la red, pone la vivienda y espera un mensaje de respuesta del servidor\n ResponseEntity<String> response = restTemplate.exchange(urlRequest, HttpMethod.POST, requestEntity,\n String.class);\n // Regresa la respuesta a mostrar al usuario\n if (!response.getBody().matches(\"Datos recibidos!\")) {\n saveTempRojoBhcs(Constants.STATUS_NOT_SUBMITTED);\n }\n return response.getBody();\n }\n else{\n return \"Datos recibidos!\";\n }\n } catch (Exception e) {\n Log.e(TAG, e.getMessage(), e);\n saveTempRojoBhcs(Constants.STATUS_NOT_SUBMITTED);\n return e.getMessage();\n }\n\n }",
"ParqueaderoEntidad actualizar(ParqueaderoEntidad parqueadero);",
"public String buscarTrabajadoresPorParametros() {\r\n try {\r\n inicializarFiltros();\r\n listaTrabajadores = null;\r\n //listaTrabajadores = administrarGestionarTrabajadoresBO.consultarTrabajadoresPorParametro(filtros);\r\n return null;\r\n } catch (Exception e) {\r\n System.out.println(\"Error ControllerAdministrarTrabajadores buscarTrabajadoresPorParametros : \" + e.toString());\r\n return null;\r\n }\r\n }",
"public Usuario buscarUsuario(String usuario) {\n Usuario usuario1 = new Usuario();\n try{\n\t\tString seleccion = \"SELECT usuario, nombre, clave FROM usuarios where usuario=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setString(1, usuario);\n \n\t\t//Savepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n \n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n usuario1.setUsuario(rs.getString(\"usuario\")); \n usuario1.setNombre(rs.getString(\"nombre\")); \n usuario1.setClave(rs.getString(\"clave\")); \n return usuario1;\n\t\t} \n \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return null; \n\n }",
"private void saveRazonNoData(String estado) {\n int c = mRazonNoData.size();\n for (RazonNoData rnd : mRazonNoData) {\n rnd.setEstado(estado);\n estudioAdapter.updateRazonNoDataSent(rnd);\n publishProgress(\"Actualizando Razones No Datos\", Integer.valueOf(mRazonNoData.indexOf(rnd)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public boolean Insert(String tipo, String lugar, String accion, String responsable, String vencimiento,String spinnerRiesgoSeleccion,\n String spinnerSectorSeleccion, String estado, String condicionInsegura, String usuario, String imagen, String site,\n String fecha, String Lider_recorrida, String Participantes, String Categoria){\n\n SQLiteDatabase BaseDeDatos=this.getWritableDatabase();\n ContentValues values=new ContentValues();\n\n if(tipo==\"Reporte de condiciones inseguras UAC\"){\n tipo = \"UAC\";\n }else if(tipo == \"Auditoria de primera parte\"){\n tipo = \"Auditoria\";\n }else {\n tipo = \"EHSS\";\n }\n values.put(\"tipo\", tipo);\n values.put(\"site\", site);\n values.put(\"fecha\", fecha);\n String fh = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date());\n values.put(\"fechaHoraCreacion\", fh);\n values.put(\"sector\",spinnerSectorSeleccion);\n values.put(\"lugar\", lugar);\n values.put(\"accion\", accion);\n values.put(\"responsable\", responsable);\n values.put(\"vencimiento\", vencimiento);\n values.put(\"riesgo\",spinnerRiesgoSeleccion);\n values.put(\"estado\",estado );\n values.put(\"condicionInsegura\", condicionInsegura);\n values.put(\"usuarioCreacion\",usuario);\n values.put(\"imagenUAC\",imagen);\n values.put(\"Lider_recorrida\",Lider_recorrida);\n values.put(\"Participantes\",Participantes);\n values.put(\"Categoria\",Categoria);\n values.put(\"syncro\", 0);\n\n boolean resultado=BaseDeDatos.insert(\"uac\",null,values)>0;\n BaseDeDatos.close();\n return resultado;\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 }",
"public void guardarDatos() throws Exception {\n\t\ttry {\n\t\t\tFormularioUtil.setUpperCase(groupboxEditar);\n\t\t\tif (validarForm()) {\n\t\t\t\t// Cargamos los componentes //\n\n\t\t\t\tHisc_urgencia_odontologico hisc_urgencia_odontologico = getBean();\n\n\t\t\t\tMap<String, Object> datos = new HashMap<String, Object>();\n\t\t\t\tdatos.put(\"hisc_urgencia_odontologico\",\n\t\t\t\t\t\thisc_urgencia_odontologico);\n\t\t\t\t// datos.put(\"sigvitales\", mcSignosVitales.obtenerSigvitales());\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getValue());\n\t\t\t\tdatos.put(\"admision\", admision);\n\t\t\t\tdatos.put(\"datos_procedimiento\", getProcedimientos());\n\n\t\t\t\tImpresion_diagnostica impresion_diagnostica = macroImpresion_diagnostica\n\t\t\t\t\t\t.obtenerImpresionDiagnostica();\n\t\t\t\tdatos.put(\"impresion_diagnostica\", impresion_diagnostica);\n\n\t\t\t\tgetServiceLocator().getHisc_urgencia_odontologicoService()\n\t\t\t\t\t\t.guardarDatos(datos);\n\n\t\t\t\ttbxAccion.setValue(\"modificar\");\n\t\t\t\tinfoPacientes.setCodigo_historia(hisc_urgencia_odontologico\n\t\t\t\t\t\t.getCodigo_historia());\n\n\t\t\t\tactualizarRemision(admision, getInformacionClinica(), this);\n\t\t\t\tcargarServicios();\n\n\t\t\t\tMensajesUtil.mensajeInformacion(\"Informacion ..\",\n\t\t\t\t\t\t\"Los datos se guardaron satisfactoriamente\");\n\t\t\t}\n\n\t\t} catch (ImpresionDiagnosticaException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t} catch (Exception e) {\n\t\t\tif (!(e instanceof WrongValueException)) {\n\t\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t\t}\n\t\t}\n\t}",
"public String adicionarubicacion(ubicacion ubicacion) {\n String miRespuesta;\n Conexion miConexion = new Conexion();\n Connection nuevaCon;\n nuevaCon = miConexion.getConn();\n \n //sentecia \n PreparedStatement sentencia;\n //try-catch \n try {\n // consulta \n String Query = \"INSERT INTO ubicacion (Departamento,municipio)\"\n + \"VALUES (?,?)\";\n sentencia = nuevaCon.prepareStatement(Query);\n sentencia.setString(1,ubicacion.getDepartamento());\n sentencia.setString(2,ubicacion.getMunicipio());\n \n sentencia.execute();\n miRespuesta = \"\";\n } catch (Exception ex){\n miRespuesta = ex.getMessage();\n System.err.println(\"Ocurrio un problea en ubicacionDAO\\n \" + ex.getMessage());\n }\n \n return miRespuesta;\n }",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Trabajo newTrabajo = (Trabajo) data.getSerializableExtra(\"resultado\");\n\n if(newTrabajo.getId() != 0) { // Si NO es un Trabajo Nuevo Vacío, osea que no hayan Cancelado la operación\n Toast.makeText(getBaseContext(), \"Nuevo Trabajo: \" + newTrabajo.getDescripcion(), Toast.LENGTH_LONG).show();\n\n // Insertamos en la Categoría correspondiente el Nuevo Trabajo\n Categoria.CATEGORIAS_MOCK[newTrabajo.getCategoria().getId()].addTrabajo(newTrabajo);\n\n // Incorporamos a la \"listaTrabajos\" el Nuevo Trabajo\n this.listaTotalTrabajos();\n\n //Se notifica al adaptador de que el ArrayList que tiene asociado ha sufrido cambios (forzando asi a ir al metodo getView())\n adaptador.notifyDataSetChanged();\n }\n }",
"public FlujoDetalleDTO leerRegistro() {\n/* */ try {\n/* 82 */ FlujoDetalleDTO reg = new FlujoDetalleDTO();\n/* */ \n/* 84 */ reg.setCodigoFlujo(this.rs.getInt(\"codigo_flujo\"));\n/* 85 */ reg.setSecuencia(this.rs.getInt(\"secuencia\"));\n/* 86 */ reg.setServicioInicio(this.rs.getInt(\"servicio_inicio\"));\n/* 87 */ reg.setCodigoEstado(this.rs.getInt(\"codigo_estado\"));\n/* 88 */ reg.setServicioDestino(this.rs.getInt(\"servicio_destino\"));\n/* 89 */ reg.setNombreProcedimiento(this.rs.getString(\"nombre_procedimiento\"));\n/* 90 */ reg.setCorreoDestino(this.rs.getString(\"correo_destino\"));\n/* 91 */ reg.setEnviarSolicitud(this.rs.getString(\"enviar_solicitud\"));\n/* 92 */ reg.setMismoProveedor(this.rs.getString(\"ind_mismo_proveedor\"));\n/* 93 */ reg.setMismoCliente(this.rs.getString(\"ind_mismo_cliente\"));\n/* 94 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 95 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 96 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 97 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 98 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 99 */ reg.setNombreServicioInicio(this.rs.getString(\"nombre_servicio_inicio\"));\n/* 100 */ reg.setNombreCodigoEstado(this.rs.getString(\"nombre_codigo_estado\"));\n/* 101 */ reg.setNombreServicioDestino(this.rs.getString(\"nombre_servicio_destino\"));\n/* 102 */ reg.setNombreEstado(this.rs.getString(\"nombre_estado\"));\n/* 103 */ reg.setCaracteristica(this.rs.getInt(\"caracteristica\"));\n/* 104 */ reg.setCaracteristicaValor(this.rs.getInt(\"valor_caracteristica\"));\n/* 105 */ reg.setCaracteristicaCorreo(this.rs.getInt(\"caracteristica_correo\"));\n/* 106 */ reg.setNombreCaracteristica(this.rs.getString(\"nombre_caracteristica\"));\n/* 107 */ reg.setDescripcionValor(this.rs.getString(\"descripcion_valor\"));\n/* 108 */ reg.setMetodoSeleccionProveedor(this.rs.getString(\"metodo_seleccion_proveedor\"));\n/* 109 */ reg.setIndCorreoCliente(this.rs.getString(\"ind_correo_clientes\"));\n/* */ \n/* */ try {\n/* 112 */ reg.setEnviar_hermana(this.rs.getString(\"enviar_hermana\"));\n/* 113 */ reg.setEnviar_si_hermana_cerrada(this.rs.getString(\"enviar_si_hermana_cerrada\"));\n/* 114 */ reg.setInd_cliente_inicial(this.rs.getString(\"ind_cliente_inicial\"));\n/* */ \n/* */ \n/* */ }\n/* 118 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 122 */ return reg;\n/* */ }\n/* 124 */ catch (Exception e) {\n/* 125 */ e.printStackTrace();\n/* 126 */ Utilidades.writeError(\"FlujoDetalleDAO:leerRegistro \", e);\n/* */ \n/* 128 */ return null;\n/* */ } \n/* */ }",
"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 }",
"private void controladorAtras(Controlador controlador){\n this.contAtras = controlador.getAtras();\n registro.setControlAtras(contAtras);\n login.setControlAtras(contAtras);\n }",
"public void guardarCV(String nombre, String Apellido,String dni,String mail,String cur ,File ruta,String mensaje){\r\n Alumnos alu=new Alumnos();\r\n alu.setNombre(nombre);\r\n alu.setApellido(Apellido);\r\n alu.setDni(dni);\r\n alu.setMail(mail);\r\n alu.setMensaje(mensaje);\r\n alu.setNom_archivo(cur);\r\n\r\n\r\n\r\n try{ //convierte el archivo pdf a bytes\r\n byte[] pdf= new byte[(int) ruta.length()];\r\n InputStream input= new FileInputStream(ruta);\r\n input.read(pdf);\r\n alu.setArchivo_cv(pdf);\r\n\r\n }catch(IOException e){\r\n alu.setArchivo_cv(null);\r\n }\r\n alu.insertarCV(alu);\r\n }",
"public void grabarConcepto(){\r\n try {\r\n Conexion conexion = new Conexion();\r\n String query = \"insert into concepto (descripcion, tipoConcepto, porcentaje, monto, fijo) values (?,?,?,?,?);\";\r\n PreparedStatement st = conexion.getConnection().prepareStatement(query);\r\n st.setString(1, this.getDescripcion());\r\n st.setString(2, this.getTipoConcepto());\r\n st.setDouble(3, this.getPorcentaje());\r\n st.setDouble(4, this.getMonto());\r\n st.setString(5, this.getFijo());\r\n st.execute();\r\n System.out.println(\"SE GRABO EL CONCEPTO EN LA BASE DE DATOS\");\r\n st.close();\r\n conexion.desconectar();\r\n } catch (SQLException ex) {\r\n System.err.println(ex.getMessage());\r\n }\r\n }",
"int insert(TCar record);",
"Lancamento persistir(Lancamento lancamento);",
"public void guardar() {\n try {\n objConec.conectar();\n objConec.Sql = objConec.con.prepareStatement(\"insert into contacto values(null,?,?,?,?,?)\");\n objConec.Sql.setString(1, getNom_con());\n objConec.Sql.setInt(2, getTel_con()); \n objConec.Sql.setString(3, getEma_con());\n objConec.Sql.setString(4, getAsu_con());\n objConec.Sql.setString(5, getMen_con());\n objConec.Sql.executeUpdate();\n objConec.cerrar();\n JOptionPane.showMessageDialog(null, \"Mensaje enviado correctamente\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Error al enviar el mensaje\");\n\n }\n\n }",
"private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }",
"public void save() {\n super.storageSave(listPedidosAssistencia.toArray());\n }",
"public EncabezadoRespuesta entradaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\t\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t\t\t//Mandamos a log el objeto de entrada\n\t\t\t\tLogHandler.debug(uid, this.getClass(), \"entradaAsistencia - Datos Entrada: \" + asistencia);\n\t\t\t\t//Variable de resultado\n\t\t\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\t try {\n\t\t \tif (asistencia.getIdEmpleado() == null) {\n\t\t \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n\t\t \t}\n\t\t \tif (asistencia.getUsuarioAlta() == null || asistencia.getUsuarioAlta().trim().isEmpty()) {\n\t\t \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario.\");\n\t\t \t}\n\t\t \tAsistenciaDAO dao = new AsistenciaDAO();\n\t\t \trespuesta = dao.entradaAsistencia(uid, asistencia);\n\n\t\t } catch (ExcepcionesCuadrillas ex) {\n\t\t\t\t\tLogHandler.error(uid, this.getClass(), \"entradaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\t\t\trespuesta.setUid(uid);\n\t\t\t\t\trespuesta.setEstatus(false);\n\t\t\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {\n\t\t\t\t\tLogHandler.error(uid, this.getClass(), \"entradaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\t\t\trespuesta.setUid(uid);\n\t\t\t\t\trespuesta.setEstatus(false);\n\t\t\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t\t\t}\n\t\t\t\tLogHandler.debug(uid, this.getClass(), \"entradaAsistencia - Datos Salida: \" + respuesta);\n\t\t\t\treturn respuesta;\n\t}",
"@Override\r\n public Assunto persistir(Assunto assunto) {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n em.getTransaction().begin();\r\n try {\r\n assunto = em.merge(assunto);\r\n em.getTransaction().commit();\r\n System.out.println(\"Registro Assunto gravado com sucesso\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return assunto;\r\n }",
"public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}",
"public void guardarEntrada(HashMap<String, Object> diccionario_datos){\n File file = new File(fichero_database);\n FileWriter writer = null;\n if(file.exists()){\n try{\n writer = new FileWriter(file, true);\n //crea un buffer o flujo intermedio antes de escribir directamente en el archivo\n BufferedWriter bfwriter = new BufferedWriter(writer);\n Iterator it = diccionario_datos.entrySet().iterator();\n while (it.hasNext()) {\n HashMap.Entry pair = (HashMap.Entry)it.next();\n bfwriter.write(pair.getKey() + \",\" );\n it.remove(); // para evitar ConcurrentModificationException\n }\n bfwriter.write(\"\\n\" );\n bfwriter.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (writer != null) {\n try {//cierra el flujo principal\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n }",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"public ArrayList<Mascota> obtenerDatos(){\n\n BaseDatos db = new BaseDatos(context);\n\n ArrayList<Mascota> aux = db.obtenerTodoslosContactos();\n\n if(aux.size()==0){\n insertarMascotas(db);\n aux = db.obtenerTodoslosContactos();\n }\n\n return aux;\n }",
"public void asociar(){\n abrirEntAntMaest();\n try{\n while(true){\n CuentaSerializada cuenta =\n (CuentaSerializada) entAntMaest.readObject();\n \n abrirEntTransaccion();\n empatarCuentaTransaccion(cuenta);\n cerrarEntTransaccion();\n agregarASalNuevoMaest(cuenta);\n }\n }\n catch(EOFException eOFException){\n System.out.printf(\"%nNo hay mas registros%n\");\n }\n catch(ClassNotFoundException classNotFoundException){\n System.err.println(\"Tipo de objeto invalido. Terminado.\");\n }\n catch(IOException iOException){\n System.err.println(\"Error al leer del archivo. Terminado.\");\n }\n }",
"@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 }",
"ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);",
"int insert(Movimiento record);",
"public String agregarCuenta(Cuenta cuenta) {\n String mensaje = \"\";\n try {\n PreparedStatement PrSt;\n String Query = \"INSERT INTO Cuenta VALUES(?,?,?,?)\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, cuenta.getCodigo());\n PrSt.setDate(2, cuenta.getCreacion());\n PrSt.setDouble(3, cuenta.getCredito());\n PrSt.setString(4, cuenta.getCodigo_cliente());\n int resultado = PrSt.executeUpdate();\n if (resultado > 0) {\n mensaje = \"Agregada Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente();\n } else {\n mensaje = \"Fallo al agregar Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente();\n }\n PrSt.close();\n } catch (SQLException e) {\n mensaje = \"Fallo al agregar Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente() + \" Error: \" + e.toString();\n }\n return mensaje;\n }",
"@Override\r\n\tprotected void process() {\n\t\tconsultarSustentoProxy.setCodigoActvidad(codigo_actividad);\r\n\t\tconsultarSustentoProxy.setCodigoCliente(codigo_cliente);\r\n\t\tconsultarSustentoProxy.setCodigoPLan(codigo_plan);\r\n\t\tconsultarSustentoProxy.execute();\r\n\t}",
"public void llenarDatosTransaccion(TransactionEntity entity, int indiceLayoutHose){\n //**********************************************************\n int contador = 0;\n Log.v(\"INICIO\",\"**********************************************************\");\n\n Log.v(\"Bomba\",String.valueOf(entity.getIdBomba()));\n //**********************************************************\n //EstadoActual\n int[] tramaEstadoActual = new int[1];\n contador = 0;\n for(int i = 8; i<= 8; i++){\n tramaEstadoActual[contador] = bufferRecepcion[i];\n contador++;\n }\n //String estadoActual = byteArrayToHexString(tramaEstadoActual,tramaEstadoActual.length);\n int estadoActual = Integer.parseInt(byteArrayToHexIntGeneral(tramaEstadoActual,1));\n entity.setEstadoActual(estadoActual);\n\n Log.v(\"Estado\",String.valueOf(entity.getEstadoActual()));\n cambioEstado(indiceLayoutHose, estadoActual);\n\n //**********************************************************\n //Capturar Nro Transaccion\n int[] tramaNroTransaccion = new int[3];\n contador = 0;\n for(int i = 9; i<= 11; i++){\n tramaNroTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n String nroTransaccion = \"\" + byteArrayToHexInt(tramaNroTransaccion,tramaNroTransaccion.length);\n entity.setNumeroTransaccion(nroTransaccion);\n Log.v(\"Nro. Transacción\",entity.getNumeroTransaccion());\n\n //**********************************************************\n //Capturar Fecha Inicio\n int[] tramaFechaInicio = new int[1];\n tramaFechaInicio[0] = bufferRecepcion[12];\n String dia = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[13];\n String mes = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[14];\n String anio = \"20\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[17];\n String hora = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[16];\n String minuto = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[15];\n String segundo = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n\n String fechaInicio = dia + \"-\" + mes + \"-\" + anio + \"\";\n String horaInicio = hora + \":\" + minuto + \":\" + segundo;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaInicio(fechaInicio);\n entity.setHoraInicio(horaInicio);\n Log.v(\"Fecha Inicio\",entity.getFechaInicio());\n Log.v(\"Hora Inicio\",entity.getHoraInicio());\n\n //**********************************************************\n //Capturar Turno\n int[] tramaTurno = new int[2];\n contador = 0;\n for(int i = 18; i<= 19; i++){\n tramaTurno[contador] = bufferRecepcion[i];\n contador++;\n }\n int turno = byteArrayToHexInt2(tramaTurno,tramaTurno.length);\n entity.setTurno(turno);\n Log.v(\"Turno\",\"\"+entity.getTurno());\n\n //**********************************************************\n //Numero de Tanque\n int[] tramaNumeroTanque = new int[1];\n contador = 0;\n for(int i = 21; i<= 21; i++){\n tramaNumeroTanque[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int numeroTanque = Integer.parseInt(byteArrayToHexIntGeneral(tramaNumeroTanque,1));\n entity.setNumeroTanque(numeroTanque);\n\n Log.v(\"Tanque\",\"\"+entity.getNumeroTanque());\n\n //**********************************************************\n //Tipo de Vehiculo\n int[] tramaTipoVehiculo = new int[1];\n contador = 0;\n for(int i = 22; i<= 22; i++){\n tramaTipoVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoVehiculo = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoVehiculo,1));\n entity.setTipoVehiculo(tipoVehiculo);\n\n Log.v(\"Tipo Vehiculo\",\"\"+entity.getTipoVehiculo());\n\n\n //**********************************************************\n //Capturar IdVehiculo\n int[] tramaIdVehiculo = new int[8];\n contador = 0;\n for(int i = 23; i<= 30; i++){\n tramaIdVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdVehiculo = hexToAscii(byteArrayToHexString(tramaIdVehiculo,tramaIdVehiculo.length));\n entity.setIdVehiculo(IdVehiculo);\n\n Log.v(\"IdVehiculo\",entity.getIdVehiculo());\n\n //**********************************************************\n //Capturar Placa\n int[] tramaPlaca = new int[10];\n contador = 0;\n for(int i = 31; i<= 40; i++){\n tramaPlaca[contador] = bufferRecepcion[i];\n contador++;\n }\n String placa = hexToAscii(byteArrayToHexString(tramaPlaca,tramaPlaca.length));\n entity.setPlaca(placa);\n\n Log.v(\"Placa\",entity.getPlaca());\n\n //**********************************************************\n //Capturar Kilometro\n\n int[] tramaKilometroParteEntera = new int[3];\n contador = 0;\n for(int i = 41; i<= 43; i++){\n tramaKilometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteEntera = byteArrayToHexInt(tramaKilometroParteEntera,tramaKilometroParteEntera.length);\n\n int[] tramaKilometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 44; i<= 44; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n\n //double kilometro = kilometroParteEntera + kilometroParteDecimal*0.1;\n double kilometro = Double.valueOf(kilometroParteEntera + \".\"+kilometroParteDecimal);\n entity.setKilometraje(\"\"+kilometro);\n\n Log.v(\"Kilometro\",\"\"+kilometro);\n\n //**********************************************************\n //Capturar Horometro\n\n int[] tramaHorometroParteEntera = new int[3];\n contador = 0;\n for(int i = 45; i<= 47; i++){\n tramaHorometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int horometroParteEntera = byteArrayToHexInt(tramaHorometroParteEntera,tramaHorometroParteEntera.length);\n\n int[] tramaHorometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 48; i<= 48; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n\n double horometro = 0.0;\n\n if(tramaHorometroParteDecimal[0]==255){\n horometro = horometroParteEntera/10D;\n }else{\n int horometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n //horometro = horometroParteEntera + horometroParteDecimal*0.1;\n horometro = Double.valueOf(horometroParteEntera + \".\"+horometroParteDecimal);\n }\n\n entity.setHorometro(\"\"+horometro);\n\n Log.v(\"Horometro\",\"\"+horometro);\n\n //**********************************************************\n //Capturar IdConductor\n int[] tramaIdConductor = new int[8];\n contador = 0;\n for(int i = 49; i<= 56; i++){\n tramaIdConductor[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdConductor = hexToAscii(byteArrayToHexString(tramaIdConductor,tramaIdConductor.length));\n entity.setIdConductor(IdConductor);\n\n Log.v(\"IdConductor\",entity.getIdConductor());\n\n //**********************************************************\n //Capturar IdOperador\n int[] tramaIdOperador = new int[8];\n contador = 0;\n for(int i = 57; i<= 64; i++){\n tramaIdOperador[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdOperador = hexToAscii(byteArrayToHexString(tramaIdOperador,tramaIdOperador.length));\n entity.setIdOperador(IdOperador);\n\n Log.v(\"IdOperador\",entity.getIdOperador());\n\n //**********************************************************\n //Tipo de Transacción\n int[] tramaTipoTransaccion = new int[1];\n contador = 0;\n for(int i = 65; i<= 65; i++){\n tramaTipoTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTransaccion = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTransaccion,1));\n entity.setTipoTransaccion(tipoTransaccion);\n\n Log.v(\"Tipo Transacción\",\"\"+entity.getTipoTransaccion());\n\n //**********************************************************\n //Capturar Latitud\n int[] tramaLatitud = new int[12];\n contador = 0;\n for(int i = 66; i<= 77; i++){\n tramaLatitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String latitud = hexToAscii(byteArrayToHexString(tramaLatitud,tramaLatitud.length));\n entity.setLatitud(latitud);\n\n Log.v(\"Latitud\",entity.getLatitud());\n\n //**********************************************************\n //Capturar Longitud\n int[] tramaLongitud = new int[12];\n contador = 0;\n for(int i = 78; i<= 89; i++){\n tramaLongitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String longitud = hexToAscii(byteArrayToHexString(tramaLongitud,tramaLongitud.length));\n entity.setLongitud(longitud);\n\n Log.v(\"Longitud\",entity.getLongitud());\n\n //**********************************************************\n //Capturar Tipo Error Pre-Seteo\n int[] tramaTipoErrorPreseteo = new int[1];\n contador = 0;\n for(int i = 90; i<= 90; i++){\n tramaTipoErrorPreseteo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoErrorPreseteo= Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoErrorPreseteo,1));\n entity.setTipoErrorPreseteo(tipoErrorPreseteo);\n\n Log.v(\"Tipo Error Preseteo\",\"\"+entity.getTipoErrorPreseteo());\n\n //**********************************************************\n //Capturar Volumen Autorizado\n int[] tramaVolumenAutorizado = new int[2];\n contador = 0;\n for(int i = 91; i<= 92; i++){\n tramaVolumenAutorizado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAutorizado = byteArrayToHexInt2(tramaVolumenAutorizado,tramaVolumenAutorizado.length);\n entity.setVolumenAutorizado(volumenAutorizado);\n Log.v(\"Volumen Autorizado\",\"\"+entity.getVolumenAutorizado());\n\n //**********************************************************\n //Capturar Volumen Aceptado\n int[] tramaVolumenAceptado = new int[2];\n contador = 0;\n for(int i = 93; i<= 94; i++){\n tramaVolumenAceptado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAceptado = byteArrayToHexInt2(tramaVolumenAceptado,tramaVolumenAceptado.length);\n entity.setVolumenAceptado(volumenAceptado);\n Log.v(\"Volumen Aceptado\",\"\"+entity.getVolumenAceptado());\n\n //**********************************************************\n //Capturar Código Cliente\n int[] tramaCodigoCliente = new int[2];\n contador = 0;\n for(int i = 100; i<= 101; i++){\n tramaCodigoCliente[contador] = bufferRecepcion[i];\n contador++;\n }\n int codigoCliente = byteArrayToHexInt2(tramaCodigoCliente,tramaCodigoCliente.length);\n entity.setCodigoCliente(codigoCliente);\n Log.v(\"Codigo Cliente\",\"\"+entity.getCodigoCliente());\n\n //**********************************************************\n //Capturar codigo area\n int[] tramaCodigoArea = new int[1];\n contador = 0;\n for(int i = 102; i<= 102; i++){\n tramaCodigoArea[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int CodigoArea = Integer.parseInt(byteArrayToHexIntGeneral(tramaCodigoArea,1));\n entity.setCodigoArea(CodigoArea);\n\n Log.v(\"Codigo Area\",\"\"+entity.getCodigoArea());\n\n //**********************************************************\n //Capturar tipo TAG\n int[] tramaTipoTAG = new int[1];\n contador = 0;\n for(int i = 103; i<= 103; i++){\n tramaTipoTAG[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTAG = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTAG,1));\n entity.setTipoTag(tipoTAG);\n\n Log.v(\"Tipo TAG\",\"\"+entity.getTipoTag());\n\n //**********************************************************\n //Capturar Volumen Abastecido\n int[] tramaVolumen = new int[9];\n contador = 0;\n for(int i = 104; i<= 112; i++){\n tramaVolumen[contador] = bufferRecepcion[i];\n contador++;\n }\n String volumen = \"\"+ hexToAscii(byteArrayToHexString(tramaVolumen,tramaVolumen.length));\n String[] parts = volumen.split(\"\\\\.\");\n if(parts.length > 1) {\n volumen = parts[0] + \".\" + parts[1].substring(0,(0+entity.getCantidadDecimales()));\n }\n\n entity.setVolumen(volumen);\n\n Log.v(\"Volumen Abastecido\",entity.getVolumen());\n\n //**********************************************************\n //Capturar Temperatura\n int[] tramaTemperatura = new int[5];\n contador = 0;\n for(int i = 113; i<= 117; i++){\n tramaTemperatura[contador] = bufferRecepcion[i];\n contador++;\n }\n String temperatura = \"\" + hexToAscii(byteArrayToHexString(tramaTemperatura,tramaTemperatura.length));\n temperatura = temperatura.substring(0,temperatura.length()-1);\n entity.setTemperatura(temperatura);\n\n Log.v(\"Temperatura\",entity.getTemperatura());\n\n //**********************************************************\n //Capturar Fecha Fin\n int[] tramaFechaFin = new int[1];\n tramaFechaFin[0] = bufferRecepcion[118];\n String diaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[119];\n String mesFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[120];\n String anioFin = \"20\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[123];\n String horaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[122];\n String minutoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[121];\n String segundoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n\n String fechaFin = diaFin + \"-\" + mesFin + \"-\" + anioFin + \"\" ;\n String horaFin1 = horaFin + \":\" + minutoFin + \":\" + segundoFin;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaFin(fechaFin);\n entity.setHoraFin(horaFin1);\n\n Log.v(\"Fecha Fin\",entity.getFechaFin());\n Log.v(\"Hora Fin\",entity.getHoraFin());\n\n //**********************************************************\n //Capturar Tipo de Cierre\n int[] tramaTipoCierre = new int[1];\n contador = 0;\n for(int i = 124; i<= 124; i++){\n tramaTipoCierre[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoCierre = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoCierre,1));\n entity.setTipoCierre(tipoCierre);\n\n Log.v(\"Tipo Cierre\",\"\"+entity.getTipoCierre());\n\n txt_galones = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_galones);\n txt_ultimo_ticket = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket);\n txt_placa = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_placa);\n txt_producto = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_producto);\n txt_ultimo_galon_p2 = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_galon_p2);\n txt_ultimo_ticket_p2= layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket_p2);\n\n txt_producto.setText(entity.getNombreProducto());\n txt_placa.setText(entity.getPlaca());\n txt_galones.setText(entity.getVolumen());\n txt_ultimo_galon_p2.setText(entity.getVolumen());\n txt_ultimo_ticket.setText(entity.getNumeroTransaccion());\n txt_ultimo_ticket_p2.setText(entity.getNumeroTransaccion());\n\n\n guardarTransaccionBD(entity);\n\n }",
"private byte[] processData(String peticion) {\n\t\t\n\t\tString respuesta = \"\";\n\t\t\n\t\tswitch (peticion) {\n\t\t\t\n\t\t\tcase \"noticias\": respuesta = \"¡Por fin la vacuna ya está en España!\"; break;\n\t\t\tcase \"hora\": respuesta = getFecha(); break;\n\t\t\tcase \"aleatorio\": respuesta = Double. toString(Math.random()*10); break;\n\t\t\tcase \"cerrar\": respuesta = \"Adios\"; break;\n\t\t\tcase \"cerrarServidor\": respuesta = \"Adios\"; break;\t\t\t\n\t\t\tdefault: respuesta = \"petición desconocida\";\n\t\t}\n\t\t\n\t\treturn respuesta.getBytes();\n\t}",
"public boolean Actualizar(String Usuario, String NombreMaterial, String Fecha, Integer NCampo, String NuevoCampo) throws IOException\n {\n System.out.println(\"Ëntro\");\n List<String> ListaLineaEliminar = BuscarIndice(Usuario, NombreMaterial, Fecha);\n if(ListaLineaEliminar.get(0) == \"404\"){ return false; }\n else{\n String LineaEliminar = ListaLineaEliminar.get(0);\n System.out.println(LineaEliminar);\n String[] Campos = LineaEliminar.split(\"\\\\|\");\n String NMaestro = Campos[1].substring(0,1);\n Integer NMaestroLinea = Integer.parseInt(Campos[1].substring(2,3));\n String L = ObtenerLinea(NMaestroLinea, \"C:\\\\MEIA\\\\Donaciones_\" + NMaestro + \".txt\");\n String[] CamposL = L.split(\"\\\\|\");\n Boolean Existe = Eliminar(Usuario, NombreMaterial, Fecha);\n System.out.println(Usuario);\n System.out.println(NombreMaterial);\n System.out.println(Fecha);\n if(NCampo == 0){\n Insertar(NuevoCampo, CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 1){\n Insertar(CamposL[0], CamposL[2], NuevoCampo, Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 2){\n Insertar(CamposL[0], NuevoCampo, CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 3){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(NuevoCampo), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 4){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), NuevoCampo, CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 5){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], NuevoCampo, CamposL[6]);\n return true;\n }\n else if(NCampo == 6){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], NuevoCampo);\n return true;\n }\n else{ return false; }\n }\n }",
"private void EnviarDatos(String user, String fecha, String pasos){\n\r\n HttpClient httpclient = new DefaultHttpClient();\r\n //Utilizamos la HttpPost para enviar lso datos\r\n //A la url donde se encuentre nuestro archivo receptor\r\n\r\n\r\n\r\n\r\n HttpPost httppost2 = new HttpPost(\"http://mets.itisol.com.mx/paciente/insertaActividad\");\r\n try {\r\n //Añadimos los datos a enviar en este caso solo uno\r\n //que le llamamos de nombre 'a'\r\n //La segunda linea podría repetirse tantas veces como queramos\r\n //siempre cambiando el nombre ('a')\r\n List<NameValuePair> postValues = new ArrayList<NameValuePair>(2);\r\n postValues.add(new BasicNameValuePair(\"usuario\", user));\r\n\r\n postValues.add(new BasicNameValuePair(\"fecha\", fecha));\r\n Log.d(\"la fecha es\", \"\" + cambiaFecha(fecha));\r\n postValues.add(new BasicNameValuePair(\"pasos\", pasos));\r\n\r\n // postValues.add(new BasicNameValuePair(\"tipo\", \"1\"));\r\n\r\n //Encapsulamos\r\n httppost2.setEntity(new UrlEncodedFormEntity(postValues));\r\n //Lanzamos la petición\r\n HttpResponse respuesta2 = httpclient.execute(httppost2);\r\n //Conectamos para recibir datos de respuesta\r\n HttpEntity entity2 = respuesta2.getEntity();\r\n //Creamos el InputStream como su propio nombre indica\r\n InputStream is2 = entity2.getContent();\r\n //Limpiamos el codigo obtenido atraves de la funcion\r\n //StreamToString explicada más abajo\r\n String resultado2= StreamToString(is2);\r\n\r\n //Enviamos el resultado LIMPIO al Handler para mostrarlo\r\n Message sms2 = new Message();\r\n sms2.obj = resultado2;\r\n\r\n puente.sendMessage(sms2);\r\n }catch (IOException e) {\r\n //TODO Auto-generated catch block\r\n }\r\n\r\n }",
"int insert(ParUsuarios record);",
"public static void guardarEstudianteBD(Estudiante estudiante) {\r\n //metimos este metodo dentro de la base de datos \r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n //ingresamos la direccion donde se encuntra la base de datos \r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.println(\"Conexion establecida!\");\r\n Statement sentencia = (Statement) conexion.createStatement();\r\n int insert = sentencia.executeUpdate(\"insert into estudiante values(\"\r\n + \"'\" + estudiante.getNro_de_ID()\r\n + \"','\" + estudiante.getNombres()\r\n + \"','\" + estudiante.getApellidos()\r\n + \"','\" + estudiante.getLaboratorio()\r\n + \"','\" + estudiante.getCarrera()\r\n + \"','\" + estudiante.getModulo()\r\n + \"','\" + estudiante.getMateria()\r\n + \"','\" + estudiante.getFecha()\r\n + \"','\" + estudiante.getHora_Ingreso()\r\n + \"','\" + estudiante.getHora_Salida()\r\n + \"')\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.println(\"Error en la conexion\" + ex);\r\n }\r\n }",
"private void limpiarDatos() {\n\t\t\n\t}",
"private void getTempRojoBhcs(){\n mTempRojoBhcs = estudioAdapter.getListaTempRojoBhcSinEnviar();\n //ca.close();\n }",
"public void guardarDatos() throws Exception {\r\n try {\r\n FormularioUtil.setUpperCase(groupboxEditar);\r\n if (validarForm()) {\r\n\r\n Admision admision = ((Admision) lbxNro_ingreso\r\n .getSelectedItem().getValue());\r\n\r\n Hospitalizacion hospitalizacion = new Hospitalizacion();\r\n hospitalizacion.setCodigo_empresa(empresa.getCodigo_empresa());\r\n hospitalizacion.setCodigo_sucursal(sucursal\r\n .getCodigo_sucursal());\r\n hospitalizacion.setNro_factura(tbxNro_factura.getValue());\r\n hospitalizacion = getServiceLocator()\r\n .getHospitalizacionService().consultar(hospitalizacion);\r\n if (hospitalizacion == null) {\r\n hospitalizacion = new Hospitalizacion();\r\n hospitalizacion.setCodigo_empresa(empresa\r\n .getCodigo_empresa());\r\n hospitalizacion.setCodigo_sucursal(sucursal\r\n .getCodigo_sucursal());\r\n hospitalizacion.setNro_factura(tbxNro_factura.getValue());\r\n }\r\n hospitalizacion.setTipo_identificacion((String) datos_seleccion\r\n .get(\"tipo_identificacion\"));\r\n hospitalizacion.setNro_identificacion(tbxNro_identificacion\r\n .getValue());\r\n hospitalizacion\r\n .setCodigo_administradora((String) datos_seleccion\r\n .get(\"codigo_administradora\"));\r\n hospitalizacion.setId_plan((String) datos_seleccion\r\n .get(\"id_plan\"));\r\n hospitalizacion.setNro_ingreso(admision.getNro_ingreso());\r\n hospitalizacion.setCodigo_prestador(tbxCodigo_prestador\r\n .getValue());\r\n hospitalizacion.setVia_ingreso(lbxVia_ingreso.getSelectedItem()\r\n .getValue().toString());\r\n hospitalizacion.setFecha_ingreso(new Timestamp(\r\n dtbxFecha_ingreso.getValue().getTime()));\r\n hospitalizacion.setNumero_autorizacion(tbxNumero_autorizacion\r\n .getValue());\r\n hospitalizacion.setCausa_externa((String) lbxCausa_externa\r\n .getSelectedItem().getValue().toString());\r\n hospitalizacion.setEstado_salida((String) lbxEstado_salida\r\n .getSelectedItem().getValue().toString());\r\n hospitalizacion.setFecha_egreso(new Timestamp(dtbxFecha_egreso\r\n .getValue().getTime()));\r\n hospitalizacion\r\n .setCodigo_diagnostico_principal(tbxCodigo_diagnostico_principal\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico1(tbxCodigo_diagnostico1\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico2(tbxCodigo_diagnostico2\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico3(tbxCodigo_diagnostico3\r\n .getValue());\r\n hospitalizacion.setComplicacion(tbxComplicacion.getValue());\r\n hospitalizacion.setCausa_muerte(tbxCausa_muerte.getValue());\r\n\r\n hospitalizacion.setCreacion_date(new Timestamp(\r\n new GregorianCalendar().getTimeInMillis()));\r\n hospitalizacion.setUltimo_update(new Timestamp(\r\n new GregorianCalendar().getTimeInMillis()));\r\n hospitalizacion.setCreacion_user(usuarios.getCodigo()\r\n .toString());\r\n hospitalizacion.setUltimo_user(usuarios.getCodigo().toString());\r\n\r\n String complemento = \"\";\r\n\r\n if (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n getServiceLocator().getHospitalizacionService().crear(\r\n hospitalizacion);\r\n if (FACTURACION_RIPS != null) {\r\n this.detach();\r\n } else {\r\n accionForm(true, \"registrar\");\r\n }\r\n } else {\r\n int result = getServiceLocator()\r\n .getHospitalizacionService().actualizar(\r\n hospitalizacion);\r\n if (result == 0) {\r\n throw new Exception(\r\n \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\");\r\n }\r\n }\r\n\r\n if (ionGuardar != null) {\r\n ionGuardar.guardar();\r\n } else {\r\n Messagebox.show(\r\n \"Los datos se guardaron satisfactoriamente.\"\r\n + complemento, \"Informacion? ..\",\r\n Messagebox.OK, Messagebox.INFORMATION);\r\n tbxNro_factura.setValue(hospitalizacion.getNro_factura());\r\n tbxAccion.setValue(\"modificar\");\r\n }\r\n\r\n if (this.getParent() instanceof Facturacion_ripsAction) {\r\n this.detach();\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n MensajesUtil.mensajeError(e, \"\", this);\r\n }\r\n }",
"private void saveEncLactancias(String estado) {\n int c = mLactanciasMaternas.size();\n for (LactanciaMaterna enclactancia : mLactanciasMaternas) {\n enclactancia.getMovilInfo().setEstado(estado);\n estudioAdapter.updateLacMatSent(enclactancia);\n publishProgress(\"Actualizando encuestas lactancia\", Integer.valueOf(mLactanciasMaternas.indexOf(enclactancia)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public void recargarDatos( ) {\n\t\tPAC_SHWEB_PROVEEDORES llamadaProv = null;\n\t\ttry {\n\t\t\tllamadaProv = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaCom = null;\n\n\t\ttry {\n\t\t\trespuestaCom = llamadaProv.ejecutaPAC_SHWEB_PROVEEDORES__F_COMUNICADOS_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t// Mostramos el estado del expediente\n\t\tPAC_SHWEB_PROVEEDORES llamada = null;\n\t\ttry {\n\t\t\tllamada = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuesta = null;\n\t\ttry {\n\t\t\trespuesta = llamada.ejecutaPAC_SHWEB_PROVEEDORES__F_ESTADO_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t\tMap<String, Object> retorno = new HashMap<String, Object>(respuesta);\n\n\t\t\tUI.getCurrent().getSession().setAttribute(\"estadoExpediente\",retorno.get(\"ESTADO\").toString());\n\t\t\t\n\t\t\tprovPantallaConsultaExpedienteInicial.setCaption(\"GESTIÓN DEL EXPEDIENTE Nº \" + UI.getCurrent().getSession().getAttribute(\"expediente\")\n\t\t\t\t\t+ \" ( \" + \n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\") + \" ) \");\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\t\n\t\t\n\t\t// Maestro comunicados\n\n\t\tWS_AMA llamadaAMA = null;\n\t\ttry {\n\t\t\tllamadaAMA = new WS_AMA(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaMaestro = null;\n\t\t\n\t\t//System.out.println(\"Llamammos maestro comunicados: \" + UI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1));;\n\t\ttry {\n\t\t\t// pPUSUARIO, pORIGEN, pTPCOMUNI, pTPUSUARIO, pESTADO)\n\t\t\t\n\t\t\trespuestaMaestro = llamadaAMA.ejecutaWS_AMA__MAESTRO_COMUNICADOS(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnull,\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\").toString()\n\t\t\t\t\t);\t\t\t\n\n\t\t\t\n\t\t\tMap<String, Object> retornoMaestro = new HashMap<String, Object>(respuestaMaestro);\n\t\t\tList<Map> valorMaestro = (List<Map>) retornoMaestro.get(\"COMUNICADOS\");\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",valorMaestro);\n\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",null);\n\t\t}\n\t\t\n\t\t// \t\n\t\t\n\t\t\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\t\t/*if ( !ValidarComunicado.EsValido(\"CA\") && !ValidarComunicado.EsValido(\"FT\") ) {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(true);\n\n\t\t\t\n\t\t\t\n\t\t}*/\n\t\t// Mostramos botonera de cerrar expediente\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\n\t}",
"@Override\n public Call<ResponseBody> registarMoviemientoEmpleado(@Body RootMovimiento movimiento) {\n movimiento.setId_dispositivo(Settings.Secure.getString(this.context.getContentResolver(), Settings.Secure.ANDROID_ID));\n return this.serviceInterface.registarMoviemientoEmpleado(movimiento);\n }",
"@Override\r\n\tprotected String requestText() {\n\t\tGuardarVtaCeroMotivoRequest guardarVtaCeroMotivoRequest = new GuardarVtaCeroMotivoRequest();\r\n\t\tguardarVtaCeroMotivoRequest.setAnio(Anio);\r\n\t\tguardarVtaCeroMotivoRequest.setCodCliente(codCliente);\r\n\t\tguardarVtaCeroMotivoRequest.setCodDeposito(codDeposito);\r\n\t\tguardarVtaCeroMotivoRequest.setMes(Mes);\r\n\t\tguardarVtaCeroMotivoRequest.setMotivo(Motivo);\r\n\t\tguardarVtaCeroMotivoRequest.setObservacion(observacion);\r\n\t\tguardarVtaCeroMotivoRequest.setSemana(Semana);\r\n\t\tguardarVtaCeroMotivoRequest.setUsuario(Usuario);\r\n\t\tString request = JSONHelper.serializar(guardarVtaCeroMotivoRequest);\r\n\t\treturn request;\r\n\t}",
"public String guardar()\r\n/* 104: */ {\r\n/* 105: */ try\r\n/* 106: */ {\r\n/* 107:132 */ this.servicioDimensionContable.guardar(this.dimensionContable);\r\n/* 108:133 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 109:134 */ setEditado(false);\r\n/* 110:135 */ cargarDatos();\r\n/* 111: */ }\r\n/* 112: */ catch (Exception e)\r\n/* 113: */ {\r\n/* 114:137 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 115:138 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 116: */ }\r\n/* 117:140 */ return \"\";\r\n/* 118: */ }",
"public String cambiarEstado() {\n\t\ttry {\n\t\t\tMensaje.crearMensajeINFO(managergest.cambioEstadoItem(getOfertadelsita().getOferId()));\n\t\t\tgetListaOferta().clear();\n\t\t\tgetListaOferta().addAll(managergest.findAllofertasOrdenadas());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"\";\n\t}",
"@Override\r\n\tprotected String requestText() {\n\t\tGuardarSustentoRequest guardarSustentoRequest = new GuardarSustentoRequest();\r\n\t\tguardarSustentoRequest.setCodigoActvidad(codigoActvidad);\r\n\t\tguardarSustentoRequest.setCodigoCliente(codigoCliente);\r\n\t\tguardarSustentoRequest.setCodigoPLan(codigoPLan);\r\n\t\tguardarSustentoRequest.setDescripcionActividad(descripcionActividad);\r\n\t\tguardarSustentoRequest.setFechaVisita(fechaVisita);\r\n\t\tguardarSustentoRequest.setTipoActividad(tipoActividad);\r\n\t\tguardarSustentoRequest.setUsuario(usuario);\r\n\t\tString request = JSONHelper.serializar(guardarSustentoRequest);\r\n\t\treturn request;\r\n\t}",
"private void agregarASalNuevoMaest(CuentaSerializada cuenta){\n try{\n salNuevoMaest.writeObject(cuenta);\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 }",
"public void enviarValoresCabecera(){\n }",
"public void guardarDestruccion() {\n try {\n produccion.setIdMarca(opcionMarca);\n produccion.setIdPlantaProd(opcionPlanta);\n produccion.setIdPaisOrigen(opcionOrigen);\n produccion.setIdTipoRetro(opcionTipo);\n produccion.setFechProduccion(new Date());\n produccion.setDescPaisOrigen(desperdiciosHelper.getNombrePais());\n\n if (!habilitarBtnValidarProd()) {\n if (produccion != null) {\n produccion = produccionService.guardaDestruccion(produccion);\n super.msgInfo(MSGEXITOVALIDAPROD);\n desperdiciosHelper.setDeshabilitaBtnValidarProd(true);\n desperdiciosHelper.setDeshabilitaCargaArchivo(false);\n } else {\n super.msgError(MSGERRORVALIDARPROD);\n }\n }\n } catch (ProduccionServiceException e) {\n LOGGER.error(\"ERROR: Al guardar los datos de produccion\" + e.getMessage(), e);\n }\n }",
"public void guardar(Modelo modelo) throws SipsaExcepcion;",
"@Override\n protected void onPostExecute(HttpResponse result) {\n if (result != null)\n\t\t\ttry {\n\t\t\t\tLog.i(\"Conexao\", \"Dentrodopost\");\n\t\t\t\t//result.getEntity().writeTo(new FileOutputStream(f));\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} \n }",
"private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }",
"public String cargarDatos()\r\n/* 514: */ {\r\n/* 515:540 */ return null;\r\n/* 516: */ }",
"@Override\n protected Response doInsert(JSONObject data) {\n return null;\n }"
] |
[
"0.6108867",
"0.6089659",
"0.59963566",
"0.59516066",
"0.59346324",
"0.59239954",
"0.5902984",
"0.5900754",
"0.580848",
"0.57809454",
"0.5766452",
"0.57644504",
"0.5763113",
"0.57480466",
"0.57415074",
"0.5709575",
"0.57050407",
"0.5672679",
"0.56660414",
"0.5664272",
"0.56620985",
"0.5660924",
"0.56539875",
"0.5652867",
"0.5640711",
"0.5639574",
"0.5621628",
"0.5621237",
"0.5618425",
"0.56115556",
"0.5598985",
"0.55770415",
"0.557137",
"0.55665624",
"0.5561801",
"0.55481106",
"0.5547554",
"0.5545583",
"0.55434704",
"0.5530123",
"0.55275875",
"0.5525662",
"0.5524151",
"0.5519947",
"0.55188763",
"0.5511981",
"0.5506241",
"0.55051416",
"0.5503129",
"0.55030775",
"0.54881",
"0.54847366",
"0.5480024",
"0.54506034",
"0.5445036",
"0.54418904",
"0.5441591",
"0.54324824",
"0.5428266",
"0.54233485",
"0.5421697",
"0.5421027",
"0.54141116",
"0.54127306",
"0.5408961",
"0.54024637",
"0.5396911",
"0.53968513",
"0.53895",
"0.53855276",
"0.53819346",
"0.53780955",
"0.53749156",
"0.5370826",
"0.5370472",
"0.53698844",
"0.5368954",
"0.53641844",
"0.5346846",
"0.53458077",
"0.53453165",
"0.53430814",
"0.5335295",
"0.5334208",
"0.5333388",
"0.53326344",
"0.53292847",
"0.53247714",
"0.53199583",
"0.5319406",
"0.53191096",
"0.5317003",
"0.53164697",
"0.53157854",
"0.53155106",
"0.5312124",
"0.53046227",
"0.5300779",
"0.5298598",
"0.5297596",
"0.52974415"
] |
0.0
|
-1
|
Guarda el contenido de la trama retornada a la base de datos
|
public Integer guardarTramaCierreBD(Map<String, String> parametros) {
try {
if (!DBPinpad.guardarTramaCierrePinpadMC(parametros.get("response_code"), parametros.get("message"),
parametros.get("ecr_currency_code"),
parametros.get("ecr_aplication"),
parametros.get("ecr_transaccion"), parametros.get("merchant_id"),
parametros.get("print_data"), VariablesCaja.vNumPedVta))
return VariablesPinpad.RET_NOK;
} catch (Exception e) {
log.debug(e.toString());
return VariablesPinpad.RET_NOK;
}
return VariablesPinpad.RET_OK;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_atencion_embarazada his_atencion_embarazada = new His_atencion_embarazada();\r\n\t\t\t\this_atencion_embarazada.setCodigo_empresa(empresa\r\n\t\t\t\t\t\t.getCodigo_empresa());\r\n\t\t\t\this_atencion_embarazada.setCodigo_sucursal(sucursal\r\n\t\t\t\t\t\t.getCodigo_sucursal());\r\n\t\t\t\this_atencion_embarazada.setCodigo_historia(tbxCodigo_historia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFecha_inicial(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_inicial.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCodigo_eps(tbxCodigo_eps.getValue());\r\n\t\t\t\this_atencion_embarazada.setCodigo_dpto(lbxCodigo_dpto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCodigo_municipio(lbxCodigo_municipio\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setIdentificacion(tbxIdentificacion\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDireccion(tbxMotivo.getValue());\r\n\t\t\t\this_atencion_embarazada.setTelefono(tbxTelefono.getValue());\r\n\t\t\t\this_atencion_embarazada.setSeleccion(rdbSeleccion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setGestaciones(lbxGestaciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPartos(lbxPartos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCesarias(lbxCesarias\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAbortos(lbxAbortos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEspontaneo(lbxEspontaneo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setProvocado(lbxProvocado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNacido_muerto(lbxNacido_muerto\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPrematuro(lbxPrematuro\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_menos(lbxHijos_menos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHijos_mayor(lbxHijos_mayor\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMalformado(lbxMalformado\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHipertension(lbxHipertension\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_ultimo_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_ultimo_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setCirugia(lbxCirugia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setOtro_antecedente(tbxOtro_antecedente\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemoclasificacion(lbxHemoclasificacion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRh(lbxRh.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_atencion_embarazada.setImc(tbxImc.getValue());\r\n\t\t\t\this_atencion_embarazada.setTa(tbxTa.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc(tbxFc.getValue());\r\n\t\t\t\this_atencion_embarazada.setFr(tbxFr.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemperatura(tbxTemperatura\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCroomb(tbxCroomb.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setFecha_ultima_mestruacion(new Timestamp(\r\n\t\t\t\t\t\t\t\tdtbxFecha_ultima_mestruacion.getValue()\r\n\t\t\t\t\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_atencion_embarazada.setFecha_probable_parto(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_probable_parto.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada.setEdad_gestacional(tbxEdad_gestacional\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setControl(lbxControl.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setNum_control(tbxNum_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFetales(lbxFetales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFiebre(lbxFiebre.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido(lbxLiquido.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFlujo(lbxFlujo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEnfermedad(lbxEnfermedad\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_enfermedad(tbxCual_enfermedad\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo(lbxCigarrillo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol(lbxAlcohol.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_alcohol(tbxCual_alcohol\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDroga(lbxDroga.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_droga(tbxCual_droga.getValue());\r\n\t\t\t\this_atencion_embarazada.setViolencia(lbxViolencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_violencia(tbxCual_violencia\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoide(lbxToxoide.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setDosis(lbxDosis.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_gestion(tbxObservaciones_gestion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setAltura_uterina(tbxAltura_uterina\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCorelacion(chbCorelacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEmbarazo_multiple(chbEmbarazo_multiple.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setTrasmision_sexual(chbTrasmision_sexual.isChecked());\r\n\t\t\t\this_atencion_embarazada.setAnomalia(rdbAnomalia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setEdema_gestion(rdbEdema_gestion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPalidez(rdbPalidez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulciones(rdbConvulciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConciencia(rdbConciencia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCavidad_bucal(rdbCavidad_bucal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto(tbxHto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb(tbxHb.getValue());\r\n\t\t\t\this_atencion_embarazada.setToxoplasma(tbxToxoplasma.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl1(tbxVdrl1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl2(tbxVdrl2.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih1(tbxVih1.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih2(tbxVih2.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb(tbxHepb.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtro(tbxOtro.getValue());\r\n\t\t\t\this_atencion_embarazada.setEcografia(tbxEcografia.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_gestion(rdbClasificacion_gestion\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setContracciones(lbxContracciones\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setNum_contracciones(lbxNum_contracciones\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHemorragia(lbxHemorragia\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_vaginal(lbxLiquido_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setColor_liquido(tbxColor_liquido\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDolor_cabeza(lbxDolor_cabeza\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVision(lbxVision.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setConvulcion(lbxConvulcion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_parto(tbxObservaciones_parto\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setContracciones_min(tbxContracciones_min.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_fera(tbxFc_fera.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDilatacion_cervical(tbxDilatacion_cervical\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setPreentacion(rdbPreentacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setOtra_presentacion(tbxOtra_presentacion.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdema(rdbEdema.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setHemorragia_vaginal(lbxHemorragia_vaginal\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setHto_parto(tbxHto_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHb_parto(tbxHb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setHepb_parto(tbxHepb_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVdrl_parto(tbxVdrl_parto.getValue());\r\n\t\t\t\this_atencion_embarazada.setVih_parto(tbxVih_parto.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_parto(rdbClasificacion_parto\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setFecha_nac(new Timestamp(\r\n\t\t\t\t\t\tdtbxFecha_nac.getValue().getTime()));\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setIdentificacion_nac(tbxIdentificacion_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setSexo(lbxSexo.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setPeso_nac(tbxPeso_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTalla_nac(tbxTalla_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setPc_nac(tbxPc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setFc_nac(tbxFc_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setTemper_nac(tbxTemper_nac.getValue());\r\n\t\t\t\this_atencion_embarazada.setEdad(tbxEdad.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar1(tbxAdgar1.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar5(tbxAdgar5.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar10(tbxAdgar10.getValue());\r\n\t\t\t\this_atencion_embarazada.setAdgar20(tbxAdgar20.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setObservaciones_nac(tbxObservaciones_nac.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_nac(rdbClasificacion_nac\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setReani_prematuro(chbReani_prematuro\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_meconio(chbReani_meconio\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_respiracion(chbReani_respiracion.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipotonico(chbReani_hipotonico\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_apnea(chbReani_apnea\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_jadeo(chbReani_jadeo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_deficultosa(chbReani_deficultosa.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_gianosis(chbReani_gianosis\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_bradicardia(chbReani_bradicardia.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_hipoxemia(chbReani_hipoxemia\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_estimulacion(chbReani_estimulacion\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_ventilacion(chbReani_ventilacion.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setReani_comprensiones(chbReani_comprensiones\r\n\t\t\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setReani_intubacion(chbReani_intubacion\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setMedicina(tbxMedicina.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_reani(rdbClasificacion_reani\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setRuptura(lbxRuptura.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_ruptura(lbxTiempo_ruptura\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLiquido_neo(tbxLiquido_neo\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setFiebre_neo(lbxFiebre_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTiempo_neo(lbxTiempo_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCoricamniotis(tbxCoricamniotis\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setIntrauterina(rdbIntrauterina\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setMadre20(lbxMadre20.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlcohol_neo(chbAlcohol_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setDrogas_neo(chbDrogas_neo.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCigarrillo_neo(chbCigarrillo_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setRespiracion_neo(rdbRespiracion_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setLlanto_neo(rdbLlanto_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setVetalidad_neo(rdbVetalidad_neo\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setTaquicardia_neo(chbTaquicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setBradicardia_neo(chbBradicardia_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setPalidez_neo(chbPalidez_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada.setCianosis_neo(chbCianosis_neo\r\n\t\t\t\t\t\t.isChecked());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setAnomalias_congenitas(lbxAnomalias_congenitas\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setCual_anomalias(tbxCual_anomalias\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setLesiones(tbxLesiones.getValue());\r\n\t\t\t\this_atencion_embarazada.setOtras_alter(tbxOtras_alter\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setClasificacion_neo(rdbClasificacion_neo\r\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_atencion_embarazada.setAlarma(tbxAlarma.getValue());\r\n\t\t\t\this_atencion_embarazada.setConsulta_control(tbxConsulta_control\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setMedidas_preventiva(tbxMedidas_preventiva.getValue());\r\n\t\t\t\this_atencion_embarazada.setRecomendaciones(tbxRecomendaciones\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada.setDiagnostico(tbxDiagnostico\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setCodigo_diagnostico(tbxCodigo_diagnostico.getValue());\r\n\t\t\t\this_atencion_embarazada.setTratamiento(tbxTratamiento\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setRecomendacion_alimentacion(tbxRecomendacion_alimentacion\r\n\t\t\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_atencion_embarazada\r\n\t\t\t\t\t\t.setEvolucion_servicio(tbxEvolucion_servicio.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_atencion_embarazada);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_atencion_embarazada = getServiceLocator()\r\n\t\t\t\t\t\t.getHis_atencion_embarazadaService().guardar(datos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\t\t\t\t/*\r\n\t\t\t\t * else{ int result =\r\n\t\t\t\t * getServiceLocator().getHis_atencion_embarazadaService\r\n\t\t\t\t * ().actualizar(his_atencion_embarazada); if(result==0){ throw\r\n\t\t\t\t * new Exception(\r\n\t\t\t\t * \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\"\r\n\t\t\t\t * ); } }\r\n\t\t\t\t */\r\n\r\n//\t\t\t\tcodigo_historia = his_atencion_embarazada.getCodigo_historia();\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}",
"public void guardarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tsetUpperCase();\r\n\t\t\tif (validarForm()) {\r\n\t\t\t\t// Cargamos los componentes //\r\n\r\n\t\t\t\tMap datos = new HashMap();\r\n\r\n\t\t\t\tHis_parto his_parto = new His_parto();\r\n\t\t\t\this_parto.setCodigo_empresa(empresa.getCodigo_empresa());\r\n\t\t\t\this_parto.setCodigo_sucursal(sucursal.getCodigo_sucursal());\r\n\t\t\t\this_parto.setCodigo_historia(tbxCodigo_historia.getValue());\r\n\t\t\t\this_parto.setIdentificacion(tbxIdentificacion.getValue());\r\n\t\t\t\this_parto.setFecha_inicial(new Timestamp(dtbxFecha_inicial\r\n\t\t\t\t\t\t.getValue().getTime()));\r\n\t\t\t\this_parto.setConyugue(tbxConyugue.getValue());\r\n\t\t\t\this_parto.setId_conyugue(tbxId_conyugue.getValue());\r\n\t\t\t\this_parto.setEdad_conyugue(tbxEdad_conyugue.getValue());\r\n\t\t\t\this_parto.setEscolaridad_conyugue(tbxEscolaridad_conyugue\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setMotivo(tbxMotivo.getValue());\r\n\t\t\t\this_parto.setEnfermedad_actual(tbxEnfermedad_actual.getValue());\r\n\t\t\t\this_parto.setAntecedentes_familiares(tbxAntecedentes_familiares\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setPreeclampsia(rdbPreeclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setHipertension(rdbHipertension.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEclampsia(rdbEclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setH1(rdbH1.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setH2(rdbH2.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPostimadurez(rdbPostimadurez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRot_pre(rdbRot_pre.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPolihidramnios(rdbPolihidramnios.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRcui(rdbRcui.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPelvis(rdbPelvis.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFeto_macrosonico(rdbFeto_macrosonico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setIsoinmunizacion(rdbIsoinmunizacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setAo(rdbAo.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCirc_cordon(rdbCirc_cordon.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setPostparto(rdbPostparto.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setDiabetes(rdbDiabetes.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCardiopatia(rdbCardiopatia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setAnemias(rdbAnemias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEnf_autoinmunes(rdbEnf_autoinmunes\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setEnf_renales(rdbEnf_renales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInf_urinaria(rdbInf_urinaria.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEpilepsia(rdbEpilepsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto\r\n\t\t\t\t\t\t.setTbc(rdbTbc.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setMiomas(rdbMiomas.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setHb(rdbHb.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFumadora(rdbFumadora.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setInf_puerperal(rdbInf_puerperal.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfertilidad(rdbInfertilidad.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMenarquia(tbxMenarquia.getValue());\r\n\t\t\t\this_parto.setCiclos(tbxCiclos.getValue());\r\n\t\t\t\this_parto.setVida_marital(tbxVida_marital.getValue());\r\n\t\t\t\this_parto.setVida_obstetrica(tbxVida_obstetrica.getValue());\r\n\t\t\t\this_parto.setNo_gestaciones(lbxNo_gestaciones.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setParto(lbxParto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setAborto(lbxAborto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCesarias(lbxCesarias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFecha_um(new Timestamp(dtbxFecha_um.getValue()\r\n\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_parto.setUm(tbxUm.getValue());\r\n\t\t\t\this_parto.setFep(tbxFep.getValue());\r\n\t\t\t\this_parto.setGemerales(lbxGemerales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMalformados(lbxMalformados.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_vivos(lbxNacidos_vivos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_muertos(lbxNacidos_muertos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPreterminos(lbxPreterminos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMedico(chbMedico.isChecked());\r\n\t\t\t\this_parto.setEnfermera(chbEnfermera.isChecked());\r\n\t\t\t\this_parto.setAuxiliar(chbAuxiliar.isChecked());\r\n\t\t\t\this_parto.setPartera(chbPartera.isChecked());\r\n\t\t\t\this_parto.setOtros(chbOtros.isChecked());\r\n\t\t\t\this_parto.setControlado(rdbControlado.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setLugar_consulta(rdbLugar_consulta.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNo_consultas(lbxNo_consultas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEspecialistas(chbEspecialistas.isChecked());\r\n\t\t\t\this_parto.setGeneral(chbGeneral.isChecked());\r\n\t\t\t\this_parto.setPartera_consulta(chbPartera_consulta.isChecked());\r\n\t\t\t\this_parto.setSangrado_vaginal(rdbSangrado_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCefalias(rdbCefalias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEdema(rdbEdema.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEpigastralgia(rdbEpigastralgia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setVomitos(rdbVomitos.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setTinutus(rdbTinutus.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEscotomas(rdbEscotomas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_urinaria(rdbInfeccion_urinaria\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_vaginal(rdbInfeccion_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setOtros_embarazo(tbxOtros_embarazo.getValue());\r\n\t\t\t\this_parto.setCardiaca(tbxCardiaca.getValue());\r\n\t\t\t\this_parto.setRespiratoria(tbxRespiratoria.getValue());\r\n\t\t\t\this_parto.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_parto.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_parto.setTempo(tbxTempo.getValue());\r\n\t\t\t\this_parto.setPresion(tbxPresion.getValue());\r\n\t\t\t\this_parto.setPresion2(tbxPresion2.getValue());\r\n\t\t\t\this_parto.setInd_masa(tbxInd_masa.getValue());\r\n\t\t\t\this_parto.setSus_masa(tbxSus_masa.getValue());\r\n\t\t\t\this_parto.setCabeza_cuello(tbxCabeza_cuello.getValue());\r\n\t\t\t\this_parto.setCardiovascular(tbxCardiovascular.getValue());\r\n\t\t\t\this_parto.setMamas(tbxMamas.getValue());\r\n\t\t\t\this_parto.setPulmones(tbxPulmones.getValue());\r\n\t\t\t\this_parto.setAbdomen(tbxAbdomen.getValue());\r\n\t\t\t\this_parto.setUterina(tbxUterina.getValue());\r\n\t\t\t\this_parto.setSituacion(tbxSituacion.getValue());\r\n\t\t\t\this_parto.setPresentacion(tbxPresentacion.getValue());\r\n\t\t\t\this_parto.setV_presentacion(tbxV_presentacion.getValue());\r\n\t\t\t\this_parto.setPosicion(tbxPosicion.getValue());\r\n\t\t\t\this_parto.setV_posicion(tbxV_posicion.getValue());\r\n\t\t\t\this_parto.setC_uterina(tbxC_uterina.getValue());\r\n\t\t\t\this_parto.setTono(tbxTono.getValue());\r\n\t\t\t\this_parto.setFcf(tbxFcf.getValue());\r\n\t\t\t\this_parto.setGenitales(tbxGenitales.getValue());\r\n\t\t\t\this_parto.setDilatacion(tbxDilatacion.getValue());\r\n\t\t\t\this_parto.setBorramiento(tbxBorramiento.getValue());\r\n\t\t\t\this_parto.setEstacion(tbxEstacion.getValue());\r\n\t\t\t\this_parto.setMembranas(tbxMembranas.getValue());\r\n\t\t\t\this_parto.setExtremidades(tbxExtremidades.getValue());\r\n\t\t\t\this_parto.setSnc(tbxSnc.getValue());\r\n\t\t\t\this_parto.setObservacion(tbxObservacion.getValue());\r\n\t\t\t\this_parto.setCodigo_consulta_pyp(lbxCodigo_consulta_pyp\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFinalidad_cons(lbxFinalidad_cons.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setCausas_externas(lbxCausas_externas\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_disnostico(lbxTipo_disnostico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_principal(tbxTipo_principal.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_1(tbxTipo_relacionado_1\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_2(tbxTipo_relacionado_2\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_3(tbxTipo_relacionado_3\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTratamiento(tbxTratamiento.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_parto);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_parto = getServiceLocator().getHis_partoService().guardar(\r\n\t\t\t\t\t\tdatos);\r\n\r\n\t\t\t\tif (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n\t\t\t\t\taccionForm(true, \"modificar\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tMessagebox.show(\"Los datos se guardaron satisfactoriamente\",\r\n\t\t\t\t\t\t\"Informacion ..\", Messagebox.OK,\r\n\t\t\t\t\t\tMessagebox.INFORMATION);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\r\n\t}",
"private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }",
"public String guardar()\r\n/* 69: */ {\r\n/* 70: */ try\r\n/* 71: */ {\r\n/* 72: 85 */ this.motivoLlamadoAtencion.setIdOrganizacion(AppUtil.getOrganizacion().getIdOrganizacion());\r\n/* 73: 86 */ this.motivoLlamadoAtencion.setIdSucursal(AppUtil.getSucursal().getIdSucursal());\r\n/* 74: 87 */ this.servicioMotivoLlamadoAtencion.guardar(this.motivoLlamadoAtencion);\r\n/* 75: 88 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 76: 89 */ setEditado(false);\r\n/* 77: 90 */ limpiar();\r\n/* 78: */ }\r\n/* 79: */ catch (Exception e)\r\n/* 80: */ {\r\n/* 81: 92 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 82: 93 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 83: */ }\r\n/* 84: 95 */ return \"\";\r\n/* 85: */ }",
"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 Integer guardarTramaProcesoCompraBD(Map<String, String> parametros, String codFormaPago) {\r\n try {\r\n log.debug(\"MC- ingreso a guardar Trama\");\r\n if (!DBPinpad.guardarTramaPinpadMC(parametros.get(\"response_code\"), parametros.get(\"amount\"),\r\n parametros.get(\"approval_code\"), parametros.get(\"message\"),\r\n nroTarjetaBruto, //parametros.get(\"card\"),\r\n parametros.get(\"card_id\"), parametros.get(\"month\"), parametros.get(\"amount_quota\"),\r\n parametros.get(\"credit_type\"), parametros.get(\"client_name\"), parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"), parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta, codFormaPago))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }",
"public void guardar() {\n String msj = \"\";\n int idpagoanulado = daoPagoCuotaAnulado.nuevoID();\n Date SYSDATE = new Date();\n java.sql.Timestamp fechaPagoCuotaAnuladoSQL = new java.sql.Timestamp(SYSDATE.getTime());\n String observacion = txtObservacion.getText();\n int idmotivo = Integer.parseInt(txtCodigoMotivo.getText());\n int idusuario = appLogin.IDUSUARIO;\n int idpago =Integer.parseInt(txtNumeroPago.getText());\n Date fechapago = daoCotizacion.parseFecha(txtFechaPago.getText());\n java.sql.Date fechapagoSQL = new java.sql.Date(fechapago.getTime());\n double mPago = montoPago;\n String numerocomprobante = txtComprobante.getText();\n String numerorecibo = txtRecibo.getText();\n //VALIDACIONES\n if (idmotivo == 0) {\n msj += \"CODIGO DEL MOTIVO DE ANULACION ESTA VACIO.\\n\";\n }\n if (idpago == 0) {\n msj += \"NO HA SELECCIONADO NINGUN PAGO PARA LA ANULACIÓN.\\n\";\n }\n if (msj.isEmpty()) {\n cpca.setIdpagoanulado(idpagoanulado);\n cpca.setFechahoranulado(fechaPagoCuotaAnuladoSQL);\n cpca.setObservacion(observacion);\n cpca.setIdmotivo(idmotivo);\n cpca.setIdusuario(idusuario);\n cpca.setIdpago(idpago);\n cpca.setFechapago(fechapagoSQL);\n cpca.setMonto(mPago);\n cpca.setNumerocomprobante(numerocomprobante);\n cpca.setNumerorecibo(numerorecibo);\n daoPagoCuotaAnulado.agregar(cpca);\n } else {\n JOptionPane.showMessageDialog(null, msj, \"ERRORES\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"@Override\n\tpublic DatosEnc obtenerDatos(DatosEnc datos) {\n\t\tConnection con = null;\n\t\tCallableStatement stmt = null;\n//\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\ttry{\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tString query = \"select * from pv_cotizaciones_det where no_cotizacion = ?\";\n//\t\t\tps = con.prepareStatement(query);\n//\t\t\tps.setString(1, datos.getNoDocumento());\n//\t\t\trs = ps.executeQuery();\n//\t\t\texiste=0;\n//\t\t\twhile(rs.next()){\n//\t\t\t\tif(rs.getString(\"no_cotizacion\") == null){\n//\t\t\t\t\texiste=0;\n//\t\t\t\t}else if(rs.getString(\"no_cotizacion\").equals(datos.getNoDocumento())){\n//\t\t\t\t\texiste=1;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tps.close();\n//\t\t\trs.close();\n//\t\t\tif(existe==0){\n\t\t\t\tcon = new ConectarDB().getConnection();\n\t\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_InUp_Mov_Enc(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\t\tstmt.setString(1, datos.getCodigoCliente());\n\t\t\t\tstmt.setString(2, datos.getNit());\n\t\t\t\tstmt.setString(3, datos.getNombreCliente());\n\t\t\t\tstmt.setString(4, datos.getDirecFactura());\n\t\t\t\tstmt.setString(5, datos.getTel());\n\t\t\t\tstmt.setString(6, datos.getTarjeta());\n\t\t\t\tstmt.setString(7, datos.getDirecEnvio());\n\t\t\t\tstmt.setString(8, datos.getCodigoVendedor());\n\t\t\t\tstmt.setString(9, datos.getUsername());\n\t\t\t\tstmt.setString(10, datos.getTipoDocumento());\n\t\t\t\tstmt.setString(11, datos.getNoDocumento());\n\t\t\t\tstmt.setString(12, datos.getFechaVence());\n\t\t\t\tstmt.setString(13, datos.getTipoPago());\n\t\t\t\tstmt.setString(14, datos.getTipoCredito());\n\t\t\t\tstmt.setString(15, datos.getAutoriza());\n\t\t\t\tstmt.setString(16, datos.getFechaDocumento());\n\t\t\t\tstmt.setString(17, datos.getCargosEnvio());\n\t\t\t\tstmt.setString(18, datos.getOtrosCargos());\n\t\t\t\tstmt.setString(19, datos.getMontoVenta());\n\t\t\t\tstmt.setString(20, datos.getMontoTotal());\n\t\t\t\tstmt.setString(21, datos.getSerieDev());\n\t\t\t\tstmt.setString(22, datos.getNoDocDev());\n\t\t\t\tstmt.setString(23, datos.getObservaciones());\n\t\t\t\tstmt.setString(24, datos.getTipoNota());\n\t\t\t\tstmt.setString(25, datos.getCaja());\n\t\t\t\tstmt.setString(26, datos.getFechaEntrega());\n\t\t\t\tstmt.setString(27, datos.getCodigoDept());\n\t\t\t\tstmt.setString(28, datos.getCodGen());\n\t\t\t\tstmt.setString(29, datos.getNoConsigna());\n\t\t\t\tstmt.setString(30, datos.getCodMovDev());\n\t\t\t\tstmt.setString(31, datos.getGeneraSolicitud());\n\t\t\t\tstmt.setString(32, datos.getTipoPagoNC());\n\t\t\t\tstmt.setString(33, datos.getTipoCliente());\n\t\t\t\tstmt.setString(34, datos.getCodigoNegocio());\n\t\t\t\tstmt.setString(35, datos.getCantidadDevolver());\n\t\t\t\tstmt.setString(36, datos.getAutorizoDespacho());\n\t\t\t\tstmt.setString(37, datos.getSaldo());\n\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tif(rs.getString(1)!=null){\n\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n\t\t\t\t\t}\n\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tif(rs.getString(1)!=null){\n//\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n//\t\t\t\t\t}else{\n//\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n//\t\t\t\t\t}\n//\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tdocumento = rs.getInt(2);\n\t\t\t\t}\n\t\t\t\tcon.close();\n\t\t\t\tstmt.close();\n\t\t\t\trs.close();\n//\t\t\t}\n\t\t\t\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_Del_Mov_Det(?,?,?)}\");\n//\t\t\tstmt.setInt(1, Integer.parseInt(datos.getTipoDocumento()));\n//\t\t\tstmt.setString(2, \"\");\n//\t\t\tstmt.setInt(3, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"limpiado\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_udpv_VerificaCotiza(?,?)}\");\n//\t\t\tstmt.setString(1, \"\");\n//\t\t\tstmt.setInt(2, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"error\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n\t\t}catch(SQLException e ){\n\t\t\tSystem.out.println(\"Error Enc: \" + e.getMessage());\n\t\t}\n\t\treturn datos;\n\t}",
"public void processInsertar() {\n }",
"public EncabezadoRespuesta bajaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t//Mandamos a log el objeto de entrada\n\t\tLogHandler.debug(uid, this.getClass(), \"bajaAsistencia - Datos Entrada: \" + asistencia);\n\t\t//Variable de resultado\n\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\ttry {\n\t\t\tif (asistencia.getIdEmpleado() == null) {\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n \t}\n \tif (asistencia.getUsuarioBaja() == null || asistencia.getUsuarioBaja().trim().isEmpty())\n \t{\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario para la baja.\");\n \t}\n \tif (asistencia.getUsuarioUltMod() == null || asistencia.getUsuarioUltMod().trim().isEmpty())\n \t{\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario para la modificacion.\");\n \t}\n \tAsistenciaDAO dao = new AsistenciaDAO();\n \trespuesta = dao.bajaAsistencia(uid, asistencia);\n\t\t}\n\t\tcatch (ExcepcionesCuadrillas ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"bajaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"bajaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tLogHandler.debug(uid, this.getClass(), \"bajaAsistencia - Datos Salida: \" + respuesta);\n\t\treturn respuesta;\n\t}",
"@Override\r\n\tpublic void guardar() {\n\t\ttab_cuenta.guardar();\r\n\t\tguardarPantalla();\r\n\t\t\r\n\t}",
"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}",
"Reserva Obtener();",
"public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\n }",
"@Override\n\tpublic void borrarDatosOk() {\n\n\t}",
"public void guardarTransferenteAlcabala(RaTransferenteAlcabala raTransferenteAlcabala)throws Exception;",
"public long save(Registro r) {\n\n long id = r.getCodigo();\n SQLiteDatabase db = banco.getWritableDatabase();\n try {\n\n\n ContentValues values = new ContentValues();\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-M-d\");\n String dateString = sdf.format(r.getData());\n values.put(\"data\", dateString);\n values.put(\"distancia\", r.getDistancia());\n values.put(\"consumo\", r.getConsumo());\n values.put(\"mediaAceleracao\", r.getMediaAberturaBorboleta());\n values.put(\"mediaConsumo\", r.getMediaConsumo());\n values.put(\"codTipoCombustivel\", r.getTipoCombustivel().getCodigo());\n values.put(\"codCarro\", r.getCarro().getCodigo());\n values.put(\"codUsuario\", r.getUsuario().getCodigo());\n\n if (id != 0) {//SE O ID É DIFERENTE DE 0 ATUALIZA,\n\n System.out.println(\"Entrou !!\");\n String _id = String.valueOf(r.getCodigo());\n String[] whereArgs = new String[]{_id};\n\n // update registro set values = ... where _id=?\n int count = db.update(TABELA, values, \"codigo=?\", whereArgs);\n\n return count;\n } else {\n\n id = db.insert(TABELA, \"\", values);\n System.out.println(\"Deu certo !! \\n \" + values);\n return id;\n }\n } finally {\n db.close();\n }\n }",
"public Integer guardarTramaAnulacionBD(Map<String, String> parametros, String formaPago) {\r\n try {\r\n if (!DBPinpad.guardarTramaAnulPinpadMC(parametros.get(\"response_code\"), parametros.get(\"amount\"),\r\n parametros.get(\"approval_code\"), parametros.get(\"message\"),\r\n parametros.get(\"card\"), parametros.get(\"month\"),\r\n parametros.get(\"amount_quota\"), parametros.get(\"credit_type\"),\r\n parametros.get(\"client_name\"), parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"), parametros.get(\"ecr_transaccion\"),\r\n parametros.get(\"merchant_id\"), parametros.get(\"print_data\"),\r\n lblDatoPedidoEnv, //VariablesCaja.vNumPedVta\r\n formaPago))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"private void saveTempRojoBhcs(String estado) {\n int c = mTempRojoBhcs.size();\n for (TempRojoBhc temp : mTempRojoBhcs) {\n temp.setEstado(estado);\n estudioAdapter.updateTrojosSent(temp);\n publishProgress(\"Actualizando TempRojoBhc\", Integer.valueOf(mTempRojoBhcs.indexOf(temp)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public String guardarComentario(){\r\n\t\tcomDao.save(com);\r\n\t\tinit();\r\n\t\treturn null;\r\n\t}",
"public Integer guardarTramaRepDetalladoBD(Map<String, String> parametros) {\r\n try {\r\n if (!DBPinpad.guardarTramaRepDetPinpadMC(parametros.get(\"response_code\"), parametros.get(\"message\"),\r\n parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"),\r\n parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"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 buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}",
"public String guardar()\r\n/* 446: */ {\r\n/* 447:455 */ String url = \"\";\r\n/* 448: */ try\r\n/* 449: */ {\r\n/* 450:458 */ if ((this.facturaProveedorSRI.getMensajeSRI() == null) || (this.facturaProveedorSRI.getMensajeSRI().toLowerCase().contains(\"guardado\")) || \r\n/* 451:459 */ (!this.facturaProveedorSRI.isTraCorregirDatos()))\r\n/* 452: */ {\r\n/* 453:461 */ if (this.facturaProveedorSRI.getDocumento().isIndicadorDocumentoElectronico()) {\r\n/* 454:462 */ this.facturaProveedorSRI.setAutorizacionRetencion(\"0000000000\");\r\n/* 455: */ }\r\n/* 456:464 */ if (isMostrarBaseImponible()) {\r\n/* 457:465 */ for (DetalleFacturaProveedorSRI detalleFacturaProveedorSRI : this.facturaProveedorSRI.getListaDetalleFacturaProveedorSRI())\r\n/* 458: */ {\r\n/* 459:466 */ detalleFacturaProveedorSRI.setBaseImponibleTarifaCero(BigDecimal.ZERO);\r\n/* 460:467 */ detalleFacturaProveedorSRI.setBaseImponibleDiferenteCero(BigDecimal.ZERO);\r\n/* 461:468 */ detalleFacturaProveedorSRI.setBaseImponibleNoObjetoIva(BigDecimal.ZERO);\r\n/* 462: */ }\r\n/* 463: */ }\r\n/* 464:471 */ if (isMostrarBasesDetalle()) {\r\n/* 465:472 */ for (DetalleFacturaProveedorSRI detalleFacturaProveedorSRI : this.facturaProveedorSRI.getListaDetalleFacturaProveedorSRI()) {\r\n/* 466:473 */ detalleFacturaProveedorSRI.setBaseImponibleRetencion(BigDecimal.ZERO);\r\n/* 467: */ }\r\n/* 468: */ }\r\n/* 469:477 */ this.servicioFacturaProveedorSRI.guardar(this.facturaProveedorSRI);\r\n/* 470: */ }\r\n/* 471: */ else\r\n/* 472: */ {\r\n/* 473:480 */ this.servicioFacturaProveedorSRI.actualizarRetencion(this.facturaProveedorSRI);\r\n/* 474: */ }\r\n/* 475:482 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 476:484 */ if (this.facturaProveedorSRI.getFacturaProveedor() == null) {\r\n/* 477:485 */ url = \"/paginas/financiero/contabilidad/procesos/compraCajaChica?faces-redirect=true\";\r\n/* 478: */ } else {\r\n/* 479:488 */ url = \"/paginas/compras/procesos/facturaProveedor?faces-redirect=true&numero=\" + this.facturaProveedorSRI.getFacturaProveedor().getNumero();\r\n/* 480: */ }\r\n/* 481: */ }\r\n/* 482: */ catch (ExcepcionAS2Financiero e)\r\n/* 483: */ {\r\n/* 484:492 */ e.printStackTrace();\r\n/* 485:493 */ addInfoMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 486:494 */ LOG.info(\"ERROR ExcepcionAS2Financiero AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 487: */ }\r\n/* 488: */ catch (ExcepcionAS2 e)\r\n/* 489: */ {\r\n/* 490:497 */ e.printStackTrace();\r\n/* 491:498 */ addInfoMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 492:499 */ LOG.info(\"ERROR ExcepcionAS2 AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 493: */ }\r\n/* 494: */ catch (Exception e)\r\n/* 495: */ {\r\n/* 496:502 */ e.printStackTrace();\r\n/* 497:503 */ addInfoMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 498:504 */ LOG.error(\"ERROR AL GUARDAR DATOS FACTURA PROVEEDOR SRI\", e);\r\n/* 499: */ }\r\n/* 500:507 */ return url;\r\n/* 501: */ }",
"public String save() {\r\n\t\ttry {\r\n\r\n\t\t\tif (obs != null && !obs.trim().isEmpty()) {\r\n\t\t\t\tconcurso.setObservacionReserva(obs);\r\n\t\t\t\tconcursoHome.setInstance(concurso);\r\n\t\t\t\tString res = concursoHome.update();\r\n\t\t\t}\r\n\r\n\t\t\tfor (PlantaCargoDetDTO dto : listaPlantaCargoDto) {\r\n\r\n\t\t\t\tif (dto.getReservar()) {\r\n\t\t\t\t\tEstadoDet est = buscarEstado(\"en reserva\");\r\n\t\t\t\t\tif (!existeEnDetalle(dto.getPlantaCargoDet(), est)) {\r\n\t\t\t\t\t\t// buscar\r\n\r\n\t\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\t\tp.setActivo(true);\r\n\t\t\t\t\t\tp.setFechaAlta(new Date());\r\n\t\t\t\t\t\tp.setUsuAlta(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\tp.setNroOrden(2);\r\n\t\t\t\t\t\tp.setPlantaCargoDet(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\t\tif (est != null)\r\n\t\t\t\t\t\t\tp.setEstadoDet(est);\r\n\t\t\t\t\t\tp.setConcurso(concursoHome.getInstance());\r\n\t\t\t\t\t\tem.persist(p);\r\n\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(est.getEstadoCab());\r\n\t\t\t\t\t\tplanta.setEstadoDet(est);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Incidencia 1079 */\r\n\t\t\t\trefreshListaPuestoReservados();\r\n\t\t\t\t/**/\r\n\t\t\t\tEstadoCab estadoCab = obtenerEstadosCabecera(\"VACANTE\");\r\n\t\t\t\tif (esta(dto.getPlantaCargoDet())) {\r\n\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\tp = recuperarConcurso(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\tif (!dto.getReservar()) {\r\n\t\t\t\t\t\tif (p.getConcursoPuestoAgr() != null) {\r\n\t\t\t\t\t\t\tstatusMessages.clear();\r\n\t\t\t\t\t\t\tstatusMessages.add(Severity.ERROR,\r\n\t\t\t\t\t\t\t\t\t\"El puesto pertenece a un grupo\");\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * p.setActivo(true); p.setNroOrden(1);\r\n\t\t\t\t\t\t * p.setFechaMod(new Date());\r\n\t\t\t\t\t\t * p.setUsuMod(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\t * EstadoDet est = buscarEstado(\"libre\");\r\n\t\t\t\t\t\t * p.setEstadoDet(est); em.merge(p);\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(estadoCab);\r\n\t\t\t\t\t\tplanta.setEstadoDet(null);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\t\t\t\t\t\tif (!concurso\r\n\t\t\t\t\t\t\t\t.getDatosEspecificosTipoConc()\r\n\t\t\t\t\t\t\t\t.getDescripcion()\r\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\r\n\t\t\t\t\t\t\t\t\t\tCONCURSO_INTERNO_INTERINSTITUCIONAL)\r\n\t\t\t\t\t\t\t\t&& planta.getPermanente())\r\n\t\t\t\t\t\t\treponerCategoriasController.reponerCategorias(p,\r\n\t\t\t\t\t\t\t\t\t\"PUESTO\", \"CONCURSO\");\r\n\t\t\t\t\t\tem.remove(p);\r\n\t\t\t\t\t\t// listaPlantaCargoDto.remove(dto);\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\tobs = null;\r\n\t\t\tem.flush();\r\n\t\t\tllenarListado1();\r\n\t\t\tstatusMessages.clear();\r\n\t\t\tstatusMessages.add(Severity.INFO, SeamResourceBundle.getBundle()\r\n\t\t\t\t\t.getString(\"GENERICO_MSG\"));\r\n\t\t\treturn \"persisted\";\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void trabajar() {\n\n\t}",
"public void guardar() {\n try {\n if (this.buscarCodApelacion()) {\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.INSERTA_APELACIONES(apelacionesBean); \n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.apelacionesBean.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"0\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue insertada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n this.apelacionesBean = new ApelacionesBean();\n addMessage(\"Guadado Exitosamente\", 1);\n } else {\n addMessage(\"La solicitud de apelacion especificada no existe\", 1);\n this.Listar();\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 }",
"private void guardarEstadoObjetosUsados() {\n }",
"@Override\n\tpublic int insertarEntrada(AlmacenDTO obj) {\n\t\tint rs=-1;\n\t\tConnection con=null;\n\t\tPreparedStatement pst=null;\n\t\ttry {\n\t\t\tcon=new MySqlDbConexion().getConexion();\n\t\t\tString sql=\"insert into MATERIAL_ENTRADA values (null,?,?,?)\";\n\t\t\tpst=con.prepareStatement(sql);\n\t\t\t\n\t\t\tpst.setInt(1,obj.getCodigo_producto());\n\t\t\tpst.setInt(2,obj.getCantidad_entrada());\n\t\t\tpst.setDate(3,obj.getFecha_entrada());\n\t\t\t\n\t\t\trs=pst.executeUpdate();\n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error en la Sentencia\"+e.getMessage());\n\t\t\t\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif(pst!=null) pst.close();\n\t\t\t\tif(con!=null) con.close();\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Error al cerrar\");\n\t\t\t}\n\t\t}\n\t\treturn rs;\n\t}",
"private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }",
"@Override\n\t@Transactional //los que no impliquen listados solo seran de tipo transactional\n\tpublic boolean grabar(Autoridad autoridad) {\n\t\tAutoridad objAutoridad = dAutoridad.save(autoridad);\n\t\tif (objAutoridad == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"private void remplirUtiliseData() {\n\t}",
"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 void persistirRemessaC17() throws Exception {\n if (this.remessa == null || this.remessa.getId() == null) { \n this.remessa = new RemessaVO();\n this.remessa.setDataHoraAbertura(new Date());\n this.remessa.setCodigoUsuarioAbertura(this.usuario.getNuMatricula());\n this.remessa.setUnidadeSolicitante(unidadeServiceRef.findUnidadeLotacaoUsuarioLogado());\n this.remessa = remessaService.salvarRascunhoRemessaAB(this.remessa);\n }\n }",
"public void guardar4(View view){\n bdboletas admin= new bdboletas(this, \"Boleta de Transito\", null, 1);\n SQLiteDatabase BaseDeDatos= admin.getWritableDatabase();\n\n placa= etplaca.getText ().toString ();\n modelo= etmodelo.getText ().toString ();\n marca= etmarca.getText ().toString ();\n color= etmodelo.getText ().toString ();\n\n año_string= etaño.getText ().toString ();\n\n int año_int=Integer.parseInt (año_string);\n\n serial= etserial.getText ().toString ();\n\n String seleccion=spinner_vehiculo.getSelectedItem ().toString ();\n\n if (!placa.isEmpty () && !modelo.isEmpty () && !marca.isEmpty ()\n && !color.isEmpty () && !año_string.isEmpty () && !serial.isEmpty ()\n && !seleccion.isEmpty ()){\n\n ContentValues registro= new ContentValues ();\n\n registro.put (\"placa\",placa);\n registro.put (\"marca\",marca);\n registro.put (\"modelo\",modelo);\n registro.put (\"tipo_vehiculo\",seleccion);\n registro.put (\"color\",color);\n registro.put (\"año\",año_int);\n registro.put (\"s_carroceria\",serial);\n\n BaseDeDatos.insert(\"boletas\",null , registro);\n\n BaseDeDatos.close();\n\n Toast.makeText(this,\"registo exitoso\",Toast.LENGTH_SHORT).show();\n // metodo boton siguiente\n Intent siguiente = new Intent (this, Remolque.class);\n startActivity (siguiente);\n }else{\n Toast.makeText(this,\"debe llenar todos los campos para poder continuar\",Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n\t\tpublic void guardar() {\n\t\t\t\n\t\t\tif (tab_presupuesto.guardar()){\n\t\t\t\tif (tab_asociacion_presupuestaria.guardar()) {\n\t\t\t\t\tguardarPantalla();\n\t\t\t\t\t//Actualizar el arbol\n\t\t\t\t\tarb_clasificador.ejecutarSql();\n\t\t\t\t\tutilitario.addUpdate(\"arb_clasificador\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t}",
"public RespuestaBD crearRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioInsercion) {\n/* 342 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* 344 */ int elSiguiente = siguienteRegistro(codigoFlujo);\n/* 345 */ if (elSiguiente == 0) {\n/* 346 */ rta.setMensaje(\"Generando secuencia\");\n/* 347 */ return rta;\n/* */ } \n/* */ \n/* */ try {\n/* 351 */ String s = \"insert into wkf_detalle(codigo_flujo,secuencia,servicio_inicio,accion,codigo_estado,servicio_destino,nombre_procedimiento,correo_destino,enviar_solicitud,ind_mismo_proveedor,ind_mismo_cliente,estado,caracteristica,valor_caracteristica,caracteristica_correo,metodo_seleccion_proveedor,ind_correo_clientes,enviar_hermana,enviar_si_hermana_cerrada,ind_cliente_inicial,usuario_insercion,fecha_insercion) values (\" + codigoFlujo + \",\" + \"\" + elSiguiente + \",\" + \"\" + servicioInicio + \",\" + \"\" + accion + \",\" + \"\" + codigoEstado + \",\" + \"\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \"'\" + nombreProcedimiento + \"',\" + \"'\" + correoDestino + \"',\" + \"'\" + enviar + \"',\" + \"'\" + mismoProveedor + \"',\" + \"'\" + mismoCliente + \"',\" + \"'\" + estado + \"',\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \"'\" + usuarioInsercion + \"',\" + \"\" + Utilidades.getFechaBD() + \"\" + \")\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 398 */ rta = this.dat.executeUpdate2(s);\n/* 399 */ rta.setSecuencia(elSiguiente);\n/* */ }\n/* 401 */ catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"%FlujoDetalleDAO:crearRegistro \", e);\n/* 404 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 406 */ return rta;\n/* */ }",
"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}",
"public boolean insertarCreacionHistorialCliente(Cliente cliente) {\n String queryDividido1 = \"INSERT INTO Historial_Cliente(Usuario_Codigo, Nombre, DPI, Direccion, Sexo, Password, Nacimiento, DPI_Escaneado, Tipo, Fecha_Cambio) \"\n + \"VALUES(?,?,?,?,?,aes_encrypt(?,'AES'),?,?,?,?)\";\n java.sql.Date fechaCreacion = new java.sql.Date(Calendar.getInstance().getTime().getTime());\n\n try {\n\n PreparedStatement enviarDividido1 = Conexion.conexion.prepareStatement(queryDividido1);\n\n //Envio de los Datos de Creacion de un Nuevo Cliente a la Tabla Historial_Cliente\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.setString(7, cliente.getNacimiento());\n enviarDividido1.setBlob(8, cliente.getDPIEscaneado());\n enviarDividido1.setString(9, \"Creacion\");\n enviarDividido1.setString(10, fechaCreacion.toString());\n enviarDividido1.executeUpdate();\n\n \n return true;\n\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n return false;\n }\n\n }",
"public Integer guardarTramaReimpresionBD(Map<String, String> parametros) {\r\n try {\r\n if (!DBPinpad.guardarTramaReimpPinpadMC(parametros.get(\"response_code\"), parametros.get(\"message\"),\r\n parametros.get(\"ecr_currency_code\"),\r\n parametros.get(\"ecr_aplication\"),\r\n parametros.get(\"ecr_transaccion\"), parametros.get(\"merchant_id\"),\r\n parametros.get(\"print_data\"), VariablesCaja.vNumPedVta))\r\n return VariablesPinpad.RET_NOK;\r\n } catch (Exception e) {\r\n log.debug(e.toString());\r\n return VariablesPinpad.RET_NOK;\r\n }\r\n return VariablesPinpad.RET_OK;\r\n }",
"public String insertar(Cargo cargo){\n String registrosInser=\"Registro insertado N°= \";\n long contador;\n ContentValues c=new ContentValues();\n //c.put(\"ID_CARGO\",cargo.getIdCargo());\n c.put(\"NOMBRE_CARGO\",cargo.getNombreCargo());\n c.put(\"DESCRIPCION_CARGO\",cargo.getDescripcionCargo());\n contador=db.insert(\"CARGO\",null,c);\n if(contador==-1||contador==0){\n registrosInser=\"Error al insertar\";\n }\n else{\n registrosInser=registrosInser+contador;\n }\n /* String registrosInser=\"Registro insertado N°= \";\n long contador= 0;\n ContentValues carg = new ContentValues();\n //carg.put(\"ID_CARGO\",cargo.getIdCargo());\n carg.put(\"NOMBRE_CARGO\",cargo.getNombreCargo());\n carg.put(\"DESCRIPCION_CARGO\",cargo.getDescripcionCargo());\n contador=db.insert(\"CARGO\",null,carg);\n if(contador==-1||contador==0){\n registrosInser=\"error al insertar\";\n }\n else{\n registrosInser=registrosInser+contador;\n }\n return registrosInser;*/\n return registrosInser;\n\n }",
"private void readAndSAVE(){\n boolean vaidation_status = true;\n\n achiv_title = edtxt_achiv_title.getText().toString();\n if (TextUtils.isEmpty(achiv_title)){\n edtxt_achiv_title.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_achiv_title.setError(null);\n }\n\n achiv_date = edtxt_achiv_date.getText().toString();\n if (TextUtils.isEmpty(achiv_date)){\n edtxt_achiv_date.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_achiv_date.setError(null);\n }\n\n\n\n achiv_details = edtxt_achiv_details.getText().toString();\n if(achiv_details.isEmpty()){\n vaidation_status = false;\n edtxt_achiv_details.setText(\"Please write Details!!\");\n }\n\n // if all vaidation is true then add all details into firbase database\n if(vaidation_status){\n\n //create Details model\n AchivmentsDetails addNewAchiv = new AchivmentsDetails();\n\n addNewAchiv.setAchv_titles(achiv_title);\n addNewAchiv.setAchv_date(achiv_date);\n addNewAchiv.setAchv_details(achiv_details);\n\n showProgressDialog();\n\n if(mAuth.getCurrentUser()!=null)\n {\n //CHECK IF new achivments has been added or update process.\n String achiv_key;\n if(operationStatus.equals(\"ADD_NEW\")) {\n\n // Get new push key\n achiv_key = mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").push().getKey();\n addNewAchiv.setAchv_firbase_ID(achiv_key);\n\n } else {\n achiv_key = operationStatus;\n addNewAchiv.setAchv_firbase_ID(achiv_key);\n }\n\n // save the user at UserNode under user UID\n mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").child(achiv_key).setValue(addNewAchiv, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n\n hideProgressDialog();\n\n if(databaseError==null)\n {\n Toast.makeText(AddNewAchivmentsActivity.this, \"Your Details has been saved !!\",\n Toast.LENGTH_SHORT).show();\n finish();\n }\n }\n });\n }\n\n\n\n }\n }",
"public void guardarSolicitud() {\n Map<String, String> paramMap = getParametrosSesion();\n String cadenaFirmada;\n try {\n if (paramMap != null) {\n cadenaFirmada = paramMap.get(firmaFormHelper.FIRMA_DIGITAL);\n firmaFormHelper.setSelloDigital(paramMap.get(FirmaFormHelper.FIRMA_DIGITAL));\n\n SimpleDateFormat formato = new SimpleDateFormat(\"dd/MM/yyyy\");\n produccion.setFechProduccion(new Date());\n desperdiciosHelper.setFechaAcuse(formato.format(produccion.getFechProduccion()));\n\n if (cadenaFirmada.length() > 0) {\n guardarRangosFolios();\n Acuse acuse = new Acuse();\n acuse.setSerieAcuse(TipoAcuse.DESPERDICIO);\n acuse.setIdProveedor(produccionCigarrosHelper.getProveedor().getIdProveedor());\n acuse.setSelloDigital(firmaFormHelper.getSelloDigital());\n acuse.setCadenaOriginal(firmaFormHelper.getCadenaOriginal());\n acuse.setFecCaptura(new Date());\n desperdiciosHelper.setIdAcuseRecibo(commonService.crearAcuse(acuse));\n habilitarPnlAcuse();\n registroMovimientoBitacora(getSession(), IdentificadorProcesoEnum.CONTRIBUYENTE_TRAMITES, new Date(), new Date(), MovimientosBitacoraEnum.DESPERDICIOS_DESTRUCCION);\n } else {\n habilitarPnlPrincipal();\n }\n }\n } catch (CommonServiceException e) {\n LOGGER.error(e.getMessage(), e);\n addErrorMessage(ERROR, \"No se pudo generar el acuse\");\n } catch (Exception ex) {\n LOGGER.error(ex.getMessage());\n }\n }",
"protected String cargarTempRojoBhcs(String url, String username,\n String password) throws Exception {\n try {\n getTempRojoBhcs();\n if(mTempRojoBhcs.size()>0){\n saveTempRojoBhcs(Constants.STATUS_SUBMITTED);\n // La URL de la solicitud POST\n final String urlRequest = url + \"/movil/trojos\";\n TempRojoBhc[] envio = mTempRojoBhcs.toArray(new TempRojoBhc[mTempRojoBhcs.size()]);\n HttpHeaders requestHeaders = new HttpHeaders();\n HttpAuthentication authHeader = new HttpBasicAuthentication(username, password);\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n requestHeaders.setAuthorization(authHeader);\n HttpEntity<TempRojoBhc[]> requestEntity =\n new HttpEntity<TempRojoBhc[]>(envio, requestHeaders);\n RestTemplate restTemplate = new RestTemplate();\n restTemplate.getMessageConverters().add(new StringHttpMessageConverter());\n restTemplate.getMessageConverters().add(new MappingJacksonHttpMessageConverter());\n // Hace la solicitud a la red, pone la vivienda y espera un mensaje de respuesta del servidor\n ResponseEntity<String> response = restTemplate.exchange(urlRequest, HttpMethod.POST, requestEntity,\n String.class);\n // Regresa la respuesta a mostrar al usuario\n if (!response.getBody().matches(\"Datos recibidos!\")) {\n saveTempRojoBhcs(Constants.STATUS_NOT_SUBMITTED);\n }\n return response.getBody();\n }\n else{\n return \"Datos recibidos!\";\n }\n } catch (Exception e) {\n Log.e(TAG, e.getMessage(), e);\n saveTempRojoBhcs(Constants.STATUS_NOT_SUBMITTED);\n return e.getMessage();\n }\n\n }",
"ParqueaderoEntidad actualizar(ParqueaderoEntidad parqueadero);",
"public String buscarTrabajadoresPorParametros() {\r\n try {\r\n inicializarFiltros();\r\n listaTrabajadores = null;\r\n //listaTrabajadores = administrarGestionarTrabajadoresBO.consultarTrabajadoresPorParametro(filtros);\r\n return null;\r\n } catch (Exception e) {\r\n System.out.println(\"Error ControllerAdministrarTrabajadores buscarTrabajadoresPorParametros : \" + e.toString());\r\n return null;\r\n }\r\n }",
"public Usuario buscarUsuario(String usuario) {\n Usuario usuario1 = new Usuario();\n try{\n\t\tString seleccion = \"SELECT usuario, nombre, clave FROM usuarios where usuario=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setString(1, usuario);\n \n\t\t//Savepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n \n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n usuario1.setUsuario(rs.getString(\"usuario\")); \n usuario1.setNombre(rs.getString(\"nombre\")); \n usuario1.setClave(rs.getString(\"clave\")); \n return usuario1;\n\t\t} \n \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return null; \n\n }",
"private void saveRazonNoData(String estado) {\n int c = mRazonNoData.size();\n for (RazonNoData rnd : mRazonNoData) {\n rnd.setEstado(estado);\n estudioAdapter.updateRazonNoDataSent(rnd);\n publishProgress(\"Actualizando Razones No Datos\", Integer.valueOf(mRazonNoData.indexOf(rnd)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public boolean Insert(String tipo, String lugar, String accion, String responsable, String vencimiento,String spinnerRiesgoSeleccion,\n String spinnerSectorSeleccion, String estado, String condicionInsegura, String usuario, String imagen, String site,\n String fecha, String Lider_recorrida, String Participantes, String Categoria){\n\n SQLiteDatabase BaseDeDatos=this.getWritableDatabase();\n ContentValues values=new ContentValues();\n\n if(tipo==\"Reporte de condiciones inseguras UAC\"){\n tipo = \"UAC\";\n }else if(tipo == \"Auditoria de primera parte\"){\n tipo = \"Auditoria\";\n }else {\n tipo = \"EHSS\";\n }\n values.put(\"tipo\", tipo);\n values.put(\"site\", site);\n values.put(\"fecha\", fecha);\n String fh = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date());\n values.put(\"fechaHoraCreacion\", fh);\n values.put(\"sector\",spinnerSectorSeleccion);\n values.put(\"lugar\", lugar);\n values.put(\"accion\", accion);\n values.put(\"responsable\", responsable);\n values.put(\"vencimiento\", vencimiento);\n values.put(\"riesgo\",spinnerRiesgoSeleccion);\n values.put(\"estado\",estado );\n values.put(\"condicionInsegura\", condicionInsegura);\n values.put(\"usuarioCreacion\",usuario);\n values.put(\"imagenUAC\",imagen);\n values.put(\"Lider_recorrida\",Lider_recorrida);\n values.put(\"Participantes\",Participantes);\n values.put(\"Categoria\",Categoria);\n values.put(\"syncro\", 0);\n\n boolean resultado=BaseDeDatos.insert(\"uac\",null,values)>0;\n BaseDeDatos.close();\n return resultado;\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 }",
"public void guardarDatos() throws Exception {\n\t\ttry {\n\t\t\tFormularioUtil.setUpperCase(groupboxEditar);\n\t\t\tif (validarForm()) {\n\t\t\t\t// Cargamos los componentes //\n\n\t\t\t\tHisc_urgencia_odontologico hisc_urgencia_odontologico = getBean();\n\n\t\t\t\tMap<String, Object> datos = new HashMap<String, Object>();\n\t\t\t\tdatos.put(\"hisc_urgencia_odontologico\",\n\t\t\t\t\t\thisc_urgencia_odontologico);\n\t\t\t\t// datos.put(\"sigvitales\", mcSignosVitales.obtenerSigvitales());\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getValue());\n\t\t\t\tdatos.put(\"admision\", admision);\n\t\t\t\tdatos.put(\"datos_procedimiento\", getProcedimientos());\n\n\t\t\t\tImpresion_diagnostica impresion_diagnostica = macroImpresion_diagnostica\n\t\t\t\t\t\t.obtenerImpresionDiagnostica();\n\t\t\t\tdatos.put(\"impresion_diagnostica\", impresion_diagnostica);\n\n\t\t\t\tgetServiceLocator().getHisc_urgencia_odontologicoService()\n\t\t\t\t\t\t.guardarDatos(datos);\n\n\t\t\t\ttbxAccion.setValue(\"modificar\");\n\t\t\t\tinfoPacientes.setCodigo_historia(hisc_urgencia_odontologico\n\t\t\t\t\t\t.getCodigo_historia());\n\n\t\t\t\tactualizarRemision(admision, getInformacionClinica(), this);\n\t\t\t\tcargarServicios();\n\n\t\t\t\tMensajesUtil.mensajeInformacion(\"Informacion ..\",\n\t\t\t\t\t\t\"Los datos se guardaron satisfactoriamente\");\n\t\t\t}\n\n\t\t} catch (ImpresionDiagnosticaException e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t} catch (Exception e) {\n\t\t\tif (!(e instanceof WrongValueException)) {\n\t\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t\t}\n\t\t}\n\t}",
"public String adicionarubicacion(ubicacion ubicacion) {\n String miRespuesta;\n Conexion miConexion = new Conexion();\n Connection nuevaCon;\n nuevaCon = miConexion.getConn();\n \n //sentecia \n PreparedStatement sentencia;\n //try-catch \n try {\n // consulta \n String Query = \"INSERT INTO ubicacion (Departamento,municipio)\"\n + \"VALUES (?,?)\";\n sentencia = nuevaCon.prepareStatement(Query);\n sentencia.setString(1,ubicacion.getDepartamento());\n sentencia.setString(2,ubicacion.getMunicipio());\n \n sentencia.execute();\n miRespuesta = \"\";\n } catch (Exception ex){\n miRespuesta = ex.getMessage();\n System.err.println(\"Ocurrio un problea en ubicacionDAO\\n \" + ex.getMessage());\n }\n \n return miRespuesta;\n }",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Trabajo newTrabajo = (Trabajo) data.getSerializableExtra(\"resultado\");\n\n if(newTrabajo.getId() != 0) { // Si NO es un Trabajo Nuevo Vacío, osea que no hayan Cancelado la operación\n Toast.makeText(getBaseContext(), \"Nuevo Trabajo: \" + newTrabajo.getDescripcion(), Toast.LENGTH_LONG).show();\n\n // Insertamos en la Categoría correspondiente el Nuevo Trabajo\n Categoria.CATEGORIAS_MOCK[newTrabajo.getCategoria().getId()].addTrabajo(newTrabajo);\n\n // Incorporamos a la \"listaTrabajos\" el Nuevo Trabajo\n this.listaTotalTrabajos();\n\n //Se notifica al adaptador de que el ArrayList que tiene asociado ha sufrido cambios (forzando asi a ir al metodo getView())\n adaptador.notifyDataSetChanged();\n }\n }",
"public FlujoDetalleDTO leerRegistro() {\n/* */ try {\n/* 82 */ FlujoDetalleDTO reg = new FlujoDetalleDTO();\n/* */ \n/* 84 */ reg.setCodigoFlujo(this.rs.getInt(\"codigo_flujo\"));\n/* 85 */ reg.setSecuencia(this.rs.getInt(\"secuencia\"));\n/* 86 */ reg.setServicioInicio(this.rs.getInt(\"servicio_inicio\"));\n/* 87 */ reg.setCodigoEstado(this.rs.getInt(\"codigo_estado\"));\n/* 88 */ reg.setServicioDestino(this.rs.getInt(\"servicio_destino\"));\n/* 89 */ reg.setNombreProcedimiento(this.rs.getString(\"nombre_procedimiento\"));\n/* 90 */ reg.setCorreoDestino(this.rs.getString(\"correo_destino\"));\n/* 91 */ reg.setEnviarSolicitud(this.rs.getString(\"enviar_solicitud\"));\n/* 92 */ reg.setMismoProveedor(this.rs.getString(\"ind_mismo_proveedor\"));\n/* 93 */ reg.setMismoCliente(this.rs.getString(\"ind_mismo_cliente\"));\n/* 94 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 95 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 96 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 97 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 98 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 99 */ reg.setNombreServicioInicio(this.rs.getString(\"nombre_servicio_inicio\"));\n/* 100 */ reg.setNombreCodigoEstado(this.rs.getString(\"nombre_codigo_estado\"));\n/* 101 */ reg.setNombreServicioDestino(this.rs.getString(\"nombre_servicio_destino\"));\n/* 102 */ reg.setNombreEstado(this.rs.getString(\"nombre_estado\"));\n/* 103 */ reg.setCaracteristica(this.rs.getInt(\"caracteristica\"));\n/* 104 */ reg.setCaracteristicaValor(this.rs.getInt(\"valor_caracteristica\"));\n/* 105 */ reg.setCaracteristicaCorreo(this.rs.getInt(\"caracteristica_correo\"));\n/* 106 */ reg.setNombreCaracteristica(this.rs.getString(\"nombre_caracteristica\"));\n/* 107 */ reg.setDescripcionValor(this.rs.getString(\"descripcion_valor\"));\n/* 108 */ reg.setMetodoSeleccionProveedor(this.rs.getString(\"metodo_seleccion_proveedor\"));\n/* 109 */ reg.setIndCorreoCliente(this.rs.getString(\"ind_correo_clientes\"));\n/* */ \n/* */ try {\n/* 112 */ reg.setEnviar_hermana(this.rs.getString(\"enviar_hermana\"));\n/* 113 */ reg.setEnviar_si_hermana_cerrada(this.rs.getString(\"enviar_si_hermana_cerrada\"));\n/* 114 */ reg.setInd_cliente_inicial(this.rs.getString(\"ind_cliente_inicial\"));\n/* */ \n/* */ \n/* */ }\n/* 118 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 122 */ return reg;\n/* */ }\n/* 124 */ catch (Exception e) {\n/* 125 */ e.printStackTrace();\n/* 126 */ Utilidades.writeError(\"FlujoDetalleDAO:leerRegistro \", e);\n/* */ \n/* 128 */ return null;\n/* */ } \n/* */ }",
"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 }",
"private void controladorAtras(Controlador controlador){\n this.contAtras = controlador.getAtras();\n registro.setControlAtras(contAtras);\n login.setControlAtras(contAtras);\n }",
"public void guardarCV(String nombre, String Apellido,String dni,String mail,String cur ,File ruta,String mensaje){\r\n Alumnos alu=new Alumnos();\r\n alu.setNombre(nombre);\r\n alu.setApellido(Apellido);\r\n alu.setDni(dni);\r\n alu.setMail(mail);\r\n alu.setMensaje(mensaje);\r\n alu.setNom_archivo(cur);\r\n\r\n\r\n\r\n try{ //convierte el archivo pdf a bytes\r\n byte[] pdf= new byte[(int) ruta.length()];\r\n InputStream input= new FileInputStream(ruta);\r\n input.read(pdf);\r\n alu.setArchivo_cv(pdf);\r\n\r\n }catch(IOException e){\r\n alu.setArchivo_cv(null);\r\n }\r\n alu.insertarCV(alu);\r\n }",
"public void grabarConcepto(){\r\n try {\r\n Conexion conexion = new Conexion();\r\n String query = \"insert into concepto (descripcion, tipoConcepto, porcentaje, monto, fijo) values (?,?,?,?,?);\";\r\n PreparedStatement st = conexion.getConnection().prepareStatement(query);\r\n st.setString(1, this.getDescripcion());\r\n st.setString(2, this.getTipoConcepto());\r\n st.setDouble(3, this.getPorcentaje());\r\n st.setDouble(4, this.getMonto());\r\n st.setString(5, this.getFijo());\r\n st.execute();\r\n System.out.println(\"SE GRABO EL CONCEPTO EN LA BASE DE DATOS\");\r\n st.close();\r\n conexion.desconectar();\r\n } catch (SQLException ex) {\r\n System.err.println(ex.getMessage());\r\n }\r\n }",
"int insert(TCar record);",
"Lancamento persistir(Lancamento lancamento);",
"public void guardar() {\n try {\n objConec.conectar();\n objConec.Sql = objConec.con.prepareStatement(\"insert into contacto values(null,?,?,?,?,?)\");\n objConec.Sql.setString(1, getNom_con());\n objConec.Sql.setInt(2, getTel_con()); \n objConec.Sql.setString(3, getEma_con());\n objConec.Sql.setString(4, getAsu_con());\n objConec.Sql.setString(5, getMen_con());\n objConec.Sql.executeUpdate();\n objConec.cerrar();\n JOptionPane.showMessageDialog(null, \"Mensaje enviado correctamente\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Error al enviar el mensaje\");\n\n }\n\n }",
"private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }",
"public void save() {\n super.storageSave(listPedidosAssistencia.toArray());\n }",
"public EncabezadoRespuesta entradaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\t\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t\t\t//Mandamos a log el objeto de entrada\n\t\t\t\tLogHandler.debug(uid, this.getClass(), \"entradaAsistencia - Datos Entrada: \" + asistencia);\n\t\t\t\t//Variable de resultado\n\t\t\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\t try {\n\t\t \tif (asistencia.getIdEmpleado() == null) {\n\t\t \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n\t\t \t}\n\t\t \tif (asistencia.getUsuarioAlta() == null || asistencia.getUsuarioAlta().trim().isEmpty()) {\n\t\t \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario.\");\n\t\t \t}\n\t\t \tAsistenciaDAO dao = new AsistenciaDAO();\n\t\t \trespuesta = dao.entradaAsistencia(uid, asistencia);\n\n\t\t } catch (ExcepcionesCuadrillas ex) {\n\t\t\t\t\tLogHandler.error(uid, this.getClass(), \"entradaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\t\t\trespuesta.setUid(uid);\n\t\t\t\t\trespuesta.setEstatus(false);\n\t\t\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {\n\t\t\t\t\tLogHandler.error(uid, this.getClass(), \"entradaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\t\t\trespuesta.setUid(uid);\n\t\t\t\t\trespuesta.setEstatus(false);\n\t\t\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t\t\t}\n\t\t\t\tLogHandler.debug(uid, this.getClass(), \"entradaAsistencia - Datos Salida: \" + respuesta);\n\t\t\t\treturn respuesta;\n\t}",
"@Override\r\n public Assunto persistir(Assunto assunto) {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n em.getTransaction().begin();\r\n try {\r\n assunto = em.merge(assunto);\r\n em.getTransaction().commit();\r\n System.out.println(\"Registro Assunto gravado com sucesso\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return assunto;\r\n }",
"public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}",
"public void guardarEntrada(HashMap<String, Object> diccionario_datos){\n File file = new File(fichero_database);\n FileWriter writer = null;\n if(file.exists()){\n try{\n writer = new FileWriter(file, true);\n //crea un buffer o flujo intermedio antes de escribir directamente en el archivo\n BufferedWriter bfwriter = new BufferedWriter(writer);\n Iterator it = diccionario_datos.entrySet().iterator();\n while (it.hasNext()) {\n HashMap.Entry pair = (HashMap.Entry)it.next();\n bfwriter.write(pair.getKey() + \",\" );\n it.remove(); // para evitar ConcurrentModificationException\n }\n bfwriter.write(\"\\n\" );\n bfwriter.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (writer != null) {\n try {//cierra el flujo principal\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n }",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"public ArrayList<Mascota> obtenerDatos(){\n\n BaseDatos db = new BaseDatos(context);\n\n ArrayList<Mascota> aux = db.obtenerTodoslosContactos();\n\n if(aux.size()==0){\n insertarMascotas(db);\n aux = db.obtenerTodoslosContactos();\n }\n\n return aux;\n }",
"public void asociar(){\n abrirEntAntMaest();\n try{\n while(true){\n CuentaSerializada cuenta =\n (CuentaSerializada) entAntMaest.readObject();\n \n abrirEntTransaccion();\n empatarCuentaTransaccion(cuenta);\n cerrarEntTransaccion();\n agregarASalNuevoMaest(cuenta);\n }\n }\n catch(EOFException eOFException){\n System.out.printf(\"%nNo hay mas registros%n\");\n }\n catch(ClassNotFoundException classNotFoundException){\n System.err.println(\"Tipo de objeto invalido. Terminado.\");\n }\n catch(IOException iOException){\n System.err.println(\"Error al leer del archivo. Terminado.\");\n }\n }",
"@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 }",
"ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);",
"int insert(Movimiento record);",
"public String agregarCuenta(Cuenta cuenta) {\n String mensaje = \"\";\n try {\n PreparedStatement PrSt;\n String Query = \"INSERT INTO Cuenta VALUES(?,?,?,?)\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, cuenta.getCodigo());\n PrSt.setDate(2, cuenta.getCreacion());\n PrSt.setDouble(3, cuenta.getCredito());\n PrSt.setString(4, cuenta.getCodigo_cliente());\n int resultado = PrSt.executeUpdate();\n if (resultado > 0) {\n mensaje = \"Agregada Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente();\n } else {\n mensaje = \"Fallo al agregar Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente();\n }\n PrSt.close();\n } catch (SQLException e) {\n mensaje = \"Fallo al agregar Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente() + \" Error: \" + e.toString();\n }\n return mensaje;\n }",
"@Override\r\n\tprotected void process() {\n\t\tconsultarSustentoProxy.setCodigoActvidad(codigo_actividad);\r\n\t\tconsultarSustentoProxy.setCodigoCliente(codigo_cliente);\r\n\t\tconsultarSustentoProxy.setCodigoPLan(codigo_plan);\r\n\t\tconsultarSustentoProxy.execute();\r\n\t}",
"public void llenarDatosTransaccion(TransactionEntity entity, int indiceLayoutHose){\n //**********************************************************\n int contador = 0;\n Log.v(\"INICIO\",\"**********************************************************\");\n\n Log.v(\"Bomba\",String.valueOf(entity.getIdBomba()));\n //**********************************************************\n //EstadoActual\n int[] tramaEstadoActual = new int[1];\n contador = 0;\n for(int i = 8; i<= 8; i++){\n tramaEstadoActual[contador] = bufferRecepcion[i];\n contador++;\n }\n //String estadoActual = byteArrayToHexString(tramaEstadoActual,tramaEstadoActual.length);\n int estadoActual = Integer.parseInt(byteArrayToHexIntGeneral(tramaEstadoActual,1));\n entity.setEstadoActual(estadoActual);\n\n Log.v(\"Estado\",String.valueOf(entity.getEstadoActual()));\n cambioEstado(indiceLayoutHose, estadoActual);\n\n //**********************************************************\n //Capturar Nro Transaccion\n int[] tramaNroTransaccion = new int[3];\n contador = 0;\n for(int i = 9; i<= 11; i++){\n tramaNroTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n String nroTransaccion = \"\" + byteArrayToHexInt(tramaNroTransaccion,tramaNroTransaccion.length);\n entity.setNumeroTransaccion(nroTransaccion);\n Log.v(\"Nro. Transacción\",entity.getNumeroTransaccion());\n\n //**********************************************************\n //Capturar Fecha Inicio\n int[] tramaFechaInicio = new int[1];\n tramaFechaInicio[0] = bufferRecepcion[12];\n String dia = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[13];\n String mes = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[14];\n String anio = \"20\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[17];\n String hora = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[16];\n String minuto = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n tramaFechaInicio[0] = bufferRecepcion[15];\n String segundo = \"\" + byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length);\n\n String fechaInicio = dia + \"-\" + mes + \"-\" + anio + \"\";\n String horaInicio = hora + \":\" + minuto + \":\" + segundo;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaInicio(fechaInicio);\n entity.setHoraInicio(horaInicio);\n Log.v(\"Fecha Inicio\",entity.getFechaInicio());\n Log.v(\"Hora Inicio\",entity.getHoraInicio());\n\n //**********************************************************\n //Capturar Turno\n int[] tramaTurno = new int[2];\n contador = 0;\n for(int i = 18; i<= 19; i++){\n tramaTurno[contador] = bufferRecepcion[i];\n contador++;\n }\n int turno = byteArrayToHexInt2(tramaTurno,tramaTurno.length);\n entity.setTurno(turno);\n Log.v(\"Turno\",\"\"+entity.getTurno());\n\n //**********************************************************\n //Numero de Tanque\n int[] tramaNumeroTanque = new int[1];\n contador = 0;\n for(int i = 21; i<= 21; i++){\n tramaNumeroTanque[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int numeroTanque = Integer.parseInt(byteArrayToHexIntGeneral(tramaNumeroTanque,1));\n entity.setNumeroTanque(numeroTanque);\n\n Log.v(\"Tanque\",\"\"+entity.getNumeroTanque());\n\n //**********************************************************\n //Tipo de Vehiculo\n int[] tramaTipoVehiculo = new int[1];\n contador = 0;\n for(int i = 22; i<= 22; i++){\n tramaTipoVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoVehiculo = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoVehiculo,1));\n entity.setTipoVehiculo(tipoVehiculo);\n\n Log.v(\"Tipo Vehiculo\",\"\"+entity.getTipoVehiculo());\n\n\n //**********************************************************\n //Capturar IdVehiculo\n int[] tramaIdVehiculo = new int[8];\n contador = 0;\n for(int i = 23; i<= 30; i++){\n tramaIdVehiculo[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdVehiculo = hexToAscii(byteArrayToHexString(tramaIdVehiculo,tramaIdVehiculo.length));\n entity.setIdVehiculo(IdVehiculo);\n\n Log.v(\"IdVehiculo\",entity.getIdVehiculo());\n\n //**********************************************************\n //Capturar Placa\n int[] tramaPlaca = new int[10];\n contador = 0;\n for(int i = 31; i<= 40; i++){\n tramaPlaca[contador] = bufferRecepcion[i];\n contador++;\n }\n String placa = hexToAscii(byteArrayToHexString(tramaPlaca,tramaPlaca.length));\n entity.setPlaca(placa);\n\n Log.v(\"Placa\",entity.getPlaca());\n\n //**********************************************************\n //Capturar Kilometro\n\n int[] tramaKilometroParteEntera = new int[3];\n contador = 0;\n for(int i = 41; i<= 43; i++){\n tramaKilometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteEntera = byteArrayToHexInt(tramaKilometroParteEntera,tramaKilometroParteEntera.length);\n\n int[] tramaKilometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 44; i<= 44; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n int kilometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n\n //double kilometro = kilometroParteEntera + kilometroParteDecimal*0.1;\n double kilometro = Double.valueOf(kilometroParteEntera + \".\"+kilometroParteDecimal);\n entity.setKilometraje(\"\"+kilometro);\n\n Log.v(\"Kilometro\",\"\"+kilometro);\n\n //**********************************************************\n //Capturar Horometro\n\n int[] tramaHorometroParteEntera = new int[3];\n contador = 0;\n for(int i = 45; i<= 47; i++){\n tramaHorometroParteEntera[contador] = bufferRecepcion[i];\n contador++;\n }\n int horometroParteEntera = byteArrayToHexInt(tramaHorometroParteEntera,tramaHorometroParteEntera.length);\n\n int[] tramaHorometroParteDecimal = new int[1];\n contador = 0;\n for(int i = 48; i<= 48; i++){\n tramaKilometroParteDecimal[contador] = bufferRecepcion[i];\n contador++;\n }\n\n double horometro = 0.0;\n\n if(tramaHorometroParteDecimal[0]==255){\n horometro = horometroParteEntera/10D;\n }else{\n int horometroParteDecimal = byteArrayToHexInt(tramaKilometroParteDecimal,tramaKilometroParteDecimal.length);\n //horometro = horometroParteEntera + horometroParteDecimal*0.1;\n horometro = Double.valueOf(horometroParteEntera + \".\"+horometroParteDecimal);\n }\n\n entity.setHorometro(\"\"+horometro);\n\n Log.v(\"Horometro\",\"\"+horometro);\n\n //**********************************************************\n //Capturar IdConductor\n int[] tramaIdConductor = new int[8];\n contador = 0;\n for(int i = 49; i<= 56; i++){\n tramaIdConductor[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdConductor = hexToAscii(byteArrayToHexString(tramaIdConductor,tramaIdConductor.length));\n entity.setIdConductor(IdConductor);\n\n Log.v(\"IdConductor\",entity.getIdConductor());\n\n //**********************************************************\n //Capturar IdOperador\n int[] tramaIdOperador = new int[8];\n contador = 0;\n for(int i = 57; i<= 64; i++){\n tramaIdOperador[contador] = bufferRecepcion[i];\n contador++;\n }\n String IdOperador = hexToAscii(byteArrayToHexString(tramaIdOperador,tramaIdOperador.length));\n entity.setIdOperador(IdOperador);\n\n Log.v(\"IdOperador\",entity.getIdOperador());\n\n //**********************************************************\n //Tipo de Transacción\n int[] tramaTipoTransaccion = new int[1];\n contador = 0;\n for(int i = 65; i<= 65; i++){\n tramaTipoTransaccion[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTransaccion = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTransaccion,1));\n entity.setTipoTransaccion(tipoTransaccion);\n\n Log.v(\"Tipo Transacción\",\"\"+entity.getTipoTransaccion());\n\n //**********************************************************\n //Capturar Latitud\n int[] tramaLatitud = new int[12];\n contador = 0;\n for(int i = 66; i<= 77; i++){\n tramaLatitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String latitud = hexToAscii(byteArrayToHexString(tramaLatitud,tramaLatitud.length));\n entity.setLatitud(latitud);\n\n Log.v(\"Latitud\",entity.getLatitud());\n\n //**********************************************************\n //Capturar Longitud\n int[] tramaLongitud = new int[12];\n contador = 0;\n for(int i = 78; i<= 89; i++){\n tramaLongitud[contador] = bufferRecepcion[i];\n contador++;\n }\n String longitud = hexToAscii(byteArrayToHexString(tramaLongitud,tramaLongitud.length));\n entity.setLongitud(longitud);\n\n Log.v(\"Longitud\",entity.getLongitud());\n\n //**********************************************************\n //Capturar Tipo Error Pre-Seteo\n int[] tramaTipoErrorPreseteo = new int[1];\n contador = 0;\n for(int i = 90; i<= 90; i++){\n tramaTipoErrorPreseteo[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoErrorPreseteo= Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoErrorPreseteo,1));\n entity.setTipoErrorPreseteo(tipoErrorPreseteo);\n\n Log.v(\"Tipo Error Preseteo\",\"\"+entity.getTipoErrorPreseteo());\n\n //**********************************************************\n //Capturar Volumen Autorizado\n int[] tramaVolumenAutorizado = new int[2];\n contador = 0;\n for(int i = 91; i<= 92; i++){\n tramaVolumenAutorizado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAutorizado = byteArrayToHexInt2(tramaVolumenAutorizado,tramaVolumenAutorizado.length);\n entity.setVolumenAutorizado(volumenAutorizado);\n Log.v(\"Volumen Autorizado\",\"\"+entity.getVolumenAutorizado());\n\n //**********************************************************\n //Capturar Volumen Aceptado\n int[] tramaVolumenAceptado = new int[2];\n contador = 0;\n for(int i = 93; i<= 94; i++){\n tramaVolumenAceptado[contador] = bufferRecepcion[i];\n contador++;\n }\n int volumenAceptado = byteArrayToHexInt2(tramaVolumenAceptado,tramaVolumenAceptado.length);\n entity.setVolumenAceptado(volumenAceptado);\n Log.v(\"Volumen Aceptado\",\"\"+entity.getVolumenAceptado());\n\n //**********************************************************\n //Capturar Código Cliente\n int[] tramaCodigoCliente = new int[2];\n contador = 0;\n for(int i = 100; i<= 101; i++){\n tramaCodigoCliente[contador] = bufferRecepcion[i];\n contador++;\n }\n int codigoCliente = byteArrayToHexInt2(tramaCodigoCliente,tramaCodigoCliente.length);\n entity.setCodigoCliente(codigoCliente);\n Log.v(\"Codigo Cliente\",\"\"+entity.getCodigoCliente());\n\n //**********************************************************\n //Capturar codigo area\n int[] tramaCodigoArea = new int[1];\n contador = 0;\n for(int i = 102; i<= 102; i++){\n tramaCodigoArea[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int CodigoArea = Integer.parseInt(byteArrayToHexIntGeneral(tramaCodigoArea,1));\n entity.setCodigoArea(CodigoArea);\n\n Log.v(\"Codigo Area\",\"\"+entity.getCodigoArea());\n\n //**********************************************************\n //Capturar tipo TAG\n int[] tramaTipoTAG = new int[1];\n contador = 0;\n for(int i = 103; i<= 103; i++){\n tramaTipoTAG[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoTAG = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoTAG,1));\n entity.setTipoTag(tipoTAG);\n\n Log.v(\"Tipo TAG\",\"\"+entity.getTipoTag());\n\n //**********************************************************\n //Capturar Volumen Abastecido\n int[] tramaVolumen = new int[9];\n contador = 0;\n for(int i = 104; i<= 112; i++){\n tramaVolumen[contador] = bufferRecepcion[i];\n contador++;\n }\n String volumen = \"\"+ hexToAscii(byteArrayToHexString(tramaVolumen,tramaVolumen.length));\n String[] parts = volumen.split(\"\\\\.\");\n if(parts.length > 1) {\n volumen = parts[0] + \".\" + parts[1].substring(0,(0+entity.getCantidadDecimales()));\n }\n\n entity.setVolumen(volumen);\n\n Log.v(\"Volumen Abastecido\",entity.getVolumen());\n\n //**********************************************************\n //Capturar Temperatura\n int[] tramaTemperatura = new int[5];\n contador = 0;\n for(int i = 113; i<= 117; i++){\n tramaTemperatura[contador] = bufferRecepcion[i];\n contador++;\n }\n String temperatura = \"\" + hexToAscii(byteArrayToHexString(tramaTemperatura,tramaTemperatura.length));\n temperatura = temperatura.substring(0,temperatura.length()-1);\n entity.setTemperatura(temperatura);\n\n Log.v(\"Temperatura\",entity.getTemperatura());\n\n //**********************************************************\n //Capturar Fecha Fin\n int[] tramaFechaFin = new int[1];\n tramaFechaFin[0] = bufferRecepcion[118];\n String diaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[119];\n String mesFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[120];\n String anioFin = \"20\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[123];\n String horaFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[122];\n String minutoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n tramaFechaFin[0] = bufferRecepcion[121];\n String segundoFin = \"\" + byteArrayToHexString(tramaFechaFin,tramaFechaFin.length);\n\n String fechaFin = diaFin + \"-\" + mesFin + \"-\" + anioFin + \"\" ;\n String horaFin1 = horaFin + \":\" + minutoFin + \":\" + segundoFin;\n //fechaInicio = \"\" + hexToAscii(byteArrayToHexString(tramaFechaInicio,tramaFechaInicio.length));\n entity.setFechaFin(fechaFin);\n entity.setHoraFin(horaFin1);\n\n Log.v(\"Fecha Fin\",entity.getFechaFin());\n Log.v(\"Hora Fin\",entity.getHoraFin());\n\n //**********************************************************\n //Capturar Tipo de Cierre\n int[] tramaTipoCierre = new int[1];\n contador = 0;\n for(int i = 124; i<= 124; i++){\n tramaTipoCierre[contador] = bufferRecepcion[i];\n contador++;\n }\n\n int tipoCierre = Integer.parseInt(byteArrayToHexIntGeneral(tramaTipoCierre,1));\n entity.setTipoCierre(tipoCierre);\n\n Log.v(\"Tipo Cierre\",\"\"+entity.getTipoCierre());\n\n txt_galones = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_galones);\n txt_ultimo_ticket = (TextView) layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket);\n txt_placa = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_placa);\n txt_producto = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_producto);\n txt_ultimo_galon_p2 = layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_galon_p2);\n txt_ultimo_ticket_p2= layoutsHose.get(indiceLayoutHose).inflater.findViewById(R.id.txt_ultimo_ticket_p2);\n\n txt_producto.setText(entity.getNombreProducto());\n txt_placa.setText(entity.getPlaca());\n txt_galones.setText(entity.getVolumen());\n txt_ultimo_galon_p2.setText(entity.getVolumen());\n txt_ultimo_ticket.setText(entity.getNumeroTransaccion());\n txt_ultimo_ticket_p2.setText(entity.getNumeroTransaccion());\n\n\n guardarTransaccionBD(entity);\n\n }",
"private byte[] processData(String peticion) {\n\t\t\n\t\tString respuesta = \"\";\n\t\t\n\t\tswitch (peticion) {\n\t\t\t\n\t\t\tcase \"noticias\": respuesta = \"¡Por fin la vacuna ya está en España!\"; break;\n\t\t\tcase \"hora\": respuesta = getFecha(); break;\n\t\t\tcase \"aleatorio\": respuesta = Double. toString(Math.random()*10); break;\n\t\t\tcase \"cerrar\": respuesta = \"Adios\"; break;\n\t\t\tcase \"cerrarServidor\": respuesta = \"Adios\"; break;\t\t\t\n\t\t\tdefault: respuesta = \"petición desconocida\";\n\t\t}\n\t\t\n\t\treturn respuesta.getBytes();\n\t}",
"public boolean Actualizar(String Usuario, String NombreMaterial, String Fecha, Integer NCampo, String NuevoCampo) throws IOException\n {\n System.out.println(\"Ëntro\");\n List<String> ListaLineaEliminar = BuscarIndice(Usuario, NombreMaterial, Fecha);\n if(ListaLineaEliminar.get(0) == \"404\"){ return false; }\n else{\n String LineaEliminar = ListaLineaEliminar.get(0);\n System.out.println(LineaEliminar);\n String[] Campos = LineaEliminar.split(\"\\\\|\");\n String NMaestro = Campos[1].substring(0,1);\n Integer NMaestroLinea = Integer.parseInt(Campos[1].substring(2,3));\n String L = ObtenerLinea(NMaestroLinea, \"C:\\\\MEIA\\\\Donaciones_\" + NMaestro + \".txt\");\n String[] CamposL = L.split(\"\\\\|\");\n Boolean Existe = Eliminar(Usuario, NombreMaterial, Fecha);\n System.out.println(Usuario);\n System.out.println(NombreMaterial);\n System.out.println(Fecha);\n if(NCampo == 0){\n Insertar(NuevoCampo, CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 1){\n Insertar(CamposL[0], CamposL[2], NuevoCampo, Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 2){\n Insertar(CamposL[0], NuevoCampo, CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 3){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(NuevoCampo), CamposL[4], CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 4){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), NuevoCampo, CamposL[5], CamposL[6]);\n return true;\n }\n else if(NCampo == 5){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], NuevoCampo, CamposL[6]);\n return true;\n }\n else if(NCampo == 6){\n Insertar(CamposL[0], CamposL[2], CamposL[1], Integer.parseInt(CamposL[3]), CamposL[4], CamposL[5], NuevoCampo);\n return true;\n }\n else{ return false; }\n }\n }",
"private void EnviarDatos(String user, String fecha, String pasos){\n\r\n HttpClient httpclient = new DefaultHttpClient();\r\n //Utilizamos la HttpPost para enviar lso datos\r\n //A la url donde se encuentre nuestro archivo receptor\r\n\r\n\r\n\r\n\r\n HttpPost httppost2 = new HttpPost(\"http://mets.itisol.com.mx/paciente/insertaActividad\");\r\n try {\r\n //Añadimos los datos a enviar en este caso solo uno\r\n //que le llamamos de nombre 'a'\r\n //La segunda linea podría repetirse tantas veces como queramos\r\n //siempre cambiando el nombre ('a')\r\n List<NameValuePair> postValues = new ArrayList<NameValuePair>(2);\r\n postValues.add(new BasicNameValuePair(\"usuario\", user));\r\n\r\n postValues.add(new BasicNameValuePair(\"fecha\", fecha));\r\n Log.d(\"la fecha es\", \"\" + cambiaFecha(fecha));\r\n postValues.add(new BasicNameValuePair(\"pasos\", pasos));\r\n\r\n // postValues.add(new BasicNameValuePair(\"tipo\", \"1\"));\r\n\r\n //Encapsulamos\r\n httppost2.setEntity(new UrlEncodedFormEntity(postValues));\r\n //Lanzamos la petición\r\n HttpResponse respuesta2 = httpclient.execute(httppost2);\r\n //Conectamos para recibir datos de respuesta\r\n HttpEntity entity2 = respuesta2.getEntity();\r\n //Creamos el InputStream como su propio nombre indica\r\n InputStream is2 = entity2.getContent();\r\n //Limpiamos el codigo obtenido atraves de la funcion\r\n //StreamToString explicada más abajo\r\n String resultado2= StreamToString(is2);\r\n\r\n //Enviamos el resultado LIMPIO al Handler para mostrarlo\r\n Message sms2 = new Message();\r\n sms2.obj = resultado2;\r\n\r\n puente.sendMessage(sms2);\r\n }catch (IOException e) {\r\n //TODO Auto-generated catch block\r\n }\r\n\r\n }",
"int insert(ParUsuarios record);",
"public static void guardarEstudianteBD(Estudiante estudiante) {\r\n //metimos este metodo dentro de la base de datos \r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n //ingresamos la direccion donde se encuntra la base de datos \r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.println(\"Conexion establecida!\");\r\n Statement sentencia = (Statement) conexion.createStatement();\r\n int insert = sentencia.executeUpdate(\"insert into estudiante values(\"\r\n + \"'\" + estudiante.getNro_de_ID()\r\n + \"','\" + estudiante.getNombres()\r\n + \"','\" + estudiante.getApellidos()\r\n + \"','\" + estudiante.getLaboratorio()\r\n + \"','\" + estudiante.getCarrera()\r\n + \"','\" + estudiante.getModulo()\r\n + \"','\" + estudiante.getMateria()\r\n + \"','\" + estudiante.getFecha()\r\n + \"','\" + estudiante.getHora_Ingreso()\r\n + \"','\" + estudiante.getHora_Salida()\r\n + \"')\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.println(\"Error en la conexion\" + ex);\r\n }\r\n }",
"private void limpiarDatos() {\n\t\t\n\t}",
"private void getTempRojoBhcs(){\n mTempRojoBhcs = estudioAdapter.getListaTempRojoBhcSinEnviar();\n //ca.close();\n }",
"public void guardarDatos() throws Exception {\r\n try {\r\n FormularioUtil.setUpperCase(groupboxEditar);\r\n if (validarForm()) {\r\n\r\n Admision admision = ((Admision) lbxNro_ingreso\r\n .getSelectedItem().getValue());\r\n\r\n Hospitalizacion hospitalizacion = new Hospitalizacion();\r\n hospitalizacion.setCodigo_empresa(empresa.getCodigo_empresa());\r\n hospitalizacion.setCodigo_sucursal(sucursal\r\n .getCodigo_sucursal());\r\n hospitalizacion.setNro_factura(tbxNro_factura.getValue());\r\n hospitalizacion = getServiceLocator()\r\n .getHospitalizacionService().consultar(hospitalizacion);\r\n if (hospitalizacion == null) {\r\n hospitalizacion = new Hospitalizacion();\r\n hospitalizacion.setCodigo_empresa(empresa\r\n .getCodigo_empresa());\r\n hospitalizacion.setCodigo_sucursal(sucursal\r\n .getCodigo_sucursal());\r\n hospitalizacion.setNro_factura(tbxNro_factura.getValue());\r\n }\r\n hospitalizacion.setTipo_identificacion((String) datos_seleccion\r\n .get(\"tipo_identificacion\"));\r\n hospitalizacion.setNro_identificacion(tbxNro_identificacion\r\n .getValue());\r\n hospitalizacion\r\n .setCodigo_administradora((String) datos_seleccion\r\n .get(\"codigo_administradora\"));\r\n hospitalizacion.setId_plan((String) datos_seleccion\r\n .get(\"id_plan\"));\r\n hospitalizacion.setNro_ingreso(admision.getNro_ingreso());\r\n hospitalizacion.setCodigo_prestador(tbxCodigo_prestador\r\n .getValue());\r\n hospitalizacion.setVia_ingreso(lbxVia_ingreso.getSelectedItem()\r\n .getValue().toString());\r\n hospitalizacion.setFecha_ingreso(new Timestamp(\r\n dtbxFecha_ingreso.getValue().getTime()));\r\n hospitalizacion.setNumero_autorizacion(tbxNumero_autorizacion\r\n .getValue());\r\n hospitalizacion.setCausa_externa((String) lbxCausa_externa\r\n .getSelectedItem().getValue().toString());\r\n hospitalizacion.setEstado_salida((String) lbxEstado_salida\r\n .getSelectedItem().getValue().toString());\r\n hospitalizacion.setFecha_egreso(new Timestamp(dtbxFecha_egreso\r\n .getValue().getTime()));\r\n hospitalizacion\r\n .setCodigo_diagnostico_principal(tbxCodigo_diagnostico_principal\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico1(tbxCodigo_diagnostico1\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico2(tbxCodigo_diagnostico2\r\n .getValue());\r\n hospitalizacion.setCodigo_diagnostico3(tbxCodigo_diagnostico3\r\n .getValue());\r\n hospitalizacion.setComplicacion(tbxComplicacion.getValue());\r\n hospitalizacion.setCausa_muerte(tbxCausa_muerte.getValue());\r\n\r\n hospitalizacion.setCreacion_date(new Timestamp(\r\n new GregorianCalendar().getTimeInMillis()));\r\n hospitalizacion.setUltimo_update(new Timestamp(\r\n new GregorianCalendar().getTimeInMillis()));\r\n hospitalizacion.setCreacion_user(usuarios.getCodigo()\r\n .toString());\r\n hospitalizacion.setUltimo_user(usuarios.getCodigo().toString());\r\n\r\n String complemento = \"\";\r\n\r\n if (tbxAccion.getText().equalsIgnoreCase(\"registrar\")) {\r\n getServiceLocator().getHospitalizacionService().crear(\r\n hospitalizacion);\r\n if (FACTURACION_RIPS != null) {\r\n this.detach();\r\n } else {\r\n accionForm(true, \"registrar\");\r\n }\r\n } else {\r\n int result = getServiceLocator()\r\n .getHospitalizacionService().actualizar(\r\n hospitalizacion);\r\n if (result == 0) {\r\n throw new Exception(\r\n \"Lo sentimos pero los datos a modificar no se encuentran en base de datos\");\r\n }\r\n }\r\n\r\n if (ionGuardar != null) {\r\n ionGuardar.guardar();\r\n } else {\r\n Messagebox.show(\r\n \"Los datos se guardaron satisfactoriamente.\"\r\n + complemento, \"Informacion? ..\",\r\n Messagebox.OK, Messagebox.INFORMATION);\r\n tbxNro_factura.setValue(hospitalizacion.getNro_factura());\r\n tbxAccion.setValue(\"modificar\");\r\n }\r\n\r\n if (this.getParent() instanceof Facturacion_ripsAction) {\r\n this.detach();\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n MensajesUtil.mensajeError(e, \"\", this);\r\n }\r\n }",
"private void saveEncLactancias(String estado) {\n int c = mLactanciasMaternas.size();\n for (LactanciaMaterna enclactancia : mLactanciasMaternas) {\n enclactancia.getMovilInfo().setEstado(estado);\n estudioAdapter.updateLacMatSent(enclactancia);\n publishProgress(\"Actualizando encuestas lactancia\", Integer.valueOf(mLactanciasMaternas.indexOf(enclactancia)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }",
"public void recargarDatos( ) {\n\t\tPAC_SHWEB_PROVEEDORES llamadaProv = null;\n\t\ttry {\n\t\t\tllamadaProv = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaCom = null;\n\n\t\ttry {\n\t\t\trespuestaCom = llamadaProv.ejecutaPAC_SHWEB_PROVEEDORES__F_COMUNICADOS_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t// Mostramos el estado del expediente\n\t\tPAC_SHWEB_PROVEEDORES llamada = null;\n\t\ttry {\n\t\t\tllamada = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuesta = null;\n\t\ttry {\n\t\t\trespuesta = llamada.ejecutaPAC_SHWEB_PROVEEDORES__F_ESTADO_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t\tMap<String, Object> retorno = new HashMap<String, Object>(respuesta);\n\n\t\t\tUI.getCurrent().getSession().setAttribute(\"estadoExpediente\",retorno.get(\"ESTADO\").toString());\n\t\t\t\n\t\t\tprovPantallaConsultaExpedienteInicial.setCaption(\"GESTIÓN DEL EXPEDIENTE Nº \" + UI.getCurrent().getSession().getAttribute(\"expediente\")\n\t\t\t\t\t+ \" ( \" + \n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\") + \" ) \");\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\t\n\t\t\n\t\t// Maestro comunicados\n\n\t\tWS_AMA llamadaAMA = null;\n\t\ttry {\n\t\t\tllamadaAMA = new WS_AMA(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaMaestro = null;\n\t\t\n\t\t//System.out.println(\"Llamammos maestro comunicados: \" + UI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1));;\n\t\ttry {\n\t\t\t// pPUSUARIO, pORIGEN, pTPCOMUNI, pTPUSUARIO, pESTADO)\n\t\t\t\n\t\t\trespuestaMaestro = llamadaAMA.ejecutaWS_AMA__MAESTRO_COMUNICADOS(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnull,\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\").toString()\n\t\t\t\t\t);\t\t\t\n\n\t\t\t\n\t\t\tMap<String, Object> retornoMaestro = new HashMap<String, Object>(respuestaMaestro);\n\t\t\tList<Map> valorMaestro = (List<Map>) retornoMaestro.get(\"COMUNICADOS\");\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",valorMaestro);\n\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",null);\n\t\t}\n\t\t\n\t\t// \t\n\t\t\n\t\t\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\t\t/*if ( !ValidarComunicado.EsValido(\"CA\") && !ValidarComunicado.EsValido(\"FT\") ) {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(true);\n\n\t\t\t\n\t\t\t\n\t\t}*/\n\t\t// Mostramos botonera de cerrar expediente\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\n\t}",
"@Override\n public Call<ResponseBody> registarMoviemientoEmpleado(@Body RootMovimiento movimiento) {\n movimiento.setId_dispositivo(Settings.Secure.getString(this.context.getContentResolver(), Settings.Secure.ANDROID_ID));\n return this.serviceInterface.registarMoviemientoEmpleado(movimiento);\n }",
"@Override\r\n\tprotected String requestText() {\n\t\tGuardarVtaCeroMotivoRequest guardarVtaCeroMotivoRequest = new GuardarVtaCeroMotivoRequest();\r\n\t\tguardarVtaCeroMotivoRequest.setAnio(Anio);\r\n\t\tguardarVtaCeroMotivoRequest.setCodCliente(codCliente);\r\n\t\tguardarVtaCeroMotivoRequest.setCodDeposito(codDeposito);\r\n\t\tguardarVtaCeroMotivoRequest.setMes(Mes);\r\n\t\tguardarVtaCeroMotivoRequest.setMotivo(Motivo);\r\n\t\tguardarVtaCeroMotivoRequest.setObservacion(observacion);\r\n\t\tguardarVtaCeroMotivoRequest.setSemana(Semana);\r\n\t\tguardarVtaCeroMotivoRequest.setUsuario(Usuario);\r\n\t\tString request = JSONHelper.serializar(guardarVtaCeroMotivoRequest);\r\n\t\treturn request;\r\n\t}",
"public String guardar()\r\n/* 104: */ {\r\n/* 105: */ try\r\n/* 106: */ {\r\n/* 107:132 */ this.servicioDimensionContable.guardar(this.dimensionContable);\r\n/* 108:133 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 109:134 */ setEditado(false);\r\n/* 110:135 */ cargarDatos();\r\n/* 111: */ }\r\n/* 112: */ catch (Exception e)\r\n/* 113: */ {\r\n/* 114:137 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 115:138 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 116: */ }\r\n/* 117:140 */ return \"\";\r\n/* 118: */ }",
"public String cambiarEstado() {\n\t\ttry {\n\t\t\tMensaje.crearMensajeINFO(managergest.cambioEstadoItem(getOfertadelsita().getOferId()));\n\t\t\tgetListaOferta().clear();\n\t\t\tgetListaOferta().addAll(managergest.findAllofertasOrdenadas());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"\";\n\t}",
"@Override\r\n\tprotected String requestText() {\n\t\tGuardarSustentoRequest guardarSustentoRequest = new GuardarSustentoRequest();\r\n\t\tguardarSustentoRequest.setCodigoActvidad(codigoActvidad);\r\n\t\tguardarSustentoRequest.setCodigoCliente(codigoCliente);\r\n\t\tguardarSustentoRequest.setCodigoPLan(codigoPLan);\r\n\t\tguardarSustentoRequest.setDescripcionActividad(descripcionActividad);\r\n\t\tguardarSustentoRequest.setFechaVisita(fechaVisita);\r\n\t\tguardarSustentoRequest.setTipoActividad(tipoActividad);\r\n\t\tguardarSustentoRequest.setUsuario(usuario);\r\n\t\tString request = JSONHelper.serializar(guardarSustentoRequest);\r\n\t\treturn request;\r\n\t}",
"private void agregarASalNuevoMaest(CuentaSerializada cuenta){\n try{\n salNuevoMaest.writeObject(cuenta);\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 }",
"public void enviarValoresCabecera(){\n }",
"public void guardarDestruccion() {\n try {\n produccion.setIdMarca(opcionMarca);\n produccion.setIdPlantaProd(opcionPlanta);\n produccion.setIdPaisOrigen(opcionOrigen);\n produccion.setIdTipoRetro(opcionTipo);\n produccion.setFechProduccion(new Date());\n produccion.setDescPaisOrigen(desperdiciosHelper.getNombrePais());\n\n if (!habilitarBtnValidarProd()) {\n if (produccion != null) {\n produccion = produccionService.guardaDestruccion(produccion);\n super.msgInfo(MSGEXITOVALIDAPROD);\n desperdiciosHelper.setDeshabilitaBtnValidarProd(true);\n desperdiciosHelper.setDeshabilitaCargaArchivo(false);\n } else {\n super.msgError(MSGERRORVALIDARPROD);\n }\n }\n } catch (ProduccionServiceException e) {\n LOGGER.error(\"ERROR: Al guardar los datos de produccion\" + e.getMessage(), e);\n }\n }",
"public void guardar(Modelo modelo) throws SipsaExcepcion;",
"@Override\n protected void onPostExecute(HttpResponse result) {\n if (result != null)\n\t\t\ttry {\n\t\t\t\tLog.i(\"Conexao\", \"Dentrodopost\");\n\t\t\t\t//result.getEntity().writeTo(new FileOutputStream(f));\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} \n }",
"private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }",
"public String cargarDatos()\r\n/* 514: */ {\r\n/* 515:540 */ return null;\r\n/* 516: */ }",
"@Override\n protected Response doInsert(JSONObject data) {\n return null;\n }"
] |
[
"0.6108867",
"0.6089659",
"0.59963566",
"0.59516066",
"0.59346324",
"0.59239954",
"0.5902984",
"0.5900754",
"0.580848",
"0.57809454",
"0.5766452",
"0.57644504",
"0.5763113",
"0.57480466",
"0.57415074",
"0.5709575",
"0.57050407",
"0.5672679",
"0.56660414",
"0.5664272",
"0.56620985",
"0.5660924",
"0.56539875",
"0.5640711",
"0.5639574",
"0.5621628",
"0.5621237",
"0.5618425",
"0.56115556",
"0.5598985",
"0.55770415",
"0.557137",
"0.55665624",
"0.5561801",
"0.55481106",
"0.5547554",
"0.5545583",
"0.55434704",
"0.5530123",
"0.55275875",
"0.5525662",
"0.5524151",
"0.5519947",
"0.55188763",
"0.5511981",
"0.5506241",
"0.55051416",
"0.5503129",
"0.55030775",
"0.54881",
"0.54847366",
"0.5480024",
"0.54506034",
"0.5445036",
"0.54418904",
"0.5441591",
"0.54324824",
"0.5428266",
"0.54233485",
"0.5421697",
"0.5421027",
"0.54141116",
"0.54127306",
"0.5408961",
"0.54024637",
"0.5396911",
"0.53968513",
"0.53895",
"0.53855276",
"0.53819346",
"0.53780955",
"0.53749156",
"0.5370826",
"0.5370472",
"0.53698844",
"0.5368954",
"0.53641844",
"0.5346846",
"0.53458077",
"0.53453165",
"0.53430814",
"0.5335295",
"0.5334208",
"0.5333388",
"0.53326344",
"0.53292847",
"0.53247714",
"0.53199583",
"0.5319406",
"0.53191096",
"0.5317003",
"0.53164697",
"0.53157854",
"0.53155106",
"0.5312124",
"0.53046227",
"0.5300779",
"0.5298598",
"0.5297596",
"0.52974415"
] |
0.5652867
|
23
|
Parameter used to create all legal pairs of comparisons.
|
public LdShardToVariantPairs(long window) {
this.window = window;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Comparison createComparison();",
"Comparison createComparison();",
"private List<ComparisonExpression> comparisons(HashMap<TimeSelector, Long> lowerBounds,\n HashMap<TimeSelector, Long> upperBounds) {\n List<ComparisonExpression> newComparisons = new ArrayList<>();\n // for all selectors, as lowerBounds has the same keys as upperBounds\n for (Map.Entry<TimeSelector, Long> entry : lowerBounds.entrySet()) {\n TimeSelector selector = entry.getKey();\n Long lower = entry.getValue();\n Long upper = upperBounds.get(selector);\n if (lower.equals(upper)) {\n newComparisons.add(new ComparisonExpression(\n new Comparison(selector, EQ, new TimeLiteral(lower)),\n new ComparableTPGMFactory()));\n } else {\n if (lower > TemporalElement.DEFAULT_TIME_FROM) {\n // check if informative: lower bound of from is trivial lower bound of to\n if (selector.getTimeProp().equals(TX_TO)) {\n TimeSelector txFromSel = new TimeSelector(selector.getVariable(), TX_FROM);\n if (lowerBounds.getOrDefault(txFromSel, TemporalElement.DEFAULT_TIME_FROM).equals(lower)) {\n continue;\n }\n } else if (selector.getTimeProp().equals(VAL_TO)) {\n TimeSelector valFromSel = new TimeSelector(selector.getVariable(), VAL_FROM);\n if (lowerBounds.getOrDefault(valFromSel, TemporalElement.DEFAULT_TIME_FROM).equals(lower)) {\n continue;\n }\n }\n // informative => build comparison\n newComparisons.add(new ComparisonExpression(\n new Comparison(new TimeLiteral(lower), LTE, selector),\n new ComparableTPGMFactory()));\n }\n if (upper < TemporalElement.DEFAULT_TIME_TO) {\n // analagously as for lower bounds\n // upper bound of to is trivial upper of from\n if (selector.getTimeProp().equals(TimeSelector.TimeField.TX_FROM)) {\n TimeSelector txToSel = new TimeSelector(selector.getVariable(), TX_TO);\n if (upperBounds.getOrDefault(txToSel, TemporalElement.DEFAULT_TIME_TO).equals(upper)) {\n continue;\n }\n } else if (selector.getTimeProp().equals(TimeSelector.TimeField.VAL_FROM)) {\n TimeSelector valToSel = new TimeSelector(selector.getVariable(), VAL_TO);\n if (upperBounds.getOrDefault(valToSel, TemporalElement.DEFAULT_TIME_TO).equals(upper)) {\n continue;\n }\n }\n // informative => build comparison\n newComparisons.add(new ComparisonExpression(\n new Comparison(selector, LTE, new TimeLiteral(upper)),\n new ComparableTPGMFactory()));\n }\n }\n }\n return newComparisons;\n }",
"static void compare()\n {\n \tif(a < c)\n\t\t {\n\t\t\t comp_one = 1; //store this value , else zero default \n\t\t }\n\t\t if(c < b)\n\t\t {\n\t\t\t comp_two = 2; //store this value , else zero default\n\t\t }\n\t\t if(b < a)\n\t\t {\n\t\t\t comp_thr = 5; //store this value , else zero default\n\t\t }\n\t\t \n\t\t comp_val = comp_one + comp_two + comp_thr; //create a unique value by addition\n }",
"static public java.lang.String genComparisons (org.apache.spark.sql.catalyst.expressions.codegen.CodegenContext ctx, scala.collection.Seq<org.apache.spark.sql.catalyst.expressions.SortOrder> ordering) { throw new RuntimeException(); }",
"@DataProvider(name = \"allPairs\")\n public Object[][] allPairs() {\n final List<Object[]> tests = new ArrayList<>();\n\n for (final Allele ref : Arrays.asList(refA, refC, refG, refT)){\n for (final Allele alt : Arrays.asList(altA, altC, altG, altT)){\n if (!ref.getBaseString().equals(alt.getBaseString())){\n tests.add(new Object[]{ref, alt});\n }\n }\n }\n\n return tests.toArray(new Object[][]{});\n }",
"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 }",
"public abstract void compare();",
"public static boolean opposites(Pair[] data){\n HashSet<Pair> hs = new HashSet<>(20, 0.9f);\n for(Pair p : data) {\n if(hs.contains(new Pair(p.b(), p.a())))\n return true;\n hs.add(p);\n }\n return false;\n }",
"CritPair createCritPair();",
"@Override\n protected int compareToInner(ExtractedParameterValue o) {\n return 0;\n }",
"private Expr comparison() {\n Expr expr = addition();\n\n while(match(GREATER, GREATER_EQUAL, LESS, LESS_EQUAL)) { // These variable length arguments are real convenient\n Token operator = previous();\n Expr right = addition();\n expr = new Expr.Binary(expr, operator, right);\n }\n\n return expr;\n }",
"private Comparison() {\n }",
"boolean isTwoPair();",
"@Test\n @Order(1)\n void algorithms() {\n \n Combination initialComb = new Combination();\n for (int i = 0; i < assignementProblem.getAssignmentData().getLength(); i++) {\n initialComb.add((long) i + 1);\n }\n assignementProblem.setInCombination(initialComb);\n executeAlgo(SearchTestUtil.ALGO.TABU);\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n }",
"@Test\r\n\tpublic void shouldReturn2PairsWhen110100() {\n\t\tA = new ArrayList<Integer>(Arrays.asList(1, 1, 0, 1, 0, 0));\r\n\t\tassertEquals(2, Coins.countPairs(A));\r\n\t}",
"protected abstract Comparison getInstance();",
"boolean hasXYPairs();",
"public void testCompare2() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }",
"private boolean comps(int a, int b){\n\t\tthis.comparisons.add(new Integer[]{a, b});\n\t\treturn true;\n\t}",
"private int twoPairs() {\n\t\tint check = 0;\n\t\tint[] pairPos = new int[2];\n\t\tfor (int counter = POS_ONE; counter < Constants.HAND_SIZE; counter++) {\n\t\t\tif (hand[counter - 1].getValueIndex() == hand[counter].getValueIndex()) {\n\t\t\t\tpairPos[check] = counter;\n\t\t\t\tcheck++;\n\t\t\t}\n\t\t}\n\t\tif (check == 2) {\n\t\t\tresult.setPrimaryValuePos(hand[pairPos[1]].getValueIndex());\n\t\t\tresult.setSecondaryValuePos(hand[pairPos[0]].getValueIndex());\n\t\t\tList<Card> tertiaryValue = Arrays.stream(hand)\n\t\t\t\t\t.filter(card -> card.getValueIndex() != hand[pairPos[0]].getValueIndex())\n\t\t\t\t\t.filter(card -> card.getValueIndex() != hand[pairPos[1]].getValueIndex())\n\t\t\t\t\t.collect(Collectors.toList());\n\t\t\tresult.setTertiaryValuePos(tertiaryValue.get(0).getValueIndex());\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"public OrderedPair(int x, int y) {\n this.x = x;\n this.y = y;\n }",
"public void Pairs()\r\n {\n int pairsize = 0;\r\n int ind1 = 0;\r\n for(int i = 0; i < 5; i++){\r\n// while(cards[i].getNumber() != pairnum){\r\n for(int j = i+1; j < 5; j++)\r\n {\r\n if(cards[i].getFace().equals(cards[j].getFace()))\r\n {\r\n ind1 = i;\r\n if(pairsize < 3){\r\n pairsize += 1;\r\n// paircounts += 1;\r\n }\r\n if(cards[i].compareTo(cards[ind1]) > 0){\r\n// Maxpair = cards[i].getNumber();\r\n index = i;\r\n }\r\n \r\n }\r\n }\r\n// }\r\n }\r\n if(pairsize == 1)\r\n Judge = 2;\r\n if(pairsize == 2)\r\n Judge = 3;\r\n if(pairsize == 3)\r\n Judge = 6;\r\n }",
"@Override\n\tpublic void visit(AllComparisonExpression arg0) {\n\n\t}",
"@Override\n\tpublic void visit(AllComparisonExpression arg0) {\n\t\t\n\t}",
"public TwoPairsEvaluation() {\n\t\tplayer = new TestPlayer(\"Player\");\n\t\tsevenCardshand = new ArrayList<TestCard>(7);\n\t\ttest = new TestHandEvaluation(dealer, table);\n\t\ttest.setHand();\n\t}",
"@Test\r\n\tpublic void testTournamentStrategiesConditions() {\r\n\t\tassertTrue(cl.checkTournamentStrategiesConditions(tags[4]));\r\n\t\tassertFalse(cl.checkTournamentStrategiesConditions(tags2[4]));\r\n\t}",
"static public java.lang.String genComparisons (org.apache.spark.sql.catalyst.expressions.codegen.CodegenContext ctx, org.apache.spark.sql.types.StructType schema) { throw new RuntimeException(); }",
"private SimplexComparator() {}",
"public coOrdPair(int x, int y)\n {\n this.x = x;\n this.y = y;\n }",
"public Vertex[] Vertices (TrianglePair pair)\n\t{\n\t\tFace tri1 = trimesh.faces[pair.face1];\n\t\tFace tri2 = trimesh.faces[pair.face2];\n\t\tVertex[] verts1 = new Vertex[3];\n\t\tVertex[] verts2 = new Vertex[3];\n\t\tverts1[0] = trimesh.vertices[tri1.fvlist[0]];\n\t\tverts1[1] = trimesh.vertices[tri1.fvlist[1]];\n\t\tverts1[2] = trimesh.vertices[tri1.fvlist[2]];\n\t\tverts2[0] = trimesh.vertices[tri2.fvlist[0]];\n\t\tverts2[1] = trimesh.vertices[tri2.fvlist[1]];\n\t\tverts2[2] = trimesh.vertices[tri2.fvlist[2]];\n\t\tboolean[] equalVerts = new boolean[9];\n\t\tVertex[] retverts = new Vertex[4];\n\t\tequalVerts[0] = (verts1[0] == verts2[0]);\n\t\tequalVerts[1] = (verts1[0] == verts2[1]);\n\t\tequalVerts[2] = (verts1[0] == verts2[2]);\n\t\tequalVerts[3] = (verts1[1] == verts2[0]);\n\t\tequalVerts[4] = (verts1[1] == verts2[1]);\n\t\tequalVerts[5] = (verts1[1] == verts2[2]);\n\t\tequalVerts[6] = (verts1[2] == verts2[0]);\n\t\tequalVerts[7] = (verts1[2] == verts2[1]);\n\t\tequalVerts[8] = (verts1[2] == verts2[2]);\n\t\tint eqto1in1 = 0, eqto1in2 = 0, eqto2in1 = 0, eqto2in2 = 0;\n\t\tint i;\n\t\tfor (i = 0; i < 9; i++)\n\t\t{\n\t\t\tif (equalVerts[i])\n\t\t\t{\n\t\t\t\teqto1in1 = i / 3;\n\t\t\t\teqto1in2 = i % 3;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor (i = 8; i >= 0; i--)\n\t\t{\n\t\t\tif (equalVerts[i])\n\t\t\t{\n\t\t\t\teqto2in1 = i / 3;\n\t\t\t\teqto2in2 = i % 3;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tretverts[0] = verts1[eqto1in1];\n\t\tretverts[1] = verts1[eqto2in1];\n\t\tint lone1, lone2;\n\t\tif (eqto1in1 == 0)\n\t\t{\n\t\t\tif (eqto2in1 == 1)\n\t\t\t\tlone1 = 2;\n\t\t\telse // eqto2in1 == 2\n\t\t\t\tlone1 = 1;\n\t\t}\n\t\telse if (eqto1in1 == 1)\n\t\t{\n\t\t\tif (eqto2in1 == 0)\n\t\t\t\tlone1 = 2;\n\t\t\telse // eqto2in1 == 2\n\t\t\t\tlone1 = 0;\n\t\t}\n\t\telse // eqto1in1 == 2\n\t\t{\n\t\t\tif (eqto2in1 == 0)\n\t\t\t\tlone1 = 1;\n\t\t\telse // eqto2in1 == 1\n\t\t\t\tlone1 = 0;\n\t\t}\n\t\tif (eqto1in2 == 0)\n\t\t{\n\t\t\tif (eqto2in2 == 1)\n\t\t\t\tlone2 = 2;\n\t\t\telse // eqto2in2 == 2\n\t\t\t\tlone2 = 1;\n\t\t}\n\t\telse if (eqto1in2 == 1)\n\t\t{\n\t\t\tif (eqto2in2 == 0)\n\t\t\t\tlone2 = 2;\n\t\t\telse // eqto2in2 == 2\n\t\t\t\tlone2 = 0;\n\t\t}\n\t\telse // eqto1in2 == 2\n\t\t{\n\t\t\tif (eqto2in2 == 0)\n\t\t\t\tlone2 = 1;\n\t\t\telse // eqto2in2 == 1\n\t\t\t\tlone2 = 0;\n\t\t}\n\t\tretverts[2] = verts1[lone1];\n\t\tretverts[3] = verts2[lone2];\n\t\treturn retverts;\n\t}",
"public static void main(String[] args) {\n Pair first = new Pair(\"Pesho\", \"Gosho\");\r\n Pair second = new Pair(\"Pesho\", \"Gosho\");\r\n Pair third = new Pair(\"Pesho\", \"Mariika\");\r\n \r\n System.out.println(first.equals(second));\r\n System.out.println(first.equals(third));\r\n }",
"public static void pseudoTrueTuples(LogicProblem logicProblem, boolean applyChanges)\r\n throws RelationshipConflictException {\n \r\n HashMap<ItemPair,Relationship> relationshipTable = logicProblem.getRelationshipTable();\r\n HashSet<CategoryPair> categoryPairs = logicProblem.getCategoryPairs();\r\n \r\n// System.out.println(\"searching...\");\r\n //within a subgrid\r\n for (CategoryPair categoryPair : categoryPairs) {\r\n// System.out.println(\"Category pair:\" + categoryPair);\r\n //vertical and horizontal search\r\n for (final boolean verticalOrientation : new boolean[] { false, true } ) {\r\n\r\n Category subrowCategory = verticalOrientation?categoryPair.first():categoryPair.last();\r\n Category subcolumnCategory = verticalOrientation?categoryPair.last():categoryPair.first();\r\n\r\n //commenting \"vertical search\" \r\n //(subrows match first category's items\r\n // subcolumns match second category's items)\r\n\r\n //i (2 to floor(n/2)) is the number of elements in the combination tuple\r\n // i=2 in pseudoTrue pairs\r\n //(for subgrids of 5x5 items, looking for both pairs and triplets becomes redundant\r\n for (int i=2; i<=floor(logicProblem.getNumCategories()/2);i++) {\r\n\r\n //https://github.com/dpaukov/combinatoricslib3/wiki/v3.3.0#1-simple-combinations\r\n List<List<Item>> columnCombinations = Generator.combination(subcolumnCategory.getItems())\r\n .simple(i) //for pseudo true pairs, i=2\r\n .stream()\r\n .collect(Collectors.<List<Item>>toList());\r\n //for i=2, this would contain \r\n //Bethany, Donovan\r\n //Bethany, Elizabeth\r\n //...\r\n //Frederick, Peyton\r\n// columnCombinations.stream().forEach(l -> System.out.println(\r\n// (verticalOrientation?\"vertical\":\"horizontal\")+ \" combo: \"+l.toString()));\r\n\r\n //create the sets\r\n //for each combination, start over\r\n \r\n //columnTuple contains i items with which we will compute set intersections\r\n for (List<Item> columnItemTuple : columnCombinations) {\r\n //Bethany, Donovan\r\n \r\n //similarly, valueNoSets contains i sets of VALUE_NO relationships\r\n List<Set<Item>> valueNoSets = new ArrayList<>(); //size=i\r\n //build a set for each i item of columnTuple\r\n for (Item columnItem : columnItemTuple) {\r\n //Bethany\r\n Set<Item> valueNoSet = new HashSet<>(); //size = n\r\n for (Item rowItem : subrowCategory.getItems()) {\r\n //Haley's Comet ....\r\n if (relationshipTable.get(new ItemPair(rowItem, columnItem)).getValue() == Relationship.ValueType.VALUE_NO)\r\n //stacking all VALUE_NO relationship into vertical set\r\n valueNoSet.add(rowItem); //store into single subcolumn set \r\n }\r\n //adding each vertical set into list of sets\r\n if (valueNoSet.size() >= logicProblem.getNumItems() - i //for pairs, we need three VALUE_NO in the set\r\n && valueNoSet.size() < logicProblem.getNumItems()-1) //uniqueness will take or n-1 cases\r\n valueNoSets.add(valueNoSet); //store single subcolumn into multi-set\r\n }\r\n //magic!\r\n Set<Item> intersectionSet = new HashSet<>(); //avoid NPE when the next call is made\r\n if (valueNoSets.size()>=2) //don't compute intersections otherwise\r\n intersectionSet = Processor.multiSetIntersection(valueNoSets);\r\n\r\n if (intersectionSet.size()==logicProblem.getNumItems()-i) {\r\n \r\n// System.out.println(\"----> found candidates for pseudo true pairs!\");\r\n// intersectionSet.stream().forEach(l -> System.out.println(\"\\t\" + l.toString()));\r\n// System.out.println(\"\\t\\tvs.\");\r\n// columnItemTuple.stream().forEach(l -> System.out.println(\"\\t\" + l.toString()));\r\n \r\n //create predecessor list\r\n //we can only add the intersection output as predecessors\r\n ArrayList<Dependable> predecessors = new ArrayList<Dependable>();\r\n for (Item intersectionColumn : intersectionSet) {\r\n for (Item rowItem : columnItemTuple) {\r\n predecessors.add(relationshipTable.get(new ItemPair(rowItem, intersectionColumn)));\r\n }\r\n }\r\n\r\n\r\n //we have a bunch of work to do\r\n for (Item everyRowItem : subrowCategory.getItems()) {\r\n //for every row item not in the intersectionSet\r\n if (!intersectionSet.contains(everyRowItem)) {\r\n for (Item everyColumnItem : subcolumnCategory.getItems()) {\r\n //for every column item not in any of the columnTuple list\r\n if (!columnItemTuple.contains(everyColumnItem)) {\r\n Relationship rel = relationshipTable.get(new ItemPair(everyRowItem,everyColumnItem));\r\n if (rel.getValue()!=Relationship.ValueType.VALUE_NO)\r\n Processor.setRelationship(logicProblem, applyChanges, rel, \r\n Relationship.ValueType.VALUE_NO, Relationship.LogicType.PSEUDOTRUE,\r\n predecessors.toArray(new Relationship[predecessors.size()])); \r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }",
"@Test\n public void generate_correctOrderOfPrecedenceWithoutParentheses() throws Exception {\n ConditionGenerator conditionGenerator = initGenerator(PREFIX_TAG_TOKEN, STRING_ONE_TOKEN, OR_TOKEN,\n PREFIX_TAG_TOKEN, STRING_TWO_TOKEN, AND_TOKEN, PREFIX_TAG_TOKEN, STRING_THREE_TOKEN, EOF_TOKEN);\n Predicate<Coin> condition = conditionGenerator.generate();\n\n assertFalse(condition.test(COIN_0));\n assertFalse(condition.test(COIN_1));\n assertFalse(condition.test(COIN_2));\n assertTrue(condition.test(COIN_3));\n assertFalse(condition.test(COIN_4));\n assertTrue(condition.test(COIN_5));\n assertFalse(condition.test(COIN_6));\n assertTrue(condition.test(COIN_7));\n }",
"public compare(){\r\n }",
"public void testCompare1() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions above the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }",
"@Test\r\n\tpublic void shouldReturn1PairsWhen11() {\n\t\tA = new ArrayList<Integer>(Arrays.asList(1, 1));\r\n\t\tassertEquals(1, Coins.countPairs(A));\r\n\t}",
"Equality createEquality();",
"private void assertEquivalentPair(Set<Pair> result, String s1, String s2) {\n\t\tPair resultPair = filterResult(result, s1, s2);\n\t\tassertFalse(resultPair.isMarked());\n\t}",
"public void testCompare3() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions above the range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }",
"@Test\n\tvoid testSwapPair()\n\t{\n\t\tSystem.out.println(\"test SwapPair\");\n\t\tString[] exp = {\"suruchi\", \"kunal\"};\n\t\toperate.swapPair(p);\n\t\t\n\t\t//act = {\"suruchi\",\"kunal\"}\n\t\tString[] act = {p.getFirst(),p.getSecond()};\n\n\t\t//if equal the pass then test\n\t\tassertArrayEquals(exp, act);\n\t\n\t}",
"protected abstract List<Individual> binaryOperation(List<Individual> acceptedFromLeft,\n List<Individual> acceptedFromRight);",
"int getComparisons();",
"@Override\n public VectorEquality compareTo(PredicateVector vectorCmp) {\n try {\n PredicateVector vectorLarge;\n PredicateVector vectorSmall;\n VectorEquality cmpResult;\n \n if (flagged || vectorCmp.flagged) {\n return VectorEquality.UNIQUE;\n }\n \n // TODO: add size check\n \n if (this.size() > vectorCmp.size() && !this.values().iterator().next().isEmpty()) {\n vectorLarge = this;\n vectorSmall = vectorCmp;\n cmpResult = VectorEquality.SUPERSET;\n } else {\n vectorLarge = vectorCmp;\n vectorSmall = this;\n cmpResult = VectorEquality.SUBSET;\n }\n \n int largeVectorIter = 0;\n int numEq = 0;\n \n List<Integer> vectorSmallKeys = new ArrayList<Integer>(vectorSmall.keySet());\n Collections.sort(vectorSmallKeys);\n \n List<Integer> vectorLargeKeys = new ArrayList<Integer>(vectorLarge.keySet());\n Collections.sort(vectorLargeKeys);\n\n int i = 0;\n\n for (Integer smallVectorKey: vectorSmallKeys) {\n StateVector smallVectorState = vectorSmall.get(smallVectorKey);\n // Check if we have not iterated over all large vector states\n if (largeVectorIter >= vectorLargeKeys.size() && !smallVectorState.isEmpty()) {\n cmpResult = VectorEquality.UNIQUE;\n break;\n }\n \n \n for (i = largeVectorIter; i < vectorLargeKeys.size(); i++) {\n StateVector largeVectorState = vectorLarge.get(vectorLargeKeys.get(i));\n VectorEquality cmpVectorResult = smallVectorState.compareTo(largeVectorState); \n if (cmpVectorResult == VectorEquality.EQUAL) {\n numEq += 1;\n break;\n }\n \n if (cmpVectorResult == VectorEquality.SUPERSET || cmpVectorResult == VectorEquality.SUBSET) {\n cmpResult = cmpVectorResult;\n numEq += 1;\n break;\n }\n }\n \n largeVectorIter = i + 1; // TODO: double check i+1\n }\n \n if (numEq < vectorSmall.size() && !vectorSmall.values().iterator().next().isEmpty())\n cmpResult = VectorEquality.UNIQUE;\n \n return cmpResult;\n } catch (ArrayIndexOutOfBoundsException e) {\n e.printStackTrace();\n }\n \n return VectorEquality.UNIQUE;\n }",
"public CategoryWeight(WeightedPairLiteral pair) {\n \n String baseA = pair.getBaseValueA();\n String baseB = pair.getBaseValueB();\n \n List<String> mismatchA = pair.getMismatchTokensA();\n List<String> mismatchB = pair.getMismatchTokensB();\n \n List<String> specialsA = pair.getSpecialTermsA();\n List<String> specialsB = pair.getSpecialTermsB();\n \n Set<CommonSpecialTerm> common = pair.getCommonSpecialTerms();\n \n // giann: added the fullZeroBaseSimilarity check / \n if(baseA.isEmpty() && baseB.isEmpty()){\n fullZeroBaseSimilarity = true;\n }\n \n /*giann: replaced with XOR*/\n if(baseA.isEmpty() ^ baseB.isEmpty()){\n zeroBaseSimilarity = true;\n }\n\n if((mismatchA.isEmpty() && !mismatchB.isEmpty()) || (!mismatchA.isEmpty() && mismatchB.isEmpty())){\n halfEmptyMismatch = true;\n }\n\n if(mismatchA.isEmpty() && mismatchB.isEmpty()){\n fullEmptyMismatch = true;\n }\n \n if(specialsA.isEmpty() && specialsB.isEmpty()){\n emptySpecials = true;\n } \n \n if(common.isEmpty()){\n emptyCommon = true;\n } \n }",
"public ConstraintChecker(\n\t\t\tArrayList<TimeSlot> cSlots, \n\t\t\tArrayList<TimeSlot> lSlots, \n\t\t\tArrayList<Pair<Course, Course>> notCompat,\n\t\t\tArrayList<Pair<Course, TimeSlot>> unWant,\n\t\t\tArrayList<Pair<Course, TimeSlot>> parts,\n\t\t\tArrayList<Triple<TimeSlot, Course, Integer>> pref,\n\t\t\tArrayList<Pair<Course, Course>> pair)\n\t\n\t{\n\t\tcourseSlots = cSlots;\n\t\tlabSlots = lSlots;\n\t\tnotCompatible = notCompat;\n\t\tunwanted = unWant;\n\t\tpartials = parts;\n\t\tpreferences = pref;\n\t\tpairs = pair;\n\t}",
"@Test\n void _correctThenCaseTest() {\n\n actionApply();\n\n for (ReceiverPair receiverPair : dependedReceiverPairs) {\n for (AssingablePair assingablePair : incompatibleAssignablePairs) {\n verify(model).arithm(receiverPair.getVariableDependentReceiver(), \"!=\", assingablePair.getIndexdependentAssignable());\n }\n }\n }",
"@Override\n\t\tpublic int compareTo(Pair o) {\n\t\t\tif (x == o.x) return y-o.y;\n\t\t\treturn o.x-x;\n\t\t}",
"public void compressPairsGreedy(final List<GPairRecord<S, S>> pairApperances, final List<GPairRecord<S, S>> crossingPairs, final int largestTerminal) {\n\n BitSet bitSet = new BitSet(largestTerminal);\n BitSet leftSigma = new BitSet(largestTerminal);\n BitSet rightSigma = new BitSet(largestTerminal);\n\n List<List<Pair<S, Long>>> right = new ArrayList<>(largestTerminal);\n List<List<Pair<S, Long>>> left = new ArrayList<>(largestTerminal);\n\n // initial tables left and right\n for(int i = 0; i < largestTerminal; i++) {\n right.add(new ArrayList<Pair<S, Long>>());\n left.add(new ArrayList<Pair<S, Long>>());\n }\n\n // fill tables with k_{ab} and k_{ba}\n for(GPairRecord<S, S> record : pairApperances) {\n right.get(record.pair.a.getId()).add(new Pair<S, Long>(record.pair.b, record.getAppearences()));\n left.get(record.pair.b.getId()).add(new Pair<S, Long>(record.pair.a, record.getAppearences()));\n }\n\n for(GPairRecord<S, S> record : crossingPairs) {\n bitSet.set(record.pair.a.getId());\n bitSet.set(record.pair.b.getId());\n }\n\n int[] countR = new int[largestTerminal];\n int[] countL = new int[largestTerminal];\n\n for(int a = 0; a < bitSet.size(); a++) {\n if(bitSet.get(a)) {\n int[] count = null;\n if(countR[a] >= countL[a]) {\n leftSigma.set(a);\n count = countL;\n }\n else {\n rightSigma.set(a);\n count = countR;\n }\n\n Iterator<Pair<S, Long>> rightIterator = right.get(a).iterator();\n while (rightIterator.hasNext()) {\n Pair<S, Long> entry = rightIterator.next();\n count[entry.a.getId()] += entry.b;\n rightIterator.remove();\n }\n\n Iterator<Pair<S, Long>> leftIterator = left.get(a).iterator();\n while (leftIterator.hasNext()) {\n Pair<S, Long> entry = leftIterator.next();\n count[entry.a.getId()] += entry.b;\n leftIterator.remove();\n }\n }\n }\n\n long sumL = 0;\n long sumR = 0;\n\n // Sum up appearances: O(|G|)\n for(GPairRecord<S, S> record : pairApperances) {\n Pair<S,S> pair = record.pair;\n if(leftSigma.get(pair.a.getId()) && rightSigma.get(pair.b.getId())) {\n sumL += record.getAppearences();\n }\n\n if(rightSigma.get(pair.a.getId()) && leftSigma.get(pair.b.getId())) {\n sumR += record.getAppearences();\n }\n }\n\n // swap\n if(sumL < sumR) {\n BitSet tmp = rightSigma;\n rightSigma = leftSigma;\n leftSigma = tmp;\n }\n\n Iterator<GPairRecord<S, S>> pairRecordIterator = crossingPairs.iterator();\n while (pairRecordIterator.hasNext()) {\n Pair<S, S> pair = pairRecordIterator.next().pair;\n if(!leftSigma.get(pair.a.getId()) || !rightSigma.get(pair.b.getId())) {\n pairRecordIterator.remove();\n }\n }\n final BitSet fixedRightSigma = rightSigma;\n final BitSet fixedLeftSigma = leftSigma;\n\n // remove pairs we don't wanna compress: O(|G|)\n final List<GPairRecord<S,S>> uncrossedPairs = crossingPairs.stream()\n .filter(rec -> !rec.isCrossingPair())\n .filter(rec -> wordProperties.isPairAt(rec.node, rec.pair))\n .filter(rec -> fixedLeftSigma.get(rec.pair.a.getId()) && fixedRightSigma.get(rec.pair.b.getId()))\n .collect(Collectors.toList());\n\n // gather the uncrossed ones: O(|G|)\n if(!uncrossedPairs.isEmpty()) {\n final List<GPairRecord<S,S>> trash = new LinkedList<>();\n final Function<Pair<S, S>, Consumer<GPairRecord<S, S>>> consumerFunction = p ->\n {\n if(fixedLeftSigma.get(p.a.getId()) && fixedRightSigma.get(p.b.getId())) {\n return uncrossedPairs::add;\n }\n else {\n return trash::add;\n }\n };\n\n BiFunction<S, Integer, Boolean> doGreedyLeftPop = (nonTerminal, j) -> doLeftPop(nonTerminal, head -> head.isTerminal() && fixedRightSigma.get(head.getId()));\n\n BiFunction<S, Integer, Boolean> doGreedyRightPop = (nonTerminal, j) -> doRightPop(nonTerminal, tail -> tail.isTerminal() && fixedLeftSigma.get(tail.getId()));\n\n //pop: O(n+m)\n pop(phase, nonTerminal -> doGreedyLeftPop.apply(nonTerminal, 0), nonTerminal -> doGreedyRightPop.apply(nonTerminal, 0), consumerFunction);\n\n // O(|G|)\n sortPairs(uncrossedPairs);\n\n // O(|G|)\n compressUncrossedPairs(uncrossedPairs);\n }\n }",
"protected static int[] composeRange(int... pairs) {\n if(pairs.length % 2 != 0)\n throw new IllegalArgumentException(\"Pairs has to be a multiple of 2!\");\n\n List<Integer> nums = new ArrayList<>();\n\n for(int start = 0, end = 1; end < pairs.length; start+=2, end+=2) {\n int[] semiRange = range(pairs[start], pairs[end]);\n for(Integer i : semiRange)\n nums.add(i); //potencjalna optymalizacja: dodac caly array do listy\n }\n\n //potencjalna optymalizacja: zwrocic bezposrednio z listy\n int[] finalRange = new int[nums.size()];\n for(int id = 0; id < nums.size(); id++)\n finalRange[id] = nums.get(id);\n\n return finalRange;\n }",
"@Override\n\tpublic int compareTo(MyPair arg0) {\n\t\tif(first.equals(arg0.first)){\n\t\t\treturn second.compareTo(arg0.second);\n\t\t}else{\n\t\t\treturn first.compareTo(arg0.first);\n\t\t}\n\t}",
"@Test\n void compareTo_Identical_AllParts()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, AnswerType.yes, AnswerType.yes, ContactMatchType.Identical);\n }",
"static int compar(int d1,int m1, int y1,int d2,int m2, int y2 )\n{\n if(y1>y2)\n return 1;\n if(y1<y2)\n return -1;\n \n if(m1>m2)\n return 1;\n if(m1<m2)\n return -1;\n \n if(d1>d2)\n return 1;\n if(d1<d2)\n return -1;\n \n \n \n return 0;\n \n \n}",
"public void createPairTable() {\r\n //create total Table\r\n pairTable = new HashMap<>();\r\n\r\n //fill with values \r\n Play[] cAce = {Play.NONE, P, P, P, P, P, P, P, P, P, P, P};\r\n Play[] cTen = {Play.NONE, S, S, S, S, S, S, S, S, S, S, S};\r\n Play[] cNine = {Play.NONE, S, P, P, P, P, P, S, P, P, S, S};\r\n Play[] cEight = {Play.NONE, P, P, P, P, P, P, P, P, P, P, P};\r\n Play[] cSeven = {Play.NONE, H, P, P, P, P, P, P, H, H, H, H};\r\n Play[] cSix = {Play.NONE, H, P, P, P, P, P, H, H, H, H, H};\r\n Play[] cFive = {Play.NONE, H, D, D, D, D, D, D, D, D, H, H};\r\n Play[] cFour = {Play.NONE, H, H, H, H, P, P, H, H, H, H, H};\r\n Play[] cThree = {Play.NONE, H, P, P, P, P, P, P, H, H, H, H};\r\n Play[] cTwo = {Play.NONE, H, P, P, P, P, P, P, H, H, H, H};\r\n\r\n pairTable.put(1, cAce);\r\n pairTable.put(2, cTwo);\r\n pairTable.put(3, cThree);\r\n pairTable.put(4, cFour);\r\n pairTable.put(5, cFive);\r\n pairTable.put(6, cSix);\r\n pairTable.put(7, cSeven);\r\n pairTable.put(8, cEight);\r\n pairTable.put(9, cNine);\r\n pairTable.put(10, cTen);\r\n pairTable.put(11, cAce);\r\n }",
"@Parameterized.Parameters(name = \"{0}\")\n public static Collection<Object[]> algoOptions() {\n CarFlagEncoder encoder = new CarFlagEncoder();\n GraphHopper hopper = new GraphHopperOSM();\n hopper.setDataReaderFile(\"../map-data/leipzig_germany.osm.pbf\");\n hopper.setGraphHopperLocation(\"../target/mapmatchingtest-ch\");\n hopper.setEncodingManager(new EncodingManager(encoder));\n hopper.getCHFactoryDecorator().setDisablingAllowed(true);\n hopper.importOrLoad();\n\n // force CH\n AlgorithmOptions chOpts = AlgorithmOptions.start()\n .maxVisitedNodes(1000)\n .hints(new PMap().put(Parameters.CH.DISABLE, false))\n .build();\n\n // flexible should fall back to defaults\n AlgorithmOptions flexibleOpts = AlgorithmOptions.start()\n // TODO: fewer nodes than for CH are possible (short routes & different finish condition & higher degree graph)\n // .maxVisitedNodes(20)\n .build();\n\n return Arrays.asList(new Object[][]{\n {\"non-CH\", hopper, flexibleOpts},\n {\"CH\", hopper, chOpts}\n });\n }",
"@Test\n public void testFindOrientedPairs() {\n System.out.println(\"findOrientedPairs\");\n \n CCGeneticDrift instance = new CCGeneticDrift();\n String input = \"6 3 1 6 5 -2 4\";\n List<Integer> numbers = instance.inputStringToIntegerList(input);\n String expResult = \"[1 -2, 3 -2]\";\n List result = instance.findOrientedPairs(numbers);\n assertEquals(result.toString(), expResult);\n assertEquals(result.size(), 2);\n }",
"@Test\n public void generate_correctOrderOfPrecedenceWithParentheses() throws Exception {\n ConditionGenerator conditionGenerator = initGenerator(PREFIX_TAG_TOKEN, STRING_ONE_TOKEN, OR_TOKEN,\n LEFT_PAREN_TOKEN, PREFIX_TAG_TOKEN, STRING_TWO_TOKEN, AND_TOKEN, PREFIX_TAG_TOKEN, STRING_THREE_TOKEN,\n RIGHT_PAREN_TOKEN, EOF_TOKEN);\n Predicate<Coin> condition = conditionGenerator.generate();\n\n assertFalse(condition.test(COIN_0));\n assertFalse(condition.test(COIN_1));\n assertFalse(condition.test(COIN_2));\n assertTrue(condition.test(COIN_3));\n assertTrue(condition.test(COIN_4));\n assertTrue(condition.test(COIN_5));\n assertTrue(condition.test(COIN_6));\n assertTrue(condition.test(COIN_7));\n }",
"public boolean isTwoPairs(){\n \r\n List<PokerCard> pair1;\r\n List<PokerCard> pair2;\r\n \r\n //First possibility: first four cards are two pairs\r\n pair1 = cards.subList(0, 2);\r\n pair2 = cards.subList(2, 4);\r\n if(haveSameValue(pair1) && haveSameValue(pair2)){\r\n handValue = pair2.get(0).getValue();\r\n lowerPairValue = pair1.get(0).getValue();\r\n remainingCardValue = cards.get(cards.size()-1).getValue();\r\n return true;\r\n }\r\n \r\n //Second possibility: First two and last two cards are pairs\r\n pair1 = cards.subList(0, 2);\r\n pair2 = cards.subList(3, 5);\r\n if(haveSameValue(pair1) && haveSameValue(pair2)){\r\n handValue = pair2.get(0).getValue();\r\n lowerPairValue = pair1.get(0).getValue();\r\n remainingCardValue = cards.get(2).getValue();\r\n return true;\r\n }\r\n \r\n //Third possibility: Last four cards are two pairs\r\n pair1 = cards.subList(1, 3);\r\n pair2 = cards.subList(3, 5);\r\n if(haveSameValue(pair1) && haveSameValue(pair2)){\r\n handValue = pair2.get(0).getValue();\r\n lowerPairValue = pair1.get(0).getValue();\r\n remainingCardValue = cards.get(0).getValue();\r\n return true;\r\n }\r\n return false;\r\n }",
"private void fromPairs(final Object[] pairs) throws IllegalArgumentException {\n if ((pairs.length & 1) != 0) {\n throw new IllegalArgumentException(\n Errors.format(ErrorKeys.ODD_ARRAY_LENGTH_$1, pairs.length));\n }\n for (int i=0; i<pairs.length; i += 2) {\n super.put(pairs[i], pairs[i+1]);\n }\n }",
"@Override\r\n\t\tpublic boolean equalsWithOrder(\r\n\t\t\t\tPair<? extends T, ? extends S> anotherPair) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.equalsWithOrder(anotherPair);\r\n\t\t\t}\r\n\t\t}",
"private ArrayList<Location> getValidWithProbability(ArrayList<Map.Entry<Location, Integer>> validPair) {\n ArrayList<Location> valid = new ArrayList<>();\n if (isProbabilityEnabled) {\n validPair.sort(Map.Entry.comparingByValue());\n for (int i = validPair.size() - 1; i >= 0; i--) {\n valid.add(validPair.get(i).getKey());\n }\n } else {\n for (int i = 0; i < validPair.size(); i++) {\n valid.add(validPair.get(i).getKey());\n }\n }\n return valid;\n }",
"private static void computeKeyPairs() throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {\r\n\r\n\t\tfinal KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"EC\");\r\n\t\tkeyPairGenerator.initialize(new ECGenParameterSpec(\"secp256r1\"), SecureRandom.getInstanceStrong());\r\n\t\tkeyPairAlice = keyPairGenerator.generateKeyPair();\r\n\t\tkeyPairBob = keyPairGenerator.generateKeyPair();\r\n\t}",
"private void generate_pairs(ArrayList<Point> pointSet) {\n\t\tfor (int i = 0; i < pointSet.size(); i++) {\n\t\t\tfor (int j = i + 1; j < pointSet.size(); j++) {\n\n\t\t\t\tPair new_pair;\n\t\t\t\ttry {\n\t\t\t\t\tnew_pair = new Pair(pointSet.get(i), pointSet.get(j));\n\t\t\t\t\tunmarked_pairs.add(new_pair);\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// Dimensions don't match exception\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"public void testComparisons() {\n\tfinal double small = Math.pow(2.0, -42);\n\n\t// Input: a, b\n\tdouble[][] input = new double[][] { new double[] { 1, 1 },\n\t\tnew double[] { 1, 2 }, new double[] { 1, 1 - small / 10 },\n\t\tnew double[] { 1, 1 + small / 10 },\n\n\t\tnew double[] { 0, 1 }, new double[] { 0, 0 },\n\t\tnew double[] { 0, -1 }, new double[] { 0, small / 100 },\n\t\tnew double[] { 2100000001.0001, 2100000001.0003 }, };\n\n\t// Output: less, equals\n\tboolean[][] output = new boolean[][] { new boolean[] { false, true },\n\t\tnew boolean[] { true, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, true },\n\n\t\tnew boolean[] { true, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, false }, new boolean[] { false, true },\n\t\tnew boolean[] { false, true }, };\n\n\tfor (int i = 0; i < input.length; ++i) {\n\t boolean l = StandardFloatingPointComparator.getDouble().less(\n\t\t input[i][0], input[i][1]);\n\t boolean e = StandardFloatingPointComparator.getDouble().equals(\n\t\t input[i][0], input[i][1]);\n\n\t boolean ne = StandardFloatingPointComparator.getDouble().notEquals(\n\t\t input[i][0], input[i][1]);\n\t boolean le = StandardFloatingPointComparator.getDouble()\n\t\t .lessOrEquals(input[i][0], input[i][1]);\n\t boolean g = StandardFloatingPointComparator.getDouble().greater(\n\t\t input[i][0], input[i][1]);\n\t boolean ge = StandardFloatingPointComparator.getDouble()\n\t\t .greaterOrEquals(input[i][0], input[i][1]);\n\n\t boolean less = output[i][0];\n\t boolean equals = output[i][1];\n\n\t boolean notEquals = !equals;\n\t boolean lessOrEquals = less || equals;\n\t boolean greater = !lessOrEquals;\n\t boolean greaterOrEquals = !less;\n\n\t assertFalse(l != less);\n\t assertFalse(g != greater);\n\t assertFalse(e != equals);\n\t assertFalse(ne != notEquals);\n\t assertFalse(le != lessOrEquals);\n\t assertFalse(ge != greaterOrEquals);\n\t}\n }",
"public boolean compareTo(\n String tokens_[],\n String labels_[],\n String types_[],\n String constrType_[],\n String dependId_[],\n int connectQty_[],\n int componentId_[]) throws Exception {\n int N = tokens_.length;\n \n ArrayList<String> tokens = new ArrayList<String>();\n ArrayList<String> labels = new ArrayList<String>(); \n ArrayList<FieldType> types = new ArrayList<FieldType>();\n ArrayList<ArrayList<ConstraintType>> constrType \n = new ArrayList<ArrayList<ConstraintType>>();\n ArrayList<ArrayList<Integer>> dependId\n = new ArrayList<ArrayList<Integer>>();\n ArrayList<Integer> connectQty = new ArrayList<Integer>();\n ArrayList<Integer> componentId = new ArrayList<Integer>();\n \n if (labels_.length != N) throw new Exception(\n String.format(\"labels len (%d) != tokens len (%d), args))\", \n N, labels_.length));\n if (types_.length != N) throw new Exception(\n String.format(\"labels len (%d) != types len (%d), args))\", \n N, types_.length));\n if (constrType_.length != N) throw new Exception(\n String.format(\"labels len (%d) != constrType len (%d), args))\", \n N, constrType_.length));\n if (dependId_.length != N) throw new Exception(\n String.format(\"dependId len (%d) != dependId len (%d), args))\", \n N, dependId_.length));\n if (connectQty_.length != N) throw new Exception(\n String.format(\"labels len (%d) != connectQty len (%d), args))\", \n N, connectQty_.length));\n if (componentId_.length != N) throw new Exception(\n String.format(\"labels len (%d) != componentId len (%d), args))\", \n N, componentId_.length)); \n \n for (int i = 0; i < N; ++i) {\n tokens.add(tokens_[i]);\n labels.add(labels_[i]);\n types.add(FieldType.valueOf(types_[i]));\n ArrayList<ConstraintType> ct = new ArrayList<ConstraintType>();\n for (String t:constrType_[i].split(\"[,]\")) \n if (!t.isEmpty()) { \n // \"\".split(\",\") returns [\"\"] \n try {\n ct.add(ConstraintType.valueOf(t));\n } catch (java.lang.IllegalArgumentException e) {\n throw new Exception(\"Failed to parse the constraint value: '\" + t + \"'\");\n }\n }\n constrType.add(ct);\n ArrayList<Integer> it = new ArrayList<Integer>();\n for (String t:dependId_[i].split(\"[,]\")) \n if (!t.isEmpty()) { \n // \"\".split(\",\") returns [\"\"] \n try {\n it.add(Integer.valueOf(t));\n } catch (java.lang.IllegalArgumentException e) {\n throw new Exception(\"Failed to parse the dependent id value: '\" + t + \"'\");\n }\n }\n dependId.add(it);\n connectQty.add(connectQty_[i]);\n }\n \n boolean bTokens = DeepEquals.deepEquals(mTokens, tokens);\n boolean bLabels = DeepEquals.deepEquals(mLabels, labels);\n boolean bTypes = DeepEquals.deepEquals(mTypes, types);\n boolean bConstrType = DeepEquals.deepEquals(mConstrType, constrType);\n boolean bDependId = DeepEquals.deepEquals(mDependId, dependId);\n boolean bConnectQty = DeepEquals.deepEquals(mConnectQty, connectQty);\n boolean bComponentId= DeepEquals.deepEquals(mComponentId, componentId);\n boolean bFinal = bTokens && bLabels && bTypes && \n bConstrType && bDependId && bConnectQty;\n if (!bFinal) {\n System.out.println(String.format(\"Comparison failed: \\n\" +\n \" Tokens : %b \\n\" +\n \" Labels : %b \\n\" + \n \" Types : %b \\n\" + \n \" ConstrType : %b \\n\" + \n \" DependId : %b \\n\" + \n \" ConnectQty : %b \\n\" +\n \" ComponentId : %b \\n\",\n bTokens, bLabels, bTypes, bConstrType, bDependId, \n bConnectQty, bComponentId\n ));\n }\n \n return bFinal;\n }",
"@Override\n public int test(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 // In cases (4-6), the boundaries of A and B cross (i.e. the boundary\n // of A intersects the interior and exterior of B and vice versa).\n // Thus we want to distinguish cases (1), (2-3), and (4-6).\n //\n // Note that the vertices may satisfy more than one of the edge\n // orderings above if two or more vertices are the same. The tests\n // below are written so that we take the most favorable\n // interpretation, i.e. preferring (1) over (2-3) over (4-6). In\n // particular note that if orderedCCW(a,b,c,o) returns true, it may be\n // possible that orderedCCW(c,b,a,o) is also true (if a == b or b == c).\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 1; // Case 1 (A contains B)\n }\n\n // We are in case 5 or 6, or case 2 if a2 == b2.\n return (a2.equalsPoint(b2)) ? 0 : -1; // Case 2 vs. 5,6.\n }\n // We are in case 2, 3, or 4.\n return orderedCCW(a0, b0, a2, ab1) ? 0 : -1; // Case 2,3 vs. 4.\n }",
"private void generatePointPairs() {\n\t\tfinal int mod = SIZE_OF_ORIGINAL_LIST * 8; \n\t\t\n\t\tif(DEBUG) System.out.println(\"----- Generating Point Pairs...\");\n\n\t\tint counter = 0;\n\t\tint j = 0;\n\t\t\n\t\tfor(int i = 0; i < myPoints.length; i++) {\n\t\t\t//while(j++ < myPoints.length) {\n\t\t\tfor( ; j < myPoints.length; j++) {\n\t\t\t\t// i and j are the same point, so ignore that pair.\n\t\t\t\tif(i != j) {\n\t\t\t\t\tmyPairs.add(new PointPair(myPoints[i], myPoints[j]));\n\t\t\t\t\tif(DEBUG && ++counter % mod == 0) System.out.print(\"pair \");\n\t\t\t\t}\n\t\t\t\t// Not yet colinear, just a unique pair to use later.\n\t\t\t}\n\n\t\t}\n\t\tif(DEBUG) System.out.println(\"\\n----- ----- \" + counter + \" pairs found.\\n\");\n\t}",
"public ComparisonObject getComparisonObject(String [] s1);",
"private List<Comparison> doCompare(VM vm, Row row, String vmType) {\r\n List<Comparison> results = new ArrayList<Comparison>();\r\n\r\n for (String param : ReadFile.parametersToCompare.stringPropertyNames()) {\r\n\r\n if (paramIndexes.get(param) != null) {\r\n String resValue = getCellValue(row.getCell(paramIndexes.get(param)));\r\n\r\n if (resValue != null && datastoreUsageValues.get(param) != null) {\r\n resValue = datastoreUsageValues.get(param);\r\n if (\"Backuptool\".equals(param) && \"vm5\".equals(vm.getVm_name())) {\r\n resValue = datastoreUsageValues.get(\"NFSBackup\");\r\n }\r\n }\r\n\r\n if (resValue == null) {\r\n continue;\r\n }\r\n String vConfValue = getVConfValue(param, vm, ReadFile.parametersToCompare.getProperty(param));\r\n Comparison comparison = new Comparison();\r\n comparison.setAttribute(param);\r\n if (\"Datastore\".equals(param)) {\r\n matchStringValues(vConfValue, resValue, comparison);\r\n comparison.setComment(\"vConf value: \" + vConfValue + \", Resource sheet value: \" + resValue);\r\n } else if (\"Ext rep\".equals(param) && !openStack && !is3XL) {\r\n if (vmType.contains(\"Small\") || vmType.contains(\"Mainstream\")) {\r\n resValue = Double.toString(Double.parseDouble(resValue) / 2);\r\n } else {\r\n resValue = Double.toString(Double.parseDouble(resValue) / 4);\r\n }\r\n matchValues(vConfValue, resValue, comparison, param);\r\n comparison.setComment(\"vConf value: \" + vConfValue + \" MB, Resource sheet value: \" + resValue + \" GB\");\r\n } else if (\"vCPU\".equals(param)) {\r\n matchValues(vConfValue, resValue, comparison, param);\r\n comparison.setComment(\"vConf value: \" + vConfValue + \" GB, Resource sheet value: \" + resValue + \" GB\");\r\n } else {\r\n matchValues(vConfValue, resValue, comparison, param);\r\n comparison.setComment(\"vConf value: \" + vConfValue + \" MB, Resource sheet value: \" + resValue + \" GB\");\r\n }\r\n results.add(comparison);\r\n }\r\n }\r\n\r\n return results;\r\n }",
"@Test\n public void testHashCodeAndEquals() {\n Set<Pair<String, String>> pairs = IntStream.rangeClosed(1, 10).mapToObj( i->Pair.of(\"l\"+i, \"r\"+i)).collect( toSet() );\n assertEquals( 10, pairs.size() );\n assertTrue( pairs.contains(Pair.of(\"l1\", \"r1\")));\n assertFalse( pairs.contains(Pair.of(\"l100\", \"r100\")));\n }",
"public void testCompare5() throws Exception {\r\n // smaller prizes\r\n ComponentCompetitionSituation situation1 = new ComponentCompetitionSituation();\r\n situation1.setPostingDate(new Date());\r\n situation1.setEndDate(new Date(situation1.getPostingDate().getTime() + 100000));\r\n situation1.setPrize(100D);\r\n\r\n // longer prizes\r\n ComponentCompetitionSituation situation2 = new ComponentCompetitionSituation();\r\n situation2.setPostingDate(new Date());\r\n situation2.setEndDate(new Date(situation2.getPostingDate().getTime() + 100000));\r\n situation2.setPrize(200D);\r\n\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation1, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation2, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // smaller prizes < longer prizes\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }",
"@SuppressWarnings(\"unused\")\n private Object[] parametersTestHasEnough() {\n return new Object[] { \n new Object[] { new Ingredient(\"have\", 100, \"tbsp.\"), new Ingredient(\"needed\", 1, \"cup\"), true}, \n new Object[] { new Ingredient(\"have\", 5, \"\"), new Ingredient(\"needed\", 10, \"tsp\"), false}, \n new Object[] { new Ingredient(\"have\", 3, \"cups.\"), new Ingredient(\"needed\", 1, \"gallon\"), false},\n new Object[] { new Ingredient(\"have\", 3, \"ounces.\"), new Ingredient(\"needed\", 1, \"gallon\"), false},\n new Object[] { new Ingredient(\"have\", 100, \"tbsp.\"), new Ingredient(\"needed\", 100, \"tbsp\"), true},\n new Object[] { new Ingredient(\"have\", 100, \"\"), new Ingredient(\"needed\", 100, \"tbsp\"), true},\n new Object[] { new Ingredient(\"have\", 100, \"oz\"), new Ingredient(\"needed\", 50, null), true},\n new Object[] { new Ingredient(\"have\", 3, \"ct.\"), new Ingredient(\"needed\", 2, \"fake\"), true},\n new Object[] { new Ingredient(\"have\", 3, \"ct.\"), null, true},\n };\n }",
"private List<GPairRecord<S,S>> getCrossingPairs(final Predicate<Pair<S, S>> predicate) {\n\n // get first and last terminal for each non-terminal\n Pair<S, S>[] pairs = getFirstLastMappingArray();\n\n // list of records of crossing pairs\n List<GPairRecord<S,S>> recordList = new ArrayList<>();\n\n // scan for crossing pairs in the right order\n slp.getOrderedProductions().stream().map(p -> p.getLeft()).forEach(nonTerminal -> consumeCrossingPairs(nonTerminal, recordList::add, pairs, predicate));\n return recordList;\n }",
"public boolean makePair(int [] a, int [] b, int k) {\n\t\t\n\t\tif(a==null||b==null||a.length==0||b.length==0) return true;\n\t\t\n\t\tfor(int i=0; i<a.length; i++) {\n\t\t\ta[i] = k-a[i];\t\n\t\t}\n\t\tArrays.sort(a);\n\t\tArrays.sort(b);\n\t\tboolean res = true;\n\t\t\n\t\t//add optimization\n\t\tif(a[a.length-1]<=b[0]) return res;\n\t\t\n\t\tfor(int j=0; j<a.length; j++) {\n\t\t\tif(a[j]>b[j]) {\n\t\t\t\tres = false;\n\t\t\t\tbreak; \n\t\t\t}\n\t\t}\n\t\treturn(res);\n\n\t}",
"@SuppressWarnings(\"UnusedDeclaration\")\npublic interface LObjBoolPair<T> extends LTuple<Object> \n {\n\n int SIZE = 2;\n\n\n T first();\n\n default T value() {\n return first();\n }\n\n boolean second();\n\n\n\n @Override default Object get(int index) {\n switch(index) {\n case 1: return first();\n case 2: return second();\n default: throw new NoSuchElementException();\n }\n }\n\n\n /** Tuple size */\n @Override default int tupleSize() {\n return SIZE;\n }\n\n \n\n /** Static hashCode() implementation method that takes same arguments as fields of the LObjBoolPair and calculates hash from it. */\n static <T> int argHashCode(T a1,boolean a2) {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((a1 == null) ? 0 : a1.hashCode());\n result = prime * result + Boolean.hashCode(a2);\n return result;\n }\n\n /** Static equals() implementation that takes same arguments (doubled) as fields of the LObjBoolPair and checks if all values are equal. */\n static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) {\n return\n Null.equals(a1, b1) && //\n a2==b2; //\n }\n\n /**\n * Static equals() implementation that takes two tuples and checks if they are equal.\n * Tuples are considered equal if are implementing LObjBoolPair interface (among others) and their LObjBoolPair values are equal regardless of the implementing class\n * and how many more values there are.\n */\n static boolean argEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }\n\n /**\n * Static equals() implementation that takes two tuples and checks if they are equal.\n */\n public static boolean tupleEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return one.tupleSize() == other.tupleSize() &&\n argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }\n\n\n\n \n @Override default Iterator<Object> iterator() {\n return new Iterator<Object>() {\n\n private int index;\n\n @Override public boolean hasNext() {\n return index<SIZE;\n }\n\n @Override public Object next() {\n index++;\n return get(index);\n }\n };\n }\n\n interface ComparableObjBoolPair<T extends Comparable<? super T>> extends LObjBoolPair<T>, Comparable<LObjBoolPair<T>> {\n @Override\n default int compareTo(LObjBoolPair<T> that) {\n return Null.compare(this, that, (one, two) -> {\n int retval = 0;\n\n return\n (retval = Null.compare(one.first(), two.first())) != 0 ? retval : //\n (retval = Boolean.compare(one.second(), two.second())) != 0 ? retval : 0; //\n });\n }\n\n }\n \n\n abstract class AbstractObjBoolPair<T> implements LObjBoolPair<T> {\n\n @Override\n public boolean equals(Object that) {\n return LObjBoolPair.tupleEquals(this, that);\n }\n\n @Override\n public int hashCode() {\n return LObjBoolPair.argHashCode(first(),second());\n }\n\n @Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append('(');\n sb.append(first());\n sb.append(',');\n sb.append(second());\n sb.append(')');\n return sb.toString();\n }\n\n }\n\n\n\n\n\n /**\n * Mutable tuple.\n */\n\n interface Mut<T,SELF extends Mut<T,SELF>> extends LObjBoolPair<T> {\n\n\n\n SELF first(T first) ; \n SELF second(boolean second) ; \n\n default SELF setFirst(T first) {\n this.first(first);\n return (SELF) this;\n }\n\n\n /** Sets value if predicate(current) is true */\n default SELF setFirstIf(T first, LPredicate<T> predicate) {\n if (predicate.test(this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(newValue, current) is true. */\n default SELF setFirstIf(T first, LBiPredicate<T,T> predicate) {\n if (predicate.test(first, this.first())) {\n return this.first(first);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(current, newValue) is true. */\n default SELF setFirstIf(LBiPredicate<T,T> predicate, T first) {\n if (predicate.test(this.first(), first)) {\n return this.first(first);\n }\n return (SELF) this;\n }\n \n\n\n default SELF setSecond(boolean second) {\n this.second(second);\n return (SELF) this;\n }\n\n\n /** Sets value if predicate(current) is true */\n default SELF setSecondIf(boolean second, LLogicalOperator predicate) {\n if (predicate.apply(this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(newValue, current) is true. */\n default SELF setSecondIf(boolean second, LLogicalBinaryOperator predicate) {\n if (predicate.apply(second, this.second())) {\n return this.second(second);\n }\n return (SELF) this;\n }\n\n /** Sets new value if predicate predicate(current, newValue) is true. */\n default SELF setSecondIf(LLogicalBinaryOperator predicate, boolean second) {\n if (predicate.apply(this.second(), second)) {\n return this.second(second);\n }\n return (SELF) this;\n }\n \n\n\n default SELF reset() {\n this.first(null);\n this.second(false);\n return (SELF) this;\n }\n }\n\n\n\n\n\n\n public static <T> MutObjBoolPair<T> of() { \n return of( null , false );\n }\n \n\n public static <T> MutObjBoolPair<T> of(T a1,boolean a2){\n return new MutObjBoolPair(a1,a2);\n }\n\n public static <T> MutObjBoolPair<T> copyOf(LObjBoolPair<T> tuple) {\n return of(tuple.first(), tuple.second());\n }\n\n\n /**\n * Mutable, non-comparable tuple.\n */\n\n class MutObjBoolPair<T> extends AbstractObjBoolPair<T> implements Mut<T,MutObjBoolPair<T>> {\n\n private T first;\n private boolean second;\n\n public MutObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override MutObjBoolPair<T> first(T first) {\n this.first = first;\n return this;\n }\n \n public @Override boolean second() {\n return second;\n }\n\n public @Override MutObjBoolPair<T> second(boolean second) {\n this.second = second;\n return this;\n }\n \n\n\n\n\n\n\n\n\n\n\n\n\n }\n\n\n\n\n\n\n public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableOf() { \n return comparableOf( null , false );\n }\n \n\n public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableOf(T a1,boolean a2){\n return new MutCompObjBoolPair(a1,a2);\n }\n\n public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableCopyOf(LObjBoolPair<T> tuple) {\n return comparableOf(tuple.first(), tuple.second());\n }\n\n\n /**\n * Mutable, comparable tuple.\n */\n\n final class MutCompObjBoolPair<T extends Comparable<? super T>> extends AbstractObjBoolPair<T> implements ComparableObjBoolPair<T>,Mut<T,MutCompObjBoolPair<T>> {\n\n private T first;\n private boolean second;\n\n public MutCompObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override MutCompObjBoolPair<T> first(T first) {\n this.first = first;\n return this;\n }\n \n public @Override boolean second() {\n return second;\n }\n\n public @Override MutCompObjBoolPair<T> second(boolean second) {\n this.second = second;\n return this;\n }\n \n\n\n\n\n\n\n\n\n\n\n\n\n }\n\n\n\n\n\n\n\n public static <T> ImmObjBoolPair<T> immutableOf(T a1,boolean a2){\n return new ImmObjBoolPair(a1,a2);\n }\n\n public static <T> ImmObjBoolPair<T> immutableCopyOf(LObjBoolPair<T> tuple) {\n return immutableOf(tuple.first(), tuple.second());\n }\n\n\n /**\n * Immutable, non-comparable tuple.\n */\n@Immutable\n final class ImmObjBoolPair<T> extends AbstractObjBoolPair<T> {\n\n private final T first;\n private final boolean second;\n\n public ImmObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override boolean second() {\n return second;\n }\n\n\n\n }\n\n\n\n\n\n\n\n public static <T extends Comparable<? super T>> ImmCompObjBoolPair<T> immutableComparableOf(T a1,boolean a2){\n return new ImmCompObjBoolPair(a1,a2);\n }\n\n public static <T extends Comparable<? super T>> ImmCompObjBoolPair<T> immutableComparableCopyOf(LObjBoolPair<T> tuple) {\n return immutableComparableOf(tuple.first(), tuple.second());\n }\n\n\n /**\n * Immutable, comparable tuple.\n */\n@Immutable\n final class ImmCompObjBoolPair<T extends Comparable<? super T>> extends AbstractObjBoolPair<T> implements ComparableObjBoolPair<T> {\n\n private final T first;\n private final boolean second;\n\n public ImmCompObjBoolPair(T a1,boolean a2){\n this.first = a1;\n this.second = a2;\n }\n\n\n public @Override T first() {\n return first;\n }\n\n public @Override boolean second() {\n return second;\n }\n\n\n\n }\n\n\n\n}",
"void compareSearch();",
"@Test\r\n\tpublic void shouldReturn2PairsWhen000() {\n\t\tA = new ArrayList<Integer>(Arrays.asList(0, 0, 0));\r\n\t\tassertEquals(2, Coins.countPairs(A));\r\n\t}",
"public Collection<MatchingPair> matchingPairs(Collection<Integer> values, Integer targetSum)\n {\n HashMap<Integer, Integer> tableCompteur = new HashMap<>();\n LinkedHashMap<Integer, Integer> tablePaire = new LinkedHashMap<Integer, Integer>();\n Collection<MatchingPair> paireSansDuplication = new LinkedList();\n Collection<MatchingPair> solution = new LinkedList();\n\n // On itere sur les valeurs donnee pour savoir le compte de chaque valeur\n for (Integer valeur : values)\n {\n if (tableCompteur.containsKey(valeur))\n {\n // Partie Compteur\n Integer compteur = tableCompteur.get(valeur);\n compteur++;\n tableCompteur.put(valeur, compteur);\n }\n else {\n tableCompteur.put(valeur, 0);\n }\n\n }\n\n // On itere sur les valeurs donnee pour savoir les paires\n for (Integer element : values)\n {\n int temp = targetSum - element;\n if (tablePaire.containsKey(element))\n {\n if (tablePaire.get(element) != null)\n {\n paireSansDuplication.add(new MatchingPair(element, temp));\n }\n // si la table contient l'element on met nul pour ne pas avoir de repetition\n tablePaire.put(temp, null);\n }\n else if (!tablePaire.containsKey(element))\n {\n tablePaire.put(temp, element);\n }\n }\n\n // On trouve le minimum count entre les paire et leur compte pour tenir en compte de toutes les possibilites. Ici le meilleur cas reste O(n) ( pas de paire)\n for (MatchingPair paire : paireSansDuplication)\n {\n if (paire != null) { // verification au debug pr erreur nullpointer\n int a = tableCompteur.get(paire.first);\n int b = tableCompteur.get(paire.second);\n int minCount = Math.min(a+1, b+1);\n for (int i = 0; i < pow(minCount, 2); i++)\n {\n solution.add(new MatchingPair(paire.first, paire.second));\n }\n }\n }\n return solution;\n }",
"public LessThan() {\n this.toCompare = new double[2];\n this.index = 0;\n }",
"private void makeTrips() {\n int highestThree, firstKicker, secondKicker;\n highestThree = firstKicker = secondKicker = -1;\n for (Integer key : this.cardOccurrence.keySet()) {\n int value = this.cardOccurrence.get(key);\n if(value == 3 && value > highestThree)\n highestThree = key;\n else {\n if(key > firstKicker) {\n secondKicker = firstKicker;\n firstKicker = key;\n }\n else if(key > secondKicker)\n secondKicker = key;\n }\n }\n\n //Go through Cards ArrayList to get the actual cards pertaining\n ArrayList<String> validHand = new ArrayList<>();\n for(int i = 0; i < this.cards.size(); i++) {\n Card c = this.cards.get(i);\n if(c.sameValue(highestThree))\n validHand.add(c.toString());\n else if(c.sameValue(firstKicker) || c.sameValue(secondKicker))\n validHand.add(c.toString());\n }\n this.cardHand = new CardHand(validHand.toArray(new String[0]));\n }",
"private Pair p(int i, int j) {\n return new Pair(i, j);\n }",
"@SuppressWarnings(\"unchecked\")\n void initialize()\n {\n sampleNumbers = new Pair[5];\n sampleNumbers[0] = new Pair<Number>(\"0.0\", 0.0);\n sampleNumbers[1] = new Pair<Number>(\"12E-5\", Double.parseDouble(\"1.2E-4\"));\n sampleNumbers[2] = new Pair<Number>(\"912381238.0\", 912381238.0);\n sampleNumbers[3] =\n new Pair<Number>(\"-56.712E11\", Double.parseDouble(\"-56.712E11\"));\n sampleNumbers[4] = new Pair<Number>(\"-0.5\", -0.5);\n\n sampleStrings = new Pair[5];\n sampleStrings[0] = new Pair<String>(\"\\\"a,b,c,d\\\\\\\\\\\\\\\"\\\"\", \"a,b,c,d\\\\\\\"\");\n sampleStrings[1] = new Pair<String>(\"\\\"\\\\\\\"ABC\\\\\\\"\\\"\", \"\\\"ABC\\\"\");\n sampleStrings[2] =\n new Pair<String>(\"\\\"[]+=-!@#$%^&*(){]\\\"\", \"[]+=-!@#$%^&*(){]\");\n sampleStrings[3] = new Pair<String>(\"\\\"{::}:,\\t\\n\\\"\", \"{::}:,\\t\\n\");\n sampleStrings[4] =\n new Pair<String>(\"\\\"\\\\u00fb\\\\u00D8\\\\u006a\\\"\", \"\\u00FBØj\");\n\n specialValues = new Pair[2];\n specialValues[0] = new Pair<Object>(\"true\", true);\n specialValues[1] = new Pair<Object>(\"false\", false);\n // specialValues[2] = new Pair<Object>(\"null\", null);\n\n sampleArrays = new Pair[5];\n for (int i = 0; i < sampleArrays.length; i++)\n {\n sampleArrays[i] = new Pair<ArrayList<Object>>(\"[]\", new ArrayList<>());\n }\n\n sampleObjects = new Pair[5];\n for (int i = 0; i < sampleObjects.length; i++)\n {\n sampleObjects[i] =\n new Pair<HashMap<String, Object>>(\"{}\",\n new HashMap<String, Object>());\n }\n }",
"private static void linkComparisons() {\n\t\tif (state.currentConditionNode == null || state.currentRVIndex == -1) return;\n\t\t\n\t\tlinkComparisonNode(state.currentConditionNode.root);\n\t\tif (state.whereCondition != null)\n\t\t\tlinkComparisonNode(state.whereCondition);\n\t}",
"boolean isOnePair();",
"@Override\r\n public int compare(Pair<Integer, Double> o1, Pair<Integer, Double> o2) {\r\n return o2.getValue().compareTo(o1.getValue());\r\n }",
"@Test\n public void testCreateComparatorByName() {\n System.out.println(\"createComparatorByName\");\n // in decreasing order\n boolean increasing = false;\n BankAccount instance = new BankAccount(\"Kelly\", 99.99);\n BankAccount instance2 = new BankAccount(\"Nelly\", 199.99);\n int result = BankAccount.createComparatorByName(increasing).compare(instance, instance2);\n assertTrue(result > 0);\n int result2 = BankAccount.createComparatorByName(increasing).compare(instance2, instance);\n assertTrue(result2 < 0);\n // in increasing order\n increasing = true;\n int result3 = BankAccount.createComparatorByName(increasing).compare(instance2, instance);\n assertTrue(result3 > 0);\n }",
"private static boolean checkForCompareElement(MethodDeclaration user, MethodDeclaration recursive, Pair<ForStmt, ForStmt> pair) {\n return checkIsPresentForCompare(pair.getKey()) &&\n !compareConditionsElements(user, recursive, pair.getKey().getCompare().get().toString(), pair.getValue().getCompare().get().toString());\n }",
"@SuppressWarnings(\"deprecation\")\n\t@Test\n\tpublic void test_compareSharesToLibraries_categorize() throws ParseException {\n\t\t\n\t\tfinal String same_date = \"21 May 2015 02:37:23 GMT\";\n\t\t\n\t\t//Map<String, String>\n\t\tfinal Map<String, String> v1_side = ImmutableMap.<String, String>builder()\n\t\t\t\t\t\t\t\t\t\t.put(\"v1_not_v2_1\", new Date().toGMTString())\n\t\t\t\t\t\t\t\t\t\t.put(\"v1_not_v2_2\", new Date().toGMTString())\n\t\t\t\t\t\t\t\t\t\t.put(\"v1_not_v2_3\", \"\") //(ignored because null ie notApproved)\n\t\t\t\t\t\t\t\t\t\t.put(\"v1_and_v2_same_1\", same_date)\n\t\t\t\t\t\t\t\t\t\t.put(\"v1_and_v2_same_2\", same_date)\n\t\t\t\t\t\t\t\t\t\t.put(\"v1_and_v2_mod_1\", new Date().toGMTString())\n\t\t\t\t\t\t\t\t\t\t.put(\"v1_and_v2_mod_2\", new Date().toGMTString())\n\t\t\t\t\t\t\t\t\t\t.put(\"v1_and_v2_ignore\", \"\") //(ignored because null ie notApproved)\n\t\t\t\t\t\t\t\t\t\t.build();\n\n\t\tfinal Map<String, Date> v2_side = ImmutableMap.<String, Date>builder() \n\t\t\t\t\t\t\t\t\t\t.put(\"v2_not_v1_1\", new Date())\n\t\t\t\t\t\t\t\t\t\t.put(\"v2_not_v1_2\", new Date())\n\t\t\t\t\t\t\t\t\t\t.put(\"v1_and_v2_same_1\", IkanowV1SyncService_Buckets.parseJavaDate(same_date))\n\t\t\t\t\t\t\t\t\t\t.put(\"v1_and_v2_same_2\", IkanowV1SyncService_Buckets.parseJavaDate(same_date))\n\t\t\t\t\t\t\t\t\t\t.put(\"v1_and_v2_mod_1\", IkanowV1SyncService_Buckets.parseJavaDate(same_date))\n\t\t\t\t\t\t\t\t\t\t.put(\"v1_and_v2_mod_2\", IkanowV1SyncService_Buckets.parseJavaDate(same_date))\n\t\t\t\t\t\t\t\t\t\t.put(\"v1_and_v2_ignore\", IkanowV1SyncService_Buckets.parseJavaDate(same_date))\n\t\t\t\t\t\t\t\t\t\t.build();\n\t\t\n\t\tfinal Tuple3<Collection<String>, Collection<String>, Collection<String>> result = \n\t\t\t\tIkanowV1SyncService_LibraryJars.compareJarsToLibraryBeans_categorize(Tuples._2T(v1_side, v2_side));\n\t\t\n\t\tfinal List<String> expected_create = Arrays.asList(\"v1_not_v2_1\", \"v1_not_v2_2\"); \n\t\tfinal List<String> expected_delete = Arrays.asList(\"v2_not_v1_2\", \"v2_not_v1_1\");\n\t\tfinal List<String> expected_update = Arrays.asList(\"v1_and_v2_mod_2\", \"v1_and_v2_mod_1\"); // (order is wonky because hashset..)\n\t\t\n\t\tassertEquals(expected_create, Arrays.asList(result._1().toArray()));\n\t\tassertEquals(expected_delete, Arrays.asList(result._2().toArray()));\n\t\tassertEquals(expected_update, Arrays.asList(result._3().toArray()));\n\t}",
"private void initializeKeyPairs() \r\n \t //@ requires nonRepKeyPair |-> _ &*& authKeyPair |-> _ &*& basicKeyPair |-> _;\r\n \t /*@ ensures nonRepKeyPair |-> ?theNonRepKeyPair &*& theNonRepKeyPair != null &*&\r\n\t \t authKeyPair |-> ?theAuthKeyPair &*& theAuthKeyPair != null &*&\r\n\t \t basicKeyPair |-> ?theBasicKeyPair &*& theBasicKeyPair != null;\r\n\t @*/\r\n\t{\r\n\t\t/*\r\n\t\t * basicKeyPair is static (so same for all applets) so only allocate\r\n\t\t * memory once\r\n\t\t */\r\n\t\tif (EidCard.basicKeyPair != null && authKeyPair != null && nonRepKeyPair != null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tbasicKeyPair = new KeyPair(KeyPair.ALG_RSA_CRT, (short) 1024);\r\n\t\tbasicKeyPair.genKeyPair();\r\n\t\t\r\n\t\tauthKeyPair = new KeyPair(KeyPair.ALG_RSA_CRT, (short) (1024));\r\n\t\tauthKeyPair.genKeyPair();\r\n\t\t\r\n\t\t\r\n\t\r\n\t\t//authPrivateKey = (RSAPrivateCrtKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_CRT_PRIVATE, KeyBuilder.LENGTH_RSA_1024, false);\r\n\t\t\r\n\r\n\t\tnonRepKeyPair = new KeyPair(KeyPair.ALG_RSA_CRT, (short) (1024));\r\n\t\tnonRepKeyPair.genKeyPair();\r\n\t\r\n\t\t//nonRepPrivateKey = (RSAPrivateCrtKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_CRT_PRIVATE, KeyBuilder.LENGTH_RSA_1024, false);\r\n\t}",
"public int compareTo( Object obj ) {\n\n Combination other = (Combination) obj;\n\n int result;\n\n if ( first < other.first ) {\n result = -1;\n } else if ( first > other.first ) {\n result = 1;\n } else if ( second < other.second ) {\n result = -1;\n } else if ( second > other.second ) {\n result = 1;\n } else if ( third < other.third ) {\n result = -1;\n } else if ( third > other.third ) {\n result = 1;\n } else {\n result = 0;\n }\n\n return result;\n }",
"@Test\n public void testCreateComparatorByBalance() {\n System.out.println(\"createComparatorByName\");\n // in decreasing order\n boolean increasing = false;\n BankAccount instance = new BankAccount(\"Kelly\", 99.99);\n BankAccount instance2 = new BankAccount(\"Nelly\", 199.99);\n int result = BankAccount.createComparatorByBalance(increasing).compare(instance, instance2);\n assertTrue(result > 0);\n int result2 = BankAccount.createComparatorByBalance(increasing).compare(instance2, instance);\n assertTrue(result2 < 0);\n // in increasing order\n increasing = true;\n int result3 = BankAccount.createComparatorByBalance(increasing).compare(instance2, instance);\n assertTrue(result3 > 0);\n }",
"@Test\n public void testCompare() {\n AantalGastenComparator instance = new AantalGastenComparator();\n int expResult;\n int result;\n \n //test 1\n Accommodatie a1 = new Accommodatie(\"je moeder\", 30.00, 2, 1);\n Accommodatie a2 = new Accommodatie(\"je vader\", 40.00, 3, 1);\n expResult = -1;\n result = instance.compare(a1, a2);\n assertEquals(expResult, result);\n \n \n //test 2\n Accommodatie a3 = new Accommodatie(\"je moeder2\", 30.00, 2, 1);\n Accommodatie a4 = new Accommodatie(\"je vader2\", 40.00, 2, 1);\n expResult = 0;\n result = instance.compare(a3, a4);\n assertEquals(expResult, result);\n \n \n //test 3\n Accommodatie a5 = new Accommodatie(\"je moeder3\", 30.00, 3, 1);\n Accommodatie a6 = new Accommodatie(\"je vader3\", 40.00, 2, 1);\n expResult = 1;\n result = instance.compare(a5, a6);\n assertEquals(expResult, result);\n }",
"private List<GPairRecord<S, S>> getNonCrossingPairs(final Predicate<Pair<S, S>> predicate) {\n List<GPairRecord<S, S>> recordList = new ArrayList<>();\n slp.getOrderedProductions().stream().map(p -> p.getLeft()).forEach(nonTerminal -> consumeNonCrossingPairs(nonTerminal, recordList::add, predicate));\n return recordList;\n }",
"public Pair(Object i, Object j)\n {\n a = i;\n b = j;\n }",
"public static void compareCombos() {\n\t\tint currentTotal = 0;\n\t\tint pastTotal = 0;\n\n\t\tcost++;\n\t\tfor (int i = 0; i < numPeople; i++) {\n\t\t\tcurrentTotal += board[i][currentCombo[i]];\n\t\t\tpastTotal += board[i][bestCombo[i]];\n\t\t}\n\t\t\n\t\tif (currentTotal >= pastTotal) {\n\t\t\tbestTotal = 0;\n\t\t\tfor (int i = 0; i < numPeople; i++) {\n\t\t\t\tbestCombo[i] = currentCombo[i];\n\t\t\t\tbestTotal += board[i][currentCombo[i]];\n\t\t\t}\n\t\t}\n\n\t}",
"public void testAlgorithmSpecific() {\n TestData.chars(\"x y z\", \"xX Zz\")\n ._______Def_(\" - \", \" - - \")\n .____Ignore_(\" - \", \" -------- \")\n .all();\n }",
"static List<Integer> compareTriplets(List<Integer> a, List<Integer> b) {\r\n\t\tList<Integer> val = new ArrayList<>();\r\n\t\tint aScore = 0;\r\n\t\tint bScore = 0;\r\n\t\tfor (int i=0; i<3;i++) {\r\n\t\t\tfor (int j=0;j<3;j++) {\r\n\t\t\t\tif (i==j) {\r\n\t\t\t\t\tint tempA = a.get(i);\r\n\t\t\t\t\tint tempB = b.get(j);\r\n\t\t\t\t\tif (!(1<=tempA && tempA<=100 && 1<=tempB && 1<=tempB)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (tempA<tempB) {\r\n\t\t\t\t\t\tbScore += 1;\r\n\t\t\t\t\t} else if (tempA>tempB) {\r\n\t\t\t\t\t\taScore += 1;\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\t\r\n\t\tval.add(aScore);\r\n\t\tval.add(bScore);\r\n\t\treturn val;\r\n\t}",
"@Test\n public void testWithDeadlyParams() {\n HashSet<ComplexOomage> oomages = new HashSet<ComplexOomage>();\n int N = 10000;\n ArrayList<Integer> params;\n\n for (int oom = 0; oom < N; oom += 1) {\n params = new ArrayList<Integer>(N);\n for (int i = 0; i < 10; i += 1) {\n params.add(255);\n }\n oomages.add(new ComplexOomage(params));\n }\n assertTrue(haveNiceHashCodeSpread(oomages));\n }",
"@FunctionalInterface\npublic interface PairingFunction<X> extends Function<X, Pair<X, ? extends Comparable>> {\n Comparator<Pair<?, ? extends Comparable>> COMPARATOR = Comparator.comparing(Pair::getValue);\n\n Pair<X, ? extends Comparable> apply(X obj);\n}",
"@Override\r\n\t\tpublic int compare(Pair o1, Pair o2) {\r\n\t\t\treturn o2.val.compareTo(o1.val);\r\n\t\t}",
"public PairEvaluation() {\n\t\tplayer = new TestPlayer(\"Player\");\n\t\tsevenCardshand = new ArrayList<TestCard>(7);\n\t\ttest = new TestHandEvaluation(dealer, table);\n\t\ttest.setHand();\n\t}"
] |
[
"0.6405039",
"0.6405039",
"0.57683533",
"0.5653411",
"0.5609175",
"0.55377233",
"0.5515848",
"0.54006255",
"0.53595763",
"0.5359007",
"0.53428566",
"0.53268105",
"0.52876896",
"0.5268218",
"0.5254998",
"0.5251776",
"0.52376664",
"0.5217089",
"0.52018553",
"0.5174065",
"0.51718247",
"0.51636094",
"0.5086494",
"0.50859576",
"0.50812453",
"0.5062326",
"0.5054484",
"0.50448084",
"0.50431234",
"0.50384206",
"0.5026059",
"0.501683",
"0.5006071",
"0.49889478",
"0.49685928",
"0.49573737",
"0.4937657",
"0.49249256",
"0.49242187",
"0.49049994",
"0.4902431",
"0.48908997",
"0.48853964",
"0.48837847",
"0.48819613",
"0.4881591",
"0.48793876",
"0.48605812",
"0.4854814",
"0.48527178",
"0.48517403",
"0.48485914",
"0.48437336",
"0.48424506",
"0.48266742",
"0.48142582",
"0.48122513",
"0.48083985",
"0.48061013",
"0.4803961",
"0.4802255",
"0.47991496",
"0.47987",
"0.47905487",
"0.47873574",
"0.47803298",
"0.47801754",
"0.47693044",
"0.47657257",
"0.47639403",
"0.4763196",
"0.47540224",
"0.47496524",
"0.47495323",
"0.4746221",
"0.47419706",
"0.47291648",
"0.4724351",
"0.4720118",
"0.471801",
"0.4714776",
"0.47077873",
"0.4707127",
"0.47034487",
"0.4701089",
"0.4699838",
"0.4695908",
"0.469259",
"0.46913555",
"0.4687632",
"0.46874323",
"0.4685189",
"0.4683686",
"0.46832377",
"0.46809164",
"0.46691337",
"0.46614498",
"0.4658789",
"0.4658132",
"0.4654176",
"0.465257"
] |
0.0
|
-1
|
Processes LdVariant lists to produce pairs of LdVariants. All the pairs that are emitted here must be desired comparisons with no duplicates no additional filters are done other than (optionally) on the LD value itself.
|
@Override
public void processElement(ProcessContext c) {
List<LdVariant> queryList = null;
List<LdVariant> targetList = null;
int inputListCount = 0;
for (KV<Boolean, List<LdVariant>> vl : c.element().getValue()) {
if (vl.getKey()) {
queryList = vl.getValue();
} else {
targetList = vl.getValue();
}
inputListCount++;
}
if (inputListCount != 2 || queryList == null || targetList == null) {
throw new IllegalArgumentException("There should be exactly two lists.");
}
Iterator<LdVariant> targetIter = targetList.iterator();
// Our working set of variants from the target shard that could be within window of variants
// read in from the query shard.
LinkedList<LdVariant> storedTarget = new LinkedList<>();
for (LdVariant queryVar : queryList) {
// Fill in storedTarget until we are past window from queryVar.
while (targetIter.hasNext()
&& (storedTarget.isEmpty() || (queryVar.getInfo().getEnd() + window) > storedTarget
.getLast().getInfo().getStart())) {
storedTarget.add(targetIter.next());
}
ListIterator<LdVariant> storedTargetIter = storedTarget.listIterator(0);
while (storedTargetIter.hasNext()) {
LdVariant targetVar = storedTargetIter.next();
if (queryVar.getInfo().compareTo(targetVar.getInfo()) != -1) {
// Only do comparisons where query is before target. If query is past target then
// we are done with target. Note: targetVar > queryVar implies targetVar start >= queryVar
// start.
storedTargetIter.remove();
} else if (targetVar.getInfo().getStart() >= (queryVar.getInfo().getEnd() + window)) {
// If the next query starts more than window from when target starts, we are done
// with the rest of storedTarget for this query.
break;
} else {
// If target starts >= query starts and target starts < window from query end, then they
// must overlap.
c.output(KV.of(queryVar, targetVar));
}
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static Ld calculateLd(GeneticVariant variant1, GeneticVariant variant2) throws LdCalculatorException\n \t{\n \n \t\tif (variant1 == null)\n \t\t{\n \t\t\tthrow new IllegalArgumentException(\"Variant1 = null\");\n \t\t}\n \n \t\tif (variant2 == null)\n \t\t{\n \t\t\tthrow new IllegalArgumentException(\"Variant2 = null\");\n \t\t}\n \n \t\tif (variant1.getAlleleCount() != 2 || variant2.getAlleleCount() != 2)\n \t\t{\n \t\t\tthrow new UnsupportedOperationException(\"Ld calculator currently only supports biallelic variants\");\n \t\t}\n \n \t\tfinal byte[] variant1Genotypes = variant1.getSampleCalledDosages();\n \t\tfinal byte[] variant2Genotypes = variant2.getSampleCalledDosages();\n \n \t\tif (variant1Genotypes.length != variant2Genotypes.length)\n \t\t{\n \t\t\tthrow new LdCalculatorException(\"Error calculating LD: \" + variant1.getPrimaryVariantId() + \" contains \"\n \t\t\t\t\t+ variant1Genotypes.length + \" samples and \" + variant2.getPrimaryVariantId() + \" contains\"\n \t\t\t\t\t+ variant2Genotypes.length + \" samples. This should be identical\");\n \t\t}\n \n \t\t// matrix with all combinations between variant 1 genotypes and variant\n \t\t// 2 genotypes\n \t\tint[][] genotypes = new int[3][3];\n \n \t\tint calledGenoypes = 0;\n \n \t\tfor (int ind = 0; ind < variant1Genotypes.length; ++ind)\n \t\t{\n \t\t\tbyte genotypeVariant1 = variant1Genotypes[ind];\n \t\t\tbyte genotypeVariant2 = variant2Genotypes[ind];\n \t\t\tif (genotypeVariant1 != -1 && genotypeVariant2 != -1)\n \t\t\t{\n \t\t\t\tgenotypes[genotypeVariant1][genotypeVariant2]++;\n \t\t\t\t++calledGenoypes;\n \t\t\t}\n \t\t}\n \n \t\t// matrix with freq for all combined genotypes\n \t\tdouble[][] genotypesFreq = new double[3][3];\n \t\tfor (int x = 0; x < 3; x++)\n \t\t{\n \t\t\tfor (int y = 0; y < 3; y++)\n \t\t\t{\n \t\t\t\tgenotypesFreq[x][y] = (double) genotypes[x][y] / (double) calledGenoypes;\n \t\t\t}\n \t\t}\n \n \t\t// Determine allele freq of variants:\n \t\tdouble[][] alleleFreq = new double[2][2];\n \t\t// Variant 1:\n \t\talleleFreq[0][0] = (genotypesFreq[0][0] + genotypesFreq[0][1] + genotypesFreq[0][2])\n \t\t\t\t+ (genotypesFreq[1][0] + genotypesFreq[1][1] + genotypesFreq[1][2]) / 2d;\n \t\talleleFreq[0][1] = (genotypesFreq[2][0] + genotypesFreq[2][1] + genotypesFreq[2][2])\n \t\t\t\t+ (genotypesFreq[1][0] + genotypesFreq[1][1] + genotypesFreq[1][2]) / 2d;\n \t\t// Variant 2:\n \t\talleleFreq[1][0] = (genotypesFreq[0][0] + genotypesFreq[1][0] + genotypesFreq[2][0])\n \t\t\t\t+ (genotypesFreq[0][1] + genotypesFreq[1][1] + genotypesFreq[2][1]) / 2d;\n \t\talleleFreq[1][1] = (genotypesFreq[0][2] + genotypesFreq[1][2] + genotypesFreq[2][2])\n \t\t\t\t+ (genotypesFreq[0][1] + genotypesFreq[1][1] + genotypesFreq[2][1]) / 2d;\n \n \t\t// Precalculate triangles of non-double heterozygote:\n \t\tdouble[][] genotypesTriangleFreq = new double[3][3];\n \t\tgenotypesTriangleFreq[0][0] = 2d * genotypesFreq[0][0] + genotypesFreq[1][0] + genotypesFreq[0][1];\n \t\tgenotypesTriangleFreq[2][0] = 2d * genotypesFreq[2][0] + genotypesFreq[1][0] + genotypesFreq[2][1];\n \t\tgenotypesTriangleFreq[0][2] = 2d * genotypesFreq[0][2] + genotypesFreq[1][2] + genotypesFreq[0][1];\n \t\tgenotypesTriangleFreq[2][2] = 2d * genotypesFreq[2][2] + genotypesFreq[1][2] + genotypesFreq[2][1];\n \n \t\t// Calculate expected genotypes, assuming equilibrium, take this as\n \t\t// start:\n \t\tdouble h11 = alleleFreq[0][0] * alleleFreq[1][0];\n \t\tdouble h12 = alleleFreq[0][0] * alleleFreq[1][1];\n \t\tdouble h21 = alleleFreq[0][1] * alleleFreq[1][0];\n \t\tdouble h22 = alleleFreq[0][1] * alleleFreq[1][1];\n \n \t\t// Calculate the frequency of the two double heterozygotes:\n \t\tdouble x12y12 = (h11 * h22 / (h11 * h22 + h12 * h21)) * genotypesFreq[1][1];\n \t\tdouble x12y21 = (h12 * h21 / (h11 * h22 + h12 * h21)) * genotypesFreq[1][1];\n \n \t\t// Perform iterations using EM algorithm:\n \t\tfor (int itr = 0; itr < 25; itr++)\n \t\t{\n \n \t\t\th11 = (x12y12 + genotypesTriangleFreq[0][0]) / 2;\n \t\t\th12 = (x12y21 + genotypesTriangleFreq[0][2]) / 2;\n\t\t\th21 = (x12y21 + genotypesTriangleFreq[2][0]) / 2;\n \t\t\th22 = (x12y12 + genotypesTriangleFreq[2][2]) / 2;\n \n \t\t\tx12y12 = (h11 * h22 / (h11 * h22 + h12 * h21)) * genotypesFreq[1][1];\n \t\t\tx12y21 = (h12 * h21 / (h11 * h22 + h12 * h21)) * genotypesFreq[1][1];\n \n \t\t}\n \n \t\tdouble d = h11 - (alleleFreq[0][0] * alleleFreq[1][0]);\n \n \t\tdouble rSquared = d * d / (alleleFreq[0][0] * alleleFreq[0][1] * alleleFreq[1][0] * alleleFreq[1][1]);\n \n \t\tdouble dMax = 0;\n \t\tif (d < 0)\n \t\t{\n \t\t\tdouble a = alleleFreq[0][1] * alleleFreq[1][1];\n \t\t\tif (alleleFreq[0][0] > alleleFreq[1][0])\n \t\t\t{\n \t\t\t\ta = alleleFreq[0][0] * alleleFreq[1][0];\n \t\t\t}\n \t\t\tdouble b = alleleFreq[0][0] * alleleFreq[1][0];\n \t\t\tif (alleleFreq[0][0] > alleleFreq[1][0])\n \t\t\t{\n \t\t\t\tb = alleleFreq[0][1] * alleleFreq[1][1];\n \t\t\t}\n \t\t\tdMax = Math.min(a, b);\n \t\t}\n \t\telse\n \t\t{\n \t\t\tdouble a = alleleFreq[0][1] * alleleFreq[1][0];\n \t\t\tif (alleleFreq[0][0] > alleleFreq[1][0])\n \t\t\t{\n \t\t\t\ta = alleleFreq[0][0] * alleleFreq[1][1];\n \t\t\t}\n \t\t\tdouble b = alleleFreq[0][0] * alleleFreq[1][1];\n \t\t\tif (alleleFreq[0][0] > alleleFreq[1][0])\n \t\t\t{\n \t\t\t\tb = alleleFreq[0][1] * alleleFreq[1][0];\n \t\t\t}\n \t\t\tdMax = Math.min(a, b);\n \t\t}\n \t\tdouble dPrime = Math.abs(d / dMax);\n \n \t\t// sometimes dPrime slightly larger then 1. Fixing this:\n \t\tdPrime = Math.min(1, dPrime);\n \n \t\tString variant1Alt = variant1.getVariantAlleles().get(1).getAlleleAsString();\n \t\tString variant1Ref = variant1.getVariantAlleles().get(0).getAlleleAsString();\n \t\tString variant2Alt = variant2.getVariantAlleles().get(1).getAlleleAsString();\n \t\tString variant2Ref = variant2.getVariantAlleles().get(0).getAlleleAsString();\n \n \t\tLinkedHashMap<String, Double> haplotypesFreq = new LinkedHashMap<String, Double>(4);\n \t\thaplotypesFreq.put(variant1Alt + variant2Alt, h11);\n \t\thaplotypesFreq.put(variant1Alt + variant2Ref, h12);\n \t\thaplotypesFreq.put(variant1Ref + variant2Alt, h21);\n \t\thaplotypesFreq.put(variant1Ref + variant2Ref, h22);\n \n \t\treturn new Ld(variant1, variant2, rSquared, dPrime, haplotypesFreq);\n \n \t}",
"public static void main(String... args){\n\n List<List<Integer>> listN = new ArrayList<>();\n\n List<Integer> list1N = new ArrayList<>();\n list1N.add(1);\n list1N.add(2);\n list1N.add(3);\n\n\n List<Integer> list2N = new ArrayList<>();\n list2N.add(4);\n list2N.add(5);\n\n\n\n List<Integer> list3N = new ArrayList<>();\n list3N.add(5);\n list3N.add(6);\n\n\n List<Integer> list4N = new ArrayList<>();\n list4N.add(7);\n list4N.add(8);\n list4N.add(9);\n\n listN.add(list1N);\n listN.add(list2N);\n listN.add(list3N);\n listN.add(list4N);\n\n List<Integer> outputN = getMergedLLEfficient(listN);\n\n for(Integer elem : outputN)\n System.out.println(elem);\n }",
"private static void mergeLists() {\n\t\tint length = (photoList.size() / 2) - 1;\n\t\t\n\t\tif (photoList.size() % 2 == 0) {\n\t\t\tlength++;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tList<String> tL = new ArrayList<String>();\n\t\t\t\n\t\t\tPhoto p1 = photoList.get(i),\n\t\t\t\t p2 = photoList.get(photoList.size() - 1 - i);\n\t\t\t\n\t\t\tfor (String tag : p1.getTagList()) {\n\t\t\t\ttL.add(tag);\n\t\t\t}\n\t\t\t\n\t\t\tfor (String tag : p2.getTagList()) {\n\t\t\t\ttL.add(tag);\n\t\t\t}\n\t\t\t\n\t\t\tfor (int j = 0; j < tL.size() - 1; j++) {\n\t\t\t\tfor (int k = j; k < tL.size(); k++) {\n\t\t\t\t\tif (tL.get(j).equals(tL.get(k))) {\n\t\t\t\t\t\ttL.remove(k);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tslideList.add(new Slide(p1.getPhotoId(), p2.getPhotoId(), tL));\n\t\t}\n\t}",
"public static void verifyGptListEquals(ImList<GuideProbeTargets> lst1, ImList<GuideProbeTargets> lst2) {\n assertEquals(lst1.size(), lst2.size());\n for (int i=0; i<lst1.size(); ++i) verifyGptEquals(lst1.get(i), lst2.get(i));\n }",
"public void checkNLBJwithFilter() throws SQLException, InstantiationException, IllegalAccessException {\n\n //maps a candidate var to CTP matched values\n HashMap<String, List<String>> mapCandVarToMatchedVals = new HashMap<>();\n //maps a candidate var to all answer values\n HashMap<String, List<String>> mapCandVarToAllAnsMaps = new HashMap<>();\n List<String> allFilterVals = null;\n HashMap<List<String>, List<String>> newDTPtoALtenativeTotalAns = new HashMap<>();\n HashMap<List<String>, List<String>> newDTPtoALtenativeInverseMap = new HashMap<>();\n List<List<String>> allNewDTPShort = null;\n\n for (List<String> keyFilterVar : mapCTPtoFILTERwithBoundJ.keySet()) {\n\n allFilterVals = mapCTPtoFILTERwithBoundJ.get(keyFilterVar);\n\n //If there is only one FILTER value of BOUND JOIN, skip matching\n if (allFilterVals.size() == 1) {\n\n continue;\n }\n\n myDedUtils.searchMatchingVars(mapCandVarToAllAnsMaps, mapCandVarToMatchedVals, allFilterVals);\n allNewDTPShort = new LinkedList<>();\n List<String> matchingValues = new LinkedList<>();\n\n for (String matchVar : mapCandVarToMatchedVals.keySet()) {\n\n // Identify particular \"?o_#value\" variable indicating a NLFO\n if (!matchVar.contains(\"o_\") && mapCandVarToMatchedVals.get(matchVar).size() > 0) {\n\n for (List<String> keyDTP : mapDTPtoAnswTotal.keySet()) {\n\n if (keyDTP.get(1).equalsIgnoreCase(keyFilterVar.get(1))) {\n\n //Case \"?o_#value\" is in the subject of the triple pattern\n if (keyDTP.get(0).equalsIgnoreCase(keyFilterVar.get(0)) && keyDTP.get(0).equalsIgnoreCase(\"?o\") && !keyDTP.get(3).equalsIgnoreCase(\"?o\")) {\n\n List<String> newDTP = Arrays.asList(\"?\" + matchVar.substring(0, matchVar.indexOf(\"_\")), keyDTP.get(1), keyDTP.get(2));\n myDedUtils.setDTPbasicInfo(newDTP);\n allNewDTPShort.add(newDTP);\n newDTP = Arrays.asList(\"?\" + matchVar.substring(0, matchVar.indexOf(\"_\")), keyDTP.get(1), keyDTP.get(2), keyDTP.get(3));\n matchingValues.addAll(mapCandVarToMatchedVals.get(matchVar));\n newDTPtoALtenativeTotalAns.put(newDTP, keyDTP);\n\n } //Case \"?o_#value\" is in the object of the triple pattern\n else if (keyDTP.get(2).equalsIgnoreCase(keyFilterVar.get(2)) && keyDTP.get(2).equalsIgnoreCase(\"?o\") && !keyDTP.get(3).equalsIgnoreCase(\"?o\")) {\n\n List<String> newDTP = Arrays.asList(keyDTP.get(0), keyDTP.get(1), \"?\" + matchVar.substring(0, matchVar.indexOf(\"_\")));\n myDedUtils.setDTPbasicInfo(newDTP);\n allNewDTPShort.add(newDTP);\n newDTP = Arrays.asList(keyDTP.get(0), keyDTP.get(1), \"?\" + matchVar.substring(0, matchVar.indexOf(\"_\")), keyDTP.get(3));\n newDTPtoALtenativeTotalAns.put(newDTP, keyDTP);\n matchingValues.addAll(mapCandVarToMatchedVals.get(matchVar));\n }\n }\n }\n\n }\n\n // Search all nestedl loop values of the new DTP, passed as FILTER options \n // to the inner queries implementing the NLFO\n for (List<String> keyDTP : mapDTPtoAnsInverseMap.keySet()) {\n\n for (List<String> newDTPfilter : allNewDTPShort) {\n\n if ((keyDTP.get(0).equalsIgnoreCase(\"?o\") && (newDTPfilter.get(2).equalsIgnoreCase(keyDTP.get(2)) && newDTPfilter.get(1).equalsIgnoreCase(keyDTP.get(1)))) || (keyDTP.get(2).equalsIgnoreCase(\"?o\") && (newDTPfilter.get(0).equalsIgnoreCase(keyDTP.get(0)) && newDTPfilter.get(1).equalsIgnoreCase(keyDTP.get(1))))) {\n\n List<String> newDTP = new LinkedList<>(newDTPfilter.subList(0, 3));\n\n if (!myBasUtils.elemInListContained(newDTP, \"?\" + matchVar.substring(0, matchVar.indexOf(\"_\")))) {\n\n continue;\n }\n\n myDedUtils.setDTPbasicInfo(newDTP);\n newDTP.add(\"?\" + matchVar.substring(0, matchVar.indexOf(\"_\")));\n newDTPtoALtenativeInverseMap.put(newDTP, keyDTP);\n }\n }\n\n }\n\n }\n\n // Fetch answer values from th NLBJ to NLFO deduced triple pattern\n for (List<String> keyTotalNEW : newDTPtoALtenativeTotalAns.keySet()) {\n\n myDedUtils.setDTPinfoToAnother(keyTotalNEW, newDTPtoALtenativeTotalAns, mapDTPtoAnswTotal.get(newDTPtoALtenativeTotalAns.get(keyTotalNEW)));\n\n }\n\n for (List<String> keyTotalInvMaps : newDTPtoALtenativeInverseMap.keySet()) {\n\n myDedUtils.setDTPinfoToAnother(keyTotalInvMaps, newDTPtoALtenativeInverseMap, matchingValues);\n }\n\n }\n\n }",
"public LdShardToVariantPairs(long window) {\n this.window = window;\n }",
"private ArrayList<Location> getValidWithProbability(ArrayList<Map.Entry<Location, Integer>> validPair) {\n ArrayList<Location> valid = new ArrayList<>();\n if (isProbabilityEnabled) {\n validPair.sort(Map.Entry.comparingByValue());\n for (int i = validPair.size() - 1; i >= 0; i--) {\n valid.add(validPair.get(i).getKey());\n }\n } else {\n for (int i = 0; i < validPair.size(); i++) {\n valid.add(validPair.get(i).getKey());\n }\n }\n return valid;\n }",
"public static List<Integer> lcs(List<Integer> arr1, List<Integer> arr2) {\r\n ArrayList empty = new ArrayList();\r\n /* BEFORE WE ALLOCATE ANY DATA STORAGE, VALIDATE ARGS */\r\n if (null == arr1 || 0 == arr1.size())\r\n return empty;\r\n if (null == arr2 || 0 == arr2.size())\r\n return empty;\r\n\r\n if (equalLists(arr1, arr2)) {\r\n return arr1;\r\n }\r\n\r\n /* ALLOCATE VARIABLES WE'LL NEED FOR THE ROUTINE */\r\n ArrayList<Integer> bestMatch = new ArrayList<Integer>();\r\n ArrayList<Integer> currentMatch = new ArrayList<Integer>();\r\n ArrayList<List<Integer>> dataSuffixList = new ArrayList<List<Integer>>();\r\n ArrayList<List<Integer>> lineSuffixList = new ArrayList<List<Integer>>();\r\n\r\n /* FIRST, COMPUTE SUFFIX ARRAYS */\r\n for (int i = 0; i < arr1.size(); i++) {\r\n dataSuffixList.add(arr1.subList(i, arr1.size()));\r\n }\r\n for (int i = 0; i < arr2.size(); i++) {\r\n lineSuffixList.add(arr2.subList(i, arr2.size()));\r\n }\r\n\r\n /* STANDARD SORT SUFFIX ARRAYS */\r\n IntegerListComparator comp = new IntegerListComparator();\r\n Collections.sort(dataSuffixList, comp);\r\n Collections.sort(lineSuffixList, comp);\r\n\r\n /* NOW COMPARE ARRAYS MEMBER BY MEMBER */\r\n List<?> d = null;\r\n List<?> l = null;\r\n List<?> shorterTemp = null;\r\n int stopLength = 0;\r\n int k = 0;\r\n boolean match = false;\r\n\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n for (int i = 0; i < dataSuffixList.size(); i++) {\r\n d = (List) dataSuffixList.get(i);\r\n for (int j = 0; j < lineSuffixList.size(); j++) {\r\n l = (List) lineSuffixList.get(j);\r\n if (d.size() < l.size()) {\r\n shorterTemp = d;\r\n } else {\r\n shorterTemp = l;\r\n }\r\n\r\n currentMatch.retainAll(empty);\r\n k = 0;\r\n stopLength = shorterTemp.size();\r\n match = (l.get(k).equals(d.get(k)));\r\n while (k < stopLength && match) {\r\n if (l.get(k).equals(d.get(k))) {\r\n currentMatch.add((Integer) shorterTemp.get(k));\r\n k++;\r\n } else {\r\n match = false;\r\n }\r\n }\r\n if (currentMatch.size() > bestMatch.size()) {\r\n bestMatch.retainAll(empty);\r\n bestMatch.addAll(currentMatch);\r\n }\r\n }\r\n }\r\n return bestMatch;\r\n }",
"ArrayList<Edge> merge(ArrayList<Edge> l1, ArrayList<Edge> l2) {\n ArrayList<Edge> l3 = new ArrayList<Edge>();\n IComparator<Edge> c = new CompareEdges();\n while (l1.size() > 0 && l2.size() > 0) {\n if (c.apply(l1.get(0), l2.get(0))) {\n l3.add(l1.get(0));\n l1.remove(0);\n }\n else {\n l3.add(l2.get(0));\n l2.remove(0);\n }\n }\n while (l1.size() > 0) {\n l3.add(l1.get(0));\n l1.remove(0);\n }\n while (l2.size() > 0) {\n l3.add(l2.get(0));\n l2.remove(0);\n }\n return l3;\n }",
"public ArrayList<Tuple2<Input, Input>> call(ArrayList<Tuple2<Data<Type0, Type1>, Input>> lst1a,\n ArrayList<Tuple2<Data<Type0, Type1>, Input>> lst1b) {\n\n if (sameRDD) {\n\n int[] permutationArray = new int[lst1a.size()];\n for (int i = 0; i < permutationArray.length; i++) {\n permutationArray[i] = i;\n }\n ArrayList<Tuple2<Data<Type0, Type1>, Input>> list2 = new ArrayList<Tuple2<Data<Type0, Type1>, Input>>();//new Tuple2<Data<Type0,Type1>,Input>[lst1a.length];\n //Collections.copy(lst1a,list2);\n list2.addAll(lst1a);\n\n new myMergeSort<Type0, Type1, Input>().sort(list2, permutationArray, new revDataComparator<Type0, Type1, Input>(\n list2ASC, list2ASCSec, equalReverse));\n\n ArrayList<Tuple2<Input, Input>> wilResult = getViolationsSelf(lst1a,\n permutationArray);\n return wilResult;\n } else {\n\n // reset pivot flag\n for (int i = 0; i < lst1b.size(); i++) {\n lst1b.get(i)._1().resetPivot();\n }\n\n ArrayList<Tuple2<Data<Type0, Type1>, Input>> list1 = merge(lst1a, lst1b, list1ASC, list1ASCSec);\n\n int[] permutationArray = new int[list1.size()];\n for (int i = 0; i < permutationArray.length; i++) {\n permutationArray[i] = i;\n }\n ArrayList<Tuple2<Data<Type0, Type1>, Input>> list2 = new ArrayList<Tuple2<Data<Type0, Type1>, Input>>();//Tuple2<Data<Type0,Type1>,Record>[list1.length];\n //System.arraycopy(list1, 0, list2, 0, list1.size());\n //Collections.copy(list1,list2);\n list2.addAll(list1);\n new myMergeSort<Type0, Type1, Input>().sort(list2, permutationArray, new revDataComparator<Type0, Type1, Input>(\n list2ASC, list2ASCSec, equalReverse));\n\n ArrayList<Tuple2<Input, Input>> wilResult = getViolationsNonSelf(\n list1, permutationArray);\n\n return wilResult;\n }\n // return output;\n\n }",
"private void fillBindingPairs(List<Binding> bindingList,\n\t\t\tList<BindingPair> bindingPairs,\n\t\t\tMultipleVariable multipleCommonVariable,\n\t\t\tHashMap<Integer, List<Binding>> parentMappings) {\n\t\tfor (Binding binding : bindingList) {\n\t\t\t// generate hash code for the binding\n\t\t\tint multipleNodeHash = generateHashCode(multipleCommonVariable,\n\t\t\t\t\tbinding);\n\t\t\t// get parent bindings for this binding\n\t\t\tList<Binding> parentBindings = parentMappings.get(multipleNodeHash);\n\t\t\t// check for these parents is not null\n\t\t\tif (parentBindings != null) {\n\t\t\t\t// create a binding pair for each parent binding\n\t\t\t\tfor (Binding parentBinding : parentBindings) {\n\t\t\t\t\tbindingPairs.add(new BindingPair(binding, parentBinding));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void inputMappingComparision(List<InputParam> sourceInputMappingList,\r\n\t\t\tList<InputParam> targetInputMappingList, List<Fields> fieldsList) {\r\n\t\tboolean isAdded;\r\n\t\tboolean isDeleted;\r\n\t\t;\r\n\t\ttry {\r\n\t\t\tArrayList<InputParam> deletedList = new ArrayList<>();\r\n\t\t\tfor (InputParam sourceMapping : sourceInputMappingList) {\r\n\t\t\t\tisDeleted = true;\r\n\t\t\t\tfor (InputParam targetMapping : targetInputMappingList) {\r\n\t\t\t\t\tif (StringUtils.equalsIgnoreCase(targetMapping.getContextVariable(),\r\n\t\t\t\t\t\t\tsourceMapping.getContextVariable())) {\r\n\t\t\t\t\t\tisDeleted = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (isDeleted) {\r\n\t\t\t\t\tdeletedList.add(sourceMapping);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!deletedList.isEmpty()) {\r\n\t\t\t\tfor (InputParam sourceInputParam : deletedList) {\r\n\t\t\t\t\tString oldValue = checkInputParamSelectedKey(sourceInputParam);\r\n\t\t\t\t\tif (!StringUtils.isEmpty(oldValue))\r\n\t\t\t\t\t\tfieldsList.add(BPDesignerServiceImpl.buildResponseJson(BPConstant.EMPTY_STRING,\r\n\t\t\t\t\t\t\t\tBPConstant.INPUT_MAPPING, sourceInputParam.getContextVariable(), oldValue,\r\n\t\t\t\t\t\t\t\tBPConstant.EMPTY_STRING));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (InputParam targetMapping : targetInputMappingList) {\r\n\t\t\t\tisAdded = true;\r\n\t\t\t\tfor (InputParam sourceMapping : sourceInputMappingList) {\r\n\t\t\t\t\tif (StringUtils.equalsIgnoreCase(targetMapping.getContextVariable(),\r\n\t\t\t\t\t\t\tsourceMapping.getContextVariable())) {\r\n\t\t\t\t\t\tisAdded = false;\r\n\t\t\t\t\t\tif (StringUtils.equalsIgnoreCase(targetMapping.getSelectedKey(),\r\n\t\t\t\t\t\t\t\tsourceMapping.getSelectedKey())) {\r\n\t\t\t\t\t\t\tif (StringUtils.equalsIgnoreCase(targetMapping.getSelectedKey(),\r\n\t\t\t\t\t\t\t\t\tBPConstant.PROCESS_VARIABLE)) {\r\n\t\t\t\t\t\t\t\tif (!StringUtils.equalsIgnoreCase(targetMapping.getProcessVariable(),\r\n\t\t\t\t\t\t\t\t\t\tsourceMapping.getProcessVariable())) {\r\n\t\t\t\t\t\t\t\t\tfieldsList.add(BPDesignerServiceImpl.buildResponseJson(BPConstant.EMPTY_STRING,\r\n\t\t\t\t\t\t\t\t\t\t\tBPConstant.INPUT_MAPPING, targetMapping.getContextVariable(),\r\n\t\t\t\t\t\t\t\t\t\t\tsourceMapping.getProcessVariable(), targetMapping.getProcessVariable()));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if (StringUtils.equalsIgnoreCase(targetMapping.getSelectedKey(),\r\n\t\t\t\t\t\t\t\t\tBPConstant.ENTER_VALUE)) {\r\n\t\t\t\t\t\t\t\tString oldValue = checkInputParamType(sourceMapping);\r\n\t\t\t\t\t\t\t\tString newValue = checkInputParamType(targetMapping);\r\n\t\t\t\t\t\t\t\tif (!StringUtils.equalsIgnoreCase(oldValue, newValue)) {\r\n\t\t\t\t\t\t\t\t\tfieldsList.add(BPDesignerServiceImpl.buildResponseJson(BPConstant.EMPTY_STRING,\r\n\t\t\t\t\t\t\t\t\t\t\tBPConstant.INPUT_MAPPING, targetMapping.getContextVariable(), oldValue,\r\n\t\t\t\t\t\t\t\t\t\t\tnewValue));\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 {\r\n\t\t\t\t\t\t\tString oldValue = checkInputParamSelectedKey(sourceMapping);\r\n\t\t\t\t\t\t\tString newValue = checkInputParamSelectedKey(targetMapping);\r\n\t\t\t\t\t\t\tfieldsList.add(BPDesignerServiceImpl.buildResponseJson(BPConstant.EMPTY_STRING,\r\n\t\t\t\t\t\t\t\t\tBPConstant.INPUT_MAPPING, targetMapping.getContextVariable(), oldValue, newValue));\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\tif (isAdded) {\r\n\t\t\t\t\tString newValue = checkInputParamSelectedKey(targetMapping);\r\n\t\t\t\t\tif (!StringUtils.isEmpty(newValue))\r\n\t\t\t\t\t\tfieldsList.add(BPDesignerServiceImpl.buildResponseJson(BPConstant.EMPTY_STRING,\r\n\t\t\t\t\t\t\t\tBPConstant.INPUT_MAPPING, targetMapping.getContextVariable(), BPConstant.EMPTY_STRING,\r\n\t\t\t\t\t\t\t\tnewValue));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception exception) {\r\n\t\t\tLOGGER.error(\"Input Mapping Comparision error\"+exception);\r\n\t\t\tthrow new BPException(exception.getMessage());\r\n\t\t}\r\n\r\n\t}",
"public void compareLang (List<Doctor> dl, Doctor d)\n\t{\n\t\tfor(Doctor ld: dl)\n\t\t{\n\t\t\tHashSet<String> exisDocLang=new HashSet(ld.getLang());\n\t\t\tHashSet<String> docLang=new HashSet(d.getLang());\n\t\t\tdocLang.retainAll(exisDocLang);\n\t\t\tif((docLang!=null && docLang.size()>0)) \n\t\t\t\trnkMap.put(ld,rnkMap.get(ld)+docLang.size());\n\t\t}\n\t\t\n\t}",
"private void assignPairingStatus(ArrayList p_segment)\n {\n ArrayList tags = new ArrayList(p_segment);\n Object o1, o2;\n int i_start, i_end, i_max;\n int i_level, i_partner = 1;\n HtmlObjects.Tag t_start, t_tag;\n HtmlObjects.EndTag t_end;\n HtmlObjects.CFTag t_CFstart, t_CFtag;\n\n i_start = 0;\n i_max = tags.size();\n outer: while (i_start < i_max)\n {\n o1 = tags.get(i_start);\n\n if (o1 instanceof HtmlObjects.Tag)\n {\n t_start = (HtmlObjects.Tag) o1;\n\n // don't consider tags that are already closed (<BR/>)\n if (t_start.isClosed)\n {\n tags.remove(i_start);\n --i_max;\n continue outer;\n }\n\n // handle recursive tags\n i_level = 0;\n\n // see if the current opening tag has a closing tag\n for (i_end = i_start + 1; i_end < i_max; ++i_end)\n {\n o2 = tags.get(i_end);\n\n if (o2 instanceof HtmlObjects.Tag)\n {\n t_tag = (HtmlObjects.Tag) o2;\n\n if (t_start.tag.equalsIgnoreCase(t_tag.tag))\n {\n ++i_level;\n continue;\n }\n }\n else if (o2 instanceof HtmlObjects.EndTag)\n {\n t_end = (HtmlObjects.EndTag) o2;\n\n if (t_start.tag.equalsIgnoreCase(t_end.tag))\n {\n if (i_level > 0)\n {\n --i_level;\n continue;\n }\n\n // found a matching buddy in this segment\n t_start.isPaired = t_end.isPaired = true;\n t_start.partnerId = t_end.partnerId = i_partner;\n i_partner++;\n tags.remove(i_end);\n tags.remove(i_start);\n i_max -= 2;\n continue outer;\n }\n }\n }\n\n // done with this tag, don't consider again\n tags.remove(i_start);\n --i_max;\n continue outer;\n }\n else if (o1 instanceof HtmlObjects.CFTag)\n {\n t_CFstart = (HtmlObjects.CFTag) o1;\n\n // don't consider tags that are already closed (<BR/>)\n if (t_CFstart.isClosed)\n {\n tags.remove(i_start);\n --i_max;\n continue outer;\n }\n\n // handle recursive tags\n i_level = 0;\n\n // see if the current opening tag has a closing tag\n for (i_end = i_start + 1; i_end < i_max; ++i_end)\n {\n o2 = tags.get(i_end);\n\n if (o2 instanceof HtmlObjects.CFTag)\n {\n t_CFtag = (HtmlObjects.CFTag) o2;\n\n if (t_CFstart.tag.equalsIgnoreCase(t_CFtag.tag))\n {\n ++i_level;\n continue;\n }\n }\n else if (o2 instanceof HtmlObjects.EndTag)\n {\n t_end = (HtmlObjects.EndTag) o2;\n\n if (t_CFstart.tag.equalsIgnoreCase(t_end.tag))\n {\n if (i_level > 0)\n {\n --i_level;\n continue;\n }\n\n // found a matching buddy in this segment\n t_CFstart.isPaired = t_end.isPaired = true;\n t_CFstart.partnerId = t_end.partnerId = i_partner;\n i_partner++;\n tags.remove(i_end);\n tags.remove(i_start);\n i_max -= 2;\n continue outer;\n }\n }\n }\n\n // done with this tag, don't consider again\n tags.remove(i_start);\n --i_max;\n continue outer;\n }\n else if (!(o1 instanceof HtmlObjects.EndTag))\n {\n // don't consider non-tag tags in the list\n tags.remove(i_start);\n --i_max;\n continue outer;\n }\n\n ++i_start;\n }\n }",
"private static List<Pair<String,String>> product(String[] alist, String[] blist){\n\n List<Pair<String, String>> prod = new ArrayList<>();\n\n for(String a : alist){\n for(String b : blist){\n prod.add(new Pair<>(a,b));\n }\n }\n return prod;\n }",
"private void sanitizeDistinctHelper(Gdl gdl, List<Gdl> in, List<Gdl> out) {\r\n if (!(gdl instanceof GdlRule)) {\r\n out.add(gdl);\r\n return;\r\n }\r\n GdlRule rule = (GdlRule) gdl;\r\n for (GdlLiteral lit : rule.getBody()) {\r\n if (lit instanceof GdlDistinct) {\r\n GdlDistinct d = (GdlDistinct) lit;\r\n GdlTerm a = d.getArg1();\r\n GdlTerm b = d.getArg2();\r\n if (!(a instanceof GdlFunction) && !(b instanceof GdlFunction)) continue;\r\n if (!(a instanceof GdlFunction && b instanceof GdlFunction)) return;\r\n GdlSentence af = ((GdlFunction) a).toSentence();\r\n GdlSentence bf = ((GdlFunction) b).toSentence();\r\n if (!af.getName().equals(bf.getName())) return;\r\n if (af.arity() != bf.arity()) return;\r\n for (int i = 0; i < af.arity(); i++) {\r\n List<GdlLiteral> ruleBody = new ArrayList<>();\r\n for (GdlLiteral newLit : rule.getBody()) {\r\n if (newLit != lit) ruleBody.add(newLit);\r\n else ruleBody.add(GdlPool.getDistinct(af.get(i), bf.get(i)));\r\n }\r\n GdlRule newRule = GdlPool.getRule(rule.getHead(), ruleBody);\r\n //System.out.println(\"new rule: \" + newRule);\r\n in.add(newRule);\r\n }\r\n return;\r\n }\r\n }\r\n /*\r\n for (GdlLiteral lit : rule.getBody()) {\r\n if (lit instanceof GdlDistinct) {\r\n System.out.println(\"distinct rule added: \" + rule);\r\n break;\r\n }\r\n }\r\n */\r\n out.add(rule);\r\n }",
"@Test\n public void pairNumbers_passTwoListsNumbers_returnListOfPairs() {\n List<int[]> output = Java8Streams.pairNumbers(new ArrayList<>(Arrays.asList(1, 2, 3)), new ArrayList<>(Arrays.asList(3, 4)));\n assertThat(output).containsExactly(new int[]{1, 3}, new int[]{1, 4}, new int[]{2, 3}, new int[]{2, 4}, new int[]{3, 3}, new int[]{3, 4});\n }",
"protected void arrangeBestOrder ()\n \t{\n \t\tObject[] duplLoans = null;\n \t\ttry\n \t\t{\n \t\t\tduplLoans = theLoanList.popFirstDuplicates();\n \t\t}\n \t\tcatch (NoSuchElementException ex)\n \t\t{\n \t\t\tlog.error(\"The list of duplicate loan lists is empty\");\n \t\t\treturn;\n \t\t}\n \n \t\tDuplicateLoanDataVO bestSourceLoan = null;\n \t\tDuplicateLoanDataVO firstDataVO = null;\n \t\tDuplicateLoanDataVO nextDataVO = null;\n \t\tString xmlValue = null;\n \t\tString apsId1 = null;\n \t\tString providerType1 = null;\n \t\tString apsId2 = null;\n \t\tString providerType2 = null;\n \n \t\tfor (int ndx = 1; ndx < duplLoans.length; ndx++)\n \t\t{\n \t\t\tfirstDataVO = (DuplicateLoanDataVO)duplLoans[0];\n \t\t\tnextDataVO = (DuplicateLoanDataVO)duplLoans[ndx];\n \n \t\t\tapsId1 = firstDataVO.getAwardId();\n \t\t\tproviderType1 = firstDataVO.getProviderType();\n \t\t\tapsId2 = nextDataVO.getAwardId();\n \t\t\tproviderType2 = nextDataVO.getProviderType();\n \n \t\t\tif (apsId1 == null)\n \t\t\t{\n \t\t\t\tapsId1 = XMLParser.getNodeValue(firstDataVO.getDocument(), \"APSUniqueAwardID\");\n \t\t\t\tfirstDataVO.setAwardId(apsId1);\n \t\t\t}\n \n \t\t\tif (providerType1 == null)\n \t\t\t{\n \t\t\t\tproviderType1 = XMLParser.getNodeValue(firstDataVO.getDocument(), \"DataProviderType\");\n \t\t\t\tfirstDataVO.setProviderType(providerType1);\n \t\t\t}\n \n \t\t\tif (apsId2 == null)\n \t\t\t{\n \t\t\t\tapsId2 = XMLParser.getNodeValue(nextDataVO.getDocument(), \"APSUniqueAwardID\");\n \t\t\t\tnextDataVO.setAwardId(apsId2);\n \t\t\t}\n \n \t\t\tif (providerType2 == null)\n \t\t\t{\n \t\t\t\tproviderType2 = XMLParser.getNodeValue(nextDataVO.getDocument(), \"DataProviderType\");\n \t\t\t\tnextDataVO.setProviderType(providerType2);\n \t\t\t}\n \n \t\t\tif (log.isDebugEnabled())\n \t\t\t{\n \t\t\t\tlog.debug(\"Comparing Award ID: \" + apsId1 + \" with provider type '\" + providerType1 +\n \t\t\t\t \"' to Award ID: \" + apsId2 + \" with provider type '\" + providerType2 + \"' \");\n \t\t\t}\n \n \t\t\tbestSourceLoan = determineBestSource(firstDataVO, nextDataVO);\n \t\t\tif (bestSourceLoan != null && bestSourceLoan == nextDataVO)\n \t\t\t{\n \t\t\t\t// we need to rearrange things so that the \"best\" is at\n \t\t\t\t// the \"head\" of the array (element 0).\n \n \t\t\t\tDuplicateLoanDataVO best = (DuplicateLoanDataVO)duplLoans[ndx];\n \t\t\t\tduplLoans[ndx] = duplLoans[0];\n \t\t\t\tduplLoans[0] = best;\n \n \t\t\t\tif (log.isDebugEnabled())\n \t\t\t\t{\n \t\t\t\t\tString apsId = nextDataVO.getAwardId();\n \t\t\t\t\tString providerType = nextDataVO.getProviderType();\n \t\t\t\t\tlog.debug(\"Award ID: \" + apsId + \" with provider type '\" + providerType + \"' is now the 'best' source\");\n \t\t\t\t}\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tif (log.isDebugEnabled())\n \t\t\t\t{\n \t\t\t\t\tString apsId = firstDataVO.getAwardId();\n \t\t\t\t\tString providerType = firstDataVO.getProviderType();\n \t\t\t\t\tlog.debug(\"Award ID: \" + apsId + \" with provider type '\" + providerType + \"' is still the 'best' source\");\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\ttheLoanList.pushLastDuplicates(duplLoans);\n \t}",
"public static void main(String[] args){\n\n ArrayList<String> test = new ArrayList<>();\n test.add(\"T\");\n test.add(\"L\");\n\n ArrayList<String> test2 = new ArrayList<>();\n test2.add(\"P\");\n\n PFD pfd1 = new PFD(test,test2,1);\n\n ArrayList<String> test3 = new ArrayList<>();\n test3.add(\"T\");\n test3.add(\"L\");\n\n ArrayList<String> test4 = new ArrayList<>();\n test4.add(\"M\");\n\n PFD pfd2 = new PFD(test3,test4,1);\n\n ArrayList<String> test5 = new ArrayList<>();\n test5.add(\"P\");\n ArrayList<String> test6 = new ArrayList<>();\n test6.add(\"M\");\n\n ArrayList<String> test7 = new ArrayList<>();\n test7.add(\"T\");\n ArrayList<String> test8 = new ArrayList<>();\n test8.add(\"S\");\n\n PFD pfd3 = new PFD(test5,test6,3);\n PFD pfd4 = new PFD(test7,test8,3);\n ArrayList<PFD> test2List = new ArrayList<PFD>(Arrays.asList(pfd1, pfd2));\n ArrayList<String> r = new ArrayList<String>(Arrays.asList(\"M\", \"S\", \"T\", \"P\"));\n// System.out.println(test2List);\n// System.out.println(\"Closure: \" + getClosureForAttr(new ArrayList<String>(Arrays.asList(\"T\",\"M\")),test2List,1));\n// System.out.println(\"BDNF? \"+ isSatisfiedBDFN(test2List,3));\n// System.out.println(getCanCover1(test2List));\n// S = DecomposeWithTheCertainty(r,test2List,4);\n// System.out.println(turnDeOutputToString());\n// System.out.println(getAllComb(r, new ArrayList<ArrayList<String>>()));\n\n// System.out.println(getMinimalKeys(test2List,r,4));\n\n// System.out.println(\"B-prime: \"+getBetaPrimeList(test2List,r,2));\n// System.out.println(\"Satisfied 3NF? \"+isSatisfied3NF(test2List,r,3));\n// System.out.println(\"Is not subset:\"+isNotSubset(pfd4,test2List));\n ArrayList<String> t = new ArrayList<>();\n t.add(\"A\");\n t.add(\"B\");\n t.add(\"C\");\n ArrayList<String> t1 = new ArrayList<>();\n t1.add(\"B\");\n t1.add(\"A\");\n// t1.add(\"D\");\n t.retainAll(t1);\n// System.out.println(t.toString());\n// System.out.println(String.join(\"\",t1));\n//\n// System.out.println(getAllCombo(r).toString());\n double x = 2 / 3.0;\n System.out.println(x);\n\n}",
"protected ArrayList<Long> getUlDlResultsFromList(Long uLrxTotal, Long dlrxTotal,\n\t\t\tArrayList<ArrayList<StreamParams>> listOfStreamList2) {\n\t\tArrayList<Long> listOfTotalRx = new ArrayList<Long>();\n\t\tfor (ArrayList<StreamParams> list : listOfStreamList2) {\n\t\t\tfor (StreamParams stream : list) {\n\t\t\t\tif (stream.getName().contains(\"UL\")) {\n\t\t\t\t\tuLrxTotal += stream.getRxRate();\n\t\t\t\t}\n\t\t\t\tif (stream.getName().contains(\"DL\")) {\n\t\t\t\t\tdlrxTotal += stream.getRxRate();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlistOfTotalRx.add(uLrxTotal);\n\t\tlistOfTotalRx.add(dlrxTotal);\n\t\treturn listOfTotalRx;\n\t}",
"public boolean checkEGJoin(List<String> queryTriplets) {\n\n boolean flagEG = false;\n boolean foundEG = false;\n List<List<String>> newEGpair = null;\n List<List<String>> newEGpair2 = null;\n List<String> innerDTP = null;\n List<String> outerDTP = null;\n List<String> currEG = null;\n\n if (queryTriplets.size() >= 6) {\n\n for (int key : mapTmpEGtoAllTPs.keySet()) {\n\n currEG = mapTmpEGtoAllTPs.get(key);\n int commElems = myBasUtils.candidateTPcomElems(currEG, queryTriplets);\n\n if (currEG.size() == queryTriplets.size()) {\n\n // the second condition, is used to capture Nested Loop with EG operator, made by FedX\n if (commElems == currEG.size() || commElems == currEG.size() - 1) {\n\n if (commElems == currEG.size() - 1) {\n\n mapEGtoCancel.put(key, 1);\n mapEGtoOccurs.put(currEG, 2);\n }\n\n foundEG = true;\n break;\n }\n\n }\n\n }\n\n //If it's the first time we see this EG or NLEG, we save each pairWise join as EG\n if (!foundEG) {\n\n int indEG = mapTmpEGtoAllTPs.size();\n mapTmpEGtoAllTPs.put(indEG, queryTriplets);\n mapEGtoOccurs.put(currEG, 1);\n\n for (int i = 0; i < queryTriplets.size(); i += 3) {\n\n outerDTP = myDedUtils.getCleanTP(new LinkedList<>(queryTriplets.subList(i, i + 3)));\n for (int f = i + 3; f < queryTriplets.size(); f += 3) {\n\n flagEG = true;\n innerDTP = myDedUtils.getCleanTP(new LinkedList<>(queryTriplets.subList(f, f + 3)));\n newEGpair = Arrays.asList(innerDTP, outerDTP);\n newEGpair2 = Arrays.asList(outerDTP, innerDTP);\n myDedUtils.setNewEGInfo(outerDTP, innerDTP, newEGpair, newEGpair2, indEG);\n }\n\n }\n }\n\n }\n\n return flagEG;\n }",
"public static void verifySpListEquals(ImList<SPTarget> lst1, ImList<SPTarget> lst2) {\n assertEquals(lst1.size(), lst2.size());\n\n for (int i=0; i<lst1.size(); ++i) {\n SPTarget t1 = lst1.get(i);\n SPTarget t2 = lst2.get(i);\n\n // The two targets won't compare .equals(), but we can just check\n // the coordinates and get enough of an idea that they are the\n // same for the purposes of testing GuideProbeTargets.\n\n assertEquals(t1.getTarget().getRa().getAs(CoordinateParam.Units.DEGREES), t2.getTarget().getRa().getAs(CoordinateParam.Units.DEGREES), 0.000001);\n assertEquals(t1.getTarget().getDec().getAs(CoordinateParam.Units.DEGREES), t2.getTarget().getDec().getAs(CoordinateParam.Units.DEGREES), 0.000001);\n }\n }",
"public List<Doctor> compareSpeciality (List<Doctor> dl, Doctor d)\n\t{\n\t\tList<Doctor> sp=new ArrayList<Doctor>();\n\t\tfor(Doctor ld: dl)\n\t\t{\n\t\t\tif(ld.getSpeciality().equals(d.getSpeciality()))\n\t\t\t\tsp.add(ld);\n\t\t\t\n\t\t}\n\t\treturn sp;\n\t}",
"public static String checkList(String[] l1, String[] l2, String[] l3, String[] l4){\n Arrays.sort(l1);\n Arrays.sort(l2);\n Arrays.sort(l3);\n Arrays.sort(l4);\n //current runtime O(4log(N)) ~ O(log(N))\n\n String lexo = \"\";\n\n int count;\n\n //running through all elements of the first list O(N)\n for (int i = 0; i < l1.length; i++) {\n count = 1;\n if (Arrays.binarySearch(l2, l1[i]) >= 0)\n count += 1;\n if (Arrays.binarySearch(l3, l1[i]) >= 0)\n count += 1;\n if (Arrays.binarySearch(l4, l1[i]) >= 0)\n count += 1;\n if (count == 3){\n lexo = l1[i];\n break;\n }\n }\n //running through elements of the last list O(N)\n for (int j = 0; j < l2.length; j++) {\n count = 1;\n if (Arrays.binarySearch(l1, l2[j]) >= 0)\n count += 1;\n if (Arrays.binarySearch(l3, l2[j]) >= 0)\n count += 1;\n if (Arrays.binarySearch(l4, l2[j]) >= 0)\n count += 1;\n if (count == 3 && (l2[j].compareTo(lexo)<0 || lexo == \"\")){\n lexo = l2[j];\n break;\n }\n }\n //Total running time in a worst case scenario of no triplets is now 2N(4*log(N)) ~ O(N*log(N))\n return lexo;\n\n\n }",
"public void testMergeOfParameterLists() throws SQLException {\n SimpleParameterList o1SPL = new SimpleParameterList(8, Boolean.TRUE);\n o1SPL.setIntParameter(1, 1);\n o1SPL.setIntParameter(2, 2);\n o1SPL.setIntParameter(3, 3);\n o1SPL.setIntParameter(4, 4);\n\n SimpleParameterList s2SPL = new SimpleParameterList(4, Boolean.TRUE);\n s2SPL.setIntParameter(1, 5);\n s2SPL.setIntParameter(2, 6);\n s2SPL.setIntParameter(3, 7);\n s2SPL.setIntParameter(4, 8);\n\n o1SPL.appendAll(s2SPL);\n\n assertEquals(\n \"Expected string representation of parameter list does not match product.\",\n \"<[1 ,2 ,3 ,4 ,5 ,6 ,7 ,8]>\", o1SPL.toString());\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic void colleceRelatedPairs() {\n\t\trelatedPairs = new HashSet[words.size()];\n\t\tfor(int i = 0; i < relatedPairs.length; i++){\n\t\t\tSet<Integer> related = new HashSet<Integer>();\n\t\t\trelatedPairs[i] = related;\n\t\t}\n\t\t\n\t\tlong uniquePairs = 0;\n\t\tfor(int i = 0; i < words.size(); i++){\n\t\t\tif(goodWords.get(i)){\n\t\t\t\tString word1 = words.get(i);\n\t\t\t\tfor(int j = i+1; j < words.size(); j++){\n\t\t\t\t\tif(goodWords.get(j)){\n\t\t\t\t\t\tString word2 = words.get(j);\n\t\t\t\t\t\t\n\t\t\t\t\t\tuniquePairs++;\n\t\t\t\t\t\tint similarity = binDst.getSimilarity(word1, word2);\n\t\t\t\t\t\tif(similarity == 1){\n\t\t\t\t\t\t\t//System.out.println(word1 + \"\\t\" + word2);\n\t\t\t\t\t\t\taddPair(i, j);\n\t\t\t\t\t\t\taddPair(j, i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i % 1000 == 0){\n\t\t\t\tLOGGER.info(\"Pairs: \" + i);\n\t\t\t}\n\t\t}\n\t\tLOGGER.info(\"Unique Pairs: \" + uniquePairs);\n\t}",
"private void updateBundleLabelList() {\n List<String> selection = Utils.jListGetValuesWrapper(bundle_label_list);\n List<String> items = new ArrayList<String>();\n // Go through all of the header fields and add them with their variations\n boolean tags_present = false;\n BundlesG globals = getRTParent().getRootBundles().getGlobals();\n Iterator<String> it = globals.fieldIterator();\n while (it.hasNext()) {\n String fld = it.next(); int fld_i = globals.fieldIndex(fld);\n if (globals.isScalar(fld_i)) {\n items.add(fld + SIMPLESTAT_LM);\n\titems.add(fld + COMPLEXSTAT_LM);\n } else if (fld.equals(\"tags\")) {\n tags_present = true;\n } else {\n items.add(fld + ITEMS_LM);\n\titems.add(fld + COUNT_LM);\n }\n BundlesDT.DT datatype = globals.getFieldDataType(fld_i);\n if (globals.isScalar(fld_i) == false && datatype == BundlesDT.DT.INTEGER) datatype = null;\n if (datatype != null) {\n String appends[] = BundlesDT.dataTypeVariations(datatype, globals);\n\tfor (int i=0;i<appends.length;i++) items.add(fld + BundlesDT.DELIM + appends[i]);\n }\n }\n Collections.sort(items, new CaseInsensitiveComparator());\n // Add the tag options at the end\n if (tags_present) {\n items.add(\"tags\" + ITEMS_LM);\n items.add(\"tags\" + BundlesDT.MULTI + ITEMS_LM);\n items.add(\"tags\" + BundlesDT.MULTI + COUNT_LM);\n Iterator<String> it2 = globals.tagTypeIterator();\n while (it2.hasNext()) {\n String tag_type = it2.next();\n items.add(\"tags\" + BundlesDT.MULTI + BundlesDT.DELIM + tag_type + ITEMS_LM);\n items.add(\"tags\" + BundlesDT.MULTI + BundlesDT.DELIM + tag_type + COUNT_LM);\n }\n }\n // Insert the default items\n items.add(0, TIMEFRAME_LM);\n items.add(0, LASTHEARD_LM);\n items.add(0, FIRSTHEARD_LM);\n items.add(0, BUNDLECOUNT_LM);\n // Convert and update the list\n setListAndResetSelection(bundle_label_list, items, selection);\n }",
"private void generatePointPairs() {\n\t\tfinal int mod = SIZE_OF_ORIGINAL_LIST * 8; \n\t\t\n\t\tif(DEBUG) System.out.println(\"----- Generating Point Pairs...\");\n\n\t\tint counter = 0;\n\t\tint j = 0;\n\t\t\n\t\tfor(int i = 0; i < myPoints.length; i++) {\n\t\t\t//while(j++ < myPoints.length) {\n\t\t\tfor( ; j < myPoints.length; j++) {\n\t\t\t\t// i and j are the same point, so ignore that pair.\n\t\t\t\tif(i != j) {\n\t\t\t\t\tmyPairs.add(new PointPair(myPoints[i], myPoints[j]));\n\t\t\t\t\tif(DEBUG && ++counter % mod == 0) System.out.print(\"pair \");\n\t\t\t\t}\n\t\t\t\t// Not yet colinear, just a unique pair to use later.\n\t\t\t}\n\n\t\t}\n\t\tif(DEBUG) System.out.println(\"\\n----- ----- \" + counter + \" pairs found.\\n\");\n\t}",
"private Set<Integer> extractSharedLValues(AtomicSegment atomicSeg) {\r\n\t\tBody b = atomicSeg.getBody();\r\n\t\tIterator<Unit> unitsInSeg = b.getUnits().iterator(atomicSeg.getFirstUnit(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t atomicSeg.getLastUnit());\r\n\t\t// For each unit in segment, for each use/def box in unit, check if\r\n\t\t// is an lValue\r\n\t\tSet<Integer> lValueIDs = new HashSet<>();\r\n\t\tLValueBox lVal = new LValueBox();\r\n\t\tint id;\r\n\t\twhile(unitsInSeg.hasNext()) {\r\n\t\t\tfor(ValueBox vb : unitsInSeg.next().getUseAndDefBoxes()) {\r\n\t\t\t\tif(lVal.canContainValue(vb.getValue())) {\r\n\t\t\t\t\tlVal.setValue(vb.getValue());\r\n\t\t\t\t\tid = getOrMakeID(lVal);\r\n\t\t\t\t\tlValueIDs.add(id);\r\n\t\t\t\t\tlVal = new LValueBox();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn lValueIDs;\r\n\t}",
"private static boolean compareList(List<Object> l1, List<Object> l2)\n {\n int count=0;\n for (Object o : l1)\n {\n Object temp = o;\n for (Object otemp : l2)\n {\n if (EqualsBuilder.reflectionEquals(temp, otemp))\n {\n count++;\n }\n }\n\n }\n\n if(count == l1.size()) return true;\n return false;\n\n }",
"private List<GPairRecord<S, S>> getNonCrossingPairs(final Predicate<Pair<S, S>> predicate) {\n List<GPairRecord<S, S>> recordList = new ArrayList<>();\n slp.getOrderedProductions().stream().map(p -> p.getLeft()).forEach(nonTerminal -> consumeNonCrossingPairs(nonTerminal, recordList::add, predicate));\n return recordList;\n }",
"public PostingsList phrase_query(PostingsList l1, PostingsList l2){\n\n PostingsList phrase = new PostingsList();\n\n // Counters to iterate docIDs\n int count1 = 0;\n int count2 = 0;\n // Counters to iterate positional indices\n int subcount1 = 0;\n int subcount2 = 0;\n\n // First posting\n PostingsEntry p1 = l1.get(0);\n PostingsEntry p2 = l2.get(0);\n\n // List of positional indices (changes at each iteration)\n LinkedList<Integer> ll1;\n LinkedList<Integer> ll2;\n\n // Used to store positional index\n int pp1;\n int pp2;\n\n while(true){\n // docID match (1/2) //\n if (p1.docID == p2.docID){\n // Obtain list of positional indices\n ll1 = p1.positions;\n ll2 = p2.positions;\n // First positional indices\n pp1 = ll1.get(0);\n pp2 = ll2.get(0);\n // Initialize counter\n subcount1 = 0;\n subcount2 = 0;\n\n // Search if the phrase exists\n while(true){\n // Match, consecutive words (2/2) - EUREKA! //\n if (pp1+1 == pp2){\n // Save found match (docID and positional index of last\n // word)\n phrase.insert(p1.docID, pp2);\n // Increase counters and pos indices if list is not finished\n subcount1++;\n subcount2++;\n if (subcount1<ll1.size() && subcount2<ll2.size()){\n pp1 = ll1.get(subcount1);\n pp2 = ll2.get(subcount2);\n }\n // If list finished, break\n else\n break;\n }\n // Not match\n else if (pp1+1 < pp2){\n subcount1++;\n if (subcount1<ll1.size())\n pp1 = ll1.get(subcount1);\n // If list finished, break\n else\n break;\n }\n // Not match\n else{\n subcount2++;\n if (subcount2<ll2.size())\n pp2 = ll2.get(subcount2);\n else\n break;\n }\n }\n\n // Once we finished looking at the list of positional indices of one\n // posting, increase counters and go to next postings (if there are)\n count1++;\n count2++;\n if (count1<l1.size() && count2<l2.size()){\n p1 = l1.get(count1);\n p2 = l2.get(count2);\n }\n else{\n break;\n }\n }\n // docID not match, increase lowest counter\n else if (p1.docID < p2.docID){\n count1++;\n if (count1<l1.size()){\n p1 = l1.get(count1);\n }\n else{\n break;\n }\n }\n // docID not match, increase lowest counter\n else{\n count2++;\n if (count2<l2.size()){\n p2 = l2.get(count2);\n }\n else{\n break;\n }\n }\n }\n\n return phrase;\n }",
"public static void main(String[] args) {\n\n\n List<Integer> a = range(3, 19).mapToObj(Integer::valueOf).collect(toList());\n a.sort((x, y) -> (x - y));\n// System.out.println(a);\n\n List<List<String>> QUICK_THREE_OPTIONS = new ArrayList<>();\n //空 0\n QUICK_THREE_OPTIONS.add(new ArrayList<>());\n //和值 1\n final List<String> sumOptions = range(3, 19).mapToObj(String::valueOf).collect(toList());\n QUICK_THREE_OPTIONS.add(sumOptions);\n //三同号 2\n final List<String> threeSameOptions = range(1, 7).mapToObj(i -> nTimes(i, 3)).collect(toList());\n threeSameOptions.add(\"3A\");\n QUICK_THREE_OPTIONS.add(threeSameOptions);\n //二同号 3\n final List<String> twoSameOptions = range(1, 7).mapToObj(i -> nTimes(i, 2)).collect(toList());\n twoSameOptions.addAll(range(1, 7).mapToObj(String::valueOf).collect(toList()));\n twoSameOptions.addAll(range(1, 7).mapToObj(i -> nTimes(i, 2) + \"*\").collect(toList()));\n QUICK_THREE_OPTIONS.add(twoSameOptions);\n //三不同 4\n final List<String> threeDifferent = range(1, 7).mapToObj(String::valueOf).collect(toList());\n threeDifferent.add(\"3B\");\n QUICK_THREE_OPTIONS.add(threeDifferent);\n //二不同 5\n final List<String> twoDifferent = range(1, 7).mapToObj(String::valueOf).collect(toList());\n QUICK_THREE_OPTIONS.add(twoDifferent);\n\n// System.out.println(QUICK_THREE_OPTIONS);\n\n List<List<String>> ELEVEN_C_FIVE_OPTIONS = new ArrayList<>();\n\n //组合选项\n ELEVEN_C_FIVE_OPTIONS.add(IntStream.range(1, 12).mapToObj(i -> String.format(\"%02d\", i)).collect(toList()));\n //前二直选\n final List<String> frontTwoDirect = new ArrayList<>();\n frontTwoDirect.addAll(IntStream.range(1, 12).mapToObj(i -> \"a\" + String.format(\"%02d\", i)).collect(toList()));\n frontTwoDirect.addAll(IntStream.range(1, 12).mapToObj(i -> \"b\" + String.format(\"%02d\", i)).collect(toList()));\n ELEVEN_C_FIVE_OPTIONS.add(frontTwoDirect);\n //前三直选\n final List<String> frontThreeDirect = new ArrayList<>();\n frontThreeDirect.addAll(IntStream.range(1, 12).mapToObj(i -> \"a\" + String.format(\"%02d\", i)).collect(toList()));\n frontThreeDirect.addAll(IntStream.range(1, 12).mapToObj(i -> \"b\" + String.format(\"%02d\", i)).collect(toList()));\n frontThreeDirect.addAll(IntStream.range(1, 12).mapToObj(i -> \"c\" + String.format(\"%02d\", i)).collect(toList()));\n ELEVEN_C_FIVE_OPTIONS.add(frontThreeDirect);\n\n final int TWENTY_C_FIVE_SAN_GUO_SHI_LI = 1;\n final int TWENTY_C_FIVE_SAN_GUO_FIVE = 2;\n final int TWENTY_C_FIVE_SAN_GUO_EIGHT = 3;\n final int TWENTY_C_FIVE_SAN_GUO_FRONT_THREE_DIRECT = 4;\n final List<List<String>> TWENTY_C_FIVE_SAN_GUO_OPTIONS = new ArrayList<>();\n\n //势力选择\n TWENTY_C_FIVE_SAN_GUO_OPTIONS.add(IntStream.range(1, 4).mapToObj(i -> String.format(\"%02d\", i)).collect(toList()));\n //组合选项\n final List<String> group = new ArrayList<>();\n group.addAll(IntStream.range(1, 21).mapToObj(i -> \"a\" + String.format(\"%02d\", i)).collect(toList()));\n group.addAll(IntStream.range(1, 4).mapToObj(i -> \"b\" + String.format(\"%02d\", i)).collect(toList()));\n TWENTY_C_FIVE_SAN_GUO_OPTIONS.add(group);\n //前三直选\n final List<String> frontThreeDirect1 = new ArrayList<>();\n frontThreeDirect1.addAll(IntStream.range(1, 21).mapToObj(i -> \"a\" + String.format(\"%02d\", i)).collect(toList()));\n frontThreeDirect1.addAll(IntStream.range(1, 21).mapToObj(i -> \"b\" + String.format(\"%02d\", i)).collect(toList()));\n frontThreeDirect1.addAll(IntStream.range(1, 21).mapToObj(i -> \"c\" + String.format(\"%02d\", i)).collect(toList()));\n frontThreeDirect1.addAll(IntStream.range(1, 4).mapToObj(i -> \"d\" + String.format(\"%02d\", i)).collect(toList()));\n TWENTY_C_FIVE_SAN_GUO_OPTIONS.add(frontThreeDirect1);\n\n// System.out.println(ELEVEN_C_FIVE_OPTIONS);\n\n List<String> s = new ArrayList<>();\n s.add(\"3\");\n s.add(\"5\");\n s.add(\"6\");\n s.add(\"7\");\n s.add(\"9\");\n// s.add(\"11\");\n// System.out.println(c);\n List<List<String>> s1 = new ArrayList<>();\n s1.add(s);\n List<String> targetNumbers = s1.stream().map(l -> join(l, \",\")).collect(toList());\n\n// System.out.println(getPermutationXSrcLists(s, 2, true));\n\n long tl = computeElevenCFiveGroup(targetNumbers.get(0));\n// System.out.println(tl);\n System.out.println(TWENTY_C_FIVE_SAN_GUO_OPTIONS);\n\n }",
"public DoubleArrayList wilcoxonTestExistingPathway(Map<String, Double> genePValueMap, List<Pathway> pathwayList, int minSize) throws Exception {\n int subPopulationSize = 0;\n DoubleArrayList pValueListInPathway = new DoubleArrayList();\n DoubleArrayList pValueListOutPathway = new DoubleArrayList();\n DoubleArrayList allPValues = new DoubleArrayList();\n\n Map<String, Float> availableGWASGeneSet = new HashMap<String, Float>();\n float geneWeight = 1;\n for (Pathway curPath : pathwayList) {\n Set<String> pGenes = curPath.getGeneSymbols();\n\n pValueListInPathway.clear();\n pValueListOutPathway.clear();\n Map<String, Float> geneSymbolWeightMap = curPath.getGeneSymbolWeightMap();\n\n for (Map.Entry<String, Float> pGeneIter : geneSymbolWeightMap.entrySet()) {\n String pGeneSymb = pGeneIter.getKey();\n //may introduce biase\n if (!genePValueMap.containsKey(pGeneSymb)) {\n continue;\n }\n if (toWeightHyst) {\n geneWeight = pGeneIter.getValue();\n }\n availableGWASGeneSet.put(pGeneSymb, geneWeight);\n Double p = genePValueMap.get(pGeneSymb);\n if (p != null) {\n pValueListInPathway.add(p);\n }\n }\n\n for (Map.Entry<String, Double> mGene : genePValueMap.entrySet()) {\n if (!pGenes.contains(mGene.getKey())) {\n pValueListOutPathway.add(mGene.getValue());\n }\n }\n\n subPopulationSize = pValueListInPathway.size();\n double[] pValuesInPathway = new double[subPopulationSize];\n for (int t = 0; t < subPopulationSize; t++) {\n pValuesInPathway[t] = pValueListInPathway.getQuick(t);\n }\n double[] pValuesOutPathway = new double[pValueListOutPathway.size()];\n for (int t = 0; t < pValuesOutPathway.length; t++) {\n pValuesOutPathway[t] = pValueListOutPathway.getQuick(t);\n }\n if (subPopulationSize > minSize) {\n MannWhitneyTest mt = new MannWhitneyTest(pValuesInPathway, pValuesOutPathway, H1.LESS_THAN);\n // WilcoxonTest wt = new WilcoxonTest(pValuesInPathway, median, H1.LESS_THAN); \n curPath.setWilcoxonPValue(mt.getSP());\n allPValues.add(curPath.getWilcoxonPValue());\n } else {\n curPath.setWilcoxonPValue(Double.NaN);\n }\n\n }\n return allPValues;\n }",
"public static <T extends Comparable<? super T>> \n void union(SLL<T> list1, SLL<T> list2,\n SLL<T> result) {\n \n SLLNode<T> iterlist1 = list1.head;\n SLLNode<T> iterlist2 = list2.head;\n \n T itemlist1=null, itemlist2=null;\n \n // get first item in each list\n if ( iterlist1 != null )\n itemlist1 = iterlist1.info;\n if( iterlist2 != null )\n itemlist2 = iterlist2.info;\n \n while ( itemlist1 != null || itemlist2 != null ) {\n\n int compareResult;\n if( itemlist1 == null ) {\n compareResult = 1;\n } else if ( itemlist2 == null ) {\n compareResult = -1;\n } else {\n compareResult = itemlist1.compareTo(itemlist2);\n }\n \n if ( compareResult == 0 ) {\n result.addToTail(itemlist1); //appending to result list \n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n \n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n } \n }\n else if ( compareResult < 0 ) { \n result.addToTail(itemlist1); //appending to result list\n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n }\n else {\n result.addToTail(itemlist2);\n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n }\n }\n } \n }",
"public static <T> void sample(List<T> inList, double prop, List<T> outList1, List<T> outList2) {\n if (prop < 0 || 1 < prop) {\n throw new IllegalStateException(\"Invalid proportion: \" + prop);\n }\n int numDev = (int) Math.ceil(prop * inList.size());\n log.info(\"Num train-as-dev examples: \" + numDev);\n boolean[] isDev = Sample.sampleWithoutReplacementBooleans(numDev, inList.size());\n for (int i = 0; i < inList.size(); i++) {\n if (isDev[i]) {\n outList1.add(inList.get(i));\n } else {\n outList2.add(inList.get(i));\n }\n }\n }",
"static int addModelGroups (List<List<Integer>> groupSources, List<List<Integer>> sourceOutputs, Map<Integer, Boolean> tupleTruth, String type) {\n\t\tif (type.equals(\"1All\")) {\n\t\t\tList<Integer> allSources = new ArrayList<Integer>();\n\t\t\tfor (int i = 0; i < sourceOutputs.size(); i++) {\n\t\t\t\tallSources.add(i);\n\t\t\t}\n\t\t\tgroupSources.add(allSources);\n\t\t\treturn 1;\n\t\t}\n\t\tif (type.equals(\"1All2Most\")) {\n\t\t\tList<Integer> allSources = new ArrayList<Integer>();\n\t\t\tfor (int i = 0; i < sourceOutputs.size(); i++) {\n\t\t\t\tallSources.add(i);\n\t\t\t}\n\t\t\tgroupSources.add(allSources);\n\t\t\tMap<Integer, List<Integer>> outputSources = new HashMap<Integer, List<Integer>>();\n\t\t\tfor (Integer sourceId = 0; sourceId < sourceOutputs.size(); sourceId++) {\n\t\t\t\tfor (Integer tupleId : sourceOutputs.get(sourceId)) {\n\t\t\t\t\tif (!outputSources.containsKey(tupleId)) {\n\t\t\t\t\t\toutputSources.put(tupleId, new ArrayList<Integer>());\n\t\t\t\t\t}\n\t\t\t\t\toutputSources.get(tupleId).add(sourceId);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSet<Integer> commonSourceSet = new HashSet<Integer>();\n\t\t\tList<Integer> commonSources = new ArrayList<Integer>();\n\t\t\tint threshold = 49;\n\t\t\tfor (Integer tupleId : outputSources.keySet()) {\n\t\t\t\tif (outputSources.get(tupleId).size() > threshold) {\n\t\t\t\t\tcommonSourceSet.addAll(outputSources.get(tupleId));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcommonSources.addAll(commonSourceSet);\n\t\t\tgroupSources.add(commonSources);\n\t\t\t//allSources.removeAll(commonSources);\n\t\t\tout.println(commonSources.size());\n\t\t\treturn groupSources.size();\n\t\t}\n\t\tif (type.equals(\"ManyTupleBased\")) {\n\t\t\tList<Integer> allSources = new ArrayList<Integer>();\n\t\t\tfor (int i = 0; i < sourceOutputs.size(); i++) {\n\t\t\t\tallSources.add(i);\n\t\t\t}\n\t\t\tgroupSources.add(allSources);\n\t\t\tMap<Integer, List<Integer>> outputSources = new HashMap<Integer, List<Integer>>();\n\t\t\tfor (Integer sourceId = 0; sourceId < sourceOutputs.size(); sourceId++) {\n\t\t\t\tfor (Integer tupleId : sourceOutputs.get(sourceId)) {\n\t\t\t\t\tif (!outputSources.containsKey(tupleId)) {\n\t\t\t\t\t\toutputSources.put(tupleId, new ArrayList<Integer>());\n\t\t\t\t\t}\n\t\t\t\t\toutputSources.get(tupleId).add(sourceId);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSet<Integer> commonSourceSet = new HashSet<Integer>();\n\t\t\tList<Integer> commonSources = new ArrayList<Integer>();\n\t\t\tint threshold = 49;\n\t\t\tfor (Integer tupleId : outputSources.keySet()) {\n\t\t\t\tif (outputSources.get(tupleId).size() > threshold) {\n\t\t\t\t\tgroupSources.add(outputSources.get(tupleId));\n\t\t\t\t}\n\t\t\t}\n\t\t\t//allSources.removeAll(commonSources);\n\t\t\tout.println(groupSources.size());\n\t\t\treturn groupSources.size();\n\t\t}\n\t\tif (type.equals(\"ManyFull\")) {\n\t\t\tint numGroups = 4;\n\t\t\tList<Integer> allSources = new ArrayList<Integer>();\n\t\t\tfor (int i = 0; i < sourceOutputs.size(); i++) {\n\t\t\t\tallSources.add(i);\n\t\t\t}\n\t\t\tfor (int k = 0; k < numGroups; k++) {\n\t\t\t\tgroupSources.add(allSources);\n\t\t\t}\n\t\t\treturn numGroups;\t\n\t\t}\n\t\tif (type.equals(\"ManyRandom\")) {\n\t\t\tint numGroups = 5;\n\t\t\tdouble density = 0.5;\n\t\t\tfor (int k = 0; k < numGroups; k++) {\n\t\t\t\tList<Integer> sources = new ArrayList<Integer>();\n\t\t\t\tfor (int i = 0; i < sourceOutputs.size(); i++) {\n\t\t\t\t\tif (Math.random() < density) {\n\t\t\t\t\t\tsources.add(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tgroupSources.add(sources);\n\t\t\t}\n\t\t\treturn numGroups;\t\n\t\t}\n\t\treturn -1;\t\n\t}",
"private Pair<Double, Double> calculateTrafficLoadAccordingToMultiCell(Pair<Double, Double> trafficValuPair) {\n\t\t// in case SNMP fail in 2nd time - test can go wrong.\n\t\tif (cellNumber != 2) {\n\t\t\tcellNumber = enbConfig.getNumberOfActiveCells(dut);\n\t\t}\n\t\tdouble cellNumDoubl = Double.valueOf(cellNumber);\n\t\tPair<Double, Double> retValues;\n\t\tDouble multiCellWA = 1.0;\n\t\tDouble ulParamModifier = 1.0;\n\t\tDouble dlParamModifier = 1.0;\n\t\tretValues = Pair.createPair(trafficValuPair.getElement0(), trafficValuPair.getElement1());\n\t\tif (this.use_Load_DL && this.use_Load_UL) {\n\t\t\tulParamModifier = this.Load_UL / 100.0;\n\t\t\tdlParamModifier = this.Load_DL / 100.0;\n\n\t\t\tString[] dlul = getCalculatorPassCriteria(radioParams);\n\t\t\tdouble calcPassCritDL = Double.parseDouble(dlul[0]);\n\t\t\tdouble calcPassCritUL = Double.parseDouble(dlul[1]);\n\n\t\t\t// get Custom Calculator loads\n\t\t\treport.report(\"using custom loads -> getting calculator values => DL : \" + calcPassCritDL + \", UL : \"\n\t\t\t\t\t+ calcPassCritUL);\n\t\t\tretValues = Pair.createPair(calcPassCritDL, calcPassCritUL);\n\t\t\t// multiple with custom Loads From JSystem\n\t\t\tretValues = Pair.createPair(retValues.getElement0() * dlParamModifier,\n\t\t\t\t\tretValues.getElement1() * ulParamModifier);\n\t\t\treport.report(\n\t\t\t\t\t\"After Multiple with Custom Modifiers => DL : \" + String.format(\"%.2f\", retValues.getElement0())\n\t\t\t\t\t\t\t+ \", UL : \" + String.format(\"%.2f\", retValues.getElement1()));\n\t\t\treport.report(\"checking if CA test and PTP test\");\n\t\t\tif (!streamsMode.equals(\"PTP\")) {\n\t\t\t\tretValues = Pair.createPair(retValues.getElement0() * cellNumber, retValues.getElement1() * cellNumber);\n\t\t\t} else {\n\t\t\t\tif (isCaTest) {\n\t\t\t\t\tretValues = Pair.createPair(retValues.getElement0() * cellNumber, retValues.getElement1());\n\t\t\t\t}\n\t\t\t}\n\t\t\treport.report(\"After checking for CA PTP test => DL : \" + String.format(\"%.2f\", retValues.getElement0())\n\t\t\t\t\t+ \", UL : \" + String.format(\"%.2f\", retValues.getElement1()));\n\n\t\t} else {\n\t\t\tretValues = Pair.createPair(doubleTo2DigitsAfterPoint(retValues.getElement0()), doubleTo2DigitsAfterPoint(retValues.getElement1()));\n\t\t\treport.report(\"using Auto Generated loads => DL : \" + retValues.getElement0() + \", UL : \"\n\t\t\t\t\t+ retValues.getElement1());\n\t\t\treport.report(\"checking if CA test and PTP test\");\n\t\t\tif (!streamsMode.equals(\"PTP\")) {\n\t\t\t\tif (cellNumDoubl > 1) { // multiple with MC WA\n\t\t\t\t\tmultiCellWA = 1.33;\n\t\t\t\t}\n\t\t\t\tretValues = multipleValuesByCellNumbers(retValues, cellNumDoubl * multiCellWA);\n\t\t\t} else {\n\t\t\t\tif (isCaTest) {\n\t\t\t\t\tretValues = Pair.createPair(retValues.getElement0() * cellNumDoubl, retValues.getElement1());\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treport.report(\"after checking for CA PTP test => DL : \" + retValues.getElement0() + \", UL : \"\n\t\t\t\t\t+ retValues.getElement1());\n\t\t}\n\t\treturn retValues;\n\t}",
"private Map<String, List<String>> getAdvancedSamplePool(List<String> candidatePool, String malpediaPath) {\n\t\tMap<String, List<String>> samplePool = new HashMap<>();\n\t\tfor(String s: candidatePool) {\n\t\t\tString tmp = s.substring(malpediaPath.length() + 1);\n\t\t\tString family = tmp.substring(0, tmp.indexOf(\"/\")).replace('.', '_');\n\t\t\tString filename = tmp.substring(tmp.lastIndexOf(\"/\") + 1);\n\t\t\tif(!samplePool.containsKey(family)) {\n\t\t\t\tsamplePool.put(family, new ArrayList<>());\n\t\t\t\tsamplePool.get(family).add(family + \"/\" + filename);\n\t\t\t} else {\n\t\t\t\tList<String> tmpVector = samplePool.get(family);\n\t\t\t\ttmpVector.add(family + \"/\" + filename);\n\t\t\t\tsamplePool.put(family, tmpVector);\n\t\t\t}\n\t\t}\n\t\treturn samplePool;\n\t}",
"private void addCombinedOccurence(List<AttributeSource> originalAttributeSources, List<Attribute> unionAttributeList,\n\t\t\tExampleSetBuilder builder, Example leftExample, Example rightExample) {\n\t\tdouble[] unionDataRow = new double[unionAttributeList.size()];\n\t\tint attributeIndex = 0;\n\t\tfor (AttributeSource attributeSource : originalAttributeSources) {\n\t\t\tif (attributeSource.getSource() == AttributeSource.FIRST_SOURCE) {\n\t\t\t\tunionDataRow[attributeIndex] = leftExample.getValue(attributeSource.getAttribute());\n\t\t\t} else if (attributeSource.getSource() == AttributeSource.SECOND_SOURCE) {\n\t\t\t\tunionDataRow[attributeIndex] = rightExample.getValue(attributeSource.getAttribute());\n\t\t\t}\n\t\t\tattributeIndex++;\n\t\t}\n\t\tbuilder.addRow(unionDataRow);\n\t}",
"public void processMatchVars(HashMap<String, List<String>> mapCandVarToMatchedVals,\n HashMap<String, List<String>> mapCandVarToAllAnsMaps,\n boolean flagSkipCTP, int indxCTP, int srcGraph, List<String> allCTPvals) {\n\n if (indxCTP == 18) {\n\n int araz = 0;\n }\n\n List<String> removeKeys = null;\n List<String> tmpPattern = null;\n List<String> newCandVals = new LinkedList<>();\n List<String> cleanCANDTP = myDedUtils.getCleanTP(DTPCandidates.get(indxCTP));\n\n //Confirm or reject variables based on matching threshold OR/AND best matching choice\n removeKeys = confirmMatchVars(mapCandVarToMatchedVals, mapCandVarToAllAnsMaps, indxCTP);\n\n for (int k = 0; k < removeKeys.size(); k++) {\n\n mapCandVarToMatchedVals.remove(removeKeys.get(k));\n }\n\n //Identify EG as NLEG and combine alternative variables and match variables to corresponding hash maps\n refineDTPmatchVars(mapCandVarToMatchedVals, mapCandVarToAllAnsMaps, indxCTP, srcGraph);\n\n //Match a CTP directly to a DTP, when no vars matched during inverse mapping\n if (mapCandVarToMatchedVals.isEmpty()) {\n\n //If values to match correspond to CTP part of a BoundJoin, that we\n //could not match because of a small Tjoin\n if (allCTPvals == null || (allCTPvals != null && allCTPvals.size() > 3)) {\n\n tmpPattern = myDedUtils.getCleanTP(allCTPs.get(indxCTP));\n if (mapCTPtoQuerySrc.get(tmpPattern) != null) {\n\n if (mapDTPToDeducedID.get(tmpPattern) == null) {\n\n mapDTPToDeducedID.put(tmpPattern, mapDTPToDeducedID.size() + 1);\n }\n\n // System.out.println(mapDTPToDeducedID.get(newDedTP));\n myBasUtils.insertToMap2(mapDTPtoInnerQuery, mapCTPtoQuerySrc.get(tmpPattern), mapDTPToDeducedID.get(tmpPattern));\n }\n\n //If CTP's subject and object are variables, we have already match\n //this as a DTP\n if (!flagSkipCTP) {\n\n myDedUtils.setDTPHashInfo(tmpPattern, indxCTP);\n allCTPvals = myDedUtils.getValuesFromCTP(indxCTP);\n flagSTOPNONPROJECTEDvars = myDedUtils.setDTPtoSrcAns(indxCTP, allCTPvals, tmpPattern, flagSTOPNONPROJECTEDvars);\n }\n\n } //If values to match correspond to singleTPs that surely are not part\n //of a BoundJoin, then match them directly as DTPs\n else if (allCTPvals.size() <= 3) {\n\n for (int i = 0; i < allCTPvals.size(); i++) {\n\n tmpPattern = myDedUtils.getNewRawTP(allCTPs.get(indxCTP), allCTPvals.get(i));\n\n if (mapCTPtoQuerySrc.get(tmpPattern) != null) {\n\n if (mapDTPToDeducedID.get(tmpPattern) == null) {\n\n mapDTPToDeducedID.put(tmpPattern, mapDTPToDeducedID.size() + 1);\n }\n\n // System.out.println(mapDTPToDeducedID.get(newDedTP));\n myBasUtils.insertToMap2(mapDTPtoInnerQuery, mapCTPtoQuerySrc.get(tmpPattern), mapDTPToDeducedID.get(tmpPattern));\n }\n\n if (!flagSkipCTP) {\n\n myDedUtils.setDTPHashInfo(tmpPattern, indxCTP);\n allCTPvals = myDedUtils.getValuesFromCTP(indxCTP);\n newCandVals = new LinkedList<>();\n newCandVals.add(allCTPvals.get(i));\n flagSTOPNONPROJECTEDvars = myDedUtils.setDTPtoSrcAns(indxCTP, allCTPvals, tmpPattern, flagSTOPNONPROJECTEDvars);\n }\n }\n }\n\n }\n\n //In any case, we must capture source endpoints of each source TP of a CTP\n //and if there is no matching variable, save each source TPs as a DTP\n for (int i = 0; i < allCTPvals.size(); i++) {\n\n tmpPattern = myDedUtils.getNewRawTP(allCTPs.get(indxCTP), allCTPvals.get(i));\n myBasUtils.insertToMap3(mapDTPToEndpsSrc, mapCTPToEndpsSrc.get(cleanCANDTP), tmpPattern);\n }\n\n }",
"public static String compareTags(ArrayList<Token> results, ArrayList<Token> goldStandard, String key, String tagType) {\r\n\r\n if (results.size() != goldStandard.size()) {\r\n System.out.println(\"Tokens list lengths differ\");\r\n }\r\n\r\n System.out.println(\"\\n\\n\\nSTARTING COMPARISON\"\r\n + \"\\n\");\r\n\r\n int trueNegatives = 0;\r\n int falseNegatives = 0;\r\n int truePositives = 0;\r\n int falsePositives = 0;\r\n int tokenMismatches = 0;\r\n\r\n //Detect mismatches on tokens which differ between results and standard\r\n //Unless both are tagged \"other\"\r\n for (int i = 0; i < results.size(); i++) {\r\n if (!results.get(i).token.equalsIgnoreCase(goldStandard.get(i).token) // && !results.get(goldIter).tagset.equalsIgnoreCase(\"Other\")\r\n // && !goldStandard.get(goldIter).tagset.equalsIgnoreCase(\"Other\")\r\n ) {\r\n tokenMismatches++;\r\n System.out.println(\"Mismatch: \" + results.get(i).toString() + \" \\t\\t \" + goldStandard.get(i).toString());\r\n System.out.println(\"Warning: Results invalid due to \" + tokenMismatches + \" token mismatches\");\r\n }\r\n\r\n if (results.get(i).tags.get(tagType).equalsIgnoreCase(key)\r\n && goldStandard.get(i).tags.get(tagType).equalsIgnoreCase(key)) {\r\n\r\n truePositives++;\r\n\r\n } else if (goldStandard.get(i).tags.get(tagType).equalsIgnoreCase(key)\r\n && !results.get(i).tags.get(tagType).equalsIgnoreCase(key)) {\r\n\r\n falseNegatives++;\r\n\r\n } else if (results.get(i).tags.get(tagType).equalsIgnoreCase(key)\r\n && !goldStandard.get(i).tags.get(tagType).equalsIgnoreCase(key)) {\r\n falsePositives++;\r\n\r\n } else {\r\n trueNegatives++;\r\n }\r\n\r\n }\r\n\r\n assert results.size() == (trueNegatives + truePositives + falseNegatives + falsePositives);\r\n\r\n double sensitivity = (double) truePositives / (double) (falseNegatives + truePositives);\r\n double specificity = (double) trueNegatives / (double) (falsePositives + trueNegatives);\r\n\r\n String report = key;\r\n report += \"\\nSampleSize = \" + results.size();\r\n report += \"\\nTruePos = \" + truePositives;\r\n report += \"\\nFalseNeg = \" + falseNegatives;\r\n report += \"\\nFalsePos = \" + falsePositives;\r\n report += \"\\nSensitivity = \" + sensitivity;\r\n report += \"\\nSpecificity = \" + specificity;\r\n\r\n return report;\r\n\r\n }",
"private List<GPairRecord<S,S>> getCrossingPairs(final Predicate<Pair<S, S>> predicate) {\n\n // get first and last terminal for each non-terminal\n Pair<S, S>[] pairs = getFirstLastMappingArray();\n\n // list of records of crossing pairs\n List<GPairRecord<S,S>> recordList = new ArrayList<>();\n\n // scan for crossing pairs in the right order\n slp.getOrderedProductions().stream().map(p -> p.getLeft()).forEach(nonTerminal -> consumeCrossingPairs(nonTerminal, recordList::add, pairs, predicate));\n return recordList;\n }",
"ArrayList<Edge> mergeHelp(ArrayList<Edge> l) {\n if (l.size() <= 1) {\n return l;\n }\n ArrayList<Edge> l1 = new ArrayList<Edge>();\n ArrayList<Edge> l2 = new ArrayList<Edge>();\n for (int i = 0; i < l.size() / 2; i++) {\n l1.add(l.get(i));\n }\n for (int i = l.size() / 2; i < l.size(); i++) {\n l2.add(l.get(i));\n }\n l1 = mergeHelp(l1);\n l2 = mergeHelp(l2);\n return merge(l1, l2);\n }",
"private void arrangeAttributes(List<IOutputAttribute> outputAttributesList,\r\n \t\tList<Object> list)\r\n {\r\n \tList<Object> oldList = new ArrayList<Object>();\r\n \toldList.addAll(list);\r\n \tfor(int counter = 0;counter < outputAttributesList.size();counter++)\r\n \t{\r\n \t\tAttributeInterface attribute = outputAttributesList.get(counter).getAttribute();\r\n \t\tString value = edu.wustl.query.util.global.Utility.getTagValue(attribute,Constants.TAGGED_VALUE_RESULTVIEW);\r\n \t\tif(attribute.getName().equals(Constants.ID)\r\n \t\t&& attribute.getEntity().getName().equals(Constants.MED_ENTITY_NAME))\r\n \t\t{\r\n \t\t\tString conceptName = \"\";\r\n \t\t\tif (oldList.get(counter) != null)\r\n \t\t\t{\r\n \t\t\t\tconceptName = MedLookUpManager.instance().\r\n \t\t\t\t\tgetConceptName( outputAttributesList.get(counter),(String)(oldList.get(counter)));\r\n \t\t\t}\r\n \t\t\toldList.set(counter,conceptName);\r\n \t\t\tvalue = edu.wustl.query.util.global.Utility.getTagValue(outputAttributesList.get(counter).getExpression().\r\n \t\t \tgetQueryEntity().getDynamicExtensionsEntity(),Constants.TAGGED_VALUE_RESULTORDER);\r\n \t\t}\r\n \t\tif(!value.equals(\"\"))\r\n \t\t{\r\n \t\t\tlist.set(Integer.valueOf(value).intValue(),oldList.get(counter));\r\n \t\t}\r\n \t}\r\n }",
"public static void verifyGroupListEquals(ImList<GuideGroup> lst1, ImList<GuideGroup> lst2) {\n assertEquals(lst1.size(), lst2.size());\n for (int i=0; i<lst1.size(); ++i) verifyGroupEquals(lst1.get(i), lst2.get(i));\n }",
"private static boolean validos(int d1, int d2, \n\t\t\tList<Par<Integer,Integer>> v) {\n\t\tboolean result = v != null;\n\t\tfor(int i = 0 ; i < v.size() && result ; i++) {\n\t\t\tPar<Integer,Integer> p = v.get(i);\n\t\t\tresult = result && p != null;\n\t\t\tresult = result && \n\t\t\t\t\tp.primeiro() >= 0 && p.primeiro() < d1 && \n\t\t\t\t\tp.segundo() >= 0 && p.segundo() < d2;\n\t\t}\n\t\treturn result;\n\t}",
"public boolean checkDif2Level(GroupSP g1, GroupSP g2) {\n\t\tfor (Node n1 : g1.lstSP) {\n\t\t\tfor (Node n2 : g2.lstSP) {\n\t\t\t\tif (!StringUtil.isNullOrEmpty(n1.productCode) && !StringUtil.isNullOrEmpty(n2.productCode) && n1.productCode.equals(n2.productCode)) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else if (StringUtil.isNullOrEmpty(n1.productCode) && StringUtil.isNullOrEmpty(n2.productCode)) {//type\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public void checkNLFOJoin() {\n\n String extractedVar = \"\";\n String currQuery = \"\";\n List<Integer> sourceQueries = null;\n List<String> tmpTP = null;\n List<String> extractedVals = null;\n\n for (List<String> key : mapCTPtoQuerySrc.keySet()) {\n\n sourceQueries = mapCTPtoQuerySrc.get(key);\n\n for (int i = 0; i < sourceQueries.size(); i++) {\n\n currQuery = queries.get(sourceQueries.get(i));\n\n //Buuuuuuuuuuuuuug\n if (currQuery.contains(\"mass\")) {\n continue;\n }\n\n if (currQuery.contains(\"filter\") || currQuery.contains(\"FILTER\")) {\n\n extractedVals = myBasUtils.getFILTERvals(currQuery);\n extractedVar = myBasUtils.getFILTERvar(currQuery);\n\n if (extractedVals.size() >= 1) {\n\n if (key.get(0).equalsIgnoreCase(extractedVar) || key.get(2).equalsIgnoreCase(extractedVar)) {\n\n tmpTP = myDedUtils.getCleanTP(key);\n tmpTP.add(extractedVar);\n myBasUtils.insertToMap4(mapDTPtoAnsInverseMap, tmpTP, extractedVals);\n }\n }\n\n }\n\n }\n }\n\n }",
"public ArrayList<int[]> snippetList(int[][] clonePairsList, String[] tokenArray){\n\t\tArrayList<int[]> snippets = new ArrayList<int[]>();\n\t\tSet<String> hs = new HashSet<>();\n\t\tArrayList<String> snippetsTemp = new ArrayList<String>();\n\t\t\n\t\tfor(int i = 0; i < clonePairsList.length; i++){ //gets 3 tuples, CID SL EL, places into set of Strings (to avoid duplicates)\n\t\t\tint CID = clonePairsList[i][0];\n\t\t\tString startToken = tokenArray[clonePairsList[i][2]]; //SL Token\n\t\t\tString endToken = tokenArray[clonePairsList[i][3]-1]; //EL Token \n\t\t\tString[] tempStartArray = startToken.split(\"\\\\.\");\n\t\t\tString[] tempEndArray = endToken.split(\"\\\\.\");\n\t\t\tint SL = hexToDec(tempStartArray[0]); //Starting line\n\t\t\tint EL = hexToDec(tempEndArray[0]); //Ending line\n\t\t\tint length = EL - SL + 1;\n\t\t\ths.add(CID+\" \"+SL+\" \"+EL+\" \"+length);\n\t\t}\n\t\t\n\t\tsnippetsTemp.addAll(hs); //add all elements of hs to snippetsTemp so we can parse proper int values\n\t\n\t\tfor(int j = 0; j < snippetsTemp.size(); j++){ //parse the int values, place into arrayList<int[]> \n\t\t\tString[] temp = snippetsTemp.get(j).split(\"\\\\ \");\n\t\t\tint CID = Integer.parseInt(temp[0]), SL = Integer.parseInt(temp[1]), EL = Integer.parseInt(temp[2]), length = Integer.parseInt(temp[3]);\n\t\t\tint[] tempL = {CID,SL,EL,length};\n\t\t\tsnippets.add(tempL);\n\t\t}\n\t\t\n\t\tCollections.sort(snippets, new Comparator<int[]>() { //orders snippets list according to CID of arrays\n\t\t public int compare(int[] a, int[] b) {\n\t\t \treturn Integer.valueOf(a[0]).compareTo(Integer.valueOf(b[0]));\n\t\t }\n\t\t});\n\t\t\n\t\treturn snippets;\n\t}",
"private OtherChargesDTO[] combineLrcGsc(OtherChargesDTO[] lrcDTO, OtherChargesDTO[] gscDTO){\n\t\tint gscLen = 0;\n\t\tint lrcLen = 0;\n\t\tint finalLen = 0;\n\t\tArrayList<OtherChargesDTO> listGsc = null;\n\t\tOtherChargesDTO[] others = null;\n\t\t\n\t\tlrcLen = lrcDTO.length;\n\t\tgscLen = gscDTO.length;\n\t\tlistGsc = new ArrayList<OtherChargesDTO>(Arrays.asList(gscDTO));\n\t\tfor (int i = 0; i < lrcLen; i++) {\n\t\t\tfor (int j = 0; j < gscLen; j++) {\n\t\t\t\tif (gscDTO[j].getStationCode().equals(lrcDTO[i].getStationCode())) {\n\t\t\t\t\tlrcDTO[i].setGsc(gscDTO[j].getGsc());\n\t\t\t\t\tlistGsc.remove(gscDTO[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinalLen = lrcLen + listGsc.size();\n\t\tothers = new OtherChargesDTO[finalLen];\n\t\tOtherChargesDTO newGSCDTO = null;\n\t\tfor (int k = 0, l = 0; k < finalLen; k++) {\n\t\t\tothers[k] = new OtherChargesDTO();\n\t\t\tif (k < lrcLen) {\n\t\t\t\tothers[k] = lrcDTO[k];\n\t\t\t} else {\n\t\t\t\tnewGSCDTO = (OtherChargesDTO) listGsc.get(l);\n\t\t\t\tothers[k].setStationCode(newGSCDTO.getStationCode());\n\t\t\t\t//others[k].setLrCharge(0);\n\t\t\t\tothers[k].setGsc(newGSCDTO.getGsc());\n\t\t\t\tl++;\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\treturn others;\t\t\n\t}",
"private void preprocess(ArrayList<Point>[] dsg) {\n preprocessGroup = new ArrayList<>();\n for(ArrayList<Point> l:dsg){\n \tfor(Point p:l){\n \t\tif(p.layer<=constructor.k_point_GSkyline_groups&&p.getUnitGroupSize()<=constructor.k_point_GSkyline_groups){\n \t\t\tpreprocessGroup.add(p);\n \t\t}\n \t}\n }\n for(int i=0;i<preprocessGroup.size();i++){\n \tpreprocessGroup.get(i).index=i;\n }\n }",
"final public void OneMoreListMerge() throws ParseException {\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n case S_MORE:\n case MERGE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case S_MORE:\n More();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n case MERGE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n List();\n break;\n case MERGE:\n Merge();\n break;\n default:\n jj_la1[78] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[79] = jj_gen;\n ;\n }\n break;\n case LIST:\n List();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case S_MORE:\n More();\n break;\n default:\n jj_la1[80] = jj_gen;\n ;\n }\n break;\n case MERGE:\n Merge();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case S_MORE:\n More();\n break;\n default:\n jj_la1[81] = jj_gen;\n ;\n }\n break;\n default:\n jj_la1[82] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[83] = jj_gen;\n ;\n }\n break;\n case S_MORE:\n More();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n case ONE:\n case MERGE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n case MERGE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n List();\n break;\n case MERGE:\n Merge();\n break;\n default:\n jj_la1[84] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[85] = jj_gen;\n ;\n }\n break;\n case LIST:\n List();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n break;\n default:\n jj_la1[86] = jj_gen;\n ;\n }\n break;\n case MERGE:\n Merge();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n break;\n default:\n jj_la1[87] = jj_gen;\n ;\n }\n break;\n default:\n jj_la1[88] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[89] = jj_gen;\n ;\n }\n break;\n default:\n jj_la1[96] = jj_gen;\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n case MERGE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n List();\n break;\n case MERGE:\n Merge();\n break;\n default:\n jj_la1[90] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n case S_MORE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case S_MORE:\n More();\n break;\n default:\n jj_la1[91] = jj_gen;\n ;\n }\n break;\n case S_MORE:\n More();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n break;\n default:\n jj_la1[92] = jj_gen;\n ;\n }\n break;\n default:\n jj_la1[93] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[94] = jj_gen;\n ;\n }\n break;\n default:\n jj_la1[95] = jj_gen;\n ;\n }\n }\n }",
"protected GenotypesContext calculateGLsForThisEvent(final ReadLikelihoods<Allele> readLikelihoods, final VariantContext mergedVC, final List<Allele> noCallAlleles ) {\n Utils.nonNull(readLikelihoods, \"readLikelihoods\");\n Utils.nonNull(mergedVC, \"mergedVC\");\n final List<Allele> vcAlleles = mergedVC.getAlleles();\n final AlleleList<Allele> alleleList = readLikelihoods.numberOfAlleles() == vcAlleles.size() ? readLikelihoods : new IndexedAlleleList<>(vcAlleles);\n final GenotypingLikelihoods<Allele> likelihoods = genotypingModel.calculateLikelihoods(alleleList,new GenotypingData<>(ploidyModel,readLikelihoods));\n final int sampleCount = samples.numberOfSamples();\n final GenotypesContext result = GenotypesContext.create(sampleCount);\n for (int s = 0; s < sampleCount; s++) {\n result.add(new GenotypeBuilder(samples.getSample(s)).alleles(noCallAlleles).PL(likelihoods.sampleLikelihoods(s).getAsPLs()).make());\n }\n return result;\n }",
"@DataProvider(name = \"allPairs\")\n public Object[][] allPairs() {\n final List<Object[]> tests = new ArrayList<>();\n\n for (final Allele ref : Arrays.asList(refA, refC, refG, refT)){\n for (final Allele alt : Arrays.asList(altA, altC, altG, altT)){\n if (!ref.getBaseString().equals(alt.getBaseString())){\n tests.add(new Object[]{ref, alt});\n }\n }\n }\n\n return tests.toArray(new Object[][]{});\n }",
"public ArrayList<Person> hashLinearDeduplication(){\n\tArrayList<Person> unduplicated = new ArrayList<>();\n\tProbeHashMap<String, Person> map = new ProbeHashMap(SIZE);\n\t//The probe count is adapted to the implementation of the maps\n\t// and use of public instance variable probes() \n\tdouble average=0.0;\n\tint max = 0;\n\tint insertCount =0;\n\tfor(int i=0; i< this.lst.size(); i++){\n\t map.put(lst.get(i).getRef(),lst.get(i));\n\t //count insertions:\n\t insertCount++;\n\t //increment sum of probes:\n\t average += map.probes;\n\t //compute max # of probes:\n\t if ( map.probes >= max) max = map.probes;\n\t}\n\tSystem.out.println (\"Average number of probes: \"+ average/insertCount );\n\tSystem.out.println(\"Max number of probes: \"+ max);\n\tSystem.out.println(\"Load-factor: \"+ (double)map.size()/SIZE );\n\t//initialize iterator to collect singular suspects from the map:\n Iterator<Person> coll = map.values().iterator();\n\twhile(coll.hasNext()){\n\t Person suspect = coll.next();\n\t unduplicated.add(suspect);\n\t}\n\treturn unduplicated;\n }",
"private void crossMatch(int[] clientSliders, ArrayList<String[]> matchList){\r\n\t\tString[] currArr;//current match String[]\r\n\t\tint[] currentMatch = new int[]{-1,-1,-1,-1,-1,-1,-1};//holds currArr converted into int's\r\n\r\n\t\tfor(int i = 0; i < matchList.size(); i++){//go through all the matches\r\n\t\t\tcurrArr = matchList.get(i);//get current match\r\n\t\t\t\r\n\t\t\tfor(int j = 1; j < 7; j++){//convert strings to int, 1-6\r\n\t\t\t\tcurrentMatch[j] = Integer.valueOf(currArr[j]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//check whether the client values are between current match's value\r\n\t\t\tif(clientSliders[0] < currentMatch[1] || clientSliders[0] > currentMatch[2]//check pGender\r\n\t\t\t\t\t|| clientSliders[1] < currentMatch[3] || clientSliders[1] > currentMatch[4]//check pExpression\r\n\t\t\t\t\t|| clientSliders[2] < currentMatch[5] || clientSliders[2] > currentMatch[6]){//check pOrientation\r\n\t\t\t\tmatchList.remove(i);//remove match from matchList if values don't fit within\r\n\t\t\t\ti--;//compensate for removed match\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"private static <X extends TypeSystemContext<X>> ImmutableMap<TypeVariableImpl<X, ?>, TypeVariableImpl<X, ?>> getEquivalents(\n TypeParameterListImpl<X> params,\n Iterable<Map.Entry<TypeVariableImpl<X, ?>, Constraint<X>>> constraints,\n ImmutableMap<TypeVariableImpl<X, ?>, TypeVariableImpl<X, ?>> equivalentsA,\n ImmutableMap<TypeVariableImpl<X, ?>, TypeVariableImpl<X, ?>> equivalentsB) {\n final SetMultimap<TypeVariableImpl<X, ?>, TypeVariableImpl<X, ?>> subtypes = HashMultimap.create();\n for (Map.Entry<TypeVariableImpl<X, ?>, TypeVariableImpl<X, ?>> entry : Iterables.concat(equivalentsA.entrySet(),\n equivalentsB.entrySet())) {\n subtypes.put(entry.getKey(), entry.getValue());\n subtypes.put(entry.getValue(), entry.getKey());\n }\n\n for (Entry<TypeVariableImpl<X, ?>, Constraint<X>> entry : constraints) {\n final Constraint<X> c = entry.getValue();\n\n if( c.getKind() != Constraint.Kind.META && c.getBound() instanceof TypeVariableImpl<?, ?> ) {\n final TypeVariableImpl<X, ?> bound = (TypeVariableImpl<X, ?>) c.getBound();\n\n if( bound.getParameterList() != params ) {\n // contextual variabe\n } else if( c.getKind() == Constraint.Kind.LOWER) {\n subtypes.put(entry.getKey(), bound);\n } else {\n subtypes.put(bound, entry.getKey());\n }\n }\n }\n closingWrtTransitivity:\n while (true) {\n for (Map.Entry<TypeVariableImpl<X, ?>, TypeVariableImpl<X, ?>> entry : subtypes.entries()) {\n if (subtypes.putAll(entry.getKey(), subtypes.get(entry.getValue()))) {\n continue closingWrtTransitivity;\n }\n }\n\n break;\n }\n\n final Map<TypeVariableImpl<X, ?>, TypeVariableImpl<X, ?>> equivalents = new HashMap<>();\n\n equivalents.putAll(equivalentsA);\n\n for (Map.Entry<TypeVariableImpl<X, ?>, TypeVariableImpl<X, ?>> entry : equivalentsB.entrySet()) {\n if (!entry.getKey().equals(equivalents.get(entry.getValue()))) {\n equivalents.put(entry.getKey(), entry.getValue());\n }\n }\n\n for (Map.Entry<TypeVariableImpl<X, ?>, TypeVariableImpl<X, ?>> entry : subtypes.entries()) {\n final TypeVariableImpl<X, ?> key = entry.getKey();\n final TypeVariableImpl<X, ?> val = entry.getValue();\n\n if (!key.equals(val) && subtypes.containsEntry(val, key) && val.equals(equivalents.get(val))) {\n equivalents.put(key, val);\n }\n }\n normalizingEquivalents:\n while (true) {\n for (Map.Entry<TypeVariableImpl<X, ?>, TypeVariableImpl<X, ?>> entry : equivalents.entrySet()) {\n final TypeVariableImpl<X, ?> transitive = equivalents.get(entry.getValue());\n\n if (!entry.getValue().equals(transitive)) {\n equivalents.put(entry.getKey(), transitive);\n continue normalizingEquivalents;\n }\n }\n\n break;\n }\n\n return ImmutableMap.copyOf(equivalents);\n }",
"public void setLtAdAdvertiseVariationId(Integer ltAdAdvertiseVariationId) {\r\n this.ltAdAdvertiseVariationId = ltAdAdvertiseVariationId;\r\n }",
"public static ArrayList<String> joinArrayLists(ArrayList<String> EqList, ArrayList<String> sshList){\n\n\t\t\t\n\t\t\tArrayList<Integer> counteq = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> countssh = new ArrayList<Integer>();\n\t\t\t\n\t\t\tList<String> split1 = new ArrayList<String>();\n\t\t\tList<String> split2 = new ArrayList<String>();\n\t\t\t\n\t\t\tArrayList<String> combine = new ArrayList<String>();\n\t\t\t\n\t\t\t//Checks how many object exist in arrayList and addes their index to a new list\n\t\t\tfor(int i = 0;i<EqList.size();i++){\n\t\t\t\tif(EqList.get(i) == \"Object\"){\n\t\t\t\t\tcounteq.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(int j = 0;j<sshList.size();j++){\n\t\t\t\tif(sshList.get(j) == \"Object\"){\n\t\t\t\t\tcountssh.add(j);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//The size of the matrices must be equal. If it is 1, removes the ID and object index from the second matrix and addes it to the first arrayList\n\t\t\tif(counteq.size() == countssh.size()){\n\t\t\t\tif(counteq.size() == 1){\n\t\t\t\t\tif(EqList.get(1).equals(sshList.get(1))){\n\t\t\t\t\t\tEqList.remove(0);\n\t\t\t\t\t\tsshList.remove(0);\n\t\t\t\t\t\tsshList.remove(0);\n\t\t\t\t\t\tcombine.addAll(EqList);\n\t\t\t\t\t\tcombine.addAll(sshList);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//Based on the IDs of both lists, it splits both lists on the specified index and addes the two parts to the new combined matrix\n\t\t\t\t\t//The indexes are taken from the specified matrices counteq and countssh\n\t\t\t\t\tcounteq.add(EqList.size());\n\t\t\t\t\tcountssh.add(sshList.size());\n\t\t\t\t\tfor(int i = 0;i<counteq.size()-1;i++){\n\t\t\t\t\t\tfor(int j = 0;j<countssh.size()-1;j++){\n\t\t\t\t\t\t\tif(EqList.get(counteq.get(i)+1).equals(sshList.get(countssh.get(j)+1))){\n\n\t\t\t\t\t\t\t\t\tsplit1 = EqList.subList(counteq.get(i),counteq.get(i+1));\n\t\t\t\t\t\t\t\t\tsplit2 = sshList.subList(countssh.get(j)+2,countssh.get(j+1));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcombine.addAll(split1);\n\t\t\t\t\t\t\t\t\tcombine.addAll(split2);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Error! Arraylists size not the same. Please check the data\");\n\t\t\t\n\t\t\t//If any remaining object indexes are left, remove them\n\t\t\tfor(int i = 0;i<combine.size();i++){\n\t\t\t\tif(combine.get(i) == \"Object\"){\n\t\t\t\t\tcombine.remove(i);\n\t\t\t\t\ti=0;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn combine;\n\t\t}",
"public ListNode mergeTwoListsIterative(ListNode l1, ListNode l2) {\n ListNode dummy=new ListNode();\n ListNode curr=dummy;\n while(l1!=null && l2!=null){\n if(l1.val<l2.val){\n curr.next=l1;\n l1=l1.next;\n curr=curr.next;\n }\n else{\n curr.next=l2;\n l2=l2.next;\n curr=curr.next;\n }\n }\n while(l1!=null){\n curr.next=l1;\n l1=l1.next;\n curr=curr.next;\n }\n while(l2!=null){\n curr.next=l2;\n l2=l2.next;\n curr=curr.next;\n }\n return dummy.next;\n }",
"public static HashMap<String, String> simplifiedTags(List<List<TaggedWord>> taggedList) {\n HashMap<String, String> simplePOSTagged = new HashMap<>();\n for (List<TaggedWord> tags : taggedList) { // iterate over list\n for (TaggedWord taggedWord : tags) {//for each word in the sentence\n String word = taggedWord.toString().replaceFirst(\"/\\\\w+\", \"\");\n if (taggedWord.tag().equals(\"NN\") | taggedWord.tag().equals(\"NNS\") |\n taggedWord.tag().equals(\"NNP\") | taggedWord.tag().equals(\"NNPS\")) {\n simplePOSTagged.put(word, \"noun\");\n } else if (taggedWord.tag().equals(\"MD\") | taggedWord.tag().equals(\"VB\") |\n taggedWord.tag().equals(\"VBD\") | taggedWord.tag().equals(\"VBG\") |\n taggedWord.tag().equals(\"VBN\") | taggedWord.tag().equals(\"VBP\")\n | taggedWord.tag().equals(\"VBZ\")) {\n simplePOSTagged.put(word, \"verb\");\n } else if (taggedWord.tag().equals(\"JJ\") | taggedWord.tag().equals(\"JJR\") |\n taggedWord.tag().equals(\"JJS\")) {\n simplePOSTagged.put(word, \"adj\");\n } else if (taggedWord.tag().equals(\"PRP\") | taggedWord.tag().equals(\"PRP$\")) {\n simplePOSTagged.put(word, \"pron\");\n } else if (taggedWord.tag().equals(\"RB\") | taggedWord.tag().equals(\"RBR\") |\n taggedWord.tag().equals(\"RBS\")) {\n simplePOSTagged.put(word, \"adv\");\n } else if (taggedWord.tag().equals(\"CD\") | taggedWord.tag().equals(\"LS\")) {\n simplePOSTagged.put(word, \"num\");\n } else if (taggedWord.tag().equals(\"WDT\") | taggedWord.tag().equals(\"WP\") |\n taggedWord.tag().equals(\"WP$\") | taggedWord.tag().equals(\"WRB\")) {\n simplePOSTagged.put(word, \"wh\");\n } else if (taggedWord.tag().equals(\"DT\") | taggedWord.tag().equals(\"PDT\")) {\n simplePOSTagged.put(word, \"det\");\n } else if (taggedWord.tag().equals(\"CC\") | taggedWord.tag().equals(\"IN\")) {\n simplePOSTagged.put(word, \"prepconj\");\n } else {\n simplePOSTagged.put(word, \"other\");\n }\n }\n }\n return simplePOSTagged;\n }",
"@Allow(Permission.UpdateCatalog)\n public List<ProductVariant> createProductVariants(\n List<CreateProductVariantInput> input, DataFetchingEnvironment dfe) {\n RequestContext ctx = RequestContext.fromDataFetchingEnvironment(dfe);\n List<ProductVariantEntity> productVariantEntities = this.productVariantService.create(ctx, input);\n return productVariantEntities.stream()\n .map(variantEntity -> BeanMapper.map(variantEntity, ProductVariant.class))\n .collect(Collectors.toList());\n }",
"@Override\n protected void validatePipeInput(TabbedLineReader inputStream) throws IOException {\n int col1idx = inputStream.findField(this.col1Name);\n int col2idx = inputStream.findField(this.col2Name);\n // Create the pair list.\n this.pairs = new GenomePairList();\n // Now read the genome ID pairs.\n log.info(\"Reading genome pairs.\");\n for (var line : inputStream) {\n String g1 = line.get(col1idx);\n String g2 = line.get(col2idx);\n this.pairs.addPair(g1, g2);\n }\n log.info(\"{} genome pairs to process.\", this.pairs.size());\n }",
"void splitCurvesAtIntersections(ArrayList<Curve> working_loop1, ArrayList<Curve> working_loop2, double tol)\n {\n for (int i = 0; i < working_loop1.size(); i++)\n {\n Curve c1 = working_loop1.get(i);\n for (int j = 0; j < working_loop2.size(); j++)\n {\n Curve c2 = working_loop2.get(j);\n\n boolean any_splits;\n\n do\n {\n any_splits = false;\n\n ArrayList<OrderedPair<Double, Double>> ret = BRepUtil.curveCurveIntersect(c1, c2);\n\n if (ret == null)\n break;\n\n // we only count up in case the earlier entries fall close to existing splits and\n // are ignored, otherwise if the first intersection causes a split\n // we exit this loop immediately and look at the first pair from the newly inserted curve(s)\n // instead\n for (int k = 0; k < ret.size() && !any_splits; k++)\n {\n OrderedPair<Double, Double> split_points = ret.get(k);\n\n double start_dist = c1.paramCoordinateDist(c1.StartParam, split_points.First);\n double end_dist = c1.paramCoordinateDist(c1.EndParam, split_points.First);\n\n // if we are far enough from existing splits\n if (start_dist > tol && end_dist > tol)\n {\n any_splits = true;\n\n Curve c1split1 = c1.cloneWithChangedParams(c1.StartParam, split_points.First);\n Curve c1split2 = c1.cloneWithChangedParams(split_points.First, c1.EndParam);\n\n working_loop1.set(i, c1split1);\n working_loop1.add(i + 1, c1split2);\n\n // once we've split once any second split could be in either new curve\n // and also any further comparisons of the original c1 now need to be done separately on the two\n // fragments\n //\n // so all-in-all simplest seems to be to pretend the two earlier fragments were where we were\n // all along and re-start this (c1, c2) pair using them\n //\n // this will lead to a little repetition, as c1split2 will be checked against working_list2 items\n // at indices < j, but hardly seems worth worrying about for small-ish curve numbers with few splits\n c1 = c1split1;\n }\n\n start_dist = c2.paramCoordinateDist(c2.StartParam, split_points.Second);\n end_dist = c2.paramCoordinateDist(c2.EndParam, split_points.Second);\n\n // if we are far enough from existing splits\n if (start_dist > tol && end_dist > tol)\n {\n any_splits = true;\n\n Curve c2split1 = c2.cloneWithChangedParams(c2.StartParam, split_points.Second);\n Curve c2split2 = c2.cloneWithChangedParams(split_points.Second, c2.EndParam);\n\n working_loop2.set(j, c2split1);\n working_loop2.add(j + 1, c2split2);\n\n // see comment in previous if-block\n c2 = c2split1;\n }\n }\n } while (any_splits);\n }\n }\n }",
"private ExampleSetBuilder performLeftJoin(ExampleSet leftExampleSet, ExampleSet rightExampleSet,\n\t\t\tList<AttributeSource> originalAttributeSources, List<Attribute> unionAttributeList,\n\t\t\tPair<Attribute[], Attribute[]> keyAttributes, Set<DoubleArrayWrapper> matchedExamplesInRightTable)\n\t\t\t\t\tthrows ProcessStoppedException {\n\t\tExampleSetBuilder builder = ExampleSets.from(unionAttributeList);\n\n\t\tAttribute[] leftKeyAttributes = null;\n\t\tAttribute[] rightKeyAttributes = null;\n\t\tMap<DoubleArrayWrapper, List<Example>> rightKeyMapping = null;\n\t\tboolean useId = getParameterAsBoolean(PARAMETER_USE_ID);\n\n\t\tleftKeyAttributes = keyAttributes.getFirst();\n\t\trightKeyAttributes = keyAttributes.getSecond();\n\t\tif (!useId) {\n\t\t\t// create key mapping for right example set\n\t\t\trightKeyMapping = createKeyMapping(rightExampleSet, rightKeyAttributes, leftKeyAttributes);\n\t\t}\n\n\t\tint progressCounter = 0;\n\t\t// iterate over all example from left table and search for matching examples in right table:\n\t\tfor (Example leftExample : leftExampleSet) {\n\t\t\tList<Example> matchingRightExamples = getMatchingExamples(leftExampleSet, rightExampleSet, leftKeyAttributes,\n\t\t\t\t\trightKeyMapping, useId, leftExample);\n\n\t\t\tif (matchingRightExamples != null) {\n\t\t\t\t// add combination of left example and all matching right examples\n\t\t\t\tfor (Example rightExample : matchingRightExamples) {\n\t\t\t\t\taddCombinedOccurence(originalAttributeSources, unionAttributeList, builder, leftExample, rightExample);\n\t\t\t\t\tif (matchedExamplesInRightTable != null) {\n\t\t\t\t\t\tmatchedExamplesInRightTable\n\t\t\t\t\t\t.add(new DoubleArrayWrapper(getKeyValues(rightExample, rightKeyAttributes)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else { // no rows with this key in right table\n\t\t\t\t// insert this row with null values for the right table\n\t\t\t\taddLeftOnlyOccurence(originalAttributeSources, unionAttributeList, builder, leftExample);\n\t\t\t}\n\t\t\t// trigger operator progress every 100 examples\n\t\t\t++progressCounter;\n\t\t\tif (progressCounter % 100 == 0) {\n\t\t\t\tgetProgress().step(100);\n\t\t\t\tprogressCounter = 0;\n\t\t\t}\n\t\t}\n\t\treturn builder;\n\t}",
"void modusponens(){\n\t\tHashMap<String,HashSet<Hypothesis> > temp_lhs_hypo = new HashMap<String,HashSet<Hypothesis> >();\n\t\tHashSet<Hypothesis> new_hypos = new HashSet<Hypothesis>();\n\t\t\n\t\t//Utils.println(\"hypothesis list\");\n\t\tIterator it = hypothesis.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry pairs = (Map.Entry)it.next();\n\t String A = (String)pairs.getKey();\n\t //Utils.println(\"hypothesis A : \"+A);\n\t HashSet<Hypothesis> A_B = new_lhs_hypo.get(A);\n\t if(A_B == null) {\n\t \t//Utils.println(\"No match\");\n\t \tcontinue;\n\t \t}\n\t else{\n\t \t//Utils.println(\"Matched: \"+A_B.size());\n\t \tIterator bit = A_B.iterator();\n\t \twhile (bit.hasNext()) {\n\t \t Hypothesis A_B_hypo = (Hypothesis)bit.next();\n\t\t \tHypothesis mp_hypo = makeHypothesis(A_B_hypo.rhs, 1, -1, A, A_B_hypo.expression);\n\t\t \tif(mp_hypo!=null) {\n\t\t \t\tnew_hypos.add(mp_hypo);\n\t\t\t \tif(hypothesis.containsKey(mp_hypo.expression)) {\n\t\t\t \t\t//Utils.println(\"Existing MP result: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t\t \t\t//already existing\n\t\t\t\t }else{// new hypothesis has resulted\n\t\t\t\t \t//Utils.println(\"New MP result: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t\t\t }\n\t\t \t}else{\n\t\t \t\t//Utils.println(\"MP Not Valid: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t \t}\n\t\t }\n\t }\n\t }\n\t \n\t //Utils.println(\"new hypothesis list\");\n\t it = new_lhs_hypo.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry pairs = (Map.Entry)it.next();\n\t HashSet<Hypothesis> hypos = (HashSet<Hypothesis>) pairs.getValue();\n\t Iterator<Hypothesis> Ait = hypos.iterator();\n\t while(Ait.hasNext()){\n\t \tString A = ((Hypothesis)Ait.next()).expression;\n\t \t//Utils.println(\"hypothesis A : \"+A);\n\t \tHashSet<String> B_set = lhs_hypo.get(A);\n\t \tif(B_set == null){\n\t \t\t//Utils.println(\"No match\");\n\t \t\tcontinue;\n\t \t\t}\n\t \telse{\n\t \t\t//Utils.println(\"Matched: \"+B_set.size());\n\t \t\tIterator Bit = B_set.iterator();\n\t\t \twhile(Bit.hasNext()){\n\t\t \t\tString B_str = (String) Bit.next();\n\t\t \t\tString A_B_exp = Utils.expression(A, B_str);\n\t\t \t\tHypothesis mp_hypo = makeHypothesis(B_str, 1, -1, A, A_B_exp);\n\t\t \t\tif(mp_hypo!=null) {\n\t\t\t \t\tnew_hypos.add(mp_hypo);\n\t\t\t\t \tif(hypothesis.containsKey(mp_hypo.expression)) {\n\t\t\t\t \t\t//Utils.println(\"Existing MP result: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t\t \t\t//already existing\n\t\t\t\t\t }else{// new hypothesis has resulted\n\t\t\t\t\t \t//Utils.println(\"New MP result: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t\t\t }\n\t\t\t \t}else{\n\t\t\t \t\t//Utils.println(\"MP Not Valid: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t \t}\n\t\t \t}\n\t \t}\n\t \t\n\t }\n\t }\n\t \n\t //Utils.println(\"Size of new_hypos: \"+new_hypos.size());\n\t \n\t Iterator<Hypothesis> hit = new_hypos.iterator();\n\t while(hit.hasNext()){\n\t \tHypothesis mp_hypo = hit.next();\n\t \tboolean b = insertHypothesis(mp_hypo);\n\t \tif(b){\n\t \t\tHashSet<Hypothesis> temp_hypos = temp_lhs_hypo.get(mp_hypo.lhs);\n\t \tif(temp_hypos == null){\n\t \t\ttemp_hypos = new HashSet<Hypothesis>();\n\t \t\ttemp_hypos.add(mp_hypo);\n\t \t\ttemp_lhs_hypo.put(mp_hypo.lhs, temp_hypos);\n\t \t}else{\n\t \t\ttemp_hypos.add(mp_hypo);\n\t \t}\n\t \t//Utils.printHypothesis(mp_hypo);\n\t \t}\n\t }\n\t \n\n\t //Utils.println(\"Size of temp_lhs_hypo: \"+temp_lhs_hypo.size());\n\t \n\t new_lhs_hypo.clear();\n\t new_lhs_hypo = temp_lhs_hypo;\n\t if(new_lhs_hypo.size()!=0) modusponens();\n\t}",
"ArrayList<Float> polaczListy (ArrayList<Float> L1, ArrayList<Float> L2)\n\t{\n\t\tint i=L1.size();\n\t\twhile(i<Stale.horyzontCzasowy)\n\t\t{\n\t\t\tL1.add(L2.get(i));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\treturn L1;\n\t}",
"public static void mergeSort(List<Integer> values) {\r\n for (int stepSize = 2; stepSize < values.size(); stepSize *= 2) {\r\n for (int i = 0; i < values.size(); i += stepSize) {\r\n int prefixStart = i;\r\n int suffixStart = i + stepSize / 2;\r\n int suffixEnd = Math.min(values.size(), i + stepSize);\r\n merge(values, prefixStart, suffixStart, suffixEnd);\r\n } // for\r\n if (stepSize > values.size() / 2) {\r\n int prefixStart = 0;\r\n int suffixStart = stepSize;\r\n int suffixEnd = values.size();\r\n merge(values, prefixStart, suffixStart, suffixEnd);\r\n } // if\r\n //printList(values);\r\n } // for\r\n }",
"private void getOriginalAndPedalData(List<Point> originalList) {\n\t\tfor (int i = 0; i < originalList.size() - 1; i++) {\n\t\t\tPoint point = (Point) originalList.get(i);\n\t\t\tPoint pedalPoint = getSpecificPedalByPoint(point);\n\t\t\t// int result = getVectorValue(pedalPoint, point, (Point) originalList.get(i + 1));\n\t\t\t\n\t\t\tdouble tmp = getDistance(point, pedalPoint);\n\t\t\t// double tmp = getHeightDistance(point, pedalPoint);\n\t\t\t\n\t\t\tthis.countM++;\n\t\t\t\n\t\t\tthis.aij += tmp;\n\t\t\tthis.dij += tmp;\n\t\t\tthis.sij += Math.abs(tmp - (this.aij / this.countM));\n\t\t}\n\t}",
"private static List<PwPair> removeDuplicateGroupIds(List<PwPair> allPairs,\n Map<String, UrlGroup> outGroupMap) {\n List<PwPair> filteredPairs = new ArrayList<>();\n Map<String, UrlGroup> groupMap = outGroupMap;\n if (groupMap == null) {\n groupMap = new HashMap<>();\n } else {\n groupMap.clear();\n }\n\n for (PwPair pwPair : allPairs) {\n PwsResult pwsResult = pwPair.getPwsResult();\n String groupId = pwsResult.getGroupId();\n if (groupId == null || groupId.equals(\"\")) {\n // Pairs without a group are always included\n filteredPairs.add(pwPair);\n } else {\n // Create the group if it doesn't exist\n UrlGroup urlGroup = groupMap.get(groupId);\n if (urlGroup == null) {\n urlGroup = new UrlGroup(groupId);\n groupMap.put(groupId, urlGroup);\n }\n urlGroup.addPair(pwPair);\n }\n }\n\n for (UrlGroup urlGroup : groupMap.values()) {\n filteredPairs.add(urlGroup.getTopPair());\n }\n\n return filteredPairs;\n }",
"private static void _smem_lti_from_rhs_value(RhsValue rv, Set<IdentifierImpl> valid_ltis)\n {\n final RhsSymbolValue rsv = rv.asSymbolValue();\n if(rsv != null)\n {\n final IdentifierImpl sym = rsv.getSym().asIdentifier();\n if(sym != null && sym.smem_lti != 0)\n {\n valid_ltis.add(sym);\n }\n }\n else\n {\n for(RhsValue c : rv.asFunctionCall().getArguments())\n {\n _smem_lti_from_rhs_value(c, valid_ltis);\n }\n }\n }",
"public LValueExtractor(List<AtomicSegment> atomicSegments) {\r\n\t\tfor(AtomicSegment atomicSeg : atomicSegments) {\r\n\t\t\tSet<Integer> accessedLValues = this.extractSharedLValues(atomicSeg);\r\n\t\t\tList<Integer> asList = new ArrayList<>(accessedLValues);\r\n\t\t\tthis.lValuesInAtomicSegment.add(asList);\r\n\t\t}\r\n\t}",
"private void setPairs() {\r\n\t\tif (this.gragraNames.getSelectedValue() != null) {\r\n\t\t\tString nameStr = (String) this.gragraNames.getSelectedValue();\r\n\t\t\tboolean found = false;\r\n\t\t\tfor (int i = 0; i < this.treeView.getGraGras().size() && !found; i++) {\r\n\t\t\t\tEdGraGra gragra = this.treeView.getGraGras().elementAt(i);\r\n\t\t\t\tString name = nameStr;\r\n\t\t\t\tint indx = nameStr.indexOf(\"(\");\r\n\t\t\t\tif (indx != -1)\r\n\t\t\t\t\tname = nameStr.substring(0, indx);\r\n\t\t\t\t// System.out.println(nameStr+\" \"+name);\r\n\t\t\t\tif (name.equals(gragra.getName())) {\r\n\t\t\t\t\tthis.criticalPairGraGra = gragra;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (this.criticalPairGraGra == null && this.stopGraph != null)\r\n\t\t\t\tthis.criticalPairGraGra = this.stopGraph;\r\n\t\t} else if (this.stopGraph != null) {\r\n\t\t\tthis.criticalPairGraGra = this.stopGraph;\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t// 10 Tests: \n\t\tList<Integer> a1 = new List<>();\n\t\tList<Integer> b1 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\t\n\t\tList<Integer> a2 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\tList<Integer> b2 = new List<>();\n\t\t\n\t\tList<Integer> a3 = new List<>();\n\t\tList<Integer> b3 = new List<>();\n\t\t\n\t\tList<Integer> a4 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\tList<Integer> b4 = new List<>(4, new List<>(5, new List<>(6, new List<>())));\n\t\t\n\t\tList<Integer> a5 = new List<>(4, new List<>(5, new List<>(6, new List<>())));\n\t\tList<Integer> b5 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\t\n\t\tList<Integer> a6 = new List<>(1, new List<>(4, new List<>(6, new List<>()))); \n\t\tList<Integer> b6 = new List<>(5, new List<>(6, new List<>(9, new List<>())));\n\t\t\n\t\tList<Integer> a7 = new List<>(-6, new List<>(-5, new List<>(-4, new List<>())));\n\t\tList<Integer> b7 = new List<>(-3, new List<>(-2, new List<>(-1, new List<>())));\n\t\t\n\t\tList<Integer> a8 = new List<>(-2, new List<>(-1, new List<>(0, new List<>())));\n\t\tList<Integer> b8 = new List<>(-1, new List<>(0, new List<>(1, new List<>(2, new List<>()))));\n\t\t\n\t\tList<Integer> a9 = new List<>(-1, new List<>(0, new List<>(1, new List<>())));\n\t\tList<Integer> b9 = new List<>(3, new List<>(4, new List<>(5, new List<>())));\n\t\t\n\t\tList<Integer> a10 = new List<>(-1, new List<>(0, new List<>(1, new List<>())));\n\t\tList<Integer> b10 = new List<>(-1, new List<>(0, new List<>(1, new List<>())));\n\t\t\n\t\tSystem.out.println(unique(a1, b1));\n\t\tSystem.out.println(unique(a2, b2));\n\t\tSystem.out.println(unique(a3, b3));\n\t\tSystem.out.println(unique(a4, b4));\n\t\tSystem.out.println(unique(a5, b5));\n\t\tSystem.out.println(unique(a6, b6));\n\t\tSystem.out.println(unique(a7, b7));\n\t\tSystem.out.println(unique(a8, b8));\n\t\tSystem.out.println(unique(a9, b9));\n\t\tSystem.out.println(unique(a10, b10));\n\t\t\n\t}",
"@Override\r\n public int compare(Pair<Integer, Double> o1, Pair<Integer, Double> o2) {\r\n return o2.getValue().compareTo(o1.getValue());\r\n }",
"public ArrayList<ArrayList> difference (ArrayList<ArrayList> data, ArrayList<ArrayList> data2)\n {\n ArrayList<Document> docs = data.get(0);\n ArrayList<Double> relevance = data.get(1);\n ArrayList<Integer> occurrence = data.get(2);\n ArrayList<Integer> popularity = data.get(3);\n \n ArrayList<Document> docs2 = data2.get(0);\n ArrayList<Double> relevance2 = data2.get(1);\n ArrayList<Integer> occurrence2 = data2.get(2);\n ArrayList<Integer> popularity2 = data2.get(3);\n \n ArrayList<Document> docs3 = new ArrayList<>();\n ArrayList<Double> relevance3 = new ArrayList<>();\n ArrayList<Integer> occurrence3 = new ArrayList<>();\n ArrayList<Integer> popularity3 = new ArrayList<>();\n \n for(Document d: docs)\n {\n if(!docs2.contains(d))\n {\n int docIndex = docs.indexOf(d);\n docs3.add(d);\n relevance3.add(relevance.get(docIndex));\n occurrence3.add(occurrence.get(docIndex));\n popularity3.add(d.popularity);\n }\n \n }\n data = new ArrayList<ArrayList> ();\n data.add(docs3);\n data.add(relevance3);\n data.add(occurrence3);\n data.add(popularity3);\n \n return data;\n }",
"public boolean areEqual(Element element1, Element element2, HashMap<String, Integer> lengthMap, GUIState state, GUIState currentState) throws MultipleListOrGridException {\n if (!isAttributeEqual(element1, element2)) {\n return false;\n }\n\n for (int i = 0; i < max(element1.elements().size(), element2.elements().size()); i++) {\n if (i == ((Element) element1).elements().size() || i == ((Element) element2).elements().size())\n return false;\n if (element1.attributeValue(NodeAttribute.Class) != null && element2.attributeValue(NodeAttribute.Class) != null &&\n (element1.attributeValue(NodeAttribute.Class).equals(NodeAttribute.ListView) && element2.attributeValue(NodeAttribute.Class).equals(NodeAttribute.ListView)\n || element1.attributeValue(NodeAttribute.Class).equals(NodeAttribute.GridView) && element2.attributeValue(NodeAttribute.Class).equals(NodeAttribute.GridView))) {\n\n if (state.getListSize() != currentState.getListSize() && state.getGridSize() != currentState.getGridSize()) {\n currentState.setIsDynamicListAndGrid(true);\n }\n if (currentState.isDynamicListAndGrid()) {\n if (lengthMap.get(getCurrentXpath(element1, getStringList(element1))) == null)\n lengthMap.put(getCurrentXpath(element1, getStringList(element1)), 0);\n\n if (!areEqual((Element) element1.elements().get(i), (Element) element2.elements().get(i), lengthMap, state, currentState)) {\n return false;\n } else {\n int lengthValue = lengthMap.get(getCurrentXpath(element1, getStringList(element1))) + 1;\n lengthMap.put(getCurrentXpath(element1, getStringList(element1)), lengthValue);\n if (lengthMap.get(getCurrentXpath(element1, getStringList(element1))) >= maxListGridSizeThreshold) {\n this.totalListGridEquivalentStateCount++;\n state.setIsEquivalentState(true);\n if (!state.getImagelist().contains(currentState.getImagelist().get(0)))\n state.addImage(currentState.getImagelist().get(0));\n state.increaseEquivalentStateCount();\n state.setIsListAndGrid(true);\n return true;\n }\n }\n } else {\n return false;\n }\n\n } else {\n if (!areEqual((Element) element1.elements().get(i), (Element) element2.elements().get(i), lengthMap, state, currentState)) {\n return false;\n }\n }\n }\n return true;\n }",
"public void loadBookList(java.util.List<LdPublisher> ls) {\r\n final ReffererConditionBookList reffererCondition = new ReffererConditionBookList() {\r\n public void setup(LdBookCB cb) {\r\n cb.addOrderBy_PK_Asc();// Default OrderBy for Refferer.\r\n }\r\n };\r\n loadBookList(ls, reffererCondition);\r\n }",
"private static void loadXliffAlts2(List<Tuv> p_tuvs, long p_localeId, long p_targetPageId,\n String p_tuTableName, String p_tuvTableName)\n {\n try\n {\n String sql = LOAD_XLIFF_ALT_BY_TPID_LOCALE_SQL\n .replace(TUV_TABLE_PLACEHOLDER, p_tuvTableName)\n .replace(TU_TABLE_PLACEHOLDER, p_tuTableName);\n\n List<XliffAlt> xlfAlts = HibernateUtil.searchWithSql(XliffAlt.class, sql, p_localeId,\n p_targetPageId);\n\n Map<Long, Set<XliffAlt>> xlfAltMap = getXliffAltMap(xlfAlts);\n\n if (xlfAltMap != null && xlfAltMap.size() > 0)\n {\n putXliffAltIntoTuv(xlfAltMap, p_tuvs);\n }\n\n for (Tuv tuv : p_tuvs)\n {\n recordWhichTuvExtraDataAlreadyLoaded(tuv.getIdAsLong(), XLIFF_ALT);\n }\n }\n catch (Exception e)\n {\n logger.error(\"Error when loadXliffAlts2() for pageId \" + p_targetPageId + \" localeId \"\n + p_localeId, e);\n }\n }",
"public ArrayList<Person> hashDoubleDeduplication(){\n\tArrayList<Person> unduplicated1 = new ArrayList<>();\n\tDoubleHashMap<String, Person> map = new DoubleHashMap(SIZE);\n\t//The probe count is adapted to the implementation of the maps\n\t // and use of public instance variable probes() \n\tdouble average=0.0;\n\tint max = 0;\n\tint insertCount =0;\n\tfor(int i=0; i< this.lst.size(); i++){\n\t map.put(lst.get(i).getRef(),lst.get(i));\n\t //count insertions:\n\t insertCount++;\n\t //increment sum of probes:\n\t average += map.probes;\n\t //compute max # of probes:\n\t if ( map.probes >= max) max = map.probes;\n\t}\n\t//The following lines of codes were commented after usage in the first part of the assignment:\n\t//System.out.println (\"Average number of probes: \"+ average/insertCount );\n\t//System.out.println(\"Max number of probes: \"+ max);\n\t//System.out.println(\"Load-factor: \"+ (double)map.size()/SIZE );\n\t//initialize iterator to collect singular suspects from the map:\n\tIterator<Person> coll = map.values().iterator();\n\twhile(coll.hasNext()){\n\t Person suspect = coll.next();\n\t unduplicated1.add(suspect);\n\t}\n\treturn unduplicated1;\n }",
"private List<Comparison> doCompare(VM vm, Row row, String vmType) {\r\n List<Comparison> results = new ArrayList<Comparison>();\r\n\r\n for (String param : ReadFile.parametersToCompare.stringPropertyNames()) {\r\n\r\n if (paramIndexes.get(param) != null) {\r\n String resValue = getCellValue(row.getCell(paramIndexes.get(param)));\r\n\r\n if (resValue != null && datastoreUsageValues.get(param) != null) {\r\n resValue = datastoreUsageValues.get(param);\r\n if (\"Backuptool\".equals(param) && \"vm5\".equals(vm.getVm_name())) {\r\n resValue = datastoreUsageValues.get(\"NFSBackup\");\r\n }\r\n }\r\n\r\n if (resValue == null) {\r\n continue;\r\n }\r\n String vConfValue = getVConfValue(param, vm, ReadFile.parametersToCompare.getProperty(param));\r\n Comparison comparison = new Comparison();\r\n comparison.setAttribute(param);\r\n if (\"Datastore\".equals(param)) {\r\n matchStringValues(vConfValue, resValue, comparison);\r\n comparison.setComment(\"vConf value: \" + vConfValue + \", Resource sheet value: \" + resValue);\r\n } else if (\"Ext rep\".equals(param) && !openStack && !is3XL) {\r\n if (vmType.contains(\"Small\") || vmType.contains(\"Mainstream\")) {\r\n resValue = Double.toString(Double.parseDouble(resValue) / 2);\r\n } else {\r\n resValue = Double.toString(Double.parseDouble(resValue) / 4);\r\n }\r\n matchValues(vConfValue, resValue, comparison, param);\r\n comparison.setComment(\"vConf value: \" + vConfValue + \" MB, Resource sheet value: \" + resValue + \" GB\");\r\n } else if (\"vCPU\".equals(param)) {\r\n matchValues(vConfValue, resValue, comparison, param);\r\n comparison.setComment(\"vConf value: \" + vConfValue + \" GB, Resource sheet value: \" + resValue + \" GB\");\r\n } else {\r\n matchValues(vConfValue, resValue, comparison, param);\r\n comparison.setComment(\"vConf value: \" + vConfValue + \" MB, Resource sheet value: \" + resValue + \" GB\");\r\n }\r\n results.add(comparison);\r\n }\r\n }\r\n\r\n return results;\r\n }",
"private void crossProduct() {\n BaseCandidateElement[] it = o.inputObject.firstStageCandidates.values().toArray(new BaseCandidateElement[0]);\n // logger.info(Arrays.toString(it));\n for (int i = 0; i < it.length; i++) {\n for (int j = i + 1; j < it.length; j++) {\n if (PrecisConfigProperties.HIERARCHY_DIMS_ENABLED && hierarchyDimsNegation.checkIfBelongToSameHierarchyGroup(it[i], it[j]))\n continue;\n if (it[i].xor(it[j]).cardinality() == 4) {\n BitSet b = it[i].or(it[j]);\n o.inputObject.addCandidate(b);\n }\n }\n }\n }",
"protected DuplicateLoanDataVO determineBestSource (DuplicateLoanDataVO loan1, DuplicateLoanDataVO loan2)\n \t{\n \t\tString dataProviderType1 = loan1.getProviderType();\n \t\tString dataProviderType2 = loan2.getProviderType();\n \t\tif (dataProviderType1 == null)\n \t\t{\n \t\t\tdataProviderType1 = XMLParser.getNodeValue(loan1.getDocument(), \"/Award/DataProviderType\");\n \t\t\tloan1.setProviderType(dataProviderType1);\n \t\t}\n \t\tif (dataProviderType2 == null)\n \t\t{\n \t\t\tdataProviderType2 = XMLParser.getNodeValue(loan2.getDocument(), \"/Award/DataProviderType\");\n \t\t\tloan2.setProviderType(dataProviderType2);\n \t\t}\n \n \t\tString guarDate1 = loan1.getGuaranteeDate();\n \t\tString guarDate2 = loan2.getGuaranteeDate();\n \t\tif (guarDate1 == null)\n \t\t{\n \t\t\tguarDate1 = XMLParser.getNodeValue(loan1.getDocument(), \"/Award/GuarDt\");\n \t\t\tloan1.setGuaranteeDate(guarDate1);\n \t\t}\n \t\tif (guarDate2 == null)\n \t\t{\n \t\t\tguarDate2 = XMLParser.getNodeValue(loan2.getDocument(), \"/Award/GuarDt\");\n \t\t\tloan2.setGuaranteeDate(guarDate2);\n \t\t}\n \n \t\tString claimPaidDate1 = loan1.getClaimPaidDate();\n \t\tString claimPaidDate2 = loan2.getClaimPaidDate();\n \t\tif (claimPaidDate1 == null)\n \t\t{\n \t\t\tclaimPaidDate1 = XMLParser.getNodeValue(loan1.getDocument(), \"/Award/Default/ClaimPdDt\");\n \t\t\tloan1.setClaimPaidDate(claimPaidDate1);\n \t\t}\n \t\tif (claimPaidDate2 == null)\n \t\t{\n \t\t\tclaimPaidDate2 = XMLParser.getNodeValue(loan2.getDocument(), \"/Award/Default/ClaimPdDt\");\n \t\t\tloan2.setClaimPaidDate(claimPaidDate2);\n \t\t}\n \n \t\tString loanDisbStatus1 = loan1.getAwardStatus();\n \t\tString loanDisbStatus2 = loan2.getAwardStatus();\n \t\ttry\n \t\t{\n \t\t\tif (loanDisbStatus1 == null)\n \t\t\t{\n \t\t\t\tloanDisbStatus1 = determineLoanDisbursementStatus(loan1);\n \t\t\t\tloan1.setLoanDisbStatus(loanDisbStatus1);\n \t\t\t}\n \t\t\tif (loanDisbStatus2 == null)\n \t\t\t{\n \t\t\t\tloanDisbStatus2 = determineLoanDisbursementStatus(loan2);\n \t\t\t\tloan2.setLoanDisbStatus(loanDisbStatus2);\n \t\t\t}\n \t\t}\n \t\tcatch (ParsingException e)\n \t\t{\n \t\t\tlog.debug(\"Transforming Error\", e);\n \t\t\treturn loan1;\n \t\t}\n \n \t\tString guarDate = guarDate1;\n \t\tif ((guarDate1 == null || guarDate1.trim().length() <= 0 || guarDate1.equals(XMLDataTypes.BLANK_XML_DATE)) &&\n \t\t guarDate2 != null && guarDate2.trim().length() > 0 && !guarDate2.equals(XMLDataTypes.BLANK_XML_DATE))\n \t\t{\n \t\t\tguarDate = guarDate2;\n \t\t}\n \n \t\tString claimPaidDate = claimPaidDate1;\n \t\tif ((claimPaidDate1 == null || claimPaidDate1.trim().length() <= 0 || claimPaidDate1.equals(XMLDataTypes.BLANK_XML_DATE)) &&\n \t\t claimPaidDate2 != null && claimPaidDate2.trim().length() > 0 && !claimPaidDate2.equals(XMLDataTypes.BLANK_XML_DATE))\n \t\t{\n \t\t\tclaimPaidDate = claimPaidDate2;\n \t\t}\n \n \t\tString loanDisbStatus = \"\";\n \t\tif (loanDisbStatus1.equals(AggregateConstants.UNDISBURSED) ||\n \t\t loanDisbStatus2.equals(AggregateConstants.UNDISBURSED))\n \t\t{\n \t\t\tloanDisbStatus = AggregateConstants.UNDISBURSED;\n \t\t}\n \n \t\tif (loanDisbStatus1.equals(AggregateConstants.PARTIALLY_DISBURSED) ||\n \t\t loanDisbStatus2.equals(AggregateConstants.PARTIALLY_DISBURSED))\n \t\t{\n \t\t\tloanDisbStatus = AggregateConstants.PARTIALLY_DISBURSED;\n \t\t}\n \n \t\tif (loanDisbStatus1.equals(AggregateConstants.FULLY_DISBURSED) ||\n \t\t loanDisbStatus2.equals(AggregateConstants.FULLY_DISBURSED))\n \t\t{\n \t\t\tloanDisbStatus = AggregateConstants.FULLY_DISBURSED;\n \t\t}\n \n \t\tif (loanDisbStatus1.equals(AggregateConstants.FULLY_CANCELLED) ||\n \t\t loanDisbStatus2.equals(AggregateConstants.FULLY_CANCELLED))\n \t\t{\n \t\t\tloanDisbStatus = AggregateConstants.FULLY_CANCELLED;\n \t\t}\n \n \t\t// Determine category\n \n \t\tString[] priority = new String[4];\n \n \t\t// Pre-Guarantee\n \t\tif ((guarDate == null || guarDate.trim().length() == 0 || guarDate.equals(XMLDataTypes.BLANK_XML_DATE)) &&\n \t\t loanDisbStatus.equals(AggregateConstants.UNDISBURSED))\n \t\t{\n \t\t\tpriority[0] = AggregateConstants.LENDER_ORIGINATOR;\n \t\t\tpriority[1] = AggregateConstants.SCHOOL_BASED_SOFTWARE;\n \t\t\tpriority[2] = AggregateConstants.GUARANTOR;\n \t\t\tpriority[3] = AggregateConstants.LENDER_SERVICER;\n \t\t}\n \t\telse\n \t\t{\n \t\t\t// Default\n \t\t\tif (claimPaidDate != null && claimPaidDate.trim().length() > 0 && !claimPaidDate.equals(XMLDataTypes.BLANK_XML_DATE))\n \t\t\t{\n \t\t\t\tpriority[0] = AggregateConstants.GUARANTOR;\n \t\t\t\tpriority[1] = AggregateConstants.LENDER_SERVICER;\n \t\t\t\tpriority[2] = AggregateConstants.LENDER_ORIGINATOR;\n \t\t\t\tpriority[3] = \"\";\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\t// Pre-Default\n \t\t\t\tif (loanDisbStatus.equals(AggregateConstants.FULLY_CANCELLED) ||\n \t\t\t\t loanDisbStatus.equals(AggregateConstants.UNDISBURSED) ||\n \t\t\t\t loanDisbStatus.equals(AggregateConstants.PARTIALLY_DISBURSED))\n \t\t\t\t{\n \t\t\t\t\tpriority[0] = AggregateConstants.LENDER_ORIGINATOR;\n \t\t\t\t\tpriority[1] = AggregateConstants.LENDER_SERVICER;\n \t\t\t\t\tpriority[2] = AggregateConstants.GUARANTOR;\n \t\t\t\t\tpriority[3] = AggregateConstants.SCHOOL_BASED_SOFTWARE;\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\tpriority[0] = AggregateConstants.LENDER_SERVICER;\n \t\t\t\t\tpriority[1] = AggregateConstants.GUARANTOR;\n \t\t\t\t\tpriority[2] = AggregateConstants.LENDER_ORIGINATOR;\n \t\t\t\t\tpriority[3] = AggregateConstants.SCHOOL_BASED_SOFTWARE;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\tDuplicateLoanDataVO returnLoan = null;\n \t\tfor (int i = 0; i < priority.length; i++)\n \t\t{\n \t\t\tif (dataProviderType1 != null && dataProviderType1.equals(priority[i]))\n \t\t\t{\n \t\t\t\treturnLoan = loan1;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\tif (dataProviderType2 != null && dataProviderType2.equals(priority[i]))\n \t\t\t{\n \t\t\t\treturnLoan = loan2;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \n \t\treturn returnLoan;\n \t}",
"public TDropListItem combineStrategies(TDropListItem selectedItem1, TDropListItem selectedItem2);",
"public static <C> LIST<C> COMP3(C a, C b, C c, C d, LIST<C> L) {\n LIST<C> LP = L;\n if ( L == null ) {\n LP = new LIST<C>();\n }\n LP.list.addFirst( d );\n LP.list.addFirst( c );\n LP.list.addFirst( b );\n LP.list.addFirst( a );\n return LP;\n }",
"private List<Pair<Tuple, String>> randomSampleFromList(List<Pair<Tuple, String>> list, int sampleSize, boolean withReplacement,\n\t\t\tRandom randomGenerator) {\n\t\tList<Pair<Tuple, String>> sample = new ArrayList<Pair<Tuple, String>>();\n\n\t\tif (list.size() <= sampleSize) {\n\t\t\tsample.addAll(list);\n\t\t} else {\n\t\t\tSet<Integer> usedIndexes = new HashSet<Integer>();\n\t\t\tint resultsCounter = 0;\n\t\t\twhile (resultsCounter < sampleSize) {\n\t\t\t\tint randomIndex = randomGenerator.nextInt(list.size());\n\t\t\t\tif (withReplacement || !usedIndexes.contains(randomIndex)) {\n\t\t\t\t\tsample.add(list.get(randomIndex));\n\t\t\t\t\tresultsCounter++;\n\t\t\t\t\tusedIndexes.add(randomIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn sample;\n\t}",
"private static List<Filter> enumAtomicFiltersLR(List<ValNode> L, List<ValNode> R, EnumContext ec, boolean allowExists) {\n // L contains all left values, and R contains all right values in a comparator\n List<Filter> atomics = new ArrayList<>();\n for (ValNode l : L) {\n for (ValNode r : R) {\n if (l.equalsToValNode(r)) continue;\n if (l instanceof ConstantVal && r instanceof ConstantVal) continue;\n\n if (l.getType(ec).equals(r.getType(ec))) {\n if (l.getType(ec).equals(ValType.DateVal) || l.getType(ec).equals(ValType.NumberVal)) {\n for (BiFunction<Value, Value, Boolean> func : VVComparator.getAllFunctions()) {\n atomics.add(new VVComparator(Arrays.asList(l, r), func));\n }\n } else {\n atomics.add(new VVComparator(Arrays.asList(l, r), VVComparator.eq));\n atomics.add(new VVComparator(Arrays.asList(l, r), VVComparator.neq));\n\n }\n }\n }\n }\n\n // Enumerate Filter with EXISTS clause, we don't want exists to\n if (allowExists) {\n List<ValNode> allValues = new ArrayList<>();\n allValues.addAll(L);\n allValues.addAll(R);\n allValues.addAll(ec.getValNodes());\n\n List<List<ValNode>> llvns = CombinationGenerator.genCombination(\n allValues, EnumParamTN.numberOfParams);\n for (List<ValNode> vns : llvns) {\n InstantiateEnv ie = new InstantiateEnv(vns, ec);\n atomics.addAll(\n ec.getParameterizedTables().stream().map(tn -> tn.instantiate(ie))\n .filter(t -> t.getAllHoles().size() == 0)\n .map(tn -> new ExistsFilter(tn))\n .collect(Collectors.toList()));\n // Also enumerate not exists\n atomics.addAll(\n ec.getParameterizedTables().stream().map(tn -> tn.instantiate(ie))\n .filter(t -> t.getAllHoles().size() == 0)\n .map(tn -> new ExistsFilter(tn, true))\n .collect(Collectors.toList()));\n }\n }\n\n // Add IS NULL for atomic filters\n // TODO: possibly just ignore it\n Set<ValNode> allValues = new HashSet<>();\n allValues.addAll(L);\n allValues.addAll(R);\n allValues.addAll(ec.getValNodes());\n\n for (ValNode vn : allValues) {\n if (vn instanceof ValHole)\n continue;\n atomics.add(new IsNullFilter(vn, true));\n atomics.add(new IsNullFilter(vn, false));\n }\n\n atomics.add(new EmptyFilter());\n\n return atomics;\n }",
"public void processLargeInList(Set values);",
"public ArrayList<Person> allPairsDeduplication(){\n\tArrayList<Person> unduplicated = new ArrayList<>();\n\tfor (int i=0;i<this.lst.size();i++){\n\t int dup =0;\n\t //compare each element to elements after it in the list\n\t for(int j=i+1; j< this.lst.size();j++){\n\t\tif (lst.get(i).compareTo(lst.get(j)) == 0 ) dup++;\n\t }\n\t if (dup == 0) unduplicated.add(lst.get(i));\n\t}\n\treturn unduplicated;\n }",
"private Pair<Track,Pair<List<LCRelation>,List<HelicalTrackHit>>> fitNewTrack(Track track, TrackerHit hitL1, List<LCRelation> helicalTrackHitToStripHitRelations){\n String[] strategyResources = new String[4];\n strategyResources[0] = \"/org/hps/recon/tracking/strategies/HPS_s345_c2_e16.xml\";\n strategyResources[1] = \"/org/hps/recon/tracking/strategies/HPS_s456_c3_e21.xml\";\n strategyResources[2] = \"/org/hps/recon/tracking/strategies/HPS_s123_c4_e56.xml\";\n strategyResources[3] = \"/org/hps/recon/tracking/strategies/HPS_s123_c5_e46.xml\";\n \n List<SeedStrategy> sFinallist = StrategyXMLUtils.getStrategyListFromInputStream(this.getClass().getResourceAsStream(strategyResources[0]));\n List<LCRelation> hthToStripHitRefitList = new ArrayList<LCRelation>();\n List<HelicalTrackHit> helicalHits = new ArrayList<HelicalTrackHit>();\n\n HelicalTrackStrip strip1 = null;\n HelicalTrackStrip strip2 = null;\n TrackerHit hit1 = null;\n TrackerHit hit2 = null;\n HelicalTrackHit hth = null;\n \n //Build the HelicalTrackStrip for the first layer refit\n for(LCRelation rel:helicalTrackHitToStripHitRelations){\n if(((TrackerHit) rel.getFrom()).equals(hitL1)){\n HelicalTrackStrip strip = makeDigiStrip(new SiTrackerHitStrip1D((TrackerHit) rel.getTo()));\n if(strip1 == null){\n strip1 = strip;\n hit1 = (TrackerHit) rel.getTo();\n }\n else{\n strip2 = strip;\n hit2 = (TrackerHit) rel.getTo();\n break;\n }\n }\n }\n \n //Build the HelicalTrackHit for the first layer refit\n if(strip1 != null && strip2 != null){\n HelicalTrackCross trackCross = new HelicalTrackCross(strip1,strip2);\n hth = (HelicalTrackHit) trackCross;\n helicalHits.add(hth);\n }\n \n List<TrackerHit> hits = track.getTrackerHits();\n \n //Build the HelicalTrackStrips for the remaining layers\n for(TrackerHit hit:hits){\n if(hit.equals(hits.get(0))){\n hthToStripHitRefitList.add(new BaseLCRelation(hth,hit1));\n hthToStripHitRefitList.add(new BaseLCRelation(hth,hit2));\n continue;\n }\n strip1 = null;\n strip2 = null;\n for(LCRelation rel:helicalTrackHitToStripHitRelations){\n if(checkSameHit((TrackerHit) rel.getFrom(),hit)){\n HelicalTrackStrip strip = makeDigiStrip(new SiTrackerHitStrip1D((TrackerHit) rel.getTo()));\n if(strip1 == null){\n strip1 = strip;\n hit1 = (TrackerHit) rel.getTo();\n }\n else{\n strip2 = strip;\n hit2 = (TrackerHit) rel.getTo();\n break;\n }\n }\n }\n //Build the HelicalTrackHit for the remaining layers\n if(strip1 != null && strip2 != null){\n HelicalTrackCross trackCross = new HelicalTrackCross(strip1,strip2);\n hth = (HelicalTrackHit) trackCross;\n helicalHits.add(hth);\n hthToStripHitRefitList.add(new BaseLCRelation(hth,hit1));\n hthToStripHitRefitList.add(new BaseLCRelation(hth,hit2));\n }\n }\n \n SeedCandidate trackseed = new SeedCandidate(helicalHits, sFinallist.get(0), TrackUtils.getHTF(track.getTrackStates().get(0)), bfield);\n \n // Initialize the reference point to the origin\n double[] ref = new double[] {0., 0., 0.};\n \n // Create a new SeedTrack (SeedTrack extends BaseTrack)\n SeedTrack trk = new SeedTrack();\n \n // Add the hits to the track\n for (HelicalTrackHit hit : trackseed.getHits()) {\n trk.addHit((TrackerHit) hit);\n }\n \n // Retrieve the helix and save the relevant bits of helix info\n HelicalTrackFit helix = trackseed.getHelix();\n trk.setTrackParameters(helix.parameters(), bfield); // Sets first TrackState.\n trk.setCovarianceMatrix(helix.covariance()); // Modifies first TrackState.\n trk.setChisq(helix.chisqtot());\n trk.setNDF(helix.ndf()[0]+helix.ndf()[1]);\n \n // Flag that the fit was successful and set the reference point\n trk.setFitSuccess(true);\n trk.setReferencePoint(ref); // Modifies first TrackState.\n trk.setRefPointIsDCA(true);\n \n // Set the strategy used to find this track\n trk.setStratetgy(trackseed.getSeedStrategy());\n \n // Set the SeedCandidate this track is based on\n trk.setSeedCandidate(trackseed);\n \n return new Pair<>((Track) trk,new Pair<>(hthToStripHitRefitList,helicalHits));\n }",
"public static void compare(Set<Long> recipeIdList) {\r\n\t\tHistory.newItem(SCREEN_NAME + \"&\" + PARAMETER_ID_LIST + \"=\" + Kuharija.listJoiner.join(recipeIdList));\r\n\t}",
"@Override\n public List<SDVariable> doDiff(List<SDVariable> f1) {\n List<SDVariable> out = new ArrayList<>();\n for(SDVariable v : args()){\n out.add(sameDiff.zerosLike(v));\n }\n return out;\n }",
"public static void sortStringsDictionary( ArrayList<String> lst )\n {\n PredicateStringPair p = (a, b) -> {\n String[] newA = a.split(\"\");\n String[] newB = b.split(\"\");\n int min;\n boolean mismatch = false;\n String adif = \"\";\n String bdif = \"\";\n if (a.length() < b.length()) {\n min = a.length();\n } else {\n min = b.length();\n }\n\n for (int i = 0; i < min; i++) {\n if (!newA[i].equals(newB[i])) {\n mismatch = true;\n adif = newA[i];\n bdif = newB[i];\n break;\n\n }\n }\n if (mismatch == false) {\n if(a.length() < b.length()) {\n return true;\n }\n else{\n return false;\n }\n }\n else{\n if(adif.matches(\"[a-zA-Z]\") && !bdif.matches(\"[a-zA-Z]\")) {\n return true;\n }\n else if (bdif.matches(\"[a-zA-Z]\") && !adif.matches(\"[a-zA-Z]\")) {\n return false;\n }\n else if (adif.matches(\"[a-zA-Z]\") && bdif.matches(\"[a-zA-Z]\")){\n //Automates the creation of the custom alphabetical ordering\n ArrayList<String> alph = new ArrayList<String>();\n for (int i = 0; i < 26; i++){\n alph.add(Character.toString(97 + i));\n alph.add(Character.toString(65 + i));\n }\n if (alph.indexOf(adif) < alph.indexOf(bdif)){\n return true;\n }\n else {\n return false;\n }\n }\n else {\n if (adif.compareTo(bdif) > 1) {\n return false;\n }\n else{\n return true;\n }\n\n\n }\n\n }\n\n };\n sortStrings(lst, p);\n }",
"public static void main(String[] args){\n String[] l1 = {\"Preben\", \"Morten\", \"Rudi\", \"Mikael\", \"Marianne\", \"Cecilie\"};\n String[] l2 = {\"Preben\", \"Morten\", \"Rudi\", \"Mikael\", \"Marianne\", \"Cecilie\", \"Alfa\"};\n String[] l3 = {\"Preben\", \"Morten\", \"Rudi\", \"Mikael\", \"Marianne\", \"Cecilie\", \"Alfa\"};\n String[] l4 = {\"Preben\", \"Morten\", \"Rudi\", \"Mikael\", \"Marianne\", \"Cecilie\", \"Beta\", \"Quatro\", \"Alfa\"};\n String result = checkList(l1, l2, l3,l4);\n if (result == \"\")\n System.out.println(\"No triplet\");\n else\n System.out.println(result);\n }",
"public static LinkedList merge_mass_tolerance(LinkedList list, boolean ppm, double ppm_val) {\n\t\tHashMap final_map = new HashMap();\n\t\tLinkedList mass_list = new LinkedList();\n\t\tLinkedList final_list = new LinkedList();\n\t\tIterator itr = list.iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tCOMPOUND compound1 = (COMPOUND)itr.next();\n\t\t\tdouble mass = compound1.MASS.NUM * Math.pow(10, compound1.MASS.E);\n\t\t\tif (final_map.containsKey(mass)) {\n\t\t\t\tCOMPOUND old = (COMPOUND)final_map.get(mass);\n\t\t\t\t//System.out.println(\"Merge1: \" + compound1.TOTALPROB + \"\\t\" + old.TOTALPROB);\n\t\t\t\tcompound1.TOTALPROB = add(compound1.TOTALPROB, old.TOTALPROB);\t\t\t\t\n\t\t\t\tfinal_map.put(mass, compound1);\n\t\t\t} else {\n\t\t\t\tfinal_map.put(mass, compound1);\n\t\t\t\tmass_list.add(mass);\n\t\t\t}\n\t\t}\n\t\tdouble[] double_list = new double[mass_list.size()];\n\t\tint i = 0;\n\t\titr = mass_list.iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tdouble mass = (Double)itr.next();\n\t\t\tdouble_list[i] = mass;\n\t\t\ti++;\n\t\t}\n\t\tArrays.sort(double_list);\n\t\t//System.out.println(double_list.length);\n\t\t//final_map.clear();\n\t\t\n\t\tdouble mass1 = double_list[0];;\n\t\tfor (i = 1 ;i < double_list.length; i++) {\n\t\t\t\n\t\t\tdouble mass2 = double_list[i];\n\t\t\tCOMPOUND compound1 = (COMPOUND)final_map.get(mass1);\n\t\t\tCOMPOUND compound2 = (COMPOUND)final_map.get(mass2);\n\t\t\tboolean update = false;\n\t\t\tif (ppm) {\n\t\t\t\t//System.out.println(mass1 + \"\\t\" + mass2);\n\t\t\t\t//if (check_within_ppm(compound1.MASS, compound2.MASS, new BIGNUM(10))) {\n\t\t\t\tif (check_within_ppm(compound1.MASS, compound2.MASS, new BIGNUM(ppm_val))) {\n\t\t\t\t\tupdate = true;\n\t\t\t\t\t\n\t\t\t\t\tif (isGreater(compound1.TOTALPROB, compound2.TOTALPROB)) {\n\t\t\t\t\t\t//System.out.println(\"Merge2: \" + compound1.TOTALPROB.getString() + \"\\t\" + compound2.TOTALPROB.getString());\n\t\t\t\t\t\tcompound1.TOTALPROB = add(compound1.TOTALPROB, compound2.TOTALPROB);\n\t\t\t\t\t\tfinal_map.remove(mass2);\n\t\t\t\t\t\tfinal_map.put(mass1, compound1);\t\t\n\t\t\t\t\t\tmass1 = mass1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcompound2.TOTALPROB = add(compound1.TOTALPROB, compound2.TOTALPROB);\n\t\t\t\t\t\tfinal_map.remove(mass1);\n\t\t\t\t\t\tfinal_map.put(mass2, compound2);\n\t\t\t\t\t\tmass1 = mass2;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t//System.out.println(mass1 + \"\\t\" + mass2);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//if (within_distance(compound1.MASS, compound2.MASS, new BIGNUM(0.1))) {\n\t\t\t\tif (within_distance(compound1.MASS, compound2.MASS, new BIGNUM(ppm_val))) {\n\t\t\t\t\tupdate = true;\n\t\t\t\t\tif (isGreater(compound1.TOTALPROB, compound2.TOTALPROB)) {\n\t\t\t\t\t\t//System.out.println(\"Merge2: \" + compound1.TOTALPROB.getString() + \"\\t\" + compound2.TOTALPROB.getString());\n\t\t\t\t\t\tcompound1.TOTALPROB = add(compound1.TOTALPROB, compound2.TOTALPROB);\n\t\t\t\t\t\tfinal_map.remove(mass2);\n\t\t\t\t\t\tfinal_map.put(mass1, compound1);\n\t\t\t\t\t\tmass1 = mass1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcompound2.TOTALPROB = add(compound1.TOTALPROB, compound2.TOTALPROB);\n\t\t\t\t\t\tfinal_map.remove(mass1);\n\t\t\t\t\t\tfinal_map.put(mass2, compound2);\n\t\t\t\t\t\tmass1 = mass2;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Merge2: \" + compound1.TOTALPROB.getString() + \"\\t\" + compound2.TOTALPROB.getString());\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t//System.out.println(mass1 + \"\\t\" + mass2);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!update) {\n\t\t\t\tmass1 = mass2;\n\t\t\t}\n\t\t}\n\t\t//System.out.println(final_map.size());\n\t\ti = 0;\n\t\tdouble_list = new double[final_map.size()];\n\t\titr = final_map.keySet().iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tdouble mass = (Double)itr.next();\n\t\t\tdouble_list[i] = mass;\n\t\t\ti++;\n\t\t}\n\t\tArrays.sort(double_list);\n\t\tfor (double mass: double_list) {\n\t\t\tfinal_list.add(final_map.get(mass));\n\t\t}\n\n\t\treturn final_list;\n\t}",
"@Test\n\tpublic void testSameLibDiffLocs() \n\t{\n\t\tString id = \"diffHomeLoc\";\n\t\tassertLCVol1NotLopped(id);\n\t\tassertLCVol2NotLopped(id);\n\t\tassertNoLoppedLC(id);\n\t}",
"public void compareList (List <String> customers ,List <String> listToCheck, Map<String,List<String>> amberList, Map<String,List<String>> redList ){\n for (int i=0;i<customers.size();i++){\n dataList.add(new reportData());\n dataList.get(i).customerName =customers.get(i);\n //loop through list to check looking for amber chemicals\n for (int j=0;j<listToCheck.size();j++){\n if (amberList.get(customers.get(i)).contains(listToCheck.get(j).toLowerCase().trim())){\n dataList.get(i).customerAmberList.add(listToCheck.get(j));\n \n }\n }// end of Amber for loop\n \n //loop through list to check looking for red chemicals\n for (int k=0;k<listToCheck.size();k++){\n if (redList.get(customers.get(i)).contains(listToCheck.get(k).toLowerCase().trim())){\n dataList.get(i).customerRedList.add(listToCheck.get(k));\n \n }\n }// end of Red for loop\n \n // TODO greenlist must be listToCheck - dataList.get(i).cutomerAmberList+dataList.get(i).cutomerRdeList, consider doing it in the reportdata constructor.\n //System.out.println(listToCheck);\n for (int l=0; l< listToCheck.size();l++){\n //System.out.println(listToCheck.get(l) + \" added to green list\");\n if(!redList.get(customers.get(i)).contains(listToCheck.get(l).toLowerCase().trim())&&!amberList.get(customers.get(i)).contains(listToCheck.get(l).toLowerCase().trim()) ){\n dataList.get(i).customerGreenList.add(listToCheck.get(l));\n }\n }\n \n \n \n \n }\n \n for(int m=0;m<dataList.size();m++){\n System.out.println(\"--------------------------------------------------------\");\n System.out.println(dataList.get(m).customerName);\n System.out.println(\"Banned :\" +dataList.get(m).customerRedList);\n System.out.println(\"Derogation required: \"+dataList.get(m).customerAmberList);\n System.out.println(\"Green: \"+dataList.get(m).customerGreenList);\n System.out.println(\"--------------------------------------------------------\");\n }\n \n \n }",
"public void combine(List<T> parents, List<T> result) {\n assert (parents.size() == 2);\n\n List<T> list1 = Cut(parents.get(0));// A B\n List<T> list2 = Cut(parents.get(1));// C D\n\n /*\n * insert flipped list2 in the middle of list1 so there will be A D C B\n */\n if (list2.size() < 2) {\n list1.add(1, list2.get(0));\n } else {\n list1.add(1, list2.get(0));\n list1.add(1, list2.get(1));\n }\n\n Splice(list1, result);\n }",
"private static Map<Long, Set<XliffAlt>> getXliffAltMap(List<XliffAlt> alts)\n {\n // tuvId : Set<XliffAlt>\n Map<Long, Set<XliffAlt>> xlfAltMap = new HashMap<Long, Set<XliffAlt>>();\n\n for (XliffAlt alt : alts)\n {\n Set<XliffAlt> myAlts = xlfAltMap.get(alt.getTuvId());\n if (myAlts == null)\n {\n myAlts = new HashSet<XliffAlt>();\n myAlts.add(alt);\n xlfAltMap.put(alt.getTuvId(), myAlts);\n }\n else\n {\n myAlts.add(alt);\n xlfAltMap.put(alt.getTuvId(), myAlts);\n }\n }\n\n return xlfAltMap;\n }"
] |
[
"0.5773134",
"0.4866034",
"0.47438315",
"0.47081956",
"0.4698146",
"0.46721023",
"0.4596372",
"0.45613372",
"0.4557675",
"0.4538177",
"0.45345262",
"0.45308098",
"0.45216456",
"0.44852883",
"0.44736797",
"0.44694564",
"0.44383502",
"0.44369468",
"0.44357717",
"0.44296968",
"0.43992916",
"0.43897912",
"0.4384311",
"0.4364208",
"0.43638086",
"0.43330106",
"0.43244198",
"0.43200666",
"0.42993662",
"0.42959324",
"0.42701745",
"0.4268784",
"0.4267499",
"0.42600495",
"0.42523256",
"0.42504686",
"0.42420658",
"0.4234165",
"0.42319116",
"0.4222337",
"0.422105",
"0.4216455",
"0.42125678",
"0.42106295",
"0.42047095",
"0.41966918",
"0.41961956",
"0.41854337",
"0.41836435",
"0.41790074",
"0.4169754",
"0.41685197",
"0.41657585",
"0.4163183",
"0.41548756",
"0.41459838",
"0.41395807",
"0.41331953",
"0.41255137",
"0.41185102",
"0.41131574",
"0.4110461",
"0.41096252",
"0.40980312",
"0.4092585",
"0.40871873",
"0.4085814",
"0.40840083",
"0.40750608",
"0.40727165",
"0.40715158",
"0.4070224",
"0.4065443",
"0.40634337",
"0.40625465",
"0.40578252",
"0.40531462",
"0.40443057",
"0.40434813",
"0.40429157",
"0.404084",
"0.40405405",
"0.40371794",
"0.40321997",
"0.4031537",
"0.40293157",
"0.40284556",
"0.4028281",
"0.40275383",
"0.4026653",
"0.4025679",
"0.40245962",
"0.40224782",
"0.40146425",
"0.4014286",
"0.40029094",
"0.40021107",
"0.40002042",
"0.39984906",
"0.399727"
] |
0.51546055
|
1
|
C++ rules: If final, can have an empty name. I believe this means "name" can be empty, but can still have parent namespace. TODO: check this if we change to something more than String.
|
public boolean validate() {
if (StringUtils.isEmpty(className) && !isFinal) {
return false;
}
return true;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setName(String name)\n/* */ {\n/* 368 */ this.name = name;\n/* 369 */ this.fullName = name;\n/* 370 */ this.namespace = null;\n/* */ }",
"public abstract boolean isQualifiedName(@Nullable String text);",
"private void clearName() {\n \n name_ = getDefaultInstance().getName();\n }",
"public final boolean isSimpleName() {\n return (_names.length == 1);\n }",
"private void clearName() {\n \n name_ = getDefaultInstance().getName();\n }",
"private void clearName() {\n \n name_ = getDefaultInstance().getName();\n }",
"private void clearName() {\n \n name_ = getDefaultInstance().getName();\n }",
"private static boolean validName(String name) {\n return name != null && !name.strip().isBlank();\n }",
"@Override\n public String nameAndType() {\n\t String n = \"noname\";\n\t if (name != null) {\n\t\t n=name;\n\t }\n\t return \"if \"+n+\":\";\n }",
"public abstract String getSimpleName( );",
"@Test\n public void testIsEmptyValidName() {\n FieldVerifier service = new FieldVerifier();\n String name = \"\";\n boolean result = service.isValidName(name);\n assertEquals(false, result);\n }",
"public Name createName() {\n\t\treturn null;\n\t}",
"abstract String name();",
"@Override\n public String visit(NameExpr n, Object arg) {\n return null;\n }",
"public abstract String getQualifiedName();",
"public Name getName(String arg0) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String name() {\n\t\treturn null;\n\t}",
"@Test\n\tpublic void caseNameWithEmpty() {\n\t\tString caseName = \" \";\n\t\ttry {\n\t\t\tStringNumberUtil.stringUtil(caseName);\n\t\t} catch (StringException e) {\n\t\t}\n\t}",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000004);\n name_ = getDefaultInstance().getName();\n \n return this;\n }",
"String getSimpleName();",
"String getSimpleName();",
"boolean isNameRequired();",
"static String cutName(String input) { return input.split(\" \")[0]; }",
"public boolean validateState_NameIsNotEmpty(State state,\r\n\t\t\tDiagnosticChain diagnostics, Map<Object, Object> context) {\r\n\t\tif ((state.getName() == null || state.getName().trim().length() == 0)\r\n\t\t\t\t&& !(state instanceof FinalState)) {\r\n\t\t\treturn error(state, diagnostics, ISSUE_STATE_WITHOUT_NAME);\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public void removeName(String arg0) {\n\n\t}",
"public void removeName(Name arg0) {\n\n\t}",
"SimpleName getName();",
"@NotNull\n String simpleName();",
"private boolean isNameValid(String name) {\n\n }",
"public interface Fqn {\n\n Fqn DECODE_NAMESPACE = Fqn.newInstance(\"decode\");\n Fqn RANGE = Fqn.newInstance(DECODE_NAMESPACE, ElementName.newInstanceFromMangledName(\"range\"));\n Fqn VARUINT = Fqn.newInstance(DECODE_NAMESPACE, ElementName.newInstanceFromMangledName(\"varuint\"));\n Fqn ARRAY = Fqn.newInstance(DECODE_NAMESPACE, ElementName.newInstanceFromMangledName(\"array\"));\n Fqn UNIT = Fqn.newInstance(DECODE_NAMESPACE, ElementName.newInstanceFromMangledName(\"unit\"));\n Fqn OPTION = Fqn.newInstance(DECODE_NAMESPACE, ElementName.newInstanceFromMangledName(\"option\"));\n Fqn OR = Fqn.newInstance(DECODE_NAMESPACE, ElementName.newInstanceFromMangledName(\"or\"));\n\n static Fqn newInstance(Fqn fqn, ElementName last) {\n List<ElementName> parts = Lists.newArrayList(fqn.getParts());\n parts.add(last);\n return Fqn.newInstance(parts);\n }\n\n static Fqn newInstance(String sourceText) {\n return newInstance(Stream.of(sourceText.split(Pattern.quote(\".\")))\n .map(ElementName::newInstanceFromSourceName).collect(Collectors.toList()));\n }\n\n static Fqn newInstance(List<ElementName> parts) {\n return new FqnImpl(parts);\n }\n\n List<ElementName> getParts();\n\n default String mangledNameString() {\n return getParts().stream().map(ElementName::mangledNameString).collect(Collectors.joining(\".\"));\n }\n\n default ElementName last() {\n return getParts().get(getParts().size() - 1);\n }\n\n Fqn copyDropLast();\n\n default Integer size() {\n return getParts().size();\n }\n\n default Boolean isEmpty() {\n return getParts().isEmpty();\n }\n\n}",
"private String getSimpleName(String name) {\n\t\tint i = name.lastIndexOf(\".\");\n\t\treturn name.substring(i + 1);\n\t}",
"public static String getBareName(String name) {\n\t\tif (name.indexOf(AURA_TOKEN) != -1)\n\t\t\treturn secondName(name);\n\t\tint s0 = name.lastIndexOf(FILE_SEP);\n\t\tString s = (s0 == -1) ? name : name.substring(s0 + 1);// get partial name after slash\n\t\tif (s.indexOf(META_TOKEN) != -1) {\n\t\t\tString bareName = s.replace(META_TOKEN, \"\");\n\t\t\tif (bareName == null || bareName == \"\") return \"\";\n\t\t\tint s1 = bareName.lastIndexOf('.');\n\t\t\treturn s1 == -1 ? bareName : bareName.substring(0, s1);\n\t\t} else {\n\t\t\tint s1 = s.lastIndexOf('.');\n\t\t\treturn s1 == -1 ? s : s.substring(0, s1);\n\t\t}\n\t}",
"public abstract INameSpace getNameSpace();",
"static Identifier makeTypeCons(final QualifiedName name) {\r\n if (name == null) {\r\n return null;\r\n } else {\r\n return new Identifier(Category.TYPE_CONSTRUCTOR, name);\r\n }\r\n }",
"public void setName(String newName) { throw new NotImplementedException(\"Variable names are final!\"); }",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000001);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"String getQualifiedName();",
"abstract String getName();",
"private static String reduce(final String name) {\n\t\tint index = name.lastIndexOf('.');\n\t\treturn index == -1 ? null : name.substring(0, index);\n\t}",
"public final void testNoName() {\n testTransaction1.setName(\"\");\n assertFalse(testTransaction1.isValidTransaction());\n }",
"@NotNull\n String getName();",
"public @NotNull Name newName();",
"@Override\n\tpublic String getLocalName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getLocalName() {\n\t\treturn null;\n\t}",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000004);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000004);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000004);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000004);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"@Override\n public String visit(SimpleName n, Object arg) {\n return null;\n }",
"public Builder clearName() {\n name_ = getDefaultInstance().getName();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }",
"public Builder clearName() {\n name_ = getDefaultInstance().getName();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }",
"public Builder clearName() {\n name_ = getDefaultInstance().getName();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000002);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000002);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000002);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000002);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000002);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"@Override\n public String getName() {\n return null;\n }",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000001);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"String getNameSpace();",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000001);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000001);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000001);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000001);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"public Builder clearName() {\n bitField0_ = (bitField0_ & ~0x00000001);\n name_ = getDefaultInstance().getName();\n onChanged();\n return this;\n }",
"@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}",
"@Nullable\n public abstract String name();",
"@Override\n public String getName() {\n return null;\n }",
"@Override\n public String getName() {\n return null;\n }",
"@Override\n public String getName() {\n return null;\n }",
"@Override\n public String getName() {\n return null;\n }",
"@Override\r\n\t\tpublic String getLocalName()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public Builder clearName() {\n name_ = getDefaultInstance().getName();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n return this;\n }",
"public String getName(){return null;}",
"@Override\r\n\tpublic String getName() {\r\n\t\treturn null;\r\n\t}",
"protected String getBlankNS() {\n\n return uniqueNS;\n }",
"protected String getStructureName() {\n return \"\";\n }",
"Caseless getName();",
"public Builder clearName() {\n name_ = getDefaultInstance().getName();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }",
"public Builder clearName() {\n name_ = getDefaultInstance().getName();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }",
"public String getNameWithOutTrim() {\n\t\treturn new String(name);\n\t}",
"@Test\r\n\tpublic void testNameInvalid() {\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"*\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"-\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"0-\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"324tggs\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"-feioj\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"/\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"@\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\" \"));\r\n\t}",
"@Override\r\n\tpublic String getName()\r\n\t{\n\t\treturn null;\r\n\t}",
"private static String noTag(String name) {\n Matcher tagMatcher = TAG_REGEX.matcher(name);\n if (tagMatcher.find()) {\n return tagMatcher.replaceAll(\"\").trim();\n }\n return name;\n }",
"public abstract String validateQNamePrefix(QName name)\n throws XMLStreamException;",
"private boolean isNamespace(int start, int end) {\n int i;\n int nsLen = end - start;\n int offset = tokenStart - start;\n int tokenLen = tokenEnd - tokenStart;\n\n if (tokenLen < nsLen) {\n return false;\n }\n\n for (i = start; i < end; i++) {\n if (data.charAt(i) != data.charAt(i + offset)) {\n return false;\n }\n }\n\n if (nsLen == tokenLen) {\n return true;\n }\n return data.charAt(i + offset) == '.';\n }",
"@Test\n\tpublic void test_TCC___String_String_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.UNDECLARED_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}",
"@Override\r\n\tpublic String getName() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getName() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getName() {\n\t\treturn null;\r\n\t}"
] |
[
"0.5924005",
"0.58752054",
"0.5819667",
"0.57972807",
"0.57390255",
"0.57390255",
"0.57390255",
"0.56636745",
"0.5649035",
"0.5586314",
"0.55857086",
"0.5494593",
"0.5447011",
"0.54455477",
"0.54168516",
"0.54151547",
"0.5412043",
"0.54036367",
"0.5398872",
"0.53894997",
"0.53894997",
"0.5367609",
"0.5359643",
"0.5349693",
"0.53410816",
"0.5339754",
"0.53363717",
"0.5336185",
"0.5329374",
"0.5328911",
"0.5327349",
"0.5325644",
"0.53234136",
"0.53184074",
"0.5317437",
"0.5316304",
"0.5314609",
"0.5312319",
"0.53100973",
"0.5306503",
"0.53023046",
"0.52931654",
"0.52876854",
"0.52876854",
"0.5279896",
"0.5279896",
"0.5279605",
"0.5279605",
"0.5274639",
"0.5259948",
"0.5259948",
"0.5259948",
"0.525196",
"0.525196",
"0.525196",
"0.525196",
"0.5250906",
"0.52451044",
"0.52415854",
"0.524141",
"0.52408594",
"0.52408594",
"0.52408594",
"0.52408594",
"0.52408594",
"0.5230466",
"0.5230466",
"0.5230466",
"0.5230466",
"0.5230466",
"0.5230466",
"0.5230466",
"0.5230466",
"0.5230466",
"0.5230466",
"0.5230466",
"0.5230466",
"0.5229896",
"0.5221359",
"0.5218844",
"0.5218844",
"0.5218844",
"0.52161664",
"0.5215932",
"0.5215197",
"0.52077997",
"0.5205465",
"0.5203556",
"0.5202982",
"0.52016246",
"0.52016246",
"0.51999927",
"0.51978445",
"0.5194249",
"0.5193253",
"0.51919526",
"0.519024",
"0.5182729",
"0.5182163",
"0.5182163",
"0.5182163"
] |
0.0
|
-1
|
not sure if user can see Type when returned.
|
public Type getType() {
return type;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private String getType(){\r\n return type;\r\n }",
"public String getType() {return type;}",
"protected abstract String getType();",
"public String getType() { return type; }",
"public int getType() { return type; }",
"public int getType() { return type; }",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract String getType();",
"public abstract 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 getType();",
"abstract public String getType();",
"public String getType(){\n \treturn this.type;\n }",
"@Override\n public String getType(){\n return Type;\n }",
"public String getType(){\r\n return type;\r\n }",
"@Override abstract public String type();",
"public String getType(){\n\treturn type;\n }",
"public int getType() { \n return type; \n }",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"public String type();",
"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();",
"int getType(){\n return type;\n }",
"public String getType(){\n return this.type;\n }",
"String getType() {\n return type;\n }",
"@Override\n\tpublic String type() {\n\t\treturn type;\n\t}",
"protected String getType() {\n\t\treturn type;\n\t}",
"public String getType() {\n return null; //To change body of implemented methods use File | Settings | File Templates.\n }",
"@Override\n public String getType() {\n return this.type;\n }",
"@Override\n public Type getType() {\n return type;\n }",
"@Override\n public Type getType() {\n return type;\n }",
"public String type(){\n\t\treturn type;\n\t}",
"public int getType(){\n return type;\n }",
"abstract public Type getType();",
"@Override\r\n\tpublic String getType() {\n\t\treturn type;\r\n\t}",
"public String getType() \n {\n return type;\n }",
"String getType() {\r\n return this.type;\r\n }",
"public String getType(){\r\n\t\treturn this.type;\r\n\t}",
"public String getType()\n {\n\treturn type;\n }",
"public Object getType()\r\n {\r\n\treturn type;\r\n }",
"int getType();",
"int getType();",
"int getType();",
"int getType();",
"int getType();",
"int getType();",
"int getType();",
"int getType();",
"public String getType() \n {\n return this.type;\n }",
"public String getType()\n \t{\n \t\treturn this.type;\n \t}"
] |
[
"0.80668783",
"0.7856044",
"0.7830052",
"0.77763826",
"0.7752683",
"0.7752683",
"0.76912355",
"0.76912355",
"0.76912355",
"0.76912355",
"0.76912355",
"0.76912355",
"0.76912355",
"0.76912355",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7685152",
"0.7641337",
"0.760957",
"0.76024365",
"0.75853276",
"0.75581396",
"0.7552637",
"0.7549233",
"0.75400704",
"0.75400704",
"0.75400704",
"0.75400704",
"0.75400704",
"0.75400704",
"0.75400704",
"0.75400704",
"0.75400704",
"0.75400704",
"0.75400704",
"0.75400704",
"0.75400704",
"0.7539034",
"0.7527358",
"0.7527358",
"0.7527358",
"0.7527358",
"0.7527358",
"0.7527358",
"0.7527358",
"0.7527358",
"0.7527358",
"0.7527358",
"0.7527358",
"0.7527358",
"0.7527358",
"0.751974",
"0.750889",
"0.74702",
"0.7466549",
"0.7460544",
"0.74599403",
"0.74565643",
"0.7455271",
"0.7455271",
"0.74504083",
"0.7432294",
"0.7427854",
"0.7426456",
"0.7419209",
"0.7416167",
"0.7404066",
"0.73979104",
"0.7392889",
"0.7388001",
"0.7388001",
"0.7388001",
"0.7388001",
"0.7388001",
"0.7388001",
"0.7388001",
"0.7388001",
"0.7380955",
"0.73804736"
] |
0.0
|
-1
|
TODO: Taken from PdbUtil without change. Would have had to change access on class PdbUtil and this ensureSize method to public to make it accessible. Can revert to using PdbUtil once we move this new module from Contrib to Features/PDB.
|
final static void clearComponents(Composite composite) {
if (composite instanceof Structure) {
((Structure) composite).deleteAll();
}
else {
while (composite.getNumComponents() > 0) {
composite.delete(0);
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"long dbSize();",
"public long getDbsize()\n/* */ {\n/* 79 */ return this.dbsize;\n/* */ }",
"protected void checkSize(){\n if (size == data.length){\n resize( 2 * data.length);\n }\n }",
"@Override\n public int estimateSize() {\n return 8 + 8 + 1 + 32 + 64;\n }",
"private void checkAndModifySize() {\r\n if (size == data.length * LOAD_FACTOR) {\r\n resizeAndTransfer();\r\n }\r\n }",
"long getOccupiedSize();",
"int getLostedSize();",
"@Override\n public int getSize() {\n return 64;\n }",
"public int getLocalSize();",
"@Override\n public long getSize() {\n return allocatedSize;\n }",
"int getLocalSize();",
"@Override\n public int getWriteUnsafeSize() {\n int total = UnsafeMemory.SIZE_OF_INT +UnsafeMemory.SIZE_OF_LONG;\n\n //fileName and Last\n total+=UnsafeMemory.getWriteUnsafeSize(fileName, UnsafeMemory.STRING_TYPE);\n total+=UnsafeMemory.SIZE_OF_INT;\n\n //arrays\n int debug =UnsafeMemory.getWriteUnsafeSize(nameIndex,UnsafeMemory.ARRAYLIST_STRING_TYPE);\n total+=debug;\n debug+=UnsafeMemory.getWriteUnsafeSize(entries,UnsafeMemory.ARRAYLIST_KID_TYPE);\n total+=debug;\n total+=UnsafeMemory.getWriteUnsafeSize(kingdoms,UnsafeMemory.HASHMAP_INTEGER_CHARACTER_TYPE);\n\n //No longer stored in memory\n //total+=UnsafeMemory.getWriteUnsafeSize(sequences,UnsafeMemory.ARRAYLIST_DNABITSTRING_TYPE);\n\n\n //rocksDbKlueFileName\n total += UnsafeMemory.getWriteUnsafeSize(rocksDbKlueFileName, UnsafeMemory.STRING_TYPE);\n\n //boolean readOnly = false;\n total += UnsafeMemory.SIZE_OF_BOOLEAN;\n\n //ArrayList<Integer> sequenceLength = new ArrayList<Integer>();\n total += UnsafeMemory.getWriteUnsafeSize(sequenceLength, UnsafeMemory.ARRAYLIST_INT_TYPE);\n\n //ArrayList<HashMap<Integer,Character>> exceptionsArr;\n total += UnsafeMemory.SIZE_OF_INT // byte header\n + UnsafeMemory.SIZE_OF_LONG // SerialUID\n + UnsafeMemory.SIZE_OF_INT; // number of entries\n\n for (int z=0; z < exceptionsArr.size(); z++){\n total += UnsafeMemory.getWriteUnsafeSize(exceptionsArr.get(z), UnsafeMemory.HASHMAP_INTEGER_CHARACTER_TYPE);\n }\n\n\n return total;\n }",
"private void ensureCapacity() {\n if(size() >= (0.75 * data.length)) // size() == curSize\n resize(2 * size());\n }",
"@Override\n public int getStorageSize() {\n int nCells = nRows * nCols;\n return 16 + 8 * nCells;\n }",
"int memSize() {\n return super.memSize() + 4 * 4; }",
"@Override\n\tpublic int computeSize() {\n\t\treturn 36;\n\t}",
"public static int sizeOf()\n {\n return 4;\n }",
"public static int getMaxSize(){\n\t\treturn 2* 4;\n\t}",
"public int GetSize() \n\t{\n\t\treturn numEntries; //dummy return so file would compile\n\t}",
"int fixedSize();",
"private void setMemorySize() { }",
"private void checkSize(int desiredSize)\n {\n if (desiredSize > MAX_SIZE)\n throw new IllegalStateException(\"Attempt to create a hash table \" +\n \"array whose size exceeds \" +\n \"allowed maximum.\");\n }",
"public void setSize() {\n\t\t\tthis.size = 1;\n\t\t\tint leftSize = 0;\n\t\t\tint rightSize = 0;\n\t\t\tif (this.getLeft().getKey() != -1) {\n\t\t\t\tleftSize = this.getLeft().getSize();\n\t\t\t}\n\t\t\tif (this.getRight().getKey() != -1) {\n\t\t\t\trightSize = this.getRight().getSize();\n\t\t\t}\n\t\t\tthis.size += leftSize + rightSize;\n\n\t\t\t/**\n\t\t\t * this.size = 1; int leftSize = 0; int rightSize = 0; try { leftSize =\n\t\t\t * this.getLeft().getSize(); this.size += leftSize; } catch\n\t\t\t * (NullPointerException e) { this.size += leftSize; } try { rightSize =\n\t\t\t * this.getRight().getSize(); this.size += rightSize; } catch\n\t\t\t * (NullPointerException e) { this.size += rightSize; } if (this.getSize() >\n\t\t\t * 990) { System.out.println(\"actual size is:\" + this.getSize()); }\n\t\t\t */\n\t\t}",
"public abstract long getSize(QueryOption.WhereOption... whereOptions)\n throws DatabaseSchemaException;",
"public abstract Extent getHeapSize();",
"@Override\n public long estimateSize() { return Long.MAX_VALUE; }",
"public int getSize(){\n //To be written by student\n return localSize;\n }",
"int getCurrentSize();",
"protected abstract int getMaxDesiredSize();",
"long getSize();",
"public abstract long getSize();",
"public long getRecordSize ( ) {\r\n\t\treturn 113;\r\n\t}",
"public abstract int virtualSize();",
"public abstract int getMaxIntermediateSize();",
"boolean hasTotalSize();",
"@Test\n\tpublic void testGetTableSize()\n\t{\n\t\tassertEquals(20, testStructure.getTableSize());\t\t\n\t\ttestStructure = new ConcordanceDataStructure(500);\n\t\tassertEquals(347, testStructure.getTableSize());\t\n\t}",
"@Override\n\tpublic int dbsize() {\n\t\treturn 0;\n\t}",
"@Override\n public long estimateSize() {\n return Long.MAX_VALUE;\n }",
"boolean hasSize();",
"boolean hasSize();",
"boolean hasSize();",
"boolean hasSize();",
"public abstract long estimateMemorySize();",
"public int getRecordSize()\n {\n return 4 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 4;\n }",
"public abstract String apachedb(int size);",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"public abstract long getMaxSize();",
"public int getSize() { return size; }",
"public abstract int GetSize();",
"@Test\n public void mapSize() {\n check(MAPSIZE);\n query(MAPSIZE.args(MAPENTRY.args(1, 2)), 1);\n }",
"public abstract int getSize();",
"public abstract int getSize();",
"public abstract int getSize();",
"public abstract int getSize();",
"public abstract long getSize() throws AccessException;",
"public final long getSize() { return size; }",
"public int getSize() {return size;}",
"int getLocalOnHeapSize();",
"@Override\n protected String appendSize(Column col, String typeName) {\n if (firebirdVersion != FB_VERSION_15)\n return super.appendSize(col, typeName);\n\n if (col.getType() == Types.VARCHAR\n && col.getSize() > indexedVarcharMaxSizeFB15\n && col.getTable() != null) {\n\n if (col.isPrimaryKey()) {\n col.setSize(indexedVarcharMaxSizeFB15);\n return super.appendSize(col, typeName);\n }\n Index[] indexes = col.getTable().getIndexes();\n for (Index index : indexes) {\n if (index.containsColumn(col)) {\n col.setSize(indexedVarcharMaxSizeFB15);\n return super.appendSize(col, typeName);\n }\n }\n Unique[] uniques = col.getTable().getUniques();\n for (Unique unique : uniques) {\n if (unique.containsColumn(col)) {\n col.setSize(indexedVarcharMaxSizeFB15);\n return super.appendSize(col, typeName);\n }\n }\n ForeignKey[] foreignKeys = col.getTable().getForeignKeys();\n for (ForeignKey foreignKey : foreignKeys) {\n if (foreignKey.containsColumn(col)) {\n col.setSize(indexedVarcharMaxSizeFB15);\n return super.appendSize(col, typeName);\n }\n }\n }\n return super.appendSize(col, typeName);\n }",
"private void checkStateSizes()\n\t{\n\t\tif (variableNames.size() != domainSizes.size())\n\t\t{\n\t\t\tif (DEBUG)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Variable names length = \"\n\t\t\t\t\t\t+ variableNames.size());\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"Domain size length = \" + domainSizes.size());\n\t\t\t}\n\t\t\tSystem.err.println(\"Numbers of state variables in inputs differ.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t}",
"long getLocalOnHeapSizeInBytes();",
"public int getTotalSize();",
"private void CheckStructureIntegrity() {\n int size = 0;\n for (Module mod : modules) {\n size += mod.getAddresses().size();\n logger.info(\"BBS : {} Module {}\", mod.getAddresses().size(), mod.getName());\n }\n logger.info(\"Total BBS : {}\", size);\n }",
"private void calcContentSize() {\n }",
"private void calculateMapSize() {\n calculateMapSize(true);\n }",
"public void autoSize() {\n\t\t//no op\n\t}",
"int getTotalSize();",
"public int getSize(){return _size;}",
"public long getSize();",
"protected void checkSize()\n {\n // check if pruning is required\n if (m_cCurUnits > m_cMaxUnits)\n {\n synchronized (this)\n {\n // recheck so that only one thread prunes\n if (m_cCurUnits > m_cMaxUnits)\n {\n prune();\n }\n }\n }\n }",
"long storageSize();",
"@Override\n public int getSize() { return size; }",
"private int getSize() {\n\t\t\treturn size;\n\t\t}",
"public abstract void adjustSize(long size);",
"int getLocalOffHeapSize();",
"public int getMarshalledSize()\n{\n int marshalSize = 0; \n\n marshalSize += recordType.getMarshalledSize();\n marshalSize += changeIndicator.getMarshalledSize();\n marshalSize += entityType.getMarshalledSize();\n marshalSize += 2; // padding\n marshalSize += 4; // padding1\n\n return marshalSize;\n}",
"@Override\n public long getExactSizeIfKnown() {\n return -1;\n }",
"public int getSize() {\r\n\t\treturn 5; // 1 (code) + 2 (data length) + 2 (branch offset)\r\n\t}",
"public static int size_min() {\n return (8 / 8);\n }",
"private void trimListsToSize() {\n\t\tif (geneNames instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneNames).trimToSize();\n\t\t}\n\t\tif (geneNameOffsets instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneNameOffsets).trimToSize();\n\t\t}\n\t\tif (geneStrands instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneStrands).trimToSize();\n\t\t}\n\t\tif (geneStarts instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneStarts).trimToSize();\n\t\t}\n\t\tif (geneStops instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneStops).trimToSize();\n\t\t}\n\t\tif (geneUTR5Bounds instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneUTR5Bounds).trimToSize();\n\t\t}\n\t\tif (geneUTR3Bounds instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneUTR3Bounds).trimToSize();\n\t\t}\n\t\tif (exonOffsets instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) exonOffsets).trimToSize();\n\t\t}\n\t\tif (geneScores instanceof PrimitiveList<?>) {\n\t\t\t((PrimitiveList<?>) geneScores).trimToSize();\n\t\t}\n\t}",
"@Override\n\tprotected Point getInitialSize()\n\t{\n\t\treturn new Point(373, 481);\n\t}",
"private void testSize() {\n System.out.println(\"------ TESTING: size() ----- \");\n System.out.println(\"Expected: \" +iSize);\n System.out.print(\"Returned: \");\n try{\n if(iTestList.size() != iSize)\n throw new RuntimeException(\"FAILED -> test size not matching\");\n else\n System.out.print(iTestList.size());\n }catch(RuntimeException e){\n System.out.print(e.getMessage());\n }\n System.out.print(\"\\n\");\n }",
"private long size() {\n\t\treturn 0;\n\t}",
"private boolean isSizeConsistent() { return isSizeConsistent(root); }",
"long getLocalOffHeapSizeInBytes();",
"public static void main_getSize(){\n\n System.out.println(table.size());\n\n }",
"int memSize() {\n // treat Code as free\n return BASE_NODE_SIZE + 3 * 4;\n }",
"public int getSize();",
"public int getSize();"
] |
[
"0.628811",
"0.6103294",
"0.60793006",
"0.60561025",
"0.60511625",
"0.6042876",
"0.6002059",
"0.5906338",
"0.5906193",
"0.5868248",
"0.5862396",
"0.5861885",
"0.5848065",
"0.58284056",
"0.5807259",
"0.5802717",
"0.58017087",
"0.5801145",
"0.58000857",
"0.579982",
"0.57874954",
"0.5776394",
"0.5774804",
"0.57722116",
"0.5765416",
"0.57638973",
"0.5748668",
"0.57433975",
"0.5733908",
"0.57314986",
"0.5729671",
"0.57184887",
"0.5716678",
"0.5713504",
"0.57133925",
"0.57119375",
"0.57111794",
"0.5710785",
"0.56926686",
"0.56926686",
"0.56926686",
"0.56926686",
"0.5692229",
"0.5668095",
"0.56561726",
"0.5637789",
"0.5637789",
"0.5637789",
"0.5637789",
"0.5637789",
"0.5637789",
"0.5637789",
"0.5637789",
"0.5637789",
"0.5637789",
"0.5637789",
"0.5637789",
"0.5637789",
"0.56373304",
"0.5632052",
"0.5630362",
"0.5626594",
"0.56243855",
"0.56243855",
"0.56243855",
"0.56243855",
"0.56231",
"0.56184024",
"0.56067085",
"0.5605588",
"0.5605203",
"0.5592906",
"0.55909026",
"0.5585987",
"0.557994",
"0.5578487",
"0.55699277",
"0.5569318",
"0.55660725",
"0.5558965",
"0.5556638",
"0.5554965",
"0.5550745",
"0.55504775",
"0.55462486",
"0.55357265",
"0.55323744",
"0.5530767",
"0.55244553",
"0.551908",
"0.5516007",
"0.55154866",
"0.55037034",
"0.55010563",
"0.5490506",
"0.5487516",
"0.5484173",
"0.54836506",
"0.5473361",
"0.54701924",
"0.54701924"
] |
0.0
|
-1
|
Class PDB member construction
|
ClassPdbMember(String name, DataType dataType, boolean isFlexibleArray, int offset,
String comment) {
super(name, dataType.getName(), offset, comment);
this.dataType = dataType;
this.isFlexibleArray = isFlexibleArray;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void __sep__Constructors__() {}",
"final public ppp.p1 ppp$p1$$init$S() {\r\n {\r\n \r\n //#line 4 \"C:/Users/GERALD/Desktop/distribuido/x10dt/workspace/ppp/src/ppp/p1.x10\"\r\n \r\n \r\n //#line 4 \"C:/Users/GERALD/Desktop/distribuido/x10dt/workspace/ppp/src/ppp/p1.x10\"\r\n this.__fieldInitializers_ppp_p1();\r\n }\r\n return this;\r\n }",
"Member() {}",
"private void translateConstructor( ) {\n \n Set<MethodInfoFlags> flags = EnumSet.noneOf( MethodInfoFlags.class );\n \n AVM2Method method = new AVM2Method( null, flags );\n avm2Class.avm2Class.constructor = method;\n \n AVM2MethodBody body = method.methodBody;\n body.maxStack = 1;\n body.maxRegisters = 1;\n body.maxScope = 11;\n body.scopeDepth = 10;\n \n InstructionList il = body.instructions;\n \n// il.append( OP_getlocal0 );\n// il.append( OP_pushscope );\n il.append( OP_getlocal0 );\n il.append( OP_constructsuper, 0 );\n \n// il.append( OP_findpropstrict, new AVM2QName( PUBLIC_NAMESPACE, \"drawTest\" ));\n il.append( OP_getlocal0 );\n \n il.append( OP_callpropvoid, new AVM2QName( EmptyPackage.namespace, \"drawTest\" ), 0 );\n\n il.append( OP_returnvoid );\n }",
"public StructMember() { }",
"public Member() {\r\n\t}",
"public Member() {}",
"private void addConstructors() {\n\t\tthis.rootBindingClass.getConstructor().body.line(\"super({}.class);\\n\", this.name.getTypeWithoutGenerics());\n\t\tGMethod constructor = this.rootBindingClass.getConstructor(this.name.get() + \" value\");\n\t\tconstructor.body.line(\"super({}.class);\", this.name.getTypeWithoutGenerics());\n\t\tconstructor.body.line(\"this.set(value);\");\n\t}",
"private CodeRef() {\n }",
"@Ignore\n public Proba() {\n }",
"protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }",
"private Solution() {\n /**.\n * { constructor }\n */\n }",
"private FieldInfo() {\r\n\t}",
"Reproducible newInstance();",
"private Instantiation(){}",
"public p7p2() {\n }",
"private DescriptorBuilder() {\n // empty\n \n // NOTE: No tracing is performed, since this constructor is never used\n }",
"public PPDeadType()\n {\n }",
"private Road()\n\t{\n\t\t\n\t}",
"protected CodeStub() {\n entry = new Label();\n continuation = new Label();\n }",
"public PSRelation()\n {\n }",
"protected abstract void construct();",
"Constructor() {\r\n\t\t \r\n\t }",
"public MonHoc() {\n }",
"public Snippet visit(ConstructorDeclaration n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t Snippet f1 = n.identifier.accept(this, argu);\n\t tPlasmaCode=\"\";\n\t\t\tString constructorName = f1.expType.getTypeName();\n\t\t\tmemberSig = new MethodSignature();\n\t\t\tmemberSig.methodName = constructorName;\n\n\t\t\ttempCounter = tempZero;\n\n\t n.nodeToken1.accept(this, argu);\n\t blockId = 1;\n\t\t\tcurrentBlock = 1;\n\t\t\tSnippet f3 = n.nodeOptional.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t blockId = 0;\n\t\t\tcurrentBlock = 0;\n\n\t\t\tcurrentMethod = currentClass.constructors.get(memberSig.getCompleteMethodSignature());\n\t\t\t\n\t\t\tmemberSig = null;\n\n\t\t\t\n\t\t\tString tempFormalParamList = \"\";\n\t\t\tif(f3!=null){\n\t\t\t\ttempFormalParamList += f3.returnTemp+\",\";\n\t\t\t}\n\t\t\t//f5 is added in tPlasmaCode\n\t\t\t_ret.returnTemp = generateTabs(0)+\"public \"+constructorName+\" ( \"+tempFormalParamList+\" int myUniquePlacePoint)\\n\";//+f5.returnTemp;\n\t\t\t\n\t\t\ttPlasmaCode += _ret.returnTemp;\n\t\t\tinConstructor = true;\n\t\t\t\n\t n.block.accept(this, argu);\n\t \tinConstructor = false;\n\t currentClassBody.constructors += tPlasmaCode;\n\t\t\ttPlasmaCode=\"\";\n\t return _ret;\n\t }",
"public Field() {\r\n\t}",
"protected MethodCallPrinter()\n {\n }",
"public Methods() {\n // what is this doing? -PMC\n }",
"public OOP_207(){\n\n }",
"public Member() {\n //Empty constructor!\n }",
"public Constructor(){\n\t\t\n\t}",
"public Pleasure() {\r\n\t\t}",
"private NaturePackage() {}",
"public Clade() {}",
"private LocalParameters() {\n\n\t}",
"private DBParameter() {\n }",
"public Pam() { //you dont need anything in this bc its only relvent for the class Alignment \n\n }",
"public no(np paramnp)\r\n/* 13: */ {\r\n/* 14:30 */ this.b = paramnp;\r\n/* 15: */ }",
"private Infer() {\n\n }",
"public OpDesc() {\n\n }",
"public MethodInfoImpl() {\n }",
"public SourceCode() {\n }",
"public BacInfo() {\n }",
"private SourcecodePackage() {}",
"public Pitonyak_09_02() {\r\n }",
"public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }",
"public Parameters() {\n\t}",
"public Phl() {\n }",
"public C23317d() {\n }",
"public PjxParser()\r\n {\r\n LOG.info(this + \" instantiated\");\r\n }",
"public abstract Member mo23408O();",
"public CallInfo() {\n\t}",
"public Snippet visit(MethodCallStatementInConstructor n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\", \"\", null, false);;\n\t\t\tSnippet f0 = n.methodCallInConstructor.accept(this, argu);\n\t n.nodeToken.accept(this, argu);\n\t _ret.returnTemp = f0.returnTemp + \";\";\n\t\t\ttPlasmaCode+=generateTabs(blockDepth)+_ret.returnTemp+\"\\n\";\n\t return _ret;\n\t }",
"public Purp() {\n }",
"private void initializePathBindingClass() {\n\t\t// class name\n\t\tthis.pathBindingClass = new GClass(this.name.getBindingPathClassDeclaration());\n\t\t// parent class; may be provided by configuration\n\t\tthis.pathBindingClass.baseClassName(this.name.getBindingPathClassSuperClass());\n\t\t// TODO: try to generate code without warning\n\t\tthis.pathBindingClass.addAnnotation(\"@SuppressWarnings(\\\"all\\\")\");\n\t\t// add a protected no-args constructor\n\t\tthis.pathBindingClass.getConstructor().setProtected();\n\t\t// add a complete constructor\n\t\t// - String name\n\t\t// - Class<?> type\n\t\t// - BindingRoot<P, R> parentBinding,\n\t\t// - Getter<P, T> getter\n\t\t// - Setter<P, T> setter\n\t\t// call parent constructor with same args\n\n\t\tfinal String rootTypeArgument = name.getRootTypeArgument();\n\t\tfinal String parentTypeArgument = name.getParentTypeArgument();\n\n\t\tthis.pathBindingClass.getConstructor(\n\t\t\tnew Argument(String.class.getName(), \"name\"),\n\t\t\tnew Argument(String.format(\"%1$s<?>\", Class.class.getName()), \"type\"),\n\t\t\tnew Argument(\n\t\t\t\tString.format(\"%1$s<%2$s, %3$s>\", BindingRoot.class.getName(), rootTypeArgument, parentTypeArgument),\n\t\t\t\t\"parentBinding\"),\n\t\t\tnew Argument(\n\t\t\t\tString.format(\"%1$s<%3$s, %2$s>\", Getter.class.getName(), this.name.get().toString(), parentTypeArgument),\n\t\t\t\t\"getter\"),\n\t\t\tnew Argument(\n\t\t\t\tString.format(\"%1$s<%3$s, %2$s>\", Setter.class.getName(), this.name.get().toString(), parentTypeArgument),\n\t\t\t\t\"setter\"))\n\t\t\t.setBody(\"super(name, type, parentBinding, getter, setter);\\n\");\n\t\t// another constructor without type argument\n\t\tthis.pathBindingClass.getConstructor(\n\t\t\tnew Argument(String.class.getName(), \"name\"),\n\t\t\tnew Argument(\n\t\t\t\tString.format(\"%1$s<%2$s, %3$s>\", BindingRoot.class.getName(), rootTypeArgument, parentTypeArgument),\n\t\t\t\t\"parentBinding\"),\n\t\t\tnew Argument(\n\t\t\t\tString.format(\"%1$s<%3$s, %2$s>\", Getter.class.getName(), this.name.get().toString(), parentTypeArgument),\n\t\t\t\t\"getter\"),\n\t\t\tnew Argument(\n\t\t\t\tString.format(\"%1$s<%3$s, %2$s>\", Setter.class.getName(), this.name.get().toString(), parentTypeArgument),\n\t\t\t\t\"setter\"))\n\t\t.setBody(\"super(name, parentBinding, getter, setter);\\n\");\n\t\t// same only with type\n\t\tthis.pathBindingClass.getConstructor(\n\t\t\t\tnew Argument(String.format(\"%1$s<?>\", Class.class.getName()), \"type\"))\n\t\t\t.setBody(\"super(type);\\n\");\n\t}",
"private Marinator() {\n }",
"private Marinator() {\n }",
"public GO_RecordType() {\n }",
"public Class() {\n\t\tarrayMethods = new ArrayList<Method>();\n\t\tcode_Smells = new HashMap<String, Boolean>();\n\n\t}",
"private IndexBitmapObject() {\n\t}",
"public PIInfo() {\n }",
"protected PreDefinedProcedure() {\n super(new ParameterList(), new Block());\n this.name = null;\n }",
"public Self__1() {\n }",
"public PaymentDetails () {\n\t}",
"private ElementDebugger() {\r\n\t\t/* PROTECTED REGION ID(java.constructor._17_0_5_12d203c6_1363681638138_829588_2092) ENABLED START */\r\n\t\t// :)\r\n\t\t/* PROTECTED REGION END */\r\n\t}",
"@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:41.996 -0500\", hash_original_method = \"CB9D9CAF93B6F7C6AC078700B30D5B3A\", hash_generated_method = \"6EEF3712392D06942F0E7086316BBAB4\")\n \n private void nativeConstructor(){\n }",
"public Code() {\n\t}",
"public AccessSqlParser ()\n\t{\n\t}",
"public MethodEx2() {\n \n }",
"private CoverageParser() {\n }",
"public AnalysisDef() {}",
"public SymbolDetailFragment() {\n\t}",
"private TbusRoadGraph() {}",
"public AirField() {\n\n\t}",
"public Snippet visit(MethodCallInConstructor n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t String className = \"NEED TO PUT CLASS NAME\";\n\t n.nodeToken.accept(this, argu);\n\t String methodName = n.identifier.accept(this, argu).expType.getTypeName();\n\t this.identifierList = new ArrayList<String>(0);\n\t\t\tidentifierList.add(\"this\");\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeOptional.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t SymbolTableClassEntry stce = classSymbolTable.get(className);\n\t\t\tSymbolTableMethodEntry stme = stce.methods.get(methodName);\n\t\t\tSnippet retExp = new Snippet(\"\", \"\", stme.returnType, false);\n\t\t\tretExp.returnTemp = className + \".\" + methodName + \"(\";\n\t\t\tint i = 0;\n\t\t\tfor(String str : identifierList)\n\t\t\t{\n\t\t\t\tif(i==0)\n\t\t\t\t\tretExp.returnTemp += str;\n\t\t\t\telse\n\t\t\t\t\tretExp.returnTemp += \", \" + str;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tString toAdd =\"\";\n\t\t\t//if(!classes.containsKey(className)){\n\t\t\tif(!inAsync){\n\t\t\t\tif(i>0){\n\t\t\t\t\ttoAdd+=\",\";\n\t\t\t\t}\n\t\t\t\ttoAdd+=\"myUniquePlacePoint\";\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tif(i>0){\n\t\t\t\t\ttoAdd+=\",\";\n\t\t\t\t}\n\t\t\t\ttoAdd+=asyncPoint+\"\";\n\t\t\t}\n\t\t\t//}\n\t\t\tretExp.returnTemp +=toAdd+ \")\";\n\t return retExp;\n\t }",
"public Vaccine() {\n\t}",
"public Construct() {\n\tprefixes = new StringBuilder();\n\tvariables = new StringBuilder();\n\twheres = new StringBuilder();\n }",
"public DynamicShipClass() {\n\t\tthis.ts = new Long(ts);\n\t}",
"public ModuleParams()\n\t{\n\t}",
"public _355() {\n\n }",
"d(b bVar) {\n super(2);\n this.this$0 = bVar;\n }",
"private ReportPluginConstant() {\n\t\t// NO_PMD DUMMY CONSTRUCTOR\n\t}",
"public NarrativeStructInterpreter()\n {\n\n }",
"public CpFldMemo() { super(10010, 5); }",
"protected PrintBill() \r\n\t{/* nothing needed, but this prevents a public no-arg constructor from being created automatically */}",
"public BuiltBy() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"public ASNClassNumber() {\n }",
"private ClassProxy() {\n }",
"public PowerMethodParameter() {\r\n\t\t\r\n\t\t//constructor fara parametru, utilizat in cazul in care utilizatorul nu introduce\r\n\t\t//fisierul sursa si nici fiesierul destinatie ca parametrii in linia de comanda\r\n\t\tSystem.out.println(\"****The constructor without parameters PowerMethodParameter has been called****\");\r\n\t\tSystem.out.println(\"You did not specify the input file and the output file\");\r\n\t\t\r\n\t}",
"public Pojo1110110(){\r\n\t}",
"public ReferenceBasePUSData() {\n\t\tsuper();\n\t}",
"protected DiagClassVisitor() {\n super(ASM5);\n }",
"private LoadMethodMapper ()\n {}",
"public static void __init() {\r\n\t\t__name__ = new str(\"code\");\r\n\r\n\t\t/**\r\n\t\t copyright Sean McCarthy, license GPL v2 or later\r\n\t\t*/\r\n\t\tdefault_0 = null;\r\n\t\tcl_Code = new class_(\"Code\");\r\n\t}",
"private SpTreeMan() {\n }",
"public Instance() {\n }",
"public Identity()\n {\n super( Fields.ARGS );\n }",
"protected GeneTAG() {/* intentionally empty block */}",
"public VibrationalStructureInfo() {\n }",
"@Override\n\tpublic void inAFielddclMember(AFielddclMember node) {\n\t\tcg.addField(new FieldGen(Constants.ACC_PUBLIC | Constants.ACC_FINAL, getBecelType(nodeTypes.get(node.getType())), node.getId().getText(), cp).getField()); \n\t}"
] |
[
"0.6730876",
"0.67068434",
"0.6444904",
"0.6444449",
"0.6418091",
"0.63486576",
"0.6306998",
"0.6280626",
"0.628049",
"0.62095314",
"0.6204619",
"0.6192417",
"0.61905783",
"0.61617196",
"0.6132895",
"0.611599",
"0.6065967",
"0.6053262",
"0.60045886",
"0.59941685",
"0.5976879",
"0.5975846",
"0.5966389",
"0.59420455",
"0.5921008",
"0.591454",
"0.5909193",
"0.5904116",
"0.59001255",
"0.5885168",
"0.5879209",
"0.58782816",
"0.5874462",
"0.5860366",
"0.58586377",
"0.5853306",
"0.5851248",
"0.5846932",
"0.58444",
"0.5839258",
"0.58363336",
"0.58283985",
"0.58283085",
"0.5827767",
"0.58274055",
"0.5823066",
"0.580553",
"0.5794651",
"0.5793656",
"0.57924277",
"0.5792158",
"0.5780816",
"0.57777935",
"0.5768378",
"0.5766953",
"0.5764581",
"0.5764581",
"0.57618195",
"0.5761244",
"0.575036",
"0.5750257",
"0.5740534",
"0.5738013",
"0.5734327",
"0.5733862",
"0.57247657",
"0.5724174",
"0.57241386",
"0.5719222",
"0.5702661",
"0.569898",
"0.5695069",
"0.5693083",
"0.56910264",
"0.5689396",
"0.5689145",
"0.568739",
"0.568588",
"0.56852514",
"0.56852037",
"0.5684999",
"0.5678949",
"0.56707335",
"0.56677914",
"0.56667465",
"0.5665197",
"0.5659733",
"0.56579775",
"0.56546605",
"0.56522",
"0.56483436",
"0.5648273",
"0.5645139",
"0.56446606",
"0.5642589",
"0.56360614",
"0.5636002",
"0.56301254",
"0.5626162",
"0.5624445",
"0.56234133"
] |
0.0
|
-1
|
TODO: maybe this should be called validateTableIndicies()
|
boolean validateOffset() {
int num = entriesByIndex.size() + 1; // assuming 0, plus 1-N)
for (int index : entriesByIndex.keySet()) {
if (index > num || index < 0) {
return false;
}
}
return true;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void tableRows_()\n {\n }",
"private void setTable() {\n try {\n DefaultTableModel dtm = (DefaultTableModel) table.getModel();\n dtm.setRowCount(0);\n ArrayList<Item> itemList = ItemController.getAllItem();\n if (itemList != null) {\n for (Item item : itemList) {\n String qoh = BatchController.getQOH(item.getCode());\n if (qoh != null) {\n if (item.getRol() >= Integer.valueOf(qoh)) {\n Object row[] = {item.getCode(), item.getDesciption(), item.getRol(), qoh};\n dtm.addRow(row);\n }\n }\n\n }\n }\n if (dtm.getRowCount() == 0) {\n JOptionPane.showMessageDialog(this, \"Stock level is above ROL\");\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ROL.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(ROL.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void loadingTable() {\n this.setRowCount(1, true);\r\n this.setVisibleRangeAndClearData(this.getVisibleRange(), true);\r\n }",
"protected void postProcessTable(TableImpl t) \n\t{\n\t\t((ExcelTableImpl)t).excelColumns().forEach(c -> c.getLabel());\n\t\t((ExcelTableImpl)t).excelRows().forEach(r -> r.getLabel());\n\t}",
"private void UpdateTable() {\n\t\t\t\t\n\t\t\t}",
"private void validateInternalTable(ConnectorTableMetadata meta)\n {\n String table = AccumuloTable.getFullTableName(meta.getTable());\n String indexTable = Indexer.getIndexTableName(meta.getTable());\n String metricsTable = Indexer.getMetricsTableName(meta.getTable());\n\n if (conn.tableOperations().exists(table)) {\n throw new PrestoException(ACCUMULO_TABLE_EXISTS,\n \"Cannot create internal table when an Accumulo table already exists\");\n }\n\n if (AccumuloTableProperties.getIndexColumns(meta.getProperties()).size() > 0) {\n if (conn.tableOperations().exists(indexTable) || conn.tableOperations().exists(metricsTable)) {\n throw new PrestoException(ACCUMULO_TABLE_EXISTS,\n \"Internal table is indexed, but the index table and/or index metrics table(s) already exist\");\n }\n }\n }",
"protected abstract void initialiseTable();",
"public boolean supportsTableCheck() {\n \t\treturn true;\n \t}",
"@Override\r\n\tpublic void initializeTableContents() {\n\t\t\r\n\t}",
"@Override\n protected void initResultTable() {\n }",
"private boolean checkInputTableName(AccessInputMeta meta){\n if (meta.getTableName()==null || meta.getTableName().length()<1)\n {\n MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR );\n mb.setMessage(BaseMessages.getString(PKG, \"AccessInputDialog.TableMissing.DialogMessage\"));\n mb.setText(BaseMessages.getString(PKG, \"System.Dialog.Error.Title\"));\n mb.open(); \n\n return false;\n }\n else\n {\n \treturn true;\n }\n\t}",
"private void fillInTable() {\r\n // Firstly clean up panel.\r\n myOuterPanel.clear();\r\n LabelModel theLabelModel;\r\n for (LabelUUID theLabelUUID : myCaseItem.getLabels()) {\r\n theLabelModel = myLabelDataSource.getLabel(theLabelUUID.getValue());\r\n // The only reason it could be null is that the label has been\r\n // renamed and the case has not yet been updated.\r\n if (theLabelModel != null && theLabelModel.hasToBeDisplayed()) {\r\n // Check if the label has to be displayed.\r\n // Add the label in the panel.\r\n try {\r\n myOuterPanel.add(myLabelTable.get(theLabelUUID.getValue()));\r\n } catch (Exception theE) {\r\n GWT.log(\"label not found: \" + theLabelUUID.getValue() + \",\" + theLabelUUID.getOwner().getValue(), theE);\r\n }\r\n }\r\n }\r\n }",
"private void checkTable(BatchTable batchTable) {\n assertTrue(batchTable.getNameLabelText().equals(selectedMedicine.getValue().getName().toString()));\n assertTrue(batchTable.getCompanyLabelText().equals(selectedMedicine.getValue().getCompany().toString()));\n assertTrue(batchTable.getQuantityLabelText().equals(BatchTable.BATCHTABLE_FOOTER_QUANTITY\n + selectedMedicine.getValue().getTotalQuantity().toString()));\n assertTrue(batchTable.getExpiryLabelTexts().equals(BatchTable.BATCHTABLE_FOOTER_EXPIRY\n + selectedMedicine.getValue().getNextExpiry().toString()));\n\n List<Batch> data = batchTable.getTableData();\n for (Batch batch : selectedMedicine.getValue().getBatches().values()) {\n assertTrue(data.contains(batch));\n }\n }",
"@Override\r\n public int getRowCount() {\n return fixHashtables.length;\r\n }",
"public static void updateTable()\r\n\t{\r\n\t\tfor (int i = 0; i < DataHandler.getClassesSize(); i++)\r\n\t\t{\r\n\t\t\ttable.getModel().setValueAt(\r\n\t\t\t\t\tString.valueOf(LogicHandler.getRelativeOccurences(DataHandler.getList(), DataHandler.getSampleSize())[i]),\r\n\t\t\t\t\ti, 3);\r\n\t\t}\r\n\t}",
"private EstabelecimentoTable() {\n\t\t\t}",
"@Override\r\n\tprotected boolean isValidTable(final ResultSet resultSet) throws SQLException {\r\n\t\treturn !resultSet.getString(3).contains(\"BIN$\");\r\n\t}",
"@Override\n public void tableRows(int[] arg0, boolean arg1)\n {\n }",
"private void initTable() {\n\t\tDefaultTableModel dtm = (DefaultTableModel)table.getModel();\n\t\tdtm.setRowCount(0);\t\t\n\t\tfor(int i=0;i<MainUi.controller.sale.items.size();i++){\n\t\t\tVector v1 = new Vector();\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getProdSpec().getTitle());\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getCopies());\n\t\t\tdtm.addRow(v1);\n\t\t}\n\t\tlblNewLabel.setText(\"\"+MainUi.controller.sale.getTotal());\n\t}",
"public void disTable () {\n\t\t\t\tJScrollPane scrollPane = new JScrollPane(table);\n\t\t\t\tvalues = new Vector();\n\t\t\t\tvalues.add(\"20\"); values.add(\"20\"); values.add(\"20\"); values.add(\"20\"); values.add(\"20\");values.add(\"20\");values.add(new Boolean(false));\n\t\t\t\tmyModel.addRow(values ); // more practicle, vector can take only objects.\n\t\t myModel.addRow(data);\n\n\n\t\t\t\tgetContentPane().add(scrollPane, BorderLayout.CENTER);\n\n\t\t\t\t addWindowListener(new WindowAdapter() {\n\t\t\t\t\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t });\n\t}",
"private final void prepareOrginalValiesTable() {\n\t\torig_values_list = new ArrayList<ArrayList<String>>();\n\t\tfor (int col = 0; col < previewTable.getColumnCount(); ++col) {\n\t\t\tfinal ArrayList<String> n = new ArrayList<String>();\n\t\t orig_values_list.add( n);\n\t\t for (int row = 0; row < previewTable.getRowCount(); ++row) {\n\t\t \t//TODO what about list values?\n\t\t\t\tString v = (String) previewTable.getValueAt(row, col);\n\t\t\t\tn.add(v);\n\t\t\t}\n\t\t}\n\t}",
"public void initTable();",
"private void copyDialogTable(TableLayout dialogTable,\n\t\t\tTableLayout storedDialogTable) {\n\t\tint rowsNeeded = storedDialogTable.getChildCount()-1;\n\t\tfor(int i=-1; i<rowsNeeded; i++){\n\t\t\tTableRow newRow = new TableRow(getActivity());\n\t\t\tTableRow.LayoutParams rowParams = new TableRow.LayoutParams();\n\t\t\trowParams.height = TableRow.LayoutParams.WRAP_CONTENT;\n\t\t\trowParams.width = TableRow.LayoutParams.WRAP_CONTENT;\n\t\t\t//use k columns\n\t\t\tTableRow storedRow = null;\n\t\t\tstoredRow = (TableRow) storedDialogTable.getChildAt(i+1);\n\t\t\tfor(int k=0; k<3; k++){\n\t\t\t\tView theView = null;\n\t\t\t\tif(k==2 && i != -1){\n\t\t\t\t\tSpinner spin = new Spinner(SlideoutNavigationActivity.theActiveActivity);\n\t\t\t\t\tString [] spin_arry = SlideoutNavigationActivity.theActiveActivity.getResources().getStringArray(R.array.spaltentypen);\n\t\t\t\t\tspin.setAdapter(targetFragment.new DialogSpinnerAdapter<CharSequence>(SlideoutNavigationActivity.theActiveActivity, spin_arry));\n\t\t\t\t\ttheView = spin;\n\t\t\t\t\ttargetFragment.setSpinnerStyle(spin);\n\t\t\t\t\tspin.setOnItemSelectedListener(new OnItemSelectedListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onItemSelected(AdapterView<?> parent, View arg1, int arg2, long arg3) {\n\t\t\t\t\t\t\t((TextView) parent.getChildAt(0)).setTextColor(SlideoutNavigationActivity.theActiveActivity.getResources().getColor(R.color.background));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\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\tLog.d(\"i,k\", \"i==\" + i+ \", k==\" +k);\n\t\t\t\t\tspin.setSelection(((Spinner) storedRow.getChildAt(k)).getSelectedItemPosition());\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfinal EditText oneColumn = new EditText(SlideoutNavigationActivity.theActiveActivity);\n\t\t\t\t\ttargetFragment.setTableStyle((EditText) oneColumn);\n\t\t\t\t\tif (i == -1) {\n\t\t\t\t\t\tif (k == 0) {\n\t\t\t\t\t\t\toneColumn.setText(SlideoutNavigationActivity.theActiveActivity.getResources().getString(R.string.number));\n\t\t\t\t\t\t} else if (k == 1) {\n\t\t\t\t\t\t\toneColumn.setText(SlideoutNavigationActivity.theActiveActivity.getResources().getString(R.string.column_name));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\toneColumn.setText(SlideoutNavigationActivity.theActiveActivity.getResources().getString(R.string.column_type));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// insert the number of the column in the first row\n\t\t\t\t\telse if (k == 0) {\n\t\t\t\t\t\toneColumn.setText((i + 1) + SlideoutNavigationActivity.theActiveActivity.getResources().getString(R.string.dot));\n\t\t\t\t\t} else if (k == 1) {\n//\t\t\t\t\t\tTableRow headerRow = (TableRow) targetFragment.headerTable\n//\t\t\t\t\t\t\t\t.getChildAt(0);\n//\t\t\t\t\t\tEditText headerText = (EditText) headerRow\n//\t\t\t\t\t\t\t\t.getChildAt(i);\n//\t\t\t\t\t\t// Log.d(\"i,k\", \"i==\" + \", k==\" +k);\n//\t\t\t\t\t\tif (headerText == null) {\n//\t\t\t\t\t\t\toneColumn.setText(\"\");\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse{\n//\t\t\t\t\t\t\toneColumn.setText(headerText.getText());\n//\t\t\t\t\t\t}\n\t\t\t\t\t\toneColumn.setText(((TextView) storedRow.getChildAt(k)).getText());\n\t\t\t\t\t}\n\t\t\t\t\ttheView = oneColumn;\n\t\t\t\t}\n\t\t\t\tnewRow.addView(theView);\n\t\t\t}\n\t\t\tdialogTable.addView(newRow);\n\t\t}\n\t}",
"@Test\n\tpublic void checkAllAPICrncyInTable() throws ParseException\n\t{\n\t\t// Table Data\n\t\tMap<String, Object> tableMap = dashboardPage.addRowDataToMap();\n\t\t// API Data\n\t\tresponsePage = new APIResponsePageObject(driver);\n\t\tMap<String, Object> apiMap = responsePage.getRateDataFromAPI();\n\t\t\n\t\t// Map that has key - values missing in tableMap that are in apiMap\n\t\tMap missingCurrenciesInTableMap = new HashMap<>(apiMap);\n\t\tmissingCurrenciesInTableMap.keySet().removeAll(tableMap.keySet());\n\t\tmissingCurrenciesInTableMap.values().removeAll(tableMap.values());\n\t\t\n\t\tif(missingCurrenciesInTableMap.size() > 1)\n\t\t{\n\t\t\terrorMessage = \"Html table is missing \" + missingCurrenciesInTableMap.toString() + \" from API\";\n\t\t\tAssert.fail(errorMessage);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tassertSame(tableMap, apiMap);\n\t\t}\n\t}",
"private void popularTabela() {\n\n if (CadastroCliente.listaAluno.isEmpty()) {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n }\n int t = 0;\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setNumRows(0);\n int aux = CadastroCliente.listaAluno.size();\n\n while (t < aux) {\n aluno = CadastroCliente.listaAluno.get(t);\n modelo.addRow(new Object[]{aluno.getMatricula(), aluno.getNome(), aluno.getCpf(), aluno.getTel()});\n t++;\n }\n }",
"@Override \r\n public void setUI(TableUI ui) \r\n {\n super.setUI(new BasicTableUI(){ \r\n public void paint(Graphics g, JComponent c) { \r\n Rectangle r=g.getClipBounds(); \r\n int firstRow=table.rowAtPoint(new Point(0,r.y)); \r\n int lastRow=table.rowAtPoint(new Point(0,r.y+r.height)); \r\n // -1 is a flag that the ending point is outside the table \r\n if (lastRow<0) \r\n lastRow=table.getRowCount()-1; \r\n for (int i=firstRow; i<=lastRow; i++) \r\n paintRow(i,g); \r\n } \r\n private void paintRow(int row, Graphics g) \r\n { \r\n Rectangle r=g.getClipBounds(); \r\n for (int i=0; i<table.getColumnCount();i++) \r\n { \r\n Rectangle r1=table.getCellRect(row,i,true); \r\n if (r1.intersects(r)) // at least a part is visible \r\n { \r\n int sk=i;//((CTable)table).map.visibleCell(red,i); \r\n paintCell(row,sk,g,r1); \r\n // increment the column counter \r\n //i+=((CTable)table).map.span(row,sk)-1; \r\n //i++; \r\n } \r\n } \r\n } \r\n private void paintCell(int row, int column, Graphics g,Rectangle area) \r\n { \r\n int verticalMargin = table.getRowMargin(); \r\n int horizontalMargin = table.getColumnModel().getColumnMargin(); \r\n \r\n Color c = g.getColor(); \r\n g.setColor(table.getGridColor()); \r\n g.drawRect(area.x,area.y,area.width-1,area.height-1); \r\n g.setColor(c); \r\n \r\n area.setBounds(area.x + horizontalMargin/2, \r\n area.y + verticalMargin/2, \r\n area.width - horizontalMargin, \r\n area.height - verticalMargin); \r\n \r\n if (table.isEditing() && table.getEditingRow()==row && \r\n table.getEditingColumn()==column) \r\n { \r\n Component component = table.getEditorComponent(); \r\n component.setBounds(area); \r\n component.validate(); \r\n } \r\n else \r\n { \r\n TableCellRenderer renderer = table.getCellRenderer(row, column); \r\n Component component = table.prepareRenderer(renderer, row, column); \r\n if (component.getParent() == null) \r\n rendererPane.add(component); \r\n rendererPane.paintComponent(g, component, table, area.x, area.y, \r\n area.width, area.height, true); \r\n } \r\n } \r\n }); \r\n }",
"private void processTableData(DefaultTableModel model) {\n \tVector vector;\r\n\t\ttry {\r\n\t\t\tvector = (Vector) referenceData.getStartUPData(\"TradeAttribute\");\r\n\t\t\tIterator it = vector.iterator();\r\n\t \tint i =0;\r\n\t \twhile(it.hasNext()) {\r\n\t \t\t\r\n\t \t\tStartUPData tradeAttributes = (StartUPData) it.next();\r\n\t \t\tif(tradeAttributes.getName().equalsIgnoreCase(\"Trade Date\")) {\r\n\t \t \tmodel.insertRow(i, new Object[]{tradeAttributes.getName(),commonUTIL.dateToString(commonUTIL.getCurrentDate())});\r\n\t \t } else {\r\n\t \t\t model.insertRow(i, new Object[]{tradeAttributes.getName(),\"0\"});\r\n\t \t }\r\n\t \t\t\r\n\t \t\ti++;\r\n\t \t\t}\r\n\t \t\t\r\n\t\t} catch (RemoteException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }",
"protected abstract void addTables();",
"@Override\n\tpublic void checkTableVersion() {\n\n\t}",
"void initTable();",
"protected void dataTableleibie(int i) {\n\t\r\n}",
"private void initTableView() {\n try {\n NonEditableDefaultTableModel dtm = new NonEditableDefaultTableModel();\n dtm.setColumnIdentifiers(new String[]{\"Id\", \"Code\", \"From\", \"To\", \"Prepared\", \"Status\"});\n\n for (PayrollPeriod p : ppDao.getPayrollPeriods()) {\n\n try {\n Object[] o = new Object[]{p.getId(), p,\n sdf.format(p.getDateFrom()), sdf.format(p.getDateTo()),\n sdf.format(p.getDatePrepared()), p.getStatus()};\n dtm.addRow(o);\n } catch (Exception ex) {\n }\n\n }\n tablePayrollPeriod.setModel(dtm);\n } catch (Exception ex) {\n Logger.getLogger(PayrollPeriodInformation.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }",
"private void intiPlanTable(){\n //gets all plans that are linked with the current profile\n List<Plan> planList = profile.getPlans().getPlans();\n //now add all plans to the table\n DefaultTableModel model = (DefaultTableModel) this.jTable1.getModel();\n model.setRowCount(0);\n planList.forEach((p) -> {\n model.addRow(new Object[]{p.getPlanName(),p});\n });\n }",
"@SuppressWarnings(\"unused\")\n private AddTable() {\n }",
"private void checkTableRecord(final String value) {\n final DataSource dsValidatation = DataSourceFactory.createDataSource();\n dsValidatation.addTable(AFM_TBLS);\n dsValidatation.addField(TABLE_NAME);\n dsValidatation.addRestriction(Restrictions.eq(AFM_TBLS, TABLE_NAME, value));\n if (dsValidatation.getRecords().isEmpty() && !isTableNameSelected(value)) {\n this.requiredTablesNames.add(value);\n this.isDependencyNeeded = true;\n }\n }",
"private boolean tableDataValid()\r\n {\r\n // if there are any form level validations that should go there\r\n int rowTotal = tblProtoCorresp.getRowCount();\r\n int colTotal = tblProtoCorresp.getColumnCount();\r\n for (int rowIndex = 0; rowIndex < rowTotal ; rowIndex++)\r\n {\r\n for (int colIndex = 0; colIndex < colTotal; colIndex++)\r\n {\r\n TableColumn column = codeTableColumnModel.getColumn(colIndex) ;\r\n\r\n ColumnBean columnBean = (ColumnBean)column.getIdentifier() ;\r\n\r\n if (columnBean.getColumnEditable()\r\n && !columnBean.getColumnCanBeNull())\r\n {\r\n if ( tblProtoCorresp.getValueAt(rowIndex,colIndex) != null)\r\n {\r\n if (tblProtoCorresp.getValueAt(rowIndex,colIndex).equals(\"\")\r\n || tblProtoCorresp.getValueAt(rowIndex,colIndex).toString().trim().equals(\"\") )\r\n {\r\n String msg = coeusMessageResources.parseMessageKey(\r\n \"checkInputValue_exceptionCode.2402\");\r\n String msgColName = \" \" + columnBean.getDisplayName() + \". \";\r\n CoeusOptionPane.showInfoDialog(msg + msgColName);\r\n tblProtoCorresp.changeSelection(rowIndex, colIndex, false, false) ;\r\n return false;\r\n }\r\n }\r\n else\r\n {\r\n String msg = coeusMessageResources.parseMessageKey(\r\n \"checkInputValue_exceptionCode.2402\");\r\n\r\n String msgColName = \" \" + columnBean.getDisplayName() + \". \";\r\n CoeusOptionPane.showInfoDialog(msg + msgColName);\r\n tblProtoCorresp.changeSelection(rowIndex, colIndex, false, false) ;\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n }\r\n return true ;\r\n }",
"@Test\n public void testTableFactoryGetVacantTableNotVacant() {\n TableController tableController = tableFactory.getTableController();\n tableController.addTable(4);\n tableController.getTableMap().get(4).get(0).setStatus(TableStatus.RESERVED);\n assertNull(tableController.getVacantTable(4));\n tableController.getTableMap().get(4).get(0).setStatus(TableStatus.VACANT);\n assertNotNull(tableController.getVacantTable(4));\n }",
"@Test\r\n\tpublic void view3_current_table_data_validation()\r\n\t{\t\r\n\t\t//Key on which we have to validate other values.\r\n\t\tString key = \"Calls In Queue\";\r\n\t\t//Text on which we will fetch other tables columns\r\n\t\tString check_text = \"Agents\";\r\n\r\n\t\t//Initialize Elements of tables and their columns data.\r\n\r\n\t\t//Table 1 - Data\r\n\t\tList<WebElement> data_of_table1 = driver.findElements(view3_Current_table_data_val);\r\n\t\t//Table 1 - Columns\r\n\t\tList<WebElement> col_of_table1 = driver.findElements(By.xpath(view3_curr_data_table));\r\n\t\t//Removing Column data from another table.\r\n\t\tdata_of_table1 = helper.modify_cols_data_of_table(col_of_table1, data_of_table1 , check_text );\r\n\t\t//Validating N/A and integer for columns\r\n\t\thelper.data_validate_Down(driver, key , col_of_table1, data_of_table1 );\r\n\t}",
"private void initTableView() {\n // nastaveni sloupcu pro zobrazeni spravne hodnoty a korektniho datoveho typu\n this.colId.setCellValueFactory(cellData -> cellData.getValue().getPersonalIdProperty());\n this.colName.setCellValueFactory(cellData -> cellData.getValue().getDisplayNameProperty());\n this.colAge.setCellValueFactory(cellData -> cellData.getValue().getAgeProperty().asObject());\n this.colGender.setCellValueFactory(cellData -> cellData.getValue().getGenderProperty());\n this.colPrice.setCellValueFactory(cellData -> cellData.getValue().getPriceProperty().asObject());\n\n // nastaveni listu prvku tabulce\n this.offerTable.setItems(this.marketplace.getOfferList());\n\n // listener pro zjisteni, ktery prvek tabulky uzivatel oznacil a naplneni aktualni reference na vybrane dite\n this.offerTable.getSelectionModel().getSelectedCells().addListener(new ListChangeListener<TablePosition>() {\n\n @Override\n public void onChanged(Change<? extends TablePosition> change) {\n ObservableList selectedCells = offerTable.getSelectionModel().getSelectedCells();\n TablePosition tablePosition = (TablePosition) selectedCells.get(0);\n currentChild = marketplace.getOfferList().get(tablePosition.getRow());\n System.out.println(currentChild);\n updateUi();\n }\n });\n }",
"private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }",
"public void validateTableBeanMethods()\n {\n String utableName = this.getUntranslatedTableName();\n Class<gDBR> tableClass = this.getRecordClass();\n DBField field[] = this.getFields();\n \n Print.logInfo(\"\");\n Print.logInfo(\"Validating bean access methods for table: \" + utableName);\n \n for (int i = 0; i < field.length; i++) {\n String fieldName = field[i].getName();\n String className = StringTools.className(field[i].getTypeClass());\n Print.logInfo(\" Field: \" + fieldName + \" (type=\" + className + \")\");\n java.util.List<String> errMsg = this.validateFieldBeanMethods(field[i]);\n if ((errMsg == null) || errMsg.isEmpty()) {\n Print.logInfo(\" OK\");\n } else {\n for (Iterator<String> e = errMsg.iterator(); e.hasNext();) {\n Print.logInfo(\" \" + e.next());\n }\n }\n }\n \n Print.logInfo(\"\");\n \n }",
"@Override\n protected void loadAndFormatData()\n {\n // Place the data into the table model along with the column\n // names, set up the editors and renderers for the table cells,\n // set up the table grid lines, and calculate the minimum width\n // required to display the table information\n setUpdatableCharacteristics(getScriptAssociationData(allowSelectDisabled, parent),\n AssociationsTableColumnInfo.getColumnNames(),\n null,\n new Integer[] {AssociationsTableColumnInfo.AVAILABLE.ordinal()},\n null,\n AssociationsTableColumnInfo.getToolTips(),\n true,\n true,\n true,\n true);\n }",
"@Test\r\n\tpublic void view3_todays_table_data_validation()\r\n\t{\t\r\n\t\t//Key on which we have to validate other values.\r\n\t\tString key = \"CML Service Level\";\r\n\r\n\t\t//Initialize Elements of tables and their columns data.\r\n\r\n\t\t//Table 1 - Data\r\n\t\tList<WebElement> data_of_table2 = driver.findElements(view3_todays_table_data_val);\r\n\t\t//Table 1 - Colums\r\n\t\tList<WebElement> col_of_table2 = driver.findElements(By.xpath(view3_today_data_table));\r\n\t\t//Validating N/A and integer for columns\r\n\t\thelper.data_validate_Down(driver, key , col_of_table2, data_of_table2 );\r\n\t}",
"public void populateDiseaseTable() {\r\n DefaultTableModel dtm = (DefaultTableModel) tblDisease.getModel();\r\n dtm.setRowCount(0);\r\n for (Conditions disease : system.getConditionsList().getConditionList()) {\r\n Object[] row = new Object[2];\r\n row[0] = disease;\r\n row[1] = disease.getDiseaseId();\r\n dtm.addRow(row);\r\n }\r\n }",
"@Override\n public void initialiseUiRows() {\n }",
"private void loadAllToTable() {\n try {\n ArrayList<ItemDTO> allItems=ip.getAllItems();\n DefaultTableModel dtm=(DefaultTableModel) tblItems.getModel();\n dtm.setRowCount(0);\n \n if(allItems!=null){\n for(ItemDTO item:allItems){\n \n Object[] rowdata={\n item.getiId(),\n item.getDescription(),\n item.getQtyOnHand(),\n item.getUnitPrice()\n \n };\n dtm.addRow(rowdata);\n \n }\n }\n } catch (Exception ex) {\n Logger.getLogger(AddItem.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }",
"protected int getTableCondtion()\n\t\t{\n\t\t\treturn Condtion ;\n\t\t}",
"public void initTable() {\n this.table.setSelectable(true);\n this.table.setImmediate(true);\n this.table.setWidth(\"100%\");\n this.table.addListener(this);\n this.table.setDropHandler(this);\n this.table.addActionHandler(this);\n this.table.setDragMode(TableDragMode.ROW);\n this.table.setSizeFull();\n\n this.table.setColumnCollapsingAllowed(true);\n // table.setColumnReorderingAllowed(true);\n\n // BReiten definieren\n this.table.setColumnExpandRatio(LABEL_ICON, 1);\n this.table.setColumnExpandRatio(LABEL_DATEINAME, 3);\n this.table.setColumnExpandRatio(LABEL_DATUM, 2);\n this.table.setColumnExpandRatio(LABEL_GROESSE, 1);\n this.table.setColumnExpandRatio(LABEL_ACCESS_MODES, 1);\n this.table.setColumnHeader(LABEL_ICON, \"\");\n }",
"private void initTablesViews()\n {\n // Tokens\n tc_token_id.setCellValueFactory(new PropertyValueFactory<>(\"token\"));\n tc_tipo_token_id.setCellValueFactory(new PropertyValueFactory<>(\"tipoToken\"));\n tc_linea_token_id.setCellValueFactory(new PropertyValueFactory<>(\"linea\"));\n tv_tokens_encontrados_id.setItems(info_tabla_tokens);\n\n // Errores\n tc_error_id.setCellValueFactory(new PropertyValueFactory<>(\"error\"));\n tc_tipo_error_id.setCellValueFactory(new PropertyValueFactory<>(\"tipoError\"));\n tc_linea_error_id.setCellValueFactory(new PropertyValueFactory<>(\"linea_error\"));\n tv_errores_lexicos_id.setItems(info_tabla_errores);\n }",
"private void changeToScanTable() {\n\t\tswitch (fileType) {\n\t\tcase INVENTORY:\n\t\t\ttableView.setItems(presentationInventoryData);\n\t\t\tbreak;\n\t\tcase INITIAL:\n\t\t\ttableView.setItems(presentationInitialData);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ttableView.getColumns().clear();\n\t\t\tbreak;\n\t\t} // End switch statement\n\t}",
"private static <T, S> void verifyTable(TrainedMarkovTable<T, S> table, int rowCount, long max)\n {\n assertEquals(rowCount, table.rows.size());\n assertEquals(max, table.rowMax); \n }",
"private void Update_table() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"@Override\n\tpublic void tableChanged(TableModelEvent arg0) {\n\t\t\n\t}",
"private void tableAdapt(ArrayList<String[]> lista, boolean isTraslateAvalible) {\n TableLayout table = (TableLayout) findViewById(R.id.table);\n //declaramos el objeto que nos creará la tabla dinámica\n TableModel tbModel = new TableModel(MainActivity.this, table);\n //indicamos los encabezados de la tabla\n if (isTraslateAvalible) {\n tbModel.setHeaders(new String[]{\"N\", \"Object\", \"Traslated\", \"Accuracy\"});\n } else {\n tbModel.setHeaders(new String[]{\"N\", \"Object\", \"Accuracy\"});\n }\n //enviamos los datos del cuerpo de la tabla\n tbModel.setRows(lista);\n //configuramos la tabla, colores del encabezado y el cuerpo\n // tanto del texto como el fondo\n tbModel.setHeaderBackGroundColor(R.color.back_black);\n tbModel.setRowsBackGroundColor(R.color.back_white);\n\n tbModel.setHeadersForeGroundColor(R.color.back_white);\n tbModel.setRowsForeGroundColor(R.color.back_black);\n //Modifica la tabla a partir de los datos enviados y los parámetros enviados\n tbModel.makeTable();\n\n MyLogs.info(\" FIN \");\n }",
"public void generateTable() {\n if (Reference.ean != null) {\n //create a new Table\n TableLayout ll = (TableLayout) findViewById(R.id.table);\n\n //loop through each intolerance we use\n int index = 0;\n\n for (int i = 0; i < Reference.binaryFieldNames.length; i++) {\n //create a new table row\n TableRow row = new TableRow(this);\n\n TableRow.LayoutParams lp = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT);\n row.setLayoutParams(lp);\n\n //create a new text view\n TextView tv = new TextView(this);\n tv.setText(Reference.binaryFieldNamesFormatted[i]);\n\n //setup the radio buttons\n RadioGroup group = new RadioGroup(this);\n group.setId(index + GROUP_OFFSET);\n\n RadioButton yes = new RadioButton(this);\n yes.setText(POSITIVE);\n\n RadioButton no = new RadioButton(this);\n no.setText(NEGATIVE);\n\n //add the radio buttons to the group\n group.addView(yes);\n group.addView(no);\n\n\n //turn on the previous settings\n switch (data[index]) {\n case Reference.ANY:\n no.toggle();\n break;\n case Reference.NONE:\n yes.toggle();\n break;\n }\n\n //add the views to the row and then add the row\n row.addView(tv);\n row.addView(group);\n ll.addView(row, index);\n\n //add listener for the radio button group\n group.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n //figure out the row the radio button was in\n int row = group.getId() - GROUP_OFFSET;\n //figure out the amount this represents\n String text = ((RadioButton)findViewById(checkedId)).getText().toString();\n int amount = Reference.UNKNOWN;\n //re-map the values because currently 2 is traces and 1 is any amount\n switch (text) {\n case POSITIVE:\n amount = Reference.NONE;\n break;\n case NEGATIVE:\n amount = Reference.ANY;\n break;\n }\n //set this in the profile array\n data[row] = amount;\n }\n });\n index++;\n }\n\n for (int i = 0; i < Reference.tertiaryFieldNames.length; i++) {\n //create a new table row\n TableRow row = new TableRow(this);\n\n TableRow.LayoutParams lp = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT);\n row.setLayoutParams(lp);\n\n //create a new text view\n TextView tv = new TextView(this);\n tv.setText(Reference.tertiaryFieldNamesFormatted[i]);\n\n //setup the radio buttons\n RadioGroup group = new RadioGroup(this);\n group.setId(index + GROUP_OFFSET);\n\n\n RadioButton any = new RadioButton(this);\n any.setText(ANY);\n RadioButton traces = new RadioButton(this);\n traces.setText(TRACES);\n RadioButton none = new RadioButton(this);\n none.setText(NONE);\n\n //add the radio buttons to the group\n group.addView(any);\n group.addView(traces);\n group.addView(none);\n\n\n //turn on the previous settings\n switch (data[index]) {\n case Reference.ANY:\n any.toggle();\n break;\n case Reference.TRACE:\n traces.toggle();\n break;\n case Reference.NONE:\n none.toggle();\n break;\n }\n\n //add the views to the row and then add the row\n row.addView(tv);\n row.addView(group);\n ll.addView(row, index);\n\n //add listener for the radio button group\n group.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n //figure out the row the radio button was in\n int row = group.getId() - GROUP_OFFSET;\n String text = ((RadioButton)findViewById(checkedId)).getText().toString();\n //figure out the amount this represents\n int amount = Reference.UNKNOWN;\n //re-map the values because currently 2 is traces and 1 is any amount\n switch (text) {\n case ANY:\n amount = Reference.ANY;\n break;\n case TRACES:\n amount = Reference.TRACE;\n break;\n case NONE:\n amount = Reference.NONE;\n break;\n }\n //figure out the row the radio butto\n\n //set this in the profile array\n data[row] = amount;\n }\n });\n index++;\n }\n } else {\n ((TextView)findViewById(R.id.title)).setText(\"Scan a barcode to edit a products data\");\n findViewById(R.id.push_button).setVisibility(View.INVISIBLE);\n findViewById(R.id.name).setVisibility(View.INVISIBLE);\n }\n }",
"private void tablesice() {\n //Modificamos los tamaños de las columnas.\n tablastock.getColumnModel().getColumn(0).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(1).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(2).setMinWidth(100);\n tablastock.getColumnModel().getColumn(3).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(4).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(5).setMaxWidth(70);\n }",
"private void dealToTable()\r\n\t{\r\n\t\tthis.onTable.clear();\r\n\t\tif(this.deck.size() >= Config.TableCards)\r\n\t\t{\r\n\t\t\tthis.onTable.addAll(this.deck.subList(0, Config.TableCards));\r\n\t\t\tthis.deck = this.deck.subList(Config.TableCards, this.deck.size());\r\n\t\t}\r\n\t}",
"public void bindingTable(){\n String[] header={\"Region Id\",\"Region Name\"};\n DefaultTableModel defaultTableModel = new DefaultTableModel(header, 0);\n for (Region region : regionController.binding()) {\n// for (Region binding : regionController.binding(\"region_id\",\"asc\")) {\n Object[] region1 ={\n region.getRegionId(),region.getRegionName()\n };\n defaultTableModel.addRow(region1);\n }\n tableRegion.setModel(defaultTableModel);\n }",
"void isOK()\r\n\t{\n\t\tboolean[] array = new boolean[table.getRowCount()];\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tarray[i] = (Boolean) table.getValueAt(i, 2);\r\n\r\n\t\tint active = 0;\r\n\t\tfor (boolean b: array)\r\n\t\t\tif (b) active++;\r\n\r\n\t\t// Copy ONLY the selected traits into a new array\r\n\t\tint[] traits = new int[active];\r\n\t\tfor (int i = 0, j = 0; i < array.length; i++)\r\n\t\t\tif (array[i])\r\n\t\t\t\ttraits[j++] = i;\r\n\r\n\t\tPrefs.guiTruncateTraits = checkTruncate.isSelected();\r\n\r\n\t\t// Assign the selected traits back to the view\r\n\t\tif (mode == SelectTraitsDialog.HEATMAP_TRAITS)\r\n\t\t\tviewSet.setTraits(traits);\r\n\t\telse\r\n\t\t\tviewSet.setTxtTraits(traits);\r\n\t}",
"private void fillTable(){\n tblModel.setRowCount(0);// xoa cac hang trong bang\n \n for(Student st: list){\n tblModel.addRow(new String[]{st.getStudentId(), st.getName(), st.getMajor(),\"\"\n + st.getMark(), st.getCapacity(), \"\" + st.isBonnus()});\n // them (\"\" + )de chuyen doi kieu float va boolean sang string\n \n }\n tblModel.fireTableDataChanged();\n }",
"@Override\n\t\t\t\tpublic void allRowsChanged() {\n\n\t\t\t\t}",
"private void refreshFaultPanel() {\n\t\t\n\t\t//vymazeme vsechny radky tabulky\n\t\tfaultTableModel.setRowCount(0);\n\t\t//faultTable.setEnabled(true);\n\t\t//addFaultButton.setEnabled(true);\n\t\t//removeFaultButton.setEnabled(true);\n\t\tFaultInjectionData selectedTest= getData();\n\t\t\n\t\tfor (Fault currentFault : selectedTest.getFaultList()) {\n\t\t\t//vlozeni noveho radku do tabulky poruch\n\t\t\tObject[] newRow= new Object[] {currentFault, currentFault.getDescription()};\n\t\t\tfaultTableModel.insertRow(faultTable.getRowCount(), newRow);\n\t\t}\n\t}",
"public void popularTabela() {\n\n try {\n\n RelatorioRN relatorioRN = new RelatorioRN();\n\n ArrayList<PedidoVO> pedidos = relatorioRN.buscarPedidos();\n\n javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) tRelatorio.getModel();\n dtm.fireTableDataChanged();\n dtm.setRowCount(0);\n\n for (PedidoVO pedidoVO : pedidos) {\n\n String[] linha = {\"\" + pedidoVO.getIdpedido(), \"\" + pedidoVO.getData(), \"\" + pedidoVO.getCliente(), \"\" + pedidoVO.getValor()};\n dtm.addRow(linha);\n }\n\n } catch (SQLException sqle) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + sqle.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n \n } catch (Exception e) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + e.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"public void prepareTable(){\n\n TableColumn<Student, String> firstNameCol = new TableColumn<>(\"FirstName\");\n firstNameCol.setMinWidth(100);\n firstNameCol.setCellValueFactory(new PropertyValueFactory<>(\"firstname\"));\n\n TableColumn<Student, String> lastNameCol = new TableColumn<>(\"LastName\");\n lastNameCol.setMinWidth(100);\n lastNameCol.setCellValueFactory(new PropertyValueFactory<>(\"lastname\"));\n\n TableColumn<Student, String> formCol = new TableColumn<>(\"Form\");\n formCol.setMinWidth(100);\n formCol.setCellValueFactory(new PropertyValueFactory<>(\"form\"));\n\n TableColumn<Student, String> streamCol = new TableColumn<>(\"Stream\");\n streamCol.setMinWidth(100);\n streamCol.setCellValueFactory(new PropertyValueFactory<>(\"stream\"));\n\n TableColumn<Student, String> dateOfBirthCol = new TableColumn<>(\"Favorite Game\");\n dateOfBirthCol.setMinWidth(100);\n dateOfBirthCol.setCellValueFactory(new PropertyValueFactory<>(\"dateOfBirth\"));\n\n TableColumn<Student, String> genderCol = new TableColumn<>(\"Gender\");\n genderCol.setMinWidth(100);\n genderCol.setCellValueFactory(new PropertyValueFactory<>(\"gender\"));\n\n TableColumn<Student, Integer> ageCol = new TableColumn<>(\"age\");\n ageCol.setMinWidth(100);\n ageCol.setCellValueFactory(new PropertyValueFactory<>(\"age\"));\n\n TableColumn<Student, Integer> admissionCol = new TableColumn<>(\"Admission\");\n admissionCol.setMinWidth(100);\n admissionCol.setCellValueFactory(new PropertyValueFactory<>(\"admission\"));\n\n\n table.getColumns().addAll(admissionCol,firstNameCol,lastNameCol,formCol,streamCol,dateOfBirthCol,genderCol,ageCol);\n table.setItems(dao.selectAll());\n\n }",
"private boolean isTable(ElementType elementType)\n {\n\n return (!elementType.children.isEmpty() ||\n !elementType.attributes.isEmpty());\n }",
"@Test(enabled=true, priority =1)\r\n\tpublic void view3_validate_table_data() {\r\n\r\n\t\thelper.validate_table_names( driver.findElement(view3_curr_data) , \"Test_View3\" , \"view3_curr_data\" );\t\r\n\t\thelper.validate_table_columns( view3_curr_data_table , driver , \"\" , \"Test_View3\" , \"view3_curr_data_table\" );\r\n\r\n\t\thelper.validate_table_names( driver.findElement(view3_today_data) , \"Test_View3\" , \"view3_today_data\" );\r\n\t\thelper.validate_table_columns( view3_today_data_table , driver , \"\" , \"Test_View3\" , \"view3_today_data_table\" );\r\n\r\n\t\thelper.validate_table_names( driver.findElement(view3_curr_agent_stats_tbl) , \"Test_View3\" , \"view3_curr_agent_stats_tbl\" );\r\n\t\thelper.validate_table_columns( view3_curr_agent_stats_col , driver , \"\" , \"Test_View3\" , \"view3_curr_agent_stats_col\" );\r\n\r\n\t\thelper.validate_table_names( driver.findElement(view3_agent_details) , \"Test_View3\" , \"view3_agent_details\" );\t\r\n\t\thelper.validate_table_columns( view3_Agent_table_data_start , driver , view3_Agent_table_data_end , \"Test_View3\" , \"view3_Agent_table_data\" );\r\n\t}",
"private void validateCreateTable(ConnectorTableMetadata meta)\n {\n validateColumns(meta);\n validateLocalityGroups(meta);\n if (!AccumuloTableProperties.isExternal(meta.getProperties())) {\n validateInternalTable(meta);\n }\n }",
"public void tableClicked(KDTMouseEvent event) {\n\t\t\t\tint iIndex = kdtRWOItemSpEntry.getColumnIndex(\"i\");\r\n\t\t\t\tint colIndex = event.getColIndex();\r\n\t\t\t\tint rowIndex = event.getRowIndex();\r\n\t\t\t\tIEnum newIType = null;\r\n\t\t\t\tIRow row = kdtRWOItemSpEntry.getRow(rowIndex);\r\n\t\t\t\tif (iIndex == colIndex) { // I状态\r\n\t\t\t\t\tIEnum iType = (IEnum) row.getCell(colIndex).getValue();\r\n\t\t\t\t\tif (PublicUtils.equals(IEnum.I, iType)) {\r\n\t\t\t\t\t\tnewIType = IEnum.H;\r\n\t\t\t\t\t} else if (PublicUtils.equals(IEnum.H, iType)) {\r\n\t\t\t\t\t\tnewIType = IEnum.I;\r\n\t\t\t\t\t} else\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\tWInfo w = (WInfo) row.getCell(\"w\").getValue();\r\n\t\t\t\t\tif (w == null)\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t//String typeCode = w.getTypeCode();\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int i = 0; i < kdtRWOItemSpEntry.getRowCount(); i++) {\r\n\t\t\t\t\t\tWInfo newW = (WInfo) kdtRWOItemSpEntry.getRow(i).getCell(\"w\").getValue();\r\n\t\t\t\t\t\tif (newW == null)\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tif (PublicUtils.equals(IEnum.X, kdtRWOItemSpEntry.getRow(i).getCell(\"i\").getValue()))\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t//\tString newTypeCode = newW.getTypeCode();\r\n\t\t\t\t\t\tif (PublicUtils.equals(w.getNumber(), newW.getNumber())) {\r\n\t\t\t\t\t\t\tkdtRWOItemSpEntry.getRow(i).getCell(\"i\").setValue(newIType);\r\n\t\t\t\t\t\t\tresetItemSpEditorLocked(kdtRWOItemSpEntry.getRow(i));\r\n\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\tappendItemSpFoot();\r\n\t\t\t\t//\tstoreFields();\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"public void readValuesfromtableWithoutHeadings()\n\t {\n\t\t open();\n\t\t List<Map<Object, String>> tab1= withColumns(\"Last Name \" ,\"First Name\",\"Email\", \"Due\" , \"Web Site\" , \"My Test\") \n\t\t\t\t .readRowsFrom(table);\n\t\t System.out.println(tab1);\n\t }",
"public void showAvailTable() {\n if (availDay.getDate() != null) {\n availTable.setVisible(true);\n } \n else {\n showNoDateMess();\n };\n }",
"@SuppressWarnings(\"unchecked\")\n \n \n private void table(){\n \n int c;\n \n try{\n \n Connection con1 = ConnectionProvider.getConn();\n Statement stm = con1.createStatement();\n ResultSet rst = stm.executeQuery(\"select * from sales\");\n ResultSetMetaData rstm = rst.getMetaData();\n \n c = rstm.getColumnCount();\n \n DefaultTableModel dtm2 = (DefaultTableModel)jTable1.getModel();\n dtm2.setRowCount(0);\n \n while (rst.next()){\n \n Vector vec = new Vector();\n \n for(int a =1 ; a<=c; a++)\n {\n vec.add(rst.getString(\"CustomerName\"));\n vec.add(rst.getString(\"OrderNo\"));\n vec.add(rst.getString(\"TypeOfService\"));\n vec.add(rst.getString(\"OrderType\"));\n vec.add(rst.getString(\"Descript\"));\n vec.add(rst.getString(\"OrderConfirmation\"));\n vec.add(rst.getString(\"OrderHandledBy\"));\n vec.add(rst.getString(\"OrderDate\"));\n vec.add(rst.getString(\"WarrantyExpireDate\"));\n vec.add(rst.getString(\"FullAmount\"));\n vec.add(rst.getString(\"AmountPaid\"));\n vec.add(rst.getString(\"Balance\"));\n }\n \n dtm2.addRow(vec);\n }\n \n }\n catch(Exception e)\n {\n \n }\n \n \n }",
"public boolean tableRequired()\n {\n return true;\n }",
"Table getTable();",
"public void readTable() {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setRowCount(0);\n\n }",
"private void refTable() {\n try {\n String s = \"select * from stock\";\n pstm = con.prepareStatement(s);\n res = pstm.executeQuery(s);\n table.setModel(DbUtils.resultSetToTableModel(res));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"There Is No Data In Server\");\n }\n }",
"public void prepareTable() {\n \tthis.table = new Tape(this.height,this.width,2,this.map);\n }",
"private void fillUpAnimalsTable() {\n\t\tfillUpAnimalsTable(Calendar.getInstance().getTime());\n\t}",
"private void styleRows() {\n int rows = fieldTable.getRowCount();\n for (int row = 1; row < rows; row++ ) {\n fieldTable.getFlexCellFormatter().addStyleName(row, 0, \"metadataTableCell\");\n fieldTable.getFlexCellFormatter().addStyleName(row, 1, \"metadataTableCell\");\n fieldTable.getFlexCellFormatter().addStyleName(row, 2, \"metadataTableCell\");\n if (row % 2 == 0) {\n fieldTable.getRowFormatter().removeStyleName(row, \"metadataTableOddRow\");\n fieldTable.getRowFormatter().addStyleName(row, \"metadataTableEvenRow\");\n } else {\n fieldTable.getRowFormatter().removeStyleName(row, \"metadataTableEvenRow\");\n fieldTable.getRowFormatter().addStyleName(row, \"metadataTableOddRow\");\n }\n }\n }",
"private void refreshTable(){\n DefaultTableModel dm = (DefaultTableModel)table.getModel();\r\n dm.getDataVector().removeAllElements();\r\n System.out.println(\"Refresh Table\");\r\n\r\n //calling method addRows\r\n addRows();\r\n }",
"@Test\n public void test31() throws Throwable {\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D();\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) categoryAxis3D0);\n combinedDomainCategoryPlot0.clearAnnotations();\n categoryAxis3D0.clearCategoryLabelToolTips();\n DefaultTableXYDataset defaultTableXYDataset0 = new DefaultTableXYDataset();\n categoryAxis3D0.setAxisLineVisible(true);\n // Undeclared exception!\n try { \n defaultTableXYDataset0.getSeriesKey((-1028));\n } catch(IllegalArgumentException e) {\n //\n // Index outside valid range.\n //\n assertThrownBy(\"org.jfree.data.xy.DefaultTableXYDataset\", e);\n }\n }",
"public void normalizeTable() {\r\n for (int i = 0; i < this.getLogicalColumnCount(); i++) {\r\n normalizeColumn(i);\r\n }\r\n }",
"public void loadItemsTable(String reqId) {\n dao.setup();\n ObservableList<RequisitionItemEntity> items = FXCollections.observableArrayList(dao.read(RequisitionItemEntity.class));\n dao.exit();\n\n TableColumn<RequisitionItemEntity, String> poIdCol = new TableColumn<>(\"Purchase ID\");\n poIdCol.setCellValueFactory(new PropertyValueFactory<RequisitionItemEntity, String>(\"poid\"));\n\n TableColumn<RequisitionItemEntity, String> reqIdCol = new TableColumn<>(\"Requisiton ID\");\n reqIdCol.setCellValueFactory(new PropertyValueFactory<>(\"reqid\"));\n\n TableColumn<RequisitionItemEntity, Number> supidCol = new TableColumn<>(\"Supplier ID\");\n supidCol.setCellValueFactory(new PropertyValueFactory<>(\"supplier_id\"));\n\n TableColumn<RequisitionItemEntity, Double> tamontCol = new TableColumn<>(\"Total Amount\");\n tamontCol.setCellValueFactory(new PropertyValueFactory<>(\"total_amount\"));\n\n for (RequisitionItemEntity item : items){\n if(reqId == item.getReqId())\n tableItems.getItems().add(item);\n }\n\n tableItems.getColumns().addAll(poIdCol,reqIdCol,supidCol,tamontCol);\n\n\n }",
"@Test\r\n\t\t\tpublic void testDosFilasDespuesDeQuinta() {\n\t\t\t\tList<WebElement> tabla= driver.findElement(By.xpath(\"//table[@id='customers']\")).findElements(By.xpath(\".//tr[position() >5]\"));\r\n\t\t\t\tSystem.out.println(tabla.size());\t\r\n\t\t\t\tassertEquals(tabla.size(),2);\r\n\t\t\t}",
"private Object getTable() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"protected void dataTablePlan2(int i) {\n\t\t\r\n\t}",
"private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) {\n Tables tables = new Tables();\n try{\n int id = Integer.parseInt(lblID.getText().trim());\n String tableNumber = txtUpdateTable.getText().trim();\n \n int asAvailable = 1 ;\n \n tables.setTableId(id);\n tables.setTableNumber(tableNumber);\n tables.setAsAvailable(asAvailable);\n \n tableService.updateTableNumber(tables);\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, \"Please Fill TextField\");\n }\n \n vectorTablesNumber = commonService.getVectorTables();\n\n TablesTableModel tableTableModel = new TablesTableModel(vectorTablesNumber);\n tblTablesNumber.setModel(tableTableModel);\n \n \n txtUpdateTable.setText(\"\");\n \n }",
"public void getTableData() {\n MSApptIDCol.setCellValueFactory(new PropertyValueFactory<Appointment, Integer>(\"appointmentID\"));\n MSCustIDCol.setCellValueFactory(new PropertyValueFactory<Appointment, Integer>(\"customerID\"));\n MSTitleCol.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"appointmentTitle\"));\n MSDescriptionCol.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"description\"));\n MSContactCol.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"contactName\"));\n MSLocationCol.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"location\"));\n MSTypeCol.setCellValueFactory(new PropertyValueFactory<Appointment, String>(\"appointmentType\"));\n MSStartTimeCol.setCellValueFactory(new PropertyValueFactory<Appointment, LocalDateTime>(\"appointmentStart\"));\n MSEndTimeCol.setCellValueFactory(new PropertyValueFactory<Appointment, LocalDateTime>(\"appointmentEnd\"));\n }",
"@Override\r\n\tpublic boolean updateTable() {\r\n\t\t/*\r\n\t\t * VERSION 1\r\n\t\t *\r\n\t\tobjectCollection.clear();\r\n\t\tobjectCollection.addAll(retrieveObjects());\r\n\t\trefreshTable();*/\r\n\t\tlong size=objectCollection.size();\r\n\t\tobjectCollection.clear();\r\n\t\tint index=getSelectionIndex();\r\n\t\tupdateTable(SWT.DEFAULT);\r\n\t\tselectElement(index);\r\n\t\treturn objectCollection.size()!=size;\r\n\t}",
"public void fetRowList() {\n try {\n data.clear();\n if (rsAllEntries != null) {\n ObservableList row = null;\n //Iterate Row\n while (rsAllEntries.next()) {\n row = FXCollections.observableArrayList();\n //Iterate Column\n for (int i = 1; i <= rsAllEntries.getMetaData().getColumnCount(); i++) {\n row.add(rsAllEntries.getString(i));\n }\n data.add(row);\n }\n //connects table with list\n table.setItems(data);\n // cell instances are generated for Order Status column and then colored\n customiseStatusCells();\n\n } else {\n warning.setText(\"No rows to display\");\n }\n } catch (SQLException ex) {\n System.out.println(\"Failure getting row data from SQL \");\n }\n }",
"@Test\r\n\tpublic void testAll() throws Exception {\r\n\t\tTemplateReportTableModel tableModel = new TemplateReportTableModel();\r\n\t\tString[] colNames = tableModel.getColumnNames();\r\n\t\tassertNotNull(colNames);\r\n\t\tassertTrue(colNames.length > 0);\r\n\t\tassertTrue(Arrays.asList(colNames).contains(ClientUtil.getInstance().getLabel(\"label.row\")));\r\n\t}",
"@Test\r\n\t\t\tpublic void testCuentaFilasTabla() {\n\t\t\t\tList<WebElement> tabla= driver.findElement(By.xpath(\"//table[@id='customers']\")).findElements(By.xpath(\".//tr\"));\r\n\t\t\t\tSystem.out.println(tabla.size());\t\r\n\t\t\t\tassertEquals(tabla.size(),7);\r\n\t\t\t}",
"public abstract void allRowsChanged();",
"public void tableChanged(TableModelEvent e) {\n reallocateIndexes();\n super.tableChanged(e);\n }",
"@Override\n public com.gensym.util.Sequence getTableRows() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.TABLE_ROWS_);\n return (com.gensym.util.Sequence)retnValue;\n }",
"public static void viewtable() {\r\n\t\tt.dibuixa(table);\r\n\t}",
"@Override\n\tpublic Long totalRegistrosTabela(String table) throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Collection<Colors> getCurrentTable() {\n\t\treturn null;\n\t}",
"@Test\n\tpublic void checkNoElementInTableOutsideAPI() throws ParseException\n\t{\n\t\t// Table Data\n\t\tMap<String, Object> tableMap = dashboardPage.addRowDataToMap();\n\t\t// API Data\n\t\tresponsePage = new APIResponsePageObject(driver);\n\t\tMap<String, Object> apiMap = responsePage.getRateDataFromAPI();\n\t\t\n\t\t// Map that has key - values missing in tableMap that are in apiMap\n\t\tMap notInAPIMap = new HashMap<>(tableMap);\n\t\tnotInAPIMap.keySet().removeAll(apiMap.keySet());\n\t\tnotInAPIMap.values().removeAll(apiMap.values());\n\t\t\n\t\tif(notInAPIMap.size() > 1)\n\t\t{\n\t\t\terrorMessage = \"Html table is having \" + notInAPIMap.toString() + \" that are not from API\";\n\t\t\tAssert.fail(errorMessage);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tAssert.assertTrue(notInAPIMap.size() == 0);\n\t\t}\n\t}",
"public interface TableLoadHandler {\n Widget getMaskWidget();\n void onLoad();\n void onError(PrimaryTableUI table, Throwable t);\n void onLoaded(PrimaryTableUI table);\n void onComplete(int totalRows);\n}",
"private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }",
"private void clearTableData() {\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n model.setRowCount(0);\n }"
] |
[
"0.6559836",
"0.61718154",
"0.61456674",
"0.5981375",
"0.5955138",
"0.59404564",
"0.5898968",
"0.58732843",
"0.5854048",
"0.5821615",
"0.5782328",
"0.5782122",
"0.5777786",
"0.57603043",
"0.57547474",
"0.5744381",
"0.57384926",
"0.5720808",
"0.5700214",
"0.56986564",
"0.5685511",
"0.5667124",
"0.5662687",
"0.56565714",
"0.56317425",
"0.56270087",
"0.5622646",
"0.56069463",
"0.55617213",
"0.5555976",
"0.5551281",
"0.55466557",
"0.55266",
"0.5512998",
"0.5510687",
"0.5486614",
"0.5484525",
"0.54792106",
"0.54722",
"0.54708344",
"0.5457436",
"0.5457147",
"0.5455563",
"0.5444816",
"0.5439814",
"0.54372936",
"0.5432515",
"0.5429208",
"0.5421926",
"0.54206073",
"0.54168767",
"0.54156786",
"0.54149586",
"0.540851",
"0.5401091",
"0.54002297",
"0.53900987",
"0.53887856",
"0.5385478",
"0.5382159",
"0.537779",
"0.5377678",
"0.53722674",
"0.5368564",
"0.53642446",
"0.5364145",
"0.53639287",
"0.536249",
"0.5361985",
"0.5360081",
"0.5356841",
"0.53431016",
"0.5340174",
"0.5337791",
"0.533318",
"0.53302723",
"0.53296286",
"0.5327379",
"0.532733",
"0.5325183",
"0.53203857",
"0.5318493",
"0.5318063",
"0.5315378",
"0.53113544",
"0.53097665",
"0.5308164",
"0.5303958",
"0.52996975",
"0.52982146",
"0.52893615",
"0.5284916",
"0.5281105",
"0.5276557",
"0.527558",
"0.5275115",
"0.5273941",
"0.5265683",
"0.52646655",
"0.52576685",
"0.52572346"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
public static void main(String[] args) {
ExcelParser parser = new ExcelParser();
FromStringToLog flg = new FromStringToLog();
flg.prepareForWriting();
parser.writeExcel(ErrorList.getErrorList());
}
|
{
"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
|
/ END Zoom and transate stuff
|
public GraphView(List<Account> accounts, List<Block> blocks) {
this.accounts = accounts;
this.blocks = blocks;
walletPositions = new List();
initComponent();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void zoomOut() {\n if (scale > 0.05) {\n double scaleFactor = (scale - 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale -= 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n }",
"public void zoomOut() {\n \t\tzoom(-1);\n \t}",
"protected abstract void handleZoom();",
"public void zoomScaleOut() {\n \t\tzoomScale(SCALE_DELTA_OUT);\n \t}",
"public void zoomOut() { zoomOut(1); }",
"public void zoom() {\n\t\tdisp.zoom();\n\t\texactZoom.setText(disp.getScale() + \"\");\n\t\tresize();\n\t\trepaint();\n\t}",
"public void zoomIn() {\n if (scale < 0.8) {\n double scaleFactor = (scale + 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale += 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n\n }",
"public void zoomOut() {\r\n \t\tgraph.setScale(graph.getScale() / 1.25);\r\n \t}",
"public void zoomIn() {\n \t\tzoom(1);\n \t}",
"@Override\n public void Zoom(double zoomNo) {\n\t \n }",
"void onZoom() {\n\t\tmZoomPending=true;\n\t}",
"private void dragZoom() {\n\n\t\tint width = this.getWidth();\n\n\t\tint start = cont.getStart();\n\t\tdouble amount = cont.getLength();\n\n\t\tint newStart = (int) DrawingTools.calculatePixelPosition(x ,width,amount,start);\n\t\tint newStop = (int) DrawingTools.calculatePixelPosition(x2,width,amount,start);\n\t\tx = x2 = 0;\n\n\t\tint temp;\n\t\tif (newStop < newStart){\n\t\t\ttemp = newStart;\n\t\t\tnewStart = newStop;\n\t\t\tnewStop = temp;\n\t\t}\n\n\t\tcont.changeSize(newStart,newStop);\n\n\t}",
"public void unzoom() {\n\t\tdisp.unzoom();\n\t\texactZoom.setText(disp.getScale() + \"\");\n\t\tresize();\n\t\trepaint();\n\t}",
"public void zoomIn(){\n\t\t zoomed = modifyDimensions(picture.getWidth(),getHeight()); //in primul pas se maresc dimensiunile pozei\n\t\t for(int i = 0; i < zoomed.getHeight(); i += 2) {\n\t for(int j = 0; j < zoomed.getWidth(); j += 2) {\n\t zoomed.setRGB(j, i, picture.getRGB(j / 2,i / 2));\n\n\t if (j + 1 < zoomed.getWidth()) {\n\t zoomed.setRGB(j + 1, i, mediePixeli(picture.getRGB(j / 2, i / 2), picture.getRGB((j + 2) / 2, i / 2))); // intre doua coloane se adauga media pixelilor din acestea\n\t }\n\t }\n\t }\n\n\n\t for(int i = 1; i < zoomed.getHeight(); i += 2){\n\t \tfor(int j = 0; j < zoomed.getWidth(); j++ ){\n\t zoomed.setRGB(j, i, mediePixeli(picture.getRGB((j - 1) / 2, i / 2), picture.getRGB((j + 1) / 2, (i / 2))));\n\t }\n\t }\n\t \n\t }",
"private void actionZoomOut ()\r\n\t{\r\n\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t//---- Check if the project is empty or not\r\n\t\tif (tableSize != 0)\r\n\t\t{\r\n\t\t\t//---- Calculate zoom scale factor\r\n\t\t\tdouble zoom = mainFormLink.getComponentPanelCenter().getComponentPanelImageView().transformZoom(-FormMainMouse.DEFAULT_ZOOM_DELTA); \r\n\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().repaint();\r\n\r\n\t\t\t//---- Set the current zoom, display the zoom scale factor in the GUI\r\n\t\t\tFormMainMouse.imageViewZoomScale = zoom;\r\n\t\t\tmainFormLink.getComponentPanelDown().getComponentLabelZoom().setText(String.valueOf(zoom));\r\n\t\t}\r\n\t}",
"public void handleEndZoom(ActionEvent event){\n zoomPane.setVisible(false);\n }",
"public void zoomIn() { zoomIn(1); }",
"public void zoomIn() {\n\tsetZoom(getNextZoomLevel());\n}",
"protected void zoomToPast(){\n //zoom out\n int maxTimeSpread = widgg.timeorg.lastShortTimeDateInCurve - widgg.timeorg.firstShortTimeDateInCurve;\n if(xpCursor1 >=0){\n ixDataCursor1 = ixDataShown[xpCursor1];\n }\n if(xpCursor2 >=0){\n ixDataCursor2 = ixDataShown[xpCursor2];\n }\n xpCursor1New = xpCursor2New = cmdSetCursor; \n if(widgg.timeorg.timeSpread < 0x3fffffff) { widgg.timeorg.timeSpread *=2; }\n else { widgg.timeorg.timeSpread = 0x7fffffff; }\n bPaintAllCmd = true;\n widgg.redraw(100, 200);\n \n }",
"public void zoomIn() {\n if (zoom > 0) {\n zoom--;\n spielPanel.setZoom(zoom);\n }\n }",
"public void zoomScaleIn() {\n \t\tzoomScale(SCALE_DELTA_IN);\n \t}",
"public void zoomOut() {\n zoomToLength(currentViewableRange.getLength() * 2);\n }",
"public void zoomIn() {\n\t\tif (this.zoom + DELTA_ZOOM <= MAX_ZOOM)\n\t\t\tthis.setZoom(this.zoom + DELTA_ZOOM);\n\t}",
"public void setZoom(){\n\t\tactive.setZoom();\n\t}",
"public void zoomIn()\n {\n zoomIn(1, width >> 1, height >> 1);\n }",
"private void checkForZoomOut(){\n if(checkOut == 1){\n zoomLevel--;\n adjustZoomFactor();\n checkOut = 0;\n checkIn = 1;\n } else{\n checkOut = 1;\n checkIn = 0;\n }\n }",
"@Override\n public void Zoom(double zoomNo, boolean setZoom) {\n\t \n }",
"void multitouchZoom(int new_zoom);",
"protected void zoomToScale(float scale) {\n \t\tif (tweening) {\n \t\t\tscaleIntegrator.target(scale);\n \t\t} else {\n \t\t\tmapDisplay.sc = scale;\n \t\t\t// Also update Integrator to support correct tweening after switch\n \t\t\tscaleIntegrator.target(scale);\n \t\t\tscaleIntegrator.set(scale);\n \t\t}\n \t}",
"public void wheelZoom(MouseWheelEvent e) {\n try {\n int wheelRotation = e.getWheelRotation();\n Insets x = getInsets(); //Top bar space of the application\n Point p = e.getPoint();\n p.setLocation(p.getX() , p.getY()-x.top + x.bottom);\n if (wheelRotation > 0 && zoomLevel != 0) {\n //point2d before zoom\n Point2D p1 = transformPoint(p);\n transform.scale(1 / 1.2, 1 / 1.2);\n //point after zoom\n Point2D p2 = transformPoint(p);\n transform.translate(p2.getX() - p1.getX(), p2.getY() - p1.getY()); //Pan towards mouse\n checkForZoomOut();\n repaint();\n\n } else if (wheelRotation < 0 && zoomLevel != 20) {\n Point2D p1 = transformPoint(p);\n transform.scale(1.2, 1.2);\n Point2D p2 = transformPoint(p);\n transform.translate(p2.getX() - p1.getX(), p2.getY() - p1.getY()); //Pan towards mouse\n checkForZoomIn();\n repaint();\n }\n } catch (NoninvertibleTransformException ex) {\n ex.printStackTrace();\n }\n\n }",
"public void zoomIn() {\r\n \t\tgraph.setScale(graph.getScale() * 1.25);\r\n \t}",
"@Override\n\tpublic void setZoom(int zoom) {\n\t\t\n\t}",
"@Override\n public void onHandle(EventObject eventObject)\n {\n \t\t\t\t Scheduler.get().scheduleDeferred(new ScheduledCommand() \n \t\t\t {\n \t\t\t\t \t@Override\n \t\t\t\t \tpublic void execute()\n \t\t\t\t \t{\n \t\t\t\t \t\topenLayersMap.getMap().zoomTo(ZOOM_LEVEL);\n \t\t\t \t\t\t\tSystem.out.println(\"@MapComponent, @zoomend, Reverting to Map Zoom: \"+openLayersMap.getMap().getZoom());\n \t\t\t\t \t}\n \t\t\t });\n }",
"public void updateZoom() {\n camera.zoom = zoomLevel;\n }",
"public void terminateDrag(LayerEvent event) {\r\n\t\tif (!_isZoomingOut && !_isZoomingIn) return;\r\n\r\n\t\tif (_zoomInFilter.accept(event) || _zoomOutFilter.accept(event)) {\r\n\t\t\t_isZoomingIn = _zoomInFilter.accept(event);\r\n\t\t\t_isZoomingOut = _zoomOutFilter.accept(event);\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t// Use the positions of the rubberband to perform the zoom\r\n\t\tif( _rubberBand.getHeight() < 2.0 || _rubberBand.getWidth() < 2.0) {\r\n\t\t\t//We treat this as a single click zoom at center\r\n\t\t\tif (_isZoomingIn) {\r\n\t\t\t\t// TODO make the click factor zooming settable instead of 125%/80% which is a good default\r\n\t\t\t\tzoom(_rubberBand.getCenterX(), _rubberBand.getCenterY(), 1.25);\r\n\t\t\t\t} \r\n\t\t\telse if (_isZoomingOut) {\r\n\t\t\t\tzoom(_rubberBand.getCenterX(), _rubberBand.getCenterY(), 0.8);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// We treat this as the scale to fit the bounds of these converted coordinates\r\n\t\t\tif (((TrekCanvas)trekPane.getCanvas()).isControlDown()) {\r\n\t\t\t\t// We treat this as the zoom to fit the bounds of these converted coordinates\r\n\t\t\t\tDimension visSize = trekPane.getVisibleSize();\r\n\t\t\t\tdouble xZoomAmount = visSize.getWidth()/_rubberBand.getWidth();\r\n\t\t\t\tdouble yZoomAmount = visSize.getHeight()/_rubberBand.getHeight();\r\n\t\t\t if (_isZoomingOut) {\r\n\t\t\t \txZoomAmount = 1.0/xZoomAmount;\r\n\t\t\t\t\tyZoomAmount = 1.0/yZoomAmount;\r\n\t\t\t\t\t}\r\n\t\t\t\tscale(_rubberBand.getCenterX(), _rubberBand.getCenterY(), xZoomAmount, yZoomAmount);\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// We treat this as the zoom to fit the bounds of these converted coordinates\r\n\t\t\t\tDimension visSize = trekPane.getVisibleSize();\r\n\t\t\t\tdouble currAspect = visSize.getHeight()/visSize.getWidth();\r\n\t\t\t\tdouble zoomAmount = 1.0;\r\n\t\t\t if (currAspect >= 1.0) {\r\n\t\t\t\t zoomAmount = visSize.getHeight()/_rubberBand.getHeight();\r\n\t\t\t\t\tif (_isZoomingOut) zoomAmount = 1.0/zoomAmount;\r\n\t\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tzoomAmount = visSize.getWidth()/_rubberBand.getWidth();\r\n\t\t\t\t\tif (_isZoomingOut) zoomAmount = 1.0/zoomAmount;\r\n\t\t\t\t\t}\r\n\t\t\t\tzoom(_rubberBand.getCenterX(), _rubberBand.getCenterY(), zoomAmount);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t_overlayLayer.repaint(_rubberBand);\r\n\t\t_overlayLayer.remove(_rubberBand);\r\n\t\t_rubberBand = null;\r\n\t\t}",
"@Override\n\t\t\tpublic void onMapZoom(MapZoomEvent eventObject)\n\t\t\t{\n\t\t\t}",
"void startZoom() {\n\t\t// this boolean tells the system that it needs to \n\t\t// initialize itself before trying to zoom\n\t\t// This is cleaner than duplicating code\n\t\t// see processZoom\n\t\tmZoomEstablished=false;\n\t}",
"protected void zoomToPresent(){\n if(xpCursor1 >=0){\n ixDataCursor1 = ixDataShown[xpCursor1];\n }\n if(xpCursor2 >=0){\n ixDataCursor2 = ixDataShown[xpCursor2];\n }\n xpCursor1New = xpCursor2New = cmdSetCursor; \n if(widgg.timeorg.timeSpread > 100) { widgg.timeorg.timeSpread /=2; }\n else { widgg.timeorg.timeSpread = 100; }\n bPaintAllCmd = true;\n widgg.redraw(100, 200);\n }",
"static void zoom_callback(int *code,int *color)\n\t{\n\t\ttile_info.flags = (*color & 0x40) ? TILE_FLIPX : 0;\n\t\t*code |= ((*color & 0x03) << 8);\n\t\t*color = zoom_colorbase + ((*color & 0x3c) >> 2);\n\t}",
"public void zoomOnAddress(){\n adjustZoomLvl(16000);\n adjustZoomFactor();\n }",
"@Override\n public void mapScaleChanged(MapScaleChangedEvent mapScaleChangedEvent) {\n// if (drawGraphicLayer.getGraphics() == null || drawGraphicLayer.getGraphics().size() == 0) {\n// if (mapScaleChangedEvent.getSource().getMapScale() >= 94249 && cars != null) {\n// Log.i(TAG, \"mapScaleChanged: Zooming Out\");\n// graphicsOverlay.clearSelection();\n// graphicsOverlay.getGraphics().clear();\n//\n//\n// for (CarStatus car : cars) {\n//\n// Point point = (Point) GeometryEngine.project(new Point(car.getLongitude(), car.getLatitude(), spatialReference), mapView.getSpatialReference());\n// Graphic carGraphic = null;\n//\n//\n// if (car.getStatus().equals(\"Moving\")) {\n// greenMarker = new PictureMarkerSymbol((BitmapDrawable) getResources().getDrawable(R.drawable.green));\n// greenMarker.setWidth(18f);\n// greenMarker.setHeight(36f);\n// greenMarker.setAngle((float) car.getAngle());\n// carGraphic = new Graphic(point, greenMarker);\n// } else if (car.getStatus().equals(\"Stopped\")) {\n// redMarker = new PictureMarkerSymbol((BitmapDrawable) getResources().getDrawable(R.drawable.reed));\n// redMarker.setWidth(18f);\n// redMarker.setHeight(36f);\n// redMarker.setAngle((float) car.getAngle());\n// carGraphic = new Graphic(point, redMarker);\n// } else if (car.getStatus().equals(\"Disconnected\")) {\n// yellowMarker = new PictureMarkerSymbol((BitmapDrawable) getResources().getDrawable(R.drawable.yellow));\n// yellowMarker.setWidth(18f);\n// yellowMarker.setHeight(36f);\n// yellowMarker.setAngle((float) car.getAngle());\n// carGraphic = new Graphic(point, yellowMarker);\n// }else if (car.getStatus().equals(\"Disabled\")) {\n// blueMarker = new PictureMarkerSymbol((BitmapDrawable) getResources().getDrawable(R.drawable.blue));\n// blueMarker.setWidth(18f);\n// blueMarker.setHeight(36f);\n// blueMarker.setAngle((float) car.getAngle());\n// carGraphic = new Graphic(point, blueMarker);\n// }\n// graphicsOverlay.getGraphics().add(carGraphic);\n// }\n// } else if (mapScaleChangedEvent.getSource().getMapScale() < 94249 && cars != null) {\n// Log.i(TAG, \"mapScaleChanged: Zooming In\");\n// graphicsOverlay.clearSelection();\n// graphicsOverlay.getGraphics().clear();\n//\n// for (CarStatus car : cars) {\n//\n// Point point = (Point) GeometryEngine.project(new Point(car.getLongitude(), car.getLatitude(), spatialReference), mapView.getSpatialReference());\n// Graphic carGraphic = null;\n//\n// if (car.getStatus().equals(\"Moving\")) {\n// greenMarker.setWidth(32f);\n// greenMarker.setHeight(64f);\n// carGraphic = new Graphic(point, greenMarker);\n// } else if (car.getStatus().equals(\"Stopped\")) {\n// redMarker.setWidth(32f);\n// redMarker.setHeight(64f);\n// carGraphic = new Graphic(point, redMarker);\n// } else if (car.getStatus().equals(\"Disconnected\") || car.getStatus().equals(\"Disabled\")) {\n// yellowMarker.setWidth(32f);\n// yellowMarker.setHeight(64f);\n// carGraphic = new Graphic(point, yellowMarker);\n// }\n// graphicsOverlay.getGraphics().add(carGraphic);\n// }\n// }\n// }\n }",
"public final void zoomOut(final int zoomStep) {\r\n\r\n final BufferedImage image = imageCanvas.getImage();\r\n\r\n //\r\n // no image, no zoom\r\n\r\n if (image == null) {\r\n return;\r\n }\r\n\r\n int zoomTmp = this.zoom;\r\n\r\n //\r\n // if zoom is best fit\r\n // calculate the zoom based on container size\r\n\r\n if (zoomTmp == ZOOM_BEST_FIT) {\r\n zoomTmp = ImageUtils.calculateSizeToFit(image, imageCanvas.getSize()).width * ZOOM_REAL_SIZE / image.getWidth();\r\n }\r\n\r\n //\r\n // calculate new zoom based on the step parameter\r\n\r\n int newZoom = (int) Math.floor(((double) zoomTmp) / ((double) zoomStep)) * zoomStep;\r\n\r\n// if (newZoom == zoomTmp) {\r\n newZoom = newZoom - zoomStep;\r\n// }\r\n\r\n System.out.println(newZoom);\r\n \r\n setZoom(newZoom);\r\n }",
"public void mouseReleased() {\nif (released == true && draggingZoomSlider == true){\n alt = (map(zoom,texture.height-texture.height,texture.height,radians(-90),radians(90)));\n // GHA = (map(tzoom, texture.width - texture.width, texture.width, radians(-180),radians(180)));\n GHA = (map(tzoom,texture.width - texture.width,texture.width, radians(-180),radians(180)));\n initStars();\n initializeSphere(sDetail);\n thread( \"getPoints\");\n renderGlobe();\n}\ndraggingZoomSlider = false;\n}",
"@Override\n public void setZoom(double zoom)\n {\n super.setZoom(zoom);\n delayedRepainting.requestRepaint(ZOOM_REPAINT);\n }",
"public void zoom(float zoom) { \n if (zoom <=0) {\n throw new IllegalArgumentException();\n }\n\n workTransform.setTransform(null);\n workTransform.mScale(zoom);\n workTransform.mMultiply(userTransform);\n doc.setTransform(workTransform);\n swapTransforms();\n }",
"private void checkForZoomIn(){\n if(checkIn == 1){\n zoomLevel++;\n adjustZoomFactor();\n checkOut = 1;\n checkIn = 0;\n } else{\n checkOut = 0;\n checkIn = 1;\n }\n\n }",
"public void zoom_control()\n {\n simpleZoomControls.setOnZoomInClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _cnt++;\n int ss = _cnt / 60; int ss1 = _cnt % 60;\n _str_break = get_string(ss, ss1);\n mTxtBreakTime.setText(_str_break);\n }\n });\n // perform setOnZoomOutClickListener event on ZoomControls\n simpleZoomControls.setOnZoomOutClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _cnt--;\n if(_cnt <= 0) _cnt = 0;\n\n int ss = _cnt / 60; int ss1 = _cnt % 60;\n _str_break = get_string(ss, ss1);\n mTxtBreakTime.setText(_str_break);\n }\n });\n }",
"public void onZoom(View view){\n if(view.getId() == R.id.Bzoomin){\n mMap.animateCamera(CameraUpdateFactory.zoomIn());\n }\n if(view.getId()==R.id.Bzoomout){\n mMap.animateCamera(CameraUpdateFactory.zoomOut());\n }\n }",
"public final double transformZoom(double d) {\n double d2;\n int type2 = getType();\n if (type2 == 0) {\n return d + 1.0d;\n }\n if (type2 != 1) {\n if (type2 == 2) {\n d2 = getZoom();\n } else if (type2 == 3) {\n return getZoom();\n } else {\n if (type2 != 4) {\n return d;\n }\n d2 = getZoom();\n }\n return d + d2;\n }\n double d3 = d - 1.0d;\n if (d3 < 0.0d) {\n return 0.0d;\n }\n return d3;\n }",
"public void zoomIn() {\n if (currentViewableRange.getLength() > 1) {\n zoomToLength(currentViewableRange.getLength() / 2);\n }\n }",
"public void adjustZoomLvl(double scale){\n zoomLevel = ZoomCalculator.calculateZoom(scale);\n scale = ZoomCalculator.setScale(zoomLevel);\n transform.setToScale(scale, -scale);\n }",
"private void changeFromImageZoom() {\n switch (ImageZoomFragment.getOrigin()) {\n case MAIN_ACTIVITY_ZOOM_IDENTIFIER:\n Drawable drawable = ImageZoomFragment.getDrawable();\n user.setUserProfileImage(((BitmapDrawable) drawable).getBitmap());\n changeFragment(getFragment(APPLICATION_FRAGMENTS[0]));\n break;\n case InfoPetFragment.INFO_PET_ZOOM_IDENTIFIER:\n InfoPetFragment.setPetProfileDrawable(ImageZoomFragment.getDrawable());\n changeFragment(new InfoPetFragment());\n break;\n case InfoGroupFragment.INFO_GROUP_ZOOM_IDENTIFIER:\n changeFragment(new InfoGroupFragment());\n Bitmap bitmap = ((BitmapDrawable) ImageZoomFragment.getDrawable()).getBitmap();\n updateGroupImage(InfoGroupFragment.getGroup(), bitmap);\n break;\n default:\n }\n }",
"protected void zoomBetweenCursors(){\n ixDataCursor1 = ixDataShown[xpCursor1];\n ixDataCursor2 = ixDataShown[xpCursor2];\n ixDataShowRight = ixDataCursor2 + (((ixDataCursor2 - ixDataCursor1) / 10) & widgg.mIxData);\n int ixiData1 = (ixDataShown[xpCursor1] >> widgg.shIxiData) & widgg.mIxiData;\n int ixiData2 = (ixDataShown[xpCursor2] >> widgg.shIxiData) & widgg.mIxiData;\n int time1 = widgg.tracksValue.getTimeShort(ixiData1);\n int time2 = widgg.tracksValue.getTimeShort(ixiData2);\n if((time2 - time1)>0){\n widgg.timeorg.timeSpread = (time2 - time1) * 10/8;\n assert(widgg.timeorg.timeSpread >0);\n } else {\n widgg.stop();\n }\n xpCursor1New = xpCursor2New = cmdSetCursor; \n widgg.redraw(100, 200);\n \n }",
"public void zoomToAreaOfInterest() {\n Envelope aoe = context.getViewport().getBounds();\n if (aoe.getWidth() == 0) {\n aoe.expandBy(.001, 0);\n }\n\n if (aoe.getHeight() == 0) {\n aoe.expandBy(0, .001);\n }\n Rectangle2D rect = new Rectangle2D.Double(aoe.getMinX(), aoe.getMinY(),\n aoe.getWidth(), aoe.getHeight());\n getCamera().animateViewToCenterBounds(rect, true, 0);\n }",
"@Override\n\tpublic void onZoomChanged(GeoPoint center, double diagonal) {\n\t}",
"private void actionZoomIn ()\r\n\t{\r\n\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t//---- Check if the project is empty or not\r\n\t\tif (tableSize != 0)\r\n\t\t{\r\n\t\t\t//---- Calculate zoom scale factor\r\n\t\t\tdouble zoom = mainFormLink.getComponentPanelCenter().getComponentPanelImageView().transformZoom(+FormMainMouse.DEFAULT_ZOOM_DELTA); \r\n\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().repaint();\r\n\r\n\t\t\t//---- Set the current zoom, display the zoom scale factor in the GUI\r\n\t\t\tFormMainMouse.imageViewZoomScale = zoom;\r\n\t\t\tmainFormLink.getComponentPanelDown().getComponentLabelZoom().setText(String.valueOf(zoom));\r\n\t\t}\r\n\t}",
"public void zoom(int s) {\r\n\t\tzoom += s * ZOOM_FACTOR;\r\n\t}",
"private void unsafeSetInitialZoom() {\n if (hic.isInPearsonsMode()) {\n initialZoom = hic.getMatrix().getFirstPearsonZoomData(HiC.Unit.BP).getZoom();\n } else if (HiCFileTools.isAllChromosome(hic.getXContext().getChromosome())) {\n mainViewPanel.getResolutionSlider().setEnabled(false);\n initialZoom = hic.getMatrix().getFirstZoomData(HiC.Unit.BP).getZoom();\n } else {\n mainViewPanel.getResolutionSlider().setEnabled(true);\n\n HiC.Unit currentUnit = hic.getZoom().getUnit();\n\n List<HiCZoom> zooms = (currentUnit == HiC.Unit.BP ? hic.getDataset().getBpZooms() :\n hic.getDataset().getFragZooms());\n\n\n// Find right zoom level\n\n int pixels = mainViewPanel.getHeatmapPanel().getMinimumDimension();\n int len;\n if (currentUnit == HiC.Unit.BP) {\n len = (Math.max(hic.getXContext().getChrLength(), hic.getYContext().getChrLength()));\n } else {\n len = Math.max(hic.getDataset().getFragmentCounts().get(hic.getXContext().getChromosome().getName()),\n hic.getDataset().getFragmentCounts().get(hic.getYContext().getChromosome().getName()));\n }\n\n int maxNBins = pixels / HiCGlobals.BIN_PIXEL_WIDTH;\n int bp_bin = len / maxNBins;\n initialZoom = zooms.get(zooms.size() - 1);\n for (int z = 1; z < zooms.size(); z++) {\n if (zooms.get(z).getBinSize() < bp_bin) {\n initialZoom = zooms.get(z - 1);\n break;\n }\n }\n\n }\n hic.unsafeActuallySetZoomAndLocation(\"\", \"\", initialZoom, 0, 0, -1, true, HiC.ZoomCallType.INITIAL, true);\n }",
"private void galleryImageZoom(@Nullable Intent data) {\n Bitmap bitmap = getGalleryBitmap(data);\n Drawable drawable = new BitmapDrawable(getResources(), bitmap);\n ((ImageZoomFragment) actualFragment).setDrawable(drawable);\n ImageZoomFragment.setIsDefaultImage(false);\n ImageZoomFragment.setIsImageDeleted(false);\n\n switch (ImageZoomFragment.getOrigin()) {\n case MAIN_ACTIVITY_ZOOM_IDENTIFIER:\n updateUserImage(drawable);\n updateUserProfileImage(user.getUserProfileImage());\n break;\n case InfoPetFragment.INFO_PET_ZOOM_IDENTIFIER:\n InfoPetFragment.setIsDefaultPetImage(false);\n break;\n default:\n }\n }",
"@Override\n public void mouseWheelMoved(MouseWheelEvent e) {\n // Check direction of rotation\n if (e.getWheelRotation() < 0) {\n // Zoom in for up\n tr_z += 0.01f;\n } else {\n // Zoom out for down\n tr_z -= 0.01f;\n }\n }",
"public static void zoomOut(){\n for(int i=0; i<6; i++){\n driver.findElement(By.tagName(\"html\")).sendKeys(Keys.chord(Keys.CONTROL, Keys.SUBTRACT));\n }\n }",
"private void addDefaultHandlers()\n\t{\n\t\t\t\tthis.openLayersMap.getMap().addMapZoomListener(new MapZoomListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onMapZoom(MapZoomEvent eventObject)\n\t\t\t{\n\t\t\t\t//TODO - Do nothing for now, leaving in for testing.\n\t\t\t}\n\t\t});\n\t\t\n\t\t/**\n\t\t This event register is neeeded, because in case the user resizes the browser window, openlayer for some reason\n\t\t\tzooms in. So when it does that, we get back to the default zoom by using the zoomTo method.\n\t\t */\n\t\tthis.openLayersMap.getMap().getEvents().register(\"zoomend\", this.openLayersMap.getMap(), new EventHandler() \n\t\t{\n @Override\n public void onHandle(EventObject eventObject)\n {\n \t\t/**\n \t\t\tUsing this technique here, because, in the event that the user double clicks on the map\n\t \t\twe need to wait till this action has completed and then revert to the default map zoom.\n\t \t\tIf we didn't have this, the \"revert\" would not be successful.\n\t \t\thttp://dantwining.co.uk/2010/03/01/gwt-openlayers-and-full-screen-maps/\n \t\t */\n \t\t\t\t Scheduler.get().scheduleDeferred(new ScheduledCommand() \n \t\t\t {\n \t\t\t\t \t@Override\n \t\t\t\t \tpublic void execute()\n \t\t\t\t \t{\n \t\t\t\t \t\topenLayersMap.getMap().zoomTo(ZOOM_LEVEL);\n \t\t\t \t\t\t\tSystem.out.println(\"@MapComponent, @zoomend, Reverting to Map Zoom: \"+openLayersMap.getMap().getZoom());\n \t\t\t\t \t}\n \t\t\t });\n }\n });\n\t\t\n\t\t/**\n\t\t * This event register is needed because, on mobile devices (tested on ipad2 and ipad mini), after the update size\n\t\t * triggered when the screen went from landscape to portait (in MainAppView) the upper tiles were white. In other\n\t\t * words, the transition did not update the map-tiles-in-view to the new map size. So, by doing this, the map zooms in \n\t\t * when the update size is triggered, which \"enforces\" the updating of the map tiles. Also, because of the \"zoomend\"\n\t\t * event the map will revert to the default zoom level after this.\n\t\t */\n\t\tthis.openLayersMap.getMap().getEvents().register(\"updatesize\", this.openLayersMap.getMap(), new EventHandler() \n\t\t{\n @Override\n public void onHandle(EventObject eventObject)\n {\n \t\t\t\t Scheduler.get().scheduleDeferred(new ScheduledCommand() \n \t\t\t {\n \t\t\t\t \t@Override\n \t\t\t\t \tpublic void execute()\n \t\t\t\t \t{\n \t\t\t\t \t\topenLayersMap.getMap().zoomTo(ZOOM_LEVEL+1);\n \t\t\t \t\t\t\tSystem.out.println(\"@MapComponent, @updatesize, Re-zooming after size update: \"+openLayersMap.getMap().getZoom());\n \t\t\t\t \t}\n \t\t\t });\n }\n });\n\t\t\n\t\t/**\n\t\tThe following is useful if we want to convert map coordinates to pixel x,y coordinates.\n\t\tSo, if we want to draw on top of a map layer, this seems to be a good way to do it.\n\t\thttp://stackoverflow.com/questions/6032460/mousemove-events-in-gwt-openlayers \n\t\t \n\t\tthis.openLayersMap.getMap().getEvents().register(\"mousemove\", this.openLayersMap.getMap(), new EventHandler() \n\t\t{\n @Override\n public void onHandle(EventObject eventObject)\n {\n JSObject xy = eventObject.getJSObject().getProperty(\"xy\");\n Pixel px = Pixel.narrowToPixel(xy);\n LonLat lonlat = openLayersMap.getMap().getLonLatFromPixel(px);\n System.out.println(\"Caught mousemove event: \"+lonlat);\n }\n });\n\t\t*/\n\t}",
"private void adjustZoomFactor(){\n switch(zoomLevel){\n case 0:zoomFactor = 39; break;\n case 1:zoomFactor = 37; break;\n case 2:zoomFactor = 35; break;\n case 3:zoomFactor = 33; break;\n case 4:zoomFactor = 31; break;\n case 5:zoomFactor = 29; break;\n case 6:zoomFactor = 27; break;\n case 7:zoomFactor = 25; break;\n case 8:zoomFactor = 23; break;\n case 9:zoomFactor = 21; break;\n case 10:zoomFactor = 20; break;\n case 11:zoomFactor = 18; break;\n case 12:zoomFactor = 16; break;\n case 13:zoomFactor = 14; break;\n case 14:zoomFactor = 12; break;\n case 15:zoomFactor = 10; break;\n case 16:zoomFactor = 8; break;\n case 17:zoomFactor = 6; break;\n case 18:zoomFactor = 4; break;\n case 19:zoomFactor = 2; break;\n case 20:zoomFactor = 0; break;\n }\n }",
"public void zoomToFit() { zoomToFit(null); }",
"protected void primSetZoom(double zoom) {\n\tPoint p1 = getViewport().getClientArea().getCenter();\n\tPoint p2 = p1.getCopy();\n\tPoint p = getViewport().getViewLocation();\n\tdouble prevZoom = this.zoom;\n\tthis.zoom = zoom;\n\tpane.setScale(zoom);\n\tfireZoomChanged();\n\tgetViewport().validate();\n\t\n\tp2.scale(zoom / prevZoom);\n\tDimension dif = p2.getDifference(p1);\n\tp.x += dif.width;\n\tp.y += dif.height;\n\tsetViewLocation(p);\t\n}",
"@Override\n\t\t\tpublic void mouseWheelMoved(MouseWheelEvent e) {\n\t\t\t\tif(enabled){\n\t\t\t\tImageIcon tap = null;\n\t\t\t\tif (e.getWheelRotation() < 0) {\n\t\t\t\t\t// zoom in - increase size\n\n\t\t\t\t\tif (zoom_count < 0) {\n\t\t\t\t\t\tzoom_count = 0;\n\t\t\t\t\t}\n\t\t\t\t\tzoom_count++;\n\t\t\t\t\t// fetch key frame number and get x, y of that frame in new\n\t\t\t\t\t// tapestry then crop image to that frame\n\t\t\t\t\tHashtable<Integer, ArrayList<ArrayList<Integer>>> xy = indexMap.getIndexTable();\n\t\t\t\t\ttapestry.removeAll();\n\t\t\t\t\tBufferedImage i = null;\n\t\t\t\t\tif (zoom_count == 1) {\n\t\t\t\t\t\tint pix = indexImage.getRGB(e.getX(), e.getY());\n\t\t\t\t\t\tint frameNum = (pix >> 16) & 0x000000FF;\n\t\t\t\t\t\tint keyFrameIndex = sceneIndex.get(frameNum);\n\t\t\t\t\t\tint frame = keyFrameIndex / (352 * 288 * 3);\n\n\t\t\t\t\t\t// find x,y of new tapestry\n\t\t\t\t\t\tSystem.out.println(\"x point in new tapestry: \" + xy.get(frame).get(1).get(0));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ti = ImageIO.read(new File(nameOfTapestry + \"_\" + method + \"_\" + threshold_zoom1 + \".png\"));\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint zoom_image_width = i.getWidth();\n\t\t\t\t\t\tint middle = zoom_image_width - original_tapestry_size_width;\n\n\t\t\t\t\t\tint T = 5;\n\n\t\t\t\t\t\tif (xy.get(frame).get(1).get(0) - T < 0) {\n\t\t\t\t\t\t\tstart_x = 0;\n\t\t\t\t\t\t\tend_x = original_tapestry_size_width;\n\t\t\t\t\t\t} else if ((xy.get(frame).get(1).get(0) - T + original_tapestry_size_width) > zoom_image_width) {\n\t\t\t\t\t\t\tstart_x = zoom_image_width - original_tapestry_size_width;\n\t\t\t\t\t\t\tend_x = zoom_image_width;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstart_x = xy.get(frame).get(1).get(0) - T;\n\t\t\t\t\t\t\tend_x = xy.get(frame).get(1).get(0) - T + original_tapestry_size_width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"x_start point : \" + start_x);\n\t\t\t\t\t\tSystem.out.println(\"x_endt point : \" + end_x);\n\n\t\t\t\t\t\ti = i.getSubimage(start_x, 0, (end_x - start_x), original_tapestry_size_height);\n\t\t\t\t\t\ttap = new ImageIcon(i);\n\t\t\t\t\t\tzoom_count=1;\n\n\t\t\t\t\t} else if (zoom_count >= 2) {\n\n\t\t\t\t\t\tint pix = zoom1IndexImage.getRGB(e.getX(), e.getY());\n\t\t\t\t\t\tint frameNum = (pix >> 16) & 0x000000FF;\n\t\t\t\t\t\tint keyFrameIndex = zoom1SceneIndex.get(frameNum);\n\t\t\t\t\t\tint frame = keyFrameIndex / (352 * 288 * 3);\n\n\t\t\t\t\t\t// find x,y of new tapestry\n\t\t\t\t\t\tSystem.out.println(\"x point in new tapestry: \" + xy.get(frame).get(2).get(0));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ti = ImageIO.read(new File(nameOfTapestry + \"_\" + method + \"_\" + threshold_zoom2 + \".png\"));\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint zoom_image_width = i.getWidth();\n\t\t\t\t\t\tint middle = zoom_image_width - original_tapestry_size_width;\n\n\t\t\t\t\t\tint T = 20;\n\n\t\t\t\t\t\tif (xy.get(frame).get(2).get(0) - T < 0) {\n\t\t\t\t\t\t\tstart_x = 0;\n\t\t\t\t\t\t\tend_x = original_tapestry_size_width;\n\t\t\t\t\t\t} else if ((xy.get(frame).get(2).get(0) - T + original_tapestry_size_width) > zoom_image_width) {\n\t\t\t\t\t\t\tstart_x = zoom_image_width - original_tapestry_size_width;\n\t\t\t\t\t\t\tend_x = zoom_image_width;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstart_x = xy.get(frame).get(2).get(0) - T;\n\t\t\t\t\t\t\tend_x = xy.get(frame).get(2).get(0) - T + original_tapestry_size_width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"x_start point : \" + start_x);\n\t\t\t\t\t\tSystem.out.println(\"x_endt point : \" + end_x);\n\n\t\t\t\t\t\ti = i.getSubimage(start_x, 0, (end_x - start_x), original_tapestry_size_height);\n\t\t\t\t\t\ttap = new ImageIcon(i);\n\t\t\t\t\t\tzoom_count=2;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tJLabel label = new JLabel(\"\", tap, JLabel.CENTER);\n\n\t\t\t\t\ttapestry.add(label, BorderLayout.CENTER);\n\n\t\t\t\t\ttapestry.revalidate();\n\t\t\t\t\ttapestry.repaint();\n\n\t\t\t\t} else {\n\t\t\t\t\t// zoom out - decrease size\n\t\t\t\t\tif (zoom_count > 2) {\n\t\t\t\t\t\tzoom_count = 2;\n\t\t\t\t\t}\n\t\t\t\t\tHashtable<Integer, ArrayList<ArrayList<Integer>>> xy = indexMap.getIndexTable();\n\t\t\t\t\ttapestry.removeAll();\n\t\t\t\t\tif (zoom_count >= 2) {\n\t\t\t\t\t\tint pix = zoom2IndexImage.getRGB(e.getX(), e.getY());\n\t\t\t\t\t\tint frameNum = (pix >> 16) & 0x000000FF;\n\t\t\t\t\t\tint keyFrameIndex = zoom2SceneIndex.get(frameNum);\n\t\t\t\t\t\tint frame = keyFrameIndex / (352 * 288 * 3);\n\n\t\t\t\t\t\t// find x,y of new tapestry\n\t\t\t\t\t\tSystem.out.println(\"x point in new tapestry: \" + xy.get(frame).get(1).get(0));\n\t\t\t\t\t\tBufferedImage i = null;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ti = ImageIO.read(new File(nameOfTapestry + \"_\" + method + \"_\" + threshold_zoom1 + \".png\"));\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint zoom_image_width = i.getWidth();\n\t\t\t\t\t\tint middle = zoom_image_width - original_tapestry_size_width;\n\n\t\t\t\t\t\tint T = 20;\n\n\t\t\t\t\t\tif (xy.get(frame).get(1).get(0) - T < 0) {\n\t\t\t\t\t\t\tstart_x = 0;\n\t\t\t\t\t\t\tend_x = original_tapestry_size_width;\n\t\t\t\t\t\t} else if ((xy.get(frame).get(1).get(0) - T + original_tapestry_size_width) > zoom_image_width) {\n\t\t\t\t\t\t\tstart_x = zoom_image_width - original_tapestry_size_width;\n\t\t\t\t\t\t\tend_x = zoom_image_width;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstart_x = xy.get(frame).get(1).get(0) - T;\n\t\t\t\t\t\t\tend_x = xy.get(frame).get(1).get(0) - T + original_tapestry_size_width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"x_start point : \" + start_x);\n\t\t\t\t\t\tSystem.out.println(\"x_endt point : \" + end_x);\n\n\t\t\t\t\t\ti = i.getSubimage(start_x, 0, (end_x - start_x), original_tapestry_size_height);\n\t\t\t\t\t\ttap = new ImageIcon(i);\n\t\t\t\t\t\tzoom_count = 1;\n\n\t\t\t\t\t} else if (zoom_count <= 1) {\n\t\t\t\t\t\ttap = new ImageIcon(nameOfTapestry + \"_\" + method + \"_\" + threshold + \".png\");\n\t\t\t\t\t\tzoom_count = 0;\n\t\t\t\t\t}\n\t\t\t\t\tJLabel label = new JLabel(\"\", tap, JLabel.CENTER);\n\n\t\t\t\t\ttapestry.add(label, BorderLayout.CENTER);\n\n\t\t\t\t\ttapestry.revalidate();\n\t\t\t\t\ttapestry.repaint();\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t}",
"public void zoomTo(EastNorth newCenter, double scale) {\n center = newCenter;\n getProjection().eastNorth2latlon(center);\n this.scale = scale;\n repaint();\n }",
"private void ZoomOutCircle(double zoom, double circle_speed){\n final double COEFFICIENT=14;\n circle.setRadius(COEFFICIENT*(circle_speed-zoom));\n }",
"public void zoomToBounds(double ulLon, double ulLat, double lrLon, double lrLat)\n/* 116: */ {\n/* 117:182 */ int x_min = 2147483647;\n/* 118:183 */ int y_min = 2147483647;\n/* 119:184 */ int x_max = -2147483648;\n/* 120:185 */ int y_max = -2147483648;\n/* 121:186 */ int mapZoomMax = 20;\n/* 122: */\n/* 123:188 */ x_max = Math.max(x_max, MercatorProj.LonToX(lrLon, mapZoomMax));\n/* 124:189 */ x_max = Math.max(x_max, MercatorProj.LonToX(ulLon, mapZoomMax));\n/* 125:190 */ y_max = Math.max(y_max, MercatorProj.LatToY(ulLat, mapZoomMax));\n/* 126:191 */ y_max = Math.max(y_max, MercatorProj.LatToY(lrLat, mapZoomMax));\n/* 127:192 */ x_min = Math.min(x_min, MercatorProj.LonToX(ulLon, mapZoomMax));\n/* 128:193 */ x_min = Math.min(x_min, MercatorProj.LonToX(lrLon, mapZoomMax));\n/* 129:194 */ y_min = Math.min(y_min, MercatorProj.LatToY(ulLat, mapZoomMax));\n/* 130:195 */ y_min = Math.min(y_min, MercatorProj.LatToY(lrLat, mapZoomMax));\n/* 131: */\n/* 132: */\n/* 133: */\n/* 134:199 */ int height = Math.max(0, this.mapPanel.getHeight());\n/* 135:200 */ int width = Math.max(0, this.mapPanel.getWidth());\n/* 136:201 */ int newZoom = mapZoomMax;\n/* 137:202 */ int x = x_max - x_min;\n/* 138:203 */ int y = y_max - y_min;\n/* 139:204 */ while ((x > width) || (y > height))\n/* 140: */ {\n/* 141:205 */ newZoom--;\n/* 142:206 */ x >>= 1;\n/* 143:207 */ y >>= 1;\n/* 144: */ }\n/* 145:209 */ x = x_min + (x_max - x_min) / 2;\n/* 146:210 */ y = y_min + (y_max - y_min) / 2;\n/* 147:211 */ int z = 1 << mapZoomMax - newZoom;\n/* 148:212 */ x /= z;\n/* 149:213 */ y /= z;\n/* 150:214 */ this.mapPanel.setZoom(new Point(x, y), newZoom);\n/* 151: */ }",
"public void setZoom(int ps) {\n P_SCALE = ps;\n //EMBOSS = P_SCALE*8;\n }",
"public interface ZoomAPI {\n}",
"public void zoom(boolean in) {\n\t\tAbstractGridGroupRenderer gr = (AbstractGridGroupRenderer) gallery.getGroupRenderer();\n\t\tint height = gr.getItemHeight();\n\t\tint width = gr.getItemWidth();\n\t\t\n\t\tif(in){\n\t\t\theight *= 2;\n\t\t\twidth *= 2;\n\t\t}else{\n\t\t\theight /= 2;\n\t\t\twidth /= 2;\n\t\t}\n\t\t\n\t\tif(height < 64 || width < 64){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(height > 512 || width > 512){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tgr.setItemSize(width, height);\n\t\tgallery.setItemCount(ResourceTypes.TYPES.length);\n\t}",
"public void zoomIn(double i) {\n Rectangle2D r = getExtents();\n double exp = Math.pow(1.5,i); double cx = r.getX() + r.getWidth()/2, cy = r.getY() + r.getHeight()/2;\n setExtents(new Rectangle2D.Double(cx - r.getWidth()/(exp*2), cy - r.getHeight()/(exp*2), r.getWidth()/exp, r.getHeight()/exp));\n }",
"protected abstract void onScalePercentChange(int zoom);",
"private void setZoomLevel() {\n final float oldMaxScale = photoView.getMaximumScale();\n photoView.setMaximumScale(oldMaxScale *2);\n photoView.setMediumScale(oldMaxScale);\n }",
"public void zoomToLevel(int level) {\n \t\tfloat scale = getScaleFromZoom(level);\n \t\tzoomToScale(scale);\n \t}",
"private static void initZoomOptions() {\n\t\tfloat zoom = 0;\n\t\twhile (zoom < DiagramaFigura.MAX_ZOOM) {\n\t\t\tzoom += DiagramaFigura.DELTA_ZOOM;\n\t\t\tif (zoom >= DiagramaFigura.MIN_ZOOM) {\n\t\t\t\tString key = Integer.toString((int) (zoom * 100));\n\t\t\t\tzoomOptions.put(key + \"%\", zoom);\n\t\t\t}\n\t\t}\n\t}",
"public void onZoomOut(View view) {\n if (!checkReady()) {\n return;\n }\n\n changeCamera(CameraUpdateFactory.zoomOut());\n }",
"public void zoomToFactor(double d) {\n\t\t\n\t}",
"void find_it () {\n xt = 210; yt = 105; fact = 50.0;\n if (viewflg != VIEW_FORCES) zoom_slider_pos_y = 50;\n current_part.spanfac = (int)(2.0*fact*current_part.aspect_rat*.3535);\n xt1 = xt + current_part.spanfac;\n yt1 = yt - current_part.spanfac;\n xt2 = xt - current_part.spanfac;\n yt2 = yt + current_part.spanfac;\n \n }",
"public void animateOnItaly(){\n gMap.animateCamera(CameraUpdateFactory.newLatLngZoom(posItaly, 5));\n }",
"@Override\n public void mouseWheelMoved(MouseWheelEvent e) {\n\n zoomer = true;\n\n //Zoom in\n if (e.getWheelRotation() < 0) {\n zoomFactor *= 1.1;\n repaint();\n }\n //Zoom out\n if (e.getWheelRotation() > 0) {\n zoomFactor /= 1.1;\n repaint();\n }\n }",
"public void zoomScale(double scaleDelta) {\n \t\tzoomToScale((float) (mapDisplay.sc * scaleDelta));\n \t}",
"public void setZoom(float zoom) {\n this.zoom = zoom;\n }",
"@Override\n public void onCameraChange(CameraPosition cameraPosition) {\n if (cameraPosition.zoom >= MINIMUM_ZOOM_LEVEL_FOR_DATA) {\n refreshVisibleNDBCStations();\n } else {\n Toast.makeText(getActivity().getApplicationContext(),\n R.string.divesite_map_zoom_view_data,\n Toast.LENGTH_SHORT).show();\n }\n }",
"public void mouseDragged (LayerEvent event) {\r\n \t\t\tif (!isEnabled()) return;\r\n\t\t\tif (!_isZoomingOut && !_isZoomingIn) return;\r\n \r\n\t\t\tif (_rubberBand == null) {\r\n\t \t// This should never happen, but it does.\r\n\t \treturn;\r\n\t\t\t\t}\r\n \r\n\t\t\tif (_zoomInFilter.accept(event) || _zoomOutFilter.accept(event)) {\r\n\t\t\t\t_isZoomingIn = _zoomInFilter.accept(event);\r\n\t\t \t_isZoomingOut = _zoomOutFilter.accept(event);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\ttrekPane.getCanvas().setCursor( _isZoomingIn ? TrekController.ZOOMIN_CURSOR : TrekController.ZOOMOUT_CURSOR);\r\n\t\t\t\r\n\t\t\t// Figure out the coordinates of the rubber band\r\n\t\t\t_overlayLayer.repaint(_rubberBand);\r\n\r\n\t\t double useXPos = event.getLayerX();\r\n\t\t double useYPos = event.getLayerY();\r\n\t\t \r\n\t\t\t// space held down translates\r\n\t\t\t// rubberband _originX, _originY by event-prev\r\n\t\t\tif (((TrekCanvas)trekPane.getCanvas()).isSpaceDown()) {\r\n\t\t\t\t_originX += (useXPos - prevX);\r\n\t\t\t\t_originY += (useYPos - prevY);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\tprevX = event.getLayerX();\r\n\t\t\tprevY = event.getLayerY();\r\n\t\t\t\r\n\t\t // Without control down rubberband conforms to visible aspect ratio\r\n\t\t if (!((TrekCanvas)trekPane.getCanvas()).isControlDown()) {\r\n\t\t\t\tDimension visSize = trekPane.getVisibleSize();\r\n\t\t\t\tdouble currAspect = visSize.getHeight()/visSize.getWidth();\r\n\t\t\t\tif (Math.abs(useYPos - _originY) > Math.abs(useXPos - _originX)) {\r\n\t\t\t\t\tuseXPos = _originX + (useXPos < _originX ? -1.0 : 1.0)*Math.abs((useYPos - _originY)/currAspect);\r\n\t\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tuseYPos = _originY + (useYPos < _originY ? -1.0 : 1.0)*Math.abs((useXPos - _originX)*currAspect);\r\n\t\t\t\t\t}\r\n\t\t \t}\r\n\t\t \r\n\t\t\tif (event.isAltDown()) {\r\n\t\t\t\t_rubberBand.setFrameFromCenter(_originX, _originY, useXPos, useYPos);\r\n\t\t\t\t}\r\n else {\r\n\t\t\t\t_rubberBand.setFrameFromDiagonal(_originX, _originY, useXPos, useYPos);\r\n \t}\r\n \t\r\n\t\t\t_overlayLayer.repaint(_rubberBand);\r\n\r\n\t\t\t// Could possibly do some custom drawing showing an in or out zoom\r\n\t\t\tif (_isZoomingIn) {\r\n } \r\n else {\r\n }\r\n \r\n\t\t// Consume the event\r\n\t\tif (isConsuming()) {\r\n\t\t\tevent.consume();\r\n\t\t\t}\r\n\t}",
"@Override\n public void onMapZoomChanged(float zoom) {\n presenter.onMapZoomChanged(zoom);\n }",
"@Override\n public void run() {\n ZoomSDK.preload(PanAadharResultActivity.this);\n }",
"@Override\n\t\tpublic void onMapStatusChangeFinish(MapStatus status) {\n\n\t\t\tProjection mProjection = baiduMap.getProjection();\n\t\t\tPoint pointB = new Point(0, 0);\n\t\t\tLatLng tempLatlbg = mProjection.fromScreenLocation(pointB);\n\n\t\t\t// 判断\n\t\t\tif (leftTopLatlng != null && cuttentZoom == status.zoom) {\n\t\t\t\tpointB = mProjection.toScreenLocation(leftTopLatlng);\n\t\t\t\tif (Math.abs(pointB.x) < changeRange\n\t\t\t\t\t\t&& Math.abs(pointB.y) < changeRange) {\n\t\t\t\t\t// 不够范围\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// System.out.println(\"结束变化时间2::\" + new Date());\n\t\t\tcuttentZoom = status.zoom;\n\t\t\tSystem.out.println(\"cuttentZoom2::\" + cuttentZoom);\n\t\t\tleftTopLatlng = tempLatlbg;\n\t\t\tlatlng = status.target;\n\t\t\tmCluster.setmDistance(getDistance(status.zoom));\n\t\t\ttry{\n\t\t\tif (isTest) {\n\t\t\t\tgetTestNetData(status.bound.southwest.longitude + \"\",\n\t\t\t\t\t\tstatus.bound.northeast.latitude + \"\",\n\t\t\t\t\t\tstatus.bound.northeast.longitude + \"\",\n\t\t\t\t\t\tstatus.bound.southwest.latitude + \"\");\n\t\t\t} else {\n\t\t\t\tgetNetData(status.bound.southwest.longitude + \"\",\n\t\t\t\t\t\tstatus.bound.northeast.latitude + \"\",\n\t\t\t\t\t\tstatus.bound.northeast.longitude + \"\",\n\t\t\t\t\t\tstatus.bound.southwest.latitude + \"\");\n\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}",
"private void scaleImagePanel(float scale){\n float oldZoom = imagePanel.getScale();\n float newZoom = oldZoom+scale;\n Rectangle oldView = scrollPane.getViewport().getViewRect();\n // resize the panel for the new zoom\n imagePanel.setScale(newZoom);\n // calculate the new view position\n Point newViewPos = new Point();\n newViewPos.x = (int)(Math.max(0, (oldView.x + oldView.width / 2) * newZoom / oldZoom - oldView.width / 2));\n newViewPos.y = (int)(Math.max(0, (oldView.y + oldView.height / 2) * newZoom / oldZoom - oldView.height / 2));\n scrollPane.getViewport().setViewPosition(newViewPos);\n }",
"@SuppressWarnings(\"unused\")\n private void setZoom(JSONArray args, CallbackContext callbackContext) throws JSONException {\n Long zoom;\n zoom = args.getLong(1);\n\n this.myMoveCamera(CameraUpdateFactory.zoomTo(zoom), callbackContext);\n }",
"private static void mapScaler(android.hardware.camera2.impl.CameraMetadataNative r1, android.hardware.camera2.legacy.ParameterUtils.ZoomData r2, android.hardware.Camera.Parameters r3) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.hardware.camera2.legacy.LegacyResultMapper.mapScaler(android.hardware.camera2.impl.CameraMetadataNative, android.hardware.camera2.legacy.ParameterUtils$ZoomData, android.hardware.Camera$Parameters):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.hardware.camera2.legacy.LegacyResultMapper.mapScaler(android.hardware.camera2.impl.CameraMetadataNative, android.hardware.camera2.legacy.ParameterUtils$ZoomData, android.hardware.Camera$Parameters):void\");\n }",
"public static void changeCameraZoom(boolean zoomIn){\r\n\t\tif(zoomIn && zoomLevel > 0){\r\n\t\t\tzoomLevel -= 2;\r\n\t\t}else if(!zoomIn){\r\n\t\t\tzoomLevel += 2;\r\n\t\t}\r\n\t}",
"@Test\n public void zoomInAndOut() throws Exception {\n assertEquals(calendarPanel.getCalendarView().getMonthPage(), calendarPanel.getPageBase());\n\n //zoom in to Week Page\n raiseZoomInEvent();\n assertEquals(calendarPanel.getCalendarView().getWeekPage(), calendarPanel.getPageBase());\n\n //zoom in to Day Page\n raiseZoomInEvent();\n assertEquals(calendarPanel.getCalendarView().getDayPage(), calendarPanel.getPageBase());\n\n //can't zoom in anymore, stays at Day Page\n raiseZoomInEvent();\n assertEquals(calendarPanel.getCalendarView().getDayPage(), calendarPanel.getPageBase());\n\n //zoom out to Week Page\n raiseZoomOutEvent();\n assertEquals(calendarPanel.getCalendarView().getWeekPage(), calendarPanel.getPageBase());\n\n //zoom out to Month Page\n raiseZoomOutEvent();\n assertEquals(calendarPanel.getCalendarView().getMonthPage(), calendarPanel.getPageBase());\n\n //zoom out to Year Page\n raiseZoomOutEvent();\n assertEquals(calendarPanel.getCalendarView().getYearPage(), calendarPanel.getPageBase());\n\n //can't zoom out anymore, stays at Year Page\n raiseZoomOutEvent();\n assertEquals(calendarPanel.getCalendarView().getYearPage(), calendarPanel.getPageBase());\n\n //zoom in to Month Page\n raiseZoomInEvent();\n assertEquals(calendarPanel.getCalendarView().getMonthPage(), calendarPanel.getPageBase());\n }",
"private void renderMapGrow(double width, double height, double curZoom) {\n if(curMap != null) { // if it can be obtained, set the width and height using the aspect ratio\n double aspectRatio = curMap.getMap().getWidth()/curMap.getMap().getHeight();\n double scaledW, scaledH;\n // keep the aspect ratio\n scaledH = (1 / ((1 / (width)) * aspectRatio));\n scaledW = ((height)*aspectRatio);\n if(scaledH <= pane.getHeight()) {\n canvas.setHeight(height*curZoom);\n canvas.setWidth(scaledW*curZoom);\n if(curZoom <= 1) { // If we aren't zoomed, translate the image to the center of the screen\n canvas.setTranslateX(((width - scaledW) / 2));\n canvas.setTranslateY(0);\n } else {\n canvas.setTranslateX(0);\n }\n }\n\n if(scaledW <= pane.getWidth()) {\n canvas.setHeight(scaledH*curZoom);\n canvas.setWidth(width*curZoom);\n if(curZoom <= 1) { // If we aren't zoomed, translate the image to the center of the screen\n canvas.setTranslateY(((height - scaledH) / 2));\n canvas.setTranslateX(0);\n } else {\n canvas.setTranslateY(0);\n }\n }\n } else {\n canvas.setHeight(height*curZoom);\n canvas.setWidth(width*curZoom);\n }\n render();\n }",
"public void mapViewLayedOut() {\n if (mPointToGoTo != null) {\n setCenter(mPointToGoTo);\n mPointToGoTo = null;\n }\n if (mZoomToZoomTo != -1) {\n setZoom(mZoomToZoomTo);\n mZoomToZoomTo = -1;\n }\n\n }",
"public void handleZoom(MouseEvent event){\n ImageView imageView = (ImageView) event.getSource();\n Image imageToShow = imageView.getImage();\n zoomImage.setImage(imageToShow);\n zoomPane.setVisible(true);\n }",
"public void zoom(double factor, Point mouseLocation) {\n Point2D.Double viewOffset = viewCoords_.getViewOffset();\n Point2D.Double sourceDataSize = viewCoords_.getFullResSourceDataSize();\n Point2D.Double zoomCenter;\n //compute centroid of the zoom in full res coordinates\n if (mouseLocation == null) {\n //if mouse not over image zoom to center\n zoomCenter = new Point2D.Double(viewOffset.x + sourceDataSize.y / 2,\n viewOffset.y + sourceDataSize.y / 2);\n } else {\n zoomCenter = new Point2D.Double(\n (long) viewOffset.x + mouseLocation.x\n / viewCoords_.getMagnificationFromResLevel()\n * viewCoords_.getDownsampleFactor(),\n (long) viewOffset.y + mouseLocation.y\n / viewCoords_.getMagnificationFromResLevel()\n * viewCoords_.getDownsampleFactor());\n }\n\n //Do zooming--update size of source data\n double newSourceDataWidth = sourceDataSize.x * factor;\n double newSourceDataHeight = sourceDataSize.y * factor;\n if (newSourceDataWidth < 5 || newSourceDataHeight < 5) {\n return; //constrain maximum zoom\n }\n if (data_.getBounds() != null) {\n //don't let either of these go bigger than the actual data\n double overzoomXFactor = newSourceDataWidth / (viewCoords_.xMax_ - viewCoords_.xMin_);\n double overzoomYFactor = newSourceDataHeight / (viewCoords_.yMax_ - viewCoords_.yMin_);\n if (overzoomXFactor > 1 || overzoomYFactor > 1) {\n newSourceDataWidth = newSourceDataWidth / Math.max(overzoomXFactor, overzoomYFactor);\n newSourceDataHeight = newSourceDataHeight / Math.max(overzoomXFactor, overzoomYFactor);\n }\n }\n viewCoords_.setFullResSourceDataSize(newSourceDataWidth, newSourceDataHeight);\n\n double xOffset = (zoomCenter.x - (zoomCenter.x - viewOffset.x)\n * newSourceDataWidth / sourceDataSize.x);\n double yOffset = (zoomCenter.y - (zoomCenter.y - viewOffset.y)\n * newSourceDataHeight / sourceDataSize.y);\n //make sure view doesn't go outside image bounds\n if (data_.getBounds() != null) {\n viewCoords_.setViewOffset(\n Math.max(viewCoords_.xMin_, Math.min(xOffset,\n viewCoords_.xMax_ - viewCoords_.getFullResSourceDataSize().x)),\n Math.max(viewCoords_.yMin_, Math.min(yOffset,\n viewCoords_.yMax_ - viewCoords_.getFullResSourceDataSize().y)));\n } else {\n viewCoords_.setViewOffset(xOffset, yOffset);\n }\n }",
"public void setZoom(float zoom){\r\n zoom = zoom * 100;\r\n zoom = Math.round(zoom);\r\n this.zoom = Math.max(zoom / 100, 0.01f);\r\n }",
"public void zoomToFit(RTGraphComponent.RenderContext myrc) {\n RTGraphComponent.RenderContext original_myrc = myrc;\n // Get the render context\n if (myrc == null) myrc = (RTGraphComponent.RenderContext) (getRTComponent().getRTRenderContext()); if (myrc == null) return;\n // Go through the entities... may be faster to iterate over visible entities...\n Iterator<String> it = entity_to_wxy.keySet().iterator(); if (it.hasNext() == false) return;\n double x0 = Double.POSITIVE_INFINITY, y0 = Double.POSITIVE_INFINITY,\n x1 = Double.NEGATIVE_INFINITY, y1 = Double.NEGATIVE_INFINITY;\n // Check bounds for each one and adjust mins/maxes as appropriate\n while (it.hasNext()) { \n String str = it.next(); if (myrc.visible_entities.contains(str) == false) continue;\n if (x0 > entity_to_wxy.get(str).getX()) x0 = entity_to_wxy.get(str).getX();\n if (y0 > entity_to_wxy.get(str).getY()) y0 = entity_to_wxy.get(str).getY();\n if (x1 < entity_to_wxy.get(str).getX()) x1 = entity_to_wxy.get(str).getX();\n if (y1 < entity_to_wxy.get(str).getY()) y1 = entity_to_wxy.get(str).getY();\n }\n // Validate the output\n if (Double.isInfinite(x0) || Double.isInfinite(y0)) return;\n // Give it a border\n if (x1 == x0) x1 = x0 + 0.5; if (y1 == y0) y1 = y0 + 0.5;\n double xp = (x1 - x0)*0.05, yp = (y1 - y0)*0.05;\n // Transform and redraw\n if (getGraphBG() == GraphBG.GEO_OUT || getGraphBG() == GraphBG.GEO_FILL || getGraphBG() == GraphBG.GEO_TOUCH) {\n if (x0 > -180) { x0 = -180; xp = 0.0; }\n if (y0 > -90) { y0 = -90; yp = 0.0; }\n if (x1 < 180) { x1 = 180; xp = 0.0; }\n if (y1 < 90) { y1 = 90; yp = 0.0; }\n }\n extents = new Rectangle2D.Double(x0-xp,y0-yp,x1-x0+2*xp,y1-y0+2*yp);\n transform(); if (original_myrc == null) getRTComponent().render();\n }",
"public void normalization(Map <String,ArrayList<Point>> map){\r\n \t/*First Translation*/\r\n \tint minX,minY,x,y,i = 0;\r\n \tminX = minXValue(map);\r\n \tminY = minYValue(map);\r\n \tint indexTrans = 0;\r\n \tfor (String key : map.keySet()) {\r\n \t\tx = (int) (map.get(key).get(indexTrans).getX() - minX);\r\n \t\ty = (int) (map.get(key).get(indexTrans).getY()- minY);\r\n \t\t/*set new x and y*/\r\n \t\tmap.get(key).set(i, new Point(x,y));\r\n \t\tindexTrans++;\r\n \t\t}\r\n \t/*Scaling */\r\n \t/*x = x*s ; y = y*s */\r\n \t/*initialize s*/\r\n \tint xMaxWindow= 600,yMaxWindow = 600,s;\r\n \tif ((xMaxWindow/maxXValue(map)) < (yMaxWindow/maxYValue(map)))\r\n \t{\r\n \t\t\ts = (int) (0.8*(xMaxWindow/maxXValue(map)));\r\n \t}\r\n \t\telse\r\n \t\t{\r\n \t\ts = (int) (0.8*(yMaxWindow/maxYValue(map)));\r\n \t\t}\r\n \tint indexScaling = 0;\r\n \tfor (String key : map.keySet()) {\r\n \t\tx = (int) (map.get(key).get(indexScaling).getX()*s);\r\n \t\ty = (int) (map.get(key).get(indexScaling).getY()*s);\r\n \t\t/*set new x and y*/\r\n \t\tmap.get(key).set(i, new Point(x,y));\r\n \t\tindexScaling++;\r\n \t\t}\r\n \t/*Translation Back*/\r\n \t/* x = x + 0.1*xMaxWindow ; y = y + 0.1*yMaxWindow */\r\n \tint iSecTrans = 0;\r\n \tfor (String key : map.keySet()) {\r\n \t\tx = (int) (map.get(key).get(i).getX() + 0.1*xMaxWindow);\r\n \t\ty = (int) (map.get(key).get(i).getY() + 0.1*yMaxWindow);\r\n \t\t/*set new x and y*/\r\n \t\tmap.get(key).set(i, new Point(x,y));\r\n \t\tiSecTrans++;\r\n \t\t}\r\n \r\n \t\r\n \t\r\n }"
] |
[
"0.7257503",
"0.7043602",
"0.7007457",
"0.69664735",
"0.69458944",
"0.67041963",
"0.67013156",
"0.660718",
"0.6601",
"0.65878624",
"0.6577437",
"0.65262234",
"0.6447546",
"0.63929904",
"0.63824725",
"0.6380527",
"0.6363989",
"0.6361688",
"0.63586557",
"0.6337621",
"0.63262653",
"0.63046587",
"0.6283791",
"0.6277103",
"0.6276257",
"0.62732345",
"0.62285864",
"0.6209617",
"0.6205369",
"0.61911005",
"0.61195093",
"0.60889393",
"0.60748166",
"0.6072525",
"0.6063999",
"0.6062625",
"0.6012495",
"0.5997538",
"0.59904087",
"0.5989694",
"0.59843075",
"0.59760576",
"0.59741026",
"0.5926313",
"0.5909017",
"0.59041935",
"0.59011954",
"0.5896933",
"0.5879866",
"0.58613455",
"0.58605003",
"0.58601546",
"0.5845778",
"0.58279306",
"0.58170336",
"0.5816506",
"0.57809585",
"0.5756621",
"0.5747238",
"0.57135826",
"0.5713073",
"0.57113945",
"0.5709827",
"0.5706191",
"0.5705504",
"0.56802946",
"0.56579024",
"0.56525046",
"0.5651218",
"0.56484115",
"0.56405634",
"0.5636487",
"0.56355745",
"0.5608075",
"0.56079674",
"0.56008923",
"0.5586415",
"0.5583408",
"0.55808926",
"0.55651176",
"0.55620766",
"0.5560707",
"0.5555005",
"0.5541975",
"0.5535341",
"0.5519853",
"0.5515076",
"0.55109966",
"0.5501291",
"0.5492684",
"0.5488691",
"0.5486634",
"0.5485087",
"0.546785",
"0.54664725",
"0.5463997",
"0.54576457",
"0.54529375",
"0.544987",
"0.5448584",
"0.5444542"
] |
0.0
|
-1
|
/ Zoom and drag stuff
|
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
zoomer = true;
//Zoom in
if (e.getWheelRotation() < 0) {
zoomFactor *= 1.1;
repaint();
}
//Zoom out
if (e.getWheelRotation() > 0) {
zoomFactor /= 1.1;
repaint();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void dragZoom() {\n\n\t\tint width = this.getWidth();\n\n\t\tint start = cont.getStart();\n\t\tdouble amount = cont.getLength();\n\n\t\tint newStart = (int) DrawingTools.calculatePixelPosition(x ,width,amount,start);\n\t\tint newStop = (int) DrawingTools.calculatePixelPosition(x2,width,amount,start);\n\t\tx = x2 = 0;\n\n\t\tint temp;\n\t\tif (newStop < newStart){\n\t\t\ttemp = newStart;\n\t\t\tnewStart = newStop;\n\t\t\tnewStop = temp;\n\t\t}\n\n\t\tcont.changeSize(newStart,newStop);\n\n\t}",
"protected abstract void handleZoom();",
"public void mouseDragged (LayerEvent event) {\r\n \t\t\tif (!isEnabled()) return;\r\n\t\t\tif (!_isZoomingOut && !_isZoomingIn) return;\r\n \r\n\t\t\tif (_rubberBand == null) {\r\n\t \t// This should never happen, but it does.\r\n\t \treturn;\r\n\t\t\t\t}\r\n \r\n\t\t\tif (_zoomInFilter.accept(event) || _zoomOutFilter.accept(event)) {\r\n\t\t\t\t_isZoomingIn = _zoomInFilter.accept(event);\r\n\t\t \t_isZoomingOut = _zoomOutFilter.accept(event);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\ttrekPane.getCanvas().setCursor( _isZoomingIn ? TrekController.ZOOMIN_CURSOR : TrekController.ZOOMOUT_CURSOR);\r\n\t\t\t\r\n\t\t\t// Figure out the coordinates of the rubber band\r\n\t\t\t_overlayLayer.repaint(_rubberBand);\r\n\r\n\t\t double useXPos = event.getLayerX();\r\n\t\t double useYPos = event.getLayerY();\r\n\t\t \r\n\t\t\t// space held down translates\r\n\t\t\t// rubberband _originX, _originY by event-prev\r\n\t\t\tif (((TrekCanvas)trekPane.getCanvas()).isSpaceDown()) {\r\n\t\t\t\t_originX += (useXPos - prevX);\r\n\t\t\t\t_originY += (useYPos - prevY);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\tprevX = event.getLayerX();\r\n\t\t\tprevY = event.getLayerY();\r\n\t\t\t\r\n\t\t // Without control down rubberband conforms to visible aspect ratio\r\n\t\t if (!((TrekCanvas)trekPane.getCanvas()).isControlDown()) {\r\n\t\t\t\tDimension visSize = trekPane.getVisibleSize();\r\n\t\t\t\tdouble currAspect = visSize.getHeight()/visSize.getWidth();\r\n\t\t\t\tif (Math.abs(useYPos - _originY) > Math.abs(useXPos - _originX)) {\r\n\t\t\t\t\tuseXPos = _originX + (useXPos < _originX ? -1.0 : 1.0)*Math.abs((useYPos - _originY)/currAspect);\r\n\t\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tuseYPos = _originY + (useYPos < _originY ? -1.0 : 1.0)*Math.abs((useXPos - _originX)*currAspect);\r\n\t\t\t\t\t}\r\n\t\t \t}\r\n\t\t \r\n\t\t\tif (event.isAltDown()) {\r\n\t\t\t\t_rubberBand.setFrameFromCenter(_originX, _originY, useXPos, useYPos);\r\n\t\t\t\t}\r\n else {\r\n\t\t\t\t_rubberBand.setFrameFromDiagonal(_originX, _originY, useXPos, useYPos);\r\n \t}\r\n \t\r\n\t\t\t_overlayLayer.repaint(_rubberBand);\r\n\r\n\t\t\t// Could possibly do some custom drawing showing an in or out zoom\r\n\t\t\tif (_isZoomingIn) {\r\n } \r\n else {\r\n }\r\n \r\n\t\t// Consume the event\r\n\t\tif (isConsuming()) {\r\n\t\t\tevent.consume();\r\n\t\t\t}\r\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tif(scale != 1.0) {\n\t\t\tPoint2D.Double view = new Point2D.Double(e.getX(), e.getY());\n\t\t\tPoint2D.Double worldPoint = new Point2D.Double();\n\t\t\tAffineTransform viewToWorld = new AffineTransform(1.0 / scale, 0, 0, 1.0 / scale, worldUpperLeft.getX(), worldUpperLeft.getY());\n\t\t\tviewToWorld.transform(view, worldPoint);\n\t\t\t\n\t\t\twX = worldPoint.getX();\n\t\t\twY = worldPoint.getY();\n\t\n\t\t\tdouble diffX = wDragStartX - wX;\n\t\t\tdouble diffY = wDragStartY - wY;\n\t\t\tdouble wulX = worldUpperLeft.getX();\n\t\t\tdouble wulY = worldUpperLeft.getY();\n\t\t\tdouble newUpX = diffX + wulX;\n\t\t\tdouble newUpY = diffY + wulY;\n\t\t\t\n\t\t\tif(newUpX < 0)\n\t\t\t\tnewUpX = 0;\n\t\t\tif(newUpY < 0)\n\t\t\t\tnewUpY = 0;\n\t\t\tif(scale == 2.0 && newUpX > 512)\n\t\t\t\tnewUpX = 512;\n\t\t\tif(scale == 2.0 && newUpY > 512)\n\t\t\t\tnewUpY = 512;\n\t\t\tif(scale == 4.0 && newUpX > 768)\n\t\t\t\tnewUpX = 768;\n\t\t\tif(scale == 4.0 && newUpY > 768)\n\t\t\t\tnewUpY = 768;\n\t\t\t\n\t\t\tworldUpperLeft = new Point2D.Double(newUpX, newUpY);\n\t\t\t\n\t\t\tif(worldUpperLeft.getX() + scrollbarSize > MAXSCROLLBARSIZE) \n\t\t\t\tGUIFunctions.setHScrollBarPosit(MAXSCROLLBARSIZE - scrollbarSize);\n\t\t\telse \n\t\t\t\tGUIFunctions.setHScrollBarPosit((int) worldUpperLeft.getX());\n\t\t\t\n\t\t\tif(worldUpperLeft.getY() + scrollbarSize > MAXSCROLLBARSIZE) \n\t\t\t\tGUIFunctions.setVScrollBarPosit(MAXSCROLLBARSIZE - scrollbarSize);\n\t\t\telse \n\t\t\t\tGUIFunctions.setVScrollBarPosit((int) worldUpperLeft.getY());\n\t\t\tGUIFunctions.refresh();\n\t\t}\n\t}",
"private void drag() {\n Point mousePosition = calculateMouseLocation();\n getArea().x = mousePosition.getX() - (mouseX - prevX);\n getArea().y = mousePosition.getY() - (mouseY - prevY);\n // Ensure that weird resizing stuff doesn't happen while moving the\n // window. Idfk why this works, but it does.\n resize();\n getLayout().resize(this, getChildren());\n getLayout().layout(this, getChildren());\n }",
"public void mouseDragged(MouseEvent e) {\r\n// if (mouseDraggedEnabled && ((e.getModifiers() & (InputEvent.ALT_DOWN_MASK | InputEvent.ALT_MASK)) == 0))\r\n if (mouseDraggedEnabled && mouseDraggedType == MOUSE_DRAG_ZOOM) {\r\n if (parent.onEvent(e, ChartPanel.MOUSE_DRAGGED)) {\r\n dragged = true;\r\n int _x = Math.min(draggedFromX, e.getX());\r\n int _y = Math.min(draggedFromY, e.getY());\r\n int _w = Math.abs(draggedFromX - e.getX());\r\n int _h = Math.abs(draggedFromY - e.getY());\r\n draggingRectangle = new Rectangle(_x, _y, _w, _h);\r\n repaint();\r\n }\r\n } else if (mouseDraggedEnabled && mouseDraggedType == MOUSE_DRAW_LINE_ON_CHART) {\r\n this.setCursor(crossHairCursor);\r\n if (parent.onEvent(e, ChartPanel.MOUSE_DRAGGED)) {\r\n dragged = true;\r\n int x1 = draggedFromX;\r\n int y1 = draggedFromY;\r\n int x2 = e.getX();\r\n int y2 = e.getY();\r\n lineToDraw = new ArrayList<Point>(2);\r\n lineToDraw.add(new Point(x1, y1));\r\n lineToDraw.add(new Point(x2, y2));\r\n repaint();\r\n }\r\n }\r\n// if ((e.getModifiers() & (InputEvent.ALT_DOWN_MASK | InputEvent.ALT_MASK)) != 0) // Alt + Click: Grab Scroll\r\n if (mouseDraggedEnabled && mouseDraggedType == MOUSE_DRAG_GRAB_SCROLL) {\r\n this.setCursor(closedHandCursor);\r\n int x = this.getVisibleRect().x - (e.getX() - draggedFromX);\r\n int y = this.getVisibleRect().y - (e.getY() - draggedFromY);\r\n this.scrollRectToVisible(new Rectangle(x, y, this.getVisibleRect().width, this.getVisibleRect().height));\r\n// this.setCursor(defaultCursor);\r\n }\r\n // MOUSE_DRAW_ON_CHART\r\n if (mouseDraggedEnabled && mouseDraggedType == MOUSE_DRAW_ON_CHART) {\r\n this.setCursor(drawingCursor);\r\n if (parent.onEvent(e, ChartPanel.MOUSE_DRAGGED)) {\r\n dragged = true;\r\n if (oneDrawing == null) {\r\n oneDrawing = new PointList<GeoPoint>(10);\r\n oneDrawing.setLineColor(drawColor);\r\n }\r\n GeoPoint dpt = getGeoPos(e.getX(), e.getY());\r\n // System.out.println(\"Point \" + dpt.toString());\r\n oneDrawing.add(dpt);\r\n repaint();\r\n }\r\n }\r\n if (parent instanceof ChartPanelParentInterface_II)\r\n ((ChartPanelParentInterface_II) parent).afterEvent(e, ChartPanel.MOUSE_DRAGGED);\r\n }",
"public void zoomIn() { zoomIn(1); }",
"public void zoomIn() {\n if (scale < 0.8) {\n double scaleFactor = (scale + 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale += 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n\n }",
"public void wheelZoom(MouseWheelEvent e) {\n try {\n int wheelRotation = e.getWheelRotation();\n Insets x = getInsets(); //Top bar space of the application\n Point p = e.getPoint();\n p.setLocation(p.getX() , p.getY()-x.top + x.bottom);\n if (wheelRotation > 0 && zoomLevel != 0) {\n //point2d before zoom\n Point2D p1 = transformPoint(p);\n transform.scale(1 / 1.2, 1 / 1.2);\n //point after zoom\n Point2D p2 = transformPoint(p);\n transform.translate(p2.getX() - p1.getX(), p2.getY() - p1.getY()); //Pan towards mouse\n checkForZoomOut();\n repaint();\n\n } else if (wheelRotation < 0 && zoomLevel != 20) {\n Point2D p1 = transformPoint(p);\n transform.scale(1.2, 1.2);\n Point2D p2 = transformPoint(p);\n transform.translate(p2.getX() - p1.getX(), p2.getY() - p1.getY()); //Pan towards mouse\n checkForZoomIn();\n repaint();\n }\n } catch (NoninvertibleTransformException ex) {\n ex.printStackTrace();\n }\n\n }",
"@Override\n public void mouseDragged(MouseEvent e) {\n\n }",
"public void mouseDragged (MouseEvent e) {}",
"boolean allowZoom();",
"void multitouchZoom(int new_zoom);",
"@Override\n\t\t\tpublic void mouseWheelMoved(MouseWheelEvent e) {\n\t\t\t\tif(enabled){\n\t\t\t\tImageIcon tap = null;\n\t\t\t\tif (e.getWheelRotation() < 0) {\n\t\t\t\t\t// zoom in - increase size\n\n\t\t\t\t\tif (zoom_count < 0) {\n\t\t\t\t\t\tzoom_count = 0;\n\t\t\t\t\t}\n\t\t\t\t\tzoom_count++;\n\t\t\t\t\t// fetch key frame number and get x, y of that frame in new\n\t\t\t\t\t// tapestry then crop image to that frame\n\t\t\t\t\tHashtable<Integer, ArrayList<ArrayList<Integer>>> xy = indexMap.getIndexTable();\n\t\t\t\t\ttapestry.removeAll();\n\t\t\t\t\tBufferedImage i = null;\n\t\t\t\t\tif (zoom_count == 1) {\n\t\t\t\t\t\tint pix = indexImage.getRGB(e.getX(), e.getY());\n\t\t\t\t\t\tint frameNum = (pix >> 16) & 0x000000FF;\n\t\t\t\t\t\tint keyFrameIndex = sceneIndex.get(frameNum);\n\t\t\t\t\t\tint frame = keyFrameIndex / (352 * 288 * 3);\n\n\t\t\t\t\t\t// find x,y of new tapestry\n\t\t\t\t\t\tSystem.out.println(\"x point in new tapestry: \" + xy.get(frame).get(1).get(0));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ti = ImageIO.read(new File(nameOfTapestry + \"_\" + method + \"_\" + threshold_zoom1 + \".png\"));\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint zoom_image_width = i.getWidth();\n\t\t\t\t\t\tint middle = zoom_image_width - original_tapestry_size_width;\n\n\t\t\t\t\t\tint T = 5;\n\n\t\t\t\t\t\tif (xy.get(frame).get(1).get(0) - T < 0) {\n\t\t\t\t\t\t\tstart_x = 0;\n\t\t\t\t\t\t\tend_x = original_tapestry_size_width;\n\t\t\t\t\t\t} else if ((xy.get(frame).get(1).get(0) - T + original_tapestry_size_width) > zoom_image_width) {\n\t\t\t\t\t\t\tstart_x = zoom_image_width - original_tapestry_size_width;\n\t\t\t\t\t\t\tend_x = zoom_image_width;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstart_x = xy.get(frame).get(1).get(0) - T;\n\t\t\t\t\t\t\tend_x = xy.get(frame).get(1).get(0) - T + original_tapestry_size_width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"x_start point : \" + start_x);\n\t\t\t\t\t\tSystem.out.println(\"x_endt point : \" + end_x);\n\n\t\t\t\t\t\ti = i.getSubimage(start_x, 0, (end_x - start_x), original_tapestry_size_height);\n\t\t\t\t\t\ttap = new ImageIcon(i);\n\t\t\t\t\t\tzoom_count=1;\n\n\t\t\t\t\t} else if (zoom_count >= 2) {\n\n\t\t\t\t\t\tint pix = zoom1IndexImage.getRGB(e.getX(), e.getY());\n\t\t\t\t\t\tint frameNum = (pix >> 16) & 0x000000FF;\n\t\t\t\t\t\tint keyFrameIndex = zoom1SceneIndex.get(frameNum);\n\t\t\t\t\t\tint frame = keyFrameIndex / (352 * 288 * 3);\n\n\t\t\t\t\t\t// find x,y of new tapestry\n\t\t\t\t\t\tSystem.out.println(\"x point in new tapestry: \" + xy.get(frame).get(2).get(0));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ti = ImageIO.read(new File(nameOfTapestry + \"_\" + method + \"_\" + threshold_zoom2 + \".png\"));\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint zoom_image_width = i.getWidth();\n\t\t\t\t\t\tint middle = zoom_image_width - original_tapestry_size_width;\n\n\t\t\t\t\t\tint T = 20;\n\n\t\t\t\t\t\tif (xy.get(frame).get(2).get(0) - T < 0) {\n\t\t\t\t\t\t\tstart_x = 0;\n\t\t\t\t\t\t\tend_x = original_tapestry_size_width;\n\t\t\t\t\t\t} else if ((xy.get(frame).get(2).get(0) - T + original_tapestry_size_width) > zoom_image_width) {\n\t\t\t\t\t\t\tstart_x = zoom_image_width - original_tapestry_size_width;\n\t\t\t\t\t\t\tend_x = zoom_image_width;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstart_x = xy.get(frame).get(2).get(0) - T;\n\t\t\t\t\t\t\tend_x = xy.get(frame).get(2).get(0) - T + original_tapestry_size_width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"x_start point : \" + start_x);\n\t\t\t\t\t\tSystem.out.println(\"x_endt point : \" + end_x);\n\n\t\t\t\t\t\ti = i.getSubimage(start_x, 0, (end_x - start_x), original_tapestry_size_height);\n\t\t\t\t\t\ttap = new ImageIcon(i);\n\t\t\t\t\t\tzoom_count=2;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tJLabel label = new JLabel(\"\", tap, JLabel.CENTER);\n\n\t\t\t\t\ttapestry.add(label, BorderLayout.CENTER);\n\n\t\t\t\t\ttapestry.revalidate();\n\t\t\t\t\ttapestry.repaint();\n\n\t\t\t\t} else {\n\t\t\t\t\t// zoom out - decrease size\n\t\t\t\t\tif (zoom_count > 2) {\n\t\t\t\t\t\tzoom_count = 2;\n\t\t\t\t\t}\n\t\t\t\t\tHashtable<Integer, ArrayList<ArrayList<Integer>>> xy = indexMap.getIndexTable();\n\t\t\t\t\ttapestry.removeAll();\n\t\t\t\t\tif (zoom_count >= 2) {\n\t\t\t\t\t\tint pix = zoom2IndexImage.getRGB(e.getX(), e.getY());\n\t\t\t\t\t\tint frameNum = (pix >> 16) & 0x000000FF;\n\t\t\t\t\t\tint keyFrameIndex = zoom2SceneIndex.get(frameNum);\n\t\t\t\t\t\tint frame = keyFrameIndex / (352 * 288 * 3);\n\n\t\t\t\t\t\t// find x,y of new tapestry\n\t\t\t\t\t\tSystem.out.println(\"x point in new tapestry: \" + xy.get(frame).get(1).get(0));\n\t\t\t\t\t\tBufferedImage i = null;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ti = ImageIO.read(new File(nameOfTapestry + \"_\" + method + \"_\" + threshold_zoom1 + \".png\"));\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint zoom_image_width = i.getWidth();\n\t\t\t\t\t\tint middle = zoom_image_width - original_tapestry_size_width;\n\n\t\t\t\t\t\tint T = 20;\n\n\t\t\t\t\t\tif (xy.get(frame).get(1).get(0) - T < 0) {\n\t\t\t\t\t\t\tstart_x = 0;\n\t\t\t\t\t\t\tend_x = original_tapestry_size_width;\n\t\t\t\t\t\t} else if ((xy.get(frame).get(1).get(0) - T + original_tapestry_size_width) > zoom_image_width) {\n\t\t\t\t\t\t\tstart_x = zoom_image_width - original_tapestry_size_width;\n\t\t\t\t\t\t\tend_x = zoom_image_width;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstart_x = xy.get(frame).get(1).get(0) - T;\n\t\t\t\t\t\t\tend_x = xy.get(frame).get(1).get(0) - T + original_tapestry_size_width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"x_start point : \" + start_x);\n\t\t\t\t\t\tSystem.out.println(\"x_endt point : \" + end_x);\n\n\t\t\t\t\t\ti = i.getSubimage(start_x, 0, (end_x - start_x), original_tapestry_size_height);\n\t\t\t\t\t\ttap = new ImageIcon(i);\n\t\t\t\t\t\tzoom_count = 1;\n\n\t\t\t\t\t} else if (zoom_count <= 1) {\n\t\t\t\t\t\ttap = new ImageIcon(nameOfTapestry + \"_\" + method + \"_\" + threshold + \".png\");\n\t\t\t\t\t\tzoom_count = 0;\n\t\t\t\t\t}\n\t\t\t\t\tJLabel label = new JLabel(\"\", tap, JLabel.CENTER);\n\n\t\t\t\t\ttapestry.add(label, BorderLayout.CENTER);\n\n\t\t\t\t\ttapestry.revalidate();\n\t\t\t\t\ttapestry.repaint();\n\t\t\t\t}\n\n\t\t\t}\n\t\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 \t}",
"public void panOrZoom(ME_ENUM me_enum, MouseEvent me) {\n if (me.getButton() != MouseEvent.BUTTON2 && ui_inter != UI_INTERACTION.PANNING && pan_mode == false) return;\n switch (me_enum) {\n case PRESSED: initializeDragVars(me); ui_inter = UI_INTERACTION.PANNING; repaint(); break;\n case DRAGGED: updateDragVars(me,true); repaint(); break;\n case RELEASED: updateDragVars(me,true); ui_inter = UI_INTERACTION.NONE; \n double dx = m_wx1 - m_wx0, dy = m_wy1 - m_wy0;\n if (dx != 0.0 || dy != 0.0) {\n Rectangle2D r = getExtents();\n setExtents(new Rectangle2D.Double(r.getX() - dx, r.getY() - dy, r.getWidth(), r.getHeight()));\n }\n break;\n case CLICKED: zoomToFit(); break;\n\tcase MOVED:\n\t\tbreak;\n\tcase WHEEL:\n\t\tbreak;\n\tdefault:\n\t\tbreak;\n }\n }",
"@Override\n public void mouseDragged(MouseEvent e) {\n\n // Check whether left or right mouse is held\n if (SwingUtilities.isLeftMouseButton(e)) {\n // Get x and y\n int x = e.getX();\n int y = e.getY();\n\n // Rotate for LMB\n rt_y -= (old_x - x) / 2;\n rt_x -= (old_y - y) / 2;\n\n // Overwrite last frame data\n old_x = x;\n old_y = y;\n } else if (SwingUtilities.isRightMouseButton(e)) {\n // Get x and y\n int x = e.getX();\n int y = e.getY();\n\n // Translate for RMB\n tr_x -= ((float) old_x - (float) x) / 1000;\n tr_y += ((float) old_y - (float) y) / 1000;\n\n // Overwrite last frame data\n old_x = x;\n old_y = y;\n }\n }",
"@Override\r\n public void mouseDragged(MouseEvent e) {\r\n int deltaX = e.getXOnScreen() - screenX;\r\n int deltaY = e.getYOnScreen() - screenY; \r\n \r\n setLocation(myX + deltaX, myY + deltaY);\r\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}",
"protected void zoomBetweenCursors(){\n ixDataCursor1 = ixDataShown[xpCursor1];\n ixDataCursor2 = ixDataShown[xpCursor2];\n ixDataShowRight = ixDataCursor2 + (((ixDataCursor2 - ixDataCursor1) / 10) & widgg.mIxData);\n int ixiData1 = (ixDataShown[xpCursor1] >> widgg.shIxiData) & widgg.mIxiData;\n int ixiData2 = (ixDataShown[xpCursor2] >> widgg.shIxiData) & widgg.mIxiData;\n int time1 = widgg.tracksValue.getTimeShort(ixiData1);\n int time2 = widgg.tracksValue.getTimeShort(ixiData2);\n if((time2 - time1)>0){\n widgg.timeorg.timeSpread = (time2 - time1) * 10/8;\n assert(widgg.timeorg.timeSpread >0);\n } else {\n widgg.stop();\n }\n xpCursor1New = xpCursor2New = cmdSetCursor; \n widgg.redraw(100, 200);\n \n }",
"public void mouseDragged(MouseEvent e){}",
"public void mouseDragged(MouseEvent e) {}",
"@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 zoom() {\n\t\tdisp.zoom();\n\t\texactZoom.setText(disp.getScale() + \"\");\n\t\tresize();\n\t\trepaint();\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Zoom less\");\r\n\t\t\t}",
"void onDrag(float elasticOffset,\n float elasticOffsetPixels,\n float rawOffset,\n float rawOffsetPixels);",
"@Override\n public void mouseDragged(MouseEvent evt) {\n setLocation(evt.getXOnScreen() - posX, evt.getYOnScreen() - posY);\n }",
"@Override\n public void drag(int x, int y)\n {\n }",
"@Override\n\t\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t}",
"@Override\n public void mouseWheelMoved(MouseWheelEvent e) {\n // Check direction of rotation\n if (e.getWheelRotation() < 0) {\n // Zoom in for up\n tr_z += 0.01f;\n } else {\n // Zoom out for down\n tr_z -= 0.01f;\n }\n }",
"@Override\r\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 Zoom(double zoomNo) {\n\t \n }",
"@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\tmouseMoved(e);\n\t\t\tint moveX= (int) e.getPoint().getX();//abscisse actuelle de ma souris \n\t\t\tint moveY= (int) e.getPoint().getY();//ordonnee actuelle de ma souris \n\t\t\tif (avantX>moveX){//l'abscisse est plus grand qu'avant ca veut dire qu'on est allr vers la droite avec la souris.\n\t\t\t\tmX++;\n\t\t\t}\n\t\t\telse if (avantX<moveX){//l'abscisse est plus petit qu'avant ca veut dire qu'on est alle vers la gauche avec la souris.\n\t\t\t\tmX--;\n\t\t\t}\n\t\t\tif (avantY>moveY){//l'ordonnee est plus petit qu'avant ca veut dire qu'on est alle vers le haut avec la souris.\n\t\t\t\tmY++;\n\t\t\t}\n\t\t\telse if (avantY<moveY ){//l'ordonnee est plus grand qu'avant ca veut dire qu'on est alle vers le bas avec la souris.\n\t\t\t\tmY--;\n\t\t\t}\n\t\t\t//j'enregistre les positions actuelles.\n\t\t\tavantX=moveX;\n\t\t\tavantY=moveY;\n\t\t\tdeplacementMinimap();\n\t\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tshowmBox = false;\n\n\t\tint newx = e.getX(), newy = getHeight() - e.getY();\n\t\tint changex = newx - mousemovex, changey = newy - mousemovey;\n\n\t\tdouble changewindowx = changex * (param.maxx - param.minx) / (getWidth());\n\t\tdouble changewindowy = changey * (param.maxy - param.miny) / (-getHeight());\n\n\t\tparam.maxx -= changewindowx;\n\t\tparam.minx -= changewindowx;\n\t\tparam.maxy += changewindowy;\n\t\tparam.miny += changewindowy;\n\n\t\tmousemovex = newx;\n\t\tmousemovey = newy;\n\n\t\trepaint();\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\n\t}",
"public void mouseReleased() {\nif (released == true && draggingZoomSlider == true){\n alt = (map(zoom,texture.height-texture.height,texture.height,radians(-90),radians(90)));\n // GHA = (map(tzoom, texture.width - texture.width, texture.width, radians(-180),radians(180)));\n GHA = (map(tzoom,texture.width - texture.width,texture.width, radians(-180),radians(180)));\n initStars();\n initializeSphere(sDetail);\n thread( \"getPoints\");\n renderGlobe();\n}\ndraggingZoomSlider = false;\n}",
"protected void zoomToPresent(){\n if(xpCursor1 >=0){\n ixDataCursor1 = ixDataShown[xpCursor1];\n }\n if(xpCursor2 >=0){\n ixDataCursor2 = ixDataShown[xpCursor2];\n }\n xpCursor1New = xpCursor2New = cmdSetCursor; \n if(widgg.timeorg.timeSpread > 100) { widgg.timeorg.timeSpread /=2; }\n else { widgg.timeorg.timeSpread = 100; }\n bPaintAllCmd = true;\n widgg.redraw(100, 200);\n }",
"void mouseDragged(double x, double y, MouseEvent e );",
"@Override\n public boolean onTouch(View view, MotionEvent event) {\n final int X = (int) event.getRawX();\n final int Y = (int) event.getRawY();\n\n Delta delta = deltas.get(view);\n if(delta == null ){\n delta = new Delta();\n }\n\n\n final int action = event.getAction();\n final int fingersCount = event.getPointerCount();\n\n\n\n// if ((action == MotionEvent.ACTION_DOWN) && (fingersCount == 2)) {\n//\n// if(event.get\n//// if(keyCode== KeyEvent.KEYCODE_DPAD_UP){\n// // zoom in\n//// zoomControler+=10;\n// view.getLayoutParams().width += 10; //setBounds(new Float(this.getX()).intValue(), new Float(this.getY()).intValue(),getWidth()+10, this.getHeight()+10);\n// view.getLayoutParams().height += 10;\n//// }\n//// if(keyCode==KeyEvent.KEYCODE_DPAD_DOWN){\n//// // zoom out\n//// zoomControler-=10;\n//// image.setBounds(new Float(this.getX()).intValue(), new Float(this.getY()).intValue(),getWidth()-10, this.getHeight()-10);\n//// }\n//// if(zoomControler<10){\n//// zoomControler=10;\n//// image.setBounds(new Float(this.getX()).intValue(), new Float(this.getY()).intValue(),getWidth(), this.getHeight());\n//// }\n// return true;\n// }\n\n\n //Dependiendo de la accion recogida..\n switch (event.getAction() & MotionEvent.ACTION_MASK) {\n //Al tocar la pantalla\n case MotionEvent.ACTION_DOWN:\n //Recogemos los parametros de la imagen que hemo tocado\n RelativeLayout.LayoutParams Params =\n (RelativeLayout.LayoutParams) view.getLayoutParams();\n delta.xDelta = X - Params.leftMargin;\n delta.yDelta = Y - Params.topMargin;\n break;\n case MotionEvent.ACTION_UP:\n //Al levantar el dedo simplemento mostramos un mensaje\n// Toast.makeText(this, \"Soltamos\", Toast.LENGTH_LONG).show();\n break;\n case MotionEvent.ACTION_POINTER_DOWN:\n //No hace falta utilizarlo\n break;\n case MotionEvent.ACTION_POINTER_UP:\n //No hace falta utilizarlo\n break;\n case MotionEvent.ACTION_MOVE:\n //Al mover el dedo vamos actualizando\n //los margenes de la imagen para\n //crear efecto de arrastrado\n RelativeLayout.LayoutParams layoutParams =\n (RelativeLayout.LayoutParams) view.getLayoutParams();\n layoutParams.leftMargin = X - delta.xDelta;\n layoutParams.topMargin = Y - delta.yDelta;\n //Qutamos un poco de margen para\n //que la imagen no se deforme\n //al llegar al final de la pantalla y pueda ir más allá\n //probar también el codigo omitiendo estas dos líneas\n layoutParams.rightMargin = 0;\n layoutParams.bottomMargin = 0;\n //le añadimos los nuevos\n //parametros para mover la imagen\n view.setLayoutParams(layoutParams);\n break;\n }\n //Se podría decir que 'dibujamos'\n //la posición de la imagen en el marco.\n// marco.invalidate();\n deltas.put(view, delta);\n\n return true;\n }",
"@Override\n \tpublic void roiDragged(ROIEvent evt) {\n \t\t\n \t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\r\n\t\tif((e.getModifiersEx() & MouseEvent.BUTTON2_DOWN_MASK) != 0)\r\n\t\t{\r\n\t\t\t//for middle mouse button drags, pan across the scene\r\n\t\t\tVector temp = new Vector(new PointD(lastPointOnScreen), new PointD(e.getPoint()));\r\n\t\t\ttemp.setTail(worldCenter);\r\n\t\t\tworldCenter = temp.getHead();\r\n\t\t\tlastPointOnScreen = e.getPoint();\r\n\t\t}\r\n\t\telse if((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) != 0)\r\n\t\t{\r\n\t\t\t//for left mouse button drags, move closest vert.\r\n\t\t\tif(closestPointToCursor != null)\r\n\t\t\t{\r\n\t\t\t\tVector temp = new Vector(new PointD(lastPointOnScreen), new PointD(e.getPoint()));\r\n\t\t\t\ttemp.setTail(closestPointToCursor);\r\n\t\t\t\tclosestPointToCursor.set(temp.getHead());\r\n\t\t\t\tlastPointOnScreen = e.getPoint();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n public void mouseDragged(MouseEvent arg0) {\n \n }",
"private void enableDrag() {\n final Delta dragDelta = new Delta();\n setOnMousePressed((MouseEvent mouseEvent) -> {\n // record a delta distance for the drag and drop operation.\n if(isDragEnabled) {\n dragDelta.x = getCenterX() - mouseEvent.getX();\n dragDelta.y = getCenterY() - mouseEvent.getY();\n }\n });\n setOnMouseDragged((MouseEvent mouseEvent) -> {\n if(isDragEnabled) {\n double newX = mouseEvent.getX() + dragDelta.x;\n if (newX > 0 && newX < getScene().getWidth()) {\n setCenterX(newX);\n if(this == base)\n startX = getCenterX();\n }\n double newY = mouseEvent.getY() + dragDelta.y;\n if (newY > 0 && newY < getScene().getHeight()) {\n setCenterY(newY);\n if(this == base)\n startY = getCenterY();\n }\n }\n });\n }",
"private void formMouseDragged(java.awt.event.MouseEvent evt) {\n int x = evt.getXOnScreen();\n int y = evt.getYOnScreen();\n setLocation(x-xMouse , y-yMouse);\n }",
"public void mouseDragged(MouseEvent e) {\n if (moveP != null) {\n // Koordinaten des Mauszeigers sind relativ zum sichtbaren Bereich der\n // Zeichenflaeche. Also linke obere Ecke des sichtb. Bereichs holen\n // und beruecksichtigen.\n Rectangle r = ((JScrollPane) e.getSource()).getViewport().getViewRect();\n int f = model.getFactor(); // Zoomfaktor beachten\n int x = r.x + e.getX();\n x = x / f;\n int y = r.y + e.getY();\n y = y / f;\n\n moveP.movePoint(x, y);\n model.notifyChanged();\n }\n }",
"public void mousePressed(MouseEvent e) {\n\n if(Objects.equals(ToolSelect.GetTool(), \"zoom/pan\")){\n released = false;\n sPoint = MouseInfo.getPointerInfo().getLocation();\n }else {\n\n startPoint = e.getPoint();\n shape = new ColoredRectangle(ToolSelect.GetBorderColor(), ToolSelect.GetFillColor(), new Rectangle(), ToolSelect.GetTool(), null);\n if (Objects.equals(ToolSelect.GetTool(), \"plot\") || Objects.equals(ToolSelect.GetTool(), \"line\")) {\n shape.shape.setBounds(e.getX(), e.getY(), 1, 1);\n }\n }\n\n }",
"public ZoomDragger(TrekPane gpane) {\r\n super();\r\n this.trekPane = gpane;\r\n setOverlayLayer(gpane.getOverlayLayer());\r\n setEventLayer(gpane.getBackgroundEventLayer());\r\n \t}",
"private void dragPaint() {\n\n\t\t//buffer die image ooit\n\t\tinvalidate();\n\t\trepaint();\n\t}",
"public void mouseDragged(MouseEvent event) { }",
"public void setZoom(){\n\t\tactive.setZoom();\n\t}",
"public void zoomIn()\n {\n zoomIn(1, width >> 1, height >> 1);\n }",
"public void mouseDragged(MouseEvent e) {\n\t\t\r\n\t}",
"public void mouseDragged(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\n public void mouseDragged(java.awt.event.MouseEvent e) {\n }",
"void onDragged();",
"public void mouseDragged(MouseEvent e) {\n }",
"private void updateDragVars (MouseEvent me, boolean ui_constrain) {\n if (ui_constrain && last_shft_down) {\n m_wx1 = sxToWx( m_x1 = me.getX()); \n m_wy1 = m_wy0;\n m_y1 = m_y0;\n } else if (ui_constrain && last_ctrl_down) {\n m_wx1 = m_wx0;\n m_x1 = m_x0;\n m_wy1 = syToWy( m_y1 = me.getY()); \n } else {\n m_wx1 = sxToWx( m_x1 = me.getX()); \n m_wy1 = syToWy( m_y1 = me.getY()); \n }\n }",
"@Override\r\n\tpublic void mouseDragged(MouseEvent arg0) {\n\r\n\t}",
"public void mouseDragged( MouseEvent event ){}",
"public void mouseDragged(MouseEvent e) {\n\t\t\n\t}",
"public void mousePressed(MouseEvent e) {\n int i = 0;\n // Koordinaten des Mauszeigers sind relativ zum sichtbaren Bereich der\n // Zeichenflaeche. Also linke obere Ecke des sichtb. Bereichs holen\n // und beruecksichtigen.\n Rectangle r = ((JScrollPane) e.getSource()).getViewport().getViewRect();\n int f = model.getFactor(); // Zoomfaktor beachten\n int x = r.x + e.getX();\n x = x / f;\n int y = r.y + e.getY();\n y = y / f;\n\n moveP = model.getInterpolPoint(new Point(x, y, f));\n // Hilfspunkt erzeugen\n }",
"@Override\n public void mouseDragged(MouseEvent e) {\n\n // Check if mouse rate limiter wish to forbid this mouse drag instruction\n if (rateLimiter != null && !rateLimiter.rateLimitCheck()) {\n return;\n }\n\n // Apply mouse drag\n Coord2d mouse = xy(e);\n\n // 3D mode\n if (getChart().getView().is3D()) {\n // Rotate if left button down\n if (AWTMouseUtilities.isLeftDown(e)) {\n Coord2d move = mouse.sub(prevMouse).div(100);\n rotate(move);\n }\n\n // Shift if right button down\n else if (AWTMouseUtilities.isRightDown(e)) {\n Coord2d move = mouse.sub(prevMouse);\n if (move.y != 0)\n shift(move.y / 500);\n }\n\n }\n\n // 2D mode\n else {\n // Record the mouse selection in progress\n Coord2d dragMouse = xy(e);\n\n if (maintainInAxis)\n maintainInAxis(dragMouse);\n\n\n mouseSelection.stop2D = dragMouse;\n mouseSelection.stop3D = screenToModel(dragMouse.x, dragMouse.y);\n\n getChart().getView().shoot();\n\n }\n\n prevMouse = mouse;\n }",
"public void mouseDragged(java.awt.event.MouseEvent evt) {\n tmp.setLocation(cuadroSeleccionado.getLocation().x + evt.getX() - 18, cuadroSeleccionado.getLocation().y + evt.getY() - 28);\n }",
"public void zoomOut() {\n if (scale > 0.05) {\n double scaleFactor = (scale - 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n currentYOffset = scaleFactor * (currentYOffset - viewPortHeight / 2) + viewPortHeight / 2;\n scale -= 0.03;\n\n selectionChanged = true;\n gameChanged = true;\n }\n }",
"private void setInitialPanAndZoom() {\r\n\t\tif (this.largestDimension == Dimensions.HORIZONTAL) {\r\n\t\t\tif (this.numHexCol <= 20) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.94);\r\n\t\t\t} else if (this.numHexCol <= 40) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.48);\r\n\t\t\t\tthis.zoomer.setPanOffset(-160, -160);\r\n\t\t\t} else if (this.numHexCol <= 60) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.32);\r\n\t\t\t\tthis.zoomer.setPanOffset(-220, -220);\r\n\t\t\t} else if (this.numHexCol <= 80) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.24);\r\n\t\t\t\tthis.zoomer.setPanOffset(-250, -250);\r\n\t\t\t} else if (this.numHexCol <= 100) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.19);\r\n\t\t\t\tthis.zoomer.setPanOffset(-270, -270);\r\n\t\t\t} else if (this.numHexCol <= 120) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.16);\r\n\t\t\t\tthis.zoomer.setPanOffset(-280, -280);\r\n\t\t\t} else if (this.numHexCol <= 140) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.14);\r\n\t\t\t\tthis.zoomer.setPanOffset(-290, -290);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this.numHexRow <= 20) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.94);\r\n\t\t\t} else if (this.numHexRow <= 40) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.48);\r\n\t\t\t\tthis.zoomer.setPanOffset(-160, -160);\r\n\t\t\t} else if (this.numHexRow <= 60) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.32);\r\n\t\t\t\tthis.zoomer.setPanOffset(-220, -220);\r\n\t\t\t} else if (this.numHexRow <= 80) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.24);\r\n\t\t\t\tthis.zoomer.setPanOffset(-250, -250);\r\n\t\t\t} else if (this.numHexRow <= 100) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.19);\r\n\t\t\t\tthis.zoomer.setPanOffset(-270, -270);\r\n\t\t\t} else if (this.numHexRow <= 120) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.16);\r\n\t\t\t\tthis.zoomer.setPanOffset(-280, -280);\r\n\t\t\t} else if (this.numHexRow <= 140) {\r\n\t\t\t\tthis.zoomer.setZoomScale(0.14);\r\n\t\t\t\tthis.zoomer.setPanOffset(-290, -290);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void mouseDragged(MouseEvent e) \r\n\t{\r\n\t\tswitch (MouseDown) {\r\n\t\t\tcase 1:\r\n\t\t\t\tgetCamera().rotateY(((float)LastMouse[0]-e.getX())*0.4F);\r\n\t\t\t\tgetCamera().rotateX(((float)LastMouse[1]-e.getY())*-0.4F);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tgetCamera().translate(((float)LastMouse[0]-e.getX())*-0.01F,0,0);\r\n\t\t\t\tgetCamera().translate(0,((float)LastMouse[1]-e.getY())*0.01F,0);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tgetCamera().zoom(((float)LastMouse[1]-e.getY())*0.1F);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t//System.out.print(\"MMove: \" + e.getPoint().toString() + \"\\r\");\r\n\t\te.consume();\r\n\t\tLastMouse[0] = e.getX();\r\n\t\tLastMouse[1] = e.getY();\r\n\t\trender(true);\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void mouseDragged(MouseEvent arg0) {\n\r\n\t\t\t}",
"public void handleZoom(MouseEvent event){\n ImageView imageView = (ImageView) event.getSource();\n Image imageToShow = imageView.getImage();\n zoomImage.setImage(imageToShow);\n zoomPane.setVisible(true);\n }",
"@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\n\t\t}",
"@Override\n\t\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t//inverted.invert();\n\t\t\t\t\t//Point2D point = inverted.transform(new Point2D.Double(e.getX(), e.getY()), null);\n\t\t\t\t\t//inverted.setToTranslation((double)e.getX(), (double)e.getY());\n\t\t\t\t\tPoint2D p = transform.inverseTransform(new Point2D.Double(e.getX() - panOrigin.getX(), e.getY() - panOrigin.getY()), null);\n\t\t\t\t\ttransform.translate(p.getX(), p.getY());\n\t\t\t\t\trevalidate();\n\t\t\t\t\trepaint();\n\t\t\t\t\tpanOrigin.setLocation(e.getX(), e.getY());\n\t\t\t\t\tSystem.out.printf(\"%f, %f\\n\", p.getX(), p.getY());\n\t\t\t\t} catch (NoninvertibleTransformException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"protected abstract boolean dragged();",
"@FXML\n private void mouseDrag(MouseEvent event) {\n dragging = true;\n double tempX = event.getX();\n double tempY = event.getY();\n dragOffsetX = (preDragX - tempX) / 2;\n dragOffsetY = (preDragY - tempY) / 2;\n drawUniverse();\n }",
"private void startDragging() {\n Point mousePosition = calculateMouseLocation();\n mouseX = mousePosition.getX();\n mouseY = mousePosition.getY();\n prevX = getArea().getX();\n prevY = getArea().getY();\n setDragging(true);\n }",
"@Override\n\t\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\t\n\t\t}",
"@Override\n public void Zoom(double zoomNo, boolean setZoom) {\n\t \n }",
"public void mouseDragged(MouseEvent e) {\n\n }",
"public void mouseDragged(MouseEvent e) {\n\t}",
"protected void primSetZoom(double zoom) {\n\tPoint p1 = getViewport().getClientArea().getCenter();\n\tPoint p2 = p1.getCopy();\n\tPoint p = getViewport().getViewLocation();\n\tdouble prevZoom = this.zoom;\n\tthis.zoom = zoom;\n\tpane.setScale(zoom);\n\tfireZoomChanged();\n\tgetViewport().validate();\n\t\n\tp2.scale(zoom / prevZoom);\n\tDimension dif = p2.getDifference(p1);\n\tp.x += dif.width;\n\tp.y += dif.height;\n\tsetViewLocation(p);\t\n}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent me) {\r\n\t\tdrag(me.getX(), me.getY());\r\n\t}",
"void onZoom() {\n\t\tmZoomPending=true;\n\t}",
"public void mouseDragged(MouseEvent e) {\n\n try {\n dragEndScreen = e.getPoint();\n //Create a point2d.float with the\n Point2D.Float dragStart = transformPoint(dragStartScreen);\n Point2D.Float dragEnd = transformPoint(dragEndScreen);\n //calculate how far the screen is dragged from its start position.\n double dx = dragEnd.getX() - dragStart.getX();\n double dy = dragEnd.getY() - dragStart.getY();\n transform.translate(dx, dy);\n\n //remember to reposition points to avoid unstable dragging.\n dragStartScreen = dragEndScreen;\n dragEndScreen = null;\n repaint();\n } catch (NoninvertibleTransformException ex) {\n ex.printStackTrace();\n }\n\n }",
"public void zoomIn(){\n\t\t zoomed = modifyDimensions(picture.getWidth(),getHeight()); //in primul pas se maresc dimensiunile pozei\n\t\t for(int i = 0; i < zoomed.getHeight(); i += 2) {\n\t for(int j = 0; j < zoomed.getWidth(); j += 2) {\n\t zoomed.setRGB(j, i, picture.getRGB(j / 2,i / 2));\n\n\t if (j + 1 < zoomed.getWidth()) {\n\t zoomed.setRGB(j + 1, i, mediePixeli(picture.getRGB(j / 2, i / 2), picture.getRGB((j + 2) / 2, i / 2))); // intre doua coloane se adauga media pixelilor din acestea\n\t }\n\t }\n\t }\n\n\n\t for(int i = 1; i < zoomed.getHeight(); i += 2){\n\t \tfor(int j = 0; j < zoomed.getWidth(); j++ ){\n\t zoomed.setRGB(j, i, mediePixeli(picture.getRGB((j - 1) / 2, i / 2), picture.getRGB((j + 1) / 2, (i / 2))));\n\t }\n\t }\n\t \n\t }",
"@Override\r\n\t\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\tPoint point=getLocation();\r\n\t\t\t\tsetLocation(point.x + (e.getX() - origin.x), point.y + (e.getY() - origin.y));\r\n\t\t\t}",
"private void formMouseDragged(java.awt.event.MouseEvent evt) {\n if (getParent() != null) {\n //seta a localiza__o do estado enquanto _ arrastado\n int x = (int) getParent().getMousePosition().getX() - getWidth() / 2;\n int y = (int) getParent().getMousePosition().getY() - getHeight() / 2;\n\n //limite direito (x mais do que o painel)\n if (getX() + getWidth() > getParent().getWidth()) {\n x = getParent().getWidth() - getWidth() - 10;\n }\n //limite esquerdo x negativo\n if (getX() < 0) {\n x = 0; \n }\n //limite inferior (y mais do que o painel)\n if (getY() + getHeight() > getParent().getHeight()) {\n y = getParent().getHeight() - getHeight() - 2;\n }\n //limite superior y negativo\n if (getY() < 0) {\n y = 0; \n }\n estado.setXCentral(x);\n estado.setYCentral(y);\n setLocation(x, y);\n\n // coordenadas para desenho das transi__es enquanto ele _ arrastado\n if (isInicial) {\n estado.setXCentral(x + (larguraFlecha / 2) + (getWidth() / 2));\n estado.setYCentral(y + (getHeight() / 2));\n } else {\n estado.setXCentral(x + (getWidth() / 2));\n estado.setYCentral(y + (getHeight() / 2));\n }\n\n\n\n // repinta o container pai, fazendo com as transi__es sejam desenhadas\n getParent().repaint();\n\n }\n }",
"public void zoomIn() {\n \t\tzoom(1);\n \t}",
"@Test\n public void testSetZoomToMouse() {\n final DraggingCamera camera = newValueObject();\n testBoundField(camera, DraggingCamera.ZOOM_TO_MOUSE, false);\n }",
"public void zoomOut() { zoomOut(1); }",
"public boolean onTouch(View v, MotionEvent event) {\n ImageView view = (ImageView) v;\n view.setScaleType(ImageView.ScaleType.MATRIX);\n float scale;\n\n dumpEvent(event);\n // Handle touch events here...\n\n switch (event.getAction() & MotionEvent.ACTION_MASK) {\n case MotionEvent.ACTION_DOWN: // first finger down only\n savedMatrix.set(matrix);\n start.set(event.getX(), event.getY());\n Log.d(TAG, \"mode=DRAG\"); // write to LogCat\n mode = DRAG;\n break;\n\n case MotionEvent.ACTION_UP: // first finger lifted\n\n case MotionEvent.ACTION_POINTER_UP: // second finger lifted\n\n mode = NONE;\n Log.d(TAG, \"mode=NONE\");\n break;\n\n case MotionEvent.ACTION_POINTER_DOWN: // first and second finger down\n\n oldDist = spacing(event);\n Log.d(TAG, \"oldDist=\" + oldDist);\n if (oldDist > 5f) {\n savedMatrix.set(matrix);\n midPoint(mid, event);\n mode = ZOOM;\n Log.d(TAG, \"mode=ZOOM\");\n }\n break;\n\n case MotionEvent.ACTION_MOVE:\n\n if (mode == DRAG) {\n matrix.set(savedMatrix);\n matrix.postTranslate(event.getX() - start.x, event.getY() - start.y); // create the transformation in the matrix of points\n } else if (mode == ZOOM) {\n // pinch zooming\n float newDist = spacing(event);\n Log.d(TAG, \"newDist=\" + newDist);\n if (newDist > 5f) {\n matrix.set(savedMatrix);\n scale = newDist / oldDist; // setting the scaling of the\n // matrix...if scale > 1 means\n // zoom in...if scale < 1 means\n // zoom out\n matrix.postScale(scale, scale, mid.x, mid.y);\n }\n }\n break;\n }\n\n view.setImageMatrix(matrix); // display the transformation on screen\n\n return true; // indicate event was handled\n }",
"public void mouseDragged( MouseEvent e ) {\n }",
"@Override\n\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\n\t}"
] |
[
"0.7854757",
"0.72759545",
"0.68667126",
"0.6805265",
"0.6676568",
"0.6576582",
"0.65615755",
"0.65436023",
"0.65343815",
"0.6527041",
"0.6523091",
"0.6483555",
"0.64504683",
"0.64454156",
"0.6438352",
"0.6438352",
"0.6435788",
"0.6434972",
"0.6432544",
"0.6432056",
"0.64273155",
"0.64273155",
"0.64273155",
"0.64146274",
"0.64114285",
"0.6405813",
"0.63974947",
"0.63974947",
"0.6396904",
"0.63939744",
"0.6392967",
"0.63718367",
"0.63681805",
"0.6367279",
"0.63649756",
"0.6364673",
"0.63526374",
"0.63526374",
"0.63526374",
"0.63526374",
"0.63526374",
"0.6350559",
"0.6349274",
"0.63464296",
"0.6336461",
"0.63024545",
"0.62934846",
"0.62901187",
"0.6289008",
"0.62870234",
"0.62869525",
"0.62785697",
"0.62722147",
"0.6252256",
"0.62521434",
"0.62368345",
"0.6235539",
"0.6232708",
"0.6227624",
"0.6222003",
"0.62170684",
"0.6208523",
"0.6208523",
"0.61963683",
"0.6186468",
"0.6184768",
"0.61816454",
"0.61792773",
"0.617875",
"0.6164053",
"0.61616075",
"0.61591125",
"0.61394054",
"0.6137719",
"0.6124875",
"0.61190313",
"0.611832",
"0.611479",
"0.6112953",
"0.6111235",
"0.6106717",
"0.61033005",
"0.6101882",
"0.6098606",
"0.609479",
"0.60931855",
"0.60905707",
"0.6079227",
"0.6076168",
"0.60733455",
"0.60692877",
"0.6068285",
"0.60662824",
"0.6065287",
"0.605664",
"0.6050188",
"0.6048367",
"0.6048201",
"0.6042882",
"0.6040403"
] |
0.6218221
|
60
|
Use OperatingHour.newBuilder() to construct.
|
private OperatingHour(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Builder setHour(final int hour) {\n this.hour = hour;\n return this;\n }",
"float hour() {\n switch (this) {\n case NORTH_4M:\n case NORTH_16M:\n case SOUTH_4M:\n case SOUTH_16M:\n return 0f;\n case WILTSHIRE_4M:\n case WILTSHIRE_16M:\n /*\n * At 10h33m, Orion is about to set in the west and the\n * Pointers of the Big Dipper are near the meridian.\n */\n return 10.55f;\n }\n throw new IllegalStateException();\n }",
"public void setHour(int hour)\n {\n this.hour = hour;\n }",
"public void setHour(Integer hour) {\n this.hour = hour;\n }",
"public void setHour(int nHour) { m_nTimeHour = nHour; }",
"public DateHour(int year, int month, int day, int hour)\n\t{\n\t\tm_year = year;\n\t\tm_month = month;\n\t\tm_day = day;\n\t\tm_hour = hour;\n\t}",
"public void setHour(int hour) {\n\t\tthis.hour = hour;\n\t}",
"public Builder setStartHour(int value) {\n \n startHour_ = value;\n onChanged();\n return this;\n }",
"Integer getHour();",
"public Time4 setHour( int hour ) \r\n { \r\n this.hour = ( hour >= 0 && hour < 24 ? hour : 0 ); \r\n\r\n return this; // enables chaining\r\n }",
"public void setHour(int hour) \n { \n if (hour < 0 || hour >= 24)\n throw new IllegalArgumentException(\"hour must be 0-23\");\n\n this.hour = hour;\n }",
"public int getHour() { return this.hour; }",
"public WorkHours() {\n //default if not yet initialised\n this._startingHour=0.00;\n this._endingHour=0.00;\n }",
"public Builder byHour(Collection<Integer> hours) {\n\t\t\tthis.byHour.addAll(hours);\n\t\t\treturn this;\n\t\t}",
"public Builder byHour(Integer... hours) {\n\t\t\treturn byHour(Arrays.asList(hours));\n\t\t}",
"Integer getStartHour();",
"public String getOperatingHours() {\n return mOperatingHours;\n }",
"public Builder setFinishHour(int value) {\n \n finishHour_ = value;\n onChanged();\n return this;\n }",
"public Time( int hour, int minute ) {\n this( hour * MINS_PER_HR + minute );\n }",
"public Time4( int hour ) \r\n { \r\n this.setTime( hour, 0, 0 ); \r\n }",
"public void setHour(Pair<Double, Double> value) {\r\n\t\thour = value;\r\n\t}",
"public Appointment(int hour, String description) {\n\n // this refers to the appointment being made\n // hour and description refer to the input parameters\n // this.hour and this.description refer to the object's variables\n this.hour = hour;\n this.description = description;\n }",
"public Integer getHour() {\n return hour;\n }",
"public Builder clearStartHour() {\n \n startHour_ = 0;\n onChanged();\n return this;\n }",
"public void setHour(int hour){\n if(hour < 0 || hour > 23) {System.out.println(\"wrong input!\"); return;}\n this.hour = hour;\n }",
"public HourlyDetail() {\n\t\tthis.numberOfShiftBeginning = 0;\n\t\tthis.numberOfShiftEnding = 0;\n\t\tthis.costPerHour = 0;\n\t}",
"public DayHourGreeting () {\n Calendar c = Calendar.getInstance();\n int hourOfDay = c.get(Calendar.HOUR_OF_DAY);\n setGreeting(hourOfDay);\n }",
"public void setWorkingHour (int newWorkingHour) {\n this.workingHour = newWorkingHour;\n }",
"public void goToHour(int hour) {\n if (viewState.areDimensionsInvalid) {\n viewState.setScrollToHour(hour);\n return;\n }\n\n hour = min(hour, HOURS_PER_DAY);\n float verticalOffset = config.hourHeight * hour;\n\n final float dayHeight = config.getTotalDayHeight();\n final double viewHeight = getHeight();\n\n final double desiredOffset = dayHeight - viewHeight;\n verticalOffset = min((float)desiredOffset, verticalOffset);\n\n config.drawingConfig.currentOrigin.y = -verticalOffset;\n invalidate();\n }",
"public Integer getHour() {\n\t\treturn hour;\n\t}",
"public void setHour(int newHour) {\n hour = newHour; // sets the appointment's hour to the input in military time\n }",
"public void setHour(int hour) {\n/* 51 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public DateHour(String dateHourRepresentation)\n\t{\n\t\tString[] arrString = dateHourRepresentation.split(\"/\");\n\t\tm_day = Integer.parseInt(arrString[0]);\n\t\tm_month = Integer.parseInt(arrString[1]);\n\t\tm_year = Integer.parseInt(arrString[2]);\n\t\tm_hour = Integer.parseInt(arrString[3]);\n\t}",
"public void setHour(int hour) throws InvalidDateException {\r\n\t\tif (hour < 24 & hour >= 0) {\r\n\t\t\tthis.hour = hour;\r\n\t\t} else {\r\n\t\t\tthrow new InvalidDateException(\"Please enter a realistic hour for the date (between 0 and 23) !\");\r\n\t\t}\r\n\t}",
"public int getHour()\n {\n return hour;\n }",
"public LocalTime setBusinessHoursToLocalHours(int hr){\n LocalDateTime now = LocalDateTime.now();\n LocalDateTime ldt = LocalDateTime.of(now.getYear(), now.getMonthValue(), now.getDayOfMonth(), hr, 0);\n return ZonedDateTime.\n of(ldt, ZoneId.of(\"America/New_York\"))\n .toOffsetDateTime()\n .atZoneSameInstant(ZoneId.systemDefault())\n .toLocalDateTime().toLocalTime();\n }",
"public static void setGreeting(int hourOfDay) {\n if (hourOfDay >= 0 && hourOfDay < 12) {\n dayHourGreeting = MORNING;\n } else if (hourOfDay >= 12 && hourOfDay < 16) {\n dayHourGreeting = AFTERNOON;\n } else if (hourOfDay >= 16 && hourOfDay < 21) {\n dayHourGreeting = EVENING;\n } else if (hourOfDay >= 21 && hourOfDay < 24) {\n dayHourGreeting = NIGHT;\n }\n }",
"Integer getEndHour();",
"public void setHours(double hours) {\r\n this.hours = hours;\r\n }",
"public int getHour() {\n\t\treturn hour;\n\t}",
"public int getHour() {\n\t\treturn hour;\n\t}",
"public ApplianceTimedEvent generateUsageHour() {\n Random r = new Random();\n return generateUsageHour(earliestUsageStart + r.nextInt(latestUsageStart - earliestUsageStart),\n duration);\n\n }",
"public void setHours(int hours) {\n this.hours = hours;\n }",
"public static void setHour(String HourString) {\n\t\thour = HourString;\n\t}",
"public DriverForCreateBuilder eldDayStartHour(Integer eldDayStartHour) {\r\n driverForCreate.setEldDayStartHour(eldDayStartHour);\r\n return this;\r\n }",
"public int getHour() \n { \n return hour; \n }",
"public static final Function<Date,Date> setHour(final int value) {\r\n return new Set(Calendar.HOUR, value);\r\n }",
"private KilometersPerHour() {}",
"public int getHour(){\n return hour;\n }",
"@java.lang.Override\n public int getStartHour() {\n return startHour_;\n }",
"public void pickOfficeHours(String day, int start){\n\t\tthis.officeHourDay = day;\n\t\tthis.officeHourTime = start;\n\t}",
"@Override\n public String onHourChange(long hour) {\n return null;\n }",
"public Time(int hours, int minutes) {\n this.hours = hours;\n this.minutes = minutes;\n }",
"public int getHour() {\n\t\treturn this.hour;\n\t}",
"public Builder clearFinishHour() {\n \n finishHour_ = 0;\n onChanged();\n return this;\n }",
"public void setEHour(int ehour)\r\n\t{\r\n\t\tthis.ehour = ehour;\r\n\t}",
"public double getHour() {\n\t\treturn this.hour;\n\t}",
"public int getStartHour() {\n return startHour; // stub\n }",
"private void placeHour(OutOfOrderEntity outOfOrderEntity, int hourActual, int hourExpect ,String meridianState, WebElement meridianStateButton, WebElement incrementHourButton, WebElement decrementHourButton) {\n while(hourActual != hourExpect) {\n if(hourExpect > hourActual ) {\n if(!(meridianState.equals(outOfOrderEntity.getMeridian()))) {\n meridianState = outOfOrderEntity.getMeridian();\n meridianStateButton.click();\n incrementHourButton.click();\n hourActual++;\n }\n else {\n incrementHourButton.click();\n hourActual++;\n }\n }\n else {\n if(!(meridianState.equals(outOfOrderEntity.getMeridian()))) {\n meridianState = outOfOrderEntity.getMeridian();\n meridianStateButton.click();\n decrementHourButton.click();\n hourActual--;\n }\n else {\n decrementHourButton.click();\n hourActual--;\n }\n }\n }\n if(!(meridianState.equals(outOfOrderEntity.getMeridian()))) {\n meridianStateButton.click();\n }\n }",
"public void displayOfficeHours(){\n\t\tSystem.out.println(\"office hours \" + this.officeHourDay + \" from \" + (this.officeHourTime) + \" to \" + (this.officeHourTime + 2));\n\t}",
"@Deprecated\n/* */ public void setCurrentHour(@RecentlyNonNull Integer currentHour) {\n/* 89 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Deprecated\n/* */ @RecentlyNonNull\n/* */ public Integer getCurrentHour() {\n/* 97 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public HourlyWorker() {\n\t\tthis.num_hours = 1;\n\t\tthis.hourly_rate = 0.01;\n\t}",
"public CyclicFixed(String name, int opHours,float unitsPerHr){\n super(name);\n this.opHours = opHours;\n this.unitsPerHr = unitsPerHr;\n }",
"public void setHours(int hours) {\n\t\tthis.hours = hours;\n\t}",
"public int getHour() {\n /*\n // Can't load method instructions: Load method exception: null in method: gov.nist.javax.sip.header.SIPDate.getHour():int, dex: in method: gov.nist.javax.sip.header.SIPDate.getHour():int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.getHour():int\");\n }",
"public int getHour() {\n return hour; // returns the appointment's hour in military time\n }",
"public int hourOfDay() {\r\n\t\treturn mC.get(Calendar.HOUR_OF_DAY);\r\n\t}",
"@Test\n public void floorToHour() throws Exception {\n DateTime dt0 = new DateTime(2009,6,24,23,30,30,789,DateTimeZone.forID(\"America/Los_Angeles\"));\n\n //\n // floor to nearest hour\n //\n DateTime dt1 = DateTimeUtil.floorToHour(dt0);\n\n Assert.assertEquals(2009, dt1.getYear());\n Assert.assertEquals(6, dt1.getMonthOfYear());\n Assert.assertEquals(24, dt1.getDayOfMonth());\n Assert.assertEquals(23, dt1.getHourOfDay());\n Assert.assertEquals(0, dt1.getMinuteOfHour());\n Assert.assertEquals(0, dt1.getSecondOfMinute());\n Assert.assertEquals(0, dt1.getMillisOfSecond());\n Assert.assertEquals(DateTimeZone.forID(\"America/Los_Angeles\"), dt1.getZone());\n\n //\n // floor null\n //\n DateTime dt2 = DateTimeUtil.floorToHour(null);\n Assert.assertNull(dt2);\n }",
"public final void mT__107() throws RecognitionException {\n try {\n int _type = T__107;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:105:8: ( 'hour' )\n // InternalMyDsl.g:105:10: 'hour'\n {\n match(\"hour\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public void updateHour() {\n\t\thilo = new Thread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tLabelHora.setText(calculateHour());\n\t\t\t}\n\t\t});\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException ex) {\n\t\t\t}\n\n\t\t\t// UI update is run on the Application thread\n\t\t\tPlatform.runLater(hilo);\n\t\t}\n\t}",
"@java.lang.Override\n public int getStartHour() {\n return startHour_;\n }",
"public int generateHour() {\n Random random = new Random();\n int hour = random.nextInt(8);\n\n return hour;\n }",
"public void setHour(int hour) throws BlablakidException {\n\t\tif(checkTime(hour,this.minutes)==false) {\n\t\t\tthrow new BlablakidException(\"The hour introduced is wrong : \"+hour);\n\t\t}\n\t\telse {\n\t\tthis.hour = hour;\n\t\t}\n\t}",
"public SweDate(int year, int month, int day, double hour) {\n\t\tsetFields(year, month, day, hour);\n\t}",
"public HourlyWorker () {\r\n super ();\r\n hours = -1;\r\n hourlyRate = -1;\r\n salary = -1;\r\n }",
"private LocalDateTime getStartHour() {\n\t\treturn MoneroHourly.toLocalDateTime(startTimestamp);\r\n\t}",
"public Weekday() {\n }",
"public final flipsParser.hour_return hour() throws RecognitionException {\n flipsParser.hour_return retval = new flipsParser.hour_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal374=null;\n Token string_literal375=null;\n Token string_literal376=null;\n Token string_literal377=null;\n Token string_literal378=null;\n\n CommonTree char_literal374_tree=null;\n CommonTree string_literal375_tree=null;\n CommonTree string_literal376_tree=null;\n CommonTree string_literal377_tree=null;\n CommonTree string_literal378_tree=null;\n RewriteRuleTokenStream stream_250=new RewriteRuleTokenStream(adaptor,\"token 250\");\n RewriteRuleTokenStream stream_251=new RewriteRuleTokenStream(adaptor,\"token 251\");\n RewriteRuleTokenStream stream_252=new RewriteRuleTokenStream(adaptor,\"token 252\");\n RewriteRuleTokenStream stream_249=new RewriteRuleTokenStream(adaptor,\"token 249\");\n RewriteRuleTokenStream stream_253=new RewriteRuleTokenStream(adaptor,\"token 253\");\n\n try {\n // flips.g:559:2: ( ( 'h' | 'hr' | 'hrs' | 'hour' | 'hours' ) -> HOUR )\n // flips.g:559:4: ( 'h' | 'hr' | 'hrs' | 'hour' | 'hours' )\n {\n // flips.g:559:4: ( 'h' | 'hr' | 'hrs' | 'hour' | 'hours' )\n int alt143=5;\n switch ( input.LA(1) ) {\n case 249:\n {\n alt143=1;\n }\n break;\n case 250:\n {\n alt143=2;\n }\n break;\n case 251:\n {\n alt143=3;\n }\n break;\n case 252:\n {\n alt143=4;\n }\n break;\n case 253:\n {\n alt143=5;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 143, 0, input);\n\n throw nvae;\n }\n\n switch (alt143) {\n case 1 :\n // flips.g:559:5: 'h'\n {\n char_literal374=(Token)match(input,249,FOLLOW_249_in_hour3249); \n stream_249.add(char_literal374);\n\n\n }\n break;\n case 2 :\n // flips.g:559:9: 'hr'\n {\n string_literal375=(Token)match(input,250,FOLLOW_250_in_hour3251); \n stream_250.add(string_literal375);\n\n\n }\n break;\n case 3 :\n // flips.g:559:14: 'hrs'\n {\n string_literal376=(Token)match(input,251,FOLLOW_251_in_hour3253); \n stream_251.add(string_literal376);\n\n\n }\n break;\n case 4 :\n // flips.g:559:20: 'hour'\n {\n string_literal377=(Token)match(input,252,FOLLOW_252_in_hour3255); \n stream_252.add(string_literal377);\n\n\n }\n break;\n case 5 :\n // flips.g:559:27: 'hours'\n {\n string_literal378=(Token)match(input,253,FOLLOW_253_in_hour3257); \n stream_253.add(string_literal378);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: \n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 560:2: -> HOUR\n {\n adaptor.addChild(root_0, (CommonTree)adaptor.create(HOUR, \"HOUR\"));\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }",
"public FlightTime(int hour, int minute, String timeType) {\n\t\tthis.hour = hour;\n\t\tthis.minute = minute;\n\t\tthis.timeType = timeType;\n\t}",
"public void setHours(int[] hours) {\n if (hours == null)\n hours = new int[] {};\n this.hours = hours;\n }",
"public final native double setHours(int hours) /*-{\n this.setHours(hours);\n return this.getTime();\n }-*/;",
"public void setHours(String hours) {\n this.hours = parseHours(hours);\n }",
"private void hours(){\n \n companyDriver.startHourStage();\n this.close();\n }",
"public HoursList() {\n // Required empty public constructor\n }",
"public self hour(int currentHour) {\n\t\tfor (X vaporView : members)\n\t\t\tvaporView.hour(currentHour);\n\t\treturn (self) this;\n\n\t}",
"public final native double setUTCHours(int hours) /*-{\n this.setUTCHours(hours);\n return this.getTime();\n }-*/;",
"public int getHour() {\n/* 60 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public Hourly (String eName, String eAddress, String ePhone,\r\nString socSecNumber, double rate)\r\n{\r\nsuper(eName, eAddress, ePhone, socSecNumber, rate);\r\n//IMPLEMENT THIS\r\n}",
"public final o aoz() {\n AppMethodBeat.i(33912);\n h hVar = new h(this, s.hr(this.zon, 64), com.tencent.mm.plugin.label.a.a.bJa().PH(com.tencent.mm.plugin.label.a.a.bJa().PE(this.label)));\n AppMethodBeat.o(33912);\n return hVar;\n }",
"public Clock()\n {\n hour = 11;\n min = 28;\n sec = 12;\n }",
"public String calculateHour() {\n\t\tString hora;\n\t\tString min;\n\t\tString seg;\n\t\tString message;\n\t\tCalendar calendario = new GregorianCalendar();\n\t\tDate horaActual = new Date();\n\t\tcalendario.setTime(horaActual);\n\n\t\thora = calendario.get(Calendar.HOUR_OF_DAY) > 9 ? \"\" + calendario.get(Calendar.HOUR_OF_DAY)\n\t\t\t\t: \"0\" + calendario.get(Calendar.HOUR_OF_DAY);\n\t\tmin = calendario.get(Calendar.MINUTE) > 9 ? \"\" + calendario.get(Calendar.MINUTE)\n\t\t\t\t: \"0\" + calendario.get(Calendar.MINUTE);\n\t\tseg = calendario.get(Calendar.SECOND) > 9 ? \"\" + calendario.get(Calendar.SECOND)\n\t\t\t\t: \"0\" + calendario.get(Calendar.SECOND);\n\n\t\tmessage = hora + \":\" + min + \":\" + seg;\n\t\treturn message;\n\n\t}",
"public ApplianceTimedEvent generateUsageHour(int startTime, int span) {\n\n return generateUsageHour(startTime, span, null);\n\n }",
"public Time(int hour, int minutes) throws BlablakidException{\n\t\tif(checkTime(hour,minutes)==false) {\n\t\t\tthrow new BlablakidException(\"The hour or the minutes introduced are wrong , \"+hour+\":\"+minutes);\n\t\t}\n\t\telse {\n\t\t\tthis.hour = hour;\n\t\t\tthis.minutes = minutes;\n\t\t}\n\t}",
"private int getHour() {\n\t\tString time = getPersistedString(this.defaultValue);\n\t\tif (time == null || !time.matches(VALIDATION_EXPRESSION)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn Integer.valueOf(time.split(\":|/\")[0]);\n\t}",
"private Place getPlaceWithOpeningHours() {\n\n // finds nearby place according the slot value\n List<Place> places = PlaceFinder.findNearbyPlace(GeoCoder.getLatLng(deviceAddress), slotBankNameValue);\n\n // check the list of places for one with opening hours\n return PlaceFinder.findOpeningHoursPlace(places, slotBankNameValue);\n }",
"private Week(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public void setHour(int r1) throws java.lang.IllegalArgumentException {\n /*\n // Can't load method instructions: Load method exception: null in method: gov.nist.javax.sip.header.SIPDate.setHour(int):void, dex: in method: gov.nist.javax.sip.header.SIPDate.setHour(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.setHour(int):void\");\n }",
"public static DateTime floorToHour(DateTime value) {\n if (value == null) {\n return null;\n }\n return new DateTime(value.getYear(), value.getMonthOfYear(), value.getDayOfMonth(), value.getHourOfDay(), 0, 0, 0, value.getZone());\n }",
"public MyTime nextHour(){\n\t\tint second = getSeconds();\n\t\tint minute = getMinute();\n\t\tint hour = getHours();\n\t\t\n\t\tif (hours!=23){\n\t\t\thour++;\n\t\t}\n\t\telse{\n\t\t\thour = 0;\n\t\t}\n\t\t\n\t\treturn new MyTime(hour,minute,second);\n\t}"
] |
[
"0.64486593",
"0.6432525",
"0.6218166",
"0.62097543",
"0.6041318",
"0.60362333",
"0.59535617",
"0.592244",
"0.58901876",
"0.58574104",
"0.5854054",
"0.5804012",
"0.57501",
"0.5745874",
"0.56750184",
"0.56723917",
"0.5663181",
"0.5603109",
"0.5539954",
"0.5538105",
"0.553807",
"0.55006063",
"0.5493612",
"0.54667723",
"0.5465268",
"0.54601294",
"0.5456551",
"0.5447498",
"0.5437927",
"0.5436232",
"0.54321635",
"0.5415212",
"0.54053825",
"0.5390029",
"0.53589636",
"0.533506",
"0.5314971",
"0.5313527",
"0.5313138",
"0.5288802",
"0.5288802",
"0.52658814",
"0.5261762",
"0.5254001",
"0.5239231",
"0.52336633",
"0.52267176",
"0.52143574",
"0.52080965",
"0.51771545",
"0.51662284",
"0.516238",
"0.51607484",
"0.51443195",
"0.5140589",
"0.5102845",
"0.509929",
"0.50797695",
"0.50502664",
"0.5049274",
"0.5048274",
"0.5034719",
"0.5032708",
"0.50305694",
"0.50259584",
"0.5024134",
"0.500393",
"0.49953857",
"0.49887463",
"0.49842322",
"0.49826208",
"0.49809876",
"0.4964764",
"0.49646422",
"0.495299",
"0.49499178",
"0.49494913",
"0.49269104",
"0.49228334",
"0.49109522",
"0.4910352",
"0.49090186",
"0.4903602",
"0.48945767",
"0.48781556",
"0.48757696",
"0.4874709",
"0.48671153",
"0.48618612",
"0.48513374",
"0.4850558",
"0.48190957",
"0.48136067",
"0.4810506",
"0.48045218",
"0.47947082",
"0.4782951",
"0.47809178",
"0.47739807",
"0.47730428"
] |
0.8210418
|
0
|
int32 start_hour = 1 [json_name = "startHour"];
|
@java.lang.Override
public int getStartHour() {
return startHour_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Integer getStartHour();",
"public int getStartHour() {\n return startHour; // stub\n }",
"void mo350a(C0636l c0636l, JsonValue jsonValue);",
"public int getHour(){\n return hour;\n }",
"public int getHour() \n { \n return hour; \n }",
"@JsonProperty(\"startTime\")\n public String getStartTime() {\n return startTime;\n }",
"Integer getHour();",
"public int getHour() { return this.hour; }",
"@JsonSetter(\"time\")\r\n public void setTime(String time) {\r\n this.time = time;\r\n }",
"@JsonGetter(\"time\")\r\n public String getTime() {\r\n return time;\r\n }",
"@java.lang.Override\n public int getStartHour() {\n return startHour_;\n }",
"@JsonProperty(\"time\")\n public String getTime() {\n return time;\n }",
"public int getHour()\n {\n return hour;\n }",
"public Integer getHour() {\n return hour;\n }",
"static final /* synthetic */ Object m109665a(long j) throws Exception {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"duration\", j);\n } catch (JSONException unused) {\n }\n C6759a.m20910a(\"api_stuck\", jSONObject);\n return null;\n }",
"public void sethourNeed(Integer h){hourNeed=h;}",
"public int getStartHour() {\n\treturn start.getHour();\n }",
"public void setHour(int nHour) { m_nTimeHour = nHour; }",
"private int getHour() {\n\t\tString time = getPersistedString(this.defaultValue);\n\t\tif (time == null || !time.matches(VALIDATION_EXPRESSION)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn Integer.valueOf(time.split(\":|/\")[0]);\n\t}",
"@WebMethod(operationName = \"increase-infections-24h\")\n String getIncInfections24h() throws JsonProcessingException;",
"public int getMinHours() {\r\n return minHours;\r\n }",
"T mo512a(C0636l c0636l, JsonValue jsonValue);",
"org.hl7.fhir.Integer getStart();",
"public Builder setStartHour(int value) {\n \n startHour_ = value;\n onChanged();\n return this;\n }",
"@Override\r\n\tpublic int getHH() {\n\t\treturn HH;\r\n\t}",
"@XmlElement(name = \"starttime\")\n public Long getStartTime() {\n return startTime;\n }",
"public void setHour(Integer hour) {\n this.hour = hour;\n }",
"Integer getEndHour();",
"@JSProperty(\"startOfWeek\")\n double getStartOfWeek();",
"public Integer getHour() {\n\t\treturn hour;\n\t}",
"public interface DatetimeRange {\n\n @JsonProperty(\"dtr:start_datetime\")\n String getStartDatetime();\n void setStartDatetime(String startDatetime);\n\n @JsonProperty(\"dtr:end_datetime\")\n String getEndDatetime();\n void setEndDatetime(String endDatetime);\n\n}",
"public int getHora(){\n return minutosStamina;\n }",
"public void setHour(int hour)\n {\n this.hour = hour;\n }",
"public Integer getStartTime() {\n return startTime;\n }",
"BigInteger getResponse_time();",
"public String getHours();",
"public double getHours(){\n return hours;\n }",
"@JsonGetter(\"initiated_at\")\r\n public String getInitiatedAt() {\r\n return initiatedAt;\r\n }",
"Integer getMinute();",
"public int getHour() {\n\t\treturn hour;\n\t}",
"public int getHour() {\n\t\treturn hour;\n\t}",
"@WebMethod(operationName = \"new-infections-last-24h\")\n String getNewInfectionsLast24h() throws JsonProcessingException;",
"@Override\r\n\tpublic void parseJson(JSONObject json) {\n\t\tif(json == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\ttype = getInt(json,d_type);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public String getHourActualStart() {\n return hourStartInput.getAttribute(\"value\");\n }",
"public int getArrivalTime(){return arrivalTime;}",
"public int[] getHours() {\n return hours;\n }",
"public int getHour() {\n\t\treturn this.hour;\n\t}",
"@Override\r\n\tpublic JSONObject buildJson() {\n\t\tJSONObject json = new JSONObject();\r\n\t\ttry {\r\n\t\t\tsetInt(json,d_type,type);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogUtil.log.error(e.getMessage(),e);\r\n\t\t}\r\n\t\treturn json;\r\n\t}",
"@JSProperty(\"startOfWeek\")\n void setStartOfWeek(double value);",
"@Test(timeout = 4000)\n public void test057() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.optJSONObject(\"v.W.y`~H9LS\");\n assertNull(jSONObject1);\n }",
"private LocalDateTime getStartHour() {\n\t\treturn MoneroHourly.toLocalDateTime(startTimestamp);\r\n\t}",
"public int getMinute() { return this.minute; }",
"public int getHours(){\n return (int) totalSeconds/3600;\n }",
"public Integer getOne(int day, int hour) {\r\n return weekData[day][hour];\r\n }",
"public interface JsonProperties {\n\n String ACCESS_LEVEL = \"accessLevel\";\n String ADDRESS = \"address\";\n String ASSET_ID = \"assetId\";\n String CONTENT = \"content\";\n String CREATED_BY = \"createdBy\";\n String DATA = \"data\";\n String DATA_HASH = \"dataHash\";\n String EVENT_ID = \"eventId\";\n String ID_DATA = \"idData\";\n String META_DATA = \"metadata\";\n String PERMISSIONS = \"permissions\";\n String REGISTERED_BY = \"registeredBy\";\n String REGISTERED_ON = \"registeredOn\";\n String SEQUENCE_NUMBER = \"sequenceNumber\";\n String SIGNATURE = \"signature\";\n String TIMESTAMP = \"timestamp\";\n}",
"@Test(timeout = 4000)\n public void test076() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n Integer integer0 = new Integer(55);\n JSONObject jSONObject1 = jSONObject0.append(\"Substring bounds error\", integer0);\n jSONObject1.getJSONArray(\"Substring bounds error\");\n jSONObject1.append(\"Bad value from toJSONString: \", integer0);\n String string0 = jSONObject1.optString(\"Substring bounds error\", \"num\");\n assertNotNull(string0);\n }",
"void mo28373a(JSONObject jSONObject);",
"public int getHour() {\n return hour; // returns the appointment's hour in military time\n }",
"@Override\n\tpublic void get_time_int(ShortHolder heure, ShortHolder min) {\n\t\t\n\t}",
"void mo16412a(String str, JSONObject jSONObject);",
"public void setJSON(JSONObject json) {this.progressJSON = json;}",
"public int getStartMinute() {\n return startMinute;\n }",
"public final native int getHours() /*-{\n return this.getHours();\n }-*/;",
"public int getMinute()\n {\n return minute;\n }",
"@Test(timeout = 4000)\n public void test19() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n double double0 = jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n assertEquals((-821.0), double0, 0.01);\n \n boolean boolean0 = jSONObject0.optBoolean(\"/W_,B?i~I:-MW8${,z\");\n assertFalse(boolean0);\n assertEquals(1, jSONObject0.length());\n }",
"@JsonProperty(\"endTime\")\n public String getEndTime() {\n return endTime;\n }",
"private static String readEnergyJSON(Date start, Date end, String resolution, String point) throws IOException {\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd+HH:mm:ss\");\n df.setTimeZone(SimpleTimeZone.getTimeZone(\"US/Central\"));\n String url_string = \"https://rest.buildingos.com/reports/timeseries/?start=\" + df.format(start) + \"&resolution=\" + resolution + \"&end=\" + df.format(end) + \"&name=\" + point;\n URL consumption_url = new URL(url_string);\n Log.i(\"url\", consumption_url.toString());\n InputStream in = consumption_url.openStream();\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n String result, line = reader.readLine();\n result = line;\n while((line=reader.readLine())!=null) {\n result += line;\n }\n String json_string = result;\n JSONObject all_electricity_page = null;\n String return_string = \"\";\n\n try {\n all_electricity_page = (JSONObject) new JSONTokener(json_string).nextValue();\n JSONArray results = (JSONArray)all_electricity_page.get(\"results\");\n for (int i = 0; i < results.length(); i++) {\n Double value = -2.0;\n try {\n if (results.get(i) != JSONObject.NULL\n && ((JSONObject)results.get(i)).get(point) != JSONObject.NULL) {\n value = ((JSONObject) ((JSONObject) results.get(i)).get(point)).getDouble(\"value\");\n //Log.i(\"not null\", \"getting here? value = \" + value);\n\n }\n else {\n value = 0.0;\n String timestamp_string = ((JSONObject) results.get(i)).getString(\"startTimestamp\");\n Log.i(\"null\", \"adding -1.0? point=\" + point + \" time=\" + timestamp_string);\n }\n\n String timestamp_string = ((JSONObject) results.get(i)).getString(\"startTimestamp\");\n return_string += timestamp_string + \";\" + value + \"\\n\";\n }\n catch (Exception e) {\n //System.out.println(results.get(i));\n e.printStackTrace();\n //Log.i(\"null error?\", \"error: value = \" + value);\n //Log.i(\"null error?\", e.toString());\n }\n }\n\n } catch (JSONException e) {\n //didn't find any results - url must have been wrong, or bad connection\n e.printStackTrace();\n Log.i(\"readEnergyJSON\", \"bad url? \" + e.toString());\n }\n return return_string;\n }",
"public void mo15090a(JSONObject jSONObject) {\n }",
"public Integer getMinTime() {\n return minTime;\n }",
"@JsonSetter(\"exp_year\")\r\n public void setExpYear (int value) { \r\n this.expYear = value;\r\n }",
"public void setStartTime(Integer startTime) {\n this.startTime = startTime;\n }",
"public int getHours() {\n return this.hours;\n }",
"@JsonSetter(\"exp_month\")\r\n public void setExpMonth (int value) { \r\n this.expMonth = value;\r\n }",
"public void setHours(String hours) {\n this.hours = parseHours(hours);\n }",
"public void setHour(int hour) {\n\t\tthis.hour = hour;\n\t}",
"@JsonProperty(\"at\")\n public LocalDateTime getAt() {\n return at;\n }",
"JsonObject getIndex(final String index);",
"public Integer getTestTime() {\n return testTime;\n }",
"void mo59932a(String str, JSONObject jSONObject);",
"int getSchedulingValue();",
"@JsonFormat(pattern=\"yyyyMMddHHmmss\",timezone = \"GMT+8\")\n\tpublic Date getResultTs() {\n\t\treturn resultTs;\n\t}",
"public Integer getUtilizationStart(){\n String value = (String)getProp().get(\"UTILIZATION_START\");\n if (value == null){\n return 1;\n } else {\n return Integer.parseInt(value);\n }\n }",
"static int getHour(byte[] bytes) {\n if (HOUR_POS < bytes.length * 8) {\n return readBits(bytes, HOUR_POS, HOUR_BITS);\n }\n return 0;\n }",
"public JSONObject mo56289a_() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"api_endpoint\", mo56263a());\n } catch (JSONException unused) {\n }\n f2302w.mo56245a(jSONObject, \"timestamp\", mo56265c());\n f2303x.mo56245a(jSONObject, \"cart\", mo56278d());\n return jSONObject;\n }",
"public int getHour() {\n return dateTime.getHour();\n }",
"@JsProperty(name = \"timestamp\")\n public native Number getTimestamp();",
"public void setBeginTime(String time){beginTime = time;}",
"public int getMinutes(){\r\n return Minutes;\r\n }",
"public int getMinute() {\n return minute;\n }",
"JSONObject mo28758a(View view);",
"public int getFinishHour() {\n return finishHour;\n }",
"public int getMinute() {\n return minute;\n }",
"public M csmiBirthdayStart(Object start){this.put(\"csmiBirthdayStart\", start);return this;}",
"public void setStartTime (long x)\r\n {\r\n startTime = x;\r\n }",
"int getStartTime();",
"int getStartTime();",
"int getStartTime();",
"public void setHour(int hour){\n if(hour < 0 || hour > 23) {System.out.println(\"wrong input!\"); return;}\n this.hour = hour;\n }",
"public M csmiAddTimeStart(Object start){this.put(\"csmiAddTimeStart\", start);return this;}",
"public void setEoi_json(String eoi_json) {\n this.eoi_json = eoi_json;\n }"
] |
[
"0.6206214",
"0.61504173",
"0.590324",
"0.58036476",
"0.5738213",
"0.5721684",
"0.5690955",
"0.56536967",
"0.562999",
"0.55756235",
"0.55256",
"0.54705465",
"0.54322344",
"0.53970057",
"0.5383827",
"0.53753954",
"0.5326936",
"0.5291918",
"0.5276068",
"0.5267846",
"0.52619904",
"0.5260582",
"0.51976454",
"0.5195321",
"0.5189483",
"0.5178167",
"0.51753217",
"0.51531726",
"0.51499754",
"0.51342493",
"0.512314",
"0.51215607",
"0.5112261",
"0.5086445",
"0.5077799",
"0.5067676",
"0.5059774",
"0.5041109",
"0.50183004",
"0.50152946",
"0.50152946",
"0.5001177",
"0.49916518",
"0.49885163",
"0.49793237",
"0.49524543",
"0.49482003",
"0.49423185",
"0.49238506",
"0.49006954",
"0.48855698",
"0.48846123",
"0.4874613",
"0.4871044",
"0.48708543",
"0.48635513",
"0.4857004",
"0.4843275",
"0.4840056",
"0.48285955",
"0.48209408",
"0.4801412",
"0.48013464",
"0.47988603",
"0.4793375",
"0.47902915",
"0.4787931",
"0.4777401",
"0.47755462",
"0.47726265",
"0.47718304",
"0.47709486",
"0.47687837",
"0.47639683",
"0.47623464",
"0.4759576",
"0.4759157",
"0.47551322",
"0.47538465",
"0.47484952",
"0.47414285",
"0.47298363",
"0.4729473",
"0.47204158",
"0.4719894",
"0.47188702",
"0.47101948",
"0.47070223",
"0.46997896",
"0.46920544",
"0.4690976",
"0.46867815",
"0.468099",
"0.4675731",
"0.4669459",
"0.4669459",
"0.4669459",
"0.46672818",
"0.46654463",
"0.46623734"
] |
0.57141316
|
6
|
int32 finish_hour = 2 [json_name = "finishHour"];
|
@java.lang.Override
public int getFinishHour() {
return finishHour_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void mo350a(C0636l c0636l, JsonValue jsonValue);",
"static final /* synthetic */ Object m109665a(long j) throws Exception {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"duration\", j);\n } catch (JSONException unused) {\n }\n C6759a.m20910a(\"api_stuck\", jSONObject);\n return null;\n }",
"public int getFinishHour() {\n return finishHour;\n }",
"T mo512a(C0636l c0636l, JsonValue jsonValue);",
"public int getHour(){\n return hour;\n }",
"public int getHour() \n { \n return hour; \n }",
"BigInteger getResponse_time();",
"Integer getEndHour();",
"Integer getHour();",
"@JsonSetter(\"time\")\r\n public void setTime(String time) {\r\n this.time = time;\r\n }",
"@Test(timeout = 4000)\n public void test076() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n Integer integer0 = new Integer(55);\n JSONObject jSONObject1 = jSONObject0.append(\"Substring bounds error\", integer0);\n jSONObject1.getJSONArray(\"Substring bounds error\");\n jSONObject1.append(\"Bad value from toJSONString: \", integer0);\n String string0 = jSONObject1.optString(\"Substring bounds error\", \"num\");\n assertNotNull(string0);\n }",
"private int returnParsedJsonObject(String result){\n\n JSONObject resultObject = null;\n int returnedResult = 0;\n try {\n resultObject = new JSONObject(result);\n returnedResult = resultObject.getInt(\"success\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n Log.d(\"PRUEBA\",\"se obtubo en el JSON: \"+returnedResult);\n return returnedResult;\n }",
"@Test(timeout = 4000)\n public void test22() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n String string0 = \"53N/{T[\";\n JSONObject jSONObject1 = jSONObject0.put(\"53N/{T[\", (-1913.632));\n jSONObject1.toString((-821));\n jSONObject0.optString(\"53N/{T[\", \"53N/{T[\");\n jSONObject0.opt(\",2fHJL;.]tm*PJ9\");\n jSONObject0.optLong((String) null);\n jSONObject0.toString((-821));\n Byte byte0 = new Byte((byte)1);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONObject jSONObject2 = jSONObject1.put(\"|f}%!.^JO \", (Collection) linkedList0);\n JSONObject jSONObject3 = jSONObject2.accumulate(\"o%,g eOJ=9n\\\"\", \"java.lang.Double@0000000003\");\n try { \n jSONObject3.getJSONObject(\"{\\n\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003,\\n\\\"java.lang.String@0000000004\\\": \\\"java.lang.Class@0000000005\\\"\\n}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\n\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003,\\\\n\\\\\\\"java.lang.String@0000000004\\\\\\\": \\\\\\\"java.lang.Class@0000000005\\\\\\\"\\\\n}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getHour() { return this.hour; }",
"public static Integer getLastJsonResponseCode(){\n return jsonResponseCode;\n }",
"@JsonProperty(\"time\")\n public String getTime() {\n return time;\n }",
"private JsonValue m2254c(int i) {\n JsonValue jsonValue = this.f2957f;\n while (jsonValue != null && i > 0) {\n i--;\n jsonValue = jsonValue.f2958g;\n }\n return jsonValue;\n }",
"@Test(timeout = 4000)\n public void test19() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n double double0 = jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n assertEquals((-821.0), double0, 0.01);\n \n boolean boolean0 = jSONObject0.optBoolean(\"/W_,B?i~I:-MW8${,z\");\n assertFalse(boolean0);\n assertEquals(1, jSONObject0.length());\n }",
"@WebMethod(operationName = \"new-infections-last-24h\")\n String getNewInfectionsLast24h() throws JsonProcessingException;",
"@java.lang.Override\n public int getFinishHour() {\n return finishHour_;\n }",
"public void sethourNeed(Integer h){hourNeed=h;}",
"@JsonGetter(\"time\")\r\n public String getTime() {\r\n return time;\r\n }",
"@Test(timeout = 4000)\n public void test079() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject((Object) \"gettoUpperCase\");\n jSONObject1.names();\n Integer integer0 = new Integer(92);\n JSONObject jSONObject2 = jSONObject0.append(\"gettoUpperCase\", integer0);\n jSONObject2.names();\n jSONObject0.optJSONArray(\"gettoUpperCase\");\n JSONObject.numberToString(integer0);\n Boolean boolean0 = new Boolean(true);\n JSONObject.testValidity(boolean0);\n }",
"@WebMethod(operationName = \"increase-infections-24h\")\n String getIncInfections24h() throws JsonProcessingException;",
"private int getHour() {\n\t\tString time = getPersistedString(this.defaultValue);\n\t\tif (time == null || !time.matches(VALIDATION_EXPRESSION)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn Integer.valueOf(time.split(\":|/\")[0]);\n\t}",
"public int getStartHour() {\n return startHour; // stub\n }",
"@Test(timeout = 4000)\n public void test26() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n Integer.remainderUnsigned((-821), (-821));\n StringWriter stringWriter0 = new StringWriter(1782);\n jSONObject0.write(stringWriter0);\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"Ih?`q\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of Ih?`q\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test16() throws Throwable {\n HashMap<Float, Object> hashMap0 = new HashMap<Float, Object>();\n Float float0 = new Float(0.0F);\n Float.max(0.0F, 0.0F);\n hashMap0.put(float0, float0);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n hashMap0.remove((Object) jSONObject0);\n Long long0 = new Long((-1L));\n JSONObject.valueToString(long0);\n hashMap0.getOrDefault(jSONObject0, jSONObject0);\n JSONObject.valueToString(hashMap0, 8, 13);\n JSONObject.doubleToString(0.0);\n jSONObject0.keys();\n jSONObject0.toString(13);\n try { \n jSONObject0.getJSONArray(\";&7Li\\\"+g4z OK%1i76o\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\";&7Li\\\\\\\"+g4z OK%1i76o\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"private int intvalue(JsonNode n, String name) {\n\t\treturn n.findValue(name).getIntValue();\n\t}",
"@Test(timeout = 4000)\n public void test057() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.optJSONObject(\"v.W.y`~H9LS\");\n assertNull(jSONObject1);\n }",
"public Builder setFinishHour(int value) {\n \n finishHour_ = value;\n onChanged();\n return this;\n }",
"@Test(timeout = 4000)\n public void test073() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n int int0 = (-29);\n int int1 = 22;\n HashMap<String, String> hashMap0 = new HashMap<String, String>();\n JSONObject jSONObject1 = new JSONObject((Map) hashMap0);\n JSONObject.valueToString(hashMap0, (-29), 22);\n LinkedList<Float> linkedList0 = new LinkedList<Float>();\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n jSONArray0.optInt((-65));\n try { \n Integer.valueOf(\"{}\");\n fail(\"Expecting exception: NumberFormatException\");\n \n } catch(NumberFormatException e) {\n //\n // For input string: \\\"{}\\\"\n //\n verifyException(\"java.lang.NumberFormatException\", e);\n }\n }",
"void mo28373a(JSONObject jSONObject);",
"@Override\r\n\tpublic void parseJson(JSONObject json) {\n\t\tif(json == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\ttype = getInt(json,d_type);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public Integer getHour() {\n return hour;\n }",
"Integer getStartHour();",
"@Test(timeout = 4000)\n public void test028() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n jSONArray0.put(0, 2094L);\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject0.optInt(\"$\");\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getHour()\n {\n return hour;\n }",
"@Test(timeout = 4000)\n public void test021() throws Throwable {\n HashMap<String, Double> hashMap0 = new HashMap<String, Double>();\n JSONObject.getNames((Object) null);\n JSONArray jSONArray0 = new JSONArray();\n JSONObject jSONObject0 = jSONArray0.optJSONObject((byte)106);\n assertNull(jSONObject0);\n }",
"@Test(timeout = 4000)\n public void test07() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n int int0 = 12;\n StringWriter stringWriter0 = new StringWriter(12);\n Float float0 = new Float((float) 12);\n JSONObject.numberToString(float0);\n String string0 = \"\";\n try { \n jSONObject0.getInt(\"\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test035() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\".\", 65);\n jSONObject1.optInt(\".\", 65);\n Double double0 = new Double((-1.0));\n JSONObject.testValidity(double0);\n }",
"public int getJobStatus(int jNo);",
"JsonObject getIndex(final String index);",
"public void setHour(int nHour) { m_nTimeHour = nHour; }",
"@Test(timeout = 4000)\n public void test081() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n jSONArray0.optBoolean(46);\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n Integer integer0 = new Integer((-884));\n jSONObject1.append(\"su\", integer0);\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@JsonProperty(\"endTime\")\n public String getEndTime() {\n return endTime;\n }",
"void mo16412a(String str, JSONObject jSONObject);",
"public void m16919a(long j) {\n this.f14943b.putLong(\"service_time\", Long.valueOf(j));\n }",
"@Test(timeout = 4000)\n public void test095() throws Throwable {\n Byte byte0 = new Byte((byte)122);\n Byte.toUnsignedLong((byte)122);\n Byte.toUnsignedInt((byte)122);\n Byte.toUnsignedInt((byte)122);\n Byte.toUnsignedInt((byte)122);\n HashMap<String, String> hashMap0 = new HashMap<String, String>();\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n Short short0 = new Short((short) (-1979));\n jSONObject0.put(\"\", (int) (short) (-1979));\n jSONObject0.optDouble(\"\", (double) 122);\n JSONObject.testValidity(hashMap0);\n assertEquals(0, hashMap0.size());\n }",
"public static Integer m5897a(JSONObject jSONObject, String str, Integer num) {\n try {\n jSONObject = (!jSONObject.has(str) || jSONObject.isNull(str)) ? null : Integer.valueOf(jSONObject.getInt(str));\n return jSONObject;\n } catch (JSONObject jSONObject2) {\n jSONObject2.printStackTrace();\n return num;\n }\n }",
"@Test(timeout = 4000)\n public void test23() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"] is not a JSONArray.\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.optDouble(\"] is not a JSONArray.\", (-2064.666));\n jSONObject0.optBoolean(\"] is not a JSONArray.\");\n jSONObject0.put(\"wheel.json.JSONException\", (int) (byte)44);\n String string0 = null;\n JSONTokener jSONTokener0 = new JSONTokener(\"istoUnsignedLong\");\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of istoUnsignedLong\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"public static Integer m5904c(JSONObject jSONObject, String str) {\n return C1546i.m5897a(jSONObject, str, null);\n }",
"@Test(timeout = 4000)\n public void test086() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n StringWriter stringWriter0 = new StringWriter();\n jSONObject1.write(stringWriter0);\n jSONObject1.optDouble(\"8k\\\"]Uu:+Wz~|:~8#4\");\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getValue(String name) {\n String path = ITEMS_PATH + name + \".json\";\n HashMap<String, Integer> item = null;\n Gson gson = new Gson();\n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(path));\n Type type = new TypeToken<HashMap<String, Integer>>() {\n }.getType();\n item = gson.fromJson(bufferedReader, type);\n } catch (FileNotFoundException fnfe) {\n System.out.println(fnfe);\n }\n return item.get(\"value\");\n }",
"int getSchedulingValue();",
"public static int JsonToInteger(JsonObject jso, String param, int defaulx) {\n try {\n JsonElement res = securGetJSON(jso, param);\n if (res != null) {\n return res.getAsInt();\n } else {\n return defaulx;\n }\n } catch (Exception e) {\n return defaulx;\n }\n }",
"@Test(timeout = 4000)\n public void test14() throws Throwable {\n JSONObject jSONObject0 = new JSONObject((Object) \"Unclosed comment\");\n JSONObject.quote(\"Unclosed comment\");\n jSONObject0.optInt(\"%|bmZP$ms4*`Z\");\n JSONObject jSONObject1 = jSONObject0.put(\"Unclosed comment\", (Object) \"%|bmZP$ms4*`Z\");\n String string0 = \"'z2mb\";\n Long long0 = new Long((-487L));\n jSONObject0.append(\"'z2mb\", long0);\n String string1 = null;\n try { \n jSONObject1.getDouble((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getArrivalTime(){return arrivalTime;}",
"public void mo15090a(JSONObject jSONObject) {\n }",
"@Test(timeout = 4000)\n public void test09() throws Throwable {\n String[] stringArray0 = new String[0];\n JSONObject jSONObject0 = new JSONObject((JSONObject) null, stringArray0);\n String string0 = \"] is not a JSONObject.\";\n jSONObject0.optInt(\"] is not a JSONObject.\");\n Integer integer0 = new Integer(0);\n JSONObject.valueToString(integer0);\n JSONObject jSONObject1 = jSONObject0.put(\"] is not a JSONObject.\", (Map) null);\n jSONObject0.optLong(\"wheel.json.JSONException\", (long) 0);\n jSONObject1.keys();\n jSONObject0.toString();\n int int0 = 0;\n // Undeclared exception!\n try { \n Integer.remainderUnsigned(0, 0);\n fail(\"Expecting exception: ArithmeticException\");\n \n } catch(ArithmeticException e) {\n //\n // / by zero\n //\n verifyException(\"java.lang.Integer\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test18() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n JSONObject jSONObject1 = jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n int int0 = new Byte((byte)97);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n jSONObject0.put(\"*bpp)j7=\", (Collection) linkedList0);\n jSONObject1.accumulate(\"] is not a JSONArray.\", linkedList0);\n try { \n jSONObject0.getJSONObject(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"void mo59932a(String str, JSONObject jSONObject);",
"@Override\r\n\tpublic JSONObject buildJson() {\n\t\tJSONObject json = new JSONObject();\r\n\t\ttry {\r\n\t\t\tsetInt(json,d_type,type);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogUtil.log.error(e.getMessage(),e);\r\n\t\t}\r\n\t\treturn json;\r\n\t}",
"public int[] getHours() {\n return hours;\n }",
"public static C10139g m30093a(JSONObject jSONObject) {\n try {\n C10139g gVar = new C10139g();\n gVar.f27640c = jSONObject.getString(\"ip\");\n gVar.f27638a = jSONObject.getInt(\"sendhops\");\n gVar.f27639b = jSONObject.getInt(\"replyhops\");\n gVar.f27641d = jSONObject.getInt(\"cost\");\n return gVar;\n } catch (Throwable unused) {\n return null;\n }\n }",
"@Test(timeout = 4000)\n public void test06() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n assertEquals(1, jSONObject0.length());\n \n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n JSONObject.quote(\"wheel.json.JSONObject$1\");\n String string0 = JSONObject.doubleToString(216);\n assertEquals(\"216\", string0);\n }",
"public int getHour() {\n/* 60 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\r\n\tpublic int getHH() {\n\t\treturn HH;\r\n\t}",
"JSONObject mo28758a(View view);",
"@JsonSetter(\"exp_month\")\r\n public void setExpMonth (int value) { \r\n this.expMonth = value;\r\n }",
"public int getHours(){\n return (int) totalSeconds/3600;\n }",
"public double getFinishTime(){return finishTime;}",
"@Test(timeout = 4000)\n public void test11() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n byte byte1 = (byte)97;\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n Short short0 = new Short((byte)39);\n jSONObject0.putOpt(\"\\\"$c.1O[-X9i\", short0);\n JSONTokener jSONTokener0 = new JSONTokener(\"'m P|=\");\n JSONArray jSONArray0 = null;\n try {\n jSONArray0 = new JSONArray(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONArray text must start with '[' at character 1 of 'm P|=\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"int value(String name);",
"public Integer getHour() {\n\t\treturn hour;\n\t}",
"public double getHours(){\n return hours;\n }",
"public interface JsonProperties {\n\n String ACCESS_LEVEL = \"accessLevel\";\n String ADDRESS = \"address\";\n String ASSET_ID = \"assetId\";\n String CONTENT = \"content\";\n String CREATED_BY = \"createdBy\";\n String DATA = \"data\";\n String DATA_HASH = \"dataHash\";\n String EVENT_ID = \"eventId\";\n String ID_DATA = \"idData\";\n String META_DATA = \"metadata\";\n String PERMISSIONS = \"permissions\";\n String REGISTERED_BY = \"registeredBy\";\n String REGISTERED_ON = \"registeredOn\";\n String SEQUENCE_NUMBER = \"sequenceNumber\";\n String SIGNATURE = \"signature\";\n String TIMESTAMP = \"timestamp\";\n}",
"public String getHours();",
"@Test\n public void testPopulation() throws JSONException {\n int[] population = {775620,1295210000,14240168};\n for (i=0;i<respArray.length();i++){\n Assert.assertEquals(Integer.parseInt(respArray.getJSONObject(i).getString(\"population\")),population[i], \"Population does not match\");\n }\n }",
"@Test(timeout = 4000)\n public void test061() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n jSONObject0.optLong(\"su\");\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test016() throws Throwable {\n String string0 = JSONObject.quote(\"=\\\" p^/$6Yz29)9\");\n assertEquals(\"\\\"=\\\\\\\" p^/$6Yz29)9\\\"\", string0);\n \n Short short0 = new Short((short)11);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"=\\\" p^/$6Yz29)9\";\n stringArray0[1] = \"\\\"=\\\" p^/$6Yz29)9\\\"\";\n stringArray0[2] = \"\\\"=\\\" p^/$6Yz29)9\\\"\";\n JSONObject jSONObject0 = new JSONObject(short0, stringArray0);\n String string1 = jSONObject0.toString(4791, 104);\n assertEquals(\"{}\", string1);\n }",
"@Override\npublic JsonArray queryStatistics(String date, Employee em) throws Exception {\n\tint [] montharr= {31,28,31,30,31,30,31,31,30,31,30,31};\n\tSystem.out.println(date);\n\tint year;\n\tint month;\n\tif(date.length()==0){\n\t\tmonth = new Date().getMonth()+1;\n\t\tyear= new Date().getYear()+1900;\n\t}else{\n\t\tString[] s=date.split(\"-\");\n\t\tyear=Integer.parseInt(s[0]);\n\t\tmonth=Integer.parseInt(s[1]);\n\t}\n\t\n\t\n\tList<Map<String,Object>> lstMap = new LinkedList<Map<String,Object>>();\n\tfor (int i = 1; i <=montharr[month-1] ; i++) {\n\t\tStringBuffer buffer =new StringBuffer(\"select SUM(c.golds) from consumption c,machineinfo m where c.fmachineid=m.id and m.state!=-1 and c.type=-1 and m.empid=\")\n\t\t\t\t.append(em.getId()).append(\" and year(c.createtime) =\").append(year)\n\t\t\t\t.append(\" and month(c.createtime) =\").append(month).append(\" and day(c.createtime) =\").append(i);;\n\t\t\t\tSystem.out.println(buffer);\n\t\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\t\tList<Object> lst = databaseHelper.getResultListBySql(buffer.toString());\n\t\t\t\t\n\t\t\t\tmap.put(\"nums\", lst==null?\"0\":lst.size()==0?\"0\":lst.get(0)==null?\"0\":lst.get(0).toString());\n\t\t\t\tmap.put(\"time\", i+\"日\");\n\t\t\t\tmap.put(\"month\", month);\n\t\t\t\tlstMap.add(map);\n\t}\n\tString result = new Gson().toJson(lstMap);\n\tJsonArray jarr = (JsonArray) new JsonParser().parse(result);\n\treturn jarr;\n}",
"public Integer getMaxHour() {\r\n return maxHour;\r\n }",
"public int getHora(){\n return minutosStamina;\n }",
"public int getInt(String name)\n/* */ {\n/* 908 */ return getInt(name, 0);\n/* */ }",
"@Override\n public void onSucceed(String json) {\n GetGoldTimeResponse response = new Gson().fromJson(json, GetGoldTimeResponse.class);\n UserSpCache.getInstance(mContext).putInt(UserSpCache.GOLD_NUMBERS,response.getData().getCount());//保存获取金币次数\n\n UserSpCache.getInstance(mContext).putInt(UserSpCache.GOLD_TIME ,response.getData().getGold_time());\n if (response.getData().getTime_difference() != 0) {\n mAddColdView.showGoldTime(response.getData().getTime_difference());\n }\n }",
"void mo708a(long j) throws RemoteException;",
"@Test(timeout = 4000)\n public void test13() throws Throwable {\n JSONObject jSONObject0 = new JSONObject((Object) \"Unclosed comment\");\n JSONObject.quote(\"Unclosed comment\");\n jSONObject0.optInt(\"%|bmZP$ms4*`Z\");\n jSONObject0.toString();\n // Undeclared exception!\n jSONObject0.toString(1530, (-2117));\n }",
"void mo26099a(String str, JSONObject jSONObject);",
"@Test(timeout = 4000)\n public void test027() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String string0 = \"MnMG\";\n JSONObject jSONObject1 = jSONObject0.put(\"MnMG\", (Object) \"MnMG\");\n jSONObject0.optInt(\"MnMG\", (-646));\n try { \n jSONObject1.getBoolean(\"MnMG\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"MnMG\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public interface DatetimeRange {\n\n @JsonProperty(\"dtr:start_datetime\")\n String getStartDatetime();\n void setStartDatetime(String startDatetime);\n\n @JsonProperty(\"dtr:end_datetime\")\n String getEndDatetime();\n void setEndDatetime(String endDatetime);\n\n}",
"public int getEndMilitaryHour() {\n return this.endMilitaryHour;\n }",
"public static int m24504p(JSONObject jSONObject) {\n if (jSONObject != null) {\n JSONObject optJSONObject = jSONObject.optJSONObject(\"extend\");\n if (optJSONObject != null) {\n return optJSONObject.optInt(\"materialMax\");\n }\n }\n return 0;\n }",
"public JSONObject mo56289a_() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"api_endpoint\", mo56263a());\n } catch (JSONException unused) {\n }\n f2302w.mo56245a(jSONObject, \"timestamp\", mo56265c());\n f2303x.mo56245a(jSONObject, \"cart\", mo56278d());\n return jSONObject;\n }",
"@Test\n\tpublic void verifyflightNumber() {\n\t\tJsonPath path = new JsonPath(response.getBody().asString());\n\t\tAssert.assertEquals(path.getString(\"flight_number\"), \"102\");\n\t}",
"@Test(timeout = 4000)\n public void test085() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.accumulate(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"int getFromValue();",
"public int getJobCost(int jNo);",
"@Test(timeout = 4000)\n public void test012() throws Throwable {\n JSONObject.quote(\"=\\\" p^/$6Yz29)9\");\n JSONObject jSONObject0 = new JSONObject();\n jSONObject0.append(\"\\\"=\\\" p^/$6Yz29)9\\\"\", \"=\\\" p^/$6Yz29)9\");\n jSONObject0.toString(3125, 3125);\n assertEquals(1, jSONObject0.length());\n }",
"public final void mo9383a(int i, String str, JSONObject jSONObject) {\n }"
] |
[
"0.60758096",
"0.5842577",
"0.54594177",
"0.5401923",
"0.5357936",
"0.5325503",
"0.5299934",
"0.52867436",
"0.5273177",
"0.522407",
"0.5220313",
"0.51785034",
"0.5175855",
"0.5171843",
"0.51597744",
"0.5144109",
"0.51402444",
"0.51280516",
"0.50861424",
"0.5083618",
"0.50809485",
"0.50649387",
"0.50517255",
"0.50474155",
"0.50438756",
"0.50411665",
"0.50087667",
"0.4993228",
"0.49827453",
"0.4974749",
"0.49703324",
"0.49661636",
"0.4966086",
"0.49552196",
"0.4947223",
"0.4946484",
"0.49452037",
"0.4943969",
"0.49348924",
"0.4923226",
"0.49168655",
"0.49066335",
"0.48727357",
"0.4860966",
"0.48558757",
"0.48448417",
"0.4841438",
"0.483876",
"0.4838021",
"0.48326594",
"0.4816846",
"0.48132068",
"0.4801267",
"0.47954896",
"0.47920772",
"0.4786236",
"0.47811797",
"0.4779482",
"0.47659335",
"0.4765435",
"0.47551858",
"0.47550938",
"0.47466552",
"0.47414562",
"0.4738007",
"0.473663",
"0.47326827",
"0.47325557",
"0.47118974",
"0.47111666",
"0.47099885",
"0.4702063",
"0.4697623",
"0.4695972",
"0.4683397",
"0.4679043",
"0.46761924",
"0.4668918",
"0.4666372",
"0.46597755",
"0.46567792",
"0.4654674",
"0.4638815",
"0.46363014",
"0.4633511",
"0.4631586",
"0.4631316",
"0.4631203",
"0.4629551",
"0.4624083",
"0.4622934",
"0.46221855",
"0.46175542",
"0.46136916",
"0.46127164",
"0.46100494",
"0.4606876",
"0.46060595",
"0.4601551",
"0.46014217"
] |
0.5281967
|
8
|
.hts.common.DayOfWeek day = 3 [json_name = "day"];
|
@java.lang.Override public int getDayValue() {
return day_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"com.czht.face.recognition.Czhtdev.Week getWeekday();",
"io.dstore.values.StringValue getDay();",
"public int getDayOfWeek();",
"@JSProperty(\"startOfWeek\")\n double getStartOfWeek();",
"@java.lang.Override public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }",
"public Integer getDayOfWeek() {\n return dayOfWeek;\n }",
"@java.lang.Override\n public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }",
"public void setDay(int day)\n {\n this.day = day;\n }",
"io.dstore.values.StringValueOrBuilder getDayOrBuilder();",
"public String getDay() {\n return this.day;\n }",
"String getDayofservice();",
"public void setDay(int day) {\r\n this.day = day;\r\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public Integer getDay()\n {\n return this.day;\n }",
"public String getDayOfWeek(){\n\t\treturn dayOfWeek;\n\t}",
"@JSProperty(\"startOfWeek\")\n void setStartOfWeek(double value);",
"public int getDay(){\n\t return this.day;\n }",
"public void setDay(String day) {\n\n\t\tthis.day = day;\n\t}",
"public void setDay(byte value) {\r\n this.day = value;\r\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public int getDay() {\n if (USE_SERIALIZABLE) {\n return childBuilder.getDay();\n } else {\n // @todo Replace with real Builder object if possible\n return convertNullToNOT_SET(childBuilderElement.getAttributeValue(\"day\"));\n }\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public int getDay()\n {\n return day;\n }",
"public byte getDay() {\r\n return day;\r\n }",
"public final native int getDay() /*-{\n return this.getDay();\n }-*/;",
"void mo350a(C0636l c0636l, JsonValue jsonValue);",
"public byte getDay() {\n return day;\n }",
"public int getDay() {\n return day;\n }",
"public int getDayOfWeek() {\n return this.dayOfWeek;\n }",
"Integer getDay();",
"public int getDay(){\n\t\treturn day;\n\t}",
"public String getDayOfWeek() {\r\n return dayOfWeek;\r\n }",
"public void setDayOfWeek(String dayOfWeek) {\r\n this.dayOfWeek = dayOfWeek;\r\n }",
"public void setDayOfWeek(Integer dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"public int getDay() {\r\n return day;\r\n }",
"@Test\n public void getterDayOfWeek(){\n ScheduleEntry entry = new ScheduleEntry();\n entry.setCalendar(calendar);\n entry.setDepartureTime(DepartureTime);\n Assert.assertEquals(25,entry.getDayOfWeek());\n }",
"public void setDayOfWeek(String dayOfWeek){\n\t\tthis.dayOfWeek = dayOfWeek;\n\t}",
"com.czht.face.recognition.Czhtdev.WeekOrBuilder getWeekdayOrBuilder();",
"public int getDay() {\n\treturn day;\n }",
"public void setDayOfWeek(DayTemplate dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"public void setDayOfWeek(int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"DayOfWeek getUserVoteSalaryWeeklyDayOfWeek();",
"private WeekDays(String mood){\n this.mood = mood;\n }",
"public String getDay() {\n\t\treturn day;\n\t}",
"public void setDay(int day) {\n\t\tthis.day = day;\n\t}",
"public void setDay(int day) {\n\t\tthis.day = day;\n\t}",
"@Test\n public void DayOfWeek() {\n System.out.printf(\"%s%n\\n\", DayOfWeek.MONDAY.plus(3));\n\n DayOfWeek dow = DayOfWeek.MONDAY;\n Locale locale = Locale.getDefault();\n System.out.println(dow.getDisplayName(TextStyle.FULL, locale));\n System.out.println(dow.getDisplayName(TextStyle.NARROW, locale));\n System.out.println(dow.getDisplayName(TextStyle.SHORT, locale));\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"String updateDay(String userName, Day day);",
"@java.lang.Override public int getDayValue() {\n return day_;\n }",
"public void setDay(final short day) {\r\n\t\tthis.day = day;\r\n\t}",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"private void dayOfWeek(HplsqlParser.Expr_func_paramsContext ctx) {\n Integer v = getPartOfDate(ctx, Calendar.DAY_OF_WEEK);\n if (v != null) {\n evalInt(v);\n }\n else {\n evalNull();\n }\n }",
"@WebMethod(operationName = \"total-data-jh-rki\")\n String getTotalDataJHRKI(@WebParam(name = \"days\") int days) throws JsonProcessingException;",
"io.dstore.values.TimestampValue getDay();",
"public void setDay(Date day) {\n this.day = day;\n }",
"public void setDayOfTheWeek(String day){\r\n this.dayOfTheWeek.setText(day);\r\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"public String getDay() {\n\n\t\treturn day;\n\t}",
"@Test\n\t public void testDayInEnglish(){\n\t\t TimeSource mock = new MockTimeSource();\n\t\t Watch test = new FinnishWatch(mock);\n\t\t String expected = EnumarationDays.mercredi.getEnglish();\n\t\t String actual = test.getDay(Languages.English);\n\t\t assertEquals(actual, expected);\t\t \n\t }",
"public void setDay(final int day) {\n\t\tthis.day = day;\n\t}",
"@DynamoDBTypeConverted(converter = TimeSlotConverter.class)\n @DynamoDBAttribute(attributeName = \"wednesday\")\n public final TimeSlot getWednesday() {\n return wednesday;\n }",
"public HashMap<String, String> getSomeDaydata(int day) {\n\t\tif(day >= 0 && day <=4){\n\t\t\ttry {\n\t\t\t\tHashMap<String, String> day2Map = new HashMap<String, String>();\n\t\t\t\tJsonObject day2Object = this.jsonForecastArray.get(day).getAsJsonObject();\n\t\t\t\tday2Map.put(\"日期\", day2Object.get(\"date\").getAsString());\n\t\t\t\tday2Map.put(\"最高温\", day2Object.get(\"high\").getAsString());\n\t\t\t\tday2Map.put(\"最低温\", day2Object.get(\"low\").getAsString());\n\t\t\t\tday2Map.put(\"风力\", day2Object.get(\"fengli\").getAsString());\n\t\t\t\tday2Map.put(\"天气\", day2Object.get(\"type\").getAsString());\n\t\t\t\treturn day2Map;\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(\"WeatherRequest Class\", \"Hashmap hasn't init\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@JsonGetter(\"joiningDay\")\n public Days getJoiningDay ( ) { \n return this.joiningDay;\n }",
"public static DayTraining newInstance(String json) {\n try {\n JSONObject root = new JSONObject(json);\n return new DayTraining.Builder()\n .setRunning( root.optInt(\"t1\"), root.optInt(\"t2\"), root.optInt(\"t3\"), root.optInt(\"t2_3\"), root.optInt(\"t1_3\"), root.optInt(\"ta\"), root.optInt(\"tt\"))\n .setBreathing(root.optInt(\"gx\"), root.optInt(\"gp\"),root.optInt(\"gd\"))\n .setTrainingInfo(root.optInt(\"id_athlete\"), root.optString(\"date\"), filterJsonTotalInput(root.optString(\"description\")), root.optInt(\"texniki\"), root.optInt(\"drastiriotita\"), root.optInt(\"time\"), root.optInt(\"number\"), root.optInt(\"id_race\"))\n .build();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public Weekday() {\n }",
"public int getDay() {\n\t\treturn this.day;\n\t}",
"public int getDay() {\n\t\treturn this.day;\n\t}",
"@Test\n\t public void testDayInFinnish(){\n\t\t TimeSource mock = new MockTimeSource();\n\t\t Watch test = new FinnishWatch(mock);\t\n\t\t String expected = EnumarationDays.mercredi.getFinnish();\n\t\t String actual = test.getDay(Languages.Finnish);\n\t\t assertEquals(actual, expected);\t\t \n\t }",
"public final int getDayOfWeek()\n {\n return dayOfWeek(ordinal);\n\n }",
"@DynamoDBTypeConverted(converter = TimeSlotConverter.class)\n @DynamoDBAttribute(attributeName = \"monday\")\n public final TimeSlot getMonday() {\n return monday;\n }",
"public DayOfWeek diaDaSemana(LocalDate d);",
"private String dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }",
"public DayOfWeek primeiroDiaSemanaAno(int ano);",
"public int getDayOfWeekNr() {\n\t\treturn ((int) (this.jd - 5.5)) % 7;\n\t}",
"public DayOfWeek getDay(String dow)\r\n {\r\n int month=Integer.parseInt(dow.substring(0,2));\r\n int date=Integer.parseInt(dow.substring(3,5));\r\n int year=Integer.parseInt(dow.substring(6));\r\n LocalDate ld=LocalDate.of(year,month,date);\r\n DayOfWeek day=ld.getDayOfWeek();\r\n return day;\r\n }",
"public int getWeekDay()\n\t{\n\t\tif (m_nType == AT_WEEK_DAY)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}",
"int getWeek();",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"private WeekData extract_year_data(String json_string){\n try {\n JSONObject jsonObj = new JSONObject(json_string);\n WeekData wd = new WeekData();\n wd.setYear(jsonObj.getInt(\"year\"));\n wd.setWeek(jsonObj.getJSONArray(\"week\"));\n wd.setDays(jsonObj.getJSONArray(\"days\"));\n\n return wd;\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public int getWeekDay() {\r\n return this.weekday - 1;\r\n }",
"public static synchronized int getDayOfWeekNr(double jd) {\n\t\treturn ((int) (jd - 5.5)) % 7;\n\t}",
"public Date getDay() {\n return day;\n }",
"public void setDayOfWeek(final int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }"
] |
[
"0.6131328",
"0.61245066",
"0.5999135",
"0.5941413",
"0.5687417",
"0.5682057",
"0.56554824",
"0.5620294",
"0.5606591",
"0.56063324",
"0.560225",
"0.558017",
"0.5572138",
"0.5564908",
"0.5564908",
"0.5564908",
"0.5560289",
"0.5559266",
"0.5538089",
"0.55326855",
"0.5528263",
"0.5525973",
"0.5517686",
"0.55118686",
"0.5510258",
"0.5510258",
"0.5510258",
"0.5501159",
"0.54940826",
"0.5469989",
"0.5465525",
"0.54584676",
"0.54523504",
"0.5440045",
"0.5437689",
"0.5430862",
"0.5422976",
"0.54122716",
"0.5406315",
"0.53911316",
"0.53746533",
"0.5370378",
"0.5365345",
"0.5365251",
"0.53436553",
"0.5336132",
"0.53232795",
"0.53101563",
"0.5307492",
"0.52789164",
"0.52721965",
"0.52721965",
"0.52240145",
"0.51939166",
"0.517874",
"0.5173576",
"0.5167688",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51651335",
"0.51648664",
"0.51625055",
"0.51480573",
"0.51348144",
"0.5083942",
"0.5083942",
"0.5083942",
"0.50750834",
"0.50634307",
"0.5061134",
"0.50533265",
"0.5042444",
"0.504074",
"0.5038961",
"0.5021979",
"0.50214946",
"0.50214946",
"0.50211567",
"0.5014934",
"0.50111586",
"0.5011113",
"0.50066924",
"0.49911588",
"0.49798042",
"0.49788776",
"0.4971786",
"0.49622023",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49514073",
"0.4946642",
"0.49380344",
"0.49201283",
"0.49198148"
] |
0.5356896
|
44
|
.hts.common.DayOfWeek day = 3 [json_name = "day"];
|
@java.lang.Override public app.onepass.apis.DayOfWeek getDay() {
@SuppressWarnings("deprecation")
app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);
return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"com.czht.face.recognition.Czhtdev.Week getWeekday();",
"io.dstore.values.StringValue getDay();",
"public int getDayOfWeek();",
"@JSProperty(\"startOfWeek\")\n double getStartOfWeek();",
"public Integer getDayOfWeek() {\n return dayOfWeek;\n }",
"@java.lang.Override\n public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }",
"public void setDay(int day)\n {\n this.day = day;\n }",
"io.dstore.values.StringValueOrBuilder getDayOrBuilder();",
"public String getDay() {\n return this.day;\n }",
"String getDayofservice();",
"public void setDay(int day) {\r\n this.day = day;\r\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public Integer getDay()\n {\n return this.day;\n }",
"public String getDayOfWeek(){\n\t\treturn dayOfWeek;\n\t}",
"@JSProperty(\"startOfWeek\")\n void setStartOfWeek(double value);",
"public int getDay(){\n\t return this.day;\n }",
"public void setDay(String day) {\n\n\t\tthis.day = day;\n\t}",
"public void setDay(byte value) {\r\n this.day = value;\r\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public int getDay() {\n if (USE_SERIALIZABLE) {\n return childBuilder.getDay();\n } else {\n // @todo Replace with real Builder object if possible\n return convertNullToNOT_SET(childBuilderElement.getAttributeValue(\"day\"));\n }\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public int getDay()\n {\n return day;\n }",
"public byte getDay() {\r\n return day;\r\n }",
"public final native int getDay() /*-{\n return this.getDay();\n }-*/;",
"void mo350a(C0636l c0636l, JsonValue jsonValue);",
"public byte getDay() {\n return day;\n }",
"public int getDay() {\n return day;\n }",
"public int getDayOfWeek() {\n return this.dayOfWeek;\n }",
"Integer getDay();",
"public int getDay(){\n\t\treturn day;\n\t}",
"public String getDayOfWeek() {\r\n return dayOfWeek;\r\n }",
"public void setDayOfWeek(String dayOfWeek) {\r\n this.dayOfWeek = dayOfWeek;\r\n }",
"public void setDayOfWeek(Integer dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"public int getDay() {\r\n return day;\r\n }",
"@Test\n public void getterDayOfWeek(){\n ScheduleEntry entry = new ScheduleEntry();\n entry.setCalendar(calendar);\n entry.setDepartureTime(DepartureTime);\n Assert.assertEquals(25,entry.getDayOfWeek());\n }",
"public void setDayOfWeek(String dayOfWeek){\n\t\tthis.dayOfWeek = dayOfWeek;\n\t}",
"com.czht.face.recognition.Czhtdev.WeekOrBuilder getWeekdayOrBuilder();",
"@java.lang.Override public int getDayValue() {\n return day_;\n }",
"public int getDay() {\n\treturn day;\n }",
"public void setDayOfWeek(DayTemplate dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"public void setDayOfWeek(int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"DayOfWeek getUserVoteSalaryWeeklyDayOfWeek();",
"private WeekDays(String mood){\n this.mood = mood;\n }",
"public String getDay() {\n\t\treturn day;\n\t}",
"public void setDay(int day) {\n\t\tthis.day = day;\n\t}",
"public void setDay(int day) {\n\t\tthis.day = day;\n\t}",
"@Test\n public void DayOfWeek() {\n System.out.printf(\"%s%n\\n\", DayOfWeek.MONDAY.plus(3));\n\n DayOfWeek dow = DayOfWeek.MONDAY;\n Locale locale = Locale.getDefault();\n System.out.println(dow.getDisplayName(TextStyle.FULL, locale));\n System.out.println(dow.getDisplayName(TextStyle.NARROW, locale));\n System.out.println(dow.getDisplayName(TextStyle.SHORT, locale));\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"String updateDay(String userName, Day day);",
"@java.lang.Override public int getDayValue() {\n return day_;\n }",
"public void setDay(final short day) {\r\n\t\tthis.day = day;\r\n\t}",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"private void dayOfWeek(HplsqlParser.Expr_func_paramsContext ctx) {\n Integer v = getPartOfDate(ctx, Calendar.DAY_OF_WEEK);\n if (v != null) {\n evalInt(v);\n }\n else {\n evalNull();\n }\n }",
"@WebMethod(operationName = \"total-data-jh-rki\")\n String getTotalDataJHRKI(@WebParam(name = \"days\") int days) throws JsonProcessingException;",
"io.dstore.values.TimestampValue getDay();",
"public void setDay(Date day) {\n this.day = day;\n }",
"public void setDayOfTheWeek(String day){\r\n this.dayOfTheWeek.setText(day);\r\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"public String getDay() {\n\n\t\treturn day;\n\t}",
"@Test\n\t public void testDayInEnglish(){\n\t\t TimeSource mock = new MockTimeSource();\n\t\t Watch test = new FinnishWatch(mock);\n\t\t String expected = EnumarationDays.mercredi.getEnglish();\n\t\t String actual = test.getDay(Languages.English);\n\t\t assertEquals(actual, expected);\t\t \n\t }",
"public void setDay(final int day) {\n\t\tthis.day = day;\n\t}",
"@DynamoDBTypeConverted(converter = TimeSlotConverter.class)\n @DynamoDBAttribute(attributeName = \"wednesday\")\n public final TimeSlot getWednesday() {\n return wednesday;\n }",
"public HashMap<String, String> getSomeDaydata(int day) {\n\t\tif(day >= 0 && day <=4){\n\t\t\ttry {\n\t\t\t\tHashMap<String, String> day2Map = new HashMap<String, String>();\n\t\t\t\tJsonObject day2Object = this.jsonForecastArray.get(day).getAsJsonObject();\n\t\t\t\tday2Map.put(\"日期\", day2Object.get(\"date\").getAsString());\n\t\t\t\tday2Map.put(\"最高温\", day2Object.get(\"high\").getAsString());\n\t\t\t\tday2Map.put(\"最低温\", day2Object.get(\"low\").getAsString());\n\t\t\t\tday2Map.put(\"风力\", day2Object.get(\"fengli\").getAsString());\n\t\t\t\tday2Map.put(\"天气\", day2Object.get(\"type\").getAsString());\n\t\t\t\treturn day2Map;\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(\"WeatherRequest Class\", \"Hashmap hasn't init\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@JsonGetter(\"joiningDay\")\n public Days getJoiningDay ( ) { \n return this.joiningDay;\n }",
"public static DayTraining newInstance(String json) {\n try {\n JSONObject root = new JSONObject(json);\n return new DayTraining.Builder()\n .setRunning( root.optInt(\"t1\"), root.optInt(\"t2\"), root.optInt(\"t3\"), root.optInt(\"t2_3\"), root.optInt(\"t1_3\"), root.optInt(\"ta\"), root.optInt(\"tt\"))\n .setBreathing(root.optInt(\"gx\"), root.optInt(\"gp\"),root.optInt(\"gd\"))\n .setTrainingInfo(root.optInt(\"id_athlete\"), root.optString(\"date\"), filterJsonTotalInput(root.optString(\"description\")), root.optInt(\"texniki\"), root.optInt(\"drastiriotita\"), root.optInt(\"time\"), root.optInt(\"number\"), root.optInt(\"id_race\"))\n .build();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public Weekday() {\n }",
"public int getDay() {\n\t\treturn this.day;\n\t}",
"public int getDay() {\n\t\treturn this.day;\n\t}",
"@Test\n\t public void testDayInFinnish(){\n\t\t TimeSource mock = new MockTimeSource();\n\t\t Watch test = new FinnishWatch(mock);\t\n\t\t String expected = EnumarationDays.mercredi.getFinnish();\n\t\t String actual = test.getDay(Languages.Finnish);\n\t\t assertEquals(actual, expected);\t\t \n\t }",
"public final int getDayOfWeek()\n {\n return dayOfWeek(ordinal);\n\n }",
"@DynamoDBTypeConverted(converter = TimeSlotConverter.class)\n @DynamoDBAttribute(attributeName = \"monday\")\n public final TimeSlot getMonday() {\n return monday;\n }",
"public DayOfWeek diaDaSemana(LocalDate d);",
"private String dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }",
"public DayOfWeek primeiroDiaSemanaAno(int ano);",
"public int getDayOfWeekNr() {\n\t\treturn ((int) (this.jd - 5.5)) % 7;\n\t}",
"public DayOfWeek getDay(String dow)\r\n {\r\n int month=Integer.parseInt(dow.substring(0,2));\r\n int date=Integer.parseInt(dow.substring(3,5));\r\n int year=Integer.parseInt(dow.substring(6));\r\n LocalDate ld=LocalDate.of(year,month,date);\r\n DayOfWeek day=ld.getDayOfWeek();\r\n return day;\r\n }",
"public int getWeekDay()\n\t{\n\t\tif (m_nType == AT_WEEK_DAY)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}",
"int getWeek();",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"private WeekData extract_year_data(String json_string){\n try {\n JSONObject jsonObj = new JSONObject(json_string);\n WeekData wd = new WeekData();\n wd.setYear(jsonObj.getInt(\"year\"));\n wd.setWeek(jsonObj.getJSONArray(\"week\"));\n wd.setDays(jsonObj.getJSONArray(\"days\"));\n\n return wd;\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public int getWeekDay() {\r\n return this.weekday - 1;\r\n }",
"public static synchronized int getDayOfWeekNr(double jd) {\n\t\treturn ((int) (jd - 5.5)) % 7;\n\t}",
"public Date getDay() {\n return day;\n }",
"public void setDayOfWeek(final int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }"
] |
[
"0.6131328",
"0.61245066",
"0.5999135",
"0.5941413",
"0.5682057",
"0.56554824",
"0.5620294",
"0.5606591",
"0.56063324",
"0.560225",
"0.558017",
"0.5572138",
"0.5564908",
"0.5564908",
"0.5564908",
"0.5560289",
"0.5559266",
"0.5538089",
"0.55326855",
"0.5528263",
"0.5525973",
"0.5517686",
"0.55118686",
"0.5510258",
"0.5510258",
"0.5510258",
"0.5501159",
"0.54940826",
"0.5469989",
"0.5465525",
"0.54584676",
"0.54523504",
"0.5440045",
"0.5437689",
"0.5430862",
"0.5422976",
"0.54122716",
"0.5406315",
"0.53911316",
"0.53746533",
"0.5370378",
"0.5365345",
"0.5365251",
"0.5356896",
"0.53436553",
"0.5336132",
"0.53232795",
"0.53101563",
"0.5307492",
"0.52789164",
"0.52721965",
"0.52721965",
"0.52240145",
"0.51939166",
"0.517874",
"0.5173576",
"0.5167688",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51651335",
"0.51648664",
"0.51625055",
"0.51480573",
"0.51348144",
"0.5083942",
"0.5083942",
"0.5083942",
"0.50750834",
"0.50634307",
"0.5061134",
"0.50533265",
"0.5042444",
"0.504074",
"0.5038961",
"0.5021979",
"0.50214946",
"0.50214946",
"0.50211567",
"0.5014934",
"0.50111586",
"0.5011113",
"0.50066924",
"0.49911588",
"0.49798042",
"0.49788776",
"0.4971786",
"0.49622023",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49514073",
"0.4946642",
"0.49380344",
"0.49201283",
"0.49198148"
] |
0.5687417
|
4
|
int32 start_hour = 1 [json_name = "startHour"];
|
@java.lang.Override
public int getStartHour() {
return startHour_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Integer getStartHour();",
"public int getStartHour() {\n return startHour; // stub\n }",
"void mo350a(C0636l c0636l, JsonValue jsonValue);",
"public int getHour(){\n return hour;\n }",
"public int getHour() \n { \n return hour; \n }",
"@JsonProperty(\"startTime\")\n public String getStartTime() {\n return startTime;\n }",
"@java.lang.Override\n public int getStartHour() {\n return startHour_;\n }",
"Integer getHour();",
"public int getHour() { return this.hour; }",
"@JsonSetter(\"time\")\r\n public void setTime(String time) {\r\n this.time = time;\r\n }",
"@JsonGetter(\"time\")\r\n public String getTime() {\r\n return time;\r\n }",
"@JsonProperty(\"time\")\n public String getTime() {\n return time;\n }",
"public int getHour()\n {\n return hour;\n }",
"public Integer getHour() {\n return hour;\n }",
"static final /* synthetic */ Object m109665a(long j) throws Exception {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"duration\", j);\n } catch (JSONException unused) {\n }\n C6759a.m20910a(\"api_stuck\", jSONObject);\n return null;\n }",
"public void sethourNeed(Integer h){hourNeed=h;}",
"public int getStartHour() {\n\treturn start.getHour();\n }",
"public void setHour(int nHour) { m_nTimeHour = nHour; }",
"private int getHour() {\n\t\tString time = getPersistedString(this.defaultValue);\n\t\tif (time == null || !time.matches(VALIDATION_EXPRESSION)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn Integer.valueOf(time.split(\":|/\")[0]);\n\t}",
"@WebMethod(operationName = \"increase-infections-24h\")\n String getIncInfections24h() throws JsonProcessingException;",
"public int getMinHours() {\r\n return minHours;\r\n }",
"T mo512a(C0636l c0636l, JsonValue jsonValue);",
"org.hl7.fhir.Integer getStart();",
"public Builder setStartHour(int value) {\n \n startHour_ = value;\n onChanged();\n return this;\n }",
"@Override\r\n\tpublic int getHH() {\n\t\treturn HH;\r\n\t}",
"@XmlElement(name = \"starttime\")\n public Long getStartTime() {\n return startTime;\n }",
"public void setHour(Integer hour) {\n this.hour = hour;\n }",
"Integer getEndHour();",
"@JSProperty(\"startOfWeek\")\n double getStartOfWeek();",
"public Integer getHour() {\n\t\treturn hour;\n\t}",
"public interface DatetimeRange {\n\n @JsonProperty(\"dtr:start_datetime\")\n String getStartDatetime();\n void setStartDatetime(String startDatetime);\n\n @JsonProperty(\"dtr:end_datetime\")\n String getEndDatetime();\n void setEndDatetime(String endDatetime);\n\n}",
"public int getHora(){\n return minutosStamina;\n }",
"public void setHour(int hour)\n {\n this.hour = hour;\n }",
"public Integer getStartTime() {\n return startTime;\n }",
"BigInteger getResponse_time();",
"public String getHours();",
"public double getHours(){\n return hours;\n }",
"@JsonGetter(\"initiated_at\")\r\n public String getInitiatedAt() {\r\n return initiatedAt;\r\n }",
"Integer getMinute();",
"public int getHour() {\n\t\treturn hour;\n\t}",
"public int getHour() {\n\t\treturn hour;\n\t}",
"@WebMethod(operationName = \"new-infections-last-24h\")\n String getNewInfectionsLast24h() throws JsonProcessingException;",
"@Override\r\n\tpublic void parseJson(JSONObject json) {\n\t\tif(json == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\ttype = getInt(json,d_type);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public String getHourActualStart() {\n return hourStartInput.getAttribute(\"value\");\n }",
"public int getArrivalTime(){return arrivalTime;}",
"public int[] getHours() {\n return hours;\n }",
"public int getHour() {\n\t\treturn this.hour;\n\t}",
"@Override\r\n\tpublic JSONObject buildJson() {\n\t\tJSONObject json = new JSONObject();\r\n\t\ttry {\r\n\t\t\tsetInt(json,d_type,type);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogUtil.log.error(e.getMessage(),e);\r\n\t\t}\r\n\t\treturn json;\r\n\t}",
"@JSProperty(\"startOfWeek\")\n void setStartOfWeek(double value);",
"@Test(timeout = 4000)\n public void test057() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.optJSONObject(\"v.W.y`~H9LS\");\n assertNull(jSONObject1);\n }",
"private LocalDateTime getStartHour() {\n\t\treturn MoneroHourly.toLocalDateTime(startTimestamp);\r\n\t}",
"public int getMinute() { return this.minute; }",
"public int getHours(){\n return (int) totalSeconds/3600;\n }",
"public Integer getOne(int day, int hour) {\r\n return weekData[day][hour];\r\n }",
"public interface JsonProperties {\n\n String ACCESS_LEVEL = \"accessLevel\";\n String ADDRESS = \"address\";\n String ASSET_ID = \"assetId\";\n String CONTENT = \"content\";\n String CREATED_BY = \"createdBy\";\n String DATA = \"data\";\n String DATA_HASH = \"dataHash\";\n String EVENT_ID = \"eventId\";\n String ID_DATA = \"idData\";\n String META_DATA = \"metadata\";\n String PERMISSIONS = \"permissions\";\n String REGISTERED_BY = \"registeredBy\";\n String REGISTERED_ON = \"registeredOn\";\n String SEQUENCE_NUMBER = \"sequenceNumber\";\n String SIGNATURE = \"signature\";\n String TIMESTAMP = \"timestamp\";\n}",
"@Test(timeout = 4000)\n public void test076() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n Integer integer0 = new Integer(55);\n JSONObject jSONObject1 = jSONObject0.append(\"Substring bounds error\", integer0);\n jSONObject1.getJSONArray(\"Substring bounds error\");\n jSONObject1.append(\"Bad value from toJSONString: \", integer0);\n String string0 = jSONObject1.optString(\"Substring bounds error\", \"num\");\n assertNotNull(string0);\n }",
"void mo28373a(JSONObject jSONObject);",
"public int getHour() {\n return hour; // returns the appointment's hour in military time\n }",
"@Override\n\tpublic void get_time_int(ShortHolder heure, ShortHolder min) {\n\t\t\n\t}",
"void mo16412a(String str, JSONObject jSONObject);",
"public void setJSON(JSONObject json) {this.progressJSON = json;}",
"public int getStartMinute() {\n return startMinute;\n }",
"public final native int getHours() /*-{\n return this.getHours();\n }-*/;",
"public int getMinute()\n {\n return minute;\n }",
"@Test(timeout = 4000)\n public void test19() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n double double0 = jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n assertEquals((-821.0), double0, 0.01);\n \n boolean boolean0 = jSONObject0.optBoolean(\"/W_,B?i~I:-MW8${,z\");\n assertFalse(boolean0);\n assertEquals(1, jSONObject0.length());\n }",
"@JsonProperty(\"endTime\")\n public String getEndTime() {\n return endTime;\n }",
"private static String readEnergyJSON(Date start, Date end, String resolution, String point) throws IOException {\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd+HH:mm:ss\");\n df.setTimeZone(SimpleTimeZone.getTimeZone(\"US/Central\"));\n String url_string = \"https://rest.buildingos.com/reports/timeseries/?start=\" + df.format(start) + \"&resolution=\" + resolution + \"&end=\" + df.format(end) + \"&name=\" + point;\n URL consumption_url = new URL(url_string);\n Log.i(\"url\", consumption_url.toString());\n InputStream in = consumption_url.openStream();\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n String result, line = reader.readLine();\n result = line;\n while((line=reader.readLine())!=null) {\n result += line;\n }\n String json_string = result;\n JSONObject all_electricity_page = null;\n String return_string = \"\";\n\n try {\n all_electricity_page = (JSONObject) new JSONTokener(json_string).nextValue();\n JSONArray results = (JSONArray)all_electricity_page.get(\"results\");\n for (int i = 0; i < results.length(); i++) {\n Double value = -2.0;\n try {\n if (results.get(i) != JSONObject.NULL\n && ((JSONObject)results.get(i)).get(point) != JSONObject.NULL) {\n value = ((JSONObject) ((JSONObject) results.get(i)).get(point)).getDouble(\"value\");\n //Log.i(\"not null\", \"getting here? value = \" + value);\n\n }\n else {\n value = 0.0;\n String timestamp_string = ((JSONObject) results.get(i)).getString(\"startTimestamp\");\n Log.i(\"null\", \"adding -1.0? point=\" + point + \" time=\" + timestamp_string);\n }\n\n String timestamp_string = ((JSONObject) results.get(i)).getString(\"startTimestamp\");\n return_string += timestamp_string + \";\" + value + \"\\n\";\n }\n catch (Exception e) {\n //System.out.println(results.get(i));\n e.printStackTrace();\n //Log.i(\"null error?\", \"error: value = \" + value);\n //Log.i(\"null error?\", e.toString());\n }\n }\n\n } catch (JSONException e) {\n //didn't find any results - url must have been wrong, or bad connection\n e.printStackTrace();\n Log.i(\"readEnergyJSON\", \"bad url? \" + e.toString());\n }\n return return_string;\n }",
"public void mo15090a(JSONObject jSONObject) {\n }",
"public Integer getMinTime() {\n return minTime;\n }",
"@JsonSetter(\"exp_year\")\r\n public void setExpYear (int value) { \r\n this.expYear = value;\r\n }",
"public void setStartTime(Integer startTime) {\n this.startTime = startTime;\n }",
"public int getHours() {\n return this.hours;\n }",
"@JsonSetter(\"exp_month\")\r\n public void setExpMonth (int value) { \r\n this.expMonth = value;\r\n }",
"public void setHours(String hours) {\n this.hours = parseHours(hours);\n }",
"public void setHour(int hour) {\n\t\tthis.hour = hour;\n\t}",
"@JsonProperty(\"at\")\n public LocalDateTime getAt() {\n return at;\n }",
"JsonObject getIndex(final String index);",
"public Integer getTestTime() {\n return testTime;\n }",
"void mo59932a(String str, JSONObject jSONObject);",
"int getSchedulingValue();",
"@JsonFormat(pattern=\"yyyyMMddHHmmss\",timezone = \"GMT+8\")\n\tpublic Date getResultTs() {\n\t\treturn resultTs;\n\t}",
"public Integer getUtilizationStart(){\n String value = (String)getProp().get(\"UTILIZATION_START\");\n if (value == null){\n return 1;\n } else {\n return Integer.parseInt(value);\n }\n }",
"static int getHour(byte[] bytes) {\n if (HOUR_POS < bytes.length * 8) {\n return readBits(bytes, HOUR_POS, HOUR_BITS);\n }\n return 0;\n }",
"public JSONObject mo56289a_() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"api_endpoint\", mo56263a());\n } catch (JSONException unused) {\n }\n f2302w.mo56245a(jSONObject, \"timestamp\", mo56265c());\n f2303x.mo56245a(jSONObject, \"cart\", mo56278d());\n return jSONObject;\n }",
"public int getHour() {\n return dateTime.getHour();\n }",
"@JsProperty(name = \"timestamp\")\n public native Number getTimestamp();",
"public void setBeginTime(String time){beginTime = time;}",
"public int getMinutes(){\r\n return Minutes;\r\n }",
"public int getMinute() {\n return minute;\n }",
"JSONObject mo28758a(View view);",
"public int getFinishHour() {\n return finishHour;\n }",
"public int getMinute() {\n return minute;\n }",
"public M csmiBirthdayStart(Object start){this.put(\"csmiBirthdayStart\", start);return this;}",
"public void setStartTime (long x)\r\n {\r\n startTime = x;\r\n }",
"int getStartTime();",
"int getStartTime();",
"int getStartTime();",
"public void setHour(int hour){\n if(hour < 0 || hour > 23) {System.out.println(\"wrong input!\"); return;}\n this.hour = hour;\n }",
"public M csmiAddTimeStart(Object start){this.put(\"csmiAddTimeStart\", start);return this;}",
"public void setEoi_json(String eoi_json) {\n this.eoi_json = eoi_json;\n }"
] |
[
"0.6206214",
"0.61504173",
"0.590324",
"0.58036476",
"0.5738213",
"0.5721684",
"0.57141316",
"0.5690955",
"0.56536967",
"0.562999",
"0.55756235",
"0.54705465",
"0.54322344",
"0.53970057",
"0.5383827",
"0.53753954",
"0.5326936",
"0.5291918",
"0.5276068",
"0.5267846",
"0.52619904",
"0.5260582",
"0.51976454",
"0.5195321",
"0.5189483",
"0.5178167",
"0.51753217",
"0.51531726",
"0.51499754",
"0.51342493",
"0.512314",
"0.51215607",
"0.5112261",
"0.5086445",
"0.5077799",
"0.5067676",
"0.5059774",
"0.5041109",
"0.50183004",
"0.50152946",
"0.50152946",
"0.5001177",
"0.49916518",
"0.49885163",
"0.49793237",
"0.49524543",
"0.49482003",
"0.49423185",
"0.49238506",
"0.49006954",
"0.48855698",
"0.48846123",
"0.4874613",
"0.4871044",
"0.48708543",
"0.48635513",
"0.4857004",
"0.4843275",
"0.4840056",
"0.48285955",
"0.48209408",
"0.4801412",
"0.48013464",
"0.47988603",
"0.4793375",
"0.47902915",
"0.4787931",
"0.4777401",
"0.47755462",
"0.47726265",
"0.47718304",
"0.47709486",
"0.47687837",
"0.47639683",
"0.47623464",
"0.4759576",
"0.4759157",
"0.47551322",
"0.47538465",
"0.47484952",
"0.47414285",
"0.47298363",
"0.4729473",
"0.47204158",
"0.4719894",
"0.47188702",
"0.47101948",
"0.47070223",
"0.46997896",
"0.46920544",
"0.4690976",
"0.46867815",
"0.468099",
"0.4675731",
"0.4669459",
"0.4669459",
"0.4669459",
"0.46672818",
"0.46654463",
"0.46623734"
] |
0.55256
|
11
|
int32 start_hour = 1 [json_name = "startHour"];
|
public Builder setStartHour(int value) {
startHour_ = value;
onChanged();
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Integer getStartHour();",
"public int getStartHour() {\n return startHour; // stub\n }",
"void mo350a(C0636l c0636l, JsonValue jsonValue);",
"public int getHour(){\n return hour;\n }",
"public int getHour() \n { \n return hour; \n }",
"@JsonProperty(\"startTime\")\n public String getStartTime() {\n return startTime;\n }",
"@java.lang.Override\n public int getStartHour() {\n return startHour_;\n }",
"Integer getHour();",
"public int getHour() { return this.hour; }",
"@JsonSetter(\"time\")\r\n public void setTime(String time) {\r\n this.time = time;\r\n }",
"@JsonGetter(\"time\")\r\n public String getTime() {\r\n return time;\r\n }",
"@java.lang.Override\n public int getStartHour() {\n return startHour_;\n }",
"@JsonProperty(\"time\")\n public String getTime() {\n return time;\n }",
"public int getHour()\n {\n return hour;\n }",
"public Integer getHour() {\n return hour;\n }",
"static final /* synthetic */ Object m109665a(long j) throws Exception {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"duration\", j);\n } catch (JSONException unused) {\n }\n C6759a.m20910a(\"api_stuck\", jSONObject);\n return null;\n }",
"public void sethourNeed(Integer h){hourNeed=h;}",
"public int getStartHour() {\n\treturn start.getHour();\n }",
"public void setHour(int nHour) { m_nTimeHour = nHour; }",
"private int getHour() {\n\t\tString time = getPersistedString(this.defaultValue);\n\t\tif (time == null || !time.matches(VALIDATION_EXPRESSION)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn Integer.valueOf(time.split(\":|/\")[0]);\n\t}",
"@WebMethod(operationName = \"increase-infections-24h\")\n String getIncInfections24h() throws JsonProcessingException;",
"public int getMinHours() {\r\n return minHours;\r\n }",
"T mo512a(C0636l c0636l, JsonValue jsonValue);",
"org.hl7.fhir.Integer getStart();",
"@Override\r\n\tpublic int getHH() {\n\t\treturn HH;\r\n\t}",
"@XmlElement(name = \"starttime\")\n public Long getStartTime() {\n return startTime;\n }",
"public void setHour(Integer hour) {\n this.hour = hour;\n }",
"Integer getEndHour();",
"@JSProperty(\"startOfWeek\")\n double getStartOfWeek();",
"public Integer getHour() {\n\t\treturn hour;\n\t}",
"public interface DatetimeRange {\n\n @JsonProperty(\"dtr:start_datetime\")\n String getStartDatetime();\n void setStartDatetime(String startDatetime);\n\n @JsonProperty(\"dtr:end_datetime\")\n String getEndDatetime();\n void setEndDatetime(String endDatetime);\n\n}",
"public int getHora(){\n return minutosStamina;\n }",
"public void setHour(int hour)\n {\n this.hour = hour;\n }",
"public Integer getStartTime() {\n return startTime;\n }",
"BigInteger getResponse_time();",
"public String getHours();",
"public double getHours(){\n return hours;\n }",
"@JsonGetter(\"initiated_at\")\r\n public String getInitiatedAt() {\r\n return initiatedAt;\r\n }",
"Integer getMinute();",
"public int getHour() {\n\t\treturn hour;\n\t}",
"public int getHour() {\n\t\treturn hour;\n\t}",
"@WebMethod(operationName = \"new-infections-last-24h\")\n String getNewInfectionsLast24h() throws JsonProcessingException;",
"@Override\r\n\tpublic void parseJson(JSONObject json) {\n\t\tif(json == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\ttype = getInt(json,d_type);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public String getHourActualStart() {\n return hourStartInput.getAttribute(\"value\");\n }",
"public int getArrivalTime(){return arrivalTime;}",
"public int[] getHours() {\n return hours;\n }",
"public int getHour() {\n\t\treturn this.hour;\n\t}",
"@Override\r\n\tpublic JSONObject buildJson() {\n\t\tJSONObject json = new JSONObject();\r\n\t\ttry {\r\n\t\t\tsetInt(json,d_type,type);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogUtil.log.error(e.getMessage(),e);\r\n\t\t}\r\n\t\treturn json;\r\n\t}",
"@JSProperty(\"startOfWeek\")\n void setStartOfWeek(double value);",
"@Test(timeout = 4000)\n public void test057() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.optJSONObject(\"v.W.y`~H9LS\");\n assertNull(jSONObject1);\n }",
"private LocalDateTime getStartHour() {\n\t\treturn MoneroHourly.toLocalDateTime(startTimestamp);\r\n\t}",
"public int getMinute() { return this.minute; }",
"public int getHours(){\n return (int) totalSeconds/3600;\n }",
"public Integer getOne(int day, int hour) {\r\n return weekData[day][hour];\r\n }",
"public interface JsonProperties {\n\n String ACCESS_LEVEL = \"accessLevel\";\n String ADDRESS = \"address\";\n String ASSET_ID = \"assetId\";\n String CONTENT = \"content\";\n String CREATED_BY = \"createdBy\";\n String DATA = \"data\";\n String DATA_HASH = \"dataHash\";\n String EVENT_ID = \"eventId\";\n String ID_DATA = \"idData\";\n String META_DATA = \"metadata\";\n String PERMISSIONS = \"permissions\";\n String REGISTERED_BY = \"registeredBy\";\n String REGISTERED_ON = \"registeredOn\";\n String SEQUENCE_NUMBER = \"sequenceNumber\";\n String SIGNATURE = \"signature\";\n String TIMESTAMP = \"timestamp\";\n}",
"@Test(timeout = 4000)\n public void test076() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n Integer integer0 = new Integer(55);\n JSONObject jSONObject1 = jSONObject0.append(\"Substring bounds error\", integer0);\n jSONObject1.getJSONArray(\"Substring bounds error\");\n jSONObject1.append(\"Bad value from toJSONString: \", integer0);\n String string0 = jSONObject1.optString(\"Substring bounds error\", \"num\");\n assertNotNull(string0);\n }",
"void mo28373a(JSONObject jSONObject);",
"public int getHour() {\n return hour; // returns the appointment's hour in military time\n }",
"@Override\n\tpublic void get_time_int(ShortHolder heure, ShortHolder min) {\n\t\t\n\t}",
"void mo16412a(String str, JSONObject jSONObject);",
"public void setJSON(JSONObject json) {this.progressJSON = json;}",
"public int getStartMinute() {\n return startMinute;\n }",
"public final native int getHours() /*-{\n return this.getHours();\n }-*/;",
"public int getMinute()\n {\n return minute;\n }",
"@Test(timeout = 4000)\n public void test19() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n double double0 = jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n assertEquals((-821.0), double0, 0.01);\n \n boolean boolean0 = jSONObject0.optBoolean(\"/W_,B?i~I:-MW8${,z\");\n assertFalse(boolean0);\n assertEquals(1, jSONObject0.length());\n }",
"@JsonProperty(\"endTime\")\n public String getEndTime() {\n return endTime;\n }",
"private static String readEnergyJSON(Date start, Date end, String resolution, String point) throws IOException {\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd+HH:mm:ss\");\n df.setTimeZone(SimpleTimeZone.getTimeZone(\"US/Central\"));\n String url_string = \"https://rest.buildingos.com/reports/timeseries/?start=\" + df.format(start) + \"&resolution=\" + resolution + \"&end=\" + df.format(end) + \"&name=\" + point;\n URL consumption_url = new URL(url_string);\n Log.i(\"url\", consumption_url.toString());\n InputStream in = consumption_url.openStream();\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n String result, line = reader.readLine();\n result = line;\n while((line=reader.readLine())!=null) {\n result += line;\n }\n String json_string = result;\n JSONObject all_electricity_page = null;\n String return_string = \"\";\n\n try {\n all_electricity_page = (JSONObject) new JSONTokener(json_string).nextValue();\n JSONArray results = (JSONArray)all_electricity_page.get(\"results\");\n for (int i = 0; i < results.length(); i++) {\n Double value = -2.0;\n try {\n if (results.get(i) != JSONObject.NULL\n && ((JSONObject)results.get(i)).get(point) != JSONObject.NULL) {\n value = ((JSONObject) ((JSONObject) results.get(i)).get(point)).getDouble(\"value\");\n //Log.i(\"not null\", \"getting here? value = \" + value);\n\n }\n else {\n value = 0.0;\n String timestamp_string = ((JSONObject) results.get(i)).getString(\"startTimestamp\");\n Log.i(\"null\", \"adding -1.0? point=\" + point + \" time=\" + timestamp_string);\n }\n\n String timestamp_string = ((JSONObject) results.get(i)).getString(\"startTimestamp\");\n return_string += timestamp_string + \";\" + value + \"\\n\";\n }\n catch (Exception e) {\n //System.out.println(results.get(i));\n e.printStackTrace();\n //Log.i(\"null error?\", \"error: value = \" + value);\n //Log.i(\"null error?\", e.toString());\n }\n }\n\n } catch (JSONException e) {\n //didn't find any results - url must have been wrong, or bad connection\n e.printStackTrace();\n Log.i(\"readEnergyJSON\", \"bad url? \" + e.toString());\n }\n return return_string;\n }",
"public void mo15090a(JSONObject jSONObject) {\n }",
"public Integer getMinTime() {\n return minTime;\n }",
"@JsonSetter(\"exp_year\")\r\n public void setExpYear (int value) { \r\n this.expYear = value;\r\n }",
"public void setStartTime(Integer startTime) {\n this.startTime = startTime;\n }",
"public int getHours() {\n return this.hours;\n }",
"@JsonSetter(\"exp_month\")\r\n public void setExpMonth (int value) { \r\n this.expMonth = value;\r\n }",
"public void setHours(String hours) {\n this.hours = parseHours(hours);\n }",
"public void setHour(int hour) {\n\t\tthis.hour = hour;\n\t}",
"@JsonProperty(\"at\")\n public LocalDateTime getAt() {\n return at;\n }",
"JsonObject getIndex(final String index);",
"public Integer getTestTime() {\n return testTime;\n }",
"void mo59932a(String str, JSONObject jSONObject);",
"int getSchedulingValue();",
"@JsonFormat(pattern=\"yyyyMMddHHmmss\",timezone = \"GMT+8\")\n\tpublic Date getResultTs() {\n\t\treturn resultTs;\n\t}",
"public Integer getUtilizationStart(){\n String value = (String)getProp().get(\"UTILIZATION_START\");\n if (value == null){\n return 1;\n } else {\n return Integer.parseInt(value);\n }\n }",
"static int getHour(byte[] bytes) {\n if (HOUR_POS < bytes.length * 8) {\n return readBits(bytes, HOUR_POS, HOUR_BITS);\n }\n return 0;\n }",
"public JSONObject mo56289a_() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"api_endpoint\", mo56263a());\n } catch (JSONException unused) {\n }\n f2302w.mo56245a(jSONObject, \"timestamp\", mo56265c());\n f2303x.mo56245a(jSONObject, \"cart\", mo56278d());\n return jSONObject;\n }",
"public int getHour() {\n return dateTime.getHour();\n }",
"@JsProperty(name = \"timestamp\")\n public native Number getTimestamp();",
"public void setBeginTime(String time){beginTime = time;}",
"public int getMinutes(){\r\n return Minutes;\r\n }",
"public int getMinute() {\n return minute;\n }",
"JSONObject mo28758a(View view);",
"public int getFinishHour() {\n return finishHour;\n }",
"public int getMinute() {\n return minute;\n }",
"public M csmiBirthdayStart(Object start){this.put(\"csmiBirthdayStart\", start);return this;}",
"public void setStartTime (long x)\r\n {\r\n startTime = x;\r\n }",
"int getStartTime();",
"int getStartTime();",
"int getStartTime();",
"public void setHour(int hour){\n if(hour < 0 || hour > 23) {System.out.println(\"wrong input!\"); return;}\n this.hour = hour;\n }",
"public M csmiAddTimeStart(Object start){this.put(\"csmiAddTimeStart\", start);return this;}",
"public void setEoi_json(String eoi_json) {\n this.eoi_json = eoi_json;\n }"
] |
[
"0.6206214",
"0.61504173",
"0.590324",
"0.58036476",
"0.5738213",
"0.5721684",
"0.57141316",
"0.5690955",
"0.56536967",
"0.562999",
"0.55756235",
"0.55256",
"0.54705465",
"0.54322344",
"0.53970057",
"0.5383827",
"0.53753954",
"0.5326936",
"0.5291918",
"0.5276068",
"0.5267846",
"0.52619904",
"0.5260582",
"0.51976454",
"0.5189483",
"0.5178167",
"0.51753217",
"0.51531726",
"0.51499754",
"0.51342493",
"0.512314",
"0.51215607",
"0.5112261",
"0.5086445",
"0.5077799",
"0.5067676",
"0.5059774",
"0.5041109",
"0.50183004",
"0.50152946",
"0.50152946",
"0.5001177",
"0.49916518",
"0.49885163",
"0.49793237",
"0.49524543",
"0.49482003",
"0.49423185",
"0.49238506",
"0.49006954",
"0.48855698",
"0.48846123",
"0.4874613",
"0.4871044",
"0.48708543",
"0.48635513",
"0.4857004",
"0.4843275",
"0.4840056",
"0.48285955",
"0.48209408",
"0.4801412",
"0.48013464",
"0.47988603",
"0.4793375",
"0.47902915",
"0.4787931",
"0.4777401",
"0.47755462",
"0.47726265",
"0.47718304",
"0.47709486",
"0.47687837",
"0.47639683",
"0.47623464",
"0.4759576",
"0.4759157",
"0.47551322",
"0.47538465",
"0.47484952",
"0.47414285",
"0.47298363",
"0.4729473",
"0.47204158",
"0.4719894",
"0.47188702",
"0.47101948",
"0.47070223",
"0.46997896",
"0.46920544",
"0.4690976",
"0.46867815",
"0.468099",
"0.4675731",
"0.4669459",
"0.4669459",
"0.4669459",
"0.46672818",
"0.46654463",
"0.46623734"
] |
0.5195321
|
24
|
int32 start_hour = 1 [json_name = "startHour"];
|
public Builder clearStartHour() {
startHour_ = 0;
onChanged();
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Integer getStartHour();",
"public int getStartHour() {\n return startHour; // stub\n }",
"void mo350a(C0636l c0636l, JsonValue jsonValue);",
"public int getHour(){\n return hour;\n }",
"public int getHour() \n { \n return hour; \n }",
"@JsonProperty(\"startTime\")\n public String getStartTime() {\n return startTime;\n }",
"@java.lang.Override\n public int getStartHour() {\n return startHour_;\n }",
"Integer getHour();",
"public int getHour() { return this.hour; }",
"@JsonSetter(\"time\")\r\n public void setTime(String time) {\r\n this.time = time;\r\n }",
"@JsonGetter(\"time\")\r\n public String getTime() {\r\n return time;\r\n }",
"@java.lang.Override\n public int getStartHour() {\n return startHour_;\n }",
"@JsonProperty(\"time\")\n public String getTime() {\n return time;\n }",
"public int getHour()\n {\n return hour;\n }",
"public Integer getHour() {\n return hour;\n }",
"static final /* synthetic */ Object m109665a(long j) throws Exception {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"duration\", j);\n } catch (JSONException unused) {\n }\n C6759a.m20910a(\"api_stuck\", jSONObject);\n return null;\n }",
"public void sethourNeed(Integer h){hourNeed=h;}",
"public int getStartHour() {\n\treturn start.getHour();\n }",
"public void setHour(int nHour) { m_nTimeHour = nHour; }",
"private int getHour() {\n\t\tString time = getPersistedString(this.defaultValue);\n\t\tif (time == null || !time.matches(VALIDATION_EXPRESSION)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn Integer.valueOf(time.split(\":|/\")[0]);\n\t}",
"@WebMethod(operationName = \"increase-infections-24h\")\n String getIncInfections24h() throws JsonProcessingException;",
"public int getMinHours() {\r\n return minHours;\r\n }",
"T mo512a(C0636l c0636l, JsonValue jsonValue);",
"org.hl7.fhir.Integer getStart();",
"public Builder setStartHour(int value) {\n \n startHour_ = value;\n onChanged();\n return this;\n }",
"@Override\r\n\tpublic int getHH() {\n\t\treturn HH;\r\n\t}",
"@XmlElement(name = \"starttime\")\n public Long getStartTime() {\n return startTime;\n }",
"public void setHour(Integer hour) {\n this.hour = hour;\n }",
"Integer getEndHour();",
"@JSProperty(\"startOfWeek\")\n double getStartOfWeek();",
"public Integer getHour() {\n\t\treturn hour;\n\t}",
"public interface DatetimeRange {\n\n @JsonProperty(\"dtr:start_datetime\")\n String getStartDatetime();\n void setStartDatetime(String startDatetime);\n\n @JsonProperty(\"dtr:end_datetime\")\n String getEndDatetime();\n void setEndDatetime(String endDatetime);\n\n}",
"public int getHora(){\n return minutosStamina;\n }",
"public void setHour(int hour)\n {\n this.hour = hour;\n }",
"public Integer getStartTime() {\n return startTime;\n }",
"BigInteger getResponse_time();",
"public String getHours();",
"public double getHours(){\n return hours;\n }",
"@JsonGetter(\"initiated_at\")\r\n public String getInitiatedAt() {\r\n return initiatedAt;\r\n }",
"Integer getMinute();",
"public int getHour() {\n\t\treturn hour;\n\t}",
"public int getHour() {\n\t\treturn hour;\n\t}",
"@WebMethod(operationName = \"new-infections-last-24h\")\n String getNewInfectionsLast24h() throws JsonProcessingException;",
"@Override\r\n\tpublic void parseJson(JSONObject json) {\n\t\tif(json == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\ttype = getInt(json,d_type);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public String getHourActualStart() {\n return hourStartInput.getAttribute(\"value\");\n }",
"public int getArrivalTime(){return arrivalTime;}",
"public int[] getHours() {\n return hours;\n }",
"public int getHour() {\n\t\treturn this.hour;\n\t}",
"@Override\r\n\tpublic JSONObject buildJson() {\n\t\tJSONObject json = new JSONObject();\r\n\t\ttry {\r\n\t\t\tsetInt(json,d_type,type);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogUtil.log.error(e.getMessage(),e);\r\n\t\t}\r\n\t\treturn json;\r\n\t}",
"@JSProperty(\"startOfWeek\")\n void setStartOfWeek(double value);",
"@Test(timeout = 4000)\n public void test057() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.optJSONObject(\"v.W.y`~H9LS\");\n assertNull(jSONObject1);\n }",
"private LocalDateTime getStartHour() {\n\t\treturn MoneroHourly.toLocalDateTime(startTimestamp);\r\n\t}",
"public int getMinute() { return this.minute; }",
"public int getHours(){\n return (int) totalSeconds/3600;\n }",
"public Integer getOne(int day, int hour) {\r\n return weekData[day][hour];\r\n }",
"public interface JsonProperties {\n\n String ACCESS_LEVEL = \"accessLevel\";\n String ADDRESS = \"address\";\n String ASSET_ID = \"assetId\";\n String CONTENT = \"content\";\n String CREATED_BY = \"createdBy\";\n String DATA = \"data\";\n String DATA_HASH = \"dataHash\";\n String EVENT_ID = \"eventId\";\n String ID_DATA = \"idData\";\n String META_DATA = \"metadata\";\n String PERMISSIONS = \"permissions\";\n String REGISTERED_BY = \"registeredBy\";\n String REGISTERED_ON = \"registeredOn\";\n String SEQUENCE_NUMBER = \"sequenceNumber\";\n String SIGNATURE = \"signature\";\n String TIMESTAMP = \"timestamp\";\n}",
"@Test(timeout = 4000)\n public void test076() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n Integer integer0 = new Integer(55);\n JSONObject jSONObject1 = jSONObject0.append(\"Substring bounds error\", integer0);\n jSONObject1.getJSONArray(\"Substring bounds error\");\n jSONObject1.append(\"Bad value from toJSONString: \", integer0);\n String string0 = jSONObject1.optString(\"Substring bounds error\", \"num\");\n assertNotNull(string0);\n }",
"void mo28373a(JSONObject jSONObject);",
"public int getHour() {\n return hour; // returns the appointment's hour in military time\n }",
"@Override\n\tpublic void get_time_int(ShortHolder heure, ShortHolder min) {\n\t\t\n\t}",
"void mo16412a(String str, JSONObject jSONObject);",
"public void setJSON(JSONObject json) {this.progressJSON = json;}",
"public int getStartMinute() {\n return startMinute;\n }",
"public final native int getHours() /*-{\n return this.getHours();\n }-*/;",
"public int getMinute()\n {\n return minute;\n }",
"@Test(timeout = 4000)\n public void test19() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n double double0 = jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n assertEquals((-821.0), double0, 0.01);\n \n boolean boolean0 = jSONObject0.optBoolean(\"/W_,B?i~I:-MW8${,z\");\n assertFalse(boolean0);\n assertEquals(1, jSONObject0.length());\n }",
"@JsonProperty(\"endTime\")\n public String getEndTime() {\n return endTime;\n }",
"private static String readEnergyJSON(Date start, Date end, String resolution, String point) throws IOException {\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd+HH:mm:ss\");\n df.setTimeZone(SimpleTimeZone.getTimeZone(\"US/Central\"));\n String url_string = \"https://rest.buildingos.com/reports/timeseries/?start=\" + df.format(start) + \"&resolution=\" + resolution + \"&end=\" + df.format(end) + \"&name=\" + point;\n URL consumption_url = new URL(url_string);\n Log.i(\"url\", consumption_url.toString());\n InputStream in = consumption_url.openStream();\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n String result, line = reader.readLine();\n result = line;\n while((line=reader.readLine())!=null) {\n result += line;\n }\n String json_string = result;\n JSONObject all_electricity_page = null;\n String return_string = \"\";\n\n try {\n all_electricity_page = (JSONObject) new JSONTokener(json_string).nextValue();\n JSONArray results = (JSONArray)all_electricity_page.get(\"results\");\n for (int i = 0; i < results.length(); i++) {\n Double value = -2.0;\n try {\n if (results.get(i) != JSONObject.NULL\n && ((JSONObject)results.get(i)).get(point) != JSONObject.NULL) {\n value = ((JSONObject) ((JSONObject) results.get(i)).get(point)).getDouble(\"value\");\n //Log.i(\"not null\", \"getting here? value = \" + value);\n\n }\n else {\n value = 0.0;\n String timestamp_string = ((JSONObject) results.get(i)).getString(\"startTimestamp\");\n Log.i(\"null\", \"adding -1.0? point=\" + point + \" time=\" + timestamp_string);\n }\n\n String timestamp_string = ((JSONObject) results.get(i)).getString(\"startTimestamp\");\n return_string += timestamp_string + \";\" + value + \"\\n\";\n }\n catch (Exception e) {\n //System.out.println(results.get(i));\n e.printStackTrace();\n //Log.i(\"null error?\", \"error: value = \" + value);\n //Log.i(\"null error?\", e.toString());\n }\n }\n\n } catch (JSONException e) {\n //didn't find any results - url must have been wrong, or bad connection\n e.printStackTrace();\n Log.i(\"readEnergyJSON\", \"bad url? \" + e.toString());\n }\n return return_string;\n }",
"public void mo15090a(JSONObject jSONObject) {\n }",
"public Integer getMinTime() {\n return minTime;\n }",
"@JsonSetter(\"exp_year\")\r\n public void setExpYear (int value) { \r\n this.expYear = value;\r\n }",
"public void setStartTime(Integer startTime) {\n this.startTime = startTime;\n }",
"public int getHours() {\n return this.hours;\n }",
"@JsonSetter(\"exp_month\")\r\n public void setExpMonth (int value) { \r\n this.expMonth = value;\r\n }",
"public void setHours(String hours) {\n this.hours = parseHours(hours);\n }",
"public void setHour(int hour) {\n\t\tthis.hour = hour;\n\t}",
"@JsonProperty(\"at\")\n public LocalDateTime getAt() {\n return at;\n }",
"JsonObject getIndex(final String index);",
"public Integer getTestTime() {\n return testTime;\n }",
"void mo59932a(String str, JSONObject jSONObject);",
"int getSchedulingValue();",
"@JsonFormat(pattern=\"yyyyMMddHHmmss\",timezone = \"GMT+8\")\n\tpublic Date getResultTs() {\n\t\treturn resultTs;\n\t}",
"public Integer getUtilizationStart(){\n String value = (String)getProp().get(\"UTILIZATION_START\");\n if (value == null){\n return 1;\n } else {\n return Integer.parseInt(value);\n }\n }",
"static int getHour(byte[] bytes) {\n if (HOUR_POS < bytes.length * 8) {\n return readBits(bytes, HOUR_POS, HOUR_BITS);\n }\n return 0;\n }",
"public JSONObject mo56289a_() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"api_endpoint\", mo56263a());\n } catch (JSONException unused) {\n }\n f2302w.mo56245a(jSONObject, \"timestamp\", mo56265c());\n f2303x.mo56245a(jSONObject, \"cart\", mo56278d());\n return jSONObject;\n }",
"public int getHour() {\n return dateTime.getHour();\n }",
"@JsProperty(name = \"timestamp\")\n public native Number getTimestamp();",
"public void setBeginTime(String time){beginTime = time;}",
"public int getMinutes(){\r\n return Minutes;\r\n }",
"public int getMinute() {\n return minute;\n }",
"JSONObject mo28758a(View view);",
"public int getFinishHour() {\n return finishHour;\n }",
"public int getMinute() {\n return minute;\n }",
"public M csmiBirthdayStart(Object start){this.put(\"csmiBirthdayStart\", start);return this;}",
"public void setStartTime (long x)\r\n {\r\n startTime = x;\r\n }",
"int getStartTime();",
"int getStartTime();",
"int getStartTime();",
"public void setHour(int hour){\n if(hour < 0 || hour > 23) {System.out.println(\"wrong input!\"); return;}\n this.hour = hour;\n }",
"public M csmiAddTimeStart(Object start){this.put(\"csmiAddTimeStart\", start);return this;}",
"public void setEoi_json(String eoi_json) {\n this.eoi_json = eoi_json;\n }"
] |
[
"0.6206214",
"0.61504173",
"0.590324",
"0.58036476",
"0.5738213",
"0.5721684",
"0.57141316",
"0.5690955",
"0.56536967",
"0.562999",
"0.55756235",
"0.55256",
"0.54705465",
"0.54322344",
"0.53970057",
"0.5383827",
"0.53753954",
"0.5326936",
"0.5291918",
"0.5276068",
"0.5267846",
"0.52619904",
"0.5260582",
"0.51976454",
"0.5195321",
"0.5189483",
"0.5178167",
"0.51753217",
"0.51531726",
"0.51499754",
"0.51342493",
"0.512314",
"0.51215607",
"0.5112261",
"0.5086445",
"0.5077799",
"0.5067676",
"0.5059774",
"0.5041109",
"0.50183004",
"0.50152946",
"0.50152946",
"0.5001177",
"0.49916518",
"0.49885163",
"0.49793237",
"0.49524543",
"0.49482003",
"0.49423185",
"0.49238506",
"0.49006954",
"0.48855698",
"0.48846123",
"0.4874613",
"0.4871044",
"0.48708543",
"0.48635513",
"0.4857004",
"0.4843275",
"0.4840056",
"0.48285955",
"0.48209408",
"0.4801412",
"0.48013464",
"0.47988603",
"0.4793375",
"0.47902915",
"0.4787931",
"0.4777401",
"0.47755462",
"0.47726265",
"0.47718304",
"0.47709486",
"0.47687837",
"0.47639683",
"0.47623464",
"0.4759576",
"0.4759157",
"0.47551322",
"0.47538465",
"0.47484952",
"0.47414285",
"0.47298363",
"0.4729473",
"0.47204158",
"0.4719894",
"0.47188702",
"0.47101948",
"0.47070223",
"0.46997896",
"0.46920544",
"0.4690976",
"0.46867815",
"0.468099",
"0.4675731",
"0.4669459",
"0.4669459",
"0.4669459",
"0.46672818",
"0.46654463",
"0.46623734"
] |
0.0
|
-1
|
int32 finish_hour = 2 [json_name = "finishHour"];
|
@java.lang.Override
public int getFinishHour() {
return finishHour_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void mo350a(C0636l c0636l, JsonValue jsonValue);",
"static final /* synthetic */ Object m109665a(long j) throws Exception {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"duration\", j);\n } catch (JSONException unused) {\n }\n C6759a.m20910a(\"api_stuck\", jSONObject);\n return null;\n }",
"public int getFinishHour() {\n return finishHour;\n }",
"T mo512a(C0636l c0636l, JsonValue jsonValue);",
"public int getHour(){\n return hour;\n }",
"public int getHour() \n { \n return hour; \n }",
"BigInteger getResponse_time();",
"Integer getEndHour();",
"@java.lang.Override\n public int getFinishHour() {\n return finishHour_;\n }",
"Integer getHour();",
"@JsonSetter(\"time\")\r\n public void setTime(String time) {\r\n this.time = time;\r\n }",
"@Test(timeout = 4000)\n public void test076() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n Integer integer0 = new Integer(55);\n JSONObject jSONObject1 = jSONObject0.append(\"Substring bounds error\", integer0);\n jSONObject1.getJSONArray(\"Substring bounds error\");\n jSONObject1.append(\"Bad value from toJSONString: \", integer0);\n String string0 = jSONObject1.optString(\"Substring bounds error\", \"num\");\n assertNotNull(string0);\n }",
"private int returnParsedJsonObject(String result){\n\n JSONObject resultObject = null;\n int returnedResult = 0;\n try {\n resultObject = new JSONObject(result);\n returnedResult = resultObject.getInt(\"success\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n Log.d(\"PRUEBA\",\"se obtubo en el JSON: \"+returnedResult);\n return returnedResult;\n }",
"@Test(timeout = 4000)\n public void test22() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n String string0 = \"53N/{T[\";\n JSONObject jSONObject1 = jSONObject0.put(\"53N/{T[\", (-1913.632));\n jSONObject1.toString((-821));\n jSONObject0.optString(\"53N/{T[\", \"53N/{T[\");\n jSONObject0.opt(\",2fHJL;.]tm*PJ9\");\n jSONObject0.optLong((String) null);\n jSONObject0.toString((-821));\n Byte byte0 = new Byte((byte)1);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONObject jSONObject2 = jSONObject1.put(\"|f}%!.^JO \", (Collection) linkedList0);\n JSONObject jSONObject3 = jSONObject2.accumulate(\"o%,g eOJ=9n\\\"\", \"java.lang.Double@0000000003\");\n try { \n jSONObject3.getJSONObject(\"{\\n\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003,\\n\\\"java.lang.String@0000000004\\\": \\\"java.lang.Class@0000000005\\\"\\n}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\n\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003,\\\\n\\\\\\\"java.lang.String@0000000004\\\\\\\": \\\\\\\"java.lang.Class@0000000005\\\\\\\"\\\\n}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getHour() { return this.hour; }",
"public static Integer getLastJsonResponseCode(){\n return jsonResponseCode;\n }",
"@JsonProperty(\"time\")\n public String getTime() {\n return time;\n }",
"private JsonValue m2254c(int i) {\n JsonValue jsonValue = this.f2957f;\n while (jsonValue != null && i > 0) {\n i--;\n jsonValue = jsonValue.f2958g;\n }\n return jsonValue;\n }",
"@Test(timeout = 4000)\n public void test19() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n double double0 = jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n assertEquals((-821.0), double0, 0.01);\n \n boolean boolean0 = jSONObject0.optBoolean(\"/W_,B?i~I:-MW8${,z\");\n assertFalse(boolean0);\n assertEquals(1, jSONObject0.length());\n }",
"@WebMethod(operationName = \"new-infections-last-24h\")\n String getNewInfectionsLast24h() throws JsonProcessingException;",
"public void sethourNeed(Integer h){hourNeed=h;}",
"@JsonGetter(\"time\")\r\n public String getTime() {\r\n return time;\r\n }",
"@Test(timeout = 4000)\n public void test079() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject((Object) \"gettoUpperCase\");\n jSONObject1.names();\n Integer integer0 = new Integer(92);\n JSONObject jSONObject2 = jSONObject0.append(\"gettoUpperCase\", integer0);\n jSONObject2.names();\n jSONObject0.optJSONArray(\"gettoUpperCase\");\n JSONObject.numberToString(integer0);\n Boolean boolean0 = new Boolean(true);\n JSONObject.testValidity(boolean0);\n }",
"@WebMethod(operationName = \"increase-infections-24h\")\n String getIncInfections24h() throws JsonProcessingException;",
"private int getHour() {\n\t\tString time = getPersistedString(this.defaultValue);\n\t\tif (time == null || !time.matches(VALIDATION_EXPRESSION)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn Integer.valueOf(time.split(\":|/\")[0]);\n\t}",
"public int getStartHour() {\n return startHour; // stub\n }",
"@Test(timeout = 4000)\n public void test26() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n Integer.remainderUnsigned((-821), (-821));\n StringWriter stringWriter0 = new StringWriter(1782);\n jSONObject0.write(stringWriter0);\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"Ih?`q\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of Ih?`q\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test16() throws Throwable {\n HashMap<Float, Object> hashMap0 = new HashMap<Float, Object>();\n Float float0 = new Float(0.0F);\n Float.max(0.0F, 0.0F);\n hashMap0.put(float0, float0);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n hashMap0.remove((Object) jSONObject0);\n Long long0 = new Long((-1L));\n JSONObject.valueToString(long0);\n hashMap0.getOrDefault(jSONObject0, jSONObject0);\n JSONObject.valueToString(hashMap0, 8, 13);\n JSONObject.doubleToString(0.0);\n jSONObject0.keys();\n jSONObject0.toString(13);\n try { \n jSONObject0.getJSONArray(\";&7Li\\\"+g4z OK%1i76o\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\";&7Li\\\\\\\"+g4z OK%1i76o\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"private int intvalue(JsonNode n, String name) {\n\t\treturn n.findValue(name).getIntValue();\n\t}",
"@Test(timeout = 4000)\n public void test057() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.optJSONObject(\"v.W.y`~H9LS\");\n assertNull(jSONObject1);\n }",
"public Builder setFinishHour(int value) {\n \n finishHour_ = value;\n onChanged();\n return this;\n }",
"@Test(timeout = 4000)\n public void test073() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n int int0 = (-29);\n int int1 = 22;\n HashMap<String, String> hashMap0 = new HashMap<String, String>();\n JSONObject jSONObject1 = new JSONObject((Map) hashMap0);\n JSONObject.valueToString(hashMap0, (-29), 22);\n LinkedList<Float> linkedList0 = new LinkedList<Float>();\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n jSONArray0.optInt((-65));\n try { \n Integer.valueOf(\"{}\");\n fail(\"Expecting exception: NumberFormatException\");\n \n } catch(NumberFormatException e) {\n //\n // For input string: \\\"{}\\\"\n //\n verifyException(\"java.lang.NumberFormatException\", e);\n }\n }",
"void mo28373a(JSONObject jSONObject);",
"@Override\r\n\tpublic void parseJson(JSONObject json) {\n\t\tif(json == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\ttype = getInt(json,d_type);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public Integer getHour() {\n return hour;\n }",
"Integer getStartHour();",
"@Test(timeout = 4000)\n public void test028() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n jSONArray0.put(0, 2094L);\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject0.optInt(\"$\");\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getHour()\n {\n return hour;\n }",
"@Test(timeout = 4000)\n public void test021() throws Throwable {\n HashMap<String, Double> hashMap0 = new HashMap<String, Double>();\n JSONObject.getNames((Object) null);\n JSONArray jSONArray0 = new JSONArray();\n JSONObject jSONObject0 = jSONArray0.optJSONObject((byte)106);\n assertNull(jSONObject0);\n }",
"@Test(timeout = 4000)\n public void test07() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n int int0 = 12;\n StringWriter stringWriter0 = new StringWriter(12);\n Float float0 = new Float((float) 12);\n JSONObject.numberToString(float0);\n String string0 = \"\";\n try { \n jSONObject0.getInt(\"\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test035() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\".\", 65);\n jSONObject1.optInt(\".\", 65);\n Double double0 = new Double((-1.0));\n JSONObject.testValidity(double0);\n }",
"public int getJobStatus(int jNo);",
"JsonObject getIndex(final String index);",
"public void setHour(int nHour) { m_nTimeHour = nHour; }",
"@Test(timeout = 4000)\n public void test081() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n jSONArray0.optBoolean(46);\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n Integer integer0 = new Integer((-884));\n jSONObject1.append(\"su\", integer0);\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@JsonProperty(\"endTime\")\n public String getEndTime() {\n return endTime;\n }",
"void mo16412a(String str, JSONObject jSONObject);",
"public void m16919a(long j) {\n this.f14943b.putLong(\"service_time\", Long.valueOf(j));\n }",
"@Test(timeout = 4000)\n public void test095() throws Throwable {\n Byte byte0 = new Byte((byte)122);\n Byte.toUnsignedLong((byte)122);\n Byte.toUnsignedInt((byte)122);\n Byte.toUnsignedInt((byte)122);\n Byte.toUnsignedInt((byte)122);\n HashMap<String, String> hashMap0 = new HashMap<String, String>();\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n Short short0 = new Short((short) (-1979));\n jSONObject0.put(\"\", (int) (short) (-1979));\n jSONObject0.optDouble(\"\", (double) 122);\n JSONObject.testValidity(hashMap0);\n assertEquals(0, hashMap0.size());\n }",
"public static Integer m5897a(JSONObject jSONObject, String str, Integer num) {\n try {\n jSONObject = (!jSONObject.has(str) || jSONObject.isNull(str)) ? null : Integer.valueOf(jSONObject.getInt(str));\n return jSONObject;\n } catch (JSONObject jSONObject2) {\n jSONObject2.printStackTrace();\n return num;\n }\n }",
"@Test(timeout = 4000)\n public void test23() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"] is not a JSONArray.\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.optDouble(\"] is not a JSONArray.\", (-2064.666));\n jSONObject0.optBoolean(\"] is not a JSONArray.\");\n jSONObject0.put(\"wheel.json.JSONException\", (int) (byte)44);\n String string0 = null;\n JSONTokener jSONTokener0 = new JSONTokener(\"istoUnsignedLong\");\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of istoUnsignedLong\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"public static Integer m5904c(JSONObject jSONObject, String str) {\n return C1546i.m5897a(jSONObject, str, null);\n }",
"@Test(timeout = 4000)\n public void test086() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n StringWriter stringWriter0 = new StringWriter();\n jSONObject1.write(stringWriter0);\n jSONObject1.optDouble(\"8k\\\"]Uu:+Wz~|:~8#4\");\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getValue(String name) {\n String path = ITEMS_PATH + name + \".json\";\n HashMap<String, Integer> item = null;\n Gson gson = new Gson();\n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(path));\n Type type = new TypeToken<HashMap<String, Integer>>() {\n }.getType();\n item = gson.fromJson(bufferedReader, type);\n } catch (FileNotFoundException fnfe) {\n System.out.println(fnfe);\n }\n return item.get(\"value\");\n }",
"int getSchedulingValue();",
"public static int JsonToInteger(JsonObject jso, String param, int defaulx) {\n try {\n JsonElement res = securGetJSON(jso, param);\n if (res != null) {\n return res.getAsInt();\n } else {\n return defaulx;\n }\n } catch (Exception e) {\n return defaulx;\n }\n }",
"@Test(timeout = 4000)\n public void test14() throws Throwable {\n JSONObject jSONObject0 = new JSONObject((Object) \"Unclosed comment\");\n JSONObject.quote(\"Unclosed comment\");\n jSONObject0.optInt(\"%|bmZP$ms4*`Z\");\n JSONObject jSONObject1 = jSONObject0.put(\"Unclosed comment\", (Object) \"%|bmZP$ms4*`Z\");\n String string0 = \"'z2mb\";\n Long long0 = new Long((-487L));\n jSONObject0.append(\"'z2mb\", long0);\n String string1 = null;\n try { \n jSONObject1.getDouble((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getArrivalTime(){return arrivalTime;}",
"public void mo15090a(JSONObject jSONObject) {\n }",
"@Test(timeout = 4000)\n public void test09() throws Throwable {\n String[] stringArray0 = new String[0];\n JSONObject jSONObject0 = new JSONObject((JSONObject) null, stringArray0);\n String string0 = \"] is not a JSONObject.\";\n jSONObject0.optInt(\"] is not a JSONObject.\");\n Integer integer0 = new Integer(0);\n JSONObject.valueToString(integer0);\n JSONObject jSONObject1 = jSONObject0.put(\"] is not a JSONObject.\", (Map) null);\n jSONObject0.optLong(\"wheel.json.JSONException\", (long) 0);\n jSONObject1.keys();\n jSONObject0.toString();\n int int0 = 0;\n // Undeclared exception!\n try { \n Integer.remainderUnsigned(0, 0);\n fail(\"Expecting exception: ArithmeticException\");\n \n } catch(ArithmeticException e) {\n //\n // / by zero\n //\n verifyException(\"java.lang.Integer\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test18() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n JSONObject jSONObject1 = jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n int int0 = new Byte((byte)97);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n jSONObject0.put(\"*bpp)j7=\", (Collection) linkedList0);\n jSONObject1.accumulate(\"] is not a JSONArray.\", linkedList0);\n try { \n jSONObject0.getJSONObject(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"void mo59932a(String str, JSONObject jSONObject);",
"@Override\r\n\tpublic JSONObject buildJson() {\n\t\tJSONObject json = new JSONObject();\r\n\t\ttry {\r\n\t\t\tsetInt(json,d_type,type);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogUtil.log.error(e.getMessage(),e);\r\n\t\t}\r\n\t\treturn json;\r\n\t}",
"public int[] getHours() {\n return hours;\n }",
"public static C10139g m30093a(JSONObject jSONObject) {\n try {\n C10139g gVar = new C10139g();\n gVar.f27640c = jSONObject.getString(\"ip\");\n gVar.f27638a = jSONObject.getInt(\"sendhops\");\n gVar.f27639b = jSONObject.getInt(\"replyhops\");\n gVar.f27641d = jSONObject.getInt(\"cost\");\n return gVar;\n } catch (Throwable unused) {\n return null;\n }\n }",
"@Test(timeout = 4000)\n public void test06() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n assertEquals(1, jSONObject0.length());\n \n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n JSONObject.quote(\"wheel.json.JSONObject$1\");\n String string0 = JSONObject.doubleToString(216);\n assertEquals(\"216\", string0);\n }",
"public int getHour() {\n/* 60 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\r\n\tpublic int getHH() {\n\t\treturn HH;\r\n\t}",
"JSONObject mo28758a(View view);",
"@JsonSetter(\"exp_month\")\r\n public void setExpMonth (int value) { \r\n this.expMonth = value;\r\n }",
"public int getHours(){\n return (int) totalSeconds/3600;\n }",
"public double getFinishTime(){return finishTime;}",
"@Test(timeout = 4000)\n public void test11() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n byte byte1 = (byte)97;\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n Short short0 = new Short((byte)39);\n jSONObject0.putOpt(\"\\\"$c.1O[-X9i\", short0);\n JSONTokener jSONTokener0 = new JSONTokener(\"'m P|=\");\n JSONArray jSONArray0 = null;\n try {\n jSONArray0 = new JSONArray(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONArray text must start with '[' at character 1 of 'm P|=\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"int value(String name);",
"public Integer getHour() {\n\t\treturn hour;\n\t}",
"public double getHours(){\n return hours;\n }",
"public interface JsonProperties {\n\n String ACCESS_LEVEL = \"accessLevel\";\n String ADDRESS = \"address\";\n String ASSET_ID = \"assetId\";\n String CONTENT = \"content\";\n String CREATED_BY = \"createdBy\";\n String DATA = \"data\";\n String DATA_HASH = \"dataHash\";\n String EVENT_ID = \"eventId\";\n String ID_DATA = \"idData\";\n String META_DATA = \"metadata\";\n String PERMISSIONS = \"permissions\";\n String REGISTERED_BY = \"registeredBy\";\n String REGISTERED_ON = \"registeredOn\";\n String SEQUENCE_NUMBER = \"sequenceNumber\";\n String SIGNATURE = \"signature\";\n String TIMESTAMP = \"timestamp\";\n}",
"public String getHours();",
"@Test\n public void testPopulation() throws JSONException {\n int[] population = {775620,1295210000,14240168};\n for (i=0;i<respArray.length();i++){\n Assert.assertEquals(Integer.parseInt(respArray.getJSONObject(i).getString(\"population\")),population[i], \"Population does not match\");\n }\n }",
"@Test(timeout = 4000)\n public void test061() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n jSONObject0.optLong(\"su\");\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test016() throws Throwable {\n String string0 = JSONObject.quote(\"=\\\" p^/$6Yz29)9\");\n assertEquals(\"\\\"=\\\\\\\" p^/$6Yz29)9\\\"\", string0);\n \n Short short0 = new Short((short)11);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"=\\\" p^/$6Yz29)9\";\n stringArray0[1] = \"\\\"=\\\" p^/$6Yz29)9\\\"\";\n stringArray0[2] = \"\\\"=\\\" p^/$6Yz29)9\\\"\";\n JSONObject jSONObject0 = new JSONObject(short0, stringArray0);\n String string1 = jSONObject0.toString(4791, 104);\n assertEquals(\"{}\", string1);\n }",
"@Override\npublic JsonArray queryStatistics(String date, Employee em) throws Exception {\n\tint [] montharr= {31,28,31,30,31,30,31,31,30,31,30,31};\n\tSystem.out.println(date);\n\tint year;\n\tint month;\n\tif(date.length()==0){\n\t\tmonth = new Date().getMonth()+1;\n\t\tyear= new Date().getYear()+1900;\n\t}else{\n\t\tString[] s=date.split(\"-\");\n\t\tyear=Integer.parseInt(s[0]);\n\t\tmonth=Integer.parseInt(s[1]);\n\t}\n\t\n\t\n\tList<Map<String,Object>> lstMap = new LinkedList<Map<String,Object>>();\n\tfor (int i = 1; i <=montharr[month-1] ; i++) {\n\t\tStringBuffer buffer =new StringBuffer(\"select SUM(c.golds) from consumption c,machineinfo m where c.fmachineid=m.id and m.state!=-1 and c.type=-1 and m.empid=\")\n\t\t\t\t.append(em.getId()).append(\" and year(c.createtime) =\").append(year)\n\t\t\t\t.append(\" and month(c.createtime) =\").append(month).append(\" and day(c.createtime) =\").append(i);;\n\t\t\t\tSystem.out.println(buffer);\n\t\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\t\tList<Object> lst = databaseHelper.getResultListBySql(buffer.toString());\n\t\t\t\t\n\t\t\t\tmap.put(\"nums\", lst==null?\"0\":lst.size()==0?\"0\":lst.get(0)==null?\"0\":lst.get(0).toString());\n\t\t\t\tmap.put(\"time\", i+\"日\");\n\t\t\t\tmap.put(\"month\", month);\n\t\t\t\tlstMap.add(map);\n\t}\n\tString result = new Gson().toJson(lstMap);\n\tJsonArray jarr = (JsonArray) new JsonParser().parse(result);\n\treturn jarr;\n}",
"public Integer getMaxHour() {\r\n return maxHour;\r\n }",
"public int getHora(){\n return minutosStamina;\n }",
"public int getInt(String name)\n/* */ {\n/* 908 */ return getInt(name, 0);\n/* */ }",
"@Override\n public void onSucceed(String json) {\n GetGoldTimeResponse response = new Gson().fromJson(json, GetGoldTimeResponse.class);\n UserSpCache.getInstance(mContext).putInt(UserSpCache.GOLD_NUMBERS,response.getData().getCount());//保存获取金币次数\n\n UserSpCache.getInstance(mContext).putInt(UserSpCache.GOLD_TIME ,response.getData().getGold_time());\n if (response.getData().getTime_difference() != 0) {\n mAddColdView.showGoldTime(response.getData().getTime_difference());\n }\n }",
"void mo708a(long j) throws RemoteException;",
"@Test(timeout = 4000)\n public void test13() throws Throwable {\n JSONObject jSONObject0 = new JSONObject((Object) \"Unclosed comment\");\n JSONObject.quote(\"Unclosed comment\");\n jSONObject0.optInt(\"%|bmZP$ms4*`Z\");\n jSONObject0.toString();\n // Undeclared exception!\n jSONObject0.toString(1530, (-2117));\n }",
"void mo26099a(String str, JSONObject jSONObject);",
"@Test(timeout = 4000)\n public void test027() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String string0 = \"MnMG\";\n JSONObject jSONObject1 = jSONObject0.put(\"MnMG\", (Object) \"MnMG\");\n jSONObject0.optInt(\"MnMG\", (-646));\n try { \n jSONObject1.getBoolean(\"MnMG\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"MnMG\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public interface DatetimeRange {\n\n @JsonProperty(\"dtr:start_datetime\")\n String getStartDatetime();\n void setStartDatetime(String startDatetime);\n\n @JsonProperty(\"dtr:end_datetime\")\n String getEndDatetime();\n void setEndDatetime(String endDatetime);\n\n}",
"public int getEndMilitaryHour() {\n return this.endMilitaryHour;\n }",
"public static int m24504p(JSONObject jSONObject) {\n if (jSONObject != null) {\n JSONObject optJSONObject = jSONObject.optJSONObject(\"extend\");\n if (optJSONObject != null) {\n return optJSONObject.optInt(\"materialMax\");\n }\n }\n return 0;\n }",
"public JSONObject mo56289a_() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"api_endpoint\", mo56263a());\n } catch (JSONException unused) {\n }\n f2302w.mo56245a(jSONObject, \"timestamp\", mo56265c());\n f2303x.mo56245a(jSONObject, \"cart\", mo56278d());\n return jSONObject;\n }",
"@Test\n\tpublic void verifyflightNumber() {\n\t\tJsonPath path = new JsonPath(response.getBody().asString());\n\t\tAssert.assertEquals(path.getString(\"flight_number\"), \"102\");\n\t}",
"@Test(timeout = 4000)\n public void test085() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.accumulate(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"int getFromValue();",
"public int getJobCost(int jNo);",
"@Test(timeout = 4000)\n public void test012() throws Throwable {\n JSONObject.quote(\"=\\\" p^/$6Yz29)9\");\n JSONObject jSONObject0 = new JSONObject();\n jSONObject0.append(\"\\\"=\\\" p^/$6Yz29)9\\\"\", \"=\\\" p^/$6Yz29)9\");\n jSONObject0.toString(3125, 3125);\n assertEquals(1, jSONObject0.length());\n }",
"public final void mo9383a(int i, String str, JSONObject jSONObject) {\n }"
] |
[
"0.60758096",
"0.5842577",
"0.54594177",
"0.5401923",
"0.5357936",
"0.5325503",
"0.5299934",
"0.52867436",
"0.5281967",
"0.5273177",
"0.522407",
"0.5220313",
"0.51785034",
"0.5175855",
"0.5171843",
"0.51597744",
"0.5144109",
"0.51402444",
"0.51280516",
"0.50861424",
"0.50809485",
"0.50649387",
"0.50517255",
"0.50474155",
"0.50438756",
"0.50411665",
"0.50087667",
"0.4993228",
"0.49827453",
"0.4974749",
"0.49703324",
"0.49661636",
"0.4966086",
"0.49552196",
"0.4947223",
"0.4946484",
"0.49452037",
"0.4943969",
"0.49348924",
"0.4923226",
"0.49168655",
"0.49066335",
"0.48727357",
"0.4860966",
"0.48558757",
"0.48448417",
"0.4841438",
"0.483876",
"0.4838021",
"0.48326594",
"0.4816846",
"0.48132068",
"0.4801267",
"0.47954896",
"0.47920772",
"0.4786236",
"0.47811797",
"0.4779482",
"0.47659335",
"0.4765435",
"0.47551858",
"0.47550938",
"0.47466552",
"0.47414562",
"0.4738007",
"0.473663",
"0.47326827",
"0.47325557",
"0.47118974",
"0.47111666",
"0.47099885",
"0.4702063",
"0.4697623",
"0.4695972",
"0.4683397",
"0.4679043",
"0.46761924",
"0.4668918",
"0.4666372",
"0.46597755",
"0.46567792",
"0.4654674",
"0.4638815",
"0.46363014",
"0.4633511",
"0.4631586",
"0.4631316",
"0.4631203",
"0.4629551",
"0.4624083",
"0.4622934",
"0.46221855",
"0.46175542",
"0.46136916",
"0.46127164",
"0.46100494",
"0.4606876",
"0.46060595",
"0.4601551",
"0.46014217"
] |
0.5083618
|
20
|
int32 finish_hour = 2 [json_name = "finishHour"];
|
public Builder setFinishHour(int value) {
finishHour_ = value;
onChanged();
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void mo350a(C0636l c0636l, JsonValue jsonValue);",
"static final /* synthetic */ Object m109665a(long j) throws Exception {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"duration\", j);\n } catch (JSONException unused) {\n }\n C6759a.m20910a(\"api_stuck\", jSONObject);\n return null;\n }",
"public int getFinishHour() {\n return finishHour;\n }",
"T mo512a(C0636l c0636l, JsonValue jsonValue);",
"public int getHour(){\n return hour;\n }",
"public int getHour() \n { \n return hour; \n }",
"BigInteger getResponse_time();",
"Integer getEndHour();",
"@java.lang.Override\n public int getFinishHour() {\n return finishHour_;\n }",
"Integer getHour();",
"@JsonSetter(\"time\")\r\n public void setTime(String time) {\r\n this.time = time;\r\n }",
"@Test(timeout = 4000)\n public void test076() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n Integer integer0 = new Integer(55);\n JSONObject jSONObject1 = jSONObject0.append(\"Substring bounds error\", integer0);\n jSONObject1.getJSONArray(\"Substring bounds error\");\n jSONObject1.append(\"Bad value from toJSONString: \", integer0);\n String string0 = jSONObject1.optString(\"Substring bounds error\", \"num\");\n assertNotNull(string0);\n }",
"private int returnParsedJsonObject(String result){\n\n JSONObject resultObject = null;\n int returnedResult = 0;\n try {\n resultObject = new JSONObject(result);\n returnedResult = resultObject.getInt(\"success\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n Log.d(\"PRUEBA\",\"se obtubo en el JSON: \"+returnedResult);\n return returnedResult;\n }",
"@Test(timeout = 4000)\n public void test22() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n String string0 = \"53N/{T[\";\n JSONObject jSONObject1 = jSONObject0.put(\"53N/{T[\", (-1913.632));\n jSONObject1.toString((-821));\n jSONObject0.optString(\"53N/{T[\", \"53N/{T[\");\n jSONObject0.opt(\",2fHJL;.]tm*PJ9\");\n jSONObject0.optLong((String) null);\n jSONObject0.toString((-821));\n Byte byte0 = new Byte((byte)1);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONObject jSONObject2 = jSONObject1.put(\"|f}%!.^JO \", (Collection) linkedList0);\n JSONObject jSONObject3 = jSONObject2.accumulate(\"o%,g eOJ=9n\\\"\", \"java.lang.Double@0000000003\");\n try { \n jSONObject3.getJSONObject(\"{\\n\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003,\\n\\\"java.lang.String@0000000004\\\": \\\"java.lang.Class@0000000005\\\"\\n}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\n\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003,\\\\n\\\\\\\"java.lang.String@0000000004\\\\\\\": \\\\\\\"java.lang.Class@0000000005\\\\\\\"\\\\n}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getHour() { return this.hour; }",
"public static Integer getLastJsonResponseCode(){\n return jsonResponseCode;\n }",
"@JsonProperty(\"time\")\n public String getTime() {\n return time;\n }",
"private JsonValue m2254c(int i) {\n JsonValue jsonValue = this.f2957f;\n while (jsonValue != null && i > 0) {\n i--;\n jsonValue = jsonValue.f2958g;\n }\n return jsonValue;\n }",
"@Test(timeout = 4000)\n public void test19() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n double double0 = jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n assertEquals((-821.0), double0, 0.01);\n \n boolean boolean0 = jSONObject0.optBoolean(\"/W_,B?i~I:-MW8${,z\");\n assertFalse(boolean0);\n assertEquals(1, jSONObject0.length());\n }",
"@WebMethod(operationName = \"new-infections-last-24h\")\n String getNewInfectionsLast24h() throws JsonProcessingException;",
"@java.lang.Override\n public int getFinishHour() {\n return finishHour_;\n }",
"public void sethourNeed(Integer h){hourNeed=h;}",
"@JsonGetter(\"time\")\r\n public String getTime() {\r\n return time;\r\n }",
"@Test(timeout = 4000)\n public void test079() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject((Object) \"gettoUpperCase\");\n jSONObject1.names();\n Integer integer0 = new Integer(92);\n JSONObject jSONObject2 = jSONObject0.append(\"gettoUpperCase\", integer0);\n jSONObject2.names();\n jSONObject0.optJSONArray(\"gettoUpperCase\");\n JSONObject.numberToString(integer0);\n Boolean boolean0 = new Boolean(true);\n JSONObject.testValidity(boolean0);\n }",
"@WebMethod(operationName = \"increase-infections-24h\")\n String getIncInfections24h() throws JsonProcessingException;",
"private int getHour() {\n\t\tString time = getPersistedString(this.defaultValue);\n\t\tif (time == null || !time.matches(VALIDATION_EXPRESSION)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn Integer.valueOf(time.split(\":|/\")[0]);\n\t}",
"public int getStartHour() {\n return startHour; // stub\n }",
"@Test(timeout = 4000)\n public void test26() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n Integer.remainderUnsigned((-821), (-821));\n StringWriter stringWriter0 = new StringWriter(1782);\n jSONObject0.write(stringWriter0);\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"Ih?`q\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of Ih?`q\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test16() throws Throwable {\n HashMap<Float, Object> hashMap0 = new HashMap<Float, Object>();\n Float float0 = new Float(0.0F);\n Float.max(0.0F, 0.0F);\n hashMap0.put(float0, float0);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n hashMap0.remove((Object) jSONObject0);\n Long long0 = new Long((-1L));\n JSONObject.valueToString(long0);\n hashMap0.getOrDefault(jSONObject0, jSONObject0);\n JSONObject.valueToString(hashMap0, 8, 13);\n JSONObject.doubleToString(0.0);\n jSONObject0.keys();\n jSONObject0.toString(13);\n try { \n jSONObject0.getJSONArray(\";&7Li\\\"+g4z OK%1i76o\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\";&7Li\\\\\\\"+g4z OK%1i76o\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"private int intvalue(JsonNode n, String name) {\n\t\treturn n.findValue(name).getIntValue();\n\t}",
"@Test(timeout = 4000)\n public void test057() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.optJSONObject(\"v.W.y`~H9LS\");\n assertNull(jSONObject1);\n }",
"@Test(timeout = 4000)\n public void test073() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n int int0 = (-29);\n int int1 = 22;\n HashMap<String, String> hashMap0 = new HashMap<String, String>();\n JSONObject jSONObject1 = new JSONObject((Map) hashMap0);\n JSONObject.valueToString(hashMap0, (-29), 22);\n LinkedList<Float> linkedList0 = new LinkedList<Float>();\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n jSONArray0.optInt((-65));\n try { \n Integer.valueOf(\"{}\");\n fail(\"Expecting exception: NumberFormatException\");\n \n } catch(NumberFormatException e) {\n //\n // For input string: \\\"{}\\\"\n //\n verifyException(\"java.lang.NumberFormatException\", e);\n }\n }",
"void mo28373a(JSONObject jSONObject);",
"@Override\r\n\tpublic void parseJson(JSONObject json) {\n\t\tif(json == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\ttype = getInt(json,d_type);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public Integer getHour() {\n return hour;\n }",
"Integer getStartHour();",
"@Test(timeout = 4000)\n public void test028() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n jSONArray0.put(0, 2094L);\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject0.optInt(\"$\");\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getHour()\n {\n return hour;\n }",
"@Test(timeout = 4000)\n public void test021() throws Throwable {\n HashMap<String, Double> hashMap0 = new HashMap<String, Double>();\n JSONObject.getNames((Object) null);\n JSONArray jSONArray0 = new JSONArray();\n JSONObject jSONObject0 = jSONArray0.optJSONObject((byte)106);\n assertNull(jSONObject0);\n }",
"@Test(timeout = 4000)\n public void test07() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n int int0 = 12;\n StringWriter stringWriter0 = new StringWriter(12);\n Float float0 = new Float((float) 12);\n JSONObject.numberToString(float0);\n String string0 = \"\";\n try { \n jSONObject0.getInt(\"\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test035() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\".\", 65);\n jSONObject1.optInt(\".\", 65);\n Double double0 = new Double((-1.0));\n JSONObject.testValidity(double0);\n }",
"public int getJobStatus(int jNo);",
"JsonObject getIndex(final String index);",
"public void setHour(int nHour) { m_nTimeHour = nHour; }",
"@Test(timeout = 4000)\n public void test081() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n jSONArray0.optBoolean(46);\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n Integer integer0 = new Integer((-884));\n jSONObject1.append(\"su\", integer0);\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@JsonProperty(\"endTime\")\n public String getEndTime() {\n return endTime;\n }",
"void mo16412a(String str, JSONObject jSONObject);",
"public void m16919a(long j) {\n this.f14943b.putLong(\"service_time\", Long.valueOf(j));\n }",
"@Test(timeout = 4000)\n public void test095() throws Throwable {\n Byte byte0 = new Byte((byte)122);\n Byte.toUnsignedLong((byte)122);\n Byte.toUnsignedInt((byte)122);\n Byte.toUnsignedInt((byte)122);\n Byte.toUnsignedInt((byte)122);\n HashMap<String, String> hashMap0 = new HashMap<String, String>();\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n Short short0 = new Short((short) (-1979));\n jSONObject0.put(\"\", (int) (short) (-1979));\n jSONObject0.optDouble(\"\", (double) 122);\n JSONObject.testValidity(hashMap0);\n assertEquals(0, hashMap0.size());\n }",
"public static Integer m5897a(JSONObject jSONObject, String str, Integer num) {\n try {\n jSONObject = (!jSONObject.has(str) || jSONObject.isNull(str)) ? null : Integer.valueOf(jSONObject.getInt(str));\n return jSONObject;\n } catch (JSONObject jSONObject2) {\n jSONObject2.printStackTrace();\n return num;\n }\n }",
"@Test(timeout = 4000)\n public void test23() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"] is not a JSONArray.\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.optDouble(\"] is not a JSONArray.\", (-2064.666));\n jSONObject0.optBoolean(\"] is not a JSONArray.\");\n jSONObject0.put(\"wheel.json.JSONException\", (int) (byte)44);\n String string0 = null;\n JSONTokener jSONTokener0 = new JSONTokener(\"istoUnsignedLong\");\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of istoUnsignedLong\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"public static Integer m5904c(JSONObject jSONObject, String str) {\n return C1546i.m5897a(jSONObject, str, null);\n }",
"@Test(timeout = 4000)\n public void test086() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n StringWriter stringWriter0 = new StringWriter();\n jSONObject1.write(stringWriter0);\n jSONObject1.optDouble(\"8k\\\"]Uu:+Wz~|:~8#4\");\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getValue(String name) {\n String path = ITEMS_PATH + name + \".json\";\n HashMap<String, Integer> item = null;\n Gson gson = new Gson();\n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(path));\n Type type = new TypeToken<HashMap<String, Integer>>() {\n }.getType();\n item = gson.fromJson(bufferedReader, type);\n } catch (FileNotFoundException fnfe) {\n System.out.println(fnfe);\n }\n return item.get(\"value\");\n }",
"int getSchedulingValue();",
"public static int JsonToInteger(JsonObject jso, String param, int defaulx) {\n try {\n JsonElement res = securGetJSON(jso, param);\n if (res != null) {\n return res.getAsInt();\n } else {\n return defaulx;\n }\n } catch (Exception e) {\n return defaulx;\n }\n }",
"@Test(timeout = 4000)\n public void test14() throws Throwable {\n JSONObject jSONObject0 = new JSONObject((Object) \"Unclosed comment\");\n JSONObject.quote(\"Unclosed comment\");\n jSONObject0.optInt(\"%|bmZP$ms4*`Z\");\n JSONObject jSONObject1 = jSONObject0.put(\"Unclosed comment\", (Object) \"%|bmZP$ms4*`Z\");\n String string0 = \"'z2mb\";\n Long long0 = new Long((-487L));\n jSONObject0.append(\"'z2mb\", long0);\n String string1 = null;\n try { \n jSONObject1.getDouble((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getArrivalTime(){return arrivalTime;}",
"public void mo15090a(JSONObject jSONObject) {\n }",
"@Test(timeout = 4000)\n public void test09() throws Throwable {\n String[] stringArray0 = new String[0];\n JSONObject jSONObject0 = new JSONObject((JSONObject) null, stringArray0);\n String string0 = \"] is not a JSONObject.\";\n jSONObject0.optInt(\"] is not a JSONObject.\");\n Integer integer0 = new Integer(0);\n JSONObject.valueToString(integer0);\n JSONObject jSONObject1 = jSONObject0.put(\"] is not a JSONObject.\", (Map) null);\n jSONObject0.optLong(\"wheel.json.JSONException\", (long) 0);\n jSONObject1.keys();\n jSONObject0.toString();\n int int0 = 0;\n // Undeclared exception!\n try { \n Integer.remainderUnsigned(0, 0);\n fail(\"Expecting exception: ArithmeticException\");\n \n } catch(ArithmeticException e) {\n //\n // / by zero\n //\n verifyException(\"java.lang.Integer\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test18() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n JSONObject jSONObject1 = jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n int int0 = new Byte((byte)97);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n jSONObject0.put(\"*bpp)j7=\", (Collection) linkedList0);\n jSONObject1.accumulate(\"] is not a JSONArray.\", linkedList0);\n try { \n jSONObject0.getJSONObject(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"void mo59932a(String str, JSONObject jSONObject);",
"@Override\r\n\tpublic JSONObject buildJson() {\n\t\tJSONObject json = new JSONObject();\r\n\t\ttry {\r\n\t\t\tsetInt(json,d_type,type);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogUtil.log.error(e.getMessage(),e);\r\n\t\t}\r\n\t\treturn json;\r\n\t}",
"public int[] getHours() {\n return hours;\n }",
"public static C10139g m30093a(JSONObject jSONObject) {\n try {\n C10139g gVar = new C10139g();\n gVar.f27640c = jSONObject.getString(\"ip\");\n gVar.f27638a = jSONObject.getInt(\"sendhops\");\n gVar.f27639b = jSONObject.getInt(\"replyhops\");\n gVar.f27641d = jSONObject.getInt(\"cost\");\n return gVar;\n } catch (Throwable unused) {\n return null;\n }\n }",
"@Test(timeout = 4000)\n public void test06() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n assertEquals(1, jSONObject0.length());\n \n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n JSONObject.quote(\"wheel.json.JSONObject$1\");\n String string0 = JSONObject.doubleToString(216);\n assertEquals(\"216\", string0);\n }",
"public int getHour() {\n/* 60 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\r\n\tpublic int getHH() {\n\t\treturn HH;\r\n\t}",
"JSONObject mo28758a(View view);",
"@JsonSetter(\"exp_month\")\r\n public void setExpMonth (int value) { \r\n this.expMonth = value;\r\n }",
"public int getHours(){\n return (int) totalSeconds/3600;\n }",
"public double getFinishTime(){return finishTime;}",
"@Test(timeout = 4000)\n public void test11() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n byte byte1 = (byte)97;\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n Short short0 = new Short((byte)39);\n jSONObject0.putOpt(\"\\\"$c.1O[-X9i\", short0);\n JSONTokener jSONTokener0 = new JSONTokener(\"'m P|=\");\n JSONArray jSONArray0 = null;\n try {\n jSONArray0 = new JSONArray(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONArray text must start with '[' at character 1 of 'm P|=\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"int value(String name);",
"public Integer getHour() {\n\t\treturn hour;\n\t}",
"public double getHours(){\n return hours;\n }",
"public interface JsonProperties {\n\n String ACCESS_LEVEL = \"accessLevel\";\n String ADDRESS = \"address\";\n String ASSET_ID = \"assetId\";\n String CONTENT = \"content\";\n String CREATED_BY = \"createdBy\";\n String DATA = \"data\";\n String DATA_HASH = \"dataHash\";\n String EVENT_ID = \"eventId\";\n String ID_DATA = \"idData\";\n String META_DATA = \"metadata\";\n String PERMISSIONS = \"permissions\";\n String REGISTERED_BY = \"registeredBy\";\n String REGISTERED_ON = \"registeredOn\";\n String SEQUENCE_NUMBER = \"sequenceNumber\";\n String SIGNATURE = \"signature\";\n String TIMESTAMP = \"timestamp\";\n}",
"public String getHours();",
"@Test\n public void testPopulation() throws JSONException {\n int[] population = {775620,1295210000,14240168};\n for (i=0;i<respArray.length();i++){\n Assert.assertEquals(Integer.parseInt(respArray.getJSONObject(i).getString(\"population\")),population[i], \"Population does not match\");\n }\n }",
"@Test(timeout = 4000)\n public void test061() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n jSONObject0.optLong(\"su\");\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test016() throws Throwable {\n String string0 = JSONObject.quote(\"=\\\" p^/$6Yz29)9\");\n assertEquals(\"\\\"=\\\\\\\" p^/$6Yz29)9\\\"\", string0);\n \n Short short0 = new Short((short)11);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"=\\\" p^/$6Yz29)9\";\n stringArray0[1] = \"\\\"=\\\" p^/$6Yz29)9\\\"\";\n stringArray0[2] = \"\\\"=\\\" p^/$6Yz29)9\\\"\";\n JSONObject jSONObject0 = new JSONObject(short0, stringArray0);\n String string1 = jSONObject0.toString(4791, 104);\n assertEquals(\"{}\", string1);\n }",
"@Override\npublic JsonArray queryStatistics(String date, Employee em) throws Exception {\n\tint [] montharr= {31,28,31,30,31,30,31,31,30,31,30,31};\n\tSystem.out.println(date);\n\tint year;\n\tint month;\n\tif(date.length()==0){\n\t\tmonth = new Date().getMonth()+1;\n\t\tyear= new Date().getYear()+1900;\n\t}else{\n\t\tString[] s=date.split(\"-\");\n\t\tyear=Integer.parseInt(s[0]);\n\t\tmonth=Integer.parseInt(s[1]);\n\t}\n\t\n\t\n\tList<Map<String,Object>> lstMap = new LinkedList<Map<String,Object>>();\n\tfor (int i = 1; i <=montharr[month-1] ; i++) {\n\t\tStringBuffer buffer =new StringBuffer(\"select SUM(c.golds) from consumption c,machineinfo m where c.fmachineid=m.id and m.state!=-1 and c.type=-1 and m.empid=\")\n\t\t\t\t.append(em.getId()).append(\" and year(c.createtime) =\").append(year)\n\t\t\t\t.append(\" and month(c.createtime) =\").append(month).append(\" and day(c.createtime) =\").append(i);;\n\t\t\t\tSystem.out.println(buffer);\n\t\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\t\tList<Object> lst = databaseHelper.getResultListBySql(buffer.toString());\n\t\t\t\t\n\t\t\t\tmap.put(\"nums\", lst==null?\"0\":lst.size()==0?\"0\":lst.get(0)==null?\"0\":lst.get(0).toString());\n\t\t\t\tmap.put(\"time\", i+\"日\");\n\t\t\t\tmap.put(\"month\", month);\n\t\t\t\tlstMap.add(map);\n\t}\n\tString result = new Gson().toJson(lstMap);\n\tJsonArray jarr = (JsonArray) new JsonParser().parse(result);\n\treturn jarr;\n}",
"public Integer getMaxHour() {\r\n return maxHour;\r\n }",
"public int getHora(){\n return minutosStamina;\n }",
"public int getInt(String name)\n/* */ {\n/* 908 */ return getInt(name, 0);\n/* */ }",
"@Override\n public void onSucceed(String json) {\n GetGoldTimeResponse response = new Gson().fromJson(json, GetGoldTimeResponse.class);\n UserSpCache.getInstance(mContext).putInt(UserSpCache.GOLD_NUMBERS,response.getData().getCount());//保存获取金币次数\n\n UserSpCache.getInstance(mContext).putInt(UserSpCache.GOLD_TIME ,response.getData().getGold_time());\n if (response.getData().getTime_difference() != 0) {\n mAddColdView.showGoldTime(response.getData().getTime_difference());\n }\n }",
"void mo708a(long j) throws RemoteException;",
"@Test(timeout = 4000)\n public void test13() throws Throwable {\n JSONObject jSONObject0 = new JSONObject((Object) \"Unclosed comment\");\n JSONObject.quote(\"Unclosed comment\");\n jSONObject0.optInt(\"%|bmZP$ms4*`Z\");\n jSONObject0.toString();\n // Undeclared exception!\n jSONObject0.toString(1530, (-2117));\n }",
"void mo26099a(String str, JSONObject jSONObject);",
"@Test(timeout = 4000)\n public void test027() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String string0 = \"MnMG\";\n JSONObject jSONObject1 = jSONObject0.put(\"MnMG\", (Object) \"MnMG\");\n jSONObject0.optInt(\"MnMG\", (-646));\n try { \n jSONObject1.getBoolean(\"MnMG\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"MnMG\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public interface DatetimeRange {\n\n @JsonProperty(\"dtr:start_datetime\")\n String getStartDatetime();\n void setStartDatetime(String startDatetime);\n\n @JsonProperty(\"dtr:end_datetime\")\n String getEndDatetime();\n void setEndDatetime(String endDatetime);\n\n}",
"public int getEndMilitaryHour() {\n return this.endMilitaryHour;\n }",
"public static int m24504p(JSONObject jSONObject) {\n if (jSONObject != null) {\n JSONObject optJSONObject = jSONObject.optJSONObject(\"extend\");\n if (optJSONObject != null) {\n return optJSONObject.optInt(\"materialMax\");\n }\n }\n return 0;\n }",
"public JSONObject mo56289a_() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"api_endpoint\", mo56263a());\n } catch (JSONException unused) {\n }\n f2302w.mo56245a(jSONObject, \"timestamp\", mo56265c());\n f2303x.mo56245a(jSONObject, \"cart\", mo56278d());\n return jSONObject;\n }",
"@Test\n\tpublic void verifyflightNumber() {\n\t\tJsonPath path = new JsonPath(response.getBody().asString());\n\t\tAssert.assertEquals(path.getString(\"flight_number\"), \"102\");\n\t}",
"@Test(timeout = 4000)\n public void test085() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.accumulate(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"int getFromValue();",
"public int getJobCost(int jNo);",
"@Test(timeout = 4000)\n public void test012() throws Throwable {\n JSONObject.quote(\"=\\\" p^/$6Yz29)9\");\n JSONObject jSONObject0 = new JSONObject();\n jSONObject0.append(\"\\\"=\\\" p^/$6Yz29)9\\\"\", \"=\\\" p^/$6Yz29)9\");\n jSONObject0.toString(3125, 3125);\n assertEquals(1, jSONObject0.length());\n }",
"public final void mo9383a(int i, String str, JSONObject jSONObject) {\n }"
] |
[
"0.60758096",
"0.5842577",
"0.54594177",
"0.5401923",
"0.5357936",
"0.5325503",
"0.5299934",
"0.52867436",
"0.5281967",
"0.5273177",
"0.522407",
"0.5220313",
"0.51785034",
"0.5175855",
"0.5171843",
"0.51597744",
"0.5144109",
"0.51402444",
"0.51280516",
"0.50861424",
"0.5083618",
"0.50809485",
"0.50649387",
"0.50517255",
"0.50474155",
"0.50438756",
"0.50411665",
"0.50087667",
"0.4993228",
"0.49827453",
"0.4974749",
"0.49661636",
"0.4966086",
"0.49552196",
"0.4947223",
"0.4946484",
"0.49452037",
"0.4943969",
"0.49348924",
"0.4923226",
"0.49168655",
"0.49066335",
"0.48727357",
"0.4860966",
"0.48558757",
"0.48448417",
"0.4841438",
"0.483876",
"0.4838021",
"0.48326594",
"0.4816846",
"0.48132068",
"0.4801267",
"0.47954896",
"0.47920772",
"0.4786236",
"0.47811797",
"0.4779482",
"0.47659335",
"0.4765435",
"0.47551858",
"0.47550938",
"0.47466552",
"0.47414562",
"0.4738007",
"0.473663",
"0.47326827",
"0.47325557",
"0.47118974",
"0.47111666",
"0.47099885",
"0.4702063",
"0.4697623",
"0.4695972",
"0.4683397",
"0.4679043",
"0.46761924",
"0.4668918",
"0.4666372",
"0.46597755",
"0.46567792",
"0.4654674",
"0.4638815",
"0.46363014",
"0.4633511",
"0.4631586",
"0.4631316",
"0.4631203",
"0.4629551",
"0.4624083",
"0.4622934",
"0.46221855",
"0.46175542",
"0.46136916",
"0.46127164",
"0.46100494",
"0.4606876",
"0.46060595",
"0.4601551",
"0.46014217"
] |
0.49703324
|
31
|
int32 finish_hour = 2 [json_name = "finishHour"];
|
public Builder clearFinishHour() {
finishHour_ = 0;
onChanged();
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void mo350a(C0636l c0636l, JsonValue jsonValue);",
"static final /* synthetic */ Object m109665a(long j) throws Exception {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"duration\", j);\n } catch (JSONException unused) {\n }\n C6759a.m20910a(\"api_stuck\", jSONObject);\n return null;\n }",
"public int getFinishHour() {\n return finishHour;\n }",
"T mo512a(C0636l c0636l, JsonValue jsonValue);",
"public int getHour(){\n return hour;\n }",
"public int getHour() \n { \n return hour; \n }",
"BigInteger getResponse_time();",
"Integer getEndHour();",
"@java.lang.Override\n public int getFinishHour() {\n return finishHour_;\n }",
"Integer getHour();",
"@JsonSetter(\"time\")\r\n public void setTime(String time) {\r\n this.time = time;\r\n }",
"@Test(timeout = 4000)\n public void test076() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n Integer integer0 = new Integer(55);\n JSONObject jSONObject1 = jSONObject0.append(\"Substring bounds error\", integer0);\n jSONObject1.getJSONArray(\"Substring bounds error\");\n jSONObject1.append(\"Bad value from toJSONString: \", integer0);\n String string0 = jSONObject1.optString(\"Substring bounds error\", \"num\");\n assertNotNull(string0);\n }",
"private int returnParsedJsonObject(String result){\n\n JSONObject resultObject = null;\n int returnedResult = 0;\n try {\n resultObject = new JSONObject(result);\n returnedResult = resultObject.getInt(\"success\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n Log.d(\"PRUEBA\",\"se obtubo en el JSON: \"+returnedResult);\n return returnedResult;\n }",
"@Test(timeout = 4000)\n public void test22() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n String string0 = \"53N/{T[\";\n JSONObject jSONObject1 = jSONObject0.put(\"53N/{T[\", (-1913.632));\n jSONObject1.toString((-821));\n jSONObject0.optString(\"53N/{T[\", \"53N/{T[\");\n jSONObject0.opt(\",2fHJL;.]tm*PJ9\");\n jSONObject0.optLong((String) null);\n jSONObject0.toString((-821));\n Byte byte0 = new Byte((byte)1);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONObject jSONObject2 = jSONObject1.put(\"|f}%!.^JO \", (Collection) linkedList0);\n JSONObject jSONObject3 = jSONObject2.accumulate(\"o%,g eOJ=9n\\\"\", \"java.lang.Double@0000000003\");\n try { \n jSONObject3.getJSONObject(\"{\\n\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003,\\n\\\"java.lang.String@0000000004\\\": \\\"java.lang.Class@0000000005\\\"\\n}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\n\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003,\\\\n\\\\\\\"java.lang.String@0000000004\\\\\\\": \\\\\\\"java.lang.Class@0000000005\\\\\\\"\\\\n}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getHour() { return this.hour; }",
"public static Integer getLastJsonResponseCode(){\n return jsonResponseCode;\n }",
"@JsonProperty(\"time\")\n public String getTime() {\n return time;\n }",
"private JsonValue m2254c(int i) {\n JsonValue jsonValue = this.f2957f;\n while (jsonValue != null && i > 0) {\n i--;\n jsonValue = jsonValue.f2958g;\n }\n return jsonValue;\n }",
"@Test(timeout = 4000)\n public void test19() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n double double0 = jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n assertEquals((-821.0), double0, 0.01);\n \n boolean boolean0 = jSONObject0.optBoolean(\"/W_,B?i~I:-MW8${,z\");\n assertFalse(boolean0);\n assertEquals(1, jSONObject0.length());\n }",
"@WebMethod(operationName = \"new-infections-last-24h\")\n String getNewInfectionsLast24h() throws JsonProcessingException;",
"@java.lang.Override\n public int getFinishHour() {\n return finishHour_;\n }",
"public void sethourNeed(Integer h){hourNeed=h;}",
"@JsonGetter(\"time\")\r\n public String getTime() {\r\n return time;\r\n }",
"@Test(timeout = 4000)\n public void test079() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject((Object) \"gettoUpperCase\");\n jSONObject1.names();\n Integer integer0 = new Integer(92);\n JSONObject jSONObject2 = jSONObject0.append(\"gettoUpperCase\", integer0);\n jSONObject2.names();\n jSONObject0.optJSONArray(\"gettoUpperCase\");\n JSONObject.numberToString(integer0);\n Boolean boolean0 = new Boolean(true);\n JSONObject.testValidity(boolean0);\n }",
"@WebMethod(operationName = \"increase-infections-24h\")\n String getIncInfections24h() throws JsonProcessingException;",
"private int getHour() {\n\t\tString time = getPersistedString(this.defaultValue);\n\t\tif (time == null || !time.matches(VALIDATION_EXPRESSION)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn Integer.valueOf(time.split(\":|/\")[0]);\n\t}",
"public int getStartHour() {\n return startHour; // stub\n }",
"@Test(timeout = 4000)\n public void test26() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n Integer.remainderUnsigned((-821), (-821));\n StringWriter stringWriter0 = new StringWriter(1782);\n jSONObject0.write(stringWriter0);\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"Ih?`q\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of Ih?`q\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test16() throws Throwable {\n HashMap<Float, Object> hashMap0 = new HashMap<Float, Object>();\n Float float0 = new Float(0.0F);\n Float.max(0.0F, 0.0F);\n hashMap0.put(float0, float0);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n hashMap0.remove((Object) jSONObject0);\n Long long0 = new Long((-1L));\n JSONObject.valueToString(long0);\n hashMap0.getOrDefault(jSONObject0, jSONObject0);\n JSONObject.valueToString(hashMap0, 8, 13);\n JSONObject.doubleToString(0.0);\n jSONObject0.keys();\n jSONObject0.toString(13);\n try { \n jSONObject0.getJSONArray(\";&7Li\\\"+g4z OK%1i76o\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\";&7Li\\\\\\\"+g4z OK%1i76o\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"private int intvalue(JsonNode n, String name) {\n\t\treturn n.findValue(name).getIntValue();\n\t}",
"@Test(timeout = 4000)\n public void test057() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.optJSONObject(\"v.W.y`~H9LS\");\n assertNull(jSONObject1);\n }",
"public Builder setFinishHour(int value) {\n \n finishHour_ = value;\n onChanged();\n return this;\n }",
"@Test(timeout = 4000)\n public void test073() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n int int0 = (-29);\n int int1 = 22;\n HashMap<String, String> hashMap0 = new HashMap<String, String>();\n JSONObject jSONObject1 = new JSONObject((Map) hashMap0);\n JSONObject.valueToString(hashMap0, (-29), 22);\n LinkedList<Float> linkedList0 = new LinkedList<Float>();\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n jSONArray0.optInt((-65));\n try { \n Integer.valueOf(\"{}\");\n fail(\"Expecting exception: NumberFormatException\");\n \n } catch(NumberFormatException e) {\n //\n // For input string: \\\"{}\\\"\n //\n verifyException(\"java.lang.NumberFormatException\", e);\n }\n }",
"void mo28373a(JSONObject jSONObject);",
"@Override\r\n\tpublic void parseJson(JSONObject json) {\n\t\tif(json == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\ttype = getInt(json,d_type);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public Integer getHour() {\n return hour;\n }",
"Integer getStartHour();",
"@Test(timeout = 4000)\n public void test028() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n jSONArray0.put(0, 2094L);\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject0.optInt(\"$\");\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getHour()\n {\n return hour;\n }",
"@Test(timeout = 4000)\n public void test021() throws Throwable {\n HashMap<String, Double> hashMap0 = new HashMap<String, Double>();\n JSONObject.getNames((Object) null);\n JSONArray jSONArray0 = new JSONArray();\n JSONObject jSONObject0 = jSONArray0.optJSONObject((byte)106);\n assertNull(jSONObject0);\n }",
"@Test(timeout = 4000)\n public void test07() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n int int0 = 12;\n StringWriter stringWriter0 = new StringWriter(12);\n Float float0 = new Float((float) 12);\n JSONObject.numberToString(float0);\n String string0 = \"\";\n try { \n jSONObject0.getInt(\"\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test035() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\".\", 65);\n jSONObject1.optInt(\".\", 65);\n Double double0 = new Double((-1.0));\n JSONObject.testValidity(double0);\n }",
"public int getJobStatus(int jNo);",
"JsonObject getIndex(final String index);",
"public void setHour(int nHour) { m_nTimeHour = nHour; }",
"@Test(timeout = 4000)\n public void test081() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n jSONArray0.optBoolean(46);\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n Integer integer0 = new Integer((-884));\n jSONObject1.append(\"su\", integer0);\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@JsonProperty(\"endTime\")\n public String getEndTime() {\n return endTime;\n }",
"void mo16412a(String str, JSONObject jSONObject);",
"public void m16919a(long j) {\n this.f14943b.putLong(\"service_time\", Long.valueOf(j));\n }",
"@Test(timeout = 4000)\n public void test095() throws Throwable {\n Byte byte0 = new Byte((byte)122);\n Byte.toUnsignedLong((byte)122);\n Byte.toUnsignedInt((byte)122);\n Byte.toUnsignedInt((byte)122);\n Byte.toUnsignedInt((byte)122);\n HashMap<String, String> hashMap0 = new HashMap<String, String>();\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n Short short0 = new Short((short) (-1979));\n jSONObject0.put(\"\", (int) (short) (-1979));\n jSONObject0.optDouble(\"\", (double) 122);\n JSONObject.testValidity(hashMap0);\n assertEquals(0, hashMap0.size());\n }",
"public static Integer m5897a(JSONObject jSONObject, String str, Integer num) {\n try {\n jSONObject = (!jSONObject.has(str) || jSONObject.isNull(str)) ? null : Integer.valueOf(jSONObject.getInt(str));\n return jSONObject;\n } catch (JSONObject jSONObject2) {\n jSONObject2.printStackTrace();\n return num;\n }\n }",
"@Test(timeout = 4000)\n public void test23() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"] is not a JSONArray.\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.optDouble(\"] is not a JSONArray.\", (-2064.666));\n jSONObject0.optBoolean(\"] is not a JSONArray.\");\n jSONObject0.put(\"wheel.json.JSONException\", (int) (byte)44);\n String string0 = null;\n JSONTokener jSONTokener0 = new JSONTokener(\"istoUnsignedLong\");\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of istoUnsignedLong\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"public static Integer m5904c(JSONObject jSONObject, String str) {\n return C1546i.m5897a(jSONObject, str, null);\n }",
"@Test(timeout = 4000)\n public void test086() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n StringWriter stringWriter0 = new StringWriter();\n jSONObject1.write(stringWriter0);\n jSONObject1.optDouble(\"8k\\\"]Uu:+Wz~|:~8#4\");\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getValue(String name) {\n String path = ITEMS_PATH + name + \".json\";\n HashMap<String, Integer> item = null;\n Gson gson = new Gson();\n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(path));\n Type type = new TypeToken<HashMap<String, Integer>>() {\n }.getType();\n item = gson.fromJson(bufferedReader, type);\n } catch (FileNotFoundException fnfe) {\n System.out.println(fnfe);\n }\n return item.get(\"value\");\n }",
"int getSchedulingValue();",
"public static int JsonToInteger(JsonObject jso, String param, int defaulx) {\n try {\n JsonElement res = securGetJSON(jso, param);\n if (res != null) {\n return res.getAsInt();\n } else {\n return defaulx;\n }\n } catch (Exception e) {\n return defaulx;\n }\n }",
"@Test(timeout = 4000)\n public void test14() throws Throwable {\n JSONObject jSONObject0 = new JSONObject((Object) \"Unclosed comment\");\n JSONObject.quote(\"Unclosed comment\");\n jSONObject0.optInt(\"%|bmZP$ms4*`Z\");\n JSONObject jSONObject1 = jSONObject0.put(\"Unclosed comment\", (Object) \"%|bmZP$ms4*`Z\");\n String string0 = \"'z2mb\";\n Long long0 = new Long((-487L));\n jSONObject0.append(\"'z2mb\", long0);\n String string1 = null;\n try { \n jSONObject1.getDouble((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public int getArrivalTime(){return arrivalTime;}",
"public void mo15090a(JSONObject jSONObject) {\n }",
"@Test(timeout = 4000)\n public void test09() throws Throwable {\n String[] stringArray0 = new String[0];\n JSONObject jSONObject0 = new JSONObject((JSONObject) null, stringArray0);\n String string0 = \"] is not a JSONObject.\";\n jSONObject0.optInt(\"] is not a JSONObject.\");\n Integer integer0 = new Integer(0);\n JSONObject.valueToString(integer0);\n JSONObject jSONObject1 = jSONObject0.put(\"] is not a JSONObject.\", (Map) null);\n jSONObject0.optLong(\"wheel.json.JSONException\", (long) 0);\n jSONObject1.keys();\n jSONObject0.toString();\n int int0 = 0;\n // Undeclared exception!\n try { \n Integer.remainderUnsigned(0, 0);\n fail(\"Expecting exception: ArithmeticException\");\n \n } catch(ArithmeticException e) {\n //\n // / by zero\n //\n verifyException(\"java.lang.Integer\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test18() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n JSONObject jSONObject1 = jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n int int0 = new Byte((byte)97);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n jSONObject0.put(\"*bpp)j7=\", (Collection) linkedList0);\n jSONObject1.accumulate(\"] is not a JSONArray.\", linkedList0);\n try { \n jSONObject0.getJSONObject(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"void mo59932a(String str, JSONObject jSONObject);",
"@Override\r\n\tpublic JSONObject buildJson() {\n\t\tJSONObject json = new JSONObject();\r\n\t\ttry {\r\n\t\t\tsetInt(json,d_type,type);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogUtil.log.error(e.getMessage(),e);\r\n\t\t}\r\n\t\treturn json;\r\n\t}",
"public int[] getHours() {\n return hours;\n }",
"public static C10139g m30093a(JSONObject jSONObject) {\n try {\n C10139g gVar = new C10139g();\n gVar.f27640c = jSONObject.getString(\"ip\");\n gVar.f27638a = jSONObject.getInt(\"sendhops\");\n gVar.f27639b = jSONObject.getInt(\"replyhops\");\n gVar.f27641d = jSONObject.getInt(\"cost\");\n return gVar;\n } catch (Throwable unused) {\n return null;\n }\n }",
"@Test(timeout = 4000)\n public void test06() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n assertEquals(1, jSONObject0.length());\n \n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n JSONObject.quote(\"wheel.json.JSONObject$1\");\n String string0 = JSONObject.doubleToString(216);\n assertEquals(\"216\", string0);\n }",
"public int getHour() {\n/* 60 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\r\n\tpublic int getHH() {\n\t\treturn HH;\r\n\t}",
"JSONObject mo28758a(View view);",
"@JsonSetter(\"exp_month\")\r\n public void setExpMonth (int value) { \r\n this.expMonth = value;\r\n }",
"public int getHours(){\n return (int) totalSeconds/3600;\n }",
"public double getFinishTime(){return finishTime;}",
"@Test(timeout = 4000)\n public void test11() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n byte byte1 = (byte)97;\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n Short short0 = new Short((byte)39);\n jSONObject0.putOpt(\"\\\"$c.1O[-X9i\", short0);\n JSONTokener jSONTokener0 = new JSONTokener(\"'m P|=\");\n JSONArray jSONArray0 = null;\n try {\n jSONArray0 = new JSONArray(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONArray text must start with '[' at character 1 of 'm P|=\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"int value(String name);",
"public Integer getHour() {\n\t\treturn hour;\n\t}",
"public double getHours(){\n return hours;\n }",
"public interface JsonProperties {\n\n String ACCESS_LEVEL = \"accessLevel\";\n String ADDRESS = \"address\";\n String ASSET_ID = \"assetId\";\n String CONTENT = \"content\";\n String CREATED_BY = \"createdBy\";\n String DATA = \"data\";\n String DATA_HASH = \"dataHash\";\n String EVENT_ID = \"eventId\";\n String ID_DATA = \"idData\";\n String META_DATA = \"metadata\";\n String PERMISSIONS = \"permissions\";\n String REGISTERED_BY = \"registeredBy\";\n String REGISTERED_ON = \"registeredOn\";\n String SEQUENCE_NUMBER = \"sequenceNumber\";\n String SIGNATURE = \"signature\";\n String TIMESTAMP = \"timestamp\";\n}",
"public String getHours();",
"@Test\n public void testPopulation() throws JSONException {\n int[] population = {775620,1295210000,14240168};\n for (i=0;i<respArray.length();i++){\n Assert.assertEquals(Integer.parseInt(respArray.getJSONObject(i).getString(\"population\")),population[i], \"Population does not match\");\n }\n }",
"@Test(timeout = 4000)\n public void test061() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n jSONObject0.optLong(\"su\");\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test016() throws Throwable {\n String string0 = JSONObject.quote(\"=\\\" p^/$6Yz29)9\");\n assertEquals(\"\\\"=\\\\\\\" p^/$6Yz29)9\\\"\", string0);\n \n Short short0 = new Short((short)11);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"=\\\" p^/$6Yz29)9\";\n stringArray0[1] = \"\\\"=\\\" p^/$6Yz29)9\\\"\";\n stringArray0[2] = \"\\\"=\\\" p^/$6Yz29)9\\\"\";\n JSONObject jSONObject0 = new JSONObject(short0, stringArray0);\n String string1 = jSONObject0.toString(4791, 104);\n assertEquals(\"{}\", string1);\n }",
"@Override\npublic JsonArray queryStatistics(String date, Employee em) throws Exception {\n\tint [] montharr= {31,28,31,30,31,30,31,31,30,31,30,31};\n\tSystem.out.println(date);\n\tint year;\n\tint month;\n\tif(date.length()==0){\n\t\tmonth = new Date().getMonth()+1;\n\t\tyear= new Date().getYear()+1900;\n\t}else{\n\t\tString[] s=date.split(\"-\");\n\t\tyear=Integer.parseInt(s[0]);\n\t\tmonth=Integer.parseInt(s[1]);\n\t}\n\t\n\t\n\tList<Map<String,Object>> lstMap = new LinkedList<Map<String,Object>>();\n\tfor (int i = 1; i <=montharr[month-1] ; i++) {\n\t\tStringBuffer buffer =new StringBuffer(\"select SUM(c.golds) from consumption c,machineinfo m where c.fmachineid=m.id and m.state!=-1 and c.type=-1 and m.empid=\")\n\t\t\t\t.append(em.getId()).append(\" and year(c.createtime) =\").append(year)\n\t\t\t\t.append(\" and month(c.createtime) =\").append(month).append(\" and day(c.createtime) =\").append(i);;\n\t\t\t\tSystem.out.println(buffer);\n\t\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\t\tList<Object> lst = databaseHelper.getResultListBySql(buffer.toString());\n\t\t\t\t\n\t\t\t\tmap.put(\"nums\", lst==null?\"0\":lst.size()==0?\"0\":lst.get(0)==null?\"0\":lst.get(0).toString());\n\t\t\t\tmap.put(\"time\", i+\"日\");\n\t\t\t\tmap.put(\"month\", month);\n\t\t\t\tlstMap.add(map);\n\t}\n\tString result = new Gson().toJson(lstMap);\n\tJsonArray jarr = (JsonArray) new JsonParser().parse(result);\n\treturn jarr;\n}",
"public Integer getMaxHour() {\r\n return maxHour;\r\n }",
"public int getHora(){\n return minutosStamina;\n }",
"public int getInt(String name)\n/* */ {\n/* 908 */ return getInt(name, 0);\n/* */ }",
"@Override\n public void onSucceed(String json) {\n GetGoldTimeResponse response = new Gson().fromJson(json, GetGoldTimeResponse.class);\n UserSpCache.getInstance(mContext).putInt(UserSpCache.GOLD_NUMBERS,response.getData().getCount());//保存获取金币次数\n\n UserSpCache.getInstance(mContext).putInt(UserSpCache.GOLD_TIME ,response.getData().getGold_time());\n if (response.getData().getTime_difference() != 0) {\n mAddColdView.showGoldTime(response.getData().getTime_difference());\n }\n }",
"void mo708a(long j) throws RemoteException;",
"@Test(timeout = 4000)\n public void test13() throws Throwable {\n JSONObject jSONObject0 = new JSONObject((Object) \"Unclosed comment\");\n JSONObject.quote(\"Unclosed comment\");\n jSONObject0.optInt(\"%|bmZP$ms4*`Z\");\n jSONObject0.toString();\n // Undeclared exception!\n jSONObject0.toString(1530, (-2117));\n }",
"void mo26099a(String str, JSONObject jSONObject);",
"@Test(timeout = 4000)\n public void test027() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String string0 = \"MnMG\";\n JSONObject jSONObject1 = jSONObject0.put(\"MnMG\", (Object) \"MnMG\");\n jSONObject0.optInt(\"MnMG\", (-646));\n try { \n jSONObject1.getBoolean(\"MnMG\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"MnMG\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public interface DatetimeRange {\n\n @JsonProperty(\"dtr:start_datetime\")\n String getStartDatetime();\n void setStartDatetime(String startDatetime);\n\n @JsonProperty(\"dtr:end_datetime\")\n String getEndDatetime();\n void setEndDatetime(String endDatetime);\n\n}",
"public int getEndMilitaryHour() {\n return this.endMilitaryHour;\n }",
"public static int m24504p(JSONObject jSONObject) {\n if (jSONObject != null) {\n JSONObject optJSONObject = jSONObject.optJSONObject(\"extend\");\n if (optJSONObject != null) {\n return optJSONObject.optInt(\"materialMax\");\n }\n }\n return 0;\n }",
"public JSONObject mo56289a_() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"api_endpoint\", mo56263a());\n } catch (JSONException unused) {\n }\n f2302w.mo56245a(jSONObject, \"timestamp\", mo56265c());\n f2303x.mo56245a(jSONObject, \"cart\", mo56278d());\n return jSONObject;\n }",
"@Test\n\tpublic void verifyflightNumber() {\n\t\tJsonPath path = new JsonPath(response.getBody().asString());\n\t\tAssert.assertEquals(path.getString(\"flight_number\"), \"102\");\n\t}",
"@Test(timeout = 4000)\n public void test085() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.accumulate(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"int getFromValue();",
"public int getJobCost(int jNo);",
"@Test(timeout = 4000)\n public void test012() throws Throwable {\n JSONObject.quote(\"=\\\" p^/$6Yz29)9\");\n JSONObject jSONObject0 = new JSONObject();\n jSONObject0.append(\"\\\"=\\\" p^/$6Yz29)9\\\"\", \"=\\\" p^/$6Yz29)9\");\n jSONObject0.toString(3125, 3125);\n assertEquals(1, jSONObject0.length());\n }",
"public final void mo9383a(int i, String str, JSONObject jSONObject) {\n }"
] |
[
"0.60758096",
"0.5842577",
"0.54594177",
"0.5401923",
"0.5357936",
"0.5325503",
"0.5299934",
"0.52867436",
"0.5281967",
"0.5273177",
"0.522407",
"0.5220313",
"0.51785034",
"0.5175855",
"0.5171843",
"0.51597744",
"0.5144109",
"0.51402444",
"0.51280516",
"0.50861424",
"0.5083618",
"0.50809485",
"0.50649387",
"0.50517255",
"0.50474155",
"0.50438756",
"0.50411665",
"0.50087667",
"0.4993228",
"0.49827453",
"0.4974749",
"0.49703324",
"0.49661636",
"0.4966086",
"0.49552196",
"0.4947223",
"0.4946484",
"0.49452037",
"0.4943969",
"0.49348924",
"0.4923226",
"0.49168655",
"0.49066335",
"0.48727357",
"0.4860966",
"0.48558757",
"0.48448417",
"0.4841438",
"0.483876",
"0.4838021",
"0.48326594",
"0.4816846",
"0.48132068",
"0.4801267",
"0.47954896",
"0.47920772",
"0.4786236",
"0.47811797",
"0.4779482",
"0.47659335",
"0.4765435",
"0.47551858",
"0.47550938",
"0.47466552",
"0.47414562",
"0.4738007",
"0.473663",
"0.47326827",
"0.47325557",
"0.47118974",
"0.47111666",
"0.47099885",
"0.4702063",
"0.4697623",
"0.4695972",
"0.4683397",
"0.4679043",
"0.46761924",
"0.4668918",
"0.4666372",
"0.46597755",
"0.46567792",
"0.4654674",
"0.4638815",
"0.46363014",
"0.4633511",
"0.4631586",
"0.4631316",
"0.4631203",
"0.4629551",
"0.4624083",
"0.4622934",
"0.46221855",
"0.46175542",
"0.46136916",
"0.46127164",
"0.46100494",
"0.4606876",
"0.46060595",
"0.4601551",
"0.46014217"
] |
0.0
|
-1
|
.hts.common.DayOfWeek day = 3 [json_name = "day"];
|
@java.lang.Override public int getDayValue() {
return day_;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"com.czht.face.recognition.Czhtdev.Week getWeekday();",
"io.dstore.values.StringValue getDay();",
"public int getDayOfWeek();",
"@JSProperty(\"startOfWeek\")\n double getStartOfWeek();",
"@java.lang.Override public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }",
"public Integer getDayOfWeek() {\n return dayOfWeek;\n }",
"@java.lang.Override\n public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }",
"public void setDay(int day)\n {\n this.day = day;\n }",
"io.dstore.values.StringValueOrBuilder getDayOrBuilder();",
"public String getDay() {\n return this.day;\n }",
"String getDayofservice();",
"public void setDay(int day) {\r\n this.day = day;\r\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public Integer getDay()\n {\n return this.day;\n }",
"public String getDayOfWeek(){\n\t\treturn dayOfWeek;\n\t}",
"@JSProperty(\"startOfWeek\")\n void setStartOfWeek(double value);",
"public int getDay(){\n\t return this.day;\n }",
"public void setDay(String day) {\n\n\t\tthis.day = day;\n\t}",
"public void setDay(byte value) {\r\n this.day = value;\r\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public int getDay() {\n if (USE_SERIALIZABLE) {\n return childBuilder.getDay();\n } else {\n // @todo Replace with real Builder object if possible\n return convertNullToNOT_SET(childBuilderElement.getAttributeValue(\"day\"));\n }\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public int getDay()\n {\n return day;\n }",
"public byte getDay() {\r\n return day;\r\n }",
"public final native int getDay() /*-{\n return this.getDay();\n }-*/;",
"void mo350a(C0636l c0636l, JsonValue jsonValue);",
"public byte getDay() {\n return day;\n }",
"public int getDay() {\n return day;\n }",
"public int getDayOfWeek() {\n return this.dayOfWeek;\n }",
"Integer getDay();",
"public int getDay(){\n\t\treturn day;\n\t}",
"public String getDayOfWeek() {\r\n return dayOfWeek;\r\n }",
"public void setDayOfWeek(String dayOfWeek) {\r\n this.dayOfWeek = dayOfWeek;\r\n }",
"public void setDayOfWeek(Integer dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"public int getDay() {\r\n return day;\r\n }",
"@Test\n public void getterDayOfWeek(){\n ScheduleEntry entry = new ScheduleEntry();\n entry.setCalendar(calendar);\n entry.setDepartureTime(DepartureTime);\n Assert.assertEquals(25,entry.getDayOfWeek());\n }",
"public void setDayOfWeek(String dayOfWeek){\n\t\tthis.dayOfWeek = dayOfWeek;\n\t}",
"com.czht.face.recognition.Czhtdev.WeekOrBuilder getWeekdayOrBuilder();",
"@java.lang.Override public int getDayValue() {\n return day_;\n }",
"public int getDay() {\n\treturn day;\n }",
"public void setDayOfWeek(DayTemplate dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"public void setDayOfWeek(int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"DayOfWeek getUserVoteSalaryWeeklyDayOfWeek();",
"private WeekDays(String mood){\n this.mood = mood;\n }",
"public String getDay() {\n\t\treturn day;\n\t}",
"public void setDay(int day) {\n\t\tthis.day = day;\n\t}",
"public void setDay(int day) {\n\t\tthis.day = day;\n\t}",
"@Test\n public void DayOfWeek() {\n System.out.printf(\"%s%n\\n\", DayOfWeek.MONDAY.plus(3));\n\n DayOfWeek dow = DayOfWeek.MONDAY;\n Locale locale = Locale.getDefault();\n System.out.println(dow.getDisplayName(TextStyle.FULL, locale));\n System.out.println(dow.getDisplayName(TextStyle.NARROW, locale));\n System.out.println(dow.getDisplayName(TextStyle.SHORT, locale));\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"String updateDay(String userName, Day day);",
"public void setDay(final short day) {\r\n\t\tthis.day = day;\r\n\t}",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"private void dayOfWeek(HplsqlParser.Expr_func_paramsContext ctx) {\n Integer v = getPartOfDate(ctx, Calendar.DAY_OF_WEEK);\n if (v != null) {\n evalInt(v);\n }\n else {\n evalNull();\n }\n }",
"@WebMethod(operationName = \"total-data-jh-rki\")\n String getTotalDataJHRKI(@WebParam(name = \"days\") int days) throws JsonProcessingException;",
"io.dstore.values.TimestampValue getDay();",
"public void setDay(Date day) {\n this.day = day;\n }",
"public void setDayOfTheWeek(String day){\r\n this.dayOfTheWeek.setText(day);\r\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"public String getDay() {\n\n\t\treturn day;\n\t}",
"@Test\n\t public void testDayInEnglish(){\n\t\t TimeSource mock = new MockTimeSource();\n\t\t Watch test = new FinnishWatch(mock);\n\t\t String expected = EnumarationDays.mercredi.getEnglish();\n\t\t String actual = test.getDay(Languages.English);\n\t\t assertEquals(actual, expected);\t\t \n\t }",
"public void setDay(final int day) {\n\t\tthis.day = day;\n\t}",
"@DynamoDBTypeConverted(converter = TimeSlotConverter.class)\n @DynamoDBAttribute(attributeName = \"wednesday\")\n public final TimeSlot getWednesday() {\n return wednesday;\n }",
"public HashMap<String, String> getSomeDaydata(int day) {\n\t\tif(day >= 0 && day <=4){\n\t\t\ttry {\n\t\t\t\tHashMap<String, String> day2Map = new HashMap<String, String>();\n\t\t\t\tJsonObject day2Object = this.jsonForecastArray.get(day).getAsJsonObject();\n\t\t\t\tday2Map.put(\"日期\", day2Object.get(\"date\").getAsString());\n\t\t\t\tday2Map.put(\"最高温\", day2Object.get(\"high\").getAsString());\n\t\t\t\tday2Map.put(\"最低温\", day2Object.get(\"low\").getAsString());\n\t\t\t\tday2Map.put(\"风力\", day2Object.get(\"fengli\").getAsString());\n\t\t\t\tday2Map.put(\"天气\", day2Object.get(\"type\").getAsString());\n\t\t\t\treturn day2Map;\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(\"WeatherRequest Class\", \"Hashmap hasn't init\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@JsonGetter(\"joiningDay\")\n public Days getJoiningDay ( ) { \n return this.joiningDay;\n }",
"public static DayTraining newInstance(String json) {\n try {\n JSONObject root = new JSONObject(json);\n return new DayTraining.Builder()\n .setRunning( root.optInt(\"t1\"), root.optInt(\"t2\"), root.optInt(\"t3\"), root.optInt(\"t2_3\"), root.optInt(\"t1_3\"), root.optInt(\"ta\"), root.optInt(\"tt\"))\n .setBreathing(root.optInt(\"gx\"), root.optInt(\"gp\"),root.optInt(\"gd\"))\n .setTrainingInfo(root.optInt(\"id_athlete\"), root.optString(\"date\"), filterJsonTotalInput(root.optString(\"description\")), root.optInt(\"texniki\"), root.optInt(\"drastiriotita\"), root.optInt(\"time\"), root.optInt(\"number\"), root.optInt(\"id_race\"))\n .build();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public Weekday() {\n }",
"public int getDay() {\n\t\treturn this.day;\n\t}",
"public int getDay() {\n\t\treturn this.day;\n\t}",
"@Test\n\t public void testDayInFinnish(){\n\t\t TimeSource mock = new MockTimeSource();\n\t\t Watch test = new FinnishWatch(mock);\t\n\t\t String expected = EnumarationDays.mercredi.getFinnish();\n\t\t String actual = test.getDay(Languages.Finnish);\n\t\t assertEquals(actual, expected);\t\t \n\t }",
"public final int getDayOfWeek()\n {\n return dayOfWeek(ordinal);\n\n }",
"@DynamoDBTypeConverted(converter = TimeSlotConverter.class)\n @DynamoDBAttribute(attributeName = \"monday\")\n public final TimeSlot getMonday() {\n return monday;\n }",
"public DayOfWeek diaDaSemana(LocalDate d);",
"private String dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }",
"public DayOfWeek primeiroDiaSemanaAno(int ano);",
"public int getDayOfWeekNr() {\n\t\treturn ((int) (this.jd - 5.5)) % 7;\n\t}",
"public DayOfWeek getDay(String dow)\r\n {\r\n int month=Integer.parseInt(dow.substring(0,2));\r\n int date=Integer.parseInt(dow.substring(3,5));\r\n int year=Integer.parseInt(dow.substring(6));\r\n LocalDate ld=LocalDate.of(year,month,date);\r\n DayOfWeek day=ld.getDayOfWeek();\r\n return day;\r\n }",
"public int getWeekDay()\n\t{\n\t\tif (m_nType == AT_WEEK_DAY)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}",
"int getWeek();",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"private WeekData extract_year_data(String json_string){\n try {\n JSONObject jsonObj = new JSONObject(json_string);\n WeekData wd = new WeekData();\n wd.setYear(jsonObj.getInt(\"year\"));\n wd.setWeek(jsonObj.getJSONArray(\"week\"));\n wd.setDays(jsonObj.getJSONArray(\"days\"));\n\n return wd;\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public int getWeekDay() {\r\n return this.weekday - 1;\r\n }",
"public static synchronized int getDayOfWeekNr(double jd) {\n\t\treturn ((int) (jd - 5.5)) % 7;\n\t}",
"public Date getDay() {\n return day;\n }",
"public void setDayOfWeek(final int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }"
] |
[
"0.6131328",
"0.61245066",
"0.5999135",
"0.5941413",
"0.5687417",
"0.5682057",
"0.56554824",
"0.5620294",
"0.5606591",
"0.56063324",
"0.560225",
"0.558017",
"0.5572138",
"0.5564908",
"0.5564908",
"0.5564908",
"0.5560289",
"0.5559266",
"0.5538089",
"0.55326855",
"0.5528263",
"0.5525973",
"0.5517686",
"0.55118686",
"0.5510258",
"0.5510258",
"0.5510258",
"0.5501159",
"0.54940826",
"0.5469989",
"0.5465525",
"0.54584676",
"0.54523504",
"0.5440045",
"0.5437689",
"0.5430862",
"0.5422976",
"0.54122716",
"0.5406315",
"0.53911316",
"0.53746533",
"0.5370378",
"0.5365345",
"0.5365251",
"0.5356896",
"0.53436553",
"0.5336132",
"0.53232795",
"0.53101563",
"0.5307492",
"0.52789164",
"0.52721965",
"0.52721965",
"0.52240145",
"0.51939166",
"0.517874",
"0.5167688",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51651335",
"0.51648664",
"0.51625055",
"0.51480573",
"0.51348144",
"0.5083942",
"0.5083942",
"0.5083942",
"0.50750834",
"0.50634307",
"0.5061134",
"0.50533265",
"0.5042444",
"0.504074",
"0.5038961",
"0.5021979",
"0.50214946",
"0.50214946",
"0.50211567",
"0.5014934",
"0.50111586",
"0.5011113",
"0.50066924",
"0.49911588",
"0.49798042",
"0.49788776",
"0.4971786",
"0.49622023",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49514073",
"0.4946642",
"0.49380344",
"0.49201283",
"0.49198148"
] |
0.5173576
|
56
|
.hts.common.DayOfWeek day = 3 [json_name = "day"];
|
public Builder setDayValue(int value) {
day_ = value;
onChanged();
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"com.czht.face.recognition.Czhtdev.Week getWeekday();",
"io.dstore.values.StringValue getDay();",
"public int getDayOfWeek();",
"@JSProperty(\"startOfWeek\")\n double getStartOfWeek();",
"@java.lang.Override public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }",
"public Integer getDayOfWeek() {\n return dayOfWeek;\n }",
"@java.lang.Override\n public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }",
"public void setDay(int day)\n {\n this.day = day;\n }",
"io.dstore.values.StringValueOrBuilder getDayOrBuilder();",
"public String getDay() {\n return this.day;\n }",
"String getDayofservice();",
"public void setDay(int day) {\r\n this.day = day;\r\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public Integer getDay()\n {\n return this.day;\n }",
"public String getDayOfWeek(){\n\t\treturn dayOfWeek;\n\t}",
"@JSProperty(\"startOfWeek\")\n void setStartOfWeek(double value);",
"public int getDay(){\n\t return this.day;\n }",
"public void setDay(String day) {\n\n\t\tthis.day = day;\n\t}",
"public void setDay(byte value) {\r\n this.day = value;\r\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public int getDay() {\n if (USE_SERIALIZABLE) {\n return childBuilder.getDay();\n } else {\n // @todo Replace with real Builder object if possible\n return convertNullToNOT_SET(childBuilderElement.getAttributeValue(\"day\"));\n }\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public int getDay()\n {\n return day;\n }",
"public byte getDay() {\r\n return day;\r\n }",
"public final native int getDay() /*-{\n return this.getDay();\n }-*/;",
"void mo350a(C0636l c0636l, JsonValue jsonValue);",
"public byte getDay() {\n return day;\n }",
"public int getDay() {\n return day;\n }",
"public int getDayOfWeek() {\n return this.dayOfWeek;\n }",
"Integer getDay();",
"public int getDay(){\n\t\treturn day;\n\t}",
"public String getDayOfWeek() {\r\n return dayOfWeek;\r\n }",
"public void setDayOfWeek(String dayOfWeek) {\r\n this.dayOfWeek = dayOfWeek;\r\n }",
"public void setDayOfWeek(Integer dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"public int getDay() {\r\n return day;\r\n }",
"@Test\n public void getterDayOfWeek(){\n ScheduleEntry entry = new ScheduleEntry();\n entry.setCalendar(calendar);\n entry.setDepartureTime(DepartureTime);\n Assert.assertEquals(25,entry.getDayOfWeek());\n }",
"public void setDayOfWeek(String dayOfWeek){\n\t\tthis.dayOfWeek = dayOfWeek;\n\t}",
"com.czht.face.recognition.Czhtdev.WeekOrBuilder getWeekdayOrBuilder();",
"@java.lang.Override public int getDayValue() {\n return day_;\n }",
"public int getDay() {\n\treturn day;\n }",
"public void setDayOfWeek(DayTemplate dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"public void setDayOfWeek(int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"DayOfWeek getUserVoteSalaryWeeklyDayOfWeek();",
"private WeekDays(String mood){\n this.mood = mood;\n }",
"public String getDay() {\n\t\treturn day;\n\t}",
"public void setDay(int day) {\n\t\tthis.day = day;\n\t}",
"public void setDay(int day) {\n\t\tthis.day = day;\n\t}",
"@Test\n public void DayOfWeek() {\n System.out.printf(\"%s%n\\n\", DayOfWeek.MONDAY.plus(3));\n\n DayOfWeek dow = DayOfWeek.MONDAY;\n Locale locale = Locale.getDefault();\n System.out.println(dow.getDisplayName(TextStyle.FULL, locale));\n System.out.println(dow.getDisplayName(TextStyle.NARROW, locale));\n System.out.println(dow.getDisplayName(TextStyle.SHORT, locale));\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"String updateDay(String userName, Day day);",
"@java.lang.Override public int getDayValue() {\n return day_;\n }",
"public void setDay(final short day) {\r\n\t\tthis.day = day;\r\n\t}",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"private void dayOfWeek(HplsqlParser.Expr_func_paramsContext ctx) {\n Integer v = getPartOfDate(ctx, Calendar.DAY_OF_WEEK);\n if (v != null) {\n evalInt(v);\n }\n else {\n evalNull();\n }\n }",
"@WebMethod(operationName = \"total-data-jh-rki\")\n String getTotalDataJHRKI(@WebParam(name = \"days\") int days) throws JsonProcessingException;",
"io.dstore.values.TimestampValue getDay();",
"public void setDay(Date day) {\n this.day = day;\n }",
"public void setDayOfTheWeek(String day){\r\n this.dayOfTheWeek.setText(day);\r\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"public String getDay() {\n\n\t\treturn day;\n\t}",
"@Test\n\t public void testDayInEnglish(){\n\t\t TimeSource mock = new MockTimeSource();\n\t\t Watch test = new FinnishWatch(mock);\n\t\t String expected = EnumarationDays.mercredi.getEnglish();\n\t\t String actual = test.getDay(Languages.English);\n\t\t assertEquals(actual, expected);\t\t \n\t }",
"public void setDay(final int day) {\n\t\tthis.day = day;\n\t}",
"@DynamoDBTypeConverted(converter = TimeSlotConverter.class)\n @DynamoDBAttribute(attributeName = \"wednesday\")\n public final TimeSlot getWednesday() {\n return wednesday;\n }",
"public HashMap<String, String> getSomeDaydata(int day) {\n\t\tif(day >= 0 && day <=4){\n\t\t\ttry {\n\t\t\t\tHashMap<String, String> day2Map = new HashMap<String, String>();\n\t\t\t\tJsonObject day2Object = this.jsonForecastArray.get(day).getAsJsonObject();\n\t\t\t\tday2Map.put(\"日期\", day2Object.get(\"date\").getAsString());\n\t\t\t\tday2Map.put(\"最高温\", day2Object.get(\"high\").getAsString());\n\t\t\t\tday2Map.put(\"最低温\", day2Object.get(\"low\").getAsString());\n\t\t\t\tday2Map.put(\"风力\", day2Object.get(\"fengli\").getAsString());\n\t\t\t\tday2Map.put(\"天气\", day2Object.get(\"type\").getAsString());\n\t\t\t\treturn day2Map;\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(\"WeatherRequest Class\", \"Hashmap hasn't init\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@JsonGetter(\"joiningDay\")\n public Days getJoiningDay ( ) { \n return this.joiningDay;\n }",
"public static DayTraining newInstance(String json) {\n try {\n JSONObject root = new JSONObject(json);\n return new DayTraining.Builder()\n .setRunning( root.optInt(\"t1\"), root.optInt(\"t2\"), root.optInt(\"t3\"), root.optInt(\"t2_3\"), root.optInt(\"t1_3\"), root.optInt(\"ta\"), root.optInt(\"tt\"))\n .setBreathing(root.optInt(\"gx\"), root.optInt(\"gp\"),root.optInt(\"gd\"))\n .setTrainingInfo(root.optInt(\"id_athlete\"), root.optString(\"date\"), filterJsonTotalInput(root.optString(\"description\")), root.optInt(\"texniki\"), root.optInt(\"drastiriotita\"), root.optInt(\"time\"), root.optInt(\"number\"), root.optInt(\"id_race\"))\n .build();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public Weekday() {\n }",
"public int getDay() {\n\t\treturn this.day;\n\t}",
"public int getDay() {\n\t\treturn this.day;\n\t}",
"@Test\n\t public void testDayInFinnish(){\n\t\t TimeSource mock = new MockTimeSource();\n\t\t Watch test = new FinnishWatch(mock);\t\n\t\t String expected = EnumarationDays.mercredi.getFinnish();\n\t\t String actual = test.getDay(Languages.Finnish);\n\t\t assertEquals(actual, expected);\t\t \n\t }",
"public final int getDayOfWeek()\n {\n return dayOfWeek(ordinal);\n\n }",
"@DynamoDBTypeConverted(converter = TimeSlotConverter.class)\n @DynamoDBAttribute(attributeName = \"monday\")\n public final TimeSlot getMonday() {\n return monday;\n }",
"public DayOfWeek diaDaSemana(LocalDate d);",
"private String dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }",
"public DayOfWeek primeiroDiaSemanaAno(int ano);",
"public int getDayOfWeekNr() {\n\t\treturn ((int) (this.jd - 5.5)) % 7;\n\t}",
"public DayOfWeek getDay(String dow)\r\n {\r\n int month=Integer.parseInt(dow.substring(0,2));\r\n int date=Integer.parseInt(dow.substring(3,5));\r\n int year=Integer.parseInt(dow.substring(6));\r\n LocalDate ld=LocalDate.of(year,month,date);\r\n DayOfWeek day=ld.getDayOfWeek();\r\n return day;\r\n }",
"public int getWeekDay()\n\t{\n\t\tif (m_nType == AT_WEEK_DAY)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}",
"int getWeek();",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"private WeekData extract_year_data(String json_string){\n try {\n JSONObject jsonObj = new JSONObject(json_string);\n WeekData wd = new WeekData();\n wd.setYear(jsonObj.getInt(\"year\"));\n wd.setWeek(jsonObj.getJSONArray(\"week\"));\n wd.setDays(jsonObj.getJSONArray(\"days\"));\n\n return wd;\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public int getWeekDay() {\r\n return this.weekday - 1;\r\n }",
"public static synchronized int getDayOfWeekNr(double jd) {\n\t\treturn ((int) (jd - 5.5)) % 7;\n\t}",
"public Date getDay() {\n return day;\n }",
"public void setDayOfWeek(final int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }"
] |
[
"0.6131328",
"0.61245066",
"0.5999135",
"0.5941413",
"0.5687417",
"0.5682057",
"0.56554824",
"0.5620294",
"0.5606591",
"0.56063324",
"0.560225",
"0.558017",
"0.5572138",
"0.5564908",
"0.5564908",
"0.5564908",
"0.5560289",
"0.5559266",
"0.5538089",
"0.55326855",
"0.5528263",
"0.5525973",
"0.5517686",
"0.55118686",
"0.5510258",
"0.5510258",
"0.5510258",
"0.5501159",
"0.54940826",
"0.5469989",
"0.5465525",
"0.54584676",
"0.54523504",
"0.5440045",
"0.5437689",
"0.5430862",
"0.5422976",
"0.54122716",
"0.5406315",
"0.53911316",
"0.53746533",
"0.5370378",
"0.5365345",
"0.5365251",
"0.5356896",
"0.53436553",
"0.5336132",
"0.53232795",
"0.53101563",
"0.5307492",
"0.52789164",
"0.52721965",
"0.52721965",
"0.52240145",
"0.51939166",
"0.517874",
"0.5173576",
"0.5167688",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51651335",
"0.51648664",
"0.51625055",
"0.51480573",
"0.51348144",
"0.5083942",
"0.5083942",
"0.5083942",
"0.50750834",
"0.50634307",
"0.5061134",
"0.50533265",
"0.5042444",
"0.504074",
"0.5038961",
"0.5021979",
"0.50214946",
"0.50214946",
"0.50211567",
"0.5014934",
"0.50111586",
"0.5011113",
"0.50066924",
"0.49911588",
"0.49798042",
"0.49788776",
"0.4971786",
"0.49622023",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49514073",
"0.4946642",
"0.49380344",
"0.49201283",
"0.49198148"
] |
0.0
|
-1
|
.hts.common.DayOfWeek day = 3 [json_name = "day"];
|
@java.lang.Override
public app.onepass.apis.DayOfWeek getDay() {
@SuppressWarnings("deprecation")
app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);
return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"com.czht.face.recognition.Czhtdev.Week getWeekday();",
"io.dstore.values.StringValue getDay();",
"public int getDayOfWeek();",
"@JSProperty(\"startOfWeek\")\n double getStartOfWeek();",
"@java.lang.Override public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }",
"public Integer getDayOfWeek() {\n return dayOfWeek;\n }",
"public void setDay(int day)\n {\n this.day = day;\n }",
"io.dstore.values.StringValueOrBuilder getDayOrBuilder();",
"public String getDay() {\n return this.day;\n }",
"String getDayofservice();",
"public void setDay(int day) {\r\n this.day = day;\r\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public Integer getDay()\n {\n return this.day;\n }",
"public String getDayOfWeek(){\n\t\treturn dayOfWeek;\n\t}",
"@JSProperty(\"startOfWeek\")\n void setStartOfWeek(double value);",
"public int getDay(){\n\t return this.day;\n }",
"public void setDay(String day) {\n\n\t\tthis.day = day;\n\t}",
"public void setDay(byte value) {\r\n this.day = value;\r\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public int getDay() {\n if (USE_SERIALIZABLE) {\n return childBuilder.getDay();\n } else {\n // @todo Replace with real Builder object if possible\n return convertNullToNOT_SET(childBuilderElement.getAttributeValue(\"day\"));\n }\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public int getDay()\n {\n return day;\n }",
"public byte getDay() {\r\n return day;\r\n }",
"public final native int getDay() /*-{\n return this.getDay();\n }-*/;",
"void mo350a(C0636l c0636l, JsonValue jsonValue);",
"public byte getDay() {\n return day;\n }",
"public int getDay() {\n return day;\n }",
"public int getDayOfWeek() {\n return this.dayOfWeek;\n }",
"Integer getDay();",
"public int getDay(){\n\t\treturn day;\n\t}",
"public String getDayOfWeek() {\r\n return dayOfWeek;\r\n }",
"public void setDayOfWeek(String dayOfWeek) {\r\n this.dayOfWeek = dayOfWeek;\r\n }",
"public void setDayOfWeek(Integer dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"public int getDay() {\r\n return day;\r\n }",
"@Test\n public void getterDayOfWeek(){\n ScheduleEntry entry = new ScheduleEntry();\n entry.setCalendar(calendar);\n entry.setDepartureTime(DepartureTime);\n Assert.assertEquals(25,entry.getDayOfWeek());\n }",
"public void setDayOfWeek(String dayOfWeek){\n\t\tthis.dayOfWeek = dayOfWeek;\n\t}",
"com.czht.face.recognition.Czhtdev.WeekOrBuilder getWeekdayOrBuilder();",
"@java.lang.Override public int getDayValue() {\n return day_;\n }",
"public int getDay() {\n\treturn day;\n }",
"public void setDayOfWeek(DayTemplate dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"public void setDayOfWeek(int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"DayOfWeek getUserVoteSalaryWeeklyDayOfWeek();",
"private WeekDays(String mood){\n this.mood = mood;\n }",
"public String getDay() {\n\t\treturn day;\n\t}",
"public void setDay(int day) {\n\t\tthis.day = day;\n\t}",
"public void setDay(int day) {\n\t\tthis.day = day;\n\t}",
"@Test\n public void DayOfWeek() {\n System.out.printf(\"%s%n\\n\", DayOfWeek.MONDAY.plus(3));\n\n DayOfWeek dow = DayOfWeek.MONDAY;\n Locale locale = Locale.getDefault();\n System.out.println(dow.getDisplayName(TextStyle.FULL, locale));\n System.out.println(dow.getDisplayName(TextStyle.NARROW, locale));\n System.out.println(dow.getDisplayName(TextStyle.SHORT, locale));\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"String updateDay(String userName, Day day);",
"@java.lang.Override public int getDayValue() {\n return day_;\n }",
"public void setDay(final short day) {\r\n\t\tthis.day = day;\r\n\t}",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"private void dayOfWeek(HplsqlParser.Expr_func_paramsContext ctx) {\n Integer v = getPartOfDate(ctx, Calendar.DAY_OF_WEEK);\n if (v != null) {\n evalInt(v);\n }\n else {\n evalNull();\n }\n }",
"@WebMethod(operationName = \"total-data-jh-rki\")\n String getTotalDataJHRKI(@WebParam(name = \"days\") int days) throws JsonProcessingException;",
"io.dstore.values.TimestampValue getDay();",
"public void setDay(Date day) {\n this.day = day;\n }",
"public void setDayOfTheWeek(String day){\r\n this.dayOfTheWeek.setText(day);\r\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"public String getDay() {\n\n\t\treturn day;\n\t}",
"@Test\n\t public void testDayInEnglish(){\n\t\t TimeSource mock = new MockTimeSource();\n\t\t Watch test = new FinnishWatch(mock);\n\t\t String expected = EnumarationDays.mercredi.getEnglish();\n\t\t String actual = test.getDay(Languages.English);\n\t\t assertEquals(actual, expected);\t\t \n\t }",
"public void setDay(final int day) {\n\t\tthis.day = day;\n\t}",
"@DynamoDBTypeConverted(converter = TimeSlotConverter.class)\n @DynamoDBAttribute(attributeName = \"wednesday\")\n public final TimeSlot getWednesday() {\n return wednesday;\n }",
"public HashMap<String, String> getSomeDaydata(int day) {\n\t\tif(day >= 0 && day <=4){\n\t\t\ttry {\n\t\t\t\tHashMap<String, String> day2Map = new HashMap<String, String>();\n\t\t\t\tJsonObject day2Object = this.jsonForecastArray.get(day).getAsJsonObject();\n\t\t\t\tday2Map.put(\"日期\", day2Object.get(\"date\").getAsString());\n\t\t\t\tday2Map.put(\"最高温\", day2Object.get(\"high\").getAsString());\n\t\t\t\tday2Map.put(\"最低温\", day2Object.get(\"low\").getAsString());\n\t\t\t\tday2Map.put(\"风力\", day2Object.get(\"fengli\").getAsString());\n\t\t\t\tday2Map.put(\"天气\", day2Object.get(\"type\").getAsString());\n\t\t\t\treturn day2Map;\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(\"WeatherRequest Class\", \"Hashmap hasn't init\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@JsonGetter(\"joiningDay\")\n public Days getJoiningDay ( ) { \n return this.joiningDay;\n }",
"public static DayTraining newInstance(String json) {\n try {\n JSONObject root = new JSONObject(json);\n return new DayTraining.Builder()\n .setRunning( root.optInt(\"t1\"), root.optInt(\"t2\"), root.optInt(\"t3\"), root.optInt(\"t2_3\"), root.optInt(\"t1_3\"), root.optInt(\"ta\"), root.optInt(\"tt\"))\n .setBreathing(root.optInt(\"gx\"), root.optInt(\"gp\"),root.optInt(\"gd\"))\n .setTrainingInfo(root.optInt(\"id_athlete\"), root.optString(\"date\"), filterJsonTotalInput(root.optString(\"description\")), root.optInt(\"texniki\"), root.optInt(\"drastiriotita\"), root.optInt(\"time\"), root.optInt(\"number\"), root.optInt(\"id_race\"))\n .build();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public Weekday() {\n }",
"public int getDay() {\n\t\treturn this.day;\n\t}",
"public int getDay() {\n\t\treturn this.day;\n\t}",
"@Test\n\t public void testDayInFinnish(){\n\t\t TimeSource mock = new MockTimeSource();\n\t\t Watch test = new FinnishWatch(mock);\t\n\t\t String expected = EnumarationDays.mercredi.getFinnish();\n\t\t String actual = test.getDay(Languages.Finnish);\n\t\t assertEquals(actual, expected);\t\t \n\t }",
"public final int getDayOfWeek()\n {\n return dayOfWeek(ordinal);\n\n }",
"@DynamoDBTypeConverted(converter = TimeSlotConverter.class)\n @DynamoDBAttribute(attributeName = \"monday\")\n public final TimeSlot getMonday() {\n return monday;\n }",
"public DayOfWeek diaDaSemana(LocalDate d);",
"private String dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }",
"public DayOfWeek primeiroDiaSemanaAno(int ano);",
"public int getDayOfWeekNr() {\n\t\treturn ((int) (this.jd - 5.5)) % 7;\n\t}",
"public DayOfWeek getDay(String dow)\r\n {\r\n int month=Integer.parseInt(dow.substring(0,2));\r\n int date=Integer.parseInt(dow.substring(3,5));\r\n int year=Integer.parseInt(dow.substring(6));\r\n LocalDate ld=LocalDate.of(year,month,date);\r\n DayOfWeek day=ld.getDayOfWeek();\r\n return day;\r\n }",
"public int getWeekDay()\n\t{\n\t\tif (m_nType == AT_WEEK_DAY)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}",
"int getWeek();",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"private WeekData extract_year_data(String json_string){\n try {\n JSONObject jsonObj = new JSONObject(json_string);\n WeekData wd = new WeekData();\n wd.setYear(jsonObj.getInt(\"year\"));\n wd.setWeek(jsonObj.getJSONArray(\"week\"));\n wd.setDays(jsonObj.getJSONArray(\"days\"));\n\n return wd;\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public int getWeekDay() {\r\n return this.weekday - 1;\r\n }",
"public static synchronized int getDayOfWeekNr(double jd) {\n\t\treturn ((int) (jd - 5.5)) % 7;\n\t}",
"public Date getDay() {\n return day;\n }",
"public void setDayOfWeek(final int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }"
] |
[
"0.6131328",
"0.61245066",
"0.5999135",
"0.5941413",
"0.5687417",
"0.5682057",
"0.5620294",
"0.5606591",
"0.56063324",
"0.560225",
"0.558017",
"0.5572138",
"0.5564908",
"0.5564908",
"0.5564908",
"0.5560289",
"0.5559266",
"0.5538089",
"0.55326855",
"0.5528263",
"0.5525973",
"0.5517686",
"0.55118686",
"0.5510258",
"0.5510258",
"0.5510258",
"0.5501159",
"0.54940826",
"0.5469989",
"0.5465525",
"0.54584676",
"0.54523504",
"0.5440045",
"0.5437689",
"0.5430862",
"0.5422976",
"0.54122716",
"0.5406315",
"0.53911316",
"0.53746533",
"0.5370378",
"0.5365345",
"0.5365251",
"0.5356896",
"0.53436553",
"0.5336132",
"0.53232795",
"0.53101563",
"0.5307492",
"0.52789164",
"0.52721965",
"0.52721965",
"0.52240145",
"0.51939166",
"0.517874",
"0.5173576",
"0.5167688",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51651335",
"0.51648664",
"0.51625055",
"0.51480573",
"0.51348144",
"0.5083942",
"0.5083942",
"0.5083942",
"0.50750834",
"0.50634307",
"0.5061134",
"0.50533265",
"0.5042444",
"0.504074",
"0.5038961",
"0.5021979",
"0.50214946",
"0.50214946",
"0.50211567",
"0.5014934",
"0.50111586",
"0.5011113",
"0.50066924",
"0.49911588",
"0.49798042",
"0.49788776",
"0.4971786",
"0.49622023",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49514073",
"0.4946642",
"0.49380344",
"0.49201283",
"0.49198148"
] |
0.56554824
|
6
|
.hts.common.DayOfWeek day = 3 [json_name = "day"];
|
public Builder setDay(app.onepass.apis.DayOfWeek value) {
if (value == null) {
throw new NullPointerException();
}
day_ = value.getNumber();
onChanged();
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"com.czht.face.recognition.Czhtdev.Week getWeekday();",
"io.dstore.values.StringValue getDay();",
"public int getDayOfWeek();",
"@JSProperty(\"startOfWeek\")\n double getStartOfWeek();",
"@java.lang.Override public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }",
"public Integer getDayOfWeek() {\n return dayOfWeek;\n }",
"@java.lang.Override\n public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }",
"public void setDay(int day)\n {\n this.day = day;\n }",
"io.dstore.values.StringValueOrBuilder getDayOrBuilder();",
"public String getDay() {\n return this.day;\n }",
"String getDayofservice();",
"public void setDay(int day) {\r\n this.day = day;\r\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public Integer getDay()\n {\n return this.day;\n }",
"public String getDayOfWeek(){\n\t\treturn dayOfWeek;\n\t}",
"@JSProperty(\"startOfWeek\")\n void setStartOfWeek(double value);",
"public int getDay(){\n\t return this.day;\n }",
"public void setDay(String day) {\n\n\t\tthis.day = day;\n\t}",
"public void setDay(byte value) {\r\n this.day = value;\r\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public int getDay() {\n if (USE_SERIALIZABLE) {\n return childBuilder.getDay();\n } else {\n // @todo Replace with real Builder object if possible\n return convertNullToNOT_SET(childBuilderElement.getAttributeValue(\"day\"));\n }\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public int getDay()\n {\n return day;\n }",
"public byte getDay() {\r\n return day;\r\n }",
"public final native int getDay() /*-{\n return this.getDay();\n }-*/;",
"void mo350a(C0636l c0636l, JsonValue jsonValue);",
"public byte getDay() {\n return day;\n }",
"public int getDay() {\n return day;\n }",
"public int getDayOfWeek() {\n return this.dayOfWeek;\n }",
"Integer getDay();",
"public int getDay(){\n\t\treturn day;\n\t}",
"public String getDayOfWeek() {\r\n return dayOfWeek;\r\n }",
"public void setDayOfWeek(String dayOfWeek) {\r\n this.dayOfWeek = dayOfWeek;\r\n }",
"public void setDayOfWeek(Integer dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"public int getDay() {\r\n return day;\r\n }",
"@Test\n public void getterDayOfWeek(){\n ScheduleEntry entry = new ScheduleEntry();\n entry.setCalendar(calendar);\n entry.setDepartureTime(DepartureTime);\n Assert.assertEquals(25,entry.getDayOfWeek());\n }",
"public void setDayOfWeek(String dayOfWeek){\n\t\tthis.dayOfWeek = dayOfWeek;\n\t}",
"com.czht.face.recognition.Czhtdev.WeekOrBuilder getWeekdayOrBuilder();",
"@java.lang.Override public int getDayValue() {\n return day_;\n }",
"public int getDay() {\n\treturn day;\n }",
"public void setDayOfWeek(DayTemplate dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"public void setDayOfWeek(int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"DayOfWeek getUserVoteSalaryWeeklyDayOfWeek();",
"private WeekDays(String mood){\n this.mood = mood;\n }",
"public String getDay() {\n\t\treturn day;\n\t}",
"public void setDay(int day) {\n\t\tthis.day = day;\n\t}",
"public void setDay(int day) {\n\t\tthis.day = day;\n\t}",
"@Test\n public void DayOfWeek() {\n System.out.printf(\"%s%n\\n\", DayOfWeek.MONDAY.plus(3));\n\n DayOfWeek dow = DayOfWeek.MONDAY;\n Locale locale = Locale.getDefault();\n System.out.println(dow.getDisplayName(TextStyle.FULL, locale));\n System.out.println(dow.getDisplayName(TextStyle.NARROW, locale));\n System.out.println(dow.getDisplayName(TextStyle.SHORT, locale));\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"String updateDay(String userName, Day day);",
"@java.lang.Override public int getDayValue() {\n return day_;\n }",
"public void setDay(final short day) {\r\n\t\tthis.day = day;\r\n\t}",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"private void dayOfWeek(HplsqlParser.Expr_func_paramsContext ctx) {\n Integer v = getPartOfDate(ctx, Calendar.DAY_OF_WEEK);\n if (v != null) {\n evalInt(v);\n }\n else {\n evalNull();\n }\n }",
"@WebMethod(operationName = \"total-data-jh-rki\")\n String getTotalDataJHRKI(@WebParam(name = \"days\") int days) throws JsonProcessingException;",
"io.dstore.values.TimestampValue getDay();",
"public void setDay(Date day) {\n this.day = day;\n }",
"public void setDayOfTheWeek(String day){\r\n this.dayOfTheWeek.setText(day);\r\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"public String getDay() {\n\n\t\treturn day;\n\t}",
"@Test\n\t public void testDayInEnglish(){\n\t\t TimeSource mock = new MockTimeSource();\n\t\t Watch test = new FinnishWatch(mock);\n\t\t String expected = EnumarationDays.mercredi.getEnglish();\n\t\t String actual = test.getDay(Languages.English);\n\t\t assertEquals(actual, expected);\t\t \n\t }",
"public void setDay(final int day) {\n\t\tthis.day = day;\n\t}",
"@DynamoDBTypeConverted(converter = TimeSlotConverter.class)\n @DynamoDBAttribute(attributeName = \"wednesday\")\n public final TimeSlot getWednesday() {\n return wednesday;\n }",
"public HashMap<String, String> getSomeDaydata(int day) {\n\t\tif(day >= 0 && day <=4){\n\t\t\ttry {\n\t\t\t\tHashMap<String, String> day2Map = new HashMap<String, String>();\n\t\t\t\tJsonObject day2Object = this.jsonForecastArray.get(day).getAsJsonObject();\n\t\t\t\tday2Map.put(\"日期\", day2Object.get(\"date\").getAsString());\n\t\t\t\tday2Map.put(\"最高温\", day2Object.get(\"high\").getAsString());\n\t\t\t\tday2Map.put(\"最低温\", day2Object.get(\"low\").getAsString());\n\t\t\t\tday2Map.put(\"风力\", day2Object.get(\"fengli\").getAsString());\n\t\t\t\tday2Map.put(\"天气\", day2Object.get(\"type\").getAsString());\n\t\t\t\treturn day2Map;\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(\"WeatherRequest Class\", \"Hashmap hasn't init\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@JsonGetter(\"joiningDay\")\n public Days getJoiningDay ( ) { \n return this.joiningDay;\n }",
"public static DayTraining newInstance(String json) {\n try {\n JSONObject root = new JSONObject(json);\n return new DayTraining.Builder()\n .setRunning( root.optInt(\"t1\"), root.optInt(\"t2\"), root.optInt(\"t3\"), root.optInt(\"t2_3\"), root.optInt(\"t1_3\"), root.optInt(\"ta\"), root.optInt(\"tt\"))\n .setBreathing(root.optInt(\"gx\"), root.optInt(\"gp\"),root.optInt(\"gd\"))\n .setTrainingInfo(root.optInt(\"id_athlete\"), root.optString(\"date\"), filterJsonTotalInput(root.optString(\"description\")), root.optInt(\"texniki\"), root.optInt(\"drastiriotita\"), root.optInt(\"time\"), root.optInt(\"number\"), root.optInt(\"id_race\"))\n .build();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public Weekday() {\n }",
"public int getDay() {\n\t\treturn this.day;\n\t}",
"public int getDay() {\n\t\treturn this.day;\n\t}",
"@Test\n\t public void testDayInFinnish(){\n\t\t TimeSource mock = new MockTimeSource();\n\t\t Watch test = new FinnishWatch(mock);\t\n\t\t String expected = EnumarationDays.mercredi.getFinnish();\n\t\t String actual = test.getDay(Languages.Finnish);\n\t\t assertEquals(actual, expected);\t\t \n\t }",
"public final int getDayOfWeek()\n {\n return dayOfWeek(ordinal);\n\n }",
"@DynamoDBTypeConverted(converter = TimeSlotConverter.class)\n @DynamoDBAttribute(attributeName = \"monday\")\n public final TimeSlot getMonday() {\n return monday;\n }",
"public DayOfWeek diaDaSemana(LocalDate d);",
"private String dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }",
"public DayOfWeek primeiroDiaSemanaAno(int ano);",
"public int getDayOfWeekNr() {\n\t\treturn ((int) (this.jd - 5.5)) % 7;\n\t}",
"public DayOfWeek getDay(String dow)\r\n {\r\n int month=Integer.parseInt(dow.substring(0,2));\r\n int date=Integer.parseInt(dow.substring(3,5));\r\n int year=Integer.parseInt(dow.substring(6));\r\n LocalDate ld=LocalDate.of(year,month,date);\r\n DayOfWeek day=ld.getDayOfWeek();\r\n return day;\r\n }",
"public int getWeekDay()\n\t{\n\t\tif (m_nType == AT_WEEK_DAY)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}",
"int getWeek();",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"private WeekData extract_year_data(String json_string){\n try {\n JSONObject jsonObj = new JSONObject(json_string);\n WeekData wd = new WeekData();\n wd.setYear(jsonObj.getInt(\"year\"));\n wd.setWeek(jsonObj.getJSONArray(\"week\"));\n wd.setDays(jsonObj.getJSONArray(\"days\"));\n\n return wd;\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public int getWeekDay() {\r\n return this.weekday - 1;\r\n }",
"public static synchronized int getDayOfWeekNr(double jd) {\n\t\treturn ((int) (jd - 5.5)) % 7;\n\t}",
"public Date getDay() {\n return day;\n }",
"public void setDayOfWeek(final int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }"
] |
[
"0.6131328",
"0.61245066",
"0.5999135",
"0.5941413",
"0.5687417",
"0.5682057",
"0.56554824",
"0.5620294",
"0.5606591",
"0.56063324",
"0.560225",
"0.558017",
"0.5572138",
"0.5564908",
"0.5564908",
"0.5564908",
"0.5560289",
"0.5559266",
"0.5538089",
"0.55326855",
"0.5528263",
"0.5525973",
"0.5517686",
"0.55118686",
"0.5510258",
"0.5510258",
"0.5510258",
"0.5501159",
"0.54940826",
"0.5469989",
"0.5465525",
"0.54584676",
"0.54523504",
"0.5440045",
"0.5437689",
"0.5430862",
"0.5422976",
"0.54122716",
"0.5406315",
"0.53911316",
"0.53746533",
"0.5370378",
"0.5365345",
"0.5365251",
"0.5356896",
"0.53436553",
"0.5336132",
"0.53232795",
"0.53101563",
"0.5307492",
"0.52789164",
"0.52721965",
"0.52721965",
"0.52240145",
"0.51939166",
"0.517874",
"0.5173576",
"0.5167688",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51651335",
"0.51648664",
"0.51625055",
"0.51480573",
"0.51348144",
"0.5083942",
"0.5083942",
"0.5083942",
"0.50750834",
"0.50634307",
"0.5061134",
"0.50533265",
"0.5042444",
"0.504074",
"0.5038961",
"0.5021979",
"0.50214946",
"0.50214946",
"0.50211567",
"0.5014934",
"0.50111586",
"0.5011113",
"0.50066924",
"0.49911588",
"0.49798042",
"0.49788776",
"0.4971786",
"0.49622023",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49514073",
"0.4946642",
"0.49380344",
"0.49201283",
"0.49198148"
] |
0.0
|
-1
|
.hts.common.DayOfWeek day = 3 [json_name = "day"];
|
public Builder clearDay() {
day_ = 0;
onChanged();
return this;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"com.czht.face.recognition.Czhtdev.Week getWeekday();",
"io.dstore.values.StringValue getDay();",
"public int getDayOfWeek();",
"@JSProperty(\"startOfWeek\")\n double getStartOfWeek();",
"@java.lang.Override public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }",
"public Integer getDayOfWeek() {\n return dayOfWeek;\n }",
"@java.lang.Override\n public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }",
"public void setDay(int day)\n {\n this.day = day;\n }",
"io.dstore.values.StringValueOrBuilder getDayOrBuilder();",
"public String getDay() {\n return this.day;\n }",
"String getDayofservice();",
"public void setDay(int day) {\r\n this.day = day;\r\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public Integer getDay()\n {\n return this.day;\n }",
"public String getDayOfWeek(){\n\t\treturn dayOfWeek;\n\t}",
"@JSProperty(\"startOfWeek\")\n void setStartOfWeek(double value);",
"public int getDay(){\n\t return this.day;\n }",
"public void setDay(String day) {\n\n\t\tthis.day = day;\n\t}",
"public void setDay(byte value) {\r\n this.day = value;\r\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public int getDay() {\n if (USE_SERIALIZABLE) {\n return childBuilder.getDay();\n } else {\n // @todo Replace with real Builder object if possible\n return convertNullToNOT_SET(childBuilderElement.getAttributeValue(\"day\"));\n }\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public int getDay()\n {\n return day;\n }",
"public byte getDay() {\r\n return day;\r\n }",
"public final native int getDay() /*-{\n return this.getDay();\n }-*/;",
"void mo350a(C0636l c0636l, JsonValue jsonValue);",
"public byte getDay() {\n return day;\n }",
"public int getDay() {\n return day;\n }",
"public int getDayOfWeek() {\n return this.dayOfWeek;\n }",
"Integer getDay();",
"public int getDay(){\n\t\treturn day;\n\t}",
"public String getDayOfWeek() {\r\n return dayOfWeek;\r\n }",
"public void setDayOfWeek(String dayOfWeek) {\r\n this.dayOfWeek = dayOfWeek;\r\n }",
"public void setDayOfWeek(Integer dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"public int getDay() {\r\n return day;\r\n }",
"@Test\n public void getterDayOfWeek(){\n ScheduleEntry entry = new ScheduleEntry();\n entry.setCalendar(calendar);\n entry.setDepartureTime(DepartureTime);\n Assert.assertEquals(25,entry.getDayOfWeek());\n }",
"public void setDayOfWeek(String dayOfWeek){\n\t\tthis.dayOfWeek = dayOfWeek;\n\t}",
"com.czht.face.recognition.Czhtdev.WeekOrBuilder getWeekdayOrBuilder();",
"@java.lang.Override public int getDayValue() {\n return day_;\n }",
"public int getDay() {\n\treturn day;\n }",
"public void setDayOfWeek(DayTemplate dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"public void setDayOfWeek(int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }",
"DayOfWeek getUserVoteSalaryWeeklyDayOfWeek();",
"private WeekDays(String mood){\n this.mood = mood;\n }",
"public String getDay() {\n\t\treturn day;\n\t}",
"public void setDay(int day) {\n\t\tthis.day = day;\n\t}",
"public void setDay(int day) {\n\t\tthis.day = day;\n\t}",
"@Test\n public void DayOfWeek() {\n System.out.printf(\"%s%n\\n\", DayOfWeek.MONDAY.plus(3));\n\n DayOfWeek dow = DayOfWeek.MONDAY;\n Locale locale = Locale.getDefault();\n System.out.println(dow.getDisplayName(TextStyle.FULL, locale));\n System.out.println(dow.getDisplayName(TextStyle.NARROW, locale));\n System.out.println(dow.getDisplayName(TextStyle.SHORT, locale));\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"String updateDay(String userName, Day day);",
"@java.lang.Override public int getDayValue() {\n return day_;\n }",
"public void setDay(final short day) {\r\n\t\tthis.day = day;\r\n\t}",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"public void setDay(Date day) {\r\n this.day = day;\r\n }",
"private void dayOfWeek(HplsqlParser.Expr_func_paramsContext ctx) {\n Integer v = getPartOfDate(ctx, Calendar.DAY_OF_WEEK);\n if (v != null) {\n evalInt(v);\n }\n else {\n evalNull();\n }\n }",
"@WebMethod(operationName = \"total-data-jh-rki\")\n String getTotalDataJHRKI(@WebParam(name = \"days\") int days) throws JsonProcessingException;",
"io.dstore.values.TimestampValue getDay();",
"public void setDay(Date day) {\n this.day = day;\n }",
"public void setDayOfTheWeek(String day){\r\n this.dayOfTheWeek.setText(day);\r\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"public String getDay() {\n\n\t\treturn day;\n\t}",
"@Test\n\t public void testDayInEnglish(){\n\t\t TimeSource mock = new MockTimeSource();\n\t\t Watch test = new FinnishWatch(mock);\n\t\t String expected = EnumarationDays.mercredi.getEnglish();\n\t\t String actual = test.getDay(Languages.English);\n\t\t assertEquals(actual, expected);\t\t \n\t }",
"public void setDay(final int day) {\n\t\tthis.day = day;\n\t}",
"@DynamoDBTypeConverted(converter = TimeSlotConverter.class)\n @DynamoDBAttribute(attributeName = \"wednesday\")\n public final TimeSlot getWednesday() {\n return wednesday;\n }",
"public HashMap<String, String> getSomeDaydata(int day) {\n\t\tif(day >= 0 && day <=4){\n\t\t\ttry {\n\t\t\t\tHashMap<String, String> day2Map = new HashMap<String, String>();\n\t\t\t\tJsonObject day2Object = this.jsonForecastArray.get(day).getAsJsonObject();\n\t\t\t\tday2Map.put(\"日期\", day2Object.get(\"date\").getAsString());\n\t\t\t\tday2Map.put(\"最高温\", day2Object.get(\"high\").getAsString());\n\t\t\t\tday2Map.put(\"最低温\", day2Object.get(\"low\").getAsString());\n\t\t\t\tday2Map.put(\"风力\", day2Object.get(\"fengli\").getAsString());\n\t\t\t\tday2Map.put(\"天气\", day2Object.get(\"type\").getAsString());\n\t\t\t\treturn day2Map;\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(\"WeatherRequest Class\", \"Hashmap hasn't init\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@JsonGetter(\"joiningDay\")\n public Days getJoiningDay ( ) { \n return this.joiningDay;\n }",
"public static DayTraining newInstance(String json) {\n try {\n JSONObject root = new JSONObject(json);\n return new DayTraining.Builder()\n .setRunning( root.optInt(\"t1\"), root.optInt(\"t2\"), root.optInt(\"t3\"), root.optInt(\"t2_3\"), root.optInt(\"t1_3\"), root.optInt(\"ta\"), root.optInt(\"tt\"))\n .setBreathing(root.optInt(\"gx\"), root.optInt(\"gp\"),root.optInt(\"gd\"))\n .setTrainingInfo(root.optInt(\"id_athlete\"), root.optString(\"date\"), filterJsonTotalInput(root.optString(\"description\")), root.optInt(\"texniki\"), root.optInt(\"drastiriotita\"), root.optInt(\"time\"), root.optInt(\"number\"), root.optInt(\"id_race\"))\n .build();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public Weekday() {\n }",
"public int getDay() {\n\t\treturn this.day;\n\t}",
"public int getDay() {\n\t\treturn this.day;\n\t}",
"@Test\n\t public void testDayInFinnish(){\n\t\t TimeSource mock = new MockTimeSource();\n\t\t Watch test = new FinnishWatch(mock);\t\n\t\t String expected = EnumarationDays.mercredi.getFinnish();\n\t\t String actual = test.getDay(Languages.Finnish);\n\t\t assertEquals(actual, expected);\t\t \n\t }",
"public final int getDayOfWeek()\n {\n return dayOfWeek(ordinal);\n\n }",
"@DynamoDBTypeConverted(converter = TimeSlotConverter.class)\n @DynamoDBAttribute(attributeName = \"monday\")\n public final TimeSlot getMonday() {\n return monday;\n }",
"public DayOfWeek diaDaSemana(LocalDate d);",
"private String dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }",
"public DayOfWeek primeiroDiaSemanaAno(int ano);",
"public int getDayOfWeekNr() {\n\t\treturn ((int) (this.jd - 5.5)) % 7;\n\t}",
"public DayOfWeek getDay(String dow)\r\n {\r\n int month=Integer.parseInt(dow.substring(0,2));\r\n int date=Integer.parseInt(dow.substring(3,5));\r\n int year=Integer.parseInt(dow.substring(6));\r\n LocalDate ld=LocalDate.of(year,month,date);\r\n DayOfWeek day=ld.getDayOfWeek();\r\n return day;\r\n }",
"public int getWeekDay()\n\t{\n\t\tif (m_nType == AT_WEEK_DAY)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}",
"int getWeek();",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"public Date getDay() {\r\n return day;\r\n }",
"private WeekData extract_year_data(String json_string){\n try {\n JSONObject jsonObj = new JSONObject(json_string);\n WeekData wd = new WeekData();\n wd.setYear(jsonObj.getInt(\"year\"));\n wd.setWeek(jsonObj.getJSONArray(\"week\"));\n wd.setDays(jsonObj.getJSONArray(\"days\"));\n\n return wd;\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public int getWeekDay() {\r\n return this.weekday - 1;\r\n }",
"public static synchronized int getDayOfWeekNr(double jd) {\n\t\treturn ((int) (jd - 5.5)) % 7;\n\t}",
"public Date getDay() {\n return day;\n }",
"public void setDayOfWeek(final int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }"
] |
[
"0.6131328",
"0.61245066",
"0.5999135",
"0.5941413",
"0.5687417",
"0.5682057",
"0.56554824",
"0.5620294",
"0.5606591",
"0.56063324",
"0.560225",
"0.558017",
"0.5572138",
"0.5564908",
"0.5564908",
"0.5564908",
"0.5560289",
"0.5559266",
"0.5538089",
"0.55326855",
"0.5528263",
"0.5525973",
"0.5517686",
"0.55118686",
"0.5510258",
"0.5510258",
"0.5510258",
"0.5501159",
"0.54940826",
"0.5469989",
"0.5465525",
"0.54584676",
"0.54523504",
"0.5440045",
"0.5437689",
"0.5430862",
"0.5422976",
"0.54122716",
"0.5406315",
"0.53911316",
"0.53746533",
"0.5370378",
"0.5365345",
"0.5365251",
"0.5356896",
"0.53436553",
"0.5336132",
"0.53232795",
"0.53101563",
"0.5307492",
"0.52789164",
"0.52721965",
"0.52721965",
"0.52240145",
"0.51939166",
"0.517874",
"0.5173576",
"0.5167688",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51671785",
"0.51651335",
"0.51648664",
"0.51625055",
"0.51480573",
"0.51348144",
"0.5083942",
"0.5083942",
"0.5083942",
"0.50750834",
"0.50634307",
"0.5061134",
"0.50533265",
"0.5042444",
"0.504074",
"0.5038961",
"0.5021979",
"0.50214946",
"0.50214946",
"0.50211567",
"0.5014934",
"0.50111586",
"0.5011113",
"0.50066924",
"0.49911588",
"0.49798042",
"0.49788776",
"0.4971786",
"0.49622023",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49515516",
"0.49514073",
"0.4946642",
"0.49380344",
"0.49201283",
"0.49198148"
] |
0.0
|
-1
|
Register booking method, keeps track of new bookings
|
public void registerNewBooking(Booking b) {
if (!newBooking.contains(b)
&& !modifiedBooking.contains(b)) {
newBooking.add(b);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void addBooking(Bookings b) {\n IController<Bookings> ic = new Controller<>();\n\n // Check whether the booking conflicts with another booking.\n for (Bookings booking : ic.readAll(Bookings.class)) {\n if (b.conflictsWith(booking)) {\n throw new IllegalArgumentException(\"That booking conflicts with another booking.\");\n }\n }\n\n Modules relatedModule = b.getModule();\n\n // Check whether the room is available at the given time.\n if (!b.getRooms().isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"That room is unavailable at this time.\");\n }\n // Check whether the students are available at that time.\n for (Students student : relatedModule.getStudents()) {\n if (!student.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A student is unavailable at this time.\");\n }\n }\n // Check whether the staff members are available at that time.\n for (Staff staff : relatedModule.getStaff()) {\n if (!staff.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A staff member is unavailable at this time.\");\n }\n }\n\n // Put the booking into the database.\n ic.create(b);\n System.out.println(b.confirmation() + \"\\n\");\n }",
"public void addBooking(Booking b)\r\n {\r\n bookings.add(b);\r\n }",
"public void registerDirtyBooking(Booking b) {\n if (!newBooking.contains(b)\n && !modifiedBooking.contains(b)) {\n modifiedBooking.add(b);\n }\n }",
"Booking createBooking(Booking newBooking) throws Exception;",
"public static void addBooking(BookingImpl b, String status){\n Firebase bRefChild;\n if(!status.equals(\"new\")){\n //Dispatched Booking\n //Removes from Awaiting_Dispatch and puts in Dispatched\n bRefChild = dRef.child(status);\n bRef.child(b.getBookingNumber()+\"\").removeValue();\n } else {\n bRefChild = bRef.child(b.getBookingNumber() + \"\");\n }\n bRefChild.child(\"pickup\").setValue(b.getPickUpAddress());//\n bRefChild.child(\"dropoff\").setValue(b.getDropOffAddress());//\n bRefChild.child(\"name\").setValue(b.getClientName());//\n bRefChild.child(\"time\").setValue(b.getTime().toString());\n bRefChild.child(\"comment\").setValue(b.getComments());//\n bRefChild.child(\"tel\").setValue(b.getClientTel());//\n bRefChild.child(\"email\").setValue(b.getClientEmail());//\n bRefChild.child(\"booking_number\").setValue(b.getBookingNumber());//\n bRefChild.child(\"account\").setValue(Cash.getInstance().getId());\n bRefChild.child(\"vehicle_type\").setValue(b.getVehicleType());\n bRefChild.child(\"no_passengers\").setValue(b.getNoPassengers());\n bRefChild.child(\"date\").setValue(b.getDate());\n try {\n bRefChild.child(\"time\").setValue(new SimpleDateFormat(\"HH:mm\").format(b.getTime()));\n } catch (IllegalArgumentException e){\n // Always throws this exception - unsure why as it saves correctly.\n // Do nothing as it still writes to database as expected\n // Maybe need to look at different formats for time?\n }\n bRefChild.child(\"price\").setValue(b.getPrice());\n\n }",
"public void insertBooking(){\n \n Validator v = new Validator();\n if (createBookingType.getValue() == null)\n {\n \n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Booking Type!\")\n .showInformation();\n \n return;\n \n }\n if (createBookingType.getValue().toString().equals(\"Repair\"))\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Go to Diagnosis and Repair tab for creating Repair Bookings!\")\n .showInformation();\n \n \n if(v.checkBookingDate(parseToDate(createBookingDate.getValue(),createBookingTimeStart.localTimeProperty().getValue()),\n parseToDate(createBookingDate.getValue(),createBookingTimeEnd.localTimeProperty().getValue()))\n && customerSet)\n \n { \n \n int mID = GLOBAL.getMechanicID();\n \n try {\n mID = Integer.parseInt(createBookingMechanic.getSelectionModel().getSelectedItem().toString().substring(0,1));\n } catch (Exception ex) {\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Mechanic!\")\n .showInformation();\n return;\n }\n \n if (mID != GLOBAL.getMechanicID())\n if (!getAuth(mID)) return;\n \n createBookingClass();\n dbH.insertBooking(booking);\n booking.setID(dbH.getLastBookingID());\n appointment = createAppointment(booking);\n closeWindow();\n \n }\n else\n {\n String extra = \"\";\n if (!customerSet) extra = \" Customer and/or Vehicle is not set!\";\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Errors with booking:\"+v.getError()+extra)\n .showInformation();\n }\n \n }",
"private void addBookings(List<Bookings> newBookings) {\n IController<Bookings> bookingController = new Controller<>();\n IController<Students> studentController = new Controller<>();\n IController<Staff> staffController = new Controller<>();\n\n // Get all bookings\n List<Bookings> allBookings = bookingController.readAll(Bookings.class);\n\n\n // Check if any booking clashes.\n int count = 0;\n for (Bookings b : newBookings) {\n System.out.println(\"Checking availability of booking #\" + count);\n for (Bookings booking : allBookings) {\n if (b.conflictsWith(booking)) {\n throw new IllegalArgumentException(\"That booking conflicts with another booking.\");\n }\n }\n\n Modules relatedModule = b.getModule();\n\n if (!b.getRooms().isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"That room is unavailable at the time (\" + b.getTime() + \").\");\n }\n for (Students student : relatedModule.getStudents()) {\n student = studentController.readById(Students.class, student.getStudentID(), true);\n if (!student.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A student is unavailable at this time. [\" + b.getTime() + \"] (\" + student.getStudentID() + \")\");\n }\n }\n for (Staff staff : relatedModule.getStaff()) {\n staff = staffController.readById(Staff.class, staff.getStaffID(), true);\n\n if (!staff.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A staff member is unavailable at this time. [\" + b.getTime() + \"] (\" + staff.getStaffID() + \")\");\n }\n }\n\n count++;\n }\n\n // Create the bookings\n for (Bookings b : newBookings) {\n bookingController.create(b);\n System.out.println(b.confirmation() + \"\\n\");\n }\n }",
"void registerDeleteBooking(Booking b) {\n if (!newBooking.contains(b)\n && !modifiedBooking.contains(b)\n && !deleteBooking.contains(b)) {\n deleteBooking.add(b);\n }\n }",
"public void makeBooking (Object booking);",
"public Booking saveBooking(Booking booking);",
"@PostMapping(\"/bookings\")\n @ResponseStatus(HttpStatus.CREATED)\n public Booking addBooking(@RequestBody Booking booking){\n bookingClient.addBooking(booking);\n return booking;\n }",
"public Boolean addBooking(Booking aBooking) {\r\n return this.bookings.add(aBooking);\r\n }",
"@RequestMapping(\"/create\")\n\tpublic Booking create(Booking booking) {\n\t\tbooking.setTravelDate(new Date());\n\t\tbooking = bookingRepository.save(booking);\n\t return booking;\n\t}",
"public Bookings saveBookingDetails(Bookings bookings) ;",
"public Event createBooking(RequestContext context) {\n\tHotel hotel = (Hotel) context.getFlowScope().get(\"hotel\");\n\tUser user = (User) context.getConversationScope().get(\"user\");\n\tBooking booking = new Booking(hotel, user);\n\tEntityManager em = (EntityManager) context.getFlowScope().get(\"entityManager\");\n\tem.persist(booking);\n\tcontext.getFlowScope().put(\"booking\", booking);\n\treturn success();\n }",
"@Override\r\n\tpublic boolean createBooking(Booking_IF bk) {\r\n\t\tPreparedStatement myStatement = null;\r\n\t\tString query = null;\r\n\t\tint count = 0;\r\n\t\ttry{\r\n\t\t\tquery = \"insert into Booking values(?,?);\";\r\n\t\t\tmyStatement = myCon.prepareStatement(query);\r\n\t\t\tmyStatement.setInt(2, bk.getUserid());\r\n\t\t\tmyStatement.setInt(1, bk.getShiftid());\r\n\t\t\tcount = myStatement.executeUpdate();\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally{\r\n\t\t\ttry {\r\n\t\t\t\tif (myStatement != null)\r\n\t\t\t\t\tmyStatement.close();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(count!=1){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t}",
"public void completeBooking(){\r\n\t\tbookings.putAll(tempBookings);\r\n\t\ttempBookings.clear();\r\n\t}",
"public void insertBooking(Booking booking) throws SQLException, Exception;",
"public GenericResponse<Booking> reserveRoom(Booking booking) {\n GenericResponse genericResponse = HotelBookingValidation.validateBookingInfo(logger, hotel, booking);\n if (genericResponse != null) {\n return genericResponse;\n }\n\n logger.info(booking.toString());\n\n if (hotel.getBookings().putIfAbsent(booking.getBookingRoom(), booking.getUser()) == null) {\n return GenericResponseUtils.generateFromSuccessfulData(booking);\n }\n\n logger.info(\"Oops. Please try again.\");\n return GenericResponseUtils.generateFromErrorMessage(\"Oops. Please try again.\");\n }",
"@Override\n\tpublic void insertBookData(BookingBus b) {\n\t\tuserdao.insertBookData(b);\n\t}",
"public void setBookingId(int booking_id) {\n this.booking_id = booking_id;\n }",
"@ModelAttribute(value = \"booking\")\n\tpublic Booking getNewBooking() {\n\t\tBooking booking = new Booking();\n\t\t\n\t\tlogger.info(\"getNewBooking() method: Returning a new instance of Booking\");\n\t\t\n\t\treturn booking;\n\t}",
"public void insert(Booking<?> booking) {\n\t\t\t\n\t\tBookingNode node = new BookingNode(booking);\n\t\tnode.setData(booking);\n\t\tnode.next = null;\n\t\t\t\n\t\tif(head == null) {\n\t\t\t\t\n\t\t\thead = node;\n\t\t}\n\t\telse {\n\t\t\t\t\n\t\t\tBookingNode n = head;\n\t\t\twhile(n.next!=null) {\n\t\t\t\tn = n.next;\n\t\t\t}\n\t\t\tn.next = node;\n\t\t}\n\t}",
"public void addBookings(String name, ArrayList<Integer> roomToUse, int month, int date, int stay) {\n\t\t\t\r\n\t\t\tBooking newCust = new Booking();\r\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint roomCap = 0; //Roomtype / capacity\r\n\t\t\tint roomNum; //Room Number\r\n\t\t\tRooms buffer; //used to store the rooms to add to the bookings\r\n\t\t\t\r\n\t\t\twhile(i < roomToUse.size()) { //add all rooms from the available list\r\n\t\t\t\troomNum = roomToUse.get(i); //get Room number of the avalable, non-clashing room to be booked\r\n\t\t\t\twhile(k < RoomDetails.size()) { //Looping through all rooms in a hotel\r\n\t\t\t\t\tbuffer = RoomDetails.get(k); \r\n\t\t\t\t\tif (buffer.getRoomNum() == roomNum) { //To get the capacity of the matching room\r\n\t\t\t\t\t\troomCap = buffer.getCapacity();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tnewCust.addRoom(roomNum, roomCap); //Add those rooms to the bookings with room number and type filled in\r\n\t\t\t\ti++;\r\n\t\t\t\tk=0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnewCust.addName(name); //add customer name to booking\r\n\t\t\tnewCust.addDates(month, date, stay); //add dates to the booking\r\n\t\t\t\r\n\t\t\tBookings.add(newCust); //adds the new booking into the hotel bookings list\r\n\t\t}",
"public Booking makeBooking(Customer customer, Airline flight, int baggage, String type, Date date);",
"@Test\n\tpublic void testBook() throws Exception {\n\t\tString createdReservationID = bookingManagement.book(USER_ID, Arrays.asList(room1.getId()),\n\t\t\t\tvalidStartDate, validEndDate);\n\t\t// a reservation must be returned\n\t\tassertNotNull(\"Reservation id is null\", createdReservationID);\n\t\tassertFalse(\"Reservation id is emtpy\", createdReservationID.isEmpty());\n\t\t// check if returned reservation is correct\n\t\tReservation createdReservation = bookingManagement.getReservation(createdReservationID);\n\t\tassertNotNull(\"Reservation of returned id was not found\", createdReservation);\n\n\t\tassertEquals(USER_ID, createdReservation.getBookingUserId());\n\n\t\tassertEquals(1, createdReservation.getBookedFacilityIds().size());\n\t\tassertTrue(createdReservation.getBookedFacilityIds().contains(room1.getId()));\n\t\tassertEquals(validStartDate, createdReservation.getStartTime());\n\t\tassertEquals(validEndDate, createdReservation.getEndTime());\n\t}",
"public void setBooking(Set<Booking> aBooking) {\n booking = aBooking;\n }",
"Reservation createReservation();",
"private void handleBooking() {\n\t\tString customerID;\n\t\tint recNo = table.getSelectedRow();\n\t\tif(recNo == -1){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tcustomerID = JOptionPane.showInputDialog(mainPanel,\n\t\t\t\t\t\"Enter Customer ID (8 Digits)\");\n\t\t\tif (customerID != null) {\t\n\t\t\t\tcontroller.reserveRoom(recNo, customerID);\n\t\n\t\t\t\tupdateTable(nameSearchBar.getText(),\n\t\t\t\t\t\tlocationSearchBar.getText());\n\t\t\t}\n\t\t} catch (final InvalidCustomerIDException icide) {\n\t\t\tJOptionPane.showMessageDialog(mainPanel, \"Invalid format!\");\n\t\t} catch (final BookingServiceException bse) {\n\t\t\tJOptionPane.showMessageDialog(mainPanel, bse.getMessage());\n\t\t} catch (final ServiceUnavailableException sue) {\n\t\t\tJOptionPane.showMessageDialog(null, sue.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public int makeBooking(BookingEventModel booking) {\n\n\t\tConnection connection = null;\n\t\tStatement statement = null;\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(databaseName);\n\t\t\tconnection.setAutoCommit(false);\n\t\t\tstatement = connection.createStatement();\n\n\t\t\tString sql = \"insert into bookings (email, checkin, checkout, price) \" +\n\t\t\t\t\tString.format(\"values ('%s', '%s', '%s', %d);\", booking.userEmail, formatter.format(booking.checkIn),\n\t\t\t\t\t\t\tformatter.format(booking.checkOut), booking.payment);\n\t\t\tstatement.executeUpdate(sql);\n\t\t\t//\t\t System.out.println(\"Inserted records into the table...\"+sql);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tstatement.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t//\t\t\ttry {\n\t\t\t//\t\t\t\tconnection.close();\n\t\t\t//\t\t\t} catch (SQLException e) {\n\t\t\t//\t\t\t\te.printStackTrace();\n\t\t\t//\t\t\t}\n\t\t}\n\n\t\tResultSet lastId = null;\n\t\tint bookingNumber = 0;\n\t\tStatement statement2 = null;\n\t\ttry {\n\t\t\t//\t\t\tconnection = DriverManager.getConnection(databaseName);\n\t\t\t//\t\t\tconnection.setAutoCommit(false);\n\t\t\tstatement2 = connection.createStatement();\n\t\t\tString sql = \"SELECT last_insert_rowid() FROM bookings\";\n\t\t\tlastId = statement2.executeQuery(sql);\n\n\t\t\tlastId.next();\n\t\t\tbookingNumber = lastId.getInt(1);\n\t\t\t//\t\t System.out.println(\"last id...\"+sql+\" \"+bookingNumber);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tlastId.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tstatement2.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconnection.commit();\n\t\t\t\tconnection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tStatement statement3 = null;\n\t\tfor (Room r: booking.rooms) {\n\t\t\ttry {\n\t\t\t\tconnection = DriverManager.getConnection(databaseName);\n\t\t\t\tconnection.setAutoCommit(false);\n\t\t\t\tstatement3 = connection.createStatement();\n\n\t\t\t\tString sql = String.format(\"insert into room_booking_junction (room_id, booking_id) values (%d, %d)\",\n\t\t\t\t\t\tr.getId(), bookingNumber);\n\t\t\t\tstatement3.executeUpdate(sql);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tstatement3.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\ttry {\n\t\t\t\t\tconnection.commit();\n\t\t\t\t\tconnection.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\tStatement statement4 = null;\n\t\tfor (HashMap.Entry<ExtraService, Integer> entry : booking.services.entrySet()){\n\t\t\ttry {\n\t\t\t\tconnection = DriverManager.getConnection(databaseName);\n\t\t\t\tconnection.setAutoCommit(false);\n\t\t\t\tstatement4 = connection.createStatement();\n\n\t\t\t\tString sql = String.format(\"insert into service_booking_junction (service_id, booking_id, amount) values (%d, %d, %d)\",\n\t\t\t\t\t\tentry.getKey().getId(), bookingNumber, entry.getValue());\n\t\t\t\tstatement4.executeUpdate(sql);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tstatement4.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\ttry {\n\t\t\t\t\tconnection.commit();\n\t\t\t\t\tconnection.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn bookingNumber;\n\t}",
"@Override\n\tpublic boolean insertRegisterBook(yw_RegisterBook yw_RegisterBook) {\n\t\tyw_RegisterBookMapper.insertRegisterBook(yw_RegisterBook);\n\t\treturn false;\n\t}",
"public void rebook(Booking temp) {\n\t\t\tBookings.add(temp);\r\n\t\t}",
"public void registerANewBoat(Boat boat){boats.add(boat);}",
"public void createBooking(Booking book) {\n\tStudentDAO studentDAO=new StudentDAO();\n\tstudentDAO.createBooking(book);\n}",
"void addReservation(ReservationDto reservationDto) ;",
"@Autowired\n public AvailabilityServiceImpl(final BookingService bookingService) {\n this.bookingService = bookingService;\n }",
"CurrentReservation createCurrentReservation();",
"public Booking() {\r\n\t\t/**\r\n\t\t*\tGet the number of milliSeconds from the system time and set it to the java.sql.Date\r\n\t\t*\tobject to create a booking number and also to set the start time.\r\n\t\t*/\r\n\t\tlong dateTimeMillis = System.currentTimeMillis();\r\n\t\t/**\r\n\t\t*\tThis date is for generating String bookingNo using the date and time values\r\n\t\t*/\r\n\t\tjava.util.Date date = new java.util.Date(dateTimeMillis);\r\n\t\t/**\r\n\t\t*\tPass the current date in sql.Timestamp object.\r\n\t\t*/\r\n\t\tstartTime = new java.sql.Timestamp(date.getTime());\r\n\t\t/**\r\n\t\t*\tLet it be 0 initially and then update it at the time of checkout\r\n\t\t*/\r\n\t\tendTime = new java.sql.Timestamp(0);\r\n\t}",
"@PostMapping(\"/add\")\r\n\tResponseEntity<BookingDetails> bookingprocess(@RequestBody CreateBookingRequest bookingDto){\r\n\t\tList<Seat> seats = choosenSeats(bookingDto.getChoosenSeats());\r\n\t\tdouble cost = getCost(seats);\r\n\t\t\r\n\t\tBooking booking=convertBookingDto(bookingDto,cost);\r\n\t\tbooking = bookingService.createBooking(booking,bookingDto.getPaymentMethod(),bookingDto.getScreenName());\r\n\t\t\r\n\t\tBookingDetails bookingDetails = convertBooking(booking);\r\n\t\tResponseEntity<BookingDetails> response = new ResponseEntity<BookingDetails>(bookingDetails,HttpStatus.OK);\r\n\t\treturn response;\r\n\t}",
"public void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tObject HotelID = cbHotelsOptions.getSelectedItem();\n\t\t\t\t\tHotel hotel;\n\t\t\t\t\thotel = (Hotel) HotelID;\n\t\t\t\t\tlong id = hotel.getUniqueId();\n\t\t\t\t\t//\tSystem.out.println(id);\n\t\t\t\t\tString inmonth = txtInMonth.getText();\n\t\t\t\t\tint inMonth = Integer.valueOf(inmonth);\n\t\t\t\t\tString inday = txtInDay.getText();\n\t\t\t\t\tint inDay = Integer.parseInt(inday);\n\t\t\t\t\tString outmonth = txtOutMonth.getText();\n\t\t\t\t\tint outMonth = Integer.valueOf(outmonth);\n\t\t\t\t\tString outday = txtOutDay.getText();\n\t\t\t\t\tint OutDay = Integer.parseInt(outday);\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\"Reservation.txt\", true);\n\t\t\t\t\tPrintWriter pw = new PrintWriter(fos);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * i then check the canBook method and according to the canBook method \n\t\t\t\t\t * i check if they can book, and if yes i add the reservation\n\t\t\t\t\t * otherwise it prints so the user may enter different values\n\t\t\t\t\t */\n\t\t\t\t\t{\n\t\t\t\t\t\tif(h.canBook(new Reservation(id,inMonth, inDay, OutDay)) == true) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treservation.add(new Reservation (id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\tr = new Reservation (id,inMonth, inDay, OutDay);\n\t\t\t\t\t\t\th.addResIfCanBook(new Reservation(id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\treservationsModel.addElement(r);\n\t\t\t\t\t\t\tpw.println( id + \" - \" + inMonth + \"-\"+ inDay+ \" - \" + outMonth + \"-\" + OutDay);\n\t\t\t\t\t\t\tpw.close();\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"These dates are already reserved\"\n\t\t\t\t\t\t\t\t\t+ \"\\nPlease try again!\");\t\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t/**\n\t\t\t\t * Then the catch Block checks for file not found exception\n\t\t\t\t */\n\t\t\t\tcatch (FileNotFoundException fnfe) \n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"File not found.\");\n\t\t\t\t}\n\t\t\t}",
"@Override\n public Reservation createReservation(String reservationID, Reservation newReservation) {\n Reservation reservation = new Reservation(getHostName(), getHostAddress(), getUID(), generateNextNumber());\n\n //Plan: Add new reservation into the list, then update it on firebase\n reservationList.add(reservation);\n\n //Get reference to reservation\n DatabaseReference userSpaceRef = FirebaseDatabase.getInstance().getReference().child(\"Host/\" + UID);\n return null;\n }",
"@Test\n @InSequence(1)\n public void testRegister(){\n Customer customer = createCustomerInstance(\"Jane Doe\", \"[email protected]\", \"07744754955\");\n //Customer customer = storeCustomer(customer0);\n Taxi taxi0 = createTaxiInstance(\"JK66AKB\",6);\n Taxi taxi = storeTaxi(taxi0);\n //create a GuestBooking with a future date.\n GuestBooking guestBooking = createGuestBookingInstance(customer, taxi.getId(), futureDate1);\n Response response = guestBookingRestService.createBooking(guestBooking);\n\n assertEquals(\"Unexpected response status\", 201, response.getStatus());\n log.info(\" New booking via GuestBookingService.createBooking was persisted and returned status \" + response.getStatus());\n }",
"@Override\n\tpublic void saveBooking(BookingDetails bookingDetails) {\n\t\tbookingDao.saveBooking(bookingDetails);\n\t}",
"public void bookFlight(){\n //Steps\n //1 Show the available flights. (at least one seat with 0)\n //2 User select a flight, and the system automatically set the seat with his id. he is not able to select the seat\n //3 User confirm the reservation \n //4 Flight reserved\n \n //1\n //FlightRepository.availableFlights();\n //Scanner input = new Scanner(System.in);\n //String flightNumber = input.nextLine();\n \n //2,3 and 4\n Flight flightObject = FlightRepository.getFlight(this.number);\n if (flightObject == null){\n System.out.println(\"Please select a valid flight number\");\n }\n flightObject.setPassengerSeat(this.PassengerID);\n }",
"public Set<Booking> getBooking() {\n return booking;\n }",
"private GuestBooking createGuestBookingInstance(Customer customer, Long taxiId, Date bookingDate ){\n GuestBooking booking = new GuestBooking();\n booking.setCustomer(customer);\n booking.setTaxiId(taxiId);\n booking.setBookingDate(bookingDate);\n return booking;\n }",
"private void createEvent() \n\t{\n\t\t// When the user clicks on the add button\n\t\tbtnAdd.addActionListener(new ActionListener() \n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\t//////////////////////////////////\n\t\t\t\t//////////////////////////////////\n\t\t\t\t//Adding Info To Reservation.txt//\n\t\t\t\t//////////////////////////////////\n\t\t\t\t//////////////////////////////////\n\t\t\t\t/**\n\t\t\t\t * First i surround the whole with with try.. catch block\n\t\t\t\t * First in the try block \n\t\t\t\t * i get the values of the check-in and check-out info\n\t\t\t\t * i save them in strings \n\t\t\t\t * then cast them in integers \n\t\t\t\t * and finally add it to Reservation.txt\n\t\t\t\t * then i close the file.\n\t\t\t\t */\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tObject HotelID = cbHotelsOptions.getSelectedItem();\n\t\t\t\t\tHotel hotel;\n\t\t\t\t\thotel = (Hotel) HotelID;\n\t\t\t\t\tlong id = hotel.getUniqueId();\n\t\t\t\t\t//\tSystem.out.println(id);\n\t\t\t\t\tString inmonth = txtInMonth.getText();\n\t\t\t\t\tint inMonth = Integer.valueOf(inmonth);\n\t\t\t\t\tString inday = txtInDay.getText();\n\t\t\t\t\tint inDay = Integer.parseInt(inday);\n\t\t\t\t\tString outmonth = txtOutMonth.getText();\n\t\t\t\t\tint outMonth = Integer.valueOf(outmonth);\n\t\t\t\t\tString outday = txtOutDay.getText();\n\t\t\t\t\tint OutDay = Integer.parseInt(outday);\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\"Reservation.txt\", true);\n\t\t\t\t\tPrintWriter pw = new PrintWriter(fos);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * i then check the canBook method and according to the canBook method \n\t\t\t\t\t * i check if they can book, and if yes i add the reservation\n\t\t\t\t\t * otherwise it prints so the user may enter different values\n\t\t\t\t\t */\n\t\t\t\t\t{\n\t\t\t\t\t\tif(h.canBook(new Reservation(id,inMonth, inDay, OutDay)) == true) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treservation.add(new Reservation (id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\tr = new Reservation (id,inMonth, inDay, OutDay);\n\t\t\t\t\t\t\th.addResIfCanBook(new Reservation(id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\treservationsModel.addElement(r);\n\t\t\t\t\t\t\tpw.println( id + \" - \" + inMonth + \"-\"+ inDay+ \" - \" + outMonth + \"-\" + OutDay);\n\t\t\t\t\t\t\tpw.close();\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"These dates are already reserved\"\n\t\t\t\t\t\t\t\t\t+ \"\\nPlease try again!\");\t\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t/**\n\t\t\t\t * Then the catch Block checks for file not found exception\n\t\t\t\t */\n\t\t\t\tcatch (FileNotFoundException fnfe) \n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"File not found.\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// When the user selects a specific hotel \n\t\tcbHotelsOptions.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * first i save selected hotel in a hotel object\n\t\t\t\t * then i get reservations for the selected hotel\n\t\t\t\t * then i make all the labels and text fields visible \n\t\t\t\t */\n\t\t\t\tHotel selectedHotel = (Hotel)cbHotelsOptions.getSelectedItem();\n\t\t\t\tJOptionPane.showMessageDialog(null, \"You selected the \" + selectedHotel.getHotelName());\n\t\t\t\tselectedHotel.getReservations();\n\t\t\t\tlblCheckIn.setVisible(true);\n\t\t\t\tlblInMonth.setVisible(true);\n\t\t\t\ttxtInMonth.setVisible(true);\n\t\t\t\tlblInDay.setVisible(true);\n\t\t\t\ttxtInDay.setVisible(true);\n\t\t\t\tlblCheckout.setVisible(true);\n\t\t\t\tlblOutMonth.setVisible(true);\n\t\t\t\ttxtOutMonth.setVisible(true);\n\t\t\t\tlblOutDay.setVisible(true);\n\t\t\t\ttxtOutDay.setVisible(true);\n\t\t\t\tbtnAdd.setVisible(true);\n\t\t\t\treservationsModel.removeAllElements();\n\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t//Reading Info From Reservation.txt//\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t/**\n\t\t\t\t * First i surround everything is a try.. catch blocks \n\t\t\t\t * then in the try block i declare the file input stream\n\t\t\t\t * then a scanner \n\t\t\t\t * then in a while loop i check if the file has next line \n\t\t\t\t * and a user a delimiter \"-\"\n\t\t\t\t * and it adds it to a new reservation\n\t\t\t\t * then it adds it to the ArrayList reservation\n\t\t\t\t * and it also adds it to the hotel object\n\t\t\t\t * then it checks if it can book that hotel\n\t\t\t\t * and if yes it adds it to the ReservationsModel\n\t\t\t\t */\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tFileInputStream fis = new FileInputStream(\"Reservation.txt\");\n\t\t\t\t\tScanner fscan = new Scanner (fis);\n\t\t\t\t\tint INMonth = 0;\n\t\t\t\t\tint INday = 0;\n\t\t\t\t\tint OUTmonth = 0;\n\t\t\t\t\tint OUTday = 0;\n\t\t\t\t\tlong iD = 0;\n\t\t\t\t\twhile (fscan.hasNextLine())\n\t\t\t\t\t{\n\t\t\t\t\t\tScanner ls = new Scanner (fscan.nextLine());\n\t\t\t\t\t\tls.useDelimiter(\"-\");\n\t\t\t\t\t\tiD = Integer.parseInt(ls.next().trim());\n\t\t\t\t\t\tINMonth = Integer.parseInt(ls.next().trim());\n\t\t\t\t\t\tINday = Integer.parseInt(ls.next().trim()); \n\t\t\t\t\t\tOUTmonth = Integer.parseInt(ls.next().trim());\n\t\t\t\t\t\tOUTday = Integer.parseInt(ls.next().trim()); \n\t\t\t\t\t\tr = new Reservation (iD,INMonth, INday, OUTmonth, OUTday);\n\t\t\t\t\t\th.addReservation(new Reservation(iD,INMonth, INday, OUTmonth, OUTday));\n\t\t\t\t\t\tHotel hotel = (Hotel) cbHotelsOptions.getSelectedItem();\n\t\t\t\t\t\tlong hotID = hotel.getUniqueId();\n\t\t\t\t\t\tif(iD == hotID)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treservationsModel.addElement((new Reservation(iD, INMonth, INday, OUTday)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * The catch block checks to make sure that the file is found\n\t\t\t\t */\n\t\t\t\tcatch( FileNotFoundException fnfe)\n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"File not found!\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * This is the setRenderer to make the hotel appear in the hotelsOptions \n\t\t * just the hotel name.\n\t\t */\n\t\tcbHotelsOptions.setRenderer(new DefaultListCellRenderer() {\n\t\t\t@Override\n\t\t\tpublic Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus)\n\t\t\t{\n\t\t\t\tComponent renderer = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n\t\t\t\tif (renderer instanceof JLabel && value instanceof Hotel)\n\t\t\t\t{\n\t\t\t\t\t// Here value will be of the Type 'Hotel'\n\t\t\t\t\t((JLabel) renderer).setText(((Hotel) value).getHotelName());\n\t\t\t\t}\n\t\t\t\treturn renderer;\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * The setCallRenderer is for the reservation's list\n\t\t * it only prints the check-in and check-out info\n\t\t */\n\t\tlstReservation.setCellRenderer(new DefaultListCellRenderer() {\n\t\t\t@Override\n\t\t\tpublic Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus)\n\t\t\t{\n\t\t\t\tComponent renderer = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n\t\t\t\tif (renderer instanceof JLabel && value instanceof Reservation)\n\t\t\t\t{\n\t\t\t\t\t// Here value will be of the Type 'Reservation'\n\t\t\t\t\tHotel selectedHotel = (Hotel) cbHotelsOptions.getSelectedItem();\n\t\t\t\t\t((JLabel) renderer).setText(((Reservation) value).getFormattedDisplayString());\n\t\t\t\t}\n\t\t\t\treturn renderer;\n\t\t\t}\n\t\t});\t\n\t}",
"@Override\r\n\tpublic void storedBook(Book book) {\n\t\tticketDao.insertBook(book);\r\n\t}",
"@PostMapping(value=\"/booking\")\n public String addBooking(@RequestBody BookingModel data) {\n TrainerModel a = t.getByEmail((data.getEmailTrainerDetail()));\n data.setTrainerDetail(t.getByEmail(data.getEmailTrainerDetail()));\n data.setClientDetail(u.get(data.getEmailClientDetail()));\n if(a.getBookingCount()<5){\n a.setBookingCount(a.getBookingCount()+1);\n t.updateTrainer(a);\n return b.addBooking(data);\n }else{\n return \"Cannot add more than 5 Pets\";\n }\n }",
"public void saveBorrowings() {\n\t}",
"@TargetApi(Build.VERSION_CODES.KITKAT)\n @RequiresApi(api = Build.VERSION_CODES.KITKAT)\n public void createReservation() {\n Time timeObj = null;\n DateFormat formatter= new SimpleDateFormat(\"kk:mm\");\n try {\n timeObj = new Time(formatter.parse(time).getTime());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n Bitmap generatedQR = generateQR();\n //Create reservation & save to Repository\n Reservation reservation = new Reservation(film, timeObj, listPlaces, generatedQR);\n Repository.addReservation(reservation);\n }",
"public void setBookingId(int value) {\n this.bookingId = value;\n }",
"public void setBookingId(int value) {\n this.bookingId = value;\n }",
"public int getBookingId() {\n return booking_id;\n }",
"public PossibleBooking createPossibleBooking(PossibleBooking possibleBooking) {\n ContentValues values = new ContentValues(); //Definere values til at repræsentereindholdet for tabellens rekord\n\n BookingSource bookingSource = new BookingSource(_context);\n\n if (!bookingSource.bookingExists(possibleBooking.getBooking()))\n possibleBooking.setBooking(bookingSource.createBooking(possibleBooking.getBooking()));\n\n values.put(DbHelper.COLUMN_POSSIBLEBOOKING_DURATION, possibleBooking.getDuration());\n values.put(DbHelper.COLUMN_FK_BOOKING_ID, possibleBooking.getBooking().getId());\n\n long insertId = _database.insert(DbHelper.TABLE_USER, null,\n values);//Definere en key til at indentificere kolonnens id\n\n return getPossibleBookingById(insertId); //Retunere den nye kommentar\n }",
"public static Booking getBooking() {\n return sBooking;\n }",
"public int getBookingId() {\n return bookingId;\n }",
"public int getBookingId() {\n return bookingId;\n }",
"void insertConfirm(bookingDTO booking) throws DataAccessException;",
"private void registerNewCourseOffering()\r\n {\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString courseFaculty = this.getClientIn().readLine();\r\n\t\t\tString courseNumberStr = this.getClientIn().readLine();\r\n\t\t\tString sectionNumberStr = this.getClientIn().readLine();\r\n\t\t\tint courseNumber = Integer.parseInt(courseNumberStr);\r\n\t\t\tint sectionNumber = Integer.parseInt(sectionNumberStr);\r\n\t\t\tCourseRegistration newReg = new CourseRegistration();\r\n\t \tnewReg.completeRegistration(this.getDBManager().getStudent(studentId), this.getDBManager().searchCourse(courseFaculty, courseNumber).getCourseOfferingAt(sectionNumber - 1));\r\n\t \tthis.getClientOut().printf(\"SUCCESS\\n\");\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\tthis.getClientOut().printf(\"ERROR\\nIOException while getting data from user\\n\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcatch(NumberFormatException e)\r\n\t\t{\r\n\t\t\tthis.getClientOut().printf(\"ERROR\\nPlease check the Course Number and/or Section Number. It must be an integer.\\n\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcatch(RegistrationException e)\r\n\t\t{\r\n\t\t\tthis.getClientOut().printf(\"ERROR\\nRegistration Error: %s\\n\", e.getMessage());\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcatch(CoursePreReqException e)\r\n\t\t{\r\n\t\t\tthis.getClientOut().printf(\"ERROR\\nRegistration Pre Req Error: %s\\n\", e.getMessage());\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tthis.getClientOut().flush();\r\n\t\t}\r\n }",
"static void presentBookingHistory(User booker) {\r\n\t\tBooking bookings = new Booking();\r\n\t\tResultSet historyRs = null;\r\n\r\n\t\tSystem.out.printf(\"*%14s%10s%18s%28s%28s%15s%11s\\n\", \"Booking No\", \"Lot No\", \"Car No\", \"Start Time\", \"End Time\", \"Cost\", \"*\");\r\n\t\tSystem.out.println(\"*****************************************************************************************************************************\");\r\n\t\ttry {\r\n\t\t\tDbConnection historyConn = new DbConnection();\r\n\t\t\thistoryRs = historyConn.fetchSelectUserByUNameBookings(booker.getUName());\r\n\t\t\twhile (historyRs.next()) {\r\n\t\t\t\tjava.sql.Timestamp endTime = historyRs.getTimestamp(6);\r\n\t\t\t\t/**\r\n\t\t\t\t*\tTo show only the ones which are not checked out yet\r\n\t\t\t\t*\tIf a record with end time as 0 is found, it will be considered as not booked and shown\r\n\t\t\t\t*/\r\n\t\t\t\tif (endTime.getTime() != 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tString bookingNo = historyRs.getString(1);\r\n\t\t\t\tint lotNo = historyRs.getInt(3);\r\n\t\t\t\tString carNo = historyRs.getString(4);\r\n\t\t\t\tjava.sql.Timestamp startTime = historyRs.getTimestamp(5);\r\n\t\t\t\tint cost = historyRs.getInt(7);\r\n\t\t\t\tbookings.setAllValues(bookingNo, lotNo, carNo, startTime, endTime, cost);\r\n\r\n\t\t\t\tbookings.showBookHistory();\r\n\t\t\t}\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"No records with the given booking number found\");\r\n\t\t\t//SqlExcep.printStackTrace();\r\n\t\t} catch (ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} catch (NullPointerException npExcep) {\r\n\t\t\tnpExcep.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\t//validateConn.closeDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t}",
"public static void AddBooking(Booking booking){\n \n \n try (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM booking\")){\n \n resultSet.moveToInsertRow();\n resultSet.updateInt(\"BookingNumber\", booking.getBookingNumber());\n resultSet.updateString(\"FlightNumber\", booking.getFlightNumber());\n resultSet.updateDouble(\"Price\", booking.getPrice());\n resultSet.updateString(\"CabinClass\", booking.getCabinClass());\n resultSet.updateInt(\"Quantity\", booking.getQuantity());\n resultSet.updateInt(\"Insurance\", booking.getInsurance());\n resultSet.insertRow();\n \n \n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n \n \n \n \n }",
"boolean addBillToReservation(long billId, long reservationId);",
"public NewBooking() {\n initComponents();\n setDate();\n setTime();\n loadcmbOrigin();\n loadcmbDestination();\n }",
"public void addReservation(Reservation reservation) {\n reservations.add(reservation);\n }",
"private void createReservations() {\n final String username = extractUsername();\n final EMail email = extractEMail();\n if (!isReserved(username) || !isReserved(email)) {\n signupDelegate.enableNextButton(Boolean.FALSE);\n SwingUtil.setCursor(this, java.awt.Cursor.WAIT_CURSOR);\n UsernameReservation usernameReservation = null;\n EMailReservation emailReservation = null;\n try {\n errorMessageJLabel.setText(getString(\"CheckingUsername\"));\n errorMessageJLabel.paintImmediately(0, 0, errorMessageJLabel\n .getWidth(), errorMessageJLabel.getHeight());\n \n // get username reservation\n usernameReservation = createUsernameReservation(username);\n if (null == usernameReservation) {\n unacceptableUsername = username;\n } else {\n usernameReservations.put(username.toLowerCase(), usernameReservation);\n }\n \n // get email reservation\n emailReservation = createEMailReservation(email);\n if (null == emailReservation) {\n unacceptableEMail = email;\n } else {\n emailReservations.put(email, emailReservation);\n }\n } catch (final OfflineException ox) {\n logger.logError(ox, \"An offline error has occured.\");\n temporaryError = getSharedString(\"ErrorOffline\");\n } catch (final Throwable t) {\n logger.logError(t, \"An unexpected error has occured.\");\n temporaryError = getSharedString(\"ErrorUnexpected\");\n } finally {\n SwingUtil.setCursor(this, null);\n }\n validateInput();\n }\n }",
"public BookingBean() {\n }",
"public BookingInfo() {\n }",
"public void reserveBook(String cardNo, String book_id) throws SQLException {\n\t\tPreparedStatement myStmt = null;\n\t\t\n\t\tString query = \" insert into book_loans (book_id, branch_id, card_no, date_out, date_due)\"\n\t\t + \" values (?, 9745, ?, curdate(), curdate()+7)\";\n\t\t\n\t\tmyStmt = myConn.prepareStatement(query);\n\t\t\n\t\tmyStmt.setString(1, book_id);\n\t\tmyStmt.setString(2, cardNo);\n\t\t\n\t\t\n\t\t\n\t\tmyStmt.execute();\n\t\t\n\t}",
"public Booking(String inUName, String inCarNo, int inLotNo) {\r\n\t\t/**\r\n\t\t*\tGet the number of milliSeconds from the system time and set it to the java.sql.Date\r\n\t\t*\tobject to create a booking number and also to set the start time.\r\n\t\t*/\r\n\t\tlong dateTimeMillis = System.currentTimeMillis();\r\n\t\t/**\r\n\t\t*\tThis date is for generating String bookingNo using the date and time values\r\n\t\t*/\r\n\t\tjava.util.Date date = new java.util.Date(dateTimeMillis);\r\n\t\t/**\r\n\t\t*\tSet a serialized booking Number generated using the present date and time\r\n\t\t*\tThe format of this string is:\r\n\t\t*\tDayMonthYearHourMinuteSecond\r\n\t\t*/\r\n\t\tbookingNo = \"\" + (date.getDay() + 1) + (date.getMonth() + 1) + (date.getYear() + 1900) + date.getHours() + date.getMinutes() + date.getSeconds();\r\n\t\t/**\r\n\t\t*\tSet the values of these fields as passed in the arguments\r\n\t\t*/\r\n\t\tuName = inUName;\r\n\t\tcarNo = inCarNo;\r\n\t\tlotNo = inLotNo;\r\n\t\tcost = 0;\r\n\t\t/**\r\n\t\t*\tPass the current date in sql.Timestamp object.\r\n\t\t*/\r\n\t\tstartTime = new java.sql.Timestamp(date.getTime());\r\n\t\t/**\r\n\t\t*\tLet it be 0 initially and then update it at the time of checkout\r\n\t\t*/\r\n\t\tendTime = new java.sql.Timestamp(0);\r\n\t}",
"private void userHasBooking() throws SQLException {\n BookingModel bookingModel2 = new BookingModel();\n if (bookingModel2.checkUserBooking(employeeID)) {\n hasBooking = true;\n } else {\n hasBooking = false;\n }\n\n }",
"public Booking createBooking(\n UserAccount customer, Employee employee, Product product, BookingRequest bookingRequest\n ) {\n Schedule schedule =\n scheduleService.findByEmployeeAndDate(employee, bookingRequest.getDate());\n boolean employeeNotScheduled = schedule == null;\n\n // date must be in next 14 days (including today)\n LocalDate future = LocalDate.now().plusDays(14);\n boolean invalidDate = !bookingRequest.getDate().isBefore(future);\n\n // time must be one of the permitted options\n boolean unsupportedTime = !Booking.permittedTimes.contains(bookingRequest.getTimeSlot());\n\n // booking must not have already started\n LocalDateTime startTime = LocalDateTime.of(bookingRequest.getDate(),\n LocalTime.parse(bookingRequest.getTimeSlot())\n );\n boolean invalidAppointmentStart = !startTime.isAfter(LocalDateTime.now());\n\n // employee must not have any preexisting overlapping bookings\n LocalDateTime endTime = startTime.plusMinutes(product.getDuration());\n boolean bookingConflict =\n this.conflictsWithExisting(schedule, employee, startTime, endTime);\n\n if (employeeNotScheduled ||\n invalidDate ||\n unsupportedTime ||\n invalidAppointmentStart ||\n bookingConflict) {\n throw new ConflictException(\"Appointment time not available\");\n }\n\n // now we can make the booking (and hopefully no new conflict has arisen in the\n // meantime)\n // TODO: handle race conditions (create, check conflicts, maybe rollback and error)\n\n Booking booking = new Booking();\n booking.setStatus(BookingStatus.PENDING);\n booking.setCustomer(customer);\n booking.setEmployee(employee);\n booking.setProduct(product);\n booking.setSchedule(schedule);\n booking.setTime(bookingRequest.getTimeSlot());\n this.saveOrUpdateBooking(booking);\n\n return booking;\n }",
"@RequestMapping(value=\"/add\", method = RequestMethod.POST)\r\n public void addAction(@RequestBody Reservation reservation){\n reservationService.create(reservation);\r\n }",
"@Test(expected = ValidationException.class)\n\tpublic void testFailedBooking_DuplicateBookings() throws ParseException {\n\t\t// Preparing booking data\n\t\tBooking booking = getExpectedBookingEntity();\n\t\t\n\t\tcom.paypal.bfs.test.bookingserv.service.model.Booking bookingServiceLayer \n\t\t = getServiceLayerBooking();\n\n\t\tMockito.when(bookingRepository.save(Mockito.any())).thenReturn(booking);\n\t\tMockito.when(bookingRepository.findExistingBookings(booking.getFirstName(), \n\t\t\t\tbooking.getLastName(), booking.getDateOfBirth(), \n\t\t\t\tbooking.getAddress().getZipCode())).thenReturn(Arrays.asList(booking));\n\t\tMockito.when(messageUtil.getLocalizedMessage(Mockito.anyString())).thenReturn(\"Test message\");\n\t\t\n\t\tbookingClient.createBooking(bookingServiceLayer);\n\t\t\n\t\t//Try to persist same booking again\n\t\tbookingClient.createBooking(bookingServiceLayer);\n\t\t\n\t}",
"public BookingInfoEntity createBooking(BookingInfoEntity bookingInfoEntity) {\n System.out.println(bookingInfoEntity.getFromDate() + \"\\t\" + bookingInfoEntity.getToDate());\n long noOfDays = ChronoUnit.DAYS.between(bookingInfoEntity.getFromDate(), bookingInfoEntity.getToDate());\n bookingInfoEntity.setRoomPrice( 1000 * bookingInfoEntity.getNumOfRooms() * ((int)noOfDays) );\n bookingInfoEntity.setRoomNumbers(getRandomNumber(bookingInfoEntity.getNumOfRooms()));\n bookingInfoEntity = bookingRepository.save(bookingInfoEntity); \n return bookingInfoEntity;\n }",
"public void setMyRoomReservationOK() throws SQLException{\n int guestID = guest[guestIndex].getAccountID();\n int selRoomCount = getSelectedRoomsCounter();\n int[] tempRooms = getGuestSelRooms(); //Selected room by room number\n \n roomStartDate = convertMonthToDigit(startMonth) + \"/\" +startDay+ \"/\" + startYear;\n roomEndDate = convertMonthToDigit(endMonth) + \"/\" +endDay+ \"/\" + endYear; \n \n System.out.println(\"\\nSaving reservation\");\n System.out.println(\"roomStartDate\" + roomStartDate);\n System.out.println(\"roomEndDate:\" + roomEndDate);\n \n //Searching the reserved room number in the hotel rooms\n for(int i=0;i<selRoomCount;i++){\n for(int i2=0;i2<roomCounter;i2++){\n if(myHotel[i2].getRoomNum() == tempRooms[i]){ \n //if room number from array is equal to selected room number by guest\n System.out.println(\"Room Found:\"+tempRooms[i]); \n \n myHotel[i2].setOccupantID(guestID);\n myHotel[i2].setAvailability(false);\n myHotel[i2].setOccupant(guest[guestIndex].getName());\n myHotel[i2].setStartDate(roomStartDate);\n myHotel[i2].setEndDate(roomEndDate);\n }\n }\n }\n \n updateRoomChanges_DB(); //apply changes to the database\n \n //Updates room preference of the current guest \n String sqlstmt = \"UPDATE APP.GUEST \"\n + \" SET ROOMPREF = '\" + guest[guestIndex].getPref()\n + \"' WHERE ID = \"+ guest[guestIndex].getAccountID();\n \n CallableStatement cs = con.prepareCall(sqlstmt); \n cs.execute(); //execute the sql command \n cs.close(); \n }",
"public BookedActivity getNewlyAddSavedTrip();",
"@Test(expected = BookingNotAllowedException.class)\n\tpublic void testBookNotAllowed() throws Exception {\n\t\tdataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), validStartDate, validEndDate);\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), validStartDate, validEndDate);\n\t}",
"private void booking(){\n usersOrderReference = mFirebaseInstance.getReference(\"UsersOrder\");\n\n // get reference to 'order'\n orderReference = mFirebaseInstance.getReference(\"Order\");\n\n String idOrder = orderReference.push().getKey();\n String idBarbershop = Common.barbershopSelected;\n String status = \"Waiting for approval\";\n\n Order orderdata = new Order(idOrder, userId, atasnama, idBarbershop, barbershop, barberman,\n service, totalharga, jadwal, status, phoneBarbershop, phoneUser);\n\n orderReference.child(Common.barbershopSelected).child(idOrder).setValue(orderdata);\n usersOrderReference.child(userId).child(idOrder).setValue(orderdata);\n\n// sendNotificationOrder(userId);\n\n sendOrderStatusToUser(Common.barbershopSelected,orderdata);\n\n }",
"Booking getBookingById(BookingKey bookingKey);",
"@Override\n public void toMyBookings() {\n }",
"public void getBookAvailability() {\n getBookReservationEligibility();\n }",
"public int addToBasket (Hotel h, String n, int i, boolean b) {\n\t\tif(b==true) {\n\t\tBnBReservation r2b = new BnBReservation(name,h,n,i);\n\t\tcustomerResos.add(r2b);\n\t\t}else {\n\t\tHotelReservation r2 = new HotelReservation(name,h, n, i);\n\t\tcustomerResos.add(r2);\n\t\t}\n\t\treturn customerResos.getNumOfReservations();\n\t}",
"@Override\n\tpublic HotelBooking bookRoom(HotelForm hotelForm, Session session) throws HibernateException, Exception{\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tHotelBooking hotelBooking = setDAOValues(hotelForm);\n\t\tsession.save(hotelBooking);\n\t\t\n\t\treturn null;\n\t}",
"PastReservation createPastReservation();",
"public String customer_request_booking(Customer_Booking cb){\n\t\tIdUser user= new IdUser();\n\t\tTransaction trns1 = null;\n Session session = HibernateUtil.getSessionFactory().openSession(); \n Booking_Request_Master book = new Booking_Request_Master();\n\t\ttry {\n trns1 = session.beginTransaction();\n Pickup_Location_Master pick_source=new Pickup_Location_Master();\n \tpick_source = (Pickup_Location_Master) session.createQuery(\"from Pickup_Location_Master where id=?\").setParameter(0, cb.getSource()).list().get(0);\n \tPickup_Location_Master pick_destin=new Pickup_Location_Master();\n \tpick_destin = (Pickup_Location_Master) session.createQuery(\"from Pickup_Location_Master where id=?\").setParameter(0, cb.getDestination()).list().get(0);\n \n \t\n book.setCreated_at(current_timestamp);\n book.setUpdated_at(current_timestamp);\n book.setProvided_time(cb.getTime()+\":00\");\n book.setSource_id(cb.getSource());\n book.setFrom_id(pick_source.getLocation_id());\n book.setDestination_id(cb.getDestination());\n book.setTo_id(pick_destin.getLocation_id());\n book.setDept_date(java.sql.Date.valueOf(cb.getDate()));\n book.setDept_time(java.sql.Time.valueOf(cb.getTime()+\":00\"));\n book.setNumber_of_booking(cb.getNumber_of_seat());\n book.setUser_id(user.getAuthentic());\n book.setEnabled(true);\n book.setStatus(\"Pending\");\n session.save(book);\n trns1.commit();\n } catch (RuntimeException e) {\n \te.printStackTrace();\n } \n\t\tfinally {\n session.flush();\n session.close();\n }\n\t\treturn \"success\";\n\t}",
"public void bookRoom(int hotelId, String roomNumber, int people){\n\n\n\n }",
"@PostMapping(value=\"/booking\" , consumes = MediaType.APPLICATION_JSON_VALUE ,\n produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity createBooking(@RequestBody BookingDTO bookingDTO){\n BookingInfoEntity booking = POJOConvertor.covertBookingDTOToEntity(bookingDTO);\n\n BookingInfoEntity savedBooking = bookingService.createBooking(booking);\n\n BookingDTO savedBookingDTO = POJOConvertor.covertBookingEntityToDTO(booking);\n\n return new ResponseEntity(savedBookingDTO , HttpStatus.CREATED);\n }",
"public int addToBasket (Airport one, Airport two) {\n\t\tFlightReservation r3 = new FlightReservation(name, one, two);\n\t\tcustomerResos.add(r3);\n\t\treturn customerResos.getNumOfReservations();\n\t}",
"public static void addBook(final @Valid Book book) {\n\t\tif (book.serie.id == null) {\r\n\t\t\tValidation.required(\"book.serie.name\", book.serie.name);\r\n\r\n\t\t\tif (book.serie.name != null) {\r\n\t\t\t\tSerie serie = Serie.find(\"byName\", book.serie.name).first();\r\n\t\t\t\tif (serie != null) {\r\n\t\t\t\t\tValidation.addError(\"book.serie.name\",\r\n\t\t\t\t\t\t\t\"La série existe déjà\",\r\n\t\t\t\t\t\t\tArrayUtils.EMPTY_STRING_ARRAY);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Validation errror treatment\r\n\t\tif (Validation.hasErrors()) {\r\n\r\n\t\t\tif (Logger.isDebugEnabled()) {\r\n\t\t\t\tfor (play.data.validation.Error error : Validation.errors()) {\r\n\t\t\t\t\tLogger.debug(error.message() + \" \" + error.getKey());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Specific treatment for isbn, just to provide example\r\n\t\t\tif (!Validation.errors(\"book.isbn\").isEmpty()) {\r\n\t\t\t\tflash.put(\"error_isbn\", Messages.get(\"error.book.isbn.msg\"));\r\n\t\t\t}\r\n\r\n\t\t\tparams.flash(); // add http parameters to the flash scope\r\n\t\t\tValidation.keep(); // keep the errors for the next request\r\n\t\t} else {\r\n\r\n\t\t\t// Create serie is needed\r\n\t\t\tif (book.serie.id == null) {\r\n\t\t\t\tbook.serie.create();\r\n\t\t\t}\r\n\r\n\t\t\tbook.create();\r\n\r\n\t\t\t// Send WebSocket message\r\n\t\t\tWebSocket.liveStream.publish(MessageFormat.format(\r\n\t\t\t\t\t\"La BD ''{0}'' a été ajoutée dans la série ''{1}''\",\r\n\t\t\t\t\tbook.title, book.serie.name));\r\n\r\n\t\t\tflash.put(\"message\",\r\n\t\t\t\t\t\"La BD a été ajoutée, vous pouvez créer à nouveau.\");\r\n\t\t}\r\n\r\n\t\tBookCtrl.prepareAdd(); // Redirection toward input form\r\n\t}",
"@Transactional\n\t@Override\n\tpublic Passenger addPassenger(Passenger p) {\tint bId = p.getBooking().getBookingId();\n//\t\tString query = \"Select b from Booking b where b.bookingId =:bId \";\n//\t\tTypedQuery<Booking> tq = em.createQuery(query, Booking.class);\n//\t\ttq.setParameter(\"bId\", bId);\n//\t\tBooking b = tq.getSingleResult();\n//\t\tSystem.out.println(\"feffefefeff\" + p);\n//\t\tp.setBooking(b);\n//\t\n\tList<Integer> seatNos = new ArrayList();\n\t\t\n\t\tfor(int i =1; i<61; i++)\n\t\t{\t\n\t\t\tseatNos.add(i);\n\t}\n\t\t\t\n\tp.setSeatNo(seatNos.get(count));\n\tcount+=1;\n\t\t\n\t\t\n\n\t\t\n\t\t\n\t\tSystem.out.println(p);\n\t\tem.persist(p);\n\t\tSystem.out.println(\"persisted\" + p);\n\t\treturn p;\n\t}",
"@Override\n\tpublic BookingDetails requestBook(UserDetails userDetails, FilghtDetails flightDetails) {\n\t\t boolean flag = false, \n\t\t\t\t\tisRequestExists = false;\n\t \t\tBookingDetails bookingDetails = new BookingDetails();\n\t UserDetails uf = new UserDetails();\n\t FilghtDetails fd = new FilghtDetails();\n\t \t\t\tfor (BookingDetails bs : Repository.BOOKING_DETAILS) {\n\t\t\t\t\t\tif (flightDetails.getFlightId() == bs.getFlightDetails().getFlightId()) {\n\t\t\t\t\t\t\tisRequestExists = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t \t\t\tif(!isRequestExists) {\n\t \t\t\t\tfor (UserDetails ud : Repository.USER_DETAILS) {\n\t\t\t\t\t\t\tif (userDetails.getUserId() == ud.getUserId()) {\n\t\t\t\t\t\t\t\tfor (FilghtDetails flight : Repository.FLIGHT_DETAILS) {\n\t\t\t\t\t\t\t\t\tif (flight.getFlightId() == flightDetails.getFlightId()) {\n\t\t\t\t\t\t\t\t\t\tuf= ud;\n\t\t\t\t\t\t\t\t\t\tfd = flight;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tflag = true;\n\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 }\n\t\t\t\t\t\t\t\t }\t\n\t \t\t\t\t}\n\t\t\t\t\t\n\t \n\t\t\t\t\t\tif (flag == true) {\n\t\t\t\t\t\t\tbookingDetails.setFlightDetails(fd);;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbookingDetails.setUserDetails(uf);;\n\t\t\t\t\t\t\tRepository.BOOKING_DETAILS.add(bookingDetails);\n\t\t\t\t\t\treturn bookingDetails;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\tthrow new AirlineException(\"Invalid request or you cannot request that book\");\n\t\t\t\n\n\t}",
"@Override\r\n\t@Transactional\r\n\tpublic void doService() {\n\t\tTbookingrecord booking = new Tbookingrecord();\r\n\t\tbooking.setId(Long.valueOf(31622L));\r\n\t\tbooking.setInstrumentid(2);\r\n\t\tbooking.setUserid(3);\r\n\t\tmappper.insertSelective(booking);\r\n\t\tlogger.debug(booking);\r\n\t\t//int i = 1/0;\r\n\t}",
"void setBookReservationDao(final BookReservationDao bookReservationDao);",
"@GetMapping(\"/booking/{id}\")\n\tpublic Bookings getBookingById(@PathVariable(value = \"id\") String bookingId){\n\t\tBookings booking = services.getBookings(bookingId);\n\t\treturn booking;\n\t}",
"@Override\n\tpublic int createTicket(Booking_ticket bt) {\n\t\treturn btr.createTicket(bt);\n\t}",
"@Override\n\tpublic void addBook() {\n\t\t\n\t}",
"public void registerBooks(Book b) {\n\t\ttry (PreparedStatement stmt = LibraryConnection.getConnection()\n\t\t\t\t.prepareStatement(\n\t\t\t\t\t\t\"INSERT INTO book(isbn, title) VALUES ( ?, ?)\");) {\n\t\t\tstmt.setString(1, b.getIsbn());\n\t\t\tstmt.setString(2, b.getTitle());\n\t\t\tstmt.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"BookReservationDao getBookReservationDao();",
"public void setBookedStatus(JGGTimeSlotModel timeSlot) {\n JGGTimeSlotBookedStatus status = timeSlot.getStatus();\n switch (status) {\n case none:\n case not_booked:\n backLayout.setBackgroundResource(R.drawable.book_background);\n txtDay.setVisibility(View.GONE);\n txtWeekDay.setText(\"Book Time Slot\");\n txtWeekDay.setTextColor(ContextCompat.getColor(mContext, R.color.JGGWhite));\n itemView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(mContext, PackageServiceTimeSlotActivity.class);\n mContext.startActivity(intent);\n }\n });\n break;\n case booking:\n break;\n case booked:\n backLayout.setBackgroundResource(R.drawable.grey_border_background);\n txtDay.setTextColor(ContextCompat.getColor(mContext, R.color.JGGGrey3));\n txtWeekDay.setTextColor(ContextCompat.getColor(mContext, R.color.JGGGrey3));\n break;\n default:\n break;\n }\n }"
] |
[
"0.71471727",
"0.707294",
"0.690238",
"0.67928284",
"0.6737543",
"0.6699555",
"0.66807044",
"0.65365356",
"0.65076643",
"0.64746463",
"0.64502615",
"0.643508",
"0.6388255",
"0.6364475",
"0.63144594",
"0.6313285",
"0.6204944",
"0.6187563",
"0.61009556",
"0.6098007",
"0.60930467",
"0.6041215",
"0.6031086",
"0.6026909",
"0.602012",
"0.59941536",
"0.598933",
"0.5983812",
"0.59587085",
"0.5943968",
"0.5935268",
"0.5913249",
"0.58854496",
"0.5880136",
"0.5879174",
"0.5874773",
"0.5857641",
"0.5850775",
"0.58199835",
"0.5818469",
"0.58080673",
"0.5807026",
"0.58044183",
"0.5796029",
"0.57710236",
"0.576331",
"0.57602614",
"0.57092196",
"0.56714326",
"0.5652504",
"0.5641903",
"0.5641888",
"0.5641888",
"0.562334",
"0.5613244",
"0.5611982",
"0.5611219",
"0.5611219",
"0.5589736",
"0.5585773",
"0.55803084",
"0.55787706",
"0.5577991",
"0.55770284",
"0.5572289",
"0.5565212",
"0.55606276",
"0.5526032",
"0.5507902",
"0.5498616",
"0.5487111",
"0.54855007",
"0.5468491",
"0.5459033",
"0.5443149",
"0.54411423",
"0.54188305",
"0.5407592",
"0.5393865",
"0.538535",
"0.53845775",
"0.53823334",
"0.5377949",
"0.5373087",
"0.53681874",
"0.535964",
"0.535845",
"0.5344668",
"0.5337127",
"0.53328717",
"0.5322692",
"0.53109145",
"0.5294738",
"0.5289733",
"0.52858096",
"0.5274377",
"0.52419746",
"0.5239325",
"0.5225818",
"0.5216369"
] |
0.77515644
|
0
|
Register dirty booking method, keeps track of modefied bookings
|
public void registerDirtyBooking(Booking b) {
if (!newBooking.contains(b)
&& !modifiedBooking.contains(b)) {
modifiedBooking.add(b);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void registerNewBooking(Booking b) {\n if (!newBooking.contains(b)\n && !modifiedBooking.contains(b)) {\n newBooking.add(b);\n }\n }",
"public void completeBooking(){\r\n\t\tbookings.putAll(tempBookings);\r\n\t\ttempBookings.clear();\r\n\t}",
"void registerDeleteBooking(Booking b) {\n if (!newBooking.contains(b)\n && !modifiedBooking.contains(b)\n && !deleteBooking.contains(b)) {\n deleteBooking.add(b);\n }\n }",
"public void addBooking(Bookings b) {\n IController<Bookings> ic = new Controller<>();\n\n // Check whether the booking conflicts with another booking.\n for (Bookings booking : ic.readAll(Bookings.class)) {\n if (b.conflictsWith(booking)) {\n throw new IllegalArgumentException(\"That booking conflicts with another booking.\");\n }\n }\n\n Modules relatedModule = b.getModule();\n\n // Check whether the room is available at the given time.\n if (!b.getRooms().isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"That room is unavailable at this time.\");\n }\n // Check whether the students are available at that time.\n for (Students student : relatedModule.getStudents()) {\n if (!student.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A student is unavailable at this time.\");\n }\n }\n // Check whether the staff members are available at that time.\n for (Staff staff : relatedModule.getStaff()) {\n if (!staff.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A staff member is unavailable at this time.\");\n }\n }\n\n // Put the booking into the database.\n ic.create(b);\n System.out.println(b.confirmation() + \"\\n\");\n }",
"public void makeBooking (Object booking);",
"public void saveBorrowings() {\n\t}",
"public void dontCompleteBooking(){\r\n\t\ttempBookings.clear();\r\n\t}",
"public Booking saveBooking(Booking booking);",
"@Override\n public void toMyBookings() {\n }",
"private void addBookings(List<Bookings> newBookings) {\n IController<Bookings> bookingController = new Controller<>();\n IController<Students> studentController = new Controller<>();\n IController<Staff> staffController = new Controller<>();\n\n // Get all bookings\n List<Bookings> allBookings = bookingController.readAll(Bookings.class);\n\n\n // Check if any booking clashes.\n int count = 0;\n for (Bookings b : newBookings) {\n System.out.println(\"Checking availability of booking #\" + count);\n for (Bookings booking : allBookings) {\n if (b.conflictsWith(booking)) {\n throw new IllegalArgumentException(\"That booking conflicts with another booking.\");\n }\n }\n\n Modules relatedModule = b.getModule();\n\n if (!b.getRooms().isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"That room is unavailable at the time (\" + b.getTime() + \").\");\n }\n for (Students student : relatedModule.getStudents()) {\n student = studentController.readById(Students.class, student.getStudentID(), true);\n if (!student.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A student is unavailable at this time. [\" + b.getTime() + \"] (\" + student.getStudentID() + \")\");\n }\n }\n for (Staff staff : relatedModule.getStaff()) {\n staff = staffController.readById(Staff.class, staff.getStaffID(), true);\n\n if (!staff.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A staff member is unavailable at this time. [\" + b.getTime() + \"] (\" + staff.getStaffID() + \")\");\n }\n }\n\n count++;\n }\n\n // Create the bookings\n for (Bookings b : newBookings) {\n bookingController.create(b);\n System.out.println(b.confirmation() + \"\\n\");\n }\n }",
"public interface RegisteredBooking extends Booking, Updatable.Unupdated {\r\n}",
"public static void addBooking(BookingImpl b, String status){\n Firebase bRefChild;\n if(!status.equals(\"new\")){\n //Dispatched Booking\n //Removes from Awaiting_Dispatch and puts in Dispatched\n bRefChild = dRef.child(status);\n bRef.child(b.getBookingNumber()+\"\").removeValue();\n } else {\n bRefChild = bRef.child(b.getBookingNumber() + \"\");\n }\n bRefChild.child(\"pickup\").setValue(b.getPickUpAddress());//\n bRefChild.child(\"dropoff\").setValue(b.getDropOffAddress());//\n bRefChild.child(\"name\").setValue(b.getClientName());//\n bRefChild.child(\"time\").setValue(b.getTime().toString());\n bRefChild.child(\"comment\").setValue(b.getComments());//\n bRefChild.child(\"tel\").setValue(b.getClientTel());//\n bRefChild.child(\"email\").setValue(b.getClientEmail());//\n bRefChild.child(\"booking_number\").setValue(b.getBookingNumber());//\n bRefChild.child(\"account\").setValue(Cash.getInstance().getId());\n bRefChild.child(\"vehicle_type\").setValue(b.getVehicleType());\n bRefChild.child(\"no_passengers\").setValue(b.getNoPassengers());\n bRefChild.child(\"date\").setValue(b.getDate());\n try {\n bRefChild.child(\"time\").setValue(new SimpleDateFormat(\"HH:mm\").format(b.getTime()));\n } catch (IllegalArgumentException e){\n // Always throws this exception - unsure why as it saves correctly.\n // Do nothing as it still writes to database as expected\n // Maybe need to look at different formats for time?\n }\n bRefChild.child(\"price\").setValue(b.getPrice());\n\n }",
"public void addBooking(Booking b)\r\n {\r\n bookings.add(b);\r\n }",
"public void rebook(Booking temp) {\n\t\t\tBookings.add(temp);\r\n\t\t}",
"public Bookings saveBookingDetails(Bookings bookings) ;",
"Booking createBooking(Booking newBooking) throws Exception;",
"public void setBooking(Set<Booking> aBooking) {\n booking = aBooking;\n }",
"public void insertBooking(){\n \n Validator v = new Validator();\n if (createBookingType.getValue() == null)\n {\n \n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Booking Type!\")\n .showInformation();\n \n return;\n \n }\n if (createBookingType.getValue().toString().equals(\"Repair\"))\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Go to Diagnosis and Repair tab for creating Repair Bookings!\")\n .showInformation();\n \n \n if(v.checkBookingDate(parseToDate(createBookingDate.getValue(),createBookingTimeStart.localTimeProperty().getValue()),\n parseToDate(createBookingDate.getValue(),createBookingTimeEnd.localTimeProperty().getValue()))\n && customerSet)\n \n { \n \n int mID = GLOBAL.getMechanicID();\n \n try {\n mID = Integer.parseInt(createBookingMechanic.getSelectionModel().getSelectedItem().toString().substring(0,1));\n } catch (Exception ex) {\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Mechanic!\")\n .showInformation();\n return;\n }\n \n if (mID != GLOBAL.getMechanicID())\n if (!getAuth(mID)) return;\n \n createBookingClass();\n dbH.insertBooking(booking);\n booking.setID(dbH.getLastBookingID());\n appointment = createAppointment(booking);\n closeWindow();\n \n }\n else\n {\n String extra = \"\";\n if (!customerSet) extra = \" Customer and/or Vehicle is not set!\";\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Errors with booking:\"+v.getError()+extra)\n .showInformation();\n }\n \n }",
"public void setBooked(boolean confirmed){\n booked = confirmed;\n }",
"public void registerANewBoat(Boat boat){boats.add(boat);}",
"public void setBookedStatus(JGGTimeSlotModel timeSlot) {\n JGGTimeSlotBookedStatus status = timeSlot.getStatus();\n switch (status) {\n case none:\n case not_booked:\n backLayout.setBackgroundResource(R.drawable.book_background);\n txtDay.setVisibility(View.GONE);\n txtWeekDay.setText(\"Book Time Slot\");\n txtWeekDay.setTextColor(ContextCompat.getColor(mContext, R.color.JGGWhite));\n itemView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(mContext, PackageServiceTimeSlotActivity.class);\n mContext.startActivity(intent);\n }\n });\n break;\n case booking:\n break;\n case booked:\n backLayout.setBackgroundResource(R.drawable.grey_border_background);\n txtDay.setTextColor(ContextCompat.getColor(mContext, R.color.JGGGrey3));\n txtWeekDay.setTextColor(ContextCompat.getColor(mContext, R.color.JGGGrey3));\n break;\n default:\n break;\n }\n }",
"public Set<Booking> getBooking() {\n return booking;\n }",
"public void setMyRoomReservationOK() throws SQLException{\n int guestID = guest[guestIndex].getAccountID();\n int selRoomCount = getSelectedRoomsCounter();\n int[] tempRooms = getGuestSelRooms(); //Selected room by room number\n \n roomStartDate = convertMonthToDigit(startMonth) + \"/\" +startDay+ \"/\" + startYear;\n roomEndDate = convertMonthToDigit(endMonth) + \"/\" +endDay+ \"/\" + endYear; \n \n System.out.println(\"\\nSaving reservation\");\n System.out.println(\"roomStartDate\" + roomStartDate);\n System.out.println(\"roomEndDate:\" + roomEndDate);\n \n //Searching the reserved room number in the hotel rooms\n for(int i=0;i<selRoomCount;i++){\n for(int i2=0;i2<roomCounter;i2++){\n if(myHotel[i2].getRoomNum() == tempRooms[i]){ \n //if room number from array is equal to selected room number by guest\n System.out.println(\"Room Found:\"+tempRooms[i]); \n \n myHotel[i2].setOccupantID(guestID);\n myHotel[i2].setAvailability(false);\n myHotel[i2].setOccupant(guest[guestIndex].getName());\n myHotel[i2].setStartDate(roomStartDate);\n myHotel[i2].setEndDate(roomEndDate);\n }\n }\n }\n \n updateRoomChanges_DB(); //apply changes to the database\n \n //Updates room preference of the current guest \n String sqlstmt = \"UPDATE APP.GUEST \"\n + \" SET ROOMPREF = '\" + guest[guestIndex].getPref()\n + \"' WHERE ID = \"+ guest[guestIndex].getAccountID();\n \n CallableStatement cs = con.prepareCall(sqlstmt); \n cs.execute(); //execute the sql command \n cs.close(); \n }",
"public void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tObject HotelID = cbHotelsOptions.getSelectedItem();\n\t\t\t\t\tHotel hotel;\n\t\t\t\t\thotel = (Hotel) HotelID;\n\t\t\t\t\tlong id = hotel.getUniqueId();\n\t\t\t\t\t//\tSystem.out.println(id);\n\t\t\t\t\tString inmonth = txtInMonth.getText();\n\t\t\t\t\tint inMonth = Integer.valueOf(inmonth);\n\t\t\t\t\tString inday = txtInDay.getText();\n\t\t\t\t\tint inDay = Integer.parseInt(inday);\n\t\t\t\t\tString outmonth = txtOutMonth.getText();\n\t\t\t\t\tint outMonth = Integer.valueOf(outmonth);\n\t\t\t\t\tString outday = txtOutDay.getText();\n\t\t\t\t\tint OutDay = Integer.parseInt(outday);\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\"Reservation.txt\", true);\n\t\t\t\t\tPrintWriter pw = new PrintWriter(fos);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * i then check the canBook method and according to the canBook method \n\t\t\t\t\t * i check if they can book, and if yes i add the reservation\n\t\t\t\t\t * otherwise it prints so the user may enter different values\n\t\t\t\t\t */\n\t\t\t\t\t{\n\t\t\t\t\t\tif(h.canBook(new Reservation(id,inMonth, inDay, OutDay)) == true) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treservation.add(new Reservation (id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\tr = new Reservation (id,inMonth, inDay, OutDay);\n\t\t\t\t\t\t\th.addResIfCanBook(new Reservation(id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\treservationsModel.addElement(r);\n\t\t\t\t\t\t\tpw.println( id + \" - \" + inMonth + \"-\"+ inDay+ \" - \" + outMonth + \"-\" + OutDay);\n\t\t\t\t\t\t\tpw.close();\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"These dates are already reserved\"\n\t\t\t\t\t\t\t\t\t+ \"\\nPlease try again!\");\t\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t/**\n\t\t\t\t * Then the catch Block checks for file not found exception\n\t\t\t\t */\n\t\t\t\tcatch (FileNotFoundException fnfe) \n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"File not found.\");\n\t\t\t\t}\n\t\t\t}",
"public void getBookAvailability() {\n getBookReservationEligibility();\n }",
"@Override\n\tpublic void saveBooking(BookingDetails bookingDetails) {\n\t\tbookingDao.saveBooking(bookingDetails);\n\t}",
"public BookedActivity getNewlyAddSavedTrip();",
"@Test\n public void updateBusy() {\n ArrayList<Busy> b = new ArrayList<Busy>();\n b.add(new Busy(\"dummy\", 1, new Date(1970-05-07)));\n b.add(new Busy(\"dummy\", 1, new Date(1974-05-07)));\n\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n busyDAO.createBusy(new Busy(\"dummy\", 1, new Date(1970-05-07)));\n\n assertTrue(busyResource.updateBusy(b));\n\n //clean up\n busyDAO.removeBusy(new Date(1974-05-07), 1, \"dummy\");\n userDAO.removeUser(\"dummy\");\n }",
"public Boolean addBooking(Booking aBooking) {\r\n return this.bookings.add(aBooking);\r\n }",
"public Booking makeBooking(Customer customer, Airline flight, int baggage, String type, Date date);",
"public void bookFlight(){\n //Steps\n //1 Show the available flights. (at least one seat with 0)\n //2 User select a flight, and the system automatically set the seat with his id. he is not able to select the seat\n //3 User confirm the reservation \n //4 Flight reserved\n \n //1\n //FlightRepository.availableFlights();\n //Scanner input = new Scanner(System.in);\n //String flightNumber = input.nextLine();\n \n //2,3 and 4\n Flight flightObject = FlightRepository.getFlight(this.number);\n if (flightObject == null){\n System.out.println(\"Please select a valid flight number\");\n }\n flightObject.setPassengerSeat(this.PassengerID);\n }",
"private void handleBooking() {\n\t\tString customerID;\n\t\tint recNo = table.getSelectedRow();\n\t\tif(recNo == -1){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tcustomerID = JOptionPane.showInputDialog(mainPanel,\n\t\t\t\t\t\"Enter Customer ID (8 Digits)\");\n\t\t\tif (customerID != null) {\t\n\t\t\t\tcontroller.reserveRoom(recNo, customerID);\n\t\n\t\t\t\tupdateTable(nameSearchBar.getText(),\n\t\t\t\t\t\tlocationSearchBar.getText());\n\t\t\t}\n\t\t} catch (final InvalidCustomerIDException icide) {\n\t\t\tJOptionPane.showMessageDialog(mainPanel, \"Invalid format!\");\n\t\t} catch (final BookingServiceException bse) {\n\t\t\tJOptionPane.showMessageDialog(mainPanel, bse.getMessage());\n\t\t} catch (final ServiceUnavailableException sue) {\n\t\t\tJOptionPane.showMessageDialog(null, sue.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"@Override\n\tpublic int updateTicket(Booking_ticket bt) {\n\t\treturn 0;\n\t}",
"public void setBookingId(int booking_id) {\n this.booking_id = booking_id;\n }",
"@Override\n\tpublic int update(Reservation objet) {\n\t\treturn 0;\n\t}",
"public static synchronized void bookTheDevice(Device device) {\n deviceStatusMap.put(device, \"busy\");\n logUtility.logDebug(\"Marked \" + device.getDeviceName() + \" as busy.\");\n }",
"public GenericResponse<Booking> reserveRoom(Booking booking) {\n GenericResponse genericResponse = HotelBookingValidation.validateBookingInfo(logger, hotel, booking);\n if (genericResponse != null) {\n return genericResponse;\n }\n\n logger.info(booking.toString());\n\n if (hotel.getBookings().putIfAbsent(booking.getBookingRoom(), booking.getUser()) == null) {\n return GenericResponseUtils.generateFromSuccessfulData(booking);\n }\n\n logger.info(\"Oops. Please try again.\");\n return GenericResponseUtils.generateFromErrorMessage(\"Oops. Please try again.\");\n }",
"boolean bookingListIsNotFull(Book book);",
"@ModelAttribute(value = \"booking\")\n\tpublic Booking getNewBooking() {\n\t\tBooking booking = new Booking();\n\t\t\n\t\tlogger.info(\"getNewBooking() method: Returning a new instance of Booking\");\n\t\t\n\t\treturn booking;\n\t}",
"public boolean isBooked(){\n return booked;\n }",
"private void userHasBooking() throws SQLException {\n BookingModel bookingModel2 = new BookingModel();\n if (bookingModel2.checkUserBooking(employeeID)) {\n hasBooking = true;\n } else {\n hasBooking = false;\n }\n\n }",
"void setBookReservationDao(final BookReservationDao bookReservationDao);",
"@Override\n\tpublic boolean insertRegisterBook(yw_RegisterBook yw_RegisterBook) {\n\t\tyw_RegisterBookMapper.insertRegisterBook(yw_RegisterBook);\n\t\treturn false;\n\t}",
"CurrentReservation createCurrentReservation();",
"@Autowired\n public AvailabilityServiceImpl(final BookingService bookingService) {\n this.bookingService = bookingService;\n }",
"public void addBookings(String name, ArrayList<Integer> roomToUse, int month, int date, int stay) {\n\t\t\t\r\n\t\t\tBooking newCust = new Booking();\r\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint roomCap = 0; //Roomtype / capacity\r\n\t\t\tint roomNum; //Room Number\r\n\t\t\tRooms buffer; //used to store the rooms to add to the bookings\r\n\t\t\t\r\n\t\t\twhile(i < roomToUse.size()) { //add all rooms from the available list\r\n\t\t\t\troomNum = roomToUse.get(i); //get Room number of the avalable, non-clashing room to be booked\r\n\t\t\t\twhile(k < RoomDetails.size()) { //Looping through all rooms in a hotel\r\n\t\t\t\t\tbuffer = RoomDetails.get(k); \r\n\t\t\t\t\tif (buffer.getRoomNum() == roomNum) { //To get the capacity of the matching room\r\n\t\t\t\t\t\troomCap = buffer.getCapacity();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tnewCust.addRoom(roomNum, roomCap); //Add those rooms to the bookings with room number and type filled in\r\n\t\t\t\ti++;\r\n\t\t\t\tk=0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnewCust.addName(name); //add customer name to booking\r\n\t\t\tnewCust.addDates(month, date, stay); //add dates to the booking\r\n\t\t\t\r\n\t\t\tBookings.add(newCust); //adds the new booking into the hotel bookings list\r\n\t\t}",
"@Override\r\n\tpublic boolean createBooking(Booking_IF bk) {\r\n\t\tPreparedStatement myStatement = null;\r\n\t\tString query = null;\r\n\t\tint count = 0;\r\n\t\ttry{\r\n\t\t\tquery = \"insert into Booking values(?,?);\";\r\n\t\t\tmyStatement = myCon.prepareStatement(query);\r\n\t\t\tmyStatement.setInt(2, bk.getUserid());\r\n\t\t\tmyStatement.setInt(1, bk.getShiftid());\r\n\t\t\tcount = myStatement.executeUpdate();\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally{\r\n\t\t\ttry {\r\n\t\t\t\tif (myStatement != null)\r\n\t\t\t\t\tmyStatement.close();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(count!=1){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t}",
"@Override\n\tpublic void checkWayBillChange(String id) {\n\t\t\n\t}",
"public void setBooked(boolean booked) {\n this.booked = booked;\n }",
"@Override\r\n\tpublic void storedBook(Book book) {\n\t\tticketDao.insertBook(book);\r\n\t}",
"@Override\n\tpublic boolean bookingStatus(UserDetails userDetails, FilghtDetails flightDetails) {\n\t\treturn false;\n\t}",
"@Override\n public void payGroupBuyBooking(GroupBuyBookingBo groupBuyBookingBo) {\n }",
"@Override\r\n\tpublic Book update(Book book) {\r\n\t\treturn null;\r\n\t}",
"@Test\n\tpublic void testBook() throws Exception {\n\t\tString createdReservationID = bookingManagement.book(USER_ID, Arrays.asList(room1.getId()),\n\t\t\t\tvalidStartDate, validEndDate);\n\t\t// a reservation must be returned\n\t\tassertNotNull(\"Reservation id is null\", createdReservationID);\n\t\tassertFalse(\"Reservation id is emtpy\", createdReservationID.isEmpty());\n\t\t// check if returned reservation is correct\n\t\tReservation createdReservation = bookingManagement.getReservation(createdReservationID);\n\t\tassertNotNull(\"Reservation of returned id was not found\", createdReservation);\n\n\t\tassertEquals(USER_ID, createdReservation.getBookingUserId());\n\n\t\tassertEquals(1, createdReservation.getBookedFacilityIds().size());\n\t\tassertTrue(createdReservation.getBookedFacilityIds().contains(room1.getId()));\n\t\tassertEquals(validStartDate, createdReservation.getStartTime());\n\t\tassertEquals(validEndDate, createdReservation.getEndTime());\n\t}",
"public interface ReservationsService {\n\n /**\n * Lists reservations 'conflicting' with the given time range. This means that the method will list\n * all reservations conflicting with the specified start date and/or end date, plus all\n * reservations contained within the specified range.\n * <p>\n * If no length is provided for the time range (numberOfDays = null), the default will be used.\n *\n * @param startDate start date (Instant) of time range for which campsite availability is requested\n * @param numberOfDays length of time range for which campsite availability is requested (in days).\n * Defaults to the {@code campsite.reservation.list.default} config parameter.\n * @return reservations 'conflicting' with the given time range.\n */\n List<Reservation> listReservationsWithinTimeRange(Instant startDate, Integer numberOfDays);\n\n /**\n * Creates a reservation for the provided {@link User} between two\n * given dates. The length of the reservation cannot exceed the amount\n * of days specified by the {@code campsite.reservation.length.maximum}\n * configuration property.\n *\n * @param userData information about the user that will own the reservation\n * @param startDate date (Instant) in which the reservation starts\n * @param endDate date (Instant) in which the reservation ends\n * @return the reservation between the requested dates for the specified user, containing an\n * automatically generated booking id\n * @throws IllegalArgumentException if:\n * - length of stay exceeds {@code campsite.reservation.length.maximum} or\n * - reservation start date comes before {@code campsite.reservation.days-ahead.minimum} or\n * - reservation start date comes after {@code campsite.reservation.days-ahead.maximum}\n */\n Reservation createReservation(User userData, Instant startDate, Instant endDate);\n\n /**\n * Updates a given {@link Reservation}, uniquely identified by its {@code id}.\n * This operation uses optimistic locking for preventing silent updates.\n *\n * @param reservation contains the information for the reservation that is to be updated,\n * uniquely identified by its {@code id}\n * @return the updated reservation information\n * @throws ObjectOptimisticLockingFailureException if a stale copy of the reservation attempts\n * to be updated\n */\n Reservation updateReservation(Reservation reservation);\n\n /**\n * Deletes a given {@link Reservation}, uniquely identified by its {@code id}.\n * This operation uses optimistic locking for preventing silent deletes.\n *\n * @param reservation contains the information for the reservation that is to be deleted,\n * uniquely identified by its {@code id}\n * @throws ObjectOptimisticLockingFailureException if a stale copy of the reservation attempts\n * to be deleted\n */\n void deleteReservation(Reservation reservation);\n\n}",
"private void clearBooking() {\n // Clearing current booking information from sharedPreference\n SharedPreferences.Editor editor = sharedpreferences.edit();\n editor.putBoolean(BOOKING, false);\n editor.commit();\n time = 0;\n shutdown();\n }",
"public static Booking getBooking() {\n return sBooking;\n }",
"private void createEvent() \n\t{\n\t\t// When the user clicks on the add button\n\t\tbtnAdd.addActionListener(new ActionListener() \n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\t//////////////////////////////////\n\t\t\t\t//////////////////////////////////\n\t\t\t\t//Adding Info To Reservation.txt//\n\t\t\t\t//////////////////////////////////\n\t\t\t\t//////////////////////////////////\n\t\t\t\t/**\n\t\t\t\t * First i surround the whole with with try.. catch block\n\t\t\t\t * First in the try block \n\t\t\t\t * i get the values of the check-in and check-out info\n\t\t\t\t * i save them in strings \n\t\t\t\t * then cast them in integers \n\t\t\t\t * and finally add it to Reservation.txt\n\t\t\t\t * then i close the file.\n\t\t\t\t */\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tObject HotelID = cbHotelsOptions.getSelectedItem();\n\t\t\t\t\tHotel hotel;\n\t\t\t\t\thotel = (Hotel) HotelID;\n\t\t\t\t\tlong id = hotel.getUniqueId();\n\t\t\t\t\t//\tSystem.out.println(id);\n\t\t\t\t\tString inmonth = txtInMonth.getText();\n\t\t\t\t\tint inMonth = Integer.valueOf(inmonth);\n\t\t\t\t\tString inday = txtInDay.getText();\n\t\t\t\t\tint inDay = Integer.parseInt(inday);\n\t\t\t\t\tString outmonth = txtOutMonth.getText();\n\t\t\t\t\tint outMonth = Integer.valueOf(outmonth);\n\t\t\t\t\tString outday = txtOutDay.getText();\n\t\t\t\t\tint OutDay = Integer.parseInt(outday);\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\"Reservation.txt\", true);\n\t\t\t\t\tPrintWriter pw = new PrintWriter(fos);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * i then check the canBook method and according to the canBook method \n\t\t\t\t\t * i check if they can book, and if yes i add the reservation\n\t\t\t\t\t * otherwise it prints so the user may enter different values\n\t\t\t\t\t */\n\t\t\t\t\t{\n\t\t\t\t\t\tif(h.canBook(new Reservation(id,inMonth, inDay, OutDay)) == true) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treservation.add(new Reservation (id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\tr = new Reservation (id,inMonth, inDay, OutDay);\n\t\t\t\t\t\t\th.addResIfCanBook(new Reservation(id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\treservationsModel.addElement(r);\n\t\t\t\t\t\t\tpw.println( id + \" - \" + inMonth + \"-\"+ inDay+ \" - \" + outMonth + \"-\" + OutDay);\n\t\t\t\t\t\t\tpw.close();\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"These dates are already reserved\"\n\t\t\t\t\t\t\t\t\t+ \"\\nPlease try again!\");\t\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t/**\n\t\t\t\t * Then the catch Block checks for file not found exception\n\t\t\t\t */\n\t\t\t\tcatch (FileNotFoundException fnfe) \n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"File not found.\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// When the user selects a specific hotel \n\t\tcbHotelsOptions.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * first i save selected hotel in a hotel object\n\t\t\t\t * then i get reservations for the selected hotel\n\t\t\t\t * then i make all the labels and text fields visible \n\t\t\t\t */\n\t\t\t\tHotel selectedHotel = (Hotel)cbHotelsOptions.getSelectedItem();\n\t\t\t\tJOptionPane.showMessageDialog(null, \"You selected the \" + selectedHotel.getHotelName());\n\t\t\t\tselectedHotel.getReservations();\n\t\t\t\tlblCheckIn.setVisible(true);\n\t\t\t\tlblInMonth.setVisible(true);\n\t\t\t\ttxtInMonth.setVisible(true);\n\t\t\t\tlblInDay.setVisible(true);\n\t\t\t\ttxtInDay.setVisible(true);\n\t\t\t\tlblCheckout.setVisible(true);\n\t\t\t\tlblOutMonth.setVisible(true);\n\t\t\t\ttxtOutMonth.setVisible(true);\n\t\t\t\tlblOutDay.setVisible(true);\n\t\t\t\ttxtOutDay.setVisible(true);\n\t\t\t\tbtnAdd.setVisible(true);\n\t\t\t\treservationsModel.removeAllElements();\n\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t//Reading Info From Reservation.txt//\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t/**\n\t\t\t\t * First i surround everything is a try.. catch blocks \n\t\t\t\t * then in the try block i declare the file input stream\n\t\t\t\t * then a scanner \n\t\t\t\t * then in a while loop i check if the file has next line \n\t\t\t\t * and a user a delimiter \"-\"\n\t\t\t\t * and it adds it to a new reservation\n\t\t\t\t * then it adds it to the ArrayList reservation\n\t\t\t\t * and it also adds it to the hotel object\n\t\t\t\t * then it checks if it can book that hotel\n\t\t\t\t * and if yes it adds it to the ReservationsModel\n\t\t\t\t */\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tFileInputStream fis = new FileInputStream(\"Reservation.txt\");\n\t\t\t\t\tScanner fscan = new Scanner (fis);\n\t\t\t\t\tint INMonth = 0;\n\t\t\t\t\tint INday = 0;\n\t\t\t\t\tint OUTmonth = 0;\n\t\t\t\t\tint OUTday = 0;\n\t\t\t\t\tlong iD = 0;\n\t\t\t\t\twhile (fscan.hasNextLine())\n\t\t\t\t\t{\n\t\t\t\t\t\tScanner ls = new Scanner (fscan.nextLine());\n\t\t\t\t\t\tls.useDelimiter(\"-\");\n\t\t\t\t\t\tiD = Integer.parseInt(ls.next().trim());\n\t\t\t\t\t\tINMonth = Integer.parseInt(ls.next().trim());\n\t\t\t\t\t\tINday = Integer.parseInt(ls.next().trim()); \n\t\t\t\t\t\tOUTmonth = Integer.parseInt(ls.next().trim());\n\t\t\t\t\t\tOUTday = Integer.parseInt(ls.next().trim()); \n\t\t\t\t\t\tr = new Reservation (iD,INMonth, INday, OUTmonth, OUTday);\n\t\t\t\t\t\th.addReservation(new Reservation(iD,INMonth, INday, OUTmonth, OUTday));\n\t\t\t\t\t\tHotel hotel = (Hotel) cbHotelsOptions.getSelectedItem();\n\t\t\t\t\t\tlong hotID = hotel.getUniqueId();\n\t\t\t\t\t\tif(iD == hotID)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treservationsModel.addElement((new Reservation(iD, INMonth, INday, OUTday)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * The catch block checks to make sure that the file is found\n\t\t\t\t */\n\t\t\t\tcatch( FileNotFoundException fnfe)\n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"File not found!\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * This is the setRenderer to make the hotel appear in the hotelsOptions \n\t\t * just the hotel name.\n\t\t */\n\t\tcbHotelsOptions.setRenderer(new DefaultListCellRenderer() {\n\t\t\t@Override\n\t\t\tpublic Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus)\n\t\t\t{\n\t\t\t\tComponent renderer = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n\t\t\t\tif (renderer instanceof JLabel && value instanceof Hotel)\n\t\t\t\t{\n\t\t\t\t\t// Here value will be of the Type 'Hotel'\n\t\t\t\t\t((JLabel) renderer).setText(((Hotel) value).getHotelName());\n\t\t\t\t}\n\t\t\t\treturn renderer;\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * The setCallRenderer is for the reservation's list\n\t\t * it only prints the check-in and check-out info\n\t\t */\n\t\tlstReservation.setCellRenderer(new DefaultListCellRenderer() {\n\t\t\t@Override\n\t\t\tpublic Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus)\n\t\t\t{\n\t\t\t\tComponent renderer = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n\t\t\t\tif (renderer instanceof JLabel && value instanceof Reservation)\n\t\t\t\t{\n\t\t\t\t\t// Here value will be of the Type 'Reservation'\n\t\t\t\t\tHotel selectedHotel = (Hotel) cbHotelsOptions.getSelectedItem();\n\t\t\t\t\t((JLabel) renderer).setText(((Reservation) value).getFormattedDisplayString());\n\t\t\t\t}\n\t\t\t\treturn renderer;\n\t\t\t}\n\t\t});\t\n\t}",
"void setBookBorrowedDao(final BookBorrowedDao bookBorrowedDao);",
"public Booking() {\r\n\t\t/**\r\n\t\t*\tGet the number of milliSeconds from the system time and set it to the java.sql.Date\r\n\t\t*\tobject to create a booking number and also to set the start time.\r\n\t\t*/\r\n\t\tlong dateTimeMillis = System.currentTimeMillis();\r\n\t\t/**\r\n\t\t*\tThis date is for generating String bookingNo using the date and time values\r\n\t\t*/\r\n\t\tjava.util.Date date = new java.util.Date(dateTimeMillis);\r\n\t\t/**\r\n\t\t*\tPass the current date in sql.Timestamp object.\r\n\t\t*/\r\n\t\tstartTime = new java.sql.Timestamp(date.getTime());\r\n\t\t/**\r\n\t\t*\tLet it be 0 initially and then update it at the time of checkout\r\n\t\t*/\r\n\t\tendTime = new java.sql.Timestamp(0);\r\n\t}",
"public void addAppointmentComponentClosed(ScheduledAppointment appointment);",
"public BookingBean() {\n }",
"@Override\n\tpublic void insertBookData(BookingBus b) {\n\t\tuserdao.insertBookData(b);\n\t}",
"Reservation createReservation();",
"public boolean checkBooking(int id, Calendar start, int nights) {\r\n\t\t//gets the keys for the bookings and tempbookings data structure\r\n\t\tSet<Integer> lb = listBookings();\r\n\t\tSet<Integer> lbt = tempBookings.keySet();\r\n\t\t\r\n\t\t//sets up new calendar to determine end date of booking wanting to be made\r\n\t\tCalendar end = new GregorianCalendar();\r\n\t\tend.set(2015, start.get(Calendar.MONTH), start.get(Calendar.DAY_OF_MONTH));\r\n\t\tend.add(Calendar.DAY_OF_YEAR, nights-1);\r\n\t\t\r\n\t\t//looks up if the current booking is already inside the temp booking\r\n\t\tfor (Integer i: lbt){\r\n\t\t\tBooking t = tempBookings.get(i);\r\n\t\t\tif (t.getBookingID() == id) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//looks through the bookings,if there is one of the id it is skipped as irrelevant - only used in change\r\n\t\t//should a clash occur, booking cannot be made\r\n\t\tfor (Integer i: lb){\r\n\t\t\tBooking b = bookings.get(i);\r\n\t\t\tif (b.getBookingID() == id){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (start.before(b.end()) && (b.start().before(end))) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//sets up booking and places it in the tempbooking data structure waiting to be made if everything\r\n\t\t//in the booking is successful\r\n\t\tBooking nb = new Booking();\r\n\t\tnb.setBookingID(id);\r\n\t\tnb.setStart(start);\r\n\t\tnb.setStayTime(nights);\r\n\t\ttempBookings.put(id, nb);\r\n\t\treturn true;\r\n\t}",
"public String customer_request_booking(Customer_Booking cb){\n\t\tIdUser user= new IdUser();\n\t\tTransaction trns1 = null;\n Session session = HibernateUtil.getSessionFactory().openSession(); \n Booking_Request_Master book = new Booking_Request_Master();\n\t\ttry {\n trns1 = session.beginTransaction();\n Pickup_Location_Master pick_source=new Pickup_Location_Master();\n \tpick_source = (Pickup_Location_Master) session.createQuery(\"from Pickup_Location_Master where id=?\").setParameter(0, cb.getSource()).list().get(0);\n \tPickup_Location_Master pick_destin=new Pickup_Location_Master();\n \tpick_destin = (Pickup_Location_Master) session.createQuery(\"from Pickup_Location_Master where id=?\").setParameter(0, cb.getDestination()).list().get(0);\n \n \t\n book.setCreated_at(current_timestamp);\n book.setUpdated_at(current_timestamp);\n book.setProvided_time(cb.getTime()+\":00\");\n book.setSource_id(cb.getSource());\n book.setFrom_id(pick_source.getLocation_id());\n book.setDestination_id(cb.getDestination());\n book.setTo_id(pick_destin.getLocation_id());\n book.setDept_date(java.sql.Date.valueOf(cb.getDate()));\n book.setDept_time(java.sql.Time.valueOf(cb.getTime()+\":00\"));\n book.setNumber_of_booking(cb.getNumber_of_seat());\n book.setUser_id(user.getAuthentic());\n book.setEnabled(true);\n book.setStatus(\"Pending\");\n session.save(book);\n trns1.commit();\n } catch (RuntimeException e) {\n \te.printStackTrace();\n } \n\t\tfinally {\n session.flush();\n session.close();\n }\n\t\treturn \"success\";\n\t}",
"BookReservationDao getBookReservationDao();",
"public void allBookings() {\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint j = 0;\r\n\t\t\tint roomNum; //Room number\r\n\t\t\tint buffNum; //buff room number\r\n\t\t\tint index = 0; //saves the index of the date stored in the arraylist dateArray\r\n\t\t\tBooking buff; //Booking buffer to use\r\n\t\t\tRooms roomCheck;\r\n\t\t\tArrayList<LocalDate> dateArray = new ArrayList<LocalDate>(); //Saves the booking dates of a room\r\n\t\t\tArrayList<Integer> nights = new ArrayList<Integer>(); //Saves the number of nights a room is booked for\r\n\t\t\t\r\n\t\t\twhile(i < RoomDetails.size()) { //Looping Room Number-wise\r\n\t\t\t\troomCheck = RoomDetails.get(i);\r\n\t\t\t\troomNum = roomCheck.getRoomNum();\r\n\t\t\t\tSystem.out.print(this.Name + \" \" + roomNum);\r\n\t\t\t\twhile(k < Bookings.size()) { //across all bookings\r\n\t\t\t\t\tbuff = Bookings.get(k);\r\n\t\t\t\t\twhile(j < buff.getNumOfRoom()) { //check each booked room\r\n\t\t\t\t\t\tbuffNum = buff.getRoomNumber(j);\r\n\t\t\t\t\t\tif(buffNum == roomNum) { //If a booking is found for a specific room (roomNum)\r\n\t\t\t\t\t\t\tdateArray.add(buff.getStartDate()); //add the date to the dateArray\r\n\t\t\t\t\t\t\tCollections.sort(dateArray); //sort the dateArray\r\n\t\t\t\t\t\t\tindex = dateArray.indexOf(buff.getStartDate()); //get the index of the newly add date\r\n\t\t\t\t\t\t\tnights.add(index, buff.getDays()); //add the number of nights to the same index as the date\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tj++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\t\t\t\t\tj=0;\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t\tprintOccupancy(dateArray, nights); //print the occupancy of the room\r\n\t\t\t\tk=0;\r\n\t\t\t\tdateArray.clear(); //cleared to be used again\r\n\t\t\t\tnights.clear(); //cleared to be used again\r\n\t\t\t}\r\n\t\t}",
"boolean addBillToReservation(long billId, long reservationId);",
"@Override\n\tpublic HotelBooking bookRoom(HotelForm hotelForm, Session session) throws HibernateException, Exception{\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tHotelBooking hotelBooking = setDAOValues(hotelForm);\n\t\tsession.save(hotelBooking);\n\t\t\n\t\treturn null;\n\t}",
"@Override\n public void updateBeanDetails(TimeSheet t)\n {\n \n }",
"public void createBooking(Booking book) {\n\tStudentDAO studentDAO=new StudentDAO();\n\tstudentDAO.createBooking(book);\n}",
"public void markDirty()\n {\n }",
"public boolean bookSeat() {\n // check if the flight is full\n if (isfull()) {\n return false;\n } else {\n // otherwise increase the number of booked seats\n this.bookedSeats += 1;\n return true;\n }\n }",
"@Override\n public Optional<Booking> book(Interval interval, User customer) {\n return inner.book(interval, customer);\n }",
"public void bookRoom(int hotelId, String roomNumber, int people){\n\n\n\n }",
"@Override\n\tpublic boolean bookRoom(String month, int day, String type, int lengthOfStay) {\n\t\treturn false;\n\t}",
"void update(Book book);",
"@RequestMapping(\"/create\")\n\tpublic Booking create(Booking booking) {\n\t\tbooking.setTravelDate(new Date());\n\t\tbooking = bookingRepository.save(booking);\n\t return booking;\n\t}",
"private void registerBidConfirmationListener() {\n try {\n JavaSpace05 js = SpaceUtils.getSpace();\n U1467085Bid templateBid = new U1467085Bid();\n templateBid.bidderUserName = UserSession.getInstance().username;\n MatchSet allMyBids = js.contents(Collections.singleton(templateBid), null, SpaceUtils.TIMEOUT, Integer.MAX_VALUE);\n allPossibleConfirmations = new ArrayList<>();\n for (U1467085Bid i = (U1467085Bid) allMyBids.next(); i != null; i = (U1467085Bid) allMyBids.next()) {\n try {\n U1467085Bid finalI = i;\n if (i.verifySignature(UserSession.getInstance().pubKey) &&\n allPossibleConfirmations.stream().noneMatch(o -> o.adId == finalI.adId)) {\n U1467085BidConfirmation orderTemplate = new U1467085BidConfirmation();\n orderTemplate.adId = i.adId;\n allPossibleConfirmations.add(orderTemplate);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n if (allPossibleConfirmations.size() > 0)\n EventRegistration = js.registerForAvailabilityEvent(allPossibleConfirmations, null, false, Listener, SpaceUtils.LONGLEASE, null);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void updateBook(final Properties bookData){\n\t\tnew SwingWorker<Boolean, Void>() {\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() {\n\t\t\t\tJDBCBroker.getInstance().startTransaction();\n\t\t\t\tif(book.isLost()){\n\t\t\t\t\tBorrower borrower = book.getBorrowerThatLost();\n\t\t\t\t\tif(borrower == null || !borrower.subtractMonetaryPenaltyForLostBook(book)){\n\t\t\t\t\t\tJDBCBroker.getInstance().rollbackTransaction();\n\t\t\t\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.ERROR, \"Whoops! An error occurred while saving.\"));\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbookData.setProperty(\"Status\", \"Active\");\n\t\t\t\tbook.stateChangeRequest(bookData);\n\t\t\t\treturn book.save();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void done() {\n\t\t\t\tboolean success = false;\n\t\t\t\ttry {\n\t\t\t\t\tsuccess = get();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tsuccess = false;\n\t\t\t\t} catch (ExecutionException e) {\n\t\t\t\t\tsuccess = false;\n\t\t\t\t}\n\t\t\t\tif(success){\n\t\t\t\t\tJDBCBroker.getInstance().commitTransaction();\n\t\t\t\t\tstateChangeRequest(Key.BACK, \"ListBooksView\");\n\t\t\t\t\tlistBooksTransaction.stateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.SUCCESS, \"Well done! The book was sucessfully saved.\"));\n\t\t\t\t}else{\n\t\t\t\t\tJDBCBroker.getInstance().rollbackTransaction();\n\t\t\t\t\tList<String> inputErrors = book.getErrors();\n\t\t\t\t\tif(inputErrors.size() > 0){\n\t\t\t\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.ERROR, \"Aw shucks! There are errors in the input. Please try again.\", inputErrors));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.ERROR, \"Whoops! An error occurred while saving.\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}.execute();\n\t}",
"@Override\n public void onSaveInstanceState(Bundle outState){\n // Save current booking times to outstate\n outState.putInt(BOOKING_HOUR_KEY, bookingHour);\n outState.putInt(BOOKING_MINUTE_KEY, bookingMinute);\n\n super.onSaveInstanceState(outState);\n }",
"@Test(expected = BookingNotAllowedException.class)\n\tpublic void testBookNotAllowed() throws Exception {\n\t\tdataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), validStartDate, validEndDate);\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), validStartDate, validEndDate);\n\t}",
"public java.util.Set<jkt.hms.masters.business.OtBooking> getOtBookings() {\n\t\treturn otBookings;\n\t}",
"public void setBookingId(int value) {\n this.bookingId = value;\n }",
"public void setBookingId(int value) {\n this.bookingId = value;\n }",
"PastReservation createPastReservation();",
"@Override\r\n\t@Transactional\r\n\tpublic void doService() {\n\t\tTbookingrecord booking = new Tbookingrecord();\r\n\t\tbooking.setId(Long.valueOf(31622L));\r\n\t\tbooking.setInstrumentid(2);\r\n\t\tbooking.setUserid(3);\r\n\t\tmappper.insertSelective(booking);\r\n\t\tlogger.debug(booking);\r\n\t\t//int i = 1/0;\r\n\t}",
"public void smartBooking() {\n // Set up the formatters to extract a datetime object from the user's input.\n DateTimeFormatter durationFormatter = DateTimeFormatter.ofPattern(\"HH:mm\");\n\n // Set up the controller objects for the class to use.\n IController<Staff> sic = new Controller<>();\n IController<Modules> mic = new Controller<>();\n\n // Set up the variables which store the information about the booking.\n boolean sociallyDistanced;\n LocalDateTime time;\n LocalDateTime endTime;\n LocalTime duration;\n LocalTime timeOfBooking;\n Staff staffMember;\n Modules module;\n Rooms room;\n int numberOfBookingsPerWeek;\n\n // Get staff.\n staffMember = sic.readById(Staff.class, getStaff().getStaffID(), true); // initialize only the relationship that is needed.\n\n // Read module IDs -> gets module requirements (week commencing, number of bookings required.)\n Map<String, Modules> moduleMap = new HashMap<>();\n System.out.println(\"Module options\");\n for (Modules m : staffMember.getModules()) {\n System.out.print(\" \" + m.getModuleID() + \": \" + m.getName());\n m = mic.readById(Modules.class, m.getModuleID(), true);\n if (!m.getBookings().isEmpty()) System.out.println(\" (this booking already has bookings set up.)\\n\");\n else System.out.println();\n moduleMap.put(m.getModuleID(), m);\n }\n String moduleKey = sc.next();\n while (!moduleMap.containsKey(moduleKey)) {\n System.out.println(\"That is not a correct ID for a module. Look at the list above.)\");\n moduleKey = sc.next();\n }\n sc.nextLine();\n\n // Ask type of lesson (duration) Gets duration from the module requirements\n System.out.println(\"What type of booking is this? \\n\" +\n \"[0]: Practical.\\n\" +\n \"[1]: Lecture.\");\n String type = sc.next();\n while (!type.matches(\"^[01]$\")) {\n System.out.println(\"Please enter (0 or 1)\");\n type = sc.next();\n }\n sc.nextLine();\n\n\n // Get which type of lesson the user wants to book.\n module = mic.readById(Modules.class, moduleKey, true); // update relations.\n ModuleRequirements requirements = module.getModuleRequirements();\n\n if (type.equals(\"0\")) {\n duration = requirements.getPracticalLength();\n numberOfBookingsPerWeek = requirements.getPracticalsPerWeek();\n } else {\n duration = requirements.getLectureLength();\n numberOfBookingsPerWeek = requirements.getLecturesPerWeek();\n }\n\n // Creates a new recurring booking for the number of bookings required per week.\n for (int i = 1; i <= numberOfBookingsPerWeek; i++) {\n System.out.printf(\"------------------Booking #%d/%d------------------\\n\", i, numberOfBookingsPerWeek);\n\n // Ask for day of week -> (0-6), adds the number of days to the week commencing date.\n System.out.println(\"What day would you like this booking to be on? \\n\" +\n \"[0]: Monday.\\n\" +\n \"[1]: Tuesday\\n\" +\n \"[2]: Wednesday\\n\" +\n \"[3]: Thursday\\n\" +\n \"[4]: Friday\\n\" +\n \"[5]: Saturday\\n\" +\n \"[6]: Sunday.\");\n String offset = sc.next();\n while (!offset.matches(\"^[0-6]$\")) {\n System.out.println(\"Please enter (y/n)\");\n offset = sc.next();\n }\n sc.nextLine();\n\n // Ask time -> gets the time for the booking\n System.out.println(\"What time would you like this booking to be (HH:MM)?\");\n String sTime = sc.next();\n while (!sTime.matches(\"^[0-9]+:[0-9]+$\")) {\n System.out.println(\"Please make sure you are using the correct format. (HH:MM)\");\n sTime = sc.next();\n }\n sc.nextLine();\n\n // Attempt to set the time of the booking\n try {\n timeOfBooking = LocalTime.parse(sTime, durationFormatter);\n } catch (Exception e) {\n System.out.println(\"That is not a valid time. Going back to menu.\");\n return;\n }\n\n // Set time\n time = requirements.getWeekCommencing().plusDays(Integer.parseInt(offset)).atTime(timeOfBooking);\n endTime = time.plusHours(duration.getHour()).plusMinutes(duration.getMinute());\n\n // Ask if it is social distanced.\n sociallyDistanced = isSociallyDistanced();\n\n // Ask for the room.\n room = getRooms(sociallyDistanced, time, endTime, module);\n\n List<Bookings> newBookings = new ArrayList<>();\n // Create booking.\n for (int bookingN = 1; bookingN <= module.getWeeks(); bookingN++) {\n newBookings.add(new Bookings(sociallyDistanced, time, duration, module, room));\n\n time = time.plusDays(7);\n }\n\n // Attempt to add the new bookings\n try {\n addBookings(newBookings);\n } catch (Exception e) {\n // Tell the user what went wrong.\n System.out.println(e.getMessage());\n }\n }\n }",
"public void updateDisplayFields(Booking b){\n Vehicle v = b.getVehicle();\n CustomerAccount ca = v.getCustomer(); \n \n \n createCustomerName.setText(ca.getFirstName());\n createCustomerSurname.setText(ca.getLastName());\n createCustomerNumber.setText(ca.getPhoneNumber());\n createCustomerAddress1.setText(ca.getAddressLine1());\n createCustomerAddress2.setText(ca.getAddressLine2());\n createCustomerCounty.setText(ca.getCounty());\n createCustomerPostal.setText(ca.getPostCode());\n createCustomerCompany.setText(ca.getCompanyName());\n //VEHICLES\n createVehicleMake.setText(v.getMake());\n createVehicleModel.setText(v.getModel());\n createVehicleReg.setText(v.getRegistration());\n createVehicleMileage.setText(Integer.toString(v.getMileage()));\n createVehicleEngine.setText(v.getEngineSize());\n createVehicleColour.setText(v.getColour());\n createVehicleFuel.setText(v.getFuelType());\n String MOTexpire = \"\";\n if (v.getMOTExpire() == null)\n MOTexpire = \"N/A\";\n else\n MOTexpire = v.getMOTExpire().getTime().toString();\n \n createVehicleMOT.setText(MOTexpire);\n \n String ServiceDate = \"\";\n if (v.getLastService() == null)\n ServiceDate = \"N/A\";\n else\n ServiceDate = v.getLastService().getTime().toString();\n \n createVehicleService.setText(ServiceDate);\n createVehicleWarranty.setText(v.getWarrantyCompany());\n\n }",
"public interface borrowable {\n\n\tpublic void borrowbook();\n\n}",
"public int getBookingId() {\n return bookingId;\n }",
"public int getBookingId() {\n return bookingId;\n }",
"public void setBooked(Integer booked) {\n this.booked = booked;\n }",
"public void changeOutofService(Room room);",
"private void setDirty() {\n\t}",
"public void sellBeanBags(int reservationNumber) throws ReservationNumberNotRecognisedException {\n for (int j = 0; j < stockList.size(); j++) {\r\n // If the current beanBag in the \"stockList\" reserved state boolean is NOT true and bag is\r\n // not already sold.\r\n System.out.println(((BeanBag) stockList.get(j)).getReservationNumber());\r\n if (((BeanBag) stockList.get(j)).getReservationNumber() == reservationNumber) {\r\n // Set the beanBag reserved state to \"true\" in the \"stockList\".\r\n System.out.println(\"TEST\");\r\n ((BeanBag) stockList.get(j)).setSold(true);\r\n }\r\n }\r\n unreserveBeanBags(reservationNumber);\r\n }",
"public void afterUpdate(RoomstatusBean pObject) throws SQLException;",
"void markInactive();",
"@Override\n\tpublic void updateBourse(Bourse brs) {\n\t\t\n\t}"
] |
[
"0.69521755",
"0.62514323",
"0.624743",
"0.6115181",
"0.6075184",
"0.6034292",
"0.59969455",
"0.59811056",
"0.5948167",
"0.59409535",
"0.5814198",
"0.5812807",
"0.5780838",
"0.57789236",
"0.57518333",
"0.57398224",
"0.57047814",
"0.56897694",
"0.56311625",
"0.56307393",
"0.5605596",
"0.5588617",
"0.5573244",
"0.5550364",
"0.55086213",
"0.5448096",
"0.54382616",
"0.5411601",
"0.5392812",
"0.5389926",
"0.537802",
"0.53572536",
"0.5357073",
"0.5339893",
"0.53343576",
"0.53235435",
"0.53232723",
"0.531498",
"0.52929014",
"0.5257334",
"0.5255738",
"0.52467287",
"0.5235066",
"0.52343845",
"0.5222016",
"0.52112603",
"0.51932025",
"0.5187179",
"0.51828134",
"0.51792914",
"0.5176438",
"0.51576036",
"0.51566994",
"0.5138161",
"0.5137478",
"0.5116241",
"0.5099567",
"0.5084131",
"0.5082794",
"0.5071681",
"0.5065688",
"0.50635576",
"0.503711",
"0.5034118",
"0.5025415",
"0.50219107",
"0.502167",
"0.5013778",
"0.50054663",
"0.49889076",
"0.49888176",
"0.49760884",
"0.4974974",
"0.49664065",
"0.49659622",
"0.49654156",
"0.4965379",
"0.49598277",
"0.49565673",
"0.4952496",
"0.4951262",
"0.49419078",
"0.49328974",
"0.49283922",
"0.49246186",
"0.49246186",
"0.49181026",
"0.49157494",
"0.49151102",
"0.4914533",
"0.4912961",
"0.49104795",
"0.49104795",
"0.49059778",
"0.4900139",
"0.48996627",
"0.48962867",
"0.48962066",
"0.4892245",
"0.4880521"
] |
0.7377952
|
0
|
Register customer method, keeps track of new customers
|
public void registerNewCustomers(Customer c) {
if (!newCustomers.contains(c)
&& !modifiedCustomers.contains(c)) {
newCustomers.add(c);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void register(Customer c) {\n\t\tUser.customers.add(c);\n\t}",
"@Override\r\n\tpublic void createAccount(Customer customer) {\n\t\tcustMap.put(customer.getMobileNo(),customer);\r\n\t\t\r\n\t}",
"static void register() {\r\n\t\tSystem.out.println(\"enter no of customers\");\r\n\t\tint n=scan.nextInt();\r\n\t\tfor(int i=0;i<n;i++) {\r\n\t\tCustomer cust=new Customer();\r\n\t\tSystem.out.println(\"enter first name\");\r\n\t\tcust.setFirstName(scan.next());\r\n\t\tSystem.out.println(\"enter last name\");\r\n\t\tcust.setLastName(scan.next());\r\n\t\tSystem.out.println(\"enter aadhar number\");\r\n\t\tcust.setAadharNo(scan.nextLong());\r\n\t\tSystem.out.println(\"enter address\");\r\n\t\tcust.setAddress(scan.next());\r\n\t\tSystem.out.println(\"enter mobile number\");\r\n\t\tcust.setMobileNo(scan.nextLong());\r\n\t\tSystem.out.println(\"enter password\");\r\n\t\tcust.setPassword(scan.next());\r\n\t\tSystem.out.println(\"enter account number\");\r\n\t\tlong no= 10000 + new Random().nextInt(90000);\r\n\t\t//System.out.println(Math.abs(cust.getAccNo()));\r\n\t\tlist.add(cust);\r\n\t\t}\r\n\t}",
"public void register(Customer customer) {\n\t\tcustomerDao.register(customer);\r\n\t}",
"public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}",
"public void addCustomer(){\n Customer customer = new Customer();\n customer.setId(data.numberOfCustomer());\n customer.setFirstName(GetChoiceFromUser.getStringFromUser(\"Enter First Name: \"));\n customer.setLastName(GetChoiceFromUser.getStringFromUser(\"Enter Last Name: \"));\n data.addCustomer(customer,data.getBranch(data.getBranchEmployee(ID).getBranchID()));\n System.out.println(\"Customer has added Successfully!\");\n }",
"@Override\n\tpublic boolean createCustomer(Customer customer) {\n\n\t\tif (customer != null) {\n\t\t\tcustomers.add(customer);\n\t\t\tlogger.info(\"Customer added to the list\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tlogger.info(\"Failed to add customer to the list: createCustomer()\");\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\n\tpublic Customer register(Customer customer) {\n\t\tcustomer=customerRepo.addCustomer(customer);\n\t\treturn customer;\n\t}",
"public static void createAccount(Customer customer) {\n\t\tcustomerList.add(customer);\n\t}",
"@Override\n\tpublic void createCustomer(Customer customer) throws Exception {\n\t\tConnection con = pool.getConnection();\n\t\ttry {\n\t\t\t\n\t\t\tStatement st = con.createStatement();\n\t\t\tString create = String.format(\"insert into customer values('%s', '%s')\", customer.getCustName(),\n\t\t\t\t\tcustomer.getPassword());\n\t\t\tst.executeUpdate(create);\n\t\t\tSystem.out.println(\"Customer added successfully\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage() + \"Unable to add A customer, Try Again! \");\n\t\t} finally {\n\t\t\tpool.returnConnection(con);\n\t\t}\n\t}",
"private void addCustomer() {\n try {\n FixCustomerController fixCustomerController = ServerConnector.getServerConnector().getFixCustomerController();\n\n FixCustomer fixCustomer = new FixCustomer(txtCustomerName.getText(), txtCustomerNIC.getText(), String.valueOf(comJobrole.getSelectedItem()), String.valueOf(comSection.getSelectedItem()), txtCustomerTele.getText());\n\n boolean addFixCustomer = fixCustomerController.addFixCustomer(fixCustomer);\n\n if (addFixCustomer) {\n JOptionPane.showMessageDialog(null, \"Customer Added Success !!\");\n } else {\n JOptionPane.showMessageDialog(null, \"Customer Added Fail !!\");\n }\n\n } catch (NotBoundException | MalformedURLException | RemoteException ex) {\n new ServerNull().setVisible(true);\n } catch (ClassNotFoundException | IOException ex) {\n Logger.getLogger(InputCustomers.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void addCustomer(CustomerAccount acc){\n accountHM.put(acc.getVehicle().getPlate(),acc);\n }",
"public void addCustomer() {\r\n\t\tdo {\r\n\t\t\tString name = getToken(\"Enter the customer's name: \");\r\n\t\t\tString phoneNumber = getToken(\"Enter the phone number: \");\r\n\t\t\tCustomer customer = store.addCustomer(name, phoneNumber);\r\n\t\t\tif (customer == null) {\r\n\t\t\t\tSystem.out.println(\"Could not add customer.\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(customer);\r\n\t\t} while (yesOrNo(\"Would you like to add another Customer?\"));\r\n\t}",
"public void registerCustomer(Customer customer) {\nSession session=sessionFactory.getCurrentSession();\n\t\t\n\t\tAuthorities authorities=new Authorities();\n\t\tauthorities.setRole(\"ROLE_USER\");\n\t\tauthorities.setUser(customer.getUser());//FK column in authorities table\n\t\t\n\t\tcustomer.getUser().setAuthorities(authorities);\n\t\tcustomer.getUser().setEnabled(true);\n\t\t\n\t\tCart cart=new Cart();\n\t\tcustomer.setCart(cart);\n\t\tcart.setCustomer(customer);\n\t\t\n\t\tsession.save(customer);\n\t\n\t\t\n\t}",
"@Override\n public void addCustomer(Customer customer) {\n log.info(\"Inside addCustomer method\");\n customerRepository.save(customer);\n }",
"private Customer storeCustomer(Customer customer){\n customerRestService.createCustomer(customer);\n return customer;\n }",
"public void registerDirtyCustomers(Customer c) {\n if (!newCustomers.contains(c)\n && !modifiedCustomers.contains(c)) {\n modifiedCustomers.add(c);\n }\n }",
"@Override\n\tpublic void addCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().save(customer);\n\t}",
"public void addCustomer(String c){\n\t\tif(!containsCustomer(c)){\n\t\t\tCustomer e = new Customer(c);\n\t\t\tlist.add(e);\n\t\t}\n\t}",
"@Override\n\t@Transactional\n\tpublic void addCustomer(Customer customer) {\n\n\t\tSystem.out.println(\"here is our customer\" + customer);\n\n\t\thibernateTemplate.saveOrUpdate(customer);\n\n\t}",
"static void addCustomer(customer customer) {\n\n }",
"@Test(alwaysRun=true, priority=16,enabled=true)\n\tpublic void chillerRegistrationNewCustomer() throws InterruptedException, IOException {\t\n\t\tadminPage.chillerRegistrationNewCustomer(driver);\n\t\t\n\t}",
"@Override\n\tpublic void create(Customer t) {\n\n\t}",
"public void addCustomer(Customer customer) throws UserExistsException {\r\n if (customerExists(customer)){\r\n throw new UserExistsException(\"Customer \"+ customer.getF_Name()+\" already exists\");\r\n }\r\n customers.add(customer);\r\n }",
"public boolean addCustomer(CustomerBean customer);",
"Customer createCustomer();",
"Customer createCustomer();",
"Customer createCustomer();",
"Customer createCustomer();",
"public void registerCustomer() {\n\t \n\t try{\n\t\t con = openDBConnection();\n\t\t callStmt = con.prepareCall(\" {call team5.CUSTOMER_REGISTER_PROC(?,?,?,?,?,?,?)}\");\n\t\t callStmt.setString(1,this.phoneno);\n\t\t callStmt.setString(2,this.emailad);\n\t\t callStmt.setString(3,this.fname);\n\t\t callStmt.setString(4,this.lname);\n\t\t callStmt.setString(5,this.username);\n\t\t callStmt.setString(6,this.password);\n\t\t callStmt.setInt(7, this.id);\n\t\t callStmt.execute();\n\t\t callStmt.close();\n\t } catch (Exception E) {\n\t E.printStackTrace();\n\t }\n}",
"public void addUser(Customer user) {}",
"@Test\n\tpublic void testCustomerRegistration() {\n\t\tString username = \"deColores\";\n\t\tString password = \"inExasperation\";\n\t\t\n\t\tUserFunctions uf = new UserFunctions();\n\t\tint sizeBeforeAddition = uf.getUserDAO().getAllUsers().size();\n\t\tuf.customerRegistration(username, password);\n\t\t\n\t\tassertEquals(sizeBeforeAddition + 1, uf.getUserDAO().getAllUsers().size());\n\t}",
"public au.gov.asic.types.AccountIdentifierType addNewCustomer()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.AccountIdentifierType target = null;\n target = (au.gov.asic.types.AccountIdentifierType)get_store().add_element_user(CUSTOMER$0);\n return target;\n }\n }",
"@Override\n\tpublic String insertNewCustomer(Customer c) {\n\n\t\tInteger id=dao.insertNewCustomer(c);\n\t\tif(id==null)\n\t\t\treturn \"User registratin failed\";\n\t\treturn \"User registration successfull having user ID - \"+id;\n\n\t}",
"public void setCustomer(Customer customer) {\r\n\t\tthis.customer = customer;\r\n\t\tpassengers.add(customer);\r\n\t}",
"@Override\r\n\tpublic int insertNewCustomer(Customer cust) throws CustException {\n\t\tmanager.persist(cust);\r\n\t\treturn 1;\r\n\t}",
"@Override\r\n\tpublic boolean createAccount(CustomerBean cb) {\n\t\r\n\t\treturn customerList.add(cb);\r\n\t}",
"@GetMapping(\"/customers/register\")\n @ResponseStatus(HttpStatus.CREATED)\n public String Add(@ModelAttribute Customer customer, Model model) {\n model.addAttribute(\"customer\", customer);\n\n return \"bank/register\";\n }",
"@Override\r\n\tpublic boolean registerCustomer(CustomerDto customerDto) {\r\n\t\tif (customerDto == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tOptional<Customer> customer1 = customerRepository\r\n\t\t\t\t.findByUsername(Convertor.convertCustomerDTOtoEntity(customerDto).getUsername());\r\n\t\tif (customer1.isPresent()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tcustomerRepository.save(Convertor.convertCustomerDTOtoEntity(customerDto));\r\n\t\treturn true;\r\n\t}",
"public Customer() {\n\t\tcustref++;\n\t}",
"void insertCustomer() {\n\t\tCallableStatement cs = null;\n\t\ttry {\n\t\t\tString call = \"call insert_customer (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\t\t\tcs = conn.prepareCall(call);\t\t\t\n\t\t\tArrayList <String> param = new ArrayList<String>(); \n\t\t\tparam.add(genderBox.getSelectedItem().toString());\n\t\t\tparam.add(titleBox.getSelectedItem().toString());\n\t\t\tparam.add(fieldFirstName.getText());\t\t\t\n\t\t\tparam.add(fieldMidName.getText());\n\t\t\tparam.add(fieldLastName.getText());\n\t\t\tparam.add(fieldAddress.getText());\n\t\t\tparam.add(fieldCity.getText());\n\t\t\tparam.add(fieldState.getText());\n\t\t\tparam.add(fieldZipcode.getText());\n\t\t\tparam.add(fieldEmail.getText());\t\t\t\n\t\t\tparam.add(fieldUsername.getText());\n\t\t\tparam.add(fieldPassword.getText());\n\t\t\tparam.add(fieldTelephone.getText());\n\t\t\tparam.add(fieldMaidenName.getText());\n\t\t\tparam.add(fieldBirthday.getText());\n\t\t\tparam.add(cctypeBox.getSelectedItem().toString());\n\t\t\tparam.add(fieldCCnumber.getText());\n\t\t\tparam.add(fieldCCV.getText());\n\t\t\tparam.add(fieldExpirDate.getText());\n\t\t\tparam.add(fieldSocialSecurity.getText() + \" \");\n\t\t\t\n\t\t\tfor (int i = 0; i < 20; i++) {\n\t\t\t\tcs.setString(i+1, param.get(i));\n\t\t\t}\n\t\t\tcs.executeUpdate();\n\t\t\tconn.commit();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Exception caught: \" + e.getMessage());\n\t\t\tJOptionPane.showMessageDialog(this, \"User, \" + fieldUsername.getText() +\" already exists.\");\n\t\t} finally {\n\t\t\t\n\t\t}\n\t}",
"public void setExistingCustomer(Customer existingCustomer) { this.existingCustomer = existingCustomer; }",
"@Transactional\n\t@Override\n\tpublic Customer createCustomer(String name) {\n\t\t\n\t\tvalidateName(name);\n\t\tLocalDateTime now = LocalDateTime.now();\n\t\tAccount account = new Account(5000.0, now);\n\t\taccountRepository.save(account);\n\t\tSet<Item> set = new HashSet<>();\n\t\tCustomer customer = new Customer(name, account,set);\n\t\tcustRepository.save(customer);\n\t\treturn customer;\n\t\t\n\t}",
"public void addCustomer(CustomerSignup p)\n {\n Session session = this.sessionFactory.getCurrentSession();\n \n session.persist(p);\n \n CustomerLogin cl=new CustomerLogin();\n cl.setUsername(p.getUsername());\n cl.setPassword(p.getPassword());\n cl.setId(p.getId());\n session.persist(cl);\n \n Authorities a = new Authorities();\n a.setUsername(p.getUsername());\n a.setAuthority(\"ROLE_USER\");\n a.setId(p.getId());\n session.saveOrUpdate(a);\n\n session.flush();\n \n logger.info(\"Customer saved successfully, Customer Details=\"+p);\n }",
"public void addCustomer(Customer customer) {\r\n if (hasID(customer.getID())) {\r\n return;\r\n }\r\n\r\n for (int i = 0; i < customers.length; i++) {\r\n if (customers[i] == null) {\r\n customers[i] = customer;\r\n return;\r\n }\r\n }\r\n\r\n System.err.println(\"No more room in database!\");\r\n }",
"public void setCustomer(String Cus){\n\n this.customer = Cus;\n }",
"private void createCustomer(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n String customerName = request.getParameter(\"CustomerName\");\n System.out.println(\"them mới id\"+ customerName);\n String customerBir = request.getParameter(\"CustomerBir\");\n String gender = request.getParameter(\"Gender\");\n int cusIdNum =Integer.parseInt(request.getParameter(\"CusIdNum\"));\n int cusTelNum = Integer.parseInt(request.getParameter(\"CusTelNum\"));\n String cusEmail = request.getParameter(\"CusEmail\");\n String address = request.getParameter(\"Address\");\n String customerTypeId = request.getParameter(\"CustomerTypeId\");\n System.out.println(\"them mới id\"+ customerName);\n Customer customer = new Customer(customerName,customerBir,gender,cusIdNum,cusTelNum,cusEmail,address, new CustomerType(customerTypeId));\n customerService.save(customer);\n showCustomerList(request,response);\n System.out.println(\"them mới\"+ customer);\n }",
"public void setCustomer(String customer) {\n this.customer = customer;\n }",
"@Path(\"customer\")\n @Service({\"customer\"})\n public ResponseMessage addCustomer(Customer customer) {\n return csi.addCustomer(customer);\n }",
"public void addCustomer() {\n\t\tSystem.out.println(\"Enter your first name.\");\n\t\tString fn = scan.nextLine();\n\t\tSystem.out.println(\"Enter your last name.\");\n\t\tString ln = scan.nextLine();\n\t\tSystem.out.println(\"Enter your username.\");\n\t\tString user = scan.nextLine();\n\t\tSystem.out.println(\"Enter your password.\");\n\t\tString pw = scan.nextLine();\n\t\tSystem.out.println(\"Password once more (to be safe.)\");\n\t\tString pw2 = scan.nextLine();\n\t\t/*if (pw.toString() != pw2.toString()) {\n\t\t\tSystem.out.println(\"Whoops! Let's try that again.\");\n\t\t\taddCustomer();\n\t\t}\n\t\t*/\n\t\t//else {\n String sql = \"INSERT INTO bank.login (first_name, last_name, user_name, password) VALUES (\"+\"\\\"\"+fn+\"\\\"\"+\", \"+\"\\\"\"+ln+\"\\\"\"+\", \"\n\t\t+\"\\\"\"+user+\"\\\"\"+\", \"+\"\\\"\"+pw+\"\\\"\"+\")\";\n\n try{\n \t\n \tconnect.databaseUtil();\n Statement statement = Database.connection.createStatement();\n // ResultSet resultSet =\n \t\tstatement.executeUpdate(sql);\n try {\n \t\t\tconnect.databaseClose();\n \t\t} catch (SQLException e) {\n \t\t\t\n \t\t\te.printStackTrace();\n \t\t}\n\n bank.start();\n }\n \n\n catch(SQLException e){\n \t\te.printStackTrace();\n Menus.custMenu();\n\n }\n\n \n\t\t\n\t}",
"@Override\n\tpublic void addCustomer(Customer customer, Branch branch) {\n\t\t\n\t}",
"public CustomerService() {\n\n Customer c1 = new Customer(\"Brian May\", \"45 Dalcassian\", \"[email protected]\", 123);\n Customer c2 = new Customer(\"Roger Taylor\", \"40 Connaught Street\", \"[email protected]\", 123);\n Customer c3 = new Customer(\"John Deacon\", \"2 Santry Avenue\", \"[email protected]\", 123);\n Customer c4 = new Customer(\"Paul McCartney\", \"5 Melville Cove\", \"[email protected]\", 123);\n\n c1.setIdentifier(1);\n c2.setIdentifier(2);\n c3.setIdentifier(3);\n c4.setIdentifier(4);\n customers.add(c1);\n customers.add(c2);\n customers.add(c3);\n customers.add(c4);\n\n c1.addAccount(new Account(101));\n c2.addAccount(new Account(102));\n c2.addAccount(new Account(102));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c3.addAccount(new Account(103));\n c4.addAccount(new Account(104));\n\n }",
"@Override\n\tpublic void putCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(customer);;\n\n\t}",
"@PostMapping(\"/customers\")\n public Customer addCustomer(@RequestBody Customer theCustomer)\n {\n //also just in case they pass an id in JSON .. set id to o\n //this is to force a save of new item ... instead od update\n theCustomer.setId(0);\n customerService.save(theCustomer);\n return theCustomer;\n }",
"public int insertCustomer() {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic Customers create(Customers newcust) {\n\t\tif (newcust.getId()!=null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tCustomers savecust = CustRepo.save(newcust);\n\t\treturn savecust;\n\t}",
"Customers createCustomers();",
"public void registerCustomerToEvent(Client client) {\n\n\t}",
"private Customer createCustomerData() {\n int id = -1;\n Timestamp createDate = DateTime.getUTCTimestampNow();\n String createdBy = session.getUsername();\n\n if (action.equals(Constants.UPDATE)) {\n id = existingCustomer.getCustomerID();\n createDate = existingCustomer.getCreateDate();\n createdBy = existingCustomer.getCreatedBy();\n }\n\n String name = nameField.getText();\n String address = addressField.getText() + \", \" + cityField.getText();\n System.out.println(address);\n String postal = postalField.getText();\n String phone = phoneField.getText();\n Timestamp lastUpdate = DateTime.getUTCTimestampNow();\n String lastUpdatedBy = session.getUsername();\n\n FirstLevelDivision division = divisionComboBox.getSelectionModel().getSelectedItem();\n int divisionID = division.getDivisionID();\n\n return new Customer(id, name, address, postal, phone, createDate, createdBy, lastUpdate, lastUpdatedBy, divisionID);\n }",
"public void create(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"INSERT INTO customer (name, id, phone) VALUES (?, ?, ?)\");\n ppst.setString(1, c.getName());\n ppst.setString(2, c.getId());\n ppst.setString(3, c.getPhone());\n ppst.executeUpdate();\n System.out.println(\"Customer created.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Creation error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }",
"private void addCustomer(Customer customer) {\n List<String> args = Arrays.asList(\n customer.getCustomerName(),\n customer.getAddress(),\n customer.getPostalCode(),\n customer.getPhone(),\n customer.getCreateDate().toString(),\n customer.getCreatedBy(),\n customer.getLastUpdate().toString(),\n customer.getLastUpdatedBy(),\n String.valueOf(customer.getDivisionID())\n );\n DatabaseConnection.performUpdate(\n session.getConn(),\n Path.of(Constants.UPDATE_SCRIPT_PATH_BASE + \"InsertCustomer.sql\"),\n args\n );\n }",
"Customer(){}",
"@Test(alwaysRun=true, priority=15,enabled=true)\n\tpublic void addNewCustomer() throws InterruptedException, IOException {\t\n\t\tadminPage.addNewCustomer(driver);\n\t}",
"@PostMapping(\"/customers\")\r\n\tpublic Customer addCustomer(@RequestBody Customer customer) {\n\t\tcustomer.setId(0);\r\n\t\t\r\n\t\tcustomerService.saveCustomer(customer);\r\n\t\treturn customer;\r\n\t}",
"@Transactional\n @Override\n public User add(RegisterCustomerDto registerCustomerDto) {\n\n Customer customer = new Customer();\n customer.setUsername(registerCustomerDto.getUsername());\n customer.setEmail(registerCustomerDto.getEmail());\n\n customer = customerDao.saveOrUpdate(customer);\n\n Role role = roleDao.findByName(RoleEnum.USER.getRole().getName());\n if (role == null) {\n role = roleDao.add(RoleEnum.USER.getRole());\n }\n\n Set<Role> roles = new HashSet<>();\n roles.add(role);\n\n BCryptPasswordEncoder bCrypt = new BCryptPasswordEncoder();\n String password = bCrypt.encode(registerCustomerDto.getPassword());\n\n User user = new User();\n user.setCustomer(customer);\n user.setPassword(password);\n user.setRoles(roles);\n user.setName(registerCustomerDto.getUsername());\n\n return userDao.saveOrUpdate(user);\n }",
"@PostMapping(\"/addcustomer\")\n\tpublic String save(@ModelAttribute(\"customer\") Customer theCustomer) {\n\t\tcustomerServices.save(theCustomer);\n\t\treturn \"redirect:/dairymilk/customers\";\n\t}",
"@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"Mobile Customer Add()\");\n\t}",
"void createAndManageCustomer() {\r\n\t\tSystem.out.println(\"\\nCreating and managing a customer:\");\r\n\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c = new Customer2(\"Sami\", \"Cemil\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c);\r\n\t\ttx.commit();\r\n\t\tSystem.out.println(c);\r\n\t\t\r\n\t\ttx = em.getTransaction();\r\n\t\ttx.begin();\r\n\t\tc.setLastName(\"Kamil\");\r\n\t\ttx.commit();\r\n\t\tSystem.out.println(c);\r\n\t\tem.close();\r\n\t}",
"@Test\n public void testCustomerFactoryCreate() {\n CustomerController customerController = customerFactory.getCustomerController();\n customerController.addCustomer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n assertEquals(1, customerController.getCustomerList().size());\n }",
"@PostMapping(value=\"/createCustomer\")\n\tpublic String createCustomer()\n\t{\n\t\t//return customer\n\t\treturn \"Created Customer\";\n\t}",
"public Customer createCustomer() {\r\n\t\ttry {\r\n\t\t\treturn manager.createCustomer();\t\t\t\r\n\t\t}catch(SQLException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"The manager was unable to create a new customer\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic int insertCustomer(Customer customer) throws BillingServicesDownException {\n\t\treturn 0;\r\n\t}",
"SerialResponse createCustomer(PinCustomerPost pinCustomerPost);",
"public void add(Customer c) {\n customers.add(c);\n\n fireTableDataChanged();\n }",
"public void createSalerCustomer(SalerCustomer salerCustomer) {\n\t\tthis.salerCustomerMapper.createSalerCustomer(salerCustomer);\n\t}",
"public boolean addCustomer(Customer customer) throws DatabaseOperationException;",
"@PostMapping()\n public String createCustomer(\n @ModelAttribute(CUSTOMER) CustomerDTO customerDTO) {\n customerDTO.getActualAddress().setCreated(LocalDateTime.now());\n customerDTO.getRegisteredAddress().setCreated(LocalDateTime.now());\n Customer customer = mapDTOCustomerToPersistent(customerDTO);\n customerService.saveCustomer(customer);\n return REDIRECT_CLIENTS;\n }",
"@Override\n\tpublic void addCustomer(Customer customer) {\n\t\tcustomerDao.addCustomer(customer);\n\t}",
"private void createCustomer(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n int id = Integer.parseInt(request.getParameter(\"id\"));\n Customer checkCustomer = CustomerDao.getCustomer(id);\n if (checkCustomer == null) {\n String name = request.getParameter(\"name\");\n String phone = request.getParameter(\"phone\");\n String email = request.getParameter(\"email\");\n Customer newCustomer = new Customer(id, name, phone, email);\n CustomerDao.addCustomer(newCustomer);\n response.sendRedirect(\"/\");\n }\n else {\n String message = \"This ID already exist\";\n String name = request.getParameter(\"name\");\n String phone = request.getParameter(\"phone\");\n String email = request.getParameter(\"email\");\n Customer ExitCustomer = new Customer(id, name, phone, email);\n request.setAttribute(\"message\", message);\n request.setAttribute(\"customer\", ExitCustomer);\n RequestDispatcher dispatcher = request.getRequestDispatcher(\"customer/newCustomer.jsp\");\n dispatcher.forward(request, response);\n }\n }",
"@Override\n public JSONDoRegistrationResult DoRegistration(JSONDoRegistrationData data) throws Exception{\n JSONDoRegistrationResult v_res = new JSONDoRegistrationResult();\n if (!m_CustomerProvider.checkIdentificator(data.getAccount().getEmail())) {\n v_res.addStatus(JSONDoRegistrationResult.USEDEMAIL);\n }\n if (!m_CustomerProvider.checkIdentificator(data.getAccount().getLogin())) {\n v_res.addStatus(JSONDoRegistrationResult.USEDLOGIN);\n }\n if (!m_CustomerProvider.checkIdentificator(data.getAccount().getTelephone())) {\n v_res.addStatus(JSONDoRegistrationResult.USEDPHONE);\n }\n // TODO add check for correct email/phone/login/password\n if (!v_res.getStatus().isEmpty()) {\n return v_res;\n }\n \n Customer v_customer = new Customer();\n v_customer.setEmail(data.getAccount().getEmail());\n v_customer.setLogin(data.getAccount().getLogin());\n v_customer.setName(data.getAccount().getName());\n v_customer.setTelephone(data.getAccount().getTelephone());\n String v_hashedPWD = Hasher.generateStorngPasswordHash(data.getAccount().getPassword());\n v_customer.setPassword(v_hashedPWD);\n \n m_CustomerProvider.placeCustomer(v_customer);\n \n v_res.addStatus(JSONDoRegistrationResult.OK);\n \n return v_res;\n }",
"public Customermodel addCustomer(Customermodel customermodel) {\n\t\t return customerdb.save(customermodel);\n\t }",
"public ResponseEntity<?> createCustomer(customer.controller.Customer customer);",
"public Customer addCustomer(Customer customer) {\n customer.setMemberSince(LocalDate.now());\n customer.setStatus(MembershipStatus.ACTIVE);\n return customerRepository.save(customer);\n }",
"@Override\n\tpublic void saveCustomer(Customer theCustomer){\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n//\t\tcurrentSession.createQuery(\"from Customer c where c.firstName=\"+ theCustomer.getFirstName()).executeUpdate();\n\n\t\tQuery<Customer> query =\n\t\t\t\tcurrentSession.createQuery(\"select c from Customer c \"+\n\t\t\t\t\t\t\t\t\"where c.firstName =:theCustomerFirstName and \" +\n\t\t\t\t\t\t\t\t\"c.lastName =:theCustomerLastName and \" +\n\t\t\t\t\t\t\t\t\"c.email=:theCustomerEmail\",\n\t\t\t\t\t\t Customer.class);\n\n\t\t// set parameter on query\n\t\tquery.setParameter(\"theCustomerFirstName\", theCustomer.getFirstName());\n\t\tquery.setParameter(\"theCustomerLastName\", theCustomer.getLastName());\n\t\tquery.setParameter(\"theCustomerEmail\", theCustomer.getEmail());\n\n\t\ttry {\n\t\t\t// execute query and get instructor\n\t\t\tCustomer temp = query.getSingleResult();\n\t\t}\n\t\tcatch (Exception exe){\n\t\t\tlogger.log(Level.INFO,\"Already exists!!\");\n\t\t\tcurrentSession.saveOrUpdate(theCustomer);\n\t\t}\n\t}",
"void createCustomers() {\r\n\t\tSystem.out.println(\"\\nCreating 5 customers:\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c1 = new Customer2(\"Ali\", \"Telli\");\r\n\t\tCustomer2 c2 = new Customer2(\"Serap\", \"Atik\");\r\n\t\tCustomer2 c3 = new Customer2(\"Kemal\", \"Tanir\");\r\n\t\tCustomer2 c4 = new Customer2(\"Betul\", \"Kara\");\r\n\t\tCustomer2 c5 = new Customer2(\"Selman\", \"Saki\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c1);\r\n\t\tem.persist(c2);\r\n\t\tem.persist(c3);\r\n\t\tem.persist(c4);\r\n\t\tem.persist(c5);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}",
"@PostMapping( value = CustomerRestURIConstants.POST_CUSTOMER )\n\tpublic ResponseEntity<?> addCustomer(@RequestBody Customer customer) {\n\t\tlong id = customerService.save(customer);\n\t return ResponseEntity.ok().body(\"New Customer has been saved with ID:\" + id);\n\t}",
"public boolean insertCustomer(Customer customer){\n\n ContentValues cv = new ContentValues();\n\n cv.put(\"customer_name\", customer.getName());\n cv.put(\"customer_description\", customer.getDescription());\n\n long insert = _db.insert(\"Customer\", null, cv);\n\n // Checks if rows have been updated.\n if(insert == -1){\n return false;\n }\n\n return true;\n }",
"public synchronized Person addNewBuyer(String name) {\n Customer newCustomer = new Customer(UsersSerialGenerator++,name);\n m_CustomersInSystem.put(name,newCustomer);\n return newCustomer;\n }",
"private Customer addCustomerDetails(CustomerRegRequestDto requestDto) {\n\t\tString customerId = null;\n\n\t\tOptional<Utility> details = utilityRepo.findByUtilityId(requestDto.getCustomerUtilityId());\n\t\tif (!details.isPresent())\n\t\t\tthrow new NoDataFoundException(CustomerConstants.UTILITY_NOT_FOUND);\n\n\t\tOptional<Customer> getCustomer = customerRepo.findFirstByOrderByModifiedDateDesc();\n\t\tif (getCustomer.isPresent()) {\n\t\t\tif (getCustomer.get().getCustomerId().charAt(0) == CustomerConstants.CUSTOMER_STARTING)\n\t\t\t\tcustomerId = Helper.generateNextCustomerId(getCustomer.get().getCustomerId(),\n\t\t\t\t\t\tdetails.get().getUtilityName());\n\t\t\telse\n\t\t\t\tcustomerId = Helper.generateUniqueCustomerId(details.get().getUtilityName());\n\n\t\t} else {\n\t\t\tcustomerId = Helper.generateUniqueCustomerId(details.get().getUtilityName());\n\n\t\t}\n\t\tmodelMapper.getConfiguration().setAmbiguityIgnored(true);\n\t\tCustomer addNewCustomer = modelMapper.map(requestDto, Customer.class);\n\t\taddNewCustomer.setCustomerId(customerId);\n\t\taddNewCustomer.setActive(true);\n\t\taddNewCustomer.setCreatedBy(requestDto.getUserId());\n\t\taddNewCustomer.setCreatedDate(new Date());\n\t\taddNewCustomer.setModifiedBy(requestDto.getUserId());\n\t\taddNewCustomer.setModifiedDate(new Date());\n\t\treturn customerRepo.save(addNewCustomer);\n\t}",
"@Override\n\t@Transactional\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tcustomerDAO.saveCustomer(theCustomer);\n\t\t\n\t}",
"public void registerCustomer(Message message, JsonObject payload) {\n Message reply = this.createReply(message);\n\n try {\n CustomerDTO dto = gson.fromJson(payload.toString(), CustomerDTO.class);\n\n Customer customer = new Customer();\n customer.setFirstName(dto.getFirstName());\n customer.setLastName(dto.getLastName());\n customer.setAccountID(dto.getAccountNumber());\n UUID customerID = customerService.registerCustomer(customer);\n dto.setCustomerID(customerID);\n reply.setPayload(dto);\n reply.setStatus(201);\n\n } catch(CustomerException ce){\n reply.setStatus(400);\n reply.setStatusMessage(ce.getMessage());\n this.sendMessage(reply);\n return;\n }\n\n this.sendMessage(reply);\n }",
"public void setCustomer(org.tempuri.Customers customer) {\r\n this.customer = customer;\r\n }",
"@Override\n\tpublic void saveUserInfo(Customer customer) {\n\t\t\n\t}",
"@Override\r\n\tpublic void saveCustomer(CRMDto theCustomer) {\n\t\t\r\n\t\tSession session = factory.openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tsession.update(theCustomer);\r\n\t\ttx.commit();\r\n\t\t//System.out.println(\"pk update is \" +pk);\r\n\t\t\r\n\t\t\r\n\t}",
"private PersonCtr createCustomer()\n {\n\n // String name, String addres, int phone, int customerID\n PersonCtr c = new PersonCtr();\n String name = jTextField3.getText();\n String address = jTextPane1.getText();\n int phone = Integer.parseInt(jTextField2.getText());\n int customerID = phone;\n Customer cu = new Customer();\n cu = c.addCustomer(name, address, phone, customerID);\n JOptionPane.showMessageDialog(null, cu.getName() + \", \" + cu.getAddress()\n + \", tlf.nr.: \" + cu.getPhone() + \" er oprettet med ID nummer: \" + cu.getCustomerID()\n , \"Kunde opretttet\", JOptionPane.INFORMATION_MESSAGE);\n return c;\n\n\n }",
"protected void setCustomer(Customer customer) {\n this.customer = customer;\n }",
"void createCustomerAccount(String mobileNumber) throws Exception;",
"public Customer(String name, String email, String password, double amount, LocalDate regDate) {\r\n\t\tthis.custId = idCounter++;\r\n\t\tthis.name = name;\r\n\t\tthis.email = email;\r\n\t\tthis.password = password;\r\n\t\tthis.amount = amount;\r\n\t\tthis.regDate = regDate;\r\n\t}",
"@RequestMapping(value=\"/pizza/custCreate.html\", method = RequestMethod.POST)\r\n public ModelAndView custCreate(\r\n @ModelAttribute(\"customer\")Customer customer,\r\n @CookieValue(value = \"v\", defaultValue = \"\") String visitorId,\r\n HttpServletResponse response) throws Exception {\n visitorManager.setCookieValue(visitorId);\r\n \r\n // Get the current order\r\n Order order = shoppingCart.getOrder();\r\n ModelAndView result = new ModelAndView(\"/pizza/cardEntry\");\r\n result.addObject(\"order\", order);\r\n \r\n // TODO: Is the customer valid?\r\n \r\n // Add the customer to the order\r\n order.setCustomer(customer);\r\n shoppingCart.assignCustomer(customer);\r\n\r\n // Remember the visitor\r\n response.addCookie(new Cookie(\"v\", visitorManager.getCookieValue()));\r\n return result;\r\n }",
"@Test\n\tpublic void addCustest() {\n\t\tbc.addCustomer(\"wgl\", myDate, \"Beijing\");\n\t\tint flag = 0;\n\t\tfor(Customer cus : bc.cusList){\n\t\t\tif(cus.getName().equals(\"wgl\")){\n\t\t\t\tflag = 1;\n\t\t\t}\n\t\t}\n\t\tassertEquals(1, flag);\n\t}"
] |
[
"0.7927342",
"0.7463314",
"0.74583817",
"0.74169767",
"0.7376649",
"0.73239607",
"0.7270576",
"0.72490925",
"0.71488214",
"0.71359056",
"0.7129848",
"0.6993342",
"0.6949236",
"0.6932522",
"0.68987274",
"0.6892046",
"0.6887752",
"0.6879463",
"0.6842936",
"0.6841593",
"0.68242705",
"0.6809151",
"0.67997414",
"0.67863154",
"0.6773318",
"0.6751599",
"0.6751599",
"0.6751599",
"0.6751599",
"0.6746363",
"0.6728357",
"0.6691836",
"0.6630651",
"0.6616407",
"0.66139436",
"0.6599286",
"0.65914345",
"0.65721095",
"0.656806",
"0.6563337",
"0.65538096",
"0.6542992",
"0.65406865",
"0.6530622",
"0.6528472",
"0.65259707",
"0.65253454",
"0.6525107",
"0.652319",
"0.65071523",
"0.6490555",
"0.6490497",
"0.6487833",
"0.64876354",
"0.648391",
"0.64717376",
"0.6459818",
"0.64588374",
"0.6454374",
"0.6443052",
"0.6436733",
"0.6419257",
"0.64176595",
"0.64101565",
"0.6409184",
"0.6408049",
"0.63932294",
"0.63807714",
"0.63723725",
"0.63608146",
"0.63588935",
"0.6356504",
"0.6352217",
"0.6346754",
"0.63390976",
"0.6325233",
"0.6324288",
"0.632217",
"0.6320313",
"0.6309826",
"0.6307731",
"0.6305008",
"0.6291258",
"0.62849057",
"0.62835425",
"0.6280466",
"0.628039",
"0.6277807",
"0.6272891",
"0.62631136",
"0.62500215",
"0.6248939",
"0.6246041",
"0.6239403",
"0.62334406",
"0.622572",
"0.6221831",
"0.6221249",
"0.6218548",
"0.621815"
] |
0.7771489
|
1
|
Register dirty customer method, keeps track of modified customers
|
public void registerDirtyCustomers(Customer c) {
if (!newCustomers.contains(c)
&& !modifiedCustomers.contains(c)) {
modifiedCustomers.add(c);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void registerNewCustomers(Customer c) {\n if (!newCustomers.contains(c)\n && !modifiedCustomers.contains(c)) {\n newCustomers.add(c);\n }\n }",
"@Override\n\tpublic boolean updateCustomer(Customer customer) {\n\t\treturn false;\n\t}",
"public void addFlag(Customer c){\n }",
"public void update(Customer myCust){\n }",
"public boolean updateCustomer() {\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic void modifyCustomer(Customer customer, Branch branch) {\n\t\t\n\t}",
"public void setExistingCustomer(Customer existingCustomer) { this.existingCustomer = existingCustomer; }",
"@Override\n\tpublic void update(Customer customer) {\n\t\t\n\t}",
"@Override\n\tpublic void update(Customer customer) {\n\t\t\n\t}",
"@Override\n\tpublic void update(Customer t) {\n\n\t}",
"public void update(Customer customer) {\n\n\t}",
"@Override\r\n\tpublic void updateWx_BindCustomerPassword(Wx_BindCustomer wx_BindCustomer) {\n\t\tshopuserDao.updateWx_BindCustomerPassword(wx_BindCustomer);\r\n\t}",
"@Override\n public void updateCustomer(UUID customerId, @RequestBody Customer customer) {\n log.debug(\"Updating a customer to service...\");\n }",
"@Override\n public void addCustomer(Customer customer) {\n log.info(\"Inside addCustomer method\");\n customerRepository.save(customer);\n }",
"static void addCustomer(customer customer) {\n\n }",
"@Override\r\n\tpublic void saveCustomer(CRMDto theCustomer) {\n\t\t\r\n\t\tSession session = factory.openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tsession.update(theCustomer);\r\n\t\ttx.commit();\r\n\t\t//System.out.println(\"pk update is \" +pk);\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tpublic Customer register(Customer customer) {\n\t\tcustomer=customerRepo.addCustomer(customer);\n\t\treturn customer;\n\t}",
"public boolean addCustomer(CustomerBean customer);",
"@Override\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// save/upate the customer ... finally LOL\n\t\tcurrentSession.saveOrUpdate(theCustomer);\n\t\t\n\t}",
"@Override\n\tpublic void addCustomer(Customer customer, Branch branch) {\n\t\t\n\t}",
"@Override\n\t@Transactional\n\tpublic void addCustomer(Customer customer) {\n\n\t\tSystem.out.println(\"here is our customer\" + customer);\n\n\t\thibernateTemplate.saveOrUpdate(customer);\n\n\t}",
"@Override\n\t@Transactional\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tcustomerDAO.saveCustomer(theCustomer);\n\t\t\n\t}",
"@Override\n\tpublic void saveUserInfo(Customer customer) {\n\t\t\n\t}",
"@Override\n public void updateCustomer(UUID id, CustomerDto customer) {\n log.debug(\"Customer is updated: customerId: \"+id);\n }",
"@Override\n\tpublic void update() {\n\t\tSystem.out.println(\"Mobile Customer update()\");\n\t}",
"@Override\n\tpublic void modifyAccount(Account account, Customer customer) {\n\t\t\n\t}",
"@Override\n\tpublic void putCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(customer);;\n\n\t}",
"@Override\n\tpublic void addCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().save(customer);\n\t}",
"@Override\r\n\tpublic void createAccount(Customer customer) {\n\t\tcustMap.put(customer.getMobileNo(),customer);\r\n\t\t\r\n\t}",
"public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// save the customer\n\t\tcurrentSession.saveOrUpdate(theCustomer);\n\t\t//currentSession.save(theCustomer);\n\t}",
"@Override\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// currentSession.save(theCustomer);\n\n\t\t// save/upate the customer\n\t\tcurrentSession.saveOrUpdate(theCustomer);\n\t}",
"@Override\n\tpublic void handleCustomer(Customer cust) {\n\t}",
"@Override\n\tpublic void handleCustomer(Customer cust) {\n\t}",
"@Override\n\tpublic void handleCustomer(Customer cust) {\n\t}",
"@Override\n\tpublic void handleCustomer(Customer cust) {\n\t}",
"@Override\n\tpublic void handleCustomer(Customer cust) {\n\t}",
"void updateCustomerById(Customer customer);",
"@Override\n\tpublic boolean createCustomer(Customer customer) {\n\n\t\tif (customer != null) {\n\t\t\tcustomers.add(customer);\n\t\t\tlogger.info(\"Customer added to the list\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tlogger.info(\"Failed to add customer to the list: createCustomer()\");\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\n\tpublic void gatherRetailCustomerInfo(RetailCustomer retailCustomer) {\n\t\tretailCustomerUserBill = new Billing();\n\t\tthis.retailCustomer = retailCustomer;\n\t}",
"@Override\n\tpublic Customer saveCustomer(Customer customer) {\n\t\treturn null;\n\t}",
"private void addCustomer() {\n try {\n FixCustomerController fixCustomerController = ServerConnector.getServerConnector().getFixCustomerController();\n\n FixCustomer fixCustomer = new FixCustomer(txtCustomerName.getText(), txtCustomerNIC.getText(), String.valueOf(comJobrole.getSelectedItem()), String.valueOf(comSection.getSelectedItem()), txtCustomerTele.getText());\n\n boolean addFixCustomer = fixCustomerController.addFixCustomer(fixCustomer);\n\n if (addFixCustomer) {\n JOptionPane.showMessageDialog(null, \"Customer Added Success !!\");\n } else {\n JOptionPane.showMessageDialog(null, \"Customer Added Fail !!\");\n }\n\n } catch (NotBoundException | MalformedURLException | RemoteException ex) {\n new ServerNull().setVisible(true);\n } catch (ClassNotFoundException | IOException ex) {\n Logger.getLogger(InputCustomers.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"protected void setCustomer(Customer customer) {\n this.customer = customer;\n }",
"public void register(Customer c) {\n\t\tUser.customers.add(c);\n\t}",
"@Override\r\n\tpublic boolean createAccount(CustomerBean cb) {\n\t\r\n\t\treturn customerList.add(cb);\r\n\t}",
"@Override\n\t@Transactional\n\tpublic void updateCustomer(Customer customer) {\n\n\t\thibernateTemplate.update(customer);\n\t\tSystem.out.println(\"customer is updated \" + customer);\n\n\t}",
"public boolean setCustomer(Customer aCustomer)\n {\n boolean wasSet = false;\n if (aCustomer == null)\n {\n return wasSet;\n }\n\n Customer existingCustomer = customer;\n customer = aCustomer;\n if (existingCustomer != null && !existingCustomer.equals(aCustomer))\n {\n existingCustomer.removeBooking(this);\n }\n customer.addBooking(this);\n wasSet = true;\n return wasSet;\n }",
"public void updateCustomer(String id) {\n\t\t\n\t}",
"@Override\n\tpublic void saveCustomer(AMOUNT theCustomer) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// save the customer ... \n\t\tcurrentSession.save(theCustomer);\n\t}",
"@Override\r\n\tpublic void updateLastLogin(Wx_BindCustomer wx_BindCustomer) {\n\t\tshopuserDao.updateLastLogin(wx_BindCustomer);\r\n\t}",
"@Override\n\t@Transactional\n\tpublic void save(Customer customer) {\n\t\tcustomerDAO.save(customer);\n\t}",
"CustomerDto updateCustomer(CustomerDto customerDto);",
"@Override\n\tpublic Customer update(long customerId, Customer customer) {\n\t\treturn null;\n\t}",
"public Customer saveCustomer(Customer customer) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic int updateCustomerReprieve(CustomerReprieve customerReprieve) {\n\t\treturn customerDao.updateCustomerReprieve(customerReprieve);\n\t}",
"@Override\n\tpublic boolean updateCustomer(Customer customer) {\n\t\tSession session =sessionFactory.getCurrentSession();\n\t\tsession.update(customer);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic void removeCustomer() {\n\t\t\r\n\t}",
"public int updateCustomer(Map customerMap, Map allData){\r\n\t\t\r\n\t\treturn 0;\r\n\t}",
"public void setCustomer(String customer) {\n this.customer = customer;\n }",
"@Override\n\tpublic void updateCustomer(Customer customer) throws Exception{\n\t\tConnection con = pool.getConnection();\n\t\tCustomer custCheck = getCustomer(customer.getId());\n\t\tif(custCheck.getCustName()== null)\n\t\t\treturn;\n\t\t\t//throws Exception no customer found in DB\n\n\t\ttry {\n\t\t\tStatement st = con.createStatement();\n\t\t\tString update = String.format(\"update customer set CUST_NAME=('%s') where id in ('%d')\" +\n\t\t\t\" update customer set PASSWORD=('%s')\"\n\t\t\t\t\t+ \" where id in('%d')\",\n\t\t\t\t\tcustomer.getCustName(),\n\t\t\t\t\tcustomer.getId(),\n\t\t\t\t\tcustomer.getPassword(),\n\t\t\t\t\tcustomer.getId());\n\t\t\t\n\t\t\tst.executeUpdate(update);\n\t\t\tSystem.out.println(\"Customer updated successfully\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage() + \"Unable to update A customer, Try Again! \");\n\t\t} finally {\n\t\t\tpool.returnConnection(con);\n\t\t}\n\n\t}",
"public void setCustomer(String Cus){\n\n this.customer = Cus;\n }",
"@Override\n\tpublic Uni<Customer> updateCustomer(Customer customer) {\n\t\tFunction<Customer, Uni<? extends Customer>> update = entity -> {\n\t\t\tentity.setName(customer.getName());\n\t\t\tentity.setAddress(customer.getAddress());\n\t\t\treturn repo.flush().onItem().transform(ignore -> entity);\n\t\t};\n\t\treturn repo.findById(customer.getId()).onItem().ifNotNull().transformToUni(update);\n\t}",
"@Override\n\tpublic void create(Customer t) {\n\n\t}",
"@Override\r\n\tpublic boolean registerCustomer(CustomerDto customerDto) {\r\n\t\tif (customerDto == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tOptional<Customer> customer1 = customerRepository\r\n\t\t\t\t.findByUsername(Convertor.convertCustomerDTOtoEntity(customerDto).getUsername());\r\n\t\tif (customer1.isPresent()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tcustomerRepository.save(Convertor.convertCustomerDTOtoEntity(customerDto));\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic boolean updateCustomer(Integer id, Customer customer) {\n\n\t\tboolean isUpdated = false;\n\n\t\tfor (Customer cust : customers) {\n\t\t\tif (cust.getId() == id) {\n\t\t\t\tcustomer.setId(id);\n\t\t\t\tcust.setUsername(customer.getUsername());\n\t\t\t\tcust.setFirstName(customer.getFirstName());\n\t\t\t\tcust.setLastName(customer.getLastName());\n\t\t\t\tcust.setEmail(customer.getEmail());\n\t\t\t\tcust.setUserType(customer.getUserType());\n\t\t\t\tcust.setPassword(customer.getPassword());\n\t\t\t\tcust.setAddress(customer.getAddress());\n\t\t\t\tlogger.info(\"Customer @id\" + id + \" is updated in the list\");\n\t\t\t\tisUpdated = true;\n\t\t\t}\n\t\t}\n\t\tlogger.info(\"Update done : updateCustomer.isUpdated = \" + isUpdated);\n\t\treturn isUpdated;\n\t}",
"public void register(Customer customer) {\n\t\tcustomerDao.register(customer);\r\n\t}",
"public void addCustomer(CustomerAccount acc){\n accountHM.put(acc.getVehicle().getPlate(),acc);\n }",
"public void updateSalerCustomerByForbidden(int uid) {\n\t\tthis.salerCustomerMapper.updateSalerCustomerByForbidden(uid);\n\t}",
"Boolean updateOrInsert(Customer customer);",
"@Override\n\tpublic int addCustomerReprieve(CustomerReprieve customerReprieve) {\n\t\treturn customerDao.addCustomerReprieve(customerReprieve);\n\t}",
"public void setCustomer(Customer customer) {\r\n\t\tthis.customer = customer;\r\n\t\tpassengers.add(customer);\r\n\t}",
"public void addUser(Customer user) {}",
"@Override\n\tpublic Uni<Customer> saveCustomer(Customer customer) {\n\t\treturn repo.persist(customer).chain(repo::flush).onItem().transform(ignore -> customer);\n\t}",
"public void setCustomerId(int customerId) \n {\n this.customerId = customerId;\n }",
"@Transactional\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t// save the customer ... finally LOL\n\t\tcurrentSession.save(theCustomer);\t\t\n\t}",
"public void setCustomerType(int v) \n {\n \n if (this.customerType != v)\n {\n this.customerType = v;\n setModified(true);\n }\n \n \n }",
"@Test\n\tpublic void updateCustomer() {\n\t\t// Given\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tname = \"Mark\";\n\t\taddress = \"Auckland\";\n\t\ttelephoneNumber = \"0211616447\";\n\t\tlong id = customer.getId();\n\n\t\t// When\n\t\tICustomer cus = customerController.update(id, name, address, telephoneNumber);\n\n\t\t// Then\n\t\tAssert.assertEquals(name, cus.getName());\n\t\tAssert.assertEquals(address, cus.getAddress());\n\t\tAssert.assertEquals(telephoneNumber, cus.getTelephoneNumber());\n\t\tAssert.assertEquals(id, cus.getId());\n\t}",
"@PutMapping(\"/customerupdate\")\n\tpublic void update(@RequestBody Customer theCustomer) {\n\t\t// checking whether the customer exists or not\n\t\tCustomer customerExists = customerServices.findByID(theCustomer.getMobile_number());\n\n\t\tif (customerExists != null) {\n\t\t\tcustomerServices.save(theCustomer);\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Customer with customer id - \" + theCustomer + \" not exists\");\n\t\t}\n\t}",
"public boolean isCustomerIdModified()\n\t{\n\t\treturn customerIdModified;\n\t}",
"@PutMapping(\"/customers\")\n\tpublic Customer updatecustomer(@RequestBody Customer thecustomer) {\n\t\t\n\t\tthecustomerService.saveCustomer(thecustomer); //as received JSON object already has id,the saveorupdate() DAO method will update details of existing customer who has this id\n\t\treturn thecustomer;\n\t}",
"@Override\n public boolean allottingCustomerToFnManager(SalesCustomerBean slcust, long id) {\n long custid = id;\n String department = \"Finance\";\n String manager = slcust.getFnmanager();\n\n return in_salescustdao.allottingCustomerToFnManager(custid, department, manager);\n }",
"@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"Mobile Customer Add()\");\n\t}",
"@PreAuthorize(\"#oauth2.hasAnyScope('write','read-write')\")\n\t@RequestMapping(method = POST, consumes = { APPLICATION_JSON_UTF8_VALUE })\n\tpublic Mono<ResponseEntity<?>> addCustomer(@RequestBody @Valid Customer newCustomer) {\n\n\t\treturn Mono.justOrEmpty(newCustomer.getId())\n\t\t\t.flatMap(id -> repo.existsById(id))\n\t\t\t.defaultIfEmpty(Boolean.FALSE)\n\t\t\t.flatMap(exists -> {\n\n\t\t\t\tif (exists) {\n\t\t\t\t\tthrow new CustomerServiceException(HttpStatus.BAD_REQUEST,\n\t\t\t\t\t\t\"Customer already exists, to update an existing customer use PUT instead.\");\n\t\t\t\t}\n\n\t\t\t\treturn repo.save(newCustomer).map(saved -> {\n\t\t\t\t\treturn created(URI.create(format(\"/customers/%s\", saved.getId()))).build();\n\t\t\t\t});\n\t\t\t});\n\t}",
"public void customerLeaves(Customer cust);",
"public Customer updateCustomer(@RequestBody Customer theCustomer)\n {\n customerService.save(theCustomer);\n return theCustomer;\n }",
"@Override\n\tpublic void updateCustomerStatus() {\n\t\tfor(int i=0;i<customersInLine.size();i++) {\n\t\t\tif((customersInLine.get(i).getArrival() + customersInLine.get(i).getPatience()) <= this.getCurrentTurn()) {\n\t\t\t\tcustomersInLine.remove(i);\n\t\t\t\tcustomersInRestaurant--;\n\t\t\t\tunsatisfiedCustomers++;\n\t\t\t\ti=-1;\n\t\t\t}\n\t\t}\n\t}",
"public Customer save(final Customer customer) {\n\t\tAssert.notNull(customer);\r\n\t\tBoolean isCreating = null;\r\n\r\n\t\tAssert.isTrue(!(customer.getEmail().endsWith(\"@\") || customer.getEmail().endsWith(\"@>\")));\r\n\r\n\t\tif (customer.getId() == 0) {\r\n\t\t\tisCreating = true;\r\n\t\t\tcustomer.setSuspicious(false);\r\n\r\n\t\t\t//comprobamos que ningún actor resté autenticado (ya que ningun actor puede crear los customers)\r\n\t\t\t//this.serviceUtils.checkNoActor();\r\n\r\n\t\t} else {\r\n\t\t\tisCreating = false;\r\n\t\t\t//comprobamos que su id no sea negativa por motivos de seguridad\r\n\t\t\tthis.serviceUtils.checkIdSave(customer);\r\n\r\n\t\t\t//este customer será el que está en la base de datos para usarlo si estamos ante un customer que ya existe\r\n\t\t\tCustomer customerBD;\r\n\t\t\tAssert.isTrue(customer.getId() > 0);\r\n\r\n\t\t\t//cogemos el customer de la base de datos\r\n\t\t\tcustomerBD = this.customerRepository.findOne(customer.getId());\r\n\r\n\t\t\t//Si el customer que estamos guardando es nuevo (no está en la base de datos) le ponemos todos sus atributos vacíos\r\n\r\n\t\t\t//\t\t\tcustomer.setUserAccount(new UserAccount());\r\n\t\t\t//\t\t\tfinal Authority authority = new Authority();\r\n\t\t\t//\t\t\tauthority.setAuthority(Authority.CUSTOMER);\r\n\t\t\t//\t\t\tcustomer.getUserAccount().addAuthority(authority);\r\n\t\t\t//los atributos que no pueden estar vacíos\r\n\r\n\t\t\tcustomer.setSuspicious(customerBD.getSuspicious());\r\n\t\t\tcustomer.setUserAccount(customerBD.getUserAccount());\r\n\r\n\t\t\t//Comprobamos que el actor sea un Customer\r\n\t\t\tthis.serviceUtils.checkAuthority(\"CUSTOMER\");\r\n\t\t\t//esto es para ver si el actor que está logueado es el mismo que se está editando\r\n\t\t\tthis.serviceUtils.checkActor(customer);\r\n\r\n\t\t}\r\n\t\tif ((!customer.getPhone().startsWith(\"+\")) && StringUtils.isNumeric(customer.getPhone()) && customer.getPhone().length() > 3) {\r\n\t\t\tfinal Settings settings = this.settingsService.findSettings();\r\n\t\t\tcustomer.setPhone(settings.getCountryCode() + customer.getPhone());\r\n\t\t}\r\n\t\tCustomer res;\r\n\t\t//le meto al resultado final el customer que he ido modificando anteriormente\r\n\t\tres = this.customerRepository.save(customer);\r\n\t\tthis.flush();\r\n\t\tif (isCreating)\r\n\t\t\tthis.folderService.createSystemFolders(res);\r\n\t\treturn res;\r\n\t}",
"public void commit(Customer customer) {\r\n EntityManagerHelper.beginTransaction();\r\n CUSTOMERDAO.update(customer);\r\n EntityManagerHelper.commit();\r\n renderManager.getOnDemandRenderer(customer.getCustomernumber().toString()).requestRender();\r\n }",
"public void addMigratedCustomers(Bank bank, List<Klient> migratedCustomers) {\n migratedCustomers.forEach(k -> {\n k.setUID(bank.getNextCustomerNumber());\n k.getBills().stream().forEach(r-> {\n fixAccountKind(r);\n fixAccountNumber(r, bank.getNextAccountNumber());\n });\n }\n );\n //ustawiamy rodzaje kont i poprawiamy numery IBAN\n\n //dodajemy zmigrowanych klientow do aktualnych klientow banku\n List<Klient> bankCustomers = bank.getClients();\n bankCustomers.addAll(migratedCustomers);\n bank.setClients(bankCustomers);\n }",
"public void updateSalerCustomer(SalerCustomer salerCustomer) {\n\t\tthis.salerCustomerMapper.updateSalerCustomer(salerCustomer);\n\t}",
"public interface CustomerService {\n List<Customer> findPubsea();\n\n List<Customer> findCustomer();\n\n void update(Customer customer);\n\n /**\n * 公海客户认领\n * @param customerId\n * @param loginUser\n */\n void claim(Long customerId, LoginUser loginUser);\n}",
"void updateCustomer(int id, String[] updateInfo);",
"@Override\n public boolean createCustomerBySales(SalesCustomerBean salescustomer) {\n // TODO Auto-generated method stub\n salescustomer.setGendate(C_Util_Date.generateDate());\n salescustomer.setStatus(\"NEW\");\n insertorupdate = in_salescustdao.createSalesCustomer(salescustomer);\n return insertorupdate;\n }",
"private void addCustomer(Customer customer) {\n List<String> args = Arrays.asList(\n customer.getCustomerName(),\n customer.getAddress(),\n customer.getPostalCode(),\n customer.getPhone(),\n customer.getCreateDate().toString(),\n customer.getCreatedBy(),\n customer.getLastUpdate().toString(),\n customer.getLastUpdatedBy(),\n String.valueOf(customer.getDivisionID())\n );\n DatabaseConnection.performUpdate(\n session.getConn(),\n Path.of(Constants.UPDATE_SCRIPT_PATH_BASE + \"InsertCustomer.sql\"),\n args\n );\n }",
"public Customer saveCustomerDetails(Customer customer);",
"public boolean addCustomer(Customer customer) throws DatabaseOperationException;",
"public Customer addCustomer(Customer customer) {\n customer.setMemberSince(LocalDate.now());\n customer.setStatus(MembershipStatus.ACTIVE);\n return customerRepository.save(customer);\n }",
"@Override\n\tpublic void updateCustomer(Customer customer) throws Exception {\n\t\tgetHibernateTemplate().update(customer);\n\t}",
"public CntCuentasAdicionarModificarBacking() {\n }",
"public int updateCustomer(Customer customer) {\n return model.updateCustomer(customer); \n }"
] |
[
"0.6978185",
"0.6749978",
"0.668575",
"0.6667132",
"0.6632107",
"0.6593684",
"0.65212893",
"0.65172756",
"0.65172756",
"0.6477618",
"0.63485384",
"0.6246699",
"0.6182258",
"0.6170758",
"0.615308",
"0.610676",
"0.6099072",
"0.6092054",
"0.6068916",
"0.605896",
"0.6033562",
"0.60223854",
"0.6002405",
"0.5994409",
"0.5987702",
"0.598538",
"0.59363514",
"0.5891631",
"0.58761656",
"0.58664894",
"0.5860538",
"0.58523744",
"0.5825367",
"0.5825367",
"0.5825367",
"0.5825367",
"0.5825367",
"0.58164436",
"0.57977825",
"0.5775467",
"0.5774377",
"0.5772127",
"0.57665515",
"0.57552594",
"0.5748534",
"0.5738049",
"0.573571",
"0.573341",
"0.5723267",
"0.57163584",
"0.56881076",
"0.5668364",
"0.564944",
"0.56345767",
"0.56302875",
"0.5624672",
"0.56074196",
"0.5595494",
"0.5589728",
"0.55792636",
"0.5578081",
"0.5577479",
"0.55649644",
"0.55632114",
"0.55574435",
"0.55553925",
"0.55467445",
"0.5544405",
"0.5539135",
"0.5525532",
"0.55208224",
"0.5511999",
"0.5510182",
"0.55012846",
"0.54992026",
"0.5496502",
"0.54771507",
"0.5475717",
"0.54712975",
"0.5464716",
"0.54568475",
"0.5451243",
"0.5448184",
"0.54337984",
"0.5428931",
"0.54261976",
"0.54225266",
"0.5419886",
"0.5412951",
"0.5396644",
"0.5393041",
"0.53912675",
"0.5388813",
"0.53703696",
"0.5370195",
"0.5370125",
"0.53629935",
"0.53583944",
"0.53521824",
"0.53474915"
] |
0.76119083
|
0
|
Method to save changes to database
|
public boolean commit(Connection conn) throws SQLException {
boolean status = true;
try {
// Start of system transaction
conn.setAutoCommit(false);
BookingMapper bm = new BookingMapper();
status = status && bm.addNewBooking(newBooking, conn);
status = status && bm.updateBooking(modifiedBooking, conn);
status = status && bm.deleteBooking(deleteBooking, conn);
if (!status) {
throw new Exception("Business Transaction aborted");
}
// System transaction ends with success
conn.commit();
} catch (Exception e) {
System.out.println("fail in UnitOfWork - commit()");
System.err.println(e);
// System transaction fails, rollsback
conn.rollback();
status = false;
}
return status;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void save();",
"public void save();",
"public void save();",
"public void save();",
"public void save() {\t\n\t\n\t\n\t}",
"@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}",
"public static void save() {\n if (instance != null) {\n // -> SyncedDatabases.syncAll();\n instance.markDirty();\n }\n }",
"public void save() {\n }",
"void save();",
"void save();",
"void save();",
"public boolean save();",
"protected void saveValues() {\n dataModel.persist();\n }",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"@Override\n public void save() {\n \n }",
"@Override\r\n\tpublic void save() {\n\r\n\t}",
"@Override\r\n\tpublic void save() {\n\r\n\t}",
"public void save(){\r\n\t\tmanager.save(this);\r\n\t}",
"@Override\n public void save()\n {\n \n }",
"@Override\n public void save() {\n\n }",
"@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"save method\");\n\t}",
"public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }",
"public void save(){\n\t\tlowresModelManager.save();\n\t}",
"@Override\n public void Save() {\n\t \n }",
"public void save() {\n //write lift information to datastore\n LiftDataAccess lda = new LiftDataAccess();\n ArrayList<Long>newKeys = new ArrayList<Long>();\n for (Lift l : lift) {\n newKeys.add(lda.insert(l));\n }\n\n //write resort information to datastore\n liftKeys = newKeys;\n dao.update(this);\n }",
"public void save() {\n\t\tSystem.out.println(\"-----------from PersonDao.save()\");\n\t}",
"public void save() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.save(this);\r\n\t}",
"private void saveData() {\n }",
"public boolean save() {\n\t\tboolean isCreate = false;\n\t\tif(!validate() || !beforeSave(isCreate)){\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\tupdate();\n\t\t} catch (SQLException e) {\n\t\t\tnew Event(Event.getLeafLevelClassName(this), \"save\",\n\t\t\t\t\t\"SQL error while saving: \" + e.toString(), Event.ERROR);\n\t\t\treturn false;\n\t\t}\n\t\tthis.setPersisted(true);\n\t\tafterSave(isCreate);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic void save() throws SaveException {\n\t\t\r\n\t}",
"void commit( boolean onSave );",
"private void saveToDb() {\r\n ContentValues values = new ContentValues();\r\n values.put(DbAdapter.KEY_DATE, mTime);\r\n if (mPayeeText != null && mPayeeText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_PAYEE, mPayeeText.getText().toString());\r\n if (mAmountText != null && mAmountText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_AMOUNT, mAmountText.getText().toString());\r\n if (mCategoryText != null && mCategoryText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_CATEGORY, mCategoryText.getText().toString());\r\n if (mMemoText != null && mMemoText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_MEMO, mMemoText.getText().toString());\r\n if (mTagText != null && mTagText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_TAG, mTagText.getText().toString());\r\n\r\n \tif (Utils.validate(values)) {\r\n \t\tmDbHelper.open();\r\n \t\tif (mRowId == null) {\r\n \t\t\tlong id = mDbHelper.create(values);\r\n \t\t\tif (id > 0) {\r\n \t\t\t\tmRowId = id;\r\n \t\t\t}\r\n \t\t} else {\r\n \t\t\tmDbHelper.update(mRowId, values);\r\n \t\t}\r\n \t\tmDbHelper.close();\r\n \t}\r\n\t}",
"private void save() {\n Saver.saveTeam(team);\n }",
"private void saveData() {\n\t\tthis.dh = new DataHelper(this);\n\t\tthis.dh.updateData(String.valueOf(mData.getText()), i.getId());\n\t\tthis.dh.close();\n\t\tToast\n\t\t\t\t.makeText(ctx, \"Changes saved successfully...\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t\tIntent myIntent = new Intent(EditActivity.this, StartActivity.class);\n\t\tEditActivity.this.startActivity(myIntent);\n\t\tfinish();\n\t}",
"protected abstract void doSave();",
"public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}",
"private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }",
"private void saveData(){\n\t\tdataBase=mHelper.getWritableDatabase();\n\t\tContentValues values=new ContentValues();\n\t\t\n\t\tvalues.put(DbHelper.KEY_NNAME,nname);\n\t\t//values.put(DbHelper.KEY_LNAME,lname );\n\t\t\n\t\tSystem.out.println(\"\");\n\t\tif(isUpdate)\n\t\t{ \n\t\t\t//update database with new data \n\t\t\tdataBase.update(DbHelper.TABLE_NOTE, values, DbHelper.KEY_ID+\"=\"+id, null);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//insert data into database\n\t\t\tdataBase.insert(DbHelper.TABLE_NOTE, null, values);\n\t\t}\n\t\t//close database\n\t\tdataBase.close();\n\t\tfinish();\n\t\t\n\t\t\n\t}",
"public void save() {\n\t\tpreferences().flush();\n\t}",
"@Override\n public void saveValues() {\n \n }",
"void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }",
"public void save() throws DfException {\n\t\tobject.save();\n\t}",
"private void updateDB() {\n }",
"@PostPersist\n\t@PostUpdate\n\tprivate void storeChangesToDw() {\n\t}",
"protected void save() {\n close();\n if(saveAction != null) {\n saveAction.accept(getObject());\n }\n }",
"public void save()\n\t{\n\t\ttry\n\t\t{\n\t\t\tgetConnection().commit();\n\t\t\tgetPreparedStatement(\"SET FILES SCRIPT FORMAT COMPRESSED\").execute();\n\t\t\t// causes a checkpoint automatically.\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly save.\", e);\n\t\t}\n\t}",
"public void saveToDB() {\n \twipeDB();\n\t\tSQLiteDatabase db = nodeData.getReadableDatabase();\n\t\tContentValues values = new ContentValues();\n\t\tfor (int i = 0; i < wallpapers.size(); i++) {\n\t\t\tvalues.put(EventDataSQLHelper.NODE, nodeToString(wallpapers.get(i)));\n\t\t\ttry {\t\t\t\t\n\t\t\t\tdb.insertOrThrow(EventDataSQLHelper.TABLE, null, values);\n\t\t\t\tLog.d(\"AddToDB\", nodeToString(wallpapers.get(i)));\n\t\t\t} catch (SQLException e) {\n\t\t\t\tLog.d(\"AddToDB\", \"\" + e.getMessage());\n\t\t\t}\n\t\t}\n\t\tdb.close();\n }",
"public void saveData(){\r\n file.executeAction(modelStore);\r\n }",
"@Override\r\n\tpublic void save(TQssql sql) {\n\r\n\t}",
"public void save() {\n\t\tthis.setState(Constants.CWorld.STATE_SAVING);\n\t\tthis.getWorld().saveAll();\n\t\tthis.setState(Constants.CWorld.STATE_ONLINE);\n\t}",
"public void commitChanges()\n {\n }",
"public void saveState() {\n table.saveState(store);\n }",
"public void operationSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}",
"public boolean save(Data model);",
"public void save(){\r\n\t\t//System.out.println(\"call save\");\r\n\t\tmodel.printDoc();\r\n\t}",
"private void updateDatabase() {\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\tArrayList<String> updatedRecords = serializer.serialize(records);\n\t\tDatabaseHandler.writeToDatabase(DATABASE_NAME, updatedRecords);\n\t}",
"private void saveDatabaseSettings() {\r\n\r\n\t\t// --- Get new database ID --------------------------------------------\r\n\t\tint newID = 0;\r\n\t\tString newIDString = this.getJTextFieldDatabaseID().getText();\r\n\t\tif (newIDString!=null && newIDString.isEmpty()==false) {\r\n\t\t\ttry {\r\n\t\t\t\tnewID = Integer.parseInt(newIDString); \r\n\t\t\t} catch (Exception e) {\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// --- Save in the preferences ----------------------------------------\r\n\t\tBundleHelper.setIdScenarioResultForSetup(newID);\r\n\t}",
"public void save() {\n ProductData.saveData(tree);\n }",
"void save(Employee employee);",
"private void saveAT() \n {\n // get DatabaseConnector to interact with the SQLite database\n\t AnimalDatabase db = new AnimalDatabase(this);\n\t AnimalList al = new AnimalList (db);\n\t \n // insert the contact information into the database\n al.Update(id, amount, comments);\n\n }",
"public void writeDatabase();",
"public void saveData(){\n reporter.info(\"Save edited form\");\n clickOnElement(LOCATORS.getBy(COMPONENT_NAME,\"SAVE_BUTTON\"));\n }",
"public void save()\n\t{\t\n\t\tfor (Preis p : items) {\n\t\t\titmDAO.create(p.getItem());\n\t\t\tprcDAO.create(p);\n\t\t}\n\t\tstrDAO.create(this);\n\t}",
"@Override\r\n\tpublic int save() throws NotesApiException {\n\t\treturn 0;\r\n\t}",
"public void save() {\r\n\t\tString checkQuery = \"SELECT * FROM users WHERE id = \" + this.id;\r\n\t\tStatement stm;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tconnection = DBConnection.getConnection();\r\n\t\t\tstm = connection.createStatement();\r\n\t\t\trs = stm.executeQuery(checkQuery);\r\n\t\t\t// istnieje już ten obiekt - update\r\n\t\t\tif (rs.first()) {\r\n\t\t\t\tString query = \"UPDATE users SET name = \" + toStringOrNULL(name)\r\n\t\t\t\t\t\t+ \", password = \" + toStringOrNULL(password)\r\n\t\t\t\t\t\t+ \", is_admin = \" + isAdmin \r\n\t\t\t\t\t\t+ \", removed_at = \" + toStringOrNULL(removedAt) \r\n\t\t\t\t\t\t+ \" WHERE id = \" + getId();\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t\t// jeszcze go nie ma - zapis nowego\r\n\t\t\telse {\r\n\t\t\t\tString query = \"INSERT INTO users (name, password, removed_at, is_admin) VALUES (\"\r\n\t\t\t\t\t\t+ toStringOrNULL(name) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(password) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(removedAt) + \", \"\r\n\t\t\t\t\t\t+ isAdmin + \")\";\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void saveState() \n\t{\n\t\tsuper.saveState();\n\t}",
"public static void save()\n\t{\n writeMap();\n\t}",
"private void saveData() {\n try {\n Student student = new Student(firstName.getText(), lastName.getText(),\n form.getText(), stream.getText(), birth.getText(),\n gender.getText(), Integer.parseInt(admission.getText()),\n Integer.parseInt(age.getText()));\n\n\n if (action.equalsIgnoreCase(\"new\") && !assist.checkIfNull(student)) {\n\n dao.insertNew(student);\n JOptionPane.showMessageDialog(null, \"Student saved !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n\n } else if (action.equalsIgnoreCase(\"update\") && !assist.checkIfNull(student)) {\n dao.updateStudent(student, getSelected());\n JOptionPane.showMessageDialog(null, \"Student Updated !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n }\n\n prepareTable();\n prepareHistory();\n buttonSave.setVisible(false);\n admission.setEditable(true);\n }catch (Exception e)\n {}\n }",
"public void save(){\n DatabaseReference dbRef = DatabaseHelper.getDb().getReference().child(DatabaseVars.VouchersTable.VOUCHER_TABLE).child(getVoucherID());\n\n dbRef.setValue(this);\n }",
"@Override\n public void persist() {\n }",
"public final Long save() {\n\t\tid = Ollie.save(this);\n\t\tOllie.putEntity(this);\n\t\tnotifyChange();\n\t\treturn id;\n\t}",
"private void saveData() {\n // Actualiza la información\n client.setName(nameTextField.getText());\n client.setLastName(lastNameTextField.getText());\n client.setDni(dniTextField.getText());\n client.setAddress(addressTextField.getText());\n client.setTelephone(telephoneTextField.getText());\n\n // Guarda la información\n DBManager.getInstance().saveData(client);\n }",
"public void saveState() {\n\t\tsuper.saveState();\n\t}",
"private void saveFunction() {\n }",
"private void saveStudent() {\n // Check that every required field has been filled in with valid parameters\n if (!checkUserInputValidity()) {\n return;\n }\n\n // Insert the new student info into the database\n if (isEditStudent) {\n updateStudentOnFirebaseDatabase();\n } else {\n // Make a unique id for the student\n String studentId = UUID.randomUUID().toString();\n saveNewStudentToFirebaseDatabase(studentId);\n }\n }",
"public void storeAndCommit() {\n \tsynchronized(mDB.lock()) {\n \t\ttry {\n \t \t\tstoreWithoutCommit();\n \t \t\tcheckedCommit(this);\n \t\t}\n \t\tcatch(RuntimeException e) {\n \t\t\tcheckedRollbackAndThrow(e);\n \t\t}\n \t}\n }",
"protected void Save() {\n\t\tString WareName = txtWareName.getText().trim();\n\t\tint WareCap = Integer.parseInt(txtWareCap.getText().trim());\n\t\tString WareAddress = txtWareAddress.getText().trim();\n\t\tint WareUser = Integer.parseInt(txtWareUser.getText().trim());\n\t\tWareUserDto wud = new WareUserDto();\n\t\t\n\t\twud.setWareID(this.wud.getWareID());\n\t\twud.setWareName(WareName);\n\t\twud.setWareCap(WareCap);\n\t\twud.setWareAddress(WareAddress);\n\t\twud.setWareUser(WareUser);\n\t\t\n\t\tif(service.updateWareUserService(wud)){\n\t\t\tList<WareUserDto> list = service.getWareHouseAllInfo();\n\t\t\t//bwj.setTabDate(list);\n\t\t\tbtnWareJDialog.setTabDate(list);\n\t\t\tthis.dispose();\n\t\t}else{\n\t\t\tJOptionPane.showMessageDialog(this, \"修改失败\", \"错误\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic void save() {\n\t\tSystem.out.println(\"UserServiceImplÍ┤đđ┴╦\");\r\n\t\tuserDao.save();\r\n\t}",
"public boolean save() {\n return false;\n }",
"protected void saveRecord() throws DAOException {\r\n\t\t// Prepara para actualizar\r\n\t\tobject.prepareToUpdate();\r\n\t\t// Guarda objecto\r\n\t\tobjectDao.save(object);\r\n\t\t// Guarda registros de relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\t// Asigna Id padre\r\n\t\t\trelco.getId().setDconsecnk(object.getDconsecnk());\r\n\t\t\tsedrelcoDao.save(relco);\r\n\t\t}\r\n\t}",
"@OnClick(R.id.btn_save_event)\n public void saveChanges() {\n if (isNewEvent) {\n createEvent();\n } else {\n updateEvent();\n }\n }",
"public int save() {\n\t\treturn 0;\n\t}",
"@Override\r\n\tpublic void persist() {\n\t}",
"void save(Bill bill);",
"public boolean doSave() {\n return true;\n }",
"public boolean save() {\n executeCallbacks(CallbackType.BEFORE_SAVE);\n if (readOnly) throw new ReadOnlyException(getClass().getName() + \" is read only\");\n createOrUpdate();\n executeCallbacks(CallbackType.AFTER_SAVE);\n return true;\n }",
"@Override\r\n\tpublic void save(T t) {\n\t\tgetSession().save(t);\r\n\t}",
"public void saveState() { }",
"private void save() {\r\n\t\tif (Store.save()) {\r\n\t\t\tSystem.out.println(\" > The store has been successfully saved in the file StoreData.\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\" > An error occurred during saving.\\n\");\r\n\t\t}\r\n\t}",
"public void save() {\n super.storageSave(listPedidosAssistencia.toArray());\n }",
"public void commit();",
"public void save() {\n MainActivity.db.updateWord(this);\n }",
"public void save() throws EntityPersistenceException {\n\n }",
"void save(Student student);",
"@Override\n public void updateDatabase() {\n }",
"void save(Account account);",
"@Override\n\tpublic void commit(boolean onSave) {\n\t\tsuper.commit(onSave);\n\t}",
"private Boolean saveChanges() {\n int rowId = ticketGui.getSelectedRowId();\n\n // getting all the text fields for any possible changes\n String clientName = clientNameTextField.getText().strip();\n String starID = starIdTextField.getText().strip();\n String email = emailTextField.getText().strip();\n String phoneNumber = phoneNumberTextField.getText().strip();\n String machineModel = deviceModelTextField.getText().strip();\n String description = descriptionTextArea.getText().strip();\n String memberName = clubMemberNameTextField.getText().strip();\n String resolution = resolutionTextArea.getText().strip();\n\n // making sure all the required fields are still filled out\n boolean valid = ticketGui.fieldValidation(clientName,starID,email,phoneNumber,machineModel,description,\n memberName,resolution);\n\n if (valid){\n if (JOptionPane.showConfirmDialog(this, \"Are you sure you want to save these changes?\",\n \"Save\", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {\n\n // adding all of this to a new ticket and passing it to the tiketstore to update the ticket\n Ticket ticket = new Ticket(clientName, starID, email, phoneNumber, machineModel, description, memberName, resolution);\n ticket.setTicketId(rowId);\n\n controller.updateTicket(ticket);\n ticketGui.showAllTickets();\n return true;\n }\n }\n return false;\n }",
"public void saveAll() {\n\n if (schedule != null) {\n\n readWrite.save(schedule, buddies);\n }\n if (finalsList != null) {\n\n readWrite.save(finalsList, finalsTerm);\n }\n }",
"private void saveData(){\n databaseReference.setValue(new Teacher(0, \"\", 0.0));\n }"
] |
[
"0.79296815",
"0.79296815",
"0.79296815",
"0.79296815",
"0.76342195",
"0.76313186",
"0.7586373",
"0.75440454",
"0.7498272",
"0.7498272",
"0.7498272",
"0.74665594",
"0.73788464",
"0.7320352",
"0.7320352",
"0.7252601",
"0.7250978",
"0.7250978",
"0.724878",
"0.7235837",
"0.71919197",
"0.71902585",
"0.71692884",
"0.71398616",
"0.7130411",
"0.71177566",
"0.70602465",
"0.7047899",
"0.7035695",
"0.70119655",
"0.7001743",
"0.6985951",
"0.6938043",
"0.6936136",
"0.68893135",
"0.68523836",
"0.6797936",
"0.67969555",
"0.67896307",
"0.6787322",
"0.67816705",
"0.6780472",
"0.67590183",
"0.6744016",
"0.6734587",
"0.67181695",
"0.67158705",
"0.67074186",
"0.663781",
"0.6630616",
"0.6599254",
"0.6585755",
"0.6569128",
"0.6557626",
"0.6538718",
"0.65362006",
"0.65336186",
"0.6530692",
"0.65262413",
"0.65083486",
"0.6507715",
"0.6497275",
"0.64957786",
"0.6494481",
"0.6490312",
"0.64859104",
"0.6479672",
"0.647845",
"0.6460819",
"0.6460345",
"0.6448819",
"0.6446858",
"0.64467543",
"0.64464676",
"0.6437237",
"0.64335454",
"0.6428438",
"0.64127606",
"0.6400296",
"0.6395215",
"0.6386694",
"0.63857305",
"0.63809425",
"0.637855",
"0.63709325",
"0.636603",
"0.63559264",
"0.6353101",
"0.63360935",
"0.6334576",
"0.6327304",
"0.6326071",
"0.63174534",
"0.63079053",
"0.6305593",
"0.6303289",
"0.6295669",
"0.6292408",
"0.6288487",
"0.62785524",
"0.62748915"
] |
0.0
|
-1
|
Method to save changes to database
|
public boolean commitCustomers(Connection conn) throws SQLException {
boolean status = true;
try {
// Start of system transaction
conn.setAutoCommit(false);
BookingMapper bm = new BookingMapper();
status = status && bm.addNewCustomer(newCustomers, conn);
if (!status) {
throw new Exception("Business Transaction aborted");
}
// System transaction ends with success
conn.commit();
} catch (Exception e) {
System.out.println("fail in UnitOfWork - commit()");
System.err.println(e);
// System transaction fails, rollsback
conn.rollback();
status = false;
}
return status;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void save();",
"public void save();",
"public void save();",
"public void save();",
"public void save() {\t\n\t\n\t\n\t}",
"@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}",
"public static void save() {\n if (instance != null) {\n // -> SyncedDatabases.syncAll();\n instance.markDirty();\n }\n }",
"public void save() {\n }",
"void save();",
"void save();",
"void save();",
"public boolean save();",
"protected void saveValues() {\n dataModel.persist();\n }",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"@Override\n public void save() {\n \n }",
"@Override\r\n\tpublic void save() {\n\r\n\t}",
"@Override\r\n\tpublic void save() {\n\r\n\t}",
"public void save(){\r\n\t\tmanager.save(this);\r\n\t}",
"@Override\n public void save()\n {\n \n }",
"@Override\n public void save() {\n\n }",
"@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"save method\");\n\t}",
"public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }",
"public void save(){\n\t\tlowresModelManager.save();\n\t}",
"@Override\n public void Save() {\n\t \n }",
"public void save() {\n //write lift information to datastore\n LiftDataAccess lda = new LiftDataAccess();\n ArrayList<Long>newKeys = new ArrayList<Long>();\n for (Lift l : lift) {\n newKeys.add(lda.insert(l));\n }\n\n //write resort information to datastore\n liftKeys = newKeys;\n dao.update(this);\n }",
"public void save() {\n\t\tSystem.out.println(\"-----------from PersonDao.save()\");\n\t}",
"public void save() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.save(this);\r\n\t}",
"private void saveData() {\n }",
"public boolean save() {\n\t\tboolean isCreate = false;\n\t\tif(!validate() || !beforeSave(isCreate)){\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\tupdate();\n\t\t} catch (SQLException e) {\n\t\t\tnew Event(Event.getLeafLevelClassName(this), \"save\",\n\t\t\t\t\t\"SQL error while saving: \" + e.toString(), Event.ERROR);\n\t\t\treturn false;\n\t\t}\n\t\tthis.setPersisted(true);\n\t\tafterSave(isCreate);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic void save() throws SaveException {\n\t\t\r\n\t}",
"void commit( boolean onSave );",
"private void saveToDb() {\r\n ContentValues values = new ContentValues();\r\n values.put(DbAdapter.KEY_DATE, mTime);\r\n if (mPayeeText != null && mPayeeText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_PAYEE, mPayeeText.getText().toString());\r\n if (mAmountText != null && mAmountText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_AMOUNT, mAmountText.getText().toString());\r\n if (mCategoryText != null && mCategoryText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_CATEGORY, mCategoryText.getText().toString());\r\n if (mMemoText != null && mMemoText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_MEMO, mMemoText.getText().toString());\r\n if (mTagText != null && mTagText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_TAG, mTagText.getText().toString());\r\n\r\n \tif (Utils.validate(values)) {\r\n \t\tmDbHelper.open();\r\n \t\tif (mRowId == null) {\r\n \t\t\tlong id = mDbHelper.create(values);\r\n \t\t\tif (id > 0) {\r\n \t\t\t\tmRowId = id;\r\n \t\t\t}\r\n \t\t} else {\r\n \t\t\tmDbHelper.update(mRowId, values);\r\n \t\t}\r\n \t\tmDbHelper.close();\r\n \t}\r\n\t}",
"private void save() {\n Saver.saveTeam(team);\n }",
"private void saveData() {\n\t\tthis.dh = new DataHelper(this);\n\t\tthis.dh.updateData(String.valueOf(mData.getText()), i.getId());\n\t\tthis.dh.close();\n\t\tToast\n\t\t\t\t.makeText(ctx, \"Changes saved successfully...\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t\tIntent myIntent = new Intent(EditActivity.this, StartActivity.class);\n\t\tEditActivity.this.startActivity(myIntent);\n\t\tfinish();\n\t}",
"protected abstract void doSave();",
"public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}",
"private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }",
"private void saveData(){\n\t\tdataBase=mHelper.getWritableDatabase();\n\t\tContentValues values=new ContentValues();\n\t\t\n\t\tvalues.put(DbHelper.KEY_NNAME,nname);\n\t\t//values.put(DbHelper.KEY_LNAME,lname );\n\t\t\n\t\tSystem.out.println(\"\");\n\t\tif(isUpdate)\n\t\t{ \n\t\t\t//update database with new data \n\t\t\tdataBase.update(DbHelper.TABLE_NOTE, values, DbHelper.KEY_ID+\"=\"+id, null);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//insert data into database\n\t\t\tdataBase.insert(DbHelper.TABLE_NOTE, null, values);\n\t\t}\n\t\t//close database\n\t\tdataBase.close();\n\t\tfinish();\n\t\t\n\t\t\n\t}",
"public void save() {\n\t\tpreferences().flush();\n\t}",
"@Override\n public void saveValues() {\n \n }",
"void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }",
"public void save() throws DfException {\n\t\tobject.save();\n\t}",
"private void updateDB() {\n }",
"@PostPersist\n\t@PostUpdate\n\tprivate void storeChangesToDw() {\n\t}",
"protected void save() {\n close();\n if(saveAction != null) {\n saveAction.accept(getObject());\n }\n }",
"public void save()\n\t{\n\t\ttry\n\t\t{\n\t\t\tgetConnection().commit();\n\t\t\tgetPreparedStatement(\"SET FILES SCRIPT FORMAT COMPRESSED\").execute();\n\t\t\t// causes a checkpoint automatically.\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly save.\", e);\n\t\t}\n\t}",
"public void saveToDB() {\n \twipeDB();\n\t\tSQLiteDatabase db = nodeData.getReadableDatabase();\n\t\tContentValues values = new ContentValues();\n\t\tfor (int i = 0; i < wallpapers.size(); i++) {\n\t\t\tvalues.put(EventDataSQLHelper.NODE, nodeToString(wallpapers.get(i)));\n\t\t\ttry {\t\t\t\t\n\t\t\t\tdb.insertOrThrow(EventDataSQLHelper.TABLE, null, values);\n\t\t\t\tLog.d(\"AddToDB\", nodeToString(wallpapers.get(i)));\n\t\t\t} catch (SQLException e) {\n\t\t\t\tLog.d(\"AddToDB\", \"\" + e.getMessage());\n\t\t\t}\n\t\t}\n\t\tdb.close();\n }",
"public void saveData(){\r\n file.executeAction(modelStore);\r\n }",
"@Override\r\n\tpublic void save(TQssql sql) {\n\r\n\t}",
"public void save() {\n\t\tthis.setState(Constants.CWorld.STATE_SAVING);\n\t\tthis.getWorld().saveAll();\n\t\tthis.setState(Constants.CWorld.STATE_ONLINE);\n\t}",
"public void commitChanges()\n {\n }",
"public void saveState() {\n table.saveState(store);\n }",
"public void operationSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}",
"public boolean save(Data model);",
"public void save(){\r\n\t\t//System.out.println(\"call save\");\r\n\t\tmodel.printDoc();\r\n\t}",
"private void updateDatabase() {\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\tArrayList<String> updatedRecords = serializer.serialize(records);\n\t\tDatabaseHandler.writeToDatabase(DATABASE_NAME, updatedRecords);\n\t}",
"private void saveDatabaseSettings() {\r\n\r\n\t\t// --- Get new database ID --------------------------------------------\r\n\t\tint newID = 0;\r\n\t\tString newIDString = this.getJTextFieldDatabaseID().getText();\r\n\t\tif (newIDString!=null && newIDString.isEmpty()==false) {\r\n\t\t\ttry {\r\n\t\t\t\tnewID = Integer.parseInt(newIDString); \r\n\t\t\t} catch (Exception e) {\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// --- Save in the preferences ----------------------------------------\r\n\t\tBundleHelper.setIdScenarioResultForSetup(newID);\r\n\t}",
"public void save() {\n ProductData.saveData(tree);\n }",
"void save(Employee employee);",
"private void saveAT() \n {\n // get DatabaseConnector to interact with the SQLite database\n\t AnimalDatabase db = new AnimalDatabase(this);\n\t AnimalList al = new AnimalList (db);\n\t \n // insert the contact information into the database\n al.Update(id, amount, comments);\n\n }",
"public void writeDatabase();",
"public void saveData(){\n reporter.info(\"Save edited form\");\n clickOnElement(LOCATORS.getBy(COMPONENT_NAME,\"SAVE_BUTTON\"));\n }",
"public void save()\n\t{\t\n\t\tfor (Preis p : items) {\n\t\t\titmDAO.create(p.getItem());\n\t\t\tprcDAO.create(p);\n\t\t}\n\t\tstrDAO.create(this);\n\t}",
"@Override\r\n\tpublic int save() throws NotesApiException {\n\t\treturn 0;\r\n\t}",
"public void save() {\r\n\t\tString checkQuery = \"SELECT * FROM users WHERE id = \" + this.id;\r\n\t\tStatement stm;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tconnection = DBConnection.getConnection();\r\n\t\t\tstm = connection.createStatement();\r\n\t\t\trs = stm.executeQuery(checkQuery);\r\n\t\t\t// istnieje już ten obiekt - update\r\n\t\t\tif (rs.first()) {\r\n\t\t\t\tString query = \"UPDATE users SET name = \" + toStringOrNULL(name)\r\n\t\t\t\t\t\t+ \", password = \" + toStringOrNULL(password)\r\n\t\t\t\t\t\t+ \", is_admin = \" + isAdmin \r\n\t\t\t\t\t\t+ \", removed_at = \" + toStringOrNULL(removedAt) \r\n\t\t\t\t\t\t+ \" WHERE id = \" + getId();\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t\t// jeszcze go nie ma - zapis nowego\r\n\t\t\telse {\r\n\t\t\t\tString query = \"INSERT INTO users (name, password, removed_at, is_admin) VALUES (\"\r\n\t\t\t\t\t\t+ toStringOrNULL(name) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(password) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(removedAt) + \", \"\r\n\t\t\t\t\t\t+ isAdmin + \")\";\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void saveState() \n\t{\n\t\tsuper.saveState();\n\t}",
"public static void save()\n\t{\n writeMap();\n\t}",
"private void saveData() {\n try {\n Student student = new Student(firstName.getText(), lastName.getText(),\n form.getText(), stream.getText(), birth.getText(),\n gender.getText(), Integer.parseInt(admission.getText()),\n Integer.parseInt(age.getText()));\n\n\n if (action.equalsIgnoreCase(\"new\") && !assist.checkIfNull(student)) {\n\n dao.insertNew(student);\n JOptionPane.showMessageDialog(null, \"Student saved !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n\n } else if (action.equalsIgnoreCase(\"update\") && !assist.checkIfNull(student)) {\n dao.updateStudent(student, getSelected());\n JOptionPane.showMessageDialog(null, \"Student Updated !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n }\n\n prepareTable();\n prepareHistory();\n buttonSave.setVisible(false);\n admission.setEditable(true);\n }catch (Exception e)\n {}\n }",
"public void save(){\n DatabaseReference dbRef = DatabaseHelper.getDb().getReference().child(DatabaseVars.VouchersTable.VOUCHER_TABLE).child(getVoucherID());\n\n dbRef.setValue(this);\n }",
"@Override\n public void persist() {\n }",
"public final Long save() {\n\t\tid = Ollie.save(this);\n\t\tOllie.putEntity(this);\n\t\tnotifyChange();\n\t\treturn id;\n\t}",
"private void saveData() {\n // Actualiza la información\n client.setName(nameTextField.getText());\n client.setLastName(lastNameTextField.getText());\n client.setDni(dniTextField.getText());\n client.setAddress(addressTextField.getText());\n client.setTelephone(telephoneTextField.getText());\n\n // Guarda la información\n DBManager.getInstance().saveData(client);\n }",
"public void saveState() {\n\t\tsuper.saveState();\n\t}",
"private void saveFunction() {\n }",
"private void saveStudent() {\n // Check that every required field has been filled in with valid parameters\n if (!checkUserInputValidity()) {\n return;\n }\n\n // Insert the new student info into the database\n if (isEditStudent) {\n updateStudentOnFirebaseDatabase();\n } else {\n // Make a unique id for the student\n String studentId = UUID.randomUUID().toString();\n saveNewStudentToFirebaseDatabase(studentId);\n }\n }",
"public void storeAndCommit() {\n \tsynchronized(mDB.lock()) {\n \t\ttry {\n \t \t\tstoreWithoutCommit();\n \t \t\tcheckedCommit(this);\n \t\t}\n \t\tcatch(RuntimeException e) {\n \t\t\tcheckedRollbackAndThrow(e);\n \t\t}\n \t}\n }",
"protected void Save() {\n\t\tString WareName = txtWareName.getText().trim();\n\t\tint WareCap = Integer.parseInt(txtWareCap.getText().trim());\n\t\tString WareAddress = txtWareAddress.getText().trim();\n\t\tint WareUser = Integer.parseInt(txtWareUser.getText().trim());\n\t\tWareUserDto wud = new WareUserDto();\n\t\t\n\t\twud.setWareID(this.wud.getWareID());\n\t\twud.setWareName(WareName);\n\t\twud.setWareCap(WareCap);\n\t\twud.setWareAddress(WareAddress);\n\t\twud.setWareUser(WareUser);\n\t\t\n\t\tif(service.updateWareUserService(wud)){\n\t\t\tList<WareUserDto> list = service.getWareHouseAllInfo();\n\t\t\t//bwj.setTabDate(list);\n\t\t\tbtnWareJDialog.setTabDate(list);\n\t\t\tthis.dispose();\n\t\t}else{\n\t\t\tJOptionPane.showMessageDialog(this, \"修改失败\", \"错误\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic void save() {\n\t\tSystem.out.println(\"UserServiceImplÍ┤đđ┴╦\");\r\n\t\tuserDao.save();\r\n\t}",
"public boolean save() {\n return false;\n }",
"protected void saveRecord() throws DAOException {\r\n\t\t// Prepara para actualizar\r\n\t\tobject.prepareToUpdate();\r\n\t\t// Guarda objecto\r\n\t\tobjectDao.save(object);\r\n\t\t// Guarda registros de relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\t// Asigna Id padre\r\n\t\t\trelco.getId().setDconsecnk(object.getDconsecnk());\r\n\t\t\tsedrelcoDao.save(relco);\r\n\t\t}\r\n\t}",
"@OnClick(R.id.btn_save_event)\n public void saveChanges() {\n if (isNewEvent) {\n createEvent();\n } else {\n updateEvent();\n }\n }",
"public int save() {\n\t\treturn 0;\n\t}",
"@Override\r\n\tpublic void persist() {\n\t}",
"void save(Bill bill);",
"public boolean doSave() {\n return true;\n }",
"public boolean save() {\n executeCallbacks(CallbackType.BEFORE_SAVE);\n if (readOnly) throw new ReadOnlyException(getClass().getName() + \" is read only\");\n createOrUpdate();\n executeCallbacks(CallbackType.AFTER_SAVE);\n return true;\n }",
"@Override\r\n\tpublic void save(T t) {\n\t\tgetSession().save(t);\r\n\t}",
"public void saveState() { }",
"private void save() {\r\n\t\tif (Store.save()) {\r\n\t\t\tSystem.out.println(\" > The store has been successfully saved in the file StoreData.\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\" > An error occurred during saving.\\n\");\r\n\t\t}\r\n\t}",
"public void save() {\n super.storageSave(listPedidosAssistencia.toArray());\n }",
"public void commit();",
"public void save() {\n MainActivity.db.updateWord(this);\n }",
"public void save() throws EntityPersistenceException {\n\n }",
"void save(Student student);",
"@Override\n public void updateDatabase() {\n }",
"void save(Account account);",
"@Override\n\tpublic void commit(boolean onSave) {\n\t\tsuper.commit(onSave);\n\t}",
"private Boolean saveChanges() {\n int rowId = ticketGui.getSelectedRowId();\n\n // getting all the text fields for any possible changes\n String clientName = clientNameTextField.getText().strip();\n String starID = starIdTextField.getText().strip();\n String email = emailTextField.getText().strip();\n String phoneNumber = phoneNumberTextField.getText().strip();\n String machineModel = deviceModelTextField.getText().strip();\n String description = descriptionTextArea.getText().strip();\n String memberName = clubMemberNameTextField.getText().strip();\n String resolution = resolutionTextArea.getText().strip();\n\n // making sure all the required fields are still filled out\n boolean valid = ticketGui.fieldValidation(clientName,starID,email,phoneNumber,machineModel,description,\n memberName,resolution);\n\n if (valid){\n if (JOptionPane.showConfirmDialog(this, \"Are you sure you want to save these changes?\",\n \"Save\", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {\n\n // adding all of this to a new ticket and passing it to the tiketstore to update the ticket\n Ticket ticket = new Ticket(clientName, starID, email, phoneNumber, machineModel, description, memberName, resolution);\n ticket.setTicketId(rowId);\n\n controller.updateTicket(ticket);\n ticketGui.showAllTickets();\n return true;\n }\n }\n return false;\n }",
"public void saveAll() {\n\n if (schedule != null) {\n\n readWrite.save(schedule, buddies);\n }\n if (finalsList != null) {\n\n readWrite.save(finalsList, finalsTerm);\n }\n }",
"private void saveData(){\n databaseReference.setValue(new Teacher(0, \"\", 0.0));\n }"
] |
[
"0.79296815",
"0.79296815",
"0.79296815",
"0.79296815",
"0.76342195",
"0.76313186",
"0.7586373",
"0.75440454",
"0.7498272",
"0.7498272",
"0.7498272",
"0.74665594",
"0.73788464",
"0.7320352",
"0.7320352",
"0.7252601",
"0.7250978",
"0.7250978",
"0.724878",
"0.7235837",
"0.71919197",
"0.71902585",
"0.71692884",
"0.71398616",
"0.7130411",
"0.71177566",
"0.70602465",
"0.7047899",
"0.7035695",
"0.70119655",
"0.7001743",
"0.6985951",
"0.6938043",
"0.6936136",
"0.68893135",
"0.68523836",
"0.6797936",
"0.67969555",
"0.67896307",
"0.6787322",
"0.67816705",
"0.6780472",
"0.67590183",
"0.6744016",
"0.6734587",
"0.67181695",
"0.67158705",
"0.67074186",
"0.663781",
"0.6630616",
"0.6599254",
"0.6585755",
"0.6569128",
"0.6557626",
"0.6538718",
"0.65362006",
"0.65336186",
"0.6530692",
"0.65262413",
"0.65083486",
"0.6507715",
"0.6497275",
"0.64957786",
"0.6494481",
"0.6490312",
"0.64859104",
"0.6479672",
"0.647845",
"0.6460819",
"0.6460345",
"0.6448819",
"0.6446858",
"0.64467543",
"0.64464676",
"0.6437237",
"0.64335454",
"0.6428438",
"0.64127606",
"0.6400296",
"0.6395215",
"0.6386694",
"0.63857305",
"0.63809425",
"0.637855",
"0.63709325",
"0.636603",
"0.63559264",
"0.6353101",
"0.63360935",
"0.6334576",
"0.6327304",
"0.6326071",
"0.63174534",
"0.63079053",
"0.6305593",
"0.6303289",
"0.6295669",
"0.6292408",
"0.6288487",
"0.62785524",
"0.62748915"
] |
0.0
|
-1
|
Method to read from database
|
public ArrayList getCustomers(String lname, Connection con) {
ArrayList c = null;;
try {
c = new BookingMapper().getCustomer(lname, con);
} catch (Exception e) {
System.out.println("fail in UnitOfWork - getOrder()");
System.err.println(e);
}
return c;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static void readDatabase(String path) {\n try {\n FileInputStream fileIn = new FileInputStream(path + \"/database.ser\");\n ObjectInputStream inStream = new ObjectInputStream(fileIn);\n database = (Database) inStream.readObject();\n inStream.close();\n fileIn.close();\n } catch (IOException i) {\n i.printStackTrace();\n } catch (ClassNotFoundException c) {\n c.printStackTrace();\n }\n }",
"@Override\r\n public void read() {\r\n Connection conexao = mysql.getConnection();\r\n try {\r\n PreparedStatement stm = conexao.prepareStatement(readSQL);\r\n ResultSet rs = stm.executeQuery();\r\n\r\n while (rs.next()) {\r\n int idcodigo = rs.getInt(\"idcodigo\");\r\n String data = rs.getString(\"data\");\r\n int p_rodada = rs.getInt(\"p_rodada\");\r\n int s_rodada = rs.getInt(\"s_rodada\");\r\n int t_rodada = rs.getInt(\"t_rodada\");\r\n int total = rs.getInt(\"total\");\r\n System.out.println(\"\\nCódigo: \" + idcodigo + \"\\nData: \" + data + \"\\nPrimeira Rodada: \" + p_rodada+ \"\\nSegunda Rodada: \" + s_rodada + \"\\nTerceira Rodada: \" + t_rodada + \"\\nTotal: \" + total);\r\n }\r\n rs.close();\r\n conexao.close();\r\n\r\n } catch (final SQLException ex) {\r\n System.out.println(\"Falha de conexão com a base de dados!\");\r\n ex.printStackTrace();\r\n } catch (final Exception ex) {\r\n ex.printStackTrace();\r\n } finally {\r\n try {\r\n conexao.close();\r\n } catch (final Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }",
"@Override\n public String readData(String path) {\n Connection connection;\n ResultSet resultSet;\n String data = null;\n\n try {\n connection = getConnection();\n connection.setAutoCommit(false);\n\n PreparedStatement pstmt = connection.prepareStatement(\"SELECT DATA FROM DATA WHERE ID = ?\");\n pstmt.setString(1, path);\n\n resultSet = pstmt.executeQuery();\n\n while (resultSet.next()) {\n data = new String (resultSet.getBytes(1));\n }\n\n pstmt.close();\n resultSet.close();\n connection.close();\n\n } catch (SQLException e) {\n logger.log(Level.SEVERE, e.getMessage(), e);\n }\n return data;\n }",
"DataReader reader();",
"public abstract void loadFromDatabase();",
"public <E extends Writeable> ResultSet read(CharSequence sql);",
"public List<CustomerModel> readDatabase() throws Exception{\n\nList<CustomerModel> list = new ArrayList<CustomerModel>();\n\ntry{\nlog.info(\"Loading MySql driver\");\nClass.forName(\"com.mysql.jdbc.Driver\");\n\nlog.info(\"Setting up connection with db\");\nconnect= DriverManager.getConnection(\"jdbc:mysql://localhost:3306/apidft\",\"root\",\"cisco\");\nlog.info(\"Database connection successful\");\nstatement = connect.createStatement();\n\nresultSet= statement.executeQuery(\"select * from customer\");\n\nwhile(resultSet.next()){\nlist.add(processRow(resultSet));\n}\n}\n\ncatch(Exception e){\nlog.error(\"Database connection fail\");\n}\n\nfinally{\nconnect.close();\n}\nreturn list;\n}",
"public void getDataFromFile() throws SQLException{\n \n //SQL database\n getGuestDate_DB();\n getHotelRoomData_DB();\n updateRoomChanges_DB();\n \n //this.displayAll();\n //this.displayAllRooms();\n \n }",
"private void loadFromDB() throws SQLException {\n\t\tif (rev_page != -1)\n\t\t\treturn;\n\t\t\n\t\tPreparedStatement stmt = dbc.prepareStatement(\n\t\t\t\t\"SELECT rev_page, rev_text_id, rev_timestamp, rev_comment, user_name \" +\n\t\t\t\t\"FROM revision, users WHERE rev_id = ? AND rev_user = user_id\");\n\t\tstmt.setInt(1, rev_id);\n\t\tstmt.execute();\n\n\t\tResultSet rs = stmt.getResultSet();\n\t\tif (!rs.next()) {\n\t\t\t/*\n\t\t\t * Shouldn't happen?\n\t\t\t */\n\t\t\tstmt.close();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\trev_page = rs.getInt(1);\n\t\trev_text_id = rs.getInt(2);\n\t\trev_timestamp = rs.getTimestamp(3);\n\t\trev_comment = rs.getString(4);\n\t\trev_user_text = rs.getString(5);\n\t\tstmt.close();\n\t}",
"public void getDataFromDatabase(){\r\n\t \tArrayList<Object> row = HomeActivity.dbPrograms.getDetail(SelectedID);\r\n\t \t\r\n\t\t\t// store data to variables\r\n\t \tProgramID = Integer.parseInt(row.get(0).toString());\r\n\t \tWorkoutID = Integer.parseInt(row.get(1).toString());\r\n\t \tName = row.get(2).toString();\r\n\t \tSelectedDayID = Integer.parseInt(row.get(3).toString());\r\n\t \tImage = row.get(4).toString();\r\n\t \tTime = row.get(5).toString().trim();\r\n\t \tSteps = row.get(6).toString();\r\n\t \t\r\n\t }",
"@Override\n\tpublic ObservableList<Book> read() {\n\t\tObservableList<Book> list=FXCollections.observableArrayList();\n\t\tString query=\"Select * from Book\";\n\t\tStatement statement;\n\t\tResultSet resultSet;\n\t\ttry {\n\t\t\tstatement=connection.createStatement();\n\t\t\tresultSet=statement.executeQuery(query);\n\t\t\tBook books;\n\t\t\twhile(resultSet.next()) {\n\t\t\t\tbooks=new Book(resultSet.getString(\"id\"),resultSet.getString(\"Title\"),resultSet.getString(\"Author\"),resultSet.getString(\"State\"));\n\t\t\t\tlist.add(books);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}",
"private Cursor read(){\n ProjectDbHelper mDbHelper = new ProjectDbHelper(this);\n\n\n // Create and/or open a database to read from it\n SQLiteDatabase db = mDbHelper.getReadableDatabase();\n\n // retrieve data using cursor\n String[] projection = {\n ProjectContract.ProjectEntry._ID,\n ProjectContract.ProjectEntry.COLUMN_PROJECT_NAME,\n ProjectContract.ProjectEntry.COLUMN_PROJECT_TYPE,\n ProjectContract.ProjectEntry.COLUMN_PROJECT_CLIENT,\n ProjectContract.ProjectEntry.COLUMN_PROJECT_PRICE\n };\n\n Cursor cursor = db.query(\n ProjectContract.ProjectEntry.TABLE_NAME,\n projection,\n null,\n null,\n null,\n null,\n null);\n\n return cursor;\n }",
"@Override\r\n public void read() {\n System.out.println('\\n' + \"DB repo: \");\r\n //Idk, probably search for a person and read data??\r\n\r\n }",
"public Object[] read_DB(String query) {\n\n Object[] result = new Object[2];\n java.sql.Connection con = null;\n boolean connected;\n try{\n con = DriverManager.getConnection(db_type + host + port + db_name,\n user + \"\",\n password + \"\");\n connected = true;\n }\n catch(SQLException e){\n connected = false;\n System.out.println(\"Error al conectar en la Base de datos: \" + e);\n result[0] = \"Error\";\n result[1] = \"Connecting BD\";\n close_connection(con);\n }\n\n if(connected){\n ResultSet rs;\n try{\n Statement st = con.createStatement();\n rs = st.executeQuery(query);\n\n Vector<String[]> table = makeTable(rs);\n if((table.size() == 1) && (table.get(0)[0] == \"Error\")) {\n result[0] = \"Error\";\n result[1] = table.get(0)[1];\n }\n else{\n result[0] = \"QueryResult\";\n result[1] = table;\n }\n\n close_connection(con);\n }\n catch(SQLException e){\n System.out.println(\"Error al ejecutar la consulta : \" + e);\n result[0] = \"Error\";\n result[1] = \"Executing Query\";\n close_connection(con);\n }\n }\n return result;\n\n }",
"Object getDB();",
"static DataFrameRead read() {\n return DataFrameFactory.getInstance().read();\n }",
"public abstract Statement queryToRetrieveData();",
"public void readTable() throws SQLException\n\t{\n\t\tStatement stm = conn.createStatement();\n\t\tResultSet rs = stm.executeQuery(READ_QUERY);\n\t\t\n\t\twhile(rs.next())\n\t\t{\n\t\t\tWPPost post = new WPPost(rs.getInt(ID), rs.getInt(POST_AUTHOR), rs.getTimestamp(POST_DATE),\n\t\t\t\t\trs.getTimestamp(POST_DATE_GMT), rs.getString(POST_CONTENT), rs.getString(POST_TITLE), \n\t\t\t\t\trs.getString(POST_EXCERPT), rs.getString(POST_STATUS), rs.getString(COMMENT_STATUS),\n\t\t\t\t\trs.getString(PING_STATUS), rs.getString(POST_PASSWORD), rs.getString(POST_NAME),\n\t\t\t\t\trs.getString(TO_PING), rs.getString(PINGED), rs.getTimestamp(POST_MODIFIED), \n\t\t\t\t\trs.getTimestamp(POST_MODIFIED_GMT), rs.getString(POST_CONTENT_FILTERED), rs.getInt(POST_PARENT),\n\t\t\t\t\trs.getString(GUID), rs.getInt(MENU_ORDER), rs.getString(POST_TYPE), rs.getString(POST_MIME_TYPE),\n\t\t\t\t\trs.getInt(COMMENT_COUNT));\n\t\t\treadValues.add(post);\n\t\t}\n\t}",
"private void read(Session session) {\n\t\t\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Aluno> AlunoList = session.createQuery(\"FROM Aluno\").getResultList();\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Reading Aluno records...\");\n\t\tSystem.out.printf(\"%-30.30s %-30.30s%n\", \"Model\", \"Price\");\n\t\tfor (Aluno al : AlunoList) {\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.printf(\"%-30.30s %-30.30s%n\", al.getNome(), al.getRa());\n\t\t}\n\t}",
"public Record readRecord(Long id);",
"public <E extends Retrievable> ResultSet read(CharSequence sql, Object... objects);",
"private ResultSet GetData(String query){\n\t\ttry{\n\t\t\tstat = connection.createStatement();\n\t\t\treturn stat.executeQuery(query);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn null;\n\t\t}\n\t}",
"private void getDataFromDB() {\n ArrayList<ArtworkData> artworkData = getArtworksFromDatabase();\n if (artworkData.size() <= 0) {\n // there is no data in local DB, error\n onErrorReceived();\n } else {\n sendArtworkData(artworkData);\n }\n }",
"public List<Company> readFromDatabase() {\n\t\treturn this.jdbcTemplate.query(\"SELECT * FROM \" + table + \";\", (rs, i) -> new Company(rs.getString(\"Date\"), rs.getString(\"Security\"), rs.getDouble(\"Weighting\")));\n\t}",
"@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\n}",
"private void readFromDb() {\n mMonthsList.clear();\n if(mDatabaseHandler.getMonthsList()!=null) {\n mMonthsList = mDatabaseHandler.getMonthsList();\n setMonthListAdapter(mMonthsList);\n }\n else\n LoggerUtility.makeShortToast(HomeActivity.this,getString(R.string.error_empty_database));\n }",
"private void FetchingData() {\n\t\t try { \n\t\t\t \n\t \tmyDbhelper.onCreateDataBase();\n\t \t \t\n\t \t\n\t \t} catch (IOException ioe) {\n\t \n\t \t\tthrow new Error(\"Unable to create database\");\n\t \n\t \t} \n\t \ttry {\n\t \n\t \t\tmyDbhelper.openDataBase();\n\t \t\tmydb = myDbhelper.getWritableDatabase();\n\t\t\tSystem.out.println(\"executed\");\n\t \t\n\t \t}catch(SQLException sqle){\n\t \n\t \t\tthrow sqle;\n\t \n\t \t}\n\t}",
"public ArrayList<Empleado> Read() throws SQLException {\r\n ResultSet rs;\r\n /*Guardamos todos los datos de la tabla en un ArrayList*/\r\n ArrayList<Empleado> listado = new ArrayList<>();\r\n /*Sentencia SQL*/\r\n String sql = \"SELECT * FROM empleados\";\r\n PreparedStatement sentencia = conexion.prepareStatement(sql);\r\n /*Ejecutar sentencia*/\r\n sentencia.execute();\r\n rs = sentencia.getResultSet();\r\n /*Guardamos los valores de cada fila en su objeto*/\r\n while(rs.next()){\r\n Empleado emp = new Empleado(rs.getInt(\"emp_no\"), rs.getString(\"apellido\"), rs.getString(\"oficio\"), rs.getInt(\"dir\"), rs.getDate(\"fecha_alt\"), rs.getFloat(\"salario\"), rs.getFloat(\"comision\"), rs.getInt(\"dept_no\")); \r\n listado.add(emp);\r\n }\r\n return listado;\r\n }",
"public List<Person> read() {\n Session session = getSessionFactory().openSession();\n List<Person> persons = session.createQuery(\"FROM Person\").list();\n session.close();\n LOGGER.log(Level.INFO,\"Found \" + persons.size() + \" persons\");\n return persons;\n }",
"public List<? extends OggettoCeleste> read(OggettoCeleste oggetto) throws SQLException, DAOException {\n\t\tthrow new DAOException(\"Not implemented\");\n\t}",
"@Override\r\npublic Detalle_pedido read(int id) {\n\treturn detalle_pedidoDao.read(id);\r\n}",
"public List<NewsItem> getNewsItemDataFromDB() throws SQLException;",
"private void getDatabase(){\n\n }",
"public T get(int objectId) throws SQLException;",
"@Override\n\tpublic void read(Object entidade) {\n\t\t\n\t}",
"@Override\n\tpublic List<Order> readAll() {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT * FROM orders\");) {\n\t\t\tList<Order> orderList = new ArrayList<>();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\torderList.add(modelFromResultSet(resultSet));\n\t\t\t}\n\t\t\treturn orderList;\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}",
"public List<DcSquadDO> load() throws DataAccessException;",
"public File getInputDb();",
"@Override\n public List<Seq> getAll() {\n Connection conn = null;\n Statement stmt = null;\n List<Seq> listSeqs = new ArrayList<>();\n\n try {\n String url = \"jdbc:sqlite:src\\\\database\\\\AT2_Mobile.db\";\n conn = DriverManager.getConnection(url);\n stmt = conn.createStatement();\n ProcessesDAO pdao = new ProcessesDAO();\n String sql = \"select * from seq;\";\n ResultSet rs = stmt.executeQuery(sql);\n\n while (rs.next()) {\n\n Seq seq = new Seq(rs.getInt(\"id\"), pdao.getbyidentifier(rs.getString(\"identifier\")), rs.getInt(\"seq_number\"));\n listSeqs.add(seq);\n }\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n } finally {\n try {\n if (conn != null) {\n conn.close();\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n }\n return listSeqs;\n }",
"private static void selectRecordsFromDbUserTable() throws SQLException {\n\n\t\tConnection dbConnection = null;\n\t\tStatement statement = null;\n\n\t\tString selectTableSQL = \"SELECT * from spelers\";\n\n\t\ttry {\n\t\t\tdbConnection = getDBConnection();\n\t\t\tstatement = dbConnection.createStatement();\n\n\t\t\tSystem.out.println(selectTableSQL);\n\n\t\t\t// execute select SQL stetement\n\t\t\tResultSet rs = statement.executeQuery(selectTableSQL);\n\n\t\t\twhile (rs.next()) {\n \n String naam = rs.getString(\"naam\");\n\t\t\t\tint punten = rs.getInt(\"punten\");\n \n System.out.println(\"naam : \" + naam);\n\t\t\t\tSystem.out.println(\"punten : \" + punten);\n\t\t\t\t\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t} finally {\n\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\n\t\t\tif (dbConnection != null) {\n\t\t\t\tdbConnection.close();\n\t\t\t}\n\n\t\t}\n\n\t}",
"Object deserialize() throws SQLException {\n\ttry {\n\t ByteArrayInputStream bi = new ByteArrayInputStream(data);\n\t ObjectInputStream is = new ObjectInputStream(bi);\n\n\t return is.readObject();\n\t} catch (Exception e) {\n\t throw Trace.error(Trace.SERIALIZATION_FAILURE, e.getMessage());\n\t}\n }",
"public static ResultSet ExecuteReadQuery(String query) {\n\t\ttry {\n\t\t\tStatement st = conn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(query);\n\t\t\tif(st.execute(query)) {\n\t\t\t\trs = st.getResultSet();\n\t\t\t\treturn rs;\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Error executing SQL statement!\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n\tpublic Map<String, Object> read(int id) {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate)\n\t\t\t\t.withProcedureName(\"pa_mat_produnidadmed_Get\").withCatalogName(\"PKG_ALM_CRUD_PRODUNIDADMED\")\n\t\t\t\t.declareParameters(new SqlOutParameter(\"uni\",OracleTypes.CURSOR,new ColumnMapRowMapper()), new SqlParameter(\"p_idprodunidadmed\", Types.INTEGER));\n\t\tSqlParameterSource in = new MapSqlParameterSource().addValue(\"p_idprodunidadmed\", id);\n\t\treturn simpleJdbcCall.execute(in);\n\t}",
"@Override\r\n\tpublic Map<String, Object> read(int id) {\n\t\tSystem.out.println(id);\r\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate).withCatalogName(\"PKG_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .withProcedureName(\"PR_BUS_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .declareParameters(new SqlOutParameter(\"CUR_ESTADO_CIVIL\", OracleTypes.CURSOR,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t new ColumnMapRowMapper()), new SqlParameter(\"IDESTADO_CIVIL\", Types.INTEGER));\r\n\t\tSqlParameterSource in = new MapSqlParameterSource().addValue(\"IDESTADO_CIVIL\", id);\r\n\t\treturn simpleJdbcCall.execute(in);\r\n\t}",
"@Override\n\tpublic List<Subordination> readAll() throws DBOperationException {\n\t\treturn null;\n\t}",
"public int loadDatabase(){\n\n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(databaseFileName));\n String line = bufferedReader.readLine();\n while (line != null) {\n HashMap<String,String> activityString = parseStatement(line);\n System.out.println(activityString);\n Activity activity = new Activity();\n activity.create(activityString);\n allActivities.add(activity);\n line = bufferedReader.readLine();\n\n }\n }\n catch(Exception e){\n System.out.println(e);\n return -1;\n }\n\n\n //TODO: write utility to load database, including loading csv hashes into activity classes. Activity class - > needs list of accepted attr?\n\n return 0;\n }",
"public ActiveRecord read(Object id) {\n StringBuilder sql = new StringBuilder();\n sql.append(\"SELECT * FROM \").append(getTableName()).append(\" WHERE id = \").append(id);\n Row row = getAdapter().selectOne(sql.toString());\n if (row == null) throw new RecordNotFoundException(\"No record found with id \" + id);\n for (Column column : getColumns()) {\n String name = column.getName();\n Classes.setFieldValue(this, name, row.get(name));\n }\n\n readAssociations();\n readAggregations();\n\n newRecord = false;\n return this;\n }",
"public ResultSet readAll() throws SQLException {\r\n String statement = \"SELECT * FROM appointments\";\r\n return conn.prepareStatement(statement).executeQuery();\r\n }",
"public List<PessoasEspacosDeCafe> read() {\n\n Connection con = null;\n\n PreparedStatement stmt = null;\n\n ResultSet rs = null;\n\n List<PessoasEspacosDeCafe> mostrarEspacosDeCafe = new ArrayList<>();\n\n try {\n con = ConnectionFactory.getConnection();\n stmt = con.prepareStatement(\"SELECT * FROM PessoasEspacosDeCafe\");\n rs = stmt.executeQuery();\n\n while (rs.next()) {\n\n PessoasEspacosDeCafe EspacosDeCafeDoBanco = new PessoasEspacosDeCafe();\n\n EspacosDeCafeDoBanco.setPessoasIdPessoas(rs.getInt(\"pessoasIdPessoas\"));\n EspacosDeCafeDoBanco.setEspacosDeCafeIdEspacosDeCafe(rs.getInt(\"espacosDeCafeIdEspacosDeCafe\"));\n mostrarEspacosDeCafe.add(EspacosDeCafeDoBanco);\n\n }\n } catch (SQLException ex) {\n Logger.getLogger(PessoasDAO.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n ConnectionFactory.closeConnection(con, stmt, rs);\n }\n\n return mostrarEspacosDeCafe;\n\n }",
"public Cursor getData (){\n SQLiteDatabase database = getReadableDatabase();\n String sql = \"SELECT * FROM \" + TABLE_NAME + \"\";\n return database.rawQuery(sql,null);\n }",
"@Override\r\n\tpublic Map<String, Object> readAll() {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate).withCatalogName(\"PKG_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .withProcedureName(\"PR_LIS_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .declareParameters(new SqlOutParameter(\"CUR_ESTADO_CIVIL\", OracleTypes.CURSOR,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t new ColumnMapRowMapper()));\r\n\t\treturn simpleJdbcCall.execute();\r\n\t}",
"@Override\r\n\tpublic Libro read(int id) {\n\t\treturn libroRepository.findById(id).get();\r\n\t}",
"public String getData(int id){\n String _data = \"\";\n dbOperation operationObj = new dbOperation(getActivity());\n operationObj.open();\n MyTable fields = new MyTable();\n String condition2 = fields.getID() + \" ='\" + id + \"'\";\n String[] dbFields4 = {fields.getScore()};\n Cursor cursor2 = operationObj.getTableRow(fields.getTableName(),dbFields4,condition2,fields.getID() + \" ASC \",\"1\");\n if(cursor2.getCount() > 0)\n {\n cursor2.moveToFirst();\n do{\n _data = cursor2.getString(0);\n }while(cursor2.moveToNext());\n }else{\n _data = \"error\";\n }\n cursor2.close();\n cursor2.deactivate();\n operationObj.close();\n return _data;\n }",
"public Cursor getData(String sql){\n SQLiteDatabase database = getReadableDatabase();\n return database.rawQuery(sql,null);\n }",
"@Override\n public Product read(int produktid) {\n Product productToReturn = new Product();\n try {\n PreparedStatement getSingleProdukt = conn.prepareStatement(\"SELECT * FROM produkter WHERE produktID=?\");\n getSingleProdukt.setInt(1, produktid);\n System.out.println(\"Vi er i read i linie 115\");\n ResultSet rs = getSingleProdukt.executeQuery();\n while (rs.next()) {\n productToReturn = new Product();\n productToReturn.setproduktID(rs.getInt(\"produktID\"));\n productToReturn.setNavn(rs.getString(2));\n productToReturn.setPris(rs.getDouble(3));\n productToReturn.setBeskrivelse(rs.getString(4));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return productToReturn;\n //return null;\n }",
"private void getdataFromDb() {\n\t\tdbAdapter.openDataBase();\n\n\t\tString query = \"select * from list_manager where isVis =1\";\n\t\tCursor cursor = dbAdapter.selectRecordsFromDB(query, null);\n\t\tarrayList.clear();\n\n\t\t// int mCount = cursor.getCount();\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tListManagerModel listManagerModel = new ListManagerModel();\n\t\t\t\tlistManagerModel.setId(String.valueOf(cursor.getInt(0)));\n\t\t\t\tlistManagerModel.setName(cursor.getString(1));\n\t\t\t\tlistManagerModel.setIsVis(cursor.getString(2));\n\t\t\t\tlistManagerModel.setIsCheck(\"1\");\n\t\t\t\tarrayList.add(listManagerModel);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdbAdapter.close();\n\n\t}",
"@Override\n\tpublic Map<String, Object> readAll() {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate)\n\t\t\t\t.withCatalogName(\"PKG_ALM_CRUD_PRODUNIDADMED\")\n\t\t\t\t.withProcedureName(\"PA_MAT_PRODUNIDADMED_LIS\")\t\n\t\t\t\t.declareParameters(new SqlOutParameter(\"uni\", OracleTypes\n\t\t\t\t.CURSOR, new ColumnMapRowMapper()));\n\t\treturn simpleJdbcCall.execute();\n\t}",
"@Test\r\n public void testRead() throws Exception {\r\n System.out.println(\"read\");\r\n int idbureau = 0;\r\n BureauDAO instance = new BureauDAO();\r\n instance.setConnection(dbConnect);\r\n Bureau obj = new Bureau(0,\"Test\",\"000000000\",\"\");\r\n Bureau expResult = instance.create(obj);\r\n idbureau=expResult.getIdbur();\r\n Bureau result = instance.read(idbureau);\r\n assertEquals(\"sigles différents\",expResult.getSigle(), result.getSigle());\r\n assertEquals(\"tel différents\",expResult.getTel(), result.getTel());\r\n //etc\r\n assertEquals(\"id différents\",expResult.getIdbur(),result.getIdbur());\r\n try{\r\n result=instance.read(0);\r\n fail(\"exception d'id inconnu non générée\");\r\n }\r\n catch(SQLException e){}\r\n instance.delete(result);\r\n }",
"@Override\n\tpublic Map<String, Object> read(int id) {\n\t\treturn rolDao.read(id);\n\t}",
"@Override\n public Database getDatabase() {\n return m_database;\n }",
"public Cursor getData(){\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor res = db.rawQuery(\"select * from \" + Table_name, null);\n return res;\n }",
"public List<Customer> read() {\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n ResultSet rest = null;\n List<Customer> customers = new ArrayList<>();\n try {\n ppst = conn.prepareStatement(\"SELECT * FROM customer\");\n rest = ppst.executeQuery();\n while (rest.next()) {\n Customer c = new Customer(\n rest.getInt(\"customer_key\"),\n rest.getString(\"name\"),\n rest.getString(\"id\"),\n rest.getString(\"phone\")\n );\n customers.add(c);\n }\n } catch (SQLException e) {\n throw new RuntimeException(\"Query error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst, rest);\n }\n return customers;\n }",
"@Override\n\tpublic Map<String, Object> read(String nombrec) {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate)\n\t\t\t\t.withProcedureName(\"pa_mat_produnidadmed_GetNomc\").withCatalogName(\"PKG_ALM_CRUD_PRODUNIDADMED\")\n\t\t\t\t.declareParameters(new SqlOutParameter(\"uni\",OracleTypes.CURSOR,new ColumnMapRowMapper()), new SqlParameter(\"p_nombrecorto\", Types.VARCHAR));\n\t\tSqlParameterSource in = new MapSqlParameterSource().addValue(\"p_nombrecorto\", nombrec);\n\t\treturn simpleJdbcCall.execute(in);\n\t}",
"public List<Aflevering> readAll() {\n List<Aflevering> lijst = new ArrayList<>();\n try {\n ResultSet rs = sqlConnection.executeSql(\"SELECT * FROM AFLEVERING\");\n while(rs.next()) {\n lijst.add(new Aflevering(rs.getString(\"ID\"),\n rs.getString(\"Serie\"),\n rs.getString(\"Seizoen\"),\n rs.getString(\"Titel\"),\n rs.getString(\"Tijdsduur\")));\n }\n }\n catch(Exception e) {\n System.out.println(e);\n }\n return lijst;\n }",
"@Override\n\tpublic Map<String, Object> read(int bno) throws Exception {\n\t\treturn boardDao.read(bno);\n\t}",
"T deserializeData(R r) throws SQLException;",
"public Cursor readAllData() {\n\n Cursor objCursor = readSQLite.query(TABLE_OFFICER, new String[]{COLUMN_ID_OFFICER, COLUMN_OFFICER, COLUMN_POSITION, COLUMN_IMAGE, COLUMN_VIDEO, COLUMN_SOUND}, null, null, null, null, null);\n\n if (objCursor != null) {\n objCursor.moveToFirst();\n }\n\n return objCursor;\n }",
"public ResultSet obtainDB() throws SQLException {\n Statement state = connection.createStatement();\n ResultSet resultSet = ((Statement) state).executeQuery(\"select * from criteriaSearchDB\");\n return resultSet;\n }",
"@Override\n public LogbookEntry loadInBackground() {\n this.database = this.databaseSchemaHelper.getReadableDatabase();\n return SchemaQueries.getLogbook(this.database);\n }",
"@GET\n @Path(\"/database/get\")\n public Response getDatabase() throws JsonGenerationException, JsonMappingException, IOException{\n return Response.status(200).entity(Json.newObjectMapper(true).writeValueAsString(Database2.get())).build();\n }",
"public List<Clientes> read(){\n Connection con = ConectionFactory.getConnection();\n PreparedStatement pst = null;\n ResultSet rs = null;\n \n List<Clientes> cliente = new ArrayList<>();\n \n try {\n pst = con.prepareStatement(\"SELECT * from clientes ORDER BY fantasia\");\n rs = pst.executeQuery();\n \n while (rs.next()) { \n Clientes clientes = new Clientes();\n clientes.setCodigo(rs.getInt(\"codigo\"));\n clientes.setFantasia(rs.getString(\"fantasia\"));\n clientes.setCep(rs.getString(\"cep\"));\n clientes.setUf(rs.getString(\"uf\"));\n clientes.setLogradouro(rs.getString(\"logradouro\"));\n clientes.setNr(rs.getString(\"nr\"));\n clientes.setCidade(rs.getString(\"cidade\"));\n clientes.setBairro(rs.getString(\"bairro\"));\n clientes.setContato(rs.getString(\"contato\"));\n clientes.setEmail(rs.getString(\"email\"));\n clientes.setFixo(rs.getString(\"fixo\"));\n clientes.setCelular(rs.getString(\"celular\"));\n clientes.setObs(rs.getString(\"obs\"));\n cliente.add(clientes); \n }\n } catch (SQLException ex) {\n \n }finally{\n ConectionFactory.closeConnection(con, pst, rs);\n }\n return cliente;\n}",
"String getDatabase();",
"private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}",
"Collection<Book> readAll();",
"@Override\r\n protected Cursor doInBackground(Long... params)\r\n {\r\n databaseConnector.open();\r\n \r\n // get a cursor containing all data on given entry\r\n return databaseConnector.getOneContact(params[0]);\r\n }",
"public static void test()\n\t{\n\t Environment myDbEnvironment = null;\n\t Database myDatabase = null;\n\n\t /* OPENING DB */\n\n\t // Open Database Environment or if not, create one.\n\t EnvironmentConfig envConfig = new EnvironmentConfig();\n\t envConfig.setAllowCreate(true);\n\t myDbEnvironment = new Environment(new File(\"db/\"), envConfig);\n\n\t // Open Database or if not, create one.\n\t DatabaseConfig dbConfig = new DatabaseConfig();\n\t dbConfig.setAllowCreate(true);\n\t dbConfig.setSortedDuplicates(true);\n\t myDatabase = myDbEnvironment.openDatabase(null, \"schema\", dbConfig);\n\n\t Cursor cursor = null;\n\t /* GET <K,V > FROM DB */\n\t DatabaseEntry foundKey = new DatabaseEntry();\n\t DatabaseEntry foundData = new DatabaseEntry();\n\n\t cursor = myDatabase.openCursor(null, null);\n\t cursor.getFirst(foundKey, foundData, LockMode.DEFAULT);\n\n\t do {\n\t try {\n\t String keyString = new String(foundKey.getData(), \"UTF-8\");\n\t String dataString = new String(foundData.getData(), \"UTF-8\");\n\t System.out.println(\"<\" + keyString + \", \" + dataString + \">\");\n\t } catch (UnsupportedEncodingException e) {\n\t e.printStackTrace();\n\t }\n\t } while (cursor.getNext(foundKey, foundData, LockMode.DEFAULT) == OperationStatus.SUCCESS);\n\t if (cursor != null) cursor.close();\n\t System.out.println(\"-----\");\n\t \n\t if (myDatabase != null) myDatabase.close();\n\t if (myDbEnvironment != null) myDbEnvironment.close();\n\t}",
"@Override\r\n\tpublic NoticeVO read(int no) {\n\t\treturn sqlSession.selectOne(namespace + \".read\", no);\r\n\t}",
"public Book read(int bookId){\n System.out.println(\"looking for Book with id \" + bookId);\n Book b = new Book();\n \n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jbook = new JSONObject(resultAttribute);\n\n if(jbook.getInt(\"idBOOK\") == bookId){\n b = new Book(jbook);\n break;\n }\n keyIterator.next(); \n }\n }\n catch(Exception ex){\n ex.printStackTrace();\n } \n return b;\n }",
"@Override\n\tpublic Usuario read(String nomuser) {\n\t\tString SQL = \"SELECT * FROM usuario WHERE username=?\";\n\t\treturn jdbc.queryForObject(SQL, new Object[] {nomuser}, new BeanPropertyRowMapper<Usuario>(Usuario.class));\n\n\t}",
"public Estado ReadEstado(int estadoID){\r\n SQLiteDatabase sqLiteDatabase = conn.getReadableDatabase();\r\n String query = \"select * from estados WHERE estadoID=?\";\r\n Cursor c= sqLiteDatabase.rawQuery(query, new String[]{String.valueOf(estadoID)});\r\n if (c.moveToFirst()) return new Estado(estadoID,c.getString(c.getColumnIndex(\"descripcion\")));\r\n return null;\r\n\r\n\r\n }",
"private static List<Exam> readWriteData() throws Exception \r\n\t{\n\t\t\r\n\t\tList<Exam> exams = examDao.queryForAll();\r\n\t\treturn exams;\r\n\t}",
"@Override\n public ResultSet getByID(String id) throws SQLException {\n return db.getConnection().createStatement().executeQuery(\"select * from comic where idcomic=\"+id);\n }",
"@Test\n public void test() throws SQLException {\n System.out.println(new MyDbutilsDemo().load(12));\n }",
"public static Alumni_data getAlumniData(int id)\n { \n List li=null; \n try{\n session=SessionFact.getSessionFact().openSession();\n li=session.createQuery(\"from Alumni_data where id=:id\").setInteger(\"id\", id).list();\n session.close();\n return (Alumni_data)li.get(0);\n }catch(Exception e){ out.print(\"Wait(AlumniCon.getAlumniData)\"); } \n return new Alumni_data();\n }",
"public Object get(ResultSet rs, String name) throws HibernateException, SQLException {\n Reader charReader = rs.getCharacterStream(name);\n\n // if the corresponding SQL value is NULL, the reader we got is NULL as well\n if (charReader == null || rs.wasNull()) return null;\n\n // Fetch Reader content up to the end - and put characters in a StringBuffer\n StringBuffer sbuf = new StringBuffer();\n try {\n char[] cbuf = new char[1024];\n for (int amountRead; (amountRead = charReader.read(cbuf)) != -1;) {\n sbuf.append(cbuf, 0, amountRead);\n }\n }\n catch (IOException ioe) {\n throw new HibernateException(\"IOException occurred reading text\", ioe);\n }\n finally {\n try {\n charReader.close();\n }\n catch (IOException e) {\n throw new HibernateException(\"IOException occurred closing stream\", e);\n }\n }\n\n // Return StringBuffer content as a large String\n return sbuf.toString();\n }",
"void all_Data_retrieve() {\n\t\tStatement stm=null;\n\t\tResultSet rs=null;\n\t\ttry{\n\t\t\t//Retrieve tuples by executing SQL command\n\t\t stm=con.createStatement();\n\t String sql=\"select * from \"+tableName+\" order by id desc\";\n\t\t rs=stm.executeQuery(sql);\n\t\t DataGUI.model.setRowCount(0);\n\t\t //Add rows to table model\n\t\t while (rs.next()) {\n Vector<Object> newRow = new Vector<Object>();\n //Add cells to each row\n for (int i = 1; i <=colNum; i++) \n newRow.addElement(rs.getObject(i));\n DataGUI.model.addRow(newRow);\n }//end of while\n\t\t //Catch SQL exception\n }catch (SQLException e ) {\n \te.printStackTrace();\n\t } finally {\n\t \ttry{\n\t if (stm != null) stm.close(); \n\t }\n\t \tcatch (SQLException e ) {\n\t \t\te.printStackTrace();\n\t\t }\n\t }\n\t}",
"protected abstract void retrievedata();",
"public abstract ODatabaseInternal<?> openDatabase();",
"@Override\n\tpublic List<Map<String, Object>> readAll() {\n\t\treturn rolDao.readAll();\n\t}",
"T readOne(int id);",
"@Override\n\tpublic Collection<Users> read() {\n\t\treturn userDAO.readAll();\n\t}",
"List<T> readAll();",
"public static MainDatabase deserializeDatabase() {\n MainDatabase data = new MainDatabase();\n // first check if the file exists\n File file = new File(Constants.SAVE_FILE);\n if (!file.exists()) {\n return data;\n }\n try (FileInputStream in = new FileInputStream(Constants.SAVE_FILE);\n BufferedInputStream reader = new BufferedInputStream(in)) {\n\n // un-encrypted header (salt and iv necessary for decryption)\n byte[] salt = new byte[reader.read()];\n reader.read(salt);\n byte[] iv = new byte[reader.read()];\n reader.read(iv);\n Cipher enc = getEncryptionCipher(salt, iv);\n\n try (CipherInputStream cis = new CipherInputStream(reader, enc);\n ObjectInputStream ois = new ObjectInputStream(cis)) {\n\n // if we need any settings, read them here\n\n // read the travel database\n int count = ois.readByte();\n for (int i = 0; i < count; i++) {\n int size = ois.readInt();\n for (int j = 0; j < size; j++) {\n data.addTravel((SingleTravel) ois.readObject());\n }\n }\n\n // read the user database\n count = ois.readInt();\n for (int i = 0; i < count; i++) {\n RegisteredUser ru = (RegisteredUser) ois.readObject();\n data.addUser(ru);\n\n int size = ois.readInt();\n for (int j = 0; j < size; j++) {\n int itSize = ois.readInt();\n // check the itinerary to make sure it is still valid\n boolean validItinerary = (itSize > 0);\n Itinerary it = new Itinerary();\n for (int k = 0; k < itSize; k++) {\n try {\n SingleTravel st = data.getTravel(TravelType.values()[ois.readByte()],\n ois.readUTF());\n if (st == null) { // doesn't exist; do not add itinerary\n validItinerary = false;\n } else {\n it.add(st);\n }\n } catch (IllegalArgumentException e) {\n validItinerary = false;\n // we don't need to log this -- probably a travel expired\n }\n }\n if (validItinerary) {\n ru.bookItinerary(it);\n }\n }\n }\n }\n } catch (IOException | GeneralSecurityException | ClassNotFoundException e) {\n log.log(Level.SEVERE, \"Error reading from file.\", e);\n }\n return data;\n }",
"@Override\n\tpublic Customer[] readAll() {\n\n\t\tString selectQuery = String.format(\"SELECT * FROM %s ;\", TABLE_NAME);\n\t\tCustomer[] result = null;\n\n\t\ttry (Statement s = dbCon.createStatement()) {\n\t\t\tResultSet rS = s.executeQuery(selectQuery);\n\n\t\t\tArrayList<Customer> resultTmp = new ArrayList<Customer>();\n\n\t\t\twhile (rS.next()) {\n\t\t\t\tresultTmp.add(\tresultTmp.size(),\n\t\t\t\t\t\t\t\tnew Customer(rS.getInt(COLUMN_NAME_ID),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_FIRST_NAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_LAST_NAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_EMAIL),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_KNICKNAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getDate(COLUMN_NAME_BIRTHDATE).toLocalDate(),\n\t\t\t\t\t\t\t\t\t\t\trS.getDouble(COLUMN_NAME_CREDITS))\n\t\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t\trS.close();\n\n\t\t\tresult = new Customer[resultTmp.size()];\n\t\t\tresultTmp.toArray(result);\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"An SQL error occured during retrieving all data from of customer table : \" + e.getMessage());\n\t\t}\n\n\t\treturn result;\n\t}",
"void getInfoFromDatabase(int categoryId, int questionId){\n\n\t\t\tDataBaseHelper myDbHelper = new DataBaseHelper(this\n\t\t\t\t\t.getApplicationContext());\n\t\t\tmyDbHelper = new DataBaseHelper(this);\n\n\t\t\ttry {\n\n\t\t\t\tmyDbHelper.createDataBase();\n\n\t\t\t} catch (IOException ioe) {\n\n\t\t\t\tthrow new Error(\"Unable to create database\");\n\n\t\t\t}\n\n\t\t\ttry {\n\n\t\t\t\tmyDbHelper.openDataBase();\n\t\t\t\tquestionFromDatabase = myDbHelper.getQuestion(categoryId, questionId);\n\t\t\t \n\t\t\t\tdisplayedQuestionFromDatabase = questionFromDatabase;\n\t\t\t\tSystem.out.println(\"questionFromDatabase = \" + questionFromDatabase);\n\t\t\t\tanswer1FromDatabase = myDbHelper.getCorrectAnswer(categoryId, questionId); //correct answer from database\n\t\t\t\tSystem.out.println(\"correct answer from db = \" + answer1FromDatabase );\n\t\t\t\tanswer2FromDatabase = myDbHelper.getWrongAnswer1(categoryId, questionId);\n\t\t\t\tanswer3FromDatabase = myDbHelper.getWrongAnswer2(categoryId, questionId);\n\t\t\t\tanswer4FromDatabase = myDbHelper.getWrongAnswer3(categoryId, questionId);\n\t\t\t\n\t\t\t\tmyDbHelper.close();\n\t\t\t\n\t\t\t} catch (SQLException sqle) {\n\t\t\t\tSystem.out.println(\"Errored out\");\n\t\t\t\ttry {\n\t\t\t\t\tthrow sqle;\n\t\t\t\t} catch (SQLException 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}\n\t\t\t\n\t \n\t }",
"private void readEntry(long Key)\n\t{\n\t\tString SQL = \"SELECT * FROM cd_songs \";\n\t\tSQL += \"WHERE ID = \" + Long.toString(Key);\n\t\t\n\t\tResultSet rSet = DBConnection.executeQuery(SQL);\n\t\t\n\t\tif (rSet == null) return;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\tif (rSet.next())\n\t\t\t{\n\t\t\t\t\n\t\t\t\t// The index of one ResultSet starts in 1 NOT IN 0 (DO NOT FORGET)\n\t\t\t\t// System.out.println(rSet.getString(\"Typ_Music\")); // Si funciona\n\t\t\t\t// System.out.println(rSet.getString(1)); \t\t // Si funciona\n\t\t\t\t// System.out.println(rSet.getNString(1)); \t\t\t// No funciona\n\t\t\t\t/* System.out.println(rSet.getString(2)); \n\t\t\t\t System.out.println(rSet.getString(3));\n\t\t\t\t System.out.println(rSet.getString(4));\n\t\t\t\t System.out.println(rSet.getString(5));\n\t\t\t\t System.out.println(rSet.getString(6)); */\n\t\t\t\t\n\t\t\t\t//tbID, tbTypMusic, tbAuthor, tbCD_Name, tbSong_Name, tbCountry\n\t\t\t\t\n\t\t\t\t tbID.setText(rSet.getString(\"ID\")); \t\t\t //funciona de ambas formas \"ID\" y con getInt(1).\n\t\t\t\t //tbID.setText(toString(rSet.getInt(1)));\n\t\t\t\t //tbID.setText(String.valueOf(rSet.getInt(0)));\n\t\t\t\t\n\t\t\t\t tbTypMusic.setText(rSet.getString(2));\n\t\t\t\t //tbTypMusic.setText(rSet.getString(\"Typ_Music\")); //funciona\n\t\t\t\t\n\t\t\t\t tbAuthor.setText(rSet.getString(3));\n\t\t\t\t tbCD_Name.setText(rSet.getString(4));\n\t\t\t\t tbSong_Name.setText(rSet.getString(5));\n\t\t\t\t tbCountry.setText(rSet.getString(6));\n\t\t\t\t\n\t\t\t\trSet.close();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Der Datensatz konnte nicht gefunden werden\", \"Datensatz lesen\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\tthis.mKey = -1;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch (Exception ex) {}\n\t\t\n\t\t//hasChanged = true;\n\t\t\n\t}",
"private void readDB(){\n Cursor c = myDb.getRow(date, dayOfWeek);\n String message=\"\";\n\n if (c.moveToFirst()) {\n do {\n // Process the data:\n int id = c.getInt(DBAdapter.COL_ROWID);\n String title = c.getString(DBAdapter.COL_TITLE);\n String location = c.getString(DBAdapter.COL_LOC);\n String stime = c.getString(DBAdapter.COL_STIME);\n String etime = c.getString(DBAdapter.COL_ETIME);\n\n String date = c.getString(DBAdapter.COL_DATE);\n\n int day = c.getInt(DBAdapter.COL_DAY);\n\n\n // Append data to the message:\n message += \"id=\" + id\n + \", title =\" + title\n + \", Date =\" + date\n + \", From =\" + stime\n + \", To=\" + etime\n + \"\\n\";\n if (date != null) {\n dailySchedule.add(new ScheduleItems(title,location,stime, etime,date, false));\n } else {\n dailySchedule.add(new ScheduleItems(title,location,stime, etime, dayToString(day), true));\n }\n\n } while (c.moveToNext());\n }\n\n if(dailySchedule.isEmpty()){\n ArrayList<String> temp = new ArrayList<String>();\n temp.add(\"There are no Events today\");\n ArrayAdapter<String> tempAdapter = new ArrayAdapter<>(getApplication(), android.R.layout.simple_list_item_1, temp);\n scheduleList.setAdapter(tempAdapter);\n scheduleList.setBackgroundColor(Color.BLACK);\n } else {\n ScheduleItemAdapter adapter = new ScheduleItemAdapter(getApplicationContext(),dailySchedule);\n scheduleList.setAdapter(adapter);\n }\n }",
"private void setRead() {\n db = handler.getReadableDatabase();\n }",
"public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }",
"public String getDBString();",
"@Override\n\tpublic List<Libro> readAll() {\n\t\treturn libroDao.readAll();\n\t}"
] |
[
"0.6975258",
"0.6937948",
"0.69209707",
"0.68505716",
"0.6821903",
"0.67159295",
"0.6612302",
"0.65634215",
"0.65026367",
"0.648982",
"0.6479548",
"0.64654714",
"0.63859063",
"0.6371562",
"0.63461995",
"0.62737066",
"0.6245345",
"0.62343174",
"0.6232838",
"0.618879",
"0.61579895",
"0.6151557",
"0.61469936",
"0.6141981",
"0.6135388",
"0.6102164",
"0.6099787",
"0.609788",
"0.60809356",
"0.6073077",
"0.6068573",
"0.6010288",
"0.6002914",
"0.5941886",
"0.5931653",
"0.59199923",
"0.5911148",
"0.5903215",
"0.5901297",
"0.5897881",
"0.5894648",
"0.5877459",
"0.587186",
"0.5858129",
"0.5856799",
"0.5834032",
"0.58238333",
"0.5810169",
"0.58026564",
"0.57997155",
"0.5799023",
"0.5788804",
"0.57834274",
"0.5779837",
"0.57788706",
"0.5777765",
"0.57772887",
"0.5774095",
"0.5760013",
"0.5746308",
"0.5746285",
"0.5745474",
"0.5742762",
"0.5717733",
"0.5700988",
"0.5693624",
"0.5691891",
"0.5689024",
"0.56786084",
"0.56633496",
"0.56631315",
"0.5653481",
"0.5644603",
"0.56439674",
"0.56410265",
"0.5640729",
"0.5640447",
"0.56376255",
"0.5630079",
"0.5622363",
"0.561743",
"0.5617071",
"0.5612954",
"0.56126815",
"0.56104875",
"0.5609956",
"0.5608134",
"0.5605419",
"0.56052834",
"0.56049144",
"0.55916226",
"0.55891937",
"0.55861926",
"0.5575795",
"0.55680114",
"0.5567717",
"0.5566802",
"0.5560469",
"0.5547453",
"0.5546914",
"0.55403584"
] |
0.0
|
-1
|
Method to read from database
|
public ArrayList getBookingList(String arrival, String departure, Connection con) {
ArrayList b = null;
try {
b = new BookingMapper().getBookingList(arrival, departure, con);
} catch (Exception e) {
System.out.println("fail in UnitOfWork - getBookingList");
System.err.println(e);
}
return b;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static void readDatabase(String path) {\n try {\n FileInputStream fileIn = new FileInputStream(path + \"/database.ser\");\n ObjectInputStream inStream = new ObjectInputStream(fileIn);\n database = (Database) inStream.readObject();\n inStream.close();\n fileIn.close();\n } catch (IOException i) {\n i.printStackTrace();\n } catch (ClassNotFoundException c) {\n c.printStackTrace();\n }\n }",
"@Override\r\n public void read() {\r\n Connection conexao = mysql.getConnection();\r\n try {\r\n PreparedStatement stm = conexao.prepareStatement(readSQL);\r\n ResultSet rs = stm.executeQuery();\r\n\r\n while (rs.next()) {\r\n int idcodigo = rs.getInt(\"idcodigo\");\r\n String data = rs.getString(\"data\");\r\n int p_rodada = rs.getInt(\"p_rodada\");\r\n int s_rodada = rs.getInt(\"s_rodada\");\r\n int t_rodada = rs.getInt(\"t_rodada\");\r\n int total = rs.getInt(\"total\");\r\n System.out.println(\"\\nCódigo: \" + idcodigo + \"\\nData: \" + data + \"\\nPrimeira Rodada: \" + p_rodada+ \"\\nSegunda Rodada: \" + s_rodada + \"\\nTerceira Rodada: \" + t_rodada + \"\\nTotal: \" + total);\r\n }\r\n rs.close();\r\n conexao.close();\r\n\r\n } catch (final SQLException ex) {\r\n System.out.println(\"Falha de conexão com a base de dados!\");\r\n ex.printStackTrace();\r\n } catch (final Exception ex) {\r\n ex.printStackTrace();\r\n } finally {\r\n try {\r\n conexao.close();\r\n } catch (final Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }",
"@Override\n public String readData(String path) {\n Connection connection;\n ResultSet resultSet;\n String data = null;\n\n try {\n connection = getConnection();\n connection.setAutoCommit(false);\n\n PreparedStatement pstmt = connection.prepareStatement(\"SELECT DATA FROM DATA WHERE ID = ?\");\n pstmt.setString(1, path);\n\n resultSet = pstmt.executeQuery();\n\n while (resultSet.next()) {\n data = new String (resultSet.getBytes(1));\n }\n\n pstmt.close();\n resultSet.close();\n connection.close();\n\n } catch (SQLException e) {\n logger.log(Level.SEVERE, e.getMessage(), e);\n }\n return data;\n }",
"DataReader reader();",
"public abstract void loadFromDatabase();",
"public <E extends Writeable> ResultSet read(CharSequence sql);",
"public List<CustomerModel> readDatabase() throws Exception{\n\nList<CustomerModel> list = new ArrayList<CustomerModel>();\n\ntry{\nlog.info(\"Loading MySql driver\");\nClass.forName(\"com.mysql.jdbc.Driver\");\n\nlog.info(\"Setting up connection with db\");\nconnect= DriverManager.getConnection(\"jdbc:mysql://localhost:3306/apidft\",\"root\",\"cisco\");\nlog.info(\"Database connection successful\");\nstatement = connect.createStatement();\n\nresultSet= statement.executeQuery(\"select * from customer\");\n\nwhile(resultSet.next()){\nlist.add(processRow(resultSet));\n}\n}\n\ncatch(Exception e){\nlog.error(\"Database connection fail\");\n}\n\nfinally{\nconnect.close();\n}\nreturn list;\n}",
"public void getDataFromFile() throws SQLException{\n \n //SQL database\n getGuestDate_DB();\n getHotelRoomData_DB();\n updateRoomChanges_DB();\n \n //this.displayAll();\n //this.displayAllRooms();\n \n }",
"private void loadFromDB() throws SQLException {\n\t\tif (rev_page != -1)\n\t\t\treturn;\n\t\t\n\t\tPreparedStatement stmt = dbc.prepareStatement(\n\t\t\t\t\"SELECT rev_page, rev_text_id, rev_timestamp, rev_comment, user_name \" +\n\t\t\t\t\"FROM revision, users WHERE rev_id = ? AND rev_user = user_id\");\n\t\tstmt.setInt(1, rev_id);\n\t\tstmt.execute();\n\n\t\tResultSet rs = stmt.getResultSet();\n\t\tif (!rs.next()) {\n\t\t\t/*\n\t\t\t * Shouldn't happen?\n\t\t\t */\n\t\t\tstmt.close();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\trev_page = rs.getInt(1);\n\t\trev_text_id = rs.getInt(2);\n\t\trev_timestamp = rs.getTimestamp(3);\n\t\trev_comment = rs.getString(4);\n\t\trev_user_text = rs.getString(5);\n\t\tstmt.close();\n\t}",
"public void getDataFromDatabase(){\r\n\t \tArrayList<Object> row = HomeActivity.dbPrograms.getDetail(SelectedID);\r\n\t \t\r\n\t\t\t// store data to variables\r\n\t \tProgramID = Integer.parseInt(row.get(0).toString());\r\n\t \tWorkoutID = Integer.parseInt(row.get(1).toString());\r\n\t \tName = row.get(2).toString();\r\n\t \tSelectedDayID = Integer.parseInt(row.get(3).toString());\r\n\t \tImage = row.get(4).toString();\r\n\t \tTime = row.get(5).toString().trim();\r\n\t \tSteps = row.get(6).toString();\r\n\t \t\r\n\t }",
"@Override\n\tpublic ObservableList<Book> read() {\n\t\tObservableList<Book> list=FXCollections.observableArrayList();\n\t\tString query=\"Select * from Book\";\n\t\tStatement statement;\n\t\tResultSet resultSet;\n\t\ttry {\n\t\t\tstatement=connection.createStatement();\n\t\t\tresultSet=statement.executeQuery(query);\n\t\t\tBook books;\n\t\t\twhile(resultSet.next()) {\n\t\t\t\tbooks=new Book(resultSet.getString(\"id\"),resultSet.getString(\"Title\"),resultSet.getString(\"Author\"),resultSet.getString(\"State\"));\n\t\t\t\tlist.add(books);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}",
"private Cursor read(){\n ProjectDbHelper mDbHelper = new ProjectDbHelper(this);\n\n\n // Create and/or open a database to read from it\n SQLiteDatabase db = mDbHelper.getReadableDatabase();\n\n // retrieve data using cursor\n String[] projection = {\n ProjectContract.ProjectEntry._ID,\n ProjectContract.ProjectEntry.COLUMN_PROJECT_NAME,\n ProjectContract.ProjectEntry.COLUMN_PROJECT_TYPE,\n ProjectContract.ProjectEntry.COLUMN_PROJECT_CLIENT,\n ProjectContract.ProjectEntry.COLUMN_PROJECT_PRICE\n };\n\n Cursor cursor = db.query(\n ProjectContract.ProjectEntry.TABLE_NAME,\n projection,\n null,\n null,\n null,\n null,\n null);\n\n return cursor;\n }",
"@Override\r\n public void read() {\n System.out.println('\\n' + \"DB repo: \");\r\n //Idk, probably search for a person and read data??\r\n\r\n }",
"public Object[] read_DB(String query) {\n\n Object[] result = new Object[2];\n java.sql.Connection con = null;\n boolean connected;\n try{\n con = DriverManager.getConnection(db_type + host + port + db_name,\n user + \"\",\n password + \"\");\n connected = true;\n }\n catch(SQLException e){\n connected = false;\n System.out.println(\"Error al conectar en la Base de datos: \" + e);\n result[0] = \"Error\";\n result[1] = \"Connecting BD\";\n close_connection(con);\n }\n\n if(connected){\n ResultSet rs;\n try{\n Statement st = con.createStatement();\n rs = st.executeQuery(query);\n\n Vector<String[]> table = makeTable(rs);\n if((table.size() == 1) && (table.get(0)[0] == \"Error\")) {\n result[0] = \"Error\";\n result[1] = table.get(0)[1];\n }\n else{\n result[0] = \"QueryResult\";\n result[1] = table;\n }\n\n close_connection(con);\n }\n catch(SQLException e){\n System.out.println(\"Error al ejecutar la consulta : \" + e);\n result[0] = \"Error\";\n result[1] = \"Executing Query\";\n close_connection(con);\n }\n }\n return result;\n\n }",
"Object getDB();",
"static DataFrameRead read() {\n return DataFrameFactory.getInstance().read();\n }",
"public abstract Statement queryToRetrieveData();",
"public void readTable() throws SQLException\n\t{\n\t\tStatement stm = conn.createStatement();\n\t\tResultSet rs = stm.executeQuery(READ_QUERY);\n\t\t\n\t\twhile(rs.next())\n\t\t{\n\t\t\tWPPost post = new WPPost(rs.getInt(ID), rs.getInt(POST_AUTHOR), rs.getTimestamp(POST_DATE),\n\t\t\t\t\trs.getTimestamp(POST_DATE_GMT), rs.getString(POST_CONTENT), rs.getString(POST_TITLE), \n\t\t\t\t\trs.getString(POST_EXCERPT), rs.getString(POST_STATUS), rs.getString(COMMENT_STATUS),\n\t\t\t\t\trs.getString(PING_STATUS), rs.getString(POST_PASSWORD), rs.getString(POST_NAME),\n\t\t\t\t\trs.getString(TO_PING), rs.getString(PINGED), rs.getTimestamp(POST_MODIFIED), \n\t\t\t\t\trs.getTimestamp(POST_MODIFIED_GMT), rs.getString(POST_CONTENT_FILTERED), rs.getInt(POST_PARENT),\n\t\t\t\t\trs.getString(GUID), rs.getInt(MENU_ORDER), rs.getString(POST_TYPE), rs.getString(POST_MIME_TYPE),\n\t\t\t\t\trs.getInt(COMMENT_COUNT));\n\t\t\treadValues.add(post);\n\t\t}\n\t}",
"private void read(Session session) {\n\t\t\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Aluno> AlunoList = session.createQuery(\"FROM Aluno\").getResultList();\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Reading Aluno records...\");\n\t\tSystem.out.printf(\"%-30.30s %-30.30s%n\", \"Model\", \"Price\");\n\t\tfor (Aluno al : AlunoList) {\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.printf(\"%-30.30s %-30.30s%n\", al.getNome(), al.getRa());\n\t\t}\n\t}",
"public Record readRecord(Long id);",
"public <E extends Retrievable> ResultSet read(CharSequence sql, Object... objects);",
"private ResultSet GetData(String query){\n\t\ttry{\n\t\t\tstat = connection.createStatement();\n\t\t\treturn stat.executeQuery(query);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn null;\n\t\t}\n\t}",
"private void getDataFromDB() {\n ArrayList<ArtworkData> artworkData = getArtworksFromDatabase();\n if (artworkData.size() <= 0) {\n // there is no data in local DB, error\n onErrorReceived();\n } else {\n sendArtworkData(artworkData);\n }\n }",
"public List<Company> readFromDatabase() {\n\t\treturn this.jdbcTemplate.query(\"SELECT * FROM \" + table + \";\", (rs, i) -> new Company(rs.getString(\"Date\"), rs.getString(\"Security\"), rs.getDouble(\"Weighting\")));\n\t}",
"@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\n}",
"private void readFromDb() {\n mMonthsList.clear();\n if(mDatabaseHandler.getMonthsList()!=null) {\n mMonthsList = mDatabaseHandler.getMonthsList();\n setMonthListAdapter(mMonthsList);\n }\n else\n LoggerUtility.makeShortToast(HomeActivity.this,getString(R.string.error_empty_database));\n }",
"private void FetchingData() {\n\t\t try { \n\t\t\t \n\t \tmyDbhelper.onCreateDataBase();\n\t \t \t\n\t \t\n\t \t} catch (IOException ioe) {\n\t \n\t \t\tthrow new Error(\"Unable to create database\");\n\t \n\t \t} \n\t \ttry {\n\t \n\t \t\tmyDbhelper.openDataBase();\n\t \t\tmydb = myDbhelper.getWritableDatabase();\n\t\t\tSystem.out.println(\"executed\");\n\t \t\n\t \t}catch(SQLException sqle){\n\t \n\t \t\tthrow sqle;\n\t \n\t \t}\n\t}",
"public ArrayList<Empleado> Read() throws SQLException {\r\n ResultSet rs;\r\n /*Guardamos todos los datos de la tabla en un ArrayList*/\r\n ArrayList<Empleado> listado = new ArrayList<>();\r\n /*Sentencia SQL*/\r\n String sql = \"SELECT * FROM empleados\";\r\n PreparedStatement sentencia = conexion.prepareStatement(sql);\r\n /*Ejecutar sentencia*/\r\n sentencia.execute();\r\n rs = sentencia.getResultSet();\r\n /*Guardamos los valores de cada fila en su objeto*/\r\n while(rs.next()){\r\n Empleado emp = new Empleado(rs.getInt(\"emp_no\"), rs.getString(\"apellido\"), rs.getString(\"oficio\"), rs.getInt(\"dir\"), rs.getDate(\"fecha_alt\"), rs.getFloat(\"salario\"), rs.getFloat(\"comision\"), rs.getInt(\"dept_no\")); \r\n listado.add(emp);\r\n }\r\n return listado;\r\n }",
"public List<Person> read() {\n Session session = getSessionFactory().openSession();\n List<Person> persons = session.createQuery(\"FROM Person\").list();\n session.close();\n LOGGER.log(Level.INFO,\"Found \" + persons.size() + \" persons\");\n return persons;\n }",
"public List<? extends OggettoCeleste> read(OggettoCeleste oggetto) throws SQLException, DAOException {\n\t\tthrow new DAOException(\"Not implemented\");\n\t}",
"@Override\r\npublic Detalle_pedido read(int id) {\n\treturn detalle_pedidoDao.read(id);\r\n}",
"public List<NewsItem> getNewsItemDataFromDB() throws SQLException;",
"private void getDatabase(){\n\n }",
"public T get(int objectId) throws SQLException;",
"@Override\n\tpublic void read(Object entidade) {\n\t\t\n\t}",
"@Override\n\tpublic List<Order> readAll() {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT * FROM orders\");) {\n\t\t\tList<Order> orderList = new ArrayList<>();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\torderList.add(modelFromResultSet(resultSet));\n\t\t\t}\n\t\t\treturn orderList;\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}",
"public List<DcSquadDO> load() throws DataAccessException;",
"public File getInputDb();",
"@Override\n public List<Seq> getAll() {\n Connection conn = null;\n Statement stmt = null;\n List<Seq> listSeqs = new ArrayList<>();\n\n try {\n String url = \"jdbc:sqlite:src\\\\database\\\\AT2_Mobile.db\";\n conn = DriverManager.getConnection(url);\n stmt = conn.createStatement();\n ProcessesDAO pdao = new ProcessesDAO();\n String sql = \"select * from seq;\";\n ResultSet rs = stmt.executeQuery(sql);\n\n while (rs.next()) {\n\n Seq seq = new Seq(rs.getInt(\"id\"), pdao.getbyidentifier(rs.getString(\"identifier\")), rs.getInt(\"seq_number\"));\n listSeqs.add(seq);\n }\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n } finally {\n try {\n if (conn != null) {\n conn.close();\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n }\n return listSeqs;\n }",
"private static void selectRecordsFromDbUserTable() throws SQLException {\n\n\t\tConnection dbConnection = null;\n\t\tStatement statement = null;\n\n\t\tString selectTableSQL = \"SELECT * from spelers\";\n\n\t\ttry {\n\t\t\tdbConnection = getDBConnection();\n\t\t\tstatement = dbConnection.createStatement();\n\n\t\t\tSystem.out.println(selectTableSQL);\n\n\t\t\t// execute select SQL stetement\n\t\t\tResultSet rs = statement.executeQuery(selectTableSQL);\n\n\t\t\twhile (rs.next()) {\n \n String naam = rs.getString(\"naam\");\n\t\t\t\tint punten = rs.getInt(\"punten\");\n \n System.out.println(\"naam : \" + naam);\n\t\t\t\tSystem.out.println(\"punten : \" + punten);\n\t\t\t\t\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t} finally {\n\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\n\t\t\tif (dbConnection != null) {\n\t\t\t\tdbConnection.close();\n\t\t\t}\n\n\t\t}\n\n\t}",
"Object deserialize() throws SQLException {\n\ttry {\n\t ByteArrayInputStream bi = new ByteArrayInputStream(data);\n\t ObjectInputStream is = new ObjectInputStream(bi);\n\n\t return is.readObject();\n\t} catch (Exception e) {\n\t throw Trace.error(Trace.SERIALIZATION_FAILURE, e.getMessage());\n\t}\n }",
"public static ResultSet ExecuteReadQuery(String query) {\n\t\ttry {\n\t\t\tStatement st = conn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(query);\n\t\t\tif(st.execute(query)) {\n\t\t\t\trs = st.getResultSet();\n\t\t\t\treturn rs;\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Error executing SQL statement!\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n\tpublic Map<String, Object> read(int id) {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate)\n\t\t\t\t.withProcedureName(\"pa_mat_produnidadmed_Get\").withCatalogName(\"PKG_ALM_CRUD_PRODUNIDADMED\")\n\t\t\t\t.declareParameters(new SqlOutParameter(\"uni\",OracleTypes.CURSOR,new ColumnMapRowMapper()), new SqlParameter(\"p_idprodunidadmed\", Types.INTEGER));\n\t\tSqlParameterSource in = new MapSqlParameterSource().addValue(\"p_idprodunidadmed\", id);\n\t\treturn simpleJdbcCall.execute(in);\n\t}",
"@Override\r\n\tpublic Map<String, Object> read(int id) {\n\t\tSystem.out.println(id);\r\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate).withCatalogName(\"PKG_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .withProcedureName(\"PR_BUS_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .declareParameters(new SqlOutParameter(\"CUR_ESTADO_CIVIL\", OracleTypes.CURSOR,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t new ColumnMapRowMapper()), new SqlParameter(\"IDESTADO_CIVIL\", Types.INTEGER));\r\n\t\tSqlParameterSource in = new MapSqlParameterSource().addValue(\"IDESTADO_CIVIL\", id);\r\n\t\treturn simpleJdbcCall.execute(in);\r\n\t}",
"@Override\n\tpublic List<Subordination> readAll() throws DBOperationException {\n\t\treturn null;\n\t}",
"public int loadDatabase(){\n\n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(databaseFileName));\n String line = bufferedReader.readLine();\n while (line != null) {\n HashMap<String,String> activityString = parseStatement(line);\n System.out.println(activityString);\n Activity activity = new Activity();\n activity.create(activityString);\n allActivities.add(activity);\n line = bufferedReader.readLine();\n\n }\n }\n catch(Exception e){\n System.out.println(e);\n return -1;\n }\n\n\n //TODO: write utility to load database, including loading csv hashes into activity classes. Activity class - > needs list of accepted attr?\n\n return 0;\n }",
"public ActiveRecord read(Object id) {\n StringBuilder sql = new StringBuilder();\n sql.append(\"SELECT * FROM \").append(getTableName()).append(\" WHERE id = \").append(id);\n Row row = getAdapter().selectOne(sql.toString());\n if (row == null) throw new RecordNotFoundException(\"No record found with id \" + id);\n for (Column column : getColumns()) {\n String name = column.getName();\n Classes.setFieldValue(this, name, row.get(name));\n }\n\n readAssociations();\n readAggregations();\n\n newRecord = false;\n return this;\n }",
"public ResultSet readAll() throws SQLException {\r\n String statement = \"SELECT * FROM appointments\";\r\n return conn.prepareStatement(statement).executeQuery();\r\n }",
"public List<PessoasEspacosDeCafe> read() {\n\n Connection con = null;\n\n PreparedStatement stmt = null;\n\n ResultSet rs = null;\n\n List<PessoasEspacosDeCafe> mostrarEspacosDeCafe = new ArrayList<>();\n\n try {\n con = ConnectionFactory.getConnection();\n stmt = con.prepareStatement(\"SELECT * FROM PessoasEspacosDeCafe\");\n rs = stmt.executeQuery();\n\n while (rs.next()) {\n\n PessoasEspacosDeCafe EspacosDeCafeDoBanco = new PessoasEspacosDeCafe();\n\n EspacosDeCafeDoBanco.setPessoasIdPessoas(rs.getInt(\"pessoasIdPessoas\"));\n EspacosDeCafeDoBanco.setEspacosDeCafeIdEspacosDeCafe(rs.getInt(\"espacosDeCafeIdEspacosDeCafe\"));\n mostrarEspacosDeCafe.add(EspacosDeCafeDoBanco);\n\n }\n } catch (SQLException ex) {\n Logger.getLogger(PessoasDAO.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n ConnectionFactory.closeConnection(con, stmt, rs);\n }\n\n return mostrarEspacosDeCafe;\n\n }",
"public Cursor getData (){\n SQLiteDatabase database = getReadableDatabase();\n String sql = \"SELECT * FROM \" + TABLE_NAME + \"\";\n return database.rawQuery(sql,null);\n }",
"@Override\r\n\tpublic Map<String, Object> readAll() {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate).withCatalogName(\"PKG_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .withProcedureName(\"PR_LIS_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .declareParameters(new SqlOutParameter(\"CUR_ESTADO_CIVIL\", OracleTypes.CURSOR,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t new ColumnMapRowMapper()));\r\n\t\treturn simpleJdbcCall.execute();\r\n\t}",
"@Override\r\n\tpublic Libro read(int id) {\n\t\treturn libroRepository.findById(id).get();\r\n\t}",
"public String getData(int id){\n String _data = \"\";\n dbOperation operationObj = new dbOperation(getActivity());\n operationObj.open();\n MyTable fields = new MyTable();\n String condition2 = fields.getID() + \" ='\" + id + \"'\";\n String[] dbFields4 = {fields.getScore()};\n Cursor cursor2 = operationObj.getTableRow(fields.getTableName(),dbFields4,condition2,fields.getID() + \" ASC \",\"1\");\n if(cursor2.getCount() > 0)\n {\n cursor2.moveToFirst();\n do{\n _data = cursor2.getString(0);\n }while(cursor2.moveToNext());\n }else{\n _data = \"error\";\n }\n cursor2.close();\n cursor2.deactivate();\n operationObj.close();\n return _data;\n }",
"public Cursor getData(String sql){\n SQLiteDatabase database = getReadableDatabase();\n return database.rawQuery(sql,null);\n }",
"@Override\n public Product read(int produktid) {\n Product productToReturn = new Product();\n try {\n PreparedStatement getSingleProdukt = conn.prepareStatement(\"SELECT * FROM produkter WHERE produktID=?\");\n getSingleProdukt.setInt(1, produktid);\n System.out.println(\"Vi er i read i linie 115\");\n ResultSet rs = getSingleProdukt.executeQuery();\n while (rs.next()) {\n productToReturn = new Product();\n productToReturn.setproduktID(rs.getInt(\"produktID\"));\n productToReturn.setNavn(rs.getString(2));\n productToReturn.setPris(rs.getDouble(3));\n productToReturn.setBeskrivelse(rs.getString(4));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return productToReturn;\n //return null;\n }",
"private void getdataFromDb() {\n\t\tdbAdapter.openDataBase();\n\n\t\tString query = \"select * from list_manager where isVis =1\";\n\t\tCursor cursor = dbAdapter.selectRecordsFromDB(query, null);\n\t\tarrayList.clear();\n\n\t\t// int mCount = cursor.getCount();\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tListManagerModel listManagerModel = new ListManagerModel();\n\t\t\t\tlistManagerModel.setId(String.valueOf(cursor.getInt(0)));\n\t\t\t\tlistManagerModel.setName(cursor.getString(1));\n\t\t\t\tlistManagerModel.setIsVis(cursor.getString(2));\n\t\t\t\tlistManagerModel.setIsCheck(\"1\");\n\t\t\t\tarrayList.add(listManagerModel);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdbAdapter.close();\n\n\t}",
"@Override\n\tpublic Map<String, Object> readAll() {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate)\n\t\t\t\t.withCatalogName(\"PKG_ALM_CRUD_PRODUNIDADMED\")\n\t\t\t\t.withProcedureName(\"PA_MAT_PRODUNIDADMED_LIS\")\t\n\t\t\t\t.declareParameters(new SqlOutParameter(\"uni\", OracleTypes\n\t\t\t\t.CURSOR, new ColumnMapRowMapper()));\n\t\treturn simpleJdbcCall.execute();\n\t}",
"@Test\r\n public void testRead() throws Exception {\r\n System.out.println(\"read\");\r\n int idbureau = 0;\r\n BureauDAO instance = new BureauDAO();\r\n instance.setConnection(dbConnect);\r\n Bureau obj = new Bureau(0,\"Test\",\"000000000\",\"\");\r\n Bureau expResult = instance.create(obj);\r\n idbureau=expResult.getIdbur();\r\n Bureau result = instance.read(idbureau);\r\n assertEquals(\"sigles différents\",expResult.getSigle(), result.getSigle());\r\n assertEquals(\"tel différents\",expResult.getTel(), result.getTel());\r\n //etc\r\n assertEquals(\"id différents\",expResult.getIdbur(),result.getIdbur());\r\n try{\r\n result=instance.read(0);\r\n fail(\"exception d'id inconnu non générée\");\r\n }\r\n catch(SQLException e){}\r\n instance.delete(result);\r\n }",
"@Override\n\tpublic Map<String, Object> read(int id) {\n\t\treturn rolDao.read(id);\n\t}",
"@Override\n public Database getDatabase() {\n return m_database;\n }",
"public Cursor getData(){\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor res = db.rawQuery(\"select * from \" + Table_name, null);\n return res;\n }",
"public List<Customer> read() {\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n ResultSet rest = null;\n List<Customer> customers = new ArrayList<>();\n try {\n ppst = conn.prepareStatement(\"SELECT * FROM customer\");\n rest = ppst.executeQuery();\n while (rest.next()) {\n Customer c = new Customer(\n rest.getInt(\"customer_key\"),\n rest.getString(\"name\"),\n rest.getString(\"id\"),\n rest.getString(\"phone\")\n );\n customers.add(c);\n }\n } catch (SQLException e) {\n throw new RuntimeException(\"Query error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst, rest);\n }\n return customers;\n }",
"@Override\n\tpublic Map<String, Object> read(String nombrec) {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate)\n\t\t\t\t.withProcedureName(\"pa_mat_produnidadmed_GetNomc\").withCatalogName(\"PKG_ALM_CRUD_PRODUNIDADMED\")\n\t\t\t\t.declareParameters(new SqlOutParameter(\"uni\",OracleTypes.CURSOR,new ColumnMapRowMapper()), new SqlParameter(\"p_nombrecorto\", Types.VARCHAR));\n\t\tSqlParameterSource in = new MapSqlParameterSource().addValue(\"p_nombrecorto\", nombrec);\n\t\treturn simpleJdbcCall.execute(in);\n\t}",
"public List<Aflevering> readAll() {\n List<Aflevering> lijst = new ArrayList<>();\n try {\n ResultSet rs = sqlConnection.executeSql(\"SELECT * FROM AFLEVERING\");\n while(rs.next()) {\n lijst.add(new Aflevering(rs.getString(\"ID\"),\n rs.getString(\"Serie\"),\n rs.getString(\"Seizoen\"),\n rs.getString(\"Titel\"),\n rs.getString(\"Tijdsduur\")));\n }\n }\n catch(Exception e) {\n System.out.println(e);\n }\n return lijst;\n }",
"@Override\n\tpublic Map<String, Object> read(int bno) throws Exception {\n\t\treturn boardDao.read(bno);\n\t}",
"T deserializeData(R r) throws SQLException;",
"public Cursor readAllData() {\n\n Cursor objCursor = readSQLite.query(TABLE_OFFICER, new String[]{COLUMN_ID_OFFICER, COLUMN_OFFICER, COLUMN_POSITION, COLUMN_IMAGE, COLUMN_VIDEO, COLUMN_SOUND}, null, null, null, null, null);\n\n if (objCursor != null) {\n objCursor.moveToFirst();\n }\n\n return objCursor;\n }",
"public ResultSet obtainDB() throws SQLException {\n Statement state = connection.createStatement();\n ResultSet resultSet = ((Statement) state).executeQuery(\"select * from criteriaSearchDB\");\n return resultSet;\n }",
"@Override\n public LogbookEntry loadInBackground() {\n this.database = this.databaseSchemaHelper.getReadableDatabase();\n return SchemaQueries.getLogbook(this.database);\n }",
"@GET\n @Path(\"/database/get\")\n public Response getDatabase() throws JsonGenerationException, JsonMappingException, IOException{\n return Response.status(200).entity(Json.newObjectMapper(true).writeValueAsString(Database2.get())).build();\n }",
"public List<Clientes> read(){\n Connection con = ConectionFactory.getConnection();\n PreparedStatement pst = null;\n ResultSet rs = null;\n \n List<Clientes> cliente = new ArrayList<>();\n \n try {\n pst = con.prepareStatement(\"SELECT * from clientes ORDER BY fantasia\");\n rs = pst.executeQuery();\n \n while (rs.next()) { \n Clientes clientes = new Clientes();\n clientes.setCodigo(rs.getInt(\"codigo\"));\n clientes.setFantasia(rs.getString(\"fantasia\"));\n clientes.setCep(rs.getString(\"cep\"));\n clientes.setUf(rs.getString(\"uf\"));\n clientes.setLogradouro(rs.getString(\"logradouro\"));\n clientes.setNr(rs.getString(\"nr\"));\n clientes.setCidade(rs.getString(\"cidade\"));\n clientes.setBairro(rs.getString(\"bairro\"));\n clientes.setContato(rs.getString(\"contato\"));\n clientes.setEmail(rs.getString(\"email\"));\n clientes.setFixo(rs.getString(\"fixo\"));\n clientes.setCelular(rs.getString(\"celular\"));\n clientes.setObs(rs.getString(\"obs\"));\n cliente.add(clientes); \n }\n } catch (SQLException ex) {\n \n }finally{\n ConectionFactory.closeConnection(con, pst, rs);\n }\n return cliente;\n}",
"String getDatabase();",
"private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}",
"Collection<Book> readAll();",
"@Override\r\n protected Cursor doInBackground(Long... params)\r\n {\r\n databaseConnector.open();\r\n \r\n // get a cursor containing all data on given entry\r\n return databaseConnector.getOneContact(params[0]);\r\n }",
"public static void test()\n\t{\n\t Environment myDbEnvironment = null;\n\t Database myDatabase = null;\n\n\t /* OPENING DB */\n\n\t // Open Database Environment or if not, create one.\n\t EnvironmentConfig envConfig = new EnvironmentConfig();\n\t envConfig.setAllowCreate(true);\n\t myDbEnvironment = new Environment(new File(\"db/\"), envConfig);\n\n\t // Open Database or if not, create one.\n\t DatabaseConfig dbConfig = new DatabaseConfig();\n\t dbConfig.setAllowCreate(true);\n\t dbConfig.setSortedDuplicates(true);\n\t myDatabase = myDbEnvironment.openDatabase(null, \"schema\", dbConfig);\n\n\t Cursor cursor = null;\n\t /* GET <K,V > FROM DB */\n\t DatabaseEntry foundKey = new DatabaseEntry();\n\t DatabaseEntry foundData = new DatabaseEntry();\n\n\t cursor = myDatabase.openCursor(null, null);\n\t cursor.getFirst(foundKey, foundData, LockMode.DEFAULT);\n\n\t do {\n\t try {\n\t String keyString = new String(foundKey.getData(), \"UTF-8\");\n\t String dataString = new String(foundData.getData(), \"UTF-8\");\n\t System.out.println(\"<\" + keyString + \", \" + dataString + \">\");\n\t } catch (UnsupportedEncodingException e) {\n\t e.printStackTrace();\n\t }\n\t } while (cursor.getNext(foundKey, foundData, LockMode.DEFAULT) == OperationStatus.SUCCESS);\n\t if (cursor != null) cursor.close();\n\t System.out.println(\"-----\");\n\t \n\t if (myDatabase != null) myDatabase.close();\n\t if (myDbEnvironment != null) myDbEnvironment.close();\n\t}",
"@Override\r\n\tpublic NoticeVO read(int no) {\n\t\treturn sqlSession.selectOne(namespace + \".read\", no);\r\n\t}",
"public Book read(int bookId){\n System.out.println(\"looking for Book with id \" + bookId);\n Book b = new Book();\n \n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jbook = new JSONObject(resultAttribute);\n\n if(jbook.getInt(\"idBOOK\") == bookId){\n b = new Book(jbook);\n break;\n }\n keyIterator.next(); \n }\n }\n catch(Exception ex){\n ex.printStackTrace();\n } \n return b;\n }",
"@Override\n\tpublic Usuario read(String nomuser) {\n\t\tString SQL = \"SELECT * FROM usuario WHERE username=?\";\n\t\treturn jdbc.queryForObject(SQL, new Object[] {nomuser}, new BeanPropertyRowMapper<Usuario>(Usuario.class));\n\n\t}",
"public Estado ReadEstado(int estadoID){\r\n SQLiteDatabase sqLiteDatabase = conn.getReadableDatabase();\r\n String query = \"select * from estados WHERE estadoID=?\";\r\n Cursor c= sqLiteDatabase.rawQuery(query, new String[]{String.valueOf(estadoID)});\r\n if (c.moveToFirst()) return new Estado(estadoID,c.getString(c.getColumnIndex(\"descripcion\")));\r\n return null;\r\n\r\n\r\n }",
"private static List<Exam> readWriteData() throws Exception \r\n\t{\n\t\t\r\n\t\tList<Exam> exams = examDao.queryForAll();\r\n\t\treturn exams;\r\n\t}",
"@Override\n public ResultSet getByID(String id) throws SQLException {\n return db.getConnection().createStatement().executeQuery(\"select * from comic where idcomic=\"+id);\n }",
"@Test\n public void test() throws SQLException {\n System.out.println(new MyDbutilsDemo().load(12));\n }",
"public static Alumni_data getAlumniData(int id)\n { \n List li=null; \n try{\n session=SessionFact.getSessionFact().openSession();\n li=session.createQuery(\"from Alumni_data where id=:id\").setInteger(\"id\", id).list();\n session.close();\n return (Alumni_data)li.get(0);\n }catch(Exception e){ out.print(\"Wait(AlumniCon.getAlumniData)\"); } \n return new Alumni_data();\n }",
"public Object get(ResultSet rs, String name) throws HibernateException, SQLException {\n Reader charReader = rs.getCharacterStream(name);\n\n // if the corresponding SQL value is NULL, the reader we got is NULL as well\n if (charReader == null || rs.wasNull()) return null;\n\n // Fetch Reader content up to the end - and put characters in a StringBuffer\n StringBuffer sbuf = new StringBuffer();\n try {\n char[] cbuf = new char[1024];\n for (int amountRead; (amountRead = charReader.read(cbuf)) != -1;) {\n sbuf.append(cbuf, 0, amountRead);\n }\n }\n catch (IOException ioe) {\n throw new HibernateException(\"IOException occurred reading text\", ioe);\n }\n finally {\n try {\n charReader.close();\n }\n catch (IOException e) {\n throw new HibernateException(\"IOException occurred closing stream\", e);\n }\n }\n\n // Return StringBuffer content as a large String\n return sbuf.toString();\n }",
"void all_Data_retrieve() {\n\t\tStatement stm=null;\n\t\tResultSet rs=null;\n\t\ttry{\n\t\t\t//Retrieve tuples by executing SQL command\n\t\t stm=con.createStatement();\n\t String sql=\"select * from \"+tableName+\" order by id desc\";\n\t\t rs=stm.executeQuery(sql);\n\t\t DataGUI.model.setRowCount(0);\n\t\t //Add rows to table model\n\t\t while (rs.next()) {\n Vector<Object> newRow = new Vector<Object>();\n //Add cells to each row\n for (int i = 1; i <=colNum; i++) \n newRow.addElement(rs.getObject(i));\n DataGUI.model.addRow(newRow);\n }//end of while\n\t\t //Catch SQL exception\n }catch (SQLException e ) {\n \te.printStackTrace();\n\t } finally {\n\t \ttry{\n\t if (stm != null) stm.close(); \n\t }\n\t \tcatch (SQLException e ) {\n\t \t\te.printStackTrace();\n\t\t }\n\t }\n\t}",
"protected abstract void retrievedata();",
"public abstract ODatabaseInternal<?> openDatabase();",
"@Override\n\tpublic List<Map<String, Object>> readAll() {\n\t\treturn rolDao.readAll();\n\t}",
"T readOne(int id);",
"@Override\n\tpublic Collection<Users> read() {\n\t\treturn userDAO.readAll();\n\t}",
"List<T> readAll();",
"public static MainDatabase deserializeDatabase() {\n MainDatabase data = new MainDatabase();\n // first check if the file exists\n File file = new File(Constants.SAVE_FILE);\n if (!file.exists()) {\n return data;\n }\n try (FileInputStream in = new FileInputStream(Constants.SAVE_FILE);\n BufferedInputStream reader = new BufferedInputStream(in)) {\n\n // un-encrypted header (salt and iv necessary for decryption)\n byte[] salt = new byte[reader.read()];\n reader.read(salt);\n byte[] iv = new byte[reader.read()];\n reader.read(iv);\n Cipher enc = getEncryptionCipher(salt, iv);\n\n try (CipherInputStream cis = new CipherInputStream(reader, enc);\n ObjectInputStream ois = new ObjectInputStream(cis)) {\n\n // if we need any settings, read them here\n\n // read the travel database\n int count = ois.readByte();\n for (int i = 0; i < count; i++) {\n int size = ois.readInt();\n for (int j = 0; j < size; j++) {\n data.addTravel((SingleTravel) ois.readObject());\n }\n }\n\n // read the user database\n count = ois.readInt();\n for (int i = 0; i < count; i++) {\n RegisteredUser ru = (RegisteredUser) ois.readObject();\n data.addUser(ru);\n\n int size = ois.readInt();\n for (int j = 0; j < size; j++) {\n int itSize = ois.readInt();\n // check the itinerary to make sure it is still valid\n boolean validItinerary = (itSize > 0);\n Itinerary it = new Itinerary();\n for (int k = 0; k < itSize; k++) {\n try {\n SingleTravel st = data.getTravel(TravelType.values()[ois.readByte()],\n ois.readUTF());\n if (st == null) { // doesn't exist; do not add itinerary\n validItinerary = false;\n } else {\n it.add(st);\n }\n } catch (IllegalArgumentException e) {\n validItinerary = false;\n // we don't need to log this -- probably a travel expired\n }\n }\n if (validItinerary) {\n ru.bookItinerary(it);\n }\n }\n }\n }\n } catch (IOException | GeneralSecurityException | ClassNotFoundException e) {\n log.log(Level.SEVERE, \"Error reading from file.\", e);\n }\n return data;\n }",
"@Override\n\tpublic Customer[] readAll() {\n\n\t\tString selectQuery = String.format(\"SELECT * FROM %s ;\", TABLE_NAME);\n\t\tCustomer[] result = null;\n\n\t\ttry (Statement s = dbCon.createStatement()) {\n\t\t\tResultSet rS = s.executeQuery(selectQuery);\n\n\t\t\tArrayList<Customer> resultTmp = new ArrayList<Customer>();\n\n\t\t\twhile (rS.next()) {\n\t\t\t\tresultTmp.add(\tresultTmp.size(),\n\t\t\t\t\t\t\t\tnew Customer(rS.getInt(COLUMN_NAME_ID),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_FIRST_NAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_LAST_NAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_EMAIL),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_KNICKNAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getDate(COLUMN_NAME_BIRTHDATE).toLocalDate(),\n\t\t\t\t\t\t\t\t\t\t\trS.getDouble(COLUMN_NAME_CREDITS))\n\t\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t\trS.close();\n\n\t\t\tresult = new Customer[resultTmp.size()];\n\t\t\tresultTmp.toArray(result);\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"An SQL error occured during retrieving all data from of customer table : \" + e.getMessage());\n\t\t}\n\n\t\treturn result;\n\t}",
"void getInfoFromDatabase(int categoryId, int questionId){\n\n\t\t\tDataBaseHelper myDbHelper = new DataBaseHelper(this\n\t\t\t\t\t.getApplicationContext());\n\t\t\tmyDbHelper = new DataBaseHelper(this);\n\n\t\t\ttry {\n\n\t\t\t\tmyDbHelper.createDataBase();\n\n\t\t\t} catch (IOException ioe) {\n\n\t\t\t\tthrow new Error(\"Unable to create database\");\n\n\t\t\t}\n\n\t\t\ttry {\n\n\t\t\t\tmyDbHelper.openDataBase();\n\t\t\t\tquestionFromDatabase = myDbHelper.getQuestion(categoryId, questionId);\n\t\t\t \n\t\t\t\tdisplayedQuestionFromDatabase = questionFromDatabase;\n\t\t\t\tSystem.out.println(\"questionFromDatabase = \" + questionFromDatabase);\n\t\t\t\tanswer1FromDatabase = myDbHelper.getCorrectAnswer(categoryId, questionId); //correct answer from database\n\t\t\t\tSystem.out.println(\"correct answer from db = \" + answer1FromDatabase );\n\t\t\t\tanswer2FromDatabase = myDbHelper.getWrongAnswer1(categoryId, questionId);\n\t\t\t\tanswer3FromDatabase = myDbHelper.getWrongAnswer2(categoryId, questionId);\n\t\t\t\tanswer4FromDatabase = myDbHelper.getWrongAnswer3(categoryId, questionId);\n\t\t\t\n\t\t\t\tmyDbHelper.close();\n\t\t\t\n\t\t\t} catch (SQLException sqle) {\n\t\t\t\tSystem.out.println(\"Errored out\");\n\t\t\t\ttry {\n\t\t\t\t\tthrow sqle;\n\t\t\t\t} catch (SQLException 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}\n\t\t\t\n\t \n\t }",
"private void readEntry(long Key)\n\t{\n\t\tString SQL = \"SELECT * FROM cd_songs \";\n\t\tSQL += \"WHERE ID = \" + Long.toString(Key);\n\t\t\n\t\tResultSet rSet = DBConnection.executeQuery(SQL);\n\t\t\n\t\tif (rSet == null) return;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\tif (rSet.next())\n\t\t\t{\n\t\t\t\t\n\t\t\t\t// The index of one ResultSet starts in 1 NOT IN 0 (DO NOT FORGET)\n\t\t\t\t// System.out.println(rSet.getString(\"Typ_Music\")); // Si funciona\n\t\t\t\t// System.out.println(rSet.getString(1)); \t\t // Si funciona\n\t\t\t\t// System.out.println(rSet.getNString(1)); \t\t\t// No funciona\n\t\t\t\t/* System.out.println(rSet.getString(2)); \n\t\t\t\t System.out.println(rSet.getString(3));\n\t\t\t\t System.out.println(rSet.getString(4));\n\t\t\t\t System.out.println(rSet.getString(5));\n\t\t\t\t System.out.println(rSet.getString(6)); */\n\t\t\t\t\n\t\t\t\t//tbID, tbTypMusic, tbAuthor, tbCD_Name, tbSong_Name, tbCountry\n\t\t\t\t\n\t\t\t\t tbID.setText(rSet.getString(\"ID\")); \t\t\t //funciona de ambas formas \"ID\" y con getInt(1).\n\t\t\t\t //tbID.setText(toString(rSet.getInt(1)));\n\t\t\t\t //tbID.setText(String.valueOf(rSet.getInt(0)));\n\t\t\t\t\n\t\t\t\t tbTypMusic.setText(rSet.getString(2));\n\t\t\t\t //tbTypMusic.setText(rSet.getString(\"Typ_Music\")); //funciona\n\t\t\t\t\n\t\t\t\t tbAuthor.setText(rSet.getString(3));\n\t\t\t\t tbCD_Name.setText(rSet.getString(4));\n\t\t\t\t tbSong_Name.setText(rSet.getString(5));\n\t\t\t\t tbCountry.setText(rSet.getString(6));\n\t\t\t\t\n\t\t\t\trSet.close();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Der Datensatz konnte nicht gefunden werden\", \"Datensatz lesen\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\tthis.mKey = -1;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch (Exception ex) {}\n\t\t\n\t\t//hasChanged = true;\n\t\t\n\t}",
"private void readDB(){\n Cursor c = myDb.getRow(date, dayOfWeek);\n String message=\"\";\n\n if (c.moveToFirst()) {\n do {\n // Process the data:\n int id = c.getInt(DBAdapter.COL_ROWID);\n String title = c.getString(DBAdapter.COL_TITLE);\n String location = c.getString(DBAdapter.COL_LOC);\n String stime = c.getString(DBAdapter.COL_STIME);\n String etime = c.getString(DBAdapter.COL_ETIME);\n\n String date = c.getString(DBAdapter.COL_DATE);\n\n int day = c.getInt(DBAdapter.COL_DAY);\n\n\n // Append data to the message:\n message += \"id=\" + id\n + \", title =\" + title\n + \", Date =\" + date\n + \", From =\" + stime\n + \", To=\" + etime\n + \"\\n\";\n if (date != null) {\n dailySchedule.add(new ScheduleItems(title,location,stime, etime,date, false));\n } else {\n dailySchedule.add(new ScheduleItems(title,location,stime, etime, dayToString(day), true));\n }\n\n } while (c.moveToNext());\n }\n\n if(dailySchedule.isEmpty()){\n ArrayList<String> temp = new ArrayList<String>();\n temp.add(\"There are no Events today\");\n ArrayAdapter<String> tempAdapter = new ArrayAdapter<>(getApplication(), android.R.layout.simple_list_item_1, temp);\n scheduleList.setAdapter(tempAdapter);\n scheduleList.setBackgroundColor(Color.BLACK);\n } else {\n ScheduleItemAdapter adapter = new ScheduleItemAdapter(getApplicationContext(),dailySchedule);\n scheduleList.setAdapter(adapter);\n }\n }",
"private void setRead() {\n db = handler.getReadableDatabase();\n }",
"public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }",
"public String getDBString();",
"@Override\n\tpublic List<Libro> readAll() {\n\t\treturn libroDao.readAll();\n\t}"
] |
[
"0.6975258",
"0.6937948",
"0.69209707",
"0.68505716",
"0.6821903",
"0.67159295",
"0.6612302",
"0.65634215",
"0.65026367",
"0.648982",
"0.6479548",
"0.64654714",
"0.63859063",
"0.6371562",
"0.63461995",
"0.62737066",
"0.6245345",
"0.62343174",
"0.6232838",
"0.618879",
"0.61579895",
"0.6151557",
"0.61469936",
"0.6141981",
"0.6135388",
"0.6102164",
"0.6099787",
"0.609788",
"0.60809356",
"0.6073077",
"0.6068573",
"0.6010288",
"0.6002914",
"0.5941886",
"0.5931653",
"0.59199923",
"0.5911148",
"0.5903215",
"0.5901297",
"0.5897881",
"0.5894648",
"0.5877459",
"0.587186",
"0.5858129",
"0.5856799",
"0.5834032",
"0.58238333",
"0.5810169",
"0.58026564",
"0.57997155",
"0.5799023",
"0.5788804",
"0.57834274",
"0.5779837",
"0.57788706",
"0.5777765",
"0.57772887",
"0.5774095",
"0.5760013",
"0.5746308",
"0.5746285",
"0.5745474",
"0.5742762",
"0.5717733",
"0.5700988",
"0.5693624",
"0.5691891",
"0.5689024",
"0.56786084",
"0.56633496",
"0.56631315",
"0.5653481",
"0.5644603",
"0.56439674",
"0.56410265",
"0.5640729",
"0.5640447",
"0.56376255",
"0.5630079",
"0.5622363",
"0.561743",
"0.5617071",
"0.5612954",
"0.56126815",
"0.56104875",
"0.5609956",
"0.5608134",
"0.5605419",
"0.56052834",
"0.56049144",
"0.55916226",
"0.55891937",
"0.55861926",
"0.5575795",
"0.55680114",
"0.5567717",
"0.5566802",
"0.5560469",
"0.5547453",
"0.5546914",
"0.55403584"
] |
0.0
|
-1
|
Method to delete a booking
|
void registerDeleteBooking(Booking b) {
if (!newBooking.contains(b)
&& !modifiedBooking.contains(b)
&& !deleteBooking.contains(b)) {
deleteBooking.add(b);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void deleteBookingById(BookingKey bookingKey);",
"public void delete() {\n\t\tTimelineUpdater timelineUpdater = TimelineUpdater.getCurrentInstance(\":mainForm:timeline\");\n\t\tmodel.delete(event, timelineUpdater);\n\n\t\tFacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"The booking \" + getRoom() + \" has been deleted\", null);\n\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t}",
"void deleteBooking(int detail_id) throws DataAccessException;",
"private void deleteEmployeeBooking() {\n BookingModel bookingModel1 = new BookingModel();\n try {\n bookingModel1.deleteBooking(employeeID);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }",
"@RequestMapping(\"/delete\")\n\tpublic String delete(@RequestParam Long bookingId) {\n\t\tbookingRepository.delete(bookingId);\n\t return \"booking #\"+bookingId+\" deleted successfully\";\n\t}",
"void deleteconBooking(int confirm_id) throws DataAccessException;",
"@Override\r\n\tpublic boolean deleteBooking(Booking_IF bk) {\r\n\t\tPreparedStatement myStatement = null;\r\n\t\tString query = null;\r\n\t\tint count = 0;\r\n\t\ttry{\r\n\t\t\tquery = \"delete from Booking where Shift_ID = ? AND User_ID = ?\";\r\n\t\t\tmyStatement = myCon.prepareStatement(query);\r\n\t\t\tmyStatement.setInt(1, bk.getShiftid());\r\n\t\t\tmyStatement.setInt(2, bk.getUserid());\r\n\t\t\tcount = myStatement.executeUpdate();\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\ttry {\r\n\t\t\t\tif (myStatement != null)\r\n\t\t\t\t\tmyStatement.close();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(count!=1){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"@FXML\n void deleteBooking(ActionEvent event) throws IOException, ClassNotFoundException {\n Booking selectedBooking = table.getSelectionModel().getSelectedItem();\n if (selectedBooking != null) {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Delete booking\");\n alert.setHeaderText(\"This will delete the booking permanently\");\n alert.setContentText(\"Are you sure you want to do this?\");\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.OK) {\n for (Ticket ticket:selectedBooking.getTickets()) {\n for (Showing showing:Main.getShowings().getShowings()) {\n if (showing.getFilm().getTitle().equals(ticket.getShowing().getFilm().getTitle())&&showing.getShowingTimeFormatted().equals(ticket.getShowing().getShowingTimeFormatted())&&showing.getShowingDateFormatted(false).equals(showing.getShowingDateFormatted(false))) {\n String row = ticket.getSeat().getRowLetter();\n int number = ticket.getSeat().getSeatNumber();\n showing.getSeat(row, number).setBookingStatus(false);\n }\n }\n }\n Main.getBookings().removeBooking(selectedBooking);\n populateTableView();\n Main.getBookings().saveBookings();\n Main.getShowings().saveShowings();\n }\n }\n }",
"public void deleteBookingEntry(int itineraryToBeUpdated, String bookingToBeDeleted) throws SQLException, ItineraryNotFoundException, BookingNotFoundException {\n var statement = connection.prepareStatement(\"SELECT bookings FROM itinerary WHERE identifier = ?\");\n statement.setInt(1, itineraryToBeUpdated);\n var result = statement.executeQuery();\n String bookingIds;\n\n if (result.next()) {\n bookingIds = result.getString(\"bookings\");\n } else {\n throw new ItineraryNotFoundException();\n }\n\n //If the given booking id is present in the itinerary, delete the booking from bookings Repository and save new BookingIds String\n List<String> updatedBookingIds = new ArrayList<>();\n for(String bookingId: bookingIds.split(\",\")) {\n if(bookingId.compareTo(bookingToBeDeleted) == 0) {\n String booking_conf[] = bookingId.split(\"-\");\n if(booking_conf[0].compareTo(\"Air\") == 0)\n bookingsRepository.delete_air_booking(Integer.parseInt(booking_conf[1]));\n else\n bookingsRepository.delete_hotel_booking(Integer.parseInt(booking_conf[1]));\n } else {\n updatedBookingIds.add(bookingId);\n }\n }\n\n //If no bookings left in the itinerary delete it, otherwise update itinerary with new BookingIds String\n if (updatedBookingIds.size() == 0) {\n delete(itineraryToBeUpdated);\n } else {\n update(itineraryToBeUpdated, String.join(\",\",updatedBookingIds));\n }\n }",
"void deleteReservation(int id) throws DataAccessException;",
"void delete(Book book);",
"@Override\n\tpublic void deleteBook() {\n\t\t\n\t}",
"private void deleteBook() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Delete the book only if mBookId matches DEFAULT_BOOK_ID\n if (mBookId != DEFAULT_BOOK_ID) {\n bookEntry.setId(mBookId);\n mDb.bookDao().deleteBook(bookEntry);\n }\n finish();\n }\n });\n\n }",
"@Override\n\tpublic int deleteTicket(Booking_ticket bt) {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic boolean cancelSeat(int bookingId) {\n\t\tSession session = factory.getCurrentSession();\n\t\tQuery query = session\n\t\t\t\t.createQuery(\"delete from Booking b where b.bookingId=\" + bookingId + \"\");\n\t\tint i = query.executeUpdate();\n\t\t//System.out.println(\"status change\");\n\t\treturn true;\n\t}",
"@RequestMapping(value = \"/Reservation/{reservation_reservationId}\", method = RequestMethod.DELETE)\n\t@ResponseBody\n\tpublic void deleteReservation(@PathVariable Integer reservation_reservationId) {\n\t\tReservation reservation = reservationDAO.findReservationByPrimaryKey(reservation_reservationId);\n\t\treservationService.deleteReservation(reservation);\n\t}",
"int deleteByPrimaryKey(String bookId);",
"@GetMapping(\"/trip/{id}/reservation/delete/{reservationID}\")\n public String deleteReservation(@PathVariable(\"id\") long id, \n \t\t@PathVariable(\"reservationID\") long reservationID, Model model) {\n\n \tservice.delete(id, reservationID);\n \n return \"redirect:/trip/\" + id;\n }",
"public void delete() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.delete(this);\r\n\t}",
"public void delete(Book book){\n try{\n String query = \"DELETE FROM testdb.book WHERE id=\" + book.getId();\n DbConnection.update(query);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }",
"@Test(expected = ReservationNotFoundException.class)\n\tpublic void testDeleteReservation() throws ReservationNotFoundException {\n\t\t// TODO: add a second res that sould be let untouched\n\t\tReservation res1 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), validStartDate,\n\t\t\t\tvalidEndDate);\n\t\tassertNotNull(res1.getId());\n\t\tString id = res1.getId();\n\t\tbookingManagement.deleteReservation(res1.getId());\n\n\t\tres1 = bookingManagement.getReservation(id);\n\t\tassertTrue(res1 == null);\n\t}",
"void cancelReservation(String reservationId) throws ObjectNotFoundException;",
"@Test\n @DisplayName(\"Testataan tilausten poisto tietokannasta\")\n void deleteReservation() {\n TablesEntity table = new TablesEntity();\n table.setSeats(2);\n tablesDao.createTable(table);\n\n ReservationsEntity reservation = new ReservationsEntity(\"Antero\", \"10073819\", new Date(System.currentTimeMillis()), table.getId(), new Time(1000), new Time(2000));\n reservationsDao.createReservation(reservation);\n\n // Confirm that the reservation is in DB\n ReservationsEntity reservationFromDb = reservationsDao.getReservation(reservation.getId());\n assertEquals(reservation, reservationFromDb);\n\n // Delete reservation and confirm that it's not in the DB\n reservationsDao.deleteReservation(reservation);\n\n reservationFromDb = reservationsDao.getReservation(reservation.getId());\n assertEquals(null, reservationFromDb);\n\n }",
"@Override\r\n\tpublic int deleteBook(int book_id) {\n\t\treturn 0;\r\n\t}",
"public void deleteFutureBooking(Booking booking)\n throws NoBookingsException, NotAFutureBookingException, NoFutureBookingsException, SeatNotFoundException {\n profile.deleteFutureBooking(currentUser, booking);\n }",
"private void deleteBooking() \n {\n Scanner memberID=new Scanner(System.in);\n System.out.println(\"Please enter your member number: \");\n int memberId = memberID.nextInt();\n \n Member mem = sportsClub.searchMember(memberId);\n if(mem==null || mem.getBookings()==null)\n {\n System.out.println(\"Sorry! There are no members with the given ID. \");\n\n \n\n }\n else\n {\n for(Booking b : mem.getBookings())//Displays the member details n bookings\n {\n System.out.println(\"Booking Id : \" + b.hashCode()+ \" Booking made by \"+mem.getMemberName() +\" for \" + b.getBookingDate() + \" at \" + b.getBookingTime() + \" for \" + b.getBookingEndTime() + \" minutes on Court number \" + b.getCourt().getCourtId());\n\n }\n \n if(mem.getBookings().size()!=0)\n {\n Scanner inputID=new Scanner(System.in);\n System.out.println(\"Enter Booking ID: \");\n int input = inputID.nextInt();\n Iterator<Booking> itr = mem.getBookings().iterator();\n\n\n while(itr.hasNext())//delettion starts based on the ID\n { \n if(itr.next().hashCode() == input)\n {\n itr.remove();\n for(String str : mem.getSportsPlayed())\n {\n Sport sportObj = sportsClub.findSport(str);\n\n ArrayList<Court> itrCourt = sportObj.getCourtList();\n for(Court c : itrCourt)//finds the court\n {\n\n Iterator<Booking> itrBooking = c.getCourtBookings().iterator();\n while(itrBooking.hasNext())//helps to get the booking object\n {\n if(itrBooking.next().hashCode() == input)\n {\n itrBooking.remove();//removes the booking object\n System.out.println(\"Deleted Successfully\");\n }\n } \n } \n } \n }\n }\n }\n }\n\n\n\n }",
"@Override\r\n\tpublic void deletebook(int seq) {\n\t\tsqlSession.delete(ns + \"deletebook\", seq);\r\n\t}",
"public void delete(Appointment appointment) {\n\t\tappointmentDao.delete(appointment);\n\t}",
"public void deleteRoom(Room room);",
"public void delete(int singerId);",
"public void deleteEntry(String book1)\n{\n}",
"int deleteByPrimaryKey(Long integralBookId);",
"void deleteAveria(Long idAveria) throws BusinessException;",
"@Override\n\tpublic void deleteBourse(Bourse brs) {\n\t\t\n\t}",
"@Override\r\n public void delete(Appointment a) throws SQLException {\r\n int id = a.getAppointmentId();\r\n String statement = \"DELETE FROM appointments WHERE Appointment_ID =\" + id + \";\";\r\n System.out.println(statement);\r\n conn.prepareStatement(statement).executeUpdate();\r\n }",
"@Override\n\tpublic Response deleteOrder(BookDeleteRequest request) {\n\t\treturn null;\n\t}",
"private void deleteBook() {\n // Only perform the delete if this is an existing book.\n if (currentBookUri != null) {\n // Delete an existing book.\n int rowsDeleted = getContentResolver().delete(currentBookUri, null,\n null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, R.string.delete_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful, display a toast.\n Toast.makeText(this, R.string.delete_successful, Toast.LENGTH_SHORT).show();\n }\n }\n // Exit the activity.\n finish();\n }",
"@DeleteMapping(\"/delete/{id}\")\n public void deleteBookById(@PathVariable(\"id\") Long id) throws BookNotFoundException {\n bookService.deleteBookById(id);\n }",
"@Override\n public void deleteHotel(String hotelId) {\n Optional<Hotel> optionalHotel = hotelRepository.findByHotelId(hotelId);\n Hotel hotel = optionalHotel.orElseThrow(() -> {\n logger.error(\"Hotel information not found | hotelId:{}\", hotelId);\n return new BookingServiceException(\"Hotel information not found | hotelId:\" + hotelId);\n });\n if (hotel.isDeleted()) {\n logger.info(\"Hotel is inactive | hotelId:{}\", hotelId);\n throw new BookingServiceException(\"Hotel is inactive | hotelId:\" + hotelId);\n }\n hotel.setDeleted(true);\n Date lastModifiedDate = new Date();\n hotel.setLastModifiedDate(lastModifiedDate);\n hotelRepository.save(hotel);\n\n List<Room> rooms = hotel.getRooms();\n if (rooms != null && rooms.size() > 0) {\n List<Room> roomList = rooms.stream()\n .filter(room -> !room.isDeleted())\n .peek(room -> {\n room.setDeleted(true);\n room.setLastModifiedDate(lastModifiedDate);\n })\n .collect(Collectors.toList());\n roomRepository.saveAll(roomList);\n }\n logger.info(\"Deleted hotel information successfully | hotelId:{}\", hotelId);\n }",
"@RequestMapping(path = \"/{appointmentId}\", method = RequestMethod.DELETE)\n\t@ResponseStatus(HttpStatus.OK)\n\tvoid deleteById(@PathVariable Long appointmentId) {\n\t\tappointmentService.deleteById(appointmentId);\n\t}",
"@DeleteMapping(\"/{id}\")\t\n\t@ApiOperation(value = \"Delete reservation\", notes = \"Service to delete a reservation\")\n\t@ApiResponses(value = {\n\t\t\t@ApiResponse(code = 200, message = \"Reservation deleted\"),\n\t\t\t@ApiResponse(code = 404, message = \"Reservation not found\"),\n\t\t\t@ApiResponse(code = 400, message = \"Bad request\")\n\t})\n\tpublic ResponseEntity<?> delete(@PathVariable(\"id\")int id){\n\t\tResponseEntity<?> response;\n\t\tReservation reservation = reservationService.get(id);\n\t\tif(reservation==null) {\n\t\t\tMap<String,String> errors = new HashMap<>();\n\t\t\terrors.put(\"Errors\", \"The reservation does not exist\");\n\t\t\tresponse = new ResponseEntity<>(errors,HttpStatus.NOT_FOUND);\n\t\t}else {\n\t\t\treservationService.delete(reservation);\n\t\t\tReservationDTO reservationDTO = new ReservationDTO(reservation);\n\t\t\tresponse = new ResponseEntity<>(reservationDTO,HttpStatus.OK);\n\t\t}\n\t\treturn response;\n\t}",
"public abstract void deleteAPriceBook(String priceBookName);",
"@RequestMapping(value = \"/delete/{bookId}\", method = RequestMethod.GET)\n\tpublic @ResponseBody()\n\tStatus deleteEmployee(@PathVariable(\"bookId\") long bookId) {\n\t\ttry {\n\t\t\tbookService.deleteBook(bookId);;\n\t\t\treturn new Status(1, \"book deleted Successfully !\");\n\t\t} catch (Exception e) {\n\t\t\treturn new Status(0, e.toString());\n\t\t}\n\t}",
"private void deleteBook() {\n if (currentBookUri != null) {\n int rowsDeleted = getContentResolver().delete(currentBookUri, null, null);\n\n // Confirmation or failure message on whether row was deleted from database\n if (rowsDeleted == 0)\n Toast.makeText(this, R.string.editor_activity_book_deleted_error, Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(this, R.string.editor_activity_book_deleted, Toast.LENGTH_SHORT).show();\n }\n finish();\n }",
"int deleteByExample(SrHotelRoomInfoExample example);",
"@RequestMapping(\"/hotel/delete/{id}\")\r\n public String deleteTrip(@PathVariable(\"id\") String hotelId) {\r\n Long idhotel = Long.parseLong(hotelId);\r\n this.hotel.removeById(idhotel);\r\n\r\n return \"redirect:/hotel/list\";\r\n }",
"public void deleteDepartmentByDeptNo(int dept_no);",
"int deleteByPrimaryKey(String bscid, Date day, Integer hour);",
"@Override\n\tpublic int deleteBook(int bookID) {\n\t\treturn 0;\n\t}",
"public void deleteByVaiTroID(long vaiTroId);",
"@DeleteMapping(\"/book\")\n public ResponseEntity<?> delete(@RequestBody Book book) {\n bookService.delete(book);\n return ResponseEntity.ok().body(\"Book has been deleted successfully.\");\n }",
"public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }",
"@Override\n\tpublic void delete(Integer deptno) {\n\t\t\n\t}",
"void delete( String officeCode );",
"public void deleteBook(int num)\n { \n bookList.remove(num); \n }",
"int deleteByPrimaryKey(Integer deliveryid);",
"int delWayBillByIdTravel(Long id_travel);",
"void deleteVehicle(String vehicleID);",
"@RequestMapping(\"/book/delete/{id}\")\n public String delete(@PathVariable Long id){\n bookService.deleteBook(id);\n return \"redirect:/books\";\n }",
"public void delete(String book_id){\n\t\tmap.remove(book_id);\n\t\t\n\t}",
"@Test\n public void deleteHouseholdUsingDeleteTest() throws ApiException {\n UUID householdId = null;\n api.deleteHouseholdUsingDelete(householdId);\n\n // TODO: test validations\n }",
"int delWayBillById(Long id_wayBill) throws WayBillNotFoundException;",
"public void deleteEquipoComunidad(EquipoComunidad equipoComunidad);",
"@Override\n\tpublic boolean deleteBook(int idBook) throws DAOException {\n\t\treturn false;\n\t}",
"@Override\n\tpublic void delete(Room t) {\n\t\t\n\t}",
"int deleteByPrimaryKey(String repaymentId);",
"void delete(ShoppingBasket shoppingBasket);",
"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 }",
"public void deleteFutureBooking(Customer customer, Booking booking)\n throws NoBookingsException, NotAFutureBookingException, NoFutureBookingsException, SeatNotFoundException {\n profile.deleteFutureBooking(customer, booking);\n }",
"@Override\n public HotelResponseDTO deleteRoom(String hotelId, String roomId) {\n Optional<Hotel> optionalHotel = hotelRepository.findByHotelId(hotelId);\n Hotel hotel = optionalHotel.orElseThrow(() -> {\n logger.error(\"Hotel information not found | hotelId:{}\", hotelId);\n return new BookingServiceException(\"Hotel information not found | hotelId:\" + hotelId);\n });\n if (hotel.isDeleted()) {\n logger.info(\"Hotel is inactive | hotelId:{}\", hotelId);\n throw new BookingServiceException(\"Hotel is inactive | hotelId:\" + hotelId);\n }\n Optional<Room> optionalRoom = roomRepository.findByRoomIdAndHotel(roomId, hotel);\n Room room = optionalRoom.orElseThrow(() -> {\n logger.error(\"Hotel room information not found | hotelId:{},roomId:{}\", hotelId, roomId);\n return new BookingServiceException(\"Hotel room information not found | hotelId:\" + hotelId + \",roomId:\" + roomId);\n });\n if (room.isDeleted()) {\n logger.info(\"Hotel room is inactive | hotelId:{}\", hotelId);\n throw new BookingServiceException(\"Hotel room is inactive | hotelId:\" + hotelId);\n }\n room.setDeleted(true);\n Date lastModifiedDate = new Date();\n room.setLastModifiedDate(lastModifiedDate);\n roomRepository.save(room);\n logger.info(\"Deleted hotel room information successfully | hotelId:{},roomId:{}\", hotelId, roomId);\n return makeHotelResponseDTO(hotel);\n }",
"@Override\n\tpublic void delete(String id) {\n\t\tString query=\"Delete from Book Where id='\"+id+\"'\";\n\t\texecuteQuery(query);\n\t\tnotifyAllObservers();\n\t\t\n\t}",
"void deleteEvent(Long id);",
"public void delete(){\r\n\r\n }",
"void deleteDoctor(Doctor target);",
"int deleteByPrimaryKey(String calendardate);",
"int delTravelById(Long id_travel) throws TravelNotFoundException;",
"@Delete\n void deleteEggDaily(EggDaily eggDaily);",
"@DeleteMapping(\"/{hotelId}\")\n public ResponseEntity<Void> deleteHotelWithId(@PathVariable Long hotelId){\n hotelService.deleteHotelById(hotelId);\n return new ResponseEntity<>(HttpStatus.OK);\n }",
"@Override\n\tpublic void delete(BatimentoCardiaco t) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(Clocking clocking) {\n\t\tclockingDao.delete(clocking);\n\t}",
"public void deleteEmp(int empno) {\n\t\t\n\t}",
"@Test(expected = IllegalArgumentException.class)\n\tpublic void testDeleteReservationWithNullID() throws Exception {\n\t\tbookingManagement.deleteReservation(null);\n\t}",
"@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tdeleteBook(position);\n\t\t\t\t\tcandelete =-1;\n\t\t\t\t}",
"@Override\n public void deleteBeanDetails(TimeSheet t)\n {\n \n }",
"public void delete(HrJBorrowcontract entity);",
"public void delete(int id);",
"public boolean destroyBooking(String name) {\n\t\t\tint i = 0;\r\n\t\t\tBooking buff = null;\r\n\t\t\t\r\n\t\t\twhile(i < Bookings.size()) {\r\n\t\t\t\tbuff = Bookings.get(i);\r\n\t\t\t\tif(name.contentEquals(buff.getBooker())) {\r\n\t\t\t\t\tBookings.remove(buff);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}",
"@DeleteMapping(\"/sys-appointments/{id}\")\n @Timed\n public ResponseEntity<Void> deleteSysAppointment(@PathVariable Long id) {\n log.debug(\"REST request to delete SysAppointment : {}\", id);\n sysAppointmentService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"public void onClick(DialogInterface dialog, int id) {\n deleteBook();\n }",
"public void onClick(DialogInterface dialog, int id) {\n deleteBook();\n }",
"@GetMapping(\"/deleteBook\")\n public String deleteBook(@RequestParam(\"id\") int id, Model model){\n bookService.deleteBook(id);\n return \"redirect:/1\";\n }",
"@RequestMapping(value = \"/deleteBook/{id}\", method = RequestMethod.DELETE)\r\n public ResponseEntity<?> delete(@PathVariable(\"id\") long id) throws Exception{\r\n\t ProducerTemplate pt = camelContext.createProducerTemplate();\r\n\t String destination = \"direct:cm.delete\";\r\n\t\tSystem.out.println(\"Send message to \" + destination);\r\n\t\tpt.sendBody(destination, id);\r\n\t\t\r\n return ResponseEntity.ok().body(\"Book has been deleted successfully.\");\r\n }",
"@Override\n\tpublic void delete(BookInfoVO vo) {\n\t\tbookInfoDao.delete(vo);\n\t}",
"Boolean deleteRoom(String roomId);",
"public void delete() {\n\n }",
"@DELETE\n public void delete() {\n try {\n dao.delete(dao.retrieveById(id));\n } catch (EntityInUse eiu) {\n throw new WebApplicationException(WSUtils.buildError(400, EntityInUse.ERROR_MESSAGE));\n }\n }",
"public void DeleteCust(String id);",
"public void delete();",
"public void delete();",
"public void delete();"
] |
[
"0.8501494",
"0.7698926",
"0.76980764",
"0.76776695",
"0.7582282",
"0.72507024",
"0.7092658",
"0.68869126",
"0.6874266",
"0.6788169",
"0.67819935",
"0.67732465",
"0.6762764",
"0.6720217",
"0.66405696",
"0.6575377",
"0.65701175",
"0.65494245",
"0.65307534",
"0.6512112",
"0.6502711",
"0.64737725",
"0.6455497",
"0.6453086",
"0.6445738",
"0.6433452",
"0.642405",
"0.6392197",
"0.63907164",
"0.6381375",
"0.6355903",
"0.63499856",
"0.63225466",
"0.63207054",
"0.63135767",
"0.6306193",
"0.62921494",
"0.6284515",
"0.62409824",
"0.6234199",
"0.6210841",
"0.61992157",
"0.6186103",
"0.61839664",
"0.6182554",
"0.6178212",
"0.6162788",
"0.61440164",
"0.61354315",
"0.6109228",
"0.6102451",
"0.6097953",
"0.60861635",
"0.6065503",
"0.6062537",
"0.6058829",
"0.60526943",
"0.60500264",
"0.6038488",
"0.60143495",
"0.6013583",
"0.601146",
"0.60072124",
"0.5993551",
"0.5969473",
"0.5968175",
"0.5959612",
"0.59551144",
"0.5952558",
"0.59448034",
"0.59447956",
"0.5944502",
"0.5939618",
"0.5919013",
"0.5914713",
"0.5902242",
"0.58994794",
"0.5884971",
"0.5883908",
"0.58798915",
"0.58748335",
"0.5865177",
"0.5857954",
"0.58557",
"0.58488005",
"0.58432496",
"0.583387",
"0.58332694",
"0.5832125",
"0.5832125",
"0.5826022",
"0.58241",
"0.5821919",
"0.58216894",
"0.58106804",
"0.58106196",
"0.5808985",
"0.58087975",
"0.58087975",
"0.58087975"
] |
0.5925296
|
73
|
Method to get the list of rooms.
|
public ArrayList getRoomsList(String arrival, String departure, Connection con) {
ArrayList r = null;
try {
r = new BookingMapper().getRoomsList(arrival, departure, con);
} catch (Exception e) {
System.out.println("fail in UnitOfWork - getRoomsList");
System.err.println(e);
}
return r;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public List<Room> getRooms() {\n return rooms;\n }",
"@GetMapping(path = \"/rooms\")\n public List<Room> findAllRooms() {\n return new ArrayList<>(roomService.findAllRooms());\n }",
"public ArrayList<Room> getRooms() {\n return rooms;\n }",
"public List<Room> findAllRooms();",
"@Override\n\tpublic List<RoomInterface> getRooms() {\n\t\treturn rooms;\n\t}",
"public ArrayList getRooms();",
"@GET\n @Produces(\"application/json\")\n public static List<CRoom> roomAll() {\n return (List<CRoom>) sCrudRoom.findWithNamedQuery(CRoom.FIND_ROOM_BY_ALL);\n }",
"@GetMapping\n public RoomsDto getRooms() {\n return roomsFacade.findRooms();\n }",
"public Set<Room> getRooms() {\n return rooms;\n }",
"public List<Room> showAllRoom() {\r\n\t\t\r\n\t\tif(userService.adminLogIn|| userService.loggedIn) {\r\n\t\t\tList<Room> list = new ArrayList<>();\r\n\t\t\troomRepository.findAll().forEach(list::add);\r\n\t\t\treturn list;\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\r\n\t}",
"@Override\n\tpublic List<Room> getAll() {\n\t\tArrayList<Room> list = new ArrayList<>();\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tStatement st = cn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM room\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tlist.add(new Room(rs.getInt(1), rs.getInt(2)));\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t\treturn new ArrayList<Room>();\n\t}",
"Collection<Room> getRooms() throws DataAccessException;",
"public ResultSet getAllRooms() {\r\n\r\n try {\r\n\r\n SQL = \"SELECT * FROM ROOMS;\";\r\n rs = stmt.executeQuery(SQL);\r\n return rs;\r\n\r\n } catch (SQLException err) {\r\n\r\n System.out.println(err.getMessage());\r\n return null;\r\n\r\n }\r\n\r\n }",
"public ArrayList<RoomList> getRoomList() {\r\n return RoomList;\r\n }",
"public List<Room> getRooms(){\n ArrayList<Room> returnedList = (ArrayList<Room>) rooms;\n return (ArrayList<Room>) returnedList.clone();\n }",
"public ArrayList<CalendarRoom> getRooms(String sType) throws IllegalStateException, JiBXException, IOException {\r\n\r\n\tif (null==sSecurityToken) throw new IllegalStateException(\"Not connected to calendar service\");\r\n\r\n\tCalendarResponse oResponse = CalendarResponse.get(sBaseURL+\"?command=getRooms&token=\"+sSecurityToken+\"&type=\"+sType);\r\n \r\n iErrCode = oResponse.code;\r\n sErrMsg = oResponse.error;\r\n\r\n if (iErrCode==0) {\r\n return oResponse.oRooms;\r\n } else {\r\n return null;\r\n }\r\n }",
"public List<Room> selectAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\treturn session.createCriteria(Room.class).list();\n\n\t}",
"@Override\n public List<Room> findAll() {\n return roomRepository.findAll();\n }",
"@Transactional\r\n\tpublic List<Room> getAllRooms(){\r\n\t\tList<Room> list= new ArrayList<Room>();\r\n\t\tIterable<Room> iterable= this.roomRepository.findAll();\r\n\t\tfor(Room room: iterable)\tlist.add(room);\r\n\t\treturn list;\r\n\t}",
"@Override\n public List<Room> findAllRooms() throws AppException {\n log.info(\"RoomDAO#findAllRooms(-)\");\n Connection con = null;\n List<Room> rooms;\n try {\n con = DataSource.getConnection();\n rooms = new ArrayList<>(findAllRooms(con));\n con.commit();\n } catch (SQLException e) {\n rollback(con);\n log.error(\"Problem at findAllRooms(no param)\", e);\n throw new AppException(\"Can not find all rooms, try again\");\n } finally {\n close(con);\n }\n return rooms;\n }",
"public List<Room> getCurrentRooms() {\n return currentRooms;\n }",
"public Rooms getRooms(int i) {\n\t\t\tRooms buff = RoomDetails.get(i);\r\n\t\t\treturn buff;\r\n\t\t}",
"@GetMapping(\"/listRoom\")\r\n\tpublic String listRooms(Model theModel) {\n\t\tList<Room> theRooms = roomService.findAll();\r\n\t\t\r\n\t\t// add to the spring model\r\n\t\ttheModel.addAttribute(\"rooms\", theRooms);\r\n\t\t\r\n\t\treturn \"/rooms/list-rooms\";\r\n\t}",
"private ArrayList<Room> createRooms() {\n //Adding starting position, always rooms(index0)\n\n rooms.add(new Room(\n \"Du sidder på dit kontor. Du kigger på uret og opdager, at du er sent på den. WTF! FISKEDAG! Bare der er fiskefilet tilbage, når du når kantinen. Du må hellere finde en vej ud herfra og hen til kantinen.\",\n false,\n null,\n null\n ));\n\n //Adding offices to <>officerooms, randomly placed later \n officeRooms.add(new Room(\n \"Du bliver kort blændet af en kontorlampe, som peger lige mod døråbningen. Du ser en gammel dame.\",\n false,\n monsterList.getMonster(4),\n itemList.getItem(13)\n ));\n\n officeRooms.add(new Room(\n \"Der er ingen i rummet, men rodet afslører, at det nok er Phillipas kontor.\",\n false,\n null,\n itemList.getItem(15)\n ));\n\n officeRooms.add(new Room(\n \"Du vader ind i et lokale, som er dunkelt oplyst af små, blinkende lamper og har en stank, der siger så meget spar fem, at det kun kan være IT-lokalet. Du når lige at høre ordene \\\"Rick & Morty\\\".\",\n false,\n monsterList.getMonster(6),\n itemList.getItem(7)\n ));\n\n officeRooms.add(new Room(\n \"Det var ikke kantinen det her, men hvorfor er der så krummer på gulvet?\",\n false,\n null,\n itemList.getItem(1)\n ));\n\n officeRooms.add(new Room(\n \"Tine sidder ved sit skrivebord. Du kan se, at hun er ved at skrive en lang indkøbsseddel. Hun skal nok have gæster i aften.\",\n false,\n monsterList.getMonster(0),\n itemList.getItem(18)\n ));\n\n officeRooms.add(new Room(\n \"Du træder ind i det tekøkken, hvor Thomas plejer at opholde sig. Du ved, hvad det betyder!\",\n false,\n null,\n itemList.getItem(0)\n ));\n\n officeRooms.add(new Room(\n \"Du går ind i det nok mest intetsigende rum, som du nogensinde har set. Det er så intetsigende, at der faktisk ikke er mere at sige om det.\",\n false,\n monsterList.getMonster(1),\n itemList.getItem(9)\n ));\n\n //Adding copyrooms to <>copyrooms, randomly placed later \n copyRooms.add(new Room(\n \"Døren knirker, som du åbner den. Et kopirum! Det burde du have set komme. Især fordi det var en glasdør.\",\n false,\n null,\n itemList.getItem(19)\n ));\n\n copyRooms.add(new Room(\n \"Kopimaskinen summer stadig. Den er åbenbart lige blevet færdig. Du går nysgerrigt over og kigger på alle de udskrevne papirer.\",\n false,\n null,\n itemList.getItem(12)\n ));\n\n //Adding restrooms to <>restrooms, randomly placed later \n restRooms.add(new Room(\n \"Ups! Dametoilettet. Der hænger en klam stank i luften. Det må være Ruth, som har været i gang.\",\n false,\n null,\n itemList.getItem(5)\n ));\n\n restRooms.add(new Room(\n \"Pedersen er på vej ud fra toilettet. Han vasker ikke fingre! Slut med at give ham hånden.\",\n false,\n monsterList.getMonster(7),\n itemList.getItem(11)\n ));\n\n restRooms.add(new Room(\n \"Du kommer ind på herretoilettet. Du skal simpelthen tisse så meget, at fiskefileterne må vente lidt. Du åbner toiletdøren.\",\n false,\n monsterList.getMonster(2),\n null\n ));\n\n restRooms.add(new Room(\n \"Lisette står og pudrer næse på dametoilettet. Hvorfor gik du herud?\",\n false,\n monsterList.getMonster(8),\n itemList.getItem(14)\n ));\n\n //Adding meetingrooms to<>meetingrooms, randomly placed later\n meetingRooms.add(new Room(\n \"Du træder ind i et lokale, hvor et vigtigt møde med en potentiel kunde er i gang. Du bliver nødt til at lade som om, at du er en sekretær.\",\n false,\n monsterList.getMonster(9),\n itemList.getItem(6)\n ));\n\n meetingRooms.add(new Room(\n \"Mødelokalet er tomt, men der står kopper og service fra sidste møde. Sikke et rod!\",\n false,\n null,\n itemList.getItem(3)\n ));\n\n meetingRooms.add(new Room(\n \"Projektgruppen sidder i mødelokalet. Vil du forsøge at forsinke dem i at nå fiskefileterne i kantinen?\",\n false,\n monsterList.getMonster(10),\n itemList.getItem(2)\n ));\n\n //Adding specialrooms to<>specialrooms, randomly placed later\n specialRooms.add(new Room(\n \"Du vader ind på chefens kontor. På hans skrivebord sidder sekretæren Phillipa.\",\n false,\n monsterList.getMonster(5),\n itemList.getItem(8)\n ));\n\n specialRooms.add(new Room(\n \"Det her ligner øjensynligt det kosteskab, Harry Potter boede i.\",\n false,\n monsterList.getMonster(3),\n itemList.getItem(4)\n ));\n\n specialRooms.add(new Room(\n \"OMG! Hvad er det syn?! KANTINEN!! Du klarede det! Du skynder dig op i køen lige foran ham den arrogante fra din afdeling. Da du når frem til fadet er der kun 4 fiskefileter tilbage. Du snupper alle 4!\",\n true,\n null,\n null\n ));\n\n //Adding rooms(Inde1-5)\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addMeetingRoom(rooms, meetingRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n\n //Adding rooms(Inde6-10)\n addMeetingRoom(rooms, meetingRooms);\n addCopyRoom(rooms, copyRooms);\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n addCopyRoom(rooms, copyRooms);\n\n //Adding rooms(Inde11-15)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n\n //Adding rooms(Inde16-19)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addSpecialRoom(rooms, specialRooms);\n addMeetingRoom(rooms, meetingRooms);\n\n return rooms;\n }",
"public AsyncResult<List<ChatRoom>> discoverRooms() {\r\n return serviceDiscoveryManager.discoverItems(serviceAddress).thenApply(itemNode -> {\r\n List<ChatRoom> chatRooms = new ArrayList<>();\r\n for (Item item : itemNode.getItems()) {\r\n ChatRoom chatRoom = new ChatRoom(item.getJid(), item.getName(), xmppSession, serviceDiscoveryManager, multiUserChatManager);\r\n chatRoom.initialize();\r\n chatRooms.add(chatRoom);\r\n }\r\n return chatRooms;\r\n });\r\n }",
"@Override\r\n\tpublic List<Room> listAll() throws SQLException {\n\t\treturn null;\r\n\t}",
"@CrossOrigin \n\t@GetMapping(\"/all/{building}\")\n\tpublic List<Room> getRooms(@PathVariable String building) {\n\t\tList<Room> returned = new ArrayList<>();\t\t\n\t\tfor (Room room : roomDB)\n\t\t\tif (room.getBuilding().equals(building))\n\t\t\t\treturned.add(room);\n\t\treturn returned;\n\t}",
"public List<Room> getAllRooms(){\n\n List<Room> rooms = null;\n\n EntityManager entityManager = getEntityManagerFactory().createEntityManager();\n entityManager.getTransaction().begin();\n\n try{\n CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\n CriteriaQuery<Room> roomCriteriaQuery = criteriaBuilder.createQuery(Room.class);\n Root<Room> roomsRoot = roomCriteriaQuery.from(Room.class);\n\n roomCriteriaQuery.select(roomsRoot);\n\n rooms = entityManager.createQuery(roomCriteriaQuery).getResultList();\n }\n catch (Exception ex){\n entityManager.getTransaction().rollback();\n }\n finally {\n entityManager.close();\n }\n\n return rooms;\n }",
"@Override\n public List<UserRoom> getUserRoomList() {\n logger.info(\"Start getUserRoomList\");\n List<UserRoom> userRoomList = new ArrayList<>();\n try {\n connection = DBManager.getConnection();\n preparedStatement = connection.prepareStatement(Requests.SELECT_FROM_USER_ROOM);\n rs = preparedStatement.executeQuery();\n while (rs.next()) {\n userRoomList.add(myResultSet(rs));\n }\n } catch (SQLException sqlException) {\n Logger.getLogger(sqlException.getMessage());\n } finally {\n closing(connection, preparedStatement, rs);\n }\n logger.info(\"Completed getUserRoomList\");\n return userRoomList;\n }",
"@GetMapping(\"/chat-rooms\")\n public List<ChatRoom> getAllChatRooms() {\n log.debug(\"REST request to get all ChatRooms\");\n return chatRoomRepository.findAll();\n }",
"public List<String> listRoomsNames() {\n return chatRooms.stream().map(ChatRoom::getChatName).collect(Collectors.toList());\n }",
"public ArrayList<CalendarRoom> getAvailableRooms(Date dtFrom, Date dtTo, String sType)\r\n \tthrows IllegalStateException, JiBXException, IOException {\r\n\r\n\tif (null==sSecurityToken) throw new IllegalStateException(\"Not connected to calendar service\");\r\n\r\n\tCalendarResponse oResponse = CalendarResponse.get(sBaseURL+\"?command=getAvailableRooms&token=\"+sSecurityToken+\"&type=\"+sType+\"&startdate=\"+oFmt.format(dtFrom)+\"&enddate=\"+oFmt.format(dtTo));\r\n \r\n iErrCode = oResponse.code;\r\n sErrMsg = oResponse.error;\r\n\r\n if (iErrCode==0) {\r\n return oResponse.oRooms;\r\n } else {\r\n return null;\r\n }\r\n }",
"public ArrayList<CalendarRoom> getAvailableRooms(Date dtFrom, Date dtTo)\r\n \tthrows IllegalStateException, JiBXException, IOException {\r\n\r\n\tif (null==sSecurityToken) throw new IllegalStateException(\"Not connected to calendar service\");\r\n\r\n\tCalendarResponse oResponse = CalendarResponse.get(sBaseURL+\"?command=getAvailableRooms&token=\"+sSecurityToken+\"&startdate=\"+oFmt.format(dtFrom)+\"&enddate=\"+oFmt.format(dtTo));\r\n \r\n iErrCode = oResponse.code;\r\n sErrMsg = oResponse.error;\r\n\r\n if (iErrCode==0) {\r\n return oResponse.oRooms;\r\n } else {\r\n return null;\r\n }\r\n }",
"@RequestMapping(value = \"/room\", method = RequestMethod.GET)\n public ModelAndView listRoom() {\n List<Group> groups = userBean.getAllGroups();\n for (int i = 0; i < groups.size(); i++) {\n userBean.getGroupByStreamId(groups.get(1));\n }\n ModelAndView view = new ModelAndView(\"room\");\n // view.addObject(\"list\", room);\n // view.addObject(\"note\", rooms);\n //view.addObject(\"st\", streamGroups);\n return view;\n }",
"public ChatRoomTableModel getRoomlist() {\n\t\treturn roomlist;\n\t}",
"@Override\n public List<Room> findRooms(int offset, int limit, String orderBy) throws AppException {\n log.info(\"#findRooms offset = \" + offset + \" limit = \" + limit + \" orderBy = \" + orderBy);\n Connection con = null;\n PreparedStatement ps;\n ResultSet rs;\n List<Room> rooms;\n try {\n con = DataSource.getConnection();\n ps = con.prepareStatement(SELECT_ROOMS);\n log.info(\"orderBy = \" + orderBy);\n switch (orderBy) {\n case(\"price\"):\n ps = con.prepareStatement(SELECT_ROOMS_PRICE);\n break;\n case(\"size\"):\n ps = con.prepareStatement(SELECT_ROOMS_SIZE);\n break;\n case(\"class\"):\n ps = con.prepareStatement(SELECT_ROOMS_CLASS);\n break;\n case(\"status\"):\n ps = con.prepareStatement(SELECT_ROOMS_STATUS);\n }\n int k = 1;\n ps.setInt(k++, limit);\n ps.setInt(k, offset);\n log.info(\"ps = \" + ps);\n rs = ps.executeQuery();\n rooms = new ArrayList<>();\n while (rs.next()) {\n rooms.add(extractRoom(con, rs));\n }\n con.commit();\n log.info(\"rooms = \" + rooms);\n } catch (SQLException e) {\n rollback(con);\n log.error(\"Problem findRooms\");\n throw new AppException(\"Cannot find rooms, try again\");\n } finally {\n close(con);\n }\n return rooms;\n }",
"public PriorityQueue<Room> getRooms() {\n return this.rooms;\n }",
"public LinkedList getList() {\n\treturn this.roomList;\n}",
"@RequestMapping(method = RequestMethod.GET)\n public ResponseEntity<?> getAllGameRooms() {\n try {\n return new ResponseEntity<>(ls.getAllGameRooms(), HttpStatus.ACCEPTED);\n } catch (LacmanNotFoundException e) {\n Logger.getLogger(LacmanController.class.getName()).log(Level.SEVERE, null, e);\n return new ResponseEntity<>(e.getMessage(), HttpStatus.NOT_FOUND);\n }\n }",
"public static void showAllRoom(){\n ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM);\n displayList(roomList);\n showServices();\n }",
"public List<Room> occupiedRooms() {\n List<Room> rooms = new ArrayList<>();\n for (int i = numOfRooms; i < internalList.size(); i++) {\n if (internalList.get(i).isOccupied()) {\n rooms.add(internalList.get(i));\n }\n }\n\n return rooms;\n }",
"public List<Room> getByRoomType(String roomType){\r\n\t\tif(userService.adminLogIn||userService.loggedIn) {\r\n\t\t\tList<Optional<Room>> room=new ArrayList<>();\r\n\t\t\troom=roomRepository.findByRoomType(roomType);\r\n\t\t\tif (room.size()==0) {\r\n\t\t\t\tthrow new RoomTypeNotFoundException(\"Room type not available\");\r\n\t\t\t} else {\r\n\t\t\t\tList<Room> newRoom=new ArrayList<Room>();\r\n\t\t\t\tfor(Optional r:room) {\r\n\t\t\t\t\tnewRoom.add((Room) r.get());\r\n\t\t\t\t}\r\n\t\t\t\treturn newRoom;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\t\t\r\n\t}",
"public List<Room> getByType(int idRoomType) {\n\t\tArrayList<Room> list = new ArrayList<>();\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tStatement st = cn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM room WHERE id_room_type=\" + idRoomType);\n\t\t\twhile(rs.next()) {\n\t\t\t\tlist.add(new Room(rs.getInt(1), rs.getInt(2)));\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t\treturn new ArrayList<Room>();\n\t}",
"private List<Room> addRooms() {\n List<Room> rooms = new ArrayList<>();\n int numRooms = RandomUtils.uniform(random, MINROOMNUM, MAXROOMNUM);\n int playerRoomNum = RandomUtils.uniform(random, 0, numRooms);\n for (int i = 0; i < numRooms; i++) {\n rooms.add(addRandomRoom(random));\n if (i == playerRoomNum) {\n setPlayerInitialPosition(rooms, playerRoomNum);\n }\n }\n return rooms;\n }",
"public ChatRoom[] getChatRooms();",
"public ArrayList<GameRoom> execute() {\n\t\tif(GameRooms.rooms == null) {\n\t\t\tGameRooms.rooms = new ArrayList<GameRoom>();\n\t\t}\n\t\treturn GameRooms.rooms;\n\t}",
"@RequestMapping(value = \"/vacantrooms\", method = RequestMethod.GET)\n public ArrayList<Room> vacantRooms(){\n ArrayList<Room> listroom = DatabaseRoom.getVacantRooms();\n return listroom;\n }",
"@GET\n @Produces(\"application/json\")\n @Path(\"/building/id/{id}\")\n public static List<CRoom> roomsByBuilding(@PathParam(\"id\") final int pId) {\n return (List<CRoom>) sCrudRoom.findWithNamedQuery(\n CRoom.FIND_ROOMS_BY_BUILDING, QueryParameter.with(\"Pid\", pId).parameters());\n }",
"public List<Chatroom> getAllChatrooms() {\n\t\t// fetch chatrooms from database\n\t\tList<Chatroom> chatrooms = chatroomRepository.findAll();\n\n\t\treturn chatrooms;\n\t}",
"@GetMapping(\"/{hotelId}/rooms\")\n public ResponseEntity<Resources<RoomResource>> getRoomsForHotelId(@PathVariable Long hotelId){\n\n return new ResponseEntity<>(\n hotelService.findRoomsByHotelId(hotelId),HttpStatus.OK\n );\n }",
"Room getRoom();",
"Room getRoom();",
"protected static String availableRooms(ArrayList<Room> roomList,String start_date){\n String stringList = \"\";\n for(Room room : roomList){\n System.out.println(room.getName());\n ArrayList<Meeting> meet = room.getMeetings();\n for(Meeting m : meet){\n stringList += m + \"\\t\";\n }\n System.out.println(\"RoomsList\"+stringList);\n }\n return \"\";\n }",
"public ArrayList<Item> getRoomItems() {\n return (roomItems);\n }",
"public void populateRooms(){\n }",
"public List<Chatroom> getAllListedChatrooms() {\n\t\t// fetch chatrooms from database\n\t\tList<Chatroom> chatrooms = chatroomRepository.findByListed(true);\n\n\t\treturn chatrooms;\n\t}",
"public void generateRooms(){ //TODO it's public just for testing\n rooms = new ArrayList<>();\n for(Color color : roomsToBuild)\n rooms.add(new Room(color));\n }",
"public List<Room> unOccupiedRooms() {\n List<Room> rooms = new ArrayList<>();\n for (int i = 0; i < numOfRooms; i++) {\n if (!internalList.get(i).isOccupied()) {\n rooms.add(internalList.get(i));\n }\n }\n return rooms;\n }",
"@ApiOperation(value = \"Retrieves a Room\",\n\t\t\tnickname = \"getMyRooms\")\n\t@ApiResponses(value = {\n\t\t@ApiResponse(code = 204, message = HTML_STATUS_204)\n\t})\n\t@RequestMapping(value = \"/\", method = RequestMethod.GET, params = \"statusonly=true\")\n\t@Pagination\n\tpublic List<Room> getMyRooms(\n\t\t\t@ApiParam(value = \"visitedOnly\", required = true) @RequestParam(value = \"visitedonly\", defaultValue = \"false\") final boolean visitedOnly,\n\t\t\t@ApiParam(value = \"sort by\", required = false) @RequestParam(value = \"sortby\", defaultValue = \"name\") final String sortby,\n\t\t\tfinal HttpServletResponse response\n\t\t\t) {\n\t\tList<de.thm.arsnova.entities.Room> rooms;\n\t\tif (!visitedOnly) {\n\t\t\trooms = roomService.getMyRoomsInfo(offset, limit);\n\t\t} else {\n\t\t\trooms = roomService.getMyRoomHistoryInfo(offset, limit);\n\t\t}\n\n\t\tif (rooms == null || rooms.isEmpty()) {\n\t\t\tresponse.setStatus(HttpServletResponse.SC_NO_CONTENT);\n\t\t\treturn null;\n\t\t}\n\n\t\tif (\"shortname\".equals(sortby)) {\n\t\t\tCollections.sort(rooms, new RoomShortNameComparator());\n\t\t} else {\n\t\t\tCollections.sort(rooms, new RoomNameComparator());\n\t\t}\n\t\treturn rooms.stream().map(toV2Migrator::migrate).collect(Collectors.toList());\n\t}",
"public int getNumOfRooms() {\n return internalList.size();\n }",
"public ArrayList<Room> createMaze() {\n createRooms();\n createAccess(rooms);\n\n return rooms;\n }",
"private void displayListOfRooms() {\n DatabaseReference roomsRef = FirebaseDatabase.getInstance().getReference(\"Rooms\");\n\n roomsRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // update rooms every time there's a change\n updateRooms(dataSnapshot);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }",
"@GetMapping(value = \"user/{userId}\", produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<List<Room>> getRooms(@PathVariable int userId) {\n Set<String> roomIds = roomsRepository.getUserRoomIds(userId);\n if (roomIds == null) {\n return new ResponseEntity<>(HttpStatus.BAD_REQUEST);\n }\n List<Room> rooms = new ArrayList<>();\n\n for (String roomId : roomIds) {\n boolean roomExists = roomsRepository.isRoomExists(roomId);\n if (roomExists){\n String name = roomsRepository.getRoomNameById(roomId);\n if (name == null) {\n // private chat case\n Room privateRoom = handlePrivateRoomCase(roomId);\n if (privateRoom == null){\n return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);\n }\n rooms.add(privateRoom);\n } else {\n rooms.add(new Room(roomId, name));\n }\n }\n }\n return new ResponseEntity<>(rooms, HttpStatus.OK);\n }",
"public Vector<String> getConferenceRooms() {\n return conferenceRooms;\n }",
"protected static String listRooms(ArrayList<Room> roomList) {\n System.out.println(\"Room Name - Capacity-Building-Location\");\n System.out.println(\"---------------------\");\n\n for (Room room : roomList) {\n System.out.println(room.getName() + \" - \" + room.getCapacity()\n + \" - \" + room.getBuilding() + \" - \" + room.getLocation());\n }\n\n logger.info(\"---------------------\");\n\n return roomList.size() + \" Room(s)\";\n }",
"private void setRooms() {\r\n\t\tAccountBean bean = new AccountBean();\r\n\t\tbean.setCf(Session.getSession().getCurrUser().getAccount().getCf());\r\n\t\tRoomController ctrl = RoomController.getInstance();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tthis.myRooms=FXCollections.observableArrayList(ctrl.getMyRooms(bean));\r\n\t\t}\r\n\t\tcatch (DatabaseException ex1) {\r\n\t\t\tJOptionPane.showMessageDialog(null,ex1.getMessage(),ERROR, JOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n public int getItemCount() {\n return restrooms.size();\n }",
"public static ArrayList<Room> getTypicalRooms() {\n return new ArrayList<>(Arrays.asList(BEST_ROOM, WORST_ROOM));\n }",
"public int getNumberOfRooms() {\n\t\t\n\t\treturn numberOfRooms;\n\t}",
"public String getRoom() {\r\n return room;\r\n }",
"public List<Room> getReservedOn(LocalDate of) {\r\n\t\tList<Room> l= new ArrayList<>(new HashSet<Room>(this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(of, of))));\r\n\t\treturn l;\r\n\t}",
"public Room getRoom(){\n\t\treturn this.room;\n\t}",
"protected ArrayList<Long> getRoomMembers() {\n\treturn roomMembers;\n }",
"public List<String> getCustomRoomNames() {\n List<String> crooms = new ArrayList<String>();\n Set<String> names = plugin.getRoomsConfig().getConfigurationSection(\"rooms\").getKeys(false);\n for (String cr : names) {\n if (plugin.getRoomsConfig().getBoolean(\"rooms.\" + cr + \".user\") && plugin.getRoomsConfig().getBoolean(\"rooms.\" + cr + \".enabled\")) {\n crooms.add(cr);\n }\n }\n return crooms;\n }",
"public Room getRoom()\r\n {\r\n return room;\r\n }",
"@Override\n\tpublic int getNumberOfRooms() {\n\t\treturn 0;\n\t}",
"public Room getRoom(String roomName)\n {\n Room room = rooms.get(0);\n // get each room from the rooms's arraylist.\n for (int i=0; i<rooms.size();i++){\n if (rooms.get(i).getName().equals(roomName)){\n room= rooms.get(i);\n }\n }\n return room;\n }",
"private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }",
"public List<Integer> getBookedRooms(Date fromDate, Date toDate)\r\n {\r\n String fDate = DateFormat.getDateInstance(DateFormat.SHORT).format(fromDate);\r\n String tDate = DateFormat.getDateInstance(DateFormat.SHORT).format(toDate);\r\n \r\n List<Integer> bookedRooms = new LinkedList<>();\r\n \r\n Iterator<Booking> iter = bookings.iterator();\r\n \r\n while(iter.hasNext())\r\n {\r\n Booking booking = iter.next();\r\n String bookingFromDate = DateFormat.getDateInstance(DateFormat.SHORT).format\r\n (booking.getFromDate());\r\n \r\n String bookingToDate = DateFormat.getDateInstance(DateFormat.SHORT).format\r\n (booking.getToDate());\r\n \r\n if(!booking.getCancelled() && !(fDate.compareTo(bookingToDate) == 0) \r\n && fDate.compareTo(bookingToDate) <= 0 &&\r\n bookingFromDate.compareTo(fDate) <= 0 && bookingFromDate.compareTo(tDate) <= 0)\r\n { \r\n List<Integer> b = booking.getRoomNr();\r\n bookedRooms.addAll(b);\r\n }\r\n }// End of while\r\n \r\n return bookedRooms;\r\n }",
"@Override\n public int getCount() {\n Log.d(TAG, \"getCount: size\" +fromName.size());\n return rooms.size();\n }",
"@Test\r\n\tpublic void testGetRooms() {\r\n\t\tassertEquals(rooms, breaku1.getRooms());\r\n\t\tassertEquals(rooms, externu1.getRooms());\r\n\t\tassertEquals(rooms, meetingu1.getRooms());\r\n\t\tassertEquals(rooms, teachu1.getRooms());\r\n\t}",
"@Override\n\tpublic List<PropertyRooms> findRoomByIsOccupied(char isOccupied) {\n\t\tList<PropertyRooms> rooms=hibernateTemplate.find(\"from PropertyRooms where isOccupied=?\",isOccupied);\n\t\treturn rooms;\n\t}",
"public String getRoom() {\n\t\treturn room;\n\t}",
"public Room getRoom(String id) {\r\n\t\treturn rooms.get(id);\r\n\t}",
"public List<MeetingRoom> mrList(String brId) {\n\t\treturn resDao.mrList(brId);\n\t}",
"public List<Room> getFreeOn(LocalDate of) {\r\n\t\tList<Room> l= this.getAllRooms();\r\n\t\tl.removeAll(this.getReservedOn(of));\r\n\t\treturn l;\r\n\t}",
"@RequestMapping(value = \"/Reservation/{reservation_reservationId}/room\", method = RequestMethod.GET)\n\t@ResponseBody\n\tpublic Room getReservationRoom(@PathVariable Integer reservation_reservationId) {\n\t\treturn reservationDAO.findReservationByPrimaryKey(reservation_reservationId).getRoom();\n\t}",
"@Override\n\tpublic void setRooms(List<RoomInterface> rooms) {\n\t\tthis.rooms = rooms;\n\n\t}",
"public ArrayList<roomContents> getContents() {\n return contents;\n }",
"private List<String> getEmptyRoomsFromResultSet(ResultSet emptyQueryResults) {\n ArrayList<String> rooms = new ArrayList<String>();\n boolean hasNext = emptyQueryResults.next();\n while(hasNext) {\n String room = emptyQueryResults.getString(\"r1.roomid\");\n rooms.add(room);\n hasNext = emptyQueryResults.next();\n }\n return rooms;\n}",
"List<ExamRoom> selectAll();",
"public int getNumOfRoom() {\n\t\t\treturn RoomDetails.size();\r\n\t\t}",
"@RequestMapping(value = \"/Reservation\", method = RequestMethod.GET)\n\t@ResponseBody\n\tpublic List<Reservation> listReservations() {\n\t\treturn new java.util.ArrayList<Reservation>(reservationService.loadReservations());\n\t}",
"@GetMapping(\"/rooms/{id}\")\n public Room getRoomById (\n @PathVariable (value = \"id\") Long roomId) {\n return roomRepository.findById(roomId)\n .orElseThrow(() -> new ResourceNotFoundException(\"Room\", \"id\", roomId));\n }",
"@CrossOrigin\n\t@GetMapping(\"/INSA/{building}/{room}/floor\")\n\tpublic List<String> getRoomFloor(@PathVariable String building, @PathVariable String room) {\n\t\tList<String> returned = new ArrayList<>();\t\n\t\t\n\t\tfor (Room aRoom : roomDB) {\n\t\t\tif (aRoom.getName().equals(room) && aRoom.getBuilding().equals(building)) {\n\t\t\t\tswitch (aRoom.getFloor()) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\treturned.add(\"rdc\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\treturned.add(\"1st\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\treturned.add(\"2nd\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\treturned.add(\"3rd\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturned.add(aRoom.getFloor() + \"th\"); \t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (returned.size() == 0) \n\t\t\treturned.add(\"404\");\n\t\treturn returned;\n\t}",
"public Rooms getRmTable();",
"@Override\n\tpublic List<HotelroomPo> getHotelroomByroomType(String roomType) {\n\t\t\n\t\tList<HotelroomPo> hotelrooms = new ArrayList<HotelroomPo>();\n\t\tIterator<Entry<String, HotelroomPo>> iterator = map.entrySet().iterator();\n\t\twhile(iterator.hasNext()){\n\t\t\tEntry<String, HotelroomPo> entry = iterator.next();\n\t\t\tHotelroomPo hotelroomPo = entry.getValue();\n\t\t\t\n\t\t\tif(hotelroomPo.getRoomType().equals(roomType))\n\t\t\t\thotelrooms.add(hotelroomPo);\n\t\t}\n\t\treturn hotelrooms;\n\t}",
"public List<Reservation> findReservations(ReservableRoomId reservableRoomId) {\n\n return reservationRepository.findByReservableRoomReservableRoomIdOrderByStartTimeAsc(reservableRoomId);\n\n }",
"private void get_rooms() throws FileNotFoundException\n {\n Scanner room_all = new Scanner(new FileInputStream(db_rooms));\n room_all.nextLine();\n while(room_all.hasNextLine())\n {\n String [] searcher = (room_all.nextLine()).split(\"\\\"\");\n if(!searcher[7].equals(\"empty\"))\n data_set.add(new Room(searcher[3], searcher[5], (searcher[7].equals(\"booked\") ? 1 : 2), Integer.valueOf(searcher[1])));\n else\n data_set.add(new Room(Integer.valueOf(searcher[1])));\n }\n room_all.close();\n }",
"public static Lecturer getLecturers() {\n HttpRequest request = HttpRequest.newBuilder().GET().uri(URI.create(\"http://localhost:8080/lecturers/findFirstLecturer/\" + MainApp.getCurrentUser().getRoomId())).build();\n HttpResponse<String> response = null;\n try {\n response = client.send(request, HttpResponse.BodyHandlers.ofString());\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n if (response.statusCode() != 200) {\n System.out.println(\"Status: \" + response.statusCode());\n }\n return gson.fromJson(response.body(), new TypeToken<Lecturer>() {\n }.getType());\n }",
"public ArrayList<CalendarMeeting> getMeetingsForRoom(Date dtFrom, Date dtTo, String sNmRoom)\r\n \tthrows IllegalStateException, JiBXException, IOException {\r\n\r\n\tif (null==sSecurityToken) throw new IllegalStateException(\"Not connected to calendar service\");\r\n\r\n\tCalendarResponse oResponse = CalendarResponse.get(sBaseURL+\"?command=getMeetingsForRoom&token=\"+sSecurityToken+\"&startdate=\"+oFmt.format(dtFrom)+\"&enddate=\"+oFmt.format(dtTo)+\"&room=\"+URLEncode(sNmRoom));\r\n \r\n iErrCode = oResponse.code;\r\n sErrMsg = oResponse.error;\r\n\r\n if (iErrCode==0) {\r\n return oResponse.oMeetings;\r\n } else {\r\n return null;\r\n }\r\n }"
] |
[
"0.8442876",
"0.8429112",
"0.81197864",
"0.80130947",
"0.8010849",
"0.79823995",
"0.7828433",
"0.77236515",
"0.77224076",
"0.77041686",
"0.7670304",
"0.7648982",
"0.7555596",
"0.75441283",
"0.75042385",
"0.74723643",
"0.7460542",
"0.7451116",
"0.7425582",
"0.74053365",
"0.73085785",
"0.72610426",
"0.7243156",
"0.7226773",
"0.72194874",
"0.718988",
"0.7189551",
"0.71473026",
"0.7120173",
"0.7112593",
"0.70240116",
"0.7014949",
"0.7011069",
"0.70080197",
"0.6981899",
"0.69729614",
"0.6961446",
"0.6956623",
"0.68585813",
"0.68413246",
"0.68385655",
"0.6784734",
"0.67833793",
"0.6781945",
"0.67525226",
"0.67418313",
"0.6720254",
"0.67192125",
"0.6718237",
"0.66907936",
"0.6685812",
"0.6685812",
"0.6676445",
"0.6634863",
"0.6609321",
"0.65907073",
"0.65860724",
"0.65725684",
"0.6481448",
"0.64435244",
"0.642095",
"0.6420836",
"0.64129305",
"0.63691217",
"0.63410664",
"0.63307863",
"0.631643",
"0.63050526",
"0.62646747",
"0.62535137",
"0.6253012",
"0.62470776",
"0.6231292",
"0.6228997",
"0.6210746",
"0.6196156",
"0.6179631",
"0.61530626",
"0.61390764",
"0.6128212",
"0.6124959",
"0.61194754",
"0.6100845",
"0.60987484",
"0.6096994",
"0.60811454",
"0.60762393",
"0.60717",
"0.60554886",
"0.6051473",
"0.60237175",
"0.602123",
"0.6020824",
"0.601166",
"0.5985456",
"0.5969289",
"0.5962685",
"0.5961031",
"0.5948166",
"0.59472454",
"0.5940324"
] |
0.0
|
-1
|
List to find a booking from the reservationnumber
|
public Booking findResNo(int resNo, Connection con) {
Booking r = null;
try {
r = new BookingMapper().findResNumber(resNo, con);
} catch (Exception e) {
System.out.println("fail in UnitOfWork - findResNo");
System.err.println(e);
}
return r;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"List<Bill> findBillsForReservation(long reservationId);",
"List<Reservation> findReservationsByUserBookId (Long userId);",
"public List<Boardreservation> getBoardReservations(int boardID);",
"@Query(value = FIND_BOOKED_DATES)\n\tpublic List<BookingDate> getBooking(Date startDate, Date endDate);",
"public List<Reservation> findReservations(ReservableRoomId reservableRoomId) {\n\n return reservationRepository.findByReservableRoomReservableRoomIdOrderByStartTimeAsc(reservableRoomId);\n\n }",
"public void allBookings() {\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint j = 0;\r\n\t\t\tint roomNum; //Room number\r\n\t\t\tint buffNum; //buff room number\r\n\t\t\tint index = 0; //saves the index of the date stored in the arraylist dateArray\r\n\t\t\tBooking buff; //Booking buffer to use\r\n\t\t\tRooms roomCheck;\r\n\t\t\tArrayList<LocalDate> dateArray = new ArrayList<LocalDate>(); //Saves the booking dates of a room\r\n\t\t\tArrayList<Integer> nights = new ArrayList<Integer>(); //Saves the number of nights a room is booked for\r\n\t\t\t\r\n\t\t\twhile(i < RoomDetails.size()) { //Looping Room Number-wise\r\n\t\t\t\troomCheck = RoomDetails.get(i);\r\n\t\t\t\troomNum = roomCheck.getRoomNum();\r\n\t\t\t\tSystem.out.print(this.Name + \" \" + roomNum);\r\n\t\t\t\twhile(k < Bookings.size()) { //across all bookings\r\n\t\t\t\t\tbuff = Bookings.get(k);\r\n\t\t\t\t\twhile(j < buff.getNumOfRoom()) { //check each booked room\r\n\t\t\t\t\t\tbuffNum = buff.getRoomNumber(j);\r\n\t\t\t\t\t\tif(buffNum == roomNum) { //If a booking is found for a specific room (roomNum)\r\n\t\t\t\t\t\t\tdateArray.add(buff.getStartDate()); //add the date to the dateArray\r\n\t\t\t\t\t\t\tCollections.sort(dateArray); //sort the dateArray\r\n\t\t\t\t\t\t\tindex = dateArray.indexOf(buff.getStartDate()); //get the index of the newly add date\r\n\t\t\t\t\t\t\tnights.add(index, buff.getDays()); //add the number of nights to the same index as the date\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tj++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\t\t\t\t\tj=0;\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t\tprintOccupancy(dateArray, nights); //print the occupancy of the room\r\n\t\t\t\tk=0;\r\n\t\t\t\tdateArray.clear(); //cleared to be used again\r\n\t\t\t\tnights.clear(); //cleared to be used again\r\n\t\t\t}\r\n\t\t}",
"public List<ReservationDTO> seachReservationBypid(int pid) {\n\t\treturn dao.seachReservationBypid(pid);\r\n\t}",
"public static int room_booking(int start, int end){\r\n\r\n\t\tint selected_room = -1;\r\n\t\t// booking_days list is to store all the days between start and end day\r\n\t\tList<Integer> booking_days = new ArrayList<>();\r\n\t\tfor(int i=start;i<=end; i++) {\r\n\t\t\tbooking_days.add(i);\r\n\t\t}\r\n\r\n\t\tfor(int roomNo : hotel_size) {\r\n\r\n\t\t\tif(room_bookings.keySet().contains(roomNo)) {\r\n\t\t\t\tfor (Map.Entry<Integer, Map<Integer,List<Integer>>> entry : room_bookings.entrySet()) {\r\n\r\n\t\t\t\t\tList<Integer> booked_days_for_a_room = new ArrayList<Integer>();\r\n\t\t\t\t\tif(roomNo == entry.getKey()) {\r\n\t\t\t\t\t\tentry.getValue().forEach((bookingId, dates)->{\r\n\t\t\t\t\t\t\tbooked_days_for_a_room.addAll(dates);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tList<Integer> check_elements = new ArrayList<Integer>();\r\n\t\t\t\t\t\tfor(int element : booking_days) {\r\n\t\t\t\t\t\t\tif(booked_days_for_a_room.contains(element)) {\r\n\t\t\t\t\t\t\t\tstatus = false;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tcheck_elements.add(element);\r\n\t\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\t\tstatus = true;\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(status) {\r\n\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\treturn selected_room;\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\telse {\r\n\t\t\t\tselected_room = roomNo;\r\n\t\t\t\tstatus = true;\r\n\t\t\t\treturn selected_room;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn selected_room;\r\n\t}",
"List<Reservation> trouverlisteDeReservationAyantUneDateDenvoieDeMail();",
"public List<Reservation> findByReservationUser_Id(@Param(\"id\") int id);",
"public List<TblReservation>getAllDataReservationByPeriode(Date startDate,Date endDate,\r\n RefReservationStatus reservationStatus,\r\n TblTravelAgent travelAgent,\r\n RefReservationOrderByType reservationType,\r\n TblReservation reservation);",
"public ArrayList<Object> getGuestsReservations(int guestId){\n \n return dbf.getGuestsReservations(guestId); \n }",
"public ArrayList<Booking> getBookings(int time,String date){\n ArrayList<Booking>Hours=new ArrayList<>();\n for(int i=0;i<Schedule.size();++i){\n Booking temp=Schedule.get(i); \n String Day=temp.getDate();\n int Datevalue=Integer.parseInt(Day.substring(8,10));\n int Value=Integer.parseInt(date);\n if(time<10) {\n if (temp.getTime().substring(0, 2).equals(\"0\"+time) && Datevalue==Value){\n Hours.add(temp);\n }\n }\n else{\n if (temp.getTime().substring(0, 2).equals(\"\"+time) && Datevalue==Value){\n Hours.add(temp);\n }\n }\n }\n return Hours;\n }",
"public List<Room> getReservedOn(LocalDate of) {\r\n\t\tList<Room> l= new ArrayList<>(new HashSet<Room>(this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(of, of))));\r\n\t\treturn l;\r\n\t}",
"public void seeReservation(RoomList roomList){\n\t\tSystem.out.println(\"What is the name of the guest you wish to check a reservation for ?\");\n\t\tkeyboard.nextLine();\n\t\tString name = keyboard.nextLine();\n\t\tRoom room = null;\n\t\t\n\t\tfor(Room r: roomList.getList()){\n\t\t\tif(!r.isEmpty(r)) {\n\t\t\troom = r.findRoomByName(r, name);\n\t\t\troom.getGuestNames(room);\n\t\t\t}\n\t\t}\n\t}",
"public void readReservationList() {\n\n\t\tif (rList.size() == 0) {\n\t\t\tSystem.out.println(\"No reservations available!\");\n\t\t} else{\n\t\t\tSystem.out.println(\"\\nDisplaying Reservation List: \\n\");\n\t\t\tSystem.out.format(\"%-20s%-15s%-15s%-15s%-20s%-35s%-25s%-25s%-15s\\n\", \"Reservation No.\", \"Guest ID\", \"Num Adult\",\n\t\t\t\t\t\"Num Kid\", \"Room No.\", \"Reservation Status\", \"Check in\", \"Check out\", \"Reservation time\");\n\n\t\t\tfor (Reservation r : rList) {\n\t\t\t\tSystem.out.format(\"%-20d%-15s%-15s%-15s%-20s%-35s%-25s%-25s%-15.8s\\n\", r.getResvNo(), r.getGuestID(),\n\t\t\t\t\t\tr.getAdultNo(), r.getKidNo(), r.getRoomNo(), r.getResvStatus(), r.getDateCheckIn(), r.getDateCheckOut(),\n\t\t\t\t\t\tr.getResvTime());\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public List<String> getSlotNumberForRegNumber(String registrationNumber) {\n List<String> retVal = new ArrayList<>();\n\n List<Slot> slots = getSlots();\n if (slots == null) {\n retVal.add(NOT_FOUND);\n return retVal;\n }\n\n String collect = slots.stream()\n .filter(x -> x.getVehicle() != null && x.getVehicle().getRegistrationNumber().equals(registrationNumber))\n .map(y -> String.valueOf(y.getId()))\n .collect(Collectors.joining(\", \"));\n\n if (collect == null || \"\".equals(collect)) {\n retVal.add(NOT_FOUND);\n } else {\n retVal.add(collect);\n }\n return retVal;\n }",
"public Reservation searchReservation(int resvNo) {\n\t\tReservation resv;\n\t\tfor (int i = 0; i < rList.size(); i++) {\n\t\t\tif (rList.get(i).getResvNo() == resvNo) {\n\t\t\t\tresv = rList.get(i);\n\t\t\t\treturn resv;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Reservation number does not exist!\");\n\t\treturn null;\n\t}",
"public List<Integer> getBookedRooms(Date fromDate, Date toDate)\r\n {\r\n String fDate = DateFormat.getDateInstance(DateFormat.SHORT).format(fromDate);\r\n String tDate = DateFormat.getDateInstance(DateFormat.SHORT).format(toDate);\r\n \r\n List<Integer> bookedRooms = new LinkedList<>();\r\n \r\n Iterator<Booking> iter = bookings.iterator();\r\n \r\n while(iter.hasNext())\r\n {\r\n Booking booking = iter.next();\r\n String bookingFromDate = DateFormat.getDateInstance(DateFormat.SHORT).format\r\n (booking.getFromDate());\r\n \r\n String bookingToDate = DateFormat.getDateInstance(DateFormat.SHORT).format\r\n (booking.getToDate());\r\n \r\n if(!booking.getCancelled() && !(fDate.compareTo(bookingToDate) == 0) \r\n && fDate.compareTo(bookingToDate) <= 0 &&\r\n bookingFromDate.compareTo(fDate) <= 0 && bookingFromDate.compareTo(tDate) <= 0)\r\n { \r\n List<Integer> b = booking.getRoomNr();\r\n bookedRooms.addAll(b);\r\n }\r\n }// End of while\r\n \r\n return bookedRooms;\r\n }",
"List<SeatBean> select(int rno) throws Exception;",
"@Query(\"select reservation from Reservation reservation where reservation.endBorrowing>=:endBorrowing\")\n List<Reservation> findByEndBorrowingAfter(@Param(\"endBorrowing\")Date endBorrowing);",
"public List<Reservation> findByClass(Class<?> reservationClass){\n\t\tLinkedList<Reservation> result = new LinkedList<Reservation>();\n\t\tfor (Reservation reservation : reservationRepository.findAll()){\n\t\t\tif (reservationClass.isInstance(reservation)) {\n\t\t\t\tresult.add(reservation);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public List<BookingCus> BookingC() {\n\n try {\n //create a new vector to save the data on DB\n List<BookingCus> bookCus = new ArrayList<BookingCus>();\n //SQL code\n String cmdsql = \"SELECT * FROM BookingCust;\";\n PreparedStatement stmt = connect.prepareStatement(cmdsql);\n ResultSet rs = stmt.executeQuery();\n\n //While there is some register, save it in the list\n while (rs.next()) {\n BookingCus BookingCuslist = new BookingCus();\n\n BookingCuslist.setIdBookingCust(rs.getInt(\"idBookingCust\"));\n BookingCuslist.setidCus(rs.getInt(\"idCus\"));\n BookingCuslist.setfname(rs.getString(\"fname\"));\n BookingCuslist.setDate(rs.getString(\"Date\"));\n BookingCuslist.setTime(rs.getString(\"Time\"));\n\n bookCus.add(BookingCuslist);\n }\n return bookCus;\n\n } catch (SQLException error) {\n JOptionPane.showMessageDialog(null, \"ERROR: FAIL TO BOOK YOUR SLOT, TRY AGAIN!\", \"ERROR MESSAGE!\", JOptionPane.ERROR_MESSAGE);\n }\n return null;\n }",
"public Collection<ReservationDetails> getBookCopies(int bookId) throws RemoteException;",
"public Booking getBooking(int bookingNr)\r\n {\r\n Iterator<Booking> iter = bookings.iterator();\r\n \r\n while(iter.hasNext())\r\n {\r\n Booking booking = iter.next();\r\n \r\n if(booking.getBookingNr() == bookingNr)\r\n {\r\n return booking;\r\n }\r\n }\r\n \r\n return null;\r\n }",
"public Collection<ReservationHistoryDTO> getReservationsHistory() throws ResourceNotFoundException{\n\t\tRegisteredUser currentUser = (RegisteredUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t\t\n\t\t\n\t\tRegisteredUser currentUserFromBase = registeredUserRepository.getOne(currentUser.getId());\n\t\t\n\t\tCollection<Reservation> reservations = currentUserFromBase.getReservations();\n\t\t\n\t\tif(reservations==null) {\n\t\t\tthrow new ResourceNotFoundException(\"User \"+currentUserFromBase.getUsername()+\" made non reservation!\");\n\t\t}\n\n\t\tHashSet<ReservationHistoryDTO> reservationsDTO = new HashSet<ReservationHistoryDTO>();\n\t\t\n\t\t\n\t\t\n\t\tfor(Reservation reservation : reservations) {\n\t\t\tif(reservation.getHasPassed()) {\n\t\t\t\n\t\t\t\tReservationHistoryDTO reservationDTO = new ReservationHistoryDTO();\n\t\t\t\t\n\t\t\t\tFlightReservation flightReservation = reservation.getFlightReservation();\n\t\t\t\tRoomReservation roomReservation = reservation.getRoomReservation();\n\t\t\t\tVehicleReservation vehicleReservation = reservation.getVehicleReservation();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treservationDTO.setFlightReservationId(flightReservation.getId());\n\t\t\t\t\n\t\t\t\tFlight flight = flightReservation.getSeat().getFlight();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLong reservationId = reservation.getId();\n\t\t\t\tLong flightId = flight.getId();\n\t\t\t\tString departureName = flight.getDeparture().getName();\n\t\t\t\tString destinationName = flight.getDestination().getName();\n\t\t\t\tDate departureDate = flight.getDepartureDate();\n\t\t\t\tLong airlineId = flight.getAirline().getId();\n\t\t\t\t\n\t\t\t\treservationDTO.setReservationId(reservationId);\n\t\t\t\t\n\t\t\t\treservationDTO.setFlightId(flightId);\n\t\t\t\treservationDTO.setDepartureName(departureName);\n\t\t\t\treservationDTO.setDestinationName(destinationName);\n\t\t\t\treservationDTO.setDepartureDate(departureDate);\n\t\t\t\treservationDTO.setAirlineId(airlineId);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(roomReservation != null) {\n\t\t\t\t\tRoomType roomType = reservation.getRoomReservation().getRoom().getRoomType();\n\t\t\t\t\treservationDTO.setRoomReservationId(roomReservation.getId());\n\t\t\t\t\tif(roomType!= null) {\n\t\t\t\t\t\treservationDTO.setRoomTypeId(roomType.getId());\n\t\t\t\t\t\treservationDTO.setHotelId(roomReservation.getRoom().getHotel().getId());\n\t\t\t\t\t\t//Long hotelId videcemo kako\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(vehicleReservation != null) {\n\t\t\t\t\tVehicle vehicle = reservation.getVehicleReservation().getReservedVehicle();\n\t\t\t\t\treservationDTO.setVehicleReservationId(vehicleReservation.getId());\n\t\t\t\t\tif(vehicle != null) {\n\t\t\t\t\t\treservationDTO.setVehicleId(vehicle.getId());\n\t\t\t\t\t\treservationDTO.setRentACarId(vehicle.getBranchOffice().getMainOffice().getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\treservationsDTO.add(reservationDTO);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn reservationsDTO;\n\t\t\n\t}",
"@Transactional\r\n\tpublic List<Room> getReservedFromTo(LocalDate from, LocalDate to){\r\n\t\treturn this.roomRepository.findByReservationsIn(\r\n\t\t\t\tthis.reservationService.getFromTo(from, to));\r\n\t}",
"public void viewReservationList(RoomList roomList) {\n\t\tSystem.out.println(\"\");\t\t\t\t\t\t\t\t\t\t\n\t\tSystem.out.println(\"\\t\\tRESERVATION LIST\t\t\t\t \");\n\t\tSystem.out.println(\"**********************************************\\n\");\n\t\tfor(Room r: roomList.getList()){\t\t\t\t\t\t\t//search for all the rooms in the room list\n\t\t\tif(!r.isEmpty(r)) {\t\t\t\t\t\t\t\t\t\t//if a room is not empty(it has at least one guest)\n\t\t\t\tr.reservationList(r);\t\t\t\t\t\t\t\t//gets all the guests in non empty rooms\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\\n**********************************************\\n\");\n\t}",
"public void showMemberBookings()\n {\n try\n {\n System.out.println(\"Please enter the memeber ID\");\n int memberId =sc.nextInt();\n Member mem = sportsClub.searchMember(memberId); \n \n if(mem==null || mem.getBookings()==null)\n {\n System.out.println(\"Sorry! Member is not found.\");\n }\n else\n {\n for(Booking bookingObj : mem.getBookings())\n {\n System.out.println(\"Booking made by \"+mem.getMemberName() +\" for \" + bookingObj.getBookingDate() + \" at \" + bookingObj.getBookingTime() + \" for \" + bookingObj.getBookingEndTime() + \" minutes on Court number \" + bookingObj.getCourt().getCourtId());\n\n }\n if(mem.getBookings().size()==0)\n System.out.println(\"Sorry! Currebtly no bookings done by the member \");\n }\n }\n catch(Exception e)\n {\n System.out.println(\"Error\"+e);\n }\n\n }",
"public static void myReservations(String p, ArrayList<Reservation> rTable) {\n\t\tSystem.out.println(\"Reservations of passenger \" + p + \":\" );\n\t\tfor(int i = 0; i < rTable.size(); i++){\n\t\t\tif(rTable.get(i).seatOwner() == p){\n\t\t\t\tSystem.out.println(rTable.get(i));\n\t\t\t}\n\t\t}\n\t}",
"public Collection<ReservationHistoryDTO> getCurrentReservations() throws ResourceNotFoundException{\n\t\tRegisteredUser currentUser = (RegisteredUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t\t\n\t\t\n\t\tRegisteredUser currentUserFromBase = registeredUserRepository.getOne(currentUser.getId());\n\t\t\n\t\tCollection<Reservation> reservations = currentUserFromBase.getReservations();\n\t\t\n\t\tif(reservations==null) {\n\t\t\tthrow new ResourceNotFoundException(\"User \"+currentUserFromBase.getUsername()+\" made non reservation!\");\n\t\t}\n\n\t\tHashSet<ReservationHistoryDTO> reservationsDTO = new HashSet<ReservationHistoryDTO>();\n\t\t\n\t\t\n\t\t\n\t\tfor(Reservation reservation : reservations) {\n\t\t\tif(!reservation.getHasPassed()) {\n\t\t\t\n\t\t\t\tReservationHistoryDTO reservationDTO = new ReservationHistoryDTO();\n\t\t\t\t\n\t\t\t\tFlightReservation flightReservation = reservation.getFlightReservation();\n\t\t\t\tRoomReservation roomReservation = reservation.getRoomReservation();\n\t\t\t\tVehicleReservation vehicleReservation = reservation.getVehicleReservation();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tFlight flight = flightReservation.getSeat().getFlight();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLong reservationId = reservation.getId();\n\t\t\t\tLong flightId = flight.getId();\n\t\t\t\tString departureName = flight.getDeparture().getName();\n\t\t\t\tString destinationName = flight.getDestination().getName();\n\t\t\t\tDate departureDate = flight.getDepartureDate();\n\t\t\t\tLong airlineId = flight.getAirline().getId();\n\t\t\t\t\n\t\t\t\treservationDTO.setReservationId(reservationId);\n\t\t\t\t\n\t\t\t\treservationDTO.setFlightId(flightId);\n\t\t\t\treservationDTO.setDepartureName(departureName);\n\t\t\t\treservationDTO.setDestinationName(destinationName);\n\t\t\t\treservationDTO.setDepartureDate(departureDate);\n\t\t\t\treservationDTO.setAirlineId(airlineId);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(roomReservation != null) {\n\t\t\t\t\tRoomType roomType = reservation.getRoomReservation().getRoom().getRoomType();\n\t\t\t\t\tif(roomType!= null) {\n\t\t\t\t\t\treservationDTO.setRoomTypeId(roomType.getId());\n\t\t\t\t\t\treservationDTO.setHotelId(roomReservation.getRoom().getHotel().getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(vehicleReservation != null) {\n\t\t\t\t\tVehicle vehicle = reservation.getVehicleReservation().getReservedVehicle();\n\t\t\t\t\tif(vehicle != null) {\n\t\t\t\t\t\treservationDTO.setVehicleId(vehicle.getId());\n\t\t\t\t\t\treservationDTO.setRentACarId(vehicle.getBranchOffice().getMainOffice().getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\treservationsDTO.add(reservationDTO);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn reservationsDTO;\n\t\t\n\t}",
"@Override\r\n\tpublic List<Reservation> rechercherReservation(Voyage v, Client c) {\n\t\treturn null;\r\n\t}",
"List<Appointment> getAppointmentByLawyerNumber(long lawyerNumber);",
"@Test\n\tpublic void testListReservationsOfFacilityInInterval() {\n\t\t// create a reservation\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t// list start is now\n\t\tDate listStart = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t// list end is now + 24h\n\t\tDate listEnd = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\n\t\t// first reservation is from now +1 to now +3\n\t\tDate reservation1StartDate = cal.getTime();\n\t\tcal.add(Calendar.HOUR, +2);\n\t\tDate reservation1EndDate = cal.getTime();\n\t\tReservation reservation1 = dataHelper.createPersistedReservation(USER_ID, Arrays.asList(room1.getId()),\n\t\t\t\treservation1StartDate, reservation1EndDate);\n\n\t\t// second reservation is from now +4 to now +5\n\t\tcal.add(Calendar.HOUR, 1);\n\t\tDate reservation2StartDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 1);\n\t\tDate reservation2EndDate = cal.getTime();\n\n\t\tReservation reservation2 = dataHelper.createPersistedReservation(USER_ID,\n\t\t\t\tArrays.asList(room1.getId(), infoBuilding.getId()), reservation2StartDate, reservation2EndDate);\n\n\t\t// should find both above reservation\n\t\tCollection<Reservation> reservationsOfFacility;\n\t\treservationsOfFacility = bookingManagement.listReservationsOfFacility(room1.getId(), listStart, listEnd);\n\n\t\tassertNotNull(reservationsOfFacility);\n\t\tassertEquals(2, reservationsOfFacility.size());\n\t\tassertTrue(reservationsOfFacility.contains(reservation1));\n\t\tassertTrue(reservationsOfFacility.contains(reservation2));\n\t}",
"public int checkRooms(LocalDate bookdate, int stay, int type, int req, ArrayList<Integer> array) {\n\t\t\t\r\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint j = 0;\r\n\t\t\tint count = 0;\r\n\t\t\tBooking bookChecker = null; //Saves the bookings of a hotel to be checked\r\n\t\t\tRooms roomChecker = null; //Saves the rooms of the hotel\r\n\t\t\tLocalDate endBook = bookdate.plusDays(stay); //booking start date + number of nights\r\n\t\t\tboolean booked = false;\r\n\r\n\t\t\tif(req == 0) return 0; //if theres no need for single/double/triple room\r\n\t\t\t\r\n\t\t\twhile(i < RoomDetails.size()) { //checking room-wise order\r\n\t\t\t\troomChecker = RoomDetails.get(i);\r\n\t\t\t\tif(type == roomChecker.getCapacity()) { //only check if its the same room type as needed\r\n\t\t\t\t\tk = 0;\r\n\t\t\t\t\twhile(k < Bookings.size()) { //check for bookings of a room\r\n\t\t\t\t\t\tbookChecker = Bookings.get(k);\r\n\t\t\t\t\t\tj=0;\r\n\t\t\t\t\t\tbooked = false;\r\n\t\t\t\t\t\twhile(j < bookChecker.getNumOfRoom()) { //To check if a booked room have clashing schedule with new booking\r\n\t\t\t\t\t\t\tif(roomChecker.getRoomNum() == bookChecker.getRoomNumber(j)) { //if there is a booking for the room\r\n\t\t\t\t\t\t\t\tif(bookdate.isEqual(bookChecker.endDate()) || endBook.isEqual(bookChecker.getStartDate())) {\r\n\t\t\t\t\t\t\t\t\t//New booking starts at the same day where another booking ends\r\n\t\t\t\t\t\t\t\t\tbooked = false; //No clash\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(bookdate.isAfter(bookChecker.endDate()) || endBook.isBefore(bookChecker.getStartDate())) {\r\n\t\t\t\t\t\t\t\t\t//New booking starts days after other booking ends, or new booking ends before other booking starts\r\n\t\t\t\t\t\t\t\t\tbooked = false; //no clash\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse { //Any other way means that it clashes and hence room cant be booked\r\n\t\t\t\t\t\t\t\t\tbooked = true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(booked == true) break; //if booked and clash , break\r\n\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(booked == true) break; //if booked and clash , break\r\n\t\t\t\t\t\tk++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\tif(booked == false) {\r\n\t\t\t\t\t\tarray.add(roomChecker.getRoomNum()); //if no clashing dates, book the room for new cust\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (count == req) break; //if there is enough room already, finish\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\treturn count; //returns the number of available rooms acquired\r\n\t\t}",
"public static ArrayList<String> checkWaitlist(boolean byRoom, int seats, Date date){\r\n con = DBConnection.getConnection();\r\n ArrayList<String> open = new ArrayList<>();\r\n\r\n if(byRoom){\r\n try{\r\n PreparedStatement retrieve = con.prepareStatement(\"SELECT * from Waitlist where SEATS <= ?\");\r\n retrieve.setInt(1, seats);\r\n ResultSet res = retrieve.executeQuery();\r\n \r\n while(res.next()){\r\n if(open.indexOf(res.getString(2)) >= 0){\r\n continue;\r\n }\r\n open.add(res.getString(1));\r\n open.add(res.getString(2));\r\n open.add(res.getString(3));\r\n }\r\n return open;\r\n }catch(SQLException e){\r\n e.printStackTrace();\r\n }\r\n return open;\r\n } else {\r\n try{\r\n PreparedStatement retrieve = con.prepareStatement(\"SELECT * from Waitlist where Date = ? and SEATS <= ?\"\r\n + \"ORDER by Timestamp\");\r\n retrieve.setDate(1, date);\r\n retrieve.setInt(2, seats);\r\n ResultSet res = retrieve.executeQuery();\r\n \r\n if(res.next()){\r\n open.add(res.getString(1));\r\n open.add(res.getString(3));\r\n }\r\n }catch(SQLException e){\r\n e.printStackTrace();\r\n }\r\n return open;\r\n }\r\n }",
"@Override\n\tpublic List<BookingBus> viewBooking(int id) {\n\t\treturn userdao.viewBooking(id);\n\t}",
"public void addBookings(String name, ArrayList<Integer> roomToUse, int month, int date, int stay) {\n\t\t\t\r\n\t\t\tBooking newCust = new Booking();\r\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint roomCap = 0; //Roomtype / capacity\r\n\t\t\tint roomNum; //Room Number\r\n\t\t\tRooms buffer; //used to store the rooms to add to the bookings\r\n\t\t\t\r\n\t\t\twhile(i < roomToUse.size()) { //add all rooms from the available list\r\n\t\t\t\troomNum = roomToUse.get(i); //get Room number of the avalable, non-clashing room to be booked\r\n\t\t\t\twhile(k < RoomDetails.size()) { //Looping through all rooms in a hotel\r\n\t\t\t\t\tbuffer = RoomDetails.get(k); \r\n\t\t\t\t\tif (buffer.getRoomNum() == roomNum) { //To get the capacity of the matching room\r\n\t\t\t\t\t\troomCap = buffer.getCapacity();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tnewCust.addRoom(roomNum, roomCap); //Add those rooms to the bookings with room number and type filled in\r\n\t\t\t\ti++;\r\n\t\t\t\tk=0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tnewCust.addName(name); //add customer name to booking\r\n\t\t\tnewCust.addDates(month, date, stay); //add dates to the booking\r\n\t\t\t\r\n\t\t\tBookings.add(newCust); //adds the new booking into the hotel bookings list\r\n\t\t}",
"public Iterator<R> reservationsByName(String name){\n // Return an iterator of active reservations for a name.\n //loop through the arrayList\n for(Reservation r: listR){\n //if we find the name that equals our given name, add that reservation to our temp list\n if(r.getName().equals(name)){\n newList.add(r);\n }\n }\n //return iterator for temp list\n IterName iter = new IterName();\n return iter;\n }",
"public Reservation makeReservation(Reservation trailRes){\n //Using a for each loop to chekc to see if a reservation can be made or not\n if(trailRes.getName().equals(\"\")) {\n System.out.println(\"Not a valid name\");\n return null;\n }\n \n \n for(Reservation r: listR){\n if(trailRes.getReservationTime() == r.getReservationTime()){\n System.out.println(\"Could not make the Reservation\");\n System.out.println(\"Reservation has already been made by someone else\");\n return null;\n }\n }\n\n //if the time slot is greater than 10 or less than 0, the reservation cannot be made\n if(trailRes.getReservationTime() > 10 || trailRes.getReservationTime() < 0){\n System.out.println(\"Time slot not available\");\n return null;\n }\n\n //check to see if the reservable list is empty or not\n if(listI.isEmpty())\n {\n System.out.println(\"No reservation available\");\n return null;\n }\n\n //find the item and fitnessValue that will most fit our reservation\n Reservable item = listI.get(0);\n int fitnessValue = item.findFitnessValue(trailRes);\n\n //loop through the table list and find the best fit for our reservation\n for(int i = 0; i < listI.size() ; i++){\n if(listI.get(i).findFitnessValue(trailRes) > fitnessValue){\n item = listI.get(i);\n fitnessValue = item.findFitnessValue(trailRes);\n }\n }\n //if we have found a table that works, then we can make our reservation\n if(fitnessValue > 0){\n //add reservation to our internal list\n //point our reservable to the appropriate reservation\n //set the reservable \n //print out the message here not using the iterator\n listR.add(trailRes);\n item.addRes(trailRes);\n trailRes.setMyReservable(item);\n System.out.println(\"Reservation made for \" + trailRes.getName() + \" at time \" + trailRes.getReservationTime() + \", \" + item.getId());\n return trailRes;\n }\n System.out.println(\"No reservation available, number of people in party may be too large\");\n return null; \n }",
"@Test\n\tpublic void testBook() throws Exception {\n\t\tString createdReservationID = bookingManagement.book(USER_ID, Arrays.asList(room1.getId()),\n\t\t\t\tvalidStartDate, validEndDate);\n\t\t// a reservation must be returned\n\t\tassertNotNull(\"Reservation id is null\", createdReservationID);\n\t\tassertFalse(\"Reservation id is emtpy\", createdReservationID.isEmpty());\n\t\t// check if returned reservation is correct\n\t\tReservation createdReservation = bookingManagement.getReservation(createdReservationID);\n\t\tassertNotNull(\"Reservation of returned id was not found\", createdReservation);\n\n\t\tassertEquals(USER_ID, createdReservation.getBookingUserId());\n\n\t\tassertEquals(1, createdReservation.getBookedFacilityIds().size());\n\t\tassertTrue(createdReservation.getBookedFacilityIds().contains(room1.getId()));\n\t\tassertEquals(validStartDate, createdReservation.getStartTime());\n\t\tassertEquals(validEndDate, createdReservation.getEndTime());\n\t}",
"public void getBookAvailability() {\n getBookReservationEligibility();\n }",
"@Transactional\r\n\tpublic List<Room> getReservable(Integer posti, LocalDate from, LocalDate to){\r\n\t\tList<Room> l= this.getPosti(posti);\r\n\t\tl.removeAll(this.getReservedFromTo(from, to));\r\n\t\treturn l;\r\n\t}",
"public ArrayList<Reservation> getReservation() {\n return reservations;\n }",
"List<Appointment> getAppointmentByCustomerNumber(long customerNumber);",
"ObservableList<Booking> getFilteredBookingList();",
"@Test\n\tpublic void testListReservationsOfUserInInterval() {\n\t\t// create a reservation\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t// list start is now\n\t\tDate listStart = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t// list end is now + 24h\n\t\tDate listEnd = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\n\t\t// first reservation is from now +1 to now +3\n\t\tDate reservation1StartDate = cal.getTime();\n\t\tcal.add(Calendar.HOUR, +2);\n\t\tDate reservation1EndDate = cal.getTime();\n\t\tReservation reservation1 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(),\n\t\t\t\treservation1StartDate, reservation1EndDate);\n\n\t\t// second reservation is from now +4 to now +5\n\t\tcal.add(Calendar.HOUR, 1);\n\t\tDate reservation2StartDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 1);\n\t\tDate reservation2EndDate = cal.getTime();\n\n\t\tReservation reservation2 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(),\n\t\t\t\treservation2StartDate, reservation2EndDate);\n\n\t\t// should find both above reservation\n\t\tCollection<Reservation> reservationsOfUser;\n\t\treservationsOfUser = bookingManagement.listReservationsOfUser(USER_ID, listStart, listEnd);\n\n\t\tassertNotNull(reservationsOfUser);\n\t\tassertEquals(2, reservationsOfUser.size());\n\t\tassertTrue(reservationsOfUser.contains(reservation1));\n\t\tassertTrue(reservationsOfUser.contains(reservation2));\n\t}",
"private List<String> findEmptyRoomsInRange(String startDate, String endDate) {\n /* startDate indices = 1,3,6 \n endDate indices = 2,4,5 */\n String emptyRoomsQuery = \"select r1.roomid \" +\n \"from rooms r1 \" +\n \"where r1.roomid NOT IN (\" +\n \"select roomid\" +\n \"from reservations\" + \n \"where roomid = r1.roomid and ((checkin <= to_date('?', 'DD-MON-YY') and\" +\n \"checkout > to_date('?', 'DD-MON-YY')) or \" +\n \"(checkin >= to_date('?', 'DD-MON-YY') and \" +\n \"checkin < to_date('?', 'DD-MON-YY')) or \" +\n \"(checkout < to_date('?', 'DD-MON-YY') and \" +\n \"checkout > to_date('?', 'DD-MON-YY'))));\";\n\n try {\n PreparedStatement erq = conn.prepareStatement(emptyRoomsQuery);\n erq.setString(1, startDate);\n erq.setString(3, startDate);\n erq.setString(6, startDate);\n erq.setString(2, endDate);\n erq.setString(4, endDate);\n erq.setString(5, endDate);\n ResultSet emptyRoomsQueryResult = erq.executeQuery();\n List<String> emptyRooms = getEmptyRoomsFromResultSet(emptyRoomsQueryResult);\n return emptyRooms;\n } catch (SQLException e) {\n System.out.println(\"Empty rooms query failed.\")\n }\n return null;\n}",
"@Override\n\tpublic List<BookingBus> viewBookingBusDetails(int bnum) {\n\t\treturn userdao.viewBookingBusDetails(bnum);\n\t}",
"public void availableBookings(int bID){\n int index=0;\n String n = null;\n Services s = new Services();\n\n System.out.println(\"\\n\"+ Login.businessList.get(bID).getName()+ \" [opening hours]\");\n System.out.println(\"-----------------------------\");\n workday.printFile(Login.businessList.get(bID).getUsername());\n System.out.println(\"-----------------------------\");\n System.out.println(\"\\nSelect a Service.\");\n s.printService(Login.businessList.get(bID).getUsername());\n\n Scanner reader = new Scanner(System.in);\n do {\n System.out.print(\"Enter Service ID: \");\n n = reader.nextLine();\n index = s.checkID(n);\n }while(index==0);\n\n }",
"@RequestMapping(value = \"/Reservation\", method = RequestMethod.GET)\n\t@ResponseBody\n\tpublic List<Reservation> listReservations() {\n\t\treturn new java.util.ArrayList<Reservation>(reservationService.loadReservations());\n\t}",
"List<BookingSlot> getSlotsByDateTime(LocalDateTime dateTime);",
"@Query(value = \"SELECT * FROM booking WHERE customer_id = ?1 AND booking_status_id = ?2\", nativeQuery = true)\n List<Booking> findBookingByCustomerAndStatus(String customerId, Integer bookingStatusId);",
"public interface ReservationDao extends JpaRepository<Reservation, Long> {\n\n /**\n * Find reservations by user book id list.\n *\n * @param userId the user id\n * @return the list\n */\n List<Reservation> findReservationsByUserBookId (Long userId);\n\n /**\n *\n * @param id\n * @return\n */\n Optional<Reservation> findById(Long id);\n\n /**\n *\n * @param reservation\n * @return\n */\n Reservation save(Reservation reservation);\n\n /**\n *\n * @param reservation\n */\n void delete(Reservation reservation);\n\n /**\n * Find by end borrowing after list.\n *\n * @param endBorrowing the end borrowing\n * @return the list\n */\n @Query(\"select reservation from Reservation reservation where reservation.endBorrowing>=:endBorrowing\")\n List<Reservation> findByEndBorrowingAfter(@Param(\"endBorrowing\")Date endBorrowing);\n\n /**\n *\n * @param bookId\n * @return\n */\n List<Reservation> findAllByBookIdOrderByEndBorrowingAsc(Long bookId);\n}",
"List<Booking> getBookingByUserID(LibraryUser libraryUser);",
"ObservableList<Booking> getUpcomingBookingList();",
"public Set<Booking> getBooking() {\n return booking;\n }",
"List<Reservierung> selectAll() throws ReservierungException;",
"Collection<Reservation> getReservations() throws DataAccessException;",
"public void searchHotelReservations(Connection connection, String hotel_name, int branchID, LocalDate checkIn, LocalDate checkOut) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT c_id, res_num, check_in, check_out FROM Booking WHERE hotel_name = ? AND branch_ID = ? AND check_in >= to_date(?, 'YYYY-MM-DD') AND check_out <= to_date(?, 'YYYY-MM-DD')\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n\n if (checkIn == null && checkOut == null){\n pStmt.setString(3, LocalDate.parse(\"2000-01-01\").toString());\n pStmt.setString(4, LocalDate.parse(\"3000-01-01\").toString());\n }\n else if (checkIn == null){\n pStmt.setString(3, checkIn.toString());\n pStmt.setString(4, LocalDate.parse(\"3000-01-01\").toString());\n }\n else if (checkOut == null){\n pStmt.setString(3, LocalDate.parse(\"2000-01-01\").toString());\n pStmt.setString(4, checkOut.toString());\n }\n else {\n pStmt.setString(3, checkIn.toString());\n pStmt.setString(4, checkOut.toString());\n }\n\n try {\n\n System.out.printf(\" Reservations for %S, branch ID (%d): \\n\", getHotelName(), getBranchID());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(\" \" + rs.getString(1) + \" \" + rs.getInt(2));\n System.out.println(\" Reservation DATES: \" + rs.getDate(3) + \" TO \" + rs.getDate(4));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }",
"@Override\n\tpublic List<Booking> getRequest() {\n\t\tSession session = factory.getCurrentSession();\n\t\tQuery query = session\n\t\t\t\t.createQuery(\"from Booking where bookingStatus='request'\");\n\t\treturn query.list();\n\t}",
"@Operation(\n summary = \"Get a list of all reservations\"\n )\n @ApiResponses(\n @ApiResponse(\n responseCode = \"200\",\n description = \"Successful Response\",\n content = @Content(array = @ArraySchema(schema = @Schema(implementation =\n Reservation.class)))\n )\n )\n @GetMapping(\n path = \"/reservations\",\n produces = APPLICATION_JSON_VALUE\n )\n public ResponseEntity<List<Reservation>> getReservation() {\n List<Reservation> listofReservations = (List<Reservation>) reservationsRepository.findAll();\n return new ResponseEntity(listofReservations, HttpStatus.OK);\n }",
"public Booking getBooking(String name) {\n\t\t\tint i = 0;\r\n\t\t\tBooking buffer;\r\n\t\t\t\r\n\t\t\twhile(i < Bookings.size()) {\r\n\t\t\t\tbuffer = Bookings.get(i);\r\n\t\t\t\tString Name = buffer.getBooker();\r\n\t\t\t\tif (name.contentEquals(Name)) {\r\n\t\t\t\t\treturn buffer;\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}",
"public ArrayList<Booking> createList(String dname) {\n\tStudentDAO studentDAO=new StudentDAO();\n\treturn studentDAO.createList(dname);\n\t\n}",
"public GenericResponse<Set<Room>> findAvailableRooms(LocalDate bookingDate) {\n logger.info(String.format(\"Booking date: %s\", bookingDate));\n\n GenericResponse genericResponse = HotelBookingValidation.validateBookingDate(logger, bookingDate);\n if (genericResponse != null) {\n return genericResponse;\n }\n\n Set<Room> availableRooms =\n hotel.getRooms()\n .stream()\n .filter(\n room -> !hotel.getBookings().containsKey(\n BookingRoom.NewBuilder().withRoom(room).withBookingDate(bookingDate).build()\n )\n )\n .collect(Collectors.toSet());\n return GenericResponseUtils.generateFromSuccessfulData(availableRooms);\n }",
"@GetMapping\r\n public String getReservations(@RequestParam(value = \"date\", required = false) String dateString,\r\n Model model,\r\n HttpServletRequest request) {\n LocalDate date = DateUtils.createDateFromDateString(dateString);\r\n List<RoomReservation> roomReservations = reservationService.getRoomReservationForDate(date);\r\n model.addAttribute(\"roomReservations\", roomReservations);\r\n return \"reservations\";\r\n// return new ResponseEntity<>(roomReservations, HttpStatus.OK);\r\n }",
"@Test\n\tpublic void testGetReservation() throws ReservationNotFoundException {\n\t\tReservation res1 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), validStartDate,\n\t\t\t\tvalidEndDate);\n\t\tReservation res2 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), validStartDate,\n\t\t\t\tvalidEndDate);\n\n\t\tassertNotNull(res1.getId());\n\t\tassertNotNull(res2.getId());\n\n\t\t// Check if second reservation is returned\n\t\tReservation res2Result = bookingManagement.getReservation(res2.getId());\n\t\tassertNotNull(res2Result);\n\t\tassertEquals(res2, res2Result);\n\t}",
"public Reservation(String userId, Show show, ArrayList<String> reservation) {\r\n this.userId = userId;\r\n this.show = show;\r\n this.seats = reservation;\r\n calculatePrice();\r\n }",
"public List<CreditBookingResponse<?>> getScheduledBookingsByUuuid(String uuid, Long startTime, Long endTime) {\n\t\tList<CreditBookingResponse<?>> result = new ArrayList<CreditBookingResponse<?>>();\n\t\ttry {\n\t\t\t//LocalDate fromDate = SessionUtil.convertToLocalDate(startTime);\n\t\t\tLocalDate fromDate = Instant.ofEpochSecond(startTime ).atZone(ZoneId.systemDefault()).toLocalDate();\n\t\t\tLocalDate toDate = Instant.ofEpochSecond(endTime ).atZone(ZoneId.systemDefault()).toLocalDate();\n\n\t\t\tList<CreditBookingEntity> bookingEntities = new ArrayList<CreditBookingEntity>();\n\t\t\tBasicUserEntity user = userRepo.findOneByUuid(uuid).get();\n\t\t\tif (user.getUserType().equalsIgnoreCase(\"PT\")) {\n\t\t\t\tbookingEntities = creditBookingRepo.getPTScheduledBookings(fromDate, toDate, uuid);\n\t\t\t} else {\n\t\t\t\tbookingEntities = creditBookingRepo.getEUScheduledBookings(fromDate, toDate, uuid);\n\t\t\t}\n\n\t\t\tfor (CreditBookingEntity creditBookingEntity : bookingEntities) {\n\t\t\t\tswitch (creditBookingEntity.getBookingType()) {\n\t\t\t\tcase CLASS:\n\t\t\t\t\tCreditBookingResponse<CreditClassBookingResponse> classBookingResponse = new CreditBookingResponse<CreditClassBookingResponse>();\n\t\t\t\t\tCreditClassBookingResponse classBooking = new CreditClassBookingResponse(creditBookingEntity);\n\t\t\t\t\tclassBookingResponse.setServiceType(BookingServiceType.CLASS);\n\t\t\t\t\tclassBookingResponse.setBookingData(classBooking);\n\n\t\t\t\t\tresult.add(classBookingResponse);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ETICKET:\n\t\t\t\t\tCreditBookingResponse<CreditETicketBookingResponse> eticketBookingResponse = new CreditBookingResponse<CreditETicketBookingResponse>();\n\t\t\t\t\tCreditETicketBookingResponse eticketBooking = new CreditETicketBookingResponse(creditBookingEntity);\n\t\t\t\t\teticketBookingResponse.setServiceType(BookingServiceType.ETICKET);\n\t\t\t\t\teticketBookingResponse.setBookingData(eticketBooking);\n\n\t\t\t\t\tresult.add(eticketBookingResponse);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SESSION:\n\t\t\t\t\tBasicUserInfo userInfo = null;\n\t\t\t\t\tBasicUserInfo trainerInfo = null;\n\t\t\t\t\tCreditSessionBookingEntity session = creditBookingEntity.getSessions().get(0);\n\t\t\t\t\tBasicUserEntity userEntity = userRepo.findOneByUuid(session.getUserUuid()).get();\n\t\t\t\t\tif (userEntity != null) {\n\t\t\t\t\t\tuserInfo = BasicUserInfo.convertFromEntity(userEntity);\n\t\t\t\t\t}\n\t\t\t\t\tBasicUserEntity trainerEntity = userRepo.findOneByUuid(session.getPtUuid()).get();\n\t\t\t\t\tif (trainerEntity != null) {\n\t\t\t\t\t\ttrainerInfo = BasicUserInfo.convertFromEntity(trainerEntity);\n\t\t\t\t\t}\n\t\t\t\t\tCreditSessionBookingResponseDTO sessionBookingDTO = new CreditSessionBookingResponseDTO(\n\t\t\t\t\t\t\tcreditBookingEntity, userInfo, trainerInfo);\n\t\t\t\t\tCreditBookingResponse<CreditSessionBookingResponseDTO> sessionBookingResponse = new CreditBookingResponse<CreditSessionBookingResponseDTO>();\n\t\t\t\t\tsessionBookingResponse.setServiceType(BookingServiceType.SESSION);\n\t\t\t\t\tsessionBookingResponse.setBookingData(sessionBookingDTO);\n\n\t\t\t\t\tresult.add(sessionBookingResponse);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t}\n\n\t\treturn result;\n\t}",
"boolean bookingListIsNotFull(Book book);",
"public ArrayList<Booking> viewbooklist(String email) {\n\tStudentDAO studentDAO=new StudentDAO();\n\treturn studentDAO.viewbooklist(email);\n}",
"public GenericResponse<Set<BookingRoom>> findExistedBookings(User user) {\n logger.info(user.toString());\n\n GenericResponse genericResponse = HotelBookingValidation.validateUserInfo(logger, user);\n if (genericResponse != null) {\n return genericResponse;\n }\n\n Set<BookingRoom> existedBookings = hotel.getBookings().entrySet()\n .stream()\n .filter(booking -> booking.getValue().equals(user))\n .map(Map.Entry::getKey)\n .collect(Collectors.toSet());\n return GenericResponseUtils.generateFromSuccessfulData(existedBookings);\n }",
"public List<ReservationModel> getReservationsByDoctorAndTimeSlot(Integer doctorId, String startDate,\n\t\t\tString startTime) {\n\t\tList<ReservationModel> result = new ArrayList<ReservationModel>();\n\t\tList<Reservation> reservationsList = this.reservationRepository.findByDoctorIdAndTimeSlot(doctorId, startDate,\n\t\t\t\tstartTime);\n\t\tif (reservationsList != null) {\n\t\t\tfor (Reservation reservation : reservationsList) {\n\t\t\t\tresult.add(reservation.toModel(this.mapper));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"List<Reservation> findByMovie(Movie movie);",
"@GetMapping(\"/booking/{id}\")\n\tpublic Bookings getBookingById(@PathVariable(value = \"id\") String bookingId){\n\t\tBookings booking = services.getBookings(bookingId);\n\t\treturn booking;\n\t}",
"public ResultSet fetchSelectUserBookingsByBookingNo(String bookingNo) {\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tTo create connection to the DataBase\r\n\t\t\t*/\r\n\t\t\tnew DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tStore the table data in ResultSet rs and then return it\r\n\t\t\t*/\r\n\t\t\tpstmt = conn.prepareStatement(SELECT_USER_BOOKING_BY_BOOKINGNO_QUERY);\r\n\r\n\t\t\tpstmt.setString(1, bookingNo);\r\n\r\n\t\t\trs = pstmt.executeQuery();\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t//SqlExcep.printStackTrace();\r\n\t\t} catch(ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\tcloseDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn rs;\r\n\t}",
"@Override\n\tpublic List<Reservation> selectionnerReservations(final ContexteConsommation contexte)\n\t\t\tthrows IllegalArgumentException, ContexteConsommationInvalideException {\n\t\treturn null;\n\t}",
"public int getReservationId() { return reservationId; }",
"Booking getBookingById(BookingKey bookingKey);",
"private void showCourtBookings()\n {\n ArrayList<Court> courtList = new ArrayList<Court>();\n ArrayList<Booking> bookingList = new ArrayList<Booking>();\n for(Sport sObj : sportsClub.sportList)\n {\n System.out.println(\"Displaying Courts for : \" + sObj.getSportName());\n courtList = sObj.getCourtList();\n for(Court cObj : courtList)\n { \n if(cObj.getCourtBookings().size()==0)\n System.out.println(\"Booking are not yet started for sport :\" + sObj.getSportName() + \" on Court : \" + cObj.getCourtId());\n else\n { \n\n Collections.sort(cObj.getCourtBookings());\n System.out.println(cObj.getCourtBookings().toString());\n\n } \n }\n } \n }",
"public List<ConsultationReservation> getConsultationReservationsByUserToday(InternalUser user) throws SQLException{\n\t\t\n\t\treturn super.manager.getConsultationReservationByUser(user, LocalDate.now(), true, false);\n\t}",
"Reservation createReservation();",
"public ArrayList<Book> checkIn(int... bookNumbers){\n ArrayList<Book> checkInBooks = new ArrayList<Book>();\n for (int number : bookNumbers){\n if(this.numberedListOfServing.containsKey(number)){\n this.numberedListOfServing.get(number).checkIn();\n this.libraryBooks.add(this.numberedListOfServing.get(number));\n checkInBooks.add(this.numberedListOfServing.get(number));\n this.servingPatron.giveBack(this.numberedListOfServing.get(number));\n this.println(this.numberedListOfServing.get(number).getTitle()+\" Check In successfully!\");\n this.numberedListOfServing.remove(number);\n }\n else{\n this.println(\"Number \"+number +\" is out of range! Please enter the number in range!!\");\n }\n } \n return checkInBooks;\n }",
"public List<ReservationFlightInfo> getPreviousReservationsRest(String email) {\n\n System.out.println(\"Email \" + email);\n\n Customer customer = customerRepository.findByEmail(email);\n\n if (customer == null) {\n return null;\n }\n\n\n List<Reservation> reservations = reservationRepository.findByCustomerid(customer.getCustomerid());\n\n System.out.println(\"reservation list size \" + reservations.size());\n\n List<ReservationFlightInfo> reservationInfo= new ArrayList<ReservationFlightInfo>();\n\n for (int i = 0; i < reservations.size(); i++) {\n Reservation r = reservations.get(i);\n Flight previousFlight = flightRepository.findByFlightid(r.getDepartureflightid());\n System.out.println(\"Flight Departure Airport (Flight) \" + previousFlight.getDepartureairport());\n\n\n ReservationFlightInfo tempInfo = new ReservationFlightInfo(r.getReservationid(), previousFlight.getFlightid(), previousFlight.getDepartureairport(), previousFlight.getArrivalairport(), previousFlight.getDeparturedate(), previousFlight.getStatus(), r.getBookingStatus(), r.getReservationorigin());\n String testStatus = tempInfo.getBookingStatus();\n String testOrigin = tempInfo.getReservationOrigin();\n System.out.println(\"test status = \" + testStatus);\n System.out.println(\"test origin = \" + testOrigin);\n\n if (testStatus.equals(\"confirmed\") && testOrigin.equals(\"planner\")) {\n reservationInfo.add(tempInfo);\n System.out.println(\"Flight Departure Airport (FlightInfo) \" + tempInfo.getDepartureAirport());\n System.out.println(\"Reservation ID: \" + tempInfo.getReservationId());\n } else {\n System.out.println(\"Not confirmed or planner\");\n }\n }\n\n System.out.println(\"Reservation Info List Contents:\" + reservationInfo);\n return reservationInfo;\n }",
"@Test\n public void testsearch(){\n ArrayList<Booking> bookings =bookingHelper.getBookingList();\n bookingHelper.addBooking(booking1);\n bookingHelper.addBooking(booking2);\n\n //bookingHelper.search(\"0000002\");\n\n\n\n// assertEquals(bookingHelper.searchGuestID(1), booking1);\n// assertEquals(bookingHelper.searchGuestID(2), booking2);\n assertNull(bookingHelper.search(-1));\n assertEquals(bookingHelper.searchBookingId(booking1.getBookingID()), booking1);\n }",
"public Optional<Booking> findClientActiveBooking(int clientCode) {\n for (Room room : hotel.getRooms()) {\n for (Booking booking : room.getBookings()) {\n if (booking.getClientCode() == clientCode\n && booking.isActive()) {\n return Optional.of(booking);\n }\n }\n\n }\n return Optional.empty();\n }",
"public ArrayList<VacancyQueryDTO> findVacantRooms (VacancyQueryDTO query);",
"@Override\n\tpublic ArrayList<Reservation> getReservationsByDate(Date date, int duration) {\n\t\treturn null;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic JSONCalendar availableHouses(String startDate, String endDate) {\n\t\t// Create a new list with house ID'sz\n\t\tList<String> houseIDs = new ArrayList<>();\n\t\tList<Calendar> dates = null;\n\t\tList<String> housed = null;\n\t\tList<Calendar> d = null;\n\t\tJSONCalendar ca = new JSONCalendar();\n\t\tEntityManager em = JPAResource.factory.createEntityManager();\n\t\tEntityTransaction tx = em.getTransaction();\n\t\ttx.begin();\n\t\t\n\t\t// Find the houses id's\n\t\t\n\t\tQuery q1 = em.createQuery(\"SELECT h.houseID from House h\");\n\t\t// It has all the houseIDs\n\t\thoused = q1.getResultList();\n\t\t//System.out.println(housed);\n\t\t\n\t\tQuery q = em.createNamedQuery(\"Calendar.findAll\");\n\t\tdates = q.getResultList();\n\t\t\n\t\tfor( int i = 0; i < housed.size(); i++ ) {\n\t\t\t// Select all the dates for every house\n\t\t\tint k = 0;\n\t\t\tQuery q2 = em.createQuery(\"SELECT c from Calendar c WHERE c.houseID = :id AND c.date >= :startDate AND c.date < :endDate\");\n\t\t\tq2.setParameter(\"id\", housed.get(i));\n\t\t\tq2.setParameter(\"startDate\", startDate);\n\t\t\tq2.setParameter(\"endDate\", endDate);\n\t\t\td = q2.getResultList();\n\t\t\t\n\t\t\tlong idHouse = 0;\n\t\t\tfor(int j = 0; j < d.size(); j++) {\n\t\t\t\t//System.out.println(d.get(j).getHouseID());\n\t\t\t\tidHouse = d.get(j).getHouseID();\n\t\t\t\tif(d.get(j).getAvailable() == true) {\n\t\t\t\t\tk++;\n\t\t\t\t\t// System.out.println(k);\n\t\t\t\t}\n\t\t\t\t// Find out if the houses are available these days\n\t\t\t\t\n\t\t\t}\n\t\t\tif(k == d.size() && k != 0) {\n\t\t\t\t// System.out.println(k);\n\t\t\t\thouseIDs.add(String.valueOf(idHouse));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t// Select all the houses\n\t\t\n\t\tca.setResults(houseIDs);\n\t\tca.setNumDates(d.size());\n\t\t// System.out.println(startDate + \" \" + endDate);\n\t\t// System.out.println(houseIDs);\n\t\t\n\t\t\n\t\treturn ca;\n\t}",
"@Test\n public void findReservationBetweenTest() {\n Collection<Reservation> expected = new HashSet<>();\n expected.add(reservation1);\n expected.add(reservation2);\n expected.add(reservation3);\n expected.add(reservation4);\n Mockito.when(reservationDao.findReservationBetween(Mockito.any(LocalDate.class), Mockito.any(LocalDate.class)))\n .thenReturn(expected);\n Collection<Reservation> result = reservationService.findReservationsBetween(LocalDate.now().minusDays(4),\n LocalDate.now().plusDays(15));\n Assert.assertEquals(result.size(), 4);\n Assert.assertTrue(result.contains(reservation1));\n Assert.assertTrue(result.contains(reservation2));\n Assert.assertTrue(result.contains(reservation3));\n Assert.assertTrue(result.contains(reservation4));\n }",
"@Test\n @DisplayName(\"Testataan kaikkien tilausten haku\")\n void getAllReservations() {\n assertEquals(0, reservationsDao.getAllReservations().size());\n\n TablesEntity table1 = new TablesEntity();\n table1.setSeats(2);\n tablesDao.createTable(table1);\n // Test that returns the same number as created reservations\n ReservationsEntity firstReservation = new ReservationsEntity(\"amal\",\"46111222\", new Date(System.currentTimeMillis()), table1.getId(),new Time(1000),new Time(2000));\n reservationsDao.createReservation(firstReservation);\n\n TablesEntity table2 = new TablesEntity();\n table2.setSeats(2);\n tablesDao.createTable(table2);\n reservationsDao.createReservation(new ReservationsEntity(\"juho\", \"46555444\", new Date(System.currentTimeMillis()), table2.getId(), new Time(1000),new Time(2000)));\n\n List<ReservationsEntity> reservations = reservationsDao.getAllReservations();\n assertEquals(2, reservations.size());\n assertEquals(firstReservation, reservations.get(0));\n }",
"public List<Books> searchBook(int book_id){\n String sql=\"select * from Book where id=?\";\n BaseDao baseDao =dao.executeQuery(sql,new Object[]{book_id});\n return resultSetToBook(baseDao);\n }",
"public List<ReservationFlightInfo> getPreviousReservations(String email) {\n\n System.out.println(\"Email \" + email);\n\n Customer customer = customerRepository.findByEmail(email);\n\n if (customer == null) {\n return null;\n }\n\n List<Reservation> reservations = reservationRepository.findByCustomerid(customer.getCustomerid());\n\n System.out.println(\"reservation list size \" + reservations.size());\n\n List<ReservationFlightInfo> reservationInfo= new ArrayList<ReservationFlightInfo>();\n\n for (int i = 0; i < reservations.size(); i++) {\n Reservation r = reservations.get(i);\n Flight previousFlight = flightRepository.findByFlightid(r.getDepartureflightid());\n System.out.println(\"Flight Departure Airport (Flight) \" + previousFlight.getDepartureairport());\n\n\n ReservationFlightInfo tempInfo = new ReservationFlightInfo(r.getReservationid(), previousFlight.getFlightid(), previousFlight.getDepartureairport(), previousFlight.getArrivalairport(), previousFlight.getDeparturedate(), previousFlight.getStatus(), r.getBookingStatus(), r.getReservationorigin());\n String testStatus = tempInfo.getBookingStatus();\n String testOrigin = tempInfo.getReservationOrigin();\n System.out.println(\"test status = \" + testStatus);\n System.out.println(\"test origin = \" + testOrigin);\n\n if (testStatus.equals(\"confirmed\") && testOrigin.equals(\"kana\")) {\n reservationInfo.add(tempInfo);\n System.out.println(\"Flight Departure Airport (FlightInfo) \" + tempInfo.getDepartureAirport());\n System.out.println(\"Reservation ID: \" + tempInfo.getReservationId());\n }\n }\n\n System.out.println(\"Reservation Info List Contents:\" + reservationInfo);\n return reservationInfo;\n }",
"public void checkIn(Recepcionist user, List<Reservation> reservations, List<Room> rooms){\n int reservationId;\n Room room;\n reservationId = this.enterNumber(\"el numero de Reserva\");\n room = user.checkIn(reservationId,reservations,rooms);\n if(room != null){\n System.out.println(\"\\nEl check-in fue exitoso. Pueden ocupar la habitacion Nro. \"+room.getRoomNumber());\n } else {\n System.out.println(\"\\nEl numero de reserva no se encuentra en el sistema.\");\n }\n }",
"public List<TblReservationRoomTypeDetailRoomPriceDetail>getAllDataReservationRoomPriceDetailByIDReservation(long id);",
"public List<ReservationModel> findReservationInIdList(Collection<Integer> reservationIds) {\n\t\tList<ReservationModel> result = new ArrayList<ReservationModel>();\n\t\tList<Reservation> reservations = this.reservationRepository.findInIdList(reservationIds);\n\t\tif (reservations != null) {\n\t\t\tfor (Reservation reservation : reservations) {\n\t\t\t\tif (MssContextHolder.getHospitalParentId() != null && MssContextHolder.getHospitalParentId() == 1) {\n\t\t\t\t\tresult.add(reservation.toModel(mapper, \"exclude-departmentAnddoctor\"));\n\t\t\t\t} else {\n\t\t\t\t\tresult.add(reservation.toModel(mapper));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"private void handleBooking() {\n\t\tString customerID;\n\t\tint recNo = table.getSelectedRow();\n\t\tif(recNo == -1){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tcustomerID = JOptionPane.showInputDialog(mainPanel,\n\t\t\t\t\t\"Enter Customer ID (8 Digits)\");\n\t\t\tif (customerID != null) {\t\n\t\t\t\tcontroller.reserveRoom(recNo, customerID);\n\t\n\t\t\t\tupdateTable(nameSearchBar.getText(),\n\t\t\t\t\t\tlocationSearchBar.getText());\n\t\t\t}\n\t\t} catch (final InvalidCustomerIDException icide) {\n\t\t\tJOptionPane.showMessageDialog(mainPanel, \"Invalid format!\");\n\t\t} catch (final BookingServiceException bse) {\n\t\t\tJOptionPane.showMessageDialog(mainPanel, bse.getMessage());\n\t\t} catch (final ServiceUnavailableException sue) {\n\t\t\tJOptionPane.showMessageDialog(null, sue.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tObject HotelID = cbHotelsOptions.getSelectedItem();\n\t\t\t\t\tHotel hotel;\n\t\t\t\t\thotel = (Hotel) HotelID;\n\t\t\t\t\tlong id = hotel.getUniqueId();\n\t\t\t\t\t//\tSystem.out.println(id);\n\t\t\t\t\tString inmonth = txtInMonth.getText();\n\t\t\t\t\tint inMonth = Integer.valueOf(inmonth);\n\t\t\t\t\tString inday = txtInDay.getText();\n\t\t\t\t\tint inDay = Integer.parseInt(inday);\n\t\t\t\t\tString outmonth = txtOutMonth.getText();\n\t\t\t\t\tint outMonth = Integer.valueOf(outmonth);\n\t\t\t\t\tString outday = txtOutDay.getText();\n\t\t\t\t\tint OutDay = Integer.parseInt(outday);\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\"Reservation.txt\", true);\n\t\t\t\t\tPrintWriter pw = new PrintWriter(fos);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * i then check the canBook method and according to the canBook method \n\t\t\t\t\t * i check if they can book, and if yes i add the reservation\n\t\t\t\t\t * otherwise it prints so the user may enter different values\n\t\t\t\t\t */\n\t\t\t\t\t{\n\t\t\t\t\t\tif(h.canBook(new Reservation(id,inMonth, inDay, OutDay)) == true) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treservation.add(new Reservation (id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\tr = new Reservation (id,inMonth, inDay, OutDay);\n\t\t\t\t\t\t\th.addResIfCanBook(new Reservation(id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\treservationsModel.addElement(r);\n\t\t\t\t\t\t\tpw.println( id + \" - \" + inMonth + \"-\"+ inDay+ \" - \" + outMonth + \"-\" + OutDay);\n\t\t\t\t\t\t\tpw.close();\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"These dates are already reserved\"\n\t\t\t\t\t\t\t\t\t+ \"\\nPlease try again!\");\t\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t/**\n\t\t\t\t * Then the catch Block checks for file not found exception\n\t\t\t\t */\n\t\t\t\tcatch (FileNotFoundException fnfe) \n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"File not found.\");\n\t\t\t\t}\n\t\t\t}",
"@RequestMapping(path = \"/availability\", method = RequestMethod.GET)\n public List<ReservationDTO> getAvailability(\n @RequestParam(value = \"start_date\", required = false)\n @DateTimeFormat(iso = ISO.DATE) LocalDate startDate,\n @RequestParam(value = \"end_date\", required = false)\n @DateTimeFormat(iso = ISO.DATE) LocalDate endDate) {\n\n Optional<LocalDate> optStart = Optional.ofNullable(startDate);\n Optional<LocalDate> optEnd = Optional.ofNullable(endDate);\n\n if (!optStart.isPresent() && !optEnd.isPresent()) {\n //case both are not present, default time is one month from now\n startDate = LocalDate.now();\n endDate = LocalDate.now().plusMonths(1);\n } else if (optStart.isPresent() && !optEnd.isPresent()) {\n //case only start date is present, default time is one month from start date\n endDate = startDate.plusMonths(1);\n } else if (!optStart.isPresent()) {\n //case only end date is present, default time is one month before end date\n startDate = endDate.minusMonths(1);\n } // if both dates are present, do nothing just use them\n\n List<Reservation> reservationList = this.service\n .getAvailability(startDate, endDate);\n\n return reservationList.stream().map(this::parseReservation).collect(Collectors.toList());\n }",
"@Test\n\tpublic void testListReservationsOfFacilityEqualInterval() {\n\t\t// create a reservation\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t// list start is now\n\t\tDate listStart = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 24);\n\t\t// list end is now + 24h\n\t\tDate listEnd = cal.getTime();\n\n\t\tReservation reservation1 = dataHelper.createPersistedReservation(USER_ID, Arrays.asList(room1.getId()),\n\t\t\t\tlistStart, listEnd);\n\n\t\t// should find above reservation\n\t\tCollection<Reservation> reservationsOfFacility;\n\t\treservationsOfFacility = bookingManagement.listReservationsOfFacility(room1.getId(), listStart, listEnd);\n\n\t\tassertNotNull(reservationsOfFacility);\n\t\tassertEquals(1, reservationsOfFacility.size());\n\t\tassertTrue(reservationsOfFacility.contains(reservation1));\n\t}",
"@Override\r\n\tpublic Booking_IF[] readBookingsByShiftId(int shift_id) {\r\n\t\tArrayList<Booking_IF> bookings = new ArrayList();\r\n\t\tPreparedStatement myStatement = null;\r\n\t\tResultSet myRs = null;\r\n\r\n\t\ttry{\r\n\t\t\tString sqlSelect = \"Select * from Booking where Shift_ID = ?\";\r\n\t\t\tmyStatement = myCon.prepareStatement(sqlSelect);\r\n\t\t\tmyStatement.setInt(1, shift_id);\r\n\t\t\tmyRs = myStatement.executeQuery();\r\n\r\n\t\t\twhile(myRs.next()) {\r\n\t\t\t\tint shiftid = myRs.getInt(\"Shift_ID\");\r\n\t\t\t\tint userid = myRs.getInt(\"User_ID\");\r\n\r\n\t\t\t\tBooking booking = new Booking(shiftid, userid);\r\n\t\t\t\tbookings.add(booking);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\ttry {\r\n\t\t\t\tif (myRs != null)\r\n\t\t\t\t\tmyRs.close();\r\n\t\t\t\tif (myStatement != null)\r\n\t\t\t\t\tmyStatement.close();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tBooking_IF[] ret = new Booking[bookings.size()];\r\n\t\treturn (Booking_IF[])bookings.toArray(ret);\r\n\t}"
] |
[
"0.6970009",
"0.6751226",
"0.6491935",
"0.64390355",
"0.6379424",
"0.63520765",
"0.6322135",
"0.63004935",
"0.62901217",
"0.62812525",
"0.6231307",
"0.62221026",
"0.6214941",
"0.62149143",
"0.61908495",
"0.6173655",
"0.6166067",
"0.6125877",
"0.61049336",
"0.6054923",
"0.60528284",
"0.6052405",
"0.60453105",
"0.6024406",
"0.59793276",
"0.59758",
"0.59444636",
"0.593567",
"0.5935325",
"0.5930784",
"0.59304696",
"0.5897623",
"0.58919215",
"0.5889769",
"0.58416075",
"0.5839152",
"0.5807713",
"0.5802894",
"0.5801016",
"0.57829463",
"0.5772823",
"0.5770549",
"0.5758603",
"0.5757687",
"0.5752694",
"0.57513857",
"0.57437253",
"0.5738598",
"0.57382077",
"0.5714987",
"0.57109773",
"0.5698109",
"0.5695665",
"0.56927615",
"0.56744146",
"0.5672671",
"0.56668466",
"0.5654549",
"0.5653993",
"0.56497693",
"0.5647567",
"0.5646938",
"0.56460583",
"0.5640695",
"0.55966",
"0.5579314",
"0.5571555",
"0.5560264",
"0.55558175",
"0.55548054",
"0.55416167",
"0.5533052",
"0.5516181",
"0.5515044",
"0.54967344",
"0.5491391",
"0.5486919",
"0.54702365",
"0.5467619",
"0.5459545",
"0.5453527",
"0.5447727",
"0.54436487",
"0.5435351",
"0.5434205",
"0.5428597",
"0.5428341",
"0.54226536",
"0.5420587",
"0.54205745",
"0.54200643",
"0.5414531",
"0.5412176",
"0.5406578",
"0.54062426",
"0.5400947",
"0.5398565",
"0.53933114",
"0.5393185",
"0.53806895",
"0.53795075"
] |
0.0
|
-1
|
Returns a string which contains the elements of the given array converted to strings and delimited by the given delimiter.
|
public static <T> String joinArrayItems(T[] array, String delimiter)
{
if (array.length == 0)
return "";
StringBuilder builder = new StringBuilder();
for (T item : array)
{
builder.append(item);
builder.append(delimiter);
}
String result = builder.toString();
return
result.substring(0, result.length() - delimiter.length());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static String stringArrayToString(String[] strA, String delimiter) {\r\n StringBuffer str = new StringBuffer();\r\n if (null == strA || strA.length == 0)\r\n return null;\r\n for (int i = 0; i < strA.length; i++) {\r\n str.append(strA[i]);\r\n if (i < strA.length - 1)\r\n str.append(delimiter);\r\n }\r\n return str.toString();\r\n }",
"private static String getToString(Object[] arr, String delim) {\n\t\tif (arr.length == 0) return \"\"; \n\t\t\n\t\tStringBuilder sb = new StringBuilder(\"[\");\n\t\t\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif (i > 0) sb.append(delim);\n\t\t\tsb.append(arr[i] == null ? \"\" : arr[i]);\n\t\t}\n\n\t\tsb.append(\"]\");\n\t\treturn sb.toString();\n\t}",
"private String convertToString(ArrayList<String> arr, char sep) {\n StringBuilder builder = new StringBuilder();\n // Append all Integers in StringBuilder to the StringBuilder.\n for (String str : arr) {\n builder.append(str);\n builder.append(sep);\n }\n // Remove last delimiter with setLength.\n builder.setLength(builder.length() - 1);\n return builder.toString();\n }",
"public static String arrayToSeparatedString(String[] arr, char separator) {\n return String.join(Character.toString(separator), arr);\n }",
"public static String join(String[] tokens, String delimiter) {\n\t\treturn join(tokens, delimiter, (tokens == null ? 0 : tokens.length));\n\t}",
"public static String join(String[] array, String separator) {\n int len = array.length;\n if (len == 0) return \"\";\n\n StringBuilder out = new StringBuilder();\n out.append(array[0]);\n for (int i = 1; i < len; i++) {\n out.append(separator).append(array[i]);\n }\n return out.toString();\n }",
"public static String join(CharSequence delimiter, Object[] tokens) {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tboolean firstTime = true;\r\n\t\tfor (Object token : tokens) {\r\n\t\t\tif (firstTime) {\r\n\t\t\t\tfirstTime = false;\r\n\t\t\t} else {\r\n\t\t\t\tsb.append(delimiter);\r\n\t\t\t}\r\n\t\t\tsb.append(token);\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}",
"public static String join(String[] array, String sep) {\n if (array == null || array.length == 0) {\n return \"\";\n }\n int len = array.length;\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < (len - 1); i++) {\n sb.append(array[i]).append(sep);\n }\n sb.append(array[len - 1]);\n return sb.toString();\n }",
"public static String getAsString(List<String> words, String delimiter) {\n /*StringBuilder result = new StringBuilder();\n for(int i = 0; i < words.size() - 1; i++) {\n result.append(words.get(i)).append(delimiter);\n }\n result.append(words.get(words.size() - 1));\n return result.toString();*/\n return ListArrayUtil.listToString(words, delimiter, \"\", \"\");\n }",
"public static String join(@NonNull CharSequence delimiter, @NonNull Iterable tokens) {\n final Iterator<?> it = tokens.iterator();\n if (!it.hasNext()) {\n return \"\";\n }\n final StringBuilder sb = new StringBuilder();\n sb.append(it.next());\n while (it.hasNext()) {\n sb.append(delimiter);\n sb.append(it.next());\n }\n return sb.toString();\n }",
"public static String join(CharSequence delimiter, Iterable tokens) {\n StringBuilder sb = new StringBuilder();\n Iterator<?> it = tokens.iterator();\n if (it.hasNext()) {\n sb.append(it.next());\n while (it.hasNext()) {\n sb.append(delimiter);\n sb.append(it.next());\n }\n }\n return sb.toString();\n }",
"@SuppressWarnings(\"rawtypes\")\r\n\tpublic static String join(CharSequence delimiter, Iterable tokens) {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tboolean firstTime = true;\r\n\t\tfor (Object token : tokens) {\r\n\t\t\tif (firstTime) {\r\n\t\t\t\tfirstTime = false;\r\n\t\t\t} else {\r\n\t\t\t\tsb.append(delimiter);\r\n\t\t\t}\r\n\t\t\tsb.append(token);\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}",
"public static String arrayToCommaSeparatedString(String[] arr) {\n return arrayToSeparatedString(arr, ',');\n }",
"public static <T> String createDelimitedString(Collection<T> collection, String delimiter) {\n\t\tif (collection == null)\n\t\t\treturn null;\n\t\tif (collection.isEmpty())\n\t\t\treturn \"\";\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (T element : collection) {\n\t\t\tsb.append(element.toString());\n\t\t\tsb.append(delimiter);\n\t\t}\n\t\treturn StringUtil.removeSuffix(sb.toString(), delimiter);\n\t}",
"public static String join(String[] array, char split) {\n if (array.length == 0) {\n return \"\";\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < array.length; i++) {\n if (i > 0) {\n sb.append(split);\n }\n sb.append(array[i]);\n }\n return sb.toString();\n }",
"public static String codeString(String[] sData, char delimiter) {\r\n String result = \"\";\r\n for (int i = 0; i < sData.length; i++) {\r\n if (i < sData.length - 1) {\r\n result += sData[i] + delimiter;\r\n } else {\r\n result += sData[i];\r\n }\r\n }\r\n return result;\r\n }",
"private static <T> String join(final Collection<T> s, final String delimiter) {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tIterator<T> iter = s.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tbuilder.append(iter.next());\n\t\t\tif (!iter.hasNext()) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbuilder.append(delimiter);\n\t\t}\n\t\treturn builder.toString();\n\t}",
"public static String join(List<String> s, String delimiter) {\n if (s.isEmpty()) return \"\";\n Iterator<String> iter = s.iterator();\n StringBuffer buffer = new StringBuffer(iter.next());\n while (iter.hasNext())\n buffer.append(delimiter).append(iter.next());\n return buffer.toString();\n }",
"public static String joinArray(String[] strs, String splitter){\n StringBuffer buf = new StringBuffer();\n for (int i = 0; i < strs.length; i++) {\n if (i>0){\n buf.append(splitter);\n }\n buf.append(strs[i]);\n }\n return buf.toString();\n }",
"public static String join(String[] array, String split) {\n if (array.length == 0) {\n return \"\";\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < array.length; i++) {\n if (i > 0) {\n sb.append(split);\n }\n sb.append(array[i]);\n }\n return sb.toString();\n }",
"public static String join(Collection<?> s, String delimiter) {\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tIterator<?> iter = s.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tbuffer.append(iter.next());\n\t\t\tif (iter.hasNext())\n\t\t\t\tbuffer.append(delimiter);\n\t\t}\n\t\treturn buffer.toString();\n\t}",
"public static String serialize( List<String> selectedValues, String delimiter )\n {\n return selectedValues == null ? \"\" : TextUtils.join( delimiter, selectedValues );\n }",
"public static String join(String delimiter, Collection<String> elements) {\n\t\tif (delimiter == null)\n\t\t\tthrow new NullPointerException(\"No delimiter given.\");\n\t\tif (elements == null)\n\t\t\tthrow new NullPointerException(\"No elements given.\");\n\n\t\tboolean first = true;\n\t\tStringBuilder builder = new StringBuilder();\n\n\t\tfor (String element : elements) {\n\t\t\tif (!first)\n\t\t\t\tbuilder.append(delimiter);\n\t\t\tbuilder.append(element);\n\t\t\tfirst = false;\n\t\t}\n\n\t\treturn builder.toString();\n\t}",
"public String stringJoin(Collection<? extends CharSequence> strings, CharSequence delimiter) {\n return EasonString.join(strings, delimiter);\n }",
"private static String arrayToString(int[] array) {\n\n String arrayOutput = \"\";\n\n // seperate the elements of the array and add each to the outputstring\n for (int position = 0; position < array.length; position++) {\n\n arrayOutput += array[position] + \", \";\n }\n\n // trim the outputstring of the last seperation char\n arrayOutput = arrayOutput.substring(0, (arrayOutput.length() - 1));\n\n // output the string of the integer array\n return arrayOutput;\n }",
"public static String join(String[] array)\n {\n if( array.length == 0 ) return Constants.BLANK;\n StringBuilder sb = new StringBuilder();\n for( String s : array )\n sb.append(s);\n return sb.toString();\n }",
"static String join(CharSequence separator, String[] strings) {\n\t\t// Ideally we don't have to duplicate the code here if array is\n\t\t// iterable.\n\t\tStringBuilder sb = new StringBuilder();\n\t\tboolean first = true;\n\t\tfor (String s : strings) {\n\t\t\tif (first) {\n\t\t\t\tfirst = false;\n\t\t\t} else {\n\t\t\t\tsb.append(separator);\n\t\t\t}\n\t\t\tsb.append(s);\n\t\t}\n\t\treturn sb.toString();\n\t}",
"private static String toString(final String...array) {\n if ((array == null) || (array.length <= 0)) return \" \";\n final StringBuilder sb = new StringBuilder();\n for (int i=0; i<array.length; i++) {\n if (i > 0) sb.append(\", \");\n sb.append(array[i]);\n }\n return sb.toString();\n }",
"public static String join(String delimiter, String... elements) {\n\t\tif (delimiter == null)\n\t\t\tthrow new NullPointerException(\"No delimiter given.\");\n\t\tif (elements == null)\n\t\t\tthrow new NullPointerException(\"No elements given.\");\n\n\t\tboolean first = true;\n\t\tStringBuilder builder = new StringBuilder();\n\n\t\tfor (String element : elements) {\n\t\t\tif (!first)\n\t\t\t\tbuilder.append(delimiter);\n\t\t\tbuilder.append(element);\n\t\t\tfirst = false;\n\t\t}\n\n\t\treturn builder.toString();\n\t}",
"public static String stringJoin(CharSequence delimiter, CharSequence... args) {\n StringBuilder builder = new StringBuilder();\n boolean first = true;\n for (CharSequence cs : args) {\n if (first) {\n first = false;\n } else {\n builder.append(delimiter);\n }\n builder.append(cs);\n }\n return builder.toString();\n }",
"public static String toString(double[] array)\r\n\t{\r\n\t\tString str = \"[ \";\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tstr += String.valueOf(array[i]) + \" \";\r\n\t\treturn str + \"]\";\r\n\t}",
"public static final String join(final String delimiter,\n\t\t\tfinal Object... value) {\n\t\tif (value == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\n\t\tif (value.length == 0) {\n\t\t\treturn EMPTY_STRING;\n\t\t}\n\n\t\tfinal String del = (delimiter == null) ? EMPTY_STRING : delimiter;\n\n\t\tStringBuilder builder = new StringBuilder();\n\t\tfor (int i = 0; i < value.length; ++i) {\n\t\t\tbuilder.append((value[i] == null) ? EMPTY_STRING : value[i]\n\t\t\t\t\t.toString());\n\t\t\tif (i == value.length - 1)\n\t\t\t\treturn builder.toString();\n\t\t\tbuilder.append(del);\n\t\t}\n\n\t\treturn builder.toString();\n\t}",
"public static String join(int[] array, String sep) {\n if (array == null || array.length == 0) {\n return \"\";\n }\n int len = array.length;\n StringBuffer sb = new StringBuffer();\n String item;\n for (int i = 0; i < (len - 1); i++) {\n item = (new Integer(array[i])).toString();\n sb.append(item).append(sep);\n }\n sb.append(array[len - 1]);\n return sb.toString();\n }",
"public static <T> String arrayToString(T[] list, Function<T,String> stringer) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"[\");\n\t\tfor (T i : list) {\n\t\t\tsb.append(stringer.apply(i));\n\t\t\tsb.append(\",\");\n\t\t}\n\t\tif (list.length>0)\n\t\t\tsb.deleteCharAt(sb.length()-1);\n\t\tsb.append(\"]\");\n\t\treturn sb.toString();\n\t}",
"public static String join(String[] tokens, String delimiter, int limit) {\n\t\tif (tokens == null || tokens.length == 0 || limit <= 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tbuffer.append(tokens[0]);\n\t\tlimit = Math.min(limit, tokens.length);\n\t\tfor (int i = 1; i < limit; i++) {\n\t\t\tbuffer.append(delimiter);\n\t\t\tbuffer.append(tokens[i]);\n\t\t}\n\t\treturn buffer.toString();\n\t}",
"public static String joinStrings(String[] a){\n String js=\"\";\n for (int i=0;i<a.length;i++){\n if (i==0){\n js = a[i];\n } else{\n js = js + \" \" + a[i];\n }\n }\n return js;\n }",
"public static String SeperateStrings(String separator, String[] strings){\r\n\t\tString rvString = \"\";\r\n\t\tfor (int i = 0; i < strings.length; i++) {\r\n\t\t\t//add seperator when the amount of strings is more than 1\r\n\t\t\tif (i != 0) {\r\n\t\t\t\trvString += separator;\r\n\t\t\t}\r\n\t\t\trvString += strings[i];\r\n\t\t}\r\n\t\treturn rvString;\r\n\t}",
"private static String compileArray(float[] array) {\n String arrayString = \"\\\"\";\n for (float number : array) {\n arrayString += Model.formatFloat(number) + \", \";\n }\n arrayString = arrayString.substring(0, arrayString.length() - 2);\n arrayString += \"\\\"\";\n return arrayString;\n }",
"public static final String join(final String delimiter, final List<?> value) {\n\t\tif (value == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\n\t\tIterator<?> it = value.iterator();\n\t\tif (!it.hasNext()) {\n\t\t\treturn EMPTY_STRING;\n\t\t}\n\n\t\tfinal String del = (delimiter == null) ? EMPTY_STRING : delimiter;\n\n\t\tStringBuilder builder = new StringBuilder();\n\t\tfor (;;) {\n\t\t\tObject val = it.next();\n\t\t\tbuilder.append(val == null ? EMPTY_STRING : val.toString());\n\t\t\tif (!it.hasNext())\n\t\t\t\treturn builder.toString();\n\t\t\tbuilder.append(del);\n\t\t}\n\t}",
"public static String join( Object[] col, String sep ) {\n StringBuffer sb = new StringBuffer();\n if ( col.length >= 1 ) {\n sb.append( getString_(col[0]) );\n }\n for ( int i = 1; i < col.length; i++ ) {\n sb.append( sep );\n sb.append( getString_(col[i]) );\n }\n return sb.toString();\n }",
"public static String join(String[] strings, String separator) {\n StringBuffer sb = new StringBuffer();\n int max = strings.length;\n for (int i = 0; i < max; i++) {\n if (i != 0)\n sb.append(separator);\n sb.append(strings[i]);\n }\n return sb.toString();\n }",
"public static String joinNames(String[] names, String delimiter) {\n return normalizer.joinNames(defaultRule, names, delimiter);\n }",
"public static String implode(char separator, String[] strings) {\n\t if (strings == null) return \"\";\n\t int len = -1;\n\t for (String string: strings) len += string.length() + 1;\n\t StringBuilder buf = new StringBuilder(len);\n\t boolean first = true;\n\t for (String string: strings) {\n\t\t if (first) first = false;\n\t\t else buf.append(separator);\n\t\t buf.append(string);\n\t }\n\t return buf.toString();\n }",
"private String arrayToString(double[] a) {\n StringBuffer buffy = new StringBuffer();\n for (int i=0; i<a.length; i++) {\n buffy.append(a[i]+\"\\t\");\n }\n return buffy.toString();\n }",
"private String arrayToString(double[] a) {\n StringBuffer buffy = new StringBuffer();\n for (int i=0; i<a.length; i++) {\n buffy.append(a[i]+\"\\t\");\n }\n return buffy.toString();\n }",
"public static String join(String[] array, String sep, String pre, String post) {\n if (array == null || array.length == 0) {\n return \"\";\n }\n int len = array.length;\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < (len - 1); i++) {\n sb.append(pre).append(array[i]).append(post).append(sep);\n }\n sb.append(pre).append(array[len - 1]).append(post);\n return sb.toString();\n }",
"public static String arrayAsString(int array[]) {\n\tString ret = \"\";\n\tfor(int i = 0; i < array.length; i++) {\n\t if(i == array.length-1) {\n\t\tret += array[i];\n\t } else {\n\t\tret += array[i] + \" \";\n\t }\n\t}\n\treturn ret;\n }",
"public static String serializeForSQL(String arr[]){\n\t\t\n\t\tString ret = \"\";\n\t\tif (arr != null){\n\t\t\tfor (int i = 0; i < arr.length; i++){\n\t\t\tif (i != 0){\n\t\t\t\tret += \",\";\n\t\t\t}\n\t\t\tret += \"'\"+arr[i]+\"'\";\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"public static String implodeArray(String[] inputArray, String glueString) {\n\n\t/** Output variable */\n\tString output = \"\";\n\n\tif (inputArray.length > 0) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(inputArray[0]);\n\n\t\tfor (int i=1; i<inputArray.length; i++) {\n\t\t\tsb.append(glueString);\n\t\t\tsb.append(inputArray[i]);\n\t\t}\n\n\t\toutput = sb.toString();\n\t}\n\n\treturn output;\n\t}",
"@Override\r\n\tpublic String toString(String delimiter) {\r\n\t\tString stackString = \"\";\r\n\t\tfor (T e: stack) {\r\n\t\t\tstackString = stackString + e + delimiter;\r\n\t\t}\r\n\t\treturn stackString.substring(0, stackString.length()-1);\r\n\t}",
"public static String join(String[] theParam, String separator) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < theParam.length; i++) {\n if (i > 0)\n sb.append(separator);\n sb.append(theParam[i]);\n }\n return sb.toString();\n }",
"private static String join(String prefix, String delimiter, Iterable<?> items) {\n if (items == null) return (\"\");\n if (prefix == null) prefix = \"\";\n\n StringBuilder sb = new StringBuilder();\n int i = 0;\n for (Object x : items) {\n if (!prefix.isEmpty()) sb.append(prefix);\n sb.append(x != null ? x.toString() : x).append(delimiter);\n i++;\n }\n if (i == 0) return \"\";\n sb.delete(sb.length() - delimiter.length(), sb.length());\n\n return sb.toString();\n }",
"public static String[] bytesToStringArray(byte[] array, char start, char... separators) {\n List<String> retVal = new ArrayList<String>();\n\n StringBuilder token = new StringBuilder();\n\n boolean isStarted = false;\n\n Character end = separators[separators.length - 1];\n\n List<Character> separator = new ArrayList<Character>();\n \n for(int i = 0; i < (separators.length - 1); i++) {\n separator.add(separators[i]);\n }\n \n for (byte b : array) {\n if (b == end) {\n if (token.length() > 0) {\n retVal.add(token.toString());\n }\n break;\n }\n\n if (isStarted) {\n\n if (separator.contains((Character) (char) b)) {\n retVal.add(token.toString());\n token = new StringBuilder();\n continue;\n }\n\n token.append((char) b);\n }\n\n if (b == start) {\n isStarted = true;\n }\n }\n\n\n return retVal.toArray(new String[]{});\n }",
"public String CombineAirportsToOneString(ArrayList<String> airportArrayToConvert) {\n String resultString = \"\";\n StringBuilder resultStringBuilder = new StringBuilder(resultString);\n for (int i = 0; i < airportArrayToConvert.size(); i++) {\n if (i == airportArrayToConvert.size() - 1) {\n resultStringBuilder.append(airportArrayToConvert.get(i));\n } else {\n resultStringBuilder.append(airportArrayToConvert.get(i)).append(\", \");\n }\n }\n resultString = resultStringBuilder.toString();\n return resultString;\n }",
"public static String join(char delim, Iterable<?> parts) {\n StringBuilder sb = new StringBuilder();\n for (Iterator<?> iter = parts.iterator(); iter.hasNext();) {\n sb.append(iter.next());\n if (iter.hasNext()) {\n sb.append(delim);\n }\n }\n return sb.toString();\n }",
"public String print(int[] array)\n {\n StringBuilder inputSB = new StringBuilder();\n String input;\n\n for(int i = 0; i < array.length; i++)\n {\n inputSB.append(array[i]);\n if(i != (array.length - 1))\n {\n inputSB.append(\",\");\n }\n }\n\n input = inputSB.toString();\n return input;\n }",
"public static String convertSkipArrayToString(ArrayList<Integer> skipsArray){\n String result = \"\";\n for (int i=0; i < skipsArray.size(); i+=1) {\n result += skipsArray.get(i);\n if (i+1 < skipsArray.size()){\n result += \",\";\n }\n }\n return result;\n }",
"public static String join(boolean[] array, String sep) {\n if (array == null || array.length == 0) {\n return \"\";\n }\n int len = array.length;\n StringBuffer sb = new StringBuffer();\n String item;\n for (int i = 0; i < (len - 1); i++) {\n item = (new Boolean(array[i])).toString();\n sb.append(item).append(sep);\n }\n sb.append(array[len - 1]);\n return sb.toString();\n }",
"public String toString() {\n String[] collect = new String[this.array.length];\n for (int i = 0; i < this.array.length; i++) {\n collect[i] = String.valueOf(this.array[i]);\n }\n return \"[\" + String.join(\";\", collect) + \"]\";\n }",
"public static String debugString(String[] arr) {\n return debugString(Arrays.asList(arr));\n }",
"@Override\r\n\tpublic String toString(String delimiter) {\r\n\t\tString queueList = \"\", prefix = \"\";\r\n\t\tArrayList<T> dataCopy = new ArrayList<T>();\r\n\t\tdataCopy = data;\r\n\r\n\t\tfor(T e: dataCopy) {\r\n\t\t\tqueueList += (prefix+e);\r\n\t\t\tprefix = delimiter;\r\n\t\t}\r\n\t\treturn queueList;\r\n\t}",
"public static String join(Collection<?> col, CharSequence delim) {\n return UtilValidate.isEmpty(col)\n ? null\n : col.stream().map(Object::toString).collect(Collectors.joining(delim));\n }",
"public static String arrayToString(int[] arr){\n\t\tStringBuffer ans = new StringBuffer();\n\t\tfor(int i=0;i<arr.length;i++)ans.append(arr[i]);\n\t\treturn ans.toString();\n\t}",
"public String RoutesArrayToString(ArrayList<Route> arrayToConvert) {\n String resultString = \"\";\n StringBuilder resultStringBuilder = new StringBuilder(resultString);\n for (int i = 0; i < arrayToConvert.size(); i++) {\n if (arrayToConvert.get(i).getAirlineID() >= 0) {\n String routeString =\n arrayToConvert.get(i).getSourceAirport()\n + \" to \"\n + arrayToConvert.get(i).getDestinationAirport();\n if (i == arrayToConvert.size() - 1) {\n resultStringBuilder.append(routeString);\n } else {\n resultStringBuilder.append(routeString).append(\", \");\n }\n }\n }\n resultString = resultStringBuilder.toString();\n return resultString;\n }",
"public static String join(String delim, Iterable<?> parts) {\n StringBuilder sb = new StringBuilder();\n for (Iterator<?> iter = parts.iterator(); iter.hasNext();) {\n sb.append(iter.next());\n if (iter.hasNext()) {\n sb.append(delim);\n }\n }\n return sb.toString();\n }",
"public static String join(String[] input)\n {\n StringBuilder sb = new StringBuilder();\n for(String value : input)\n {\n sb.append(value);\n sb.append(\" \");\n }\n return sb.toString();\n }",
"public String toString(){\r\n\t \tString str = \"\";\r\n\t \tint i=0;\r\n\t \tfor(; i < numElems-1; i++){\r\n\t \t\tstr += array[i].toString();\r\n\t \t\tstr += \", \";\r\n\t \t}\r\n\t \tstr += array[numElems-1];\r\n\t \treturn str;\r\n\t }",
"public static String join(Object[] list, String sep)\r\n {\r\n if (list == null)\r\n return null;\r\n \r\n if (sep == null)\r\n sep = \"\";\r\n \r\n StringBuffer buf = new StringBuffer();\r\n if (list.length > 0)\r\n buf.append(list[0]);\r\n \r\n for (int n = 1; n < list.length; n++)\r\n buf.append(sep).append(list[n]);\r\n \r\n return buf.toString();\r\n }",
"public static String toString(int[] theArray) {\n String str = \"{\";\n\n for (int i = 0; i < theArray.length; i++) {\n str+=theArray[i];\n //adds a comma after every number except the last one\n if(i+1 < theArray.length) {\n str += \",\";\n }\n }\n str += \"}\";\n return str;\n }",
"public static String join(List elements, String separator)\n {\n switch (elements.size())\n {\n case 0:\n return \"\";\n \n case 1:\n return String.valueOf(elements.get(0));\n \n default:\n \n StringBuilder buffer = new StringBuilder();\n boolean first = true;\n \n for (Object o : elements)\n {\n if (!first)\n buffer.append(separator);\n \n String string = String.valueOf(o);\n \n if (string.equals(\"\"))\n string = \"(blank)\";\n \n buffer.append(string);\n \n first = false;\n }\n \n return buffer.toString();\n }\n }",
"public String getArrayValues(){\n String tempString = \"\";\r\n for(int y = 0; y < this.arraySize; y++){\r\n tempString += \" \"+this.arr[y]+\" \";\r\n }\r\n return tempString;\r\n }",
"public static String intArrayToString(int[] intArray) {\n String ret = \"\";\n for (int i = 0; i < intArray.length; i++) {\n if (ret.length() > 0)\n ret = ret + \",\" + Integer.toString(intArray[i]);\n else\n ret = Integer.toString(intArray[i]);\n }\n return ret;\n }",
"public static String deCharArrayAString(char[] array) {\r\n\t\tString aux = \"\";\r\n\t\tfor (int i = 0; i < array.length; i++) {\r\n\t\t\taux = aux + array[i];\r\n\t\t}\r\n\t\treturn aux;\r\n\t}",
"public static final <T> StrBuilder ARRAY_TO_STRING(T[][] ar){\n\t\tStrBuilder ret = new StrBuilder(50);\n\t\tfor(int row=0; row<ar.length; row++){ //TODO not null save\n\t\t\tif(ar[row]==null){\n\t\t\t\tret.append(\"[\").append(row).appendln(\"]: null\");\n\t\t\t}\n\t\t\telse if(ar[row].length==0){\n\t\t\t\tret.append(\"[\").append(row).appendln(\"]: 0\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int col=0; col<ar[row].length; col++){\n\t\t\t\t\tret.append(\"[\").append(row).append(\"][\").append(col).append(\"]: \");\n\t\t\t\t\tif(ar[row][col]==null){\n\t\t\t\t\t\tret.appendln(\"null\");\n\t\t\t\t\t}\n\t\t\t\t\telse if(\"\".equals(ar[row][col])){\n\t\t\t\t\t\tret.appendln(\"0\");\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tret.appendln(ar[row][col]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"public static String[] stringToStringArray(String instr, String delim)\n throws NoSuchElementException, NumberFormatException {\n StringTokenizer toker = new StringTokenizer(instr, delim);\n String stringArray[] = new String[toker.countTokens()];\n int i = 0;\n \n while (toker.hasMoreTokens()) {\n stringArray[i++] = toker.nextToken();\n }\n return stringArray;\n }",
"private String array2CSV(){\r\n String returnMsg = \"\";\r\n for(String[] line : this.linesToPrint){\r\n for(String item : line){\r\n returnMsg += item;\r\n returnMsg += \";\";\r\n }\r\n returnMsg = returnMsg.substring(0,returnMsg.length()-1);\r\n returnMsg += \"\\n\";\r\n }\r\n return returnMsg;\r\n }",
"public static String arrayToString(String[] a, String div){\n\t\tString output = \"\";\n\t\tfor(int i=0; i<a.length; i++){\n\t\t\tif (a[i].equals(\"\"))\n\t\t\t\ta[i] = \"<-_->\";\n\t\t\toutput=output+a[i];\n\t\t\tif (i<a.length-1)\n\t\t\t\toutput=output+div;\n\t\t}\n\t\t//what the fuck is this a java bug????????\n\t\tfor(int i=0; i<a.length; i++){\n\t\t\tif (a[i].equals(\"<-_->\"))\n\t\t\t\ta[i] = \"\";\n\t\t}\n\t\treturn output;\n\t}",
"public static <T> String join(char delim, Iterable<T> parts, Function<T, String> stringConvert) {\n StringBuilder sb = new StringBuilder(256);\n for (Iterator<T> it = parts.iterator(); it.hasNext();) {\n String sv = stringConvert.apply(it.next());\n if (sv != null && !sv.isEmpty()) {\n if (sb.length() > 0) {\n sb.append(delim);\n }\n sb.append(sv);\n }\n }\n return sb.toString();\n }",
"public static String arrayToString (int[][] a){\r\n\t\tString toString = \"\";\r\n\t\tfor (int r=0 ;r<a.length;r++) {\r\n\t\t\tfor (int c=0;c<a[0].length;c++) {\r\n\t\t\t\ttoString+=a[r][c];\r\n\t\t\t\t\tif (c<a[0].length-1)\r\n\t\t\t\t\ttoString+=\" \";\r\n\t\t\t}\r\n\t\t\t\t\tif (r<a.length-1)\r\n\t\t\t\t\ttoString+=\"\\n\";\r\n\t\t}\r\n\t\treturn toString;\r\n\t}",
"private String constructList(String[] elements) throws UnsupportedEncodingException {\n if (null == elements || 0 == elements.length)\n return null;\n StringBuffer elementList = new StringBuffer();\n\n for (int i = 0; i < elements.length; i++) {\n if (0 < i)\n elementList.append(\",\");\n elementList.append(elements[i]);\n }\n return elementList.toString();\n }",
"public static String arrayToString(int[] mySortingArray) {\r\n\t\tStringBuilder sb = new StringBuilder(\"{\");\r\n\t\tString comma = null;\r\n\r\n\t\tfor (int element : mySortingArray) {\r\n\t\t\tsb.append((comma == null ? \"\" : comma) + element);\r\n\t\t\tcomma = \",\";\r\n\t\t}\r\n\t\tsb.append(\"}\");\r\n\t\treturn sb.toString();\r\n\t}",
"public static void print(int[] a, String delimiter) {\n\n for (int i = 0; i < a.length; i++) {\n System.out.print(a[i] + delimiter);\n }\n System.out.println();\n }",
"public static String convertCoordinatesArrayToString(ArrayList<LatLng> coordsArray){\n String result = \"\";\n LatLng coord;\n for (int i=0; i < coordsArray.size(); i+=1) {\n coord = coordsArray.get(i);\n result += coord.latitude + \",\";\n result += coord.longitude;\n if (i+1 < coordsArray.size()){\n result += \",\";\n }\n }\n return result;\n }",
"public static String doubleArrayToString (double[] arr, int d) {\n\t\tString str = \"\";\n\t\tif (d == 0) return str;\n\n\t\tstr += arr[0];\n\t\tfor (int i=1; i<d; i++) {\n\t\t\tstr += \"\\t\" + arr[i];\n\t\t}\n\t\treturn str;\n\t}",
"public static String listArray(int num[]) {\n String out = \"{\"; //prints out { for beginingg output of an array output\n for (int j = 0; j < num.length; j++) { //loops through array \n if (j > 0) { //if the indice is greater than 0, print a comma to seperate the array elements neatly\n out += \", \";\n }\n out += num[j]; //assigns the value of the array at num[j] to out\n }\n out += \"} \"; //ending part of 'out' String\n return out; //return out string \n }",
"public static String arrayToString(double[] a, String div){\n\t\tString output = \"\";\n\t\tfor(int i=0; i<a.length; i++){\n\t\t\toutput=output+\"\"+a[i];\n\t\t\tif (i<a.length-1)\n\t\t\t\toutput=output+div;\n\t\t}\n\t\treturn output;\n\t}",
"public static String toString(String format, double[] array)\r\n\t{\r\n\t\tString str = \"[ \";\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tstr += String.format(format, array[i]) + \" \";\r\n\t\treturn str + \"]\";\r\n\t}",
"public static String implode(char separator, String addedString, String[] strings) {\n\t if (strings == null) return addedString;\n\t int len = addedString.length();\n\t for (String string: strings) len += string.length() + 1;\n\t StringBuilder buf = new StringBuilder(len);\n\t buf.append(addedString);\n\t for (String string: strings) {\n\t\t buf.append(separator);\n\t\t buf.append(string);\n\t }\n\t return buf.toString();\n }",
"public static <T> String arrayToString(T[] list) {\n\t\treturn arrayToString(list, o->o.toString());\n\t}",
"public static <E> String[] toStringArray(final E[] array) {\n String[] stringList = null;\n if (array != null) {\n stringList = new String[array.length];\n for (int i = 0; i < array.length; i++) {\n if (array[i] != null) {\n stringList[i] = array[i].toString();\n } else {\n stringList[i] = null;\n }\n }\n }\n return stringList;\n }",
"public static void printArray(String[] a,String sep) {\n\t\tfor(int i=0;i<a.length;i++) {\n\t\t\tSystem.out.print(a[i]+sep);\n\t\t}\n\t\tSystem.out.println();\n\t}",
"String[] toCSV() throws Exception;",
"public String toString() {\n\t\tString str = new String ();\n\t\tfor (int i = 0; i <size; i++)\n\t\t{\n\t\t\tstr +=\"(\" + i +\")\" + arr[i] + \"\\n\";\n\t\t}\n\t\treturn str;\n\t}",
"public static String ToString(Object[] s) {\n\t\tString ret = \"\";\n\t\tfor (int i = 0; i < s.length; i++)\n\t\t\tret += s[i];\n\t\treturn ret;\n\t}",
"public String joinedDurationsToString( int[][] data, String sep, int sepFirst, int sepInterval )\n {\n if ( data == null )\n return \"** No signal **\";\n StringBuilder sb = new StringBuilder();\n for ( int[] d : data )\n {\n if ( sb.length() > 0 )\n sb.append( ' ' );\n sb.append( durationsToString( d, sep, sepFirst, sepInterval ) );\n }\n return sb.toString();\n }",
"@Override\n\tpublic String toString(String delimiter) {\n\t\t//Invert the stack by pushing Nodes to a new Stack\n\t\tMyStack<T> invertedStack = new MyStack<T>(this.size());\n\t\twhile(!this.isEmpty()) {\n\t\t\tinvertedStack.push(this.pop());\n\t\t}\n\t\t\n\t\t//Create empty String for returning\n\t\tString returnString = \"\";\n\t\t\n\t\t//Create an iterator for traversing the Stack\n\t\tNode iteratorNode = invertedStack.topNode;\n\t\t\n\t\t//Traverse the Stack and append the individual data Strings to the return String\n\t\tfor(int i = 0; i < invertedStack.size() - 1; i++) {\n\t\t\treturnString += iteratorNode.data.toString() + delimiter;\n\t\t\titeratorNode = iteratorNode.nextNode;\n\t\t}\n\t\t\n\t\t//Add the bottom Node's data to the returnString (prevents extra terminating delimiter)\n\t\treturnString += iteratorNode.data.toString();\n\t\t\n\t\t//Restore the original Stack so that it isn't destroyed\n\t\twhile(!invertedStack.isEmpty()) {\n\t\t\tthis.push(invertedStack.pop());\n\t\t}\n\t\t\n\t\t//Return the finished String to the function caller\n\t\treturn returnString;\n\t}",
"public String ArrayToString(ArrayList<Card> Arr){\n String ArrayContents1 = \"\"; //contents of array\n for(int i =0; i< Arr.size(); i++){\n Card card = Arr.get(i);\n\n String cardNameString = card.getCardName();\n ArrayContents1= ArrayContents1 + \", \" + cardNameString;\n }\n return ArrayContents1;\n }",
"public static String toString(Deque<?> deque, String sep) {\n\t\treturn deque.stream().map(o -> o.toString()).collect(Collectors.joining(sep));\n\t}",
"public static <T> String toString(T[] collection) {\n return toString(Arrays.asList(collection));\n }",
"public String toString(){\r\n\t\tString str = \"|\";\r\n\t\tArrayNode<T> temp = beginMarker.next;\r\n\t\twhile (temp != endMarker){\r\n\t\t\tstr+= temp.toString() + \"|\";\r\n\t\t\ttemp = temp.next;\r\n\t\t}\r\n\t\treturn str;\r\n\t}"
] |
[
"0.7504175",
"0.741158",
"0.7139869",
"0.7044944",
"0.67748255",
"0.6698862",
"0.6679079",
"0.6528675",
"0.64508176",
"0.6419395",
"0.6407186",
"0.63999003",
"0.6305997",
"0.62749094",
"0.6265214",
"0.62569577",
"0.6241348",
"0.6172592",
"0.6160464",
"0.6157857",
"0.61569774",
"0.612444",
"0.61193204",
"0.6102232",
"0.6088296",
"0.60427874",
"0.60329586",
"0.6027355",
"0.600543",
"0.6000074",
"0.5987877",
"0.5939735",
"0.59230286",
"0.59125286",
"0.5882454",
"0.5856496",
"0.5834747",
"0.58318543",
"0.5803106",
"0.57913107",
"0.5783049",
"0.5761555",
"0.5723926",
"0.5712463",
"0.5712463",
"0.5707364",
"0.5705543",
"0.5696264",
"0.56782085",
"0.5662719",
"0.5644467",
"0.5627643",
"0.562688",
"0.5625284",
"0.56240743",
"0.56214345",
"0.5618655",
"0.55927473",
"0.55559987",
"0.5540569",
"0.5524474",
"0.55193335",
"0.5509731",
"0.55054003",
"0.54943293",
"0.54409325",
"0.54370254",
"0.5419272",
"0.54018885",
"0.53992265",
"0.5389786",
"0.53715533",
"0.53571343",
"0.5356027",
"0.5332328",
"0.5327736",
"0.53184146",
"0.5315638",
"0.5307091",
"0.5300513",
"0.5299426",
"0.5275547",
"0.5267047",
"0.5266899",
"0.526353",
"0.52462673",
"0.52359444",
"0.52279365",
"0.5227432",
"0.52240837",
"0.5190816",
"0.51826143",
"0.5180619",
"0.51647884",
"0.5141171",
"0.51371217",
"0.51349247",
"0.51312083",
"0.5126306",
"0.51164"
] |
0.77029014
|
0
|
HTTP status adatok loggolasa
|
protected String logStatus(ClientRequestContext requestContext, ClientResponseContext responseContext) throws IOException {
StringBuilder msg = new StringBuilder();
msg.append("< status: [");
if (responseContext.getStatusInfo() != null) {
msg.append(responseContext.getStatusInfo().getStatusCode());
msg.append("]; family: [").append(responseContext.getStatusInfo().getFamily());
msg.append("]; reasonPhrase: [").append(responseContext.getStatusInfo().getReasonPhrase()).append("]");
}
msg.append("]\n");
return msg.toString();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Http.Status status();",
"@Override\n public void onSuccess(int statusCode, cz.msebera.android.httpclient.Header[] headers, JSONObject response) {\n try {\n String status = response.getString(\"status\");\n if (status.contains(\"status not ok\")) {\n lt.error();\n Toast.makeText(activity, response.getString(\"error\"), Toast.LENGTH_LONG).show();\n } else {\n lt.success();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"int getStatusCode( );",
"private static int checkStatus(String param) throws IOException {\n\t\tURL url = new URL(Utils.getURL() + \"/status?who=\" + param + \"&login=\" + login + \"&password=\" + password);\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tString resp;\n\t\ttry (InputStream is = conn.getInputStream()) {\n\t\t\tGson gson = new GsonBuilder().create();\n\t\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\t\t\tbyte[] buff = new byte[10240];\n\t\t\tint r;\n\t\t\tdo {\n\t\t\t\tr = is.read(buff);\n\t\t\t\tif (r > 0) bos.write(buff, 0, r);\n\t\t\t} while (r != -1);\n\t\t\tresp = new String(bos.toByteArray(), StandardCharsets.UTF_8);\n\t\t\tMap<String, Boolean> onlineMap = gson.fromJson(resp, TreeMap.class);\n\t\t\tUtils.printOnlineStats(onlineMap);\n\t\t}\n\t\treturn conn.getResponseCode();\n\t}",
"private String httpOk() {\n return \"HTTP/1.1 200 OK\\r\\n\"\n + \"Content-Type: text/html\\r\\n\"\n + \"\\r\\n\";\n }",
"boolean hasLoginapisuccessfulhitcount();",
"int getStatusCode();",
"int getStatusCode();",
"String getLoginapisuccessfulhitcount();",
"public abstract int statusCode();",
"public String status() throws Exception {\n\n \t\tString apiUrl = \"api/status.json\";\n \t\t\n \t\tString url = this.baseUrl + apiUrl;\n\n URL urlObj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) urlObj.openConnection();\n\n con.setRequestMethod(\"GET\");\n\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n int responseCode = con.getResponseCode();\n String response = \"\";\n\t\tif (responseCode == 200) {\n response = buildReponse(con);\n\t\t} else {\n\t response = \"{'error': 'Something went wrong, looks like the server is down.'}\";\n\t\t}\n\n\t\treturn response; \n \t}",
"@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String resp_content = \"\";\n\n try {\n resp_content = new String(responseBody,\"UTF-8\");\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n try {\n\n displayLogin(view,resp_content);\n\n } catch (Throwable e) {\n Toast.makeText(LoginActivity.this, \"Koneksi Gagal ! 1\", Toast.LENGTH_LONG).show();\n }\n }",
"public int statusCode(){\n return code;\n }",
"private void updatestatuscode() {\r\n String error = null;\r\n if (inValidStatus()) {\r\n error = getJson(\"msg\");\r\n }\r\n if (error != null) {\r\n if (error.equals(\"Cannot login Check your username or pass\")) {\r\n statuscode = 1;\r\n } else if (error.equals(\"Your account is not premium\")) {\r\n statuscode = 2;\r\n } else {\r\n /* TODO: Enable code below once all known errors are correctly handled */\r\n // statuscode = 666;\r\n }\r\n } else {\r\n if (inValidStatus() && \"null\".equalsIgnoreCase(getJson(\"link\"))) {\r\n statuscode = 3;\r\n } else {\r\n /* Everything should be ok */\r\n statuscode = 0;\r\n }\r\n }\r\n }",
"public void setAsSuccessful_OK(){\n setStatus(200);\n }",
"@Override\n public RestStatus status() {\n return response.status();\n }",
"private String setServerStatusCode()\n\t{\n\t\t\n\t\tString response = null;\n\t HttpClient client = new DefaultHttpClient();\n\t HttpPost post = new HttpPost(\"http://10.184.0.132:8005/ContextAwareFrameworkWebService/apiCheckTest1\");\n\t Log.d(\"Debug\",\"test1\");\n\t // set values you'd like to send\n\t List pairs = new ArrayList();\n\t //pairs.add(new BasicNameValuePair(\"devEmail\", developerEmail));\n\t //pairs.add(new BasicNameValuePair(\"apiKey\", ApiKey));\n\t pairs.add(new BasicNameValuePair(\"pkgName\", appPkgName));\n\t pairs.add(new BasicNameValuePair(\"appId\", appId));\n\t pairs.add(new BasicNameValuePair(\"userEmail\", userEmailId));\n\t pairs.add(new BasicNameValuePair(\"\", deviceId));\n\t pairs.add(new BasicNameValuePair(\"random\", \"randomConstant\"));\n\t try {\n\t post.setEntity(new UrlEncodedFormEntity(pairs));\n\t // set ResponseHandler to handle String responses\n\t ResponseHandler<String> responseHandler = new BasicResponseHandler();\n\t response = client.execute(post, responseHandler);\n\t serverRequestStatus = true;\n\t serverStatus = response;\n\t Log.v(\"HttpPost\", \"Response: \" + serverStatus);\n\t } \n\t catch (Exception e) \n\t {\n\t \tLog.e(\"Debug\",\"Error in post method\");\n\t \te.printStackTrace();\n\t }\n\t \n\t return response;\n\t}",
"public void loginStatus(Boolean success) {\n if (success.equals(true))\n System.out.println(\"Login Successful\");\n else {\n System.out.println(\"Login Failed -> Username or password may be incorrect\");\n }\n }",
"public StatusCode GetStatus();",
"@Override\n\tpublic void doPostStatus(LoginDetails loginDetails) {\n\t\tSystem.out.println(\"Boomer post status\");\t\n\t\t\t\n\t}",
"private void respAuth() throws Exception {\n DataOutputStream dos = new DataOutputStream(os);\n dos.writeInt(1);\n dos.writeByte(Message.MSG_RESP_AUTH);\n if (haslogin) {\n dos.writeByte(Message.SUCCESS_AUTH);\n } else {\n dos.writeByte(Message.FAILED_AUTH);\n }\n }",
"@Test(priority=1)\n\tpublic void teststatuscode() {\n\t\t\n\t\twhen()\n\t\t\t.get(\"http://jsonplaceholder.typicode.com/posts/1\")\n\t\t.then()\n\t\t\t.statusCode(200);\n\t\t\t//.log().all();\n\t}",
"String status();",
"String status();",
"public static int getStatusCode() {\r\n\r\n\r\n\r\n\t\tCloseableHttpResponse response= postSoapRequest(\"getDealList_Request\",baseURI);\r\n\r\n\r\n\r\n\t\tint statuseCode=response.getStatusLine().getStatusCode();\r\n\r\n\t\tSystem.out.println(\"statuseCode= \"+statuseCode);\r\n\r\n\t\t//Assert.assertEquals(200,statuseCode);\r\n\r\n\t\treturn statuseCode;\r\n\r\n\t}",
"public boolean getResponseStatus();",
"public static String check() {\n\t\ttry {\n\t\t\tString status = null;\n\t\t\t// Envia uma solicitacao de variavel para o ESP32\n\t\t\tSystem.out.print(\"Enviando Request ao ESP32... \");\n \t \tHttpClient client = HttpClient.newHttpClient();\n HttpRequest request = HttpRequest.newBuilder() // Request para atualizar a valor do sensor \n .uri(URI.create(\"http://\" + ESP32IP + \"/checkLight\")) \n .build();\n HttpRequest request2 = HttpRequest.newBuilder() // Request para retornar o valor do sensor\n .uri(URI.create(\"http://\" + ESP32IP + \"/Light\")) \n .build();\n HttpResponse<String> response = client.send(request,\n \t\t\tHttpResponse.BodyHandlers.ofString());\n HttpResponse<String> response2 = client.send(request2,\n \t\t\tHttpResponse.BodyHandlers.ofString());\n \n System.out.println(\"Pronto!\");\n \n // Organiza a resposta em JSON\n Gson gson = new Gson();\n ReturnValues Jresponse = gson.fromJson(response.body(), ReturnValues.class);\n \n // Verifica a variavel e exibe a resposta\n if(Jresponse.getLight()) {\n \tstatus = \"On\";\n \tSystem.out.println(\"A luz esta ligada\");\n } else if(!Jresponse.getLight()) {\n \tstatus = \"Off\";\n \tSystem.out.println(\"A luz esta desligada\");\n } else {\n \tstatus = \"Erro\";\n \tSystem.out.println(\"Nao foi possivel reconhecer o estado da luz\");\n }\n return status;\n } catch (Exception e) {\n \t System.out.printf(\"\\n Nao foi possivel conectar ao ESP32\");\n \t // e.printStackTrace();\n \t return \"Erro\";\n }\n\t}",
"public int get_http_status_code () {\n\t\treturn http_status_code;\n\t}",
"@Test\n\tpublic void teststatuscode() {\n\t\t\n\t\tgiven()\n\t\t\n\t\t.when()\n\t\t\t.get(\"http://jsonplaceholder.typicode.com/posts/5\")\n\t\t.then()\n\t\t\t.statusCode(200)\n\t\t\t.log().all();\n\t}",
"public boolean isSuccessful() {\n return code >= 200 && code < 300;\n }",
"protected void TextHttp() {\n\t\tLoginBean loginb = new LoginBean();\n\t\tloginb.setPhone(\"15236290644\");\n\t\tActivityDataRequest.getLoginCheck(TagConfig.TAG_MSG,this, loginb);\n\t\t\n\t\tLoginBean loginb2 = new LoginBean();\n\t\tloginb2.setPhone(\"15631001601\");\n\t\tActivityDataRequest.getLoginCheck(2,this, loginb2);\n\t\t\n\t}",
"@Test\n public void testConnectionWhenGoodLogs() {\n \tForm form = new Form();\n \tform.param(\"login\", \"user\");\n \tform.param(\"psw\", \"12345\");\n \t\n \tResponse connect = target.path(\"auth\").request().post(Entity.form(form));\n \tassertEquals(230,connect.getStatus());\n }",
"private void loginSuccess(String uname) {\n }",
"abstract Integer getStatusCode();",
"boolean hasLoginapiavgrtt();",
"private void setStatus(HttpRequest request, HttpResponse response) {\r\n\r\n\t\tString msg = \"OK\";\r\n\t\tint statusCode = 200;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tGridStatus status = GridStatus.fromString(request.getQueryParameter(\"status\"));\r\n\t\r\n\t\t\tif (GridStatus.ACTIVE.equals(status) || GridStatus.INACTIVE.equals(status)) {\r\n\t\t\t\tgetRegistry().getHub().getConfiguration().custom.put(STATUS, status.toString());\r\n\t\t\t} else {\r\n\t\t\t\tthrow new IllegalArgumentException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (RemoteProxy proxy : getRegistry().getAllProxies().getSorted()) {\r\n\t\t\t\tNodeStatusServletClient nodeStatusClient = ((CustomRemoteProxy)proxy).getNodeStatusClient();\r\n\t\t\t\tnodeStatusClient.setStatus(status);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tmsg = \"you must provide a 'status' parameter (either 'active' or 'inactive')\";\r\n\t\t\tstatusCode = 500;\r\n\t\t} catch (UnirestException | SeleniumGridException e) {\r\n\t\t\tmsg = String.format(\"Error while forwarding status to node: %s\", e.getMessage());\r\n\t\t\tstatusCode = 500;\r\n\t\t}\r\n\r\n\t\tresponse.setHeader(\"Content-Type\", MediaType.JSON_UTF_8.toString());\r\n\t\tresponse.setStatus(statusCode);\r\n\t\ttry {\r\n\t\t\tresponse.setContent(msg.getBytes(UTF_8));\r\n\t\t} catch (Throwable e) {\r\n\t\t\tthrow new GridException(e.getMessage());\r\n\t\t}\r\n\t}",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"int getStatus();",
"HttpStatusCode getStatusCode();",
"boolean isLogin(String username, String password)\n {\n String endURL = \"login/\" + username + \"/\" + password;\n return (request(\"GET\", \"\", endURL).equals(\"SUCCESSFUL\"));\n }",
"@GET\n @Path(\"/ping\")\n\tpublic Response ping() {\n\t\tlog.debug(\"Ping check ok\");\n return Response.status(Response.Status.OK).entity(1).build();\n \n\t}",
"public boolean isHttpOK(){\n return getStatusCode() == HttpURLConnection.HTTP_OK;\n }",
"protected static boolean ok(int status) {\n return (status >= 200 && status < 300);\n }",
"@Override\n public void handle(\n AuthzTrans trans,\n HttpServletRequest req,\n HttpServletResponse resp) throws Exception {\n Result<Date> r = context.doesCredentialMatch(trans, req, resp);\n if (r.isOK()) {\n resp.setStatus(HttpStatus.OK_200);\n } else {\n // For Security, we don't give any info out on why failed, other than forbidden\n // Can't do \"401\", because that is on the call itself\n // 403 Implies you MAY NOT Ask.\n resp.setStatus(HttpStatus.NOT_ACCEPTABLE_406);\n }\n }",
"@Test\n public void teststatusCode() {\n\t \n\t given().\n\t \tget(\"https://reqres.in/api/unknown\").\n\t then().\t\t\n\t \tstatusCode(200);\n\t \n }",
"@Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n Toast.makeText(getActivity().getApplicationContext(),\n \"Jam SUCCEEDED!\", Toast.LENGTH_SHORT)\n .show();\n }",
"@Test(priority=1)\r\n\tpublic void validateStatusCode()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then()\r\n\t\t.statusCode(200);\r\n\t\t\r\n\t}",
"Response.StatusType getStatus(Exception exception);",
"public static Integer getStatusCode() {\n Response res = (Response) Serenity.getCurrentSession().get(\"apiResponse\");\n return res.then().extract().statusCode();\n //return SerenityRest.then().extract().statusCode();\n }",
"void successLogin();",
"@Test\r\n\tpublic void testResponseCode(){\r\n\t\t\r\n\t\tint code = get(api1).getStatusCode();\r\n\t\tSystem.out.println(\"Code: \"+code);\r\n\t\tAssert.assertEquals(code, 200);\r\n\t}",
"protected abstract boolean isExpectedResponseCode(int httpStatus);",
"@RequestMapping(value = \"/status\", method = RequestMethod.GET)\n public String status()\n {\n return \"status\";\n }",
"@GetMapping(\"/api/v1/login\")\n public String login() {\n return \"Success\";\n }",
"protected Integer doInBackground(Void... params) {\n httpClient = new DefaultHttpClient();\n int loginStatus = 0;\n try {\n //设置请求的路径\n httpPost = new HttpPost(url + \"/login\");\n //创建一个用户,用于向服务端发送数据时,存放的实体\n JSONObject data = new JSONObject();\n try {\n //将用户填写的账号和密码存放到JSONObject中\n data.put(\"email\", mEmail);\n data.put(\"password\", mPassword);\n } catch (JSONException e1) {\n e1.printStackTrace();\n }\n //设置请求体\n httpPost.setEntity(new StringEntity(data.toString()));\n //执行请求获取响应\n response = httpClient.execute(httpPost);\n //如果响应的状态码为200时,表示请求响应成功\n Log.d(TAG, \"post request\");\n while (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {\n //获取响应的实体数据\n entity = response.getEntity();\n StringBuilder sb = new StringBuilder();\n //通过reader读取实体对象包含的数据\n BufferedReader reader = new BufferedReader(new InputStreamReader(entity.getContent()));\n //循环读取实体里面的数据\n String s;\n while ((s = reader.readLine()) != null) {\n sb.append(s);\n }\n //创建一个JSONObject对象存放从服务端获取到的JSONObject数据\n JSONObject datas = new JSONObject(sb.toString());\n //创建一个boolean变量用于存放服务端的处理结果状态\n loginStatus = datas.getInt(\"status\");\n System.out.println(\"Campus\" + datas.toString());\n Log.d(TAG, \"the status is \" + loginStatus);\n\n\n }\n if (loginStatus == 0) {\n Log.d(TAG, response.getStatusLine().toString());\n BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));\n StringBuilder sb = new StringBuilder();\n String s;\n Log.d(TAG, \"html body dumped\");\n while ((s = reader.readLine()) != null) {\n sb.append(s);\n }\n Log.v(TAG, sb.toString());\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return loginStatus;\n }",
"UserStatus getStatus();",
"RequestStatus getStatus();",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n String bsn = request.getParameter(\"bsn\");\n String uuid = request.getParameter(\"uuid\");\n if (service.ActivateUser(bsn, uuid)) { \n PrintWriter out = response.getWriter();\n out.println(\"Uw account is succesvol geregistreerd. U kunt nu inloggen op de website van de Rekeningrijder.\");\n }\n else {\n PrintWriter out = response.getWriter();\n out.println(\"Registratie is mislukt. Mogelijk is de link verlopen of is de account al geactiveerd.\");\n }\n } catch (Exception ex) {\n PrintWriter out = response.getWriter();\n out.println(\"Er is een fout opgetreden: \" + ex.toString());\n }\n }",
"void logoutSuccessful();",
"public String getStatus() { return status; }",
"@Test\n\tpublic void checkStatus() {\n\t\tclient.execute(\"1095C-16-111111\");\n\t}",
"private int checkServerResponse(String message) {\n \t\tif (message.substring(0, 2).equalsIgnoreCase(\"ok\")) {\n \t\t\treturn HGDConsts.SUCCESS;\n \t\t}\n \t\treturn HGDConsts.FAILURE;\n \t}",
"boolean isSuccessful();",
"private Integer getStatus(Map<String, Object> info) {\n return 200;\n }",
"public int getStatus();",
"public int getStatus();",
"public int getStatus();",
"boolean hasLoginResponse();",
"@Override\n\t\tpublic void setStatus(int status) {\n\t\t\t\n\t\t}",
"boolean hasLoginapihitcount();",
"private void sendStatus(HttpRequest request, HttpResponse response) {\r\n\t\tresponse.setHeader(\"Content-Type\", MediaType.JSON_UTF_8.toString());\r\n\t\tresponse.setStatus(200);\r\n\t\ttry {\r\n\t\t\tObject status = buildStatus(request);\r\n\t\t\tString reply = json.toJson(status);\r\n\t\t\t\r\n\t\t\t// do we return the whole status or just a part of it ?\r\n\t\t\tString jsonPath = request.getQueryParameter(\"jsonpath\");\r\n\t\t\tif (jsonPath != null) {\r\n\t\t\t\tstatus = JsonPath.using(jsonPathConf).parse(reply).read(jsonPath);\r\n\t\t\t\treply = status instanceof String ? status.toString() : json.toJson(status);\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tresponse.setContent(reply.getBytes(UTF_8));\r\n\t\t} catch (Throwable e) {\r\n\t\t\tthrow new GridException(e.getMessage());\r\n\t\t}\r\n\t}",
"SessionStatus getStatus();",
"@Override\n public void onFailure(int arg0, String arg1) {\n login_success = false;\n toast(R.string.activity_login_fail, arg1);\n }",
"boolean isSuccess();",
"boolean isSuccess();",
"boolean isSuccess();",
"boolean isSuccess();",
"boolean isSuccess();",
"boolean isSuccess();",
"boolean isSuccess();",
"@GET(\"system/status\")\n Call<InlineResponse200> getStatus();",
"String getLoginapiavgrtt();",
"@RequestMapping(\"/status\")\n public ResponseEntity doorStatus() {\n if (sensorPin == null) {\n GpioController gpio = GpioFactory.getInstance();\n sensorPin = gpio.provisionDigitalInputPin(RaspiPin.GPIO_02, \"MyDoor\", PinPullResistance.PULL_UP);\n }\n\n if(sensorPin.isHigh()) {\n return new ResponseEntity(HttpStatus.valueOf(\"Open\"));\n }\n else{\n return new ResponseEntity(HttpStatus.valueOf(\"Closed\"));\n }\n }",
"@Override\n\tpublic void setStatus(int status);",
"public void httpfailure(String errmsg) {\n\t\t\n\t}",
"@Test\n public void testStatusCode(){\n Assert.assertEquals(resp.getStatusCode(),200, \"Status code does not match\");\n }",
"private static String doLogin(Request req, Response res) {\n HashMap<String, String> respMap;\n \n res.type(Path.Web.JSON_TYPE);\n \n \n\t String email = Jsoup.parse(req.queryParams(\"email\")).text();\n \n logger.info(\"email from the client = \" + email);\n \n if(email != null && !email.isEmpty()) { \n \n\t server = new SRP6JavascriptServerSessionSHA256(CryptoParams.N_base10, CryptoParams.g_base10);\n\t \t\t\n\t gen = new ChallengeGen(email);\n\t\t\n\t respMap = gen.getChallenge(server);\n \n if(respMap != null) {\n\t\t logger.info(\"JSON RESP SENT TO CLIENT = \" + respMap.toString());\n res.status(200);\n respMap.put(\"code\", \"200\");\n respMap.put(\"status\", \"success\");\n return gson.toJson(respMap);\n }\n }\n respMap = new HashMap<>();\n \n res.status(401);\n respMap.put(\"status\", \"Invalid User Credentials\");\n respMap.put(\"code\", \"401\");\n logger.error(\"getChallenge() return null map most likely due to null B value and Invalid User Credentials\");\n \treturn gson.toJson(respMap);\n}",
"private String httpNotOk() {\n return \"HTTP/1.1 404 not Found\\r\\n\"\n + \"Content-Type: text/html\\r\\n\"\n + \"\\r\\n\"\n + \"<!DOCTYPE html>\\n\"\n + \"<html>\\n\"\n + \"<head>\\n\"\n + \"<meta charset=\\\"UTF-8\\\">\\n\"\n + \"<title>Error</title>\\n\"\n + \"</head>\\n\"\n + \"<body>\\n\"\n + \"<h1>There is an error</h1>\\n\"\n + \"</body>\\n\"\n + \"</html>\\n\";\n }",
"@RequestMapping(value = {\"/status\",}, method = RequestMethod.GET)\n //@RequestMapping(value = { \"\", \"/\", }, method = RequestMethod.GET)\n @ResponseBody\n public ResponseEntity<String> healthCheck(Locale locale) {\n logger.info(\"Welcome home. The client locale is {}\", locale);\n DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);\n String formattedDate = dateFormat.format(new Date());\n return new ResponseEntity<String>(\"Welcome, SpringMVC Rest Demo is running. The time on the server is: \"\n + formattedDate, HttpStatus.OK);\n }",
"@RequestMapping(value = \"/\", method = RequestMethod.GET, produces=APPLICATION_HTML)\r\n public @ResponseBody String status() {\r\n return \"Default Status Message\";\r\n }",
"private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, Throwable t, JSONObject resp) {\n\n Log.d(\"kartik failure \", resp.toString());\n\n Toast toast = Toast.makeText(context, \"Failure \" + resp.toString(), Toast.LENGTH_SHORT);\n toast.show();\n }"
] |
[
"0.7231273",
"0.64081556",
"0.6359794",
"0.62704635",
"0.6191235",
"0.6169173",
"0.6168835",
"0.6168835",
"0.61490816",
"0.61413085",
"0.6120044",
"0.59869003",
"0.5980921",
"0.59768164",
"0.58826923",
"0.58818066",
"0.58680254",
"0.5818022",
"0.5782288",
"0.5756366",
"0.57540035",
"0.57509506",
"0.57430923",
"0.57430923",
"0.57382554",
"0.57362187",
"0.5707105",
"0.56754005",
"0.56703043",
"0.566627",
"0.5662506",
"0.5661662",
"0.5660481",
"0.56566536",
"0.5654744",
"0.56423783",
"0.5640402",
"0.5640402",
"0.5640402",
"0.5640402",
"0.5640402",
"0.5640402",
"0.5640402",
"0.5640402",
"0.5640402",
"0.5640402",
"0.5640402",
"0.56369126",
"0.5634541",
"0.5633804",
"0.5628094",
"0.5599964",
"0.5593192",
"0.5576832",
"0.5574708",
"0.5572472",
"0.5565576",
"0.55646753",
"0.55607545",
"0.55602425",
"0.5552052",
"0.5547204",
"0.55454975",
"0.55377674",
"0.5535498",
"0.5523249",
"0.54647946",
"0.5462669",
"0.5462641",
"0.5457049",
"0.54512775",
"0.5449591",
"0.5443406",
"0.543589",
"0.543589",
"0.543589",
"0.54354614",
"0.5433047",
"0.5428063",
"0.5424508",
"0.5420149",
"0.53959256",
"0.5393211",
"0.5393211",
"0.5393211",
"0.5393211",
"0.5393211",
"0.5393211",
"0.5393211",
"0.53846854",
"0.53825486",
"0.53823787",
"0.53685844",
"0.53662187",
"0.53643936",
"0.5360983",
"0.53591627",
"0.5358821",
"0.5350684",
"0.53501153",
"0.5346545"
] |
0.0
|
-1
|
HTTP header adatok loggolasa
|
protected String logHeader(ClientRequestContext requestContext, ClientResponseContext responseContext) throws IOException {
StringBuilder msg = new StringBuilder();
msg.append("< headers: [");
for (Entry<String, List<String>> header : responseContext.getHeaders().entrySet()) {
msg.append("\n< ").append(header.getKey()).append(":").append(stringHelper.maskPropertyValue(header.getKey(), header.getValue()));
}
msg.append("]\n");
msg.append("< cookies: [");
for (Entry<String, NewCookie> cookie : responseContext.getCookies().entrySet()) {
msg.append("\n< ").append(cookie.getKey()).append(":").append(stringHelper.maskPropertyValue(cookie.getKey(), cookie.getValue()));
}
msg.append("]\n");
msg.append("< locale: [").append(responseContext.getLanguage()).append("]\n");
msg.append("< location: [").append(responseContext.getLocation()).append("]\n");
return msg.toString();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public String getHeader(String name) {\n if (name.equalsIgnoreCase(\"Authorization\")) {\n return getAuthorizationHeader();\n } else {\n return super.getHeader(name);\n }\n }",
"RequestHeaders headers();",
"public HashMap<String, String> getHeader() {\n HashMap<String, String> header = new HashMap<String, String>();\n//\t\theader.put(\"Content-Type\", pref.getString(\"application/json\", \"application/json\"));\n /*header.put(\"authId\", pref.getString(KEY_USER_ID, KEY_USER_ID));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, KEY_AUTH_TOKEN));*/\n\n\n header.put(\"authId\", pref.getString(KEY_USER_ID, \"1\"));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, \"s4nbp5FibJpfEY9q\"));\n\n return header;\n }",
"@Override\n public void addHeader(String arg0, String arg1) {\n\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 }",
"private static String getHTTPHeader(PortletRequest request, String name) {\n String value = null;\n String portalInfo = request.getPortalContext().getPortalInfo()\n .toLowerCase();\n if (portalInfo.contains(\"liferay\")) {\n value = getLiferayHTTPHeader(request, name);\n } else if (portalInfo.contains(\"gatein\")) {\n value = getGateInHTTPHeader(request, name);\n }\n return value;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headers = new HashMap<>();\n headers.put(\"petalier_session_token\", PSharedPreferences.getSomeStringValue(AppController.getInstance(), \"session_token\"));\n//\n// if (!PSharedPreferences.getSomeStringValue(AppController.getInstance(), \"session_token\").isEmpty()){\n// headers.put(\"Session-Token\", PSharedPreferences.getSomeStringValue(AppController.getInstance(), \"session_token\"));\n// }\n\n return headers;\n }",
"String getResponseHeader();",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headers = new HashMap<>();\n String token = LogInActivity.token;\n headers.put(\"Authorization\", \"bearer \"+ token);\n return headers;\n }",
"@Override\n public void intercept(RequestFacade request) {\n String string = \"Basic \" + Base64.encodeToString(credentials.getBytes(), Base64.NO_WRAP);\n request.addHeader(\"Authorization\", string);\n request.addHeader(\"Accept\", \"application/json\");\n }",
"HttpClientRequest header(CharSequence name, CharSequence value);",
"@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n //params.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n params.put(\"Authorization\", appUtil.getPrefrence(\"token_type\")+\" \"+appUtil.getPrefrence(\"access_token\"));\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> header = new HashMap<String, String>();\n //header.put(\"Content-Type\", \"application/json; charset=UTF-8\");\n header.put(\"Authorization\", \"Bearer \"+LoginMedico.ACCESS_TOKEN);\n return header;\n }",
"protected void addAuthorizationRequestHeader(HttpState state,\n HttpConnection conn)\n throws IOException, HttpException {\n LOG.trace(\"enter HttpMethodBase.addAuthorizationRequestHeader(\"\n + \"HttpState, HttpConnection)\");\n\n // add authorization header, if needed\n if (getRequestHeader(HttpAuthenticator.WWW_AUTH_RESP) == null) {\n Header[] challenges = getResponseHeaderGroup().getHeaders(\n HttpAuthenticator.WWW_AUTH);\n if (challenges.length > 0) {\n try {\n AuthScheme authscheme = HttpAuthenticator.selectAuthScheme(challenges);\n HttpAuthenticator.authenticate(authscheme, this, conn, state);\n } catch (HttpException e) {\n // log and move on\n if (LOG.isErrorEnabled()) {\n LOG.error(e.getMessage(), e);\n }\n }\n }\n }\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 }",
"private String getToken(HttpServletRequest request){\n String header = request.getHeader(\"Authorization\");\n if(header != null && header.startsWith(\"Bearer\"))\n \t// Sacamos al bearer del token\n return header.replace(\"Bearer \", \"\");\n return null;\n }",
"HttpClientRequest addHeader(CharSequence name, CharSequence value);",
"@Override\n\t\tpublic void intercept(RequestInterceptor.RequestFacade request) {\n\t\t\trequest.addQueryParam(\"key\", mKey);\n\n\t\t\t// We need to use token for auth, since user might change password, then token is invalidated and user needs to log in again\n\t\t\t// For creating user, the endpoint can ignore Authorization\n\t\t\t//Assert.assertFalse(TextUtils.isEmpty(mToken));\n\t\t\trequest.addHeader(\"Username\", mAccountUtils.getUsername());\n\t\t\trequest.addHeader(\"Authorization\", mAccountUtils.getToken());\n\t\t\trequest.addHeader(\"User-Agent\", \"gzip\");\n\t\t\trequest.addHeader(\"Accept-Encoding\", \"gzip\");\n\t\t}",
"public static String getAuthorizationLoguin() {\n\t\treturn getServer()+\"wsagenda/v1/usuarios/login\";\n\t}",
"@GET\n @Path(\"/testHeader\")\n @Authenticated\n public String testHeader() {\n return testService.testHeader(\"test\");\n }",
"public void addRequestHeader(String name, String value);",
"@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n params.put(\"Authorization\", appUtil.getPrefrence(\"token_type\") + \" \" + appUtil.getPrefrence(\"access_token\"));\n return params;\n }",
"com.didiyun.base.v1.Header getHeader();",
"public String getHeader();",
"public String getHeader() {\n String header = FxSharedUtils.getHeader();\n if (header.indexOf(\"$user$\") > 0)\n header = header.replaceAll(\"\\\\$user\\\\$\", getRequest().getUserTicket().getUserName());\n return header;\n }",
"private static void addParleyHttpHeaders(Request.Builder requestBuilder) {\n requestBuilder.addHeader(HEADER_PARLEY_IDENTIFICATION, Parley.getInstance().getSecret() + \":\" + Parley.getInstance().getUniqueDeviceIdentifier());\n\n if (Parley.getInstance().getUserAuthorization() != null) {\n requestBuilder.addHeader(HEADER_PARLEY_AUTHORIZATION, Parley.getInstance().getUserAuthorization());\n }\n }",
"void addHeader(HttpServletResponse response, String name, String value);",
"private void serverHeader(\n HttpHeaderFW header)\n {\n serverHeader |= header.name().value().equals(context.nameBuffer(54));\n }",
"private String getAuthorizationHeaderValue(HttpRequest request){\n\t\t String authorizationValue = \"\";\n\t\t List<String> authorizationList = new ArrayList<>(0);\t\t\n\t\t \n\t\t HttpHeaders headers = request.getHttpHeaders();\n\t\t for(String headerName : headers.getRequestHeaders().keySet()){\n\t\t\t if(TokenConstants.AUTHORIZATION_HEADER_NAME.equalsIgnoreCase(headerName)){\n\t\t\t\t authorizationList = headers.getRequestHeader(headerName);\n\t\t\t\t break;\n\t\t\t }\n\t\t }\n\n\t\t if(CollectionUtils.isNotEmpty(authorizationList)) {\n\t\t\t authorizationValue = authorizationList.get(0);\n\t\t }\n\t\t return authorizationValue;\n\t}",
"@Override\n public Response intercept(Chain chain) throws IOException {\n Request authorisedRequest = chain.request().newBuilder()\n .header(\"Authorization:\", \"Token \" + sharedPrefsWrapper.getString(KEY))\n .build();\n\n\n return chain.proceed(authorisedRequest);\n }",
"private Header[] requestHeadMaker() {\n\t\tHeader[] header = {\n\t\t\t\tnew BasicHeader(\"User-Agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36\")\n\t\t\t\t//new BasicHeader(HttpHeaders.USER_AGENT, \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36\")\n\t\t\t, new BasicHeader(\"Accpet-Language\", \"ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7,ja;q=0.6\")\n\t\t\t, new BasicHeader(\"Accept-Charset\", \"application/x-www-form-urlencoded; charset=UTF-8\")\n\t\t\t, new BasicHeader(\"Origin\", \"https://developer.riotgames.com\")\n\t\t\t, //new BasicHeader(\"X-Riot-Token\", riotApiKey)\n\t\t};\n\t\treturn header;\n\t}",
"@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 }",
"Header createHeader();",
"Headers getHeaders();",
"@Override\n public void setHeader(String arg0, String arg1) {\n\n }",
"@Override\n\tpublic void addRequestHeader(String headername, String value) {\n \t// We are not adding in common http headers \n \tif (!COMMON_HTTP_HEADERS.contains(headername.toLowerCase())) {\n \t\ttransLogModelThreadLocal.get().getRequestHeadersMap().put(headername, value);\n \t}\n\t}",
"@VisibleForTesting\n void appendHttpHeaders(HttpRequest request, StringBuilder toSign) {\n for (String header : new String[] { \"Range\" })\n toSign.append(utils.valueOrEmpty(request.getHeaders().get(header)).toLowerCase()).append(\"\\n\");\n // Standard HTTP header, in UTC format. Only the date value is used, not the header name.\n toSign.append(request.getHeaders().get(HttpHeaders.DATE).iterator().next()).append(\"\\n\");\n }",
"@Override\n\tpublic void addHeader(String name, String value) {\n\t}",
"private void httpHeader(String method) throws Exception {\n if(outputStream==null){\n throw new Exception(\"socket未打开\");\n }\n //直接遍历Request的头就行\n HashMap<String, String> headers = request.getHeaders();\n \n //httpHeader用来发送的http头部。\n StringBuilder httpHeader = new StringBuilder();\n \n \n //GET /PCcontrolServer/ImageGet?pwd=5678 HTTP/1.1\n //首先是对方法的判断,先只支持get和post方法\n URL url = connection.getUrl();\n if(request.getMethod().equals(\"get\")\n \t\t||request.getMethod().equals(\"GET\")){\n \t\n \tif(url.getQuery()!=null){\n \t\thttpHeader.append(\"GET \" + url.getPath()+\"?\"\n \t\t\t+url.getQuery() + \" HTTP/1.1\\r\\n\");\n \t}else{\n \t\thttpHeader.append(\"GET \" + url.getPath()+\" HTTP/1.1\\r\\n\");\n \t}\n\n }else if(request.getMethod().equals(\"POST\")||\n \t\trequest.getMethod().equals(\"post\")){\n \thttpHeader.append(\"POST \" + url.getPath() + \" HTTP/1.1\\r\\n\");\n \n \tcontentLength = CalcDataLength();\n \t\n \t//如果是post则默认使用这个content-Type发送\n \thttpHeader.append(\"Content-Type: multipart/form-data; boundary=\"\n \t\t\t+boundary+\"\\r\\n\");\n \t\n \thttpHeader.append(\"Content-Length: \" + contentLength + \"\\r\\n\");\n \n }\n \n //其次对其他header头参数进行拼接。其中contentlength这个只有post方法才支持。要独立判断\n Iterator<Entry<String, String>> iterator = headers.entrySet().iterator();\n \n //Cache-Control: max-age=0\n while(iterator.hasNext()){\n \tEntry<String, String> current = iterator.next();\n \thttpHeader.append(current.getKey()+\n \t\t\t\": \" + current.getValue() + \"\\r\\n\");\n }\n \n //Log.E(httpHeader.toString());\n //这个/r/n表示消息头结束,否则服务器会一直阻塞在那里不会将结果返回。\n httpHeader.append(\"\\r\\n\");\n //将Http头写入socket,发起http请求\n outputStream.write(httpHeader.toString().getBytes());\n \n\n// URL url = connection.getUrl();\n// //决定是get还是post方法,如果是get方法的话,\n// //则非常简单直接。\n// String requestMethod = \"\";\n// if(method.equals(\"get\")){\n// requestMethod = \"GET \"+ url.getPath() +\"?\"+ url.getQuery()+\" HTTP/1.1\\r\\n\";\n// }else{\n// requestMethod = \"POST \" + url.getPath() +\" HTTP/1.1\\r\\n\";\n// }\n//\n// outputStream.write(requestMethod.getBytes());\n// String language = \"Accept-Language: zh-CN\\r\\n\";\n\n\n }",
"HttpRequest(){\n HttpHeader.getInstance().loadHeaderList(\"src/main/resources/headerList.txt\");\n }",
"public abstract HttpHeaders headers();",
"java.lang.String getHeader();",
"@Override \n public String getHeader(String name) { \n String value = super.getHeader(encodeXSS(name)); \n //the following sentences will be replaced by logging sentence in actual project \n //System.out.println(\"The original value received from getHeader() is:\"+value); \n if (value != null) { \n value = encodeXSS(value); \n } \n \n //the following sentences will be replaced by logging sentence in actual project \n // System.out.println(\"After handling XSS ,the actual value is:\"+value); \n // System.out.println(); \n \n return value; \n }",
"@Headers({\n \"Content-Type:application/json\"\n , \"app_code:business\"\n ,\"service_code:LG001\"\n ,\"screen_code:LG001\"})\n @POST(\"/{paramsStr}\")\n Call<Result<Area>> Login(@Path(\"paramsStr\") String paramsStr, @Header(\"os\") String os, @Header(\"device\") String device, @Header(\"imei\") String imei);",
"private HttpEntity<?> setTokenToHeaders() {\n HttpHeaders headers = new HttpHeaders();\n headers.set(\"Authorization\", this.token.getToken_type() + \" \" + this.token.getAccess_token());\n headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));\n return new HttpEntity<>(null, headers);\n }",
"String getHeader(HttpServletRequest request, String name) throws ValidationException;",
"private void writeHTTPHeader(OutputStream os, String contentType) throws Exception {\n Date d = new Date();\n DateFormat df = DateFormat.getDateTimeInstance();\n df.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n os.write(streamStatus.getBytes());\n os.write(\"Date: \".getBytes());\n os.write((df.format(d)).getBytes());\n os.write(\"\\n\".getBytes());\n os.write(\"Server: Jon's very own server\\n\".getBytes());\n //os.write(\"Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT\\n\".getBytes());\n //os.write(\"Content-Length: 438\\n\".getBytes()); //num characters in HTML line\n os.write(\"Connection: close\\n\".getBytes());\n os.write(\"Content-Type: \".getBytes());\n os.write(contentType.getBytes());\n os.write(\"\\n\\n\".getBytes()); // HTTP header ends with 2 newlines\n return;\n}",
"@Given(\"^API Headers are set$\")\n public void apiHeadersAreSet(){\n\n myRequest.contentType(ContentType.JSON)\n .baseUri(\"http://10.4.10.105/api/v1/\")\n .header(\"Auth-token\",\"ec6effac-7b12-4021-ba80-c682169cff60\");\n\n }",
"private String getHeaderValueImpl(String paramString1, String paramString2) {\n/* */ String str1, str8, str9;\n/* 351 */ char[] arrayOfChar = this.pw.getPassword();\n/* 352 */ boolean bool = this.params.authQop();\n/* 353 */ String str2 = this.params.getOpaque();\n/* 354 */ String str3 = this.params.getCnonce();\n/* 355 */ String str4 = this.params.getNonce();\n/* 356 */ String str5 = this.params.getAlgorithm();\n/* 357 */ this.params.incrementNC();\n/* 358 */ int i = this.params.getNCCount();\n/* 359 */ String str6 = null;\n/* */ \n/* 361 */ if (i != -1) {\n/* 362 */ str6 = Integer.toHexString(i).toLowerCase();\n/* 363 */ int j = str6.length();\n/* 364 */ if (j < 8) {\n/* 365 */ str6 = zeroPad[j] + str6;\n/* */ }\n/* */ } \n/* */ try {\n/* 369 */ str1 = computeDigest(true, this.pw.getUserName(), arrayOfChar, this.realm, paramString2, paramString1, str4, str3, str6);\n/* */ }\n/* 371 */ catch (NoSuchAlgorithmException noSuchAlgorithmException) {\n/* 372 */ return null;\n/* */ } \n/* */ \n/* 375 */ String str7 = \"\\\"\";\n/* 376 */ if (bool) {\n/* 377 */ str7 = \"\\\", nc=\" + str6;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 382 */ if (delimCompatFlag) {\n/* */ \n/* 384 */ str8 = \", algorithm=\\\"\" + str5 + \"\\\"\";\n/* 385 */ str9 = \", qop=\\\"auth\\\"\";\n/* */ } else {\n/* */ \n/* 388 */ str8 = \", algorithm=\" + str5;\n/* 389 */ str9 = \", qop=auth\";\n/* */ } \n/* */ \n/* */ \n/* 393 */ String str10 = this.authMethod + \" username=\\\"\" + this.pw.getUserName() + \"\\\", realm=\\\"\" + this.realm + \"\\\", nonce=\\\"\" + str4 + str7 + \", uri=\\\"\" + paramString1 + \"\\\", response=\\\"\" + str1 + \"\\\"\" + str8;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 400 */ if (str2 != null) {\n/* 401 */ str10 = str10 + \", opaque=\\\"\" + str2 + \"\\\"\";\n/* */ }\n/* 403 */ if (str3 != null) {\n/* 404 */ str10 = str10 + \", cnonce=\\\"\" + str3 + \"\\\"\";\n/* */ }\n/* 406 */ if (bool) {\n/* 407 */ str10 = str10 + str9;\n/* */ }\n/* 409 */ return str10;\n/* */ }",
"HttpClientRequest addCookie(Cookie cookie);",
"@Override\n public Map<String, String> getHeaders() {\n System.out.println(\"------token:---------\"+token);\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"content-type\", \"application/json\");\n params.put(\"cache-control\", \"no-cache\");\n params.put(\"authorization\",\"Bearer \"+token);\n\n\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() {\n System.out.println(\"------token:---------\"+token);\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"content-type\", \"application/json\");\n params.put(\"cache-control\", \"no-cache\");\n params.put(\"authorization\",\"Bearer \"+token);\n\n\n return params;\n }",
"private HeaderUtil() {}",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError\n {\n Map<String, String> params = new HashMap<String, String>();\n params.put(Keys.Authorization,\"Bearer \"+TripManagement.readValueFromPreferences(getActivity(),\"accesstoken\",\"\"));\n return params;\n }",
"public abstract String header();",
"public void flushHeader() {\r\n\t\t//resetBuffer();\r\n\t\tif (sc_status == 0) {\r\n\t\t\tsetStatus(200);\r\n\t\t}\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"EEE, dd MMM yyyy HH:mm:ss z\", Locale.US);\r\n\t\tdateFormat.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\r\n StringBuffer headerVal = new StringBuffer();\r\n headerVal.append(request.getProtocol() + \" \" + sc_status + \" \" + HttpResponse.getStatusMessage(sc_status) + \"\\r\\n\");\r\n// System.out.println(\"1st line:\" + headerVal.toString());\r\n headerVal.append(\"Date: \" + dateFormat.format(new Date()) + \"\\r\\n\");\r\n for (String headerName : headersMap.keySet()) {\r\n headerVal.append(headerName + \": \" + headersMap.get(headerName).get(0) + \"\\r\\n\");\r\n }\r\n //System.out.println(\"IF request.hasSession? \" + request.hasSession());\r\n if (request.hasSession() && request.getSession().isNew()) {\r\n \tServletEngine.deleteInvalidatedSession();\r\n \tHttpServletSessionM sessionM = (HttpServletSessionM) request.getSession(false);\r\n \tCookie sessionCookie = new Cookie(\"sessionId\", sessionM.getId());\r\n \t\r\n \t//HttpSession calExpireTime = request.getSession(false);\r\n \tint maxAge = (int) ((sessionM.getLastAccessedTime() - new Date().getTime())/1000 + sessionM.getMaxInactiveInterval());\r\n \t//maxAge = maxAge/1000;\r\n \tsessionCookie.setMaxAge(maxAge*60);\r\n// \tif (!sessionM.isValid()) {\r\n// \t\tSystem.out.println(\"Here the session is invaid\");\r\n// \t\tsessionCookie.setMaxAge(0);\r\n// \t}\r\n \theaderVal.append(\"Set-Cookie: \").append(getCookieInfo(sessionCookie)).append(\"\\r\\n\");\r\n }\r\n if (cookies.size() > 0) {\r\n \tfor (Cookie cur : cookies) {\r\n \t\theaderVal.append(\"Set-Cookie: \").append(getCookieInfo(cur)).append(\"\\r\\n\");\r\n \t}\r\n }\r\n \r\n headerVal.append(\"Content-Length: \" + buffer.getContentLength() + \"\\r\\n\");\r\n //System.out.println(\"buffer.getContentLength:\" + buffer.getContentLength());\r\n headerVal.append(\"Content-Type: \" + contentType + \"\\r\\n\");\r\n headerVal.append(\"Content-Encoding: \" + encoding + \"\\r\\n\");\r\n headerVal.append(\"Connection: close\\r\\n\\r\\n\");\r\n //System.out.println(headerVal.toString());\r\n try {\r\n\t\t\tout.write(headerVal.toString().getBytes());\r\n\t\t\tout.flush();\r\n\t\t\tisCommitted = true;\r\n\t\t\t//System.out.println(\"flushed \");\r\n\t\t} catch (IOException e) {\r\n\t\t\tLogRecorder.addErrorMessage(e, \"cannot write or flush\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public boolean setHeaders(HttpURLConnection paramHttpURLConnection, HeaderParser paramHeaderParser, String paramString) {\n/* */ String str2;\n/* 296 */ this.params.setNonce(paramHeaderParser.findValue(\"nonce\"));\n/* 297 */ this.params.setOpaque(paramHeaderParser.findValue(\"opaque\"));\n/* 298 */ this.params.setQop(paramHeaderParser.findValue(\"qop\"));\n/* */ \n/* 300 */ String str1 = \"\";\n/* */ \n/* 302 */ if (this.type == 'p' && paramHttpURLConnection\n/* 303 */ .tunnelState() == HttpURLConnection.TunnelState.SETUP) {\n/* 304 */ str1 = HttpURLConnection.connectRequestURI(paramHttpURLConnection.getURL());\n/* 305 */ str2 = HttpURLConnection.HTTP_CONNECT;\n/* */ } else {\n/* */ try {\n/* 308 */ str1 = paramHttpURLConnection.getRequestURI();\n/* 309 */ } catch (IOException iOException) {}\n/* 310 */ str2 = paramHttpURLConnection.getMethod();\n/* */ } \n/* */ \n/* 313 */ if (this.params.nonce == null || this.authMethod == null || this.pw == null || this.realm == null) {\n/* 314 */ return false;\n/* */ }\n/* 316 */ if (this.authMethod.length() >= 1)\n/* */ {\n/* */ \n/* */ \n/* 320 */ this\n/* 321 */ .authMethod = Character.toUpperCase(this.authMethod.charAt(0)) + this.authMethod.substring(1).toLowerCase();\n/* */ }\n/* 323 */ String str3 = paramHeaderParser.findValue(\"algorithm\");\n/* 324 */ if (str3 == null || \"\".equals(str3)) {\n/* 325 */ str3 = \"MD5\";\n/* */ }\n/* 327 */ this.params.setAlgorithm(str3);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 333 */ if (this.params.authQop()) {\n/* 334 */ this.params.setNewCnonce();\n/* */ }\n/* */ \n/* 337 */ String str4 = getHeaderValueImpl(str1, str2);\n/* 338 */ if (str4 != null) {\n/* 339 */ paramHttpURLConnection.setAuthenticationProperty(getHeaderName(), str4);\n/* 340 */ return true;\n/* */ } \n/* 342 */ return false;\n/* */ }",
"private HttpHeaders getHeaders(String token) {\r\n UserDetails userDetails = new UserDetails();\r\n userDetails.setEmail(jwtUtil.extractEmail(token));\r\n userDetails.setClientType(ClientType.valueOf((String) jwtUtil.extractAllClaims(token).get(\"clientType\")));\r\n HttpHeaders httpHeaders = new HttpHeaders();\r\n httpHeaders.set(\"Authorization\", jwtUtil.generateToken(userDetails));\r\n return httpHeaders;\r\n }",
"private HttpHeaders getHeaders(String token) {\n UserDetails userDetails = new UserDetails();\r\n userDetails.setEmail(jwtUtils.extractEmail(token));\r\n userDetails.setUserType((String) jwtUtils.extractAllClaims(token).get(\"userType\"));\r\n HttpHeaders httpHeaders = new HttpHeaders();\r\n httpHeaders.set(\"Authorization\", jwtUtils.generateToken(userDetails));\r\n return httpHeaders;\r\n }",
"private void appendCanonicalizedHeaders(HttpRequest request, StringBuilder toSign) {\n Set<String> headers = new TreeSet<String>(request.getHeaders().keySet());\n for (String header : headers) {\n if (header.startsWith(\"x-emc-\")) {\n // Convert all header names to lowercase.\n toSign.append(header.toLowerCase()).append(\":\");\n // For headers with values that span multiple lines, convert them into one line by\n // replacing any\n // newline characters and extra embedded white spaces in the value.\n for (String value : request.getHeaders().get(header)) {\n value = Utils.replaceAll(value, TWO_SPACE_PATTERN, \" \");\n value = Utils.replaceAll(value, NEWLINE_PATTERN, \"\");\n toSign.append(value).append(' ');\n }\n toSign.deleteCharAt(toSign.lastIndexOf(\" \"));\n // Concatenate all headers together, using newlines (\\n) separating each header from the\n // next one.\n toSign.append(\"\\n\");\n }\n }\n // There should be no terminating newline character at the end of the last header.\n if (toSign.charAt(toSign.length() - 1) == '\\n')\n toSign.deleteCharAt(toSign.length() - 1);\n }",
"private HttpHeaders getHttpHeaders()\r\n\t{\n HttpHeaders lHttpHeaders = new HttpHeaders();\r\n lHttpHeaders.setContentType(MediaType.APPLICATION_JSON);\r\n lHttpHeaders.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));\r\n // set basic authorization with api key and its value\r\n lHttpHeaders.setBasicAuth( PaymentConstant.API_KEY_ID, PaymentConstant.API_KEY_PASSWORD );\r\n return lHttpHeaders;\r\n\t}",
"String getLoginapiavgrtt();",
"protected static String buildAuthHeader(String username, String password) throws UnsupportedEncodingException {\n // apparently netty isn't familiar with HTTP Basic Auth\n StringBuilder clearText = new StringBuilder(username);\n clearText.append(':');\n if (password != null) {\n clearText.append(password);\n }\n String headerResult;\n headerResult = \"Basic \" + Base64.encodeBase64String(clearText.toString().getBytes(\"UTF-8\"));\n\n if (headerResult.endsWith(\"\\r\\n\")) {\n headerResult = headerResult.substring(0, headerResult.length() - 2);\n }\n\n return headerResult;\n }",
"RequestBuilder addHeaderParameter(String key, String value);",
"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 static String obtenerTokenAcceso(HttpServletRequest request) {\n String tokenId = \"\";\n try {\n String authorization = request.getHeader(\"Authorization\");\n if (authorization != null && authorization.contains(\"Bearer\")) {\n tokenId = authorization.replace(\"Bearer\", \"\");\n }\n String[] contenidoToken = tokenId.split(\"\\\\.\");\n return contenidoToken[1];\n } catch (Exception e) {\n // TODO: handle exception\n return \"\";\n }\n }",
"protected void addHeaderParameters(HttpURLConnection connection, Object[] args) {\n headerBuilder.addHeaders(connection, args);\n }",
"public String getHttpHeader() {\n return httpHeader;\n }",
"private void authorize(){\n\t\t\n\t\tURL authURL = null;\n\t\tURL homeURL = null;\n\t\tURLConnection homeCon = null;\n\t\t\n\t\tString loginPage = GG.GG_LOGIN+\"?ACCOUNT=\"+GG.GG_UID\n\t\t\t+\"&PASSWORD=\"+GG.GG_PASS;\n\t\tString cookieString = \"\";\n\t\tString cookieString1 = \"\";\n\t\t\n\t\ttry{\n\t\t\thomeURL = new URL(GG.GG_HOME);\n\t\t\thomeCon = homeURL.openConnection();\n\t\t\t\n\t\t\t// Look At the headers\n\t\t\tMap headerMap = homeCon.getHeaderFields();\n\t\t\t\n\t\t\t// Look for the Cookie\n\t\t\tif(headerMap.containsKey(\"Set-Cookie\")){\n\t\t\t\t\n\t\t\t\t// this gets the exact value of the header\n\t\t\t\t// otherwise gets some formatted string\n\t\t\t\tcookieString = homeCon.getHeaderField(\"Set-Cookie\");\n\t\t\t\t//log.finest(\"cookie1: \"+cookieString);\n\t\t\t\t\n\t\t\t\tauthURL = new URL(loginPage);\n\t\t\t\tHttpURLConnection.setFollowRedirects(false);\n\t\t\t\tHttpURLConnection loginCon = (HttpURLConnection) authURL.openConnection();\n\t\t\t\t\n\t\t\t\t// doOutput must be set before connecting\n\t\t\t\tloginCon.setAllowUserInteraction(true);\n\t\t\t\tloginCon.setUseCaches(false);\n\t\t\t\tloginCon.setDoOutput(true);\n\t\t\t\tloginCon.setRequestProperty(\"Cookie\", cookieString);\n\t\t\t\tloginCon.connect();\n\t\t\t\t\n\t\t\t\t// Look At the headers\n\t\t\t\tMap headerMap1 = loginCon.getHeaderFields();\n\t\t\t\t\n\t\t\t\tcookieString1 = loginCon.getHeaderField(\"Set-Cookie\");\n\t\t\t\t//log.finest(\"cookie2: \"+cookieString1);\n\t\t\t\tif(!Pattern.matches(\".*\\\\.\"+GG.GG_UID+\"\\\\.\\\\d+.*\", cookieString1)){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString location = loginCon.getHeaderField(\"Location\");\n\t\t\t\tURL gotURL = new URL(location);\n\t\t\t\tHttpURLConnection gotCon = (HttpURLConnection) gotURL.openConnection();\n\t\t\t\t// doOutput must be set before connecting\n\t\t\t\tgotCon.setAllowUserInteraction(true);\n\t\t\t\tgotCon.setUseCaches(false);\n\t\t\t\tgotCon.setDoOutput(true);\n\t\t\t\tgotCon.setRequestProperty(\"Cookie\", cookieString);\n\t\t\t\tgotCon.setRequestProperty(\"Cookie\", cookieString1);\n\t\t\t\t\n\t\t\t\tgotCon.connect();\n\t\t\t\t\n\t\t\t\t// Got the Cookies\n\t\t\t\tcookies[0] = cookieString;\n\t\t\t\tcookies[1] = cookieString1;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tlog.info(\"Unable to find the Cookie\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\tauthorized = true;\n\t}",
"private static void addAdditionalHttpHeaders(LazyHeaders.Builder requestBuilder) {\n for (Map.Entry<String, String> entry : Parley.getInstance().getNetwork().headers.entrySet()) {\n String name = entry.getKey();\n String value = entry.getValue();\n\n requestBuilder.addHeader(name, value);\n }\n }",
"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}",
"public void postData(String autho, String iVector) {\n HttpClient httpclient = new DefaultHttpClient();\n HttpGet httppost = new HttpGet(url);\n\n try {\n // Add your data\n// List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();\n// nameValuePairs.add(new BasicNameValuePair(\"username\", uName));\n// nameValuePairs.add(new BasicNameValuePair(\"password\", pWord));\n// nameValuePairs.add(new BasicNameValuePair(\"ivector\", iVector));\n\n// httppost.addHeader(\"username\", uName);\n// httppost.addHeader(\"password\", pWord);\n httppost.addHeader(\"Authorization\", autho);\n httppost.addHeader(\"ivector\", iVector);\n\n // Execute HTTP Post Request\n HttpResponse response = httpclient.execute(httppost);\n String responseStr = EntityUtils.toString(response.getEntity());\n\n httppost.releaseConnection();\n httpclient.getConnectionManager().shutdown();\n\n\n handleResponse(responseStr);\n\n\n\n } catch (ClientProtocolException e) {\n // TODO Auto-generated catch block\n //doNotification();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n\n //doNotification();\n }\n catch (RuntimeException e)\n {\n //doNotification();\n// text = \"Incorrect Username and/or Password\";\n// toast = Toast.makeText(context,text, duration);\n// toast.show();\n }\n }",
"private static void addAdditionalHttpHeaders(Request.Builder requestBuilder) {\n for (Map.Entry<String, String> entry : Parley.getInstance().getNetwork().headers.entrySet()) {\n String name = entry.getKey();\n String value = entry.getValue();\n\n requestBuilder.addHeader(name, value);\n }\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/x-www-form-urlencoded\");\n headerMap.put(\"Authorization\", \"Bearer \" + token);\n return headerMap;\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 String getAuthorizationHeader() {\n\t\tString auth = getUsername() + \":\" + getPassword();\n\t\tthis.debugAuthentcation();\n\t\tString header = \"Basic \"\n\t\t\t\t+ DatatypeConverter.printBase64Binary(auth.getBytes());\n\t\treturn header;\n\t}",
"void setHeader(HttpServletResponse response, String name, String value);",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headers = new HashMap<>();\n headers.put(\"User-Agent\", \"MyTestApp\");\n return headers;\n }",
"private String readHeader(RoutingContext ctx) {\n String tok = ctx.request().getHeader(XOkapiHeaders.TOKEN);\n if (tok != null && ! tok.isEmpty()) {\n return tok;\n }\n return null;\n }",
"@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 }",
"default boolean visitHeader() {\n\t\treturn true;\n\t}",
"public String generateHeader(String httpMethod, String url, Map<String, String> requestParams) {\n StringBuilder base = new StringBuilder();\n String nonce = getNonce();\n String timestamp = getTimestamp();\n String baseSignatureString = generateSignatureBaseString(httpMethod, url, requestParams, nonce, timestamp);\n String signature = encryptUsingHmacSHA1(baseSignatureString);\n base.append(\"OAuth \");\n append(base, oauth_consumer_key, consumerKey);\n append(base, oauth_token, token);\n append(base, oauth_signature_method, signatureMethod);\n append(base, oauth_timestamp, timestamp);\n append(base, oauth_nonce, nonce);\n append(base, oauth_version, version);\n append(base, oauth_signature, signature);\n base.deleteCharAt(base.length() - 1);\n log.debug(\"header : \" + base.toString());\n return base.toString();\n }",
"public static String generateHeader(Cookie cookie) {\r\n int version = cookie.getVersion();\r\n String value = cookie.getValue();\r\n String path = cookie.getPath();\r\n String domain = cookie.getDomain();\r\n String comment = cookie.getComment();\r\n\r\n if (version == 0) {\r\n // Check for the things that require a v1 cookie\r\n if (needsQuotes(value) || comment != null || needsQuotes(path) || needsQuotes(domain)) {\r\n version = 1;\r\n }\r\n }\r\n\r\n // Now build the cookie header\r\n StringBuffer buf = new StringBuffer(); // can't use StringBuilder due to DateFormat\r\n\r\n // Just use the name supplied in the Cookie\r\n buf.append(cookie.getName());\r\n buf.append(\"=\");\r\n\r\n // Value\r\n maybeQuote(buf, value);\r\n\r\n // Add version 1 specific information\r\n if (version == 1) {\r\n // Version=1 ... required\r\n buf.append (\"; Version=1\");\r\n\r\n // Comment=comment\r\n if (comment != null) {\r\n buf.append (\"; Comment=\");\r\n maybeQuote(buf, comment);\r\n }\r\n }\r\n\r\n // Add domain information, if present\r\n if (domain != null) {\r\n buf.append(\"; Domain=\");\r\n maybeQuote(buf, domain);\r\n }\r\n\r\n // Max-Age=secs ... or use old \"Expires\" format\r\n int maxAge = cookie.getMaxAge();\r\n if (maxAge >= 0) {\r\n if (version > 0) {\r\n buf.append (\"; Max-Age=\");\r\n buf.append (maxAge);\r\n }\r\n // IE6, IE7 and possibly other browsers don't understand Max-Age.\r\n // They do understand Expires, even with V1 cookies!\r\n if (version == 0 || ALWAYS_ADD_EXPIRES) {\r\n // Wdy, DD-Mon-YY HH:MM:SS GMT ( Expires Netscape format )\r\n buf.append (\"; Expires=\");\r\n // To expire immediately we need to set the time in past\r\n if (maxAge == 0) {\r\n buf.append( ancientDate );\r\n } else {\r\n OLD_COOKIE_FORMAT.get().format(\r\n new Date(System.currentTimeMillis() + maxAge * 1000L),\r\n buf,\r\n new FieldPosition(0));\r\n }\r\n }\r\n }\r\n\r\n // Path=path\r\n if (path!=null) {\r\n buf.append (\"; Path=\");\r\n maybeQuote(buf, path);\r\n }\r\n\r\n // Secure\r\n if (cookie.getSecure()) {\r\n buf.append (\"; Secure\");\r\n }\r\n\r\n // HttpOnly\r\n if (cookie.isHttpOnly()) {\r\n buf.append(\"; HttpOnly\");\r\n }\r\n return buf.toString();\r\n }",
"@Override\n public String getHeaderField(String name) {\n return jarUrlConnection.getHeaderField(name);\n }",
"public void initOkGo() throws IOException {\r\n mSPCookieStore = new SPCookieStore(this);\r\n HttpHeaders headers = new HttpHeaders();\r\n if (new SPCookieStore(this).getAllCookie().size() != 0) {\r\n headers.put(\r\n \"Set-Cookie\",\r\n String.valueOf(mSPCookieStore.getCookie(HttpUrl.parse(BaseUrl.HTTP_Get_code_auth))));\r\n }\r\n headers.put(\"version\", \"3.0\");\r\n headers.put(\"uid\", \"6f1a8e0eb24afb7ddc829f96f9f74e9d\");\r\n\r\n OkHttpClient.Builder builder = new OkHttpClient.Builder();\r\n // log相关\r\n HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(\"OkHttp\");\r\n loggingInterceptor.setPrintLevel(HttpLoggingInterceptor.Level.BODY); // log打印级别,决定了log显示的详细程度\r\n loggingInterceptor.setColorLevel(Level.INFO); // log颜色级别,决定了log在控制台显示的颜色\r\n builder.addInterceptor(loggingInterceptor); // 添加OkGo默认debug日志\r\n // 超时时间设置\r\n builder.readTimeout(10000, TimeUnit.MILLISECONDS); // 全局的读取超时时间\r\n builder.writeTimeout(10000, TimeUnit.MILLISECONDS); // 全局的写入超时时间\r\n builder.connectTimeout(10000, TimeUnit.MILLISECONDS); // 全局的连接超时时间\r\n builder.cookieJar(new CookieJarImpl(mSPCookieStore)); // 使用sp保持cookie,如果cookie不过期,则一直有效\r\n\r\n HttpsUtils.SSLParams sslParams = HttpsUtils.getSslSocketFactory(getAssets().open(\"server.cer\"));\r\n builder.sslSocketFactory(sslParams.sSLSocketFactory, sslParams.trustManager);\r\n // //配置https的域名匹配规则,使用不当会导致https握手失败\r\n builder.hostnameVerifier(HttpsUtils.UnSafeHostnameVerifier);\r\n\r\n // 其他统一的配置\r\n OkGo.getInstance()\r\n .init(this.getApplication()) // 必须调用初始化\r\n .setOkHttpClient(builder.build()) // 必须设置OkHttpClient\r\n .setCacheMode(CacheMode.NO_CACHE) // 全局统一缓存模式,默认不使用缓存,可以不传\r\n .setCacheTime(CacheEntity.CACHE_NEVER_EXPIRE) // 全局统一缓存时间,默认永不过期,可以不传\r\n .setRetryCount(3) // 全局统一超时重连次数,默认为三次,那么最差的情况会请求4次(一次原始请求,三次重连请求),不需要可以设置为0\r\n .addCommonHeaders(headers); // 全局公共头\r\n }",
"private String getJwt(HttpServletRequest request) {\n String authHeader = request.getHeader(\"Authorization\");\n if (authHeader != null && authHeader.startsWith(\"Bearer \")) {\n return authHeader.replace(\"Bearer \", \"\");\n }\n return null;\n }",
"private HttpHeaders getHttpHeader(String authToken, boolean setContentType, Optional<Map> headerInformation, boolean setFormData) {\n HttpHeaders headers = new HttpHeaders();\n headers.set(\"Authorization\",authToken);\n\n if(null != headerInformation && headerInformation.isPresent()){\n Map headerInformationToSet = headerInformation.get();\n headerInformationToSet.forEach((k, v) -> {\n headers.set(k.toString(), v.toString());\n });\n }\n\n if(setFormData){\n headers.setContentType(MediaType.MULTIPART_FORM_DATA);\n }\n\n if(setContentType) {\n headers.setContentType(MediaType.APPLICATION_JSON);\n headers.add(\"Accept\", MediaType.APPLICATION_JSON_VALUE);\n }\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n // params.put(\"Content-Type\", \"application/json; charset=UTF-8\");\n params.put(\"authorization\", token);\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headers = new HashMap<>();\n String token = sharedPreferences.getString(\"token\", \"\");\n String auth = \"Bearer \" + token;\n headers.put(\"Authorization\", auth);\n return headers;\n }",
"@Override\n public Collection<String> getRestHeaders() {\n return Arrays.asList(KerberosRealm.AUTHENTICATION_HEADER, KrbConstants.WWW_AUTHENTICATE );\n }",
"@Override\n\t\tpublic String getHeader(String name) {\n\t\t\treturn null;\n\t\t}",
"public void addHeader(String key, String header);",
"public interface PrivacyHeader extends Header\n{\n\n /**\n * Name of PrivacyHeader\n */\n public final static String NAME = \"Privacy\";\n\n\n /**\n * Set Privacy header value\n * @param privacy -- privacy type to set.\n */\n public void setPrivacy(String privacy) throws ParseException;\n\n /**\n * Get Privacy header value\n * @return privacy token name\n */\n public String getPrivacy();\n\n\n}",
"public boolean setHeader(HttpPost post)\n\t {\n\t\t for(int i=0;i<this.headParms.size();i++)\n\t\t {\n\t\t\t NameValuePair nvp=headParms.get(i);\n\t\t\t post.addHeader( nvp.getName(),nvp.getValue());\t\t\t \n\t\t }\t \n\t \n\t return true;\n\t }",
"static public void addToken(HttpServletResponse res, Authentication auth) {\n\t\tUser currentUser = (User)auth.getPrincipal();\n\t\tString currentUserId = currentUser.getId().toString();\n\t\t\n\t\tString JwtToken = Jwts.builder().setSubject(currentUserId)\n\t\t\t\t.setExpiration(new Date(System.currentTimeMillis()\n\t\t\t\t\t\t+ EXPIRATIONTIME))\n\t\t\t\t.signWith(SignatureAlgorithm.HS512, SIGNINGKEY)\n\t\t\t\t.compact();\n\t\t\n\t\tres.addHeader(\"Authorization\", PREFIX + \" \" + JwtToken);\n\t\tres.addHeader(\"Access-Control-Expose-Headers\", \"Authorization\");\n\t}",
"@Override\n protected com.squareup.okhttp.Request.Builder universal_header(com.squareup.okhttp.Request.Builder chain) {\n chain.addHeader(\"Accept\", \"*/*\");\n chain.addHeader(\"Accept-Language\", \"zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4,zh-CN;q=0.2\");\n chain.addHeader(\"Content-Type\", \"text/html; charset=utf-8\");\n chain.addHeader(\"User-Agent\", \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\");\n return super.universal_header(chain);\n }",
"private void collectHeaders(\n DirectBuffer name,\n DirectBuffer value)\n {\n if (!error())\n {\n String nameStr = name.getStringWithoutLengthUtf8(0, name.capacity());\n String valueStr = value.getStringWithoutLengthUtf8(0, value.capacity());\n // TODO cookie needs to be appended with ';'\n headers.merge(nameStr, valueStr, (o, n) -> String.format(\"%s, %s\", o, n));\n }\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap headers = new HashMap();\n headers.put(\"Content-Type\", \"application/json\");\n headers.put(\"Device-id:\", \"000bca56-fb54-4704-9abe-60efc4d9993c\");\n headers.put(\"Platform\",\"android\");\n return headers;\n }",
"public void generatePostHeader (\n HttpServletRequest request, HttpServletResponse response)\n throws IOException\n {\n request.getParameter(\"Blabbo\"); // Dummy read to send continue back to the client.\n BuildHtmlHeader(new PrintWriter (response.getOutputStream()), getTitle());\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> keys = new HashMap<String, String>();\n keys.put(\"token\", TOKEN);\n return keys;\n }"
] |
[
"0.61518604",
"0.6121864",
"0.6113999",
"0.6050566",
"0.60478854",
"0.6032886",
"0.59963506",
"0.5996228",
"0.5985769",
"0.5973951",
"0.59657663",
"0.59273547",
"0.5890665",
"0.58787584",
"0.5872791",
"0.5862717",
"0.5851045",
"0.5786053",
"0.5782603",
"0.5778662",
"0.57742983",
"0.5760947",
"0.57364064",
"0.57320845",
"0.5731641",
"0.5723022",
"0.57129395",
"0.56852",
"0.5676113",
"0.5675108",
"0.5668184",
"0.5657586",
"0.5636343",
"0.5631307",
"0.5626254",
"0.5619206",
"0.56162167",
"0.5615668",
"0.5610976",
"0.560363",
"0.5600384",
"0.55963594",
"0.5560427",
"0.5529819",
"0.5524166",
"0.5514893",
"0.55124956",
"0.5509363",
"0.5503783",
"0.5484813",
"0.5474555",
"0.5474555",
"0.54733306",
"0.54726416",
"0.5463198",
"0.54421926",
"0.5439765",
"0.54347914",
"0.543329",
"0.5407059",
"0.5406417",
"0.5389185",
"0.5388953",
"0.5386422",
"0.53825",
"0.53817815",
"0.53809464",
"0.53750485",
"0.53663766",
"0.5361293",
"0.53568673",
"0.53546965",
"0.53531146",
"0.53495127",
"0.5348965",
"0.53350395",
"0.53341675",
"0.532591",
"0.5323173",
"0.53095007",
"0.530947",
"0.52980083",
"0.52930623",
"0.52880585",
"0.5280662",
"0.5274578",
"0.5273379",
"0.5260642",
"0.5258401",
"0.5255563",
"0.52378654",
"0.523709",
"0.5235244",
"0.52289325",
"0.52199006",
"0.5215476",
"0.521279",
"0.5211992",
"0.5208602",
"0.5205804"
] |
0.5556013
|
43
|
/On doit recevoir la taille de la liste
|
public Max(ArrayList<Integer> data, int lenData) {
this.data = data;
this.lenData = lenData;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Liste(){\n\t\tsuper();\n\t\tthis.liste = new int[this.BASE_LENGTH];\n\t\tthis.nb = 0;\n\t}",
"@Override\n\tpublic ArrayList<Lista> listaListeElettorali() {\n\t\t\t\n\t\t\t\n\t\t\tDB db = getDB();\n\t\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\t\t\tArrayList<Lista> liste = new ArrayList<Lista>();\n\t\t\tSet<Integer> keys = map.keySet();\n\t\t\tfor (int key : keys) {\n\t\t\t\tliste.add(map.get(key));\n\t\t\t}\n\t\n\t\t\treturn liste;\n\t\t\t\n\t\t}",
"public void listar() {\n\t\t\n\t}",
"public void ouvrirListe(){\n\t\n}",
"public void listar(){\r\n // Verifica si la lista contiene elementoa.\r\n if (!esVacia()) {\r\n // Crea una copia de la lista.\r\n Nodo aux = inicio;\r\n // Posicion de los elementos de la lista.\r\n int i = 0;\r\n // Recorre la lista hasta el final.\r\n while(aux != null){\r\n // Imprime en pantalla el valor del nodo.\r\n System.out.print(i + \".[ \" + aux.getValor() + \" ]\" + \" -> \");\r\n // Avanza al siguiente nodo.\r\n aux = aux.getSiguiente();\r\n // Incrementa el contador de la posión.\r\n i++;\r\n }\r\n }\r\n }",
"public void mostrarLista() {\n\n Nodo recorrer = temp;\n while (recorrer != null) {\n\n System.out.println(\"[ \" + recorrer.getDato() + \"]\");\n recorrer = recorrer.getSiguiente();\n\n }\n\n }",
"public void listar() {\n\n if (!vacia()) {\n\n NodoEnteroSimple temp = head;\n\n int i = 0;\n\n while (temp != null) {\n\n System.out.print(i + \".[ \" + temp.getValor() + \" ]\" + \" -> \");\n\n temp = temp.getSiguiente();\n\n i++;\n }\n }\n \n }",
"public ListaDuplamenteEncadeada(){\r\n\t\t\r\n\t}",
"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 }",
"private void listViewPendentes(List<Compra> listAll) {\n\t\t\n\t}",
"public void obrniListu() {\n if (prvi != null && prvi.veza != null) {\n Element preth = null;\n Element tek = prvi;\n \n while (tek != null) {\n Element sled = tek.veza;\n \n tek.veza = preth;\n preth = tek;\n tek = sled;\n }\n prvi = preth;\n }\n }",
"public void chargeListe(){\n jCbListeEtablissement.removeAllItems();\n String sReq = \"From Etablissement\";\n Query q = jfPrincipal.getSession().createQuery(sReq);\n Iterator eta = q.iterate();\n while(eta.hasNext())\n {\n Etablissement unEtablissement = (Etablissement) eta.next();\n jCbListeEtablissement.addItem(unEtablissement.getEtaNom());\n }\n bChargeListe = true;\n }",
"public void populerListView() {\n Turnering valgtTurnering;\n valgtTurnering = fp_kombo_turnering.getSelectionModel().getSelectedItem();\n valgtTurnering.hentParti();\n for (Parti p: valgtTurnering.hentParti()) {\n fp_liste_parti.getItems().add(p);\n }\n this.partierLastet = true;\n this.fp_knapp_velg_parti.setDisable(false);\n this.fp_knapp_søk_parti.setDisable(false);\n }",
"private void AfficherListDesLivre(List<Livre> liv) {\n ListLivre.removeAll();\n\n while (model.getRowCount() > 0)\n model.removeRow(0);\n\n if(model.getColumnCount() == 0){\n model.addColumn(\"ID\");\n model.addColumn(\"Titre\");\n model.addColumn(\"Auteur\");\n }\n\n for(Livre L : liv){\n model.addRow(new Object[] { L.getIdLivre(),L.getNomLivre(),L.getAuteur() });\n }\n ListLivre.setModel(model); \n }",
"public Jahresrangliste() {\r\n\t\tLaeufe = new ArrayList<Lauf>();\r\n\t\tRennfahrer = new ArrayList<Fahrer>();\r\n\t}",
"@Override\n\t\t\tpublic int getCount(){\n\t\t\t\treturn list.size();\n\t\t\t}",
"private void genererListeView() {\n\n displayToast(\"Antall treff: \" + spisestedListe.size());\n\n //sorterer alfabetisk på navn\n Collections.sort(spisestedListe);\n\n spisestedAdapter = new SpisestedAdapter(this, spisestedListe);\n recyclerView.setAdapter(spisestedAdapter);\n\n //henter inn antall kolonner fra values, verdi 2 i landscape\n // https://stackoverflow.com/questions/29579811/changing-number-of-columns-with-gridlayoutmanager-and-recyclerview\n int columns = getResources().getInteger(R.integer.list_columns);\n recyclerView.setLayoutManager(new GridLayoutManager(this, columns));\n }",
"@Override\r\n\tpublic int getCount() {\r\n\r\n\t\treturn lista.size();\r\n\t}",
"public void listar(){\n if (!esVacia()) {\n // Crea una copia de la lista.\n NodoEmpleado aux = inicio;\n // Posicion de los elementos de la lista.\n int i = 0;\n System.out.print(\"-> \");\n // Recorre la lista hasta llegar nuevamente al incio de la lista.\n do{\n // Imprime en pantalla el valor del nodo.\n System.out.print(i + \".[ \" + aux.getEmpleado() + \" ]\" + \" -> \");\n // Avanza al siguiente nodo.\n aux = aux.getSiguiente();\n // Incrementa el contador de la posi�n.\n i++;\n }while(aux != inicio);\n }\n }",
"public void MostrarListas (){\n Nodo recorrer=inicio; // esto sirve para que el elemento de la lista vaya recorriendo conforme se inserta un elemento\r\n System.out.println(); // esto nos sirve para dar espacio a la codificacion de la lista al imprimir \r\n while (recorrer!=null){ // esta secuencia iterativa nos sirve para repetir las opciones del menu\r\n System.out.print(\"[\" + recorrer.dato +\"]--->\");\r\n recorrer=recorrer.siguiente;\r\n }\r\n }",
"@Override\r\n\t\r\n\t public int size() {\n\t\r\n\t\t return lstItems.size();\r\n\t\r\n\t }",
"public void revolver() {\n this.lista = Lista.escojerAleatorio(this, this.size()).lista;\n }",
"public ListaPracownikow() {\n generujPracownikow();\n //dodajPracownika();\n }",
"public void listeDesEmpruntsEnCours();",
"private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }",
"private void listarItems() {\r\n // Cabecera\r\n System.out.println(\"Listado de Items\");\r\n System.out.println(\"================\");\r\n\r\n // Criterio de Ordenación/Filtrado\r\n System.out.printf(\"Criterio de Ordenación .: %S%n\", criOrd.getNombre());\r\n System.out.printf(\"Criterio de Filtrado ...: %S%n\", criFil.getNombre());\r\n\r\n // Separados\r\n System.out.println(\"---\");\r\n\r\n // Filtrado > Selección Colección\r\n List<Item> lista = criFil.equals(Criterio.NINGUNO) ? CARRITO : FILTRO;\r\n\r\n // Recorrido Colección\r\n for (Item item : lista) {\r\n System.out.println(item.toString());\r\n }\r\n\r\n // Pausai\r\n UtilesEntrada.hacerPausa();\r\n }",
"Object getTolist();",
"@Override\n\t\tpublic int getCount() {\n\t\t\treturn lists.size();\n\t\t}",
"@Override\r\n\t\t\tpublic int getCount() {\n\t\t\t\treturn list.length;\r\n\t\t\t}",
"public void Lista(){\n\t\tcabeza = null;\n\t\ttamanio = 0;\n\t}",
"@Override\n\tpublic void acheter(List<Object> la) {\n\t\t\n\t}",
"public DobbeltLenketListe() {\n this.hode= null;\n this.hale= null;\n antall=0; }",
"public void listarDadosNaTelaAreaDeConhecimento(ArrayList<AreaDeConhecimento> lista, DefaultTableModel model) {\n model.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[3];\n AreaDeConhecimento aux = lista.get(pos);\n linha[0] = \"\" + aux.getId();\n linha[1]=aux.getClassificacaoDecimalDireito();\n linha[2] = aux.getDescricao();\n model.addRow(linha);\n }\n }",
"@Override\n\t\tpublic int getCount() {\n\t\t\treturn mList.size();\n\t\t}",
"@Override\n\tpublic ArrayList<Elezione> listaElezioni() {\n\t\tArrayList<Elezione> listaElezioni = caricaElezioni();\n\t\treturn listaElezioni;\n\t}",
"abstract List<T> getReuslt();",
"public JScrollPane vytvorList() {\n listModel = new DefaultListModel();\n //listModel.addElement(\"Hra: 0 DUMMY\");\n\n listHer = new JList(listModel);\n listHer.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n listHer.setSelectedIndex(0);\n listHer.addListSelectionListener(this);\n listHer.setVisibleRowCount(7);\n listHer.setVisible(true);\n\n JScrollPane listScrollPane = new JScrollPane(listHer);\n listScrollPane.setPreferredSize(new Dimension(250, 300));\n listScrollPane.setVisible(true);\n listScrollPane.setName(\"hry\");\n\n return listScrollPane;\n }",
"public void mostrarLista(){\n Nodo recorrer = inicio;\n while(recorrer!=null){\n System.out.print(\"[\"+recorrer.edad+\"]-->\");\n recorrer=recorrer.siguiente;\n }\n System.out.println(recorrer);\n }",
"void listarDadosNaTelaAutor(ArrayList<Autor> lista, DefaultTableModel model) {\n model.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[2];\n Autor aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = aux.getNome();\n model.addRow(linha);\n }\n }",
"public List<New> list();",
"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}",
"public void liste()\n {\n Collections.sort(listOrder, new Comparator<Order>() {\n @Override\n public int compare(Order o1, Order o2) {\n return o1.getStart() - o2.getStart(); // use your logic, Luke\n }\n });\n System.out.println(\"LISTE DES ORDRES\\n\");\n System.out.format(\"%8s %8s %5s %13s\", \"ID\", \"DEBUT\", \"DUREE\", \"PRIX\\n\");\n System.out.format(\"%8s %8s %5s %13s\", \"--------\", \"-------\", \"-----\", \"----------\\n\");\n for(int i = 0; i< listOrder.size(); i++) {\n Order order = listOrder.get(i);\n afficherOrdre(order);\n }\n System.out.format(\"%8s %8s %5s %13s\", \"--------\", \"-------\", \"-----\", \"----------\\n\");\n }",
"@Override\r\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\r\n\t\t}",
"@Override\r\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\r\n\t\t}",
"public JsfVenda() {\r\n litem = new ArrayList();\r\n }",
"@Override\n\t\t\t\t\t\tpublic int getCount() {\n\t\t\t\t\t\treturn listItem.size();\n\t\t\t\t\t\t}",
"@Override\r\n\tpublic String list() {\n\t\tList<HeadLine> dataList=new ArrayList<HeadLine>();\r\n\t\tPagerItem pagerItem=new PagerItem();\r\n\t\tpagerItem.parsePageSize(pageSize);\r\n\t\tpagerItem.parsePageNum(pageNum);\r\n\t\t\r\n\t\tLong count=headLineService.count();\r\n\t\tpagerItem.changeRowCount(count);\r\n\t\t\r\n\t\tdataList=headLineService.pager(pagerItem.getPageNum(), pagerItem.getPageSize());\r\n\t\tpagerItem.changeUrl(SysFun.generalUrl(requestURI, queryString));\r\n\t\t\r\n\t\trequest.put(\"DataList\", dataList);\r\n\t\trequest.put(\"pagerItem\", pagerItem);\r\n\t\t\r\n\t\t\r\n\t\treturn \"list\";\r\n\t}",
"void listarDadosNaTelaLivro(ArrayList<Livro> lista,DefaultTableModel model ) throws Exception {\n \n model.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[7];\n Livro aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = \"\"+editora.recuperar(aux.getIdEditora());\n linha[2] = \"\"+autor.recuperar(aux.getIdAutor());\n linha[3] = \"\"+areaDeConhecimento.recuperar(aux.getIdAreaDeConhecimento());\n linha[4] = aux.getTituloDoLivro();\n linha[5] = \"\"+aux.getIsbn();\n model.addRow(linha);\n }\n }",
"public Lista listar() {\n Lista listaAux = new Lista();\r\n if (this.raiz != null) {\r\n listaAux = listarAux(this.raiz, listaAux);\r\n }\r\n return listaAux;\r\n }",
"@Override\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\n\t\t}",
"@Override\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\n\t\t}",
"@Override\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\n\t\t}",
"@Override\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\n\t\t}",
"@Override\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\n\t\t}",
"@Override\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\n\t\t}",
"@Override\n public int getCount() {\n return mList.size();\n }",
"public Lista()\n {\n empty=true;\n next = null;\n }",
"public JList obtenirList() {\r\n\t\treturn list;\r\n\t}",
"public ListaEtiquetas() {\n this.listaEtiquetas = new ArrayList<>();\n }",
"@Override\n public int getItemCount() {\n //neste caso 10\n return mList.size();\n }",
"@Override\r\n\tpublic int getCount() {\n\t\treturn listab.size();\r\n\t}",
"public ListaPalabras() {\n\n //pos=0;\n }",
"public ListaEncadeada() {\n first = null;\n }",
"@Override\n\tpublic int getCount() {\n\t\tLog.i(\"\", lists.size() + \"---\");\n\t\treturn lists.size();\n\t}",
"private void listarDadosNaTelaEditora(ArrayList<Editora> lista) {\n DefaultTableModel modelEditoras = (DefaultTableModel) jTable_tabelaEditoras.getModel();\n jTable_tabelaEditoras.setRowSorter(new TableRowSorter(modelEditoras));\n //Limpando a tela\n modelEditoras.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[2];\n Editora aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = aux.getNome();\n modelEditoras.addRow(linha);\n }\n }",
"@Override\n public String getName() {\n return \"list\";\n }",
"public void afficheInfos() {\n int i;\n Polygone p;\n for(i=0;i<this.list.size();i++){\n p = (Polygone) this.list.get(i);\n System.out.println(\"–––––––––––––––––––––\");\n System.out.println(\"Type : \" + p.toString());\n System.out.println(\"Sommet :\");\n System.out.print(p.texteSommets());\n System.out.println(\"Perimetre : \" + p.perimetre());\n System.out.println(\"Surface : \" + p.surface());\n System.out.println(\"–––––––––––––––––––––\");\n } \n }",
"@Override\r\n\tpublic int getCount() {\n\t\treturn lists.size();\r\n\t}",
"@Override\r\n\tpublic int getCount() {\n\t\treturn lists.size();\r\n\t}",
"void listarDadosNaTelaColaborador(ArrayList<Colaborador> lista,DefaultTableModel model ) {\n model.setNumRows(0);\n //Correr o ArrayList\n for (int pos = 0; pos < lista.size(); pos++) {\n String[] linha = new String[9];\n Colaborador aux = lista.get(pos);\n linha[0] = \"\"+aux.getId();\n linha[1] = \"\"+aux.getMatricula();\n linha[2] = aux.getNome();\n linha[3] = \"\"+aux.getNumeroOAB();\n linha[4] = \"\"+aux.getCpf();\n linha[5] = aux.getEmail();\n linha[6] = \"\"+aux.getTelefone();\n linha[7] = aux.getTipo().toString();\n linha[8] = aux.getStatus().toString();\n model.addRow(linha);\n }\n }",
"@Override\r\n\tpublic int getCount() {\n\t\treturn mList.size();\r\n\t}",
"@Override\r\n\tpublic int getCount() {\n\t\treturn mList.size();\r\n\t}",
"@Override\r\n\tpublic int getCount() {\n\t\treturn mList.size();\r\n\t}",
"public DList2 list(){\r\n return this.list;\r\n }",
"public ArrayList<String> mostraLlistaDiscret(){\n ArrayList<String> tauleta = new ArrayList<>();\n int p = 0;\n System.out.print(\"num atribs disc de 0: \"+list.getAtribs().get(0).getAtribsDisc().size());\n ArrayList<Atribut> disc = new ArrayList<Atribut>();\n\n for (int i=0; i<list.getAtribs().size(); i++){\n if (list.getAtribs().get(i).getDiscret()) disc.add(list.getAtribs().get(i));\n }\n\n\n String aux = \"\";\n for (int i=0; i<disc.size(); i++){\n for (int k=0; k<disc.get(i).getAtribsDisc().size(); k++) {\n aux += disc.get(i).getAtribsDisc().get(k).getNom() + \"\\t\";\n }\n }\n tauleta.add(aux);\n for (int j=0; j<list.getNumCasos(); j++) {\n aux = \"\";\n for (int i = 0; i < disc.size(); i++) {\n int f = 0;\n if (!disc.get(i).getShowDefault()) f++;\n for (int k=f; k<disc.get(i).getAtribsDisc().size(); k++) {\n aux += String.valueOf(disc.get(i).getAtribsDisc().get(k).getCasos().get(j)) + \"\\t\";\n }\n }\n tauleta.add(aux);\n }\n return tauleta;\n }",
"@Override\n public int getItemCount() {\n return list.size();\n }",
"private void initList() {\n tempShopList=wdh.getTempShopList();\n final String[] listIndex=new String[tempShopList.size()];\n \n // System.out.println(tempShopList.size());\n \n for(int i=0;i<tempShopList.size();i++)\n listIndex[i]=String.valueOf(i+1); \n \n// jList1=new JList(listIndex);\n// jScrollPane1=new JScrollPane(jList1);\n// jScrollPane1.setViewportView(jList1);\n \n \n jList1.setModel(new javax.swing.AbstractListModel() {\n String[] strings1 = listIndex;\n public int getSize() { return strings1.length; }\n public Object getElementAt(int i) { return strings1[i]; }\n });\n jScrollPane1.setViewportView(jList1);\n \n }",
"@Override\r\n\tpublic int getCount() {\n\t\treturn listmore.size();\r\n\t}",
"List() {\n this.length = 0;\n }",
"private static void afficherLeslistes(List<List<Recette>> listeProposition) {\n\t\tfor (int i = 0; i < listeProposition.size(); i++) {\n\t\t\tList<Recette> liste = listeProposition.get(i);\n\t\t\tSystem.out.println(i + 1);\n\t\t\tfor (int s = 0; s < liste.size(); s++) {\n\t\t\t\tRecette recette = liste.get(s);\n\t\t\t\tString note = \"\";\n\t\t\t\tfor (int n = 0; n < recette.getNote(); n++) {\n\t\t\t\t\tnote += \"*\";\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\" - \" + recette.getNom() + \" (\" + note + \")\");\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public int getItemCount() {\n return stList.size();\n }",
"@Override\n public int getItemCount() {\n return stList.size();\n }",
"@Override\n\tpublic int getCount() {\n\t\t return list.size();\n\t}",
"@Override\n public int getCount() {\n return li.size();\n }",
"@Override\n\tpublic int getCount() {\n\t\treturn litigantList.size();\n\t}",
"@Override\n\t\t\tpublic void onRefresh() {\n\t\t\t\tcurPage = 1;\n\t\t\t\tmList.clear();\n\t\t\t\tJiaoYiJiLuExec.getInstance().getTiXianJiLuList(mHandler,\n\t\t\t\t\t\tManagerUtils.getInstance().yjtc.getId(), curPage,\n\t\t\t\t\t\tpageSize, NetworkAsyncCommonDefines.GET_TXJL_LIST_S,\n\t\t\t\t\t\tNetworkAsyncCommonDefines.GET_TXJL_LIST_F);\n\t\t\t}",
"private List<SimpleComponent> list() {\n\t\treturn this.list(null);\n\t}",
"public List<Item> getItemList();",
"public void genLists() {\n\t}",
"abstract void makeList();",
"public List<Etudiant> afficher() {\n\t\treturn dao.afficher();\r\n\t}",
"private void initList() {\n\n }",
"public String listViaje() {\n\t\t\t//resetForm();\n\t\t\treturn \"/boleta/list.xhtml\";\t\n\t\t}",
"private void viewList() {\n ToDoList highPriority = new ToDoList(\"high priority\");\n ToDoList midPriority = new ToDoList(\"mid priority\");\n ToDoList lowPriority = new ToDoList(\"high priority\");\n\n for (int i = 0; i < toDoList.getSize(); i++) {\n if (toDoList.getItemAtIndex(i + 1).getCategory().equals(Categories.HIGHPRIORITY)) {\n highPriority.insert(toDoList.getItemAtIndex(i + 1));\n }\n\n if (toDoList.getItemAtIndex(i + 1).getCategory().equals(Categories.MIDPRIORITY)) {\n midPriority.insert(toDoList.getItemAtIndex(i + 1));\n }\n\n if (toDoList.getItemAtIndex(i + 1).getCategory().equals(Categories.LOWPRIORITY)) {\n lowPriority.insert(toDoList.getItemAtIndex(i + 1));\n }\n }\n\n System.out.println(\"HIGH PRIORITY: \");\n display(highPriority);\n System.out.println(\"MID PRIORITY: \");\n display(midPriority);\n System.out.println(\"LOW PRIORITY: \");\n display(lowPriority);\n displayUrgent(toDoList);\n }",
"public void obtenerLista(){\n listaInformacion = new ArrayList<>();\n for (int i = 0; i < listaPersonales.size(); i++){\n listaInformacion.add(listaPersonales.get(i).getId() + \" - \" + listaPersonales.get(i).getNombre());\n }\n }",
"public Listas_simplemente_enlazada(){\r\n inicio=null; // este constructor me va servir para apuntar el elemento\r\n fin=null;\r\n }",
"@Override\r\n\tpublic int getCount() {\n\t\treturn arList.size();\r\n\t}",
"@Override\n public int getItemCount() {\n return mList.size();\n }",
"@Override\n public int getItemCount() {\n return mList.size();\n }",
"@Override\n public int getItemCount() {\n return mList.size();\n }",
"public void updateList() \n { \n model.clear();\n for(int i = ScholarshipTask.repository.data.size() - 1; i >= 0; i--) \n {\n model.addElement(ScholarshipTask.repository.data.get(i));\n }\n }"
] |
[
"0.6860893",
"0.68033695",
"0.6786189",
"0.6627272",
"0.6620443",
"0.66002715",
"0.6596591",
"0.65853786",
"0.6513166",
"0.65096635",
"0.6476844",
"0.6431597",
"0.63875467",
"0.6383132",
"0.6368728",
"0.63492006",
"0.63453346",
"0.63298213",
"0.6282673",
"0.62583447",
"0.6253553",
"0.62500656",
"0.6249085",
"0.6248435",
"0.6242082",
"0.6224209",
"0.62171453",
"0.62143487",
"0.6210145",
"0.62003994",
"0.6187885",
"0.61870265",
"0.6170123",
"0.6154963",
"0.61522883",
"0.6151907",
"0.6144768",
"0.61338466",
"0.6125719",
"0.61228144",
"0.61208797",
"0.6114361",
"0.61109453",
"0.61109453",
"0.6098734",
"0.6098707",
"0.6096406",
"0.6093434",
"0.6086778",
"0.60775",
"0.60775",
"0.60775",
"0.60775",
"0.60775",
"0.60775",
"0.60698295",
"0.60545105",
"0.6039742",
"0.6038282",
"0.60335827",
"0.60271126",
"0.6027059",
"0.60127187",
"0.6011564",
"0.60109335",
"0.6010531",
"0.60100263",
"0.6003648",
"0.6003648",
"0.5999536",
"0.59983295",
"0.59983295",
"0.59983295",
"0.59925914",
"0.5979731",
"0.59762686",
"0.5971456",
"0.5962926",
"0.59628767",
"0.5962677",
"0.59578806",
"0.59578806",
"0.5956284",
"0.5951173",
"0.5949377",
"0.5946995",
"0.594542",
"0.5945399",
"0.5942664",
"0.593187",
"0.59314394",
"0.59298027",
"0.59236187",
"0.5922274",
"0.5916452",
"0.5915972",
"0.5913877",
"0.59050083",
"0.59050083",
"0.59050083",
"0.59047997"
] |
0.0
|
-1
|
======================================================================= Static Helpers methods ========================================================================
|
public static Frame getViewerFrame(IMimeViewer viewr)
{
Component comp = viewr.getViewComponent();
if (comp instanceof JComponent)
{
Container topComp=((JComponent)comp).getTopLevelAncestor();
if (topComp instanceof Frame)
{
return ((Frame)topComp);
}
}
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private Util() { }",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"private Util() {\n }",
"private BuilderUtils() {}",
"private FormatUtilities() {}",
"private StringUtilities() {\n // nothing to do\n }",
"private JacobUtils() {}",
"private ProcessorUtils() { }",
"private Util() {\n }",
"private Util() {\n }",
"private CollectionUtils() {\n\n\t}",
"private RdfFormatUtils() {\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"private Utils() {\n\t}",
"private Utils() {\n\t}",
"private CheckUtil(){ }",
"protected CombinatoricsUtils() {\n super();\n }",
"private OMUtil() { }",
"@Override\n\tpublic void initUtils() {\n\n\t}",
"private ReportGenerationUtil() {\n\t\t\n\t}",
"private Helper() {\r\n // empty\r\n }",
"private CreateDateUtils()\r\n\t{\r\n\t}",
"private StringUtil() {\n\t\tsuper();\n\t}",
"private SnapshotUtils() {\r\n\t}",
"private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }",
"private AsciiUtils() {\r\n\t}",
"private stendhal() {\n\t}",
"private ClassifierUtils() {\n throw new AssertionError();\n }",
"public Utils() {}",
"private ArraySetHelper() {\n\t\t// nothing\n\t}",
"private SerializationUtils() {\n\t\tthrow new AssertionError();\n\t}",
"private IOUtilities() {\n }",
"private RendererUtils() {\n throw new AssertionError(R.string.assertion_utility_class_never_instantiated);\n }",
"private PathUtils() {\n }",
"private WAPIHelper() { }",
"private J2EEUtils() {\n }",
"private EncryptionUtility(){\r\n\t\treturn;\t\t\r\n\t}",
"private FSUtils() {\n }",
"private NamespaceHelper() {}",
"private Utility() {\n\t}",
"public abstract String mo13682d();",
"private S3Utils() {\n throw new UnsupportedOperationException(\"This class cannot be instantiated\");\n }",
"private PortletRequestUtils() {\r\n\t\tthrow new UnsupportedOperationException();\r\n\t}",
"Compatibility compatibility();",
"private Quantify()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not supported.\");\n }",
"private HeaderUtil() {}",
"private FaceConversionUtil() {\n\n\t}",
"public abstract String mo41079d();",
"private XhtmlUtils()\n\t{\n\t}",
"private WebStringUtils() {}",
"public abstract String mo118046b();",
"private C3P0Helper() { }",
"private CollectionUtils() {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"private HelperLocation() {}",
"private ComparableEntitySpanUtils() {\n // Singleton\n }",
"private StringUtil() {}",
"private StringUtil() {}",
"protected boolean func_70814_o() { return true; }",
"private SysUtils(){}",
"private S2EdgeUtil() {}",
"public abstract String mo9239aw();",
"private ValidationUtils() {}",
"public abstract String mo8770a();",
"private AppUtils() {\n throw new UnsupportedOperationException(\"cannot be instantiated\");\n }",
"private Utility() {\n throw new IllegalAccessError();\n }",
"public interface CommonUtils {\n\tpublic static String getPrintStackTrace(Exception e){\n\t\t//StringWriter writes upon the string\n\t\tStringWriter sw = new StringWriter();\n\t\t//PrintWriter integrates with StringWriter\n\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t//This line used to write in catch block then it will writes in the console prints upon the console\n\t\t//Basically prints the data upon the console\n\t\te.printStackTrace(pw);\n\t\t//it will converts to tostring method into some meaningful data\n\t\treturn sw.toString();\n\t}\n}",
"private Util()\n {\n // Empty default ctor, defined to override access scope.\n }",
"private static Object Stringbuilder() {\n\t\treturn null;\n\t}",
"private Utils()\n {\n // Private constructor to prevent instantiation\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private AvroSchemaKeyTranslationUtilities() {\n }",
"private VlcUtils()\n {\n \n }",
"private FunctionUtils() {\n }",
"private JsonUtils() { }",
"private ExplorerFileSystemUtils() {\n // no op\n }",
"public static String getInfo() {\n/* 327 */ return \"\";\n/* */ }",
"private static void staticFun()\n {\n }",
"public void method_4270() {}",
"static void init() {}",
"private InstanceUtil() {\n }",
"abstract String mo1748c();",
"private WinRateHelper() {\n throw new AssertionError();\n }",
"private CommonMethods() {\n }",
"private static void LessonInstanceVsStatic() {\n System.out.println(MathHelper.E);\n System.out.println(MathHelper.PI);\n System.out.println(MathHelper.square(5));\n //Three helper methods for StringHelper\n System.out.println(StringHelper.removeLeadingAndTrailingSpaces(\" Hello \"));\n System.out.println(StringHelper.removeAllSpace(\" He ll o !\"));\n System.out.println(StringHelper.yelling(\"hello\"));\n //Three helper methods for MathHelper\n System.out.println(MathHelper.cubed(5));\n System.out.println(MathHelper.areaOfRectangle(2,3));\n System.out.println(MathHelper.perimeterOfRectangle(4, 5));\n\n }",
"private ClassUtil() {}",
"private LookupUtil(){}",
"private TagsBenchmarksUtil() {}",
"private ImageUtils() {}",
"protected HadoopUtils() { }",
"private LangUtilities() {\n }",
"public abstract String use();",
"public abstract String mo11611b();"
] |
[
"0.64919466",
"0.6046226",
"0.6046226",
"0.6046226",
"0.6046226",
"0.58315474",
"0.58315474",
"0.57683057",
"0.573449",
"0.56787646",
"0.56780463",
"0.56461877",
"0.56454694",
"0.562793",
"0.562793",
"0.56197256",
"0.56111294",
"0.5608605",
"0.56079835",
"0.56079835",
"0.5595634",
"0.55825853",
"0.5561068",
"0.5556512",
"0.55417264",
"0.5535942",
"0.5526337",
"0.55161726",
"0.5503796",
"0.5503257",
"0.54871404",
"0.5478582",
"0.54692674",
"0.5438699",
"0.54162836",
"0.5414208",
"0.53831846",
"0.53666717",
"0.53637826",
"0.53618705",
"0.53539246",
"0.5352851",
"0.5352101",
"0.5347075",
"0.53307134",
"0.5322474",
"0.5321782",
"0.5321339",
"0.53203595",
"0.53164756",
"0.5314293",
"0.53064877",
"0.53049207",
"0.52920085",
"0.5289972",
"0.52793026",
"0.52714807",
"0.5260901",
"0.5249889",
"0.52497905",
"0.52449447",
"0.52449447",
"0.5242343",
"0.52342814",
"0.5226618",
"0.52099645",
"0.5203137",
"0.5201005",
"0.5199557",
"0.51954365",
"0.5194531",
"0.518907",
"0.51828986",
"0.51820886",
"0.51766545",
"0.51766545",
"0.51766545",
"0.51766545",
"0.51766545",
"0.5171952",
"0.5170356",
"0.51636314",
"0.51624775",
"0.51608956",
"0.51554704",
"0.5152872",
"0.51502675",
"0.51378125",
"0.5133933",
"0.5127323",
"0.5127109",
"0.5126397",
"0.5122763",
"0.511711",
"0.51144975",
"0.51141125",
"0.51078457",
"0.51013553",
"0.5096692",
"0.5082377",
"0.50759375"
] |
0.0
|
-1
|
This method is called by the frame listener when a window closing event is received. Default implementation is to perform signalFinalize(); Override this method if the Viewer cannot be disposed.
|
public void handleWindowClosingEvent(WindowEvent e)
{
//debug("handleWindowClosingEvent:"+e);
// finalize in background:
signalFinalize();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void windowClosed(WindowEvent arg0) {\n\n }",
"@Override\r\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\n\n\t\t\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent arg0)\n\t{\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent arg0)\n\t{\n\t\t\n\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\t\tframe.dispose();\n\t\t\t}",
"@Override\n\tpublic void windowClosed(WindowEvent arg0) {\n\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t}",
"@Override\r\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void windowClosed (WindowEvent e)\n\t{\n\t}",
"@Override\r\n\t\tpublic void windowClosed(WindowEvent e) {\n\t\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\n\t\t\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t}",
"@Override\n\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\r\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent e) {\n\n\t}",
"@Override\n public void windowClosed(WindowEvent we) {\n }",
"@Override\r\n\tpublic void windowClosing(WindowEvent event) {\r\n\t\tif (event.getWindow() == this) {\r\n\t\t\tdispose();\r\n\r\n\t\t\t// Overriding the ApplicationFrame behavior\r\n\t\t\t// Do not shutdown the JVM\r\n\t\t\t// System.exit(0);\r\n\t\t\t// -----------------------------------------\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void windowClosed(WindowEvent e) {\n\r\n\t}",
"@Override\n public void windowClosing(WindowEvent e) {\n new Thread() {\n @Override\n public void run() {\n \n if (animator != null && animator.isStarted()) {\n animator.stop();\n }\n if (fpsMonitor != null) { \n fpsMonitor.stop();\n }\n \n try {\n SwingUtilities.invokeAndWait (new Runnable() {\n @Override\n public void run () {\n viewer.dispose ();\n }\n });\n }\n catch (InvocationTargetException e) {\n }\n catch (InterruptedException e) {\n }\n \n closed = true;\n }\n }.start();\n }",
"protected void windowClosed() {\r\n\r\n\t\t// Exit\tapplication.\r\n\t\tSystem.exit(0);\r\n\t}",
"@Override\r\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tdispose();\r\n\t\t\t}",
"@Override\n\tpublic void windowClosed( WindowEvent e ) {\n\t\t\n\t}",
"public void windowClosed(WindowEvent e) {\n\t\t\r\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\tSystem.exit(0);\n\t}",
"@Override\n\t\t\tpublic void windowClosing(WindowEvent e)\n\t\t\t{\n\t\t\t\tdispose();\n\t\t\t}",
"public void windowClosed(WindowEvent arg0) {\n\n }",
"public void windowClosed(WindowEvent e){}",
"public void windowClosed(WindowEvent wE) {\n\t\t\t}",
"@Override\n\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\timagePublisher.removeListener(imageListener);\n\t\t}",
"@Override\r\n public void windowClosed(WindowEvent e) {\r\n System.out.println(\"Window closed.\");\r\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n }",
"@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\twindow_Closing(e);\n\t\t\t}",
"public void windowClosed(WindowEvent e) {\n\r\n\t}",
"public void windowClosing(WindowEvent e)\r\n\t\t\t\t{\r\n\t\t\t\t\tWatchMeFrame.this.windowClosed();\r\n\t\t\t\t}",
"public void windowClosing(WindowEvent comeInWindowEvent) {\n\t\tGUICommon.mainFrame.dispose();\n\t\tSystem.exit(0);\n\t}",
"@Override\n\tpublic void windowClosed(WindowEvent arg0) {\n\t\tparent.setVisible(true);\t\t\n\t}",
"public void windowClosing(WindowEvent e) {\n dispose();\n }",
"@Override\n public void windowClosing(WindowEvent e)\n {\n\n }",
"@Override\n\tpublic void windowClosing(WindowEvent arg0) {\n\t\tthis.setVisible(false);\n\t\tthis.dispose();\n\t}",
"@Override\n\t\t\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\t\tsetStillRunning(false);\n\t\t\t\t\t}",
"@Override\n public void windowClosing(WindowEvent e)\n {\n gui.exitApp();\n }",
"@Override\n\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\n\t\t}",
"private void thisWindowClosing()\n {\n // Keep track of the fact that we're in the act of closing this window\n m_bClosing = true;\n\n // Need to explicitly release the focus which in turn will cause any\n // listeners to unregister from this agent (is its still alive).\n // Otherwise our listeners will\n // still be registered and will try to display output in windows that\n // are disposed.\n // This has the potential to deadlock (waiting to issue unregister calls\n // while we're running) so we put\n // it in a separate thread to avoid that.\n Thread clearFocus = new Thread(() -> clearAgentFocus(false));\n clearFocus.start();\n\n // DJP: Experiment\n // if (this.getDocument().getNumberFrames() > 1)\n // this.setAgentFocus(null);\n\n // Record the current window positions as properties,\n // which we can then save.\n RecordWindowPositions();\n\n // Save current layout file\n saveCurrentLayoutFile();\n\n // Save the user's preferences to the properties file.\n try\n {\n this.getAppProperties().Save();\n }\n catch (Throwable t)\n {\n edu.umich.soar.debugger.general.Debug\n .println(\"Error saving properties file: \" + t.getMessage());\n }\n\n // Remove us from the list of active frames\n this.getDocument().removeFrame(this);\n\n // Dispose of all of the colors we created\n for (Color mColor : m_Colors) {\n Color color = mColor;\n color.dispose();\n }\n\n if (m_TextFont != null)\n m_TextFont.dispose();\n\n // Exit the app if we're the last frame\n if (this.getDocument().getNumberFrames() == 0)\n {\n getDocument().close(true);\n }\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n closeWindow();\n }",
"@Override\n\tpublic void windowClosing(WindowEvent e) {\n\t}"
] |
[
"0.78607494",
"0.78383636",
"0.7834427",
"0.7791143",
"0.7791143",
"0.7791143",
"0.7791143",
"0.7791143",
"0.7791143",
"0.7791143",
"0.7761017",
"0.7761017",
"0.7739827",
"0.7739827",
"0.7736679",
"0.7711251",
"0.7709758",
"0.7709758",
"0.76033705",
"0.7572672",
"0.7572653",
"0.75482",
"0.75474495",
"0.75474495",
"0.75474495",
"0.75407594",
"0.753794",
"0.7509153",
"0.7509153",
"0.75085723",
"0.75085723",
"0.75085723",
"0.7482466",
"0.7482466",
"0.7482466",
"0.7482466",
"0.7482466",
"0.7482466",
"0.7482466",
"0.74782246",
"0.74782246",
"0.74782246",
"0.74782246",
"0.7454388",
"0.7454388",
"0.7454388",
"0.7454388",
"0.7454388",
"0.7454388",
"0.7454388",
"0.7448451",
"0.7433348",
"0.7429984",
"0.738051",
"0.7369822",
"0.7347045",
"0.73286206",
"0.7320738",
"0.731472",
"0.7312525",
"0.73101926",
"0.7308588",
"0.73070765",
"0.7289515",
"0.72755253",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7221507",
"0.7212923",
"0.7210706",
"0.72106373",
"0.7185785",
"0.718576",
"0.71808267",
"0.7177193",
"0.7167147",
"0.7153151",
"0.7143313",
"0.71398157",
"0.71308404",
"0.71285814",
"0.71219295"
] |
0.73255867
|
57
|
Create or update view panel with VRL. Starts in new thread. This is the method called by the main browser to start the viewer. This method first calls initViewer() in the main swing event thread so subclassed viewers MUST return from this method. Then in a seperate thread the startViewer() method is called. Subclassed viewers don't have to return from this thread or can done background tasks.
|
final public void startFor(final VRL location,final String optionalMethodName,final ActionContext actionContext)
throws VrsException
{
// ===
// Pre: Context: Startup environmnet
// ===
if (this.startTask!=null)
{
throw new nl.esciencecenter.vbrowser.vrs.exceptions.VrsException("Viewer Exception: Cannot start viewer twice");
}
// check viewer context:
if (viewer.getViewContext()==null)
{
UILogger.errorPrintf(this,"Warning: Viewer context not set: creating default for:%s\n",this);
viewer.setViewContext(new ViewContext(null));
}
// update viewer and context whith startup VRL
if (location!=null)
viewer.setVRL(location);
viewer.getViewContext().setStartupLocation(location);
// update dynamic action context into viewer context
if (optionalMethodName!=null)
{
// put dynamic action + action context in ViewerContext.
viewer.getViewContext().setDynamicAction(optionalMethodName,actionContext);
}
// ======
// Initialize Viewer during CURRENT thread
// ======
initViewer();
if (viewer.getViewContext().getStartInStandaloneWindow()==true)
{
// Disconnect from MasterBrowser ActionTasks and redirect to (external)
// viewer watcher
this.taskSource=getExternalViewerWatcher();
}
// ===
// Start Viewer in background task !
// ===
this.startTask = new ActionTask(taskSource, "Starting viewer for:"
+ location)
{
public void doTask()
{
try
{
//
// Really start viewer :
//
if (StringUtil.isEmpty(optionalMethodName)==false)
{
viewer.startViewer(location,optionalMethodName,actionContext);
}
else
{
viewer.startViewer(location,null,null);
}
//
// Dynamic Action !
//
}
catch (Throwable t)
{
if (taskSource!=null)
taskSource.notifyTaskException(this,t);
}
}
public void stopTask()
{
// applet: stop();
// applet: destroy();
viewer.stopViewer();
};
};
startTask.startTask();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void run() {\n\t\tshowViewer();\r\n\t}",
"final void initViewer()\n {\n if (viewer.getViewContext().getStartInStandaloneWindow() == true)\n {\n \n JFrame frame=null; \n // JFrame\n {\n frame = new JFrame();\n frame.setSize(new Dimension(800, 600));\n GuiSettings.placeToCenter(frame);\n }\n\n if (viewer.haveOwnScrollPane() == false)\n {\n // embed viewer in scrollPane \n JScrollPane scrollPane = new JScrollPane();\n scrollPane.setViewportView(viewer.getViewComponent());\n frame.add(scrollPane);\n }\n else\n {\n frame.add(viewer.getViewComponent());\n }\n \n // Viewer\n // viewer.setFrame(frame); \n viewer.initViewer();\n \n ViewerFrameListener listener = new ViewerFrameListener(frame,this);\n frame.addWindowListener(listener);\n frame.addComponentListener(listener); \n \n frame.pack();\n\n frame.setVisible(true);\n // viewer.setFrame(frame); \n }\n else\n {\n viewer.initViewer();\n }\n }",
"private void startThread()\n {\n if (workerThread == null || !workerThread.isLooping())\n {\n workerThread = new LiveViewThread(this);\n workerThread.start();\n }\n }",
"@Override\n public void run() {\n\n GLMouseListener mouse = viewer.getMouseHandler();\n if (mouse instanceof GLMouseAdapter) {\n ((GLMouseAdapter)mouse).setLaptopConfig();\n }\n \n viewer.addSelectionListener(new SimpleSelectionHandler(renderables));\n\n // Create a animator that drives canvas' display() at the specified FPS.\n final FPSAnimator animator;\n final FPSMonitor fpsMonitor;\n \n if (MultiViewer.doFPS) {\n animator = new FPSAnimator(viewer.getCanvas().getDrawable(), FPS, true);\n animator.setUpdateFPSFrames(3, null);\n animator.start();\n fpsMonitor = new FPSMonitor(title + \" FPS: \", animator);\n new Thread(fpsMonitor).start();\n } else {\n animator = null;\n fpsMonitor = null;\n }\n \n // Create the top-level container\n frame = new JFrame(); // Swing's JFrame or AWT's Frame\n frame.add(viewer.getCanvas().getComponent());\n\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n // Use a dedicate thread to run the stop() to ensure that the\n // animator stops before program exits.\n new Thread() {\n @Override\n public void run() {\n \n if (animator != null && animator.isStarted()) {\n animator.stop();\n }\n if (fpsMonitor != null) { \n fpsMonitor.stop();\n }\n \n try {\n SwingUtilities.invokeAndWait (new Runnable() {\n @Override\n public void run () {\n viewer.dispose ();\n }\n });\n }\n catch (InvocationTargetException e) {\n }\n catch (InterruptedException e) {\n }\n \n closed = true;\n }\n }.start();\n }\n });\n frame.setTitle(title);\n // frame.pack();\n frame.setVisible(true);\n // animator.start(); // start the animation loop\n }",
"@Override\r\n public void run() {\n \r\n if(mCenterPanelWrapper == null) {\r\n mCenterPanelWrapper = UiCompat.createPersonaBackgroundPanel();\r\n mCenterWrapper = new PluginCenterPanelWrapper() {\r\n \r\n @Override\r\n public PluginCenterPanel[] getCenterPanels() {\r\n return new PluginCenterPanel[] {new PluginCenterPanelImpl()};\r\n }\r\n \r\n @Override\r\n public void scrolledToChannel(Channel channel) {\r\n if(mListPanel != null) {\r\n mListPanel.showChannel(channel);\r\n }\r\n }\r\n \r\n @Override\r\n public void filterSelected(ProgramFilter filter) {\r\n if(mListPanel != null) {\r\n mListPanel.showForFilter(filter);\r\n }\r\n }\r\n \r\n @Override\r\n public void scrolledToDate(Date date) {\r\n if(mListPanel != null) {\r\n mListPanel.showForDate(date, -1);\r\n }\r\n }\r\n \r\n @Override\r\n public void scrolledToNow() {\r\n if(mListPanel != null) {\r\n mListPanel.showForNow();\r\n }\r\n }\r\n \r\n @Override\r\n public void scrolledToTime(int time) {\r\n if(mListPanel != null) {\r\n mListPanel.showForTimeButton(time);\r\n }\r\n }\r\n \r\n @Override\r\n public void timeEvent() {\r\n if(mListPanel != null) {\r\n mListPanel.refreshView();\r\n }\r\n }\r\n };\r\n \r\n new Thread() {\r\n public void run() {\r\n while(!mTvBrowserStarted) {\r\n try {\r\n sleep(200);\r\n } catch (InterruptedException e) {}\r\n }\r\n \r\n addPanel();\r\n }\r\n }.start();\r\n }\r\n }",
"public synchronized void showPage() {\n final ShowPageImage viewer = new ShowPageImage();\n\n if (SwingUtilities.isEventDispatchThread()) {\n viewer.run();\n } else {\n SwingUtilities.invokeLater(viewer);\n }\n }",
"public void run() {\n\t\tthis.viewFrame.setVisible(true);\n\t}",
"public void start()\n\t{\n\t\tview.showWindow();\n\t\taddListeners();\n\t}",
"public void run() {\n \t\t\t\t\t\t((AbstractTreeViewer)getViewer()).refresh();\n \t\t\t\t\t}",
"public void start() {\r\n view.addListener(this);\r\n view.makeVisible();\r\n view.display();\r\n }",
"private void initView() {\r\n\t\tviewerGraz.refresh(true);\r\n\t\tviewerGraz.refresh(true);\r\n\t\tviewerKapfenberg.refresh(true);\r\n\t\tviewerLeoben.refresh(true);\r\n\t\tviewerMariazell.refresh(true);\r\n\t\tviewerWien.refresh(true);\r\n\t}",
"@Override\r\n protected void start() throws StartException {\n\r\n if (!Main.INIT_COMPLETE.isReached()) startServer();\r\n new EDTRunner() {\r\n\r\n @Override\r\n protected void runInEDT() {\r\n initGUI();\r\n }\r\n };\r\n\r\n }",
"@Override\n public void run() {\n jmeVisualization = new JMEVisualization();\n jmeVisualization.setRotated(false);\n jmeVisualization.setWidth(getVisualizationPanel().getWidth() - 15);\n jmeVisualization.setHeight(getVisualizationPanel().getHeight() - 30);\n jmeVisualization.startApplication();\n\n /*\n Fetch Canvas from JMEVisualization instance\n */\n jmeCanvas = jmeVisualization.getJmeCanvasContext().getCanvas();\n\n getVisualizationPanel().setLayout(new FlowLayout());\n getVisualizationPanel().add(jmeCanvas);\n getVisualizationPanel().revalidate();\n\n }",
"private static void createAndShowGUI()\r\n {\r\n JFrame f = new JFrame(\"Viewer\");\r\n f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n f.getContentPane().setLayout(new BorderLayout());\r\n \r\n JLabel usageLabel = new JLabel(\"<html>\"\r\n + \"Right mouse drags: Translate<br> \"\r\n + \"Left mouse drags: Create selection shape<br>\"\r\n + \" +shift: remove from selection<br>\"\r\n + \" +ctrl: add to selection<br>\"\r\n + \"Left mouse clicks: Select single<br>\"\r\n + \" +ctrl: toggle single selection<br>\"\r\n + \"Mouse wheel: Zoom uniformly<br>\"\r\n + \" +shift: zoom along x<br>\"\r\n + \" +ctrl: zoom along y<br>\"\r\n + \"</html>\");\r\n f.getContentPane().add(usageLabel, BorderLayout.NORTH);\r\n \r\n // Create a viewer, with mouse controls where the rotation is\r\n // disabled (left clicks are intended for the selection here)\r\n Viewer viewer = new Viewer();\r\n viewer.setMouseControl(\r\n MouseControls.createDefault(viewer, false, true));\r\n \r\n // Create the selection model\r\n SelectionModel<Point2D> selectionModel = SelectionModels.create();\r\n selectionModel.addSelectionListener(\r\n new LoggingSelectionListener<Point2D>());\r\n\r\n // Create the painter for the test\r\n ViewerSelectionTestPainter viewerSelectionTestPainter = \r\n new ViewerSelectionTestPainter(selectionModel::isSelected);\r\n \r\n // The painter also serves as the point- and shape based selector.\r\n // Make this clear by assigning it to respective variables\r\n PointBasedSelector<Point2D> pointBasedSelector = \r\n viewerSelectionTestPainter;\r\n ShapeBasedSelector<Point2D> shapeBasedSelector = \r\n viewerSelectionTestPainter;\r\n\r\n // Create a selection handler for clicks, and use it to connect\r\n // the viewer and the selection model\r\n SelectionHandler<Point2D> clickSelectionHandler = \r\n SelectionHandlers.createClick(pointBasedSelector);\r\n clickSelectionHandler.connect(viewer, selectionModel);\r\n \r\n // Create a selection handler for a lasso selection, and use it to \r\n // connect the viewer and the selection model\r\n SelectionHandler<Point2D> lassoSelectionHandler = \r\n SelectionHandlers.createLasso(shapeBasedSelector);\r\n lassoSelectionHandler.connect(viewer, selectionModel);\r\n\r\n // Create a selection handler for rectangles, which can be enabled\r\n // via the config panel\r\n SelectionHandler<Point2D> rectangleSelectionHandler = \r\n SelectionHandlers.createRectangle(shapeBasedSelector);\r\n \r\n viewer.addPainter(\r\n viewerSelectionTestPainter);\r\n f.getContentPane().add(viewer, BorderLayout.CENTER);\r\n\r\n JPanel configPanel = createConfigPanel(viewer, selectionModel, \r\n lassoSelectionHandler, rectangleSelectionHandler);\r\n f.getContentPane().add(configPanel, BorderLayout.EAST);\r\n\r\n JLabel infoLabel = new JLabel(\" \");\r\n f.getContentPane().add(infoLabel, BorderLayout.SOUTH);\r\n \r\n viewer.setPreferredSize(new Dimension(500,500));\r\n f.pack();\r\n viewer.setPreferredSize(null);\r\n f.setLocationRelativeTo(null);\r\n f.setVisible(true);\r\n \r\n viewer.setDisplayedWorldArea(-0.1, -0.1, 1.2, 1.2);\r\n }",
"public native final void startPreview();",
"@Override \n protected void startup() {\n GretellaView view = new GretellaView(this);\n show( view );\n view.initView(); \n }",
"public void start() {\n\n\t\tif (!started.compareAndSet(false, true)) {\n\t\t\treturn;\n\t\t}\n\n\t\tLOG.debug(\"Starting panel rendering and trying to open attached webcam\");\n\n\t\tstarting = true;\n\n\t\tif (updater == null) {\n\t\t\tupdater = new ImageUpdater();\n\t\t}\n\n\t\tupdater.start();\n\n\t\ttry {\n\t\t\terrored = !webcam.open();\n\t\t} catch (WebcamException e) {\n\n\t\t\terrored = true;\n\n\t\t\tDisplay.getDefault().syncExec(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tredraw();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tstarting = false;\n\t\t}\n\t}",
"public void loadRoomViewerUI()\r\n\t{\r\n\t\t// start the loader thread so the graphics can be drawn as the loading takes place\r\n\t\tnew RoomViewerLoadingThread(roomViewerUI).start();\r\n\t}",
"private void startViewer() {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n finish();\n }",
"public synchronized void start_scn_updates() {\r\n \tif (scn_update_thread == null){\r\n scn_update_thread = new Thread(this);\r\n scn_update_thread.start();\r\n \t}\r\n \tscn_ready = true;\r\n \trepaint();\r\n \tscn_repaint = true;\r\n }",
"void run() {\n System.out.println(\"PC Visual application run\");\n data = new Data(this);\n window = new Window(this);\n window.setup();\n mote = new MoteIF(PrintStreamMessenger.err);\n mote.registerListener(new OscilloscopeMsg(), this);\n }",
"public void startThread(View view) {\n //startNormalThread();\n startRunnableThread();\n }",
"public Browser()\n\t{\n\t\tinitComponents();\n\t\tlibraryViewer1.setThumbnail(thumbnails1);\n\t\t\n\t\ttimer = new Timer();\n timer.schedule(new CheckFilesTask(libraryViewer1), 5000, 5000);\n\t}",
"public void init(){\r\n\t\t\r\n\t\ttry {\r\n\t\t\tSwingUtilities.invokeAndWait(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tbuildWindow();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.err.println(\"createGUI didn't complete successfully\");\r\n\t\t}\r\n\t}",
"private void initWebView(){ \r\n WebEngine webEngine = viewerPane.getEngine();\r\n webEngine.load(\"http://www.google.com\");\r\n }",
"@Override\n public void run() {\n panel.start();\n }",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmVideoContrl.start();\r\n\t\t\t\t\t\tisBreakDialogDissmiss = true;\r\n\t\t\t\t\t\tsendFirstShowContrlBtn();\r\n\t\t\t\t\t\tisChangeNotStart = true;\r\n\t\t\t\t\t\tmVideoPlayerHander.sendEmptyMessage(REFRESH_PAUSEBUTON);\r\n\t\t\t\t\t\t// start_3Dmode();\r\n\t\t\t\t\t}",
"public void initView() {\n JPanel pane= new JPanel();\n panel = new JPanel();\n this.getFile(pane);\n JScrollPane scp = new JScrollPane(pane);\n scp.setPreferredSize(new Dimension(500, 280));\n scp.setVisible(true);\n enter.setPreferredSize(new Dimension(100, 50));\n enter.setVisible(true);\n enter.setActionCommand(\"enter\");\n enter.addActionListener(this);\n send.setPreferredSize(new Dimension(80, 50));\n send.setVisible(true);\n send.setActionCommand(\"sendOptions\");\n send.addActionListener(this);\n send.setEnabled(true);\n back.setVisible(true);\n back.setActionCommand(\"back\");\n back.addActionListener(this);\n back.setPreferredSize(new Dimension(80, 50));\n \n panel.add(scp);\n panel.add(send);\n panel.add(enter);\n panel.add(back);\n Launch.frame.add(panel);\n }",
"public void start() {\r\n\t\tfinal Element frame = this.createFrame();\r\n\t\tthis.setFrame(frame);\r\n\r\n\t\tthis.getSupport().start(this, frame);\r\n\r\n\t\t// the reason for the query string is to avoid caching problems...the\r\n\t\t// src attribute is set before the frame is attached this also\r\n\t\t// avoids the nasty clicking noises in ie.\r\n\t\tDOM.setElementProperty(frame, \"src\", this.getServiceEntryPoint() + \"?serializationEngine=Gwt&\" + System.currentTimeMillis());\r\n\r\n\t\tfinal Element body = RootPanel.getBodyElement();\r\n\t\tDOM.appendChild(body, frame);\r\n\t}",
"public View runStartUp() {\r\n Controller contr = new Controller();\r\n contr.addObserver(InspectionStatsView.getObserver());\r\n Logger firstLogger = new FileLogger();\r\n return new View(contr, firstLogger);\r\n }",
"public void display() {\n startPreview();\n }",
"public void execute() {\n try {\n final DemoManagerWindow window = new DemoManagerWindow();\n window.setResizable(false);\n window.setDemoManager(this);\n window.setDemoProvider(this);\n window.setVisibleAndWait();\n } catch (final Throwable t) {\n throw new BrowserException(\"\", t);\n }\n }",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 800, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel browserPanel = new JPanel();\n\t\tframe.getContentPane().add(browserPanel, BorderLayout.CENTER);\n\t\t\n\t\t// create javafx panel for browser\n browserFxPanel = new JFXPanel();\n browserPanel.add(browserFxPanel);\n \n // create JavaFX scene\n Platform.runLater(new Runnable() {\n public void run() {\n createScene();\n }\n });\n\t}",
"public void run() {\n\t\t\t\tVerticalPanel panelCompteRendu = new VerticalPanel();\r\n\t\t\t\thtmlCompteRendu = new HTML();\r\n\t\t\t\tpanelCompteRendu.add(htmlCompteRendu);\r\n\t\t\t\tRootPanel.get(\"compteRendu\").add(panelCompteRendu);\r\n\t\t\t\t\r\n\t\t\t\tVerticalPanel panelLegende = new VerticalPanel();\r\n\t\t\t\thtmlLegende = new HTML();\r\n\t\t\t\tpanelLegende.add(htmlLegende);\r\n\t\t\t\tRootPanel.get(\"legende\").add(htmlLegende);\r\n\t\t\t\t\r\n\t\t\t\t// temps d'intˇgration restant\r\n\t\t\t\tLabel tempsDIntegrationRestant = new Label();\r\n\t\t\t\tRootPanel.get(\"tempsDIntegrationRestant\").add(tempsDIntegrationRestant);\r\n\t\t\t\t\r\n\t\t\t\t// ajout de la carte\r\n\t\t\t\twMap = new MapFaWidget2(htmlCompteRendu);\r\n\t\t\t\tRootPanel.get(\"carte\").add(wMap);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// ajout du bouton reset\r\n\t\t\t\tButton boutonReset = new Button(\"Nettoyer la carte\");\r\n\t\t\t\tboutonReset.addClickHandler(actionBoutonReset());\r\n\t\t\t\tRootPanel.get(\"boutonReset\").add(boutonReset);\r\n\r\n\t\t\t\t// ajout du formulaire d'intˇgration\r\n\t\t\t\tnew FileUploadView(wMap,htmlLegende, htmlCompteRendu,tempsDIntegrationRestant);\r\n\r\n\t\t\t}",
"public void init() {\n SimpleStamperPanel panel=new SimpleStamperPanel();\n setContentPane(panel);\n \n \n // TODO start asynchronous download of heavy resources\n }",
"@Override\n public void actionPerformed(AnActionEvent e) {\n SwingUtilities.invokeLater(()->{\n JFrame frame = new JFrame(\"JavaFX in Swing\");\n JFXPanel jfxPanel = new JFXPanel();\n frame.setLayout(new BorderLayout());\n frame.add(jfxPanel, BorderLayout.CENTER);\n /*PlatformImpl.startup(()->{\n\n });*/\n Platform.runLater(()->{\n BrowserService browserService = ServiceManager.getService(e.getProject(), BrowserService.class);\n WebView webView = new WebView();//browserService.getWebView();\n Scene scene = new Scene(webView);\n WebEngine webEngine = webView.getEngine();\n //webEngine.load(\"http://172.28.1.2:8087/rxtool/login\");\n webEngine.load(\"http://www.baidu.com\");\n jfxPanel.setScene(scene);\n });\n frame.setSize(1000,800);\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n });\n }",
"public SceneUpdateThread(Another2DView view) {\n this.view = view;\n view.getHolder().addCallback(new SurfaceHolder.Callback() {\n @Override\n public void surfaceCreated(SurfaceHolder surfaceHolder) {\n setRunning(true);\n start();\n }\n @Override\n public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {\n }\n @Override\n public void surfaceDestroyed(SurfaceHolder surfaceHolder) {\n boolean retry = true;\n setRunning(false);\n while (retry) {\n try {\n join();\n retry = false;\n } catch (InterruptedException e) {\n }\n }\n }\n });\n }",
"public void run()\r\n\t{\r\n\t\tthis.mainFrame.setVisible(true);\r\n\t}",
"private void init () {\n\t\tSwingUtilities.invokeLater(new Runnable() {\n public void run() {\n \tSwingOperatorView.stateOnCurrentObject();\n }\n\t\t});\n\t}",
"void startView();",
"@Override\n\tpublic void run() {\n\t\tLOG.debug(\"Running LanternaRunner\");\n\t\tguiScreen = TerminalFacade.createGUIScreen(terminal);\n\t\tguiScreen.getScreen().startScreen();\n\n\t\tWindow mainWindow = createMainWindow();\n\t\tguiScreen.showWindow(mainWindow);\n\t\tguiScreen.getScreen().stopScreen();\n\t\tterminal.clearScreen();\n\t\tterminal.flush();\n\t\tsession.close(false);\n\t\tLOG.debug(\"Finished LanternaRunner\");\n\t}",
"public void start(){\n runServerGUI();\n // new server thread object created\n ServerThread m_Server = new ServerThread(this);\n m_Server.start();\n }",
"@Override\n public void run() {\n initFX(fxPanel);\n }",
"public void start() {\n\t\tSystem.out.println(\"Starting new application\");\n\t\texec.init(this);\n\t\tthread = new Thread(this);\n\t\trunning = true;\n\t\tgd.setFullScreenWindow(screen.getFrame());\n\t\tscreen.getFrame().setVisible(true);\n\t\tthread.start();\n\t}",
"public void loadJavaFXScene(String url){\r\n\t //Platform.run\r\n\t\r\n Platform.runLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n\r\n BorderPane borderPane = new BorderPane();\r\n \r\n engine.load(url);\r\n borderPane.setCenter(webComponent);\r\n Scene scene = new Scene(borderPane,450,450);\r\n javafxPanel.setScene(scene);\r\n System.out.println(\"RUN1\");\r\n \r\n \r\n }\r\n });\r\n }",
"public void run() {\n controlador = new Controlador();\n createGUI();\n }",
"private void initView() {\n TIMManager.getInstance().addMessageListener(this);\n initAdapter();\n initRefresh();\n }",
"public void run() {\n\t\ttry {\n if (prot == TransmissionProtocol.UDP) {\n \tgrabber.setOption(\"rtsp_transport\", \"udp\");\n } else if (prot == TransmissionProtocol.TCP) {\n \tgrabber.setOption(\"rtsp_transport\", \"tcp\");\n }\n if (codec == VideoCodec.H264) {\n \tgrabber.setVideoCodec(avcodec.AV_CODEC_ID_H264);\n } else if (codec == VideoCodec.MPEG4) {\n \tgrabber.setVideoCodec(avcodec.AV_CODEC_ID_MPEG4);\n }\n grabber.start();\n AudioFormat audioFormat = new AudioFormat(grabber.getSampleRate(), 16, grabber.getAudioChannels(), true, true);\n\n DataLine.Info info = new DataLine.Info(SourceDataLine.class, audioFormat);\n SourceDataLine soundLine = (SourceDataLine) AudioSystem.getLine(info);\n soundLine.open(audioFormat);\n volume = (FloatControl) soundLine.getControl(FloatControl.Type.MASTER_GAIN);\n soundLine.start();\n\n Java2DFrameConverter converter = new Java2DFrameConverter();\n \n ExecutorService executor = Executors.newSingleThreadExecutor(InterfaceController.ntfInstance);\n view.setImage(null);\n view.setScaleX(1);\n view.setScaleY(1);\n Thread.currentThread().setName(\"FSCV-VPT\");\n isProcessing = true;\n while (!Thread.interrupted()) {\n frame = grabber.grab();\n if (frame == null) {\n break;\n }\n if (frame.image != null) {\n currentFrame = SwingFXUtils.toFXImage(converter.convert(frame), null);\n Platform.runLater(() -> {\n view.setImage(currentFrame);\n });\n } else if (frame.samples != null) {\n channelSamplesShortBuffer = (ShortBuffer) frame.samples[0];\n channelSamplesShortBuffer.rewind();\n\n outBuffer = ByteBuffer.allocate(channelSamplesShortBuffer.capacity() * 2);\n \n for (int i = 0; i < channelSamplesShortBuffer.capacity(); i++) {\n short val = channelSamplesShortBuffer.get(i);\n outBuffer.putShort(val);\n }\n\n /**\n * We need this because soundLine.write ignores\n * interruptions during writing.\n */\n try {\n executor.submit(() -> {\n soundLine.write(outBuffer.array(), 0, outBuffer.capacity());\n outBuffer.clear();\n }).get();\n } catch (InterruptedException interruptedException) {\n Thread.currentThread().interrupt();\n }\n }\n }\n isProcessing = false;\n executor.shutdownNow();\n executor.awaitTermination(10, TimeUnit.SECONDS);\n soundLine.stop();\n grabber.stop();\n grabber.release();\n grabber.close();\n } catch (Exception e) {\n \te.printStackTrace();\n }\n\t}",
"public void run() {\r\n frame = new MainFrame(this);\r\n newAccountFrame = new NewAccountPage(this);\r\n \r\n frame.setVisible(true);\r\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tnew mainclass().setVisible(true);\n\t\t\t}",
"private void loadJavaFXScene(){\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n BorderPane borderPane = new BorderPane();\n webComponent = new WebView();\n \n webComponent.getEngine().loadContent(URLDecoder.decode(module.getData().toString()));\n\n borderPane.setCenter(webComponent);\n Scene scene = new Scene(borderPane,320,480);\n javafxPanel.setScene(scene);\n\n }\n });\n }",
"public void run() {\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tAdminControlPanel panel = new AdminControlPanel();\r\n\t\t\t\t\tpanel.setVisible(true);\r\n\t\t\t\t} \r\n\t\t\t\tcatch (Exception e) \r\n\t\t\t\t{//if there is an exception it will print where it occured\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}",
"public void run() {\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tif(_lastpresentation != null) {\r\n \t\t\t\t\t viewer.changeTextPresentation(_lastpresentation, true);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\tcatch(NullPointerException exc) {\r\n \t\t\t\t\t}\r\n \t\t\t\t}",
"public void runModel(){\n\t\tcurrentView.getDynamicModelView().getModel().setProgressMonitor(progressMonitor);\r\n\t\tnew Thread(currentView.getDynamicModelView().getModel()).start();\r\n\r\n\t\tsetStatusBarText(\"Ready\");\r\n\t}",
"public void init()\n\t{\n\t\ttry\n\t\t{\n\t\t\tjavax.swing.SwingUtilities.invokeAndWait(new Runnable()\n\t\t\t{\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tcreateGUI();\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tSystem.err.println(\"createGUI didn't successfully complete: \"\n\t\t\t\t\t+ e.toString());\n\t\t}\n\t}",
"public void loadAndPopulateViewer(final ActionLink viewerLink) throws Exception {\n final WindowViewer w = Platform.getWindowViewer();\n final FunctionCallbackWaiter waiter = new FunctionCallbackWaiter();\n\n w.createViewer(viewerLink, waiter.createCallback(VIEWER_CALLBACK_ID));\n load(waiter.createCallback(DOCUMENT_CALLBACK_ID));\n\n iFunctionCallback cb = new iFunctionCallback() {\n @Override\n public void finished(boolean canceled, Object returnValue) {\n try {\n ObjectHolder h = (ObjectHolder) returnValue;\n HashMap<Object, CallbackResult> resultsMap = (HashMap<Object, CallbackResult>) h.value;\n CallbackResult vr = resultsMap.get(VIEWER_CALLBACK_ID);\n CallbackResult dr = resultsMap.get(DOCUMENT_CALLBACK_ID);\n\n if (vr.resultIsError()) {\n Utils.handleError((Throwable) vr.getReturnValue());\n\n return;\n }\n\n if (dr.resultIsError()) {\n Utils.handleError((Throwable) dr.getReturnValue());\n\n return;\n }\n\n iContainer v = (iContainer) vr.getContent();\n\n populateViewer(v);\n\n String target = viewerLink.getTargetName();\n\n if (target == null) {\n target = iTarget.TARGET_WORKSPACE;\n }\n\n if (iTarget.TARGET_WORKSPACE.equals(target)) {\n Utils.pushWorkspaceViewer(v);\n } else {\n w.activateViewer(v, target);\n }\n } finally {\n w.hideWaitCursor();\n }\n }\n };\n\n w.showWaitCursor();\n waiter.startWaiting(cb);\n }",
"public static void createAndShowGUI()\n\t{\n\t\tSystem.out.println(\"Starting encFS Manager\");\n\t\tEncFSModel mod = new EncFSModel();\n\t\tEncFSController controller = new EncFSController(mod);\n\t\tEncFSModelRefresher refresher = new EncFSModelRefresher(mod);\n\t\t\t\t\n\t\ttry{\n\t\t\tBufferedImage myPicture = null;\t\t\t\n\t\t\t\n\t\t\tmyPicture = ImageIO.read(mod.getClass().getClassLoader().getResource(\"Lock_tray.png\"));\n\t\t\t\n\t\t\tEncFSTray tray = new EncFSTray(myPicture, mod, controller);\n\t\t\tif(SystemTray.isSupported())\n\t\t\t{\n\t\t\t\tfinal SystemTray stray = SystemTray.getSystemTray();\n\t\t\t\tstray.add(tray);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Tray not supported\");\t\t\t\t\n\t\t\t}\n\t\t\tThread refresherThread = new Thread(refresher);\n\t\t\trefresherThread.start();\n\t\t}\n\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace(System.out);\n\t\t}\n\t}",
"public void launchExplorer() {\n SimulatedEnvironment env = new SimulatedEnvironment(this.domain, this.initialState);\n VisualExplorer exp = new VisualExplorer(this.domain, env, this.v, 800, 800);\n exp.addKeyAction(\"w\", GridWorldDomain.ACTION_NORTH, \"\");\n exp.addKeyAction(\"s\", GridWorldDomain.ACTION_SOUTH, \"\");\n exp.addKeyAction(\"d\", GridWorldDomain.ACTION_EAST, \"\");\n exp.addKeyAction(\"a\", GridWorldDomain.ACTION_WEST, \"\");\n\n //exp.enableEpisodeRecording(\"r\", \"f\", \"irlDemo\");\n\n exp.initGUI();\n }",
"public void start(){\r\n if (isInitOk){\r\n if (firstStart) {\r\n firstStart = false;\r\n String userHome = System.getProperty(\"user.home\");\r\n String installDirName = userHome + File.separator + \".jogl_ext\"\r\n + File.separator + installDirectory; // should manage jogl versions here\r\n\r\n final File installDir = new File(installDirName);\r\n\r\n Thread refresher = new Thread() {\r\n public void run() {\r\n refreshJOGL(installDir);\r\n }\r\n };\r\n refresher.setPriority(Thread.NORM_PRIORITY - 1);\r\n refresher.start();\r\n } else if (joglStarted) {\r\n // we have to start again the applet (start can be called multiple times,\r\n // e.g once per tabbed browsing\r\n subApplet.start();\r\n }\r\n }\r\n }",
"private WebView createWebView() {\n WebView webView = new WebView();\n webView.setContextMenuEnabled(false);\n\n WebEngine engine = webView.getEngine();\n // The files below must exist! Or pdf viewer no more!\n String url = new File(\"src/Resources/pdfjs_2.7.570/web/viewer.html\").toURI().toString();\n\n engine.setJavaScriptEnabled(true);\n engine.load(url);\n\n\n engine.getLoadWorker()\n .stateProperty()\n .addListener(\n new ChangeListener<>() {\n @Override\n public void changed(ObservableValue<? extends Worker.State> observable, Worker.State oldValue, Worker.State newValue) {\n JSObject window = (JSObject) engine.executeScript(\"window\");\n window.setMember(\"java\", null);\n engine.executeScript(\"console.log = function(message){ try {java.log(message);} catch(e) {} };\");\n\n if (newValue == Worker.State.SUCCEEDED) {\n try {\n PDFDisplayer.this.pdfJsLoaded = true;\n\n if (PDFDisplayer.this.loadScript != null) {\n engine.executeScript(PDFDisplayer.this.loadScript);\n }\n\n engine.executeScript(PDFDisplayer.this.toExecuteWhenPDFJSLoaded);\n PDFDisplayer.this.toExecuteWhenPDFJSLoaded = null;\n observable.removeListener(this);\n } catch (RuntimeException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }\n }\n });\n return webView;\n }",
"@Test\n public void testStart() throws InterruptedException {\n Thread thread = new Thread(new Runnable() {\n\n @Override\n public void run() {\n new JFXPanel(); // Initializes the JavaFx Platform\n Platform.runLater(new Runnable() {\n\n @Override\n public void run() {\n try {\n new GOL_Main().start(new Stage()); // Create and\n // initialize app\n } catch (Exception ex) {\n Logger.getLogger(GOL_MainTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n });\n }\n });\n thread.start();// Initialize the thread\n Thread.sleep(10);\n System.out.println(\"start\");\n Stage stage = null;\n GOL_Main instance = new GOL_Main(); \n }",
"public void init() {\n\t\tThread appThread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tSwingUtilities.invokeAndWait(doHelloWorld);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Finished on \" + Thread.currentThread());\n\t\t\t}\n\t\t};\n\t\tappThread.start();\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n \n \n loading.setVisible(true);\n new Thread(new Runnable() {\n\n @Override\n public void run() {\n \n loading.setVisible(true);\n Platform.runLater(new Runnable() {\n\n @Override\n public void run() { \n \n searchInput.setPromptText(\"Search comments...\");\n try {\n\n setUpView();\n } catch (IOException ex) {\n Logger.getLogger(PodcastCommentsFrontController.class.getName()).log(Level.SEVERE, null, ex);\n \n } catch (WriterException ex) {\n Logger.getLogger(PodcastCommentsFrontController.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n BadWords.loadConfigs();\n }\n }); \n }\n }).start();\n \n }",
"protected abstract StructuredViewer createViewer(Shell shell);",
"public void run(){\n\n File fileRoot = new File(path);\n root = new DefaultMutableTreeNode(new fileNode(fileRoot));\n treemodel = new DefaultTreeModel(root);\n\n tree = new JTree(treemodel);\n tree.setShowsRootHandles(true);\n JScrollPane scrollPane = new JScrollPane(tree);\n this.panel.add(scrollPane);\n //frame.setLocationByPlatform(true);\n this.panel.setSize(1000, 1000);\n this.panel.setVisible(true);\n /*\n this.panel.add(scrollPane);\n //frame.setLocationByPlatform(true);\n this.panel.setSize(1000, 1000);\n this.panel.setVisible(true);\n */\n\n createChildren cc = new createChildren(fileRoot, root);\n new Thread(cc).start();\n\n\n }",
"@Override\n public void run() {\n startVMS(mStrVMID, mParams);\n }",
"public void loadAndPopulateViewer(final iContainer fv) {\n final WindowViewer w = Platform.getWindowViewer();\n iFunctionCallback cb = new iFunctionCallback() {\n @Override\n public void finished(boolean canceled, Object returnValue) {\n w.hideWaitCursor();\n\n if (returnValue instanceof Exception) {\n Utils.handleError((Throwable) returnValue);\n } else {\n populateViewer(fv);\n }\n }\n };\n\n w.showWaitCursor();\n load(cb);\n }",
"public static void run(){\n EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n PlanHomeCoach frame = new PlanHomeCoach();\n frame.init();\n Dimension screenSize =Toolkit.getDefaultToolkit().getScreenSize();\n frame.setLocation(screenSize.width/2-400/2,screenSize.height/2-700/2);\n frame.setResizable(false);\n frame.setVisible(true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n }",
"public GUIView() {\n initComponents();\n setMaxThreads();\n setCountOfElements(1);\n setCountOfThreads(1);\n this.isReadyForCalculation = false;\n }",
"public void launch() {\n view.setEditMode(false); \n view.setComments(report.getComments().toArray());\n \n view.addCommentsListSelectionListener(new CommentsListSelectionListener());\n view.addEditButtonActionListener(new EditButtonActionListener());\n view.addDiscardButtonActionListener(new DiscardChangesActionListener());\n view.addSaveButtonActionListener(new SaveCommentChangesActionListener());\n view.addNewCommentActionListener(new NewCommentActionListener());\n \n view.setVisible(true);\n \n refreshView();\n \n /**\n * Craig - TC B2c: Real time updates\n * Register this controller as an observer\n */\n AppObservable.getInstance().addObserver(this);\n }",
"private void initCVMControl() {\n if(this.cvmControlPanel==null)\n cvmControlPanel = new SetSiteParamsFromWebServicesControlPanel(this, this.imrGuiBean, this.siteGuiBean);\n cvmControlPanel.pack();\n cvmControlPanel.setVisible(true);\n }",
"public View()\r\n\t{\r\n\t\tsetGUI();\r\n\t\tfinal Multithreading m = new Multithreading(this);\t\r\n\t\t\r\n\t\t/**\r\n\t\t * Anonymous Timer class for updating progress bars.\r\n\t\t * @param DELAY the system delay for time in milliseconds \r\n\t\t * @param ActionListener the ActionListener object\r\n\t\t */\r\n\t\tTimer Timer = new Timer(DELAY, new ActionListener()\r\n\t\t{\r\n\t\t\t/**\r\n\t\t\t * Implemented method for ActionListener\r\n\t\t\t * @param event the event occuring\r\n\t\t\t */\r\n\t\t\tpublic void actionPerformed(ActionEvent event)\r\n\t\t\t{\r\n\t\t\t\tbProgress = m.getbProgress();\r\n\t\t\t\tiProgress = m.getiProgress();\r\n\t\t\t\tmProgress = m.getmProgress();\r\n\t\t\t\tqProgress = m.getqProgress();\r\n\t\t\t\trProgress = m.getrProgress();\r\n\t\t\t\tbubblePB.setValue(bProgress);\r\n\t\t\t\tinsertionPB.setValue(iProgress);\r\n\t\t\t\tmergePB.setValue(mProgress);\r\n\t\t\t\tquickPB.setValue(qProgress);\r\n\t\t\t\tradixPB.setValue(rProgress);\r\n\t\t\t}\t\r\n\t\t});\r\n\t\tTimer.start();\r\n\t}",
"protected SourceViewer createViewer(Composite parent) {\n \t\tSourceViewer viewer= new SourceViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);\n \t\tSourceViewerConfiguration configuration= new SourceViewerConfiguration();\n \t\tviewer.configure(configuration);\n \t\tIDocument document= new Document();\n \t\tviewer.setDocument(document);\n \t\treturn viewer;\n \t}",
"public void run() {\n\t\tthis.setVisible(true);\n\t}",
"public void run() {\n\t\tthis.setVisible(true);\n\t}",
"private static void initAndShowGUI() {\n JFrame frame = new JFrame(\"Swing and JavaFX\");\n final JFXPanel fxPanel = new JFXPanel();\n frame.add(fxPanel);\n frame.setSize(250, 350);\n frame.setVisible(true);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n initFX(fxPanel);\n }\n });\n }",
"private void showWeb() {\n\n new Thread(() -> {\n if (!webService.isStarted()) {\n new Thread(() -> trayIcon.displayMessage(null, \"Please wait, the web server starts!\", TrayIcon.MessageType.INFO)).start();\n webService.startService();\n while (!webService.isStarted()) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n /**NOP*/\n }\n }\n openUri();\n }).start();\n }",
"public static void run()\n {\n JFrame invisibleFrame = new InvisibleFrame(TITLE);\n try {\n MainDialog mainDialog = new MainDialog(invisibleFrame);\n mainDialog.setVisible(true);\n } finally {\n invisibleFrame.dispose();\n }\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t try {\n\t\t\t\t\tUIManager.setLookAndFeel(\"com.seaglasslookandfeel.SeaGlassLookAndFeel\");\n\t\t\t\t} catch (ClassNotFoundException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (InstantiationException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (IllegalAccessException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (UnsupportedLookAndFeelException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tsetupLibVLC();\n\t\t\t\t} catch (LibraryNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tNative.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);\n\t\t\t\t\n\t\t\t\tExtendedFrame frame = new ExtendedFrame();\n\t\t\t\tframe.setResizable(true);\n\t\t\t\tframe.setSize(800, 600);\n\t\t\t\tframe.setMinimumSize(new Dimension(500, 400));\n\t\t\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\t\t\tframe.setLocationRelativeTo(null);\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\tframe.setVisible(true);\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Welcome to Vamix!\\n\\nHope you enjoy using vamix!\\nFor help, please click in the Help menu.\\nRefer to user manual for detailed help.\\n\");\n\t\t\t}",
"public ModuleFrame() {\n javafxPanel = new JFXPanel();\n initComponents();\n this.webViewParent.setLayout(new BorderLayout());\n this.webViewParent.add(javafxPanel, BorderLayout.CENTER);\n this.webViewParent.add(javafxPanel);\n \n this.setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"private void $$$setupUI$$$() {\n\t\tpanel_overview = new JPanel();\n\t\tpanel_overview.setLayout(new BorderLayout(0, 0));\n\t\twebView = new WebbrowserPanel();\n\t\tpanel_overview.add(webView, BorderLayout.CENTER);\n\t}",
"public void run() {\n\t\t\t\t\tif (currentViewer != null) {\r\n\t\t\t\t\t\tcurrentViewer.setSelection(new StructuredSelection(\r\n\t\t\t\t\t\t\t\ttheSelection.toArray()), true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"public void createPartControl(Composite parent) {\n//\t\tviewer = new TreeViewer(parent, SWT.VIRTUAL | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tviewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);\n\n\t\tdrillDownAdapter = new DrillDownAdapter(viewer);\n\t\tviewer.setContentProvider(new ViewContentProvider());\n\t\tviewer.setLabelProvider(new ViewLabelProvider());\n\t\tviewer.setSorter(new NameSorter()); // sorts the tree names alphabetically\n\t\tviewer.setInput(getViewSite());\n\t\t\n\t\tViewerFilter[] filters = {showAllFilter};\n\t\tviewer.setFilters(filters);\n\n\t\tshell = parent.getShell();\n\n\t\t// Create the help context id for the viewer's control\n\t\tPlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), \"org.openmodelica.modelicaml.view.componentstree\");\n\t\tmakeActions();\n\t\thookContextMenu();\n//\t\thookDoubleClickAction();\n\t\thookSelectionChangedAction();\n\t\tcontributeToActionBars();\n\n//\t\tgetSite().getWorkbenchWindow().getSelectionService().addSelectionListener(listener);\n\t\t\n\t\t// add a selection provider.\n\t\tgetSite().setSelectionProvider(viewer); \n\t\t\n\t\t// double click for opening/closing the sub tree\n\t\tviewer.addOpenListener(new IOpenListener() {\n\t\t\tpublic void open(final OpenEvent event) {\n\t\t\t\tObject firstElement = ((IStructuredSelection)\n\t\t\t\tevent.getSelection()).getFirstElement();\n\t\t\t\t\tif (viewer.getExpandedState(firstElement)) {\n\t\t\t\t\t\tviewer.collapseToLevel(firstElement, AbstractTreeViewer.ALL_LEVELS);\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\tviewer.expandToLevel(firstElement, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\n\t\t// add drag support\n\t\tint operations = DND.DROP_MOVE;\n\t\tTransfer[] transferTypes = new Transfer[]{ LocalSelectionTransfer.getTransfer()};\n\t\tviewer.addDragSupport(operations, transferTypes, new DragListener(viewer));\n\n\t}",
"public void finalizeViewer()\n {\n viewer.stopViewer();\n\n // check whether star tasks still is running ! \n if (startTask.isAlive() == true)\n startTask.interruptAll(); // send interrupt signal\n \n // Wait 1s. \n try\n {\n Thread.sleep(1000);\n }\n catch (InterruptedException e)\n {\n e.printStackTrace();\n }\n \n viewer.disposeViewer();\n \n // check parent frame:\n if (viewer.getViewContext().getStartInStandaloneWindow()==true)\n {\n Frame frame=getViewerFrame(viewer); \n \n if (frame != null)\n {\n frame.dispose();\n }\n }\n }",
"public void createPartControl(Composite parent) {\n\t\tviewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tdrillDownAdapter = new DrillDownAdapter(viewer);\n\t\tviewer.setContentProvider(new ViewContentProvider());\n\t\tviewer.setLabelProvider(new ViewLabelProvider());\n\t\tviewer.setSorter(new NameSorter());\n\t\tviewer.setInput(getViewSite());\n\n\t\t// Create the help context id for the viewer's control\n\t\tPlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), \"TreeView.viewer\");\n\t\tmakeActions();\n\t\thookContextMenu();\n\t\thookDoubleClickAction();\n\t\tcontributeToActionBars();\n\t}",
"private static void createAndShowGUI() {\n\t\t//creating the GUI\n\t\tPhotoViewer myViewer = new PhotoViewer();\n\n\t\t//setting the title\n\t\tmyViewer.setTitle(\"Cameron Chiaramonte (ccc7sej)\");\n\n\t\t//making sure it will close when the x is clicked\n\t\tmyViewer.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t//calling the method to add the components to the pane and then making it visible\n\t\tmyViewer.addComponentsToPane(myViewer.getContentPane());\n\t\tmyViewer.pack();\n\t\tmyViewer.setVisible(true);\n\t}",
"public void start(){\n JmeFormatter formatter = new JmeFormatter();\n\n Handler consoleHandler = new ConsoleHandler();\n consoleHandler.setFormatter(formatter);\n\n Logger.getLogger(\"\").removeHandler(Logger.getLogger(\"\").getHandlers()[0]);\n Logger.getLogger(\"\").addHandler(consoleHandler);\n \n createCanvas(appClass);\n \n try {\n Thread.sleep(500);\n } catch (InterruptedException ex) {\n }\n \n SwingUtilities.invokeLater(new Runnable(){\n public void run(){\n JPopupMenu.setDefaultLightWeightPopupEnabled(false);\n\n createFrame();\n \n //currentPanel.add(canvas, BorderLayout.CENTER);\n mMainFrame.pack();\n startApp();\n mMainFrame.setLocationRelativeTo(null);\n mMainFrame.setVisible(true);\n }\n });\n \n \n }",
"public void run()\r\n {\n\ttopLevelSearch=FIND_TOP_LEVEL_PAGES;\r\n\ttopLevelPages=new Vector();\r\n\tnextLevelPages=new Vector();\r\n \r\n\t// Check to see if a proxy is being used. If so then we use IP Address rather than host name.\r\n\tproxyDetected=detectProxyServer();\r\n\t \r\n\tstartSearch();\r\n \r\n\tapp.enableButtons();\r\n\tapp.abort.disable();\r\n \r\n\tif(hitsFound == 0 && pageOpened == true)\r\n\t app.statusArea.setText(\"No Matches Found\");\r\n else if(hitsFound==1)\r\n\t app.statusArea.setText(hitsFound+\" Match Found\");\r\n else app.statusArea.setText(hitsFound+\" Matches Found\");\r\n }",
"public void createPartControl(Composite parent) {\n \t\t// Store the display so we can make async calls from listeners\n \t\tdisplay = parent.getDisplay();\n\t\tviewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);\n \t\tsetTreeColumns(viewer.getTree());\n \t\tviewer.getTree().setHeaderVisible(true);\n \t\tviewer.setContentProvider(getContentProvider());\n \t\tviewer.setInput(getInput());\n \t\tviewer.setLabelProvider(getLabelProvider());\n \t\tviewer.setComparator(new ViewerComparator());\n \t\tconfigureViewer(viewer);\n \t\taddListeners();\n \t\tmakeActions();\n \t\thookContextMenu();\n \t\thookDoubleClickAction();\n \t\tcontributeToActionBars();\n \t}",
"public void runEditorNew()\r\n\t{\r\n\t\tmainFrame.runEditorNew();\r\n\t}",
"public void run() {\n criaGUI();\n \n }",
"public void start() {\n\t\tPetriNetView pnmlData = ApplicationSettings.getApplicationView()\n\t\t\t\t.getCurrentPetriNetView();\n\t\t//if (pnmlData.getTokenViews().size() > 1) {\n\t\tif(pnmlData.getEnabledTokenClassNumber() > 1){\n\t\t\tExpander expander = new Expander(pnmlData);\n\t\t\tpnmlData = expander.unfold();\n\t\t\tJOptionPane.showMessageDialog(null, \"This is CGSPN. The analysis will only apply to default color (black)\",\n\t\t\t\t\t\"Information\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}\n\t\t// Build interface\n\t\tEscapableDialog guiDialog = new EscapableDialog(\n\t\t\t\tApplicationSettings.getApplicationView(), MODULE_NAME, true);\n\n\t\t// 1 Set layout\n\t\tContainer contentPane = guiDialog.getContentPane();\n\t\tcontentPane.setLayout(new BoxLayout(contentPane, BoxLayout.PAGE_AXIS));\n\n\t\t// 2 Add file browser\n\t\tsourceFilePanel = new PetriNetChooserPanel(\"Source net\", pnmlData);\n\t\tcontentPane.add(sourceFilePanel);\n\n\t\t// 3 Add results pane\n\t\tresults = new ResultsHTMLPane(pnmlData.getPNMLName());\n\t\tcontentPane.add(results);\n\n\t\t// 4 Add button's\n\t\tcontentPane.add(new ButtonBar(\"Analyse GSPN\", runAnalysis, guiDialog\n\t\t\t\t.getRootPane()));\n\n\t\t// 5 Make window fit contents' preferred size\n\t\tguiDialog.pack();\n\n\t\t// 6 Move window to the middle of the screen\n\t\tguiDialog.setLocationRelativeTo(null);\n\n\t\ttry {\n\t\t\tguiDialog.setVisible(true);\n\t\t} catch (NullPointerException e) {\n\t\t}\n\n\t}",
"public void startGame(){\n System.out.println(\"[SERVER]: Starting a new game\");\n mainPage = new MainPage();\n mainPage.setMatch(match);\n mainPage.setRemoteController(senderRemoteController);\n\n Platform.runLater( () -> {\n try {\n firstPage.closePrimaryStage();\n if(chooseMap != null)\n chooseMap.closePrimaryStage();\n mainPage.start(new Stage());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n );\n }",
"public void run() {\n viewerManagerFrame.removeViewer(viewer);\n }",
"private void initialiseView() {\n \tnoTasksMessageView = (TextView)findViewById(R.id.noTasksRunning);\r\n \ttaskKillWarningView = (TextView)findViewById(R.id.progressStatusMessage);\r\n\r\n \tIterator<Progress> jobsIterator = JobManager.iterator();\r\n \twhile (jobsIterator.hasNext()) {\r\n \t\tProgress job = jobsIterator.next();\r\n \t\tfindOrCreateUIControl(job);\r\n \t}\r\n\r\n // allow call back and continuation in the ui thread after JSword has been initialised\r\n \tfinal Handler uiHandler = new Handler();\r\n \tfinal Runnable uiUpdaterRunnable = new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n \t\t\tProgress prog = progressNotificationQueue.poll();\r\n \t\t\tif (prog!=null) {\r\n \t\t\t\tupdateProgress(prog);\r\n \t\t\t}\r\n\t\t\t}\r\n };\r\n\r\n // listen for Progress changes and call the above Runnable to update the ui\r\n\t\tworkListener = new WorkListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void workProgressed(WorkEvent ev) {\r\n\t\t\t\tcallUiThreadUpdateHandler(ev);\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void workStateChanged(WorkEvent ev) {\r\n\t\t\t\tcallUiThreadUpdateHandler(ev);\r\n\t\t\t}\r\n\t\t\tprivate void callUiThreadUpdateHandler(WorkEvent ev) {\r\n\t\t\t\tProgress prog = ev.getJob();\r\n\t\t\t\tprogressNotificationQueue.offer(prog);\r\n \t\t\t// switch back to ui thread to continue\r\n \t\t\tuiHandler.post(uiUpdaterRunnable);\r\n\t\t\t}\r\n\t\t};\r\n\t\tJobManager.addWorkListener(workListener);\r\n\r\n\t\t// give new jobs a chance to start then show 'No Job' msg if nothing running\r\n\t\tuiHandler.postDelayed(\r\n\t\t\tnew Runnable() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tif (!JobManager.iterator().hasNext()) {\r\n\t\t\t\t\t\tshowNoTaskMsg(true);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, 4000);\r\n }",
"public PeerPanel() {\n\t\n\t\tpeer = new Peer(this);\n\t\tpt = new Thread(peer);\n\n\t\tsetLayout(new BorderLayout());\n\n\t\t//File directory button\n\t\tchooseShareFolder = new JButton(\"Choose Shared Directory\");\n\t\tFileListener fileListnr = new FileListener();\n\t\tchooseShareFolder.addActionListener(fileListnr);\n\t\tfileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\t\n\t\t//Join and Leave Network Button\n\t\tnetworkJoinLeave = new JButton(\"Join Network\");\n\t\tPeerListener peerListnr = new PeerListener();\n\t\tnetworkJoinLeave.addActionListener(peerListnr);\n\t\t\n\t\t//Radio buttons to choose network mode\n\t\tnormal = new JRadioButton(\"Normal Mode\", true);\n\t\tslow = new JRadioButton(\"Slow Mode\");\n\t\tButtonGroup mode = new ButtonGroup();\n\t\tmode.add(normal);\n\t\tmode.add(slow);\n\t\tModeListener modeLstnr = new ModeListener();\n\t\tnormal.addActionListener(modeLstnr);\n\t\tslow.addActionListener(modeLstnr);\n\t\t\n\t\t//Organize all of the above\n\t\tnetworkGrid = new JPanel();\n\t\tnetworkGrid.setLayout(new GridLayout(1, 4));\n\t\tnetworkGrid.setBorder(BorderFactory.createTitledBorder(\"Network Settings\"));\n\t\tnetworkGrid.add(normal);\n\t\tnetworkGrid.add(slow);\n\t\tnetworkGrid.add(serverLabel);\n\t\tnetworkGrid.add(enterServerIP);\n\t\tconnectionGrid = new JPanel();\n\t\tconnectionGrid.setLayout(new GridLayout(2, 1));\n\t\tconnectionGrid.add(networkGrid);\n\t\tconnectionGrid.add(networkJoinLeave);\n\t\tnorthGrid = new JPanel();\n\t\tnorthGrid.setLayout(new GridLayout(1,2));\n\t\tnorthGrid.setBorder(BorderFactory.createTitledBorder(\"Application Setup\"));\n\t\tnorthGrid.add(connectionGrid);\n\t\tnorthGrid.add(chooseShareFolder);\n\n\t\tadd(northGrid, BorderLayout.NORTH);\n\n\t\t//List of files the directory server is aware of\n\t\tremoteModel.addColumn(\"Name\");\n\t\tremoteModel.addColumn(\"Size\");\n\t\tremoteScroll = new JScrollPane(remoteTable);\n\t\tremoteTable.setPreferredScrollableViewportSize(new Dimension(250, 70));\n\t\tremoteTable.setFillsViewportHeight(true);\n\t\tremoteTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\n\t\tremoteBorder = new JPanel();\n\t\tremoteBorder.setLayout(new BorderLayout());\n\t\tremoteBorder.add(remoteScroll, BorderLayout.CENTER);\n\t\tremoteBorder.setBorder(BorderFactory.createTitledBorder(\"Available for Download\"));\n\t\tdownloadFiles = new JButton(\"Get Selected\");\n\t\tSelectionListener selectListnr = new SelectionListener();\n\t\tdownloadFiles.addActionListener(selectListnr);\n\t\tqueryServer = new JButton(\"Sync with Directory\");\n\t\tSyncListener syncListnr = new SyncListener();\n\t\tqueryServer.addActionListener(syncListnr);\n\t\tremoteSouth = new JPanel();\n\t\tremoteSouth.setLayout(new GridLayout(1,2));\n\t\tremoteSouth.add(downloadFiles);\n\t\tremoteSouth.add(queryServer);\n\t\tremoteBorder.add(remoteSouth, BorderLayout.SOUTH);\n\n\t\t//List of files to share (local)\n\t\tlocalModel.addColumn(\"Name\");\n\t\tlocalModel.addColumn(\"Size\");\n\t\tlocalScroll = new JScrollPane(localTable);\n\t\tlocalTable.setPreferredScrollableViewportSize(new Dimension(50, 70));\n\t\tlocalTable.setFillsViewportHeight(true);\n\t\tlocalBox = new JPanel();\n\t\tlocalBox.setLayout(new BoxLayout(localBox, BoxLayout.Y_AXIS));\n\t\tlocalBox.setBorder(BorderFactory.createTitledBorder(\"Local Files\"));\n\t\tlocalBox.add(localScroll);\n\n\t\tcenterGrid = new JPanel();\n\t\tcenterGrid.setLayout(new GridLayout(1,2));\n\t\tcenterGrid.add(remoteBorder);\n\t\tcenterGrid.add(localBox);\n\n\t\tadd(centerGrid, BorderLayout.CENTER);\n\n\t\tactivity = new JTextArea(\"System Ready...\\n\",5,20);\n\t\tactivity.setEditable(false);\n\t\tactivityScroll = new JScrollPane(activity);\n\n\t\tadd(activityScroll, BorderLayout.SOUTH);\n\t\t\n\t}",
"private static void start()\r\n\t{\r\n\t\tif(isRunning)\r\n\t\t\treturn;\r\n\t\t\r\n\t\tisRunning = true;\r\n\t\t\r\n\t\tdisplay = new Display();\r\n\t\trun();\r\n\t}",
"public void initGui() {\r\n\t\tEventQueue.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tGuiWindow window = new GuiWindow(Controller.this);\r\n\t\t\t\t\tlinkedGuiWindow = window;\r\n\t\t\t\t\twindow.setVisible(true);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"@Override protected void startup() {\n show(new FFTView(this));\n }",
"public void refresh() {\n\t\tthis.viewer.refresh();\n\t}"
] |
[
"0.71386874",
"0.67098707",
"0.66772467",
"0.6321891",
"0.6298895",
"0.6196068",
"0.61507344",
"0.60960656",
"0.6060235",
"0.6001887",
"0.5986416",
"0.598335",
"0.59817773",
"0.59536237",
"0.5912027",
"0.58936054",
"0.5846686",
"0.584073",
"0.58060616",
"0.57999307",
"0.5774158",
"0.57676643",
"0.57600045",
"0.5757409",
"0.57260096",
"0.5703262",
"0.5684011",
"0.5675728",
"0.566221",
"0.56422126",
"0.56357914",
"0.5616918",
"0.55893165",
"0.5588666",
"0.5562757",
"0.55458885",
"0.5529889",
"0.55211675",
"0.55136913",
"0.55014277",
"0.54852134",
"0.5483904",
"0.5480837",
"0.5452211",
"0.54470676",
"0.542556",
"0.54159826",
"0.54146457",
"0.54135406",
"0.54095006",
"0.54091954",
"0.5404166",
"0.5400726",
"0.53991",
"0.5398044",
"0.5396017",
"0.53927565",
"0.53901756",
"0.5386399",
"0.5385014",
"0.536847",
"0.5363291",
"0.53599375",
"0.53597206",
"0.5356113",
"0.5355134",
"0.5338993",
"0.533072",
"0.5324688",
"0.5321252",
"0.531493",
"0.531351",
"0.53133327",
"0.53129935",
"0.53129935",
"0.5308917",
"0.53087884",
"0.53054345",
"0.53035325",
"0.52959275",
"0.5295222",
"0.5292626",
"0.5285767",
"0.5283281",
"0.5280761",
"0.5274134",
"0.5271667",
"0.52666765",
"0.52664864",
"0.52631634",
"0.5260905",
"0.52550566",
"0.5254886",
"0.5250978",
"0.52480865",
"0.5244141",
"0.5236297",
"0.52352935",
"0.52333105",
"0.52332085"
] |
0.56912667
|
26
|
applet: stop(); applet: destroy();
|
public void stopTask()
{
viewer.stopViewer();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void destroy() {\r\n // applet is going away...\r\n }",
"public void stop()\n\t{\n\t\tif (m_thread != null)\n\t\t{\n\t\t\tm_thread.stop();\n\t\t\tm_thread = null;\n\t\t}\n\n\t\t// TODO: Place additional applet stop code here\n\t}",
"public void exit() {\n loader.getApplet().stop();\n loader.getApplet().destroy();\n }",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"void stop();",
"public void stop() {}",
"public void stop() {\n\tanimator = null;\n\toffImage = null;\n\toffGraphics = null;\n }",
"public void stop()\n {\n _panel.cleanup();\n _appContext.cleanup();\n }",
"public void stopping();",
"public void stop(){\n\t\t\n\t}",
"public void stop() {\n }",
"public void stop() {\n }",
"public void stop() {\n\t}",
"public void stop(){\n }",
"public void stop() {\n\t\t\n\t}",
"public void stop()\n {\n }",
"public void kill();",
"public void kill();",
"public void stopped();",
"void stop() {\n }",
"static void unstop(){\n stop=false;\n }",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"public void destroy();",
"void stopAll();",
"public void stop(BundleContext context)\n {\n m_shapetracker.close();\n m_frame.setVisible(false);\n m_frame.dispose();\n }",
"public static void kill(){\r\n\t\tDisplay.destroy();//create Display\r\n\t\tMouse.destroy();//create Mouse\r\n\t\tKeyboard.destroy();//create Keyboard\r\n\t}",
"public abstract void stop();",
"public abstract void stop();",
"public abstract void stop();",
"public abstract void stop();",
"public abstract void stop();",
"@Override\n \tpublic void stop(BundleContext context) throws Exception {\n \n \t}",
"@Override\n public void stop() {\n animatorThread = null;\n\n //Get rid of the objects necessary for double buffering.\n offGraphics = null;\n offImage = null;\n }",
"public void stop() {\r\n\t\t// Tell the Gui Agent to shutdown the system\r\n\t\tGui.shutdown = true;\r\n\t}",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"void destroy();",
"public void onDestroy() {\n \twifiLock.release();\n \tstopForeground(true);\n \tradio.stop();\n \tradio.release();\n \tradio = null;\n }",
"public void stop(){\n return;\n }",
"private void stop() {\r\n\t\tif (!running)\r\n\t\t\treturn;\r\n\t\trunning = false;\r\n\t\ttry {\r\n\t\t\tthread.join();//ends thread to close program correctly\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(0);//closes canvas\r\n\t\t}\r\n\t}",
"abstract public void stop();",
"public void stop(){\n\t\t\n\t\tif (extObj != null){\n\t\t\textObj.stopComponent();\n\t\t\textObj = null;\n\t\t}\n\t\t\n\t\textClassLoader = null;\n\t}",
"public void destroy() {}",
"public void destroy() {}",
"public void stop() {\n\t\tResources.getmScene().unregisterUpdateHandler(time);\n\t\trunning = false;\n\t}",
"public void stop() {\n\t\tthis.controller.terminate();\n\t}",
"public void destroy(){\n\t\tIterator toolIterator = tools.iterator();\n\t\twhile(toolIterator.hasNext()){\n\t\t\tToolBridge tb = (ToolBridge) toolIterator.next();\n\t\t\ttb.terminate();\n\t\t}\n\n\t\tmultiplexingClientServer.stopRunning();\n\t}",
"public boolean stop();",
"public void stop()\n\t{\n\t\trunning = false;\n\t}",
"public void stop(BundleContext context) throws Exception {\n \t\tsuper.stop(context);\n \t\tplugin = null;\n \t\tresourceBundle = null;\n \t}",
"public void stop() {\r\n\t\t//If the program has an error this will stop the program\r\n\t\ttry {\r\n\t\t\trunning = false;\r\n\t\t\tg.dispose();\r\n\t\t\tthread.join();\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public final void stop() {\n running = false;\n \n \n\n }",
"public synchronized void stop() {\n\t\tif (!running)\n\t\t\treturn;\n\t\ttry {\n\t\t\toptions.save();\n\t\t\twindow.dispose();\n\t\t\trunning = false;\n\t\t\tthread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\tSystem.exit(1);\n\t}",
"public void destroy() {\n this.alive = false;\n }",
"private void stop() {\r\n\t\t\tstopped = true;\r\n\t\t}",
"@Override\n protected void appStop() {\n }"
] |
[
"0.8441163",
"0.7367907",
"0.7196805",
"0.6886353",
"0.6886353",
"0.6886353",
"0.6886353",
"0.6886353",
"0.6886353",
"0.6886353",
"0.6886353",
"0.6886353",
"0.6886353",
"0.6886353",
"0.6886353",
"0.6886353",
"0.6886353",
"0.6886353",
"0.6799653",
"0.6799653",
"0.6799653",
"0.6799653",
"0.6799653",
"0.6799653",
"0.6799653",
"0.6799653",
"0.6799653",
"0.6799653",
"0.6799653",
"0.6799653",
"0.6799653",
"0.6799653",
"0.6799653",
"0.6799653",
"0.6799653",
"0.67601043",
"0.6718347",
"0.6627763",
"0.65322757",
"0.6523731",
"0.6512016",
"0.6512016",
"0.6505649",
"0.64703584",
"0.64620686",
"0.64471316",
"0.6363052",
"0.6363052",
"0.635967",
"0.6344791",
"0.6293811",
"0.6276704",
"0.6276704",
"0.6276704",
"0.6276704",
"0.6276704",
"0.6276704",
"0.6276704",
"0.6276704",
"0.62549216",
"0.6236113",
"0.6235054",
"0.6233945",
"0.6233945",
"0.6233945",
"0.6233945",
"0.6233945",
"0.6229637",
"0.6225746",
"0.6187823",
"0.6179543",
"0.6179543",
"0.6179543",
"0.6179543",
"0.6179543",
"0.6179543",
"0.6179543",
"0.6179543",
"0.6179543",
"0.6179543",
"0.6179543",
"0.6179543",
"0.6160618",
"0.6155925",
"0.61493397",
"0.6148196",
"0.6143277",
"0.61129004",
"0.61129004",
"0.61094123",
"0.6104541",
"0.60940725",
"0.60871106",
"0.60871094",
"0.60730386",
"0.60640454",
"0.60614127",
"0.60551655",
"0.6051751",
"0.6045605",
"0.60445654"
] |
0.0
|
-1
|
Invokes finalizeViewer() in a separate thread.
|
final synchronized public void signalFinalize()
{
// run stop in a seperate thread:
//System.err.println("--- Signal finalize ---");
ActionTask stopTask = new ActionTask(this.taskSource,
"Stopping viewer:" + this)
{
public void doTask()
{
try
{
finalizeViewer();
}
catch (Error e)
{
System.out.println("***Error: Exception:" + e);
e.printStackTrace();
// setText("*** Exception occured ***\n"+e.toString());
}
}
public void stopTask()
{
}; // nothing to stop/dispose:this IS already a stop/dispose task!!!
};
stopTask.startTask();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void finalizeViewer()\n {\n viewer.stopViewer();\n\n // check whether star tasks still is running ! \n if (startTask.isAlive() == true)\n startTask.interruptAll(); // send interrupt signal\n \n // Wait 1s. \n try\n {\n Thread.sleep(1000);\n }\n catch (InterruptedException e)\n {\n e.printStackTrace();\n }\n \n viewer.disposeViewer();\n \n // check parent frame:\n if (viewer.getViewContext().getStartInStandaloneWindow()==true)\n {\n Frame frame=getViewerFrame(viewer); \n \n if (frame != null)\n {\n frame.dispose();\n }\n }\n }",
"public void run() {\n viewerManagerFrame.removeViewer(viewer);\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n new Thread(new Runnable() {\n public void run() {\n pcu.setDone();\n camera.getDriver().cleanUp();\n frame.setVisible(false);\n frame.dispose();\n }\n }).start();\n }",
"public void dispose() {\n parent.removeListener(listener);\n PlatformUI.getWorkbench().getDisplay().asyncExec(displayRunnable);\n }",
"@Override\r\n\tpublic void run() {\n\t\tshowViewer();\r\n\t}",
"public void run() {\n \t\t\t\t\t\t((AbstractTreeViewer)getViewer()).refresh();\n \t\t\t\t\t}",
"@Override\n public void cleanup() {\n // dispose GUI:\n if (this.mainPanel != null) {\n this.mainPanel.dispose();\n }\n }",
"@Override\n\tprotected void finalize() throws Throwable {\n\t\ttry {\n\t\t\tsuper.finalize();\n\t\t\t(new ClearClipBoardTask()).run();\n\t\t} catch (Exception ex) {\n\t\t\tLogger.getLogger(this.getClass().getName()).severe(ex.getMessage());\n\t\t}\n\t}",
"public void finalize() {\r\n destImage = null;\r\n srcImage = null;\r\n mask = null;\r\n\r\n if (keepProgressBar == false) {\r\n disposeProgressBar();\r\n }\r\n\r\n try {\r\n super.finalize();\r\n } catch (Throwable er) { }\r\n }",
"protected void cleanup() {\n finished = true;\n thread = null;\n }",
"@Override\n public void windowClosing(WindowEvent e) {\n new Thread() {\n @Override\n public void run() {\n \n if (animator != null && animator.isStarted()) {\n animator.stop();\n }\n if (fpsMonitor != null) { \n fpsMonitor.stop();\n }\n \n try {\n SwingUtilities.invokeAndWait (new Runnable() {\n @Override\n public void run () {\n viewer.dispose ();\n }\n });\n }\n catch (InvocationTargetException e) {\n }\n catch (InterruptedException e) {\n }\n \n closed = true;\n }\n }.start();\n }",
"public void finalize() {\r\n if ( componentHistogram != null ) {\r\n componentHistogram.dispose();\r\n componentHistogram = null;\r\n }\r\n\r\n if ( componentLUT != null ) {\r\n componentLUT.dispose( false );\r\n componentLUT = null;\r\n }\r\n\r\n if ( lutRecorder != null ) {\r\n lutRecorder.setVisible( false );\r\n lutRecorder.dispose();\r\n lutRecorder = null;\r\n }\r\n }",
"public void run() {\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tif(_lastpresentation != null) {\r\n \t\t\t\t\t viewer.changeTextPresentation(_lastpresentation, true);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\tcatch(NullPointerException exc) {\r\n \t\t\t\t\t}\r\n \t\t\t\t}",
"@Override\n public void run() {\n\n GLMouseListener mouse = viewer.getMouseHandler();\n if (mouse instanceof GLMouseAdapter) {\n ((GLMouseAdapter)mouse).setLaptopConfig();\n }\n \n viewer.addSelectionListener(new SimpleSelectionHandler(renderables));\n\n // Create a animator that drives canvas' display() at the specified FPS.\n final FPSAnimator animator;\n final FPSMonitor fpsMonitor;\n \n if (MultiViewer.doFPS) {\n animator = new FPSAnimator(viewer.getCanvas().getDrawable(), FPS, true);\n animator.setUpdateFPSFrames(3, null);\n animator.start();\n fpsMonitor = new FPSMonitor(title + \" FPS: \", animator);\n new Thread(fpsMonitor).start();\n } else {\n animator = null;\n fpsMonitor = null;\n }\n \n // Create the top-level container\n frame = new JFrame(); // Swing's JFrame or AWT's Frame\n frame.add(viewer.getCanvas().getComponent());\n\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n // Use a dedicate thread to run the stop() to ensure that the\n // animator stops before program exits.\n new Thread() {\n @Override\n public void run() {\n \n if (animator != null && animator.isStarted()) {\n animator.stop();\n }\n if (fpsMonitor != null) { \n fpsMonitor.stop();\n }\n \n try {\n SwingUtilities.invokeAndWait (new Runnable() {\n @Override\n public void run () {\n viewer.dispose ();\n }\n });\n }\n catch (InvocationTargetException e) {\n }\n catch (InterruptedException e) {\n }\n \n closed = true;\n }\n }.start();\n }\n });\n frame.setTitle(title);\n // frame.pack();\n frame.setVisible(true);\n // animator.start(); // start the animation loop\n }",
"public void run()\n {\n\n setVisible(false);\n dispose();\n\n // long mem2 = Runtime.getRuntime().freeMemory();\n // System.out.println(\"SplashWindow: free memory after dispose = \" + mem2);\n\n // Explicitly invoke the garbage collector\n\n System.gc();\n\n // long mem3 = Runtime.getRuntime().freeMemory();\n // System.out.println(\"SplashWindow: free memory after garbage collection = \" + mem3);\n\n // long diff = mem3 - mem1;\n // System.out.println(\"SplashWindow: total memory recovered (bytes) = \" + diff);\n }",
"public void finalize() throws Throwable {\n synchronized (HiviewLooperCheck.class) {\n if (sThreadLoopers != null) {\n sThreadLoopers.remove(this.mKey);\n }\n }\n super.finalize();\n }",
"@FxThread\n private void onFinishLoading() {\n pluginSystem.getPlugins().stream()\n .filter(EditorPlugin.class::isInstance)\n .map(EditorPlugin.class::cast)\n .forEach(editorPlugin -> editorPlugin.onFinishLoading(pluginSystem));\n }",
"protected void finalize() {\n\t\tdestroyImages();\n\t}",
"public void finishShutdown() {\n Platform.runLater(new ShutdownFinish(this));\n }",
"public void dispose() {\r\n\t\tif (view != null)\r\n\t\t\tview.stopThread = true;\r\n\t\tview = null;\r\n\t\tcontroller = null;\r\n\t\tsuper.dispose();\r\n\t}",
"private void processDispose(final boolean finalized) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n Thread.currentThread().setName(\"Dispose_Thread\");\n Log.d(TAG, \"Processing dispose with \" + finalized + \" from \"\n + Thread.currentThread().getName());\n disposeInternal(finalized);\n }\n }).start();\n }",
"private void refresh() {\n\t\t\tRunnable run = new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif(table.isDisposed())return;\n\t\t\t\t\tviewer.refresh();\n\t\t\t\t}\t\t\t\n\t\t\t};\n\t\t\tDisplay.getDefault().asyncExec(run);\n\t\t}",
"void imFinished();",
"public void run() {\n\t\t\t\tif (_uiContainer.isDisposed()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// initialize tooltip for a new folder\r\n\t\t\t\t_photoGalleryTooltip.reset(true);\r\n\r\n\t\t\t\tfinal double galleryPosition = getCachedGalleryPosition();\r\n\r\n\t\t\t\t_galleryMT20.setupItems(0, galleryPosition, _restoredSelection);\r\n\r\n\t\t\t\t_restoredSelection = null;\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * update status info\r\n\t\t\t\t */\r\n\t\t\t\tfinal long timeDiff = System.currentTimeMillis() - _workerStart;\r\n\t\t\t\tfinal String timeDiffText = NLS.bind(\r\n\t\t\t\t\t\tMessages.Pic_Dir_Status_Loaded,\r\n\t\t\t\t\t\tnew Object[] { Long.toString(timeDiff), Integer.toString(_allPhotos.length) });\r\n\r\n\t\t\t\tsetStatusMessage(timeDiffText);\r\n\t\t\t}",
"protected void finalize() { \n \tstopSelf(); \n }",
"@Override\n\tpublic void run() {\n\t\twhile (computeFrame()) {}\n\t\tframe.setVisible(false);\n\t\tframe.dispose();\n\t}",
"protected void cleanup() throws QTException {\n switch(action) {\n case REMOVE_DRAWING_COMPLETE_PROC:\n MoviePlayer player = (MoviePlayer)needsCleaning[0];\n if (player == null) return;\n Movie movie = player.getMovie();\n movie.removeDrawingCompleteProc();\n player.setGWorld(QDGraphics.scratch);\n needsCleaning[0] = null;\n }\n }",
"@SuppressWarnings(\"unused\")\n private static void onUnload() {\n Runnable runnable = onFinalize.getAndSet(null);\n if (runnable != null) {\n runnable.run();\n }\n }",
"public void run() {\n\t\t\t heavyResize();\n\t\t\t invokeRedraw();\n\t\t }",
"public void refresh() {\n\t\tthis.viewer.refresh();\n\t}",
"public void finished() {\n this.setVisible(false);\n this.dispose();\n }",
"@Override\n\t\tpublic void run() {\n\t\t\tsynchronized (mSync) {\n\t\t\t\t// 描画スレッドが実行されるまで待機\n\t\t\t\tif (!isRunning) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmSync.wait();\n\t\t\t\t\t} catch (final InterruptedException e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tinit();\n\t\t\tif (egl.getGlVersion() > 2) {\n\t\t\t\tcaptureLoopGLES3();\n\t\t\t} else {\n\t\t\t\tcaptureLoopGLES2();\n\t\t\t}\n\t\t\t// release resources\n\t\t\trelease();\n//\t\t\tif (DEBUG) Log.v(TAG, \"captureTask finished\");\n\t\t}",
"public void destroy(){\n Log.d(TAG, \"onDestroy called\");\n runRunnable = false;\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.release();\n mCamera = null;\n }\n isPaused = true;\n // TODO stop executorService\n\n //executor.shutdown();\n cameraThread.stop();\n\n }",
"public void finalize() {\n AppMethodBeat.i(66593);\n if (this.mJitterBuffer != 0) {\n nativeDestoryJitterBuffer(this.mJitterBuffer);\n this.mJitterBuffer = 0;\n }\n AppMethodBeat.o(66593);\n }",
"@Override\n public void surfaceDestroyed(SurfaceHolder arg0) {\n release();\n threadFlag = false;\n }",
"public void done() {\n final MainActivity output =\n mOuterClass.get();\n \n if (output == null)\n return;\n\n try {\n // Forward to the MainActivity.done() method, which\n // ultimately posts a Runnable on the UI Thread. This\n // Runnable's run() method calls mExitBarrier.countDown() in the\n // context of the UI Thread after all other processing is\n // complete.\n output.done(mExitBarrier);\n } catch (NullPointerException ex) {\n errorLog(\"PlatformStrategyAndroid\",\n \"print Failed b/c of null Activity\");\n }\n }",
"@Override\n public void run() {\n viewDialog.hideDialog();\n }",
"public void finalize() {\r\n printToLogFile = null;\r\n selectedFiles = null;\r\n }",
"protected void onThreadFinish() {\n\t\t// notify test finish\n\t\tparent.finishLock.countDown();\n\n\t\t// print finish summary message\n\t\tprintThreadFinishMessage();\n\t}",
"public SceneUpdateThread(Another2DView view) {\n this.view = view;\n view.getHolder().addCallback(new SurfaceHolder.Callback() {\n @Override\n public void surfaceCreated(SurfaceHolder surfaceHolder) {\n setRunning(true);\n start();\n }\n @Override\n public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {\n }\n @Override\n public void surfaceDestroyed(SurfaceHolder surfaceHolder) {\n boolean retry = true;\n setRunning(false);\n while (retry) {\n try {\n join();\n retry = false;\n } catch (InterruptedException e) {\n }\n }\n }\n });\n }",
"public final void finalize() {\n AppMethodBeat.i(116587);\n try {\n if (fZk != null) {\n fZk.invoke(this.fZh, new Object[]{this.fZi});\n RemoteControlReceiver.alQ();\n }\n } catch (InvocationTargetException e) {\n InvocationTargetException invocationTargetException = e;\n Throwable cause = invocationTargetException.getCause();\n RuntimeException runtimeException;\n if (cause instanceof RuntimeException) {\n runtimeException = (RuntimeException) cause;\n AppMethodBeat.o(116587);\n throw runtimeException;\n } else if (cause instanceof Error) {\n Error error = (Error) cause;\n AppMethodBeat.o(116587);\n throw error;\n } else {\n runtimeException = new RuntimeException(invocationTargetException);\n AppMethodBeat.o(116587);\n throw runtimeException;\n }\n } catch (IllegalAccessException e2) {\n ab.e(\"MicroMsg.RemoteControlReceiver\", \"unexpected \".concat(String.valueOf(e2)));\n }\n super.finalize();\n AppMethodBeat.o(116587);\n }",
"private static void runLater(Runnable runnable) {\n Display display = Display.findDisplay(Thread.currentThread());\n if (display != null) {\n display.asyncExec(runnable);\n } else {\n AdtPlugin.log(IStatus.WARNING, \"Could not find display\");\n }\n }",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tptrFrameLayout.refreshComplete();\t//结束刷新\r\n\t\t\t\t\t}",
"public void done() \r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tif (ok) {\r\n\t\t\t\t\t//resultsTabbedPanel.setEntryPointsData(entryPointsTable);\r\n\t\t\t\t\t// Actualizo la tabla de estadisticas globales\r\n\t\t\t\t\tcreateGlobalStatsTable(0); // XXX TODO\r\n\r\n\t\t\t\t\tregenStatsTree();\r\n\r\n\t\t\t\t\tvalidateTree();\r\n\r\n\r\n\t\t\t\t\ttimeRange.enable();\r\n\r\n\t\t\t\t\tif (!isCached) {\r\n\t\t\t\t\t\ttimeRange.setLimits(minTs, maxTs);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (Throwable e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tCommonForms.showError(parent, \"Error showing data\", e);\r\n\t\t\t} finally {\r\n\t\t\t\tdialog.dispose();\r\n\t\t\t\tparent.setEnabled(true);\r\n\t\t\t\tmainPanel.remove(1); \r\n\t\t\t\tJScrollPane treePanelScroll = new JScrollPane();\r\n\t\t\t\tmainPanel.add(treePanelScroll);\r\n\t\t\t\tMainFrame.this.toFront();\r\n\t\t\t}\r\n\t\t}",
"public void run() {\n\t\t\t\t\t\t\t\t\timageList.removeView(Moreview);\r\n\t\t\t\t\t\t\t\t\tgenerateUI(tempArrayList);\r\n\t\t\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmVideoContrl.closeMediaControl();\r\n\r\n\t\t\t\t\t}",
"@Override\r\n\tprotected void finalize() throws Exception\r\n\t{\r\n\t\tif(!this.cleanUpDone )\r\n\t\t\tthis.terminate();\r\n\t}",
"@Override\n\tpublic void disposeScene() {\n\t\tthis.detachSelf();\n\tthis.dispose();\n}",
"@Override\r\n\tprotected void done() {\r\n\t\ttry {\r\n\t\t\tthis.get();\r\n\r\n\t\t\tRunnable run = new Runnable() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tMainFrame mf = GUITools.getMainFrame();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// try to restore the window at the last location\r\n\t\t\t\t\t\tPropertyManager pm = PropertyManager.getManager(mf);\r\n\t\t\t\t\t\tProperties p = pm.read();\r\n\t\t\t\t\t\t// first run, write default values\r\n\t\t\t\t\t\tif (p.isEmpty()){\r\n\t\t\t\t\t\t\tDimension dimScreen = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\t\t\t\t\t\tint width = (int) dimScreen.getWidth() / 9 * 8;\r\n\t\t\t\t\t\t\tint height = (int) dimScreen.getHeight() / 9 * 8;\r\n\t\t\t\t\t\t\tmf.setLocation(width / 9 * 1 / 2, height / 9 * 1 / 3);\r\n\t\t\t\t\t\t\tmf.setPreferredSize(new Dimension(width, height));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tp.setProperty(\"loc_x\", String.valueOf(mf.getLocation().x));\r\n\t\t\t\t\t\t\tp.setProperty(\"loc_y\", String.valueOf(mf.getLocation().y));\r\n\t\t\t\t\t\t\tp.setProperty(\"width\", String.valueOf(width));\r\n\t\t\t\t\t\t\tp.setProperty(\"height\", String.valueOf(height));\r\n\t\t\t\t\t\t\tp.setProperty(\"extendedState\", String.valueOf(JFrame.MAXIMIZED_BOTH));\r\n\t\t\t\t\t\t\tpm.write();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tmf.setVisible(true);\r\n\t\t\t\t\t\t// start like last time\r\n\t\t\t\t\t\tmf.setLocation(new Point(Integer.valueOf(p.getProperty(\"loc_x\")), Integer.valueOf(p.getProperty(\"loc_y\")))); \r\n\t\t\t\t\t\tmf.setSize(Integer.valueOf(p.getProperty(\"width\")), Integer.valueOf(p.getProperty(\"height\")));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (Integer.valueOf(p.getProperty(\"extendedState\")) != JFrame.MAXIMIZED_BOTH){\r\n\t\t\t\t\t\t\tmf.setExtendedState(JFrame.NORMAL);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (Exception e) {\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t// finally display (from EDT)\r\n\t\t\tSwingUtilities.invokeLater(run);\r\n\r\n\t\t\tSystem.gc();\r\n\r\n\t\t} catch (InterruptedException e1) {\r\n\t\t\tSystem.out.println(\"IQM Fatal: \"+ e1);\r\n\t\t\tDialogUtil.getInstance().showErrorMessage(null, e1, true);\r\n\t\t\tSystem.exit(-1);\r\n\t\t} catch (ExecutionException e1) {\r\n\t\t\tSystem.out.println(\"IQM Fatal: \"+ e1);\r\n\t\t\tDialogUtil.getInstance().showErrorMessage(null, e1, true);\r\n\t\t\tSystem.exit(-1);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"IQM Fatal: \"+ e);\r\n\t\t\tDialogUtil.getInstance().showErrorMessage(null, e, true);\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void release() {\n\t\tmRendererTask.release();\n\t\tsynchronized (mSync) {\n\t\t\tisRunning = false;\n\t\t\tmSync.notifyAll();\n\t\t}\n//\t\tif (DEBUG) Log.v(TAG, \"release:finished\");\n\t}",
"protected final void finalize() {\n if (native_lock != null) {\n synchronized(native_lock) {\n String error = native_finalize(); // may be called more than once\n if (error != null)\n debug(error + \" in native_finalize\");\n }\n }\n }",
"public void notifyPausing() {\n if (mSurfaceTexture != null) {\n Log.d(TAG, \"renderer pausing -- releasing SurfaceTexture\");\n mSurfaceTexture.release();\n mSurfaceTexture = null;\n }\n if (mFullScreen != null) {\n mFullScreen.release(false); // assume the GLSurfaceView EGL context is about\n mFullScreen = null; // to be destroyed\n }\n mIncomingWidth = mIncomingHeight = -1;\n }",
"public void terminouCamadas() {\n Platform.runLater(() -> {\n camadas.setExpandedPane(null);\n setaImagem.setVisible(false);\n });\n }",
"public static void invokeLater(Runnable runnable) {\n Toolkit.getEventQueue().postEvent(\n new InvocationEvent(Toolkit.getDefaultToolkit(), runnable));\n }",
"public void run() {\n\t\t\t\t\t\t\t\t heavyResize();\n\t\t\t\t\t\t\t\t invokeRedraw();\n\t\t\t\t\t\t\t\t }",
"public void run() {\n\t\t\t\tviewer.collapseToLevel(root, 2); // TODO: does not, it always collapse to level 1\n//\t\t\t\tshowSelection(par, sel);\n//\t\t\t\tif (actionCollapsAll.isChecked()) {\n//\t\t\t\t\t\n//\t\t\t\t}\n\t\t\t}",
"public void msgAnimationDone() {\n\t\t//print(\"done Animating!!!!!\");\n\t\tguiControl.release();\n\t\t\n\t}",
"@Override\n\tpublic void surfaceDestroyed(SurfaceHolder arg0) {\n\t\tthreadFlag = false;\n\t\trelease();\n\t}",
"public void finishStartup() {\n Platform.runLater(new StartupFinish(this));\n }",
"@Override\n protected void end() {\n DemoUtils.fadeOutAndExit(getMainFrame(), 800);\n }",
"public void finalize();",
"@Override\n\tpublic void destroy() {\n\t\tif( null != mLooper ) {\n\t\t\tmLooper.quit();\n\t\t\tmLooper = null;\n\t\t\tmThread = null;\n\t\t}\n\t}",
"public void run() {\n\t\t\t\t\tif (currentViewer != null) {\r\n\t\t\t\t\t\tcurrentViewer.setSelection(new StructuredSelection(\r\n\t\t\t\t\t\t\t\ttheSelection.toArray()), true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"@Override\r\n\tpublic void dispose() {\n\t\tif ( disposed ) { return; }\r\n\t\tif ( getOutput() != null ) {\r\n\t\t\tgetOutput().getData().removeListener(this);\r\n\t\t}\r\n\t\tdisposed = true;\r\n\t\tif ( surfaceComposite != null ) {\r\n\t\t\tsurfaceComposite.dispose();\r\n\t\t}\r\n\t\tIDisplaySurface s = getDisplaySurface();\r\n\t\tif ( s != null ) {\r\n\t\t\treleaseLock();\r\n\t\t}\r\n\t\tif ( updateThread != null ) {\r\n\t\t\tupdateThread.interrupt();\r\n\t\t}\r\n\r\n\t\tif ( perspectiveListener != null ) {\r\n\t\t\tSwtGui.getWindow().removePerspectiveListener(perspectiveListener);\r\n\t\t}\r\n\t\t// FIXME Remove the listeners\r\n\r\n\t\tif ( overlay != null ) {\r\n\t\t\toverlay.close();\r\n\t\t}\r\n\t\tsuper.dispose();\r\n\t}",
"public void dispose() {\n thread.interrupt();\n }",
"@Override\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\tactivity.updateCameraToolbar();\n\t\t\t}",
"public void finish() {\n System.out.println(name + \": Call explicit destroy()\");\n }",
"@Override\n protected void finalize() throws Throwable {\n super.finalize();\n t.stop();\n }",
"@Override\n public void run() {\n refreshLayout.finishRefresh();\n }",
"protected void finalize () throws Throwable\n\t{\n\t\tcheckforLogout(true);\n\t\tscheduledExecutorService.shutdown();\n\t}",
"private static void releaseCameraAndPreview() {\n if (cam != null) {\n cam.release();\n cam = null;\n }\n }",
"protected void doPostAlgorithmActions() {\r\n\r\n if (displayLoc == NEW) {\r\n AlgorithmParameters.storeImageInRunner(getResultImage());\r\n }\r\n }",
"public void finalize()\r\n\t{\n\t}",
"private void postAnimationCallback() {\n this.mChoreographer.postCallback(1, this.mAnimationCallback, null);\n }",
"protected void synchronizationDone() {\n }",
"public void finished() {\r\n\t\t// Mark ourselves as finished.\r\n\t\tif (finished) { return; }\r\n\t\tfinished = true;\r\n\t\tif (ic != null) {\r\n\t\t\tjvr.removeEventListener(ic);\r\n\t\t\ttry {\r\n\t\t\t\tdx.stopch(dxdev,dx.EV_ASYNC);\r\n\t\t\t}\r\n\t\t\tcatch (JVRException e) { logger.throwing(getClass().getName(),\"finished\",e); }\r\n\t\t}\r\n\t\t// Notify any \"waiters\" that we are done.\r\n\t\tsynchronized (this) { notifyAll(); }\r\n\t\t// Fire an event for asynchronous JVR event listeners.\r\n\t\tnew JVREvent(this,\"finished\").fire();\r\n\t\t// For debugging only.\r\n\t\t// logger.info(\"(FINISHED)\\n\" + this);\r\n\t}",
"@Override\r\n\tpublic void disposeView() {\n\t\t\r\n\t}",
"public void finalize() {\r\n byteBuffer2 = null;\r\n byteBuffer4 = null;\r\n byteBuffer8 = null;\r\n progressBar = null;\r\n tagBuffer = null;\r\n\r\n if (raFile != null) {\r\n\r\n try {\r\n raFile.close();\r\n } catch (final IOException ioe) {\r\n // Do nothing\r\n }\r\n }\r\n\r\n raFile = null;\r\n }",
"void innerFinish() {\r\n\t\t\t\t\t\tobserver.finish();\r\n\t\t\t\t\t\tclose();\r\n\t\t\t\t\t}",
"@Override\n public void run() {\n Mat frame = grabFrame();\n // convert and show the frame\n Image imageToShow = FXDIPUtils.mat2Image(frame);\n updateImageView(getCurrentFrame(), imageToShow);\n }",
"public void exitAfterTransfers() {\n /*\n * Note: on Windows, this is called from the Windows system tray\n * handler thread (created in the Windows DLL), and not from the\n * Swing Event handler thread. It is unsafe to call\n * GUIMediator.shutdownAfterTransfers();\n * directly as Swing is not synchronized!\n * Instead, we should create an AWT Event and post it to the\n * default Toookit's EventQueue, and the application should\n * implement a Listener for that Event.\n */\n SwingUtilities.invokeLater(\n new Runnable() {\n public void run() {\n GUIMediator.shutdownAfterTransfers();\n }\n });\n }",
"void testFinished() {\n currentThreads.decrementAndGet();\n thread.interrupt();\n }",
"protected void makeThreadObjectFinish() {\n\t\ttry {\n\t\t\tif (syncCommands != null) {\n\t\t\t\tsyncCommands.join();\n\t\t\t}\n\t\t} catch (Exception e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t}",
"@Override\r\n public void run() {\n Mat frame = grabFrame();\r\n\r\n//\t\t\t\t\t\t// convert and show the frame\r\n//\t\t\t\t\t\tImage imageToShow = Utils.mat2Image(frame);\r\n//\t\t\t\t\t\tupdateImageView(currentFrame, imageToShow);\r\n }",
"public void finalize() {\r\n destImage = null;\r\n srcImage = null;\r\n sliceBuffer = null;\r\n super.finalize();\r\n }",
"@Override\n\tpublic void uploadToGeoGebraTubeOnCallback() {\n\n\t\tif (!isEuclidianView3Dinited()) {\n\t\t\tuploadToGeoGebraTube();\n\t\t\treturn;\n\t\t}\n\n\t\tEuclidianView3D ev3D = getEuclidianView3D();\n\n\t\tif (ev3D.isShowing()) {\n\t\t\tev3D.getRenderer().uploadToGeoGebraTube();\n\t\t} else {\n\t\t\tuploadToGeoGebraTube();\n\t\t}\n\n\t}",
"public void run() {\n thread.interrupt();\n System.out.println(\"Cancelled Admin Viewer startup\");\n }",
"void complete() {\n try {\n try {\n subscriber.onComplete();\n } catch (Throwable e) {\n Exceptions.handleUncaught(Conformance.onCompleteThrew(e));\n }\n } finally {\n // no need to remove ourselves from psm.\n terminate();\n }\n }",
"public void run() {\n\t\t\t\t\t\tif (!compositeUnderDisplay.isDisposed()) {\n\t\t\t\t\t\t\tfinal DeviceUI ui = (DeviceUI) compositeUnderDisplay;\n\t\t\t\t\t\t\tui.updateTimers(deviceUnderDisplay, kind, duration);\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"@Override\r\n public void run() {\n currentHud.setReceivedPictureScreen();\r\n }",
"public synchronized void showPage() {\n final ShowPageImage viewer = new ShowPageImage();\n\n if (SwingUtilities.isEventDispatchThread()) {\n viewer.run();\n } else {\n SwingUtilities.invokeLater(viewer);\n }\n }",
"@Override\n public void surfaceDestroyed(SurfaceHolder holder) {\n boolean retry = true;\n int count = 0;\n while (retry && (count < 1000)) {\n count++;\n try {\n thread.setRunning(false);\n thread.join();\n retry = false;\n thread = null; //deletes thread if stopped\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }",
"private void update() {\n\t\tif (needsPreview) return; // gonna happen soon anyway\n\n\t\tTask<Image> task = new Task<Image>() {\n\t\t\t@Override\n\t\t\tprotected Image call() {\n\t\t\t\treturn plotter.get().getOutput();\n\t\t\t}\n\t\t};\n\t\ttask.setOnSucceeded(event -> showImg(task.getValue()));\n\n\t\tThread th = new Thread(task);\n\t\tth.setDaemon(true);\n\t\tth.start();\n\n\t}",
"protected void finalize()\n {\n dispose();\n }",
"public void run() {\n\n if(progressDialog.isShowing()) {\n progressDialog.dismiss();\n }\n searchView.clearFocus();\n imageButtonBack.clearFocus();\n// getCurrentFocus().clearFocus();\n listStoryRecycle.setVisibility(View.VISIBLE);\n }",
"public void finalize() {\r\n\t\tdestImage = null;\r\n\t\tsrcImage = null;\r\n\t\tsuper.finalize();\r\n\t}",
"public void run() {\n progressDialog.dismiss();\n }",
"public void run() {\n progressDialog.dismiss();\n }",
"private void cleanupResources() {\n Log.d(TAG, \"Initiating resource cleanup\");\n if (mWorkerThread != null) {\n mWorkerThread.quitSafely();\n try {\n mWorkerThread.join();\n mWorkerThread = null;\n } catch (InterruptedException e) {\n Log.e(TAG, \"Failed to join on mWorkerThread\");\n }\n }\n //mListener = null;//Release later when being finalized\n mDisplayHandler = null;\n mERDHandler = null;\n mContext = null;\n surface = null;\n mIface = null;\n mLocalWfdDevice = null;\n mPeerWfdDevice = null;\n mActionListener = null;\n Log.d(TAG, \"Done with resource cleanup\");\n }",
"@Override\n public void run() {\n try {\n remove_elements();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }"
] |
[
"0.78353196",
"0.6932461",
"0.59849495",
"0.59690243",
"0.59257287",
"0.5898201",
"0.5765348",
"0.5724411",
"0.5677855",
"0.56747884",
"0.56508553",
"0.5644942",
"0.56441265",
"0.56426555",
"0.55833673",
"0.55633074",
"0.5554158",
"0.5546331",
"0.54930496",
"0.54883265",
"0.54331553",
"0.53922486",
"0.53780115",
"0.5376167",
"0.5321913",
"0.53013337",
"0.5296486",
"0.5281076",
"0.5278716",
"0.52739465",
"0.52590364",
"0.5258063",
"0.5250735",
"0.5248286",
"0.5238862",
"0.52356976",
"0.522536",
"0.5224399",
"0.52106756",
"0.5202757",
"0.5201335",
"0.5192838",
"0.51814586",
"0.51808196",
"0.51756907",
"0.5156262",
"0.5155534",
"0.5113199",
"0.5111459",
"0.5106173",
"0.51045746",
"0.5090861",
"0.5090396",
"0.50903785",
"0.5073946",
"0.5073919",
"0.50721633",
"0.5071702",
"0.5070178",
"0.5058605",
"0.50462794",
"0.5039253",
"0.5027055",
"0.50254357",
"0.5007246",
"0.5006481",
"0.4992945",
"0.49893758",
"0.49844986",
"0.49814177",
"0.49769682",
"0.4970889",
"0.49683118",
"0.49672803",
"0.4955241",
"0.49530244",
"0.49512565",
"0.49507943",
"0.494617",
"0.49452057",
"0.49436498",
"0.49433887",
"0.4942236",
"0.49412578",
"0.49382368",
"0.49354643",
"0.49314734",
"0.4929672",
"0.49214983",
"0.49189806",
"0.49127367",
"0.49094865",
"0.4907674",
"0.49050337",
"0.49002028",
"0.4899787",
"0.48997372",
"0.48997372",
"0.4891763",
"0.4889968"
] |
0.6632297
|
2
|
Initialize viewer and invoke initViewer() method of subclassed viewer. This method will be performed during the GUI Event thread, so the Viewer can initialize it's GUI components. IViewer can be embedded as follows: Standalone in a JScrollPane in a JFrame Standalone in a JFrame. Embedded in JScrollPane in the VBrowsers multitab panel. Embedded in the VBrowser's multitab panel.
|
final void initViewer()
{
if (viewer.getViewContext().getStartInStandaloneWindow() == true)
{
JFrame frame=null;
// JFrame
{
frame = new JFrame();
frame.setSize(new Dimension(800, 600));
GuiSettings.placeToCenter(frame);
}
if (viewer.haveOwnScrollPane() == false)
{
// embed viewer in scrollPane
JScrollPane scrollPane = new JScrollPane();
scrollPane.setViewportView(viewer.getViewComponent());
frame.add(scrollPane);
}
else
{
frame.add(viewer.getViewComponent());
}
// Viewer
// viewer.setFrame(frame);
viewer.initViewer();
ViewerFrameListener listener = new ViewerFrameListener(frame,this);
frame.addWindowListener(listener);
frame.addComponentListener(listener);
frame.pack();
frame.setVisible(true);
// viewer.setFrame(frame);
}
else
{
viewer.initViewer();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static void createAndShowGUI()\r\n {\r\n JFrame f = new JFrame(\"Viewer\");\r\n f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n f.getContentPane().setLayout(new BorderLayout());\r\n \r\n JLabel usageLabel = new JLabel(\"<html>\"\r\n + \"Right mouse drags: Translate<br> \"\r\n + \"Left mouse drags: Create selection shape<br>\"\r\n + \" +shift: remove from selection<br>\"\r\n + \" +ctrl: add to selection<br>\"\r\n + \"Left mouse clicks: Select single<br>\"\r\n + \" +ctrl: toggle single selection<br>\"\r\n + \"Mouse wheel: Zoom uniformly<br>\"\r\n + \" +shift: zoom along x<br>\"\r\n + \" +ctrl: zoom along y<br>\"\r\n + \"</html>\");\r\n f.getContentPane().add(usageLabel, BorderLayout.NORTH);\r\n \r\n // Create a viewer, with mouse controls where the rotation is\r\n // disabled (left clicks are intended for the selection here)\r\n Viewer viewer = new Viewer();\r\n viewer.setMouseControl(\r\n MouseControls.createDefault(viewer, false, true));\r\n \r\n // Create the selection model\r\n SelectionModel<Point2D> selectionModel = SelectionModels.create();\r\n selectionModel.addSelectionListener(\r\n new LoggingSelectionListener<Point2D>());\r\n\r\n // Create the painter for the test\r\n ViewerSelectionTestPainter viewerSelectionTestPainter = \r\n new ViewerSelectionTestPainter(selectionModel::isSelected);\r\n \r\n // The painter also serves as the point- and shape based selector.\r\n // Make this clear by assigning it to respective variables\r\n PointBasedSelector<Point2D> pointBasedSelector = \r\n viewerSelectionTestPainter;\r\n ShapeBasedSelector<Point2D> shapeBasedSelector = \r\n viewerSelectionTestPainter;\r\n\r\n // Create a selection handler for clicks, and use it to connect\r\n // the viewer and the selection model\r\n SelectionHandler<Point2D> clickSelectionHandler = \r\n SelectionHandlers.createClick(pointBasedSelector);\r\n clickSelectionHandler.connect(viewer, selectionModel);\r\n \r\n // Create a selection handler for a lasso selection, and use it to \r\n // connect the viewer and the selection model\r\n SelectionHandler<Point2D> lassoSelectionHandler = \r\n SelectionHandlers.createLasso(shapeBasedSelector);\r\n lassoSelectionHandler.connect(viewer, selectionModel);\r\n\r\n // Create a selection handler for rectangles, which can be enabled\r\n // via the config panel\r\n SelectionHandler<Point2D> rectangleSelectionHandler = \r\n SelectionHandlers.createRectangle(shapeBasedSelector);\r\n \r\n viewer.addPainter(\r\n viewerSelectionTestPainter);\r\n f.getContentPane().add(viewer, BorderLayout.CENTER);\r\n\r\n JPanel configPanel = createConfigPanel(viewer, selectionModel, \r\n lassoSelectionHandler, rectangleSelectionHandler);\r\n f.getContentPane().add(configPanel, BorderLayout.EAST);\r\n\r\n JLabel infoLabel = new JLabel(\" \");\r\n f.getContentPane().add(infoLabel, BorderLayout.SOUTH);\r\n \r\n viewer.setPreferredSize(new Dimension(500,500));\r\n f.pack();\r\n viewer.setPreferredSize(null);\r\n f.setLocationRelativeTo(null);\r\n f.setVisible(true);\r\n \r\n viewer.setDisplayedWorldArea(-0.1, -0.1, 1.2, 1.2);\r\n }",
"private void initView() {\r\n\t\tviewerGraz.refresh(true);\r\n\t\tviewerGraz.refresh(true);\r\n\t\tviewerKapfenberg.refresh(true);\r\n\t\tviewerLeoben.refresh(true);\r\n\t\tviewerMariazell.refresh(true);\r\n\t\tviewerWien.refresh(true);\r\n\t}",
"protected AbstractViewer() {\n this.log = Logger.getLogger(this.getClass());\n }",
"public void setViewer(Composite viewer) {\n\t\tZoomManager manager = (ZoomManager)viewer.getData(\"ZoomManager\");\n\t\tif (manager != null) {\n\t\t\tsetFigure(manager.getViewport(), viewer);\n\t\t}\n\t}",
"@Override\n public void run() {\n\n GLMouseListener mouse = viewer.getMouseHandler();\n if (mouse instanceof GLMouseAdapter) {\n ((GLMouseAdapter)mouse).setLaptopConfig();\n }\n \n viewer.addSelectionListener(new SimpleSelectionHandler(renderables));\n\n // Create a animator that drives canvas' display() at the specified FPS.\n final FPSAnimator animator;\n final FPSMonitor fpsMonitor;\n \n if (MultiViewer.doFPS) {\n animator = new FPSAnimator(viewer.getCanvas().getDrawable(), FPS, true);\n animator.setUpdateFPSFrames(3, null);\n animator.start();\n fpsMonitor = new FPSMonitor(title + \" FPS: \", animator);\n new Thread(fpsMonitor).start();\n } else {\n animator = null;\n fpsMonitor = null;\n }\n \n // Create the top-level container\n frame = new JFrame(); // Swing's JFrame or AWT's Frame\n frame.add(viewer.getCanvas().getComponent());\n\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n // Use a dedicate thread to run the stop() to ensure that the\n // animator stops before program exits.\n new Thread() {\n @Override\n public void run() {\n \n if (animator != null && animator.isStarted()) {\n animator.stop();\n }\n if (fpsMonitor != null) { \n fpsMonitor.stop();\n }\n \n try {\n SwingUtilities.invokeAndWait (new Runnable() {\n @Override\n public void run () {\n viewer.dispose ();\n }\n });\n }\n catch (InvocationTargetException e) {\n }\n catch (InterruptedException e) {\n }\n \n closed = true;\n }\n }.start();\n }\n });\n frame.setTitle(title);\n // frame.pack();\n frame.setVisible(true);\n // animator.start(); // start the animation loop\n }",
"public ClientViewerComponent()\n {\n super();\n\n setName(COMPONENT_NAME());\n addClassName(\"client-viewer\");\n setHTMLElement(HTMLElement.section);\n }",
"public DataViewerImpl() {\n\t\tsuper();\n\t}",
"public void init(){\r\n\t\t\r\n\t\ttry {\r\n\t\t\tSwingUtilities.invokeAndWait(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tbuildWindow();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.err.println(\"createGUI didn't complete successfully\");\r\n\t\t}\r\n\t}",
"public interface Viewer {\n\n\t/**\n\t * Update DataViewer Configuration.\n\t * \n\t * @param config\n\t * DataViewerConfiguration\n\t */\n\tvoid updateConfiguration(DataViewerConfiguration config);\n\n\t/**\n\t * Updates plot data.\n\t * \n\t * @param plotData\n\t * the PlotData\n\t * \n\t */\n\tvoid updatePlot(PlotData plotData);\n\n\t/**\n\t * Removes all the traces from the DataViewer.\n\t */\n\tvoid resetPlot();\n\n\t/**\n\t * Get the Unique ID of the created DataViewer.\n\t */\n\tString getUniqueID();\n\n\t/**\n\t * Get the URL of the DataViewer.\n\t */\n\tString getUrl();\n\n}",
"public void init()\n {\n buildUI(getContentPane());\n }",
"public void setViewer(int viewer) {\n this.viewer = viewer;\n }",
"public abstract void initUiAndListener();",
"public void init()\n\t{\n\t\ttry\n\t\t{\n\t\t\tjavax.swing.SwingUtilities.invokeAndWait(new Runnable()\n\t\t\t{\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tcreateGUI();\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tSystem.err.println(\"createGUI didn't successfully complete: \"\n\t\t\t\t\t+ e.toString());\n\t\t}\n\t}",
"@Override\r\n\tpublic void run() {\n\t\tshowViewer();\r\n\t}",
"public void init() {\n try {\n java.awt.EventQueue.invokeAndWait(new Runnable() {\n public void run() {\n initComponents();\n }\n });\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"private void initWebView(){ \r\n WebEngine webEngine = viewerPane.getEngine();\r\n webEngine.load(\"http://www.google.com\");\r\n }",
"public void init() {\n //Execute a job on the event-dispatching thread; creating this applet's GUI.\n setSize(500, 150);\n \ttry {\n SwingUtilities.invokeAndWait(new Runnable() {\n public void run() {\n createGUI();\n }\n });\n } catch (Exception e) { \n System.err.println(\"createGUI didn't complete successfully\");\n }\n \n }",
"protected abstract StructuredViewer createViewer(Shell shell);",
"public PhotoViewerGUI() {\r\n initComponents();\r\n }",
"protected StructuredViewer createViewer(Composite parent) {\n \t\tfilteredTree = new DeferredFetchFilteredTree(parent, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER, filter, menuProvider, parent.getDisplay());\n \t\tfinal TreeViewer availableIUViewer = filteredTree.getViewer();\n \n \t\tlabelProvider = new IUDetailsLabelProvider(filteredTree, columnConfig, getShell());\n \t\tlabelProvider.setUseBoldFontForFilteredItems(useBold);\n \t\tlabelProvider.setToolTipProperty(IInstallableUnit.PROP_DESCRIPTION);\n \n \t\t// Filters and sorters before establishing content, so we don't refresh unnecessarily.\n \t\tavailableIUViewer.setComparator(new IUComparator(IUComparator.IU_NAME));\n \t\tavailableIUViewer.setComparer(new ProvElementComparer());\n \n \t\t// Now the content provider.\n \t\tDeferredQueryContentProvider contentProvider = new DeferredQueryContentProvider(getQueryProvider());\n \t\tavailableIUViewer.setContentProvider(contentProvider);\n \n \t\t// Now the presentation, columns before label provider.\n \t\tsetTreeColumns(availableIUViewer.getTree());\n \t\tavailableIUViewer.setLabelProvider(labelProvider);\n \n \t\t// Notify the filtered tree so that it can hook listeners on the\n \t\t// content provider. This is needed so that filtering is only allowed\n \t\t// after content has been retrieved.\n \t\tfilteredTree.contentProviderSet(contentProvider);\n \n \t\t// Input last.\n \t\tavailableIUViewer.setInput(getNewInput());\n \n \t\tfinal StructuredViewerProvisioningListener listener = new StructuredViewerProvisioningListener(availableIUViewer, StructuredViewerProvisioningListener.PROV_EVENT_METADATA_REPOSITORY, getQueryProvider()) {\n \t\t\tprotected void repositoryAdded(final RepositoryEvent event) {\n \t\t\t\tif (ignoreEvent) {\n \t\t\t\t\tignoreEvent = false;\n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t\tmakeRepositoryVisible(event.getRepositoryLocation());\n \t\t\t}\n \n \t\t\tprotected void repositoryDiscovered(RepositoryEvent event) {\n \t\t\t\tignoreEvent = true;\n \t\t\t}\n \t\t};\n \t\tProvUIActivator.getDefault().addProvisioningListener(listener);\n \n \t\tavailableIUViewer.getControl().addDisposeListener(new DisposeListener() {\n \t\t\tpublic void widgetDisposed(DisposeEvent e) {\n \t\t\t\tProvUIActivator.getDefault().removeProvisioningListener(listener);\n \t\t\t}\n \t\t});\n \t\treturn availableIUViewer;\n \t}",
"public void loadRoomViewerUI()\r\n\t{\r\n\t\t// start the loader thread so the graphics can be drawn as the loading takes place\r\n\t\tnew RoomViewerLoadingThread(roomViewerUI).start();\r\n\t}",
"private void initComponents(String channel) {\n searchBar = new JTextField();\n scrollPane = new JScrollPane();\n viewerTree = new JTree();\n\n //======== this ========\n setTitle(\"Viewers\");\n setIconImage(new ImageIcon(getClass().getResource(\"/image/icon.png\")).getImage());\n setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n setResizable(true);\n Container contentPane = getContentPane();\n\n //---- searchBar ----\n searchBar.addKeyListener(new KeyAdapter() {\n @Override\n public void keyReleased(KeyEvent e) {\n String text = searchBar.getText();\n if (text != null) {\n text = text.trim();\n if (text.length() > 0) {\n if (!isFiltering) {\n isFiltering = true;\n }\n buildFilteredModel(text);\n } else {\n isFiltering = false;\n setViewerTreeModel(defaultModel);\n }\n } else {\n isFiltering = false;\n setViewerTreeModel(defaultModel);\n }\n }\n });\n\n //======== scrollPane2 ========\n {\n //---- viewerTree ---\n default_root = new DefaultMutableTreeNode(channel);\n defaultModel = new DefaultTreeModel(default_root);\n filtered_root = new DefaultMutableTreeNode(channel);\n viewerTree.setShowsRootHandles(true);\n staff = new DefaultMutableTreeNode(\"Staff\");\n admins = new DefaultMutableTreeNode(\"Admins\");\n global_mods = new DefaultMutableTreeNode(\"Global Moderators\");\n mods = new DefaultMutableTreeNode(\"Moderators\");\n viewers = new DefaultMutableTreeNode(\"Viewers\");\n setViewerTreeModel(defaultModel);\n viewerTree.addMouseListener(new MouseAdapter() {\n @Override\n public void mouseReleased(MouseEvent e) {\n if (e.isPopupTrigger()) {\n TreePath selPath = viewerTree.getPathForLocation(e.getX(), e.getY());\n if (selPath != null && selPath.getPathCount() == 3) {\n //should be a name\n DefaultMutableTreeNode nameNode = (DefaultMutableTreeNode) selPath.getLastPathComponent();\n ListenerName.createUserPopup(channel, nameNode.getUserObject().toString(), viewerTree, e.getX(), e.getY());\n }\n }\n }\n });\n scrollPane.setViewportView(viewerTree);\n }\n setMinimumSize(new Dimension(250, 490));\n GroupLayout contentPaneLayout = new GroupLayout(contentPane);\n contentPane.setLayout(contentPaneLayout);\n contentPaneLayout.setHorizontalGroup(\n contentPaneLayout.createParallelGroup()\n .addComponent(searchBar, GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)\n .addComponent(scrollPane, GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)\n );\n contentPaneLayout.setVerticalGroup(\n contentPaneLayout.createParallelGroup()\n .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup()\n .addComponent(searchBar, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(scrollPane, GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE))\n );\n addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n GUIMain.viewerLists.remove(channel);\n }\n });\n pack();\n setLocationRelativeTo(getOwner());\n // JFormDesigner - End of component initialization //GEN-END:initComponents\n }",
"private void initialize() {\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setSize(300, 200);\n\t\tthis.add(getJScrollPane(), java.awt.BorderLayout.CENTER);\n\t}",
"private void initComponents() {\n\t\tfiltersPanel = new FiltersPanel(mainView);\n\t\tdetailsPanel = new DetailsPanel();\n\t\t\n\t\tthis.setStylePrimaryName(\"variantdisplay\");\n\t\tthis.addWest(filtersPanel, 240);\n\n\t\tvarTable = new VarTable(this, colModel);\n\n\t\t\n\t\t//details panel listens to variant selection events generated by the varTable\n\t\tvarTable.addVariantSelectionListener(detailsPanel); \n\t\tvarManager.addListener(this);\n\t\tcolModel.addListener(this);\n\t\tfiltersPanel.addListener(this);\n\t\t\n\t\tthis.addSouth(detailsPanel, 300.0);\n\t\tthis.add(varTable);\n\t}",
"@Override\n\tpublic void init() {\n\t\tSystem.out.println(\"Initializing Tetris...\");\n\t //Execute a job on the event-dispatching thread\n\t try {\n\t SwingUtilities.invokeAndWait(new Runnable() {\n\t public void run() {\n\t createUI();\n\t }\n\t });\n\t } catch (Exception e) {\n\t System.err.println(\"Error creating UI\");\n\t \te.printStackTrace();\n\t }\n\t}",
"private void init() {\n initView();\n setListener();\n }",
"private void createViewer(Composite parent)\r\n {\n\t\r\n\tviewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER);\r\n\tfinal Table table = viewer.getTable();\r\n\ttable.setHeaderVisible(true);\r\n\ttable.setLinesVisible(true);\r\n\r\n\tviewer.setContentProvider(new ArrayContentProvider());\r\n\r\n\tviewer.setInput(manager.getServerContacts());\r\n\r\n\tgetSite().setSelectionProvider(viewer);\r\n\r\n\tviewerLayout();\r\n }",
"private void initView() {\n TIMManager.getInstance().addMessageListener(this);\n initAdapter();\n initRefresh();\n }",
"public void init(IViewPart arg0) {\n\n\t}",
"protected SourceViewer createViewer(Composite parent) {\n \t\tSourceViewer viewer= new SourceViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);\n \t\tSourceViewerConfiguration configuration= new SourceViewerConfiguration();\n \t\tviewer.configure(configuration);\n \t\tIDocument document= new Document();\n \t\tviewer.setDocument(document);\n \t\treturn viewer;\n \t}",
"private void $$$setupUI$$$() {\n\t\tpanel_overview = new JPanel();\n\t\tpanel_overview.setLayout(new BorderLayout(0, 0));\n\t\twebView = new WebbrowserPanel();\n\t\tpanel_overview.add(webView, BorderLayout.CENTER);\n\t}",
"public Browser()\n\t{\n\t\tinitComponents();\n\t\tlibraryViewer1.setThumbnail(thumbnails1);\n\t\t\n\t\ttimer = new Timer();\n timer.schedule(new CheckFilesTask(libraryViewer1), 5000, 5000);\n\t}",
"protected abstract void initView();",
"@Override\n public void init() // set up GUI\n {\n setLayout(new FlowLayout());\n\n customerView = new CustomerView(); // initialize customerView\n \n add(customerView); // add customerView to the GUI\n }",
"public void loadAndPopulateViewer(final ActionLink viewerLink) throws Exception {\n final WindowViewer w = Platform.getWindowViewer();\n final FunctionCallbackWaiter waiter = new FunctionCallbackWaiter();\n\n w.createViewer(viewerLink, waiter.createCallback(VIEWER_CALLBACK_ID));\n load(waiter.createCallback(DOCUMENT_CALLBACK_ID));\n\n iFunctionCallback cb = new iFunctionCallback() {\n @Override\n public void finished(boolean canceled, Object returnValue) {\n try {\n ObjectHolder h = (ObjectHolder) returnValue;\n HashMap<Object, CallbackResult> resultsMap = (HashMap<Object, CallbackResult>) h.value;\n CallbackResult vr = resultsMap.get(VIEWER_CALLBACK_ID);\n CallbackResult dr = resultsMap.get(DOCUMENT_CALLBACK_ID);\n\n if (vr.resultIsError()) {\n Utils.handleError((Throwable) vr.getReturnValue());\n\n return;\n }\n\n if (dr.resultIsError()) {\n Utils.handleError((Throwable) dr.getReturnValue());\n\n return;\n }\n\n iContainer v = (iContainer) vr.getContent();\n\n populateViewer(v);\n\n String target = viewerLink.getTargetName();\n\n if (target == null) {\n target = iTarget.TARGET_WORKSPACE;\n }\n\n if (iTarget.TARGET_WORKSPACE.equals(target)) {\n Utils.pushWorkspaceViewer(v);\n } else {\n w.activateViewer(v, target);\n }\n } finally {\n w.hideWaitCursor();\n }\n }\n };\n\n w.showWaitCursor();\n waiter.startWaiting(cb);\n }",
"private void initialize() {\r\n\t\tthis.setSize(733, 427);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"jProxyChecker\");\r\n\t}",
"public ClerkViewer() {\n\n initComponents();\n setLocationRelativeTo(null);\n try {\n // create the central DAO\n dbConnector = new DbConnector();\n // make a DAO for Clerk class by sending in the DB Connection from dbConnector\n clerkDAO = new ClerkDAO(dbConnector.getMyConn());\n\n } catch (IOException | SQLException ex) {\n JOptionPane.showMessageDialog(ClerkViewer.this, \"Error: \" + ex, \"Error\", JOptionPane.ERROR_MESSAGE);\n } catch (Exception ex) {\n Logger.getLogger(ClerkViewer.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n\n }",
"private void init() {\n //set view to presenter\n presenter.setView(this, service);\n\n setupView();\n }",
"private void initialize() throws IOException{\r\n\t\tthis.setVisible(true);\r\n\t\tthis.setSize(400,300);\r\n\r\n\t\tthis.getContentPane().add(getScrollPane());\r\n\t\tthis.setAutoscrolls(true);\r\n\t\tthis.addMouseListener(new java.awt.event.MouseAdapter() { \r\n\t\t\tpublic void mouseExited(java.awt.event.MouseEvent e) { \r\n\t\t\t\t// System.out.println(\"mouseExited()\"); // TODO Auto-generated Event stub mouseExited()\r\n\t\t\t\teditor.repaint();\r\n\t\t\t} \r\n\t\t\tpublic void mouseEntered(java.awt.event.MouseEvent e) { \r\n\t\t\t\t// System.out.println(\"mouseEntered()\"); // TODO Auto-generated Event stub mouseEntered()\r\n\t\t\t\teditor.repaint();\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.addInternalFrameListener(new javax.swing.event.InternalFrameAdapter() { \r\n\t\t\tpublic void internalFrameActivated(javax.swing.event.InternalFrameEvent e) { \r\n\t\t\t\t// System.out.println(\"internalFrameActivated()\"); // TODO Auto-generated Event stub internalFrameActivated()\r\n\t\t\t\tactualizaScreen();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public abstract void initView();",
"private void init () {\n\t\tSwingUtilities.invokeLater(new Runnable() {\n public void run() {\n \tSwingOperatorView.stateOnCurrentObject();\n }\n\t\t});\n\t}",
"private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 800, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel browserPanel = new JPanel();\n\t\tframe.getContentPane().add(browserPanel, BorderLayout.CENTER);\n\t\t\n\t\t// create javafx panel for browser\n browserFxPanel = new JFXPanel();\n browserPanel.add(browserFxPanel);\n \n // create JavaFX scene\n Platform.runLater(new Runnable() {\n public void run() {\n createScene();\n }\n });\n\t}",
"public void populateViewer(iContainer fv) {\n fv.setLinkedData(this);\n populateViewer(fv, mainDocument);\n\n WindowViewer w = Platform.getWindowViewer();\n CollapsiblePaneViewer cpv = (CollapsiblePaneViewer) fv.getWidget(\"attachments\");\n\n if (cpv != null) {\n TableViewer table = (TableViewer) cpv.getWidget();\n\n table.clear();\n if(table.getActionListener()==null) {\n iActionListener al = new AttachmentActionListener();\n table.setActionListener(al);\n }\n\n int len = getAttachmentCount();\n\n cpv.getTarget().setVisible(len > 0);\n\n if (len > 0) {\n cpv.setTitleText(w.getString(\"bv.format.attachments_spec\", StringCache.valueOf(len)));\n // we can change this because we have already populated the form\n mainDocument.rowData.get(1).setValue(w.getString(\"bv.text.master_document\"));\n\n boolean hasDate = false;\n\n for (int i = 0; i < len; i++) {\n DocumentItem item = docAttachments.get(i);\n\n if (item.rowData != null) {\n table.addEx(item.rowData);\n\n if (item.hasDate()) {\n hasDate = true;\n }\n }\n }\n\n if (UIScreen.isMediumDensity()) {\n table.addEx(mainDocument.rowData);\n }\n\n table.setColumnVisible(2, hasDate);\n table.refreshItems();\n if(hasDate) {\n table.sort(2, true);\n }\n }\n }\n }",
"public void setCurrentViewer(Viewer viewer) {\r\n\t\t// If it is changing...\r\n\t\t//\r\n\t\tif (currentViewer != viewer) {\r\n\t\t\tif (selectionChangedListener == null) {\r\n\t\t\t\t// Create the listener on demand.\r\n\t\t\t\t//\r\n\t\t\t\tselectionChangedListener = new ISelectionChangedListener() {\r\n\t\t\t\t\t// This just notifies those things that are affected by the\r\n\t\t\t\t\t// section.\r\n\t\t\t\t\t//\r\n\t\t\t\t\tpublic void selectionChanged(\r\n\t\t\t\t\t\t\tSelectionChangedEvent selectionChangedEvent) {\r\n\t\t\t\t\t\tsetSelection(selectionChangedEvent.getSelection());\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\t// Stop listening to the old one.\r\n\t\t\t//\r\n\t\t\tif (currentViewer != null) {\r\n\t\t\t\tcurrentViewer\r\n\t\t\t\t\t\t.removeSelectionChangedListener(selectionChangedListener);\r\n\t\t\t}\r\n\r\n\t\t\t// Start listening to the new one.\r\n\t\t\t//\r\n\t\t\tif (viewer != null) {\r\n\t\t\t\tviewer.addSelectionChangedListener(selectionChangedListener);\r\n\t\t\t}\r\n\r\n\t\t\t// Remember it.\r\n\t\t\t//\r\n\t\t\tcurrentViewer = viewer;\r\n\r\n\t\t\t// Set the editors selection based on the current viewer's\r\n\t\t\t// selection.\r\n\t\t\t//\r\n\t\t\tsetSelection(currentViewer == null ? StructuredSelection.EMPTY\r\n\t\t\t\t\t: currentViewer.getSelection());\r\n\t\t}\r\n\t}",
"public MainFrame() {\n initComponents();\n\n mAlmondUI.addWindowWatcher(this);\n mAlmondUI.initoptions();\n\n initActions();\n init();\n\n if (IS_MAC) {\n initMac();\n }\n\n initMenus();\n mActionManager.setEnabledDocumentActions(false);\n }",
"@Override\n\tpublic void init() {\n\t\tGraph<Number,Number> ig = Graphs.<Number,Number>synchronizedDirectedGraph(new DirectedSparseMultigraph<Number,Number>());\n\t\tObservableGraph<Number,Number> og = new ObservableGraph<Number,Number>(ig);\n\t\tog.addGraphEventListener(new GraphEventListener<Number,Number>() {\n\n\t\t\tpublic void handleGraphEvent(GraphEvent<Number, Number> evt) {\n\t\t\t\tSystem.err.println(\"got \"+evt);\n\n\t\t\t}});\n\t\tthis.g = og;\n\n\t\tthis.timer = new Timer();\n\t\tthis.layout = new FRLayout2<Number,Number>(g);\n\t\t// ((FRLayout)layout).setMaxIterations(200);\n\t\t// create a simple pickable layout\n\t\tthis.vv = new VisualizationViewer<Number,Number>(layout, new Dimension(600,600));\n\n\n\n\t}",
"private static void createAndShowGUI() {\n\t\t//creating the GUI\n\t\tPhotoViewer myViewer = new PhotoViewer();\n\n\t\t//setting the title\n\t\tmyViewer.setTitle(\"Cameron Chiaramonte (ccc7sej)\");\n\n\t\t//making sure it will close when the x is clicked\n\t\tmyViewer.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t//calling the method to add the components to the pane and then making it visible\n\t\tmyViewer.addComponentsToPane(myViewer.getContentPane());\n\t\tmyViewer.pack();\n\t\tmyViewer.setVisible(true);\n\t}",
"public void initGui() {\r\n\t\tEventQueue.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tGuiWindow window = new GuiWindow(Controller.this);\r\n\t\t\t\t\tlinkedGuiWindow = window;\r\n\t\t\t\t\twindow.setVisible(true);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"private void initializateGUI() {\n\t\t\n\t\t\n\t\tthis.menuBar = buildMenuBar();\n\t\t\n\t\tthis.toolBar = buildToolBar();\n\t\t\n\t\tthis.container = (JComponent) ContainerViewFactory.getInstance().getContainerView(null);\n\t\t\n\t\tthis.status = buildStatusBar();\n\t\t\n\t\tscrollPane = new JScrollPane();\n\t\tscrollPane.getViewport().add(this.container);\n\t\t\n\t\ttextResources.getString(\"application.title\").ifPresent(super::setTitle);\n\n\t\tif (this.menuBar != null) {\n\t\t\tsuper.setJMenuBar(this.menuBar);\n\t\t}\n\t\tsuper.setPreferredSize(MINIMUM_SIZE);\n\t\tsuper.setMinimumSize(MINIMUM_SIZE);\n\t\tsuper.setMaximumSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));\n\n\t\tsuper.getRootPane().setPreferredSize(MINIMUM_SIZE);\n\t\tsuper.getRootPane().setMinimumSize(MINIMUM_SIZE);\t\t\n\t\tsuper.getRootPane().setMaximumSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));\n\t\t\n\t\tsuper.setLayout(new BorderLayout());\n\t\t\n\t\tsuper.add(toolBar, BorderLayout.NORTH);\n\t\tsuper.add(scrollPane, BorderLayout.CENTER);\n\t\tsuper.add(status, BorderLayout.SOUTH);\n\t\t\n\t\tsuper.addWindowListener(new WindowAdapter() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\tinitializationDialog = buildInitializationAction();\n\t\t\t\tinitializationDialog.setVisible(true);\n\t\t\t\tinitializationDialog.toFront();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tconfirmExitAction();\n\t\t\t}\n\t\t});\n\t\tthis.handlerInitializateGUI();\n\t}",
"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}",
"private void initialize() {\r\n\t\tthis.setSize(378, 283);\r\n\t\tthis.setJMenuBar(getMenubar());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JAVIER\");\r\n\t}",
"@Override\n\tpublic void init() {\n\t\tsetMainWindow(new Window(\"Module Demo Application\", tabs));\n\t\ttabs.setSizeFull();\n\t}",
"protected SourceViewer createViewer(Composite parent) {\n \t\t\tSourceViewer viewer= new SourceViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);\n \t\t\tSourceViewerConfiguration configuration= new SourceViewerConfiguration() {\n \t\t\t\tpublic IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {\n \n \t\t\t\t\tContentAssistant assistant= new ContentAssistant();\n \t\t\t\t\tassistant.enableAutoActivation(true);\n \t\t\t\t\tassistant.enableAutoInsert(true);\n \t\t\t\t\tassistant.setContentAssistProcessor(fTemplateProcessor, IDocument.DEFAULT_CONTENT_TYPE);\n \t\t\t\t\treturn assistant;\n \t\t\t\t}\n \t\t\t};\n \t\t\tviewer.configure(configuration);\n \t\t\treturn viewer;\n \t\t}",
"private static void initAndShowGUI() {\n }",
"public ElectionMapWindowHandler(ElectionMapViewer initView)\r\n\t{\r\n\t\tview = initView;\r\n\t}",
"void initView();",
"public void loadAndPopulateViewer(final iContainer fv) {\n final WindowViewer w = Platform.getWindowViewer();\n iFunctionCallback cb = new iFunctionCallback() {\n @Override\n public void finished(boolean canceled, Object returnValue) {\n w.hideWaitCursor();\n\n if (returnValue instanceof Exception) {\n Utils.handleError((Throwable) returnValue);\n } else {\n populateViewer(fv);\n }\n }\n };\n\n w.showWaitCursor();\n load(cb);\n }",
"public Viewer() {\r\n\t\tzoom = DEFAULT_ZOOM;\r\n\t\tisWireframe = false;\r\n\t\tisAxes = true;\r\n\t\tnextRotationAngle = 0;\r\n\t\tnextRotationAxis = null;\r\n\t\trotationMatrix = null;\r\n\t\tscreenWidth = 0;\r\n\t\tscreenHeight = 0;\r\n\t}",
"public void init(MonitorControl control) {\n this.control = control;\n setTitle(\"JMarkets Admin Interface\");\n \n logMonitor = new LoggingMonitor();\n logMonitor.setPreferredSize(relativeSize(0.6f, 0.4f));\n \n topPanel = new JPanel();\n topPanel.setLayout(new BoxLayout(topPanel, BoxLayout.X_AXIS));\n \n constructClientsPanel(10);\n constructButtonPanel();\n constructChartPanel();\n constructInfoPanel();\n constructTitlePanel();\n constructMetricsPanel();\n \n getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));\n \n getContentPane().add(titlePanel);\n getContentPane().add(infoPanel);\n \n topPanel.add(chartPanel);\n topPanel.setPreferredSize(relativeSize(0.85f, 0.42f));\n \n getContentPane().add(topPanel);\n \n JPanel bottomPanel = new JPanel();\n bottomPanel.setLayout(new BoxLayout(bottomPanel, BoxLayout.X_AXIS));\n bottomPanel.add(logMonitor);\n \n JPanel bottomRightPanel = new JPanel();\n bottomRightPanel.setLayout(new BoxLayout(bottomRightPanel, BoxLayout.Y_AXIS));\n bottomRightPanel.add(metricsPanel);\n bottomRightPanel.add(buttonPanel);\n \n bottomPanel.add(bottomRightPanel);\n bottomPanel.setPreferredSize(relativeSize(0.85f, 0.4f));\n \n getContentPane().add(bottomPanel);\n \n pack();\n centerOnScreen();\n setVisible(true);\n }",
"public TreeContextMenuListener(ProjectViewer viewer) {\n this.viewer = viewer;\n loadGUI();\n }",
"protected StructuredViewer createViewer(Composite parent) {\r\n\t\tProblemTreeViewer result= new ProblemTreeViewer(parent, SWT.MULTI);\r\n\t\tfFilterUpdater= new FilterUpdater(result);\r\n\t\tResourcesPlugin.getWorkspace().addResourceChangeListener(fFilterUpdater);\r\n\t\treturn result;\r\n\t}",
"private void initUI() {\n }",
"public void init() {\n\t\t//initializing graphics area\n \tcanvas = new FacePamphletCanvas();\n \tadd(canvas);\n \t\n\t\taddInteractors();\n\t\taddActionListeners();\n }",
"public ViewerComponent() {\n int images = layout_threads.size();\n int comp_w = 4*w, comp_h = (h*images)/4; if ((images%4) != 0) comp_h += h;\n Dimension dimension = new Dimension(comp_w, comp_h); setPreferredSize(dimension); setMinimumSize(dimension);\n addMouseListener(this); addMouseMotionListener(this);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jSplitPane1 = new javax.swing.JSplitPane();\n LookAndFeel.flattenSplitPane(jSplitPane1);\n jScrollPane1 = new javax.swing.JScrollPane();\n jScrollPane1.getVerticalScrollBar().setUnitIncrement(16);\n thumbnails1 = new stormgate.editor.ui.forms.browser.Thumbnails();\n libraryViewer1 = new stormgate.editor.ui.forms.browser.LibraryViewer();\n browserControl1 = new stormgate.editor.ui.forms.browser.BrowserControl();\n browserControl1.setThumbnails(thumbnails1, libraryViewer1);\n\n setMinimumSize(new java.awt.Dimension(200, 200));\n setPreferredSize(new java.awt.Dimension(741, 200));\n\n jSplitPane1.setBorder(null);\n jSplitPane1.setDividerLocation(270);\n jSplitPane1.setMinimumSize(new java.awt.Dimension(228, 100));\n jSplitPane1.setPreferredSize(new java.awt.Dimension(919, 100));\n jSplitPane1.addComponentListener(new java.awt.event.ComponentAdapter() {\n public void componentResized(java.awt.event.ComponentEvent evt) {\n jSplitPane1ComponentResized(evt);\n }\n });\n\n jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n jScrollPane1.setPreferredSize(new java.awt.Dimension(402, 100));\n jScrollPane1.setViewportView(thumbnails1);\n\n jSplitPane1.setRightComponent(jScrollPane1);\n jSplitPane1.setLeftComponent(libraryViewer1);\n\n browserControl1.setMinimumSize(new java.awt.Dimension(27, 10));\n browserControl1.setPreferredSize(null);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 708, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(browserControl1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)\n .addComponent(browserControl1, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)\n );\n }",
"private void init() {\r\n\r\n createGUI();\r\n\r\n setSize(new Dimension(600, 600));\r\n setTitle(\"Grid - Regular Grid Renderer\");\r\n }",
"private void initialize() {\r\n\t\t// Initialize main frame\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(Constants.C_MAIN_PREFERED_POSITION_X_AT_START, Constants.C_MAIN_PREFERED_POSITION_Y_AT_START, \r\n\t\t\t\tConstants.C_MAIN_PREFERED_SIZE_X, Constants.C_MAIN_PREFERED_SIZE_Y);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.setTitle(Constants.C_MAIN_WINDOW_TITLE);\r\n\t\t\r\n\t\t// Tab panel and their panels\r\n\t\tmainTabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\tframe.getContentPane().add(mainTabbedPane, BorderLayout.CENTER);\r\n\t\t\r\n\t\tpanelDecision = new DecisionPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_DECISION_TITLE, null, panelDecision, null);\r\n\t\t\r\n\t\tpanelCalculation = new CalculationPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_CALCULATION_TITLE, null, panelCalculation, null);\r\n\t\t\r\n\t\tpanelLibrary = new LibraryPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_LIBRARY_TITLE, null, panelLibrary, null);\r\n\t\t\r\n\t\t// Menu bar\r\n\t\tmenuBar = new JMenuBar();\r\n\t\tframe.setJMenuBar(menuBar);\r\n\t\tcreateMenus();\r\n\t}",
"public abstract void initViews();",
"public void createPartControl(Composite parent) {\n//\t\tviewer = new TreeViewer(parent, SWT.VIRTUAL | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tviewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);\n\n\t\tdrillDownAdapter = new DrillDownAdapter(viewer);\n\t\tviewer.setContentProvider(new ViewContentProvider());\n\t\tviewer.setLabelProvider(new ViewLabelProvider());\n\t\tviewer.setSorter(new NameSorter()); // sorts the tree names alphabetically\n\t\tviewer.setInput(getViewSite());\n\t\t\n\t\tViewerFilter[] filters = {showAllFilter};\n\t\tviewer.setFilters(filters);\n\n\t\tshell = parent.getShell();\n\n\t\t// Create the help context id for the viewer's control\n\t\tPlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), \"org.openmodelica.modelicaml.view.componentstree\");\n\t\tmakeActions();\n\t\thookContextMenu();\n//\t\thookDoubleClickAction();\n\t\thookSelectionChangedAction();\n\t\tcontributeToActionBars();\n\n//\t\tgetSite().getWorkbenchWindow().getSelectionService().addSelectionListener(listener);\n\t\t\n\t\t// add a selection provider.\n\t\tgetSite().setSelectionProvider(viewer); \n\t\t\n\t\t// double click for opening/closing the sub tree\n\t\tviewer.addOpenListener(new IOpenListener() {\n\t\t\tpublic void open(final OpenEvent event) {\n\t\t\t\tObject firstElement = ((IStructuredSelection)\n\t\t\t\tevent.getSelection()).getFirstElement();\n\t\t\t\t\tif (viewer.getExpandedState(firstElement)) {\n\t\t\t\t\t\tviewer.collapseToLevel(firstElement, AbstractTreeViewer.ALL_LEVELS);\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\tviewer.expandToLevel(firstElement, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\n\t\t// add drag support\n\t\tint operations = DND.DROP_MOVE;\n\t\tTransfer[] transferTypes = new Transfer[]{ LocalSelectionTransfer.getTransfer()};\n\t\tviewer.addDragSupport(operations, transferTypes, new DragListener(viewer));\n\n\t}",
"public void init(MainPanel mainPanel);",
"private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}",
"public UserInterfaceJFrame() {\n initComponents();\n jPanel1.add(new FeatureViewPanel());\n jPanel2.add(new DataVisualizationPanel());\n jPanel3.add(new DataParserPanel());\n }",
"public void createPartControl(Composite parent) {\n\t\tviewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tdrillDownAdapter = new DrillDownAdapter(viewer);\n\t\tviewer.setContentProvider(new ViewContentProvider());\n\t\tviewer.setLabelProvider(new ViewLabelProvider());\n\t\tviewer.setSorter(new NameSorter());\n\t\tviewer.setInput(getViewSite());\n\n\t\t// Create the help context id for the viewer's control\n\t\tPlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), \"TreeView.viewer\");\n\t\tmakeActions();\n\t\thookContextMenu();\n\t\thookDoubleClickAction();\n\t\tcontributeToActionBars();\n\t}",
"private void initComponents() {//GEN-BEGIN:initComponents\n\t\tpnlMain = new javax.swing.JPanel();\n\n\t\tsetTitle(\"JasperViewer\");\n\t\tsetDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\t\tpnlMain.setLayout(new java.awt.BorderLayout());\n\n\t\tgetContentPane().add(pnlMain, java.awt.BorderLayout.CENTER);\n\n\t\tpack();\n\t\tjava.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();\n\t\tsetSize(new java.awt.Dimension(400, 300));\n\t\tsetLocation((screenSize.width-400)/2,(screenSize.height-300)/2);\n\t}",
"private void initGUI() {\r\n this.setLayout(new RiverLayout());\r\n\r\n /**\r\n * Add the following selectively\r\n */\r\n titledSearchResultsPanel = new Cab2bTitledPanel(\"Search Results :- \" + \"Total results ( \"\r\n + allElements.size() + \" )\");\r\n GradientPaint gp = new GradientPaint(new Point2D.Double(.05d, 0), new Color(185, 211, 238),\r\n new Point2D.Double(.95d, 0), Color.WHITE);\r\n titledSearchResultsPanel.setTitlePainter(new BasicGradientPainter(gp));\r\n titledSearchResultsPanel.setBorder(new EmptyBorder(0, 0, 0, 0));\r\n titledSearchResultsPanel.setTitleFont(new Font(\"SansSerif\", Font.BOLD, 11));\r\n titledSearchResultsPanel.setTitleForeground(Color.BLACK);\r\n\r\n pagination = initPagination(allElements);\r\n\r\n searchResultsPanel = new Cab2bPanel(new BorderLayout(0, 5));\r\n\r\n Cab2bComboBox serviceURLCombo = new Cab2bComboBox(serviceURLComboContents);\r\n serviceURLCombo.setPreferredSize(new Dimension(250, 20));\r\n serviceURLCombo.addActionListener(new ServiceURLSelectionListener());\r\n Cab2bPanel comboContainer = new Cab2bPanel(new RiverLayout(5, 5));\r\n \r\n JLabel jLabel = new JLabel(\"Results From\");\r\n jLabel.setForeground(new Cab2bHyperlink().getUnclickedColor());\r\n \r\n \r\n comboContainer.add(\"left\", jLabel);\r\n comboContainer.add(\"tab\", serviceURLCombo);\r\n\r\n searchResultsPanel.add(BorderLayout.NORTH, comboContainer);\r\n\r\n searchResultsPanel.add(BorderLayout.CENTER, pagination);\r\n initDataListSummaryPanel();\r\n initDataListButtons();\r\n\r\n Cab2bPanel buttonPanel = new Cab2bPanel(new RiverLayout(8, 0));\r\n buttonPanel.add(addToDataListButton);\r\n buttonPanel.add(m_applyAllButton);\r\n searchResultsPanel.add(BorderLayout.SOUTH, buttonPanel);\r\n\r\n m_addSummaryParentPanel = new Cab2bPanel(new BorderLayout());\r\n m_addSummaryParentPanel.add(searchResultsPanel, BorderLayout.CENTER);\r\n m_addSummaryParentPanel.add(myDataListParentPanel, BorderLayout.EAST);\r\n titledSearchResultsPanel.setContentContainer(m_addSummaryParentPanel);\r\n this.add(\"p vfill hfill\", titledSearchResultsPanel);\r\n }",
"protected abstract void initViews();",
"@Override\n\tpublic void init() {\n\t\ttable = new JTable(dm);\n\t\tJScrollPane scrollPane = new JScrollPane(table);\n\n\t\tadd(scrollPane);\n\t}",
"public GUI()\n {\n initComponents();\n setSize(xSize, ySize);\n figures = new PFigure[numFigs];\n }",
"public InfoFilterFrame() {\n enableEvents(AWTEvent.WINDOW_EVENT_MASK);\n try {\n jbInit();\n init(); // do local intializations\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}",
"protected void configureViewer(final TreeViewer treeViewer) {\n \t\tconfigureViewerFilter(treeViewer);\n \t}",
"private void initView() {\n\n }",
"public void init() {\n SimpleStamperPanel panel=new SimpleStamperPanel();\n setContentPane(panel);\n \n \n // TODO start asynchronous download of heavy resources\n }",
"public MainWindow() {\n\t\t\tthis.initUI();\n\t\t\t\n\t\t}",
"public void createPartControl(Composite parent) {\n \t\t// Store the display so we can make async calls from listeners\n \t\tdisplay = parent.getDisplay();\n\t\tviewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);\n \t\tsetTreeColumns(viewer.getTree());\n \t\tviewer.getTree().setHeaderVisible(true);\n \t\tviewer.setContentProvider(getContentProvider());\n \t\tviewer.setInput(getInput());\n \t\tviewer.setLabelProvider(getLabelProvider());\n \t\tviewer.setComparator(new ViewerComparator());\n \t\tconfigureViewer(viewer);\n \t\taddListeners();\n \t\tmakeActions();\n \t\thookContextMenu();\n \t\thookDoubleClickAction();\n \t\tcontributeToActionBars();\n \t}",
"public mainUI() {\n initComponents();\n }",
"public void init() {\n try {\n java.net.URL codeBase = getCodeBase();\n codeBaseString = codeBase.toString();\n } catch (Exception e) {\n // probably running as an application, try the application\n // code base\n codeBaseString = \"file:./\";\n }\n\n if (colorMode == USE_COLOR) {\n objColor = red;\n } else {\n objColor = white;\n }\n\n Container contentPane = getContentPane();\n\n contentPane.setLayout(new BorderLayout());\n\n GraphicsConfiguration config = SimpleUniverse\n .getPreferredConfiguration();\n\n canvas = new Canvas3D(config);\n\n u = new SimpleUniverse(canvas);\n\n if (isApplication) {\n offScreenCanvas = new OffScreenCanvas3D(config, true);\n // set the size of the off-screen canvas based on a scale\n // of the on-screen size\n Screen3D sOn = canvas.getScreen3D();\n Screen3D sOff = offScreenCanvas.getScreen3D();\n Dimension dim = sOn.getSize();\n dim.width *= OFF_SCREEN_SCALE;\n dim.height *= OFF_SCREEN_SCALE;\n sOff.setSize(dim);\n sOff.setPhysicalScreenWidth(sOn.getPhysicalScreenWidth()\n * OFF_SCREEN_SCALE);\n sOff.setPhysicalScreenHeight(sOn.getPhysicalScreenHeight()\n * OFF_SCREEN_SCALE);\n\n // attach the offscreen canvas to the view\n u.getViewer().getView().addCanvas3D(offScreenCanvas);\n\n }\n contentPane.add(\"Center\", canvas);\n\n // setup the env nodes and their GUI elements\n setupLights();\n setupBackgrounds();\n setupFogs();\n setupSounds();\n\n // Create a simple scene and attach it to the virtual universe\n BranchGroup scene = createSceneGraph();\n\n // set up sound\n u.getViewer().createAudioDevice();\n\n // get the view\n view = u.getViewer().getView();\n\n // Get the viewing platform\n ViewingPlatform viewingPlatform = u.getViewingPlatform();\n\n // Move the viewing platform back to enclose the -4 -> 4 range\n double viewRadius = 4.0; // want to be able to see circle\n // of viewRadius size around origin\n // get the field of view\n double fov = u.getViewer().getView().getFieldOfView();\n\n // calc view distance to make circle view in fov\n float viewDistance = (float) (viewRadius / Math.tan(fov / 2.0));\n tmpVector.set(0.0f, 0.0f, viewDistance);// setup offset\n tmpTrans.set(tmpVector); // set trans to translate\n // move the view platform\n viewingPlatform.getViewPlatformTransform().setTransform(tmpTrans);\n\n // add an orbit behavior to move the viewing platform\n OrbitBehavior orbit = new OrbitBehavior(canvas, OrbitBehavior.STOP_ZOOM);\n orbit.setSchedulingBounds(infiniteBounds);\n viewingPlatform.setViewPlatformBehavior(orbit);\n\n u.addBranchGraph(scene);\n\n contentPane.add(\"East\", guiPanel());\n }",
"public void init()\r\n\t{\r\n\t\tStaticAppletData.setCodeBase(getCodeBase().toString()); // set the code base\r\n\t\tStaticAppletData.setCodeBaseURL(getCodeBase()); // set the code base URL\r\n\t\t\r\n\t\tloadLoginUI(); // load the login UI first\r\n\t\t//loadRoomViewerUI();\r\n\t}",
"void initUI();",
"@Override\n\tpublic void initView() {\n\t\t\n\t}",
"public static ViewerHandlerInterface getViewerHandler() {\n\t\treturn new ViewerHandler();\n\t}",
"public synchronized void showPage() {\n final ShowPageImage viewer = new ShowPageImage();\n\n if (SwingUtilities.isEventDispatchThread()) {\n viewer.run();\n } else {\n SwingUtilities.invokeLater(viewer);\n }\n }",
"private void initEditorComponent () {\n // Overriding the 'setJawbDocument' method to handle logging too.\n final AnnotationPopupListener popupListener =\n new AnnotationPopupListener(this);\n \n JTabbedPane tp = new DetachableTabsJawbComponent (task.getName()) {\n public void setJawbDocument (JawbDocument doc) {\n\t JawbDocument old = getJawbDocument();\n super.setJawbDocument (doc); // this is a must!!!\n\t if (old != null) \n\t old.getAnnotationMouseModel().\n\t removeAnnotationMouseListener(popupListener);\n\t if (doc != null)\n\t doc.getAnnotationMouseModel().\n\t addAnnotationMouseListener(popupListener);\n }\n };\n\n // add a simple editor for each\n Iterator iter = task.getMaiaScheme().iteratorOverAnnotationTypes();\n while (iter.hasNext()) {\n AnnotationType type = (AnnotationType) iter.next();\n Component editor = new SimpleAnnotEditor(this, type);\n tp.add (type.getName(), editor);\n }\n\n editorComponent = (JawbComponent)tp;\n }",
"public MainWindow(String title, Controller ctr) {\n\t\tsuper(title);\n\n\t\tcv = new Canvas(ctr);\n\t\tJScrollPane jspMiddle = new JScrollPane(cv);\n\t\tjspMiddle.setHorizontalScrollBarPolicy(\n\t\t\t\tJScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t\tjspMiddle.setVerticalScrollBarPolicy(\n\t\t\t\tJScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\n\t\tep = new EditPanel(ctr);\n\n\t\ttp = new ThumbnailPanel(ctr);\n\t\tJScrollPane jspLeft = new JScrollPane(tp);\n jspLeft.setVerticalScrollBarPolicy(\n \t\tJScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\n\t\tadd(new ToolBar(ctr), BorderLayout.PAGE_START);\n\t\tadd(jspLeft, BorderLayout.LINE_START);\n\t\tadd(jspMiddle, BorderLayout.CENTER);\n\t\tadd(ep, BorderLayout.LINE_END);\n\t\t\n\t\tsetJMenuBar(new MenuBar(ctr));\n\t\tsetDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n\t\tsetExtendedState(JFrame.MAXIMIZED_BOTH);\n\t\tsetLocationRelativeTo(null); // center the window\n\t\tsetVisible(true);\n\t\t\n\t\t// create the default state\n\t\tState st = new State(System.currentTimeMillis());\n\t\tctr.appendState(st);\n\t\tctr.setFocusedID(st.getID());\n\t\tgetThumbnailPanel().display();\n\n\t\taddWindowListener(new WindowAdapter() { // prompt before exit\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tsuper.windowClosing(e);\n\t\t\t\tctr.onExitClicked();\n\t\t\t}\n\t\t});\n\t}",
"private void initGUI() {\n\t\tContainer cp = getContentPane();\n\t\tcp.setLayout(new BorderLayout());\n\t\t\n\t\tJPanel top = new JPanel(new GridLayout(0, 1));\n\t\tcp.add(top, BorderLayout.PAGE_START);\n\t\t\n\t\ttop.add(createMenuBar());\n\n\t\tJTabbedPane tabs = new JTabbedPane();\n\t\ttabs.add(\"Encryptor\", encryptorPanel);\n\t\ttabs.add(\"Decryptor\", decryptorPanel);\n\t\ttabs.setSelectedComponent(encryptorPanel);\n\t\t\n\t\tcp.add(tabs);\n\t}",
"@Override\n\tpublic void initGui() {\n\t\tfield_154330_a.init();\n\t\tsuper.initGui();\n\t}",
"@Override\n public void run() {\n jmeVisualization = new JMEVisualization();\n jmeVisualization.setRotated(false);\n jmeVisualization.setWidth(getVisualizationPanel().getWidth() - 15);\n jmeVisualization.setHeight(getVisualizationPanel().getHeight() - 30);\n jmeVisualization.startApplication();\n\n /*\n Fetch Canvas from JMEVisualization instance\n */\n jmeCanvas = jmeVisualization.getJmeCanvasContext().getCanvas();\n\n getVisualizationPanel().setLayout(new FlowLayout());\n getVisualizationPanel().add(jmeCanvas);\n getVisualizationPanel().revalidate();\n\n }",
"private void initialize() {\r\n\t\t// this.setSize(271, 295);\r\n\t\tthis.setSize(495, 392);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(ResourceBundle.getBundle(\"Etiquetas\").getString(\"MainTitle\"));\r\n\t}",
"public static void main(String[] args) {\n Connection conn = null;\r\n try {\r\n Class.forName(\"org.postgresql.Driver\");\r\n conn = DriverManager.getConnection(\"jdbc:postgresql://csce-315-db.engr.tamu.edu/csce315904_3db\",\r\n \"csce315904_3user\", \"group3pass\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.err.println(e.getClass().getName()+\": \"+e.getMessage());\r\n JOptionPane.showMessageDialog(null,\"Failed to open database\");\r\n System.exit(0);\r\n }\r\n final Connection finalconn = conn;\r\n JOptionPane.showMessageDialog(null,\"Opened database successfully\");\r\n\r\n // main GUI\r\n final JFrame f = new JFrame(\"Viewer GUI\");\r\n\r\n // grab list of movies via queries\r\n String trending_Movies[] = get_Movie(conn, \"trending\", args[0]);\r\n String directors_Movies[] = get_Movie(conn, \"directors\", args[0]);\r\n String actors_Movies[] = get_Movie(conn, \"actors\", args[0]);\r\n String viewers_choice[] = get_Movie(conn, \"viewers_choice\", args[0]);\r\n String viewers_beware[] = get_Movie(conn, \"viewers_beware\", args[0]);\r\n\r\n // scroll panes with corresponding panels\r\n JScrollPane jScrollPane1 = new JScrollPane();\r\n JPanel panel1 = new JPanel();\r\n JScrollPane jScrollPane2 = new JScrollPane();\r\n JPanel panel2 = new JPanel();\r\n JScrollPane jScrollPane3 = new JScrollPane();\r\n JPanel panel3 = new JPanel();\r\n JScrollPane jScrollPane4 = new JScrollPane();\r\n JPanel panel4 = new JPanel();\r\n JScrollPane jScrollPane11 = new JScrollPane();\r\n JPanel panel11 = new JPanel();\r\n \r\n // containers\r\n JScrollPane jScrollPane6 = new JScrollPane();\r\n JScrollPane jScrollPane7 = new JScrollPane();\r\n JScrollPane jScrollPane8 = new JScrollPane();\r\n JScrollPane jScrollPane9 = new JScrollPane();\r\n JScrollPane jScrollPane10 = new JScrollPane();\r\n JScrollPane jScrollPane12 = new JScrollPane();\r\n\r\n // add movies to each panel\r\n panel1 = AddMoviesToPanels(trending_Movies, panel1);\r\n panel2 = AddMoviesToPanels(directors_Movies, panel2);\r\n panel3 = AddMoviesToPanels(actors_Movies, panel3);\r\n panel4 = AddMoviesToPanels(viewers_choice, panel4);\r\n panel11 = AddMoviesToPanels(viewers_beware, panel11);\r\n\r\n // set pref size for panels\r\n panel1.setPreferredSize(new Dimension(2050, 100));\r\n panel2.setPreferredSize(new Dimension(2050, 100));\r\n panel3.setPreferredSize(new Dimension(2050, 100));\r\n panel4.setPreferredSize(new Dimension(2050, 100));\r\n panel11.setPreferredSize(new Dimension(2050, 100));\r\n\r\n jScrollPane1.setPreferredSize(new Dimension(1000, 300));\r\n jScrollPane2.setPreferredSize(new Dimension(1000, 300));\r\n jScrollPane3.setPreferredSize(new Dimension(1000, 300));\r\n jScrollPane4.setPreferredSize(new Dimension(1000, 300));\r\n jScrollPane11.setPreferredSize(new Dimension(1000, 300));\r\n\r\n\r\n // headers\r\n JPanel p1 = new JPanel();\r\n JPanel p2 = new JPanel();\r\n JPanel p3 = new JPanel();\r\n JPanel p4 = new JPanel();\r\n JPanel p6 = new JPanel();\r\n\r\n p1.setLayout(new FlowLayout()); \r\n p1.add(new JLabel(\"Trending Movies\"));\r\n\r\n p2.setLayout(new FlowLayout()); \r\n p2.add(new JLabel(\"Movies By Directors You Like\"));\r\n\r\n p3.setLayout(new FlowLayout()); \r\n p3.add(new JLabel(\"Movies Starring Actors You Like\"));\r\n\r\n p4.setLayout(new FlowLayout()); \r\n p4.add(new JLabel(\"Viewer's Choice - revisit movies you really liked\"));\r\n\r\n p6.setLayout(new FlowLayout()); \r\n p6.add(new JLabel(\"Viewers Beware\"));\r\n \r\n // viewport stuff\r\n jScrollPane1.setViewportView(panel1);\r\n jScrollPane2.setViewportView(panel2);\r\n jScrollPane3.setViewportView(panel3);\r\n jScrollPane4.setViewportView(panel4);\r\n jScrollPane11.setViewportView(panel11);\r\n\r\n jScrollPane6.setViewportView(p1);\r\n jScrollPane7.setViewportView(p2);\r\n jScrollPane8.setViewportView(p3);\r\n jScrollPane9.setViewportView(p4);\r\n jScrollPane12.setViewportView(p6);\r\n\r\n\r\n // map everything out\r\n JPanel tempPanel = new JPanel();\r\n GroupLayout layout = new GroupLayout(tempPanel);\r\n\r\n layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\r\n .addComponent(p1)\r\n .addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\r\n .addComponent(p2)\r\n .addComponent(jScrollPane2, GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\r\n .addComponent(p3)\r\n .addComponent(jScrollPane3, GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\r\n .addComponent(p4)\r\n .addComponent(jScrollPane4, GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\r\n .addComponent(p6)\r\n .addComponent(jScrollPane11, GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE));\r\n\r\n layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(p1,25,25,25)\r\n .addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, 128, GroupLayout.PREFERRED_SIZE)\r\n .addComponent(p2,25,25,25)\r\n .addComponent(jScrollPane2, GroupLayout.PREFERRED_SIZE, 128, GroupLayout.PREFERRED_SIZE)\r\n .addComponent(p3,25,25,25)\r\n .addComponent(jScrollPane3, GroupLayout.PREFERRED_SIZE, 128, GroupLayout.PREFERRED_SIZE)\r\n .addComponent(p4,25,25,25)\r\n .addComponent(jScrollPane4, GroupLayout.PREFERRED_SIZE, 128, GroupLayout.PREFERRED_SIZE)\r\n .addComponent(p6,25,25,25)\r\n .addComponent(jScrollPane11, GroupLayout.PREFERRED_SIZE, 128, GroupLayout.PREFERRED_SIZE)));\r\n\r\n tempPanel.setLayout(layout);\r\n \r\n // Menu Bar\r\n JMenuBar menuBar = new JMenuBar();\r\n\r\n JMenu user_ID = new JMenu(\"User ID\");\r\n user_ID.add(new JMenuItem(args[0]));\r\n menuBar.add(user_ID);\r\n\r\n JMenu watch_History = new JMenu(\"Watch History\");\r\n menuBar.add(watch_History);\r\n\r\n JMenuItem interval1 = new JMenuItem(\"Within last year\");\r\n JMenuItem interval2 = new JMenuItem(\"Within last two years\");\r\n JMenuItem interval3 = new JMenuItem(\"All time\");\r\n\r\n // listen to clicks and bring up corresponding screens\r\n interval1.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n JDialog jd = new JDialog(new JFrame());\r\n jd.setBounds(500, 300, 400, 300);\r\n String res= \"Within the last year \\n\\n\";\r\n JTextArea txt = new JTextArea(res);\r\n String[] temp = get_Movie(finalconn, \"recent 1 year\", args[0]);\r\n for (String a : temp)\r\n {\r\n res = a;\r\n txt.setText(txt.getText() + \"\\n\");\r\n txt.setText(txt.getText() + res);\r\n }\r\n jd.add(txt);\r\n jd.setVisible(true);\r\n }\r\n\r\n });\r\n interval2.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n JDialog jd = new JDialog(new JFrame());\r\n jd.setBounds(500, 300, 400, 300);\r\n String res= \"Within the last two years \\n\\n\";\r\n JTextArea txt = new JTextArea(res);\r\n String[] temp = get_Movie(finalconn, \"recent 2 year\", args[0]);\r\n for (String a : temp)\r\n {\r\n res = a;\r\n txt.setText(txt.getText() + \"\\n\");\r\n txt.setText(txt.getText() + res);\r\n }\r\n jd.add(txt);\r\n jd.setVisible(true);\r\n }\r\n\r\n });\r\n interval3.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n JDialog jd = new JDialog(new JFrame());\r\n jd.setBounds(500, 300, 400, 300);\r\n String res= \"All-time \\n\\n\";\r\n JTextArea txt = new JTextArea(res);\r\n String[] temp = get_Movie(finalconn, \"all\", args[0]);\r\n for (String a : temp)\r\n {\r\n res = a;\r\n txt.setText(txt.getText() + \"\\n\");\r\n txt.setText(txt.getText() + res);\r\n }\r\n jd.add(txt);\r\n jd.setVisible(true);\r\n }\r\n\r\n });\r\n watch_History.add(interval1);\r\n watch_History.add(interval2);\r\n watch_History.add(interval3);\r\n \r\n\r\n f.setContentPane(tempPanel);\r\n f.setJMenuBar(menuBar);\r\n f.setSize(1000, 1000);\r\n f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n f.setVisible(true); \r\n }"
] |
[
"0.60735005",
"0.6049494",
"0.60440004",
"0.6035233",
"0.6030209",
"0.59809",
"0.59742886",
"0.5970593",
"0.5913538",
"0.58869344",
"0.5876876",
"0.5825853",
"0.58149457",
"0.58140093",
"0.580547",
"0.5801196",
"0.5792773",
"0.5769006",
"0.5738484",
"0.5718292",
"0.5706711",
"0.5673938",
"0.56723386",
"0.5661816",
"0.5659541",
"0.56530905",
"0.56516916",
"0.5640528",
"0.5608904",
"0.5597799",
"0.55884725",
"0.55882704",
"0.5588242",
"0.5583267",
"0.5577346",
"0.55769473",
"0.5568932",
"0.55628866",
"0.5553972",
"0.5550933",
"0.55403596",
"0.55281836",
"0.55181456",
"0.55143887",
"0.55087054",
"0.55065244",
"0.54892045",
"0.54883236",
"0.5483149",
"0.5476602",
"0.5471387",
"0.5450226",
"0.5444128",
"0.54345185",
"0.54245317",
"0.54214597",
"0.54055446",
"0.53997993",
"0.5389697",
"0.5387553",
"0.5384889",
"0.538231",
"0.53708744",
"0.53630257",
"0.53624356",
"0.5352763",
"0.5343375",
"0.5338454",
"0.5337485",
"0.5336751",
"0.53219354",
"0.53179103",
"0.5317833",
"0.5315083",
"0.5311356",
"0.5308215",
"0.5300726",
"0.5300619",
"0.52967197",
"0.5283582",
"0.5283582",
"0.5280296",
"0.5280175",
"0.5274572",
"0.5268852",
"0.52610844",
"0.52607244",
"0.5260666",
"0.52602655",
"0.52561355",
"0.525195",
"0.52513295",
"0.5249581",
"0.52494204",
"0.5245133",
"0.5240725",
"0.52370656",
"0.52370065",
"0.52331316",
"0.5232962"
] |
0.7724914
|
0
|
Interrupt this viewer by interrupting the Viewer Task
|
final protected void interrupt()
{
if (startTask != null)
startTask.interruptAll();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void stopTask()\n {\n viewer.stopViewer(); \n }",
"public void interrupt() {\r\n ServerLogger.log(this.myID + \" interrupt()\");\r\n this.run = false;\r\n //super.interrupt(); //To change body of overridden methods use File | Settings | File Templates.\r\n }",
"public void interruptTask() {\n }",
"public void interruptTask() {\n }",
"public void interrupt() {\n interrupted.set(true);\n Thread.currentThread().interrupt();\n }",
"public void interrupt() {\n\t\tinterrupted = true;\n\t}",
"public void interrupt();",
"protected void interrupted() {\n\t\tL.ogInterrupt(this);\n\t}",
"@Override\n public void interrupt() {\n super.interrupt(); //To change body of generated methods, choose Tools | Templates.\n }",
"public void cancel() {\n\t\tinterrupt();\n\t}",
"final void interruptTask() {\n/* 82 */ Thread currentRunner = this.runner;\n/* 83 */ if (currentRunner != null) {\n/* 84 */ currentRunner.interrupt();\n/* */ }\n/* 86 */ this.doneInterrupting = true;\n/* */ }",
"@Override\r\n\tpublic void onInterrupt() {\n\t\t\r\n\t}",
"@Override\n public void onInterrupt() {\n }",
"void cancel() {\n\tsleepThread.interrupt();\n }",
"public abstract void interrupt();",
"@Override\n public void interrupt() {\n // the usual check for a set interrupt flag interferes with the looper used, therefore an\n // interrupt from outside directly terminates this handler.\n if (mThread != null) {\n terminate(true);\n } else {\n super.interrupt();\n }\n }",
"public void interrupt() {\n this.f3567pI.interrupt();\n }",
"public void interrupted() {\n\n }",
"public void interrupt() {\n close();\n }",
"protected void interrupted() {\n \tRobot.lift.hold();\n \tRobot.debug.Stop();\n }",
"protected void interrupted() {\r\n\t }",
"@Override\n\t\tpublic void interrupt() {\n\t\t\t\n\t\t\t///why is this method not called?????\n\t\t\tSystem.out.println(\"here\");\n\t\t\tsuper.interrupt();\n\t\t}",
"protected void interrupted() {\n \tRobot.conveyor.stop();\n }",
"protected void interrupted() {\r\n\t\t \tP.println(Tt.getClassName(this) + \" interrupted\");\r\n\t\t }",
"public void stopThread(View view) {\n //stopThreadByInterrupt();\n //stopThreadByBoolean();\n stopThreadByRunnable();\n\n\n }",
"public void stopProcessing() {\n interrupted = true;\n }",
"public void cancel() {\n if( this.attachedThread != null ) {\n this.attachedThread.interrupt();\n }\n else {\n this.attachedFuture.cancel( true );\n\n if( this.attachedHipanFuture != null ) {\n this.attachedHipanFuture.fail( new InterruptedException( \"Task was canceled\" ) );\n }\n }\n }",
"protected void interrupted() {\n \t\n }",
"protected void interrupted() {\n \t\n }",
"@Override\n\tprotected void interrupted() {\n\t\t//System.out.println(this.getClass().getSimpleName() + \" interrupted\");\n\t}",
"@FXML\n void endAsInterrupt(ActionEvent event) {\n readFromFileBtn.setVisible(true);\n readTxt.setVisible(true);\n readNameBox.setVisible(true);\n statusTxt.setText(\"Stopped\");\n tc.setRunning(false);\n tc.k.interrupt();\n tc.toFile();\n\n }",
"@Override\n public void run(){\n\n Thread.currentThread().interrupt();\n }",
"protected void interrupted() {\n \tRobot.driveTrain.stop();\n }",
"private void cancel() {\n mFuture.cancel(mMayInterruptIfRunning);\n }",
"protected void interrupted() {\n \tRobot.vision_.stopGearLiftTracker();\n }",
"@Override\n protected void interrupted() {\n Robot.climber.frontStop();\n Robot.climber.rearStop();\n }",
"public void timerInterrupt() {\n \tboolean istr = Machine.interrupt().disable();\n \t\n \twhile (sleepingThreads.size()>0 && sleepingThreads.peek().time <= Machine.timer().getTime()) {\n \t\tsleepingThreads.remove().ready();\n \t}\n \n \tKThread.yield();\n \t\n \t//Machine.interrupt().enable();\n \tMachine.interrupt().restore(istr);\n \n }",
"protected void interrupted() {\r\n }",
"protected void interrupted() {\r\n }",
"protected void interrupted() {\r\n }",
"protected void interrupted() {\r\n }",
"protected void interrupted() {\r\n }",
"protected void interrupted() {\r\n }",
"public void stop(){\r\n\t\tmyTask.cancel();\r\n\t\ttimer.cancel();\r\n\t}",
"protected void interrupted() {\n \n }",
"protected void interrupted() {\n \t// who cares\n }",
"protected void interrupted() {\n \tRobot.drive.stop();\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"protected void interrupted() {\n }",
"private void stopThreadByInterrupt() {\n if (customThread != null) {\n try {\n customThread.join();\n customThread.interrupt();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }",
"protected void interrupted()\n\t{\n\t\tstop();\n\t}",
"public synchronized void cancel() {\n }",
"private void interrupt() {\n final ScreenSpeakService service = ScreenSpeakService.getInstance();\n if (service == null) {\n LogUtils.log(Log.ERROR, \"Failed to get ScreenSpeakService instance.\");\n return;\n }\n\n final SpeechController speechController = service.getSpeechController();\n speechController.interrupt();\n }",
"protected void interrupted() {\n \n this.getPIDController().disable();\n shooter.setShooterMotor(0.0);\n }",
"protected abstract void doExternalInterrupt(int number);",
"@Override\n\tpublic void stop() {\n\t\tif (view != null)\n\t\t\tview.stop();\n\t}",
"protected void interrupted() {\n \tSystem.out.println(\"pid Get\" + RobotMap.visionSensor.pidGet());\n\t\tRobotMap.visionSensor.stopProcessing();\n \tRobotMap.VisionDistanceRightPIDController.stop();\n\t\tRobotMap.VisionDistanceLeftPIDController.stop();\n \tRobot.driveTrain.resetTalonControlMode();\n\t\tRobot.driveTrain.setTalonsReversedState(false);\n\t\tSystem.out.println(\"Drive Forward By Vision Has Been Interupted\");\n\t}",
"void interrupted(W worker);",
"@FXML\r\n\tpublic void retour() {\r\n\t\tif (tVictoire != null)\r\n\t\t\ttVictoire.interrupt();\r\n\t\t\r\n\t\tif (!tAttJoueurs.isInterrupted())\r\n\t\t\ttAttJoueurs.interrupt();\r\n\t\t\r\n\t Stage stage = (Stage) btn_retour.getScene().getWindow();\r\n\t stage.close();\r\n\t}",
"final synchronized public void signalFinalize()\n {\n\n // run stop in a seperate thread:\n //System.err.println(\"--- Signal finalize ---\");\n \n ActionTask stopTask = new ActionTask(this.taskSource,\n \"Stopping viewer:\" + this)\n {\n public void doTask()\n {\n try\n {\n finalizeViewer(); \n }\n catch (Error e)\n {\n System.out.println(\"***Error: Exception:\" + e);\n e.printStackTrace();\n // setText(\"*** Exception occured ***\\n\"+e.toString());\n }\n }\n\n public void stopTask()\n {\n }; // nothing to stop/dispose:this IS already a stop/dispose task!!! \n };\n\n stopTask.startTask();\n }",
"public void cancel (boolean interrupt) {\n\t\tfuture.cancel(interrupt);\n\t}"
] |
[
"0.74048734",
"0.7294099",
"0.7229833",
"0.7229833",
"0.72260684",
"0.71711457",
"0.7152227",
"0.70880014",
"0.7051093",
"0.70501864",
"0.7030541",
"0.6917546",
"0.6750207",
"0.6744667",
"0.6706485",
"0.6663091",
"0.66335166",
"0.6606077",
"0.65822506",
"0.6572399",
"0.6546616",
"0.65419006",
"0.6530299",
"0.65102506",
"0.6476695",
"0.64610875",
"0.6456376",
"0.6450222",
"0.6450222",
"0.64249706",
"0.6420986",
"0.6408446",
"0.6384134",
"0.63818187",
"0.63699776",
"0.6368947",
"0.6359967",
"0.635103",
"0.635103",
"0.635103",
"0.635103",
"0.635103",
"0.635103",
"0.6345654",
"0.63328505",
"0.6329103",
"0.63169044",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.6298732",
"0.62935007",
"0.6284106",
"0.62720937",
"0.62563497",
"0.62495464",
"0.6248711",
"0.62345994",
"0.6233564",
"0.6218834",
"0.6218193",
"0.61953706",
"0.61836445"
] |
0.7065026
|
8
|
Calls stopViewer and dispoveViewer. Also tries to stop running thread and dispose the optional frame if the Viewer was started in a separate Frame.
|
public void finalizeViewer()
{
viewer.stopViewer();
// check whether star tasks still is running !
if (startTask.isAlive() == true)
startTask.interruptAll(); // send interrupt signal
// Wait 1s.
try
{
Thread.sleep(1000);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
viewer.disposeViewer();
// check parent frame:
if (viewer.getViewContext().getStartInStandaloneWindow()==true)
{
Frame frame=getViewerFrame(viewer);
if (frame != null)
{
frame.dispose();
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void run() {\n viewerManagerFrame.removeViewer(viewer);\n }",
"public void dispose() {\r\n\t\tif (view != null)\r\n\t\t\tview.stopThread = true;\r\n\t\tview = null;\r\n\t\tcontroller = null;\r\n\t\tsuper.dispose();\r\n\t}",
"@Override\n public void windowClosing(WindowEvent e) {\n new Thread() {\n @Override\n public void run() {\n \n if (animator != null && animator.isStarted()) {\n animator.stop();\n }\n if (fpsMonitor != null) { \n fpsMonitor.stop();\n }\n \n try {\n SwingUtilities.invokeAndWait (new Runnable() {\n @Override\n public void run () {\n viewer.dispose ();\n }\n });\n }\n catch (InvocationTargetException e) {\n }\n catch (InterruptedException e) {\n }\n \n closed = true;\n }\n }.start();\n }",
"public void stopTask()\n {\n viewer.stopViewer(); \n }",
"public native final void stopPreview();",
"private void stop() {\r\n\t\tif (!running)\r\n\t\t\treturn;\r\n\t\trunning = false;\r\n\t\ttry {\r\n\t\t\tthread.join();//ends thread to close program correctly\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(0);//closes canvas\r\n\t\t}\r\n\t}",
"public void destroy(){\n Log.d(TAG, \"onDestroy called\");\n runRunnable = false;\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.release();\n mCamera = null;\n }\n isPaused = true;\n // TODO stop executorService\n\n //executor.shutdown();\n cameraThread.stop();\n\n }",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmVideoContrl.closeMediaControl();\r\n\r\n\t\t\t\t\t}",
"@Override\n public void run() {\n\n GLMouseListener mouse = viewer.getMouseHandler();\n if (mouse instanceof GLMouseAdapter) {\n ((GLMouseAdapter)mouse).setLaptopConfig();\n }\n \n viewer.addSelectionListener(new SimpleSelectionHandler(renderables));\n\n // Create a animator that drives canvas' display() at the specified FPS.\n final FPSAnimator animator;\n final FPSMonitor fpsMonitor;\n \n if (MultiViewer.doFPS) {\n animator = new FPSAnimator(viewer.getCanvas().getDrawable(), FPS, true);\n animator.setUpdateFPSFrames(3, null);\n animator.start();\n fpsMonitor = new FPSMonitor(title + \" FPS: \", animator);\n new Thread(fpsMonitor).start();\n } else {\n animator = null;\n fpsMonitor = null;\n }\n \n // Create the top-level container\n frame = new JFrame(); // Swing's JFrame or AWT's Frame\n frame.add(viewer.getCanvas().getComponent());\n\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n // Use a dedicate thread to run the stop() to ensure that the\n // animator stops before program exits.\n new Thread() {\n @Override\n public void run() {\n \n if (animator != null && animator.isStarted()) {\n animator.stop();\n }\n if (fpsMonitor != null) { \n fpsMonitor.stop();\n }\n \n try {\n SwingUtilities.invokeAndWait (new Runnable() {\n @Override\n public void run () {\n viewer.dispose ();\n }\n });\n }\n catch (InvocationTargetException e) {\n }\n catch (InterruptedException e) {\n }\n \n closed = true;\n }\n }.start();\n }\n });\n frame.setTitle(title);\n // frame.pack();\n frame.setVisible(true);\n // animator.start(); // start the animation loop\n }",
"@Override\n\tprotected void onStop() {\n\t\tif(videoviewer != null)\n\t\t\tvideoviewer.stopPlayback();\n\t\tif (timer != null) {\n\t\t\ttimer.cancel();\n\t\t}\n\t\tsuper.onStop();\n\t}",
"public void stopThread(View view) {\n //stopThreadByInterrupt();\n //stopThreadByBoolean();\n stopThreadByRunnable();\n\n\n }",
"public void stop() {\n\n\t\tif (!started.compareAndSet(true, false)) {\n\t\t\treturn;\n\t\t}\n\n\t\tLOG.debug(\"Stopping panel rendering and closing attached webcam\");\n\n\t\tupdater.stop();\n\t\tupdater = null;\n\n\t\timage = null;\n\n\t\ttry {\n\t\t\terrored = !webcam.close();\n\t\t} catch (WebcamException e) {\n\n\t\t\terrored = true;\n\n\t\t\tDisplay.getDefault().syncExec(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tredraw();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthrow e;\n\t\t}\n\t}",
"@Override\n\tpublic void stop() {\n\t\tif (view != null)\n\t\t\tview.stop();\n\t}",
"@Override\n public void windowClosing(WindowEvent e) {\n new Thread(new Runnable() {\n public void run() {\n pcu.setDone();\n camera.getDriver().cleanUp();\n frame.setVisible(false);\n frame.dispose();\n }\n }).start();\n }",
"@Override\r\n\t\t\tpublic void run() {\n\r\n\t\t\t\tif (mVideoContrl != null) {\r\n\t\t\t\t\t// mVideoContrl.releaseMediaPlayer();\r\n\t\t\t\t\tmVideoContrl.closeMediaControl();\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"@Override\n\tpublic void run() {\n\t\twhile (computeFrame()) {}\n\t\tframe.setVisible(false);\n\t\tframe.dispose();\n\t}",
"public void stop() {\n\t\tthread.requestStop = true;\n\t\tlong start = System.currentTimeMillis()+timeout;\n\t\twhile( start > System.currentTimeMillis() && thread.running )\n\t\t\tThread.yield();\n\n\t\tdevice.stopDepth();\n\t\tdevice.stopVideo();\n\t\tdevice.close();\n\t}",
"@Override\n\tpublic void surfaceDestroyed(SurfaceHolder arg0) {\n\t\tthreadFlag = false;\n\t\trelease();\n\t}",
"public void stop(){\n if (mCamera != null){\n mCamera.stopPreview();\n mCamera.setPreviewCallback(null);\n mCamera.release();\n mCamera = null;\n }\n if (mHolder != null) {\n mHolder.getSurface().release();\n mHolder = null;\n }\n }",
"public void stopPreview() {\n\t\tif (autoFocusManager != null) {\n\t\t\tautoFocusManager.stop();\n\t\t\tautoFocusManager = null;\n\t\t}\n\t\tif (camera != null && previewing) {\n//\t\t\tLog.d(TAG, \"stopPreview\");\n\t\t\tcamera.stopPreview();\n//\t\t\tpreviewCallback.setHandler(null, 0);\n\t\t\tpreviewing = false;\n\t\t}\n\t\t\n\t}",
"@Override\n public void run() {\n webView.getEngine().load(null);\n frame.setVisible(false);\n }",
"public void dispose() {\n thread.interrupt();\n }",
"public void run() {\n thread.interrupt();\n System.out.println(\"Cancelled Admin Viewer startup\");\n }",
"public void dispose() {\n parent.removeListener(listener);\n PlatformUI.getWorkbench().getDisplay().asyncExec(displayRunnable);\n }",
"@Override\r\n\tpublic void run() {\n\t\tshowViewer();\r\n\t}",
"@Override // com.master.cameralibrary.CameraViewImpl\n public void stop() {\n Camera camera = this.mCamera;\n if (camera != null) {\n camera.stopPreview();\n }\n this.mShowingPreview = false;\n releaseCamera();\n }",
"private void stopAcquisition() {\r\n if (this.timer != null && !this.timer.isShutdown()) {\r\n try {\r\n // stop the timer\r\n this.timer.shutdown();\r\n this.timer.awaitTermination(33, TimeUnit.MILLISECONDS);\r\n } catch (InterruptedException e) {\r\n // log any exception\r\n System.err.println(\"Exception in stopping the frame capture, trying to close the video now... \" + e);\r\n }\r\n }\r\n\r\n if (this.capture.isOpened()) {\r\n // release the camera\r\n this.capture.release();\r\n }\r\n }",
"public synchronized void stopPreview() {\n if (autoFocusManager != null) {\n autoFocusManager.stop();\n autoFocusManager = null;\n }\n if (camera != null && previewing) {\n camera.getCamera().stopPreview();\n previewCallback.setHandler(null, 0);\n previewing = false;\n }\n }",
"@Override\n public void stop() {\n animatorThread = null;\n\n //Get rid of the objects necessary for double buffering.\n offGraphics = null;\n offImage = null;\n }",
"@Override\n public void surfaceDestroyed(SurfaceHolder arg0) {\n release();\n threadFlag = false;\n }",
"@Override\n public void run() {\n mySurfaceView.setVisibility(View.GONE);\n qrEader.stop();\n\n\n }",
"public synchronized void stop() {\n\t\tif (!running)\n\t\t\treturn;\n\t\ttry {\n\t\t\toptions.save();\n\t\t\twindow.dispose();\n\t\t\trunning = false;\n\t\t\tthread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\tSystem.exit(1);\n\t}",
"@Override\n public void run() {\n viewDialog.hideDialog();\n }",
"@Override\n\t\t\tpublic void surfaceDestroyed(SurfaceHolder holder) {\n\t\t\t\tif (mCamera != null) {\n\t\t\t\t\tmCamera.stopPreview();\t\t\t\t\t\t\t\t\t\t//Stop the preview \n\t\t\t\t}\n\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmVideoContrl.start();\r\n\t\t\t\t\t\tisBreakDialogDissmiss = true;\r\n\t\t\t\t\t\tsendFirstShowContrlBtn();\r\n\t\t\t\t\t\tisChangeNotStart = true;\r\n\t\t\t\t\t\tmVideoPlayerHander.sendEmptyMessage(REFRESH_PAUSEBUTON);\r\n\t\t\t\t\t\t// start_3Dmode();\r\n\t\t\t\t\t}",
"protected void stopForecaster() {\n if (m_runThread != null) {\n m_runThread.interrupt();\n m_runThread.stop();\n }\n }",
"@Override\r\n\tpublic void dispose() {\n\t\tif ( disposed ) { return; }\r\n\t\tif ( getOutput() != null ) {\r\n\t\t\tgetOutput().getData().removeListener(this);\r\n\t\t}\r\n\t\tdisposed = true;\r\n\t\tif ( surfaceComposite != null ) {\r\n\t\t\tsurfaceComposite.dispose();\r\n\t\t}\r\n\t\tIDisplaySurface s = getDisplaySurface();\r\n\t\tif ( s != null ) {\r\n\t\t\treleaseLock();\r\n\t\t}\r\n\t\tif ( updateThread != null ) {\r\n\t\t\tupdateThread.interrupt();\r\n\t\t}\r\n\r\n\t\tif ( perspectiveListener != null ) {\r\n\t\t\tSwtGui.getWindow().removePerspectiveListener(perspectiveListener);\r\n\t\t}\r\n\t\t// FIXME Remove the listeners\r\n\r\n\t\tif ( overlay != null ) {\r\n\t\t\toverlay.close();\r\n\t\t}\r\n\t\tsuper.dispose();\r\n\t}",
"public synchronized void stopPreview() {\n if (autoFocusManager != null) {\n autoFocusManager.stop();\n autoFocusManager = null;\n }\n if (camera != null && previewing) {\n camera.getCamera().stopPreview();\n previewing = false;\n }\n }",
"public void Stop() {\r\n\t\t\r\n\t\tthread = null;\r\n\t}",
"public static void ThreadStop()\r\n\t{\r\n\t\tthread_running=false;\r\n\t}",
"public void stop() {\n thread = null;\n }",
"@Override\n\tpublic synchronized void stop(){\n\t\tif (estimationThread.running == true) {\n\t\t\testimationThread.running = false;\n\t\t\t// Wait for the thread to stop\n\t\t\ttry {\n\t\t\t\testimationThread.join(0);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\n\t\t\t} finally {\n\t\t\t\t// Remove any unused pose info\n\t\t\t\tfor (Subscription subscription : subscriptions) {\n\t\t\t\t\tsubscription.orientations.clear();\n\t\t\t\t\tsubscription.positions.clear();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void stopAcquisition() {\n if (this.timer != null && !this.timer.isShutdown()) {\n try {\n // stop the timer\n this.timer.shutdown();\n this.timer.awaitTermination(33, TimeUnit.MILLISECONDS);\n } catch (InterruptedException e) {\n // log any exception\n System.err.println(\"Exception in stopping the frame capture, trying to release the camera now... \" + e);\n }\n }\n\n if (this.capture.isOpened()) {\n // release the camera\n this.capture.release();\n }\n }",
"private void closeThread() {\n running = false;\n }",
"@Override\n public void surfaceDestroyed(SurfaceHolder holder) {\n boolean retry = true;\n\n while(retry) {\n try {\n thread.setRunning(false);\n } catch(Exception e) {\n e.printStackTrace();\n }\n retry = false;\n }\n }",
"public void stop(Thread arg0) {\n\t\t\n\t}",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmVideoContrl.seekTo(mBreakPos);\r\n\t\t\t\t\t\tmVideoContrl.start();\r\n\t\t\t\t\t\tisBreakDialogDissmiss = true;\r\n\t\t\t\t\t\tisChangeNotStart = true;\r\n\r\n\t\t\t\t\t\t// start_3Dmode();\r\n\r\n\t\t\t\t\t}",
"private void workerStop() {\r\n\r\n\t\tif (_workerThread == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tsynchronized (_workerLock) {\r\n\r\n\t\t\t_workerCancelled = true;\r\n\t\t\t_workerStopped = true;\r\n\r\n\t\t\t_workerLock.notifyAll();\r\n\t\t}\r\n\r\n\t\twhile (_workerThread != null) {\r\n\t\t\tif (!_display.readAndDispatch()) {\r\n\t\t\t\t_display.sleep();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void stopRunnerThread() {\r\n\t\ttry {\r\n\t\t\tif (runnerThread != null)\r\n\t\t\t\trunnerThread.join();\r\n\t\t} catch (InterruptedException ex) {\r\n\t\t\tassert(false) : \"Unit stopRunnerThread was interrupted\";\r\n\t\t}\r\n\t\t\r\n\t}",
"public void stop() {\r\n\t\tif (this.hasFrame()) {\r\n\t\t\tfinal Element frame = this.getFrame();\r\n\t\t\tDom.removeFromParent(frame);\r\n\t\t\tthis.clearFrame();\r\n\t\t\tthis.getSupport().stop(this, frame);\r\n\t\t}\r\n\t}",
"@Override\n public void bailOut() {\n debug.println(\"bailOut: called\");\n\n UpdateThread upt = getUpdateThread();\n if (upt != null) upt.endLoop();\n\n // When we are stealing a previous RtDisplay's connection, we don't\n // want to shut it down. The makeRtDisplay() \"steal\" version handles\n // setting this to null.\n if (ss != null)\n ss.close();\n\n timeThread.kill();\n if (audioThread != null)\n audioThread.kill();\n\n setVisible(false);\n\n // inform all the children window that the parent has died (plots/lists)\n for (RtStatusListener i : watchers) {\n i.sourceDied();\n }\n\n // kill the parent frame\n if (parentFrame != null)\n parentFrame.dispose();\n\n // notify the RTDManager that we're dead\n manager.removeDisplay(this);\n }",
"public void stop()\n\t{\n\t\tif (m_thread != null)\n\t\t{\n\t\t\tm_thread.stop();\n\t\t\tm_thread = null;\n\t\t}\n\n\t\t// TODO: Place additional applet stop code here\n\t}",
"private void stop(){\n\t\tisstop = true;\n\t\tif(ddaemon!=null){\n\t\t\tddaemon.setStop(true);\n\t\t\tddaemon = null;\n\t\t}\n\t\tif(ndaemon!=null){\n\t\t\tndaemon.setStop(true);\n\t\t\tndaemon = null;\n\t\t}\n\t\t// si on ne doit pas garder les dicoms on les supprime\n\t\tif(DicomWorkerClient.DICOMDIR!=null){\n\t\t\ttry {\n\t\t\t\tFileUtils.deleteDirectory(DicomWorkerClient.DICOMDIR.toFile());\n\t\t\t} catch (IOException e) {\n\t\t\t\tWindowManager.mwLogger.log(Level.SEVERE, \"Directory deletion exception\",e);\n\t\t\t}\n\t\t\tDicomWorkerClient.DICOMDIR=null;\n\t\t}\n\t\tif(statusThread!=null){\n\t\t\tsetLock(false);\n\t\t\tgetLblStatus().setText(\"\");\n\t\t\tprogressPanel.setVisible(false);\n\t\t\tstatusThread.stop();\n\t\t\tstatusThread = null;\n\t\t}\n\t}",
"public void stopThread(){\r\n\t\tthis.p.destroy();\r\n\t\ttry {\r\n\t\t\tinput.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tthis.stop();\r\n\t}",
"private void terminateListenerLooper() {\n if (mEffectListenerLooper != null) {\n mEffectListenerLooper.cleanUp();\n if (mLooper != null) {\n mLooper.quit();\n mLooper = null;\n }\n try {\n mEffectListenerLooper.join();\n } catch(InterruptedException e) {\n }\n mEffectListenerLooper = null;\n }\n if (mReverb2 != null) {\n mReverb2.release();\n mReverb2 = null;\n }\n }",
"private void dispose() {\n\t\t\t\r\n\t\t\tif (TRACE) {\r\n\t\t\t\tSystem.out.println(\"Disposing thread \" + workerNo);\r\n\t\t\t}\r\n\t\t\tcontrolLock.lock();\r\n\t\t\ttry {\r\n\t\t\t\tthreads.remove(thread.getId());\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tcontrolLock.unlock();\r\n\t\t\t}\r\n\t\t}",
"public void stop() {\n synchronized (mLock) {\n //if (!mRunning)\n //{\n // throw new IllegalStateException(\"CameraStreamer is already stopped\");\n //} // if\n \t\n \tLog.d(TAG, \"Stop\");\n \t\n mRunning = false;\n if (mMJpegHttpStreamer != null) {\n mMJpegHttpStreamer.stop();\n mMJpegHttpStreamer = null;\n } // if\n \n if (mCamera != null) {\n mCamera.release();\n mCamera = null;\n } // if\n } // synchronized\n mLooper.quit();\n }",
"@Override\n public void surfaceDestroyed(SurfaceHolder holder) {\n stopPreview();\n }",
"public void stop() {\n aVideoAnalyzer.stop();\n }",
"@Override\r\n\tpublic void surfaceDestroyed(SurfaceHolder holder) \r\n\t{\n\t\tmCamera.stopPreview();\r\n\t\tmCamera.release(); \r\n\t}",
"public void stopPlayThread() {\n ms.stop();\n }",
"@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t jw.setVisible(false);\n\t\t\t\t\t\t frame.setVisible(true);\n\t\t\t\t\t}",
"@Override\r\n public void run() {\n try {\r\n if (eventDispatcherThread != null) {\r\n final Class<?> edtClass = Class.forName(\"java.awt.EventDispatchThread\");\r\n final Method method = edtClass.getDeclaredMethod(\"stopDispatching\");\r\n method.setAccessible(true);\r\n method.invoke(eventDispatcherThread);\r\n }\r\n }\r\n catch (final Exception e) {\r\n throw new RuntimeException(e);\r\n }\r\n }",
"public synchronized void stop(){\n\t\tthis.running = false;\n\t\ttry {\n\t\t\tthis.thread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"protected void releaseVideoCapturebjects(boolean stopThread) {\n /** release video capture if !null */\n if (mVideoCapture != null) {\n\n /**\n * TODO:: need method to release camera2\n */\n try {\n mVideoCapture.mPreviewSession.stopRepeating();\n mVideoCapture.mPreviewSession.abortCaptures();\n mVideoCapture.mPreviewSession.close();\n mVideoCapture.mPreviewSession = null;\n\n mVideoCapture.mMediaRecorder.release();\n mVideoCapture.closeCamera();\n mVideoCapture.releaseVideoPreview();\n mVideoCapture = null;\n\n } catch (Exception e) {\n mVideoCapture.mPreviewSession = null;\n mVideoCapture = null;\n }\n }\n }",
"private void stopThread()\n {\n if (workerThread != null && workerThread.isAlive())\n {\n workerThread.stopLoop();\n }\n stopSelf();\n }",
"@Override\n protected void onStop() {\n \tsuper.onStop();\n \tthread.setThreadExit(true);\n \tthread = null;\n \t\n }",
"@Override\r\n\t\tpublic void surfaceDestroyed(SurfaceHolder arg0) {\n\t\t\tIsRunning = false;\r\n\t\t}",
"public void stop() {\r\n\t\t//If the program has an error this will stop the program\r\n\t\ttry {\r\n\t\t\trunning = false;\r\n\t\t\tg.dispose();\r\n\t\t\tthread.join();\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void surfaceDestroyed(SurfaceHolder holder) {\n\t\tLog.e(TAG, \"Surface Destroyed\");\n\t\tcamera.stopPreview();\n\t\tmPreviewRunning = false;\n\t\tcamera.release();\n\t\tcamera = null;\n\t}",
"@Override\r\n\tpublic void surfaceDestroyed(SurfaceHolder holder) {\n\t\tif(myCamera!=null){\r\n\t\t\tmyCamera.stopPreview();\r\n\t\t\tmyCamera.release();//釋放相機\r\n\t\t\tmyCamera=null;\r\n\t\t}\r\n\t}",
"@Override\n\t\tpublic void surfaceDestroyed(SurfaceHolder holder) {\n\t\t\tif (DEBUG>=2) Log.d(TAG, \"surfaceDestroyed'd\");\n\n\t\t\t// Surface will be destroyed when we return, so stop the preview.\n\t\t\t// Because the CameraDevice object is not a shared resource, it's\n\t\t\t// very important to release it when the activity is paused.\n\t\t\tif (mCamera != null) {\n\t\t\t\tSHOWING_PREVIEW = false;\n\t\t\t\tmCamera.stopPreview();\n\t\t\t}\n\n\t\t\t//Log.d(TAG, \"surfaceDestroyed'd finish\");\n\t\t}",
"public void releaseVideoPreview() {\n previewView.removeView(mVideoCapture.mTextureView);\n }",
"final synchronized public void signalFinalize()\n {\n\n // run stop in a seperate thread:\n //System.err.println(\"--- Signal finalize ---\");\n \n ActionTask stopTask = new ActionTask(this.taskSource,\n \"Stopping viewer:\" + this)\n {\n public void doTask()\n {\n try\n {\n finalizeViewer(); \n }\n catch (Error e)\n {\n System.out.println(\"***Error: Exception:\" + e);\n e.printStackTrace();\n // setText(\"*** Exception occured ***\\n\"+e.toString());\n }\n }\n\n public void stopTask()\n {\n }; // nothing to stop/dispose:this IS already a stop/dispose task!!! \n };\n\n stopTask.startTask();\n }",
"public void run() {\n\t\tthis.viewFrame.setVisible(true);\n\t}",
"public void surfaceDestroyed(SurfaceHolder holder) {\n camera.stopPreview();\n camera.release();\n camera = null;\n }",
"public void surfaceDestroyed(SurfaceHolder holder) {\n\t\tif(camera != null){\r\n\t\t\tcamera.stopPreview();\r\n\t\t\tcamera.release();\r\n\t\t\tcamera = null;\r\n\t\t}\r\n\t}",
"@Override\n public void surfaceDestroyed(SurfaceHolder holder) {\n boolean retry = true;\n int count = 0;\n while (retry && (count < 1000)) {\n count++;\n try {\n thread.setRunning(false);\n thread.join();\n retry = false;\n thread = null; //deletes thread if stopped\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }",
"public void surfaceDestroyed(SurfaceHolder holder) {\n stopCamera();\n }",
"public void surfaceDestroyed(SurfaceHolder holder) {\n camera.stopPreview();\n camera.release();\n camera = null;\n previewing = false;\n }",
"private void stop(){\n isRunning = false;\n try{\n thread.join();\n }\n catch(InterruptedException e){\n e.printStackTrace();\n }\n }",
"private void stopThreadByBoolean() {\n if (customThread != null) {\n customThread.stopThread();\n }\n }",
"public void stop()\n {\n if ( this.threadRunning.get() )\n {\n this.threadRunning.set(false);\n }\n }",
"public void stopMedia() {\n\t\tif (videoviewer.getCurrentPosition() != 0) {\n\t\t\t\n\t\t\tplaytogglebutton.setChecked(true);\n\t\t\t\n\t\t\tvideoviewer.pause();\n\t\t\tvideoviewer.seekTo(0);\n\t\t\ttimer.cancel();\n\n\t\t\ttimeElapsed.setText(countTime(videoviewer.getCurrentPosition()));\n\t\t\tprogressBar.setProgress(0);\n\t\t}\n\t}",
"public void closeView() {\n\t\tframeSystem.dispose();\n\t}",
"public void dispose () {\n\t\ttry {\n\t\t\tif (thread != null) {\n\t\t\t\tthis.modulePlayer.stop();\n\t\t\t\tthis.thread.join();\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void stopVideoPlayer() {\r\n\t\tmediaSrc.stopStream();\r\n\t\tmediaSrc.setObserver(null);\r\n\t\tplayer.setVisible(false);\r\n\t}",
"private void stopThreadByRunnable() {\n if (customRunnable != null) {\n customRunnable.killRunnable();\n }\n }",
"boolean stopThread();",
"@Override\n\tpublic void destroy() {\n\t\tif( null != mLooper ) {\n\t\t\tmLooper.quit();\n\t\t\tmLooper = null;\n\t\t\tmThread = null;\n\t\t}\n\t}",
"@Override\n\tpublic void surfaceDestroyed(SurfaceHolder holder) {\n\t\trunFlag = false;\n\t}",
"public void stopVideo() {\n try {\n texture.getSurfaceTexture().release();\n nodeMediaPlayer.reset();\n nodeMediaPlayer.prepare();\n nodeMediaPlayer.stop();\n nodeMediaPlayer.release();\n nodeMediaPlayer = null;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public synchronized void stop() {\n isRunning = false;\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"private synchronized void stopThreads() {\n if (myGameThread != null) {\n myGameThread.requestStop();\n }\n if (myTumbleweedThread != null) {\n myTumbleweedThread.requestStop();\n }\n if (myMusicMaker != null) {\n myMusicMaker.requestStop();\n }\n myGameThread = null;\n myTumbleweedThread = null;\n myMusicMaker = null;\n }",
"@Override\n\tpublic void surfaceDestroyed(SurfaceHolder arg0) {\n\t\truning = false;\n\t}",
"public synchronized void stop() {\n try {\n thread.join();\n running = false;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public void closeDebugFrame()\n {\n dispose();\n }",
"@Override\n public void surfaceDestroyed(SurfaceHolder holder){\n\n int loopCounter = 0;\n while(retry && loopCounter<1000){\n try {\n //Makes sure that the loop is not infinate\n loopCounter++;\n thread.setRunning(false);\n secondThread.setRunning(false);\n thread.join();\n secondThread.join();\n retry = false;\n // thread = null; //garbage collector can pick up object, less memory usage\n } catch (Exception e){\n e.printStackTrace();\n }\n }\n }",
"public void surfaceDestroyed(SurfaceHolder holder) {\n mCamera.stopPreview();\n mCamera.release();\n mHolder.removeCallback(mPreview);\n preview = false;\n }",
"public void stop(BundleContext context)\n {\n m_shapetracker.close();\n m_frame.setVisible(false);\n m_frame.dispose();\n }"
] |
[
"0.70131284",
"0.6641531",
"0.64737815",
"0.6410361",
"0.63922626",
"0.624994",
"0.6243167",
"0.62302667",
"0.6162503",
"0.61135554",
"0.6047183",
"0.6026484",
"0.6003701",
"0.5981684",
"0.59697336",
"0.5927036",
"0.5903722",
"0.58413935",
"0.58117706",
"0.5795928",
"0.57804143",
"0.5775069",
"0.5774645",
"0.5769169",
"0.57608277",
"0.5752903",
"0.5743202",
"0.5731965",
"0.5731953",
"0.56826586",
"0.56737137",
"0.5664803",
"0.56516284",
"0.56194985",
"0.56166327",
"0.5603889",
"0.55976444",
"0.5589219",
"0.5583768",
"0.5560992",
"0.5550899",
"0.5548268",
"0.5544475",
"0.55409276",
"0.55353266",
"0.55335414",
"0.55326706",
"0.5531609",
"0.5530806",
"0.5515962",
"0.55131245",
"0.5503197",
"0.5489315",
"0.54856205",
"0.5484407",
"0.54798985",
"0.5479814",
"0.54744637",
"0.54682666",
"0.5466295",
"0.54642516",
"0.5459494",
"0.5436813",
"0.54355514",
"0.5429711",
"0.54176337",
"0.5410667",
"0.5406098",
"0.5401962",
"0.5394181",
"0.53912956",
"0.5385888",
"0.5384099",
"0.53705716",
"0.5369913",
"0.5360752",
"0.53568375",
"0.53558826",
"0.5348827",
"0.5343207",
"0.5336682",
"0.5333801",
"0.53314936",
"0.5327025",
"0.5320681",
"0.531773",
"0.53113276",
"0.529956",
"0.5297266",
"0.5295556",
"0.5288398",
"0.5271422",
"0.5269729",
"0.5267993",
"0.5265342",
"0.5242293",
"0.52408683",
"0.52355254",
"0.52129877",
"0.52110714"
] |
0.69635797
|
1
|
La clase format tiene un
|
public static void main(String[] args) {
String mens = String.format( "Se puede maquetar un string incluyendo %s internos", "elementos" );
System.out.println( mens );
mens = String.format( "Los elementos %s y %s se referencian en el mismo orden", "uno", "dos" );
System.out.println( mens );
mens = String.format( "O se pueden cambiar poniendo su posición y $: %2$s y %1$s", "uno", "dos" );
System.out.println( mens );
mens = String.format( "Observa que tras la cadena de formateo se pueden indicar 'n' parámetros: %s, %s, %s, %s...", "uno", "dos", "tres", "cuatro" );
System.out.println( mens );
mens = String.format( "Los formateadores más habituales son 3. El primero es s para strings: %%s %s", "= string" );
System.out.println( mens );
System.out.println( " (Observa cómo para indicar un % en el string de formato tienes que poner dos (%%)" );
System.out.println( "Y cada formateador tiene modificadores." );
mens = String.format( " Por ejemplo la longitud con un número n rellena a blancos %%10s -> '%10s'", "dato" );
System.out.println( mens );
mens = String.format( "El segundo es d para enteros decimales %%d -> '%d'", 15 );
System.out.println( mens );
mens = String.format( " Con modificador de longitud: %%10d -> '%10d'", 15 );
System.out.println( mens );
mens = String.format( " Rellenando a ceros con un 0 por delante: %%010d -> '%010d'", 15 );
System.out.println( mens );
mens = String.format( " Con . de miles: %%,10d -> '%,10d'", 1500000 );
System.out.println( mens );
mens = String.format( "Y el más interesante es f para números reales (flotantes) %%f -> '%f'", 2.5 );
System.out.println( mens );
mens = String.format( " Con modificador de longitud y decimales: %%7.2f -> '%7.2f'", 2.5 );
System.out.println( mens );
System.out.println( " (Observa que redondea a los decimales que se indiquen)" );
mens = String.format( " Con puntos de miles y coma decimal: %%,12.2f -> '%,12.2f'", 25000.0 );
System.out.println( mens );
mens = String.format( "Y por supuesto %s %d son combinables de %.1f maneras", "los", 3, 1000.1 );
System.out.println( mens );
System.out.println( "" );
mens = String.format( "Tienes una descripción completa de las posibilidades de la cadena de formato en\n %s", "https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html#syntax" );
System.out.println( mens );
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String toString() {return classSimpleName+\"#\"+name;}",
"private Format()\n {\n super();\n }",
"protected abstract String format();",
"private Formats() {\n }",
"public String toString(){\n return \"Format: \" + format +\", \" + super.toString(); \n }",
"@Override // prekrytie danej metody predka\r\n public String toString() {\r\n return super.toString()\r\n + \" vaha: \" + String.format(\"%.1f kg,\", dajVahu())\r\n + \" farba: \" + dajFarbu() + \".\";\r\n }",
"@Override\npublic String toString() {// PARA MOSTRAR LOS DATOS DE ESTA CLASE\n// TODO Auto-generated method stub\nreturn MuestraCualquiera();\n}",
"@Override\r\n public String toString() {\r\n return tipo;\r\n }",
"@Override\n public String toString() {\n return \"Class \" + className + \":\\n\" +\n \"\\tFields: \" + fields;\n }",
"@Override\n public String toString() {\n return String.format(\"[%d] [%d]\", dameFila(), dameColumna());\n }",
"private static String classArrayToString(Class[] pts) {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < pts.length; i++) {\n result.append(getTypeName(pts[i]));\n if (i < pts.length - 1)\n result.append(\",\");\n }\n return result.toString();\n }",
"public String getClassConstruct() {\n return super.getClassConstruct();\n }",
"public void parler() {\n\t System.out.println(this.formulerMonNom()); // appel d'une méthode de l'objet\n\t System.out.println(\"Je suis un animal et j'ai \" + this.nombreDePatte + \" pattes\");\n\t }",
"@Override\n public String toString(){\n return \" Vuelo \"+this.getTipo()+\" \" +this.getIdentificador() +\"\\t \"+ this.getDestino()+ \"\\t salida prevista en \" + timeToHour(this.getTiemposal())+\" y su combustible es de \"+this.getCombustible()+\" litros.( \"+ String.format(\"%.2f\", this.getCombustible()/this.getTankfuel()*100) + \"%).\"; \n }",
"public void CrearGrafico() {\r\n String ret = \"\";\r\n String NombreClase = this.generic.getClass().getSimpleName();\r\n ret += \"public \" + NombreClase + \" Crear\" + NombreClase + \"(int Serie) {\\n\";\r\n System.out.println(\"public static \" + NombreClase + \" Crear\" + NombreClase + \"(int Serie) {\");\r\n Field[] declaredFields = this.DeclaredFields;\r\n int NumVariables = this.DeclaredFields.length;\r\n for (int i = 0; i < NumVariables; i++) {\r\n boolean notParseable = false;\r\n String Tipo = declaredFields[i].getType().getSimpleName();\r\n String Dato = declaredFields[i].getName();\r\n switch (Tipo) {\r\n case \"int\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(\"(int) \" + this.SpinnerName + this.NumSpinners + \".getValue();\");\r\n NumSpinners++;\r\n break;\r\n case \"double\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(\"Double.parseDouble(\" + this.getDoubleTextFieldName() + \".getText()\" + \")\");\r\n break;\r\n case \"String\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(this.StrTextFieldName + \".getText();\");\r\n break;\r\n case \"boolean\":\r\n notParseable = false;\r\n System.out.print(\"int op = \");\r\n System.out.println(\"JOptionPane.showConfirmDialog(null, \\\"\" + Dato + \"?\\\");\");\r\n System.out.println(Tipo + \" \" + Dato + \" = \" + \"(op==0);\");\r\n break;\r\n case \"Date\":\r\n notParseable = false;\r\n System.out.println(Tipo + \" \" + Dato + \" = new Date();\");\r\n break;\r\n default:\r\n notParseable = false;\r\n break;\r\n }\r\n // char 34 es ( \" ), tuve que usar char porque no se como poner comillas en los souts...\r\n if (notParseable) {\r\n System.out.print((char) 34);\r\n System.out.print(Dato + \": \");\r\n System.out.print((char) 34);\r\n System.out.println(\"));\");\r\n }\r\n }\r\n NumVariables = this.SuperDeclaredFields.length;\r\n for (int i = 0; i < NumVariables; i++) {\r\n boolean notParseable = false;\r\n String Tipo = this.SuperDeclaredFields[i].getType().getSimpleName();\r\n String Dato = this.SuperDeclaredFields[i].getName();\r\n switch (Tipo) {\r\n case \"int\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(\"(int) \" + this.SpinnerName + this.NumSpinners + \".getValue();\");\r\n NumSpinners++;\r\n break;\r\n case \"double\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(\"Double.parseDouble(\" + this.getDoubleTextFieldName() + \".getText()\" + \");\");\r\n break;\r\n case \"String\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(this.StrTextFieldName + \".getText();\");\r\n break;\r\n case \"boolean\":\r\n notParseable = false;\r\n System.out.print(\"int op = \");\r\n System.out.println(\"JOptionPane.showConfirmDialog(null, \\\"\" + Dato + \"?\\\");\");\r\n System.out.println(Tipo + \" \" + Dato + \" = \" + \"(op==0);\");\r\n break;\r\n case \"Date\":\r\n notParseable = false;\r\n System.out.println(Tipo + \" \" + Dato + \" = new Date();\");\r\n break;\r\n default:\r\n notParseable = false;\r\n break;\r\n }\r\n // char 34 es ( \" ), tuve que usar char porque no se como poner comillas en los souts...\r\n if (notParseable) {\r\n System.out.print((char) 34);\r\n System.out.print(Dato + \": \");\r\n System.out.print((char) 34);\r\n System.out.println(\"));\");\r\n }\r\n }\r\n\r\n System.out.print(NombreClase + \" c = new \" + NombreClase + \"(\");\r\n /*\r\n -------------OJO----------------------\r\n Aqui no pude hacer que tirara los valores que queria en el orden que es, si alguien quiere Arreglarlo, digame.\r\n En la parte que es: \r\n \r\n NombreClase c = new NombreClase();\r\n \r\n Poner Ctrl+Space y enter en medio de los parentesis y Netbeans Automaticamente hace el que tiene mas sentido\r\n --------------------------------------\r\n */\r\n System.out.println(\");\");\r\n System.out.println(\"return c;\");\r\n System.out.println(\"}\");\r\n System.out.println(\"\");\r\n }",
"private String render(OWLClass cls) {\n\t\treturn ren.render(cls).replaceAll(\"'\", \"\").replaceAll(\" \", \"\");\n\t}",
"public void Crear() {\r\n String ret = \"\";\r\n String NombreClase = this.generic.getClass().getSimpleName();\r\n ret += \"public static \" + NombreClase + \" Crear\" + NombreClase + \"(int Serie) {\\n\";\r\n System.out.println(\"public static \" + NombreClase + \" Crear\" + NombreClase + \"(int Serie) {\");\r\n int NumVariables = this.generic.getClass().getSuperclass().getDeclaredFields().length;\r\n int NumVariables2 = this.generic.getClass().getDeclaredFields().length;\r\n Field[] SuperDeclaredFields = this.generic.getClass().getSuperclass().getDeclaredFields();\r\n Field[] DeclaredFields = this.generic.getClass().getDeclaredFields();\r\n for (int i = 0; i < NumVariables; i++) {\r\n boolean notParseable = true;\r\n String Tipo = SuperDeclaredFields[i].getType().getSimpleName();\r\n String Dato = SuperDeclaredFields[i].getName();\r\n switch (Tipo) {\r\n case \"int\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.print(\"Integer.parseInt(JOptionPane.showInputDialog(\");\r\n break;\r\n case \"double\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.print(\"Double.parseDouble(JOptionPane.showInputDialog(\");\r\n break;\r\n case \"String\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.print(\"(JOptionPane.showInputDialog(\");\r\n break;\r\n case \"boolean\":\r\n notParseable = false;\r\n System.out.print(\"int op = \");\r\n System.out.println(\"JOptionPane.showConfirmDialog(null, \\\"\" + Dato + \"?\\\");\");\r\n System.out.println(Tipo + \" \" + Dato + \" = \" + \"(op==0);\");\r\n break;\r\n case \"Date\":\r\n notParseable = false;\r\n System.out.println(Tipo + \" \" + Dato + \" = new Date();\");\r\n break;\r\n default:\r\n notParseable = false;\r\n break;\r\n }\r\n // char 34 es ( \" ), tuve que usar char porque no se como poner comillas en los souts...\r\n if (notParseable) {\r\n System.out.print((char) 34);\r\n System.out.print(Dato + \": \");\r\n System.out.print((char) 34);\r\n System.out.println(\"));\");\r\n }\r\n }\r\n for (int i = 0; i < NumVariables2; i++) {\r\n boolean notParseable = true;\r\n String Tipo = DeclaredFields[i].getType().getSimpleName();\r\n String Dato = DeclaredFields[i].getName();\r\n switch (Tipo) {\r\n case \"int\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.print(\"Integer.parseInt(JOptionPane.showInputDialog(\");\r\n break;\r\n case \"double\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.print(\"Double.parseDouble(JOptionPane.showInputDialog(\");\r\n break;\r\n case \"String\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.print(\"(JOptionPane.showInputDialog(\");\r\n break;\r\n case \"boolean\":\r\n notParseable = false;\r\n System.out.print(\"int op = \");\r\n System.out.println(\"JOptionPane.showConfirmDialog(null, \\\"\" + Dato + \"?\\\");\");\r\n System.out.println(Tipo + \" \" + Dato + \" = \" + \"(op==0);\");\r\n break;\r\n case \"Date\":\r\n notParseable = false;\r\n System.out.println(Tipo + \" \" + Dato + \" = new Date();\");\r\n break;\r\n default:\r\n notParseable = false;\r\n break;\r\n }\r\n // char 34 es ( \" ), tuve que usar char porque no se como poner comillas en los souts...\r\n if (notParseable) {\r\n System.out.print((char) 34);\r\n System.out.print(Dato + \": \");\r\n System.out.print((char) 34);\r\n System.out.println(\"));\");\r\n }\r\n }\r\n\r\n System.out.print(NombreClase + \" c = new \" + NombreClase + \"(\");\r\n /*\r\n -------------OJO----------------------\r\n Aqui no pude hacer que tirara los valores que queria en el orden que es, si alguien quiere Arreglarlo, digame.\r\n En la parte que es: \r\n \r\n NombreClase c = new NombreClase();\r\n \r\n Poner Ctrl+Space y enter en medio de los parentesis y Netbeans Automaticamente hace el que tiene mas sentido\r\n --------------------------------------\r\n */\r\n /*System.out.print(\"Serie, \");\r\n for (int i = 0;i<NumVariables;i++) {\r\n System.out.print(Variables.get(i)+\", \");\r\n }*/\r\n System.out.println(\");\");\r\n System.out.println(\"return c;\");\r\n System.out.println(\"}\");\r\n System.out.println(\"\");\r\n }",
"public Pengenalan(){ //Constructor (Nama harus sama dengan Class)\n System.out.println(\"\\nConstructor : \");\n System.out.println(\"Dibutuhkan untuk pemanggilan saat diimport oleh Class lain atau Class sendiri\");\n methode();\n int men = menthos();\n System.out.println(\"Nilai yang didapat dari method menthos : \"+men);\n }",
"public static void printClassAll(Object _class[][],int line,int column){\r\n \r\n for (int i = 0; i < line; i++) {\r\n for (int j = 0; j < column; j++) {\r\n if(_class[i][j] != null){\r\n int array[] = (int[]) _class[i][j];\r\n String label = DadosEngenhariaComputacaoMatutino.getClassLabel(array[0]).trim();\r\n int lengthLabel = label.length();\r\n \r\n while(label.length() <6)\r\n label = label+\" \";\r\n \r\n System.out.print(label);//Label disciplina\r\n System.out.print(\"????? \");//professor\r\n String periodo = \"\";\r\n if(array[2] < 10)\r\n periodo = \"0\"+array[2];\r\n else if(array[2] < 99)\r\n periodo = \"\"+array[2];\r\n \r\n System.out.print(periodo+\" \");//periodo\r\n System.out.print(array[3]+\" \");//Carga Horaria\r\n System.out.print(CONSTANTS.getNameTypeClass(array[4])+\" \");//Tipo de Sala\r\n String sala = \"\";\r\n if(array[5] < 10)\r\n sala = \"00\"+array[5];\r\n else if(array[5] < 100)\r\n sala = \"0\"+array[5];\r\n else\r\n sala = \"0\"+array[5];\r\n System.out.print(\" \"+sala);// Sala\r\n System.out.print(\"|\");\r\n }\r\n else{\r\n System.out.print(\" - |\");\r\n }\r\n \r\n }\r\n System.out.println();\r\n }\r\n }",
"@VTID(8)\r\n java.lang.String format();",
"public String toString(){\n \tint longest = longestClassName;\n StringBuffer sb = new StringBuffer();\n PrintfFormat\tformat = null;\n \n if (attributeDefinitions.getLongestName() > longest)\n \tlongest = attributeDefinitions.getLongestName();\n \n String\tlongestStr = \"\" + longest;\n format = new PrintfFormat(\"%-\" + longestStr + \"s \");\n\n sb.append(\"*** Attributes\\n\");\n TreeMap<DefinitionName,AttributeDefinition> sattrs = new TreeMap<DefinitionName, AttributeDefinition>();\n \n for(AttributeDefinition ad: attributeDefinitions.values())\n \tsattrs.put(ad.getName(), ad);\n \n for(AttributeDefinition ad : sattrs.values())\n sb.append(format.sprintf(ad.getObjectName()) + ad.getDefinedIn().getName() + \"\\n\");\n \n sb.append(\"*** Classes\\n\");\n// TreeMap<DefinitionName,ClassDefinition> scdefs = new TreeMap<DefinitionName, ClassDefinition>();\n// \n// for(ClassDefinition cd : classDefs.values())\n// \tscdefs.put(cd.getName(), cd);\n// \n// for(ClassDefinition cd : scdefs.values()){\n// sb.append(format.sprintf(cd.getObjectName()));\n// if (cd.getAbbrev() != null)\n// sb.append(\" AB \" + cd.getAbbrev());\n// sb.append(cd.getDefinedIn().getName() + \"\\n\");\n// }\n \n for(ClassDefinition cd : classDefinitions.values()){\n sb.append(format.sprintf(cd.getObjectName()));\n if (cd.getAbbrev() != null)\n sb.append(\" AB \" + cd.getAbbrev());\n sb.append(cd.getDefinedIn().getName() + \"\\n\");\n }\n \n return(new String(sb.toString()));\n }",
"private static String getFormattedProductClass(SessionProductClass spc)\n {\n if(null == spc)\n {\n return NONE;\n }\n\n try\n {\n return PC_FORMATTER.format(spc, PC_FORMATTER.CLASS_TYPE_NAME);\n }\n catch(Exception e)\n {\n GUILoggerHome.find().exception(\n GUILoggerSABusinessProperty.PROPERTY_SERVICE + \".getFormattedProductClass(spc)\",\n \" Exception while formatting the SessionProductClass :\", e);\n return FAILED;\n }\n }",
"@Override\n public String toString() {\n // Chargement du traducteur\n final ResourceBundle bundle = GeneralConstant.BUNDLE;\n switch (this) {\n // Classe Archer\n case ARCHER:\n return bundle.getString(\"ARCHER\");\n // Classe Assassin\n case ASSASSIN:\n return bundle.getString(\"ASSASSIN\");\n // Classe Mage Noir\n case BLACKMAGE:\n return bundle.getString(\"BLACKMAGE\");\n // Aucune classe\n case NONE:\n return bundle.getString(\"NONE\");\n // Classe PnJ\n case PNJ:\n return bundle.getString(\"PNJ\");\n // Classe Guerrier\n case WARRIOR:\n return bundle.getString(\"WARRIOR\");\n // Classe Magicien Blanc\n case WHITEMAGE:\n return bundle.getString(\"WHITEMAGE\");\n // Classe par défaut (NONE)\n default:\n return bundle.getString(\"NONE\");\n }\n }",
"@Override\r\n\tpublic String toString() {\n\t\treturn this.titolo + \" \" +this.autore + \" \" + this.genere;\r\n\t}",
"@Override\n protected String className(ClassType t, boolean longform, Locale locale) {\n Symbol sym = t.tsym;\n if (sym.name.length() == 0 && (sym.flags() & COMPOUND) != 0) {\n return OBJECT;\n } else if (sym.name.length() == 0) {\n // Anonymous\n String s;\n ClassType norm = (ClassType) t.tsym.type;\n if (norm == null) {\n s = OBJECT;\n } else if (norm.interfaces_field != null && norm.interfaces_field.nonEmpty()) {\n s = visit(norm.interfaces_field.head, locale);\n } else {\n s = visit(norm.supertype_field, locale);\n }\n return s;\n } else if (longform) {\n String pkg = \"\";\n for (Symbol psym = sym; psym != null; psym = psym.owner) {\n if (psym.kind == PCK) {\n pkg = psym.getQualifiedName().toString();\n break;\n }\n }\n return fullClassNameAndPackageToClass.apply(\n sym.getQualifiedName().toString(),\n pkg\n );\n } else {\n return sym.name.toString();\n }\n }",
"@Override\n public String toString() { // for request attribute logging\n return DfTypeUtil.toClassTitle(this) + \":{messages=\" + messages + \"}@\" + Integer.toHexString(hashCode());\n }",
"@Override \n public String toString() {\n return getName() + \"(\" + getClass().getName() + \")\";\n }",
"public String ToStringClass()\n\t{\n\t\tif (!_canonical)\n\t\t{\n\t\t\tCanonicalize();\n\t\t}\n\n\t\t// make a guess about the length of the ranges. We'll update this at the end. \n\t\t// This is important because if the last range ends in LastChar, we won't append\n\t\t// LastChar to the list. \n\t\tint rangeLen = _rangelist.size() * 2;\n\t\tStringBuilder sb = new StringBuilder(rangeLen + _categories.length() + 3);\n\n\t\tint flags;\n\t\tif (_negate)\n\t\t{\n\t\t\tflags = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tflags = 0;\n\t\t}\n\n\t\tsb.append((char) flags);\n\t\tsb.append((char) rangeLen);\n\t\tsb.append((char) _categories.length());\n\n\t\tfor (int i = 0; i < _rangelist.size(); i++)\n\t\t{\n\t\t\tSingleRange currentRange = _rangelist.get(i);\n\t\t\tsb.append(currentRange._first);\n\n\t\t\tif (currentRange._last != Lastchar)\n\t\t\t{\n\t\t\t\tsb.append((char)(currentRange._last + 1));\n\t\t\t}\n\t\t}\n\n\t\tsb.setCharAt(SETLENGTH, (char)(sb.length() - SETSTART));\n\n\t\tsb.append(_categories);\n\n\t\tif (_subtractor != null)\n\t\t{\n\t\t\tsb.append(_subtractor.ToStringClass());\n\t\t}\n\n\t\treturn sb.toString();\n\t}",
"private String name() {\r\n return cls.getSimpleName() + '.' + mth;\r\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"class FatherClass\";\n\t}",
"@Override\n public String toString(){\n return \"G(\"+this.getVidas()+\")\";\n }",
"public static String formatNameForClassLoading(String name) {\n if (name == null) {\n return \"java.lang.Object;\";\n }\n\n if (name.equals(\"int\")\n || name.equals(\"long\")\n || name.equals(\"short\")\n || name.equals(\"float\")\n || name.equals(\"double\")\n || name.equals(\"byte\")\n || name.equals(\"char\")\n || name.equals(\"boolean\")\n || name.equals(\"void\")\n ) {\n return name;\n }\n\n if (name.startsWith(\"[\")) {\n return name.replace('/', '.');\n }\n\n if (name.startsWith(\"L\")) {\n name = name.substring(1);\n if (name.endsWith(\";\")) {\n name = name.substring(0, name.length() - 1);\n }\n return name.replace('/', '.');\n }\n\n String prefix = \"\";\n if (name.endsWith(\"[]\")) { // todo need process multi\n prefix = \"[\";\n name = name.substring(0, name.length() - 2);\n if (name.equals(\"int\")) {\n return prefix + \"I\";\n } else if (name.equals(\"long\")) {\n return prefix + \"J\";\n } else if (name.equals(\"short\")) {\n return prefix + \"S\";\n } else if (name.equals(\"float\")) {\n return prefix + \"F\";\n } else if (name.equals(\"double\")) {\n return prefix + \"D\";\n } else if (name.equals(\"byte\")) {\n return prefix + \"B\";\n } else if (name.equals(\"char\")) {\n return prefix + \"C\";\n } else if (name.equals(\"boolean\")) {\n return prefix + \"Z\";\n } else {\n return prefix + \"L\" + name.replace('/', '.') + \";\";\n }\n }\n return name.replace('/', '.');\n\n }",
"void format();",
"public DefaultFormat() {\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"string dari class Main\";\n\t}",
"public MapperDeSalidaExcepcionFormat() {\n super();\n listaMappeo = new LinkedList();\n }",
"public telefono(){\n this.telefono =\"00000000\";\n this.saldo = 0.0;\n this.marca= \"Sin Marca\";\n }",
"@Override\npublic String toString() {\n\treturn (super.toString()+\"\"+this.matiere);\n}",
"@Override\r\n public String toString() {\r\n \treturn \"{ id : \" + getId() + \", costo : \\\"\" + getCosto() + \", fecha : \\\"\" + getFecha() + \"\\\" }\" ; \r\n }",
"public void formatPrint() {\n\t\tSystem.out.printf(\"%8d \", codigo);\n\t\tSystem.out.printf(\"%5.5s \", clase);\n\t\tSystem.out.printf(\"%5.5s \", par);\n\t\tSystem.out.printf(\"%5.5s \", nombre);\n\t\tSystem.out.printf(\"%8d \", comienza);\n\t\tSystem.out.printf(\"%8d\", termina);\n\t}",
"@Override\n public Writable formatEntity(Entity entity) {\n /* Create HTML list. */\n HtmlElem list = new HtmlElem(\"ul\");\n /* Get the class. */\n Class _Class = (Class) entity;\n /* Fill the list that will represent the class with its values. */\n list.with(li(text(\"Class ID: \" + _Class.getId())))\n .with(li(text(\"Course Name: \" + _Class.getcName())))\n .with(li(text(\"Academic Year: \" + _Class.getaYear())))\n .with(li(text(\"Academic Semester: \" + _Class.getaSemester())));\n return list;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn String.format(\"Tam giac ten: %s, Do dai ba canh lan luot: %f %f %f\", ten,canhA,canhB,canhC);\n\t}",
"public void generarCodigo(){\r\n this.setCodigo(\"c\"+this.getNombre().substring(0,3));\r\n }",
"public abstract String getNomClasse();",
"@NonNull\n public String toString(){\n return this.hora+\":\"+this.minutos+\" \"+this.segundos+\" Sec \"+this.dia+\"/\"+this.mes+\"/\"+this.anno;\n }",
"public String toString() {\n\t\treturn \"\" + type + \",\" + (rempli ? \"p\" : \"v\") + \",\" +\n\t\t\t\tx + \",\" + y + \",\" + largeur + \",\" + hauteur + \",\"\n\t\t\t\t+ Integer.toHexString(couleur.getRGB() & 0xffffff);\n\t}",
"public abstract String format(T t);",
"private FormatUtilities() {}",
"private String formulerMonNom() {\n\t return \"Je m'appelle \" + this.nom; // appel de la propriété nom\n\t }",
"@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \" Corrente :\"+ super.getNumero();\n\t}",
"@Override\n\tpublic void outAClass(AClass node) {\n\t\tcreateConstructor();\n\t\tString directory = this.fileName.substring(0,\n\t\t\t\tthis.fileName.lastIndexOf(File.separatorChar));\n\t\ttry{\n\t\t\tcg.getJavaClass().dump( directory +\"/\" + node.getType().getText() + \".class\");\n\t\t}catch (IOException e ){\n\t\t\tErrorList.add(node,\"Could not save file : \" + e.getMessage() , fileName); \n\t\t}\n\t\tcurrentClass = null; \n\t}",
"@Override\r\n public String toString() {\r\n \r\n DateFormat data = DateFormat.getDateInstance();\r\n return \"Nome: \" + getNome()+ \" \\nCPF: \" + getCpf() + \" \\nTelefone: \"\r\n + getTelefone() + \" \\nData de Nascimento : \" + data.format(getDataNasc())\r\n + \" \\nSexo: \" + getSexo();\r\n }",
"public static void main(String[] args) {\n Pasien Dam = new Pasien(\"Puspaningsyas\");\r\n Dam.setTanggalLahir(1974, 1, 12);\r\n// String str = Dam.getNama();\r\n \r\n \r\n\r\n System.out.println(\"Umur = \" + Dam.getUsia());\r\n Dam.NomorRekamMedis();\r\n // System.out.println(str.substring(0, 3));\r\n\r\n// Pasien Dam2 = new Pasien(\"Dam\");\r\n// Dam2.setTanggalLahir(1999,3,13);\r\n// System.out.println(\"Umur = \" +Dam2.getUsia());\r\n }",
"public String represent();",
"protected String getToStringFormat()\n {\n return getClass().getSimpleName() + \"@\"\n + Integer.toHexString(hashCode()) + \": { \"\n + \"offset = 0x\" + Integer.toHexString(offset) + \"; \"\n + \"size = \" + size + \"; \"\n + \"%s\"\n + \"value = \" + getValue() + \"; \"\n + \"isAccessible = \" + isAccessible() + \"; \"\n + \"checksum = 0x\" + Integer.toHexString(checksum()) + \"; \"\n + \"}\";\n }",
"public String toString() {\n\t\treturn \"(\" + this.primeiro + \",\" + this.segundo + \")\";\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn \" id=\" + id + \", nome=\" + nome + \", dat_nasc=\"\r\n\t\t\t\t+ dat_nasc + \", salario=\" + salario + \" \\n \";\r\n\t}",
"public String flatten() {\n\t\tString data;\n\t\t// We use simple name, because the fleshed out version of this class is\n\t\t// in the default package for data types: de.nec.nle.siafu.data\n\t\tString fullClassName = this.getClass().getName();\n\t\tString className = fullClassName.substring(fullClassName\n\t\t\t\t.lastIndexOf(\".\") + 1);\n\t\tdata = className + \":\";\n\t\tdata += b;\n\t\treturn data;\n\t}",
"public String toString()\n {\n //creates a string of the class's variables in a readable format.\n String s = String.format(\"%-14s%-3d%3s\" +lineNums.toString(), word, count,\"\");\n return s.toString();\n }",
"public String toString()\n\t{\n\t\tField[] fields = this.getClass().getDeclaredFields();\n\t\tint i, max = fields.length;\n\t\tString fieldName = \"\";\n\t\tString fieldType = \"\";\n\t\tString ret = \"\";\n\t\tString value = \"\";\n\t\tboolean skip = false;\n\t\tint j = 0;\n\t\tfor(i = 0; i < max; i++)\n\t\t{\n\t\t\tfieldName = fields[i].getName().toString();\n\t\t\tfieldType = fields[i].getType().toString();\n\t\t\tif(i == 0)\n\t\t\t{\n\t\t\t\tret += \"{\";\n\t\t\t}\n\t\t\tif(fieldType.equals(\"int\") || fieldType.equals(\"long\") || fieldType.equals(\"float\") || fieldType.equals(\"double\") || fieldType.equals(\"boolean\"))\n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tvalue = fields[i].get(this).toString();\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) \n\t\t\t\t{\n\t\t\t\t\tvalue = \"0\";\n\t\t\t\t}\n\t\t\t\tskip = false;\n\t\t\t}\n\t\t\telse if(fieldType.contains(\"String\"))\n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tvalue = \"\\\"\"+Utility.escapeJSON((String) fields[i].get(this))+\"\\\"\";\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) \n\t\t\t\t{\n\t\t\t\t\tvalue = \"\\\"\"+\"\\\"\";\n\t\t\t\t}\n\t\t\t\tskip = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvalue = \"\\\"\"+\"\\\"\";\n\t\t\t\tskip = true;\n\t\t\t}\n\t\t\tif(!skip)\n\t\t\t{\n\t\t\t\tif(j > 0)\n\t\t\t\t{\n\t\t\t\t\tret += \",\";\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t\tret += \"\\r\\n\\t\\\"\"+fieldName+\"\\\":\"+value;\n\t\t\t}\n\t\t\tif(i == max-1)\n\t\t\t{\n\t\t\t\tret += \"\\r\\n}\";\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"@Override\n public String toString() {\n return super.toString().replaceAll(\"_\", \" \");\n }",
"@Override\n public String toString() {\n return super.toString().replaceAll(\"_\", \" \");\n }",
"public String Mostrar() {\r\n Generic c = this.generic;\r\n String Ret = \"\";\r\n System.out.println(c.getClass().getName());\r\n Ret += c.getClass().getName() + \"\\n\";\r\n System.out.println(c.getClass().getSimpleName());\r\n Ret += c.getClass().getSimpleName() + \"\\n\";\r\n System.out.println(\"Numero de Metodos: \" + c.getClass().getMethods().length);\r\n Ret += \"Numero de Metodos: \" + c.getClass().getMethods().length;\r\n System.out.println(\"Is extended by: \" + c.getClass().getSuperclass().getSimpleName());\r\n Ret += \"Is extended by: \" + c.getClass().getSuperclass().getSimpleName() + \"\\n\";\r\n System.out.println(\"Numero de atributos: \" + c.getClass().getDeclaredFields().length);\r\n Ret += \"Numero de atributos: \" + c.getClass().getDeclaredFields().length + \"\\n\";\r\n System.out.println(\"Numero de atributos (Superclase) : \" + c.getClass().getSuperclass().getDeclaredFields().length);\r\n Ret += \"Numero de atributos (Superclase) : \" + c.getClass().getSuperclass().getDeclaredFields().length + \"\\n\";\r\n Field[] declaredFields = c.getClass().getDeclaredFields();\r\n Field[] SuperDeclaredFields = this.SuperDeclaredFields;\r\n for (int i = 0; i < SuperDeclaredFields.length; i++) {\r\n System.out.println(SuperDeclaredFields[i].getType().getSimpleName() + \" \" + SuperDeclaredFields[i].getName() + \";\");\r\n Ret += SuperDeclaredFields[i].getType().getSimpleName() + \" \" + SuperDeclaredFields[i].getName() + \";\";\r\n }\r\n for (int i = 0; i < declaredFields.length; i++) {\r\n System.out.println(declaredFields[i].getType().getSimpleName() + \" \" + declaredFields[i].getName() + \";\");\r\n Ret += declaredFields[i].getType().getSimpleName() + \" \" + declaredFields[i].getName() + \";\";\r\n }\r\n return Ret;\r\n }",
"@Override\n public String toString() {\n return \"\\tMunicipio: \" + municipio + \"\\t\" + \"Habitantes: \" + habitantes + \".\";\n }",
"public String toString() {\n\n String str = super.toString() + \"; descriptor for class: \";\n\n //-- add class name\n if (_class != null)\n str += _class.getName();\n else\n str += \"[null]\";\n\n //-- add xml name\n str += \"; xml name: \" + _xmlName;\n\n return str;\n }",
"public String toString() {\r\n\t\t//return \"Desastre(\"\r\n\t\t\t\t//+ \")\";\r\n\t\treturn SReflect.getInnerClassName(getClass())+\r\n\t\t\t\t\" id=\"+getId()+\", estadoemergencia=\"+getEstadoEmergencia()+\", heridos=\"+getEstadoHeridos();\r\n\t}",
"@Override\n public String toString() {\n return \"Libro{\" + \"idLibro=\" + idLibro + \", titulo=\" + titulo + \", autor=\" + autor + \", editorial=\" + editorial + \", isbn=\" + isbn + \", genero=\" + genero + \", cantidadTotal=\" + cantidadTotal + \", cantidadDisponible=\" + cantidadDisponible + \", descargable=\" + descargable + \", linkDescarga=\" + linkDescarga + \", bibliotecario=\" + bibliotecario + '}';\n }",
"@Override\n public String toString(){\n String resultado;\n resultado = \"Número Finca: \" + this.getNumFinca() + \"\\n\"\n + \"Modalidad: \" + this.getModalidad() + \"\\n\"\n + \"Área terreno: \" + this.getAreaTerreno() + \"\\n\"\n + \"Valor metro cuadrado: \" + this.getValorMetroCuadrado() + \"\\n\"\n + \"Precio: \" + this.getPrecio() + \"\\n\"\n + \"Provincia: \" + this.getProvincia() + \"\\n\"\n + \"Cantón: \" + this.getCanton()+ \"\\n\"\n + \"Distrito: \" + this.getDistrito()+ \"\\n\"\n + \"Direccion exacta: \" + this.getDirExacta()+ \"\\n\"\n + \"Tipo: \" + this.getTipo() + \"\\n\";\n return resultado;\n }",
"public String toString() {\r\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"dd/MM/yyyy\"); //Mostraremos la fecha en formato DD/MM/AAAA\r\n\t\tString nacEdad=sdf.format(fechaNac)+ \"(\"+obtenerAnios()+\" años)\";\r\n\t\treturn \"Persona [nombre=\" + nombre + \", fechaNac=\" + nacEdad + \", DNI=\" + dni\r\n\t\t\t\t+ \", sexo=\" + sexo + \", peso=\" + peso + \", altura=\" + altura\r\n\t\t\t\t+ \"]\";\r\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn \"Nombre: \"+this.nombre+\" Cantidad: \"+this.cantidad+\" \"+this.unidadMedida;\n\t}",
"public void crearClase() {\r\n\t\tsetClase(3);\r\n\t\tsetTipoAtaque(3);\r\n\t\tsetArmadura(15);\r\n\t\tsetModopelea(0);\r\n\t}",
"@Override\n public String toString() {\n return tla;\n }",
"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 }",
"public String classOut() {\n\t\tStringBuilder s = new StringBuilder();\n\t\ts.append(objective());\n\t\ts.append(' ');\n\t\ts.append(optimal() ? 1 : 0);\n\t\ts.append('\\n');\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ts.append(item(i) ? 1 : 0);\n\t\t\ts.append(i < n - 1 ? ' ' : '\\n');\n\t\t}\n\t\treturn s.toString();\n\t}",
"Casilla(String nombre){\n this.nombre=nombre; \n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"ContaCorrente Numero : \" + numero + \", Tipo : \" + tipo + \"\"\n\t\t\t\t+ \", Solde : R$ \" + solde + \"\\n\";\n\t}",
"public String toString() {\n\t\treturn \"(\" + obtenerFila() + \"/\" + obtenerColumna() + \")\";\n\t}",
"public ClassCreator(){\n\n\n\t\tScanner fin = null;\n\n\t\ttry {\n\t\t\tString[] nameHandler = fileName.split(\"\\\\.\");\n\n\t\t\tString className = nameHandler[0].replaceAll(\" |_|\\\\s$|0|1|2|3|4|5|6|7|8|9\", \"\");\n\n\n\t\t\t//Setting Up Scanners/PrintWriter\n\t\t\tfin = new Scanner(new File(fileName));\n\n\n\t\t\tPrintWriter pw = new PrintWriter(className + \".java\");\n\n\n\t\t\tString[] prop = fin.nextLine().split(\"\\t\");\n\t\t\tString[] data = fin.nextLine().split(\"\\t\");\n\n\t\t\tfor(int i = 0; i<prop.length; i++) {\n\t\t\t\tpropertyList.add(new Properties(prop[i].replaceAll(\"\\\\s\", \"\"), getDataType(data[i])));\n\t\t\t}\n\n\t\t\t//Imports\n\t\t\tpw.println(\"import java.util.Scanner;\\n\\n\");\n\t\t\t\n\t\t\t//Class Line\n\t\t\tpw.println(\"\\npublic class \" + className + \" {\");\n\n\t\t\t//Properties\n\t\t\tpw.println(\"\\n\\t//======================================================= Properties\\n\");\n\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateProperty());\n\t\t\t}\n\n\t\t\t//Constructors\n\t\t\tpw.println(\"\\n\\t//======================================================= Constructors\\n\");\n\n\t\t\t//================= Workhorse Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getDataType() + \" \" + propertyList.get(i).getFieldName() + \", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getDataType() + \" \" \n\t\t\t\t\t+ propertyList.get(propertyList.size()-1).getFieldName() + \"){\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetCall(p));\n\t\t\t}\n\t\t\tpw.println(\"\\t}\\n\");\n\n\t\t\t//================= Scanner Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(Scanner fin) throws Exception {\\n\");\n\t\t\tpw.println(\"\\t\\tString[] parts = fin.nextLine().split(\\\"\\\\t\\\");\");\n\t\t\tint arrayCount = 0;\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tif(p.getDataType().equals(\"int\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Integer.parseInt(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"double\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Double.parseDouble(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"long\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Long.parseLong(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"boolean\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Boolean.parseBoolean(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpw.println(p.generateSetCall(\"parts[\" + arrayCount + \"]\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tpw.println(\"\\n\\t}\");\n\n\t\t\t//Methods\n\t\t\tpw.println(\"\\n\\t//======================================================= Methods\\n\");\n\n\t\t\t\t//Equals\n\t\t\tpw.println(\"\\tpublic boolean equals(Object obj) {\");\n\t\t\tpw.println(\"\\t\\tif(!(obj instanceof \" + className + \")) return false;\");\n\t\t\tpw.println(\"\\t\\t\" + className + \" \" + className.substring(0,1).toLowerCase() + \" = (\" + className + \")obj;\");\n\t\t\tpw.println(\"\\t\\treturn getEqualsString().equals(\" + className.substring(0,1).toLowerCase() + \".getEqualsString());\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//EqualsHelper\n\t\t\tpw.println(\"\\n\\tprivate String getEqualsString() {\");\n\t\t\tpw.print(\"\\t\\treturn \");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getFieldName() + \" + \\\"~\\\" + \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//toString\n\t\t\tpw.println(\"\\n\\tpublic String toString() {\");\n\t\t\tpw.print(\"\\t\\treturn \\\"\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).generateUpperCase() + \": \\\" + \" + propertyList.get(i).getFieldName() + \" + \\\", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).generateUpperCase() + \": \\\" + \" + propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\n\t\t\t//Getters/Setters\n\t\t\tpw.println(\"\\n\\t//======================================================= Getters/Setters\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateGetter());\n\t\t\t}\n\t\t\tpw.println();\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetter());\n\t\t\t}\n\n\t\t\t//End of the file code\n\t\t\tpw.print(\"\\n\\n}\");\n\t\t\tfin.close();\n\t\t\tpw.close();\n\n\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t} finally { //Checked Last after try\n\t\t\ttry {fin.close();} catch (Exception e) {} //Just Double Checking\n\n\t\t}\n\n\n\n\n\t}",
"public DecimalFormatObjectDescription(final Class className) {\n super(className, false);\n setParameterDefinition(\"localizedPattern\", String.class);\n setParameterDefinition(\"pattern\", String.class);\n setParameterDefinition(\"decimalFormatSymbols\", DecimalFormatSymbols.class);\n setParameterDefinition(\"decimalSeparatorAlwaysShown\", Boolean.TYPE);\n setParameterDefinition(\"groupingSize\", Integer.TYPE);\n setParameterDefinition(\"groupingUsed\", Boolean.TYPE);\n setParameterDefinition(\"maximumFractionDigits\", Integer.TYPE);\n setParameterDefinition(\"maximumIntegerDigits\", Integer.TYPE);\n setParameterDefinition(\"minimumFractionDigits\", Integer.TYPE);\n setParameterDefinition(\"minimumIntegerDigits\", Integer.TYPE);\n setParameterDefinition(\"multiplier\", Integer.TYPE);\n setParameterDefinition(\"negativePrefix\", String.class);\n setParameterDefinition(\"negativeSuffix\", String.class);\n// setParameterDefinition(\"parseBigDecimal\", Boolean.TYPE);\n setParameterDefinition(\"parseIntegerOnly\", Boolean.TYPE);\n setParameterDefinition(\"positivePrefix\", String.class);\n setParameterDefinition(\"positiveSuffix\", String.class);\n ignoreParameter(\"localizedPattern\");\n ignoreParameter(\"pattern\");\n }",
"GorgeousFormatter() {\r\n\t\t}",
"Object getFormat();",
"@Override\n\tpublic String toString() {\n\t\treturn hablar() + \"\\nSexo \" + this.sexo + \" mi edad es de \" + this.edad + \" vuelo a \" + this.velocidadVuelo + \" Km/h\" + \" y peso \" + this.peso + \" Kg\";\n\t}",
"public String toString(){\n \n \t\t return \"make:\"+this.make+\" ,model:\"+this.model+\",year:\"+this.year+\",Mileage\"+this.mileage;\n\t}",
"public final String toStringClassName() {\r\n \t\tString str = this.getClass().getName();\r\n \t\tint lastIx = str.lastIndexOf('.');\r\n \t\treturn str.substring(lastIx+1);\r\n \t}",
"Object getClass_();",
"Object getClass_();",
"@Override\n public final String toString() {\n \t\n \treturn String.format(\"[%1$s [%2$s\\t%3$s\\t%4$s]%1$s [%5$s\\t%6$s\\t%7$s]%1$s [%8$s\\t%9$s\\t%10$s] ]\", System.getProperty(\"line.separator\"), this.m00, this.m01, this.m02,\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t this.m10, this.m11, this.m12,\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t this.m20, this.m21, this.m22);\n }",
"@Override\n public String toString() {\n // TODO this is a sudo method only for testing puroposes\n return \"{name: 5aled, age:15}\";\n }",
"@Override\n public String toString() {\n DateTimeFormatter df = DateTimeFormatter.ofPattern(\"dd MMM yyyy HHmm\");\n return \"[\" + super.getType() + \"]\" + super.toString() + \" (by: \" + df.format(this.date) + \")\";\n }",
"public String toString()\r\n/* 189: */ {\r\n/* 190:321 */ return this.autorizacion;\r\n/* 191: */ }",
"public String tipoConta() {\n return \"Conta Comum\";\n }",
"public String toString() {\r\n StringBuffer out = new StringBuffer(this.getDaogenVersion());\r\n out.append(\"\\nclass DetArqueoRunt, mapping to table DetArqueoRunt\\n\");\r\n out.append(\"Persistent attributes: \\n\"); \r\n out.append(\"IDDETARQUEO = \" + this.IDDETARQUEO + \"\\n\"); \r\n out.append(\"FAC_VLT = \" + this.FAC_VLT + \"\\n\"); \r\n out.append(\"IDPAGORUNT = \" + this.IDPAGORUNT + \"\\n\"); \r\n out.append(\"FAC_NRO = \" + this.FAC_NRO + \"\\n\"); \r\n out.append(\"FECHAPAGOFACTURA = \" + this.FECHAPAGOFACTURA + \"\\n\"); \r\n out.append(\"VALORPAGOMT = \" + this.VALORPAGOMT + \"\\n\"); \r\n out.append(\"VALORPAGORUNT = \" + this.VALORPAGORUNT + \"\\n\"); \r\n out.append(\"COD_CAJERO = \" + this.COD_CAJERO + \"\\n\"); \r\n out.append(\"NOM_CAJERO = \" + this.NOM_CAJERO + \"\\n\"); \r\n out.append(\"ID_ARQUEO = \" + this.ID_ARQUEO + \"\\n\"); \r\n out.append(\"VLR_BASE = \" + this.VLR_BASE + \"\\n\"); \r\n out.append(\"IDUSRPAGA = \" + this.IDUSRPAGA + \"\\n\"); \r\n out.append(\"APELLIDOCAJERO = \" + this.APELLIDOCAJERO + \"\\n\"); \r\n out.append(\"ESTADOFACTURA = \" + this.ESTADOFACTURA + \"\\n\"); \r\n return out.toString();\r\n }",
"final public void ClassName() throws ParseException {\n jj_consume_token(IDENTIFIER);\n label_24:\n while (true) {\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case 88:\n case 98:\n ;\n break;\n default:\n jj_la1[104] = jj_gen;\n break label_24;\n }\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case 88:\n jj_consume_token(88);\n jj_consume_token(IDENTIFIER);\n break;\n case 98:\n jj_consume_token(98);\n jj_consume_token(IDENTIFIER);\n break;\n default:\n jj_la1[105] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n }\n }",
"public String toString(){\n\t\tif(categoria == 1)\n\t\t\treturn \"Profesor Ayudante\\n\" + super.toString() + \"\\n\" + \"Horario = \" + tutoria;\n\t\telse if(categoria == 2)\n\t\t\treturn \"Profesor Titular de Universidad\\n\" + super.toString() + \"\\n\" + \"Horario = \" + tutoria;\n\t\telse\n\t\t\treturn \"Profesor Catedrático de Universidad\\n\" + super.toString() + \"\\n\" + \"Horario = \" + tutoria;\n\t}",
"@Override\n public String toString(){\n\n return this.getClass().getSimpleName();\n }",
"public String toString() {\r\n StringBuffer out = new StringBuffer(this.getDaogenVersion());\r\n out.append(\"\\nclass ViewDetallesPagos, mapping to table ViewDetallesPagos\\n\");\r\n out.append(\"Persistent attributes: \\n\"); \r\n out.append(\"IDCUENTACONTABLE = \" + this.IDCUENTACONTABLE + \"\\n\"); \r\n out.append(\"DECOMPARENDO = \" + this.DECOMPARENDO + \"\\n\"); \r\n out.append(\"CODIGOCUENTA = \" + this.CODIGOCUENTA + \"\\n\"); \r\n out.append(\"NOMBRECUENTA = \" + this.NOMBRECUENTA + \"\\n\"); \r\n out.append(\"VIGENCIAINICIAL = \" + this.VIGENCIAINICIAL + \"\\n\"); \r\n out.append(\"VIGENCIAFINAL = \" + this.VIGENCIAFINAL + \"\\n\"); \r\n out.append(\"FILTROPORFECHAS = \" + this.FILTROPORFECHAS + \"\\n\"); \r\n out.append(\"IDTARIFA = \" + this.IDTARIFA + \"\\n\"); \r\n out.append(\"IDCONCEPTO = \" + this.IDCONCEPTO + \"\\n\"); \r\n out.append(\"NOMBRECONCEPTO = \" + this.NOMBRECONCEPTO + \"\\n\"); \r\n out.append(\"IDITEM = \" + this.IDITEM + \"\\n\"); \r\n out.append(\"VALORPAGO = \" + this.VALORPAGO + \"\\n\"); \r\n out.append(\"FECHAPAGO = \" + this.FECHAPAGO + \"\\n\"); \r\n out.append(\"VIGENCIA = \" + this.VIGENCIA + \"\\n\"); \r\n return out.toString();\r\n }",
"@Override //indicates that this method overrides a superclass method\n public String toString(){\n\n return String.format(\"%s: %s %s%n%s : %s%n%s: %.2f%n%s: %.2f\",\"commission employee\",firstName,lastName,\n \"pan number\",panCardNumber,\"gross sales\",grossSales,\"commission rate\",commissionRate);\n }",
"@Override\n public String toString() {\n return \"IrNivelMedio\";\n }",
"@Override\n public String toString() {\n return getClass().getSimpleName() + \"[\" + _name + \"]\";\n }",
"@Override\n public String toString(){\n return String.format(\"%-8s %-8s %4d %7d %8.1f %s\",\n name, nationality, birthYear, yearsServed, height, validate());\n }",
"public void buildClassSignature() {\n\t\tStringBuffer modifiers = new StringBuffer(classDoc.modifiers() + \" \");\n\t\tif (isEnum) {\n\t\t\tmodifiers.append(\"enum \");\n\t\t\tint index;\n\t\t\tif ((index = modifiers.indexOf(\"abstract\")) >= 0) {\n\t\t\t\tmodifiers.delete(index, index + (new String(\"abstract\")).length());\n\t\t\t\tmodifiers = new StringBuffer(Util.replaceText(modifiers.toString(), \" \", \" \"));\n\t\t\t}\n\t\t\tif ((index = modifiers.indexOf(\"final\")) >= 0) {\n\t\t\t\tmodifiers.delete(index, index + (new String(\"final\")).length());\n\t\t\t\tmodifiers = new StringBuffer(Util.replaceText(modifiers.toString(), \" \", \" \"));\n\t\t\t}\n\t\t} else if (!isInterface) {\n\t\t\tmodifiers.append(\"class \");\n\t\t}\n\t\twriter.writeClassSignature(modifiers.toString());\n\t}"
] |
[
"0.61946285",
"0.5978651",
"0.5876241",
"0.58238107",
"0.58233994",
"0.57688975",
"0.57610464",
"0.5741873",
"0.5703519",
"0.5667695",
"0.5662175",
"0.565668",
"0.5628059",
"0.5621152",
"0.55986446",
"0.5593533",
"0.55715746",
"0.555962",
"0.55454254",
"0.55161107",
"0.55132294",
"0.55016816",
"0.5499891",
"0.5495639",
"0.5495478",
"0.5481434",
"0.54792523",
"0.5478488",
"0.5472267",
"0.54524755",
"0.54521793",
"0.54388714",
"0.54284847",
"0.5419441",
"0.54174966",
"0.5417405",
"0.5410281",
"0.54090446",
"0.54048705",
"0.54045326",
"0.540263",
"0.5395067",
"0.53848994",
"0.5376765",
"0.5371144",
"0.5367086",
"0.5365185",
"0.53624225",
"0.53569365",
"0.5352034",
"0.53504956",
"0.5333909",
"0.5333624",
"0.5333581",
"0.5328023",
"0.53266764",
"0.53244424",
"0.53232914",
"0.5321441",
"0.5316025",
"0.53107524",
"0.53107524",
"0.531058",
"0.5302713",
"0.52861696",
"0.5285781",
"0.5283418",
"0.52794933",
"0.5272888",
"0.52698255",
"0.52693117",
"0.526779",
"0.5266447",
"0.5265549",
"0.526224",
"0.52585655",
"0.52584213",
"0.5257035",
"0.5256731",
"0.52546865",
"0.5251047",
"0.52507263",
"0.524685",
"0.5246377",
"0.5244159",
"0.5244159",
"0.52392185",
"0.52371603",
"0.52238584",
"0.5222374",
"0.5208427",
"0.5206129",
"0.52047116",
"0.52042997",
"0.52036566",
"0.5203524",
"0.5202072",
"0.5197383",
"0.5197043",
"0.5192393",
"0.5191336"
] |
0.0
|
-1
|
Create a new AudioPlayer with the first peripheral of the system selected
|
public AudioPlayer() {
selectMixer(0);
createListenerOnCondition(onFinishRunnables, (event) ->
event.getType() == LineEvent.Type.STOP && getRemainingTime() <= 0.0 && !isRepeating
);
createListenerOnCondition(onEndRunnables, (event) ->
event.getType() == LineEvent.Type.STOP && getRemainingTime() <= 0.0
);
createListenerOnCondition(onLoadRunnables, (event) ->
event.getType() == LineEvent.Type.OPEN
);
createListenerOnCondition(onPlayRunnables, (event) ->
event.getType() == LineEvent.Type.START
);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Device createDevice();",
"protected AudioDevice getAudioDevice() throws JavaLayerException\n\t{\n\t\treturn FactoryRegistry.systemRegistry().createAudioDevice();\n\t}",
"private void createPlayer() {\r\n try {\r\n mRadioPlayer = new RadioPlayer(getApplication(), mDeezerConnect,\r\n new WifiAndMobileNetworkStateChecker());\r\n mRadioPlayer.addPlayerListener(this);\r\n setAttachedPlayer(mRadioPlayer);\r\n } catch (DeezerError e) {\r\n handleError(e);\r\n } catch (TooManyPlayersExceptions e) {\r\n handleError(e);\r\n }\r\n }",
"public static Mixer getPrimaryCaptureDriver() {\r\n\t\t//final String searchName = \"Microphone (Realtek High Defini\";\r\n\t\t//final String searchName = \"Primary Sound Capture Driver\";\r\n\t\tfinal String searchName = \"Stereo Mix (Realtek High Defini\";// this one for loopback\r\n\t\tMixer.Info infos[] = AudioSystem.getMixerInfo();\r\n\t\t\r\n\t\tfor(Mixer.Info i : infos) {\r\n\t\t\tif(i.getName().equals(searchName)) {\r\n\t\t\t\tif(DEBUG) {\r\n\t\t\t\t\tSystem.out.println(\"Found primary sound capture driver: \" + i);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn AudioSystem.getMixer(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(DEBUG) {\r\n\t\t\tSystem.out.println(\"Failed to find sound capture driver, name=\\\"\" + searchName + \"\\\".\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private void initAudioIn(){\n ArrayList<String> actived = new ArrayList<String>();\n ArrayList<String> mAudioInputChannels = mAudioManagerEx.getAudioDevices(AudioManagerEx.AUDIO_INPUT_TYPE);\n int i = 0;\n for(i = 0; i < mAudioInputChannels.size(); i++){\n String device = mAudioInputChannels.get(i);\n if(device.contains(\"USB\")){\n actived.add(device);\n break;\n }\n }\n //otherwise use codec by default\n if(i == mAudioInputChannels.size()){\n actived.add(AudioManagerEx.AUDIO_NAME_CODEC);\n }\n mAudioManagerEx.setAudioDeviceActive(actived, AudioManagerEx.AUDIO_INPUT_ACTIVE);\n }",
"public AudioPlayer getDefaultAudioPlayer() throws InstantiationException {\n if (defaultAudioPlayer != null) {\n return defaultAudioPlayer;\n }\n \n String className = Utilities.getProperty(\n DEFAULT_AUDIO_PLAYER, DEFAULT_AUDIO_PLAYER_DEFAULT);\n\n try {\n Class cls = Class.forName(className);\n defaultAudioPlayer = (AudioPlayer) cls.newInstance();\n return defaultAudioPlayer;\n } catch (ClassNotFoundException e) {\n throw new InstantiationException(\"Can't find class \" + className);\n } catch (IllegalAccessException e) {\n throw new InstantiationException(\"Can't find class \" + className);\n } catch (ClassCastException e) {\n throw new InstantiationException(className + \" cannot be cast \"\n + \"to AudioPlayer\");\n }\n }",
"public void start() {\n ToneControl control = null;\n try {\n myPlayer = Manager.createPlayer(Manager.TONE_DEVICE_LOCATOR);\n // do the preliminary set-up:\n myPlayer.realize();\n // set a listener to listen for the end of the tune:\n myPlayer.addPlayerListener(this);\n // get the ToneControl object in order to set the tune data:\n control = (ToneControl) myPlayer.getControl(\"ToneControl\");\n control.setSequence(myTune);\n // set the volume to the highest possible volume:\n VolumeControl vc = (VolumeControl) myPlayer\n .getControl(\"VolumeControl\");\n vc.setLevel(100);\n } catch (Exception e) {\n // the music isn't necessary, so we ignore exceptions.\n }\n }",
"public void createPlayer() {\n mainHandler = new Handler();\n videoTrackSelectionFactory = new AdaptiveTrackSelection.Factory(bandwidthMeter);\n trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory);\n player = ExoPlayerFactory.newSimpleInstance(this, trackSelector);\n }",
"public AudioPlayer getAudioPlayer() {\n if (audioPlayer == null) {\n try {\n audioPlayer = getDefaultAudioPlayer();\n } catch (InstantiationException e) {\n e.printStackTrace();\n }\n }\n\treturn audioPlayer;\n }",
"private void generateAudio() {\n soundHandler.generateTone();\n }",
"Player createPlayer();",
"private MultiPlayer getPlayer() {\n try {\n\n java.net.URL.setURLStreamHandlerFactory(new java.net.URLStreamHandlerFactory() {\n\n public java.net.URLStreamHandler createURLStreamHandler(String protocol) {\n Log.d(\"LOG\", \"Asking for stream handler for protocol: '\" + protocol + \"'\");\n if (\"icy\".equals(protocol))\n return new com.spoledge.aacdecoder.IcyURLStreamHandler();\n return null;\n }\n });\n } catch (Throwable t) {\n Log.w(\"LOG\", \"Cannot set the ICY URLStreamHandler - maybe already set ? - \" + t);\n }\n\n if (mRadioPlayer == null) {\n mRadioPlayer = new MultiPlayer(this, AUDIO_BUFFER_CAPACITY_MS, AUDIO_DECODE_CAPACITY_MS);\n mRadioPlayer.setResponseCodeCheckEnabled(false);\n mRadioPlayer.setPlayerCallback(this);\n }\n return mRadioPlayer;\n }",
"public DataSource getAudioSource();",
"public void requestPairedDevice(Player player, String name)\n {\n if (mEnable) {\n if(player != null) {\n mCurrentPlayer = player;\n for (BluetoothDevice d : mDevices) {\n if(d.getBondState() == BluetoothDevice.BOND_BONDED) {\n Log.d(LOGTAG, \"Device already paired - add to player\");\n\n // TODO:\n // Note that we do not open a connection to the player...\n // Maybe we should to check if it works?\n mCurrentPlayer.setBDevice(d); // Device already paired\n break;\n }\n // Device not paired yet\n if(d.getName().equals(name)) {\n // This establishes a connection to the other device which involves pairing\n // The connection is left open afterwards ?\n mBS.connect(d);\n //mCurrentPlayer.setBDevice(d);\n break;\n }\n }\n } else Log.d(LOGTAG,\"Tried to get paired device for null-Player\");\n }\n }",
"public interface UltraSoundInterface {\n\n interface UltraSoundInterfaceFactory {\n UltraSoundInterface create(DetectionModuleConfiguration.GPioPair pair);\n }\n\n void init();\n\n long getMeasure();\n}",
"private void setupPlayer() {\n player = MediaPlayer.create(MediaPlayerActivity.this, R.raw.byte_music);\n updateState(MediaPlayerState.STATE_PREPARED);\n }",
"private void setUpSound() {\n\t\tAssetManager am = getActivity().getAssets();\n\t\t// activity only stuff\n\t\tgetActivity().setVolumeControlStream(AudioManager.STREAM_MUSIC);\n\n\t\tAudioManager audioManager = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE);\n\t\tsp = new SPPlayer(am, audioManager);\n\t}",
"@Override\r\n public void loadPianoAudioStart() {\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 void initializePlayer() {\n radioPlayer = new MediaPlayer();\n\n isPaused = true;\n\n radioPlayer.setWakeMode(owner.getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK);\n radioPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n radioPlayer.setOnErrorListener(this);\n radioPlayer.setOnCompletionListener(this);\n radioPlayer.setOnInfoListener(this);\n }",
"@CoverageIgnore\n public static HeadlessMediaPlayer newPlayer()\n {\n \n // Usage with the atLeast directive is taken from VLC's own media player \n // factory. The 2.1.0 version appears to correspond to a watershed release \n // that added critical functionality, so we keep it as is. For more info,\n // see: http://git.io/pV0u\n final LibVlc lib = LibVlcFactory.factory().atLeast(\"2.1.0\").create(); \n final String[] libvlcArgs = new String[]{\"\"};\n final libvlc_instance_t instance = lib.libvlc_new(libvlcArgs.length, libvlcArgs);\n return new DefaultHeadlessMediaPlayer(lib, instance);\n }",
"private void playSound() {\n if (isFlashOn) {\n mp = MediaPlayer.create(this, R.raw.light_switch_off);\n } else {\n mp = MediaPlayer.create(this, R.raw.light_switch_on);\n }\n mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n // TODO Auto-generated method stub\n mp.release();\n }\n });\n mp.start();\n }",
"private void createHumanPlayer() {\n humanPlayer = new Player(\"USER\");\n players[0] = humanPlayer;\n }",
"public void initDevice() {\n myBluetoothAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter();\n pairedDevices = myBluetoothAdapter.getBondedDevices();\n }",
"public String getPlaybackDevice();",
"void setupSounds() {\n soundSwitch = new Switch(Switch.CHILD_NONE);\n soundSwitch.setCapability(Switch.ALLOW_SWITCH_WRITE);\n\n // Set up the sound media container\n java.net.URL soundURL = null;\n String soundFile = \"res/sounds/Get_up_on_your_feet_mixdown2.wav\";\n try {\n soundURL = new java.net.URL(codeBaseString + soundFile);\n } catch (java.net.MalformedURLException ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n }\n if (soundURL == null) { // application, try file URL\n try {\n soundURL = new java.net.URL(\"file:./\" + soundFile);\n } catch (java.net.MalformedURLException ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n }\n }\n //System.out.println(\"soundURL = \" + soundURL);\n MediaContainer soundMC = new MediaContainer(soundURL);\n\n // set up the Background Sound\n soundBackground = new BackgroundSound();\n soundBackground.setCapability(Sound.ALLOW_ENABLE_WRITE);\n soundBackground.setSoundData(soundMC);\n soundBackground.setSchedulingBounds(infiniteBounds);\n soundBackground.setEnable(false);\n soundBackground.setLoop(Sound.INFINITE_LOOPS);\n soundSwitch.addChild(soundBackground);\n\n // set up the point sound\n soundPoint = new PointSound();\n soundPoint.setCapability(Sound.ALLOW_ENABLE_WRITE);\n soundPoint.setSoundData(soundMC);\n soundPoint.setSchedulingBounds(infiniteBounds);\n soundPoint.setEnable(false);\n soundPoint.setLoop(Sound.INFINITE_LOOPS);\n soundPoint.setPosition(-5.0f, 5.0f, 0.0f);\n Point2f[] distGain = new Point2f[2];\n // set the attenuation to linearly decrease volume from max at\n // source to 0 at a distance of 15m\n distGain[0] = new Point2f(0.0f, 1.0f);\n distGain[1] = new Point2f(15.0f, 0.0f);\n soundPoint.setDistanceGain(distGain);\n soundSwitch.addChild(soundPoint);\n\n // Create the chooser GUI\n String[] soundNames = { \"None\", \"Background\", \"Point\", };\n\n soundChooser = new IntChooser(\"Sound:\", soundNames);\n soundChooser.addIntListener(new IntListener() {\n public void intChanged(IntEvent event) {\n int value = event.getValue();\n // Should just be able to use setWhichChild on\n // soundSwitch, have to explictly enable/disable due to\n // bug.\n switch (value) {\n case 0:\n soundSwitch.setWhichChild(Switch.CHILD_NONE);\n soundBackground.setEnable(false);\n soundPoint.setEnable(false);\n break;\n case 1:\n soundSwitch.setWhichChild(0);\n soundBackground.setEnable(true);\n soundPoint.setEnable(false);\n break;\n case 2:\n soundSwitch.setWhichChild(1);\n soundBackground.setEnable(false);\n soundPoint.setEnable(true);\n break;\n }\n }\n });\n soundChooser.setValue(Switch.CHILD_NONE);\n\n }",
"public AudioDescriptor getAudioDescriptor();",
"void InitSound() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n //Use the newer SoundPool.Builder\n //Set the audio attributes, SONIFICATION is for interaction events\n //uses builder pattern\n AudioAttributes aa = new AudioAttributes.Builder()\n .setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)\n .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)\n .build();\n\n //default max streams is 1\n //also uses builder pattern\n dice_sound= new SoundPool.Builder().setAudioAttributes(aa).build();\n\n } else {\n // Running on device earlier than Lollipop\n //Use the older SoundPool constructor\n dice_sound=PreLollipopSoundPool.NewSoundPool();\n }\n //Load the dice sound\n sound_id=dice_sound.load(this,R.raw.shake_dice,1);\n alarm_sound_id=dice_sound.load(this,R.raw.on_time,1);\n }",
"private void to(){\n\tmediaPlayer = new android.media.MediaPlayer();\n\ttry{\n\t mediaPlayer.setDataSource(sdPath);\n\t mediaPlayer.prepare();\n\t mediaPlayer.start();\n\t Thread.sleep(1000);\n\t}\n\tcatch(Exception e){}\n }",
"protected Thread createPlayerThread()\n\t{\n\t\treturn new Thread(this, \"Audio player thread\");\t\n\t}",
"public HwPeripheralFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"private void startMusic() {\r\n final Format input1 = new AudioFormat(AudioFormat.MPEGLAYER3);\r\n final Format input2 = new AudioFormat(AudioFormat.MPEG);\r\n final Format output = new AudioFormat(AudioFormat.LINEAR);\r\n PlugInManager.addPlugIn(\r\n \"com.sun.media.codec.audio.mp3.JavaDecoder\",\r\n new Format[]{input1, input2},\r\n new Format[]{output},\r\n PlugInManager.CODEC\r\n );\r\n try {\r\n final File f = new File(\"support_files//tetris.mp3\");\r\n myPlayer = Manager.createPlayer(new MediaLocator(f.toURI().toURL()));\r\n } catch (final NoPlayerException | IOException e) {\r\n e.printStackTrace();\r\n }\r\n if (myPlayer != null) {\r\n myPlayer.start();\r\n }\r\n }",
"public void setUpSound() {\n try {\n generateTone();\n setFrequencyLabel();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }",
"private HumanGamePlayerOnKeyboard initializePlayer() {\n\t\tHumanGamePlayerOnKeyboard player = new HumanGamePlayerOnKeyboard();\n\t\tplayer.setPlayerName(HUMAN_PLAYER_NAME);\n\t\treturn player;\n\t}",
"public AudioSettings() {\n this.emulator = NEmuSUnified.getInstance().getEmulator();\n }",
"public void start()\n\t{\n\t\tString name = getAudioFileName();\n\t\ttry\n\t\t{\t\t\t\n\t\t\tInputStream in = getAudioStream();\n\t\t\tAudioDevice dev = getAudioDevice();\n\t\t\tplay(in, dev);\n\t\t}\n\t\tcatch (JavaLayerException ex)\n\t\t{\n\t\t\tsynchronized (System.err)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Unable to play \"+name);\n\t\t\t\tex.printStackTrace(System.err);\n\t\t\t}\n\t\t}\n\t}",
"Player getSelectedPlayer();",
"public int getAudioPort();",
"private Audio() {}",
"private void playHintAudio() {\n AudioManager audioManager = (AudioManager)getContext().getSystemService(Context.AUDIO_SERVICE);\n int mode = audioManager.getRingerMode();\n Log.d(TAG,\"mode = \" + mode);\n\n if(mode != AudioManager.RINGER_MODE_SILENT && mode != AudioManager.RINGER_MODE_VIBRATE) {\n // prize modify for bug 44603 by zhaojian 20171205 start\n mMediaPlayer = MediaPlayer.create(getContext(),R.raw.hb_sound2);\n Log.d(\"debug\",\"isNotifySound = \" + getConfig().isNotifySound());\n if(getConfig().isNotifySound()) {\n mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n @Override\n public void onPrepared(MediaPlayer mp) {\n mp.start();\n }\n });\n mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n mp.release();\n }\n });\n mMediaPlayer.start();\n }\n // prize modify for bug 44603 by zhaojian 20171205 end\n }\n }",
"private void startPlaying() {\n try {\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(audioFile.getAbsolutePath());\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"prepare() failed\");\n }\n showTimer(false);\n } catch (Exception e) {\n logException(e, \"MicManualFragment_startPlaying()\");\n }\n\n }",
"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 Multi_Player()\r\n {\r\n \r\n }",
"public void setAudioDescriptor( AudioDescriptor audioDescriptor );",
"public PeripheralHardwareDriverInterface getHardwareDriver();",
"public void initMusicPlayer() {\n PatariSingleton.getInstance().getMediaPlayer().setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK);\n PatariSingleton.getInstance().getMediaPlayer().setAudioStreamType(AudioManager.STREAM_MUSIC);\n PatariSingleton.getInstance().getMediaPlayer().setOnPreparedListener(this);\n PatariSingleton.getInstance().getMediaPlayer().setOnCompletionListener(this);\n PatariSingleton.getInstance().getMediaPlayer().setOnErrorListener(this);\n PatariSingleton.getInstance().getMediaPlayer().setOnBufferingUpdateListener(this);\n try {\n if (wifiLock != null && wifiLock.isHeld()) {\n wifiLock.release();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n try {\n wifiLock = ((WifiManager) getApplication().getApplicationContext().getSystemService(Context.WIFI_SERVICE)).createWifiLock(WifiManager.WIFI_MODE_FULL, \"mylock\");\n wifiLock.acquire();\n } catch (Exception e) {\n e.printStackTrace();\n }\n IS_PROGRESS = false;\n }",
"public void setAudioPlayer(AudioPlayer player) {\n\taudioPlayer = player;\n externalAudioPlayer = true;\n }",
"void createPlayer(Player player);",
"public AudioSource(boolean loop) {\n\t\tid = AL10.alGenSources();\n\t\tthis.loop = loop;\n\t}",
"protected AudioPlaybackConfiguration createAudioPlaybackConfiguration(\n AudioAttributes audioAttributes) {\n if (RuntimeEnvironment.getApiLevel() >= S) {\n PlayerBase.PlayerIdCard playerIdCard =\n ReflectionHelpers.callConstructor(\n PlayerBase.PlayerIdCard.class,\n ReflectionHelpers.ClassParameter.from(int.class, 0), /* type */\n ReflectionHelpers.ClassParameter.from(AudioAttributes.class, audioAttributes),\n ReflectionHelpers.ClassParameter.from(IPlayer.class, null),\n ReflectionHelpers.ClassParameter.from(int.class, 0) /* sessionId */);\n AudioPlaybackConfiguration config =\n ReflectionHelpers.callConstructor(\n AudioPlaybackConfiguration.class,\n ReflectionHelpers.ClassParameter.from(PlayerBase.PlayerIdCard.class, playerIdCard),\n ReflectionHelpers.ClassParameter.from(int.class, 0), /* piid */\n ReflectionHelpers.ClassParameter.from(int.class, 0), /* uid */\n ReflectionHelpers.ClassParameter.from(int.class, 0) /* pid */);\n ReflectionHelpers.setField(\n config, \"mPlayerState\", AudioPlaybackConfiguration.PLAYER_STATE_STARTED);\n return config;\n } else {\n PlayerBase.PlayerIdCard playerIdCard =\n ReflectionHelpers.callConstructor(\n PlayerBase.PlayerIdCard.class,\n from(int.class, 0), /* type */\n from(AudioAttributes.class, audioAttributes),\n from(IPlayer.class, null));\n AudioPlaybackConfiguration config =\n ReflectionHelpers.callConstructor(\n AudioPlaybackConfiguration.class,\n from(PlayerBase.PlayerIdCard.class, playerIdCard),\n from(int.class, 0), /* piid */\n from(int.class, 0), /* uid */\n from(int.class, 0) /* pid */);\n ReflectionHelpers.setField(\n config, \"mPlayerState\", AudioPlaybackConfiguration.PLAYER_STATE_STARTED);\n return config;\n }\n }",
"public void StartPlayingSound(String _MixerName) {\n for (int cnt = 0; cnt < mixerInfo.length; cnt++) {\r\n\r\n // Mixer currentMixer = AudioSystem.getMixer(mixerInfo[cnt]);\r\n // Because this is for a recording application, we only care about audio INPUT so we just\r\n // care if TargetDataLine is supported.\r\n if (mixerInfo[cnt].getName().equals(_MixerName)) {\r\n System.out.println(\"SoundOutputDeviceControl - found target mixer: \" + _MixerName);\r\n\r\n // This may freeze the UI but oh well, we have to wait for the inner thread to stop from the\r\n // previous selection\r\n stopPlay = true;\r\n while (threadEnd == false) {\r\n try {\r\n sleep(100);\r\n } catch (InterruptedException ex) { \r\n }\r\n }\r\n\r\n Mixer currentMixer = AudioSystem.getMixer(mixerInfo[cnt]);\r\n try {\r\n \r\n //DataLine.Info dataLineInfo = new DataLine.Info(SourceDataLine.class, af);\r\n //sourceDataLine = (SourceDataLine) currentMixer.getLine(dataLineInfo);\r\n sourceDataLine = (SourceDataLine) currentMixer.getLine(sourceDLInfo);\r\n //sourceDataLine.open(af);\r\n sourceDataLine.open(af, Ns2 * 4);\r\n sourceDataLine.start();\r\n playerThread = new Thread(new PlayThread());\r\n playerThread.setPriority(Thread.MAX_PRIORITY); \r\n playerThread.start();\r\n } catch (LineUnavailableException e) {\r\n System.out.println(\"SoundOutputDeviceControl - StartPlayingSoundOnMixer -\" + e);\r\n }\r\n }\r\n }\r\n }",
"void addPC(PCDevice pc);",
"void PegaMIDI(){\r\n // ler os dispositivos MIDIS instalados na máquina, hardware e softwares\r\n MidiDevice device;\r\n MidiDevice.Info[] infos = MidiSystem.getMidiDeviceInfo();\r\n for (int i=0; i<infos.length ;i++){\r\n try {\r\n device=MidiSystem.getMidiDevice(infos[i]);\r\n MDevices.add(device);\r\n cbMidi.addItem(device.getDeviceInfo().getName()+\" \"+device.getDeviceInfo().getVersion());\r\n \r\n } catch (MidiUnavailableException e){}\r\n \r\n }\r\n }",
"public Peripheral getHardwareDriverFromSoftwareDriver();",
"@Bean\n public MediaPlayer anotherCDPlayer() {\n return new CDPlayer(sgtPeppers());\n }",
"public void initPlayer();",
"public MusicPlayer() {\n player = new BasicPlayer();\n controller = (BasicController) player;\n volume = -1.0; // indicates that gain has yet to be initialized\n }",
"void setAudioRoute(String device);",
"Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}",
"private void selectRandomPlayer() {\n Random rand = new Random();\n // Restrict random number range to available indexes in the players list.\n // - 1 to offset zero-based index numbering.\n int random = rand.nextInt(players.size());\n activePlayer = players.get(random);\n }",
"private void manualCommand(String player) {\n try {\n Piece s = Piece.playerValueOf(player);\n _playing = false;\n _players[s.ordinal()] = new HumanPlayer(s, this);\n } catch (IllegalArgumentException excp) {\n error(\"unknown player: %s\", player);\n System.out.println();\n }\n }",
"private Player selectPlayer (int which) {\n System.out.println();\n int choice = readPlayerChoice(which);\n String name = readPlayerName();\n if (choice == TIMID)\n return new TimidPlayer(name);\n else if (choice == GREEDY)\n return new GreedyPlayer(name);\n else if (choice == CLEVER)\n return new CleverPlayer(name);\n else\n return new InteractivePlayer(name);\n }",
"public static void main(String[] args) {\n AudioPlayer newProduct = new AudioPlayer(\"Walkman\", \"Walkman\", \"MONO\", ItemType.AUDIO);\n newProduct.play();\n newProduct.stop();\n newProduct.previous();\n newProduct.next();\n\n }",
"public Player nextPlayer() {\r\n if (this.ordering==null || this.ordering.isEmpty()) {\r\n nextTurn();\r\n }\r\n Player p = this.ordering.poll();\r\n p.setEnergy(p.getBaseEnergy());\r\n p.disableShield();\r\n playerToPlay = p;\r\n p.setAsTurn(true);\r\n return p;\r\n }",
"AudioDeviceInventory() {\n mDeviceBroker = null;\n }",
"public SoundClip chooseSound(Sound sound){\n SoundClip audio = null;\n\n switch(sound){\n case CREDIT:\n audio = createStream(CREDIT_URL);\n break;\n case DEATH:\n audio = createStream(DEATH_URL);\n break;\n case EAT_FRUIT:\n audio = createStream(EAT_FRUIT_URL);\n break;\n case EAT_GHOST:\n audio = createStream(EAT_GHOST_URL);\n break;\n case PAUSE_SOUND:\n audio = createStream(PAUSE_SOUND_URL);\n break;\n case GAME_START:\n audio = createStream(GAME_START_URL);\n break;\n case MUNCH_1:\n audio = createStream(MUNCH_1_URL);\n break;\n case MUNCH_2:\n audio = createStream(MUNCH_2_URL);\n break;\n case FRIGHT_SOUND:\n audio = createStream(FRIGHT_SOUND_URL);\n break;\n case EATEN_SOUND:\n audio = createStream(EATEN_SOUND_URL);\n break;\n case SIREN_1:\n audio = createStream(SIREN_1_URL);\n break;\n case SIREN_2:\n audio = createStream(SIREN_2_URL);\n break;\n case SIREN_3:\n audio = createStream(SIREN_3_URL);\n break;\n case SIREN_4:\n audio = createStream(SIREN_4_URL);\n break;\n case SIREN_5:\n audio = createStream(SIREN_5_URL);\n break;\n case STARTUP:\n audio = createStream(STARTUP_URL);\n break;\n case BLUE_PORTAL_SOUND:\n audio = createStream(BLUE_PORTAL_SOUND_URL);\n break;\n case RED_PORTAL_SOUND:\n audio = createStream(RED_PORTAL_SOUND_URL);\n break;\n }\n audio.setName(sound);\n return audio;\n }",
"public void setPlaybackDevice(String devid);",
"private void autoCommand(String player) {\n try {\n Piece s = Piece.playerValueOf(player);\n _playing = false;\n _players[s.ordinal()] = new MachinePlayer(s, this);\n } catch (IllegalArgumentException excp) {\n error(\"unknown player: %s\", player);\n System.out.println();\n }\n }",
"public void initMediaPlayer() {\n mMediaPlayer.setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK);\n mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n mMediaPlayer.setOnPreparedListener(this);\n mMediaPlayer.setOnCompletionListener(this);\n mMediaPlayer.setOnErrorListener(this);\n }",
"PCDevice getPC(UUID uID);",
"public IGamePadAIDL create() {\n if (HwGameAssistGamePad.mService == null) {\n HwGameAssistGamePad.bindService();\n }\n return HwGameAssistGamePad.mService;\n }",
"private void prepareMediaPlayer(int id) {\n if (mediaPlayer != null) {\n mediaPlayer.stop();\n mediaPlayer.release();\n }\n mediaPlayer = MediaPlayer.create(this, id);\n mediaPlayer.start();\n if (true)\n return;\n mediaPlayer = new MediaPlayer();\n\n AssetFileDescriptor fileDescriptor = getResources().openRawResourceFd(id);\n try {\n mediaPlayer.stop();\n mediaPlayer.setDataSource(fileDescriptor.getFileDescriptor(),\n fileDescriptor.getStartOffset(), fileDescriptor.getLength());\n fileDescriptor.close();\n mediaPlayer.prepare();\n mediaPlayer.start();\n } catch (Exception e) {\n Log.e(\"Main\", \"On Error: \" + e.getMessage());\n }\n }",
"private void setPlayer() {\n player = Player.getInstance();\n }",
"public void StartSound(ISoundOrigin origin, int sound_id);",
"private void chooseStartPlayer() throws IOExceptionFromController {\n try {\n game.setActivePlayer(playerControllers.get(0).getClient().chooseStartingPlayer(players));\n } catch (IOException | InterruptedException e) {\n throw new IOExceptionFromController(e, playerControllers.get(0));\n }\n }",
"public void setSinglePlayer(){\n isSinglePlayer = true;\n }",
"public void launchSound(String nomFichierAudio) {\n try {\n as = new AudioStream(new FileInputStream(nomFichierAudio));\n p.start(as);\n } catch (IOException err) {\n err.printStackTrace();\n }\n }",
"void chooseStarterPlayer() {\n\t\tSystem.out.println(\"\\nWer beginnt?\");\n\t\tSystem.out.println(\"1 - Computer\");\n\t\tSystem.out.println(\"2 - Human\");\n\t}",
"public void playSelectSong() {\n isStart = false;\n if (getCurrentSong() == 0) {\n audioList.get(getCurrentSong()).setSelect(true);\n playListAdapter.notifyItemChanged(getCurrentSong());\n }\n isPauseResume = false;\n if (player != null) {\n player.stopMedia();\n }\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n /*new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n }\n }, DELAY_TIME);*/\n }",
"@Override\n public int targetDevice() {\n return 0;\n }",
"@Override // kotlin.jvm.functions.Function0\n public IAudioDeviceManager invoke() {\n return Voximplant.getAudioDeviceManager();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.play_sound);\n\n mMediaPlayers = new ArrayList<MediaPlayer>();\n for (String sound : mSounds) {\n int resId = resId = getResources().getIdentifier(\"raw/\"+sound, null, this.getPackageName());\n mMediaPlayers.add(MediaPlayer.create(this, resId));\n }\n\n\t\tbuttonPressEventDisplay = (TextView) findViewById(R.id.buttonPressNotification);\n\n\t\t//Get the bluetooth device that we put here: this comes from right before we started this activity on the \"ListAllExamples.java\" screen. \n\t\tchosenBluetoothDevice = (BluetoothDevice) getIntent().getExtras().get(\"bluetooth_device\");\n\t\tLog.i(BluetoothLEStack.logTag, \"Chosen device is\"+ chosenBluetoothDevice);\n\t\t\n\t\trfduinoConnection = BluetoothLEStack.connectToBluetoothLEStack(chosenBluetoothDevice, \n\t\t\t\tthis,\n\t\t\t\tRFDuinoSystemCharacteristics.RFDUINO_PROFILE_SERVICE_UUID,\n\t\t\t\tonCancelConnectionAttempt\n\t\t\t\t);\n\t\t\n\t\tbackgroundTask.postDelayed(runOnceConnected, 1000l);\n\t\t\n\t}",
"@Override\n public void musicPlayerDetails(WifiP2pDevice device) {\n\n }",
"void testSingleTone(){\n\t\t\n\t\tSingleTone s =SingleTone.getSingleTone();\n\t\ts.f();\n\t}",
"public void allocate(AssetManager manager, String filename) {\n\t\tSound sound = manager.get(filename, Sound.class);\n\t}",
"public void play() {\n\n\t\tString[] args = new String[] { recordingsPath };\n\t\tGst.init(\"AudioPlayer\", args);\n\n\t\tplaybin = new PlayBin2(\"AudioPlayer\");\n\t\tplaybin.setVideoSink(ElementFactory.make(\"fakesink\", \"videosink\"));\n\t\tplaybin.setInputFile(new File(gui.getSelectedPlayItem()));\n\n\t\tplaybin.play();\n\n\t}",
"public static MyPlayerAdapter getInstance() {\n if (playerAdapter == null) {\n synchronized (MyPlayerAdapter.class) {\n if (playerAdapter == null) playerAdapter = new MyPlayerAdapter();\n }\n }\n return playerAdapter;\n }",
"@Override\n public void initialize() {\n //talonOrchestra.playMusic();\n }",
"ChargingStation createChargingStation();",
"public boolean connectAudio(String address) {\n if (mHearingAidDevicesByAddress.containsKey(address)) {\n if (mBluetoothHearingAidService == null) {\n Log.w(this, \"Attempting to turn on audio when the hearing aid service is null\");\n return false;\n }\n return mBluetoothAdapterProxy.setActiveDevice(\n mHearingAidDevicesByAddress.get(address),\n BluetoothAdapter.ACTIVE_DEVICE_ALL);\n } else if (mHfpDevicesByAddress.containsKey(address)) {\n BluetoothDevice device = mHfpDevicesByAddress.get(address);\n if (mBluetoothHeadsetService == null) {\n Log.w(this, \"Attempting to turn on audio when the headset service is null\");\n return false;\n }\n boolean success = mBluetoothAdapterProxy.setActiveDevice(device,\n BluetoothAdapter.ACTIVE_DEVICE_PHONE_CALL);\n if (!success) {\n Log.w(this, \"Couldn't set active device to %s\", address);\n return false;\n }\n if (!mBluetoothHeadsetService.isAudioOn()) {\n return mBluetoothHeadsetService.connectAudio();\n }\n return true;\n } else {\n Log.w(this, \"Attempting to turn on audio for a disconnected device\");\n return false;\n }\n }",
"void makePlay(int player) {\n }",
"public AudioChannel() {\r\n\t\t// Default temporary location file has to be picked.\r\n\t\tString defalultFileName = getFileName(null, \"wav\");\r\n\t\tfile = new File( defalultFileName );\r\n\t}",
"public void start() {\n AudioPlayer.player.start(cas);\n playing = true;\n }",
"public static MicrophoneImplementation getInstance(boolean fastMode, boolean skipGSManager,\n boolean useGateway) {\n if (instance == null) {\n instance = new MicrophoneImplementation(fastMode, skipGSManager, useGateway);\n }\n return instance;\n }",
"AudioGenerator() {\n minim = new Minim(this);\n // use the getLineOut method of the Minim object to get an AudioOutput object\n out = minim.getLineOut();\n }",
"public void initDevice() {\r\n\t\t\r\n\t}",
"public T getAutoInstance(String devName) {\n S settings = sGen.apply(devName);\n for (Class clz : subClasses) {\n T device;\n try {\n device = (T) clz.getDeclaredConstructor(sClass).newInstance(settings);\n } catch (InvocationTargetException e) { \n if (e.getCause() instanceof Device.IDException) {\n continue; //This just means the device wasn't identified. Try the next device\n } else {\n throw new RuntimeException(e.getCause());\n }\n } catch (NoSuchMethodException | InstantiationException | IllegalAccessException me) {\n throw new RuntimeException(me);\n }\n Globals.mm().logs().logMessage(String.format(\"Autofinder found device of type %s for device label %s.\", device.getClass().toString(), devName));\n return device; //We only get this far if the object successfully initializes.\n }\n return null; //Nothing was identified.\n }",
"public RandomPlaySelector() {\n super();\n }",
"@Override\n public void run() {\n chooseUsbAudioDeviceDialog(audio_out);\n }",
"public Audio createAudio(Audio audio, long audioBook) {\n\t\treturn null;\n\t}"
] |
[
"0.6050737",
"0.5931417",
"0.5928329",
"0.5906389",
"0.5877346",
"0.58754027",
"0.5873973",
"0.58335733",
"0.5653847",
"0.56121486",
"0.56074387",
"0.5558249",
"0.552467",
"0.54935735",
"0.5490132",
"0.54747355",
"0.5434956",
"0.5410319",
"0.5404692",
"0.5389908",
"0.5373511",
"0.53282714",
"0.53080595",
"0.52992517",
"0.52962035",
"0.52901804",
"0.52836293",
"0.52755064",
"0.52752036",
"0.5273038",
"0.52682877",
"0.52546465",
"0.52405465",
"0.52323806",
"0.52286315",
"0.520785",
"0.52022034",
"0.5188775",
"0.518617",
"0.5179519",
"0.5153695",
"0.5149687",
"0.5148356",
"0.51347834",
"0.5119752",
"0.5117544",
"0.5111631",
"0.50855637",
"0.507925",
"0.5074333",
"0.5072929",
"0.5070218",
"0.5066965",
"0.5063373",
"0.50573426",
"0.50540745",
"0.50456613",
"0.50434405",
"0.50175995",
"0.50153315",
"0.5014803",
"0.50134665",
"0.5007577",
"0.5005466",
"0.5005248",
"0.49983808",
"0.49906224",
"0.49905416",
"0.49761933",
"0.49738637",
"0.4969489",
"0.4964253",
"0.4957233",
"0.49539092",
"0.49513593",
"0.4948799",
"0.49385267",
"0.49276292",
"0.4920668",
"0.49194866",
"0.49176988",
"0.4910622",
"0.48884806",
"0.48854363",
"0.48838323",
"0.48814517",
"0.48754817",
"0.48753938",
"0.4875288",
"0.48732668",
"0.48608062",
"0.48567507",
"0.48533243",
"0.48524228",
"0.4846062",
"0.48407558",
"0.48384872",
"0.4837278",
"0.48306277",
"0.482966"
] |
0.5570132
|
11
|
Load a music in memory, then the AudioPlayer is ready to play
|
public boolean load(final AudioFile file) {
if (file == null || file.path.equals(""))
throw new IllegalArgumentException("Music parameter is null or the path is invalid");
audioFile = file;
AudioInputStream inputStream;
// TODO Would it be better to throw exceptions ?
try {
inputStream = AudioUtils.getAudioFileStream(currentClip.getFormat(), file.path);
} catch (Exception e1) {
Log.error("Exception during audio file decoding : " + e1.getMessage());
return false;
}
try {
close();
currentClip.open(inputStream);
return true;
} catch (LineUnavailableException e) {
Log.error("Unavailable output peripheral");
} catch (IllegalStateException e) {
Log.error("The player can't be stopped");
} catch (IOException e) {
Log.error("Problem duraing file input / output");
} catch (NullPointerException e) {
Log.error("AudioPlayer missing file " + file.path);
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static void loadMusic()\n\t{\n\t\t// TODO: update this with the correct file names.\n\t\tmusic = new ArrayList<Music>();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tmusic.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"Lessons-8bit.mp3\"))));\n\t\t\tmusic.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"bolo_menu.mp3\"))));\n\t\t\t//music.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"song2.ogg\"))));\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(e);\n\t\t\te.printStackTrace();\n\t\t\tthrow e;\n\t\t}\n\t}",
"public void initMusic() {\r\n mSoundPool = new SoundPool(3, AudioManager.STREAM_MUSIC, 0);\r\n mSoundClick = mSoundPool.load(getActivity(), R.raw.click, 1);\r\n mSoundCorrect = mSoundPool.load(getActivity(), R.raw.correct, 1);\r\n mSoundIncorrect = mSoundPool.load(getActivity(), R.raw.wrong, 1);\r\n }",
"public Music loadMusic(String fileName);",
"public static void load() {\n\n\t\ttry {\n\t\t\t// Insert audio load ex:\n\t\t\tmusicMap.put(\"music\", new Music(\"res/menuMusic.wav\"));\n\t\t} catch (SlickException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public void loadMusic(File f) {\n music = new MP3(f);\n }",
"public static void loadAudio()\n\t{\n\t\ttry\n\t\t{\n\t\t\tmusic = Applet.newAudioClip(new URL(\"file:\" + System.getProperty(\"user.dir\") + \"/sound/Pamgaea.wav\"));\n\t\t\tlaser = Applet.newAudioClip(new URL(\"file:\" + System.getProperty(\"user.dir\") + \"/sound/laser.wav\"));\n\t\t\tlaserContinuous = Applet.newAudioClip(new URL(\"file:\" + System.getProperty(\"user.dir\") + \"/sound/laser_continuous.wav\"));\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void playMusic() {\n\t\tthis.music.start();\n\t}",
"public Music loadMusic(String fileName, float volume);",
"private void startMusic() {\r\n final Format input1 = new AudioFormat(AudioFormat.MPEGLAYER3);\r\n final Format input2 = new AudioFormat(AudioFormat.MPEG);\r\n final Format output = new AudioFormat(AudioFormat.LINEAR);\r\n PlugInManager.addPlugIn(\r\n \"com.sun.media.codec.audio.mp3.JavaDecoder\",\r\n new Format[]{input1, input2},\r\n new Format[]{output},\r\n PlugInManager.CODEC\r\n );\r\n try {\r\n final File f = new File(\"support_files//tetris.mp3\");\r\n myPlayer = Manager.createPlayer(new MediaLocator(f.toURI().toURL()));\r\n } catch (final NoPlayerException | IOException e) {\r\n e.printStackTrace();\r\n }\r\n if (myPlayer != null) {\r\n myPlayer.start();\r\n }\r\n }",
"public static void startMusic()\r\n\t{\r\n\t\tif ( musicPlayer == null )\r\n\t\t\tmusicPlayer = new MusicPlayer( \"Music2.mid\" );\r\n\t\telse\r\n\t\t\tmusicPlayer.play();\r\n\t}",
"public static void startMusic()\n\t{\n\t\tmusic.loop();\n\t}",
"public static void music (String fileName)\r\n {\r\n\tAudioPlayer MGP = AudioPlayer.player;\r\n\tAudioStream BGM;\r\n\tAudioData MD;\r\n\r\n\tContinuousAudioDataStream loop = null;\r\n\r\n\ttry\r\n\t{\r\n\t InputStream test = new FileInputStream (\"lamarBackgroundMusic.wav\");\r\n\t BGM = new AudioStream (test);\r\n\t AudioPlayer.player.start (BGM);\r\n\r\n\t}\r\n\tcatch (FileNotFoundException e)\r\n\t{\r\n\t System.out.print (e.toString ());\r\n\t}\r\n\tcatch (IOException error)\r\n\t{\r\n\t System.out.print (error.toString ());\r\n\t}\r\n\tMGP.start (loop);\r\n }",
"private void initialMusic(){\n\n }",
"public void play() {\n\t\ttry {\n\t\t\taudioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void startMusic()\n\t{\n\t\tif (music == null)\n\t\t{\n\t\t\tloadMusic();\n\t\t\tif (music.size() < 2)\n\t\t\t{\n\t\t\t\tthrow new GameLogicException(\"At least two songs must be specified.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurrentMusicFile = 0;\n\t\tmusic.get(currentMusicFile).setVolume(musicVolume / 100.f);\n\t\tmusic.get(currentMusicFile).play();\n\t\tmusic.get(currentMusicFile).setOnCompletionListener(musicOnCompletionListener);\n\t}",
"public void preloadMusic(String name) throws ResourceNotFound {\n\t\tif (!m_music.containsKey(name)) {\n\n\t\t\tint ident = m_context.getResources().getIdentifier(name, \"raw\",\n\t\t\t\t\tm_context.getPackageName());\n\t\t\tif (ident == 0) {\n\t\t\t\tJavaLog.fatal(TAG, \"Music with name \" + name\n\t\t\t\t\t\t+ \" cannot be preloaded\");\n\t\t\t\tthrow new ResourceNotFound(\"music \" + name);\n\t\t\t}\n\n\t\t\tMusic sp = new Music();\n\t\t\tMediaPlayer mediaPlayer = MediaPlayer.create(m_context, ident);\n\t\t\tsp.addMedialPlayer(mediaPlayer);\n\n\t\t\tm_music.put(name, sp);\n\t\t\tJavaLog.info(TAG, \"Music with name \" + name + \" has been preloaded\");\n\t\t}\n\t}",
"private static void playAudio(String musicFile) {\n }",
"private void play() {\n /** Memanggil File MP3 \"indonesiaraya.mp3\" */\n try {\n mp.prepare();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /** Menjalankan Audio */\n mp.start();\n\n /** Penanganan Ketika Suara Berakhir */\n mp.setOnCompletionListener(new OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n stateAwal();\n }\n });\n }",
"@Override\n\t\tpublic void onLoaded(String arg0) {\n\t\t\t\tplayer.play();\n\t\t}",
"public void playMusic() {\n\t\ttry {\n\t\t\tsoundManager.playMusic(\"bgroundmusic\");\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}",
"private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }",
"public void load () {\n hasSoundOn = preference.getBoolean(\"sound effect\", true);\n hasMusicOn = preference.getBoolean(\"background music\", true);\n soundVolume = MathUtils.clamp(preference.getFloat(\"sound volume\", 0.5f), 0.0f, 1.0f);\n musicVolume = MathUtils.clamp(preference.getFloat(\"music volume\", 0.5f), 0.0f, 1.0f);\n }",
"@Override\r\n public void loadPianoAudioStart() {\n }",
"public abstract SoundContainer loadSound( String filename ) throws IOException;",
"public void playAudio() {\n\t\tmusic[currentSong].stop();\n\t\tcurrentSong++;\n\t\tcurrentSong %= music.length;\n\t\tmusic[currentSong].play();\n\t}",
"public void play() {\n\t\tmusic.play();\n\t\tsyncPosition();\n\t}",
"public void playMusic() {\r\n try {\r\n File mFile = new File(Filepath);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(audioInput);\r\n FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl.setValue(-25.0f); //reduces the volume by 25 decibels\r\n clip.start();\r\n clip.loop(Clip.LOOP_CONTINUOUSLY);\r\n\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"private void setupPlayer() {\n player = MediaPlayer.create(MediaPlayerActivity.this, R.raw.byte_music);\n updateState(MediaPlayerState.STATE_PREPARED);\n }",
"public void playLocal(String audiofile);",
"void startMusic(AudioTrack newSong);",
"private void startPlaying() {\n try {\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(audioFile.getAbsolutePath());\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"prepare() failed\");\n }\n showTimer(false);\n } catch (Exception e) {\n logException(e, \"MicManualFragment_startPlaying()\");\n }\n\n }",
"public abstract SoundContainer loadSound( URL url ) throws IOException;",
"public abstract SoundContainer loadSound( InputStream in ) throws IOException;",
"public void StartMusic(int music_id);",
"private void startPlay() {\n isPlaying = true;\n isPaused = false;\n playMusic();\n }",
"public void playMedia() {\n\t\tif (MainActivity.mPlayer == null) {\n\t\t\tMainActivity.mPlayer = new MediaPlayer();\n\t\t\tMainActivity.mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n\t\t\tMainActivity.currentSong = song;\n\t\t\tMainActivity.currentAlbum = album;\n\t\t}\n\t\tif (!MainActivity.currentSong.getTitleKey().equals(song.getTitleKey())) {\n\t\t\tMainActivity.currentSong = song;\n\t\t\tMainActivity.currentAlbum = album;\n\t\t\tMainActivity.mPlayer.reset();\n\t\t}\n\n\t\ttitle = song.getTitle();\n\t\talbumTitle = album.getAlbum();\n\t\talbumArt = album.getAlbumArt();\n\n\t\ttry {\n\t\t\tMainActivity.mPlayer.setDataSource(this, song.getUri());\n\t\t\tMainActivity.mPlayer.prepare();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (SecurityException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalStateException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\tMainActivity.mPlayer.setOnPreparedListener(new OnPreparedListener() {\n\t\t\t@Override\n\t\t\tpublic void onPrepared(MediaPlayer mp) {\n\t\t\t\tmp.start();\n\t\t\t}\n\t\t});\n\t\tMainActivity.mPlayer.setOnCompletionListener(new OnCompletionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tnext();\n\t\t\t}\n\n\t\t});\n\n\t\tnew Handler(getMainLooper()).post(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tupdateMainActivity();\n\t\t\t\tupdateNowPlaying();\n\t\t\t}\n\t\t});\n\t}",
"private void makeNewMusic() {\n File f = music.getFile();\n boolean playing = music.isPlaying();\n music.stop();\n music = new MP3(f);\n if (playing) {\n music.play(nextStartTime);\n }\n }",
"public Music loadMusic(String fileName, boolean isLoop, float volumn);",
"public void initMusicPlayer() {\n PatariSingleton.getInstance().getMediaPlayer().setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK);\n PatariSingleton.getInstance().getMediaPlayer().setAudioStreamType(AudioManager.STREAM_MUSIC);\n PatariSingleton.getInstance().getMediaPlayer().setOnPreparedListener(this);\n PatariSingleton.getInstance().getMediaPlayer().setOnCompletionListener(this);\n PatariSingleton.getInstance().getMediaPlayer().setOnErrorListener(this);\n PatariSingleton.getInstance().getMediaPlayer().setOnBufferingUpdateListener(this);\n try {\n if (wifiLock != null && wifiLock.isHeld()) {\n wifiLock.release();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n try {\n wifiLock = ((WifiManager) getApplication().getApplicationContext().getSystemService(Context.WIFI_SERVICE)).createWifiLock(WifiManager.WIFI_MODE_FULL, \"mylock\");\n wifiLock.acquire();\n } catch (Exception e) {\n e.printStackTrace();\n }\n IS_PROGRESS = false;\n }",
"public void backgroundMusic(String path) {\n if (Objects.equals(playingFile, path)) return;\n playingFile = path;\n\n\n // stop if playing\n stop();\n\n if (path == null) {\n // nothing to play\n playingClip = null;\n return;\n }\n\n try {\n\n // find file\n final AudioInputStream stream = AudioSystem.getAudioInputStream(new File(path));\n\n // create player\n playingClip = AudioSystem.getClip();\n playingClip.open(stream);\n playingClip.loop(playingClip.LOOP_CONTINUOUSLY);\n\n // play\n playingClip.start();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void startSound() {\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\tURL url = this.getClass().getResource(\"/\"+wavMusicFile);\n\t\t\t//System.out.println(\"url: \" + url);\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tclip = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tclip.open(audioIn);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void playMusic(File filepath) {\r\n\t\ttry {\r\n\t\t AudioInputStream song = AudioSystem.getAudioInputStream(filepath);\r\n\t\t\tAudioFormat format = song.getFormat();\r\n\t\t DataLine.Info info = new DataLine.Info(Clip.class, format);\r\n\t\t Clip clip = (Clip) AudioSystem.getLine(info);\r\n\t\t clip.open(song);\r\n\t\t clip.start();\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tthrow new ErrorException(ex);\r\n\t\t}\r\n\t}",
"public void playSong() {\n player.reset();\n Song playedSong;\n //get the right song\n if (shuffle) {\n int newSong = shuffleIndexes.get(songPosn);\n playedSong = songs1.get(newSong);\n } else {\n playedSong = songs1.get(songPosn);\n }\n songTitle = playedSong.getSongName();\n Uri uri = Uri.parse(playedSong.getSongLocation());\n try {\n player.setDataSource(getApplicationContext(), uri);\n } catch (Exception e) {\n Log.e(\"MUSIC SERVICE\", \"Error setting data source\", e);\n }\n state = PlaybackStateCompat.STATE_PLAYING;\n player.prepareAsync();\n showNotification();\n }",
"public void play() {\n if (audio != null) {\n audio.play(sfxVolume);\n }\n }",
"@Override\r\n public void loadPianoAudioFinish() {\n }",
"public void play() {\n\t\tif(hasAudioLoaded()) {\n\t\t\tcurrentClip.start();\n\t\t\tisPlaying = true;\n\t\t}\n\t}",
"public MediaView loadMusic(StackPane p)\n {\n String musicLoc = \"PTtheme.mp3\";\n \n Media mjuzik = new Media(new File(musicLoc).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(mjuzik);\n mediaPlayer.setAutoPlay(true);\n \n playMusic = new Button(\"Music On/Off\");\n \n MediaView mjuzikView = new MediaView(mediaPlayer); \n \n //on click\n playMusic.setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent e) \n {\n Status status = mediaPlayer.getStatus();\n\n if (status == Status.PAUSED || status == Status.READY || status == Status.STALLED || status == Status.STOPPED) \n {\n mediaPlayer.play();\n } \n else \n {\n mediaPlayer.pause();\n }\n }\n });\n \n playMusic.setTranslateX(0);\n playMusic.setTranslateY(-425);\n playMusic.setScaleX(1);\n playMusic.setScaleY(1); \n \n p.getChildren().add(playMusic);\n \n return mjuzikView;\n }",
"private void playAudio() {\r\n Play.au(audioFileName, false);\r\n }",
"@Override\r\n\tpublic void setMusic() {\r\n\t\tmanager.getMusicManager().setMusic((Music) Gdx.audio.newMusic(Gdx.files.internal(\"Music/Bandit Camp.mp3\")));\r\n\t}",
"public void startSong() {\n if (trackPlaying) {\n trackPlaying = false;\n mp.finish();\n\n System.out.print(mp.isFinished() + \"+\" + mp.isPaused());\n }\n\t\n\t//The startSong overloads start and pause. If the song is pause, then resume.\n if (mp.isPaused() && !mp.isFinished()) {\n mp.resume();\n return;\n }\n\n sequence = sc.getSongSequence();\n try {\n mp.start(sequence);\n } catch (InvalidMidiDataException ex) {\n Logger.getLogger(uMusicPlayerController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (MidiUnavailableException ex) {\n Logger.getLogger(uMusicPlayerController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public static void musicFirstLevel(){\n\t\ttry {\r\n\t\t\tbgmusicLevel = new Music(\"res/sound/firstLevel.wav\");\r\n\t\t\tbgmusicLevel.loop(1f, 0.1f);\r\n\t\t} catch (SlickException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void OnGameStart() {\n\t\tsuper.OnGameStart();\n\t\tMusicManage.setLoopingMusic(tumMusic, true);\n\t\tMusicManage.playMusic(tumMusic);\n\t}",
"public void playSoundtrack() {\n if(this.musicEnabled) {\n try {\n Clip soundtrackClip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new BufferedInputStream(Assets.soundTrack));\n soundtrackClip.open(inputStream);\n soundtrackClip.start();\n soundtrackClip.loop(Clip.LOOP_CONTINUOUSLY);\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(e.getMessage());\n }\n }\n }",
"public void play(boolean music) {\n\t\tplay(1.0f, 1.0f, music);\n\t}",
"protected void loadMockData() {\n\n int ctr;\n InputStream inputStream = getResources().openRawResource(R.raw.song_list);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n\n try {\n ctr = inputStream.read();\n while (ctr != -1) {\n byteArrayOutputStream.write(ctr);\n ctr = inputStream.read();\n }\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Parse the data.\n try {\n JSONObject jObject = new JSONObject(byteArrayOutputStream.toString());\n\n String status_code = jObject.getString(\"statusCode\");\n\n if (status_code.equalsIgnoreCase(\"200\")) {\n JSONArray jArray = jObject.getJSONArray(\"data\");\n\n audioList = new ArrayList<>();\n\n for (int i = 0; i < jArray.length(); i++) {\n JSONObject song = jArray.getJSONObject(i);\n\n String genre = song.getString(\"genre\");\n String album = song.getString(\"album\");\n String author = song.getString(\"author\");\n String title = song.getString(\"title\");\n String url = song.getString(\"url\");\n String imgUrl = song.getString(\"img\");\n\n Audio audio = new Audio(genre, album, author, title, url, imgUrl);\n\n // Save to audioList.\n audioList.add(audio);\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void initialize() {\n //talonOrchestra.playMusic();\n }",
"public static void start(Context c, int music, boolean force) {\r\n if ((!force) && (currentMusic_ != INVALID_NUMBER)) {\r\n // already playing some music and not forced to change immediately\r\n if (music != INVALID_NUMBER) {\r\n nextMusic_ = music;\r\n MediaPlayer mp = players_.get(music);\r\n if (mp == null) {\r\n mp = MediaPlayer.create(c, music);\r\n players_.put(music, mp);\r\n }\r\n MediaPlayer cp = players_.get(currentMusic_);\r\n if (cp != null) {\r\n cp.setOnCompletionListener(new OnCompletionListener() {\r\n @Override\r\n public void onCompletion(MediaPlayer p) {\r\n MusicHandler.next();\r\n }\r\n });\r\n cp.setLooping(false);\r\n }\r\n }\r\n return;\r\n }\r\n if (currentMusic_ == music) {\r\n // already playing this music\r\n return;\r\n }\r\n if (currentMusic_ != INVALID_NUMBER) {\r\n // playing some other music, pause it and change\r\n pause();\r\n }\r\n currentMusic_ = music;\r\n MediaPlayer mp = players_.get(music);\r\n if (mp != null) {\r\n if (!mp.isPlaying()) {\r\n // Note: This continues the piece where it last let off\r\n mp.setLooping(true);\r\n mp.setOnCompletionListener(null);\r\n mp.start();\r\n return;\r\n }\r\n } else {\r\n mp = MediaPlayer.create(c, music);\r\n players_.put(music, mp);\r\n if (mp == null) {\r\n // Log an error, but don't do anthing (we do not want to risk f/c the app)\r\n Log.e(TAG, \"player was not created successfully\");\r\n } else {\r\n mp.setLooping(true);\r\n mp.setOnCompletionListener(null);\r\n mp.start();\r\n }\r\n }\r\n }",
"public void StartMusic(musicenum_t music_id);",
"@Override\n protected Void doInBackground(String... params) {\n mediaPlayer = new MediaPlayer();\n mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n try {\n mediaPlayer.setDataSource(url_music);\n // Log.e(\"songs url\", url_music);\n\n } catch (IllegalArgumentException e) {\n // Toast.makeText(getActivity(), \"You might not set the URI correctly!\", Toast.LENGTH_LONG).show();\n } catch (SecurityException e) {\n // Toast.makeText(getActivity(), \"You might not set the URI correctly!\", Toast.LENGTH_LONG).show();\n } catch (IllegalStateException e) {\n // Toast.makeText(getActivity(), \"You might not set the URI correctly!\", Toast.LENGTH_LONG).show();\n } catch (IOException e) {\n //e.printStackTrace();\n }\n try {\n mediaPlayer.prepare();\n } catch (IllegalStateException e) {\n //Toast.makeText(mContext, \"You might not set the URI correctly!\", Toast.LENGTH_SHORT).show();\n //cc.showToast(\"You might not set the URI correctly!\");\n } catch (IOException e) {\n // Toast.makeText(mContext, \"You might not set the URI correctly!\", Toast.LENGTH_SHORT).show();\n //cc.showToast(\"You might not set the URI correctly!\");\n }\n\n return null;\n }",
"public Sound loadSound(String file);",
"@Override\n\tpublic void loadSounds() {\n\t\ttry {\n\t\t\tSoundPlayer.load(\"bounce.wav\");\n\t\t\tSoundPlayer.load(\"laser1.wav\");\n\t\t\tSoundPlayer.load(\"hit1.wav\");\n\t\t\tSoundPlayer.load(\"speedup.wav\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void playBackGroundMusic(String path) {\n if (musicPlayer != null && musicPlayer.getSourceLocation() != null) {\n if (musicPlayer.getSourceLocation().equals(path)) {\n if (musicPlayer.isEndOfMediaReached()) {\n musicPlayer.seek(0);\n musicPlayer.play();\n }\n return;\n }\n musicPlayer.stop();\n }\n musicPlayer = new Player();\n musicPlayer.setSourceLocation(path);\n musicPlayer.play();\n }",
"public static void loadPlaylist()\n {\n if (JSoundsMainWindowViewController.alreadyPlaying)\n JSoundsMainWindowViewController.stopSong();\n \n JSoundsMainWindowViewController.shutDownPlayer();\n JSoundsMainWindowViewController.isPlaylist=true;\n JSoundsMainWindowViewController.playlistOrderBy(true, false, false);\n }",
"public static void updateMusic()\r\n\t{\r\n\t\tif ( Settings.isMusicOn() && !musicPlaying() )\r\n\t\t\tstartMusic();\r\n\t\telse if ( !Settings.isMusicOn() && musicPlaying() )\r\n\t\t\tstopMusic();\r\n\t}",
"public void start() {\n AudioPlayer.player.start(cas);\n playing = true;\n }",
"public void playSelectSong() {\n isStart = false;\n if (getCurrentSong() == 0) {\n audioList.get(getCurrentSong()).setSelect(true);\n playListAdapter.notifyItemChanged(getCurrentSong());\n }\n isPauseResume = false;\n if (player != null) {\n player.stopMedia();\n }\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n /*new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n }\n }, DELAY_TIME);*/\n }",
"private void playSound() {\n\t\tif (controllerVars.isLoaded() && !controllerVars.isPlays()) {\n\t\t\tcontrollerVars.getSoundPool().play(controllerVars.getSoundID(), controllerVars.getVolume(), controllerVars.getVolume(), 1, 0, 1f);\n\t\t\tcontrollerVars.COUNTER++;\n\t\t\t//Toast.makeText(act, \"Played sound\", Toast.LENGTH_SHORT).show();optional Playing message \n\t\t\tcontrollerVars.setPlays(true);\n\t\t\tonComplete(controllerVars.getMediaPlayer().getDuration());\n\t\t}\n\t\t//controllerVars.getMediaPlayer().start();\n\t\t//controllerVars.setPlays(true);\n\t}",
"@Override\r\n public void show()\r\n {\r\n // De inmediato, ponemos en marcha una melodia\r\n if (!juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).isPlaying())\r\n {\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).play();\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).setLooping(true);\r\n }\r\n }",
"private void start() {\n\t\t// 开启播放器\n\t\tmCurrentMediaPlayer.start();\n\t\tsetState(STARTED);\n\n\t\t// 开启计时心跳\n\t\tmHandler.postDelayed(mUpdateTimeTask, 500);\n\t\tif (mPlayerEngineListener != null) {\n\t\t\tmPlayerEngineListener.onTrackStart();\n\t\t}\n\t\t// 开启频谱\n\t\t// mHandler.postDelayed(mSetFxAndUI, 500);\n\t\t// setupVisualizerFxAndUI();\n\n\t\tLog.i(this.getClass().getSimpleName(), \" music player : started...\");\n\t}",
"public void play()\n\t{\n\t\tif (canPlay)\n\t\t{\n\t\t\tsong.play();\n\t\t\tsong.rewind();\n\t\t\tif (theSong == \"SG1\" || theSong == \"SG2\")\n\t\t\t\tcanPlay = false;\n\t\t}\n\t}",
"private void loadAndPlay(final TextChannel channel, final String trackUrl, final User user) {\n\t\tfinal GuildMusicManager musicManager = getGuildAudioPlayer(channel.getGuild());\n\n\t\tplayerManager.loadItemOrdered(musicManager, trackUrl, new AudioLoadResultHandler() {\n\t\t\t// @Override\n\t\t\tpublic void trackLoaded(AudioTrack track) {\n\t\t\t\tchannel.sendMessage(\"Adding to queue \" + track.getInfo().title).queue();\n\n\t\t\t\tplay(channel.getGuild(), musicManager, track, user);\n\t\t\t}\n\n\t\t\t// @Override\n\t\t\tpublic void playlistLoaded(AudioPlaylist playlist) {\n\t\t\t\tAudioTrack firstTrack = playlist.getSelectedTrack();\n\n\t\t\t\tif (firstTrack == null) {\n\t\t\t\t\tfirstTrack = playlist.getTracks().get(0);\n\t\t\t\t}\n\n\t\t\t\tchannel.sendMessage(firstTrack.getInfo().title + \" added to queue!\").queue();\n\n\t\t\t\tplay(channel.getGuild(), musicManager, firstTrack, user);\n\t\t\t}\n\n\t\t\t// @Override\n\t\t\tpublic void noMatches() {\n\t\t\t\tchannel.sendMessage(\"Nothing found by \" + trackUrl).queue();\n\t\t\t}\n\n\t\t\t// @Override\n\t\t\tpublic void loadFailed(FriendlyException exception) {\n\t\t\t\tchannel.sendMessage(\"Could not play: \" + exception.getMessage()).queue();\n\t\t\t}\n\t\t});\n\t}",
"public void load(String fileName) {\n\t\tif (new File(fileName).exists())\n\t\t\tsetCurrentFile(new AudioFile(fileName));\n\t\telse\n\t\t\tSystem.err.println(\"File \" + fileName + \" does not exist.\");\n\t}",
"@Override\n public void onClick(View v) {\n if(mMediaPlayer==null){\n mMediaPlayer=new MediaPlayer();\n mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n try {\n mMediaPlayer.setDataSource(getPath());\n mMediaPlayer.prepare();\n mMediaPlayer.start();\n } catch (IllegalArgumentException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (SecurityException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IllegalStateException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n } else {\n mMediaPlayer.release();\n mMediaPlayer = null;\n }\n }",
"@Override\n public void run() {\n if(musicEnabled) {\n playSoundtrack();\n while (running) {\n if(!stack.isEmpty()) {\n Sound sound = stack.pop();\n sound.play(sound.loadInputStream());\n }\n }\n }\n }",
"@Override\n\t\tpublic void run() {\n\t\t\tmFiles = DataSourceManager.getSongFileList(currentAlbumPath);\n\t\t\tif (mFiles == null || mFiles.length == 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (mPlayPos < 0 || mPlayPos > mFiles.length -1) {\n\t\t\t\tmPlayPos = 0;\n\t\t\t}\n\t\t\t/*Message msg = mMediaplayerHandler.obtainMessage(PREPARE_PLAY);\n\t\t\tif (msg == null) {\n\t\t\t\tmsg = new Message();\n\t\t\t\tmsg.what = PREPARE_PLAY;\n\t\t\t\t\n\t\t\t}\n\t\t\tBundle data = new Bundle();\n\t\t\tdata.putString(MSG_PLAY_PATH, mFiles[mPlayPos]);\n\t\t\tdata.putInt(MSG_PLAY_POSITION, mSeek);\n\t\t\tmsg.setData(data);\n\t\t\tmMediaplayerHandler.sendMessage(msg);*/\n\t\t\t\n\t\t\tsendHandlerInitialized(mFiles[mPlayPos], false);\n\t\t}",
"public final void play() {\n\t\tinitialize();\n\t\tstartPlay();\n\t\tendPlay();\n\t}",
"public void play(float pitch, float volume, boolean music) {\n\t\tif(!music)\n\t\t\tsound.playAsSoundEffect(pitch, volume * SoundStore.get().getSoundVolume(), false);\n\t\telse\n\t\t\tsound.playAsMusic(pitch, volume * SoundStore.get().getSoundVolume(), false);\n\t\tassert sound.isPlaying();\n\t\tstart = System.currentTimeMillis();\n\t\t\n\t\tthis.music = music;\n\t}",
"public void load(int soundID) {\n System.out.println(\"LoadSound: \" + soundID);\n String aFilename = getSoundName(soundID);\n if (aFilename == null) \n {\n return;\n }\n \n Player player = null;\n try {\n // Create the player.\n if (mSoundData[soundID] == null) {\n InputStream is = getClass().getResourceAsStream(\"/sounds/\" + aFilename);\n\n if (is == null) {\n int kk = 0;\n }\n mSoundData[soundID] = new byte[is.available()];\n\n\n is.read(mSoundData[soundID]);\n is.close();\n }\n } catch (Throwable e) {\n e.printStackTrace();\n }\n }",
"public void play(){\n Log.d(TAG, \"startAudio: called\");\n if(mMediaPlayer!=null){\n\n mMediaPlayer.start();\n mProgressBar.setProgress(mMediaPlayer.getCurrentPosition());\n mProgressBar.setMax(mMediaPlayer.getDuration());\n\n // updating progress bar\n seekHandler.postDelayed(updateSeekBar, 5);\n }\n }",
"public void specialSong()\n {\n if(!mute)\n {\n try {\n \n bclip.stop();\n \n // Open an audio input stream.\n //URL url = this.getClass().getClassLoader().getResource(\"Glitzville.wav\"); \n //if(lastpowerUp.equals(\"RAINBOW\"))\n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Starman.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n sclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n sclip.open(audioIn); \n \n sclip.start();\n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } \n }\n }",
"public void play(String loopOption) {\n\t\ttry {\n\t\t\tthis.audioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t\tif (loopOption.equals(\"infinite\")) {\n\t\t\t\tthis.clip.loop(Clip.LOOP_CONTINUOUSLY);\n\t\t\t}\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void playMusic(String fileName, float volume) {\n\t\t\n\t\tif (Launcher.cHandler.musicToggle) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t// Load the audio file\n\t\t\t\tFile file = new File(\"./audio/\" + fileName + \".wav\");\n\t\t\t\t\n\t\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(file);\n\t\t\t\t\n\t\t\t\t// Generate the sound clip\n\t\t\t\tcurrentMusic = AudioSystem.getClip();\n\t\t\t\tcurrentMusic.open(audioIn);\n\t\t\t\t\n\t\t\t\t// Set volume\n\t\t\t\tif (volume < 0f || volume > 1f) {\n\t\t\t\t\tthrow new IllegalArgumentException(\"'\" + volume + \"' is not a valid volume.\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tFloatControl gain = (FloatControl) currentMusic.getControl(FloatControl.Type.MASTER_GAIN); \n\t\t\t gain.setValue(20f * (float) Math.log10(volume));\n\t\t\t \n\t\t\t\t// Play the clip\n\t\t\t currentMusic.start();\n\t\t\t\t\n\t\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (LineUnavailableException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void playMusic() {\n\t\tif (!isReverse) {\n\t\t\tif (!isWah && !isDistorted)\n\t\t\t\talSourcePlay(musicSourceIndex);\n\t\t\tif (isWah && isDistorted)\n\t\t\t\talSourcePlay(wahDistortSourceIndex);\n\t\t\telse if (isWah)\n\t\t\t\talSourcePlay(wahSourceIndex);\n\t\t\telse if (isDistorted)\n\t\t\t\talSourcePlay(distortSourceIndex);\n\t\t\tif (isFlanging) {\n\t\t\t\tif (!isWah && !isDistorted)\n\t\t\t\t\talSourcePlay(flangeSourceIndex);\n\t\t\t\tif (isWah && isDistorted)\n\t\t\t\t\talSourcePlay(wahDistortFlangeSourceIndex);\n\t\t\t\telse if (isWah)\n\t\t\t\t\talSourcePlay(wahFlangeSourceIndex);\n\t\t\t\telse if (isDistorted)\n\t\t\t\t\talSourcePlay(distortFlangeSourceIndex);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (!isWah && !isDistorted)\n\t\t\t\talSourcePlay(reverseSourceIndex);\n\t\t\telse if (isWah && isDistorted)\n\t\t\t\talSourcePlay(revWahDistortSourceIndex);\n\t\t\telse if (isWah)\n\t\t\t\talSourcePlay(revWahSourceIndex);\n\t\t\telse if (isDistorted)\n\t\t\t\talSourcePlay(revDistortSourceIndex);\n\t\t\tif (isFlanging) {\n\t\t\t\tif (!isWah && !isDistorted)\n\t\t\t\t\talSourcePlay(revFlangeSourceIndex);\n\t\t\t\tif (isWah && isDistorted)\n\t\t\t\t\talSourcePlay(revWahDistortFlangeSourceIndex);\n\t\t\t\telse if (isWah)\n\t\t\t\t\talSourcePlay(revWahFlangeSourceIndex);\n\t\t\t\telse if (isDistorted)\n\t\t\t\t\talSourcePlay(revDistortFlangeSourceIndex);\n\t\t\t}\n\t\t}\n\t}",
"public void Play() {\n superPlaneGodMode = false;\r\n if (!musicPlaying)\r\n backgroundMusic.pause();\r\n if (musicPlaying)\r\n backgroundMusic.start();\r\n paused = false;\r\n }",
"public void start()\n\t{\n\t\tString name = getAudioFileName();\n\t\ttry\n\t\t{\t\t\t\n\t\t\tInputStream in = getAudioStream();\n\t\t\tAudioDevice dev = getAudioDevice();\n\t\t\tplay(in, dev);\n\t\t}\n\t\tcatch (JavaLayerException ex)\n\t\t{\n\t\t\tsynchronized (System.err)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Unable to play \"+name);\n\t\t\t\tex.printStackTrace(System.err);\n\t\t\t}\n\t\t}\n\t}",
"protected void setupAudio(Engine engine, SceneManager sceneManager, Invocable invocableEngine) {\n\t\tsetupAudio = new File(\"setupAudio.js\");\n\t\tjsEngine.put(\"currentSong\", currentSong);\n\t\tjsEngine.put(\"music\", music);\n\t\tjsEngine.put(\"sfx\", sfx);\n\t\tthis.runScript(jsEngine, setupAudio);\n\t\ttry {\n\t\t\tinvocableEngine.invokeFunction(\"setupAudio\", this);\n\n\t\t} catch (ScriptException e1) {\n\t\t\tSystem.out.println(\"ScriptException in \" + setupAudio + e1);\n\t\t} catch (NoSuchMethodException e2) {\n\t\t\tSystem.out.println(\"No such method in \" + setupAudio + e2);\n\t\t} catch (NullPointerException e3) {\n\t\t\tSystem.out.println(\"Null pointer exception reading \" + setupAudio + e3);\n\t\t}\n\t\tmusic = (Sound[]) jsEngine.get(\"music\");\n\t\tsfx = (Sound[]) jsEngine.get(\"sfx\");\n\t}",
"public static void musicMainMenu(){\n\t\ttry {\r\n\t\t\tbgmusic = new Music(\"res/otherSounds/Menu.wav\");\r\n\t\t\tbgmusic.loop(1f, 0.2f);\r\n\t\t\t//System.out.println(bgmusic.getVolume()); \t\r\n\t\t} catch (SlickException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void playAudio() {\n\n }",
"public static void init() {\n\t\tmusicManager = new MusicManager();\n\t}",
"@SuppressWarnings(\"deprecation\")\n\tpublic static void load_sound() throws NoPlayerException, CannotRealizeException, IOException {\n\n\t\tFile clicFile = new File(\"sons/click.wav\");\n\t\tURL clicUrl = clicFile.toURL();\n\n\t\tFile portailFile = new File(\"sons/portail_low.wav\");\n\t\tURL portailUrl = portailFile.toURL();\n\n\t\tFile hitFile = new File(\"sons/hit_low.wav\");\n\t\tURL hitUrl = hitFile.toURL();\n\n\t\tFile chargeFile = new File(\"sons/charge.wav\");\n\t\tURL chargeUrl = chargeFile.toURL();\n\n\t\tFile popFile = new File(\"sons/pop.wav\");\n\t\tURL popUrl = popFile.toURL();\n\n\t\tFile gameFile = new File(\"sons/game_all.wav\");\n\t\tURL gameUrl = gameFile.toURL();\n\n\t\t// creation of the players\n\t\tm_player_game = Manager.createRealizedPlayer(gameUrl);\n\t\tm_player_pop = Manager.createRealizedPlayer(popUrl);\n\t\tm_player_charge = Manager.createRealizedPlayer(chargeUrl);\n\t\tm_player_hit = Manager.createRealizedPlayer(hitUrl);\n\t\tm_player_hit2 = Manager.createRealizedPlayer(hitUrl);\n\t\tm_player_hit3 = Manager.createRealizedPlayer(hitUrl);\n\t\tm_player_hit4 = Manager.createRealizedPlayer(hitUrl);\n\t\tm_player_hit5 = Manager.createRealizedPlayer(hitUrl);\n\t\tm_player_hit6 = Manager.createRealizedPlayer(hitUrl);\n\t\tm_player_clic = Manager.createRealizedPlayer(clicUrl);\n\t\tm_player_portail = Manager.createRealizedPlayer(portailUrl);\n\t}",
"@Override\n\tpublic void loadPlayer() {\n\t\t\n\t}",
"public MusicData load(Long id) throws MusicAppException;",
"public void play()\n {\n this.mediaPlayer = new MediaPlayer(file);\n this.mediaPlayer.setVolume(volume);\n\n // Listener for end of media.\n mediaPlayer.setOnEndOfMedia(() -> {\n this.mediaPlayer.stop();\n });\n\n mediaPlayer.play();\n }",
"@Override\n\tpublic void play(String path) throws IOException, JavaLayerException, UnsupportedAudioFileException {\n\n\t\tthis.setOffSet(0);\n\n\t\tthis.decodeSong(path);\n\t\tthis.startInput(path);\n\n\t\tAudioFileFormat baseFileFormat = new MpegAudioFileReader().getAudioFileFormat(songFile);\n\t\tSystem.out.println(\"MusicPlayerModel says that the audio format is:\");\n\t\tSystem.out.println(baseFileFormat.toString());\n\t\tSystem.out.println(\"---------------------------------\");\n\t\t\n\n\t\tsetSongTotalLenght(fis.available());\n\t\tfileLocation = path + \"\";\n\n\t\t// Play every song on a new Thread\n\t\tnew Thread() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tplayer.play();\n\t\t\t\t} catch (JavaLayerException e) {\n\t\t\t\t}\n\t\t\t}\n\n\t\t}.start();\n\n\t}",
"private synchronized void loadSoundSystem() {\n/* 118 */ if (!this.loaded) {\n/* */ \n/* */ try {\n/* */ \n/* 122 */ (new Thread(new Runnable()\n/* */ {\n/* */ public void run()\n/* */ {\n/* 126 */ SoundSystemConfig.setLogger(new SoundSystemLogger()\n/* */ {\n/* */ public void message(String p_message_1_, int p_message_2_)\n/* */ {\n/* 130 */ if (!p_message_1_.isEmpty())\n/* */ {\n/* 132 */ SoundManager.LOGGER.info(p_message_1_);\n/* */ }\n/* */ }\n/* */ \n/* */ public void importantMessage(String p_importantMessage_1_, int p_importantMessage_2_) {\n/* 137 */ if (!p_importantMessage_1_.isEmpty())\n/* */ {\n/* 139 */ SoundManager.LOGGER.warn(p_importantMessage_1_);\n/* */ }\n/* */ }\n/* */ \n/* */ public void errorMessage(String p_errorMessage_1_, String p_errorMessage_2_, int p_errorMessage_3_) {\n/* 144 */ if (!p_errorMessage_2_.isEmpty()) {\n/* */ \n/* 146 */ SoundManager.LOGGER.error(\"Error in class '{}'\", p_errorMessage_1_);\n/* 147 */ SoundManager.LOGGER.error(p_errorMessage_2_);\n/* */ } \n/* */ }\n/* */ });\n/* 151 */ SoundManager.this.getClass(); SoundManager.this.sndSystem = new SoundManager.SoundSystemStarterThread(null);\n/* 152 */ SoundManager.this.loaded = true;\n/* 153 */ SoundManager.this.sndSystem.setMasterVolume(SoundManager.this.options.getSoundLevel(SoundCategory.MASTER));\n/* 154 */ SoundManager.LOGGER.info(SoundManager.LOG_MARKER, \"Sound engine started\");\n/* */ }\n/* 156 */ }\"Sound Library Loader\")).start();\n/* */ }\n/* 158 */ catch (RuntimeException runtimeexception) {\n/* */ \n/* 160 */ LOGGER.error(LOG_MARKER, \"Error starting SoundSystem. Turning off sounds & music\", runtimeexception);\n/* 161 */ this.options.setSoundLevel(SoundCategory.MASTER, 0.0F);\n/* 162 */ this.options.saveOptions();\n/* */ } \n/* */ }\n/* */ }",
"@Override\n public void onPrepared(MediaPlayer mp) {\n playMedia();\n }",
"public void allocate(AssetManager manager, String filename) {\n\t\tSound sound = manager.get(filename, Sound.class);\n\t}",
"public static void playShootingSound(){\n String musicFile = \"Sounds\\\\Shoot.mp3\";\n Media sound = new Media(new File(musicFile).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(sound);\n mediaPlayer.setVolume(App.getVolume());\n mediaPlayer.play();\n }",
"public synchronized void startPlayingSong(final Song selectedSong, final String path) {\n try {\n if (path != null) {\n PatariSingleton.getInstance().getMediaPlayer().setDataSource(path);\n MusicService.this.sendBroadcast(new Intent(Utils.BR_ACTION_NEW_SONG_PLAYED));\n PatariSingleton.getInstance().getMediaPlayer().prepareAsync();\n } else if (Utils.isOnline(this)) {\n PatariSingleton.getInstance().getMediaPlayer().setDataSource(selectedSong.getAudio());\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n IS_PROGRESS = true;\n PatariSingleton.getInstance().getMediaPlayer().prepareAsync();\n MusicService.this.sendBroadcast(new Intent(Utils.BR_ACTION_NEW_SONG_PLAYED));\n } else {\n sendBroadcast(new Intent(MainActivity.TAG_LOADING).putExtra(\"status\", false));\n stopSelf();\n AppDialog.showToast(getApplicationContext(), getString(R.string.internet_required_alert));\n }\n } catch (Exception e) {\n PLog.showLog(\"PlaySong()\", e.getMessage());\n }\n }",
"public void playAudio() {\n if (done==false)\n {\n file.play();\n }\n}"
] |
[
"0.78288764",
"0.7418697",
"0.7375488",
"0.7363721",
"0.7314102",
"0.72617954",
"0.71893483",
"0.71342033",
"0.71206933",
"0.71168065",
"0.705105",
"0.6948497",
"0.6935988",
"0.68796325",
"0.6860005",
"0.68507534",
"0.6846666",
"0.6812657",
"0.6799988",
"0.6767837",
"0.67646927",
"0.67243373",
"0.6720673",
"0.6690779",
"0.66556275",
"0.66239333",
"0.6622879",
"0.66011035",
"0.6601077",
"0.6600674",
"0.6589398",
"0.65693724",
"0.65351546",
"0.65198404",
"0.6478383",
"0.6463009",
"0.6447258",
"0.6443651",
"0.643724",
"0.6418212",
"0.640591",
"0.63890755",
"0.63860834",
"0.63802946",
"0.6366686",
"0.6364431",
"0.634404",
"0.6331012",
"0.630772",
"0.6286536",
"0.62850136",
"0.6279754",
"0.62746084",
"0.6250208",
"0.62483346",
"0.62191975",
"0.62151986",
"0.6213159",
"0.6195622",
"0.61910295",
"0.6186524",
"0.61790276",
"0.6166993",
"0.6146374",
"0.6146242",
"0.61282444",
"0.6078516",
"0.6069141",
"0.60630715",
"0.6062265",
"0.6055238",
"0.60533035",
"0.6053088",
"0.60446316",
"0.60417783",
"0.6041523",
"0.60380936",
"0.60355324",
"0.60323924",
"0.6022647",
"0.60032946",
"0.59972405",
"0.59959215",
"0.59878993",
"0.5984407",
"0.5984202",
"0.59651756",
"0.5954685",
"0.59503734",
"0.5948504",
"0.5945586",
"0.5944394",
"0.59396285",
"0.59386295",
"0.59363276",
"0.5936115",
"0.593453",
"0.5932471",
"0.5932054",
"0.59190696"
] |
0.6119039
|
66
|
Start the current loaded music. If no music is loaded, does nothing
|
public void play() {
if(hasAudioLoaded()) {
currentClip.start();
isPlaying = true;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void startMusic()\r\n\t{\r\n\t\tif ( musicPlayer == null )\r\n\t\t\tmusicPlayer = new MusicPlayer( \"Music2.mid\" );\r\n\t\telse\r\n\t\t\tmusicPlayer.play();\r\n\t}",
"public void playMusic() {\n\t\tthis.music.start();\n\t}",
"public static void startMusic()\n\t{\n\t\tmusic.loop();\n\t}",
"public static void startMusic()\n\t{\n\t\tif (music == null)\n\t\t{\n\t\t\tloadMusic();\n\t\t\tif (music.size() < 2)\n\t\t\t{\n\t\t\t\tthrow new GameLogicException(\"At least two songs must be specified.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurrentMusicFile = 0;\n\t\tmusic.get(currentMusicFile).setVolume(musicVolume / 100.f);\n\t\tmusic.get(currentMusicFile).play();\n\t\tmusic.get(currentMusicFile).setOnCompletionListener(musicOnCompletionListener);\n\t}",
"private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }",
"public void StartMusic(int music_id);",
"private void startPlay() {\n isPlaying = true;\n isPaused = false;\n playMusic();\n }",
"public void play() {\n\t\tmusic.play();\n\t\tsyncPosition();\n\t}",
"public void startSong() {\n if (trackPlaying) {\n trackPlaying = false;\n mp.finish();\n\n System.out.print(mp.isFinished() + \"+\" + mp.isPaused());\n }\n\t\n\t//The startSong overloads start and pause. If the song is pause, then resume.\n if (mp.isPaused() && !mp.isFinished()) {\n mp.resume();\n return;\n }\n\n sequence = sc.getSongSequence();\n try {\n mp.start(sequence);\n } catch (InvalidMidiDataException ex) {\n Logger.getLogger(uMusicPlayerController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (MidiUnavailableException ex) {\n Logger.getLogger(uMusicPlayerController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public static void resumeMusic() {\n\t\t\n\t\tif (currentMusic == null) {\n\t\t\tplayMusic(\"mainMenuMusic\", 0.1f);\n\t\t} else {\n\t\t\tcurrentMusic.start();\n\t\t}\n\t}",
"public void start() {\n background.playMusic();\n createTimer();\n timer.start();\n }",
"private void start() {\n\t\t// 开启播放器\n\t\tmCurrentMediaPlayer.start();\n\t\tsetState(STARTED);\n\n\t\t// 开启计时心跳\n\t\tmHandler.postDelayed(mUpdateTimeTask, 500);\n\t\tif (mPlayerEngineListener != null) {\n\t\t\tmPlayerEngineListener.onTrackStart();\n\t\t}\n\t\t// 开启频谱\n\t\t// mHandler.postDelayed(mSetFxAndUI, 500);\n\t\t// setupVisualizerFxAndUI();\n\n\t\tLog.i(this.getClass().getSimpleName(), \" music player : started...\");\n\t}",
"private void initialMusic(){\n\n }",
"@Override\n\tpublic void OnGameStart() {\n\t\tsuper.OnGameStart();\n\t\tMusicManage.setLoopingMusic(tumMusic, true);\n\t\tMusicManage.playMusic(tumMusic);\n\t}",
"public void play() {\n\t\ttry {\n\t\t\taudioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void startMusic() {\r\n final Format input1 = new AudioFormat(AudioFormat.MPEGLAYER3);\r\n final Format input2 = new AudioFormat(AudioFormat.MPEG);\r\n final Format output = new AudioFormat(AudioFormat.LINEAR);\r\n PlugInManager.addPlugIn(\r\n \"com.sun.media.codec.audio.mp3.JavaDecoder\",\r\n new Format[]{input1, input2},\r\n new Format[]{output},\r\n PlugInManager.CODEC\r\n );\r\n try {\r\n final File f = new File(\"support_files//tetris.mp3\");\r\n myPlayer = Manager.createPlayer(new MediaLocator(f.toURI().toURL()));\r\n } catch (final NoPlayerException | IOException e) {\r\n e.printStackTrace();\r\n }\r\n if (myPlayer != null) {\r\n myPlayer.start();\r\n }\r\n }",
"private void startPlaying() {\n try {\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(audioFile.getAbsolutePath());\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"prepare() failed\");\n }\n showTimer(false);\n } catch (Exception e) {\n logException(e, \"MicManualFragment_startPlaying()\");\n }\n\n }",
"@Override\r\n\tpublic void start() {\n\t\tmediaPlayer.start();\r\n\t}",
"public void StartMusic(musicenum_t music_id);",
"public void playMusic() {\n\t\ttry {\n\t\t\tsoundManager.playMusic(\"bgroundmusic\");\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}",
"public static void start(Context c, int music, boolean force) {\r\n if ((!force) && (currentMusic_ != INVALID_NUMBER)) {\r\n // already playing some music and not forced to change immediately\r\n if (music != INVALID_NUMBER) {\r\n nextMusic_ = music;\r\n MediaPlayer mp = players_.get(music);\r\n if (mp == null) {\r\n mp = MediaPlayer.create(c, music);\r\n players_.put(music, mp);\r\n }\r\n MediaPlayer cp = players_.get(currentMusic_);\r\n if (cp != null) {\r\n cp.setOnCompletionListener(new OnCompletionListener() {\r\n @Override\r\n public void onCompletion(MediaPlayer p) {\r\n MusicHandler.next();\r\n }\r\n });\r\n cp.setLooping(false);\r\n }\r\n }\r\n return;\r\n }\r\n if (currentMusic_ == music) {\r\n // already playing this music\r\n return;\r\n }\r\n if (currentMusic_ != INVALID_NUMBER) {\r\n // playing some other music, pause it and change\r\n pause();\r\n }\r\n currentMusic_ = music;\r\n MediaPlayer mp = players_.get(music);\r\n if (mp != null) {\r\n if (!mp.isPlaying()) {\r\n // Note: This continues the piece where it last let off\r\n mp.setLooping(true);\r\n mp.setOnCompletionListener(null);\r\n mp.start();\r\n return;\r\n }\r\n } else {\r\n mp = MediaPlayer.create(c, music);\r\n players_.put(music, mp);\r\n if (mp == null) {\r\n // Log an error, but don't do anthing (we do not want to risk f/c the app)\r\n Log.e(TAG, \"player was not created successfully\");\r\n } else {\r\n mp.setLooping(true);\r\n mp.setOnCompletionListener(null);\r\n mp.start();\r\n }\r\n }\r\n }",
"public void Play() {\n superPlaneGodMode = false;\r\n if (!musicPlaying)\r\n backgroundMusic.pause();\r\n if (musicPlaying)\r\n backgroundMusic.start();\r\n paused = false;\r\n }",
"public void start() {\n AudioPlayer.player.start(cas);\n playing = true;\n }",
"public static void beginCurrentSoundtrack() {\n\t\t\n\t\tif (GameFrame.settingsPanel.musicOn() && soundtrack[GameBoardModel.getLevel()-1] != null) {\n\t\t\t\n\t\t\t// In case a new game is started before the victory jingle is finished\n\t\t\t// from a previous game (rare occurrence, but possible)\n\t\t\tif (victoryFanfare.isRunning()) victoryFanfare.stop();\t\t\t\n\t\t\t\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].setFramePosition(0);\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].loop(Clip.LOOP_CONTINUOUSLY);\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public void playAudio() {\n\t\tmusic[currentSong].stop();\n\t\tcurrentSong++;\n\t\tcurrentSong %= music.length;\n\t\tmusic[currentSong].play();\n\t}",
"public static void updateMusic()\r\n\t{\r\n\t\tif ( Settings.isMusicOn() && !musicPlaying() )\r\n\t\t\tstartMusic();\r\n\t\telse if ( !Settings.isMusicOn() && musicPlaying() )\r\n\t\t\tstopMusic();\r\n\t}",
"public void playMedia() {\n\t\tif (MainActivity.mPlayer == null) {\n\t\t\tMainActivity.mPlayer = new MediaPlayer();\n\t\t\tMainActivity.mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n\t\t\tMainActivity.currentSong = song;\n\t\t\tMainActivity.currentAlbum = album;\n\t\t}\n\t\tif (!MainActivity.currentSong.getTitleKey().equals(song.getTitleKey())) {\n\t\t\tMainActivity.currentSong = song;\n\t\t\tMainActivity.currentAlbum = album;\n\t\t\tMainActivity.mPlayer.reset();\n\t\t}\n\n\t\ttitle = song.getTitle();\n\t\talbumTitle = album.getAlbum();\n\t\talbumArt = album.getAlbumArt();\n\n\t\ttry {\n\t\t\tMainActivity.mPlayer.setDataSource(this, song.getUri());\n\t\t\tMainActivity.mPlayer.prepare();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (SecurityException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalStateException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\tMainActivity.mPlayer.setOnPreparedListener(new OnPreparedListener() {\n\t\t\t@Override\n\t\t\tpublic void onPrepared(MediaPlayer mp) {\n\t\t\t\tmp.start();\n\t\t\t}\n\t\t});\n\t\tMainActivity.mPlayer.setOnCompletionListener(new OnCompletionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tnext();\n\t\t\t}\n\n\t\t});\n\n\t\tnew Handler(getMainLooper()).post(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tupdateMainActivity();\n\t\t\t\tupdateNowPlaying();\n\t\t\t}\n\t\t});\n\t}",
"@Override\n public void onResume() {\n super.onResume();\n MusicManager.start(this, prefs.getBoolean(\"bgMusic\", true));\n }",
"public void playSelectSong() {\n isStart = false;\n if (getCurrentSong() == 0) {\n audioList.get(getCurrentSong()).setSelect(true);\n playListAdapter.notifyItemChanged(getCurrentSong());\n }\n isPauseResume = false;\n if (player != null) {\n player.stopMedia();\n }\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n /*new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n }\n }, DELAY_TIME);*/\n }",
"public void startPlaying() {\n \t\tif (!isPlaying) {\n \t\t\tisPlaying = true;\n \t\t\tnew PlayThread().start();\n \t\t}\n \t}",
"public void play() {\n if (audio != null) {\n audio.play(sfxVolume);\n }\n }",
"public void start() {\n setPlayerState(State.STARTED);\n mMediaPlayer.start();\n notifyPlaying();\n }",
"public void startSound() {\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\tURL url = this.getClass().getResource(\"/\"+wavMusicFile);\n\t\t\t//System.out.println(\"url: \" + url);\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tclip = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tclip.open(audioIn);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private static void loadMusic()\n\t{\n\t\t// TODO: update this with the correct file names.\n\t\tmusic = new ArrayList<Music>();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tmusic.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"Lessons-8bit.mp3\"))));\n\t\t\tmusic.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"bolo_menu.mp3\"))));\n\t\t\t//music.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"song2.ogg\"))));\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(e);\n\t\t\te.printStackTrace();\n\t\t\tthrow e;\n\t\t}\n\t}",
"@Override\n public void run() {\n // TODO Auto-generated method stub\n running = true;\n AudioFile song = musicFiles.get(currentSongIndex);\n song.play();\n while(running){\n if(!song.isPlaying()){\n currentSongIndex++;\n if(currentSongIndex >= musicFiles.size()){\n currentSongIndex = 0;\n }\n song = musicFiles.get(currentSongIndex);\n song.play();\n }\n try{\n Thread.sleep(1);\n }\n catch (InterruptedException e){\n e.printStackTrace();\n } \n }\n }",
"private void startPlaying() {\n if (null == curRecordingFileName)\n return;\n Log.e(TAG, \"Start playing file: \" + curRecordingFileName);\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(curRecordingFileName);\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n Log.e(TAG, \"Couldn't prepare and start MediaPlayer\");\n }\n\n }",
"private void play() {\n /** Memanggil File MP3 \"indonesiaraya.mp3\" */\n try {\n mp.prepare();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /** Menjalankan Audio */\n mp.start();\n\n /** Penanganan Ketika Suara Berakhir */\n mp.setOnCompletionListener(new OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n stateAwal();\n }\n });\n }",
"@Override\n public void run() {\n if(musicEnabled) {\n playSoundtrack();\n while (running) {\n if(!stack.isEmpty()) {\n Sound sound = stack.pop();\n sound.play(sound.loadInputStream());\n }\n }\n }\n }",
"public void start()\n\t{\n\t\tString name = getAudioFileName();\n\t\ttry\n\t\t{\t\t\t\n\t\t\tInputStream in = getAudioStream();\n\t\t\tAudioDevice dev = getAudioDevice();\n\t\t\tplay(in, dev);\n\t\t}\n\t\tcatch (JavaLayerException ex)\n\t\t{\n\t\t\tsynchronized (System.err)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Unable to play \"+name);\n\t\t\t\tex.printStackTrace(System.err);\n\t\t\t}\n\t\t}\n\t}",
"public void play() {\n\t\tplay(true, true);\n\t}",
"public void play() {\n\t\tif(currentPlayingItem==null) return;\n\t\tif(!mediaPlayer.isPlaying()) mediaPlayer.start();\n\t\tupdateNotification();\n\t\tsendBroadcast(new Intent(\"com.andreadec.musicplayer.playpausechanged\"));\n\t}",
"public void PlaySound(Context context) {\r\n\t\tif (!this.mp.isPlaying()) {\r\n\t\t\tmp.start();\r\n\t\t}\r\n\t}",
"public void play(){\n Log.d(TAG, \"startAudio: called\");\n if(mMediaPlayer!=null){\n\n mMediaPlayer.start();\n mProgressBar.setProgress(mMediaPlayer.getCurrentPosition());\n mProgressBar.setMax(mMediaPlayer.getDuration());\n\n // updating progress bar\n seekHandler.postDelayed(updateSeekBar, 5);\n }\n }",
"public void run(){\n\t\ttry {\n\t\t\tSystem.out.println(\"Started Playing music successfully\");\n\t\t\tplay();\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void makeNewMusic() {\n File f = music.getFile();\n boolean playing = music.isPlaying();\n music.stop();\n music = new MP3(f);\n if (playing) {\n music.play(nextStartTime);\n }\n }",
"public final void play() {\n\t\tinitialize();\n\t\tstartPlay();\n\t\tendPlay();\n\t}",
"public void play() {\n Selection selection;\n if ((selection = master.getWindowManager().getMain().getSelection()) == null) {\n startPlay();\n playShow(nextStartTime, -1 / 1000.0);\n } else {\n playSelection(selection);\n playShow(selection.start, selection.duration);\n }\n }",
"public static void music (String fileName)\r\n {\r\n\tAudioPlayer MGP = AudioPlayer.player;\r\n\tAudioStream BGM;\r\n\tAudioData MD;\r\n\r\n\tContinuousAudioDataStream loop = null;\r\n\r\n\ttry\r\n\t{\r\n\t InputStream test = new FileInputStream (\"lamarBackgroundMusic.wav\");\r\n\t BGM = new AudioStream (test);\r\n\t AudioPlayer.player.start (BGM);\r\n\r\n\t}\r\n\tcatch (FileNotFoundException e)\r\n\t{\r\n\t System.out.print (e.toString ());\r\n\t}\r\n\tcatch (IOException error)\r\n\t{\r\n\t System.out.print (error.toString ());\r\n\t}\r\n\tMGP.start (loop);\r\n }",
"@Override\n\tpublic void show() {\n\t\tmusic.play();\n\t}",
"public static void musicFirstLevel(){\n\t\ttry {\r\n\t\t\tbgmusicLevel = new Music(\"res/sound/firstLevel.wav\");\r\n\t\t\tbgmusicLevel.loop(1f, 0.1f);\r\n\t\t} catch (SlickException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void initMusic() {\r\n mSoundPool = new SoundPool(3, AudioManager.STREAM_MUSIC, 0);\r\n mSoundClick = mSoundPool.load(getActivity(), R.raw.click, 1);\r\n mSoundCorrect = mSoundPool.load(getActivity(), R.raw.correct, 1);\r\n mSoundIncorrect = mSoundPool.load(getActivity(), R.raw.wrong, 1);\r\n }",
"public void started()\n {\n if (!isPaused()) muteControl.play();\n }",
"public void play()\n\t{\n\t\tif (canPlay)\n\t\t{\n\t\t\tsong.play();\n\t\t\tsong.rewind();\n\t\t\tif (theSong == \"SG1\" || theSong == \"SG2\")\n\t\t\t\tcanPlay = false;\n\t\t}\n\t}",
"@Override\r\n public void show()\r\n {\r\n // De inmediato, ponemos en marcha una melodia\r\n if (!juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).isPlaying())\r\n {\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).play();\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).setLooping(true);\r\n }\r\n }",
"public synchronized void startPlayingSong(final Song selectedSong, final String path) {\n try {\n if (path != null) {\n PatariSingleton.getInstance().getMediaPlayer().setDataSource(path);\n MusicService.this.sendBroadcast(new Intent(Utils.BR_ACTION_NEW_SONG_PLAYED));\n PatariSingleton.getInstance().getMediaPlayer().prepareAsync();\n } else if (Utils.isOnline(this)) {\n PatariSingleton.getInstance().getMediaPlayer().setDataSource(selectedSong.getAudio());\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n IS_PROGRESS = true;\n PatariSingleton.getInstance().getMediaPlayer().prepareAsync();\n MusicService.this.sendBroadcast(new Intent(Utils.BR_ACTION_NEW_SONG_PLAYED));\n } else {\n sendBroadcast(new Intent(MainActivity.TAG_LOADING).putExtra(\"status\", false));\n stopSelf();\n AppDialog.showToast(getApplicationContext(), getString(R.string.internet_required_alert));\n }\n } catch (Exception e) {\n PLog.showLog(\"PlaySong()\", e.getMessage());\n }\n }",
"public void play(boolean music) {\n\t\tplay(1.0f, 1.0f, music);\n\t}",
"synchronized void resumeGame() {\n try {\n myGamePause = false;\n if (!myShouldPause) {\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 static void playBackGroundMusic(String path) {\n if (musicPlayer != null && musicPlayer.getSourceLocation() != null) {\n if (musicPlayer.getSourceLocation().equals(path)) {\n if (musicPlayer.isEndOfMediaReached()) {\n musicPlayer.seek(0);\n musicPlayer.play();\n }\n return;\n }\n musicPlayer.stop();\n }\n musicPlayer = new Player();\n musicPlayer.setSourceLocation(path);\n musicPlayer.play();\n }",
"@Override\n public void initialize() {\n //talonOrchestra.playMusic();\n }",
"@Override\n\tpublic void onPrepared(MediaPlayer mp) {\n\t\tmp.start();\n\t}",
"private static void playAudio(String musicFile) {\n }",
"public void start() {\n \tif (mediaChangedListener != null) {\n \t\tmediaChangedListener.onStarted();\n \t}\n mMediaPlayer.start();\n }",
"public void launch() {\n if (volume == 0f) {\n return;\n }\n MediaPlayer launch = MediaPlayer.create(context, R.raw.fire);\n launch.setVolume(volume, volume);\n launch.start();\n launch.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mediaPlayer) {\n mediaPlayer.reset();\n mediaPlayer.release();\n }\n });\n }",
"protected static void play() {\n\t\tif (curMIDI != null && !playing){\n\t\t\tPlayer.play(curMIDI,microseconds,cleaned);\n\t\t\tplaying = true;\n\t\t}\n\t\tif (sim != null) {\n\t\t\tif(microseconds == 0){\n\t\t\t\tsim.stop();\n\t\t\t}\n\t\t\t\tsim.play();\n\t\t}\n\t}",
"@Override\n\t\tpublic void onLoaded(String arg0) {\n\t\t\t\tplayer.play();\n\t\t}",
"protected void startMediaPlayer() {\n\n Log.i(LOG_TAG, \"startMediaPlayer\");\n\n // If media player is pause or playing, just play\n if (mpState.equals(RadioPlayerService.MP_PAUSED)) {\n // Play!!!\n mediaPlayer.start();\n radioStation.setPlaying(true);\n playingTimeRunning = true;\n setMPState(RadioPlayerService.MP_PLAYING);\n sendStatus();\n\n //Retrieve meta data from server\n if (radioStation.getListenType().equals(\"0\") || radioStation.getListenType().equals(\"1\")) {\n refreshMetadata(radioStation.getListenUrl());\n }\n\n } else if (mpState.equals(RadioPlayerService.MP_PLAYING)) {\n //We are already playing, well do nothing\n\n } else if (mpState.equals(RadioPlayerService.MP_ERROR)) {\n\n //Media player should be reset\n\n } else {\n //Because prepareAsync() can take too long if radio station server isn't reachable, check for it\n setMPState(RadioPlayerService.MP_CONNECTING);\n mediaPlayer.prepareAsync();\n sendStatus();\n }\n\n }",
"public static void start(Context c, int music) {\r\n start(c, music, false);\r\n }",
"protected void playS()\n\t\t{\n\t\t\tplayer.start();\n\t\t}",
"public void play()\n {\n this.mediaPlayer = new MediaPlayer(file);\n this.mediaPlayer.setVolume(volume);\n\n // Listener for end of media.\n mediaPlayer.setOnEndOfMedia(() -> {\n this.mediaPlayer.stop();\n });\n\n mediaPlayer.play();\n }",
"@Override\r\n public void loadPianoAudioStart() {\n }",
"public void startCommand() {\r\n _playing = true;\r\n }",
"public void startPlaying(String file) {\n if (this.readyPlayer() && this.player != null) {\n this.player.playAsync(file);\n } else {\n LOG.d(LOG_TAG, \"startPlaying error, not ready\");\n }\n }",
"@Override\n public void playStart() {\n }",
"private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}",
"public void play() {\n\t\ttry {\n\t\t\tthis.mMediaPlayer.start();\n\t\t\tLog.w(\"AUDIO PLAYER\", \"just started playing\");\n\t\t} catch (IllegalStateException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.isPlaying = true;\n\t\tthis.incrementPlaybackTime();\n\t}",
"public void startPlayBack() {\n\t\tif (android.os.Environment.getExternalStorageState().equals(\n\t\t\t\tandroid.os.Environment.MEDIA_MOUNTED)) {\n\t\t\ttry {\n\t\t\t\tmPlayer.start();\n\t\t\t} catch (IllegalStateException e) {\n\t\t\t}\n\t\t} else {\n\t\t\tToast.makeText(mContext, \"sdcard not available\", Toast.LENGTH_LONG).show();\n\t\t}\n\t}",
"public Music loadMusic(String fileName);",
"public void play() {\n\t\tfor (int i = 0; i < this.songList.size() - 1; i++) {\n\t\t\tthis.songList.get(i).play();\n\t\t}\n\t}",
"public void initMusicPlayer() {\n PatariSingleton.getInstance().getMediaPlayer().setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK);\n PatariSingleton.getInstance().getMediaPlayer().setAudioStreamType(AudioManager.STREAM_MUSIC);\n PatariSingleton.getInstance().getMediaPlayer().setOnPreparedListener(this);\n PatariSingleton.getInstance().getMediaPlayer().setOnCompletionListener(this);\n PatariSingleton.getInstance().getMediaPlayer().setOnErrorListener(this);\n PatariSingleton.getInstance().getMediaPlayer().setOnBufferingUpdateListener(this);\n try {\n if (wifiLock != null && wifiLock.isHeld()) {\n wifiLock.release();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n try {\n wifiLock = ((WifiManager) getApplication().getApplicationContext().getSystemService(Context.WIFI_SERVICE)).createWifiLock(WifiManager.WIFI_MODE_FULL, \"mylock\");\n wifiLock.acquire();\n } catch (Exception e) {\n e.printStackTrace();\n }\n IS_PROGRESS = false;\n }",
"public static void next() {\r\n if (nextMusic_ == INVALID_NUMBER) {\r\n return;\r\n }\r\n currentMusic_ = nextMusic_;\r\n nextMusic_ = INVALID_NUMBER;\r\n MediaPlayer p = players_.get(currentMusic_);\r\n if (p != null) {\r\n if (!p.isPlaying()) {\r\n p.setLooping(true);\r\n p.setOnCompletionListener(null);\r\n p.start();\r\n }\r\n }\r\n }",
"@Override\n\tpublic void perform() {\n\t\tSystem.out.println(\"Playing \" + song);\n\t\tinstrument.play();\n\t}",
"public void play() { \r\n if (midi) \r\n sequencer.start(); \r\n else \r\n clip.start(); \r\n timer.start(); \r\n play.setText(\"Stop\"); \r\n playing = true; \r\n }",
"public boolean musicOn ()\n\t{\n\t\tif (musicInt == 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public void backgroundMusic(String path) {\n if (Objects.equals(playingFile, path)) return;\n playingFile = path;\n\n\n // stop if playing\n stop();\n\n if (path == null) {\n // nothing to play\n playingClip = null;\n return;\n }\n\n try {\n\n // find file\n final AudioInputStream stream = AudioSystem.getAudioInputStream(new File(path));\n\n // create player\n playingClip = AudioSystem.getClip();\n playingClip.open(stream);\n playingClip.loop(playingClip.LOOP_CONTINUOUSLY);\n\n // play\n playingClip.start();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void playMusic() {\r\n try {\r\n File mFile = new File(Filepath);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(audioInput);\r\n FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl.setValue(-25.0f); //reduces the volume by 25 decibels\r\n clip.start();\r\n clip.loop(Clip.LOOP_CONTINUOUSLY);\r\n\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"public void start(){\n\t\tif (host.getGameSettings().isMusicOn()) {\r\n\t\t\tspr_btnMute.setFrame(0);\r\n\t\t}else{\r\n\t\t\tspr_btnMute.setFrame(1);\r\n\t\t}\r\n\t}",
"public void start() {\n ToneControl control = null;\n try {\n myPlayer = Manager.createPlayer(Manager.TONE_DEVICE_LOCATOR);\n // do the preliminary set-up:\n myPlayer.realize();\n // set a listener to listen for the end of the tune:\n myPlayer.addPlayerListener(this);\n // get the ToneControl object in order to set the tune data:\n control = (ToneControl) myPlayer.getControl(\"ToneControl\");\n control.setSequence(myTune);\n // set the volume to the highest possible volume:\n VolumeControl vc = (VolumeControl) myPlayer\n .getControl(\"VolumeControl\");\n vc.setLevel(100);\n } catch (Exception e) {\n // the music isn't necessary, so we ignore exceptions.\n }\n }",
"private void playMusic(File filepath) {\r\n\t\ttry {\r\n\t\t AudioInputStream song = AudioSystem.getAudioInputStream(filepath);\r\n\t\t\tAudioFormat format = song.getFormat();\r\n\t\t DataLine.Info info = new DataLine.Info(Clip.class, format);\r\n\t\t Clip clip = (Clip) AudioSystem.getLine(info);\r\n\t\t clip.open(song);\r\n\t\t clip.start();\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tthrow new ErrorException(ex);\r\n\t\t}\r\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(bMusic){\n\t\t\t\t\tmp.start();\n\t\t\t\t\tbMusic = false;\n\t\t\t\t}else{\n\t\t\t\t\tbMusic = true;\n\t\t\t\t\tmp.pause();\n\t\t\t\t}\n\t\t\t}",
"public void loadMusic(File f) {\n music = new MP3(f);\n }",
"public void play() {\n\t\tint requestStatus = mAudioManager.requestAudioFocus(\n\t\t\t\tmAudioFocusListener, AudioManager.STREAM_MUSIC,\n\t\t\t\tAudioManager.AUDIOFOCUS_GAIN);\n\n\t\tif (DEBUG)\n\t\t\tLog.d(TAG, \"Starting playback: audio focus request status = \"\n\t\t\t\t\t+ requestStatus);\n\n\t\tif (requestStatus != AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {\n\t\t\treturn;\n\t\t}\n\n\t\tmAudioManager.registerMediaButtonEventReceiver(new ComponentName(this\n\t\t\t\t.getPackageName(), MediaButtonIntentReceiver.class.getName()));\n\n\t\tif (mPlayer.isInitialized()) {\n\t\t\t// if we are at the end of the song, go to the next song first\n\t\t\tlong duration = mPlayer.duration();\n\t\t\tif (mRepeatMode != REPEAT_CURRENT && duration > 2000\n\t\t\t\t\t&& mPlayer.position() >= duration - 2000) {\n\t\t\t\tgotoNext(true);\n\t\t\t}\n\n\t\t\tmPlayer.start();\n\t\t\t// make sure we fade in, in case a previous fadein was stopped\n\t\t\t// because\n\t\t\t// of another focus loss\n\t\t\tmMediaplayerHandler.removeMessages(FADEDOWN);\n\t\t\tmMediaplayerHandler.sendEmptyMessage(FADEUP);\n\n\t\t\tif (!mIsSupposedToBePlaying) {\n\t\t\t\tmIsSupposedToBePlaying = true;\n\t\t\t\tnotifyChange(EVENT_PLAYSTATE_CHANGED);\n\t\t\t}\n\n\t\t\tupdateNotification();\n\t\t} else if (mPlayListLen <= 0) {\n\t\t\t// This is mostly so that if you press 'play' on a bluetooth headset\n\t\t\t// without every having played anything before, it will still play\n\t\t\t// something.\n\t\t\tshuffleAll();\n\t\t}\n\t}",
"public void play() {\n\t\t\r\n\t}",
"public static void restartIngamemusic() {\n\t\tingamemusicPlayer.seek(Duration.ZERO);\n\t\tingamemusicPlayer.play();\n\t\tlogger.info(\"restart ingame\");\n\t}",
"private void startService() {\n startService(new Intent(this, BackgroundMusicService.class));\n }",
"public void playSoundtrack() {\n if(this.musicEnabled) {\n try {\n Clip soundtrackClip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new BufferedInputStream(Assets.soundTrack));\n soundtrackClip.open(inputStream);\n soundtrackClip.start();\n soundtrackClip.loop(Clip.LOOP_CONTINUOUSLY);\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(e.getMessage());\n }\n }\n }",
"public void playSound() {\n\t\tmediaPlayer.play();\n\t}",
"public void startPlaying() {\n\t\tpbrLoading.setVisibility(View.GONE);\n\t\tisPlaying = true;\n\t\tif (IjoomerApplicationConfiguration.isEnableVoiceReport && reportVoice) {\n\t\t\tlnrReportVoice.setVisibility(View.VISIBLE);\n\t\t\timgReport.setImageResource(reportImage);\n\n\t\t\tif (reportCaption != 0) {\n\t\t\t\ttxtReportCaption.setText(reportCaption);\n\t\t\t} else if (strReportCaption != null && strReportCaption.length() > 0) {\n\t\t\t\ttxtReportCaption.setText(strReportCaption);\n\t\t\t}\n\t\t} else {\n\t\t\tlnrReportVoice.setVisibility(View.GONE);\n\t\t}\n\t\tupdateView();\n\t}",
"public static void resumeCurrentSoundtrack() {\n\t\tif (GameFrame.settingsPanel.musicOn() && soundtrack[GameBoardModel.getLevel()-1] != null)\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].loop(Clip.LOOP_CONTINUOUSLY);\n\t}",
"public void start(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.start(); \t\t\r\n \t}",
"public void playAudio() {\n if (done==false)\n {\n file.play();\n }\n}"
] |
[
"0.8195241",
"0.8194493",
"0.79686093",
"0.7854175",
"0.7610368",
"0.75290835",
"0.74386746",
"0.73697174",
"0.72736114",
"0.72412443",
"0.722041",
"0.7133524",
"0.71300775",
"0.7119863",
"0.70884293",
"0.70789474",
"0.7078327",
"0.7072974",
"0.7069622",
"0.70550364",
"0.7022504",
"0.70107776",
"0.69947964",
"0.69441414",
"0.6944099",
"0.69377357",
"0.6917124",
"0.69108886",
"0.68638635",
"0.6835959",
"0.68068594",
"0.6796047",
"0.679158",
"0.67623323",
"0.6759823",
"0.67579836",
"0.6739373",
"0.6732609",
"0.6719455",
"0.6714279",
"0.67125964",
"0.6711061",
"0.67105013",
"0.6702403",
"0.6692502",
"0.6689035",
"0.6682242",
"0.6677382",
"0.6675663",
"0.66753596",
"0.667068",
"0.6669016",
"0.66387707",
"0.6637733",
"0.6617619",
"0.6604737",
"0.6593369",
"0.65899605",
"0.6580281",
"0.65781176",
"0.65682995",
"0.6568288",
"0.6567288",
"0.65478784",
"0.6525725",
"0.6510139",
"0.6503971",
"0.65003014",
"0.6497303",
"0.6489993",
"0.6484962",
"0.6483726",
"0.6458401",
"0.6452058",
"0.6452046",
"0.64360434",
"0.6435341",
"0.64340407",
"0.64170504",
"0.6414325",
"0.64070994",
"0.6387274",
"0.63734454",
"0.63725847",
"0.63680035",
"0.63672525",
"0.63544154",
"0.63486207",
"0.633978",
"0.63375014",
"0.6319505",
"0.63070065",
"0.62805885",
"0.62795323",
"0.6277849",
"0.62762076",
"0.62739235",
"0.62712353",
"0.6269092",
"0.6267247"
] |
0.7024133
|
20
|
Pause the current music. If no music is playing does nothing
|
public void pause() {
currentClip.stop();
isPlaying = false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void pauseSong() {\n if (mp.isPlaying()) {\n mp.pause();\n }\n }",
"public static void pause() {\r\n for (int i = 0; i < players_.size(); i++) {\r\n MediaPlayer p = players_.valueAt(i);\r\n if (p != null) {\r\n if (p.isPlaying()) {\r\n p.pause();\r\n }\r\n }\r\n }\r\n currentMusic_ = INVALID_NUMBER;\r\n }",
"public void pause() {\n\t\tmusic.pause();\n\t}",
"@Override\n\tpublic void pause() {\n\t PhoneDevice.Settings.stopMusic();\n\t}",
"public synchronized void pause(){\r\n if(currentLoop0) backgroundMusicLoop0.pause();\r\n else backgroundMusicLoop1.pause();\r\n }",
"public void playPause() {\n\t\tif(currentPlayingItem==null) return;\n\t\tif (mediaPlayer.isPlaying()) {\n\t\t\tmediaPlayer.pause();\n\t\t\twakeLockRelease();\n\t\t} else {\n\t\t\twakeLockAcquire();\n\t\t\tmediaPlayer.start();\n\t\t}\n\t\tupdateNotification();\n\t\tsendBroadcast(new Intent(\"com.andreadec.musicplayer.playpausechanged\"));\n\t}",
"private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }",
"public void playAudio() {\n\t\tmusic[currentSong].stop();\n\t\tcurrentSong++;\n\t\tcurrentSong %= music.length;\n\t\tmusic[currentSong].play();\n\t}",
"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 pause() {\n\t\tif(currentPlayingItem==null) return;\n\t\tif (mediaPlayer.isPlaying()) mediaPlayer.pause();\n\t\tupdateNotification();\n\t\tsendBroadcast(new Intent(\"com.andreadec.musicplayer.playpausechanged\"));\n\t}",
"public void play() {\n\t\tif(currentPlayingItem==null) return;\n\t\tif(!mediaPlayer.isPlaying()) mediaPlayer.start();\n\t\tupdateNotification();\n\t\tsendBroadcast(new Intent(\"com.andreadec.musicplayer.playpausechanged\"));\n\t}",
"private void pause()\n\t\t{\n\t\t\tif (mMediaPlayer != null)\n\t\t\t\tmMediaPlayer.pause();\n\t\t}",
"protected static void pause() {\n\t\tif(curMIDI != null && playing) {\n\t\t\tmicroseconds = Player.pause();\n\t\t\tplaying = false;\n\t\t}\n\t\tif(sim != null){\n\t\t\tif(sim.isPlaying()){\n\t\t\t\tsim.pause();\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\tif (mediaPlayer.isPlaying()) {\r\n\t\t\tmediaPlayer.pause();\r\n\t\t}\r\n\t}",
"public void pause()\n {\n if (mediaPlayer.getStatus() == PLAYING)\n {\n\n mediaPlayer.pause();\n\n }\n if (mediaPlayer.getStatus() == PAUSED)\n {\n\n mediaPlayer.play();\n }\n mediaPlayer.pause();\n }",
"void pauseGame() {\n try {\n myGamePause = true;\n myPlayer.stop();\n // when the application pauses the game, resources\n // are supposed to be released, so we close the\n // player and throw it away.\n myPlayer.close();\n myPlayer = null;\n } catch (Exception e) {\n // the music isn't necessary, so we ignore exceptions.\n }\n }",
"public void pause() {\n\t\tif (this.isPlaying) {\n\t\t\ttry {\n\t\t\t\tthis.mMediaPlayer.pause();\n\t\t\t} catch (IllegalStateException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected void onPause()\n {\n super.onPause();\n setSound.pauseMusic();\n }",
"private void startPlay() {\n isPlaying = true;\n isPaused = false;\n playMusic();\n }",
"private void pauseAudioPlayback() {\n // Shamelessly copied from MediaPlaybackService.java, which\n // should be public, but isn't.\n Intent i = new Intent(\"com.android.music.musicservicecommand\");\n i.putExtra(\"command\", \"pause\");\n\n sendBroadcast(i);\n }",
"public void playMusic() {\n\t\tthis.music.start();\n\t}",
"public void pauseSong()\n {\n if(!mute)\n {\n try{ \n //bclip.stop();\n \n URL url = this.getClass().getClassLoader().getResource(\"Refreshing Elevator Music.wav\");\n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n pclip.open(audioIn); \n pclip.start();\n pclip.loop(Clip.LOOP_CONTINUOUSLY);\n }catch(Exception e){}\n }\n }",
"public void pauseMusic() {\n\t\talSourcePause(musicSourceIndex);\n\t\talSourcePause(reverseSourceIndex);\n\t\talSourcePause(flangeSourceIndex);\n\t\talSourcePause(revFlangeSourceIndex);\n\t\talSourcePause(wahSourceIndex);\n\t\talSourcePause(revWahSourceIndex);\n\t\talSourcePause(wahFlangeSourceIndex);\n\t\talSourcePause(revWahFlangeSourceIndex);\n\t\talSourcePause(distortSourceIndex);\n\t\talSourcePause(revDistortSourceIndex);\n\t\talSourcePause(distortFlangeSourceIndex);\n\t\talSourcePause(revDistortFlangeSourceIndex);\n\t\talSourcePause(wahDistortSourceIndex);\n\t\talSourcePause(revWahDistortSourceIndex);\n\t\talSourcePause(wahDistortFlangeSourceIndex);\n\t\talSourcePause(revWahDistortFlangeSourceIndex);\n\t}",
"public static void resumeMusic() {\n\t\t\n\t\tif (currentMusic == null) {\n\t\t\tplayMusic(\"mainMenuMusic\", 0.1f);\n\t\t} else {\n\t\t\tcurrentMusic.start();\n\t\t}\n\t}",
"public static void updateMusic()\r\n\t{\r\n\t\tif ( Settings.isMusicOn() && !musicPlaying() )\r\n\t\t\tstartMusic();\r\n\t\telse if ( !Settings.isMusicOn() && musicPlaying() )\r\n\t\t\tstopMusic();\r\n\t}",
"public static void resumeCurrentSoundtrack() {\n\t\tif (GameFrame.settingsPanel.musicOn() && soundtrack[GameBoardModel.getLevel()-1] != null)\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].loop(Clip.LOOP_CONTINUOUSLY);\n\t}",
"public static void stopSong()\n {\n JSoundsMainWindowViewController.iAmPlaying = true;\n JSoundsMainWindowViewController.iAmPausing = false;\n JSoundsMainWindowViewController.iAmResuming = false;\n \n MusicPlayerControl.stopSong();\n }",
"public void Play() {\n superPlaneGodMode = false;\r\n if (!musicPlaying)\r\n backgroundMusic.pause();\r\n if (musicPlaying)\r\n backgroundMusic.start();\r\n paused = false;\r\n }",
"public void pause() {\n setPlayerState(State.PAUSED);\n mMediaPlayer.pause();\n notifyPlaying();\n }",
"@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n private void pauseAudio(){\n mediaPlayer.pause();\n playBtn.setImageDrawable(getActivity().getResources().getDrawable(R.drawable.sharp_play_arrow_black_36, null));\n isPlaying = false;\n seekBarHandler.removeCallbacks(updateSeekBar);\n }",
"public void playSelectSong() {\n isStart = false;\n if (getCurrentSong() == 0) {\n audioList.get(getCurrentSong()).setSelect(true);\n playListAdapter.notifyItemChanged(getCurrentSong());\n }\n isPauseResume = false;\n if (player != null) {\n player.stopMedia();\n }\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n /*new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n }\n }, DELAY_TIME);*/\n }",
"synchronized void resumeGame() {\n try {\n myGamePause = false;\n if (!myShouldPause) {\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 }",
"@Override\n public void onPause() {\n super.onPause();\n MusicManager.start(this, false);\n }",
"public void playMusic() {\n\t\ttry {\n\t\t\tsoundManager.playMusic(\"bgroundmusic\");\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}",
"public void playPauseSong() {\n\t\tif (currSong != null) {\n\t\t\tSystem.out.println(currSong.getUrl());\n//\t\t\tFile file = new File(song.getUrl());\n//\t\t\tString path = file.getAbsolutePath();\n//\t\t\tpath.replace(\"\\\\\", \"/\");\n\n\t\t\tif (mp3player != null) {\n//\t\t\t\tupdateVolume();\n\t\t\t\tmp3player.stop();\n\t\t\t\tmp3player = null;\n\t\t\t}\n\n\t\t\tmp3player = new MP3Player(new File(currSong.getUrl()));\n\t\t\tshowPlayIcon();\n\n\t\t\tvolumeValue.setText(String.valueOf((int) volumeSlider.getValue()));\n\t\t\tvolumeSlider.setValue(volume * 100);\n\t\t\tupdateSongProgress(0);\n\t\t\tupdateValues();\n\n\t\t\t//// ^^ PLAY + PAUSE + NEXT + BACK ^^////\n\t\t\tplayBtn.setOnMouseClicked(new EventHandler<MouseEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t\t\tSystem.out.println(\"play Clicked\");\n\t\t\t\t\tstartTime = System.currentTimeMillis() / 1000;\n\t\t\t\t\tmp3player.play();\n\t\t\t\t\tshowPauseIcon();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tpauseBtn.setOnMouseClicked(new EventHandler<MouseEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t\t\tSystem.out.println(\"pause Clicked\");\n\t\t\t\t\tplayedTime += currTime - startTime;\n\t\t\t\t\tmp3player.pause();\n\t\t\t\t\tshowPlayIcon();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tpreviousBtn.setOnMouseClicked(new EventHandler<MouseEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t\t\tSystem.out.println(\"previousBtn clicked\");\n\t\t\t\t\tmp3player.stop();\n\t\t\t\t\tnextPrev--;\n\t\t\t\t\tmp3player = playlist.get(Integer.parseInt(currSong.getID()) + nextPrev);\n\t\t\t\t\tresetInfo();\n\t\t\t\t\tmp3player.play();\n\t\t\t\t\tshowPauseIcon();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tnextSongBtn.setOnMouseClicked(new EventHandler<MouseEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t\t\tSystem.out.println(\"nextSong clicked\");\n\t\t\t\t\tmp3player.stop();\n\t\t\t\t\tmp3player = playlist.get(Integer.parseInt(currSong.getID()) + nextPrev);\n\t\t\t\t\tresetInfo();\n\t\t\t\t\tmp3player.play();\n\t\t\t\t\tshowPauseIcon();\n\t\t\t\t\tnextPrev++;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\trepeatBtn.setOnMouseClicked(new EventHandler<MouseEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t\t\tSystem.out.println(\"repeat clicked\");\n\t\t\t\t\tmp3player.setRepeat(true);\n\t\t\t\t}\n\t\t\t}); // END OF \"repeatBtn\" CLICKED\n\n\t\t\tshuffleBtn.setOnMouseClicked(new EventHandler<MouseEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t\t\tSystem.out.println(\"shuffle clicked\");\n\t\t\t\t\tmp3player.setShuffle(true);\n\t\t\t\t}\n\t\t\t}); // END OF \"shuffleBtn\" CLICKED\n\n\t\t}\n\t}",
"private void pause() { player.pause();}",
"public void pauseSound() {\n\t\tclip.stop();\n\t}",
"public static void stopMusic() {\n\t\tcurrentMusic.stop();\n\t}",
"@Override\n public void onPause() {\n justAfterPause = true;\n\n if (!soundAlreadyStopped) {\n SoundManager.onPause(instantMusicPause);\n soundAlreadyStopped = true;\n }\n\n instantMusicPause = true;\n super.onPause();\n\n }",
"public void play() {\n\t\tmusic.play();\n\t\tsyncPosition();\n\t}",
"public void pause() {\n\t\tif (playing)\n\t\t\tstopRequested = true;\n\t}",
"public void pause() {\n\t\tsynchronized (this) {\n\t\t\tmMediaplayerHandler.removeMessages(FADEUP);\n\t\t\tif (isPlaying()) {\n\t\t\t\tmPlayer.pause();\n\t\t\t\tgotoIdleState();\n\t\t\t\tmIsSupposedToBePlaying = false;\n\t\t\t\tnotifyChange(EVENT_PLAYSTATE_CHANGED);\n\t\t\t}\n\t\t}\n\t}",
"private void pause()\r\n {\r\n player.pause();\r\n }",
"public void playOrPause() {\n if (mediaController.getPlaybackState().getState()== PlaybackStateCompat.STATE_PLAYING)\n mediaController.getTransportControls().pause();\n else\n mediaController.getTransportControls().play();\n }",
"void reset() {\n\t\tsongs.get(curSong).rewind();\n\t\tsongs.get(curSong).pause();\n\t}",
"@Override\n\tpublic void pause() {\n\t\tif (player != null) {\n\n\t\t\ttry {\n\t\t\t\t// Checks how much of the song is left available to play\n\t\t\t\tpauseLocation = fis.available();\n\t\t\t\tplayer.close();\n\t\t\t} catch (IOException e) {\n\n\t\t\t}\n\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(bMusic){\n\t\t\t\t\tmp.start();\n\t\t\t\t\tbMusic = false;\n\t\t\t\t}else{\n\t\t\t\t\tbMusic = true;\n\t\t\t\t\tmp.pause();\n\t\t\t\t}\n\t\t\t}",
"public static void stopMusic()\n\t{\n\t\tif (music != null && currentMusicFile != -1)\n\t\t{\n\t\t\tmusic.get(currentMusicFile).stop();\n\t\t\tcurrentMusicFile = -1;\n\t\t}\n\t}",
"public static void beginCurrentSoundtrack() {\n\t\t\n\t\tif (GameFrame.settingsPanel.musicOn() && soundtrack[GameBoardModel.getLevel()-1] != null) {\n\t\t\t\n\t\t\t// In case a new game is started before the victory jingle is finished\n\t\t\t// from a previous game (rare occurrence, but possible)\n\t\t\tif (victoryFanfare.isRunning()) victoryFanfare.stop();\t\t\t\n\t\t\t\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].setFramePosition(0);\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].loop(Clip.LOOP_CONTINUOUSLY);\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public void toggleSound() { \n\t\tif (mSoundEnable) {\n\t\t\tmSoundEnable = false; \n\t\t\tif (ResourceManager.getInstance().gameMusic.isPlaying())\n\t\t\t\tResourceManager.getInstance().gameMusic.pause();\n\t\t}\n\t\telse {\n\t\t\tmSoundEnable = true;\n\t\t\tif (!ResourceManager.getInstance().gameMusic.isPlaying()) {\n\t\t\t\tResourceManager.getInstance().gameMusic.play();\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\tpublic void paused(MediaPlayer mediaPlayer)\r\n\t{\n\r\n\t}",
"public void togglePlay() {\n\t\tif (playing)\n\t\t\tpause();\n\t\telse\n\t\t\tplay();\n\t}",
"void stopMusic();",
"public synchronized void resume(){\r\n if(currentLoop0) backgroundMusicLoop0.unpause();\r\n else backgroundMusicLoop1.unpause();\r\n }",
"public void play(boolean music) {\n\t\tplay(1.0f, 1.0f, music);\n\t}",
"public void suspend() {\n try {\n mIsIdle = true;\n if (mCurPlayer != null)\n {\n mCurPlayer.setMediaTime(0);\n mCurPlayer.stop();\n if (mCurPlayer != null) {\n mCurPlayer.close();\n }\n if (mCurrentSoundID >= 0) {\n mPlayers[mCurrentSoundID] = null;// \n }\n }\n\n } catch (Throwable e) \n {\n } \n finally \n {\n mCurPlayer = null;\n mIsPlaying = false;\n }\n }",
"public static void next() {\r\n if (nextMusic_ == INVALID_NUMBER) {\r\n return;\r\n }\r\n currentMusic_ = nextMusic_;\r\n nextMusic_ = INVALID_NUMBER;\r\n MediaPlayer p = players_.get(currentMusic_);\r\n if (p != null) {\r\n if (!p.isPlaying()) {\r\n p.setLooping(true);\r\n p.setOnCompletionListener(null);\r\n p.start();\r\n }\r\n }\r\n }",
"public void play() { player.resume();}",
"public void pause()\n\t{\n\t\tplayState = Status.PAUSED;\n\t\tlastUpdate = -1;\n\t\ttmr.stop();\n\t}",
"public static void playBackGroundMusic(String path) {\n if (musicPlayer != null && musicPlayer.getSourceLocation() != null) {\n if (musicPlayer.getSourceLocation().equals(path)) {\n if (musicPlayer.isEndOfMediaReached()) {\n musicPlayer.seek(0);\n musicPlayer.play();\n }\n return;\n }\n musicPlayer.stop();\n }\n musicPlayer = new Player();\n musicPlayer.setSourceLocation(path);\n musicPlayer.play();\n }",
"public void pause(){\n Log.d(TAG, \"pause: called\");\n if(mMediaPlayer!=null){\n mMediaPlayer.pause();\n seekHandler.removeCallbacksAndMessages(null);\n }\n }",
"public void pause(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.pause();\r\n \t}",
"public static void restartIngamemusic() {\n\t\tingamemusicPlayer.seek(Duration.ZERO);\n\t\tingamemusicPlayer.play();\n\t\tlogger.info(\"restart ingame\");\n\t}",
"public static void startMusic()\n\t{\n\t\tmusic.loop();\n\t}",
"public void stop()\n {\n if(AudioDetector.getInstance().isNoAudio() || musicPlayer == null)\n {\n return;\n }\n\n\n musicPlayer.stop();\n }",
"public void PauseSound();",
"public static void startMusic()\r\n\t{\r\n\t\tif ( musicPlayer == null )\r\n\t\t\tmusicPlayer = new MusicPlayer( \"Music2.mid\" );\r\n\t\telse\r\n\t\t\tmusicPlayer.play();\r\n\t}",
"public void StopSound() {\r\n\t\tif (this.mp.isPlaying()) {\r\n\t\t\tmp.pause();\r\n\t\t}\r\n\t}",
"public void pause() {\n mMediaPlayer.pause();\n \tif (mediaChangedListener != null) {\n \t\tmediaChangedListener.onPaused();\n \t}\n }",
"private void playOrPause() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) {\n permissionCheck();\n } else {\n if (tracks.isEmpty()) {\n tracks.addAll(Player.getInstance().checkDirectory());\n }\n\n // Play:\n if (Player.getInstance().isPaused()) {\n if (trackTimePosition > 0) {\n Player.getInstance().toTime(trackTimePosition);\n Player.getInstance().resume();\n } else {\n try {\n Player.getInstance().play(tracks.get(position));\n\n if (!isTimeListenerSet) {\n positionListener();\n }\n } catch (IOException playerException) {\n playerException.printStackTrace();\n }\n\n setCover(Player.getInstance().getCover(tracks.get(position), this));\n\n tvTrack.setText(tracks.get(position).getName());\n sbTrackTimeline.setMax(playerUtils.toSeconds(Player.getInstance().getTrackEndTime()));\n }\n\n setImageDrawable(ibPlayOrPauseTrack, R.drawable.ic_pause_track);\n\n if (tracks.size() > 1) {\n if (tvTrackStartTime.getVisibility() == View.INVISIBLE) {\n tvTrackStartTime.setVisibility(View.VISIBLE);\n }\n\n setImageDrawable(ibSkipNextTrack, R.drawable.ic_skip_next_track_on);\n }\n\n tvTrackEndTime.setText(playerUtils.toMinutes(Player.getInstance().getTrackEndTime()));\n } else { // Pause:\n trackTimePosition = Player.getInstance().getTrackTimePosition();\n\n Player.getInstance().pause();\n\n setImageDrawable(ibPlayOrPauseTrack, R.drawable.ic_play_track);\n }\n }\n }",
"public void play() {\n if (audio != null) {\n audio.play(sfxVolume);\n }\n }",
"@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n @Override\n public void onClick(View view) {\n if(!Globals.isMusicPlaying){\n animations.playToPauseAnimation(playButton);\n Globals.isMusicPlaying = true;\n } else {\n animations.pauseToPlayAnimation(playButton);\n Globals.isMusicPlaying = false;\n }\n\n }",
"@Override\n\tpublic void resume() {\n\t\tPhoneDevice.Settings.playMusic(PhoneDevice.Settings.MusicEnum.psyche_up);\n\t \n\t}",
"@Override\n public void run() {\n // TODO Auto-generated method stub\n running = true;\n AudioFile song = musicFiles.get(currentSongIndex);\n song.play();\n while(running){\n if(!song.isPlaying()){\n currentSongIndex++;\n if(currentSongIndex >= musicFiles.size()){\n currentSongIndex = 0;\n }\n song = musicFiles.get(currentSongIndex);\n song.play();\n }\n try{\n Thread.sleep(1);\n }\n catch (InterruptedException e){\n e.printStackTrace();\n } \n }\n }",
"public void pause(MediaPlayer choice) {\n if (levelCtrl.level >= levelChange && choice == background) {\n if (background2.isPlaying()) {\n background2.pause();\n }\n if (background.isPlaying()) {\n background.pause();\n }\n }\n else if (choice.isPlaying()) {\n choice.pause();\n }\n\n }",
"public void playPauseTrack() {\n //Switch the play/pause drawables\n if (isPlaying) {\n mPlayPauseBtn.setImageResource(android.R.drawable.ic_media_pause);\n mPlayerService.resumeTrack();\n } else {\n mPlayPauseBtn.setImageResource(android.R.drawable.ic_media_play);\n mPlayerService.pauseTrack();\n }\n }",
"public static void startMusic()\n\t{\n\t\tif (music == null)\n\t\t{\n\t\t\tloadMusic();\n\t\t\tif (music.size() < 2)\n\t\t\t{\n\t\t\t\tthrow new GameLogicException(\"At least two songs must be specified.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurrentMusicFile = 0;\n\t\tmusic.get(currentMusicFile).setVolume(musicVolume / 100.f);\n\t\tmusic.get(currentMusicFile).play();\n\t\tmusic.get(currentMusicFile).setOnCompletionListener(musicOnCompletionListener);\n\t}",
"public void play() {\n\t\t//If volume is not muted\n\t\tif (volume != Volume.MUTE) {\n\t\t\t//If the clip is running\n\t\t\tif (clip.isRunning()) {\n\t\t\t\tclip.stop(); //Stop it\n\t\t\t}\n\t\t\tclip.setFramePosition(0); //Rewind\n\t\t\tclip.start(); //Play again\n\t\t}\n\t}",
"public void stop() {\n\t\tmusic.stop();\n\t}",
"public void playMedia() {\n\t\tif (MainActivity.mPlayer == null) {\n\t\t\tMainActivity.mPlayer = new MediaPlayer();\n\t\t\tMainActivity.mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n\t\t\tMainActivity.currentSong = song;\n\t\t\tMainActivity.currentAlbum = album;\n\t\t}\n\t\tif (!MainActivity.currentSong.getTitleKey().equals(song.getTitleKey())) {\n\t\t\tMainActivity.currentSong = song;\n\t\t\tMainActivity.currentAlbum = album;\n\t\t\tMainActivity.mPlayer.reset();\n\t\t}\n\n\t\ttitle = song.getTitle();\n\t\talbumTitle = album.getAlbum();\n\t\talbumArt = album.getAlbumArt();\n\n\t\ttry {\n\t\t\tMainActivity.mPlayer.setDataSource(this, song.getUri());\n\t\t\tMainActivity.mPlayer.prepare();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (SecurityException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalStateException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\tMainActivity.mPlayer.setOnPreparedListener(new OnPreparedListener() {\n\t\t\t@Override\n\t\t\tpublic void onPrepared(MediaPlayer mp) {\n\t\t\t\tmp.start();\n\t\t\t}\n\t\t});\n\t\tMainActivity.mPlayer.setOnCompletionListener(new OnCompletionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tnext();\n\t\t\t}\n\n\t\t});\n\n\t\tnew Handler(getMainLooper()).post(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tupdateMainActivity();\n\t\t\t\tupdateNowPlaying();\n\t\t\t}\n\t\t});\n\t}",
"@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n//\t\tgv.f = false;\t//如果没有这句,即使退出,run()函数也不停止运行,既游戏界面退出,到后台后仍在运行着。\r\n\t\tMusic.stop();\r\n\t}",
"private void play() {\n /** Memanggil File MP3 \"indonesiaraya.mp3\" */\n try {\n mp.prepare();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /** Menjalankan Audio */\n mp.start();\n\n /** Penanganan Ketika Suara Berakhir */\n mp.setOnCompletionListener(new OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n stateAwal();\n }\n });\n }",
"public void stopBackgroundMusic()\n {\n background.stop();\n }",
"public void onClickPlay() {\n if (player != null) {\n if (player.mediaPlayer.isPlaying()) {\n player.pauseMedia();\n changePlayPauseIcon(PLAY);\n isPauseResume = !isPauseResume;\n playListAdapter.setPlayPause(true);\n } else {\n if (isPauseResume) {\n player.resumeMedia();\n changePlayPauseIcon(PAUSE);\n isPauseResume = !isPauseResume;\n playListAdapter.setPlayPause(false);\n } else {\n playSelectSong();\n }\n }\n } else {\n playSelectSong();\n }\n\n }",
"public void stopPlaying() {\n \t\tisPlaying = false;\n \t}",
"public void play() {\n\t\tint requestStatus = mAudioManager.requestAudioFocus(\n\t\t\t\tmAudioFocusListener, AudioManager.STREAM_MUSIC,\n\t\t\t\tAudioManager.AUDIOFOCUS_GAIN);\n\n\t\tif (DEBUG)\n\t\t\tLog.d(TAG, \"Starting playback: audio focus request status = \"\n\t\t\t\t\t+ requestStatus);\n\n\t\tif (requestStatus != AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {\n\t\t\treturn;\n\t\t}\n\n\t\tmAudioManager.registerMediaButtonEventReceiver(new ComponentName(this\n\t\t\t\t.getPackageName(), MediaButtonIntentReceiver.class.getName()));\n\n\t\tif (mPlayer.isInitialized()) {\n\t\t\t// if we are at the end of the song, go to the next song first\n\t\t\tlong duration = mPlayer.duration();\n\t\t\tif (mRepeatMode != REPEAT_CURRENT && duration > 2000\n\t\t\t\t\t&& mPlayer.position() >= duration - 2000) {\n\t\t\t\tgotoNext(true);\n\t\t\t}\n\n\t\t\tmPlayer.start();\n\t\t\t// make sure we fade in, in case a previous fadein was stopped\n\t\t\t// because\n\t\t\t// of another focus loss\n\t\t\tmMediaplayerHandler.removeMessages(FADEDOWN);\n\t\t\tmMediaplayerHandler.sendEmptyMessage(FADEUP);\n\n\t\t\tif (!mIsSupposedToBePlaying) {\n\t\t\t\tmIsSupposedToBePlaying = true;\n\t\t\t\tnotifyChange(EVENT_PLAYSTATE_CHANGED);\n\t\t\t}\n\n\t\t\tupdateNotification();\n\t\t} else if (mPlayListLen <= 0) {\n\t\t\t// This is mostly so that if you press 'play' on a bluetooth headset\n\t\t\t// without every having played anything before, it will still play\n\t\t\t// something.\n\t\t\tshuffleAll();\n\t\t}\n\t}",
"public void pauseAndContinue(){\n if(gamePaused == true){ return; }\n gamePaused = true;\n timeRuunableThread.setPause(gamePaused);\n music.stopPlayingAudio(\"All\");\n jf_Pause = new JFrame(\"Game is paused\");\n jf_Pause.setSize(new Dimension(350, 120));\n jf_Pause.setLocation(400, 400);\n jf_Pause.setBackground(PauseColor);\n jf_Pause.setLayout(new GridLayout(2, 1));\n JLabel jl_Pause = new JLabel(\" Game is paused; click button or press ESC to continue.\");\n JPanel jp_Pause = new JPanel();\n JButton jb_Pause = new JButton(\"Continue\");\n jb_Pause.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n gamePaused = false;\n if(muteMusic == false){\n music.playAudio(\"LevelMusic\");\n }\n musicName = \"LevelMusic\";\n timeRuunableThread.setPause(gamePaused);\n jf_Pause.dispose();\n }\n });\n\n jb_Pause.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent keyEvent) { }\n\n @Override\n public void keyPressed(KeyEvent e) {\n if(e.getKeyCode() == KeyEvent.VK_ESCAPE){\n gamePaused = false;\n timeRuunableThread.setPause(gamePaused);\n jf_Pause.dispose();\n if(muteMusic == false){\n music.playAudio(musicName);\n }\n }\n }\n\n @Override\n public void keyReleased(KeyEvent keyEvent) { }\n });\n jp_Pause.add(jb_Pause);\n jf_Pause.add(jl_Pause);\n jf_Pause.add(jp_Pause);\n jf_Pause.addKeyListener(new KeyListener() {\n @Override\n public void keyTyped(KeyEvent e) {\n if(e.getKeyCode() == KeyEvent.VK_ESCAPE){\n gamePaused = false;\n timeRuunableThread.setPause(gamePaused);\n jf_Pause.dispose();\n }\n }\n\n @Override\n public void keyPressed(KeyEvent keyEvent) { }\n\n @Override\n public void keyReleased(KeyEvent keyEvent) { }\n });\n jf_Pause.setVisible(true);\n jf_Pause.setFocusable(false);\n }",
"private void musicClicked() {\n MatchScreen.setMusicVolume(MatchScreen.getMusicVolume() == 0 ? 0.5f : 0);\n setSoundButtonColor(MatchScreen.getMusicVolume() == 0, music);\n }",
"public void play() {\n\t\tplay(true, true);\n\t}",
"public synchronized void pause() {\r\n\r\n\t\tpaused = true;\r\n\t}",
"public void StopMusic();",
"public void pausePlayer(){\n this.stopRadio();\n }",
"public static void previusSong()\n {\n MusicPlayerControl.prevSong();\n }",
"public static boolean musicPlaying()\r\n\t{\r\n\t\tif ( musicPlayer == null )\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn musicPlayer.isPlaying();\r\n\t}",
"public void StartMusic(int music_id);",
"public void ChangeMusic(int musicnum, boolean looping);",
"@Override\n public void stopSound(){\n gameMusic.stop();\n }",
"@Test\n\tpublic void pauseTest() throws IllegalArgumentException, IllegalAccessException {Configuration.featureamp=true;\n//\t\tConfiguration.playengine=true;\n//\t\tConfiguration.choosefile=true;\n//\t\tConfiguration.mp3=true;\n//\t\tConfiguration.gui=true;\n//\t\tConfiguration.skins=true;\n//\t\tConfiguration.light=true;\n//\t\tConfiguration.filesupport=true;\n//\t\tConfiguration.showtime=true;\n//\t\tConfiguration.tracktime=true;\n//\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.mp3 &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.tracktime) {\n\t\t\tstart();\n\t\t\tdemo.menuItemWithPath(\"Datei\", \"Datei \\u00F6ffnen\").click();\n\t\t\tdemo.fileChooser().setCurrentDirectory(new File(\"media/\"));\n\t\t\tFile file = new File(\"note.mp3\");\n\t\t\tdemo.fileChooser().selectFile(file);\n\t\t\tdemo.fileChooser().approveButton().click();\n\t\t\tdemo.button(\"pause\").click();\n\t\t\tdemo.button(\"play\").click();\n\t\t}\n\t}",
"synchronized void pause() {\n\t\tpaused = true;\n\t}",
"public void PlaySound(Context context) {\r\n\t\tif (!this.mp.isPlaying()) {\r\n\t\t\tmp.start();\r\n\t\t}\r\n\t}"
] |
[
"0.81934685",
"0.8087301",
"0.80604625",
"0.7697156",
"0.76637805",
"0.76461494",
"0.7558268",
"0.7501356",
"0.749021",
"0.73482335",
"0.72583926",
"0.72395885",
"0.7238272",
"0.7233481",
"0.72330433",
"0.721934",
"0.7213044",
"0.72124714",
"0.7195233",
"0.7185111",
"0.7117229",
"0.7115404",
"0.7114395",
"0.70950204",
"0.709156",
"0.702014",
"0.7010281",
"0.7006567",
"0.70026344",
"0.69846493",
"0.69790983",
"0.6974758",
"0.6967396",
"0.6956595",
"0.69256806",
"0.6908937",
"0.69005275",
"0.68789285",
"0.6877499",
"0.68680894",
"0.6828235",
"0.68206877",
"0.6809056",
"0.679787",
"0.67897916",
"0.6762251",
"0.6744007",
"0.6740868",
"0.6702593",
"0.67022973",
"0.6681388",
"0.6638874",
"0.6609151",
"0.6592375",
"0.6573524",
"0.6568781",
"0.65655386",
"0.65621084",
"0.65584064",
"0.6527293",
"0.6525476",
"0.65206116",
"0.6513736",
"0.65092945",
"0.6506966",
"0.6505042",
"0.6498185",
"0.6480231",
"0.64650834",
"0.6461919",
"0.645976",
"0.64460796",
"0.6403138",
"0.6402469",
"0.6399003",
"0.6394389",
"0.63862956",
"0.6386009",
"0.63832253",
"0.63765395",
"0.6375761",
"0.6371926",
"0.6366776",
"0.6364526",
"0.63481534",
"0.6335196",
"0.6324972",
"0.63235587",
"0.63208026",
"0.6319716",
"0.63106763",
"0.63104784",
"0.6309615",
"0.63054395",
"0.6302679",
"0.6292223",
"0.6284229",
"0.6275761",
"0.6268968",
"0.6268178"
] |
0.6899356
|
37
|
Close the current music stream. If no music is loaded does nothing
|
public void close() {
currentClip.stop();
currentClip.close();
isPlaying = false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void dispose() {\n\t\tmusic.dispose();\n\t}",
"public synchronized void close() {\n try {\n audioInputStream.close();\n } catch (IOException ioe) {\n System.err.println(\"Problem while closing the audioInputSteam\");\n }\n\n }",
"public void stop() {\n\t\tmusic.stop();\n\t}",
"public void close() {\n/* 325 */ synchronized (this.mixer) {\n/* 326 */ if (isOpen()) {\n/* */ \n/* */ \n/* */ \n/* 330 */ setOpen(false);\n/* */ \n/* */ \n/* 333 */ implClose();\n/* */ \n/* */ \n/* 336 */ this.mixer.close(this);\n/* */ } \n/* */ } \n/* */ }",
"public void stop()\n {\n if(AudioDetector.getInstance().isNoAudio() || musicPlayer == null)\n {\n return;\n }\n\n\n musicPlayer.stop();\n }",
"public void finishSong() {\n mp.finish();\n trackPlaying = false;\n }",
"@Override\n public void onDestroy() {\n super.onDestroy();\n music.release();\n }",
"public static void stopMusic() {\n\t\tcurrentMusic.stop();\n\t}",
"public void dispose() {\n if (mediaPlayer.isPlaying())\n mediaPlayer.stop();\n mediaPlayer.release();\n }",
"@Override\n protected void onDestroy() {\n Log.v(\"MediaPlayer\", \"onDestroy\");\n super.onDestroy();\n if (mp.isPlaying()) {\n mp.stop();\n }\n mp.release();\n }",
"public static void stopMusic()\n\t{\n\t\tif (music != null && currentMusicFile != -1)\n\t\t{\n\t\t\tmusic.get(currentMusicFile).stop();\n\t\t\tcurrentMusicFile = -1;\n\t\t}\n\t}",
"@Override\n protected void onStop() {\n super.onStop();\n stopMusic();\n }",
"public void stop()\n {\n mediaPlayer.stop();\n }",
"private void stop()\n {\n mPlayer.stop();\n mPlayer = MediaPlayer.create(this, audioUri);\n }",
"@Override\n\tpublic void stop() {\n\t\tif (player != null) {\n\t\t\tplayer.close();\n\n\t\t\tpauseLocation = 0;\n\t\t\tsetSongTotalLenght(0);\n\t\t}\n\t}",
"public void close(){\n if(this.alreadyPlayingService != null){\n try{\n this.alreadyPlayingService.close();\n }\n catch(Exception ex){\n Log.e(DictationModel.class.getSimpleName(), \"Failed to close\", ex);\n }\n }\n this.closed.set(true);\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tif (mMediaPlayer.isPlaying()) {\n\t\t\tmMediaPlayer.stop();\n\t\t}\n\t}",
"@Override\n public void onCompletion(MediaPlayer mediaPlayer) {\n stopMusic();\n }",
"public void closeAllMedia() {\n if(mpNarrate != null) {\n if(mpNarrate.isPlaying()) {\n mpNarrate.pause();\n imgBtnPlaySound.setBackgroundDrawable(getResources().getDrawable(R.drawable.playsoundbuttongradianoff));\n }\n }\n if(mp != null) {\n if(mp.isPlaying()) {\n mp.pause();\n }\n }\n }",
"public static void stopSong()\n {\n JSoundsMainWindowViewController.iAmPlaying = true;\n JSoundsMainWindowViewController.iAmPausing = false;\n JSoundsMainWindowViewController.iAmResuming = false;\n \n MusicPlayerControl.stopSong();\n }",
"public void stopAudio() {\n\t\tif(audioStream != null ) {\n\t\t\tAudioPlayer.player.stop(audioStream);\n\t\t}\n\t}",
"void stopMusic();",
"public void stop() {\n\t\tstop(!playing);\n\t}",
"public void stop() {\n synchronized (lock) {\n isRunning = false;\n if (rawAudioFileOutputStream != null) {\n try {\n rawAudioFileOutputStream.close();\n } catch (IOException e) {\n Log.e(TAG, \"Failed to close file with saved input audio: \" + e);\n }\n rawAudioFileOutputStream = null;\n }\n fileSizeInBytes = 0;\n }\n }",
"private void stopAudio() {\r\n // stop playback if possible here!\r\n }",
"public void close() {\n\t\tthis.isLoop = false;\n\t\tplayer.close();\n\t\tthis.interrupt();\n\t}",
"@Override\n protected void onStop() {\n mediaPlayer.release();\n super.onStop();\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tMediaPlayUtil.getInstance().stop();\n\t\tMediaPlayUtil.getInstance().release();\n\t}",
"public void onChunkUnload()\n {\n //RadioMod.logger.info(\"Unload\");\n RadioMod.instance.musicManager.radioSources.get(this.uuid).stopMusic();\n }",
"@Override\n public void onDestroy() {\n super.onDestroy();\n releasePlayer();\n mMediaSession.setActive(false);\n }",
"@Override\n public void onDestroy(){\n\tandroid.widget.Toast.makeText(getApplicationContext(), \"done \", android.widget.Toast.LENGTH_SHORT).show();\n\tmediaPlayer.release();\n\tmediaPlayer = null;\n\tsuper.onDestroy();\n }",
"public void StopSound() {\r\n\t\tif (this.mp.isPlaying()) {\r\n\t\t\tmp.pause();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tMediaPlayUtil.getInstance().release();\n\t\tMediaPlayUtil.getInstance().stop();\n\n\t}",
"public void stopBackgroundMusic()\n {\n background.stop();\n }",
"public void StopMusic();",
"public void destroy() {\n // Stop any play or record\n if (this.player != null) {\n if ((this.state == STATE.MEDIA_RUNNING) || (this.state == STATE.MEDIA_PAUSED)) {\n this.player.stop();\n }\n this.player = null;\n }\n }",
"public void stop() {\n AudioPlayer.player.stop(cas);\n playing = false;\n }",
"public void stop() {\n\t\tsound.stop();\n\t}",
"@Override\n protected void onDestroy() {\n \tsuper.onDestroy();\n \t\n \tif(mediaPlayer!=null){\n \t\t\n \t\tmediaPlayer.stop();\n \t\tmediaPlayer=null;\n \t}\n }",
"protected void stopTheSound(){\n mp.stop();\n }",
"public void close ( ) {\n if ( this.currentMidi != null ) {\n this.currentMidi.stop ( );\n this.sequencer.removeMetaEventListener ( this.currentMidi );\n }\n\n if ( this.sequencer.isRunning ( ) )\n this.sequencer.stop ( );\n\n this.sequencer.close ( );\n this.sequencer = null;\n }",
"private void stop()\n\t\t{\n\t\t\tif (mMediaPlayer != null)\n\t\t\t{\n\t\t\t\tmMediaPlayer.stop();\n\t\t\t\tmMediaPlayer.reset();\n\t\t\t}\n\t\t}",
"private void releaseMediaPlayer() {\n if (colors_audio != null) {\n // Regardless of the current state of the media player, release its resources\n // because we no longer need it.\n colors_audio.release();\n\n // Set the media player back to null. For our code, we've decided that\n // setting the media player to null is an easy way to tell that the media player\n // is not configured to play an audio file at the moment.\n colors_audio = null;\n colors_audioManager.abandonAudioFocus(colors_OnAudioFocusChangeListener);\n }\n }",
"@Override\n public void stopSound(){\n gameMusic.stop();\n }",
"@Override\n public void onDestroy() {\n //super.onDestroy();\n Utils.showToast(this, \"service done\");\n /*if(mediaPlayer.isPlaying()) {\n mediaPlayer.stop();\n }\n mediaPlayer.release();*/\n }",
"public void close(){\n this.println(\"Library has been closed! See you tomorrow morning!!\");\n this.openOrNot = false;\n this.searchOrNot = false;\n this.serveOrNot = 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 stop(){\n Log.d(TAG, \"stop: called\");\n if(mMediaPlayer!=null){\n mMediaPlayer.stop();\n FilePlayerDialog.isPlaying = false;\n seekHandler.removeCallbacksAndMessages(null);\n }\n }",
"private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }",
"public void deallocate() {\n\tsetLoaded(false);\n\n if (!externalAudioPlayer) {\n if (audioPlayer != null) {\n audioPlayer.close();\n audioPlayer = null;\n }\n }\n \n\tif (!externalOutputQueue) {\n\t outputQueue.close();\n\t}\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n \tmediaplayer.release();\n\t}",
"public void stopSound() {\n metaObject.stopSound();\n }",
"private void stopPlaying() {\n Log.e(TAG, \"Stop playing file: \" + curRecordingFileName);\n if (null != mPlayer) {\n if (mPlayer.isPlaying())\n mPlayer.stop();\n mPlayer.release();\n mPlayer = null;\n }\n\n }",
"public void stopPlaying() {\n \t\tisPlaying = false;\n \t}",
"@Override\n\t\t\tpublic void close() {\n\t\t\t\tisAutoPlay = false;\n\t\t\t\tCustomApplication.app.preferencesUtil.setBooleanValue(\n\t\t\t\t\t\t\"isAutoPlay\", isAutoPlay);\n\t\t\t}",
"public void stopSong() {\n\t\tStatus status = mediaview.getMediaPlayer().getStatus();\n\t\t\n\t\tif (status == Status.PLAYING) {\n\t\t\tmediaview.getMediaPlayer().stop();\n\t\t\tplaying = false;\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t}",
"public static void stopSound() {\n if(mAudioManager != null) {\n mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, originalVolume, 0);\n }\n if (mp != null) {\n mp.stop();\n Log.d(TAG, \"Stop Sound\");\n }\n }",
"public static void release() {\r\n for (int i = 0; i < players_.size(); i++) {\r\n MediaPlayer p = players_.valueAt(i);\r\n if (p != null) {\r\n if (p.isPlaying()) {\r\n p.stop();\r\n }\r\n p.release();\r\n }\r\n }\r\n players_.clear();\r\n currentMusic_ = INVALID_NUMBER;\r\n }",
"public static void dispose()\n\t{\n\t\tSfx.CANNON_FIRED.dispose();\n\t\tSfx.EXPLOSION.dispose();\n\t\tSfx.ENGINEER_KILLED.dispose();\n\t\tSfx.MINE_EXPLOSION.dispose();\n\t\tSfx.PILLBOX_BUILT.dispose();\n\t\tSfx.PILLBOX_HIT.dispose();\n\t\tSfx.ROAD_BUILT.dispose();\n\t\tSfx.TANK_DROWNED.dispose();\n\t\tSfx.TANK_EXPLOSION.dispose();\n\t\tSfx.TANK_HIT.dispose();\n\t\tSfx.TANK_IN_SHALLOW_WATER.dispose();\n\t\tSfx.TREE_GATHERED.dispose();\n\t\tSfx.TREE_HIT.dispose();\n\t\tSfx.WALL_BUILT.dispose();\n\t\tSfx.WALL_HIT.dispose();\n\t\t\n\t\tif (music != null)\n\t\t{\n\t\t\tfor (Music m : music)\n\t\t\t{\n\t\t\t\tm.stop();\n\t\t\t\tm.dispose();\n\t\t\t}\n\t\t}\n\t}",
"public void stop() {\n\t\tplaybin.stop();\n\t}",
"public void stop()\n {\n if (this.mediaPlayer != null && mediaPlayer.getStatus().equals(MediaPlayer.Status.PLAYING))\n {\n this.mediaPlayer.stop();\n }\n }",
"private void releaseMediaPlayer() {\n if (mediaPlayer != null) {\n // Regardless of the current state of the media player, release its resources\n // because we no longer need it.\n mediaPlayer.release();\n }\n\n // Set the media player back to null. For our code, we've decided that\n // setting the media player to null is an easy way to tell that the media player\n // is not configured to play an audio file at the moment.\n mediaPlayer = null;\n\n }",
"@Override\n protected void onStop() {\n super.onStop();\n releaseMediaPlayer();\n }",
"private void releaseMediaPlayer() {\n // If the media player is not null, then it may be currently playing a sound.\n if (mediaPlayer != null) {\n // Regardless of the current state of the media player, release its resources\n // because we no longer need it.\n mediaPlayer.release();\n Log.v(TAG, \"Audio resource released\");\n // Set the media player back to null. For our code, we've decided that\n // setting the media player to null is an easy way to tell that the media player\n // is not configured to play an audio file at the moment.\n mediaPlayer = null;\n audioManager.abandonAudioFocus(afChangeListener);\n }\n }",
"private void releaseMediaPlayer() {\n if (mMymedia != null) {// Regardless of the current state of the media player, release its resources\n // because we no longer need it.\n mMymedia.release();\n // Set the media player back to null. For our code, we've decided that\n // setting the media player to null is an easy way to tell that the media player\n // is not configured to play an audio file at the moment.\n mMymedia = null;\n am.abandonAudioFocus(afChangeListener);\n }\n }",
"public void stopPlaying() {\n seq.stop();\n }",
"public void destroy() {\n uiView.setMediaPlayer(null);\n mediaLoader.destroy();\n }",
"@Override\n protected void onStop() {\n super.onStop();\n // when the activity is stopped, release the media player resources because we won't\n // be playing any more sounds.\n releaseMediaPlayer();\n }",
"public static void stop() {\r\n\r\n if (soundLoop!=null)\r\n {\r\n soundLoop.stop();\r\n }\r\n }",
"public void openAlienDestroyedSound() {\r\n\t\tif (clipAlienDestroyed.isOpen()) {\r\n\t\t\tclipAlienDestroyed.start();\r\n\t\t}\r\n\r\n\t\tif (!(clipAlienDestroyed.isActive())) {\r\n\t\t\t/*\r\n\t\t\t * clip.stop(); clip.flush();\r\n\t\t\t */\r\n\t\t\tclipAlienDestroyed.setFramePosition(0);\r\n\t\t}\r\n\r\n\t}",
"public void stop()\n {\n audioClip.stop();\n }",
"public void release() {\n stop();\n\n Intent i = new Intent(AudioEffect.ACTION_CLOSE_AUDIO_EFFECT_CONTROL_SESSION);\n i.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, getAudioSessionId());\n i.putExtra(AudioEffect.EXTRA_PACKAGE_NAME, mContext.getPackageName());\n mContext.sendBroadcast(i);\n\n mPlayer.release();\n mWakeLock.release();\n }",
"public void stopPlaying()\n {\n player.stop();\n }",
"public void close() throws IOException {\n open = false;\n stream.close();\n }",
"private void releaseMediaPlayer() {\r\n // If the media player is not null, then it may be currently playing a sound.\r\n if (mMediaPlayer != null) {\r\n // Regardless of the current state of the media player, release its resources\r\n // because we no longer need it.\r\n mMediaPlayer.release();\r\n\r\n // Set the media player back to null. For our code, we've decided that\r\n // setting the media player to null is an easy way to tell that the media player\r\n // is not configured to play an audio file at the moment.\r\n mMediaPlayer = null;\r\n\r\n mAudioManager.abandonAudioFocus(mOnAudioFocusChangeListener);\r\n }\r\n\r\n\r\n }",
"@Override\n public void onDestroy() {\n super.onDestroy();\n final Intent audioEffectsIntent = new Intent(\n AudioEffect.ACTION_CLOSE_AUDIO_EFFECT_CONTROL_SESSION);\n audioEffectsIntent.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, getAudioSessionId());\n audioEffectsIntent.putExtra(AudioEffect.EXTRA_PACKAGE_NAME, getPackageName());\n sendBroadcast(audioEffectsIntent);\n mPlayerHandler.removeCallbacksAndMessages(null);\n mPlayer.release();\n mPlayer = null;\n mAudioManager.abandonAudioFocus(mOnAudioFocusChangeListener);\n mPlayerHandler.removeCallbacksAndMessages(null);\n mWakeLock.release();\n }",
"@Override\r\n public void hide() {\r\n bgMusic.pause();\r\n }",
"@Override public void close() {\n\t\tthis.timer.cancel();\n\t\tthis.motionStream.removeListener(this);\n\t}",
"public void close(){\n this.mMovieCursor.unregisterContentObserver(mContentObserver);\n mContentObserver = null;\n this.mMovieCursor.close();\n loadedMovies.clear();\n loadedMovies = null;\n }",
"public synchronized void reject() {\n toKeepPlaying = false;\n if (externalPlayer.length() != 0) {\n if (playerProcess != null) \n playerProcess.destroy();\n }\n else {\n if (player != null)\n player.close();\n }\n if (speech != null && speaking) \n speech.abort();\n }",
"@Override\n public void onPause() {\n super.onPause();\n closeAllMedia();\n }",
"@Override\n public void onDismiss() {\n try {\n if (mediaPlayer.isPlaying()) {\n\n mediaPlayer.stop();\n mediaPlayer.reset();\n mediaPlayer.release();\n }\n\n\n } catch (RuntimeException ddfuh) {\n ddfuh.printStackTrace();\n }\n }",
"private void releaseMediaPlayer() {\n // If the media player is not null, then it may be currently playing a sound.\n if (mMediaPlayer != null) {\n // Regardless of the current state of the media player, release its resources\n // because we no longer need it.\n mMediaPlayer.release();\n\n // Set the media player back to null. For our code, we've decided that\n // setting the media player to null is an easy way to tell that the media player\n // is not configured to play an audio file at the moment.\n mMediaPlayer = null;\n\n mAudioManager.abandonAudioFocus(afChangeListener);\n }\n }",
"@Override\n public void onDestroy() {\n unregisterReceiver(mNoisyAudioStreamReceiver);\n\n // Cancel our Notification\n mNotificationManager.cancel(NotificationTarget.NOTIFICATION_ID);\n\n // Set preference to indication not playing.\n PreferenceManager.getDefaultSharedPreferences(getApplicationContext())\n .edit()\n .putBoolean(MainActivity.PREF_IS_PLAYING, false)\n .commit();\n\n super.onDestroy();\n }",
"@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n private void stopAudio() {\n //stop audio\n playBtn.setImageDrawable(getActivity().getResources().getDrawable(R.drawable.sharp_play_arrow_black_36, null));\n playerHeader.setText(\"Stopped\");\n isPlaying = false;\n mediaPlayer.stop();\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);\n seekBarHandler.removeCallbacks(updateSeekBar);\n }",
"@Override\r\n\tpublic void mediaFreed(MediaPlayer mediaPlayer)\r\n\t{\n\r\n\t}",
"public synchronized void stopSound() {\r\n running = false;\r\n }",
"public void endSound()\n {\n if(!mute)\n {\n try {\n if(lastpowerUp.equals(\"RAINBOW\"))\n {\n sclip.stop();\n bclip.start();\n bclip.loop(Clip.LOOP_CONTINUOUSLY);\n }\n // Open an audio input stream.\n URL url = this.getClass().getClassLoader().getResource(\"Silence.wav\"); \n \n if(lastpowerUp.equals(\"BLUE\"))\n url = this.getClass().getClassLoader().getResource(\"Out Of Bounds Stop.wav\");\n else if(lastpowerUp.equals(\"YELLOW\")||lastpowerUp.equals(\"DOUBLE\") || lastpowerUp.equals(\"WHITE\") || (lastpowerUp.equals(\"TROLL\") && modeT))\n url = this.getClass().getClassLoader().getResource(\"Mushroom Down.wav\") ;\n else if(lastpowerUp.equals(\"BLACK\") || lastpowerUp.equals(\"TROLL\"))\n url = this.getClass().getClassLoader().getResource(\"Invisible Off.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n Clip clip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n clip.open(audioIn); \n \n clip.start();\n \n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n \n } \n }\n }",
"private void releaseMediaPlayer() {\n // If the media player is not null, then it may be currently playing a sound.\n if (mediaPlayer != null) {\n // Regardless of the current state of the media player, release its resources\n // because we no longer need it.\n mediaPlayer.release();\n\n // Set the media player back to null. For our code, we've decided that\n // setting the media player to null is an easy way to tell that the media player\n // is not configured to play an audio file at the moment.\n mediaPlayer = null;\n audioManager.abandonAudioFocus(mOnAudioFocusChangeListener);\n }\n }",
"private void releaseMediaPlayer() {\n if (mediaPlayer != null) {\n // Regardless of the current state of the media player, release its resources\n // because we no longer need it.\n mediaPlayer.release();\n\n // Set the media player back to null. For our code, we've decided that\n // setting the media player to null is an easy way to tell that the media player\n // is not configured to play an audio file at the moment.\n mediaPlayer = null;\n mAudiomanager.abandonAudioFocus(afChangeListener);\n }\n\n }",
"@Override\n public void onCompletion(MediaPlayer mp) {\n mp.reset();\n nextMusic();\n\n }",
"public void stop() {\n mMediaPlayer.stop();\n setPlayerState(State.STOPPED);\n notifyPlaying();\n }",
"public void unloadSoundSystem() {\n/* 205 */ if (this.loaded) {\n/* */ \n/* 207 */ stopAllSounds();\n/* 208 */ this.sndSystem.cleanup();\n/* 209 */ this.loaded = false;\n/* */ } \n/* */ }",
"public void stop() {\n SystemClock.sleep(500);\n\n releaseAudioTrack();\n }",
"public static void shutDownPlayer()\n {\n MusicPlayerControl.shutdown();\n JSoundsMainWindowViewController.listSongs=null;\n JSoundsMainWindowViewController.listSongs=new JMusicPlayerList();\n JSoundsMainWindowViewController.alreadyPlaying=false;\n JSoundsMainWindowViewController.dontInitPlayer=false;\n JSoundsMainWindowViewController.shutDown=true;\n }",
"private void releaseMediaPlayer(){\n if(mMediaPlayer !=null){\n //Regardless of the current state of the media player, release its resources\n //because we no longer need it\n mMediaPlayer.release();\n\n //set the media player back to null. For your code, we 've decided that\n //setting the media player to null is an easy way to tell that the media player\n //is not configured to play an audio file at the moment.\n mMediaPlayer=null;\n\n // Regardless of whether or not we were granted audio focus, abandon it. This also\n // unregisters the AudioFocusChangeListener so we don't get anymore callbacks.\n mAudioManager.abandonAudioFocus(mOnAudioFocusChangeListener);\n }\n }",
"protected void closeStream ()\n {\n stream.close ();\n }",
"public void pararMusica() {\r\n if (player != null) {\r\n player.close();\r\n player = null;\r\n musica.stop(); //Utilizamos un metodo deprecado porque no hay alternativas.\r\n }\r\n loop = false;\r\n }",
"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}",
"public void stopSound(){\n p.stop(as);\n }"
] |
[
"0.7251981",
"0.6932883",
"0.69126934",
"0.6909595",
"0.68653685",
"0.67704004",
"0.66245794",
"0.6564746",
"0.6507615",
"0.647271",
"0.6420411",
"0.6395359",
"0.63829094",
"0.6377016",
"0.63592964",
"0.6338711",
"0.63141376",
"0.62907016",
"0.6242069",
"0.62262475",
"0.6211441",
"0.6154787",
"0.6152821",
"0.6148579",
"0.6148031",
"0.61240166",
"0.6121477",
"0.61145693",
"0.6097917",
"0.609328",
"0.607888",
"0.60703945",
"0.60366154",
"0.6026008",
"0.5997587",
"0.5993663",
"0.59928626",
"0.59835005",
"0.5980808",
"0.59696054",
"0.5965717",
"0.59635764",
"0.59635025",
"0.59457386",
"0.5938525",
"0.5934236",
"0.59290886",
"0.5913986",
"0.58842295",
"0.5883002",
"0.5881879",
"0.5875198",
"0.58745885",
"0.58609736",
"0.585916",
"0.58586544",
"0.58358765",
"0.5833753",
"0.5822019",
"0.58208424",
"0.58107483",
"0.57674605",
"0.57622594",
"0.57516825",
"0.57512397",
"0.57506174",
"0.57505584",
"0.57240945",
"0.5719611",
"0.5719057",
"0.5716233",
"0.5710774",
"0.57061464",
"0.5700751",
"0.56984866",
"0.56961334",
"0.5688211",
"0.56844324",
"0.568045",
"0.5669922",
"0.5652599",
"0.5645752",
"0.56344354",
"0.563428",
"0.5622885",
"0.5615709",
"0.56121373",
"0.56116253",
"0.56045955",
"0.5603816",
"0.5592473",
"0.5586595",
"0.5586037",
"0.55816805",
"0.557092",
"0.5570656",
"0.55685997",
"0.556814",
"0.55568975",
"0.55523086"
] |
0.6655178
|
6
|
Put the cursor at the end of the audio file and stop it
|
public void goToEnd() {
currentClip.stop();
setPosition(currentClip.getMicrosecondLength());
isPlaying = false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void stopAudio() {\r\n // stop playback if possible here!\r\n }",
"public void stop() {\n stop = true;\n //index--;\n line.flush();\n line.close();\n try {\n decodedInput.close();\n } catch (IOException ex) {\n Logger.getLogger(MP3Player.class.getName()).log(Level.SEVERE, null, ex);\n }\n Runtime.getRuntime().gc();\n }",
"public void stop()\n {\n audioClip.stop();\n }",
"public void stop() {\n pause();\n if (isInPreviewMode) {\n isInPreviewMode = false;\n }\n seekTo(0, new OnCompletionListener() {\n @Override\n public void onComplete() {\n //no-op\n }\n });\n }",
"public void continueSound() {\n\t\tclip.start();\n\t}",
"public void pauseSound() {\n\t\tclip.stop();\n\t}",
"public void stopPlaying() {\n seq.stop();\n }",
"public void audioManipulatorAudioFileReachedEnd() {\n\t\taudioFileProcessedTimeString = secondsToMinutesAndSeconds(0);\n\t\ttextAudioFileDuration.setText(audioFileProcessedTimeString + \" / \" + audioFileDurationString);\n\t\tsliderAudioFileDuration.setValue(0);\n\t\tbuttonPlay.setDisable(false);\n\t\tbuttonPause.setDisable(true);\n\t\tbuttonStop.setDisable(true);\n\t\tpaneMixerMainControls.setDisable(false);\n\t\tpaneLowPass.setDisable(false);\n\t}",
"public void stop() {\n synchronized (lock) {\n isRunning = false;\n if (rawAudioFileOutputStream != null) {\n try {\n rawAudioFileOutputStream.close();\n } catch (IOException e) {\n Log.e(TAG, \"Failed to close file with saved input audio: \" + e);\n }\n rawAudioFileOutputStream = null;\n }\n fileSizeInBytes = 0;\n }\n }",
"public void stop() {\n AudioPlayer.player.stop(cas);\n playing = false;\n }",
"public void stop() {\n\t\tsound.stop();\n\t}",
"File stopRecording();",
"public void pause() {\n\t\tline.stop();\n\t\tplay = false;\n\t}",
"public void endSound()\n {\n if(!mute)\n {\n try {\n if(lastpowerUp.equals(\"RAINBOW\"))\n {\n sclip.stop();\n bclip.start();\n bclip.loop(Clip.LOOP_CONTINUOUSLY);\n }\n // Open an audio input stream.\n URL url = this.getClass().getClassLoader().getResource(\"Silence.wav\"); \n \n if(lastpowerUp.equals(\"BLUE\"))\n url = this.getClass().getClassLoader().getResource(\"Out Of Bounds Stop.wav\");\n else if(lastpowerUp.equals(\"YELLOW\")||lastpowerUp.equals(\"DOUBLE\") || lastpowerUp.equals(\"WHITE\") || (lastpowerUp.equals(\"TROLL\") && modeT))\n url = this.getClass().getClassLoader().getResource(\"Mushroom Down.wav\") ;\n else if(lastpowerUp.equals(\"BLACK\") || lastpowerUp.equals(\"TROLL\"))\n url = this.getClass().getClassLoader().getResource(\"Invisible Off.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n Clip clip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n clip.open(audioIn); \n \n clip.start();\n \n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n \n } \n }\n }",
"public void stop() {\n\t\tplaybin.stop();\n\t}",
"@Override\n\tpublic void stop() {\n\t\tif (player != null) {\n\t\t\tplayer.close();\n\n\t\t\tpauseLocation = 0;\n\t\t\tsetSongTotalLenght(0);\n\t\t}\n\t}",
"public void stop() { \r\n timer.stop(); \r\n if (midi) \r\n sequencer.stop(); \r\n else \r\n clip.stop(); \r\n play.setText(\"Play\"); \r\n playing = false; \r\n }",
"public void stopSound(){\n p.stop(as);\n }",
"public void stop() {\n\t\tstop(!playing);\n\t}",
"public synchronized void stopSound() {\r\n running = false;\r\n }",
"public void recorderAudioFileReachedEnd() {\n\t\tsetCurrentValueToRecordDurationSlider(0);\n\t\trecorderButtonPlay.setDisable(false);\n\t\trecorderButtonPause.setDisable(true);\n\t\trecorderButtonStop.setDisable(true);\n\t}",
"public void stop() {\n\t\tmusic.stop();\n\t}",
"public void playAudio() {\n if (done==false)\n {\n file.play();\n }\n}",
"@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n private void stopAudio() {\n //stop audio\n playBtn.setImageDrawable(getActivity().getResources().getDrawable(R.drawable.sharp_play_arrow_black_36, null));\n playerHeader.setText(\"Stopped\");\n isPlaying = false;\n mediaPlayer.stop();\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);\n seekBarHandler.removeCallbacks(updateSeekBar);\n }",
"public void stop () {\n driveRaw (0);\n }",
"@Override\n public void onSeekComplete() {\n if (info.playing) {\n player.start();\n player.setOnSeekCompletionListener(null);\n } else {\n Log.w(TAG, \"Audio stopping while waiting for loop to re-start\");\n }\n }",
"void seekReset() {\n\t\tcancelEof();\n\t\tsawEofChar = false;\n\t}",
"private synchronized void clear(){\n if(line != null){\n line.flush();\n line.stop();\n line.close();\n if(audioInputStream != null) {\n try {\n audioInputStream.close();\n } catch (IOException exception) {\n exception.printStackTrace();\n }\n }\n }\n }",
"public void stop(){\n Log.d(TAG, \"stop: called\");\n if(mMediaPlayer!=null){\n mMediaPlayer.stop();\n FilePlayerDialog.isPlaying = false;\n seekHandler.removeCallbacksAndMessages(null);\n }\n }",
"@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n if(fileToPlay != null){\n int progress = seekBar.getProgress();\n mediaPlayer.seekTo(progress);\n resumeAudio();\n }\n\n }",
"public void stopSound() {\n metaObject.stopSound();\n }",
"public void stopFile(){\n try {\n running = false;\n resumeFile();\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void stop(){ player.stop();}",
"protected void stopTheSound(){\n mp.stop();\n }",
"public void playAndStop(String audioFilePath, Long milliseconds) {\n play(audioFilePath);\n try {\n Thread.sleep(milliseconds);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n clip.stop();\n }",
"public void stop() {\n SystemClock.sleep(500);\n\n releaseAudioTrack();\n }",
"@Override\n public void playEnd() {\n }",
"public void stop() {\n if (clip == null) return;\n clip.stop();\n }",
"public void stopPlaying() {\n \t\tisPlaying = false;\n \t}",
"@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tLog.d(C.LOG_TAG, \"Audio Play Complete,\" + getTime());\n\t\t\t\tmp.seekTo(0); // roll back to the begining\n\t\t\t\tmRecordTimer.sendMessageDelayed(Message.obtain(null, MESSAGE_PLAY_IS_STOPPED), TIME_TO_WAIT_STOP_RECORD);\n\t\t\t}",
"private void procStopTrackingTouch(int userSelectedPosition) {\nlog_d(\"procStopTrackingTouch: \" + userSelectedPosition);\n float ratio = (float)userSelectedPosition/(float)MAX_PROGRESS;\n int position = (int)(ratio * mDuration);\n mAudioPlayer.seekTo(position);\n}",
"public void end () {\n drive.driveStop();\n }",
"public void openAlienDestroyedSound() {\r\n\t\tif (clipAlienDestroyed.isOpen()) {\r\n\t\t\tclipAlienDestroyed.start();\r\n\t\t}\r\n\r\n\t\tif (!(clipAlienDestroyed.isActive())) {\r\n\t\t\t/*\r\n\t\t\t * clip.stop(); clip.flush();\r\n\t\t\t */\r\n\t\t\tclipAlienDestroyed.setFramePosition(0);\r\n\t\t}\r\n\r\n\t}",
"private void stopRecording() {\r\n\t\tisRecording = false;\r\n\t\ttry {\r\n\t\t\ttimer.cancel();\r\n\t\t\tbuttonRecord.setText(\"Record\");\r\n\t\t\tbuttonRecord.setIcon(iconRecord);\r\n\t\t\t\r\n\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\r\n\r\n\t\t\trecorder.stop();\r\n\r\n\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\r\n\t\t\tsaveFile();\r\n\r\n\t\t} catch (IOException ex) {\r\n\t\t\tJOptionPane.showMessageDialog(SwingSoundRecorder.this, \"Error\",\r\n\t\t\t\t\t\"Error stopping sound recording!\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n public void playStop() {\n }",
"private void stopPlaying() {\n Log.e(TAG, \"Stop playing file: \" + curRecordingFileName);\n if (null != mPlayer) {\n if (mPlayer.isPlaying())\n mPlayer.stop();\n mPlayer.release();\n mPlayer = null;\n }\n\n }",
"private void stop() {\n Log.i(\"TTS\", \"Stopping\");\n mSpeechQueue.clear();\n \n nativeSynth.stop();\n mIsSpeaking = false;\n if (mPlayer != null) {\n try {\n mPlayer.stop();\n } catch (IllegalStateException e) {\n // Do nothing, the player is already stopped.\n }\n }\n Log.i(\"TTS\", \"Stopped\");\n }",
"public void StopSound(ISoundOrigin origin);",
"@Override\r\n \tpublic void play() {\n \t\tFile file = new File(location);\r\n \t\tlong audioFileLength = file.length();\r\n \t\tAudioInputStream audioInputStream;\r\n \t\ttry {\r\n \t\t\taudioInputStream = AudioSystem.getAudioInputStream(file);\r\n \r\n \t\t\tAudioFormat format = audioInputStream.getFormat();\r\n \r\n \t\t\tint frameSize = format.getFrameSize();\r\n \t\t\tfloat frameRate = format.getFrameRate();\r\n \t\t\tdurationInSeconds = (audioFileLength / (frameSize * frameRate));\r\n \r\n \r\n \t\t\tLine.Info linfo = new Line.Info(Clip.class);\r\n \t\t\tLine line = AudioSystem.getLine(linfo);\r\n \t\t\tclip = (Clip) line;\r\n \t\t\t//clip.addLineListener(this);\r\n \t\t\tclip.open(audioInputStream);\r\n \t\t\tclip.start();\r\n \r\n \t\t} catch (UnsupportedAudioFileException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (IOException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (LineUnavailableException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t}\t\r\n \r\n \t}",
"String endFile();",
"public void loopSound(boolean commence) {\n if ( commence ) {\n clip.setFramePosition(0);\n clip.loop( Clip.LOOP_CONTINUOUSLY );\n } else {\n clip.stop();\n }\n }",
"public void stop() {\r\n\t\tisRecording = false;\r\n\t}",
"public void keepLooping() {\n\t\tif(!clip.isActive()) {\n\t\t\tstartSound();\n\t\t}\n\t}",
"public void stop()\n\t{\n\t\tindex = 0;\n\t\tlastUpdate = -1;\n\t\tpause();\n\t}",
"public void stopAudio() {\n\t\tif(audioStream != null ) {\n\t\t\tAudioPlayer.player.stop(audioStream);\n\t\t}\n\t}",
"public void play() {\n Runtime.getRuntime().gc();\n stop = false;\n if (CodecHandler.getIndex() == -1) {\n index = 0;\n } else {\n index = CodecHandler.getIndex();\n }\n //paused = false;\n\n\n System.out.println(index);\n while (!stop) {\n init(CodecHandler.getPlayList().getFileList().get(index));\n\n try {\n if (line != null) {\n // open the output line and send 4K of data as a buffer\n line.open(decodedFormat);\n // specify buffer size\n byte[] data = new byte[8192];\n // start playing\n //line.start();\n System.out.println(getVolumeControl().getMaximum());\n System.out.println(getVolumeControl().getMinimum());\n int numBytesRead;\n// while ((numBytesRead = decodedInput.read(data, 0, data.length)) != -1) {\n// line.write(data, 0, numBytesRead);\n// }\n synchronized (lock) {\n while ((numBytesRead = decodedInput.read(data, 0, data.length)) != -1) {\n while (paused) {\n if (line.isRunning()) {\n line.drain();\n line.stop();\n }\n try {\n lock.wait();\n } catch (InterruptedException e) {\n }\n }\n\n if (!line.isRunning()) {\n line.start();\n }\n line.write(data, 0, numBytesRead);\n }\n }\n if (!stop) {\n index++;\n }\n\n // stop track\n line.drain();\n line.stop();\n line.close();\n decodedInput.close();\n\n if (index >= CodecHandler.getPlayList().getFileList().size()) {\n index = 0;\n }\n CodecHandler.setIndex(index);\n\n }\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } catch (LineUnavailableException lue) {\n lue.printStackTrace();\n }\n }\n System.out.println(index);\n Runtime.getRuntime().gc();\n }",
"public void resume() {\n\t\t\n\t\tmusic.resume();\n\t\tsyncPosition();\n\t}",
"public void stop()\n {\n mediaPlayer.stop();\n }",
"public void stop()\n {\n if(AudioDetector.getInstance().isNoAudio() || musicPlayer == null)\n {\n return;\n }\n\n\n musicPlayer.stop();\n }",
"private void stop()\n {\n mPlayer.stop();\n mPlayer = MediaPlayer.create(this, audioUri);\n }",
"@Override\n public void stopSound(){\n gameMusic.stop();\n }",
"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}",
"void stopMusic();",
"public static void stop() {\r\n\r\n if (soundLoop!=null)\r\n {\r\n soundLoop.stop();\r\n }\r\n }",
"public void StopSound() {\r\n\t\tif (this.mp.isPlaying()) {\r\n\t\t\tmp.pause();\r\n\t\t}\r\n\t}",
"public void stop(boolean resetPosition) {\n\t\tif (playing) {\n\t\t\tif (debug)\n\t\t\t\tSystem.err.println(\"STOP playing \" + resetPosition);\n\t\t\tstopRequested = true;\n\t\t\tif (resetPosition)\n\t\t\t\trequestedPosition = 0;\n\t\t} else if (resetPosition)\n\t\t\tsetPosition(0);\n\t}",
"public void cursorOff();",
"@Override\n public void onStopTrackingTouch(SeekBar arg0) {\n mp.seekTo(seek.getProgress());\n }",
"public void stoppedPlaying(int timecode) {\n if ((file != null) && (duration > -1)) {\n\n // Only want to monkey with the file if it WAS playing, but isn't\n // any more.\n if (wasPlaying) {\n\n // Now just degrade from starting point to stopping point...\n degrade(startPoint, timecode, duration);\n }\n }\n\n wasPlaying = false;\n }",
"protected void end() {\n\t\tdrive.setBoth(0);\n\t}",
"public void stopPlaying()\n {\n player.stop();\n }",
"public void stop() throws IOException {\r\n\t_bRecording=false;\r\n recorder.stop();\r\n recorder.release();\r\n }",
"private void endRecording() {\n isListening = false;\n Thread thread = new Thread() {\n @Override\n public void run() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n startedRecording.setVisibility(View.GONE);\n actionButton.setEnabled(false);\n actionButton.setText(\"Saving...\");\n saving.setVisibility(View.VISIBLE);\n }\n });\n\n if (outFile != null) {\n appendHeader(outFile);\n\n Intent scanWav = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);\n scanWav.setData(Uri.fromFile(outFile));\n sendBroadcast(scanWav);\n\n outFile = null;\n notificationManager.cancel(NOTICE_RECORD);\n }\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n actionButton.setEnabled(true);\n editText.setEnabled(true);\n newTimestamp.setEnabled(true);\n actionButton.setText(\"Start recording\");\n saving.setVisibility(View.GONE);\n }\n });\n }\n };\n thread.start();\n }",
"public void stop() {\n if (playingClip != null)\n playingClip.stop();\n }",
"private void stop()\r\n {\r\n player.stop();\r\n }",
"public void play() {\n\t\tline.start();\n\t\tloop = false;\n\t\tnumLoops = 0;\n\t\tplay = true;\n\t\t// will wake up our data processing thread.\n\t\t// iothread.interrupt();\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}",
"public void stop() {\n try {\n mIsIdle = true;\n mIsLooping = false;\n if (mCurPlayer != null) \n {\n mCurPlayer.stop(); \n Thread.sleep(100);\n// mCurPlayer.setMediaTime(0);\n mIsPlaying = false;\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void finishSong() {\n mp.finish();\n trackPlaying = false;\n }",
"protected void end() {\n \tRobot.drive.stop();\n }",
"public void close() {\n\t\tcurrentClip.stop();\n\t\tcurrentClip.close();\n\t\tisPlaying = false;\n\t}",
"void stop() throws IOException;",
"protected void end() {\n \tRobot.drive.brake();\n }",
"public void StopMusic();",
"private void EndTalk() {\n this.mDeleteF = true;\n this.mReadingF = false;\n }",
"public void pause() {\n\t\tcurrentClip.stop();\n\t\tisPlaying = false;\n\t}",
"void onFinishRecord(File voiceFile, int duration);",
"public void stopCurrentSound() {\n\t\tif (midiSound != null) {\n\t\t\tmidiSound.stop();\n\t\t}\n\t\tif (functionSound != null) {\n\t\t\tfunctionSound.pause(true);\n\t\t}\n\t}",
"public void StopClip() {\n clip.stop();\n }",
"public void autoStopForward(boolean flag) throws JposException;",
"protected void end() {\r\n // stop motor, reset position on the dumper, enable closed loop\r\n }",
"private void stopRecording() {\n\n }",
"public void stop() {\n\t\tmAudioManager.abandonAudioFocus(mOuterEventsListener);\n\t\tinternalStop();\n\t}",
"public synchronized void stop() {\n if(running) {\n this.running = false;\n try {\n this.soundThread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\n \t\t\t\t\t\t\tpublic void onCompletion(MediaPlayer mp) {\n \t\t\t\t\t\t\t\tNoteEditView.this.mAudioPlay\n \t\t\t\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.audiologo);\n \t\t\t\t\t\t\t\tmPlayer.stop();\n \t\t\t\t\t\t\t\tmPlayer.release();\n \t\t\t\t\t\t\t\tmPlayer = null;\n \t\t\t\t\t\t\t\tanim.stop();\n \t\t\t\t\t\t\t}",
"public void stop() {\n intake(0.0);\n }",
"protected void end() {\r\n Robot.drive.stop();\r\n\r\n }",
"@Override\n public void onCompletion(MediaPlayer mediaPlayer) {\n stopMusic();\n }",
"protected void stop() {\r\n\t\tif (active) {\r\n\t\t\tsource.stop();\r\n\t\t}\r\n\t}",
"public synchronized void stop()\n {\n if (open) {\n //stop = true;\n notifyAll();\n started = false;\n line.stop();\n timeTracker.pause();\n }\n }"
] |
[
"0.6864815",
"0.67012066",
"0.6678893",
"0.65803766",
"0.650744",
"0.65028757",
"0.64766353",
"0.6464417",
"0.64247054",
"0.63732815",
"0.63718146",
"0.6343046",
"0.63088036",
"0.62850726",
"0.62772864",
"0.6267097",
"0.61882436",
"0.61860096",
"0.61770666",
"0.61691725",
"0.6155921",
"0.61389494",
"0.61351055",
"0.6130835",
"0.6119619",
"0.61022866",
"0.60901654",
"0.60814404",
"0.60787463",
"0.60307443",
"0.60260755",
"0.60248286",
"0.60113674",
"0.6009701",
"0.6007443",
"0.600641",
"0.60033995",
"0.59967595",
"0.5980586",
"0.5967883",
"0.596418",
"0.5955516",
"0.59540105",
"0.59511364",
"0.5946863",
"0.5941827",
"0.59357613",
"0.5923904",
"0.59146005",
"0.59138834",
"0.59016377",
"0.5897271",
"0.5894547",
"0.5891793",
"0.58910847",
"0.5885956",
"0.5853613",
"0.5848847",
"0.5835523",
"0.5834164",
"0.583188",
"0.58278733",
"0.5822555",
"0.58192813",
"0.581235",
"0.5811996",
"0.5802863",
"0.57860684",
"0.5748157",
"0.57336366",
"0.5727853",
"0.5723694",
"0.5722849",
"0.5718312",
"0.571831",
"0.57000905",
"0.5697563",
"0.5689602",
"0.5676557",
"0.566875",
"0.5659435",
"0.5653422",
"0.5651094",
"0.5648439",
"0.56450456",
"0.5641605",
"0.56331396",
"0.5630468",
"0.5628155",
"0.56230575",
"0.56212485",
"0.56183654",
"0.56132",
"0.5612645",
"0.5601761",
"0.55763155",
"0.5571959",
"0.55718124",
"0.55713785",
"0.5570495"
] |
0.6780851
|
1
|
Put the cursor at the beginning of the audio file
|
public void goToStart() {
setPosition(0);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void seek(int offsetFromStart);",
"void seekToFirst();",
"public String playFromBeginning() {\n currentIndex = 1;\n return \"Playing song 1:\" + songs.get(currentIndex-1);\n }",
"protected void startNextSound() {\n\t\tsoundIndex = (soundIndex < audioFiles.length - 1) ? soundIndex + 1 : 0;\t\n\t\tString nextSoundId = audioFiles[soundIndex];\n\t\tstartPlayer(nextSoundId);\n\t}",
"@Override\n\tpublic void OnForwardCommand() {\n\t\tsuper.OnForwardCommand();\n\t\tSoundManage.playSound(forwordSound1);\n\t}",
"@Override\r\n\tpublic void seekTo(int pos) {\n\t\tmediaPlayer.seekTo(pos);\r\n\t}",
"public void start( )\r\n {\r\n if (cursor != head){\r\n \t cursor = head; // Implemented by student.\r\n \t precursor = null;\r\n }\r\n }",
"private void rewind() {\n currentPos = markPos;\n }",
"void player(){\n InputStream in; ////apabila merah -> ALT+ENTER ->input stream ->TOP\n try { ////try {}catch(Exception e){}\n in = new FileInputStream(new File(vpath.getText()));\n AudioStream audios = new AudioStream(in);\n AudioPlayer.player.start(audios);\n } catch (Exception e) {\n e.printStackTrace();\n } \n }",
"public void startPosition();",
"void seekReset() {\n\t\tcancelEof();\n\t\tsawEofChar = false;\n\t}",
"public void resume() {\n\t\t\n\t\tmusic.resume();\n\t\tsyncPosition();\n\t}",
"public void continueSound() {\n\t\tclip.start();\n\t}",
"public synchronized void start()\n {\n if (!started && open) {\n line.start();\n started = true;\n if (getTimeLeft() > 0) {\n // If we haven't finished playback of bytes already written, we\n // should start the tracker again.\n timeTracker.start();\n }\n }\n }",
"@Override\n\tpublic void onPrepared(MediaPlayer mp) {\n\t\tthis.mMediaPlayer.seekTo((int) (this.mOffsetInto * 100));\n\t\tthis.subject.notifyDoneBuffering();\n\t\tLog.e(\"AUDIO\", \"I'm done buffering and ready to play!\");\n\t}",
"public void playAudio() {\n if (done==false)\n {\n file.play();\n }\n}",
"public void startCommand() {\r\n _playing = true;\r\n }",
"public void SetBackToBeginning() {\n // starting word\n this.mStartWord = 0;\n // the words count that is displaying\n this.mDisplayWord = 0;\n this.mDisplayCount = 0;\n // reset index.\n this.mTextIndex = 0;\n // to enable to read and draw.\n this.mReadingF = true;\n this.mDisplayF = true;\n this.mWaitingF = false;\n // font size back default\n this.mFontSize = this.mFontDefaultSize;\n // font color back to default\n this.mFontColor = this.mFontDefaultColor;\n }",
"@Override\n public void reset() throws IOException {\n setPosition(startPosition);\n }",
"void flushBefore(long pos) throws IOException;",
"@Override\n public void onSeekComplete() {\n if (info.playing) {\n player.start();\n player.setOnSeekCompletionListener(null);\n } else {\n Log.w(TAG, \"Audio stopping while waiting for loop to re-start\");\n }\n }",
"public static void beginCurrentSoundtrack() {\n\t\t\n\t\tif (GameFrame.settingsPanel.musicOn() && soundtrack[GameBoardModel.getLevel()-1] != null) {\n\t\t\t\n\t\t\t// In case a new game is started before the victory jingle is finished\n\t\t\t// from a previous game (rare occurrence, but possible)\n\t\t\tif (victoryFanfare.isRunning()) victoryFanfare.stop();\t\t\t\n\t\t\t\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].setFramePosition(0);\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].loop(Clip.LOOP_CONTINUOUSLY);\n\t\t\t\n\t\t}\n\t\t\n\t}",
"@Override\n public void setPosition(long position) throws IOException {\n super.setPosition(position - startPosition);\n }",
"public void start() {\n AudioPlayer.player.start(cas);\n playing = true;\n }",
"@Override\r\n protected void playGameStartAudio() {\n\taudio.playClip();\r\n }",
"@Override\r\n public void loadPianoAudioStart() {\n }",
"@Override\n public void onStartTrackingTouch(SeekBar arg0) {\n mp.seekTo(seek.getProgress());\n }",
"public void beforeFirst() {\n\t\tmoveTo(0);\n\t}",
"Position()\n\t{\n\t\tsetFile('\\u0000');\n\t\tsetRank(0);\n\t}",
"@Override\n public void start() {\n if (size > 0) {\n cursor = head;\n prev = null;\n } else {\n cursor = null; }\n }",
"void seek(long pos) throws IOException;",
"private void viewAudio() {\r\n View.au(audioFileName, this.getSize().width + 5, 0);\r\n }",
"void seek(long position) throws IOException;",
"public void start() {\n\t\tcurrentFrameIndex = 0;\n\t}",
"private void playAudio() {\r\n Play.au(audioFileName, false);\r\n }",
"void moveFront()\n\t{\n\t\tif (length != 0)\n\t\t {\n\t\t\tcursor = front;\n\t\t\tindex = 0; //cursor will be at the front\n\t\t\t\n\n\t\t}\n\t}",
"private void prepareMediaPlayerFromPoint(int progress) {\n MediaPlayerClient.get().startPlaying(item.getFilePath(), new MediaPlayerClient.OnPlayerCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n stopPlaying();\n }\n });\n mBinding.seekbar.setMax(MediaPlayerClient.get().getDuration());\n\n //keep screen on while playing audio\n getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n }",
"private void reproducirAudio() {\n try{\n audioInputStream = AudioSystem.getAudioInputStream(new File(\"Sonidos/Inicio.wav\").getAbsoluteFile());\n clip = AudioSystem.getClip();\n clip.open(audioInputStream);\n clip.start();\n }\n catch (UnsupportedAudioFileException | IOException | LineUnavailableException ex){\n ex.printStackTrace();\n }\n }",
"private void startPlaying() {\n if (null == curRecordingFileName)\n return;\n Log.e(TAG, \"Start playing file: \" + curRecordingFileName);\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(curRecordingFileName);\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n Log.e(TAG, \"Couldn't prepare and start MediaPlayer\");\n }\n\n }",
"private void startPlaying() {\n try {\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(audioFile.getAbsolutePath());\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"prepare() failed\");\n }\n showTimer(false);\n } catch (Exception e) {\n logException(e, \"MicManualFragment_startPlaying()\");\n }\n\n }",
"public void start(){\n //Set pausing to false\n pausing = false;\n next();\n }",
"public void startSound() {\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\tURL url = this.getClass().getResource(\"/\"+wavMusicFile);\n\t\t\t//System.out.println(\"url: \" + url);\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tclip = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tclip.open(audioIn);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void onBeginningOfSpeech() {\n Log.i(TAG, \"onBeginningOfSpeech\");\n }",
"@Override\r\n \tpublic void play() {\n \t\tFile file = new File(location);\r\n \t\tlong audioFileLength = file.length();\r\n \t\tAudioInputStream audioInputStream;\r\n \t\ttry {\r\n \t\t\taudioInputStream = AudioSystem.getAudioInputStream(file);\r\n \r\n \t\t\tAudioFormat format = audioInputStream.getFormat();\r\n \r\n \t\t\tint frameSize = format.getFrameSize();\r\n \t\t\tfloat frameRate = format.getFrameRate();\r\n \t\t\tdurationInSeconds = (audioFileLength / (frameSize * frameRate));\r\n \r\n \r\n \t\t\tLine.Info linfo = new Line.Info(Clip.class);\r\n \t\t\tLine line = AudioSystem.getLine(linfo);\r\n \t\t\tclip = (Clip) line;\r\n \t\t\t//clip.addLineListener(this);\r\n \t\t\tclip.open(audioInputStream);\r\n \t\t\tclip.start();\r\n \r\n \t\t} catch (UnsupportedAudioFileException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (IOException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (LineUnavailableException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t}\t\r\n \r\n \t}",
"public void startSong() {\n if (trackPlaying) {\n trackPlaying = false;\n mp.finish();\n\n System.out.print(mp.isFinished() + \"+\" + mp.isPaused());\n }\n\t\n\t//The startSong overloads start and pause. If the song is pause, then resume.\n if (mp.isPaused() && !mp.isFinished()) {\n mp.resume();\n return;\n }\n\n sequence = sc.getSongSequence();\n try {\n mp.start(sequence);\n } catch (InvalidMidiDataException ex) {\n Logger.getLogger(uMusicPlayerController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (MidiUnavailableException ex) {\n Logger.getLogger(uMusicPlayerController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void play(){\n Log.d(TAG, \"startAudio: called\");\n if(mMediaPlayer!=null){\n\n mMediaPlayer.start();\n mProgressBar.setProgress(mMediaPlayer.getCurrentPosition());\n mProgressBar.setMax(mMediaPlayer.getDuration());\n\n // updating progress bar\n seekHandler.postDelayed(updateSeekBar, 5);\n }\n }",
"void seekReset() {\n discardQueued(false);\n eofCond = false;\n stickyEofCond = false;\n blocked = false;\n sawCR = false;\n // FIXME: Change needed in Tcl\n //needNL = false;\n }",
"public void playNext() {\n if(mPosition < mMyTracks.size() - 1) {\n mPosition++;\n } else {\n mPosition = ++mPosition % mMyTracks.size();\n }\n prepareTrack();\n }",
"void rewind();",
"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 }",
"public void playPrevious() {\n if(mPosition > 0) {\n mPosition--;\n } else {\n mPosition = (--mPosition + mMyTracks.size()) % mMyTracks.size();\n }\n prepareTrack();\n }",
"public void play() {\n\t\ttry {\n\t\t\taudioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void seek(int position) {\n mMediaPlayer.seekTo(position);\n }",
"public void moveCursorLeft();",
"@Override\n\tpublic void resume() throws IOException {\n\n\t\ttry {\n\n\t\t\tstartInput(fileLocation);\n\n\t\t\t// gives us the current location\n\t\t\tint bytesToSkip = getSongTotalLenght() - pauseLocation;\n\t\t\tSystem.out.println(\"Resume button says: Num of Bytes to skip is \" + bytesToSkip);\n\t\t\tfis.skip(bytesToSkip);\n\n\t\t} catch (FileNotFoundException | JavaLayerException e) {\n\t\t}\n\n\t\t// Play every song on a new Thread\n\t\tnew Thread() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tplayer.play();\n\t\t\t\t} catch (JavaLayerException e) {\n\t\t\t\t}\n\t\t\t}\n\n\t\t}.start();\n\n\t}",
"void reset() {\n\t\tsongs.get(curSong).rewind();\n\t\tsongs.get(curSong).pause();\n\t}",
"@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n if(fileToPlay != null){\n pauseAudio();\n }\n\n }",
"@Override\n public long getPosition() {\n return startPosition + super.getPosition();\n }",
"void moveToStart();",
"@Override\n public void playStart() {\n }",
"void seekTo(int positionMs, boolean fromUser);",
"void startMusic(AudioTrack newSong);",
"public void startDocument() {\r\n lineBuffer = new StringBuffer(128); \r\n saxLevel = 0;\r\n charState = -1;\r\n }",
"public void playAudio() {\n\t\tmusic[currentSong].stop();\n\t\tcurrentSong++;\n\t\tcurrentSong %= music.length;\n\t\tmusic[currentSong].play();\n\t}",
"public void setOffset(int offset) {\r\n currOffset = offset;\r\n try {\r\n file.seek(offset);\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public final void seek(long pos) throws IOException {\r\n\t\tf.seek( pos );\r\n\t}",
"private void tokenStart() {\n tokenStartIndex = zzStartRead;\n }",
"public void getAudiofocusAndPlay() {\n am = (AudioManager) this.getBaseContext().getSystemService(Context.AUDIO_SERVICE);\n\n //request audio focus\n int result = am.requestAudioFocus(afChangeListener, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);\n if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {\n PlayerActivity playerActivity = new PlayerActivity();\n myMediaPlayer.start();\n playerActivity.changeSeekbar();\n }\n }",
"private void startOver(){\n result = 0;\n display.setText(\"0\");\n lastCommand = \"=\";\n start = true;\n }",
"public void startPlaying(int index)\n {\n if( validIndex(index) ) {\n\n stopPlaying();\n player.startPlaying( songs.get(index).getFile() );\n\n }\n }",
"public void play() {\n\t\tmusic.play();\n\t\tsyncPosition();\n\t}",
"public void setCurrentSong(int position) {\n serviceBound = false;\n currentSong = position;\n }",
"public void playRecording() {\n\t\tString command = \"aplay foo.wav\";\n\t\t\n\t\tProcessBuilder pb = new ProcessBuilder(\"bash\" , \"-c\" , command );\n\t\ttry {\n\t\t\t\n\t\t\tProcess playProcess = pb.start();\n\t\t\t\n\t\t\tplayProcess.waitFor();\n\t\t\t\n\t\t\tplayProcess.destroy();\n\t\t\t\n\t\t\t\n\t\t}catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}catch (InterruptedException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t}",
"public synchronized void reset() throws IOException {\n\t\t\tdata.seek(firstPosition);\n\t\t}",
"public void setPlayerAtStart(Player player) {\n\t\tplayer.moveTo(start.getX()*10, start.getY()*10, start.getZ()*10);\n\t}",
"private void startPlay() {\n isPlaying = true;\n isPaused = false;\n playMusic();\n }",
"public void seekForward(int duration){\n if(mMediaPlayer!=null){\n if((mMediaPlayer.getCurrentPosition()+(duration*1000))>=mMediaPlayer.getDuration()){\n mMediaPlayer.seekTo(mMediaPlayer.getDuration()-1);\n }else{\n mMediaPlayer.seekTo(mMediaPlayer.getCurrentPosition() + (duration*1000));\n }\n }\n }",
"public void start(){\n\t\tif (host.getGameSettings().isMusicOn()) {\r\n\t\t\tspr_btnMute.setFrame(0);\r\n\t\t}else{\r\n\t\t\tspr_btnMute.setFrame(1);\r\n\t\t}\r\n\t}",
"private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}",
"private void driveForwardEnc()\r\n\t{\r\n\t\t//drive.setPos(0, 0, Config.Auto.encDriveForwardDistance, Config.Auto.encDriveForwardDistance);\r\n\t}",
"public void seek(long pos) throws IOException {\r\n int n = (int)(file_pos - pos);\r\n if (n >= 0 && n <= buf_end) {\r\n buf_pos = buf_end - n;\r\n } else {\r\n super.seek(pos);\r\n invalidate();\r\n }\r\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n releaseMediaPlayer();\n\n Word word = words.get(position);\n // Request audio focus for playback\n int result = mAudioManager.requestAudioFocus(mOnAudioFocusChangeListener,\n // Use the music stream.\n AudioManager.STREAM_MUSIC,\n // Request permanent focus.\n AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);\n\n if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {\n // Start playback\n mMediaPlayer = MediaPlayer.create(NumbersActivity.this, word.getmAudioResourceId());\n\n\n mMediaPlayer.start();\n\n }\n }",
"public void onStart() {\n super.onStart();\n C0938a.m5006c(\"SR/SoundRecorder\", \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~onStart\");\n f5379a = true;\n }",
"public void play() {\n try {\n if (clip != null) {\n new Thread() {\n public void run() {\n synchronized (clip) {\n clip.stop();\n clip.setFramePosition(0);\n clip.start();\n }\n }\n }.start();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void start() {\n ToneControl control = null;\n try {\n myPlayer = Manager.createPlayer(Manager.TONE_DEVICE_LOCATOR);\n // do the preliminary set-up:\n myPlayer.realize();\n // set a listener to listen for the end of the tune:\n myPlayer.addPlayerListener(this);\n // get the ToneControl object in order to set the tune data:\n control = (ToneControl) myPlayer.getControl(\"ToneControl\");\n control.setSequence(myTune);\n // set the volume to the highest possible volume:\n VolumeControl vc = (VolumeControl) myPlayer\n .getControl(\"VolumeControl\");\n vc.setLevel(100);\n } catch (Exception e) {\n // the music isn't necessary, so we ignore exceptions.\n }\n }",
"public void mark() {\r\n\t\tmark = cursor;\r\n\t}",
"void resetLine() {\n eof = (cursor == lineMark);\n cursor = lineMark;\n }",
"public void setStartPosition(int start) {\n mLastPosition = start;\n }",
"public void startSound()\n \n {try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Start 2.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n startClip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n startClip.open(audioIn); \n \n startClip.start();\n \n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n \n }",
"public void play() {\n Runtime.getRuntime().gc();\n stop = false;\n if (CodecHandler.getIndex() == -1) {\n index = 0;\n } else {\n index = CodecHandler.getIndex();\n }\n //paused = false;\n\n\n System.out.println(index);\n while (!stop) {\n init(CodecHandler.getPlayList().getFileList().get(index));\n\n try {\n if (line != null) {\n // open the output line and send 4K of data as a buffer\n line.open(decodedFormat);\n // specify buffer size\n byte[] data = new byte[8192];\n // start playing\n //line.start();\n System.out.println(getVolumeControl().getMaximum());\n System.out.println(getVolumeControl().getMinimum());\n int numBytesRead;\n// while ((numBytesRead = decodedInput.read(data, 0, data.length)) != -1) {\n// line.write(data, 0, numBytesRead);\n// }\n synchronized (lock) {\n while ((numBytesRead = decodedInput.read(data, 0, data.length)) != -1) {\n while (paused) {\n if (line.isRunning()) {\n line.drain();\n line.stop();\n }\n try {\n lock.wait();\n } catch (InterruptedException e) {\n }\n }\n\n if (!line.isRunning()) {\n line.start();\n }\n line.write(data, 0, numBytesRead);\n }\n }\n if (!stop) {\n index++;\n }\n\n // stop track\n line.drain();\n line.stop();\n line.close();\n decodedInput.close();\n\n if (index >= CodecHandler.getPlayList().getFileList().size()) {\n index = 0;\n }\n CodecHandler.setIndex(index);\n\n }\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } catch (LineUnavailableException lue) {\n lue.printStackTrace();\n }\n }\n System.out.println(index);\n Runtime.getRuntime().gc();\n }",
"public void prev() {\n\t\tsynchronized (this) {\n\t\t\tint pos = getPreShuffledPos();\n\t\t\tif (pos > 0) {\n\t\t\t\tmPlayPos = mPlayOrder[pos - 1];\n\t\t\t} else {\n\t\t\t\tmPlayPos = mPlayOrder[mPlayListLen - 1];\n\t\t\t}\n\t\t\tstop(false);\n\t\t\tprepareAndPlayCurrent();\n\t\t}\n\t}",
"@Override\n\tpublic void rewind() {\n\t\t\n\t}",
"public void setPosition(){\r\n currentPosition = 0; \r\n }",
"public synchronized void resetCurrentIndex()\n {\n // Reset the current index to start from 1 (speechgen0001.mp3)\n currentIndex = 1;\n }",
"public void skip(int position) { // Called when user drags the slider \r\n if (position < 0 || position > audioLength) \r\n return; \r\n audioPosition = position; \r\n if (midi) \r\n sequencer.setTickPosition(position); \r\n else \r\n clip.setMicrosecondPosition(position * 1000); \r\n progress.setValue(position); // in case skip( ) is called from outside \r\n }",
"public static void playSoundOnce(Clip clip)\n { \n if (clip == null || clip.isRunning())\n return;\n \n clip.setFramePosition(0);\n clip.start();\n }",
"public void PlayDirection(String filename) {\n try {\n \n InputStream in = getClass().getResourceAsStream(filename);\n System.out.println(\"connected from local\");\n Player player = Manager.createPlayer(in, \"audio/mpeg\");\n \n \n player.start();\n\n \n } catch (Exception e) {\n showException(e);\n return;\n }\n // mDisplay.setCurrent(mMainScreen);\n }",
"public void setBeginOffset(Integer beginOffset) {\n this.beginOffset = beginOffset;\n }",
"public void markContentBegin() {\n this.ris.markContentBegin();\n }",
"private void initialMusic(){\n\n }"
] |
[
"0.62623507",
"0.6247788",
"0.6122128",
"0.60298693",
"0.601784",
"0.5993185",
"0.59367716",
"0.5895604",
"0.5841808",
"0.58389646",
"0.57772946",
"0.576342",
"0.57520425",
"0.57443213",
"0.5710181",
"0.5704056",
"0.565955",
"0.5657945",
"0.5657916",
"0.5650976",
"0.56487334",
"0.56423366",
"0.56353176",
"0.56295645",
"0.5622867",
"0.56159174",
"0.5610702",
"0.5603154",
"0.5601978",
"0.5594447",
"0.5566951",
"0.5563529",
"0.5560913",
"0.5553432",
"0.554943",
"0.5523666",
"0.5521319",
"0.5505222",
"0.55044514",
"0.5495837",
"0.5489805",
"0.54845613",
"0.5477189",
"0.5472072",
"0.5469794",
"0.54683137",
"0.54526234",
"0.5451051",
"0.54495215",
"0.5448216",
"0.5431384",
"0.54306346",
"0.54277",
"0.5426462",
"0.5425611",
"0.54098237",
"0.5392327",
"0.5383542",
"0.53684986",
"0.5361287",
"0.5355101",
"0.5340957",
"0.53401685",
"0.53196406",
"0.53188384",
"0.53148335",
"0.5307087",
"0.5298032",
"0.52979946",
"0.5287257",
"0.52818346",
"0.5279268",
"0.527519",
"0.5274308",
"0.526096",
"0.5255609",
"0.52393055",
"0.5235955",
"0.52304596",
"0.5226022",
"0.52150047",
"0.5203669",
"0.520128",
"0.5200928",
"0.5197216",
"0.5193143",
"0.51903784",
"0.5189943",
"0.51891065",
"0.51866096",
"0.5184264",
"0.5176642",
"0.51731545",
"0.51729804",
"0.51622605",
"0.51526684",
"0.51518273",
"0.51515925",
"0.5144502",
"0.51433283"
] |
0.55885184
|
30
|
Put the cursor at the beginning of the audio file and stop it
|
public void reload() {
pause();
setPosition(0);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void continueSound() {\n\t\tclip.start();\n\t}",
"private void stopAudio() {\r\n // stop playback if possible here!\r\n }",
"public void playAudio() {\n if (done==false)\n {\n file.play();\n }\n}",
"public void stop() {\n pause();\n if (isInPreviewMode) {\n isInPreviewMode = false;\n }\n seekTo(0, new OnCompletionListener() {\n @Override\n public void onComplete() {\n //no-op\n }\n });\n }",
"public void pauseSound() {\n\t\tclip.stop();\n\t}",
"public void resume() {\n\t\t\n\t\tmusic.resume();\n\t\tsyncPosition();\n\t}",
"public void stop()\n {\n audioClip.stop();\n }",
"@Override\n public void onSeekComplete() {\n if (info.playing) {\n player.start();\n player.setOnSeekCompletionListener(null);\n } else {\n Log.w(TAG, \"Audio stopping while waiting for loop to re-start\");\n }\n }",
"@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n if(fileToPlay != null){\n int progress = seekBar.getProgress();\n mediaPlayer.seekTo(progress);\n resumeAudio();\n }\n\n }",
"public void pause() {\n\t\tline.stop();\n\t\tplay = false;\n\t}",
"void seekReset() {\n\t\tcancelEof();\n\t\tsawEofChar = false;\n\t}",
"private void reproducirAudio() {\n try{\n audioInputStream = AudioSystem.getAudioInputStream(new File(\"Sonidos/Inicio.wav\").getAbsoluteFile());\n clip = AudioSystem.getClip();\n clip.open(audioInputStream);\n clip.start();\n }\n catch (UnsupportedAudioFileException | IOException | LineUnavailableException ex){\n ex.printStackTrace();\n }\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 }",
"void reset() {\n\t\tsongs.get(curSong).rewind();\n\t\tsongs.get(curSong).pause();\n\t}",
"public void stopPlaying() {\n seq.stop();\n }",
"public void stop() {\n AudioPlayer.player.stop(cas);\n playing = false;\n }",
"@Override\r\n \tpublic void play() {\n \t\tFile file = new File(location);\r\n \t\tlong audioFileLength = file.length();\r\n \t\tAudioInputStream audioInputStream;\r\n \t\ttry {\r\n \t\t\taudioInputStream = AudioSystem.getAudioInputStream(file);\r\n \r\n \t\t\tAudioFormat format = audioInputStream.getFormat();\r\n \r\n \t\t\tint frameSize = format.getFrameSize();\r\n \t\t\tfloat frameRate = format.getFrameRate();\r\n \t\t\tdurationInSeconds = (audioFileLength / (frameSize * frameRate));\r\n \r\n \r\n \t\t\tLine.Info linfo = new Line.Info(Clip.class);\r\n \t\t\tLine line = AudioSystem.getLine(linfo);\r\n \t\t\tclip = (Clip) line;\r\n \t\t\t//clip.addLineListener(this);\r\n \t\t\tclip.open(audioInputStream);\r\n \t\t\tclip.start();\r\n \r\n \t\t} catch (UnsupportedAudioFileException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (IOException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (LineUnavailableException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t}\t\r\n \r\n \t}",
"@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n private void stopAudio() {\n //stop audio\n playBtn.setImageDrawable(getActivity().getResources().getDrawable(R.drawable.sharp_play_arrow_black_36, null));\n playerHeader.setText(\"Stopped\");\n isPlaying = false;\n mediaPlayer.stop();\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);\n seekBarHandler.removeCallbacks(updateSeekBar);\n }",
"private void playAudio() {\r\n Play.au(audioFileName, false);\r\n }",
"@Override\r\n protected void playGameStartAudio() {\n\taudio.playClip();\r\n }",
"public static void clic_sound() {\n\t\tm_player_clic.start();\n\t\tm_player_clic.setMediaTime(new Time(0));\n\t}",
"private synchronized void clear(){\n if(line != null){\n line.flush();\n line.stop();\n line.close();\n if(audioInputStream != null) {\n try {\n audioInputStream.close();\n } catch (IOException exception) {\n exception.printStackTrace();\n }\n }\n }\n }",
"File stopRecording();",
"private void procStopTrackingTouch(int userSelectedPosition) {\nlog_d(\"procStopTrackingTouch: \" + userSelectedPosition);\n float ratio = (float)userSelectedPosition/(float)MAX_PROGRESS;\n int position = (int)(ratio * mDuration);\n mAudioPlayer.seekTo(position);\n}",
"public synchronized void stopSound() {\r\n running = false;\r\n }",
"public void stop() {\n\t\tsound.stop();\n\t}",
"public static void resumeCurrentSoundtrack() {\n\t\tif (GameFrame.settingsPanel.musicOn() && soundtrack[GameBoardModel.getLevel()-1] != null)\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].loop(Clip.LOOP_CONTINUOUSLY);\n\t}",
"void player(){\n InputStream in; ////apabila merah -> ALT+ENTER ->input stream ->TOP\n try { ////try {}catch(Exception e){}\n in = new FileInputStream(new File(vpath.getText()));\n AudioStream audios = new AudioStream(in);\n AudioPlayer.player.start(audios);\n } catch (Exception e) {\n e.printStackTrace();\n } \n }",
"public void stop() {\n synchronized (lock) {\n isRunning = false;\n if (rawAudioFileOutputStream != null) {\n try {\n rawAudioFileOutputStream.close();\n } catch (IOException e) {\n Log.e(TAG, \"Failed to close file with saved input audio: \" + e);\n }\n rawAudioFileOutputStream = null;\n }\n fileSizeInBytes = 0;\n }\n }",
"public void openAlienDestroyedSound() {\r\n\t\tif (clipAlienDestroyed.isOpen()) {\r\n\t\t\tclipAlienDestroyed.start();\r\n\t\t}\r\n\r\n\t\tif (!(clipAlienDestroyed.isActive())) {\r\n\t\t\t/*\r\n\t\t\t * clip.stop(); clip.flush();\r\n\t\t\t */\r\n\t\t\tclipAlienDestroyed.setFramePosition(0);\r\n\t\t}\r\n\r\n\t}",
"public void keepLooping() {\n\t\tif(!clip.isActive()) {\n\t\t\tstartSound();\n\t\t}\n\t}",
"public void stopSound(){\n p.stop(as);\n }",
"public void stop() { \r\n timer.stop(); \r\n if (midi) \r\n sequencer.stop(); \r\n else \r\n clip.stop(); \r\n play.setText(\"Play\"); \r\n playing = false; \r\n }",
"public void stop() {\n stop = true;\n //index--;\n line.flush();\n line.close();\n try {\n decodedInput.close();\n } catch (IOException ex) {\n Logger.getLogger(MP3Player.class.getName()).log(Level.SEVERE, null, ex);\n }\n Runtime.getRuntime().gc();\n }",
"public void play() {\n\t\ttry {\n\t\t\taudioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n if(fileToPlay != null){\n pauseAudio();\n }\n\n }",
"public void stopFile(){\n try {\n running = false;\n resumeFile();\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }",
"public void play() {\n try {\n if (clip != null) {\n new Thread() {\n public void run() {\n synchronized (clip) {\n clip.stop();\n clip.setFramePosition(0);\n clip.start();\n }\n }\n }.start();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void play() {\n\t\tline.start();\n\t\tloop = false;\n\t\tnumLoops = 0;\n\t\tplay = true;\n\t\t// will wake up our data processing thread.\n\t\t// iothread.interrupt();\n\t}",
"public void stop() {\n\t\tstop(!playing);\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}",
"public void playAndStop(String audioFilePath, Long milliseconds) {\n play(audioFilePath);\n try {\n Thread.sleep(milliseconds);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n clip.stop();\n }",
"public void play() { \r\n if (midi) \r\n sequencer.start(); \r\n else \r\n clip.start(); \r\n timer.start(); \r\n play.setText(\"Stop\"); \r\n playing = true; \r\n }",
"public void stopPlaying() {\n \t\tisPlaying = false;\n \t}",
"public void stop() {\n\t\tplaybin.stop();\n\t}",
"public void play() {\n Runtime.getRuntime().gc();\n stop = false;\n if (CodecHandler.getIndex() == -1) {\n index = 0;\n } else {\n index = CodecHandler.getIndex();\n }\n //paused = false;\n\n\n System.out.println(index);\n while (!stop) {\n init(CodecHandler.getPlayList().getFileList().get(index));\n\n try {\n if (line != null) {\n // open the output line and send 4K of data as a buffer\n line.open(decodedFormat);\n // specify buffer size\n byte[] data = new byte[8192];\n // start playing\n //line.start();\n System.out.println(getVolumeControl().getMaximum());\n System.out.println(getVolumeControl().getMinimum());\n int numBytesRead;\n// while ((numBytesRead = decodedInput.read(data, 0, data.length)) != -1) {\n// line.write(data, 0, numBytesRead);\n// }\n synchronized (lock) {\n while ((numBytesRead = decodedInput.read(data, 0, data.length)) != -1) {\n while (paused) {\n if (line.isRunning()) {\n line.drain();\n line.stop();\n }\n try {\n lock.wait();\n } catch (InterruptedException e) {\n }\n }\n\n if (!line.isRunning()) {\n line.start();\n }\n line.write(data, 0, numBytesRead);\n }\n }\n if (!stop) {\n index++;\n }\n\n // stop track\n line.drain();\n line.stop();\n line.close();\n decodedInput.close();\n\n if (index >= CodecHandler.getPlayList().getFileList().size()) {\n index = 0;\n }\n CodecHandler.setIndex(index);\n\n }\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } catch (LineUnavailableException lue) {\n lue.printStackTrace();\n }\n }\n System.out.println(index);\n Runtime.getRuntime().gc();\n }",
"public void playAudio() {\n\t\tmusic[currentSong].stop();\n\t\tcurrentSong++;\n\t\tcurrentSong %= music.length;\n\t\tmusic[currentSong].play();\n\t}",
"@Override\r\n\tpublic void seekTo(int pos) {\n\t\tmediaPlayer.seekTo(pos);\r\n\t}",
"private void stopPlaying() {\n Log.e(TAG, \"Stop playing file: \" + curRecordingFileName);\n if (null != mPlayer) {\n if (mPlayer.isPlaying())\n mPlayer.stop();\n mPlayer.release();\n mPlayer = null;\n }\n\n }",
"public void start(){\n //Set pausing to false\n pausing = false;\n next();\n }",
"public void stop(boolean resetPosition) {\n\t\tif (playing) {\n\t\t\tif (debug)\n\t\t\t\tSystem.err.println(\"STOP playing \" + resetPosition);\n\t\t\tstopRequested = true;\n\t\t\tif (resetPosition)\n\t\t\t\trequestedPosition = 0;\n\t\t} else if (resetPosition)\n\t\t\tsetPosition(0);\n\t}",
"void seek(int offsetFromStart);",
"public static void portail_sound() {\n\t\tm_player_portail.start();\n\t\tm_player_portail.setMediaTime(new Time(0));\n\t}",
"public void stop(){\n Log.d(TAG, \"stop: called\");\n if(mMediaPlayer!=null){\n mMediaPlayer.stop();\n FilePlayerDialog.isPlaying = false;\n seekHandler.removeCallbacksAndMessages(null);\n }\n }",
"protected void stopTheSound(){\n mp.stop();\n }",
"public void stop() {\n\t\tmusic.stop();\n\t}",
"public void goToEnd() {\n\t\tcurrentClip.stop();\n\t\tsetPosition(currentClip.getMicrosecondLength());\n\t\tisPlaying = false;\n\t}",
"public void playRecording() {\n\t\tString command = \"aplay foo.wav\";\n\t\t\n\t\tProcessBuilder pb = new ProcessBuilder(\"bash\" , \"-c\" , command );\n\t\ttry {\n\t\t\t\n\t\t\tProcess playProcess = pb.start();\n\t\t\t\n\t\t\tplayProcess.waitFor();\n\t\t\t\n\t\t\tplayProcess.destroy();\n\t\t\t\n\t\t\t\n\t\t}catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}catch (InterruptedException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t}",
"public static void beginCurrentSoundtrack() {\n\t\t\n\t\tif (GameFrame.settingsPanel.musicOn() && soundtrack[GameBoardModel.getLevel()-1] != null) {\n\t\t\t\n\t\t\t// In case a new game is started before the victory jingle is finished\n\t\t\t// from a previous game (rare occurrence, but possible)\n\t\t\tif (victoryFanfare.isRunning()) victoryFanfare.stop();\t\t\t\n\t\t\t\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].setFramePosition(0);\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].loop(Clip.LOOP_CONTINUOUSLY);\n\t\t\t\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic void stop() {\n\t\tif (player != null) {\n\t\t\tplayer.close();\n\n\t\t\tpauseLocation = 0;\n\t\t\tsetSongTotalLenght(0);\n\t\t}\n\t}",
"protected void startNextSound() {\n\t\tsoundIndex = (soundIndex < audioFiles.length - 1) ? soundIndex + 1 : 0;\t\n\t\tString nextSoundId = audioFiles[soundIndex];\n\t\tstartPlayer(nextSoundId);\n\t}",
"@Override\n\tpublic void OnForwardCommand() {\n\t\tsuper.OnForwardCommand();\n\t\tSoundManage.playSound(forwordSound1);\n\t}",
"public void loopSound(boolean commence) {\n if ( commence ) {\n clip.setFramePosition(0);\n clip.loop( Clip.LOOP_CONTINUOUSLY );\n } else {\n clip.stop();\n }\n }",
"private void onResume(){\n\t\tfj.timer.start();\n\t\tfj.audio.resumeAudio();\n\t\tthis.dispose();\n\t}",
"public void stopAudio() {\n\t\tif(audioStream != null ) {\n\t\t\tAudioPlayer.player.stop(audioStream);\n\t\t}\n\t}",
"public void play() {\n\t\t//If volume is not muted\n\t\tif (volume != Volume.MUTE) {\n\t\t\t//If the clip is running\n\t\t\tif (clip.isRunning()) {\n\t\t\t\tclip.stop(); //Stop it\n\t\t\t}\n\t\t\tclip.setFramePosition(0); //Rewind\n\t\t\tclip.start(); //Play again\n\t\t}\n\t}",
"public void stopSound() {\n metaObject.stopSound();\n }",
"@Override\n public void onStopTrackingTouch(SeekBar arg0) {\n mp.seekTo(seek.getProgress());\n }",
"public void audioManipulatorAudioFileReachedEnd() {\n\t\taudioFileProcessedTimeString = secondsToMinutesAndSeconds(0);\n\t\ttextAudioFileDuration.setText(audioFileProcessedTimeString + \" / \" + audioFileDurationString);\n\t\tsliderAudioFileDuration.setValue(0);\n\t\tbuttonPlay.setDisable(false);\n\t\tbuttonPause.setDisable(true);\n\t\tbuttonStop.setDisable(true);\n\t\tpaneMixerMainControls.setDisable(false);\n\t\tpaneLowPass.setDisable(false);\n\t}",
"public void StopSound(ISoundOrigin origin);",
"@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tLog.d(C.LOG_TAG, \"Audio Play Complete,\" + getTime());\n\t\t\t\tmp.seekTo(0); // roll back to the begining\n\t\t\t\tmRecordTimer.sendMessageDelayed(Message.obtain(null, MESSAGE_PLAY_IS_STOPPED), TIME_TO_WAIT_STOP_RECORD);\n\t\t\t}",
"private void startPlay() {\n isPlaying = true;\n isPaused = false;\n playMusic();\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n releaseMediaPlayer();\n\n Word word = words.get(position);\n // Request audio focus for playback\n int result = mAudioManager.requestAudioFocus(mOnAudioFocusChangeListener,\n // Use the music stream.\n AudioManager.STREAM_MUSIC,\n // Request permanent focus.\n AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);\n\n if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {\n // Start playback\n mMediaPlayer = MediaPlayer.create(NumbersActivity.this, word.getmAudioResourceId());\n\n\n mMediaPlayer.start();\n\n }\n }",
"public void startSound() {\n\t\ttry {\n\t\t\t// Open an audio input stream.\n\t\t\tURL url = this.getClass().getResource(\"/\"+wavMusicFile);\n\t\t\t//System.out.println(\"url: \" + url);\n\t\t\tAudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n\t\t\t// Get a sound clip resource.\n\t\t\tclip = AudioSystem.getClip();\n\t\t\t// Open audio clip and load samples from the audio input stream.\n\t\t\tclip.open(audioIn);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void playOnce() {\n mStopAtLoopEnd = true;\n mStartTimeMillis = 0;\n mCurrentLoopNumber = 0;\n cancelCallback();\n postCallback();\n }",
"private void stop()\n {\n mPlayer.stop();\n mPlayer = MediaPlayer.create(this, audioUri);\n }",
"public void play() { player.resume();}",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n\n //Request audio focus\n if (requestAudioFocus() == false) {\n //Could not gain focus\n stopSelf();\n }\n\n// initMediaPlayer(mTrackPos);\n\n return super.onStartCommand(intent, flags, startId);\n }",
"private void startPlaying() {\n try {\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(audioFile.getAbsolutePath());\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"prepare() failed\");\n }\n showTimer(false);\n } catch (Exception e) {\n logException(e, \"MicManualFragment_startPlaying()\");\n }\n\n }",
"void stopMusic();",
"public void startCommand() {\r\n _playing = true;\r\n }",
"public void pauseSong()\n {\n if(!mute)\n {\n try{ \n //bclip.stop();\n \n URL url = this.getClass().getClassLoader().getResource(\"Refreshing Elevator Music.wav\");\n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n pclip.open(audioIn); \n pclip.start();\n pclip.loop(Clip.LOOP_CONTINUOUSLY);\n }catch(Exception e){}\n }\n }",
"public void stop () {\n driveRaw (0);\n }",
"public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}",
"private void stop() {\n Log.i(\"TTS\", \"Stopping\");\n mSpeechQueue.clear();\n \n nativeSynth.stop();\n mIsSpeaking = false;\n if (mPlayer != null) {\n try {\n mPlayer.stop();\n } catch (IllegalStateException e) {\n // Do nothing, the player is already stopped.\n }\n }\n Log.i(\"TTS\", \"Stopped\");\n }",
"public void playPrevious() {\n if(mPosition > 0) {\n mPosition--;\n } else {\n mPosition = (--mPosition + mMyTracks.size()) % mMyTracks.size();\n }\n prepareTrack();\n }",
"@Override\n public void playStop() {\n }",
"private void stop(){ player.stop();}",
"void undoPlay();",
"@Override\n\tpublic void onPrepared(MediaPlayer mp) {\n\t\tthis.mMediaPlayer.seekTo((int) (this.mOffsetInto * 100));\n\t\tthis.subject.notifyDoneBuffering();\n\t\tLog.e(\"AUDIO\", \"I'm done buffering and ready to play!\");\n\t}",
"public void endSound()\n {\n if(!mute)\n {\n try {\n if(lastpowerUp.equals(\"RAINBOW\"))\n {\n sclip.stop();\n bclip.start();\n bclip.loop(Clip.LOOP_CONTINUOUSLY);\n }\n // Open an audio input stream.\n URL url = this.getClass().getClassLoader().getResource(\"Silence.wav\"); \n \n if(lastpowerUp.equals(\"BLUE\"))\n url = this.getClass().getClassLoader().getResource(\"Out Of Bounds Stop.wav\");\n else if(lastpowerUp.equals(\"YELLOW\")||lastpowerUp.equals(\"DOUBLE\") || lastpowerUp.equals(\"WHITE\") || (lastpowerUp.equals(\"TROLL\") && modeT))\n url = this.getClass().getClassLoader().getResource(\"Mushroom Down.wav\") ;\n else if(lastpowerUp.equals(\"BLACK\") || lastpowerUp.equals(\"TROLL\"))\n url = this.getClass().getClassLoader().getResource(\"Invisible Off.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n Clip clip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n clip.open(audioIn); \n \n clip.start();\n \n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n \n } \n }\n }",
"@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n @Override\n public void onClickListener(File file, int position) {\n fileToPlay = file;\n if(isPlaying){\n stopAudio();\n playAudio(fileToPlay);\n }else{\n playAudio(fileToPlay);\n\n }\n }",
"public void pauseFile() {\n // you may want to throw an IllegalStateException if !running\n paused = true;\n\n }",
"@Override\n public void stopSound(){\n gameMusic.stop();\n }",
"private void stopRecording() {\r\n\t\tisRecording = false;\r\n\t\ttry {\r\n\t\t\ttimer.cancel();\r\n\t\t\tbuttonRecord.setText(\"Record\");\r\n\t\t\tbuttonRecord.setIcon(iconRecord);\r\n\t\t\t\r\n\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\r\n\r\n\t\t\trecorder.stop();\r\n\r\n\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\r\n\t\t\tsaveFile();\r\n\r\n\t\t} catch (IOException ex) {\r\n\t\t\tJOptionPane.showMessageDialog(SwingSoundRecorder.this, \"Error\",\r\n\t\t\t\t\t\"Error stopping sound recording!\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}",
"public void stop()\n {\n if(AudioDetector.getInstance().isNoAudio() || musicPlayer == null)\n {\n return;\n }\n\n\n musicPlayer.stop();\n }",
"@Override\n public void onCompletion(MediaPlayer mp) {\n mp.reset();\n nextMusic();\n\n }",
"public void PauseSound();",
"public void resume() {\n moveStop = true;\n }",
"public void startSound()\n \n {try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Start 2.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n startClip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n startClip.open(audioIn); \n \n startClip.start();\n \n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n \n }"
] |
[
"0.6756932",
"0.6741619",
"0.64811105",
"0.6445055",
"0.6440119",
"0.6365626",
"0.63365924",
"0.6247191",
"0.6228472",
"0.6195939",
"0.6189458",
"0.6186835",
"0.61750585",
"0.61739457",
"0.6168153",
"0.6149877",
"0.6102334",
"0.6079848",
"0.607872",
"0.607831",
"0.6077961",
"0.6058123",
"0.6055047",
"0.60505724",
"0.6037313",
"0.60246897",
"0.6018826",
"0.60145026",
"0.6012138",
"0.6006601",
"0.6002477",
"0.59946686",
"0.5994274",
"0.5993284",
"0.597031",
"0.596331",
"0.59614265",
"0.5957035",
"0.5945518",
"0.5935918",
"0.59335834",
"0.5917146",
"0.5914876",
"0.5909112",
"0.5900226",
"0.5898161",
"0.5895823",
"0.58940953",
"0.58915144",
"0.5884817",
"0.5884509",
"0.58801293",
"0.587689",
"0.5875979",
"0.587168",
"0.58698714",
"0.5868373",
"0.58644754",
"0.584655",
"0.58326733",
"0.5829465",
"0.582932",
"0.58272475",
"0.58188576",
"0.5818321",
"0.58120006",
"0.580811",
"0.58076817",
"0.58071",
"0.5804634",
"0.5803501",
"0.58011854",
"0.5800075",
"0.5796956",
"0.5790502",
"0.5785928",
"0.5785575",
"0.5780287",
"0.5774718",
"0.57741684",
"0.57738334",
"0.57692176",
"0.57687414",
"0.57637984",
"0.57614505",
"0.5745643",
"0.5743641",
"0.57427466",
"0.5741497",
"0.5735722",
"0.57280016",
"0.5723595",
"0.57145035",
"0.5711951",
"0.57100016",
"0.56965834",
"0.5694902",
"0.5694656",
"0.5685413",
"0.56815875",
"0.5679642"
] |
0.0
|
-1
|
Set if the current player must repeat the audio when the end is reached
|
public void setRepeat(final boolean isRepeating) {
this.isRepeating = isRepeating;
if (isRepeating) {
loopListenerID = addOnEndEvent(() -> goToStart());
} else {
removeOnEndEvent(loopListenerID);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void playOnce() {\n mStopAtLoopEnd = true;\n mStartTimeMillis = 0;\n mCurrentLoopNumber = 0;\n cancelCallback();\n postCallback();\n }",
"@Test\n public void testSetLooping()\n {\n MusicPlayer.getInstance().selectSong(Songs.CREDITS);\n assertEquals(MusicPlayer.getInstance().setLooping(true), false);\n }",
"public void keepLooping() {\n\t\tif(!clip.isActive()) {\n\t\t\tstartSound();\n\t\t}\n\t}",
"public void playLooped()\n {\n audioClip.loop(Clip.LOOP_CONTINUOUSLY);\n play();\n }",
"@Override\n public void playEnd() {\n }",
"public static void repeatFromTheBeginning()\n {\n if (JSoundsMainWindowViewController.jtbRepeatSongs.isSelected())\n MusicPlayerControl.repeatSongsFromTheBeginning(true);\n else\n MusicPlayerControl.repeatSongsFromTheBeginning(false);\n }",
"public void setRepeat() {\n\t\tthis.repeat = !this.repeat;\n\t}",
"public void loopSound(boolean commence) {\n if ( commence ) {\n clip.setFramePosition(0);\n clip.loop( Clip.LOOP_CONTINUOUSLY );\n } else {\n clip.stop();\n }\n }",
"@Override\n public void onPause() {\n justAfterPause = true;\n\n if (!soundAlreadyStopped) {\n SoundManager.onPause(instantMusicPause);\n soundAlreadyStopped = true;\n }\n\n instantMusicPause = true;\n super.onPause();\n\n }",
"@Override\n public void onSeekComplete() {\n if (info.playing) {\n player.start();\n player.setOnSeekCompletionListener(null);\n } else {\n Log.w(TAG, \"Audio stopping while waiting for loop to re-start\");\n }\n }",
"public void setLooping(boolean isLooping) {\n mediaPlayer.setLooping(isLooping);\n }",
"@Override\n public void onCompletion(MediaPlayer mp) {\n if(isRepeat){\n // repeat is on play same song again\n playSong(currentSongIndex);\n } else if(isShuffle){\n // shuffle is on - play a random song\n Random rand = new Random();\n currentSongIndex = rand.nextInt((songsList.size() - 1) - 0 + 1) + 0;\n playSong(currentSongIndex);\n } else{\n // no repeat or shuffle ON - play next song\n if(currentSongIndex < (songsList.size() - 1)){\n playSong(currentSongIndex + 1);\n currentSongIndex = currentSongIndex + 1;\n }else{\n // play first song\n playSong(0);\n currentSongIndex = 0;\n }\n }\n\n }",
"void setSingleVideoLoopPlayback(boolean looping);",
"public void play() {\n\t\tif (happiness + 10 > 100) {\n\t\t\thappiness = 100;\n\t\t} else {\n\t\t\thappiness += 10;\n\t\t}\n\t}",
"@Override\n\tpublic void OnGameStart() {\n\t\tsuper.OnGameStart();\n\t\tMusicManage.setLoopingMusic(tumMusic, true);\n\t\tMusicManage.playMusic(tumMusic);\n\t}",
"public boolean isLooping(StarObjectClass self){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn false;\r\n \t\treturn mediaplayer.isLooping();\r\n \t}",
"public void audioManipulatorAudioFileReachedEnd() {\n\t\taudioFileProcessedTimeString = secondsToMinutesAndSeconds(0);\n\t\ttextAudioFileDuration.setText(audioFileProcessedTimeString + \" / \" + audioFileDurationString);\n\t\tsliderAudioFileDuration.setValue(0);\n\t\tbuttonPlay.setDisable(false);\n\t\tbuttonPause.setDisable(true);\n\t\tbuttonStop.setDisable(true);\n\t\tpaneMixerMainControls.setDisable(false);\n\t\tpaneLowPass.setDisable(false);\n\t}",
"boolean hasPostEndOfAudioTimeoutMs();",
"public static void resumeCurrentSoundtrack() {\n\t\tif (GameFrame.settingsPanel.musicOn() && soundtrack[GameBoardModel.getLevel()-1] != null)\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].loop(Clip.LOOP_CONTINUOUSLY);\n\t}",
"public void continueSound() {\n\t\tclip.start();\n\t}",
"@Override\r\n\tpublic boolean canPlay() {\n\t\treturn false;\r\n\t}",
"public void setPlayAll() {\n shuffle = false;\n // set AUTO so when the song ends - it will start the next song automatically\n action = PLAY_TRACK;\n if (shuffleIndexes != null) shuffleIndexes.clear();\n songPosn = 0;\n playSong();\n }",
"private void startPlay() {\n isPlaying = true;\n isPaused = false;\n playMusic();\n }",
"public void recorderAudioFileReachedEnd() {\n\t\tsetCurrentValueToRecordDurationSlider(0);\n\t\trecorderButtonPlay.setDisable(false);\n\t\trecorderButtonPause.setDisable(true);\n\t\trecorderButtonStop.setDisable(true);\n\t}",
"@Override\n public void playStop() {\n }",
"public void gameOver(){\n gameOverMusic.loop(pitch, volume);\n }",
"public synchronized void pause(){\r\n if(currentLoop0) backgroundMusicLoop0.pause();\r\n else backgroundMusicLoop1.pause();\r\n }",
"public void ChangeMusic(int musicnum, boolean looping);",
"@Override\n public void onCompletion(MediaPlayer mp) {\n mp.reset();\n nextMusic();\n\n }",
"public void play() \n{\n s = !s; \n if (s == false)\n {\n //pausets = millis()/4;\n controlP5.getController(\"play\").setLabel(\"Play\");\n } else if (s == true)\n {\n //origint = origint + millis()/4 - pausets;\n controlP5.getController(\"play\").setLabel(\"Pause\");\n }\n}",
"private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }",
"public static void next() {\r\n if (nextMusic_ == INVALID_NUMBER) {\r\n return;\r\n }\r\n currentMusic_ = nextMusic_;\r\n nextMusic_ = INVALID_NUMBER;\r\n MediaPlayer p = players_.get(currentMusic_);\r\n if (p != null) {\r\n if (!p.isPlaying()) {\r\n p.setLooping(true);\r\n p.setOnCompletionListener(null);\r\n p.start();\r\n }\r\n }\r\n }",
"public void pause() {\n\t\tif (playing)\n\t\t\tstopRequested = true;\n\t}",
"public void play() {\n\t\tplay(true, true);\n\t}",
"public void setLooping(StarObjectClass self,boolean looping){ \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.setLooping(looping);\r\n \t}",
"@Override\n\tpublic void nowPlaying() {\n\t}",
"public void Play() {\n superPlaneGodMode = false;\r\n if (!musicPlaying)\r\n backgroundMusic.pause();\r\n if (musicPlaying)\r\n backgroundMusic.start();\r\n paused = false;\r\n }",
"@Override\r\n\t\t\t\tpublic void onCompletion (MediaPlayer theMediaPlayer) \r\n\t\t\t\t{\n\t\t\t\t\t// 11/03/2017 ECU check if any looping is needed\r\n\t\t\t\t\t// -------------------------------------------------------------\r\n\t\t\t\t\tif (loopCounter <= 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\t// 11/03/2017 ECU everything done so just check on the global \r\n\t\t\t\t\t\t// media player\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\t// 10/03/2017 ECU check if the global media player needs to be\r\n\t\t\t\t\t\t// 'resumed'\r\n\t\t\t\t\t\t// 15/03/2019 ECU whether there is a 'paused' media or not\r\n\t\t\t\t\t\t// it is necessary to release the resources\r\n\t\t\t\t\t\t// used in this class\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\tif (mediaPlayerPaused)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// -----------------------------------------------------\r\n\t\t\t\t\t\t\t// 10/03/2017 ECU the global media player needs to be resumed\r\n\t\t\t\t\t\t\t// -----------------------------------------------------\r\n\t\t\t\t\t\t\tMusicPlayer.playOrPause (true);\r\n\t\t\t\t\t\t\t// -----------------------------------------------------\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\t// 04/09/2017 ECU make sure the resources are released\r\n\t\t\t\t\t\t// 05/09/2017 ECU changed to use the local method\r\n\t\t\t\t\t\t// 15/03/2019 ECU changed to always release resources\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\tstop ();\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{\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\t// 11/03/2017 ECU check about loops\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\tmediaPlayer.seekTo (theLoopPosition);\r\n\t\t\t\t\t\tmediaPlayer.start ();\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\t// 11/03/2017 ECU decrement the loop counter\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\tloopCounter--;\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// -------------------------------------------------------------\r\n\t\t\t\t}",
"public void setEnded(){\n\t\tended=true;\n\t}",
"public void stopPlaying() {\n \t\tisPlaying = false;\n \t}",
"public boolean stillPlaying(){\r\n\t\treturn stillPlaying;\r\n\t}",
"@Override\r\n public void show()\r\n {\r\n // De inmediato, ponemos en marcha una melodia\r\n if (!juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).isPlaying())\r\n {\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).play();\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).setLooping(true);\r\n }\r\n }",
"@Override\r\n\tpublic boolean canPause() {\n\t\treturn true;\r\n\t}",
"private void keepAudioPlaying() {\n\t\tint writeCnt = mAudioTrack.write(pilot, 0, pilot.length);\n\t\tif(writeCnt != pilot.length){\n\t\t\tLog.e(C.LOG_TAG, \"Audio pilot play write size in consistent, writeCnt = \"+writeCnt);\n\t\t}\n\n\n\t\t// write signals (forever)\n\t\twhile(isPlayingAndRecording){\n\t\t//while(true){\n\t\t\twriteCnt = mAudioTrack.write(signal, 0, signal.length);\n\n\t\t\tif(writeCnt != signal.length){\n\t\t\t\tLog.e(C.LOG_TAG, \"Audio signal play write size in consistent, writeCnt = \"+writeCnt);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void pause() {\n\t\tif (player != null) {\n\n\t\t\ttry {\n\t\t\t\t// Checks how much of the song is left available to play\n\t\t\t\tpauseLocation = fis.available();\n\t\t\t\tplayer.close();\n\t\t\t} catch (IOException e) {\n\n\t\t\t}\n\n\t\t}\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}",
"protected void muteSounds()\n {\n if(confused.isPlaying())\n confused.stop();\n }",
"public void loop(){\n\t\t\n\t\tclip.loop(Clip.LOOP_CONTINUOUSLY);\n\t\tplay();\n\t}",
"@Override\n\tpublic void pause() {\n\t PhoneDevice.Settings.stopMusic();\n\t}",
"public boolean musicOn ()\n\t{\n\t\tif (musicInt == 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public void play() { player.resume();}",
"public void pauseSong() {\n if (mp.isPlaying()) {\n mp.pause();\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 }",
"public Boolean isRepeat()\n\t{\n\t\treturn repeat;\n\t}",
"public void setRepeat(Boolean repeat)\n\t{\n\t\tthis.repeat = repeat;\n\t}",
"private void stopAudio() {\r\n // stop playback if possible here!\r\n }",
"@Override\r\n\tpublic boolean isPlaying() {\n\t\treturn mediaPlayer.isPlaying();\r\n\t}",
"@Override\r\n\tpublic void endOfSubItems(MediaPlayer mediaPlayer)\r\n\t{\n\r\n\t}",
"public void playAudio() {\n if (done==false)\n {\n file.play();\n }\n}",
"public void setPlaying() {\n\t\tstate = State.INGAME;\n\t}",
"@Override\n public void handle(RepeatStatusChangeEvent event) {\n switch (event.getStatus()) {\n case REPEAT_OFF:{\n repeatStatus = RepeatStatus.REPEAT_OFF;\n player.setCycleCount(1);\n break;\n }\n case REPEAT_ON:{\n repeatStatus = RepeatStatus.REPEAT_ON;\n player.setCycleCount(1);\n break;\n }\n case REPEAT_ONE:{\n // Return when playlists are implemented\n repeatStatus = RepeatStatus.REPEAT_ONE;\n player.setCycleCount(MediaPlayer.INDEFINITE);\n break;\n }\n case REPEAT_DEFAULT:{\n break;\n }\n } \n }",
"private void update()\n{\n // Get seconds elapsed\n int elapsedTime = (int)(System.currentTimeMillis() - _startTime);\n \n // Get play start time\n int playStartTime = getPlayStartTime()>=0? getPlayStartTime() : 0;\n\n // Increment time by time elapsed\n setTime(playStartTime + elapsedTime);\n \n // If not looping and time is beyond max, stop animator\n if(!getLoops() && (getPlayStartTime() + elapsedTime >= getMaxTime()))\n stop();\n}",
"@Override\n protected void onPause()\n {\n super.onPause();\n setSound.pauseMusic();\n }",
"@Override\n\t\tpublic void run() {\n\t\t\tisRepeatFlag = true;\n\t\t}",
"public void play() {\n\t\t//If volume is not muted\n\t\tif (volume != Volume.MUTE) {\n\t\t\t//If the clip is running\n\t\t\tif (clip.isRunning()) {\n\t\t\t\tclip.stop(); //Stop it\n\t\t\t}\n\t\t\tclip.setFramePosition(0); //Rewind\n\t\t\tclip.start(); //Play again\n\t\t}\n\t}",
"public boolean isRepeatYoyo()\n\t{\n\t\treturn isYoyo && isRepeat();\n\t}",
"public void loop() {\n\t\tmusic.loop();\n\t\tsyncPosition();\n\t}",
"public boolean isPlaying() {\n return params.isPlay();\n }",
"public static void portail_sound() {\n\t\tm_player_portail.start();\n\t\tm_player_portail.setMediaTime(new Time(0));\n\t}",
"public static void playerRun()\n {\n runSound.playLooped();\n }",
"private void playNext(){\n musicSrv.playNext();\n updateTrackInfo();\n if(playbackPaused){ //if music is paused and user hits next button, next song is played\n playbackPaused = false;\n }\n }",
"boolean isPlaying() { return playing; }",
"@Override\n public void specificPlayerReplayMedia(long currentAudioPosition) {\n exoPlayer.seekTo(currentAudioPosition);\n // switchAudioToVocal(); // removed on 2022-01-03\n exoPlayer.prepare(); // replace exoPlayer.retry();\n //\n exoPlayer.setPlayWhenReady(true);\n Log.d(TAG, \"specificPlayerReplayMedia.exoPlayer.seekTo(currentAudioPosition).\");\n }",
"public void setIsPlaying(boolean a) {\n\t\tthis.isPlaying = !this.isPlaying;\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\tif (mediaPlayer.isPlaying()) {\r\n\t\t\tmediaPlayer.pause();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void onPrepared(MediaPlayer mp) {\n\t\tthis.mMediaPlayer.seekTo((int) (this.mOffsetInto * 100));\n\t\tthis.subject.notifyDoneBuffering();\n\t\tLog.e(\"AUDIO\", \"I'm done buffering and ready to play!\");\n\t}",
"@Override\r\n public int playGameLoop() {\r\n return 0;\r\n }",
"public boolean isPlaying() {\n return mPlaying || mStateManager.isPlaying();\n\t}",
"public void setPlay(boolean var)\n\t{\n\t\tcanPlay = var;\n\t}",
"public boolean isPlaying() {\n \t\treturn isPlaying;\n \t}",
"public boolean setLooping(Boolean looping)\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return toggleLooping;\n }\n\n boolean previous = toggleLooping;\n toggleLooping = looping;\n Log.add(\"[MUSIC]\\tLooping set to: \" + looping);\n\n return previous;\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 playSelectSong() {\n isStart = false;\n if (getCurrentSong() == 0) {\n audioList.get(getCurrentSong()).setSelect(true);\n playListAdapter.notifyItemChanged(getCurrentSong());\n }\n isPauseResume = false;\n if (player != null) {\n player.stopMedia();\n }\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n /*new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n }\n }, DELAY_TIME);*/\n }",
"public void setRepeat(boolean repeat) {\n this.repeat = repeat;\n }",
"@Override\n public void run() {\n if (Build.VERSION.SDK_INT < 28) {\n while(isAlarmOn) {\n mRingtone.play();\n }\n }\n\n else {\n mRingtone.setLooping(true);\n mRingtone.play();\n }\n }",
"public boolean takeControl(){\r\n\t\tif(sound.readValue()>40){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\n public void run() {\n // TODO Auto-generated method stub\n running = true;\n AudioFile song = musicFiles.get(currentSongIndex);\n song.play();\n while(running){\n if(!song.isPlaying()){\n currentSongIndex++;\n if(currentSongIndex >= musicFiles.size()){\n currentSongIndex = 0;\n }\n song = musicFiles.get(currentSongIndex);\n song.play();\n }\n try{\n Thread.sleep(1);\n }\n catch (InterruptedException e){\n e.printStackTrace();\n } \n }\n }",
"@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tLog.d(C.LOG_TAG, \"Audio Play Complete,\" + getTime());\n\t\t\t\tmp.seekTo(0); // roll back to the begining\n\t\t\t\tmRecordTimer.sendMessageDelayed(Message.obtain(null, MESSAGE_PLAY_IS_STOPPED), TIME_TO_WAIT_STOP_RECORD);\n\t\t\t}",
"protected void checkNextSoundInterval() {\n\t\tif(P.p.millis() > loopLastStartTime + loopInterval) {\n\t\t\tloopLastStartTime = P.p.millis();\n\t\t\tstartNextSound();\n\t\t}\n\t}",
"@Override\n\t\tpublic void onPlaying() {\n\t\t\tif (max_length != 0){\n\t\t\t\tnew CountDownTimer(max_length, 1000) {\n\n\t\t\t\t @Override\n\t\t\t\t\tpublic void onTick(long millisUntilFinished) {\n\t\t\t\t \n\t\t\t\t }\n\t\t\n\t\t\t\t @Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t\tbatteryAsync.cancel(false);\n\t\t\t\t\t\t// We give back the results as a String\n\t\t\t\t\t\tJSONObject temp = new JSONObject(batteryLog);\n\t\t\t\t\t\tString batteryResults = temp.toString();\n\t\t\t\t\t\tIntent returnIntent = new Intent();\n\t\t\t\t\t\treturnIntent.putExtra(\"batteryLog\", batteryResults);\n\t\t\t\t\t\tYoutubePlayerActivity.this.setResult(RESULT_OK,\n\t\t\t\t\t\t\t\treturnIntent);// tells previous activity the\n\t\t\t\t\t\t\t\t\t\t\t\t// test was completed correctly\n\t\t\t\t\t\tContext context = getApplicationContext();\n\t\t\t\t\t\tCharSequence text = \"Max video length reached\";\n\t\t\t\t\t\tint duration = Toast.LENGTH_LONG;\n\t\t\t\t\t\tToast.makeText(context, text, duration).show();\n\t\t\t\t\t\tfinish();\n\t\t\t\t }\n\t\t\t\t}.start();\n\t\t\t}\n\t\t}",
"boolean play();",
"public void pauseSong()\n {\n if(!mute)\n {\n try{ \n //bclip.stop();\n \n URL url = this.getClass().getClassLoader().getResource(\"Refreshing Elevator Music.wav\");\n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n pclip.open(audioIn); \n pclip.start();\n pclip.loop(Clip.LOOP_CONTINUOUSLY);\n }catch(Exception e){}\n }\n }",
"public void onRepeat() {\n\t\t// TODO Auto-generated method stub\n\t\tLastWholeDelta = 0;\n\t}",
"public void pause() {\n\t\tmusic.pause();\n\t}",
"public boolean playing() {\n\t\treturn sound.isPlaying();\n\t}",
"public void togglePlay() {\n\t\tif (playing)\n\t\t\tpause();\n\t\telse\n\t\t\tplay();\n\t}",
"protected abstract boolean pause();",
"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 }",
"@Override\n public boolean onError(MediaPlayer mp, int what, int extra) {\n mp.reset();\n return false;\n }",
"public void stopPlaying() {\n seq.stop();\n }"
] |
[
"0.69510525",
"0.6723848",
"0.66380435",
"0.6521301",
"0.65154725",
"0.6352859",
"0.62893873",
"0.627822",
"0.6221588",
"0.62165403",
"0.6166438",
"0.6157959",
"0.6124896",
"0.6108051",
"0.6087205",
"0.60854226",
"0.6081043",
"0.60754246",
"0.6074465",
"0.6046858",
"0.60454994",
"0.6045476",
"0.59831303",
"0.5973008",
"0.5970279",
"0.59554386",
"0.5925801",
"0.59068125",
"0.589148",
"0.5867791",
"0.58585095",
"0.5845706",
"0.5843314",
"0.5842798",
"0.5816365",
"0.58140445",
"0.58095616",
"0.58054644",
"0.5795619",
"0.57921505",
"0.5789516",
"0.5788281",
"0.57879716",
"0.5785806",
"0.57854277",
"0.57849914",
"0.5780099",
"0.57749003",
"0.57725716",
"0.5764149",
"0.5763125",
"0.57523954",
"0.5744861",
"0.57436335",
"0.57403576",
"0.57334656",
"0.5729414",
"0.5728119",
"0.5708288",
"0.5706223",
"0.57050735",
"0.57006556",
"0.5695201",
"0.56925553",
"0.56852955",
"0.5677036",
"0.5676895",
"0.5672606",
"0.56693435",
"0.5662796",
"0.56590444",
"0.5653058",
"0.5648789",
"0.56486166",
"0.5648108",
"0.56392264",
"0.563625",
"0.5633851",
"0.5629868",
"0.562321",
"0.5618469",
"0.5616419",
"0.56156033",
"0.5613358",
"0.56068826",
"0.56055456",
"0.56053126",
"0.5602323",
"0.56015754",
"0.56007475",
"0.559925",
"0.5598762",
"0.5597798",
"0.5595475",
"0.55886966",
"0.5576832",
"0.5571176",
"0.5568475",
"0.556811",
"0.5564932"
] |
0.5864495
|
30
|
Select the output audio peripheral with the given index
|
public void selectMixer(final int index) {
if (currentClip != null) {
if (currentClip.isOpen()) {
throw new IllegalStateException("The player has a music loaded : cannot change the output");
}
close();
}
currentClip = MixersUtilities.getClipByMixerIndex(index);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"static void setIndexSelected(int index) {\n if (index != -1) {\n if (index >= deviceDetails.size()) {\n throw new IllegalArgumentException(String.format(\n \"Index of device exceeds device count. Currently requesting %d, but only have%d\",\n index, deviceDetails.size()));\n }\n BluetoothConnection.setServerMac(deviceDetails.get(index).getMacAddress());\n } else {\n BluetoothConnection.setServerMac(null);\n }\n indexSelected = index;\n }",
"public int getAudioPort();",
"void setValueMixerSound(int value);",
"public void setSelMixer(int d, int index) {\n\tif (index < 0 || index >= mixers[d].size()) {\n\t if (DEBUG) out(\"setSelMixer out of range: index=\"+index);\n\t return;\n\t} else {\n\t mixer[d] = mixers[d].get(index);\n\t}\n }",
"public int getDI(int index) {\t\t\n\t\treturn mIKar07Lib.getDigitalInput(index);\n\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n mAudioManagerEx.setAudioDeviceActive(usb_device, AudioManagerEx.AUDIO_OUTPUT_ACTIVE);\n }",
"@Override\n public void run() {\n chooseUsbAudioDeviceDialog(audio_out);\n }",
"public void setAudioPort(int port);",
"public void select(int index) {\r\n\t\tindirect = true;\r\n\t\tcombo.select(index);\r\n\t\tindirect = false;\r\n\t}",
"private void setDetectedInstrument()\n {\n int detectedInstrument = midiFileCreator.getInitialInstrument();\n int selectedIndex;\n switch (detectedInstrument) {\n case 41:\n selectedIndex = 0;\n break;\n case 7:\n selectedIndex = 1;\n break;\n case 26:\n selectedIndex = 2;\n break;\n case 1:\n selectedIndex = 3;\n break;\n case 74:\n selectedIndex = 4;\n break;\n case 79:\n selectedIndex = 5;\n break;\n default:\n //set piano as the instrument\n selectedIndex = 1;\n }\n }",
"@Override\n\tpublic Advertisement selectAdvertisement(Integer index) {\n\t\treturn adman.getAd(index);\n\t}",
"@Override\n\tpublic Object selectOne2(Object p_idx) {\n\t\t\n\t\tPlayVo vo = session.selectOne(\"play.select_play\",p_idx); \n//\t\tSystem.out.println(vo.getP_idx());\n//\t\tSystem.out.println(vo.getP_rts());\n//\t\tSystem.out.println(vo.getP_rts());\n\t\t\n\t\t\n\t\treturn vo;\n\t}",
"public int /* sound_sample */output() {\n\t\treturn Vo;\n\t}",
"public QnaDto myanwSelect(int idx) {\n\t\treturn dao.myansSelect(idx);\r\n\t}",
"public void setDO(int index, int value) {\n\t\tmIKar07Lib.setDigitalOutput(index, value);\n\t}",
"public MediaVO sample(int idx) {\n\t\tif (idx >= samples.size()) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn samples.get(idx);\n\t}",
"void genTone(){\n for (int i = 0; i < numSamples; ++i) {\n sample[i] = Math.sin(2 * Math.PI * i / (sampleRate/freqOfTone));\n }\n\n // convert to 16 bit pcm sound array\n // assumes the sample buffer is normalised.\n int idx = 0;\n for (final double dVal : sample) {\n // scale to maximum amplitude\n final short val = (short) ((dVal * 32767));\n // in 16 bit wav PCM, first byte is the low order byte\n generatedSnd[idx++] = (byte) (val & 0x00ff);\n generatedSnd[idx++] = (byte) ((val & 0xff00) >>> 8);\n }\n }",
"protected abstract UtteranceProcessor getAudioOutput() throws IOException ;",
"void select(int index) throws InvalidValueException;",
"public void writeRadioDACs() throws IOException\n {\n writeVirtualAddress(0xB8, 0x01);\n try\n {\n do\n {\n Thread.sleep(10L);\n } \n while (readVirtualAddress(0xB9) == 1);\n }\n catch (InterruptedException intx)\n {\n // Do nothing\n }\n }",
"public void playAtIndex(int index){\n if(radioPlayer.isPlaying()) {\n radioPlayer.pause();\n this.isPaused = true;\n infoReady = true;\n //User mean to pause the player\n if (currentStation == index){\n return;\n }\n }\n currentStation = index;\n currentStationChanged = true;\n playCurrent();\n }",
"void genTone() {\n for (int i = 0; i < numSamples; ++i) {\n sample[i] = Math.sin(2 * Math.PI * i / (sampleRate / freqOfTone));\n }\n\n // convert to 16 bit pcm sound array\n // assumes the sample buffer is normalised.\n int idx = 0;\n for (final double dVal : sample) {\n // scale to maximum amplitude\n final short val = (short) ((dVal * 32767));\n // in 16 bit wav PCM, first byte is the low order byte\n generatedSnd[idx++] = (byte) (val & 0x00ff);\n generatedSnd[idx++] = (byte) ((val & 0xff00) >>> 8);\n\n }\n }",
"void genTone() {\n for (int i = 0; i < numSamples; ++i) {\n sample[i] = Math.sin(2 * Math.PI * i / (sampleRate / freqOfTone));\n }\n\n // convert to 16 bit pcm sound array\n // assumes the sample buffer is normalised.\n int idx = 0;\n for (final double dVal : sample) {\n // scale to maximum amplitude\n final short val = (short) ((dVal * 32767));\n // in 16 bit wav PCM, first byte is the low order byte\n generatedSnd[idx++] = (byte) (val & 0x00ff);\n generatedSnd[idx++] = (byte) ((val & 0xff00) >>> 8);\n\n }\n }",
"public void setIndex(int index) {\n nativeSetDCChangeSpeedLevel2Index(index);\n }",
"@Override\n public void soundSourceDegreesUpdate(int selectedItem) {\n \n }",
"public void setSelPort(int d, int index) {\n \tsetSelPort(d, index, true);\n }",
"public void onPickDevice(ConnectDevice device);",
"public void selectBluetoothDevice(String selectedItem) {\n String[] stringParts = selectedItem.split(\"\\n\");\n\n if (stringParts.length == 2) {\n\n // The Bluetooth ID is: stringParts[1]\n\n // Activate the Bluetooth Input/Output steams\n if (activateBluetoothStreams(stringParts[1])) {\n\n // The device was selected successfully. Start the Robot Activity\n startControlRobotActivity();\n\n }\n else{\n Toast.makeText(getApplicationContext(), \"Selected Bluetooth device was not enabled.\",\n Toast.LENGTH_LONG).show();\n }\n\n }\n else\n {\n Toast.makeText(getApplicationContext(), \"There was a problem selecting a Device.\",\n Toast.LENGTH_LONG).show();\n }\n\n\n }",
"private static native long getControllerForGamepadIndex(long pointer, int index);",
"public void selectWeaponFromInventory(int weaponIndex) {\n }",
"private void setIndices() {\r\n\r\n\t\t// Index where dry sample is written\r\n\t writeIndex = 0;\r\n\t\treadIndexBLow = 0;\r\n\t\treadIndexBHigh = 0;\r\n\r\n\t\tif (sweepUp) {\r\n\t\t\t// Sweeping upward, start at max delay\r\n\t\t readIndexALow = AudioConstants.SAMPLEBUFFERSIZE;\r\n\t\t\r\n\t\t}\telse\t{\r\n\t\t\r\n\t\t\t// Sweeping downward, start at min delay\r\n\t\t\tif (numberOfChannels == 1)\r\n\t\t\t\treadIndexALow = delayBufferSize - 2;\r\n\t\t\telse\r\n\t\t\t\treadIndexALow = delayBufferSize - 4;\r\n\t\t}\r\n\t\t// Initialize other read ptr\r\n\t\tif (numberOfChannels == 1)\r\n\t\t\treadIndexAHigh = readIndexALow + 1;\r\n\t\telse\r\n\t\t\treadIndexAHigh = readIndexALow + 2;\r\n\t}",
"private void initAudioIn(){\n ArrayList<String> actived = new ArrayList<String>();\n ArrayList<String> mAudioInputChannels = mAudioManagerEx.getAudioDevices(AudioManagerEx.AUDIO_INPUT_TYPE);\n int i = 0;\n for(i = 0; i < mAudioInputChannels.size(); i++){\n String device = mAudioInputChannels.get(i);\n if(device.contains(\"USB\")){\n actived.add(device);\n break;\n }\n }\n //otherwise use codec by default\n if(i == mAudioInputChannels.size()){\n actived.add(AudioManagerEx.AUDIO_NAME_CODEC);\n }\n mAudioManagerEx.setAudioDeviceActive(actived, AudioManagerEx.AUDIO_INPUT_ACTIVE);\n }",
"public void genTone() {\n\t\tfor (int i = 0; i < numSamples; ++i) {\n\t\t\tsample[i] = -(Math.sin(2 * Math.PI * i / (sampleRate / freqOfTone)));\n\t\t}\n\n\t\t// convert to 16 bit pcm sound array\n\t\t// assumes the sample buffer is normalised.\n\t\tint idx = 0;\n\t\tfor (final double dVal : sample) {\n\t\t\t// scale to maximum amplitude\n\t\t\tfinal short val = (short) ((dVal * 32767));\n\t\t\t// in 16 bit wav PCM, first byte is the low order byte\n\t\t\tgeneratedSnd[idx++] = (byte) (val & 0x00ff);\n\t\t\tgeneratedSnd[idx++] = (byte) ((val & 0xff00) >>> 8);\n\n\t\t}\n\t}",
"PACKET getIndex(int index);",
"org.auvua.utils.protobuffer.AUVprotocol.AUVCommand.Output getOutputs(int index);",
"private native boolean selectSlot0(int slotIndex);",
"private int next(int index) {\n return (index + 2) & mask;\n }",
"public void StartPlayingSound(String _MixerName) {\n for (int cnt = 0; cnt < mixerInfo.length; cnt++) {\r\n\r\n // Mixer currentMixer = AudioSystem.getMixer(mixerInfo[cnt]);\r\n // Because this is for a recording application, we only care about audio INPUT so we just\r\n // care if TargetDataLine is supported.\r\n if (mixerInfo[cnt].getName().equals(_MixerName)) {\r\n System.out.println(\"SoundOutputDeviceControl - found target mixer: \" + _MixerName);\r\n\r\n // This may freeze the UI but oh well, we have to wait for the inner thread to stop from the\r\n // previous selection\r\n stopPlay = true;\r\n while (threadEnd == false) {\r\n try {\r\n sleep(100);\r\n } catch (InterruptedException ex) { \r\n }\r\n }\r\n\r\n Mixer currentMixer = AudioSystem.getMixer(mixerInfo[cnt]);\r\n try {\r\n \r\n //DataLine.Info dataLineInfo = new DataLine.Info(SourceDataLine.class, af);\r\n //sourceDataLine = (SourceDataLine) currentMixer.getLine(dataLineInfo);\r\n sourceDataLine = (SourceDataLine) currentMixer.getLine(sourceDLInfo);\r\n //sourceDataLine.open(af);\r\n sourceDataLine.open(af, Ns2 * 4);\r\n sourceDataLine.start();\r\n playerThread = new Thread(new PlayThread());\r\n playerThread.setPriority(Thread.MAX_PRIORITY); \r\n playerThread.start();\r\n } catch (LineUnavailableException e) {\r\n System.out.println(\"SoundOutputDeviceControl - StartPlayingSoundOnMixer -\" + e);\r\n }\r\n }\r\n }\r\n }",
"void setAudioRoute(String device);",
"@Override\n public void writeOut(Circuit circuit, boolean state, int index) {\n outputPins[index].setState(state);\n for (ChipListener l : listeners) l.outputChanged(Chip.this, index, state);\n }",
"public void printFlightOption(int index);",
"@Override\n\tpublic Object selectOne(Object p_idx) {\n\t\t\n\t\t\n\t\tObject stadium = session.selectOne(\"play.select_stadium_team\",p_idx);\n\t\t\n\t\treturn stadium;\n\t}",
"@Override\n public void onInputBufferAvailable(@NonNull MediaCodec codec, int index) {\n\n synchronized (mAvailableInputs) {\n mAvailableInputs.add(index);\n mAvailableInputs.notifyAll();\n }\n }",
"public void passSelectedCard(int index){\n\t\tSystem.out.println(\"PLAYER SELECTED CARD INDEX \" + index);\n\t\twaitingUser = false;\n\t\tplaySubRound(index);\n\n\t\ttodoThread();\n\t}",
"@Override\n\tpublic SCsVo sselcetOne(int index) throws SQLException {\n\t\treturn sqlSession.selectOne(\"yes.as_selectOne\", index);\n\t}",
"public final int getUShort(int index) {\r\n return bb.getShort(index) & 0xffff;\r\n }",
"public void setPeripheralEventListener(PeripheralHardwareDriverInterface l);",
"void onDeviceSelected(String address);",
"public void enableMic(boolean enable);",
"public abstract short read_ushort();",
"public void setSelectedTelObsComp( int index )\n\t{\n\t\t_avTable.set( ATTR_SELECTED_TEL_OBS_COMP , index ) ;\n\t}",
"private chProcUnit getUnit(Integer index) {\n chProcUnit returnedUnit = new chProcUnit();\n if (currentState == states.INPUT) {\n java.util.ListIterator<chProcUnit> chIter = chProcList.listIterator();\n while (chIter.hasNext()) {\n chProcUnit tempUnit = chIter.next();\n if (tempUnit.chFillOrder == index) {\n returnedUnit = tempUnit;\n break;\n }\n }\n } else if (currentState == states.OUTPUT) {\n java.util.ListIterator<chProcUnit> chIter = chProcList.listIterator();\n while (chIter.hasNext()) {\n chProcUnit tempUnit = chIter.next();\n if (tempUnit.chReleaseOrder == index) {\n returnedUnit = tempUnit;\n break;\n }\n }\n } else {\n JTVProg.logPrint(this, 1, \"ошибка вызова: процессор без состояния\");\n }\n return returnedUnit;\n }",
"public void userFlightChoice(int index);",
"AudioProcessor[] mo25073a();",
"public int getSoundIndex() \n\t{\n\treturn fSoundIndex;\n\t}",
"public void setCurrentPlayer(int index){\n this.currentPlayer=index%4;\n }",
"public void switchSmart(){\n\r\n for (int i = 0; i < item.getDevices().size(); i++) {\r\n write(parseBrightnessCmd(seekBarBrightness.getProgress()), 3, seekBarBrightness.getProgress(), item.getDevices().get(i).getSocket(), item.getDevices().get(i).getBos());\r\n }\r\n\r\n //String CMD_HSV = \"{\\\"id\\\":1,\\\"method\\\":\\\"set_hsv\\\",\\\"params\\\":[0, 0, \\\"smooth\\\", 30]}\\r\\n\";\r\n //write(CMD_HSV, 0, 0);\r\n\r\n for (int i = 0; i < item.getDevices().size(); i++) {\r\n write(parseRGBCmd(msAccessColor(Color.WHITE)), 0, 0, item.getDevices().get(i).getSocket(), item.getDevices().get(i).getBos());\r\n }\r\n\r\n }",
"@Override\n public PlayListComponentInterface getElementAt(int index) {\n return record.getTracks().get(index);\n }",
"public void onReadShortBegin(ICPU cpu, int addr) {\n\t}",
"public void generateTone()\n throws LineUnavailableException {\n if ( clip!=null ) {\n clip.stop();\n clip.close();\n } else {\n clip = AudioSystem.getClip();\n }\n boolean addHarmonic = harmonic.isSelected();\n\n int intSR = ((Integer)sampleRate.getSelectedItem()).intValue();\n int intFPW = framesPerWavelength.getValue();\n\n float sampleRate = (float)intSR;\n\n // oddly, the sound does not loop well for less than\n // around 5 or so, wavelengths\n int wavelengths = 20;\n byte[] buf = new byte[2*intFPW*wavelengths];\n AudioFormat af = new AudioFormat(\n sampleRate,\n 8, // sample size in bits\n 2, // channels\n true, // signed\n false // bigendian\n );\n\n int maxVol = 127;\n for(int i=0; i<intFPW*wavelengths; i++){\n double angle = ((float)(i*2)/((float)intFPW))*(Math.PI);\n buf[i*2]=getByteValue(angle);\n if(addHarmonic) {\n buf[(i*2)+1]=getByteValue(2*angle);\n } else {\n buf[(i*2)+1] = buf[i*2];\n }\n }\n\n try {\n byte[] b = buf;\n AudioInputStream ais = new AudioInputStream(\n new ByteArrayInputStream(b),\n af,\n buf.length/2 );\n\n clip.open( ais );\n } catch(Exception e) {\n e.printStackTrace();\n }\n }",
"public DmaChannel getChannelAt(int i);",
"public void testMixer_AverageOutputValue() throws InterruptedException {\n \tdouble tolerance = 0.01;\n Integer NbPortTested = 3;\n Mixer mixer = new Mixer(NbPortTested);\n synthesisEngine.add(mixer);\n \n // replicator VCO to mixer\n mixer.getInput(0).set(1); // amplitude = 1\n mixer.getInput(1).set(1); // amplitude = 1\n mixer.getInput(2).set(1); // amplitude = 1\n\n synthesisEngine.start();\n mixer.start();\n\t\t\n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 3, mixer.getAverageOutputValue().get(), tolerance);\n\n mixer.setAttenuation(0, -6); // -6db => amplitude/2\n mixer.setAttenuation(1, 0);\n mixer.setAttenuation(2, 0);\n \n synthesisEngine.start();\n mixer.start();\n\t\t\n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 2.5, mixer.getAverageOutputValue().get(), tolerance);\n }",
"public void play (int index) {\n try {\n sendHeader (PLAYER_MSGTYPE_CMD, PLAYER_SOUND_CMD_IDX, 4);\n XdrBufferEncodingStream xdr = new XdrBufferEncodingStream (4);\n xdr.beginEncoding (null, 0);\n xdr.xdrEncodeInt (index);\n xdr.endEncoding ();\n os.write (xdr.getXdrData (), 0, xdr.getXdrLength ());\n xdr.close ();\n os.flush ();\n } catch (IOException e) {\n throw new PlayerException\n (\"[Sound] : Couldn't send play command request: \" +\n e.toString (), e);\n } catch (OncRpcException e) {\n throw new PlayerException\n (\"[Sound] : Couldn't XDR-encode play command request: \" +\n e.toString (), e);\n }\n }",
"public void emitSample(double d) {\n int val = 0;\n if (d > 1.0) d = 1.0;\n if (d < 0.0) d = 0.0;\n d -= 0.5;\n\n val = (int) (d * 65536);\n if (val > 32767) val = 32767;\n if (val < -32768) val = -32768; \n\n audioBuffer[buffpos] = (byte) (val & 255);\n audioBuffer[buffpos + 1] = (byte) ((val >> 8) & 255);\n buffpos += 2;\n if (buffpos + 1 >= BATCH_SIZE) {\n sdl.write(audioBuffer, 0, buffpos);\n buffpos = 0;\n }\n }",
"public void select(String regex, int index) {\n inputter.select(regex, index);\n }",
"private void actionSwitchSelect()\r\n\t{\r\n\t\tif (FormMainMouse.isSampleSelectOn)\r\n\t\t{\r\n\t\t\thelperSwitchSelectOff();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\thelperSwitchSelectOn();\r\n\r\n\t\t\t//---- If we can select sample, we can not move it\r\n\t\t\thelperSwitchMoveOff();\r\n\t\t}\r\n\t}",
"public FtcAnalogOutTone(HardwareMap hardwareMap, String instanceName, Waveform defWaveform)\n {\n super(instanceName, defWaveform);\n\n if (debugEnabled)\n {\n dbgTrace = new TrcDbgTrace(moduleName + \".\" + instanceName, tracingEnabled, traceLevel, msgLevel);\n }\n\n this.instanceName = instanceName;\n analogOut = hardwareMap.analogOutput.get(instanceName);\n }",
"public void writeSamples( short[] samples, int offset, int numSamples );",
"public byte getAttributePaletteRegister(int index)\n {\n return videocard.attributeController.paletteRegister[index];\n }",
"public void setSelection(int molIndex) {}",
"public void speak(String outputSpeak) \n {\n speaker.speaker(outputSpeak);\n }",
"speech.multilang.Params.OutputControllerParams.Type getType();",
"public void selectIndex(int idx) {\n getElement().selectIndex(idx);\n }",
"private void generateAudio() {\n soundHandler.generateTone();\n }",
"public void inputNext() {\n ++this.currentIndex;\n this.currentUnit = getUnit(this.currentIndex);\n this.currentChName = this.currentUnit.chName;\n }",
"public int getAudioDscp();",
"static int OP_OUT(OPL_SLOT slot, int env, int con) {\n\n return slot.wavetable[(int) (((slot.Cnt + con) / (0x1000000 / SIN_ENT)) & (SIN_ENT - 1)) + slot.wt_offset].read(env);\n }",
"public abstract void updateMixer();",
"public Card getCard(int index)\n\t{\n\t\treturn hand[index];\n\t}",
"public Peripheral getHardwareDriverFromSoftwareDriver();",
"private void setOutputs(\n int index, com.dogecoin.protocols.payments.Protos.Output value) {\n value.getClass();\n ensureOutputsIsMutable();\n outputs_.set(index, value);\n }",
"public String getPlaybackDevice();",
"void printIndexData(Station station, AirQualityIndex index);",
"public void testMixer_MuteMany() throws InterruptedException { \n \tdouble tolerance = 0.01;\n Integer NbPortTested = 3;\n Mixer mixer = new Mixer(NbPortTested);\n synthesisEngine.add(mixer);\n \n // replicator VCO to mixer\n mixer.getInput(0).set(1);\n mixer.getInput(1).set(1);\n mixer.getInput(2).set(1);\n \n mixer.setMute(0, false);\n mixer.setMute(1, true);\n mixer.setMute(2, true);\n \n synthesisEngine.start();\n mixer.start();\n\t\t\n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 1.0, mixer.getOutput().get(), tolerance);\n\n mixer.getInput(0).set(0.2);\n mixer.getInput(1).set(0.7);\n mixer.getInput(2).set(0.9);\n\n mixer.setMute(0, true);\n mixer.setMute(1, false);\n mixer.setMute(2, true);\n \n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 0.7, mixer.getOutput().get(), tolerance);\n }",
"String getOscTarget();",
"public void selectCt(Integer index) {\n\t\tlog.info(\"-----selectCt()-----\");\n\t\tlog.info(String.format(\"-----selected: %s\", selected.getCtTraKho().getCttrakhoThutu()));\n\t\t//int index = selected.getCtXuatKho().getCtxuatkhoThutu().intValue() - 1;\n\t\tTonKho tk = selected.getTonKho();\n\t\tCtTraKho ctx = selected.getCtTraKho();\n\t\tupdateItem = index;\n\t\ttonkhoMa = tk.getTonkhoMa().toString();\n\t\tlog.info(\"-----ton kho: \" + tonkho);\n\t\t\n\t\t//DecimalFormat df = new DecimalFormat(\"###.##\");\n\t\ttonkho = tk.getTonkhoTon();\n\t\tdmtMa = ctx.getDmthuocMaso().getDmthuocMa();\n\t\txuat = ctx.getCttrakhoSoluong();\n\t\t\n\t}",
"public byte[] genTone(){ \n //Ramp time is the denominator of the total sample.\n //This really should be a ration of samples per cycle.\n //do this math to get a smooth sound\n int rampTime = 2000;\n //Fill the sample array.\n for (int i = 0; i < numSamples; ++i) {\n \t//Here is the brains of the operation. Don't axe me what it does\n \t//But it pretty much unrolls a sin curve into a wave\n sample[i] = Math.sin(freqOfTone * 2 * Math.PI * i / (sampleRate));\n }\n\n // convert to 16 bit pcm sound array\n // assumes the sample buffer is normalized.\n int PCMindex = 0;\n int i;\n //The ramp. It is how many samples will be ramped up.\n int ramp = numSamples/rampTime; \n\n /**\n * Ramp up the tone to avoid clicks\n */\n for (i = 0; i< ramp; ++i) { \n \t//Grab the values from the sample array for each i\n double dVal = sample[i];\n //Ramp down the value. \n //Convert a -1.0 - 1.0 double into a short. 32767 should be contant for max 16 bit signed int value \n final short val = (short) ((dVal * 32767 * i/ramp));\n //Put the value into the PCM byte array\n //Break the short into a byte using a bit mask. \n //First bit mask adds the second byte. Second bit mask adds the second byte.\n PcmArray[PCMindex++] = (byte) (val & 0x00ff);\n PcmArray[PCMindex++] = (byte) ((val & 0xff00) >>> 8);\n }\n\n for (i = ramp; i< numSamples - ramp; ++i) { \n \t//Grab the values from the sample array for each i\n double dVal = sample[i];\n //Convert a -1.0 - 1.0 double into a short. 32767 should be contant for max 16 bit signed int value\n final short val = (short) ((dVal * 32767));\n //Put the value into the PCM byte array\n //Break the short into a byte using a bit mask. \n //First bit mask adds the second byte. Second bit mask adds the second byte.\n PcmArray[PCMindex++] = (byte) (val & 0x00ff);\n PcmArray[PCMindex++] = (byte) ((val & 0xff00) >>> 8);\n }\n\n for (i = (int) (numSamples - ramp); i< numSamples; ++i) {\n \t//Grab the values from the sample array for each i\n double dVal = sample[i];\n //Convert a -1.0 - 1.0 double into a short. 32767 should be contant for max 16 bit signed int value \n //Ramp down the values\n final short val = (short) ((dVal * 32767 * (numSamples-i)/ramp ));\n //Put the value into the PCM byte array\n //Break the short into a byte using a bit mask. \n //First bit mask adds the second byte. Second bit mask adds the second byte.\n PcmArray[PCMindex++] = (byte) (val & 0x00ff);\n PcmArray[PCMindex++] = (byte) ((val & 0xff00) >>> 8);\n }\n return PcmArray;\n }",
"public void setRadioDAC(int ant, int band, int val) throws IOException\n {\n logger.debug(\"Setting DAC (\"+ant+\",\"+band+\") to \"+val);\n int ich = (ant << 2) | band;\n int cmd = dacMap[ich];\n writeVirtualAddress(cmd+1, val & 0xff);\n writeVirtualAddress(cmd, (val >> 8) & 0xff);\n }",
"public abstract int getSourceIndex(int index);",
"int clientSourceStationID(final int index);",
"public AnalogInputSim(int channel) {\n m_index = channel;\n }",
"protected abstract void nextWave();",
"com.dogecoin.protocols.payments.Protos.Output getOutputs(int index);",
"public void send0(){\n digitalWrite(data0, LOW);\n delayMicroseconds(34);\n digitalWrite(data0, HIGH);\n}",
"private void playSound(int index, float pitch) {\n try {\n metaObject.playSound(index, pitch, 1f);\n } catch (NullPointerException | IndexOutOfBoundsException ex) {\n System.out.println(\"Could not play sound with index \" + index + \" for \" + this.toString() + \".\");\n }\n }",
"private void select()\n\t{\n\t\tSoundPlayer.playClip(\"select.wav\");\n\t if(currentChoice == 0)\n\t\t{\n\t\t\tsuper.isFadingOut = true;\n\t\t\tSoundPlayer.animVolume(-40.0F);\n\t\t}\n\t\tif(currentChoice == 1)\n\t\t{\n\t\t\tbottomFadeOut = true;\n\t\t\t//gsm.setState(GameStateManager.CONTROLSTATE);\n\t\t}\n\t\tif(currentChoice == 2)\n\t\t{\n\t\t\tbottomFadeOut = true;\n\t\t\t//gsm.setState(GameStateManager.CREDITSTATE);\n\t\t}\n\t\tif(currentChoice == 3)\n\t\t{\n\t\t\tnew Timer().schedule(new TimerTask()\n\t\t\t{\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tSystem.exit(0);\t\t\n\t\t\t\t}\n\t\t\t}, 500);\n\t\t}\n\t}",
"@Override\n public int targetDevice() {\n return 0;\n }",
"public void setPlaybackDevice(String devid);",
"public void selectSurvey(int index) {\n selectedSurvey = activeTargetedSurveys.get(index);\n }",
"public String get_picker(int index) {\n String picker = null;\n try {\n Object obj = JsonUtil.getInstance().getParser().parse(this.text);\n JSONObject jsonObject = (JSONObject) obj;\n JSONArray array = (JSONArray) jsonObject.get(\"skin\");\n JSONObject subObject = (JSONObject) array.get(index);\n picker = (String) subObject.get(\"picker\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return picker;\n }"
] |
[
"0.57744426",
"0.5768538",
"0.56284356",
"0.5617473",
"0.55535966",
"0.552703",
"0.5502933",
"0.54856616",
"0.54541373",
"0.54008293",
"0.53864455",
"0.5342969",
"0.53394485",
"0.5320865",
"0.5319331",
"0.5308164",
"0.51860434",
"0.5162431",
"0.5092765",
"0.5081189",
"0.5079922",
"0.50329417",
"0.50329417",
"0.50325465",
"0.50240743",
"0.4994096",
"0.4988898",
"0.49780616",
"0.49606627",
"0.49520844",
"0.49453768",
"0.49399027",
"0.4932875",
"0.49309665",
"0.49227223",
"0.4918705",
"0.49176976",
"0.48928815",
"0.4884481",
"0.48662165",
"0.48656875",
"0.4856956",
"0.48566228",
"0.4828796",
"0.48217568",
"0.48028934",
"0.48018605",
"0.4800916",
"0.47702295",
"0.47551104",
"0.47547963",
"0.47544295",
"0.47407514",
"0.47398004",
"0.47378418",
"0.47375724",
"0.47211355",
"0.47171363",
"0.47164565",
"0.4713855",
"0.4705837",
"0.47057813",
"0.4703736",
"0.46991816",
"0.46991238",
"0.4666567",
"0.46648008",
"0.46603364",
"0.46597725",
"0.46563506",
"0.4652295",
"0.46376348",
"0.46365958",
"0.46331626",
"0.4630733",
"0.46189985",
"0.4615614",
"0.46129847",
"0.46059343",
"0.46031225",
"0.45993516",
"0.45935705",
"0.45931825",
"0.45885625",
"0.45861548",
"0.4581658",
"0.4580188",
"0.4567955",
"0.45678616",
"0.45676577",
"0.45651203",
"0.4561982",
"0.4560487",
"0.4556907",
"0.4555719",
"0.4553721",
"0.45480776",
"0.45455006",
"0.4544756",
"0.45421958"
] |
0.64237094
|
0
|
Call the given runnable when the player reach the end of the current music and the music is not repeating
|
public int addOnFinishEvent(final Runnable runnable) {
if (runnable == null)
throw new IllegalArgumentException("Given paramter is null");
onFinishRunnables.add(runnable);
return onFinishRunnables.indexOf(runnable);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void run() {\n MediaSingleton.INSTANCE.ensureSound();\n\n long next = AlarmUtil.millisTillNextInterval(AlarmUtil.Interval.SECOND);\n handler.postDelayed(soundCheck, next);\n }",
"public void run() {\n if (currentTimer <= TIMEOUT_VALUE) {\n currentTimer++; // Increments the timer value.\n readySongTimerHandler.postDelayed(this, 1000); // Thread is run again in 1000 ms.\n }\n\n // Displays an timeout error message and stops the ready song timer thread.\n else {\n SSToast.toastyPopUp(\"The track could not be played due to a time-out error.\", getApplicationContext());\n pauseTrack(true); // Stops attempted playback of track.\n stopSongPrepare(true); // Signals the SSPlayerFragment to stop song preparation conditions.\n currentTimer = 0; // Resets the current timer value.\n readySongTimerHandler.removeCallbacks(this);\n }\n }",
"@Override\n public void run() {\n // TODO Auto-generated method stub\n running = true;\n AudioFile song = musicFiles.get(currentSongIndex);\n song.play();\n while(running){\n if(!song.isPlaying()){\n currentSongIndex++;\n if(currentSongIndex >= musicFiles.size()){\n currentSongIndex = 0;\n }\n song = musicFiles.get(currentSongIndex);\n song.play();\n }\n try{\n Thread.sleep(1);\n }\n catch (InterruptedException e){\n e.printStackTrace();\n } \n }\n }",
"@Override\n\tpublic void run() {\n\t\twhile(isRun){\n\t\t\ttry {\n\t\t\t\tThread.sleep(200);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif(null != player){\n\t\t\t\tint position = player.getCurrentPosition();\n\t\t\t\tint total = player.getDuration();\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.putExtra(\"position\", position);\n\t\t\t\tintent.putExtra(\"total\", total);\n\t\t\t\tsendBroadcast(intent);\n\t\t\t}\n\t\t\tif(null != player){\n\t\t\t\tif(player.isPlaying()){\n\t\t\t\t\tplaying = true;\n\t\t\t\t}else{\n\t\t\t\t\tplaying = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void playOnce() {\n mStopAtLoopEnd = true;\n mStartTimeMillis = 0;\n mCurrentLoopNumber = 0;\n cancelCallback();\n postCallback();\n }",
"@Override\n public void playEnd() {\n }",
"@Override\n public void onSeekComplete() {\n if (info.playing) {\n player.start();\n player.setOnSeekCompletionListener(null);\n } else {\n Log.w(TAG, \"Audio stopping while waiting for loop to re-start\");\n }\n }",
"@Override\n public void onCompletion(MediaPlayer mediaPlayer) {\n stopMusic();\n }",
"public void loop() {\n\t\tmusic.loop();\n\t\tsyncPosition();\n\t}",
"@Override\n public void onCompletion(MediaPlayer mp) {\n mp.reset();\n nextMusic();\n\n }",
"@Override\n public void run() {\n if (Build.VERSION.SDK_INT < 28) {\n while(isAlarmOn) {\n mRingtone.play();\n }\n }\n\n else {\n mRingtone.setLooping(true);\n mRingtone.play();\n }\n }",
"public void gameOver(){\n gameOverMusic.loop(pitch, volume);\n }",
"public void onCompletion(MediaPlayer mp) {\n mHandler.sendEmptyMessage(TRACK_ENDED);\n }",
"@Override\r\n\tpublic void endOfSubItems(MediaPlayer mediaPlayer)\r\n\t{\n\r\n\t}",
"@Override\r\n\t\t\t\tpublic void onCompletion (MediaPlayer theMediaPlayer) \r\n\t\t\t\t{\n\t\t\t\t\t// 11/03/2017 ECU check if any looping is needed\r\n\t\t\t\t\t// -------------------------------------------------------------\r\n\t\t\t\t\tif (loopCounter <= 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\t// 11/03/2017 ECU everything done so just check on the global \r\n\t\t\t\t\t\t// media player\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\t// 10/03/2017 ECU check if the global media player needs to be\r\n\t\t\t\t\t\t// 'resumed'\r\n\t\t\t\t\t\t// 15/03/2019 ECU whether there is a 'paused' media or not\r\n\t\t\t\t\t\t// it is necessary to release the resources\r\n\t\t\t\t\t\t// used in this class\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\tif (mediaPlayerPaused)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// -----------------------------------------------------\r\n\t\t\t\t\t\t\t// 10/03/2017 ECU the global media player needs to be resumed\r\n\t\t\t\t\t\t\t// -----------------------------------------------------\r\n\t\t\t\t\t\t\tMusicPlayer.playOrPause (true);\r\n\t\t\t\t\t\t\t// -----------------------------------------------------\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\t// 04/09/2017 ECU make sure the resources are released\r\n\t\t\t\t\t\t// 05/09/2017 ECU changed to use the local method\r\n\t\t\t\t\t\t// 15/03/2019 ECU changed to always release resources\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\tstop ();\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{\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\t// 11/03/2017 ECU check about loops\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\tmediaPlayer.seekTo (theLoopPosition);\r\n\t\t\t\t\t\tmediaPlayer.start ();\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\t// 11/03/2017 ECU decrement the loop counter\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\tloopCounter--;\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// -------------------------------------------------------------\r\n\t\t\t\t}",
"@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}",
"@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tmProgressBar.setProgress(0);\n\t\t\t\tif(SINGLE_LOOPS) {\n\t\t\t\t\tplayfunction(path);\n\t\t\t\t} else {\n\t\t\t\t\tList<MusicBean> datas = mAdapter.getData();\n\t\t\t\t\tif(datas.size() > 0) {\n\t\t\t\t\t\tint selectPos = mAdapter.getSelectItemPosi();\n\t\t\t\t\t\tif( ++selectPos >= datas.size())\n\t\t\t\t\t\t\tselectPos = 0;\n\t\t\t\t\t\tmAdapter.setSelectItemPosi(selectPos);\n\t\t\t\t\t\tmAdapter.notifyDataSetChanged();\n\t\t\t\t\t\tpath = \"\";\n\t\t\t\t\t\tplayfunction(path);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"public void keepLooping() {\n\t\tif(!clip.isActive()) {\n\t\t\tstartSound();\n\t\t}\n\t}",
"@Override\n public void onCompletion(MediaPlayer mp) {\n setViewOnFinish();\n log(\"Playing completed\");\n }",
"@Override\n public void onCompletion(MediaPlayer mp) {\n if(isRepeat){\n // repeat is on play same song again\n playSong(currentSongIndex);\n } else if(isShuffle){\n // shuffle is on - play a random song\n Random rand = new Random();\n currentSongIndex = rand.nextInt((songsList.size() - 1) - 0 + 1) + 0;\n playSong(currentSongIndex);\n } else{\n // no repeat or shuffle ON - play next song\n if(currentSongIndex < (songsList.size() - 1)){\n playSong(currentSongIndex + 1);\n currentSongIndex = currentSongIndex + 1;\n }else{\n // play first song\n playSong(0);\n currentSongIndex = 0;\n }\n }\n\n }",
"public static void playerRun()\n {\n runSound.playLooped();\n }",
"public static void next() {\r\n if (nextMusic_ == INVALID_NUMBER) {\r\n return;\r\n }\r\n currentMusic_ = nextMusic_;\r\n nextMusic_ = INVALID_NUMBER;\r\n MediaPlayer p = players_.get(currentMusic_);\r\n if (p != null) {\r\n if (!p.isPlaying()) {\r\n p.setLooping(true);\r\n p.setOnCompletionListener(null);\r\n p.start();\r\n }\r\n }\r\n }",
"@Override\n public void playStop() {\n }",
"public void run() {\r\n\t\tboolean doorgaan = true;\r\n\t\twhile (doorgaan) {\r\n\t\t\tplay();\r\n\t\t\tdoorgaan = readBoolean(\"\\n> Play another time? (y/n)?\", \"y\", \"n\");\r\n\t\t}\r\n\t}",
"@Override\n protected Void doInBackground(Void... ignore)\n {\n while (!isCancelled())\n {\n SystemClock.sleep(100);\n long totalPlayDuration = mPrefCropTime * 1000;\n long totalDuration = totalPlayDuration + mPrefFadeOutTime * 1000;\n long currentDuration;\n //boolean wait = false;\n\n if (mPlayer.isPlaying())\n {\n mPauseCnt = 0;\n currentDuration = mPlayer.getCurrentPosition();\n\n if (currentDuration >= totalPlayDuration) // TODO!!\n {\n if(!mPaused)\n {\n // wait for x seconds\n pause(mPrefFadeOutTime);\n waitFor(mPrefPauseTime);\n }\n\n //publishProgress(0L, totalDuration, currentDuration);\n //SystemClock.sleep(mPrefPauseTime * 1000);\n //nextSong = true;\n }\n\n publishProgress(totalDuration, currentDuration);\n }\n }\n return null;\n }",
"@Override\n public void run() {\n if(musicEnabled) {\n playSoundtrack();\n while (running) {\n if(!stack.isEmpty()) {\n Sound sound = stack.pop();\n sound.play(sound.loadInputStream());\n }\n }\n }\n }",
"@Override\n public void run() {\n timer2.cancel();\n if(alarmcount==0)\n {\n setAlarm.setVisible(false);\n stopAlarm.setVisible(true);\n \n MC.Stop();\n MC.Play(songalarm);\n play_button.setVisible(true);\n pause_button.setVisible(false);\n }\n timeRemaining.setText(\"RINGG!!\");\n //stopAlarm.setVisible(true);\n }",
"@Override\n public void run() {\n if (mPlayer != null) {\n if (!mPlayer.isPlaying())\n mPlayer.play();\n }\n }",
"public void run() {\n if ((AudioPlayerService.mediaPlayer != null) && AudioPlayerService.prepared){\r\n int currentSeconds = AudioPlayerService.mediaPlayer.getCurrentPosition() / 1000;\r\n\r\n //set the bar's max duration\r\n if (songProgressBar.getMax() != AudioPlayerService.mediaPlayer.getDuration() / 1000){\r\n songProgressBar.setMax(AudioPlayerService.mediaPlayer.getDuration() / 1000);\r\n }\r\n\r\n //if the song has started and is playing\r\n //set the current time and distance along the bar\r\n //then update the bad again\r\n if (currentSeconds >= 0){\r\n if (AudioPlayerService.mediaPlayer.isPlaying()){\r\n String currentDuration = String.format(Locale.US, \"%d:%02d\", currentSeconds / 60, currentSeconds % 60);\r\n songCurrentDurationLabel.setText(currentDuration);\r\n songProgressBar.setProgress(currentSeconds);\r\n mHandler.postDelayed(this, 1000);\r\n }\r\n }\r\n }\r\n }",
"@Override\n public void run() {\n timer2.cancel();\n if(alarmcount==0)\n {\n setAlarm.setVisible(false);\n stopAlarm.setVisible(true);\n\n MC.Stop();\n MC.Play(songalarm);\n play_button.setVisible(true);\n pause_button.setVisible(false);\n }\n timeRemaining.setText(\"RINGG!!\");\n //stopAlarm.setVisible(true);\n }",
"@Override\n\tpublic void nowPlaying() {\n\t}",
"@Override\n\t\tpublic void onPlaying() {\n\t\t\tif (max_length != 0){\n\t\t\t\tnew CountDownTimer(max_length, 1000) {\n\n\t\t\t\t @Override\n\t\t\t\t\tpublic void onTick(long millisUntilFinished) {\n\t\t\t\t \n\t\t\t\t }\n\t\t\n\t\t\t\t @Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t\tbatteryAsync.cancel(false);\n\t\t\t\t\t\t// We give back the results as a String\n\t\t\t\t\t\tJSONObject temp = new JSONObject(batteryLog);\n\t\t\t\t\t\tString batteryResults = temp.toString();\n\t\t\t\t\t\tIntent returnIntent = new Intent();\n\t\t\t\t\t\treturnIntent.putExtra(\"batteryLog\", batteryResults);\n\t\t\t\t\t\tYoutubePlayerActivity.this.setResult(RESULT_OK,\n\t\t\t\t\t\t\t\treturnIntent);// tells previous activity the\n\t\t\t\t\t\t\t\t\t\t\t\t// test was completed correctly\n\t\t\t\t\t\tContext context = getApplicationContext();\n\t\t\t\t\t\tCharSequence text = \"Max video length reached\";\n\t\t\t\t\t\tint duration = Toast.LENGTH_LONG;\n\t\t\t\t\t\tToast.makeText(context, text, duration).show();\n\t\t\t\t\t\tfinish();\n\t\t\t\t }\n\t\t\t\t}.start();\n\t\t\t}\n\t\t}",
"@Override\n public void onPause() {\n justAfterPause = true;\n\n if (!soundAlreadyStopped) {\n SoundManager.onPause(instantMusicPause);\n soundAlreadyStopped = true;\n }\n\n instantMusicPause = true;\n super.onPause();\n\n }",
"@Override\n public void onFinish() {\n timerActive=false;\n\n //play sound on finish\n //instead of MainActivity.this, we can also use getApplicationContext()\n MediaPlayer mPlayer = MediaPlayer.create(MainActivity.this,R.raw.airhorn);\n mPlayer.start();\n bview.setText(\"GO\");\n }",
"void stopMusic();",
"@Override\r\n\tpublic void finished(MediaPlayer mediaPlayer)\r\n\t{\n\r\n\t}",
"@Override\n protected void onStop() {\n super.onStop();\n stopMusic();\n }",
"public void onTick(long millisUntilFinished) {\n\n t1.speak(String.valueOf(millisUntilFinished/1000),TextToSpeech.QUEUE_ADD, null);\n while(t1.isSpeaking());\n }",
"@Override\n public void run() {\n if(mProgressBar.getProgress() < maxTime) {\n mProgressBar.incrementProgressBy(1);\n if(mProgressListener != null){\n mProgressListener.progress(mProgressBar.getProgress());\n }\n mHandler.postDelayed(timeCount, 1000);\n }else{\n if(mProgressListener != null){\n mProgressListener.finish();\n }\n mHandler.removeCallbacks(timeCount);\n// Log.i(\"slack\",\"timeCount finish...\");\n }\n\n }",
"@Override\r\n\t\tpublic void run() {\n\t\t\tsuper.run();\r\n\t\t\twhile(bPlayAudioQueue){\r\n\t\t\t\tplayFromAudioQueue();\r\n\t\t\t}\r\n\t\t}",
"public void finishSong() {\n mp.finish();\n trackPlaying = false;\n }",
"public void onTick(long millisUntilFinished) {\n\n t1.speak(String.valueOf(millisUntilFinished/1000),TextToSpeech.QUEUE_ADD, null);\n while(t1.isSpeaking());\n }",
"@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tLog.d(C.LOG_TAG, \"Audio Play Complete,\" + getTime());\n\t\t\t\tmp.seekTo(0); // roll back to the begining\n\t\t\t\tmRecordTimer.sendMessageDelayed(Message.obtain(null, MESSAGE_PLAY_IS_STOPPED), TIME_TO_WAIT_STOP_RECORD);\n\t\t\t}",
"private void stop(){ player.stop();}",
"public void loop(){\n\t\t\n\t\tclip.loop(Clip.LOOP_CONTINUOUSLY);\n\t\tplay();\n\t}",
"public void game(){\n gameMusic.loop(pitch, volume);\n }",
"public synchronized void pause(){\r\n if(currentLoop0) backgroundMusicLoop0.pause();\r\n else backgroundMusicLoop1.pause();\r\n }",
"public void run() {\n \tif (playerHasPlayed) {\n \t\tmyHandler.removeCallbacksAndMessages(null);\n \t\tmyProgressBar.setProgress(0);\n \t} else {\n myProgressBar.setProgress(myProgressBar.getProgress()-CLICK_TIME);\n \t}\n \t//If time runs out, switch turns, reset progress bar, and start player turn\n \tif (myProgressBar.getProgress() == 0) {\n \t\tredTurn = !redTurn;\n \t\tmyProgressBar.setProgress(myProgressBar.getMax());\n \t\tstartPlayer();\n \t\t\n \t} else {\n \t\tmyHandler.postDelayed(myProgresser,CLICK_TIME);\n \t}\n \n }",
"void idleStoryCountdown() {\n\n idleSaveStoryToArchiveHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n\n// Log.i(\"Annoying Handler\", \"Ach\");\n// commentaryInstruction.setInputHandler(idleSaveStoryToArchiveHandler);\n// commentaryInstruction.onPlay(Uri.parse(\"android.resource://\" + getPackageName() + \"/\" + R.raw.recorddone1), true, ArchiveMainMenu.class, \"RecordStory\");\n }\n }, 120000);\n }",
"@Override\n public void onSeekComplete(MediaPlayer mp) {\n }",
"@Override\n public void onSeekComplete(MediaPlayer mp) {\n }",
"@Override\n\t\tpublic void run() {\n\t\t\twhile (!endFlag) {\n\t\t\t\tlong endTime = System.currentTimeMillis();\n\t\t\t\tif (endTime - touchStartTime > 6000) {\n\t\t\t\t\tMessage msg = handler.obtainMessage();\n\t\t\t\t\tmsg.what = 0;\n\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void onTick(long millisUntilFinished) {\n\n t1.speak(String.valueOf(millisUntilFinished/1000),TextToSpeech.QUEUE_ADD, null);\n while(t1.isSpeaking());\n }",
"public void play() { player.resume();}",
"public void onTick(long millisUntilFinished) {\n\n t1.speak(String.valueOf(millisUntilFinished/1000),TextToSpeech.QUEUE_ADD, null);\n while(t1.isSpeaking());\n }",
"@Override\n public void onSeekComplete(MediaPlayer player) {\n \n }",
"private void startrun() {\n mHandler.postDelayed(mPollTask, POLL_INTERVAL);\n\t}",
"public void onTick(long millisUntilFinished) {\n\n t1.speak(String.valueOf(millisUntilFinished/1000),TextToSpeech.QUEUE_ADD, null);\n while(t1.isSpeaking());\n }",
"@Override\n public void onTick(long millisUntilFinished) {\n if (play) {\n\n\n\n\n\n czasomierz.setProgress((int)millisUntilFinished/1000);\n\n czas.setText((int)millisUntilFinished/1000 + \" s\");\n\n }\n\n }",
"@Override\n\tpublic void OnGameStart() {\n\t\tsuper.OnGameStart();\n\t\tMusicManage.setLoopingMusic(tumMusic, true);\n\t\tMusicManage.playMusic(tumMusic);\n\t}",
"private void runTimer() {\n\n // Handler\n final Handler handler = new Handler();\n\n handler.post(new Runnable() {\n @Override\n public void run() {\n\n if (playingTimeRunning) {\n playingSecs++;\n }\n\n handler.postDelayed(this, 1000);\n }\n });\n\n }",
"public boolean isLooping(StarObjectClass self){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn false;\r\n \t\treturn mediaplayer.isLooping();\r\n \t}",
"public static void playerWalk()\n {\n walkSound.playLooped();\n }",
"public void stop() {\n try {\n mIsIdle = true;\n mIsLooping = false;\n if (mCurPlayer != null) \n {\n mCurPlayer.stop(); \n Thread.sleep(100);\n// mCurPlayer.setMediaTime(0);\n mIsPlaying = false;\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void continueSound() {\n\t\tclip.start();\n\t}",
"@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n//\t\tgv.f = false;\t//如果没有这句,即使退出,run()函数也不停止运行,既游戏界面退出,到后台后仍在运行着。\r\n\t\tMusic.stop();\r\n\t}",
"@Override\n public void run() {\n flag = true;\n // The Runnable is posted to run again here:\n handler.postDelayed(this, interval);\n }",
"@Override\n public void onCompletion(MediaPlayer mp) {\n mp.release();\n if (!gameOver && !backLayoutVisible) { // Handling the scenario in which user pressed back button while start whistle\n startCountdown(gameDuration, tickTime);\n setFormula();\n vsOverlayView.setClickable(false);\n mainGameView.setClickable(true);\n } else {\n //Countdown stopped because of stopped button\n countDownCouldNotBegin = true;\n }\n }",
"public void update() {\n\t\tMusicTicker.MusicType var1 = this.mc.getAmbientMusicType();\n\t\t\n\t\tif (this.currentMusic != null) {\n\t\t\tif (!var1.getMusicLocation().equals(this.currentMusic.getSoundLocation())) {\n\t\t\t\tthis.mc.getSoundHandler().stopSound(this.currentMusic);\n\t\t\t\tthis.timeUntilNextMusic = MathHelper.getRandomIntegerInRange(this.rand, 0, var1.getMinDelay() / 2);\n\t\t\t}\n\t\t\t\n\t\t\tif (!this.mc.getSoundHandler().isSoundPlaying(this.currentMusic)) {\n\t\t\t\tthis.currentMusic = null;\n\t\t\t\tthis.timeUntilNextMusic = Math.min(MathHelper.getRandomIntegerInRange(this.rand, var1.getMinDelay(), var1.getMaxDelay()), this.timeUntilNextMusic);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (this.currentMusic == null && this.timeUntilNextMusic-- <= 0) {\n\t\t\tthis.currentMusic = PositionedSoundRecord.createPositionedSoundRecord(var1.getMusicLocation());\n\t\t\tthis.mc.getSoundHandler().playSound(this.currentMusic);\n\t\t\tthis.timeUntilNextMusic = Integer.MAX_VALUE;\n\t\t}\n\t}",
"public void goToEnd() {\n\t\tcurrentClip.stop();\n\t\tsetPosition(currentClip.getMicrosecondLength());\n\t\tisPlaying = false;\n\t}",
"public abstract void onTick(long millisUntilFinished);",
"default void onVideoRepeat() {\n }",
"public void onRepeat() {\n\t\t// TODO Auto-generated method stub\n\t\tLastWholeDelta = 0;\n\t}",
"@Override\n public void onFinish() {\n odliczanie.setVisibility(View.INVISIBLE);\n odliczanie.clearAnimation();\n calagra.setVisibility(View.VISIBLE);\n countDownTimer2.cancel();\n // Toast.makeText(getApplicationContext(),\"odlicza sie\",Toast.LENGTH_LONG).show();\n try {\n Play();\n } catch (IOException e) {\n Toast.makeText(getApplicationContext(), \"Były problemy z plikiem\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n\t\t\tpublic void onSeekComplete(MediaPlayer mp) {\n\t\t\t\tif (!mp.isPlaying()) {\n\t\t\t\t\t//playMedia(true);\n\t\t\t\t\tSystem.out.println(\"inside the setOnSeekCompleteListener\");\n\t\t\t\t\tplayMedia(false);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"inside------ the setOnSeekCompleteListener\");\n\t\t\t\ttimeElapsed.setText(countTime(videoviewer.getCurrentPosition()));\n\t\t\t}",
"@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n play();\n }",
"public void StopMusic();",
"public void gameComplete() {\n if (soundToggle == true) {\n gameComplete.start();\n } // if\n }",
"@Override\n\tpublic void onCompletion(MediaPlayer arg0) {\n\t}",
"@Override\r\n\tpublic void run() {\r\n\t\twhile (!player.gameEnd) {\r\n\t\t\tif (fst) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t\tfst = false ; \r\n\t\t\t\t}catch (Exception e ) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tplayer.moveDownn();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(time_to_sleep);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void stopPlaying() {\n seq.stop();\n }",
"private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }",
"@Override\n public void run() {\n System.out.println(\"hello\");\n loadunsendmessage();\n if(tmr==0){\n handler.postDelayed(this, 10000);\n }\n }",
"@Override\n public void onCompletion(MediaPlayer mediaPlayer) {\n mSongPosition = (mSongPosition + 1) % mSongs.size();\n updateCurrentSong();\n }",
"@Override\n\t\tpublic void run() {\n\t\t\tisRepeatFlag = true;\n\t\t}",
"@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\twhile(!gpt.done);\r\n\t\t\t\t\t\t\t\t\tx.task().post(new Runnable(){\r\n\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\t\tgotoLiveView(pattern,sound_cache);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}",
"@Override\n public void run(Message msg) {\n Guild g = msg.getGuild();\n AudioManager audioManager = g.getAudioManager();\n if (audioManager.isConnected()) {\n MusicHandler handler = (MusicHandler) audioManager.getSendingHandler();\n handler.setRepeating(!handler.isRepeat());\n }\n\n // delete the message\n msg.delete().queue();\n }",
"@Override\r\n public int playGameLoop() {\r\n return 0;\r\n }",
"public void loopSound(boolean commence) {\n if ( commence ) {\n clip.setFramePosition(0);\n clip.loop( Clip.LOOP_CONTINUOUSLY );\n } else {\n clip.stop();\n }\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(gameTimer > 0 && !Timer.this.gameScene.popUp){\n\t\t\t\t\tcountDown();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t}catch(InterruptedException e){\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutOfTime = true;\n\t\t\t}",
"public void onChunkUnload()\n {\n //RadioMod.logger.info(\"Unload\");\n RadioMod.instance.musicManager.radioSources.get(this.uuid).stopMusic();\n }",
"@Override\n\t public void run() {\n\t \t \n\t currentItem = (currentItem +1) % picList.size();\n\t //更新界面\n\t // handler.sendEmptyMessage(0);\n timeHandler.sendEmptyMessageDelayed(0x01, 5000);\n\t }",
"@Override\r\n\tpublic void onCompletion(MediaPlayer mp) {\n\t\tLog.v(LOGTAG, \"onCompletion Called\");\r\n\t\tfinish();\r\n\t}",
"private void manageLoop() {\n if (!gameOver) {\n if (lastLoopTime != null) {\n timeBufer += lastLoopTime\n .until(LocalTime.now(), ChronoUnit.MILLIS);\n }\n lastLoopTime = LocalTime.now();\n\n if (timeBufer > fallingTime) {\n int nbFalling = (int) (timeBufer / fallingTime);\n timeBufer = timeBufer % fallingTime;\n for (int i = 0; i < nbFalling; i++) {\n if (currentPiece.canDown(grid)) {\n currentPiece.down();\n sincePieceDown = null;\n } else if (sincePieceDown == null) {\n sincePieceDown = LocalTime.now();\n sinceLastMove = LocalTime.now();\n }\n }\n }\n\n if (sincePieceDown != null && sinceLastMove != null) {\n long a = sinceLastMove\n .until(LocalTime.now(), ChronoUnit.MILLIS);\n long b = sincePieceDown\n .until(LocalTime.now(), ChronoUnit.MILLIS);\n if (a >= fallingTime || b >= fixTime) {\n effectsReader.play(\"drop.mp3\", 1);\n currentPiece.getPoints().stream().filter((p) -> (p.y >= 0))\n .forEachOrdered((p) -> {\n grid.get(p.y).updatePoint(\n p.x, currentPiece.getColorType()\n );\n });\n int nbRemove = 0;\n boolean newLevel = false;\n for (int j = Settings.getYCases() - 1; j >= 0; j--) {\n if (grid.get(j).isClear()) {\n grid.remove(j);\n nbRemove++;\n nbLines++;\n if (nbLines % 10 == 0) {\n newLevel = true;\n }\n }\n }\n if (nbRemove == 4) {\n effectsReader.play(\"tetris.mp3\", 1);\n } else if (nbRemove > 0) {\n effectsReader.play(\"line.mp3\", 1);\n }\n lineScore(nbRemove);\n if (newLevel) {\n effectsReader.play(\"level-up.mp3\", 1);\n level++;\n fallingTime = (int) (fallingTime * .8d);\n fixTime = fallingTime * 2;\n }\n for (int j = 0; j < nbRemove; j++) {\n grid.add(0, new Line());\n }\n initNextPiece();\n hasSwiched = false;\n }\n }\n }\n }",
"public void run() {\n if(mPlayerGamePiece == mGame.getmCurrentlyPlaying()){\n mPlayableTiles = mGame.getmBoard().getPlayableTiles(mPlayerGamePiece);\n showGuidelines();\n mIsAllowedToPlay = true;\n }\n // Otherwise, opponent begins:\n else{\n mIsAllowedToPlay = false;\n makeAIMove();\n }\n\n }",
"private void finishPlayAlong() {\n\n callback.questionPressed(null, score, lives); // ENDS this question\n\n }",
"@Override\n public boolean isFinished() {\n return Robot.auton && counter > 50;\n }",
"public void stop() {\n\t\tstop(!playing);\n\t}",
"@Override\n public void stopSound(){\n gameMusic.stop();\n }",
"public void onTick(long millisUntilFinished) {\n }",
"public void playLooped()\n {\n audioClip.loop(Clip.LOOP_CONTINUOUSLY);\n play();\n }"
] |
[
"0.65291643",
"0.64020395",
"0.6400261",
"0.6392112",
"0.6389321",
"0.63783395",
"0.63628495",
"0.6329184",
"0.62182623",
"0.62104803",
"0.6168929",
"0.6154941",
"0.6130307",
"0.6117167",
"0.60912853",
"0.60894114",
"0.6064194",
"0.6050746",
"0.6040111",
"0.6032395",
"0.5990009",
"0.5965322",
"0.59552675",
"0.5944595",
"0.59402543",
"0.5899093",
"0.5897136",
"0.5871867",
"0.5855185",
"0.58478266",
"0.5841799",
"0.58208203",
"0.5816503",
"0.5814848",
"0.580886",
"0.5789439",
"0.57837987",
"0.5766163",
"0.5759131",
"0.57573164",
"0.5750704",
"0.5750589",
"0.57377416",
"0.5728845",
"0.5717616",
"0.57023716",
"0.5701903",
"0.5699488",
"0.56970125",
"0.5696098",
"0.5696098",
"0.5686697",
"0.5683349",
"0.56780607",
"0.5673931",
"0.56662655",
"0.5661755",
"0.56554043",
"0.5653017",
"0.56527793",
"0.56472605",
"0.56447256",
"0.56436104",
"0.5636151",
"0.56321806",
"0.56304413",
"0.561664",
"0.5616515",
"0.560936",
"0.5603195",
"0.55935097",
"0.55767125",
"0.5576012",
"0.5574536",
"0.5570871",
"0.55699426",
"0.55696577",
"0.5563229",
"0.55628455",
"0.55610603",
"0.55595374",
"0.55519766",
"0.55516046",
"0.55491936",
"0.5547441",
"0.5546396",
"0.55445695",
"0.5543805",
"0.55391103",
"0.5538557",
"0.55367845",
"0.5536327",
"0.55352366",
"0.55346406",
"0.5529445",
"0.55287284",
"0.5523195",
"0.5522349",
"0.55189735",
"0.55162525",
"0.55158204"
] |
0.0
|
-1
|
Call the given runnable when the player reach the end of the current music, even if it is set to be repeated
|
public int addOnEndEvent(final Runnable runnable) {
if (runnable == null)
throw new IllegalArgumentException("Given paramter is null");
onEndRunnables.add(runnable);
return onEndRunnables.indexOf(runnable);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void onSeekComplete() {\n if (info.playing) {\n player.start();\n player.setOnSeekCompletionListener(null);\n } else {\n Log.w(TAG, \"Audio stopping while waiting for loop to re-start\");\n }\n }",
"public void playOnce() {\n mStopAtLoopEnd = true;\n mStartTimeMillis = 0;\n mCurrentLoopNumber = 0;\n cancelCallback();\n postCallback();\n }",
"public void onCompletion(MediaPlayer mp) {\n mHandler.sendEmptyMessage(TRACK_ENDED);\n }",
"@Override\n public void playEnd() {\n }",
"@Override\n\tpublic void run() {\n\t\twhile(isRun){\n\t\t\ttry {\n\t\t\t\tThread.sleep(200);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif(null != player){\n\t\t\t\tint position = player.getCurrentPosition();\n\t\t\t\tint total = player.getDuration();\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.putExtra(\"position\", position);\n\t\t\t\tintent.putExtra(\"total\", total);\n\t\t\t\tsendBroadcast(intent);\n\t\t\t}\n\t\t\tif(null != player){\n\t\t\t\tif(player.isPlaying()){\n\t\t\t\t\tplaying = true;\n\t\t\t\t}else{\n\t\t\t\t\tplaying = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\tpublic void endOfSubItems(MediaPlayer mediaPlayer)\r\n\t{\n\r\n\t}",
"@Override\n public void run() {\n MediaSingleton.INSTANCE.ensureSound();\n\n long next = AlarmUtil.millisTillNextInterval(AlarmUtil.Interval.SECOND);\n handler.postDelayed(soundCheck, next);\n }",
"public void loop() {\n\t\tmusic.loop();\n\t\tsyncPosition();\n\t}",
"public void run() {\n if (currentTimer <= TIMEOUT_VALUE) {\n currentTimer++; // Increments the timer value.\n readySongTimerHandler.postDelayed(this, 1000); // Thread is run again in 1000 ms.\n }\n\n // Displays an timeout error message and stops the ready song timer thread.\n else {\n SSToast.toastyPopUp(\"The track could not be played due to a time-out error.\", getApplicationContext());\n pauseTrack(true); // Stops attempted playback of track.\n stopSongPrepare(true); // Signals the SSPlayerFragment to stop song preparation conditions.\n currentTimer = 0; // Resets the current timer value.\n readySongTimerHandler.removeCallbacks(this);\n }\n }",
"@Override\n public void onCompletion(MediaPlayer mp) {\n mp.reset();\n nextMusic();\n\n }",
"@Override\n public void onCompletion(MediaPlayer mp) {\n setViewOnFinish();\n log(\"Playing completed\");\n }",
"@Override\n public void run() {\n // TODO Auto-generated method stub\n running = true;\n AudioFile song = musicFiles.get(currentSongIndex);\n song.play();\n while(running){\n if(!song.isPlaying()){\n currentSongIndex++;\n if(currentSongIndex >= musicFiles.size()){\n currentSongIndex = 0;\n }\n song = musicFiles.get(currentSongIndex);\n song.play();\n }\n try{\n Thread.sleep(1);\n }\n catch (InterruptedException e){\n e.printStackTrace();\n } \n }\n }",
"@Override\n public void onCompletion(MediaPlayer mediaPlayer) {\n stopMusic();\n }",
"@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tmProgressBar.setProgress(0);\n\t\t\t\tif(SINGLE_LOOPS) {\n\t\t\t\t\tplayfunction(path);\n\t\t\t\t} else {\n\t\t\t\t\tList<MusicBean> datas = mAdapter.getData();\n\t\t\t\t\tif(datas.size() > 0) {\n\t\t\t\t\t\tint selectPos = mAdapter.getSelectItemPosi();\n\t\t\t\t\t\tif( ++selectPos >= datas.size())\n\t\t\t\t\t\t\tselectPos = 0;\n\t\t\t\t\t\tmAdapter.setSelectItemPosi(selectPos);\n\t\t\t\t\t\tmAdapter.notifyDataSetChanged();\n\t\t\t\t\t\tpath = \"\";\n\t\t\t\t\t\tplayfunction(path);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"public void goToEnd() {\n\t\tcurrentClip.stop();\n\t\tsetPosition(currentClip.getMicrosecondLength());\n\t\tisPlaying = false;\n\t}",
"@Override\r\n\t\t\t\tpublic void onCompletion (MediaPlayer theMediaPlayer) \r\n\t\t\t\t{\n\t\t\t\t\t// 11/03/2017 ECU check if any looping is needed\r\n\t\t\t\t\t// -------------------------------------------------------------\r\n\t\t\t\t\tif (loopCounter <= 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\t// 11/03/2017 ECU everything done so just check on the global \r\n\t\t\t\t\t\t// media player\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\t// 10/03/2017 ECU check if the global media player needs to be\r\n\t\t\t\t\t\t// 'resumed'\r\n\t\t\t\t\t\t// 15/03/2019 ECU whether there is a 'paused' media or not\r\n\t\t\t\t\t\t// it is necessary to release the resources\r\n\t\t\t\t\t\t// used in this class\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\tif (mediaPlayerPaused)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// -----------------------------------------------------\r\n\t\t\t\t\t\t\t// 10/03/2017 ECU the global media player needs to be resumed\r\n\t\t\t\t\t\t\t// -----------------------------------------------------\r\n\t\t\t\t\t\t\tMusicPlayer.playOrPause (true);\r\n\t\t\t\t\t\t\t// -----------------------------------------------------\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\t// 04/09/2017 ECU make sure the resources are released\r\n\t\t\t\t\t\t// 05/09/2017 ECU changed to use the local method\r\n\t\t\t\t\t\t// 15/03/2019 ECU changed to always release resources\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\tstop ();\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{\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\t// 11/03/2017 ECU check about loops\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\tmediaPlayer.seekTo (theLoopPosition);\r\n\t\t\t\t\t\tmediaPlayer.start ();\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\t// 11/03/2017 ECU decrement the loop counter\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t\tloopCounter--;\r\n\t\t\t\t\t\t// ---------------------------------------------------------\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// -------------------------------------------------------------\r\n\t\t\t\t}",
"@Override\r\n\tpublic void finished(MediaPlayer mediaPlayer)\r\n\t{\n\r\n\t}",
"public void finishSong() {\n mp.finish();\n trackPlaying = false;\n }",
"@Override\n public void onPause() {\n justAfterPause = true;\n\n if (!soundAlreadyStopped) {\n SoundManager.onPause(instantMusicPause);\n soundAlreadyStopped = true;\n }\n\n instantMusicPause = true;\n super.onPause();\n\n }",
"@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}",
"public void gameOver(){\n gameOverMusic.loop(pitch, volume);\n }",
"@Override\n public void run() {\n if(mProgressBar.getProgress() < maxTime) {\n mProgressBar.incrementProgressBy(1);\n if(mProgressListener != null){\n mProgressListener.progress(mProgressBar.getProgress());\n }\n mHandler.postDelayed(timeCount, 1000);\n }else{\n if(mProgressListener != null){\n mProgressListener.finish();\n }\n mHandler.removeCallbacks(timeCount);\n// Log.i(\"slack\",\"timeCount finish...\");\n }\n\n }",
"public static void next() {\r\n if (nextMusic_ == INVALID_NUMBER) {\r\n return;\r\n }\r\n currentMusic_ = nextMusic_;\r\n nextMusic_ = INVALID_NUMBER;\r\n MediaPlayer p = players_.get(currentMusic_);\r\n if (p != null) {\r\n if (!p.isPlaying()) {\r\n p.setLooping(true);\r\n p.setOnCompletionListener(null);\r\n p.start();\r\n }\r\n }\r\n }",
"@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tLog.d(C.LOG_TAG, \"Audio Play Complete,\" + getTime());\n\t\t\t\tmp.seekTo(0); // roll back to the begining\n\t\t\t\tmRecordTimer.sendMessageDelayed(Message.obtain(null, MESSAGE_PLAY_IS_STOPPED), TIME_TO_WAIT_STOP_RECORD);\n\t\t\t}",
"@Override\n public void onCompletion(MediaPlayer mp) {\n if(isRepeat){\n // repeat is on play same song again\n playSong(currentSongIndex);\n } else if(isShuffle){\n // shuffle is on - play a random song\n Random rand = new Random();\n currentSongIndex = rand.nextInt((songsList.size() - 1) - 0 + 1) + 0;\n playSong(currentSongIndex);\n } else{\n // no repeat or shuffle ON - play next song\n if(currentSongIndex < (songsList.size() - 1)){\n playSong(currentSongIndex + 1);\n currentSongIndex = currentSongIndex + 1;\n }else{\n // play first song\n playSong(0);\n currentSongIndex = 0;\n }\n }\n\n }",
"public void onRepeat() {\n\t\t// TODO Auto-generated method stub\n\t\tLastWholeDelta = 0;\n\t}",
"@Override\n public void run() {\n flag = true;\n // The Runnable is posted to run again here:\n handler.postDelayed(this, interval);\n }",
"@Override\n public void run() {\n if (Build.VERSION.SDK_INT < 28) {\n while(isAlarmOn) {\n mRingtone.play();\n }\n }\n\n else {\n mRingtone.setLooping(true);\n mRingtone.play();\n }\n }",
"@Override\n public void onCompletion(MediaPlayer mediaPlayer) {\n mSongPosition = (mSongPosition + 1) % mSongs.size();\n updateCurrentSong();\n }",
"@Override\n\t\t\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\t\t\tif (onFinishListen!=null) {\n\t\t\t\t\t\t\tonFinishListen.onFinish();\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"@Override\n\t\t\tpublic void onSeekComplete(MediaPlayer mp) {\n\t\t\t\tif (!mp.isPlaying()) {\n\t\t\t\t\t//playMedia(true);\n\t\t\t\t\tSystem.out.println(\"inside the setOnSeekCompleteListener\");\n\t\t\t\t\tplayMedia(false);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"inside------ the setOnSeekCompleteListener\");\n\t\t\t\ttimeElapsed.setText(countTime(videoviewer.getCurrentPosition()));\n\t\t\t}",
"public void run() {\r\n\t\tboolean doorgaan = true;\r\n\t\twhile (doorgaan) {\r\n\t\t\tplay();\r\n\t\t\tdoorgaan = readBoolean(\"\\n> Play another time? (y/n)?\", \"y\", \"n\");\r\n\t\t}\r\n\t}",
"@Override\n public void onFinish() {\n timerActive=false;\n\n //play sound on finish\n //instead of MainActivity.this, we can also use getApplicationContext()\n MediaPlayer mPlayer = MediaPlayer.create(MainActivity.this,R.raw.airhorn);\n mPlayer.start();\n bview.setText(\"GO\");\n }",
"public void keepLooping() {\n\t\tif(!clip.isActive()) {\n\t\t\tstartSound();\n\t\t}\n\t}",
"public void onPlayerNext() {\n\t\trunOnUiThread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tsetCurrentTrack();\n\t\t\t}\n\t\t});\n\t}",
"public void audioManipulatorAudioFileReachedEnd() {\n\t\taudioFileProcessedTimeString = secondsToMinutesAndSeconds(0);\n\t\ttextAudioFileDuration.setText(audioFileProcessedTimeString + \" / \" + audioFileDurationString);\n\t\tsliderAudioFileDuration.setValue(0);\n\t\tbuttonPlay.setDisable(false);\n\t\tbuttonPause.setDisable(true);\n\t\tbuttonStop.setDisable(true);\n\t\tpaneMixerMainControls.setDisable(false);\n\t\tpaneLowPass.setDisable(false);\n\t}",
"@Override\n public void onSeekComplete(MediaPlayer mp) {\n }",
"@Override\n public void onSeekComplete(MediaPlayer mp) {\n }",
"@Override\r\n\tpublic void onCompletion(MediaPlayer mp) {\n\t\tLog.v(LOGTAG, \"onCompletion Called\");\r\n\t\tfinish();\r\n\t}",
"public void onTick(long millisUntilFinished) {\n\n t1.speak(String.valueOf(millisUntilFinished/1000),TextToSpeech.QUEUE_ADD, null);\n while(t1.isSpeaking());\n }",
"public void recorderAudioFileReachedEnd() {\n\t\tsetCurrentValueToRecordDurationSlider(0);\n\t\trecorderButtonPlay.setDisable(false);\n\t\trecorderButtonPause.setDisable(true);\n\t\trecorderButtonStop.setDisable(true);\n\t}",
"private void finishPlayAlong() {\n\n callback.questionPressed(null, score, lives); // ENDS this question\n\n }",
"public void run() {\n if ((AudioPlayerService.mediaPlayer != null) && AudioPlayerService.prepared){\r\n int currentSeconds = AudioPlayerService.mediaPlayer.getCurrentPosition() / 1000;\r\n\r\n //set the bar's max duration\r\n if (songProgressBar.getMax() != AudioPlayerService.mediaPlayer.getDuration() / 1000){\r\n songProgressBar.setMax(AudioPlayerService.mediaPlayer.getDuration() / 1000);\r\n }\r\n\r\n //if the song has started and is playing\r\n //set the current time and distance along the bar\r\n //then update the bad again\r\n if (currentSeconds >= 0){\r\n if (AudioPlayerService.mediaPlayer.isPlaying()){\r\n String currentDuration = String.format(Locale.US, \"%d:%02d\", currentSeconds / 60, currentSeconds % 60);\r\n songCurrentDurationLabel.setText(currentDuration);\r\n songProgressBar.setProgress(currentSeconds);\r\n mHandler.postDelayed(this, 1000);\r\n }\r\n }\r\n }\r\n }",
"@Override\n public void playStop() {\n }",
"@Override\n\t\tpublic void onPlaying() {\n\t\t\tif (max_length != 0){\n\t\t\t\tnew CountDownTimer(max_length, 1000) {\n\n\t\t\t\t @Override\n\t\t\t\t\tpublic void onTick(long millisUntilFinished) {\n\t\t\t\t \n\t\t\t\t }\n\t\t\n\t\t\t\t @Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t\tbatteryAsync.cancel(false);\n\t\t\t\t\t\t// We give back the results as a String\n\t\t\t\t\t\tJSONObject temp = new JSONObject(batteryLog);\n\t\t\t\t\t\tString batteryResults = temp.toString();\n\t\t\t\t\t\tIntent returnIntent = new Intent();\n\t\t\t\t\t\treturnIntent.putExtra(\"batteryLog\", batteryResults);\n\t\t\t\t\t\tYoutubePlayerActivity.this.setResult(RESULT_OK,\n\t\t\t\t\t\t\t\treturnIntent);// tells previous activity the\n\t\t\t\t\t\t\t\t\t\t\t\t// test was completed correctly\n\t\t\t\t\t\tContext context = getApplicationContext();\n\t\t\t\t\t\tCharSequence text = \"Max video length reached\";\n\t\t\t\t\t\tint duration = Toast.LENGTH_LONG;\n\t\t\t\t\t\tToast.makeText(context, text, duration).show();\n\t\t\t\t\t\tfinish();\n\t\t\t\t }\n\t\t\t\t}.start();\n\t\t\t}\n\t\t}",
"@Override\n protected Void doInBackground(Void... ignore)\n {\n while (!isCancelled())\n {\n SystemClock.sleep(100);\n long totalPlayDuration = mPrefCropTime * 1000;\n long totalDuration = totalPlayDuration + mPrefFadeOutTime * 1000;\n long currentDuration;\n //boolean wait = false;\n\n if (mPlayer.isPlaying())\n {\n mPauseCnt = 0;\n currentDuration = mPlayer.getCurrentPosition();\n\n if (currentDuration >= totalPlayDuration) // TODO!!\n {\n if(!mPaused)\n {\n // wait for x seconds\n pause(mPrefFadeOutTime);\n waitFor(mPrefPauseTime);\n }\n\n //publishProgress(0L, totalDuration, currentDuration);\n //SystemClock.sleep(mPrefPauseTime * 1000);\n //nextSong = true;\n }\n\n publishProgress(totalDuration, currentDuration);\n }\n }\n return null;\n }",
"@Override\n\t\tpublic void run() {\n\t\t\twhile (!endFlag) {\n\t\t\t\tlong endTime = System.currentTimeMillis();\n\t\t\t\tif (endTime - touchStartTime > 6000) {\n\t\t\t\t\tMessage msg = handler.obtainMessage();\n\t\t\t\t\tmsg.what = 0;\n\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"@Override\r\n\t\tpublic void run() {\n\t\t\tsuper.run();\r\n\t\t\twhile(bPlayAudioQueue){\r\n\t\t\t\tplayFromAudioQueue();\r\n\t\t\t}\r\n\t\t}",
"@Override\n public void run() {\n if(musicEnabled) {\n playSoundtrack();\n while (running) {\n if(!stack.isEmpty()) {\n Sound sound = stack.pop();\n sound.play(sound.loadInputStream());\n }\n }\n }\n }",
"public void onTick(long millisUntilFinished) {\n\n t1.speak(String.valueOf(millisUntilFinished/1000),TextToSpeech.QUEUE_ADD, null);\n while(t1.isSpeaking());\n }",
"public static void playerRun()\n {\n runSound.playLooped();\n }",
"@Override\r\n\tpublic void onSeekComplete(MediaPlayer mp) {\n\t\tLog.v(LOGTAG, \"onSeekComplete Called\");\r\n\t}",
"@Override\n public void onCompletion(MediaPlayer mp) {\n int newPosition = mTrackPos++;\n// mMediaPlayer.setNextMediaPlayer(mp);\n// initMediaPlayer(newPosition);\n startCurrentTrack(newPosition, true);\n // to stop the service.\n stopSelf();\n }",
"@Override\n public void onCompletion(MediaPlayer mp) {\n mp.release();\n if (!gameOver && !backLayoutVisible) { // Handling the scenario in which user pressed back button while start whistle\n startCountdown(gameDuration, tickTime);\n setFormula();\n vsOverlayView.setClickable(false);\n mainGameView.setClickable(true);\n } else {\n //Countdown stopped because of stopped button\n countDownCouldNotBegin = true;\n }\n }",
"public void onTick(long millisUntilFinished) {\n\n t1.speak(String.valueOf(millisUntilFinished/1000),TextToSpeech.QUEUE_ADD, null);\n while(t1.isSpeaking());\n }",
"public void onTick(long millisUntilFinished) {\n\n t1.speak(String.valueOf(millisUntilFinished/1000),TextToSpeech.QUEUE_ADD, null);\n while(t1.isSpeaking());\n }",
"@Override\n public void onSeekComplete(MediaPlayer player) {\n \n }",
"private void loopButton(ActionEvent e) {\n if (loop) {\n if (drawPanel.animationDone()) {\n this.tick = 0;\n atTick(this.tick);\n timer.restart();\n }\n }\n }",
"public void onSeekComplete(MediaPlayer arg0) {\n\t\tLog.e(TAG, \"onSeekComplete\");\r\n\t}",
"public void loop(){\n\t\t\n\t\tclip.loop(Clip.LOOP_CONTINUOUSLY);\n\t\tplay();\n\t}",
"void idleStoryCountdown() {\n\n idleSaveStoryToArchiveHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n\n// Log.i(\"Annoying Handler\", \"Ach\");\n// commentaryInstruction.setInputHandler(idleSaveStoryToArchiveHandler);\n// commentaryInstruction.onPlay(Uri.parse(\"android.resource://\" + getPackageName() + \"/\" + R.raw.recorddone1), true, ArchiveMainMenu.class, \"RecordStory\");\n }\n }, 120000);\n }",
"@Override\n protected void onStop() {\n super.onStop();\n stopMusic();\n }",
"public void gameComplete() {\n if (soundToggle == true) {\n gameComplete.start();\n } // if\n }",
"@Override\n public void run() {\n if (mPlayer != null) {\n if (!mPlayer.isPlaying())\n mPlayer.play();\n }\n }",
"@Override\n public void onTick(long millisUntilFinished) {\n if (play) {\n\n\n\n\n\n czasomierz.setProgress((int)millisUntilFinished/1000);\n\n czas.setText((int)millisUntilFinished/1000 + \" s\");\n\n }\n\n }",
"@Override\n public boolean isFinished() {\n return Robot.auton && counter > 50;\n }",
"public void finished(MediaPlayer mediaPlayer) {\n\t\t\t\t// Nije dozvoljen libVLC callback preko event niti, jer moze da dovede do nepredvidivog ponasanja JVM-a\n\t\t\t\t// Potrebno je napraviti asinhroni egzekutor koji nudi MediaPlayer objekat koji se prosledjuje listeneru.\n\t\t\t\tmediaPlayer.submit(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\thideFrame();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}",
"@Override\n\tpublic void onCompletion(MediaPlayer arg0) {\n\t}",
"@Override\r\n\tpublic void run() {\r\n\t\twhile (!player.gameEnd) {\r\n\t\t\tif (fst) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t\tfst = false ; \r\n\t\t\t\t}catch (Exception e ) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tplayer.moveDownn();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(time_to_sleep);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void onTick(long millisUntilFinished) {\n\n t1.speak(String.valueOf(millisUntilFinished/1000),TextToSpeech.QUEUE_ADD, null);\n while(t1.isSpeaking());\n }",
"public void onChunkUnload()\n {\n //RadioMod.logger.info(\"Unload\");\n RadioMod.instance.musicManager.radioSources.get(this.uuid).stopMusic();\n }",
"public void run() {\n \tif (playerHasPlayed) {\n \t\tmyHandler.removeCallbacksAndMessages(null);\n \t\tmyProgressBar.setProgress(0);\n \t} else {\n myProgressBar.setProgress(myProgressBar.getProgress()-CLICK_TIME);\n \t}\n \t//If time runs out, switch turns, reset progress bar, and start player turn\n \tif (myProgressBar.getProgress() == 0) {\n \t\tredTurn = !redTurn;\n \t\tmyProgressBar.setProgress(myProgressBar.getMax());\n \t\tstartPlayer();\n \t\t\n \t} else {\n \t\tmyHandler.postDelayed(myProgresser,CLICK_TIME);\n \t}\n \n }",
"private void stop(){ player.stop();}",
"@Override\n\t\tpublic void run() {\n\t\t\tisRepeatFlag = true;\n\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tgetPlayer().leaveArena();\n\t\t\t}",
"boolean endLoop();",
"@Override\r\n\tpublic void subItemFinished(MediaPlayer mediaPlayer, int subItemIndex)\r\n\t{\n\r\n\t}",
"@Override\n public void run() {\n timer2.cancel();\n if(alarmcount==0)\n {\n setAlarm.setVisible(false);\n stopAlarm.setVisible(true);\n \n MC.Stop();\n MC.Play(songalarm);\n play_button.setVisible(true);\n pause_button.setVisible(false);\n }\n timeRemaining.setText(\"RINGG!!\");\n //stopAlarm.setVisible(true);\n }",
"@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n//\t\tgv.f = false;\t//如果没有这句,即使退出,run()函数也不停止运行,既游戏界面退出,到后台后仍在运行着。\r\n\t\tMusic.stop();\r\n\t}",
"public void run() {\n mReaderHelper.runLoopInventroy();\n mLoopHandler.postDelayed(this, 100);\n }",
"public void run() {\n if (this.gui.getPauseState()) {\n this.gui.goEnd();\n }\n }",
"default void onVideoRepeat() {\n }",
"@Override\n protected void execute() {\n double timePassed = Timer.getFPGATimestamp() - timePoint;\n\n boolean rumbleOver = (state == RUMBLE && timePassed > timeOn);\n boolean breakOver = (state == BREAK && timePassed > timeOff);\n\n if (rumbleOver) {\n rumble(false);\n if (repeatCount >= 0)\n repeatCount--;\n } else if (breakOver)\n rumble(true);\n }",
"public void stop() {\n\t\tif (player == null)\n\t\t\treturn;\n\t\t\n\t\tif (listener != null)\n\t\t\tlistener.setLooping(false);\n\t\t\n\t\t// This will invoke playbackFinished, which will decrement currentlyPlaying\n\t\t// and set player to null.\n\t\tplayer.stop();\n\t}",
"@Override\n public void onCompletion(MediaPlayer mp) {\n mp.release();\n mState = CommonConstants.MusicPlayerState.Stopped;\n }",
"@Override\n\t\tpublic void run() {\n\t\t\tmFiles = DataSourceManager.getSongFileList(currentAlbumPath);\n\t\t\tif (mFiles == null || mFiles.length == 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (mPlayPos < 0 || mPlayPos > mFiles.length -1) {\n\t\t\t\tmPlayPos = 0;\n\t\t\t}\n\t\t\t/*Message msg = mMediaplayerHandler.obtainMessage(PREPARE_PLAY);\n\t\t\tif (msg == null) {\n\t\t\t\tmsg = new Message();\n\t\t\t\tmsg.what = PREPARE_PLAY;\n\t\t\t\t\n\t\t\t}\n\t\t\tBundle data = new Bundle();\n\t\t\tdata.putString(MSG_PLAY_PATH, mFiles[mPlayPos]);\n\t\t\tdata.putInt(MSG_PLAY_POSITION, mSeek);\n\t\t\tmsg.setData(data);\n\t\t\tmMediaplayerHandler.sendMessage(msg);*/\n\t\t\t\n\t\t\tsendHandlerInitialized(mFiles[mPlayPos], false);\n\t\t}",
"public synchronized void pause(){\r\n if(currentLoop0) backgroundMusicLoop0.pause();\r\n else backgroundMusicLoop1.pause();\r\n }",
"public abstract void onTick(long millisUntilFinished);",
"@Override\n public void run() {\n timer2.cancel();\n if(alarmcount==0)\n {\n setAlarm.setVisible(false);\n stopAlarm.setVisible(true);\n\n MC.Stop();\n MC.Play(songalarm);\n play_button.setVisible(true);\n pause_button.setVisible(false);\n }\n timeRemaining.setText(\"RINGG!!\");\n //stopAlarm.setVisible(true);\n }",
"public void stop() {\n try {\n mIsIdle = true;\n mIsLooping = false;\n if (mCurPlayer != null) \n {\n mCurPlayer.stop(); \n Thread.sleep(100);\n// mCurPlayer.setMediaTime(0);\n mIsPlaying = false;\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void finished() {\n Object obj = get();\n if (obj instanceof Exception)\n mCallback.run(null, (Exception)obj, mRock);\n else\n mCallback.run(obj, null, mRock);\n }",
"@Override\n\tpublic void onCompletion(Music completedMusic)\n\t{\n\t\t// Plays a randomly selected next song. The completed song will not be played multiple\n\t\t// times in a row. Note that this will not work with only one song.\n\t\tint nextSong = -1;\n\t\twhile (nextSong == -1 || nextSong == currentMusicFile)\n\t\t{\n\t\t\tnextSong = (new Random()).nextInt(music.size());\n\t\t}\n\t\t\n\t\tmusic.get(nextSong).setVolume(musicVolume / 100.f);\n\t\tmusic.get(nextSong).play();\n\t\t\n\t\tsetMusicFileIndex(nextSong);\n\t}",
"private void runTimer() {\n\n // Handler\n final Handler handler = new Handler();\n\n handler.post(new Runnable() {\n @Override\n public void run() {\n\n if (playingTimeRunning) {\n playingSecs++;\n }\n\n handler.postDelayed(this, 1000);\n }\n });\n\n }",
"@Override\n\tpublic void nowPlaying() {\n\t}",
"@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\twhile(!gpt.done);\r\n\t\t\t\t\t\t\t\t\tx.task().post(new Runnable(){\r\n\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\t\tgotoLiveView(pattern,sound_cache);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\t\t\t\tplayer.release();\n\t\t\t\t\t\t}",
"@Override\n\tpublic void run() {\n\t\twhile (!isStoped) {\n\t\t\tdoPause();\n\t\t\tinnerAction();\n\t\t}\n\t}",
"@Override\n public void handleMessage(Message msg) {\n if (isPlaying() || mMediaplayerHandler.hasMessages(TRACK_ENDED)) {\n return;\n }\n // save the queue again, because it might have changed\n // since the user exited the music app (because of\n // party-shuffle or because the play-position changed)\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(gameTimer > 0 && !Timer.this.gameScene.popUp){\n\t\t\t\t\tcountDown();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t}catch(InterruptedException e){\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutOfTime = true;\n\t\t\t}",
"public void game(){\n gameMusic.loop(pitch, volume);\n }",
"public void onTick(long millisUntilFinished) {\n }"
] |
[
"0.64655435",
"0.6463418",
"0.63633835",
"0.63537526",
"0.624702",
"0.6234699",
"0.6219784",
"0.620298",
"0.6200254",
"0.6178823",
"0.6175942",
"0.61536294",
"0.6144947",
"0.6106529",
"0.60418165",
"0.60255885",
"0.6003271",
"0.5984943",
"0.5968968",
"0.5948693",
"0.5905794",
"0.5880815",
"0.58717465",
"0.58715284",
"0.58656126",
"0.58199525",
"0.58025223",
"0.57987213",
"0.5783209",
"0.57679707",
"0.57498777",
"0.5745257",
"0.5740702",
"0.5734687",
"0.5727526",
"0.57267904",
"0.5725439",
"0.5725439",
"0.5715418",
"0.5713737",
"0.5712703",
"0.57108104",
"0.5710451",
"0.57060224",
"0.56992954",
"0.56982875",
"0.5695451",
"0.56919646",
"0.5690802",
"0.56845564",
"0.5680078",
"0.56726056",
"0.56629246",
"0.56374246",
"0.56373245",
"0.5634474",
"0.56343544",
"0.5627306",
"0.5625849",
"0.5610336",
"0.55984527",
"0.5578129",
"0.55666786",
"0.55662674",
"0.5565774",
"0.5563327",
"0.5562878",
"0.55586225",
"0.55577385",
"0.5555673",
"0.55553687",
"0.5553194",
"0.5547952",
"0.5534938",
"0.55196947",
"0.5513526",
"0.55045205",
"0.55041605",
"0.5500962",
"0.549638",
"0.5493572",
"0.5479389",
"0.5478412",
"0.5477965",
"0.54732037",
"0.5471325",
"0.547056",
"0.5468271",
"0.54662466",
"0.54643095",
"0.5461798",
"0.5461759",
"0.5460303",
"0.5455224",
"0.5444363",
"0.54437137",
"0.54422957",
"0.5435749",
"0.5424535",
"0.54231346",
"0.5422561"
] |
0.0
|
-1
|
Disable a listener returned by the function addOnEndEvent
|
public void removeOnEndEvent(final int eventID) {
onEndRunnables.remove(eventID);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void onDisable() {\r\n }",
"public void onDisable() {\n }",
"public void onDisable() {\n }",
"public void onDisable() {\n }",
"public void onStop() {\n this.eventDelegate.onStop();\n super.onStop();\n }",
"public void onDisable()\n {\n }",
"public abstract void onDisable();",
"EndEvent createEndEvent();",
"public void removeHideListener() {\n this.eventEmitter.off(\"progress\", this.progressListenerToken);\n this.eventEmitter.off(EventType.AD_PROGRESS, this.adProgressListenerToken);\n this.eventEmitter.off(EventType.AD_BREAK_STARTED, this.adBreakStartedListenerToken);\n this.eventEmitter.off(EventType.DID_SEEK_TO, this.didSeekToListenerToken);\n this.eventEmitter.off(EventType.CUE_POINT, this.cuePointListenerToken);\n this.eventEmitter.off(EventType.WILL_INTERRUPT_CONTENT, this.willInterruptContentListenerToken);\n this.eventEmitter.off(EventType.ACTIVITY_STOPPED, this.activityStoppedListenerToken);\n this.eventEmitter.off(EventType.FRAGMENT_STOPPED, this.fragmentStoppedListenerToken);\n this.eventEmitter.off(EventType.REMOVE_VIDEO_STILL, this.removeVideoStillListenerToken);\n }",
"@Override\n public void onDisable() {\n }",
"@Override\r\n\tpublic void onDisable() {\n\t}",
"default void onDisable() {}",
"@Override\n\tpublic void onDisable() {\n\t\t\n\t}",
"@Override\n\tpublic void onDisable() {\n\n\t}",
"@Override\n public void onDisable() {\n \tgetLogger().info(\"onDisable has been invoked!\");\n }",
"@Override\n public void onDisable() {\n super.onDisable();\n running = false;\n }",
"@Override\n public void stop() {\n\n for (FermatEventListener fermatEventListener : listenersAdded) {\n eventManager.removeListener(fermatEventListener);\n }\n\n listenersAdded.clear();\n }",
"void removeCompletedEventListener(IGameStateListener listener);",
"public void disableEndTurnButton(){\n\n this.endTurnButton.setEnabled(false);\n }",
"@Override\n public void onDisabled() {\n }",
"protected void onDisabled() {\n // Do nothing.\n }",
"void unsetEvent();",
"@Override\n public void onDisable() {\n getLogger().info(\"Successfully disabled.\");\n }",
"public void dama_DamaCloseButtonListener() {\n this.buttonDisabled = false;\n }",
"@Override\n public boolean usesEvents()\n {\n return false;\n }",
"public void onDisable() {\n \n \t\tprintCon(\"Stopping auto flusher\");\n \t\tgetServer().getScheduler().cancelTask(runner);\n \t\tprintCon(\"Flushing cache to database\");\n \t\tPlayerStatManager.saveCache();\n \t\tprintCon(\"Cache flushed to database\");\n \n \t\tself = null;\n \t}",
"public void shutdown() {\n shutdown = true;\n //\n // Cancel our event listener (this will cause the event wait to complete)\n //\n try {\n List<String> eventList = new ArrayList<>();\n Nxt.eventRegister(eventList, eventToken, false, true);\n } catch (IOException exc) {\n Main.log.error(\"Unable to cancel event listener\", exc);\n Main.logException(\"Unable to cancel event listener\", exc);\n }\n }",
"public void stopListening(){\n\t\tcv.getConfigurer().getControlFieldProvider().removeChangeListener(this);\n\t}",
"public void onStop() {\n super.onStop();\n getDelegate().d();\n }",
"void unbind(EventService service);",
"private void fireProgressListenerStop() {\n if (progress == null) {\n return;\n }\n progress.stop(new ProgressEvent(this, ProgressEvent.STOP));\n }",
"public void removeProgressListener() {\n this.listener = new SilentProgressListener();\n }",
"public void onDisable()\n\t{\n\t\t//Tells the user that the plugin is shutting down.\n\t\tlog.info(\"Shut down.\");\n\t}",
"protected void onEnd() {}",
"public void stopListener(){\r\n\t\tcontinueExecuting = false;\r\n\t\tglobalConsoleListener.interrupt();\r\n\t}",
"public void stopListening();",
"public void onEndListener(int type) {\n if (this.checkListener != null) {\n this.checkListener.onCheckUserEnd(type);\n }\n }",
"public void setHideListener() {\n HideListener hideListener = new HideListener();\n if (!this.isRemote) {\n this.progressListenerToken = this.eventEmitter.once(\"progress\", hideListener);\n this.adProgressListenerToken = this.eventEmitter.once(EventType.AD_PROGRESS, hideListener);\n this.adBreakStartedListenerToken = this.eventEmitter.once(EventType.AD_BREAK_STARTED, hideListener);\n this.didSeekToListenerToken = this.eventEmitter.once(EventType.DID_SEEK_TO, hideListener);\n this.cuePointListenerToken = this.eventEmitter.once(EventType.CUE_POINT, hideListener);\n }\n this.willInterruptContentListenerToken = this.eventEmitter.once(EventType.WILL_INTERRUPT_CONTENT, hideListener);\n this.activityStoppedListenerToken = this.eventEmitter.once(EventType.ACTIVITY_STOPPED, hideListener);\n this.fragmentStoppedListenerToken = this.eventEmitter.once(EventType.FRAGMENT_STOPPED, hideListener);\n this.removeVideoStillListenerToken = this.eventEmitter.once(EventType.REMOVE_VIDEO_STILL, hideListener);\n }",
"@Override\n public void onDisable()\n {\n if (this.schedulerManager.getScheduler() != null)\n {\n try\n {\n this.schedulerManager.getScheduler().shutdown();\n } catch (SchedulerException e)\n {\n e.printStackTrace();\n }\n }\n }",
"void stopListener()\n {\n\n locationManager.removeUpdates(RetriveLocation.this);\n isListening = false;\n }",
"protected abstract void onAnimEnd(boolean isCancelAnim);",
"@Override\n public void removeListener() {\n this.mListener = null;\n }",
"boolean eventEnabled(AWTEvent e) {\n return false;\n }",
"@Override\n\tpublic void stop(){\n\t\tif(this.keyboardListenerIsActive){\n\t\t\tthis.keyboardListener.unregisterNativeHook();\n\t\t\tthis.keyboardListenerIsActive = false;\n\t\t}\n\t\t//If the mouse listener is active\n\t\tif(this.mouseListenerIsActive){\n\t\t\tthis.mouseListener.unregisterNativeHook();\n\t\t\tthis.mouseListenerIsActive = false;\n\t\t}\n\t\t//If the mouse motion listener is active\n\t\tif(this.mouseMotionListenerIsActive){\n\t\t\tthis.mouseMotionListener.unregisterNativeHook();\n\t\t\tthis.mouseMotionListenerIsActive = false;\n\t\t}\n\t\t//If the mouse wheel listener is active\n\t\tif(this.mouseWheelListenerIsActive){\n\t\t\tthis.mouseWheelListener.unregisterNativeHook();\n\t\t\tthis.mouseWheelListenerIsActive = false;\n\t\t}\n\t}",
"@Override\n\tpublic void StopListening()\n\t{\n\t\t\n\t}",
"public interface UnblockedListener {\n\t\n\t/**\n\t * Called when a command stops blocking.\n\t */\n\tpublic void onUnblock();\n\n}",
"public void disable();",
"@Override\n public void onDisabled(Context context) {\n // Enter relevant functionality for when the last widget is disabled\n }",
"public void onEnded(long endedTime);",
"public void removeNPTListener(NPTListener l) {}",
"@Override\r\n\tpublic DimseListener getCancelListener()\r\n\t{\n\t\treturn null;\r\n\t}",
"void stopPumpingEvents();",
"@Override\n protected void onStop() {\n\n super.onStop();\n getDelegate().onStop();\n }",
"protected abstract void disable();",
"public void setListener(EndlessListener listener) {\n this.listener = listener;\n }",
"public abstract void unregisterListeners();",
"public synchronized void removeEventListener(IEventListener listener){\r\n\t\twhile (isBlocked) {\r\n\t\t\tThread.yield();\r\n\t\t}\r\n\t\tlisteners.remove(listener);\r\n\t}",
"public void removeListener(GrillEventListener listener);",
"public void onDetachedFromWindow() {\n removeCallbacks(this.mEndScrollRunnable);\n super.onDetachedFromWindow();\n }",
"private void fireOutputDisabled() {\n previousEvent = OUTPUT_DISABLED;\n ownerPool.getIPCEventProcessor().execute(new OrderedExecutorService.KeyRunnable<StreamOutputChannel<PAYLOAD>>() {\n\n @Override\n public void run() {\n for (IPCEventListener l : outputDisableListeners) {\n l.triggered(outputDisabledEvent);\n }\n }\n\n @Override\n public StreamOutputChannel<PAYLOAD> getKey() {\n return StreamOutputChannel.this;\n }\n });\n }",
"@Override\n\tpublic void removeAllListener() {\n\t\tLog.d(\"HFModuleManager\", \"removeAllListener\");\n\t\tthis.eventListenerList.clear();\n\t}",
"@Override\n public void disableEndTurnButton() {\n gameboardPanel.disableEndTurnButton();\n }",
"public interface EndSequenceEventListener {\n void sequenceEnd();\n}",
"public void operationEnd(BGMEvent e);",
"@Override\n\t\t\t\tpublic void onAddFail() {\n\t\t\t\t\tif (addListener != null) {\n\t\t\t\t\t\taddListener.onAddFail();\n\t\t\t\t\t}\n\t\t\t\t}",
"public static void stop() {\n assert sListener != null;\n ResourceManager.getInstance().addListener(sListener);\n }",
"@Override\n public void onStop() {\n disableAsyncTask();\n super.onStop();\n Log.d(TAG, \"onStop: \");\n }",
"@JavascriptInterface\n public void STOP() {\n sensorManager.unregisterListener(this);\n }",
"void removeListener( AvailabilityListener listener );",
"void onStopped();",
"void hidePreviousEventsLoadingWheel();",
"public void setDisabled(EventType ore, boolean d) {\r\n\t\tif (d) disabled |= 1L << ore.ordinal();\r\n\t\telse disabled &= ~(1L << ore.ordinal());\r\n\t}",
"void unsetEnd();",
"public void disable() {\n \t\t\tsetEnabled(false);\n \t\t}",
"void hideNextEventsLoadingWheel();",
"private void stopCallBack() {\r\n\t\tfor (RecordingEventHandler oberserver : recordingEventHandlers) {\r\n\t\t\toberserver.stopCallBack();\r\n\t\t}\r\n\t}",
"void removeListener(BotListener l);",
"@Override\n\tpublic void removeConsoleOutputListener(IEventHandler listener) {\n\t\t\n\t}",
"@Override\r\n\tpublic void setListener() {\n\r\n\t}",
"@Override\r\n\tpublic void setListener() {\n\r\n\t}",
"public void disable()\r\n\t{\r\n\t\tenabled = false;\r\n\t}",
"protected void end() {\n \tRobot.m_elevator.disable();\n \tRobot.m_elevator.free();\n }",
"public boolean setEventsEnabled(boolean enabled);",
"public void onStop () {\t\t\n\t\t\n\t}",
"public void disableEndOfProductionButton(){\n this.endOfproductionButton.setEnabled(false);\n }",
"ConferenceScheduleBuilderService endEvent();",
"void disable();",
"void disable();",
"public abstract void Disabled();",
"public abstract void wgb_onDisable();",
"public EndExecuteAllEventsMsciTracksEvent( ) {\n\t}",
"public void onStop();",
"public void onStop() {\n }",
"public void onStop() {\n\t }",
"public void Stop()\r\n {\r\n super.Stop();\r\n\r\n if (getIsLocal())\r\n {\r\n // stop listening to PropertyChanged events\r\n RemoveEvents();\r\n }\r\n }",
"private void setListener() {\n\t}",
"public void onDisabled(Context context) {\n\t}",
"public void disable ( ) {\r\n\t\tenabled = false;\r\n\t}",
"protected void stopWork() {\n mAllowedToBind = false;\n\n }",
"@Override\n public void onEmptyTarget() {\n endIt(eventTimeoutTimerNode.getNode().getId(), factory, defaultCondition.getEnd());\n }"
] |
[
"0.6563464",
"0.6561428",
"0.6560312",
"0.6560312",
"0.65402204",
"0.64806",
"0.6431639",
"0.642919",
"0.641982",
"0.6315322",
"0.62679577",
"0.6240117",
"0.62369037",
"0.62335974",
"0.6185796",
"0.61228395",
"0.6089899",
"0.60408133",
"0.6030185",
"0.603",
"0.5929045",
"0.58994895",
"0.58576185",
"0.57903224",
"0.57589966",
"0.5758014",
"0.57580096",
"0.57466805",
"0.5734715",
"0.5726163",
"0.5724743",
"0.57130736",
"0.57035005",
"0.5701658",
"0.5701057",
"0.568381",
"0.56720287",
"0.56654257",
"0.5632958",
"0.5626877",
"0.56259984",
"0.561526",
"0.56109643",
"0.5604363",
"0.5594357",
"0.55843925",
"0.55688214",
"0.5566885",
"0.5566672",
"0.5558182",
"0.5551104",
"0.5547967",
"0.5541797",
"0.5540927",
"0.5527264",
"0.552592",
"0.5520759",
"0.5517913",
"0.551465",
"0.5504687",
"0.5489205",
"0.54847986",
"0.5478032",
"0.547723",
"0.5474003",
"0.54676205",
"0.5460122",
"0.54410285",
"0.5438546",
"0.5427494",
"0.5419682",
"0.5404909",
"0.5403676",
"0.5401972",
"0.5398336",
"0.53981745",
"0.53974086",
"0.5392754",
"0.53908443",
"0.53908443",
"0.53878725",
"0.5387159",
"0.53853816",
"0.53813845",
"0.5373919",
"0.5372125",
"0.5370275",
"0.5370275",
"0.536794",
"0.53656495",
"0.53615427",
"0.53573745",
"0.53569144",
"0.5355313",
"0.5347207",
"0.5346384",
"0.53459793",
"0.5343093",
"0.53430516",
"0.5335743"
] |
0.59216607
|
21
|
Call the given runnable when the player loads a new music
|
public int addOnLoadEvent(final Runnable runnable) {
if (runnable == null)
throw new IllegalArgumentException("Given paramter is null");
onLoadRunnables.add(runnable);
return onLoadRunnables.indexOf(runnable);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\t\tpublic void onLoaded(String arg0) {\n\t\t\t\tplayer.play();\n\t\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tmFiles = DataSourceManager.getSongFileList(currentAlbumPath);\n\t\t\tif (mFiles == null || mFiles.length == 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (mPlayPos < 0 || mPlayPos > mFiles.length -1) {\n\t\t\t\tmPlayPos = 0;\n\t\t\t}\n\t\t\t/*Message msg = mMediaplayerHandler.obtainMessage(PREPARE_PLAY);\n\t\t\tif (msg == null) {\n\t\t\t\tmsg = new Message();\n\t\t\t\tmsg.what = PREPARE_PLAY;\n\t\t\t\t\n\t\t\t}\n\t\t\tBundle data = new Bundle();\n\t\t\tdata.putString(MSG_PLAY_PATH, mFiles[mPlayPos]);\n\t\t\tdata.putInt(MSG_PLAY_POSITION, mSeek);\n\t\t\tmsg.setData(data);\n\t\t\tmMediaplayerHandler.sendMessage(msg);*/\n\t\t\t\n\t\t\tsendHandlerInitialized(mFiles[mPlayPos], false);\n\t\t}",
"private void initialMusic(){\n\n }",
"public void playMusic() {\n\t\tthis.music.start();\n\t}",
"public void run(){\n\t\ttry {\n\t\t\tSystem.out.println(\"Started Playing music successfully\");\n\t\t\tplay();\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void run() {\n if(musicEnabled) {\n playSoundtrack();\n while (running) {\n if(!stack.isEmpty()) {\n Sound sound = stack.pop();\n sound.play(sound.loadInputStream());\n }\n }\n }\n }",
"public void playMedia() {\n\t\tif (MainActivity.mPlayer == null) {\n\t\t\tMainActivity.mPlayer = new MediaPlayer();\n\t\t\tMainActivity.mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n\t\t\tMainActivity.currentSong = song;\n\t\t\tMainActivity.currentAlbum = album;\n\t\t}\n\t\tif (!MainActivity.currentSong.getTitleKey().equals(song.getTitleKey())) {\n\t\t\tMainActivity.currentSong = song;\n\t\t\tMainActivity.currentAlbum = album;\n\t\t\tMainActivity.mPlayer.reset();\n\t\t}\n\n\t\ttitle = song.getTitle();\n\t\talbumTitle = album.getAlbum();\n\t\talbumArt = album.getAlbumArt();\n\n\t\ttry {\n\t\t\tMainActivity.mPlayer.setDataSource(this, song.getUri());\n\t\t\tMainActivity.mPlayer.prepare();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (SecurityException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalStateException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\tMainActivity.mPlayer.setOnPreparedListener(new OnPreparedListener() {\n\t\t\t@Override\n\t\t\tpublic void onPrepared(MediaPlayer mp) {\n\t\t\t\tmp.start();\n\t\t\t}\n\t\t});\n\t\tMainActivity.mPlayer.setOnCompletionListener(new OnCompletionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tnext();\n\t\t\t}\n\n\t\t});\n\n\t\tnew Handler(getMainLooper()).post(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tupdateMainActivity();\n\t\t\t\tupdateNowPlaying();\n\t\t\t}\n\t\t});\n\t}",
"@Override\n public void run() {\n // TODO Auto-generated method stub\n running = true;\n AudioFile song = musicFiles.get(currentSongIndex);\n song.play();\n while(running){\n if(!song.isPlaying()){\n currentSongIndex++;\n if(currentSongIndex >= musicFiles.size()){\n currentSongIndex = 0;\n }\n song = musicFiles.get(currentSongIndex);\n song.play();\n }\n try{\n Thread.sleep(1);\n }\n catch (InterruptedException e){\n e.printStackTrace();\n } \n }\n }",
"@Override\n\tpublic void OnGameStart() {\n\t\tsuper.OnGameStart();\n\t\tMusicManage.setLoopingMusic(tumMusic, true);\n\t\tMusicManage.playMusic(tumMusic);\n\t}",
"public void initMusicPlayer() {\n PatariSingleton.getInstance().getMediaPlayer().setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK);\n PatariSingleton.getInstance().getMediaPlayer().setAudioStreamType(AudioManager.STREAM_MUSIC);\n PatariSingleton.getInstance().getMediaPlayer().setOnPreparedListener(this);\n PatariSingleton.getInstance().getMediaPlayer().setOnCompletionListener(this);\n PatariSingleton.getInstance().getMediaPlayer().setOnErrorListener(this);\n PatariSingleton.getInstance().getMediaPlayer().setOnBufferingUpdateListener(this);\n try {\n if (wifiLock != null && wifiLock.isHeld()) {\n wifiLock.release();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n try {\n wifiLock = ((WifiManager) getApplication().getApplicationContext().getSystemService(Context.WIFI_SERVICE)).createWifiLock(WifiManager.WIFI_MODE_FULL, \"mylock\");\n wifiLock.acquire();\n } catch (Exception e) {\n e.printStackTrace();\n }\n IS_PROGRESS = false;\n }",
"public static void startMusic()\n\t{\n\t\tmusic.loop();\n\t}",
"@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tmProgressBar.setProgress(0);\n\t\t\t\tif(SINGLE_LOOPS) {\n\t\t\t\t\tplayfunction(path);\n\t\t\t\t} else {\n\t\t\t\t\tList<MusicBean> datas = mAdapter.getData();\n\t\t\t\t\tif(datas.size() > 0) {\n\t\t\t\t\t\tint selectPos = mAdapter.getSelectItemPosi();\n\t\t\t\t\t\tif( ++selectPos >= datas.size())\n\t\t\t\t\t\t\tselectPos = 0;\n\t\t\t\t\t\tmAdapter.setSelectItemPosi(selectPos);\n\t\t\t\t\t\tmAdapter.notifyDataSetChanged();\n\t\t\t\t\t\tpath = \"\";\n\t\t\t\t\t\tplayfunction(path);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void run() {\n MediaSingleton.INSTANCE.ensureSound();\n\n long next = AlarmUtil.millisTillNextInterval(AlarmUtil.Interval.SECOND);\n handler.postDelayed(soundCheck, next);\n }",
"public void StartMusic(int music_id);",
"@Override\n public void run() {\n if (mPlayer != null) {\n if (!mPlayer.isPlaying())\n mPlayer.play();\n }\n }",
"static void testMusicOnCompletionListener()\n\t{\n\t\tif (music == null)\n\t\t{\n\t\t\tloadMusic();\n\t\t}\n\t\t\n\t\tmusicOnCompletionListener.onCompletion(null);\n\t}",
"@Override\n public void initialize() {\n //talonOrchestra.playMusic();\n }",
"@Override\n public void onPrepared(MediaPlayer mp) {\n playMedia();\n }",
"@Override\n\t\t\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\t\t\tambiente.get(1).start();\n\t\t\t\t\t}",
"@Override\n\tpublic void load() {\n\t\thandler.postDelayed(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\trefreshListView.stopLoad();\n\t\t\t}\n\t\t}, 2000);\n\t}",
"public void run() {\n if ((AudioPlayerService.mediaPlayer != null) && AudioPlayerService.prepared){\r\n int currentSeconds = AudioPlayerService.mediaPlayer.getCurrentPosition() / 1000;\r\n\r\n //set the bar's max duration\r\n if (songProgressBar.getMax() != AudioPlayerService.mediaPlayer.getDuration() / 1000){\r\n songProgressBar.setMax(AudioPlayerService.mediaPlayer.getDuration() / 1000);\r\n }\r\n\r\n //if the song has started and is playing\r\n //set the current time and distance along the bar\r\n //then update the bad again\r\n if (currentSeconds >= 0){\r\n if (AudioPlayerService.mediaPlayer.isPlaying()){\r\n String currentDuration = String.format(Locale.US, \"%d:%02d\", currentSeconds / 60, currentSeconds % 60);\r\n songCurrentDurationLabel.setText(currentDuration);\r\n songProgressBar.setProgress(currentSeconds);\r\n mHandler.postDelayed(this, 1000);\r\n }\r\n }\r\n }\r\n }",
"@Override\n\tpublic void onCompletion(Music completedMusic)\n\t{\n\t\t// Plays a randomly selected next song. The completed song will not be played multiple\n\t\t// times in a row. Note that this will not work with only one song.\n\t\tint nextSong = -1;\n\t\twhile (nextSong == -1 || nextSong == currentMusicFile)\n\t\t{\n\t\t\tnextSong = (new Random()).nextInt(music.size());\n\t\t}\n\t\t\n\t\tmusic.get(nextSong).setVolume(musicVolume / 100.f);\n\t\tmusic.get(nextSong).play();\n\t\t\n\t\tsetMusicFileIndex(nextSong);\n\t}",
"@Override\n public void run() {\n mPresenter.loadCameras();\n Log.d(\"Handlers\", \"Refresh lists\");\n // Repeat this the same runnable code block again another 2 seconds\n handler.postDelayed(runnableCode, 5000);\n }",
"@Override\n\tpublic void onPrepared(MediaPlayer mp) {\n\t\tmp.start();\n\t}",
"@Override\n public void onPrepared(MediaPlayer mp) {\n Log.d(TAG, \"onPrepared: GOTTING CALLED\");\n playMedia();\n }",
"public void playSelectSong() {\n isStart = false;\n if (getCurrentSong() == 0) {\n audioList.get(getCurrentSong()).setSelect(true);\n playListAdapter.notifyItemChanged(getCurrentSong());\n }\n isPauseResume = false;\n if (player != null) {\n player.stopMedia();\n }\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n /*new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n }\n }, DELAY_TIME);*/\n }",
"@Override\r\n\t\tpublic void run()\r\n\t\t{\r\n\t\t\tLayeredSound.getInstance().add( sound );\r\n\t\t}",
"@Override\n public void onCompletion(MediaPlayer mp) {\n mp.reset();\n nextMusic();\n\n }",
"@Override\r\n public void getNextSongAndPlaySuccess(SyncListenerSongInfo syncListenerSongInfo) {\n }",
"public void onPrepared(MediaPlayer player) {\n player.start(); \n }",
"@Override\n\tpublic Loader onCreateLoader(int id, Bundle args) {\n\t\treturn new MusicMediaLibaryLoader(getActivity());\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tMusicActivity.lrcView.SetIndex(new LrcIndex().LrcIndex());\n\t\t\tMusicActivity.lrcView.invalidate();\n\t\t\tmHandler.postDelayed(mRunnable, 100);\n\t\t}",
"public void play() {\n\t\tmusic.play();\n\t\tsyncPosition();\n\t}",
"@Override\n public void onSeekComplete() {\n if (info.playing) {\n player.start();\n player.setOnSeekCompletionListener(null);\n } else {\n Log.w(TAG, \"Audio stopping while waiting for loop to re-start\");\n }\n }",
"public void initMusic() {\r\n mSoundPool = new SoundPool(3, AudioManager.STREAM_MUSIC, 0);\r\n mSoundClick = mSoundPool.load(getActivity(), R.raw.click, 1);\r\n mSoundCorrect = mSoundPool.load(getActivity(), R.raw.correct, 1);\r\n mSoundIncorrect = mSoundPool.load(getActivity(), R.raw.wrong, 1);\r\n }",
"public static void loadPlaylist()\n {\n if (JSoundsMainWindowViewController.alreadyPlaying)\n JSoundsMainWindowViewController.stopSong();\n \n JSoundsMainWindowViewController.shutDownPlayer();\n JSoundsMainWindowViewController.isPlaylist=true;\n JSoundsMainWindowViewController.playlistOrderBy(true, false, false);\n }",
"void onLoaderFinished();",
"public void StartMusic(musicenum_t music_id);",
"private void play() {\n /** Memanggil File MP3 \"indonesiaraya.mp3\" */\n try {\n mp.prepare();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /** Menjalankan Audio */\n mp.start();\n\n /** Penanganan Ketika Suara Berakhir */\n mp.setOnCompletionListener(new OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n stateAwal();\n }\n });\n }",
"public Music loadMusic(String fileName);",
"@Override\n\tpublic void run() {\n\t\t\n\t\t\n\t\ttry {\n\t\t\tMusiikki.rajahdysaani = new Sound(\"res/shell1.ogg\");\n\t\t\tMusiikki.tykkiaani = new Sound(\"res/gun.ogg\");\n\t\t\tMusiikki.musiikki = new Music(\"res/sendme.ogg\");\n\t\t} catch (SlickException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tMusiikki.musiikki.setVolume(1/2);\n\t\tMusiikki.musiikki.loop();\n\t\t\n\t}",
"@Override\n public void run(){\n Initialize();\n // Load game files (images, sounds, ...)\n LoadContent();\n \n Framework.gameState = Framework.GameState.PLAYING;\n }",
"@Override\n public void run(){\n Initialize();\n // Load game files (images, sounds, ...)\n LoadContent();\n \n Framework.gameState = Framework.GameState.PLAYING;\n }",
"public static void nextSong()\n {\n MusicPlayerControl.nextSong();\n }",
"public void UpdateSounds(mobj_t listener);",
"@Override\n protected final void onLoad() {\n fireDebug(\"QuickTime Player plugin\");\n playerWidget.setSize(\"100%\", _height);\n setWidth(_width);\n\n Timer tt = new Timer() {\n\n @Override\n public void run() {\n impl = QuickTimePlayerImpl.getPlayer(playerId);\n try {\n String v = impl.getPluginVersion();\n if (v != null) {\n cancel();\n fireDebug(\"Plugin Version : \" + v);\n manager.registerMediaStateListener(impl, handler, \"\");\n firePlayerStateEvent(PlayerStateEvent.State.Ready);\n playlistManager.load(0);\n }\n } catch (Exception e) {\n }\n }\n };\n tt.scheduleRepeating(200); // IE workarround ...\n }",
"@Override\r\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tmMediaPlaer.start();\r\n\t\t\t}",
"public static void next() {\r\n if (nextMusic_ == INVALID_NUMBER) {\r\n return;\r\n }\r\n currentMusic_ = nextMusic_;\r\n nextMusic_ = INVALID_NUMBER;\r\n MediaPlayer p = players_.get(currentMusic_);\r\n if (p != null) {\r\n if (!p.isPlaying()) {\r\n p.setLooping(true);\r\n p.setOnCompletionListener(null);\r\n p.start();\r\n }\r\n }\r\n }",
"@Override\n\tpublic void nowPlaying() {\n\t}",
"void startMusic(AudioTrack newSong);",
"public void loadMusic(File f) {\n music = new MP3(f);\n }",
"public void play(){\n Log.d(TAG, \"startAudio: called\");\n if(mMediaPlayer!=null){\n\n mMediaPlayer.start();\n mProgressBar.setProgress(mMediaPlayer.getCurrentPosition());\n mProgressBar.setMax(mMediaPlayer.getDuration());\n\n // updating progress bar\n seekHandler.postDelayed(updateSeekBar, 5);\n }\n }",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tViewData.refreshSongListViewFromData(MainActivity.this, getSongListTask.list, songlistview, radiogroup);\r\n\t\t\t\t\t}",
"public void onPrepared(MediaPlayer player) {\n //player.start();\n }",
"private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }",
"public void playerUpdate(Player player, String event, Object eventData) {\n if (event.equals(PlayerListener.END_OF_MEDIA)) {\n if ((!myShouldPause) && (!myGamePause)) {\n try {\n myPlayer.start();\n } catch (Exception e) {\n // the music isn't necessary, so we ignore exceptions.\n }\n }\n }\n }",
"@Override\n public void onPrepared(MediaPlayer mp) {\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 }",
"@Override\n public void onCompletion(MediaPlayer mp) {\n setViewOnFinish();\n log(\"Playing completed\");\n }",
"@Override\n public void handle(RewindEvent event) {\n if (isPlayerAlive()) {\n player.dispose();\n }\n playlist.prev();\n player = new MediaPlayer(playlist.getCurrentMedia());\n initPlay();\n }",
"public void playSong() {\n player.reset();\n Song playedSong;\n //get the right song\n if (shuffle) {\n int newSong = shuffleIndexes.get(songPosn);\n playedSong = songs1.get(newSong);\n } else {\n playedSong = songs1.get(songPosn);\n }\n songTitle = playedSong.getSongName();\n Uri uri = Uri.parse(playedSong.getSongLocation());\n try {\n player.setDataSource(getApplicationContext(), uri);\n } catch (Exception e) {\n Log.e(\"MUSIC SERVICE\", \"Error setting data source\", e);\n }\n state = PlaybackStateCompat.STATE_PLAYING;\n player.prepareAsync();\n showNotification();\n }",
"public static void next(){\n \n mediaPlayer.stop();\n \n if(nowPlayingIndex < currentPlayingList.size() - 1){\n Song songToPlay = currentPlayingList.get(nowPlayingIndex + 1);\n String songFile = new File(songToPlay.getLocation()).toURI().toString();\n \n Media media = new Media(songFile);\n MusicPlayer.mediaPlayer = new MediaPlayer(media);\n MusicPlayer.mediaPlayer.play();\n \n MusicPlayer.setNowPlaying(songToPlay);\n \n addProgressListener();\n }\n //Play song at top of list, since were at the end\n else{\n Song songToPlay = currentPlayingList.get(0);\n String songFile = new File(songToPlay.getLocation()).toURI().toString();\n \n Media media = new Media(songFile);\n MusicPlayer.mediaPlayer = new MediaPlayer(media);\n MusicPlayer.mediaPlayer.play();\n \n MusicPlayer.setNowPlaying(songToPlay);\n \n addProgressListener();\n }\n mainController.nowPlayingArtist.setText(MusicPlayer.getPlayingSong().getArtist());\n mainController.nowPlayingSong.setText(MusicPlayer.getPlayingSong().getTitle());\n mainController.timeRemaining.setText(MusicPlayer.getPlayingSong().getLength());\n }",
"public void loadMusicPlayer(File musicDirectory, final String path, final ArrayList<String> songs, final ArrayList<String> folders)\n {\n\n System.out.println(\"original song list that we are using when loading songs is \" + songs);\n\n // todo: make the startup layout to be a fragment so that we can get rid of this. This is horrible design principle, but this works for now anyway.\n RelativeLayout startuplayout = (RelativeLayout) findViewById(com.example.thenotoriousrog.tornadomusicplayer.R.id.startup_layout); // get the startup layout here.\n startuplayout.removeAllViews(); // remove all the views from this layout.\n startuplayout.setBackground(null); // this completely removes the background of our startup layout. Which does not fix our activity.\n\n final FragmentManager fragmentManager = getFragmentManager();\n final FragmentTransaction mainLayoutTransaction = fragmentManager.beginTransaction(); // start a FragmentTransaction for the mainlayout.\n final LoadingScreenFragment loadingScreenFragment = new LoadingScreenFragment();\n\n final Thread convertToSongInfoThread = new Thread(new PopulateSongInfoList(songs, folders, MusicPlayer.this, musicDirectory)); // create a Thread to have the lists become SongInfo's instead of paths.\n\n // this will allow us to show the loading screen while we wait for the thread to finish its work in the background.\n AsyncTask<Void, Void, Boolean> waitForCompletion = new AsyncTask<Void, Void, Boolean>() {\n\n // this method controls what is done in the background.\n @Override\n protected Boolean doInBackground(Void... params)\n {\n\n mainLayoutTransaction.replace(com.example.thenotoriousrog.tornadomusicplayer.R.id.startup_layout, loadingScreenFragment);\n //mainLayoutTransaction.addToBackStack(null);\n mainLayoutTransaction.show(loadingScreenFragment);\n mainLayoutTransaction.commit(); // show this fragment while waiting for the songsInfo list to be set.\n\n convertToSongInfoThread.start(); // start the thread\n\n while(convertToSongInfoThread.isAlive()){\n // do nothing until the thread has finished.\n }\n\n mainLayoutTransaction.remove(loadingScreenFragment); // remove the loading fragment after we have finished with our loading screen.\n return true;\n }\n\n // controls what is being done after the background task has finished.\n @Override\n protected void onPostExecute(Boolean result)\n {\n System.out.println(\"result was true!\");\n\n // TODO: check to see if this is a good place to place these pieces of code here.\n // tell the app that the app has loaded for the first and that there is no need to do it agin.\n SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(getBaseContext()).edit(); // edit the base preferences to help the app\n editor.putBoolean(\"FirstTimeStarting\", true); // tell the app that the app has started loading for the first time.\n editor.putString(\"MusicDirectoryPath\", path); // set the path to be used for the app.\n editor.commit(); // commit the changes.\n\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n\n mainUIFragment = new MainUIFragment();\n\n Bundle fragmentArgs = new Bundle(); // this will allow us to set arguments for the main layout.\n fragmentArgs.putStringArrayList(\"songs\", songs); // send the arraylist of song paths.\n fragmentArgs.putStringArrayList(\"folders\", folders); // send in the arraylist of folders.\n\n ArrayList<SongInfo> alphabeticalSongInfoList = alphabetizeSongs(getSongInfoList()); // returns a new arraylist that has been alphabetized according to song name.\n fragmentArgs.putParcelableArrayList(\"songInfoList\", alphabeticalSongInfoList); // let us send the alphabetical SongInfo list to the MainUIFragment!\n fragmentArgs.putString(\"musicFolderPath\", path); // send in the music file path.\n\n // Write the arraylist object to main memory\n String ser = SerializeObject.objectToString(alphabeticalSongInfoList); // make our alphabetized list the object we want to save to main memory.\n if(ser != null && !ser.equalsIgnoreCase(\"\"))\n {\n SerializeObject.WriteSettings(getBaseContext(), ser, \"SongInfoList.dat\");\n }\n else\n {\n System.out.println(\"WE DID NOT WRITE THE LIST CORRECTLY, SOMETHING BAD HAPPENED.\");\n SerializeObject.WriteSettings(getBaseContext(), \"\", \"SongInfoList.dat\"); // we should be getting this list if we are something bad has happened.\n }\n\n\n mainUIFragment.setArguments(fragmentArgs);\n // the .replace may break here.\n transaction.replace(R.id.startup_layout, mainUIFragment); // replace the loading screen with the main layout.\n transaction.addToBackStack(null); // nothing to go back when the user hits the back button.\n transaction.commit(); // commit the fragment to be shown.\n }\n };\n\n waitForCompletion.execute(null, null, null); // have the AsyncTask finishes it's work.\n }",
"public static void updateMusic()\r\n\t{\r\n\t\tif ( Settings.isMusicOn() && !musicPlaying() )\r\n\t\t\tstartMusic();\r\n\t\telse if ( !Settings.isMusicOn() && musicPlaying() )\r\n\t\t\tstopMusic();\r\n\t}",
"private static void loadMusic()\n\t{\n\t\t// TODO: update this with the correct file names.\n\t\tmusic = new ArrayList<Music>();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tmusic.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"Lessons-8bit.mp3\"))));\n\t\t\tmusic.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"bolo_menu.mp3\"))));\n\t\t\t//music.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"song2.ogg\"))));\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(e);\n\t\t\te.printStackTrace();\n\t\t\tthrow e;\n\t\t}\n\t}",
"private void startLoader(){\n LoaderManager loaderManager = getSupportLoaderManager();\n Loader<Cursor> movieLoader = loaderManager.getLoader(MOVIE_LOADER);\n if(movieLoader == null)\n loaderManager.initLoader(MOVIE_LOADER, null, this);\n else\n loaderManager.restartLoader(MOVIE_LOADER, null, this);\n }",
"public void onPrepared(MediaPlayer mp) {\n\t\t\t\tmp.start();\n\t\t\t}",
"public static void load() {\n\n\t\ttry {\n\t\t\t// Insert audio load ex:\n\t\t\tmusicMap.put(\"music\", new Music(\"res/menuMusic.wav\"));\n\t\t} catch (SlickException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public void play() {\n\t\tif(currentPlayingItem==null) return;\n\t\tif(!mediaPlayer.isPlaying()) mediaPlayer.start();\n\t\tupdateNotification();\n\t\tsendBroadcast(new Intent(\"com.andreadec.musicplayer.playpausechanged\"));\n\t}",
"public void onPlayStart(){\n\n\t}",
"public static void playerRun()\n {\n runSound.playLooped();\n }",
"public void run() \r\n\t\t{\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tsourcedata.play();\r\n\t\t\t\t//sourcedata.load();\r\n\t\t\t}\r\n\t\t\tcatch ( Exception e )\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}//end catch\r\n\t\t}",
"@Override\n\tpublic void perform() {\n\t\tSystem.out.println(\"Playing \" + song);\n\t\tinstrument.play();\n\t}",
"public static void startMusic()\n\t{\n\t\tif (music == null)\n\t\t{\n\t\t\tloadMusic();\n\t\t\tif (music.size() < 2)\n\t\t\t{\n\t\t\t\tthrow new GameLogicException(\"At least two songs must be specified.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurrentMusicFile = 0;\n\t\tmusic.get(currentMusicFile).setVolume(musicVolume / 100.f);\n\t\tmusic.get(currentMusicFile).play();\n\t\tmusic.get(currentMusicFile).setOnCompletionListener(musicOnCompletionListener);\n\t}",
"@Override\r\n public void loadPianoAudioFinish() {\n }",
"@Override\n\tpublic void onCompletion(MediaPlayer arg0) {\n\t}",
"@Override\n public void onCompletion(MediaPlayer mp) {\n if(isRepeat){\n // repeat is on play same song again\n playSong(currentSongIndex);\n } else if(isShuffle){\n // shuffle is on - play a random song\n Random rand = new Random();\n currentSongIndex = rand.nextInt((songsList.size() - 1) - 0 + 1) + 0;\n playSong(currentSongIndex);\n } else{\n // no repeat or shuffle ON - play next song\n if(currentSongIndex < (songsList.size() - 1)){\n playSong(currentSongIndex + 1);\n currentSongIndex = currentSongIndex + 1;\n }else{\n // play first song\n playSong(0);\n currentSongIndex = 0;\n }\n }\n\n }",
"public void loop() {\n\t\tmusic.loop();\n\t\tsyncPosition();\n\t}",
"public static void startMusic()\r\n\t{\r\n\t\tif ( musicPlayer == null )\r\n\t\t\tmusicPlayer = new MusicPlayer( \"Music2.mid\" );\r\n\t\telse\r\n\t\t\tmusicPlayer.play();\r\n\t}",
"@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n play();\n }",
"@Override\n public void onResume() {\n super.onResume();\n MusicManager.start(this, prefs.getBoolean(\"bgMusic\", true));\n }",
"@Override\r\n\tpublic void start() {\n\t\tmediaPlayer.start();\r\n\t}",
"@Override\n public void restartLoader() {\n for (final MusicStateListener listener : mMusicStateListener) {\n if (listener != null) {\n listener.restartLoader();\n }\n }\n }",
"public void start() {\n \tif (mediaChangedListener != null) {\n \t\tmediaChangedListener.onStarted();\n \t}\n mMediaPlayer.start();\n }",
"public void run()\n\t{\t\t\t\t\n\t\tif (player!=null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tplayer.play();\t\t\t\t\n\t\t\t}\n\t\t\tcatch (JavaLayerException ex)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Problem playing audio: \"+ex);\n\t\t\t}\t\t\t\n\t\t}\n\t}",
"public void onLoadMenuMyPlaylistSelected();",
"private void start() {\n\t\t// 开启播放器\n\t\tmCurrentMediaPlayer.start();\n\t\tsetState(STARTED);\n\n\t\t// 开启计时心跳\n\t\tmHandler.postDelayed(mUpdateTimeTask, 500);\n\t\tif (mPlayerEngineListener != null) {\n\t\t\tmPlayerEngineListener.onTrackStart();\n\t\t}\n\t\t// 开启频谱\n\t\t// mHandler.postDelayed(mSetFxAndUI, 500);\n\t\t// setupVisualizerFxAndUI();\n\n\t\tLog.i(this.getClass().getSimpleName(), \" music player : started...\");\n\t}",
"private void updateRunnable() {\n updateSeekBar = new Runnable() {\n @Override\n public void run() {\n playerSeekBar.setProgress(mediaPlayer.getCurrentPosition());\n seekBarHandler.postDelayed(this, 500);\n }\n };\n }",
"public void launch() {\n if (volume == 0f) {\n return;\n }\n MediaPlayer launch = MediaPlayer.create(context, R.raw.fire);\n launch.setVolume(volume, volume);\n launch.start();\n launch.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mediaPlayer) {\n mediaPlayer.reset();\n mediaPlayer.release();\n }\n });\n }",
"@Override\n public void onCompletion(MediaPlayer mediaPlayer) {\n stopMusic();\n }",
"@Override\n\tpublic void run() {\n\t\twhile(isRun){\n\t\t\ttry {\n\t\t\t\tThread.sleep(200);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif(null != player){\n\t\t\t\tint position = player.getCurrentPosition();\n\t\t\t\tint total = player.getDuration();\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.putExtra(\"position\", position);\n\t\t\t\tintent.putExtra(\"total\", total);\n\t\t\t\tsendBroadcast(intent);\n\t\t\t}\n\t\t\tif(null != player){\n\t\t\t\tif(player.isPlaying()){\n\t\t\t\t\tplaying = true;\n\t\t\t\t}else{\n\t\t\t\t\tplaying = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void run() {\n if (newPlaying) {\n conductorPanel.sessionStarted(this.session);\n } else {\n conductorPanel.sessionStopped();\n }\n }",
"@Override\n public void run() {\n handler.postDelayed(runnableCode, apiCallFrequency);\n\n //Initiates reload of forceLoad() in TickerLoader\n reload();\n }",
"void onLoaderLoading();",
"@Override\r\n\tpublic void run() {\n\t\tInputStream in;\r\n\t\tAudioStream as;\r\n\r\n\t\ttry {\r\n\t\r\n\t\t\tin = new FileInputStream(new File(\"heart123.wav\"));\r\n\t\t\tas = new AudioStream(in);\r\n\r\n\t\t\t\tSystem.out.println(\"thread started\");\r\n\t\t\t\tAudioPlayer.player.start(as);\r\n\t\t\t\t\r\n\r\n\t\t\t//AudioPlayer.player.sleep(1000);\r\n\t\t\t//AudioPlayer.player.stop(as);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n public void show()\r\n {\r\n // De inmediato, ponemos en marcha una melodia\r\n if (!juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).isPlaying())\r\n {\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).play();\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).setLooping(true);\r\n }\r\n }",
"private void setPlayerCallbacks() {\n universalPlayer.setPlayerStateListener(this);\n universalPlayer.setOnAutonomicTrackChangeCallback(new IOperationFinishCallback() {\n @Override\n public void operationFinished() {\n if (isAdded()) {\n playableMediaItem = UniversalPlayer.getInstance().getPlayingMediaItem();\n initPlayerUI();\n configurePlayer();\n initTrackNumbersSection();\n }\n }\n });\n\n IOperationFinishCallback playerFailedCallback = MediaUtils.getPlayerFailCallback(getActivity(), playableMediaItem);\n\n if (universalPlayer.isInErrorState) {\n playerFailedCallback.operationFinished();\n } else {\n universalPlayer.setOnPlayingFailedCallback(playerFailedCallback);\n }\n }",
"@Override\n public void onLoaderReset(Loader<ArrayList<Movie>> loader) {\n }",
"@Override\r\n\t\tpublic void run() {\n\t\t\tsuper.run();\r\n\t\t\twhile(bPlayAudioQueue){\r\n\t\t\t\tplayFromAudioQueue();\r\n\t\t\t}\r\n\t\t}",
"void runInAudioThread(Runnable runnable) {\n executor.execute(runnable);\n }",
"private void startMusic() {\r\n final Format input1 = new AudioFormat(AudioFormat.MPEGLAYER3);\r\n final Format input2 = new AudioFormat(AudioFormat.MPEG);\r\n final Format output = new AudioFormat(AudioFormat.LINEAR);\r\n PlugInManager.addPlugIn(\r\n \"com.sun.media.codec.audio.mp3.JavaDecoder\",\r\n new Format[]{input1, input2},\r\n new Format[]{output},\r\n PlugInManager.CODEC\r\n );\r\n try {\r\n final File f = new File(\"support_files//tetris.mp3\");\r\n myPlayer = Manager.createPlayer(new MediaLocator(f.toURI().toURL()));\r\n } catch (final NoPlayerException | IOException e) {\r\n e.printStackTrace();\r\n }\r\n if (myPlayer != null) {\r\n myPlayer.start();\r\n }\r\n }",
"@Override\n public void handle(ForwardEvent event) {\n if (isPlayerAlive()) {\n player.dispose();\n }\n playlist.next();\n player = new MediaPlayer(playlist.getCurrentMedia());\n initPlay();\n }"
] |
[
"0.6995005",
"0.68966764",
"0.6663873",
"0.6366316",
"0.6266756",
"0.62519735",
"0.6230768",
"0.621968",
"0.6179535",
"0.6177649",
"0.6175982",
"0.61758345",
"0.61461616",
"0.6133818",
"0.6131234",
"0.6127913",
"0.6118352",
"0.60638326",
"0.60422224",
"0.6014155",
"0.5967315",
"0.5963436",
"0.59527355",
"0.5932699",
"0.59313506",
"0.59303534",
"0.591273",
"0.59044653",
"0.5901368",
"0.59002537",
"0.58973926",
"0.58922476",
"0.58919793",
"0.5882605",
"0.5874063",
"0.5861355",
"0.58586675",
"0.585429",
"0.5849049",
"0.5846522",
"0.58444226",
"0.5834665",
"0.5834665",
"0.5814046",
"0.58079076",
"0.5789505",
"0.5788877",
"0.5787261",
"0.5786333",
"0.5773959",
"0.5772749",
"0.5767992",
"0.57634777",
"0.57627356",
"0.57479817",
"0.5745204",
"0.57425624",
"0.5739908",
"0.57398057",
"0.5739484",
"0.57362664",
"0.5735002",
"0.5733815",
"0.57254696",
"0.57195586",
"0.57189614",
"0.57099193",
"0.56980336",
"0.56979835",
"0.5685931",
"0.56780934",
"0.56780803",
"0.56728494",
"0.56673175",
"0.56669885",
"0.5666974",
"0.5662435",
"0.56446123",
"0.56379324",
"0.5636923",
"0.5634233",
"0.5631566",
"0.56232053",
"0.562078",
"0.56193197",
"0.5614861",
"0.56085724",
"0.56064135",
"0.5604506",
"0.55747867",
"0.55669045",
"0.55642724",
"0.55606776",
"0.5554937",
"0.55530375",
"0.5553012",
"0.554415",
"0.5542165",
"0.5541747",
"0.55415606",
"0.5540997"
] |
0.0
|
-1
|
Call the given runnable when the player starts to play the loaded music
|
public int addOnPlayEvent(final Runnable runnable) {
if (runnable == null)
throw new IllegalArgumentException("Given paramter is null");
onPlayRunnables.add(runnable);
return onPlayRunnables.indexOf(runnable);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\t\tpublic void onLoaded(String arg0) {\n\t\t\t\tplayer.play();\n\t\t}",
"public void playMusic() {\n\t\tthis.music.start();\n\t}",
"public void run(){\n\t\ttry {\n\t\t\tSystem.out.println(\"Started Playing music successfully\");\n\t\t\tplay();\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tmFiles = DataSourceManager.getSongFileList(currentAlbumPath);\n\t\t\tif (mFiles == null || mFiles.length == 0) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (mPlayPos < 0 || mPlayPos > mFiles.length -1) {\n\t\t\t\tmPlayPos = 0;\n\t\t\t}\n\t\t\t/*Message msg = mMediaplayerHandler.obtainMessage(PREPARE_PLAY);\n\t\t\tif (msg == null) {\n\t\t\t\tmsg = new Message();\n\t\t\t\tmsg.what = PREPARE_PLAY;\n\t\t\t\t\n\t\t\t}\n\t\t\tBundle data = new Bundle();\n\t\t\tdata.putString(MSG_PLAY_PATH, mFiles[mPlayPos]);\n\t\t\tdata.putInt(MSG_PLAY_POSITION, mSeek);\n\t\t\tmsg.setData(data);\n\t\t\tmMediaplayerHandler.sendMessage(msg);*/\n\t\t\t\n\t\t\tsendHandlerInitialized(mFiles[mPlayPos], false);\n\t\t}",
"@Override\n public void run() {\n if (mPlayer != null) {\n if (!mPlayer.isPlaying())\n mPlayer.play();\n }\n }",
"@Override\n public void run() {\n if(musicEnabled) {\n playSoundtrack();\n while (running) {\n if(!stack.isEmpty()) {\n Sound sound = stack.pop();\n sound.play(sound.loadInputStream());\n }\n }\n }\n }",
"public void play() {\n\t\tmusic.play();\n\t\tsyncPosition();\n\t}",
"public void run()\n\t{\t\t\t\t\n\t\tif (player!=null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tplayer.play();\t\t\t\t\n\t\t\t}\n\t\t\tcatch (JavaLayerException ex)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Problem playing audio: \"+ex);\n\t\t\t}\t\t\t\n\t\t}\n\t}",
"private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }",
"public static void startMusic()\n\t{\n\t\tmusic.loop();\n\t}",
"private void start() {\n\t\t// 开启播放器\n\t\tmCurrentMediaPlayer.start();\n\t\tsetState(STARTED);\n\n\t\t// 开启计时心跳\n\t\tmHandler.postDelayed(mUpdateTimeTask, 500);\n\t\tif (mPlayerEngineListener != null) {\n\t\t\tmPlayerEngineListener.onTrackStart();\n\t\t}\n\t\t// 开启频谱\n\t\t// mHandler.postDelayed(mSetFxAndUI, 500);\n\t\t// setupVisualizerFxAndUI();\n\n\t\tLog.i(this.getClass().getSimpleName(), \" music player : started...\");\n\t}",
"@Override\n public void run() {\n // TODO Auto-generated method stub\n running = true;\n AudioFile song = musicFiles.get(currentSongIndex);\n song.play();\n while(running){\n if(!song.isPlaying()){\n currentSongIndex++;\n if(currentSongIndex >= musicFiles.size()){\n currentSongIndex = 0;\n }\n song = musicFiles.get(currentSongIndex);\n song.play();\n }\n try{\n Thread.sleep(1);\n }\n catch (InterruptedException e){\n e.printStackTrace();\n } \n }\n }",
"public void start() {\n setPlayerState(State.STARTED);\n mMediaPlayer.start();\n notifyPlaying();\n }",
"public void playMedia() {\n\t\tif (MainActivity.mPlayer == null) {\n\t\t\tMainActivity.mPlayer = new MediaPlayer();\n\t\t\tMainActivity.mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n\t\t\tMainActivity.currentSong = song;\n\t\t\tMainActivity.currentAlbum = album;\n\t\t}\n\t\tif (!MainActivity.currentSong.getTitleKey().equals(song.getTitleKey())) {\n\t\t\tMainActivity.currentSong = song;\n\t\t\tMainActivity.currentAlbum = album;\n\t\t\tMainActivity.mPlayer.reset();\n\t\t}\n\n\t\ttitle = song.getTitle();\n\t\talbumTitle = album.getAlbum();\n\t\talbumArt = album.getAlbumArt();\n\n\t\ttry {\n\t\t\tMainActivity.mPlayer.setDataSource(this, song.getUri());\n\t\t\tMainActivity.mPlayer.prepare();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (SecurityException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalStateException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tLog.i(TAG, e.getMessage(), e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\tMainActivity.mPlayer.setOnPreparedListener(new OnPreparedListener() {\n\t\t\t@Override\n\t\t\tpublic void onPrepared(MediaPlayer mp) {\n\t\t\t\tmp.start();\n\t\t\t}\n\t\t});\n\t\tMainActivity.mPlayer.setOnCompletionListener(new OnCompletionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tnext();\n\t\t\t}\n\n\t\t});\n\n\t\tnew Handler(getMainLooper()).post(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tupdateMainActivity();\n\t\t\t\tupdateNowPlaying();\n\t\t\t}\n\t\t});\n\t}",
"public static void playerRun()\n {\n runSound.playLooped();\n }",
"@Override\r\n\tpublic void start() {\n\t\tmediaPlayer.start();\r\n\t}",
"@Override\n\tpublic void OnGameStart() {\n\t\tsuper.OnGameStart();\n\t\tMusicManage.setLoopingMusic(tumMusic, true);\n\t\tMusicManage.playMusic(tumMusic);\n\t}",
"public void play(){\n Log.d(TAG, \"startAudio: called\");\n if(mMediaPlayer!=null){\n\n mMediaPlayer.start();\n mProgressBar.setProgress(mMediaPlayer.getCurrentPosition());\n mProgressBar.setMax(mMediaPlayer.getDuration());\n\n // updating progress bar\n seekHandler.postDelayed(updateSeekBar, 5);\n }\n }",
"private void startPlaying() {\n try {\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(audioFile.getAbsolutePath());\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"prepare() failed\");\n }\n showTimer(false);\n } catch (Exception e) {\n logException(e, \"MicManualFragment_startPlaying()\");\n }\n\n }",
"public void onPrepared(MediaPlayer player) {\n player.start(); \n }",
"@Override\n\tpublic void onPrepared(MediaPlayer mp) {\n\t\tmp.start();\n\t}",
"public void play() {\n\t\tif(currentPlayingItem==null) return;\n\t\tif(!mediaPlayer.isPlaying()) mediaPlayer.start();\n\t\tupdateNotification();\n\t\tsendBroadcast(new Intent(\"com.andreadec.musicplayer.playpausechanged\"));\n\t}",
"private void play() {\n /** Memanggil File MP3 \"indonesiaraya.mp3\" */\n try {\n mp.prepare();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /** Menjalankan Audio */\n mp.start();\n\n /** Penanganan Ketika Suara Berakhir */\n mp.setOnCompletionListener(new OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n stateAwal();\n }\n });\n }",
"public void start() {\n \tif (mediaChangedListener != null) {\n \t\tmediaChangedListener.onStarted();\n \t}\n mMediaPlayer.start();\n }",
"public void play() {\n\t\tif(hasAudioLoaded()) {\n\t\t\tcurrentClip.start();\n\t\t\tisPlaying = true;\n\t\t}\n\t}",
"public static void startMusic()\r\n\t{\r\n\t\tif ( musicPlayer == null )\r\n\t\t\tmusicPlayer = new MusicPlayer( \"Music2.mid\" );\r\n\t\telse\r\n\t\t\tmusicPlayer.play();\r\n\t}",
"@Override\n public void onPrepared(MediaPlayer mp) {\n playMedia();\n }",
"@Override\r\n\tpublic void run() {\n\t\tInputStream in;\r\n\t\tAudioStream as;\r\n\r\n\t\ttry {\r\n\t\r\n\t\t\tin = new FileInputStream(new File(\"heart123.wav\"));\r\n\t\t\tas = new AudioStream(in);\r\n\r\n\t\t\t\tSystem.out.println(\"thread started\");\r\n\t\t\t\tAudioPlayer.player.start(as);\r\n\t\t\t\t\r\n\r\n\t\t\t//AudioPlayer.player.sleep(1000);\r\n\t\t\t//AudioPlayer.player.stop(as);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\t\r\n\t}",
"public void onPrepared(MediaPlayer player) {\n //player.start();\n }",
"private void startPlay() {\n isPlaying = true;\n isPaused = false;\n playMusic();\n }",
"public void start() {\n background.playMusic();\n createTimer();\n timer.start();\n }",
"@Override\n public void run(){\n Initialize();\n // Load game files (images, sounds, ...)\n LoadContent();\n \n Framework.gameState = Framework.GameState.PLAYING;\n }",
"@Override\n public void run(){\n Initialize();\n // Load game files (images, sounds, ...)\n LoadContent();\n \n Framework.gameState = Framework.GameState.PLAYING;\n }",
"public void StartMusic(int music_id);",
"public void play() {\n\t\ttry {\n\t\t\tthis.mMediaPlayer.start();\n\t\t\tLog.w(\"AUDIO PLAYER\", \"just started playing\");\n\t\t} catch (IllegalStateException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.isPlaying = true;\n\t\tthis.incrementPlaybackTime();\n\t}",
"private void initialMusic(){\n\n }",
"protected void playS()\n\t\t{\n\t\t\tplayer.start();\n\t\t}",
"public void playerStarted () {\n this.setState(STATE.MEDIA_RUNNING);\n\n // Send status notification to JavaScript\n sendStatusChange(MEDIA_DURATION, null, null);\n }",
"@Override\n public void initialize() {\n //talonOrchestra.playMusic();\n }",
"public void playSelectSong() {\n isStart = false;\n if (getCurrentSong() == 0) {\n audioList.get(getCurrentSong()).setSelect(true);\n playListAdapter.notifyItemChanged(getCurrentSong());\n }\n isPauseResume = false;\n if (player != null) {\n player.stopMedia();\n }\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n /*new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (!isDestroyed()) {\n playAudio(audioList.get(getCurrentSong()).getData());\n }\n }\n }, DELAY_TIME);*/\n }",
"public static void startMusic()\n\t{\n\t\tif (music == null)\n\t\t{\n\t\t\tloadMusic();\n\t\t\tif (music.size() < 2)\n\t\t\t{\n\t\t\t\tthrow new GameLogicException(\"At least two songs must be specified.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurrentMusicFile = 0;\n\t\tmusic.get(currentMusicFile).setVolume(musicVolume / 100.f);\n\t\tmusic.get(currentMusicFile).play();\n\t\tmusic.get(currentMusicFile).setOnCompletionListener(musicOnCompletionListener);\n\t}",
"public void onPrepared(MediaPlayer mp) {\n\t\t\t\tmp.start();\n\t\t\t}",
"public void run() {\n if ((AudioPlayerService.mediaPlayer != null) && AudioPlayerService.prepared){\r\n int currentSeconds = AudioPlayerService.mediaPlayer.getCurrentPosition() / 1000;\r\n\r\n //set the bar's max duration\r\n if (songProgressBar.getMax() != AudioPlayerService.mediaPlayer.getDuration() / 1000){\r\n songProgressBar.setMax(AudioPlayerService.mediaPlayer.getDuration() / 1000);\r\n }\r\n\r\n //if the song has started and is playing\r\n //set the current time and distance along the bar\r\n //then update the bad again\r\n if (currentSeconds >= 0){\r\n if (AudioPlayerService.mediaPlayer.isPlaying()){\r\n String currentDuration = String.format(Locale.US, \"%d:%02d\", currentSeconds / 60, currentSeconds % 60);\r\n songCurrentDurationLabel.setText(currentDuration);\r\n songProgressBar.setProgress(currentSeconds);\r\n mHandler.postDelayed(this, 1000);\r\n }\r\n }\r\n }\r\n }",
"public void initMusicPlayer() {\n PatariSingleton.getInstance().getMediaPlayer().setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK);\n PatariSingleton.getInstance().getMediaPlayer().setAudioStreamType(AudioManager.STREAM_MUSIC);\n PatariSingleton.getInstance().getMediaPlayer().setOnPreparedListener(this);\n PatariSingleton.getInstance().getMediaPlayer().setOnCompletionListener(this);\n PatariSingleton.getInstance().getMediaPlayer().setOnErrorListener(this);\n PatariSingleton.getInstance().getMediaPlayer().setOnBufferingUpdateListener(this);\n try {\n if (wifiLock != null && wifiLock.isHeld()) {\n wifiLock.release();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n try {\n wifiLock = ((WifiManager) getApplication().getApplicationContext().getSystemService(Context.WIFI_SERVICE)).createWifiLock(WifiManager.WIFI_MODE_FULL, \"mylock\");\n wifiLock.acquire();\n } catch (Exception e) {\n e.printStackTrace();\n }\n IS_PROGRESS = false;\n }",
"public void play() {\n\t\ttry {\n\t\t\taudioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void playSong() {\n player.reset();\n Song playedSong;\n //get the right song\n if (shuffle) {\n int newSong = shuffleIndexes.get(songPosn);\n playedSong = songs1.get(newSong);\n } else {\n playedSong = songs1.get(songPosn);\n }\n songTitle = playedSong.getSongName();\n Uri uri = Uri.parse(playedSong.getSongLocation());\n try {\n player.setDataSource(getApplicationContext(), uri);\n } catch (Exception e) {\n Log.e(\"MUSIC SERVICE\", \"Error setting data source\", e);\n }\n state = PlaybackStateCompat.STATE_PLAYING;\n player.prepareAsync();\n showNotification();\n }",
"public void play()\n {\n this.mediaPlayer = new MediaPlayer(file);\n this.mediaPlayer.setVolume(volume);\n\n // Listener for end of media.\n mediaPlayer.setOnEndOfMedia(() -> {\n this.mediaPlayer.stop();\n });\n\n mediaPlayer.play();\n }",
"public void startPlaying(String file) {\n if (this.readyPlayer() && this.player != null) {\n this.player.playAsync(file);\n } else {\n LOG.d(LOG_TAG, \"startPlaying error, not ready\");\n }\n }",
"@Override\n public void playStart() {\n }",
"public void start() {\n AudioPlayer.player.start(cas);\n playing = true;\n }",
"@Override\n\tpublic void run() {\n\t\t\n\t\t\n\t\ttry {\n\t\t\tMusiikki.rajahdysaani = new Sound(\"res/shell1.ogg\");\n\t\t\tMusiikki.tykkiaani = new Sound(\"res/gun.ogg\");\n\t\t\tMusiikki.musiikki = new Music(\"res/sendme.ogg\");\n\t\t} catch (SlickException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tMusiikki.musiikki.setVolume(1/2);\n\t\tMusiikki.musiikki.loop();\n\t\t\n\t}",
"@Override\n\tpublic void run() \n\t{\n\t\ttry {\n\t\t\tplay();\n\t\t} catch (JavaLayerException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void run() \r\n\t\t{\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tsourcedata.play();\r\n\t\t\t\t//sourcedata.load();\r\n\t\t\t}\r\n\t\t\tcatch ( Exception e )\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}//end catch\r\n\t\t}",
"public final void play() {\n\t\tinitialize();\n\t\tstartPlay();\n\t\tendPlay();\n\t}",
"@Override\n public void onPrepared(MediaPlayer mp) {\n Log.d(TAG, \"onPrepared: GOTTING CALLED\");\n playMedia();\n }",
"public void play() {\n executor.submit(new Runnable() {\n public void run() {\n resume = true;\n notifyStatus();\n }\n });\n }",
"@Override\r\n\t\tpublic void run() {\n\t\t\tsuper.run();\r\n\t\t\twhile(bPlayAudioQueue){\r\n\t\t\t\tplayFromAudioQueue();\r\n\t\t\t}\r\n\t\t}",
"@Override\n\t\t\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\t\t\tambiente.get(1).start();\n\t\t\t\t\t}",
"@Override\n\tpublic void perform() {\n\t\tSystem.out.println(\"Playing \" + song);\n\t\tinstrument.play();\n\t}",
"public void startPlaying() {\n \t\tif (!isPlaying) {\n \t\t\tisPlaying = true;\n \t\t\tnew PlayThread().start();\n \t\t}\n \t}",
"@Override\r\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tmMediaPlaer.start();\r\n\t\t\t}",
"private void startMusic() {\r\n final Format input1 = new AudioFormat(AudioFormat.MPEGLAYER3);\r\n final Format input2 = new AudioFormat(AudioFormat.MPEG);\r\n final Format output = new AudioFormat(AudioFormat.LINEAR);\r\n PlugInManager.addPlugIn(\r\n \"com.sun.media.codec.audio.mp3.JavaDecoder\",\r\n new Format[]{input1, input2},\r\n new Format[]{output},\r\n PlugInManager.CODEC\r\n );\r\n try {\r\n final File f = new File(\"support_files//tetris.mp3\");\r\n myPlayer = Manager.createPlayer(new MediaLocator(f.toURI().toURL()));\r\n } catch (final NoPlayerException | IOException e) {\r\n e.printStackTrace();\r\n }\r\n if (myPlayer != null) {\r\n myPlayer.start();\r\n }\r\n }",
"public void startSong() {\n if (trackPlaying) {\n trackPlaying = false;\n mp.finish();\n\n System.out.print(mp.isFinished() + \"+\" + mp.isPaused());\n }\n\t\n\t//The startSong overloads start and pause. If the song is pause, then resume.\n if (mp.isPaused() && !mp.isFinished()) {\n mp.resume();\n return;\n }\n\n sequence = sc.getSongSequence();\n try {\n mp.start(sequence);\n } catch (InvalidMidiDataException ex) {\n Logger.getLogger(uMusicPlayerController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (MidiUnavailableException ex) {\n Logger.getLogger(uMusicPlayerController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n play();\n }",
"public void play() { player.resume();}",
"protected void play() {\n if (player != null) {\n player.play();\n mSeekBarUpdateHandler.removeCallbacks(mUpdateSeekBar);\n mSeekBarUpdateHandler.postDelayed(mUpdateSeekBar, 100);\n }\n }",
"public void play() {\n\t\tfor (int i = 0; i < this.songList.size() - 1; i++) {\n\t\t\tthis.songList.get(i).play();\n\t\t}\n\t}",
"@Override\n\tpublic void playerStarted() {\n mPlaying = true;\n\t\tmStateManager.setState(PlayerState.PLAYING);\n\t}",
"public void playContent() {\n this.taskHandler.run(this::inlinePlay);\n }",
"public void playSound() {\n\t\tmediaPlayer.play();\n\t}",
"public void onPlayStart(){\n\n\t}",
"public void play() {\n\t\tplay(true, true);\n\t}",
"public void play() {\n\t\t\r\n\t}",
"private void playSound() {\n\t\tif (controllerVars.isLoaded() && !controllerVars.isPlays()) {\n\t\t\tcontrollerVars.getSoundPool().play(controllerVars.getSoundID(), controllerVars.getVolume(), controllerVars.getVolume(), 1, 0, 1f);\n\t\t\tcontrollerVars.COUNTER++;\n\t\t\t//Toast.makeText(act, \"Played sound\", Toast.LENGTH_SHORT).show();optional Playing message \n\t\t\tcontrollerVars.setPlays(true);\n\t\t\tonComplete(controllerVars.getMediaPlayer().getDuration());\n\t\t}\n\t\t//controllerVars.getMediaPlayer().start();\n\t\t//controllerVars.setPlays(true);\n\t}",
"void runInAudioThread(Runnable runnable) {\n executor.execute(runnable);\n }",
"@Override\r\n\t\tpublic void run()\r\n\t\t{\r\n\t\t\tLayeredSound.getInstance().add( sound );\r\n\t\t}",
"public void onPlayerPlay() {\n\t\trunOnUiThread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tplay.setVisibility(View.GONE);\n\t\t\t\tpause.setVisibility(View.VISIBLE);\n\t\t\t\tsetCurrentTrack();\n\t\t\t}\n\t\t});\n\t}",
"private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}",
"@Override\n public void run() {\n vPauseImageViewEntertainingFactActivity.setVisibility(View.INVISIBLE);\n vPlayImageViewEntertainingFactActivity.setVisibility(View.VISIBLE);\n mediaPlayer.start();\n }",
"private void setupPlayer() {\n player = MediaPlayer.create(MediaPlayerActivity.this, R.raw.byte_music);\n updateState(MediaPlayerState.STATE_PREPARED);\n }",
"@Override\n public void onSeekComplete() {\n if (info.playing) {\n player.start();\n player.setOnSeekCompletionListener(null);\n } else {\n Log.w(TAG, \"Audio stopping while waiting for loop to re-start\");\n }\n }",
"public void play() {\n\n String filename = (String)audioList.getSelectedValue();\n if(filename == null) { // nothing selected\n return;\n }\n slider.setValue(0);\n boolean successful = player.play(new File(AUDIO_DIR, filename));\n if(successful) {\n showInfo(filename + \" (\" + player.getDuration() + \" seconds)\");\n }\n else {\n showInfo(\"Could not play file - unknown format\");\n }\n }",
"public void playerUpdate(Player player, String event, Object eventData) {\n if (event.equals(PlayerListener.END_OF_MEDIA)) {\n if ((!myShouldPause) && (!myGamePause)) {\n try {\n myPlayer.start();\n } catch (Exception e) {\n // the music isn't necessary, so we ignore exceptions.\n }\n }\n }\n }",
"@Override\n\tpublic void run() {\n\t\twhile(isRun){\n\t\t\ttry {\n\t\t\t\tThread.sleep(200);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif(null != player){\n\t\t\t\tint position = player.getCurrentPosition();\n\t\t\t\tint total = player.getDuration();\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.putExtra(\"position\", position);\n\t\t\t\tintent.putExtra(\"total\", total);\n\t\t\t\tsendBroadcast(intent);\n\t\t\t}\n\t\t\tif(null != player){\n\t\t\t\tif(player.isPlaying()){\n\t\t\t\t\tplaying = true;\n\t\t\t\t}else{\n\t\t\t\t\tplaying = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void run() {\n \tif (playerHasPlayed) {\n \t\tmyHandler.removeCallbacksAndMessages(null);\n \t\tmyProgressBar.setProgress(0);\n \t} else {\n myProgressBar.setProgress(myProgressBar.getProgress()-CLICK_TIME);\n \t}\n \t//If time runs out, switch turns, reset progress bar, and start player turn\n \tif (myProgressBar.getProgress() == 0) {\n \t\tredTurn = !redTurn;\n \t\tmyProgressBar.setProgress(myProgressBar.getMax());\n \t\tstartPlayer();\n \t\t\n \t} else {\n \t\tmyHandler.postDelayed(myProgresser,CLICK_TIME);\n \t}\n \n }",
"@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\tmProgressBar.setProgress(0);\n\t\t\t\tif(SINGLE_LOOPS) {\n\t\t\t\t\tplayfunction(path);\n\t\t\t\t} else {\n\t\t\t\t\tList<MusicBean> datas = mAdapter.getData();\n\t\t\t\t\tif(datas.size() > 0) {\n\t\t\t\t\t\tint selectPos = mAdapter.getSelectItemPosi();\n\t\t\t\t\t\tif( ++selectPos >= datas.size())\n\t\t\t\t\t\t\tselectPos = 0;\n\t\t\t\t\t\tmAdapter.setSelectItemPosi(selectPos);\n\t\t\t\t\t\tmAdapter.notifyDataSetChanged();\n\t\t\t\t\t\tpath = \"\";\n\t\t\t\t\t\tplayfunction(path);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"public void Play() {\n superPlaneGodMode = false;\r\n if (!musicPlaying)\r\n backgroundMusic.pause();\r\n if (musicPlaying)\r\n backgroundMusic.start();\r\n paused = false;\r\n }",
"public void launch() {\n if (volume == 0f) {\n return;\n }\n MediaPlayer launch = MediaPlayer.create(context, R.raw.fire);\n launch.setVolume(volume, volume);\n launch.start();\n launch.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mediaPlayer) {\n mediaPlayer.reset();\n mediaPlayer.release();\n }\n });\n }",
"public void run() {\n\t\t try {\n\t\t Clip clip = AudioSystem.getClip();\n\t\t //AudioInputStream inputStream = AudioSystem.getAudioInputStream(\n\t\t //Main.class.getResourceAsStream(\"/path/to/sounds/\" + url));\n\t\t //clip.open(inputStream);\n\t\t clip.start(); \n\t\t } catch (Exception e) {\n\t\t System.err.println(e.getMessage());\n\t\t }\n\t\t }",
"public void preparePlayer() {\n player.start();\n state = PlaybackStateCompat.STATE_PLAYING;\n Intent onPreparedIntent = new Intent(\"MEDIA_PLAYER_PREPARED\");\n LocalBroadcastManager.getInstance(this).sendBroadcast(onPreparedIntent);\n // set AUTO so when the song ends - it will start the next song automatically\n action = AUTO;\n }",
"public void play()\n\t{\n\t\tif (canPlay)\n\t\t{\n\t\t\tsong.play();\n\t\t\tsong.rewind();\n\t\t\tif (theSong == \"SG1\" || theSong == \"SG2\")\n\t\t\t\tcanPlay = false;\n\t\t}\n\t}",
"public void play() {\n\t\tint requestStatus = mAudioManager.requestAudioFocus(\n\t\t\t\tmAudioFocusListener, AudioManager.STREAM_MUSIC,\n\t\t\t\tAudioManager.AUDIOFOCUS_GAIN);\n\n\t\tif (DEBUG)\n\t\t\tLog.d(TAG, \"Starting playback: audio focus request status = \"\n\t\t\t\t\t+ requestStatus);\n\n\t\tif (requestStatus != AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {\n\t\t\treturn;\n\t\t}\n\n\t\tmAudioManager.registerMediaButtonEventReceiver(new ComponentName(this\n\t\t\t\t.getPackageName(), MediaButtonIntentReceiver.class.getName()));\n\n\t\tif (mPlayer.isInitialized()) {\n\t\t\t// if we are at the end of the song, go to the next song first\n\t\t\tlong duration = mPlayer.duration();\n\t\t\tif (mRepeatMode != REPEAT_CURRENT && duration > 2000\n\t\t\t\t\t&& mPlayer.position() >= duration - 2000) {\n\t\t\t\tgotoNext(true);\n\t\t\t}\n\n\t\t\tmPlayer.start();\n\t\t\t// make sure we fade in, in case a previous fadein was stopped\n\t\t\t// because\n\t\t\t// of another focus loss\n\t\t\tmMediaplayerHandler.removeMessages(FADEDOWN);\n\t\t\tmMediaplayerHandler.sendEmptyMessage(FADEUP);\n\n\t\t\tif (!mIsSupposedToBePlaying) {\n\t\t\t\tmIsSupposedToBePlaying = true;\n\t\t\t\tnotifyChange(EVENT_PLAYSTATE_CHANGED);\n\t\t\t}\n\n\t\t\tupdateNotification();\n\t\t} else if (mPlayListLen <= 0) {\n\t\t\t// This is mostly so that if you press 'play' on a bluetooth headset\n\t\t\t// without every having played anything before, it will still play\n\t\t\t// something.\n\t\t\tshuffleAll();\n\t\t}\n\t}",
"public void run() \n {\n try\n {\n Clip clip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(getClass().getResource(sound));\n clip = AudioSystem.getClip();\n clip.open(inputStream);\n clip.start(); \n } catch (UnsupportedAudioFileException e) {\n \t\t\te.printStackTrace();\n } catch (IOException e) {\n \t\t\te.printStackTrace();\n } catch (LineUnavailableException e) {\n \t\t\te.printStackTrace();\n }\n }",
"private void startPlaying() {\n if (null == curRecordingFileName)\n return;\n Log.e(TAG, \"Start playing file: \" + curRecordingFileName);\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(curRecordingFileName);\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n Log.e(TAG, \"Couldn't prepare and start MediaPlayer\");\n }\n\n }",
"@Override\r\n public void loadPianoAudioStart() {\n }",
"public void play() {\n Selection selection;\n if ((selection = master.getWindowManager().getMain().getSelection()) == null) {\n startPlay();\n playShow(nextStartTime, -1 / 1000.0);\n } else {\n playSelection(selection);\n playShow(selection.start, selection.duration);\n }\n }",
"public void StartMusic(musicenum_t music_id);",
"public synchronized void startPlayingSong(final Song selectedSong, final String path) {\n try {\n if (path != null) {\n PatariSingleton.getInstance().getMediaPlayer().setDataSource(path);\n MusicService.this.sendBroadcast(new Intent(Utils.BR_ACTION_NEW_SONG_PLAYED));\n PatariSingleton.getInstance().getMediaPlayer().prepareAsync();\n } else if (Utils.isOnline(this)) {\n PatariSingleton.getInstance().getMediaPlayer().setDataSource(selectedSong.getAudio());\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n IS_PROGRESS = true;\n PatariSingleton.getInstance().getMediaPlayer().prepareAsync();\n MusicService.this.sendBroadcast(new Intent(Utils.BR_ACTION_NEW_SONG_PLAYED));\n } else {\n sendBroadcast(new Intent(MainActivity.TAG_LOADING).putExtra(\"status\", false));\n stopSelf();\n AppDialog.showToast(getApplicationContext(), getString(R.string.internet_required_alert));\n }\n } catch (Exception e) {\n PLog.showLog(\"PlaySong()\", e.getMessage());\n }\n }",
"protected void startMediaPlayer() {\n\n Log.i(LOG_TAG, \"startMediaPlayer\");\n\n // If media player is pause or playing, just play\n if (mpState.equals(RadioPlayerService.MP_PAUSED)) {\n // Play!!!\n mediaPlayer.start();\n radioStation.setPlaying(true);\n playingTimeRunning = true;\n setMPState(RadioPlayerService.MP_PLAYING);\n sendStatus();\n\n //Retrieve meta data from server\n if (radioStation.getListenType().equals(\"0\") || radioStation.getListenType().equals(\"1\")) {\n refreshMetadata(radioStation.getListenUrl());\n }\n\n } else if (mpState.equals(RadioPlayerService.MP_PLAYING)) {\n //We are already playing, well do nothing\n\n } else if (mpState.equals(RadioPlayerService.MP_ERROR)) {\n\n //Media player should be reset\n\n } else {\n //Because prepareAsync() can take too long if radio station server isn't reachable, check for it\n setMPState(RadioPlayerService.MP_CONNECTING);\n mediaPlayer.prepareAsync();\n sendStatus();\n }\n\n }",
"public void play() {\n\t\tSystem.out.println(\"playing \"+title);\r\n\t}",
"private void play()\r\n {\r\n String filename = (String)fileList.getSelectedValue();\r\n if(filename == null) { // nothing selected\r\n return;\r\n }\r\n // slider.setValue(0);\r\n boolean successful = player.play(new File(AUDIO_DIR, filename));\r\n if(successful) {\r\n showInfo(filename + \" (\" + player.getDuration() + \" seconds)\");\r\n }\r\n else {\r\n showInfo(\"Could not play file - unknown format\");\r\n }\r\n }"
] |
[
"0.748675",
"0.72205985",
"0.721966",
"0.71399534",
"0.70136607",
"0.6931267",
"0.6890451",
"0.68823314",
"0.67230314",
"0.6703847",
"0.66943246",
"0.6672817",
"0.6652023",
"0.66476315",
"0.6642849",
"0.66149247",
"0.6596356",
"0.6571616",
"0.65626025",
"0.65506595",
"0.654579",
"0.65295994",
"0.6485114",
"0.646831",
"0.6431731",
"0.6417559",
"0.6411654",
"0.64115417",
"0.63803726",
"0.637923",
"0.636593",
"0.635829",
"0.635829",
"0.63557273",
"0.6351513",
"0.63502467",
"0.63402635",
"0.6328786",
"0.63231933",
"0.6319995",
"0.63167346",
"0.6277488",
"0.6255637",
"0.6248828",
"0.62433887",
"0.62416255",
"0.62397647",
"0.6236971",
"0.62220275",
"0.62187743",
"0.6218139",
"0.621681",
"0.6212074",
"0.62045157",
"0.61964",
"0.61868036",
"0.6176203",
"0.6170999",
"0.6168055",
"0.6166359",
"0.6162692",
"0.6156217",
"0.6149136",
"0.6146742",
"0.6146494",
"0.6128545",
"0.6122307",
"0.6121101",
"0.61120445",
"0.6095705",
"0.6092056",
"0.60794145",
"0.6075064",
"0.60749114",
"0.6039187",
"0.6037856",
"0.6031661",
"0.6024149",
"0.6010665",
"0.601059",
"0.6006989",
"0.59987307",
"0.59986836",
"0.59938186",
"0.5981561",
"0.5968755",
"0.5968273",
"0.5967324",
"0.5965279",
"0.59652126",
"0.5958018",
"0.59489506",
"0.5943226",
"0.5942185",
"0.59370154",
"0.59238213",
"0.5922716",
"0.5920925",
"0.5914424",
"0.59079176",
"0.590759"
] |
0.0
|
-1
|
Log.d(TAG, "onResponse: " + url); Log.d(TAG, "onResponse: " + response.body().string());
|
@Override
public void onResponse(Call call, Response response) throws IOException {
String html = null;
try {
JSONObject jsonObject = new JSONObject(response.body().string()).getJSONObject("data");
// Log.d(TAG, "onResponse: " + jsonObject);
// OneData.contentData = new Gson().fromJson(jsonObject.toString(), OneContentData.class);
html = jsonObject.getString("html_content");
// Todo: Jsoup解析一下
Log.d(TAG, "onResponse: " + html.substring(html.indexOf("body", 0), html.length()));
} catch (JSONException e) {
e.printStackTrace();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void onResponse(String response) {\n Log.d(DEBUG_TAG, \"Response is: \"+ response);\n }",
"@Override\n\t\t\tpublic void onResponse(Response response) throws IOException {\n Log.i(\"info\",response.body().string());\n\t\t\t}",
"@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(String response) {\n System.out.println(response.toString());\n }",
"@Override\n public void onResponse(String response)\n {\n\n }",
"@Override\n public void onResponse(String response) {\n }",
"public void onResponse(Response response) throws Exception;",
"@Override\n public void onResponse(String response) {\n System.out.println(\"Recieved Response: \" + response);\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(String response) {\n }",
"public void onRequestResponse(Response response) { }",
"@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }",
"@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }",
"@Override\n public void onResponse(String response) {\n Utils.logApiResponseTime(calendar, tag + \" \" + url);\n mHandleSuccessResponse(tag, response);\n\n }",
"@Override\n public void onResponse(Call call, final Response response) throws IOException {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n// TextView responseText = findViewById(R.id.responseText);\n try {\n// responseText.setText(response.body().string());\n Log.d(\"Flask Server\",response.body().string());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n });\n }",
"@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }",
"@Override\n public void onResponse(String response) {\n try {\n JSONObject obj = new JSONObject(response);\n String content = obj.getString(\"content\");\n getAPI.setText(\"Response is: \" + content);\n } catch (JSONException error) {\n getAPI.setText(\"That didn't work!\");\n error.printStackTrace();\n }\n }",
"@Override\n\t\t\t\t\tpublic void onResponse(String response) {\n\n\t\t\t\t\t}",
"@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }",
"@Override\n public void onResponse(String response) {\n parseData(url, response);\n }",
"@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }",
"@Override\n public void onResponse(String response) {\n Toast.makeText(Details.this, \"\" + response, Toast.LENGTH_LONG).show();\n }",
"@Override\n public void onResponse(String response) {\n mTextView.setText(\"Response is: \" + response);\n }",
"@Override\n public void onResponse(Response response) throws IOException {\n }",
"@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n Log.d(\"Text on webpage: \", \"\" + response);\n checkResponse(response);\n }",
"@Override\n\t\t\t\t\tpublic void onResponse(String s) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n public void run() {\n try {\n// responseText.setText(response.body().string());\n Log.d(\"Flask Server\",response.body().string());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }",
"@Override\r\n public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {\n\r\n\r\n }",
"@Override\n public void onCompleted(GraphResponse response) {\n Log.d(\"GraphAPI FB debug\", String.valueOf(response));\n Log.d(\"GraphAPI FB debug\", response.toString());\n }",
"@Override\r\n public void onErrorResponse(VolleyError error) {\n System.out.print(error.toString());\r\n Log.d(\"TAG\", error.toString());\r\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n System.out.println(\"GET request error\");\n }",
"@Override\n public void onResponse(String response) {\n Toast.makeText(DemoLocationActivity.this,response,Toast.LENGTH_SHORT).show();\n\n }",
"@Override\r\n\t\t\t\t\tpublic void onResponse(HttpResponse resp) {\n\t\t\t\t\t\tLog.i(\"HttpPost\", \"Success\");\r\n\r\n\t\t\t\t\t}",
"@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \"getDataFromUrl.onErrorResponse: \" + error);\n\n }",
"@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }",
"@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }",
"@Override\r\n public void onResponse(String response) {\n button.setText(\"Response is: \" + response);\r\n Log.i(NAME, response);\r\n }",
"@Override\n public void success(Response result, Response response) {\n BufferedReader reader = null;\n\n //An string to store output from the server\n String output = \"\";\n\n try {\n //Initializing buffered reader\n reader = new BufferedReader(new InputStreamReader(result.getBody().in()));\n\n //Reading the output in the string\n output = reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //Displaying the output as a toast\n Toast.makeText(MainActivity.this, output, Toast.LENGTH_LONG).show();\n }",
"@Override\n public void onResponse(Response response) throws IOException {\n if (!response.isSuccessful()) {\n //Here our reponse is UnSucessfull so we inform the user\n // about the same as before\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n return;\n }\n //If Response is sucessfull we move forward and convert the\n // reponse which is in JSON format to String\n String respFromApi = response.body().string();\n\n //We will Log this LogCat in order to view the Raw Format recieved\n //you can open the log cat go in debug section and type RawData you\n // will be able to observe data there\n Log.d(\"RawData\", respFromApi);\n\n //Now We will call Extract Data Function which will retrieve the\n // woied and name of each city from the response\n try {\n extractData(respFromApi);\n } catch (Exception e) {\n //Informing Data is Not in JSON Format\n Toast.makeText(MainActivity.this, \"Response Not in JSON Format\", Toast.LENGTH_SHORT).show();\n }\n ;\n }",
"@Override\n public void onResponse(Call<Response> call, retrofit2.Response<Response> response) {\n }",
"@Override\n public void onResponse(String response) {\n opprettListe(response);\n }",
"String getResponse();",
"@Override\n public void onResponse(String response) {\n // try/catch block for returned JSON data\n // see API's documentation for returned format\n try {\n JSONObject result = new JSONObject(response);\n JSONArray resultList = result.getJSONArray(\"outputs\");\n JSONObject inner = resultList.getJSONObject(0);\n String out = inner.getString(\"output\");\n output.setText(\" \"+out);\n\n // catch for the JSON parsing error\n } catch (JSONException e) {\n Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }",
"@Override\n public void onResponse(String response) {\n Toast.makeText(ContainerActivity.this, \"hey\", Toast.LENGTH_SHORT).show();\n Log.d(\"exito\", \"la peticion ha sido tramitada con exito\");\n }",
"@Override\n public void onResponse(String s) {\n loading.dismiss();\n try {\n //Showing toast message of the response\n Toast.makeText(UpdateQueryActivity.this, s , Toast.LENGTH_LONG).show();\n }catch (Exception e){\n Log.i(\"Volley_Response: \",e.toString());\n }\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n //This code is executed if there is an error.\n System.out.println(error.toString());\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n //This code is executed if there is an error.\n System.out.println(error.toString());\n }",
"@Override\n public void onResponse(String response) {\n response = response.substring(response.indexOf(\"og:video:url\\\" content=\\\"\") + 23);\n response = response.substring(0, response.indexOf(\".mp4\") + 4);\n UrlFilm = response;\n Log.i(\"HTML\", \" \" + response);\n }",
"@Override\n public void onResponse(String response) {\n response = response.substring(response.indexOf(\"og:video:url\\\" content=\\\"\") + 23);\n response = response.substring(0, response.indexOf(\".mp4\") + 4);\n UrlFilm = response;\n Log.i(\"HTML\", \" \" + response);\n }",
"@Override\n public void onResponse(Call<ResponseContent> call, Response<ResponseContent> response) {//obtener datos\n\n ResponseContent data = response.body();\n\n Log.i( mss.TAG, \"error \"+ data.getBody().toString() );\n\n }",
"java.lang.String getResponse();",
"@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n System.out.println();\n Log.d(\"ERROR\", error.toString());\n\n }",
"@Override\n public void onResponse(String response) {\n Log.i(\"Checking\", response + \" \");\n if(new ServerReply(response).getStatus())\n {\n Toast.makeText(context,new ServerReply(response).getReason(),Toast.LENGTH_LONG).show();\n }\n\n }",
"@Override\n public void onResponseSuccess(final String resp) {\n }",
"public void fetchHeadLocations(String url, final VolleyResponseListener volleyResponseListener){\r\n try {\r\n final RequestQueue queue = Volley.newRequestQueue(mContext);\r\n\r\n StringRequest req = new StringRequest(Request.Method.GET, url,\r\n new Response.Listener<String>() {\r\n @Override\r\n public void onResponse(String s) {\r\n volleyResponseListener.onSuccess(s);\r\n }\r\n }, new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError volleyError) {\r\n volleyResponseListener.onError(volleyError);\r\n Log.v(\"see error responce\",volleyError.toString());\r\n }\r\n })\r\n\r\n {\r\n\r\n\r\n @Override\r\n protected Response<String> parseNetworkResponse(NetworkResponse response) {\r\n Log.v(\"see error responce\",response.toString());\r\n return super.parseNetworkResponse(response);\r\n\r\n\r\n }\r\n\r\n @Override\r\n protected Map<String, String> getParams(){\r\n HashMap<String, String> params = new HashMap<String, String>();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n return params;\r\n }\r\n };\r\n queue.add(req);\r\n\r\n\r\n\r\n }catch (Exception e){\r\n Log.v(\"see error responce\",e.toString());\r\n\r\n }\r\n\r\n }",
"@Override\n public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {\n JSONObject mdata = new JSONObject();\n\n try {\n ResponseBody mObj = response.body();\n mdata = new JSONObject(mObj.string());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n switch (response.code()) {\n case 500:\n// showMessage(mContext, \"Sorry! Something went wrong. Please try after sometime\");\n mUtilities.writeLog(\"500:Server error\");\n mOnRequestComplete.requestFailed(mMethod);\n break;\n case 400:\n// showMessage(mContext, \"Sorry! Unexpected error occurred. Please try after sometime\");\n mUtilities.writeLog(\"400:Bad request\");\n mOnRequestComplete.requestFailed(mMethod);\n break;\n case 404:\n// showMessage(mContext, \"Sorry! Unexpected error occurred. Please try after sometime\");\n mUtilities.writeLog(\"404:Page Not Found\");\n mOnRequestComplete.requestFailed(mMethod);\n break;\n case 200:\n mOnRequestComplete.requestComplete(mMethod, mdata);\n break;\n case 201:\n mOnRequestComplete.requestComplete(mMethod, mdata);\n break;\n default:\n// showMessage(mContext, \"Sorry! Unexpected error occurred. Please try after sometime\");\n mOnRequestComplete.requestFailed(mMethod);\n break;\n }\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"error\",error.toString());\n }",
"@Override\n\t\t\t\t\t\tpublic void onResponse(String response) {\n\t\t\t\t\t\t\tparseRespense(response);\n\t\t\t\t\t\t}",
"@Override\n public void onResponse(String response) {\n if(null != listener){\n listener.onComplete(mRespHandler.parse(response));\n }\n }",
"@Override\n public void onResponse(String response) {\n try {\n JSONObject data = new JSONObject(response);\n distance = data.getJSONArray(\"rows\").getJSONObject(0).getJSONArray(\"elements\")\n .getJSONObject(0).getJSONObject(\"distance\").getString(\"text\");\n duration = data.getJSONArray(\"rows\").getJSONObject(0).getJSONArray(\"elements\")\n .getJSONObject(0).getJSONObject(\"duration\").getString(\"text\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onResponse(String s) {\n loading.dismiss();\n //Showing toast message of the response\n Toast.makeText(MainActivity.this, s , Toast.LENGTH_LONG).show();\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n }",
"@Override\n \t\t\t\tpublic void finished(Response response) {\n \t\t\t\t\tLog.w(\"myApp\", response.getResult() + \" \" + response.getError());\n \t\t\t\t}",
"@Override\n \t\t\t\tpublic void finished(Response response) {\n \t\t\t\t\tLog.w(\"myApp\", response.getResult() + \" \" + response.getError());\n \t\t\t\t}",
"private static String paseResponse(HttpResponse response) {\n\t\tHttpEntity entity = response.getEntity();\n\t\t\n//\t\tlog.info(\"response status: \" + response.getStatusLine());\n\t\tString charset = EntityUtils.getContentCharSet(entity);\n//\t\tlog.info(charset);\n\t\t\n\t\tString body = null;\n\t\ttry {\n if (entity != null) { \n InputStream instreams = entity.getContent(); \n body = convertStreamToString(instreams); \n// System.out.println(\"result:\" + body);\n } \n//\t\t\tlog.info(body);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn body;\n\t}",
"@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n System.out.println(\"ERRO: \"+ error.getMessage());\n }",
"@Override\n\t\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t\tSystem.out.println(arg0);\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }",
"@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }",
"void onHTTPRequest(HTTPRequest request, HTTPResponse response);",
"@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response.toString());\n displayGraphResult(response);\n }",
"@Override\n public void onResponse(Call call, final Response response) throws IOException {\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n try {\n responseString = response.body().string();\n textView.setText(\"Request: \" + requestString + \"\\nResponse: \"+responseString);\n tts.speak(responseString);\n\n } catch (IOException e) {\n e.printStackTrace();\n tts.speak(\"Failed to contact the server\");\n }\n }\n });\n }",
"@Override\n public void onResponse(JSONObject response) {\n dismissLoading();\n try {\n String message = response.getString(\"message\");\n showToast(message);\n onBack();\n } catch (Exception e) {\n e.printStackTrace();\n showToast(\"Response parse error\");\n }\n }",
"void onResponse(String response, int requestId);",
"@Override\n public void onResponse(Call call, Response response) throws IOException {\n String jsonStr = response.body().string();\n Log.i(TAG, \"onResponse: --------------------------------\" + jsonStr);\n parseJsonAndUpdateView(jsonStr.trim());\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"ERROR\",\"error => \"+error.toString());\n }",
"@Override\n public void onResponse(Call<Response> call, retrofit2.Response<Response> response) {\n }",
"@Override\n public void onCompleted() {\n responseObserver.onCompleted();\n }",
"@Test\n public void printResponse(){\n when().get(\"http:://34.223.219.142:1212/ords/hr/countries\")\n .body().prettyPrint();\n\n }",
"@Override\n public void onResponse(Call<MyResponse> call, Response<MyResponse> response) {\n Log.e(\"Retrofit Response!\", \"Hello inside\");\n Log.e(\"ResponseCode\", String.valueOf(response.code()));\n if(response.isSuccessful())\n {\n Toast.makeText(SendMessage.this, \"Message Sent!\", Toast.LENGTH_SHORT).show();\n finish();\n }\n }",
"@Override\n public void onResponse(Object response) {\n activity.gotHelper(\"Succes!\");\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"Events: \", error.toString());\n\n Toast.makeText(context,\n error.toString(),\n Toast.LENGTH_SHORT).show();\n }"
] |
[
"0.7976833",
"0.7790717",
"0.7672358",
"0.7664883",
"0.7664883",
"0.7664883",
"0.7629827",
"0.76112884",
"0.75854176",
"0.75643647",
"0.755163",
"0.7491633",
"0.738545",
"0.7345729",
"0.73289764",
"0.7296666",
"0.7277347",
"0.71810687",
"0.71439385",
"0.7078861",
"0.704265",
"0.70329076",
"0.7015202",
"0.69742876",
"0.6915618",
"0.68887246",
"0.6864147",
"0.68411964",
"0.6838493",
"0.6765601",
"0.67006963",
"0.66677755",
"0.6655576",
"0.6642559",
"0.66414887",
"0.6633218",
"0.6615625",
"0.6610586",
"0.6591753",
"0.65593946",
"0.6545834",
"0.6544455",
"0.65341705",
"0.6523862",
"0.6519066",
"0.65090954",
"0.6506171",
"0.6488021",
"0.6486889",
"0.64592946",
"0.6448956",
"0.6448956",
"0.64435077",
"0.64435077",
"0.6440012",
"0.64378244",
"0.64278126",
"0.64243245",
"0.6419667",
"0.63914573",
"0.638518",
"0.6379968",
"0.6378629",
"0.6352416",
"0.63410443",
"0.63376504",
"0.6331437",
"0.6324222",
"0.6324222",
"0.6324222",
"0.6324222",
"0.6324222",
"0.6324222",
"0.6324222",
"0.6324222",
"0.6324222",
"0.6324222",
"0.6324222",
"0.6324222",
"0.63225347",
"0.63225347",
"0.6317943",
"0.63076305",
"0.6303942",
"0.63037455",
"0.62919295",
"0.6287363",
"0.6283884",
"0.62806016",
"0.6279774",
"0.6278163",
"0.6275494",
"0.6265836",
"0.6259453",
"0.62531066",
"0.62493545",
"0.62328494",
"0.6209788",
"0.62096405",
"0.6184924"
] |
0.7015133
|
23
|
inflate the menu; this adds items to the action bar if needed
|
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
if(BuildConfig.DEBUG) {
MenuItem generate = menu.findItem(R.id.mainmenu_generate_data);
generate.setVisible(true);
}
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\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\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@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\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\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 MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, 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\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@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 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 public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.cartab, menu);\r\n //getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@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 inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\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\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\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\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\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 inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n\n\n\n\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 boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.aufgabe, menu);\n\t\treturn true;\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 public boolean onCreateOptionsMenu(Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.order_list_actions,menu);\n if(isFinalized){\n MenuItem item = menu.findItem(R.id.action_finalized);\n item.setVisible(false);\n //this.invalidateOptionsMenu();\n }\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\npublic boolean onCreateOptionsMenu(Menu menu) {\ngetMenuInflater().inflate(R.menu.main, menu);\nreturn true;\n}",
"@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\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\npublic boolean onCreateOptionsMenu(Menu menu) \n{\n\tgetMenuInflater().inflate(R.menu.update_entry, menu);\n\treturn true;\n}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, 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}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(android.view.Menu menu) {\n super.onCreateOptionsMenu(menu);\n MenuInflater blowUp = getMenuInflater();\n blowUp.inflate(R.menu.menu_start, menu);\n return true;\n }",
"@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\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\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\t\t public boolean onCreateOptionsMenu(Menu menu) {\n\t\t getMenuInflater().inflate(R.menu.level, menu);\n\t\t return true;\n\t\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\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.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 MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.popmovies_menu, menu);\n\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\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\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.song_action_bar, menu);\n\t\treturn true;\n\t}",
"@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);//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\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\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\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\t\t\t\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\t\t\t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n getMenuInflater().inflate(R.menu.main, 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 boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\tsuper.onCreateOptionsMenu(menu, inflater);\n\tinflater.inflate(R.menu.menu_main, menu);\n\tmenu.findItem(R.id.action_edit).setVisible(false);\n\tmenu.findItem(R.id.action_share).setVisible(false);\n\tmenu.findItem(R.id.action_settings).setVisible(true);\n }",
"@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 }",
"@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\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(final Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return true;\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\r\n\t\tMenuInflater inflate = getMenuInflater();\r\n\t\tinflate.inflate(R.menu.mymenu4, menu);\r\n\t\treturn true;\r\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 boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.activity_main, menu);\n \t\treturn true;\n \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 boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);\n return true;\n\n}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\r\n\r\n\t\t\r\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}",
"@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 MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n //getMenuInflater().inflate(R.menu.activity_main, menu);\n \tsuper.onCreateOptionsMenu(menu);\n getSupportMenuInflater().inflate(R.menu.actionbar, menu);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n BatteryIcon = (MenuItem)menu.findItem(R.id.acb_battery);\n setActBarBatteryIcon(Callbacksplit.getsavedBatteryStateIcon());\n ConnectIcon = (MenuItem)menu.findItem(R.id.acb_connect);\n setActBarConnectIcon();\n \n ((MenuItem)menu.findItem(R.id.acb_m_5)).setVisible(false);\n\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\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 public boolean onCreateOptionsMenu(Menu menu) {\n\tgetMenuInflater().inflate(R.menu.menu_main, menu);\n\treturn true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu); \r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_imp, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.acty_b, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu)\n {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n getMenuInflater().inflate(R.menu.action_menu, menu);\n return true;\n }",
"@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.item, menu);\n return true;\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}"
] |
[
"0.71824455",
"0.71414745",
"0.71303153",
"0.7059605",
"0.7048178",
"0.6995324",
"0.69470286",
"0.68821394",
"0.68814945",
"0.68684393",
"0.68634164",
"0.68476945",
"0.6836561",
"0.6834652",
"0.6807211",
"0.6796463",
"0.6793435",
"0.6789579",
"0.67752784",
"0.6775225",
"0.67742276",
"0.67656267",
"0.6763025",
"0.67567825",
"0.6755296",
"0.6755296",
"0.6748603",
"0.67392665",
"0.6727939",
"0.67268497",
"0.6720003",
"0.6712319",
"0.66942656",
"0.6693222",
"0.6692592",
"0.669135",
"0.66803706",
"0.6678083",
"0.6674806",
"0.6672422",
"0.6661776",
"0.6661776",
"0.6661776",
"0.6661776",
"0.66603416",
"0.6658094",
"0.6649855",
"0.6648909",
"0.6640584",
"0.6640584",
"0.6640584",
"0.6639995",
"0.6631444",
"0.66307265",
"0.66295725",
"0.66295725",
"0.6625487",
"0.6621913",
"0.66218066",
"0.6615969",
"0.6615969",
"0.6614512",
"0.660942",
"0.6607168",
"0.6605928",
"0.65996855",
"0.6597668",
"0.659456",
"0.65921336",
"0.6589936",
"0.6587655",
"0.6585694",
"0.65781885",
"0.65781885",
"0.6576863",
"0.65749156",
"0.65749156",
"0.65749156",
"0.6572328",
"0.6570961",
"0.65700907",
"0.6569213",
"0.65680087",
"0.65671265",
"0.65657204",
"0.6565364",
"0.6565086",
"0.65633017",
"0.6563188",
"0.65595657",
"0.6559437",
"0.6558295",
"0.6554516",
"0.6553084",
"0.6552845",
"0.65518975",
"0.65479237",
"0.6545596",
"0.65444034",
"0.65428936",
"0.6541684"
] |
0.0
|
-1
|
To satisfy the interface implementation
|
@SuppressLint("DefaultLocale")
@Override
public void onTaskLongClick(@NonNull Task task) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n public void get() {}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n void init() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\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\tprotected void getData() {\n\t\t\n\t}",
"@Override\n public void init() {}",
"@Override\n protected void init() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@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 public int describeContents() { return 0; }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n public void apply() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"public interface Position {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"interface Retrieve {}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }",
"@Override\n public void init() {\n }",
"public interface AbstractC1953c50 {\n}",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@Override\n\tpublic void buscar() {\n\t\t\n\t}",
"public Implementor(){}",
"@Override\r\n\tpublic void get() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tpublic void accept(Visitor visitor) {\n\t\t\n\t}",
"@Override\n\tpublic void getData() {\n\t\t\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void type() {\n\t\t\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tpublic void leti() \n\t{\n\t}",
"Consumable() {\n\t}",
"@Override\n public void initialize() { \n }",
"@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\tpublic void jugar() {\n\t\t\n\t}",
"public interface Params {\n }",
"protected abstract Set method_1559();",
"@Override\r\n\tpublic void voar() {\n\t\t\r\n\t}",
"@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}",
"@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }"
] |
[
"0.66921526",
"0.66598403",
"0.6655755",
"0.6626332",
"0.6418042",
"0.6418042",
"0.6395758",
"0.6369353",
"0.6316473",
"0.6309349",
"0.629656",
"0.6246272",
"0.6229208",
"0.6160067",
"0.6154258",
"0.6149979",
"0.6149979",
"0.6146041",
"0.6138274",
"0.6137881",
"0.61135143",
"0.6109892",
"0.610239",
"0.60937434",
"0.60937434",
"0.60937434",
"0.60937434",
"0.60937434",
"0.60937434",
"0.60872126",
"0.6075139",
"0.6073393",
"0.6071844",
"0.606359",
"0.6061252",
"0.6045406",
"0.60376555",
"0.6036997",
"0.6029574",
"0.59802735",
"0.59765226",
"0.59706014",
"0.59532964",
"0.59255916",
"0.5918635",
"0.5918635",
"0.5918635",
"0.5918582",
"0.5917004",
"0.5914521",
"0.5914521",
"0.59065443",
"0.58996063",
"0.58987993",
"0.5888928",
"0.58781534",
"0.58458966",
"0.5843355",
"0.5843355",
"0.5838551",
"0.58293366",
"0.58293366",
"0.58293366",
"0.5826687",
"0.58176655",
"0.58124036",
"0.58118975",
"0.5811564",
"0.5804857",
"0.5800908",
"0.5800852",
"0.5796373",
"0.5790417",
"0.57891345",
"0.5785301",
"0.57840127",
"0.57800126",
"0.5776645",
"0.5768794",
"0.5768794",
"0.576613",
"0.57657844",
"0.5764679",
"0.5764679",
"0.5764679",
"0.5764569",
"0.5761769",
"0.57609445",
"0.57535255",
"0.57432306",
"0.57432306",
"0.57432306",
"0.57432306",
"0.57432306",
"0.57386947",
"0.57309496",
"0.57285947",
"0.5723541",
"0.57226884",
"0.57226884",
"0.5722539"
] |
0.0
|
-1
|
show dialogue to get confirmation to quit editing
|
private void showCancelEditDialog() {
AppDialog dialog = new AppDialog();
Bundle args = new Bundle();
args.putInt(AppDialog.DIALOG_ID, DIALOG_ID_CANCEL_EDIT);
args.putString(AppDialog.DIALOG_TITLE, "Quit?");
args.putString(AppDialog.DIALOG_MESSAGE, getString(R.string.cancelEditDiag_message));
args.putInt(AppDialog.DIALOG_POSITIVE_RID, R.string.cancelEditDiag_positive_caption);
args.putInt(AppDialog.DIALOG_NEGATIVE_RID, R.string.cancelEditDiag_negative_caption);
dialog.setArguments(args);
dialog.show(fragmentManager, null);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void confirmExit() {\n if (hasChanges()) {\n new AlertDialog.Builder(this).\n setMessage(R.string.dialog_discard_msg).\n setNegativeButton(R.string.dialog_discard_neg, (dialog, which) -> {}).\n setPositiveButton(R.string.dialog_discard_pos, (dialog, which) -> finish()).\n create().\n show();\n }\n else {\n showToast(R.string.toast_no_changes);\n finish();\n }\n }",
"private void openExitWindowConfirmation() {\n\t\t// int opcion = JOptionPane.showConfirmDialog(this, \"Desea salir del\n\t\t// Chat\", \"Confirmación\",\n\t\t// JOptionPane.YES_NO_OPTION);\n\t\t// if (opcion == JOptionPane.YES_OPTION) {\n\t\tthis.setVisible(false);\n\t\t// }\n\t}",
"private void dialogExit() {\n\t\tint result = showConfirmDialog(frmRentCalc, \"Вы действительно ходите выйти?\", \"Окно подтверждения\", YES_NO_OPTION, QUESTION_MESSAGE);\r\n\t\tif (result == YES_OPTION) {\r\n\t\t\tSystem.exit(0);\r\n\t\t} else {\r\n\t\t\tif (result == NO_OPTION) {\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n if(e.getSource() == confirmButton) {\n setVisible(false); // causes all the add text \n }\n else if(e.getSource() == exitButton) {\n System.exit(0);\n }\n }",
"public void confirmExit() {\n int resposta = JOptionPane.showConfirmDialog(this,\n \"Really exit?\", \"Exit\",\n JOptionPane.YES_NO_OPTION,\n JOptionPane.QUESTION_MESSAGE);\n if (resposta == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }",
"private void confirmExit () {\n\t\tint ret = JOptionPane.showConfirmDialog(this, \"Save game before exiting?\");\n\t\tif (ret == 0) {\n\t\t\tcloseAfterSave = true;\n\t\t\tEngine.requestSync();\n\t\t} else if (ret == 1) {\n\t\t\tkill();\n\t\t}\n\t}",
"private void mIesireActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mIesireActionPerformed\n int response = JOptionPane.showConfirmDialog(this, \"Doriti sa parasiti aplicatia?\", \"Confirmare\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n if (response == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }",
"public void toExit() {\n int sure=JOptionPane.showConfirmDialog(rootPane,\"Are you sure to Exit?\");\n if(sure==JOptionPane.YES_OPTION)\n { \n System.exit(0);\n } \n }",
"private void endingAction() {\n this.detectChanges();\n if (this.isModifed) {\n //System.out.println(JOptionPane.showConfirmDialog(null, \"Do you want to save unsaved changes?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION));\n switch (JOptionPane.showConfirmDialog(null, \"Do you want to save current data?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION)) {\n case 0: {\n if (this.file != null) {\n INSTANCE.saveData();\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n case 1: {\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n //cancel op 2\n //no op 1\n //yes op 0\n } else {\n INSTANCE.dispose();\n System.exit(0);\n }\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}",
"public void confirmExit() {\n boolean confirmOnExit = getIntent().getExtras().getBoolean(MapsActivity.PARAMETERS.CONFIRM_ON_EXIT, true);\n if (confirmOnExit) {\n new AlertDialog.Builder(this).setTitle(R.string.button_confirm_exit_title)\n .setMessage(R.string.button_confirm_exit)\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n finish();\n return;\n }\n }).setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // do nothing\n }\n }).show();\n } else {\n finish();\n }\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"<html><center><u><strong>Edité par :</strong></u><br>RAHMANI ABD EL KADER<br>SEIF EL ISLEM<br> Groupe 1 Section 1</center></html>\", \"A propros\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t}",
"void confirm();",
"private void quitDialog() {\r\n\t\tdispose();\r\n\t}",
"private void confirmationAlert() {\n\t\tAlert confirm = new Alert( AlertType.CONFIRMATION, \"You Will Not Be Able To Change Your Name\\nAfter You Press 'OK'.\");\n\t\tconfirm.setHeaderText(\"Are You Sure?\");\n confirm.setTitle(\"Confirm Name\");\n confirm.showAndWait().ifPresent(response -> {\n if (response == ButtonType.OK) {\n \tbackground.remove( pointer );\n \tkeyStrokes = keyStrokes.replace(\" \", \"-\");\n\t\t\t\tinsertNewHiScore();\n\t\t\t\tnewHighScore = false;\n }\n });\n\t}",
"private void jbExitActionPerformed(java.awt.event.ActionEvent evt) {\n frame=new JFrame(\"Exit\");\n if(JOptionPane.showConfirmDialog(frame,\"Confirm if you want to exit\",\"Point of Sale-Supplier\",\n JOptionPane.YES_NO_OPTION) == JOptionPane.YES_NO_OPTION){\n this.dispose();\n\n }//GEN-LAST:event_jbExitActionPerformed\n }",
"private void closeProgram() {\n\t\tSystem.out.println(\"Cancel Button clicked\");\n\t\tif (ConfirmBox.display( \"Exit\", \"Are you sure you want to exit?\")) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public void cancel() { Common.exitWindow(cancelBtn); }",
"public void actionPerformed(ActionEvent event)\n\t\t\t\t{\n\t\t\t\t\tend = JOptionPane.showConfirmDialog(null, \"Are you sure you want to exit?\");\n\n\t\t\t\t\tif (end == JOptionPane.YES_OPTION) \n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.exit(0);\t\t\n\t\t\t\t\t}\n\t\t\t\t}",
"public void cancelDialog() {dispose();}",
"public void handleExit(){\n if(JOptionPane.showConfirmDialog(null,\"Do you really wanna exit\",\"Confirm\",JOptionPane.WARNING_MESSAGE,\n JOptionPane.YES_OPTION)==JOptionPane.YES_OPTION){System.exit(0);}\n else{\n return;\n }\n\n\n\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\tint response = JOptionPane.showConfirmDialog(Window.getFrame(),\n\t\t\t\t\"Do you really want to quit the level editor ?\\nThe\"\n\t\t\t\t+ \" unsaved modifications are going to be lost.\",\n\t\t\t\t\"Need confirmation\", JOptionPane.OK_CANCEL_OPTION);\n\t\t\tif(response == JOptionPane.OK_OPTION)\n\t\t\t\tWindow.affect(new LevelEditorList(),Window.DIM_STANDARD);\n\t\t}",
"private void keluarMenuItemActionPerformed(java.awt.event.ActionEvent evt) {\n int exit = JOptionPane.showConfirmDialog(this, \"Anda yakin akan keluar ?\",\"\", JOptionPane.OK_CANCEL_OPTION);\n if(exit == JOptionPane.OK_OPTION){\n System.exit(0);\n }\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(JOptionPane.showConfirmDialog(f4, \"Confrom if you want to exit\",\"Library Management System\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION)==JOptionPane.YES_NO_OPTION) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}",
"public void allowUserToQuit(){\n int answer = JOptionPane.showConfirmDialog(this, \"Are you sure you want to quit?\", \"Quit?\", JOptionPane.YES_NO_OPTION);\r\n \r\n if (answer == JOptionPane.YES_OPTION) {\r\n \ttry {\r\n \t\tpropertiesMemento.saveProperties(this);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Unable to save properties. Ensure the file \" + propertiesMemento.getAppDir() + \"appProp.txt is not in use by another application.\", \r\n\t\t\t\t\t\t\"Unable to save properties\", JOptionPane.WARNING_MESSAGE);\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t// If there are any tabs open then ask the user if she wants to save the tabs\r\n\t\t\tif(currentView != null){\r\n\t\t\t\taskIfTheUserWantsToSaveTabs();\r\n\t\t\t}\r\n\r\n \tSystem.exit(0);\r\n } \r\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tdialogExit();\r\n\t\t\t}",
"private void confirmClose(){\n\tJFrame f = new JFrame();\n\tint n = JOptionPane.showConfirmDialog(\n\t\t\t\t\t f,\n\t\t\t\t\t \"Are you sure you want to quit?\\n\"\n\t\t\t\t\t + \"Any unsaved changes\"\n\t\t\t\t\t + \" will be lost.\",\n\t\t\t\t\t \"Confirm Quit\",\n\t\t\t\t\t JOptionPane.YES_NO_OPTION);\n\tif (n == JOptionPane.YES_OPTION)\n\t System.exit(0);\n\tif (n == JOptionPane.NO_OPTION)\n\t f.dispose();\n }",
"void cancelButton_actionPerformed(ActionEvent e)\n\t{\n\t\tcloseDlg();\n }",
"private void jMenuItemSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemSalirActionPerformed\n LOG.trace(evt.paramString());\n\n int opc = JOptionPane.showConfirmDialog(this, \"Seguro que desea salir\",\n this.getTitle(), JOptionPane.YES_NO_OPTION);\n if (opc == 0) {\n System.exit(0);\n }\n}",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder to display a confirmation message about deleting the book\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.editor_activity_delete_message);\n builder.setPositiveButton(getString(R.string.editor_activity_delete_message_positive),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Delete\"\n deleteBook();\n }\n });\n\n builder.setNegativeButton(getString(R.string.editor_activity_delete_message_negative),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Cancel\"\n if (dialogInterface != null)\n dialogInterface.dismiss();\n }\n });\n\n // Create and show the dialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tint reply = JOptionPane.showConfirmDialog(null, \"Are you sure you want to leave us behind, my liege?\", \"Close?\", JOptionPane.YES_NO_OPTION);\n\t\tif (reply == JOptionPane.YES_OPTION)\n\t\t{\n\t\t System.exit(0);\n\t\t}\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n if (!askSave()) {\n return;\n }\n System.exit(0);\n }",
"void CloseOkDialog();",
"public void Confirm(){\n new AlertDialog.Builder(MapsActivity.this)\n .setTitle(\"Confirm Location\")\n .setMessage(\"Are you sure about this location?\")\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // continue with delete\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // do nothing\n }\n })\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }",
"private void closeProgram(){\n boolean answer = ConfirmBox.display(\"Title\", \"Sure you want to exit?\");\n if(answer==true){\n window.close();\n }\n }",
"private static void JGUI4() {\n\t\tint n = JOptionPane.showConfirmDialog(\n\t\tnull,\n\t\t\"Would you like green eggs and ham?\",\n\t\t\"An Inane Question\",\n\t\tJOptionPane.YES_NO_OPTION);\n\t}",
"public void abort() throws IOException {\n\t\t\tcompleteEdit(this, false);\n\t\t}",
"public void actionPerformed(ActionEvent e) {\n Object[] options ={ \"Yes\", \"No\" };\r\n //yes = 0 no = 1\r\n int m = JOptionPane.showOptionDialog(null, \"Go Back?\", \"tips\",JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);\r\n\r\n if (m == 0)\r\n {\r\n frame.dispose();\r\n new init();\r\n }\r\n }",
"private void performWindowClosing() {\r\n if (dataChanged) {\r\n try {\r\n int result = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\r\n \"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,\r\n CoeusOptionPane.DEFAULT_YES);\r\n if (result == JOptionPane.YES_OPTION) {\r\n saveRolodexInfo();\r\n }else if (result == JOptionPane.NO_OPTION){\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }\r\n }catch(Exception e){\r\n CoeusOptionPane.showErrorDialog(e.getMessage());\r\n }\r\n }else {\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }\r\n }",
"@Override\r\n public void confirmClicked(boolean result, int id) {\r\n if (result == true) {\r\n deleteSelectedWaypoints();\r\n }\r\n\r\n // reset the current gui screen to be ourselves now that we are done\r\n // with the GuiYesNo dialog\r\n this.mc.displayGuiScreen(this);\r\n }",
"public void actionPerformed(ActionEvent e) {\n int reply = JOptionPane.showConfirmDialog(null, \"Esta operación cerrará todos los procesos del sistema de mensajería\\n\"\n + \" ¿Está seguro que desea salir?\\n\", \"Salir\", JOptionPane.YES_NO_OPTION);\n if (reply == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n\n }",
"private void doExit() {\n\t\tif (userMadeChanges()) {\n showSaveChangesBeforeExitPrompt();\n\t\t} else {\n\t\t\tfinish();\n\t\t}\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent Ae) {\n\t\tif(Ae.getSource() == cancel)\n\t\t{\n\t\t\t\n\t\t}\n\t\tif(Ae.getSource() == confirm)\n\t\t{\n\t\t\tthis.frame.setVisible(false);\n\t\t\tnew AdminHome(con,admin).frame.setVisible(true);\n\t\t}\n\t}",
"private void jButtonCancelActionPerformed() {\r\n\t\texit();\r\n\t}",
"public void actionPerformed(ActionEvent event) {\n if (JOptionPane.showConfirmDialog(frame,\n \"Are you sure to close this window?\", \"Really Closing?\",\n JOptionPane.YES_NO_OPTION,\n JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {\n safeExit();\n }\n }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tInvoker.getInstance().executeCommand(\n\t\t\t\t\tnew GraphicElementEditCancelCommand(model, dialog.getGraphicElement(), previousShapes));\n\t\t\tGraphicElementInvoker.getInstance().abortSession();\n\t\t\tdialog.setVisible(false);\n\t\t}",
"@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent Event) {\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tint reply = JOptionPane.showConfirmDialog(null, getPanel(), \"Exit\", JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\tif (reply == JOptionPane.NO_OPTION)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t System.exit(0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}",
"private void dialog() {\n\t\tGenericDialog gd = new GenericDialog(\"Bildart\");\n\t\t\n\t\tgd.addChoice(\"Bildtyp\", choices, choices[0]);\n\t\t\n\t\t\n\t\tgd.showDialog();\t// generiere Eingabefenster\n\t\t\n\t\tchoice = gd.getNextChoice(); // Auswahl uebernehmen\n\t\t\n\t\tif (gd.wasCanceled())\n\t\t\tSystem.exit(0);\n\t}",
"private void initDialog() {\n\t\tint res = JOptionPane.showConfirmDialog(this,\n\t\t\t\tString.format(\"Are you sure you want to delete the file \\\"%s\\\" from your %s account?\",\n\t\t\t\t\t\t this.fileToDelete.getPath(), this.fileToDelete.getRemoteDrive().getServiceNiceName()));\n\t\tif (res == JOptionPane.YES_OPTION) {\n\t\t\tDelMethodWorker dmw = new DelMethodWorker(this.fileToDelete);\n\t\t\tdmw.execute();\n\t\t\tboolean succ;\n\t\t\tint delResult;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tsucc = dmw.get(); //TODO: This will block until the file is deleted!\n\t\t\t\tif (succ) {\n\t\t\t\t\t//TODO\n\t\t\t\t\t// I think this should be done by callback, but I\n\t\t\t\t\t// can't get it to work so I've passed in the\n\t\t\t\t\t// model to this dialog... -Cam\n\t\t\t\t\tmodel.removeElement(fileToDelete);\n\t\t\t\t\t\n\t\t\t\t\tdelResult = JOptionPane.showConfirmDialog(this,\n\t\t\t\t\t\t\t\"File had been deleted.\", \"Delete file success\",\n\t\t\t\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t\t\t\t} else {\n\t\t\t\t\tdelResult = JOptionPane.showConfirmDialog(this,\n\t\t\t\t\t\t\t\"Delete file failed...\" + \"Try again.\",\n\t\t\t\t\t\t\t\"Delete file failure\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\n\t\t\t\tif (delResult == JOptionPane.YES_OPTION) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch (InterruptedException | ExecutionException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public int windowClosing() {\n if(changed) {\n current = this;\n return JOptionPane.showConfirmDialog(null, \"Do you want to save changes to \" + name + \"?\"); \n }\n return 1;\n }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tInvoker.getInstance()\n\t\t\t\t\t.executeCommand(new GraphicElementEditCommitCommand(model, dialog.getGraphicElement()));\n\t\t\tdialog.setVisible(false);\n\t\t}",
"private void exitQuestionDialog() {\n\t\tquestion = false;\n\t\tdialog.loadResponse();\n\t\tchangeDirBehaviour(Values.DETECT_ALL);\n\t}",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteBook();\n finish();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteAllBooks();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"private void onConfirm() {\n if (canConfirm) {\n onMoveConfirm(gridView.selectedX, gridView.selectedY);\n this.setConsoleState();\n }\n }",
"protected void actionPerformedCancel ()\n {\n Preferences rootPreferences = Preferences.systemRoot ();\n PreferencesTableModel rootPrefTableModel = new PreferencesTableModel (rootPreferences);\n rootPrefTableModel.undo ();\n Preferences userPreferences = Preferences.userRoot ();\n PreferencesTableModel userPrefTableModel = new PreferencesTableModel (userPreferences);\n userPrefTableModel.undo ();\n this.setVisible (false);\n this.dispose ();\n }",
"private void doExit() {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(\n BookingActivity.this);\n\n alertDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //finish();\n //System.exit(0);\n goBack();\n }\n });\n\n alertDialog.setNegativeButton(\"No\", null);\n\n alertDialog.setMessage(\"Do you want to exit?\");\n alertDialog.setTitle(\" \");\n alertDialog.show();\n }",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the goal.\n deleteGoal();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"private void ExitProc()\r\n\t{\r\n\t\tint n = JOptionPane.showConfirmDialog(\r\n\t\t\t frame ,\r\n\t\t\t \"EXIT NOF FreeWare ???\",\r\n\t\t\t \"--NOF--\",\r\n\t\t\t JOptionPane.YES_NO_OPTION);\r\n\t\t\r\n\t\t//user pressed result.\r\n\t\tswitch (n) \r\n\t\t{\r\n\t\tcase 0: //yes\r\n\r\n\t\t\tframe.dispose();\r\n\t\t\tl = new log(\"event\",\"Exit Software\",\"Exit Pressed - Thank you for using NOF Software.\");\r\n\t\t\terase del = new erase(StStr); //StStr);\r\n\t\t\t//del.erase_output(StStr);\r\n\t\t\tSystem.exit(0); // Exit Program\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\tcase 1: //no\r\n\t\t\tl = new log(\"event\",\"Exit_option\",\"Exit - have been canceled\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t}",
"private void jButtonCancelActionPerformed(java.awt.event.ActionEvent evt) {\n System.exit(0);\n \n }",
"private void onOkButtonPressed() {\n\t\tconfirm = true;\n\t\tif (template.getAskDimension()) {\n\t\t\ttry {\n\t\t\t\twidth = Integer.parseInt(widthInputField.getFieldString());\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\theight = Integer.parseInt(heightInputField.getFieldString());\n\t\t\t\theightInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\theightInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\tif(!confirm)\n\t\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (template.getAskLoading()) {\n\t\t\tint result = savefileChooser.showOpenDialog(this);\n\t\t\tif (result != JFileChooser.APPROVE_OPTION) {\n\t\t\t\tconfirm = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tdispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));\n\t}",
"@Override\r\n public void windowClosing(WindowEvent e) {\r\n //show dialog box to receive confirmation from the user\r\n int response = JOptionPane.showConfirmDialog(null, \"Do you want to exit?\", \"Confirm\",\r\n JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\r\n if (response == JOptionPane.NO_OPTION) {\r\n System.out.println(\"No button clicked\");\r\n } else if (response == JOptionPane.YES_OPTION) {\r\n System.out.println(\"Yes button clicked\");\r\n System.exit(0);\r\n } else if (response == JOptionPane.CLOSED_OPTION) {\r\n System.out.println(\"JOptionPane closed\");\r\n }\r\n }",
"public void game_over() {\n JOptionPane.showMessageDialog(null,\"GAME OVER\",\"Titolo finestra mettici quello che vuoi\",1);\n\n System.exit(0);\n}",
"@Override\n public void actionPerformed(ActionEvent actionEvent) {\n if (askUserYesNo(\"Do you really want to quit?\")) {\n if(askUserYesNo(\"Do you want to save game?\")){\n game.saveGame();\n }\n System.exit(0);\n }\n }",
"public static void main(String[] args) {\nint replaced = JOptionPane.showConfirmDialog(null,\"Replace existing selection?\");\n String result = \"?\";\n switch (replaced) {\n case JOptionPane.CANCEL_OPTION:\n result = \"Canceled\";\n break;\n case JOptionPane.CLOSED_OPTION:\n result = \"Closed\";\n break;\n case JOptionPane.NO_OPTION:\n result = \"No\";\n break;\n case JOptionPane.YES_OPTION:\n result = \"Yes\";\n break;\n default:\n ;\n }\nSystem.out.println(\"Replace? \" + result);\n }",
"private void jbtn_exitActionPerformed(ActionEvent evt) {\n\t\t\t\tJFrame frame = new JFrame(\"Exit\");\n\t\t \tif(JOptionPane.showConfirmDialog(frame,\"Confirm you want to exit\",\"Medicine Info\",JOptionPane.YES_NO_OPTION)==JOptionPane.YES_OPTION)\n\t\t \t{\n\t\t \t\t\n\t\t \t\tnew medicine();\n\t\t \t\tshow_medicine.this.setVisible(false);\n\t\t \t\t\n\t\t \t}\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}",
"protected void exitSafely() {\n for (int i = 0, numberOfTabs = tabs.getTabCount(); i < numberOfTabs; i++) {\n DocumentTab selectedDocument = (DocumentTab)tabs.getComponentAt(i);\n if (selectedDocument.isModified()) {\n tabs.setSelectedIndex(i);\n int answer = JOptionPane.showConfirmDialog(\n appWindow,\n \"File \" + selectedDocument.getName() + \" is modified.\\n\" +\n \"Do you want to save the file before closing?\",\n \"Warning\",\n JOptionPane.YES_NO_CANCEL_OPTION,\n JOptionPane.WARNING_MESSAGE);\n if (answer == JOptionPane.CANCEL_OPTION) {\n return;\n } else if (answer == JOptionPane.YES_OPTION) {\n saveCurrentTab(SaveMode.SAVE);\n }\n }\n }\n\n appWindow.dispose();\n }",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n // Set the message.\n builder.setMessage(R.string.delete_dialog_msg);\n\n // Handle the button clicks.\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteBook();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"public void onClick(DialogInterface dialog, int id) {\n editor.putBoolean(getResources().getString(R.string.dont_ask_again), true);\n editor.commit();\n dialog.cancel();\n }",
"public void finish(){\n \t\tString congrats=\"Congratulations, you won in \" + model.getNumberOfSteps()+\" steps! \";\n \t\tJFrame frame = new JFrame();\n\t\tString[] options = new String[2];\n\t\toptions[0] = new String(\"Play again\");\n\t\toptions[1] = new String(\"Quit\");\n\t\tint result= JOptionPane.showOptionDialog(frame.getContentPane(),congrats,\"Won! \", 0,JOptionPane.INFORMATION_MESSAGE,null,options,null);\n\t\tif (result == JOptionPane.NO_OPTION) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\tif (result == JOptionPane.YES_OPTION) {\n\t\t\t\t\tcontroller.reset(); }\n \t}",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteBook();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"@FXML\n\tprivate void handleOk() {\n\t\ttry {\n\t\t\ttypeDAO.supprimerType(new Type(listIdType.get(comboboxtype.getSelectionModel().getSelectedIndex()),\"\",\"\"));\n\t\t\tnew Popup(\"Type \"+comboboxtype.getValue()+\" supprimer !\");\n\t\t} catch (ConnexionBDException e) {\n\t\t\tnew Popup(e.getMessage());\n\t\t}\n\t\tokClicked = true;\n\t\tdialogStage.close();\n\t}",
"public void windowClosing(WindowEvent event) \n\t\t\t \t{\n\t\t\t \t\tend = JOptionPane.showConfirmDialog(null, \"Are you sure you want to exit?\");\n\n\t\t\t\t\tif (end == JOptionPane.YES_OPTION) \n\t\t\t\t\t{\t\n\t\t\t \t\t\tdispose();\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tsetDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\n\t\t\t \t}",
"private void doView() {\n System.out.println(pickedAccount.toString());\n System.out.println(\"Cancel any reservation? (y/n)\");\n\n String command;\n command = input.next();\n if (command.toLowerCase().equals(\"y\")) {\n processCancelReservation();\n }\n }",
"public void Sair() {\r\n\t\t\t\r\n\t\t\tnome = JOptionPane.showInputDialog(\"Informe o seu nome ou SAIR para finalizar\");\r\n }",
"private void actionDelete() {\r\n showDeleteDialog();\r\n }",
"public void cancelTask() {\r\n int reply = JOptionPane.showConfirmDialog(null, \"Do you want to save?\", null,\r\n JOptionPane.YES_NO_OPTION);\r\n if (reply == JOptionPane.YES_OPTION) {\r\n saveTask();\r\n }\r\n todoListGui();\r\n }",
"private void showThatEditable() {\n\t\tTextView tv = new TextView(this);\n\t\ttv.setText(\"You may now edit this recipe!\");\n\t\tAlertDialog.Builder alert = new AlertDialog.Builder(this);\n\t\talert.setTitle(\"Edit Mode\");\n\t\talert.setView(tv);\n\t\talert.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t}\n\t\t});\n\t\talert.show();\n\t}",
"@Override\r\n public boolean onEditorAction(TextView view,\r\n int actionId, KeyEvent event) {\r\n this.dismiss();\r\n if (actionId == EditorInfo.IME_ACTION_DONE) {\r\n if (mListener != null) {\r\n mListener.onFinishEditDialog(editMessage.getText().toString());\r\n }\r\n this.dismiss();\r\n return true;\r\n }\r\n return false;\r\n }",
"@SuppressWarnings(\"deprecation\")\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tMyButtonEditor.this.fireEditingCanceled(); \n\t\t\t\tnew WarningDialog(jtb).jd.show();\n\t\t\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n jlQuestion.setText(S_QUESTION_CONFIRMATION);\n jbNewOrderButton.setVisible(false);\n jbConfirm.setVisible(true);\n jbCancel.setVisible(true);\n }",
"public void setAsDoneDialog() {\n okButton.setText(\"Done\");\n cancelButton.setVisible(false);\n }",
"private void okButtonActionPerformed() {\n\n saveConsoleText(consoleTextArea);\n\n setVisible(false);\n\n if (mainFrame == null && !isBasicUI) {\n System.exit(0);\n }\n }",
"public void quitter() {\n\n\t\tint rep = JOptionPane.showConfirmDialog(null, \"Voulez-vous vraiment quitter ?\" , \"Attention\", JOptionPane.WARNING_MESSAGE);\n\t\tif (rep == JOptionPane.OK_OPTION)\n\t\t{\n\t\t\tsetChanged();\n\t\t\tnotifyObservers(QUITTER);\n\t\t}\n\t}",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteEmployee();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"@FXML\r\n void actionCancelButton(ActionEvent event) throws IOException {\r\n\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Alert\");\r\n alert.setContentText(\"Do you want to cancel your changes and return to the main screen?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n returnToMainScreen(event);\r\n }\r\n }",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the fruit.\n deleteFruit();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the fruit.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"@Override\n public void cancel() {\n super.cancel();\n\n /** Flag cancel user request\n */\n printingCanceled.set(true);\n\n /** Show a warning message\n */\n JOptionPane.showMessageDialog( MainDemo.this , \"Lorem Ipsum printing task canceled\", \"Task canceled\" , JOptionPane.WARNING_MESSAGE );\n }",
"private void rSButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n int p=JOptionPane.showConfirmDialog(null,\"Are You Sure\",\"Delete\",JOptionPane.YES_NO_OPTION);\n if(p==0){\n String sql=\"delete from book where book_id=?\";\n try{\n pst=(OraclePreparedStatement) conn.prepareStatement(sql);\n pst.setString(1,jtext8.getText());\n pst.execute();\n JOptionPane.showMessageDialog(null,\"Deleted\");\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, e);\n }\n }update();\n refresh2();\n }",
"private void cancel(){\n\t\tSPSSDialog.instance = null;\n\t\thide();\n\t}",
"@Override\n\t\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t}",
"private void confirmDelete(){\n\t\tAlertDialog.Builder dialog = new AlertDialog.Builder(this);\n\t\tdialog.setIcon(R.drawable.warning);\n\t\tdialog.setTitle(\"Confirm\");\n\t\tdialog.setMessage(\"Are you sure you want to Delete Selected Bookmark(s).?\");\n\t\tdialog.setCancelable(false);\n\t\tdialog.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdeleteBookmark();\n\t\t\t}\n\t\t});\n\t\tdialog.setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Pack and show\n\t\tAlertDialog alert = dialog.create();\n\t\talert.show();\n\t}",
"public void handleYesConfirmButtonAction(ActionEvent event) {\n if (updateItemPane.isVisible()){\n deleteItem();\n this.clearUpdateItemFields();\n }\n else if(updateCopyPane.isVisible()){\n deleteCopy();\n this.clearUpdateCopyFields();\n }\n maskPane.setVisible(false);\n confirmPane.setVisible(false);\n }",
"private void onConfirmButtonPressed() {\r\n disposeDialogAndCreateNewGame();\r\n }",
"private static void JGUI2() {\n\t\tint n = JOptionPane.showConfirmDialog(\n\t\tnull,\n\t\t\"Would you like green eggs and ham?\",\n\t\t\"An Inane Question\",\n\t\tJOptionPane.YES_NO_OPTION);\n\t}",
"private void helperAcceptButtonListener() {\n refresh();\n editDialog.dispose();\n }",
"private void deleteDialog() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.warmhint));\n\t\tbuilder.setMessage(getString(R.string.changequestion2));\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdeleteAllTag();\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\tgetString(R.string.successdelete),\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}",
"public abstract boolean confirm();"
] |
[
"0.72129285",
"0.7196639",
"0.7095424",
"0.70661795",
"0.70620173",
"0.7037723",
"0.6972356",
"0.69264334",
"0.69020027",
"0.6837665",
"0.68354994",
"0.6782481",
"0.6728746",
"0.6696553",
"0.6694143",
"0.66716886",
"0.6671089",
"0.6662431",
"0.6646721",
"0.6645216",
"0.6630943",
"0.66276324",
"0.6607969",
"0.6601218",
"0.65925187",
"0.6581179",
"0.65373594",
"0.65184516",
"0.65103084",
"0.64935666",
"0.6483412",
"0.6481688",
"0.64741296",
"0.64530796",
"0.6443906",
"0.6424623",
"0.64121026",
"0.64107764",
"0.64102465",
"0.6398549",
"0.63755226",
"0.63747513",
"0.6366016",
"0.6355778",
"0.6337749",
"0.6329754",
"0.6328574",
"0.63079363",
"0.6297551",
"0.6297233",
"0.6285498",
"0.62841856",
"0.6283089",
"0.6263566",
"0.626288",
"0.6262147",
"0.62550557",
"0.6254772",
"0.62454665",
"0.62359875",
"0.62322295",
"0.6231364",
"0.6223369",
"0.62219477",
"0.6216348",
"0.6213737",
"0.6212682",
"0.6210491",
"0.6209935",
"0.6208877",
"0.6208844",
"0.61967075",
"0.6186431",
"0.61757946",
"0.6172158",
"0.6161488",
"0.6160119",
"0.6151805",
"0.6147426",
"0.6147343",
"0.61460686",
"0.61418545",
"0.61401165",
"0.6133731",
"0.6132386",
"0.6128696",
"0.6125601",
"0.612403",
"0.61230177",
"0.6108167",
"0.6104851",
"0.6103824",
"0.6100312",
"0.60942644",
"0.60937136",
"0.60935885",
"0.60845643",
"0.6083391",
"0.6075617",
"0.60692406"
] |
0.68218255
|
11
|
TODO Autogenerated method stub
|
@Override
public double getStep(double step){
return 0;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public String asFormula(){
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public String asFormula(double step){
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
public Integer call(Integer a, Integer b) throws Exception {
return a+b;
}
|
{
"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 [anistor] can startOffset really be a long or it really has to be int due to limitations in query module?
|
protected BaseQuery(QueryFactory queryFactory, String queryString,
Map<String, Object> namedParameters, String[] projection, long startOffset, int maxResults,
boolean local) {
this.paramsDefined = true;
this.queryFactory = queryFactory;
this.queryString = queryString;
this.namedParameters = namedParameters;
this.projection = projection != null && projection.length > 0 ? projection : null;
this.startOffset = startOffset < 0 ? 0 : (int) startOffset;
this.maxResults = maxResults;
this.local = local;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int startOffset();",
"public abstract long getStartOffset();",
"public int getStartOffset() {\n return startOffset;\n }",
"Long getStartAt();",
"public final int startOffset() {\n return startOffset;\n }",
"public void setStartOffset(int offset) {\n this.startOffset = offset;\n }",
"public OptionalInt getStartOffset() {\n return startOffset >= 0 ? OptionalInt.of(startOffset) : OptionalInt.empty();\n }",
"Constant getStartOffsetConstant();",
"org.hl7.fhir.Integer getStart();",
"void setStartAt(final Long startAt);",
"@Override\n\tpublic int getStartOffset() {\n\t\treturn 0;\n\t}",
"public void setStartOffset(String offset) {\n\t\ttry {\n\t\t\tstartOffset = Integer.parseInt(offset);\n\t\t} catch (Exception e) {\n\t\t\tstartOffset = 0;\n\t\t}\n\t}",
"public long getStartOffset() {\n return mStartOffset;\n }",
"public void setStart(long start) { this.start = start; }",
"public StartOffsetExtractorInput(ExtractorInput input, long startOffset) {\n super(input);\n checkArgument(input.getPosition() >= startOffset);\n this.startOffset = startOffset;\n }",
"GlobalVariable getStartOffsetCounterVariable();",
"long getMid();",
"long getMid();",
"String getBeginRange();",
"public void setBeginOffset(Integer beginOffset) {\n this.beginOffset = beginOffset;\n }",
"int getStartSearch();",
"void startIndexing();",
"DbQuery setStartAtFilter(long value) {\n return setStartAtFilter((double) value);\n }",
"@Test(timeout = 4000)\n public void test005() throws Throwable {\n Range range0 = Range.ofLength(0L);\n long long0 = range0.getEnd();\n assertEquals(4294967294L, long0);\n \n Range.ofLength(0L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n long long1 = range0.getBegin(range_CoordinateSystem0);\n assertEquals(0L, long1);\n }",
"public void setBegin(int begin)\n {\n this.begin = begin;\n this.beginSpecified = true;\n }",
"public int getStartOffset() {\n return startPosition.getOffset();\n }",
"int getStartSegment();",
"protected abstract int localOffsetTransform(int outOffset, boolean inclusive);",
"abstract int readInt(int start);",
"private static long getFirstOffset(long currentOffset, int limit) {\n\t\tlong firstOffset = currentOffset;\n\n\t\twhile(firstOffset > limit) {\n\t\t\tfirstOffset -= limit;\n\t\t}\n\n\t\treturn firstOffset;\n\t}",
"short getPageStart();",
"private int getInclusiveTopIndexStartOffset() {\n \n \t\tif (fTextWidget != null && !fTextWidget.isDisposed()) {\n \t\t\tint top= -1;\n \t\t\tif (fSourceViewer instanceof ITextViewerExtension5) {\n \t\t\t\ttop= fTextWidget.getTopIndex();\n \t\t\t\tif ((fTextWidget.getTopPixel() % fTextWidget.getLineHeight()) != 0)\n \t\t\t\t\ttop--;\n \t\t\t\tITextViewerExtension5 extension= (ITextViewerExtension5) fSourceViewer;\n \t\t\t\ttop= extension.widgetLine2ModelLine(top);\n \t\t\t} else {\n \t\t\t\ttop= fSourceViewer.getTopIndex();\n \t\t\t\tif ((fTextWidget.getTopPixel() % fTextWidget.getLineHeight()) != 0)\n \t\t\t\t\ttop--;\n \t\t\t}\n \n \t\t\ttry {\n \t\t\t\tIDocument document= fSourceViewer.getDocument();\n \t\t\t\treturn document.getLineOffset(top);\n \t\t\t} catch (BadLocationException x) {\n \t\t\t}\n \t\t}\n \n \t\treturn -1;\n \t}",
"public int getQueryStart()\n\t{\n\t\treturn myQueryStart;\n\t}",
"double getOffset();",
"public int getStart() {\r\n\t\treturn this.offset;\r\n\t}",
"private Integer extract_offset_fasta(String str) {\n String value = \"0\"; // Default if no offset given.\n Matcher offsetMatcher = excoOFFSETPATTERN.matcher(str);\n if (offsetMatcher.find()) {\n value = offsetMatcher.group(1);\n //System.out.println(\"Offset extracted correctly\");\n //System.out.println(\"Offset value: \"+value);\n }\n\n m_translation_offset = Integer.parseInt(value);\n\n return m_translation_offset;\n }",
"@Override\r\n \tpublic final int getStartPos() {\r\n \t\treturn sourceStart;\r\n \t}",
"String getLimitOffset(boolean hasWhereClause, long limit, long offset);",
"public int query(int start, int end) {\n return prefixSum[end][1] - prefixSum[start][0];\n }",
"int getOffset();",
"int getOffset();",
"int getOffset();",
"public static int findLimitStart( long oid, int recordToGet, String whereClause){\n\t\tString order = \"\";\n\t\tint size = getCount(whereClause);\n\t\tint start = 0;\n\t\tboolean found =false;\n\t\tfor(int i=0; (i < size) && !found ; i=i+recordToGet){\n\t\t\t Vector list = list(i,recordToGet, whereClause, order); \n\t\t\t start = i;\n\t\t\t if(list.size()>0){\n\t\t\t for(int ls=0;ls<list.size();ls++){ \n\t\t\t \t PatientXray patientxray = (PatientXray)list.get(ls);\n\t\t\t\t if(oid == patientxray.getOID())\n\t\t\t\t\t found=true;\n\t\t\t }\n\t\t }\n\t\t}\n\t\tif((start >= size) && (size > 0))\n\t\t start = start - recordToGet;\n\n\t\treturn start;\n\t}",
"private int getIndexOfStart(String document, int indexOfEnd) {\n int indexOfStart = -1;\n // iterate the document backwards until '>' is found\n for (int i = indexOfEnd; i >= 0 ; i--) {\n char c = document.charAt(i);\n if (c == '>') {\n indexOfStart = i + 1;\n break;\n }\n }\n return indexOfStart;\n }",
"public Integer getOffset();",
"OffsetDateTime usageStart();",
"public void setStart(int start) {\n this.start=start;\n }",
"@Override\r\n \tpublic final int getOffset() {\r\n \t\tAssert.isTrue(hasSourceRangeInfo());\r\n \t\treturn getStartPos();\r\n \t}",
"public void setStart(int start) {\r\n this.start = start;\r\n }",
"public abstract int getStartIndex();",
"private int getStartNodeIndex(int validStartIndexOfStr) {\n\t\treturn validStartIndexOfStr / 2;\n\t}",
"public void setOffset(int startOffset, int endOffset);",
"String getLimitOffsetVar(String var, boolean hasWhereClause, long limit, long offset);",
"private static int findMin(int startPos,int[] x){\n\t\tint result = startPos;\n\t\tfor(int i= startPos;i<x.length;i++){\n\t\t\tif(x[i]<x[result]){\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public static int offset_min() {\n return (56 / 8);\n }",
"int getAlignmentStart(String[] fields) throws NumberFormatException {\n int alignmentStart = Integer.parseInt(fields[3].trim()) - 1;\n return alignmentStart;\n }",
"public void setRangeStart(@IntRange(from = MIN_NUMBER) long start) {\n setRange(start, mRange, mIsPositive);\n }",
"String getBegin();",
"public int getStartRange() {\r\n\t\treturn lookupValue(Params.START_RANGE);\r\n\t}",
"public java.math.BigInteger getStartIndex()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTINDEX$10);\n if (target == null)\n {\n return null;\n }\n return target.getBigIntegerValue();\n }\n }",
"private static long getTimestampStart(long timestamp, long start) {\n long timestampStart = 0;\n for (long i = timestamp; i >= timestamp-60; i--) {\n if ((i-start) % 60 == 0) {\n timestampStart = i;\n break;\n }\n }\n return timestampStart;\n }",
"@DISPID(-2147417104)\n @PropGet\n int offsetLeft();",
"public static int getQueryParameterOffset(Locale locale, Request request) throws BadRequestException {\n\t\treturn getQueryParameterPositiveInteger(locale, request, \"offset\", false);\n\t}",
"public int getStartRow();",
"public Long getPosition(long offset) {\n if (segmentSearchIndex >= getRangesAsList().size() || offset < accumulatedOffset) {\n resetOffsetCache();\n }\n offset -= accumulatedOffset;\n while (segmentSearchIndex < getRangesAsList().size() && offset >= getRangesAsList().get(segmentSearchIndex).size()) {\n offset -= getRangesAsList().get(segmentSearchIndex).size();\n accumulatedOffset += getRangesAsList().get(segmentSearchIndex).size();\n segmentSearchIndex++;\n }\n if (segmentSearchIndex < getRangesAsList().size()) {\n // range found at index\n return getRangesAsList().get(segmentSearchIndex).getMin() + offset;\n } else {\n return getRangesAsList().get(getRangesAsList().size() - 1).getMax();\n }\n }",
"public int getStart() {\r\n return start;\r\n }",
"public int getStartIndex() {\n int cacheRange = 100 / numResultsPerPage;\n int base = pageNumber % cacheRange;\n if (base == 0) {\n return 100 - numResultsPerPage;\n } else {\n return (base - 1) * numResultsPerPage;\n }\n }",
"public void setExpectedStart(long expectedStart) {\n this.expectedStart = expectedStart;\n }",
"public int indexOfList(ListField listField, String prefix, int start) {\nreturn start;\n}",
"DbQuery setStartAtFilter(int value) {\n return setStartAtFilter((double) value);\n }",
"public void testRange() throws IOException, InvalidGeoException\r\n {\n LgteIndexSearcherWrapper searcher = new LgteIndexSearcherWrapper(path);\r\n\r\n //try find Jorge and Bruno documents last year\r\n // In this case the closest one will be in 2007\r\n String query = \"contents:(Jorge Bruno)\";\r\n\r\n LgteQuery lgteQueryResult1;\r\n LgteQuery lgteQueryResult1and2;\r\n try\r\n {\r\n lgteQueryResult1 = LgteQueryParser.parseQuery(query);\r\n lgteQueryResult1and2 = LgteQueryParser.parseQuery(query);\r\n\r\n MyCalendar c1Aux = new MyCalendar(2005,11,20,9,0,10);\r\n MyCalendar c2Aux = new MyCalendar(2007,1,12,20,45,15);\r\n long dif = c2Aux.getTimeInMillis() - c1Aux.getTimeInMillis();\r\n\r\n lgteQueryResult1.getQueryParams().setTimeMiliseconds(c1Aux.getTimeInMillis());\r\n lgteQueryResult1.getQueryParams().setRadiumMiliseconds(dif -1);\r\n lgteQueryResult1and2.getQueryParams().setTimeMiliseconds(c1Aux.getTimeInMillis());\r\n lgteQueryResult1and2.getQueryParams().setRadiumMiliseconds(dif+1);\r\n }\r\n catch (ParseException e)\r\n {\r\n fail(e.toString());\r\n return;\r\n }\r\n\r\n //Lets use aos Time Sorter to dont worry about distances and stuff like that, he will do the job\r\n TimeDistanceSortSource dsort1 = new TimeDistanceSortSource();\r\n LgteSort sort1 = new LgteSort(new SortField(\"foo\", dsort1));\r\n\r\n //LgteHits give you Documents and time with unecessary lines of boring code\r\n LgteHits lgteHits1;\r\n LgteHits lgteHits1and2;\r\n lgteHits1 = searcher.search(lgteQueryResult1, sort1);\r\n assertTrue(lgteHits1.length() == 1);\r\n\r\n lgteHits1and2 = searcher.search(lgteQueryResult1and2, sort1);\r\n assertTrue(lgteHits1and2.length() == 2);\r\n\r\n\r\n long time1_0 = lgteHits1.doc(0).getTime().getTime();\r\n long time1and2_0 = lgteHits1and2.doc(0).getTime().getTime();\r\n long time1and2_1 = lgteHits1and2.doc(1).getTime().getTime();\r\n assertTrue(time1_0 == new MyCalendar(2005,11,20,9,0,10).getTimeInMillis());\r\n assertTrue(time1and2_0 == new MyCalendar(2005,11,20,9,0,10).getTimeInMillis());\r\n assertTrue(time1and2_1 == new MyCalendar(2007,1,12,20,45,15).getTimeInMillis());\r\n\r\n\r\n searcher.close();\r\n }",
"private int prefixQuery(String prefix) {\n if (curr == null)\n curr = track(dict, prefix);\n else\n curr = track(curr.mid, prefix);\n\n if (curr == null) return 0;\n if (curr.isString) {\n if (curr.mid == null) return 1;\n else return 3;\n } else {\n if (curr.mid == null) return 0;\n return 2;\n }\n }",
"public int getStart()\n {\n return start;\n }",
"public abstract List<T> findWithOffsetFromPosition(int from, int amount);",
"public ElasticInteger(int valueAtStart, long duration) {\n super(valueAtStart, duration);\n }",
"@Test(timeout = 4000)\n public void test026() throws Throwable {\n Range range0 = Range.ofLength(0L);\n long long0 = range0.getLength();\n assertEquals(0L, long0);\n \n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n long long1 = range0.getEnd(range_CoordinateSystem0);\n assertEquals(0L, long1);\n }",
"@Test(timeout = 4000)\n public void test021() throws Throwable {\n Range range0 = Range.ofLength(212L);\n range0.getEnd();\n Range range1 = Range.ofLength(126L);\n Range range2 = range0.intersection(range1);\n assertFalse(range2.isEmpty());\n \n Object object0 = new Object();\n boolean boolean0 = range1.equals(range0);\n assertFalse(boolean0);\n \n long long0 = range0.getEnd();\n assertEquals(211L, long0);\n assertFalse(range0.equals((Object)range2));\n \n long long1 = range1.getBegin();\n assertSame(range1, range2);\n assertEquals(0L, long1);\n }",
"public int getStart() {\n return start;\n }",
"protected final int offsetFromClue(final int clue) {\n\t\tassert isValidRange(clue) : \" clue=\" + clue;\n\t\tfinal int diff = clue - mark;\n\t\treturn diff >= 0 ? diff : diff + length();\n\t}",
"public int getStart ()\n {\n\n return this.start;\n\n }",
"public int getOffset(long date) { throw new RuntimeException(\"Stub!\"); }",
"protected final int clueFromOffset(final int offset) {\n\t\tfinal int size = length();\n\t\tfinal int mark = this.mark;\n\t\tassert isValidRange(mark) : \" mark=\" + mark;\n\t\tassert isValidRange(offset) : \" offset=\" + offset;\n\t\tint clue = mark + offset;\n\t\tif (clue >= size) {\n\t\t\tclue -= size;\n\t\t}\n\t\tassert isValidRange(clue) : \" clue=\" + clue;\n\t\treturn clue;\n\t}",
"public String getSrcLati(long offset) throws IOException {\n\t\tdataBase.seek(offset);\n\t\tString[] array = dataBase.readLine().split(\"\\\\|\");\n\t\treturn array[12];\n\t}",
"public void setEndOffset(Integer endOffset) {\n this.endOffset = endOffset;\n }",
"MinmaxEntity getStart();",
"void seek(int offsetFromStart);",
"public static int findLimitStart( long oid, int recordToGet, String whereClause){\n\t\tString order = \"\";\n\t\tint size = getCount(whereClause);\n\t\tint start = 0;\n\t\tboolean found =false;\n\t\tfor(int i=0; (i < size) && !found ; i=i+recordToGet){\n\t\t\t Vector list = list(i,recordToGet, whereClause, order); \n\t\t\t start = i;\n\t\t\t if(list.size()>0){\n\t\t\t for(int ls=0;ls<list.size();ls++){ \n\t\t\t \t PurchaseItemShare purchaseItemShare = (PurchaseItemShare)list.get(ls);\n\t\t\t\t if(oid == purchaseItemShare.getOID())\n\t\t\t\t\t found=true;\n\t\t\t }\n\t\t }\n\t\t}\n\t\tif((start >= size) && (size > 0))\n\t\t start = start - recordToGet;\n\n\t\treturn start;\n\t}",
"void setFirstResult(int offset);",
"@Test(timeout = 4000)\n public void test024() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2147483647L, 2147483647L);\n Object object0 = new Object();\n long long0 = range0.getBegin();\n assertEquals(2147483647L, long0);\n \n range0.iterator();\n Object object1 = new Object();\n boolean boolean0 = range0.equals(object1);\n assertFalse(boolean0);\n \n long long1 = range0.getEnd();\n assertEquals(2147483646L, long1);\n }",
"int getRawOffset();",
"@Test(timeout = 4000)\n public void test108() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-32768L), 2147484380L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range1 = Range.of(range_CoordinateSystem1, (-32768L), 2147484380L);\n range1.getEnd();\n boolean boolean0 = range0.equals(range1);\n assertFalse(boolean0);\n \n long long0 = range1.getEnd();\n assertEquals(2147484379L, long0);\n \n Object object0 = new Object();\n range0.getEnd();\n long long1 = range0.getBegin();\n assertEquals((-32769L), long1);\n }",
"public long getStringStart() {\n return ByteUtils.toUnsignedInt(stringStart);\n }",
"Double getOffset();",
"public long getRangeStart() {\n return mRangeStart;\n }",
"@Test(timeout = 4000)\n public void test046() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32740L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32740 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range1.startsBefore(range0);\n range1.equals(range0);\n range0.equals(\"[ 32740 .. 2147483646 ]/0B\");\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }",
"public void setStart(int start) {\n\t\tthis.start = start;\n\t}",
"public int getStartPos() {\n return startPos;\n }",
"protected abstract int getXOffset();",
"public int getStart() {\n return this.start;\n }",
"Offset createOffset();",
"public int start() { return _start; }"
] |
[
"0.7155137",
"0.7005356",
"0.6751233",
"0.6638357",
"0.65790266",
"0.64568615",
"0.6367915",
"0.6354228",
"0.62671345",
"0.61216956",
"0.6029304",
"0.59272957",
"0.58931655",
"0.58696604",
"0.5790172",
"0.5733893",
"0.5596857",
"0.5596857",
"0.5529561",
"0.5523914",
"0.5498671",
"0.543517",
"0.54351544",
"0.5418291",
"0.5398984",
"0.53848547",
"0.5373098",
"0.53562075",
"0.5340888",
"0.53349704",
"0.5325894",
"0.53198344",
"0.53173065",
"0.53006667",
"0.52788574",
"0.5261968",
"0.52438587",
"0.5219549",
"0.5199288",
"0.51813555",
"0.51813555",
"0.51813555",
"0.517409",
"0.5154388",
"0.5139363",
"0.51272583",
"0.51094073",
"0.5095898",
"0.5093144",
"0.50872284",
"0.50864756",
"0.50754863",
"0.50739694",
"0.50668365",
"0.50667053",
"0.50538737",
"0.5051754",
"0.50359285",
"0.5026558",
"0.5024875",
"0.502345",
"0.5015875",
"0.50095063",
"0.5000759",
"0.49986795",
"0.4993229",
"0.49866694",
"0.49851754",
"0.49834564",
"0.49762207",
"0.4974516",
"0.49713358",
"0.49687165",
"0.4953219",
"0.4950242",
"0.4945736",
"0.49453145",
"0.49445835",
"0.49445507",
"0.4944314",
"0.4943003",
"0.49412397",
"0.49409044",
"0.4939249",
"0.49356234",
"0.4931311",
"0.49281532",
"0.49232256",
"0.4920425",
"0.4919566",
"0.49173427",
"0.49154076",
"0.49149787",
"0.49149084",
"0.4906422",
"0.49041405",
"0.48958176",
"0.48941207",
"0.48901144",
"0.48900163",
"0.48870355"
] |
0.0
|
-1
|
Returns the Ickle query string.
|
@Override
public String getQueryString() {
return queryString;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"java.lang.String getQuery();",
"java.lang.String getQuery();",
"public java.lang.String getQueryString() {\n return bugQuery.getQueryString();\n }",
"String getQuery();",
"String getQueryString ();",
"public String getQueryString() {\n\t\tif (query.isEmpty())\n\t\t\treturn null;\n\n\t\tif (queryString == null)\n\t\t\tqueryString = mapToString(query, \"&\");\n\n\t\treturn queryString;\n\t}",
"public String getQueryString() {\n // We use the encoding which should be used according to the HTTP spec, which is UTF-8\n return getQueryString(EncoderCache.URL_ARGUMENT_ENCODING);\n }",
"public String getQueryString() {\n // We use the encoding which should be used according to the HTTP spec, which is UTF-8\n return getQueryString(EncoderCache.URL_ARGUMENT_ENCODING);\n }",
"public java.lang.String getQuery() {\r\n return query;\r\n }",
"public String getQuery() {\r\n\t\treturn query;\r\n\t}",
"public java.lang.String getQuery() {\n java.lang.Object ref = query_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();\n query_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getQuery() {\n return query;\n }",
"public String getQueryString() {\n return _query;\n }",
"public String getQuery() {\r\n return query;\r\n }",
"public String createQueryString() {\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\r\n\t\tSet<Map.Entry<String, Object>> set = queryParams.entrySet();\r\n\t\tEnumeration<Map.Entry<String, Object>> en = Collections.enumeration(set);\r\n\t\ttry\r\n\t\t{\r\n\t\t\twhile (en.hasMoreElements())\r\n\t\t\t{\r\n\t\t\t\tMap.Entry<String, Object> entry = en.nextElement();\r\n\t\t\t\tString key = entry.getKey();\r\n\t\t\t\tObject val = entry.getValue();\r\n\t\t\t\tif (val instanceof String)\r\n\t\t\t\t{\r\n\t\t\t\t\tString s = null;\r\n\t\t\t\t\ts = (String) val;\r\n\t\t\t\t\ts = URLEncoder.encode(s, \"US-ASCII\");\r\n\t\t\t\t\tsb.append(\"&\").append(key).append(\"=\").append(s);\r\n\t\t\t\t}\r\n\t\t\t\telse if (val instanceof String[])\r\n\t\t\t\t\tsb.append(\"&\").append(getNameValueString(key, (String[]) val));\r\n\t\t\t}\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\r\n\t\treturn sb.substring(1);\r\n\t}",
"String query();",
"public String getQuery() {\n return query;\n }",
"public String getQuery() {\n return query;\n }",
"public String getQuery() {\n return query;\n }",
"public java.lang.String getQuery() {\n java.lang.Object ref = query_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n query_ = s;\n }\n return s;\n }\n }",
"public java.lang.CharSequence getQuery() {\n return query;\n }",
"public String getQuery()\n\t{\n\t\tVRL loc=getLocation();\n\t\t\n\t\tif (loc==null)\n\t\t\treturn null;\n\t\t\n\t\treturn loc.getQuery();\n\t}",
"public java.lang.CharSequence getQuery() {\n return query;\n }",
"public String getQueryString() {\n return queryString;\n }",
"public String getQuery() {\n return _query;\n }",
"public String getQueryRequest()\n {\n return m_queryRequest;\n }",
"public String getQueryString() {\n\t\treturn queryString;\n\t}",
"public java.lang.String getQuery()\n {\n return this.query;\n }",
"private String getQueryStringFromParser() {\n return (getString() == null) ? \"\" : getString();\n }",
"public final String getQuery() {\n return this.query;\n }",
"@NonNull\n public String getQuery() {\n return searchView.getQuery().toString();\n }",
"public String getQuery() {\n return this.query;\n }",
"@Override\n\t\tpublic String getQueryString() {\n\t\t\treturn null;\n\t\t}",
"String getQuery() throws RemoteException;",
"public String getQuery(){\n return this.query;\n }",
"public String getQueryParamsAsString() {\n\t\tStringBuffer params = new StringBuffer(30);\n\t\tString key, value;\n\t\tfor (Iterator it = validQueryParams.keySet().iterator(); it.hasNext();) {\n\t\t\tkey = (String) it.next();\n\t\t\tvalue = (String) validQueryParams.get(key);\n\t\t\tparams.append(key).append(\"=\").append(value);\n//\t\t\tif (it.hasNext()) {\n\t\t\t\tparams.append(\"&\");\n//\t\t\t}\n\t\t}\n\t\t// add extral value(used in web page)\n\t\tparams.append(\"hasQueried=true\");\n\t\treturn params.toString();\n\t}",
"public String query() {\n return this.query;\n }",
"public com.google.protobuf.ByteString getQueryBytes() {\n java.lang.Object ref = query_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n query_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getQueryString() {\n if (CoreUtil.isEmpty(sql)) {\n return \"\";\n }\n if(bind == null) {\n return sql;\n }\n StringBuilder buf = new StringBuilder();\n StringTokenizer tok = new StringTokenizer(sql + \" \", \"?\");\n int x = 0;\n while (tok.hasMoreTokens()) {\n String oneChunk = tok.nextToken();\n buf.append(oneChunk);\n Object value = null;\n if(x < bind.length) {\n value = bind[x];\n if(value instanceof java.util.Date) {\n value = \"'\"+CoreUtil.formatDateTime(\"yyyy.MM.dd\", (java.util.Date)value)+\"'\";\n }else if(value instanceof java.sql.Date) {\n value = \"'\"+CoreUtil.formatDateTime(\"yyyy.MM.dd\", (java.sql.Date)value)+\"'\";\n }else if(value instanceof String) {\n value = \"'\"+value+\"'\";\n }\n buf.append(value);\n }\n x++;\n }\n return buf.toString().trim();\n }",
"public com.google.protobuf.ByteString getQueryBytes() {\n java.lang.Object ref = query_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n query_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"java.lang.String getQueryName();",
"@JsonIgnore\n public String getQuery() {\n return _query;\n }",
"protected String getQuery(String query) {\r\n\t\treturn query;\r\n\t}",
"public String toQueryUrl() {\n StringBuilder urlBuilder = new StringBuilder();\n Set<Map.Entry<String, Object>> entrySet = params.entrySet();\n int i = entrySet.size();\n for (Map.Entry<String, Object> entry : entrySet) {\n try {\n if (null != entry.getValue()) {\n urlBuilder.append(entry.getKey()).append('=')\n .append(URLEncoder.encode(String.valueOf(entry.getValue()), DEFAULT_ENC));\n if (i > 1) {\n urlBuilder.append('&');\n }\n }\n i--;\n } catch (UnsupportedEncodingException e) {\n throw new RuntimeException(e);\n }\n }\n \n return urlBuilder.toString();\n }",
"public String getQueryString(){\n return this.queryString;\n }",
"private String getQueryHint() {\n return ApiProperties.getProperty(\n \"api.bigr.library.\" + ApiFunctions.shortClassName(getClass().getName()) + \".hint\");\n }",
"public String getQueryString() {\n return m_queryString;\n }",
"private static String getQuery() {\n String scope = \"\";\n generateState();\n\n for (String s : SCOPES) {\n scope += \"+\" + s;\n }\n\n return \"?response_type=code&redirect_uri=\" + REDIRECT_URL +\n \"&client_id=\" + CLIENT_KEY +\n \"&scope=\" + scope +\n \"&STATE=\" + STATE;\n }",
"public String getWhereString()\n {\n String outString = \n \"WHERE lid = '\" + lid + \"'\" \n + \" AND agency_code = '\" + agency_code + \"'\" \n + \" AND office = '\" + office + \"'\" \n ;\n return outString;\n }",
"java.lang.String getQueryId();",
"IQuery getQuery();",
"public String getWhereString()\n {\n String outString = \n \"WHERE recip = '\" + recip + \"'\" \n ;\n return outString;\n }",
"com.google.protobuf.ByteString getQueryBytes();",
"public String queryString(int what) {\n return argonEGL.eglQueryString(argonGLDisplay, what);\n }",
"String getQueryRequestUrl();",
"public String generateQueryParams() {\n if (petition.getParamsMap().entrySet().size() == 0)\n return \"\";\n else {\n boolean first = true;\n StringBuffer queryParams = new StringBuffer(\"?\");\n Iterator<Map.Entry<String, String>> it = petition.getParamsMap()\n .entrySet().iterator();\n // just iterate the map and fill the httpParams with its content\n while (it.hasNext()) {\n if (!first)\n queryParams.append(\"&\");\n else\n first = false;\n Map.Entry<String, String> e = (Entry<String, String>) it.next();\n String key = URLEncoder.encode(e.getKey());\n String value = URLEncoder.encode(e.getValue());\n queryParams.append(String.format(\"%s=%s\", key, value));\n\n }\n return queryParams.toString();\n }\n }",
"public static String getQueryString(String key) {\n String value = Http.Context.current().request().getQueryString(key);\n if (value != null) {\n value = value.trim();\n }\n return value;\n }",
"public String getQueryTemplate() {\n return queryTemplate;\n }",
"com.google.protobuf.ByteString\n getQueryBytes();",
"private String getRequestUrl(String query) {\n\n StringBuilder builder = new StringBuilder();\n float lat, lng;\n\n // check for location, if not found, check for locally saved location\n if (location != null) {\n lat = location.lat;\n lng = location.lng;\n } else {\n lat = SharedPrefs.get(C.sp_last_lat);\n lng = SharedPrefs.get(C.sp_last_long);\n }\n String locationStr;\n // if even that is not found, search near Bangalore\n if (lat == -1 || lng == -1) {\n locationStr = \"near=Bengaluru\";\n } else {\n locationStr = \"ll=\" + lat + \",\" + lng;\n }\n\n builder.append(C.API_SEARCH)\n .append(\"client_id=\").append(C.FS_CLIENT_ID).append(\"&\")\n .append(\"client_secret=\").append(C.FS_CLIENT_SECRET).append(\"&\")\n .append(\"v=20191231&\")\n .append(\"limit=20&\")\n .append(\"intent=checkin&\")\n .append(locationStr);\n\n if (query != null) {\n builder.append(\"&query=\").append(query);\n }\n\n return builder.toString();\n\n }",
"public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser);",
"String getBarcharDataQuery();",
"public String buildFilter() {\n String qs = \"\";\n Set<Map.Entry<String, String>> set = instance.arguments.entrySet();\n\n for (Map.Entry<String, String> entry : set) {\n qs += entry.getKey() + \"=\" + entry.getValue() + \"&\";\n }\n return qs.substring(0, qs.length() - 1);\n }",
"public String getQuery()\n {\n /**\n * gets mouse marker information from MGD\n\t * includes interim and official nomenclature only\n */\n String stmt = \"select a.accID, m.symbol, m.name, m.chromosome, \" +\n \"t.name as type, a._Object_key \" +\n \"from ACC_Accession a, MRK_Marker m, MRK_Types t \" +\n \"where m._Organism_key = 1 \" +\n \"and m._Marker_Status_key = 1 \" +\n \"and m._Marker_key = a._Object_key \" +\n \"and a._MGIType_key = 2 \" +\n \"and a._LogicalDB_key = 1 \" +\n \"and a.prefixPart = 'MGI:' \" +\n \"and a.preferred = 1 \" +\n \"and m._Marker_Type_key = t._Marker_Type_key\";\n return stmt;\n }",
"public java.lang.String getQueryName() {\n java.lang.Object ref = queryName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n queryName_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getQueryName() {\n java.lang.Object ref = queryName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();\n queryName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"private String queryBuilder(HashMap<String, String> data) throws UnsupportedEncodingException {\n if (data.isEmpty())\n return \"\";\n StringBuilder dataAsString = new StringBuilder();\n for (Entry<String, String> entry : data.entrySet()) {\n dataAsString.append(\"&\");\n dataAsString.append(URLEncoder.encode(entry.getKey(), \"UTF-8\"));\n dataAsString.append(\"=\");\n dataAsString.append(URLEncoder.encode(entry.getValue(), \"UTF-8\"));\n }\n return dataAsString.toString();\n }",
"private String getQuery(ArrayList<NameValuePair> params) throws Exception\n\t{\n\t StringBuilder keyvalpair = new StringBuilder();\n\t boolean firstparam = true;\n\t for (NameValuePair pair : params)\n\t {\n\t if (!firstparam) {\n\t \tkeyvalpair.append(\"&\");\n\t }\n\t else {\n\t firstparam = false;\n\t }\n\t keyvalpair.append(URLEncoder.encode(pair.getName(), \"UTF-8\"));\n\t keyvalpair.append(\"=\");\n\t keyvalpair.append(URLEncoder.encode(pair.getValue(), \"UTF-8\"));\n\t }\n\n\t return keyvalpair.toString();\n\t}",
"String encryptQueryString(String query) throws EncryptionException;",
"public String customQueryString() {\n return this.customQueryString;\n }",
"public String getBuildKey() {\n StringWriter sw = new StringWriter();\n sw.append(\"facetrequest(\").append(\"query(\").append(stringQuery);\n sw.append(\"), \");\n writeGroupKey(sw);\n sw.append(\")\");\n return sw.toString();\n }",
"String getQuery(HashMap<String, String> params) throws UnsupportedEncodingException {\n StringBuilder query=new StringBuilder();\n boolean first = true;\n for (Map.Entry<String, String> entry : params.entrySet()) {\n if (first)\n first=false;\n else\n query.append('&');\n\n String key=entry.getKey();\n Log.d(\"NetworkCall\",key);\n query.append(URLEncoder.encode(key, \"UTF-8\"));\n query.append(\"=\");\n query.append(URLEncoder.encode(entry.getValue(), \"UTF-8\"));\n }\n return query.toString();\n }",
"public String getCqlString() {\r\n return cqlString;\r\n }",
"public String getXMLquery() {\n return localQuerytool.getXML();\n }",
"String getQueryText() {\n AdqlSyntax syntax = AdqlSyntax.getInstance();\n StringBuffer sbuf = new StringBuffer();\n if ( talias_ != null ) {\n sbuf.append( syntax.quoteIfNecessary( talias_ ) )\n .append( \".\" );\n }\n String cname = cmeta_.getName();\n sbuf.append( quote_ ? syntax.quote( cname )\n : syntax.quoteIfNecessary( cname ) );\n if ( rename_ != null ) {\n sbuf.append( \" AS \" )\n .append( syntax.quoteIfNecessary( rename_ ) );\n }\n return sbuf.toString();\n }",
"protected String getRetrievalQuery()\n {\n return immutableGetRetrievalQuery();\n }",
"public abstract String createQuery();",
"java.lang.String getQueryLogicName();",
"String getAskQuery(String... args);",
"public static String formulateQueryURL(String keyphrase) {\n StringBuilder query = new StringBuilder();\n query.append(mBaseRequestURL);\n query.append(\"\\\"\" + keyphrase + \"\\\"\");\n\n return query.toString();\n }",
"public String g() {\n StringBuffer stringBuffer = new StringBuffer();\n stringBuffer.append(\"output=json\");\n stringBuffer.append(\"&page=\");\n stringBuffer.append(((DistrictSearchQuery) this.f6441a).getPageNum());\n stringBuffer.append(\"&offset=\");\n stringBuffer.append(((DistrictSearchQuery) this.f6441a).getPageSize());\n stringBuffer.append(\"&showChild=\");\n stringBuffer.append(((DistrictSearchQuery) this.f6441a).isShowChild());\n if (((DistrictSearchQuery) this.f6441a).isShowBoundary()) {\n stringBuffer.append(\"&extensions=all\");\n } else {\n stringBuffer.append(\"&extensions=base\");\n }\n if (((DistrictSearchQuery) this.f6441a).checkKeyWords()) {\n String c2 = c(((DistrictSearchQuery) this.f6441a).getKeywords());\n stringBuffer.append(\"&keywords=\");\n stringBuffer.append(c2);\n }\n stringBuffer.append(\"&key=\" + bf.f(this.f6444d));\n return stringBuffer.toString();\n }",
"protected String getQueryIdentifier() {\n \t\treturn null;\n \t}",
"private String getQuery(List<NameValuePair> params) throws UnsupportedEncodingException\n {\n StringBuilder result = new StringBuilder();\n boolean first = true;\n\n for (NameValuePair pair : params)\n {\n if (first)\n first = false;\n else\n result.append(\"&\");\n\n result.append(URLEncoder.encode(pair.getName(), \"UTF-8\"));\n result.append(\"=\");\n result.append(URLEncoder.encode(pair.getValue(), \"UTF-8\"));\n }\n\n return result.toString();\n }",
"String getQueryConstant()\n\t{\n\t\treturn QUERY_CONST[value];\n\t}",
"@Override\n public String toString() {\n return \"Query: QueryID=\" +this.getQueryID()+ \" ReqPosts=\" + this.getRequestedPosts();\n }",
"@Override\n public String toString() {\n if (filterConfig == null) {\n return (\"RequestQueryFilter()\");\n }\n StringBuffer sb = new StringBuffer(\"RequestQueryFilter(\");\n sb.append(filterConfig);\n sb.append(\")\");\n return (sb.toString());\n }",
"public String queryId() {\n return queryId;\n }",
"@Override\n public String getWhereClause() {\n Object ref = whereClause_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n whereClause_ = s;\n return s;\n }\n }",
"CampusSearchQuery generateQuery();",
"private String generateQueryString(Map<String, String> args) {\n StringBuilder url = new StringBuilder();\n\n // Create the query string (?foo=bar&key1=val1\n url.append(\"?\");\n for (Iterator<Map.Entry<String, String>> it = args.entrySet().iterator(); it.hasNext(); ) {\n Map.Entry<String, String> entry = it.next();\n\n url.append(urlEncode(entry.getKey()));\n url.append(\"=\");\n url.append(urlEncode(entry.getValue()));\n if (it.hasNext()) {\n // More parameters are coming, add a separator\n url.append(\"&\");\n }\n }\n\n return url.toString();\n }",
"public String getJql() {\n return jql;\n }",
"public String toSolrQuery() {\n SolrMapping mapping = store.getMapping();\n String fld = mapping.getPrimaryKey();\n String q;\n if (getKey() != null) {\n q = fld + \":\" + SolrStore.escapeQueryKey(getKey().toString());\n } else {\n q = fld + \":[\";\n if (getStartKey() != null) {\n q += SolrStore.escapeQueryKey(getStartKey().toString());\n } else {\n q += \"*\";\n }\n q += \" TO \";\n if (getEndKey() != null) {\n q += SolrStore.escapeQueryKey(getEndKey().toString());\n } else {\n q += \"*\";\n }\n q += \"]\";\n }\n return q;\n }",
"com.google.protobuf.ByteString getQueryNameBytes();",
"com.google.protobuf.ByteString getQueryMessage();",
"public String getQuery() {\n\t\tIWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n\t\tif (null == window) {\n\t\t\treturn null;\n\t\t}\n\n\t\tIEditorPart editor = window.getActivePage().getActiveEditor();\n\t\tif (editor == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!(editor instanceof QueryEditorPart)) {\n\t\t\treturn null;\n\t\t}\n\n\t\tQueryEditorPart queryEditorPart = (QueryEditorPart) editor;\n\t\tStyledText stext = queryEditorPart.getSqlEditorWidget();\n\t\treturn stext.getSelectionText();\n\t}",
"public String toQuery() {\n // determine ordering\n String ordering = \"\";\n if (ratingFirst) {\n ordering += \"ORDER BY rating\" + (ratingDescend ? \" DESC, \" : \", \") +\n (nameDescend ? \"make DESC, model DESC, year DESC\" : \"make, model, year\");\n } else {\n ordering += \"ORDER BY \" + (nameDescend ? \"make DESC, model DESC, year DESC\" : \"make, model, year\")\n + \", rating\" + (ratingDescend ? \" DESC\" : \"\");\n }\n\n // determine pagination offsets\n String pagination = \"\";\n if (pageNumber > 1) {\n pagination += \"\\nLIMIT 100\\nOFFSET \" + (convertToBase() - 1) * 100 + \";\";\n }\n\n return query + ordering + pagination;\n }",
"public String getQueryKey()\n {\n if (getPrimaryKey() == null)\n {\n return \"\";\n }\n else\n {\n return getPrimaryKey().toString();\n }\n }",
"public Map<String, String> getQuery() {\n\t\treturn Collections.unmodifiableMap(query);\n\t}",
"String getRetrieveKeysQuery();",
"QueryArgs getQueryArgs();"
] |
[
"0.7386805",
"0.7386805",
"0.73661",
"0.7354665",
"0.70274466",
"0.7000023",
"0.69348747",
"0.69348747",
"0.6914073",
"0.68755275",
"0.6866022",
"0.6857491",
"0.6852602",
"0.68406785",
"0.6812219",
"0.681027",
"0.6795576",
"0.6795576",
"0.6795576",
"0.67885447",
"0.6679901",
"0.6665384",
"0.6638702",
"0.66333896",
"0.66269696",
"0.662371",
"0.6612294",
"0.6582941",
"0.65632087",
"0.6556407",
"0.6538561",
"0.6507805",
"0.6490877",
"0.64895296",
"0.6361708",
"0.6359693",
"0.6347208",
"0.63433814",
"0.6327076",
"0.6306664",
"0.62589896",
"0.6234212",
"0.61867464",
"0.61788374",
"0.61348933",
"0.61184245",
"0.6106069",
"0.6097951",
"0.6056811",
"0.602356",
"0.6012038",
"0.59739596",
"0.5966293",
"0.5947644",
"0.59215087",
"0.5904449",
"0.5901417",
"0.5884698",
"0.5874327",
"0.5856118",
"0.58532405",
"0.58432883",
"0.5835583",
"0.5819428",
"0.57993555",
"0.57983214",
"0.5795413",
"0.5761586",
"0.5761059",
"0.570156",
"0.5690255",
"0.56848514",
"0.5681841",
"0.56818247",
"0.56493634",
"0.5625383",
"0.56191194",
"0.55949587",
"0.55867225",
"0.55765104",
"0.5547807",
"0.55405486",
"0.552522",
"0.5485464",
"0.5478121",
"0.5468947",
"0.546034",
"0.54389447",
"0.5437344",
"0.5435597",
"0.5417302",
"0.54052716",
"0.5403622",
"0.5388524",
"0.5387073",
"0.53730524",
"0.5370369",
"0.5355197",
"0.5354001",
"0.53201765"
] |
0.66141814
|
26
|
Reset internal state after pagination or query parameters are modified. This is needed to ensure the next execution of the query uses the new values.
|
public abstract void resetQuery();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void reset() {\r\n reset(params);\r\n }",
"protected void resetParams() {\n\t\treport.report(\"Resetting Test Parameters\");\n\t\t// numberOfRecoverys = 0;\n\t\tstreams = new ArrayList<StreamParams>();\n\t\tlistOfStreamList = new ArrayList<ArrayList<StreamParams>>();\n\t}",
"public void resetFilter() {\n filters.clear();\n modifiedSinceLastResult = true;\n }",
"public void reset()\n {\n Iterator i;\n\n i = params.iterator(); \n while (i.hasNext()) {\n ((Parameter)i.next()).reset();\n }\n\n i = options.iterator(); \n while (i.hasNext()) {\n ((Parameter)i.next()).reset();\n }\n }",
"private void reset() {\n \t resultCount =0;\n\t searchStatus = 0;\n\t resultSetStatus = 0;\n\t errorCode = 0;\n\t errorMsg = \"None provided\";\n\t Present = null;\n\t dbResults = null;\n oclc7= null;\n oclc8 = null;\n requestLength=0;\n responseLength=0;\n }",
"synchronized void reset() {\n\n // no change if called before getValue() or called twice\n lastValue = currValue = startValue;\n }",
"public void resetAll() {\n reset(getAll());\n }",
"protected void resetInternalState() {\n setStepStart(null);\n setStepSize(minStep.multiply(maxStep).sqrt());\n }",
"public void clearSearch() {\n searchParam = \"\";\n lazyModel = null;\n listRemotoFake = null;\n first = 0;\n rows = 10;\n }",
"@Override\n public void resetAllValues() {\n }",
"private void clearQueryString() {\n this.setQueryString(\"\");\n }",
"public void clearParameters() {\n\t\tqueryParameters.clear();\n\t}",
"public void reset(String query, int pageNumber, int numResultsPerPage, boolean isFullText, boolean isSearch, boolean isBrowse, ArrayList<String> arr) {\n this.query = query;\n this.pageNumber = pageNumber;\n this.numResultsPerPage = numResultsPerPage;\n this.ratingDescend = false;\n this.nameDescend = false;\n this.ratingFirst = false;\n this.errorMessage = \"\";\n this.fullTextSearchTokens = isFullText ? arr : null;\n this.searchTokens = isSearch ? arr : null;\n this.browseTokens = isBrowse ? arr : null;\n }",
"public void reset() {\n\n operator.reset(); // reset Scan Operator\n }",
"public void resetCachedResultSet() {\n\t\tthis.cachedResultSetForDelta = null;\n\t}",
"void reset()\n {\n reset(values);\n }",
"public void resetQValues() {\n\t\tqValues = new HashMap<StateActionPair, Double>();\n\t}",
"private void resetParams() {\n lowerYear = 1999;\n upperYear = 2020;\n yearRestriction = false;\n\n lowerProblem = 1;\n upperProblem = 60;\n problemRestriction = false;\n partTwo = false;\n }",
"public void resetSearchFilters() {\n this.searchFilters.resetToDefaults();\n }",
"public void onSelectedFromReset() {\n\t\tfilterName = null;\n\t\tfilterState = null;\n\t\tfilterVariant = null;\n\t\tfilterAcquisition = null;\n\t\tfilterLiquidation = null;\n\t\tfilterLocation = null;\n\t\tfilterComment = null;\n\t\tledger.reset();\n\t\t// ... then just fall through to the success action.\n\t}",
"private void reset() {\n\t\tfiles = new HashMap<>();\n\t\tparams = new HashMap<>();\n\t}",
"void resetTreeForQueries() {\n\t\t_queryTree = new Tree(_tree);\n\t\tif(DEBUG) {\n\t\t\tSystem.out.printf(\"\\nquery tree structure:\\n%s\\n\",_queryTree.getLongInfo());\n\t\t}\n\t}",
"@Override\n\tpublic void reset() {\n\t\tthis.currentConditionIndex = 0;\n\t\t\n\t\tfor(Cond cond:this.conditions)\n\t\t{\n\t\t\tfor(Param param:cond.params)\n\t\t\t{\n\t\t\t\tparam.reset();\n\t\t\t}\n\t\t}\n\t}",
"public void resetFilterAndRefresh() {\n postLoaderMethodList.setSelectedIndex(0);\n postLoaderMethodList.setContentType(PostLoader.CONTENT_ALL);\n postLoaderMethodList.setShowGlobalPosts(false);\n AppSession.getInstance().getUser().setHidePublicContents(false);\n\n refreshForDifferentPostParams();\n }",
"public void reset() {\n\t\tterminateAll($$eqHashIndex_0.iterator());\n\t}",
"public void reset() {\n this.searchDone = false;\n this.taskForResize = null;\n }",
"public void reset() {\n noIndex= false;\n noFollow= false;\n noCache= false;\n baseHref= null;\n }",
"@Override\n protected void beforeSearch() {\n index = 0;\n numberOfIterations = 0;\n pageCounter = 0;\n }",
"@Override\n public void resetFilteredLists() {\n\n }",
"public void reset(QueryDescriptor queryDescriptor)\n {\n DemoPageDef.SavedSearchDef savedSearchDef = \n ((DemoQueryDescriptor)queryDescriptor).getSavedSearchDef();\n List<DemoPageDef.SearchFieldDef> origSearchFieldList = savedSearchDef.getSearchFields();\n List<DemoPageDef.SearchFieldDef> removableFields = \n new ArrayList<DemoPageDef.SearchFieldDef>();\n for(DemoPageDef.SearchFieldDef searchField : savedSearchDef.getSearchFields())\n {\n if (searchField.isRemovable())\n {\n removableFields.add(searchField);\n }\n else\n {\n searchField.resetValue();\n searchField.setOperator(searchField.getDefaultOperator()); \n }\n }\n origSearchFieldList.removeAll(removableFields);\n \n // Conjunction\n savedSearchDef.setSelectedConjunction(savedSearchDef.getDefaultConjunction());\n DemoQueryDescriptor demoDescriptor = (DemoQueryDescriptor)queryDescriptor;\n demoDescriptor.setConjunctionCriterion(new DemoConjunctionCriterion(savedSearchDef));\n }",
"public void resetForExecutionForRetry() {\n assertInvariants(ItemProcessingState.WAIT_FOR_MAPPING_UPDATE, ItemProcessingState.EXECUTED);\n currentItemState = ItemProcessingState.INITIAL;\n requestToExecute = null;\n executionResult = null;\n assertInvariants(ItemProcessingState.INITIAL);\n }",
"public void reset() {\n _valueLoaded = false;\n _value = null;\n }",
"public void resetPagina()\r\n {\r\n this.pagina = null;\r\n }",
"protected void reset() {\n\t\t}",
"private void resultResetHelper()\r\n {\r\n leftOperand = null;\r\n rightOperand = null;\r\n operator = null;\r\n }",
"public void setPagination(Query query) {\r\n\t\tif (getCount() != null && getCount() > 0) {\r\n\t\t\tquery.setMaxResults(getCount());\r\n\t\t}\r\n\t\tif (getPage() != null && getCount() != null) {\r\n\t\t\tquery.setFirstResult(getCount() * (getPage() - 1));\r\n\t\t}\r\n\t}",
"private void clearSearchingOptionValues() {\n noticeSerialNo = null;\n pinOrNic = null;\n searchStartDate = null;\n searchEndDate = null;\n }",
"private void reset(){\r\n\t\tScheduleDao dao = new ScheduleDaoImpl();\r\n\t\tfinal List<Schedule> result = dao.queryAll();\r\n\t\tif (result != null && result.size() > 0) {\r\n\t\t\tfor (Schedule schedule : result) {\r\n\t\t\t\tif(schedule.getStatus() == Schedule.STATUS_PENDING||schedule.getStatus()==Schedule.STATUS_INPROGRESS){\r\n\t\t\t\t\treset(schedule);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void resetSearchValues() {\n this.IDOrNameText.setText(\"\");\n this.accordIDButton.setSelected(true);\n this.accordNameButton.setSelected(false);\n type = this.accordIDButton.getText();\n }",
"public void reset() {\n this.index = this.startIndex;\n }",
"public void reset()\n {\n pages.clear();\n ePortfolioTitle = \"\";\n selectedPage = null;\n }",
"private void reset() {\n //todo test it !\n longitude = 0.0;\n latitude = 0.0;\n IDToday = 0L;\n venVolToday = 0L;\n PM25Today = 0;\n PM25Source = 0;\n DBCanRun = true;\n DBRunTime = 0;\n isPMSearchRunning = false;\n isLocationChanged = false;\n isUploadRunning = false;\n refreshAll();\n locationInitial();\n DBInitial();\n sensorInitial();\n }",
"public void reset() {\n\n\t\trbNone.setSelected(true);\n\t\tquizIDField.clear();\n\t\tfilter();\n\t\t\n\t}",
"public void resetVariables(){\n\t\tthis.queryTriplets.clear();\n\t\tthis.variableList.clear();\n\t\tthis.prefixMap.clear();\n\t}",
"public synchronized final void reset() {\r\n f_index = getDefaultIndex();\r\n f_userSetWidth = -1;\r\n // by default the first column is sorted the others unsorted\r\n f_sort = getDefaultSort();\r\n }",
"@Override\n\tpublic void reset() {\n\t\tthis.prepare();\n\t\tsuper.reset();\n\t}",
"public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n this.offset= 0;\n this.limit= Integer.MAX_VALUE;\n this.sumCol=null;\n this.groupSelClause=null;\n this.groupByClause=null;\n this.forUpdate=false;\n }",
"private void reset() {\n\n mPullRefreshEnabled = mAutoLoadAdapter.getPullToRefreshEn();\n mIsLoadMoreEn = mAutoLoadAdapter.getLoadMoreEn();\n mIsFooterEn = mAutoLoadAdapter.getFooterEn();\n mIsLoadMoreErrEn = mAutoLoadAdapter.getLoadMoreErrEn();\n setLoadingMore(false);\n }",
"protected void resetValues() {\n synchronized (values) {\n values.removeAll(new ArrayList(values));\n }\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 void reset()\n {\n reset(this.map, this.heuristic, this.neighborSelector);\n }",
"public void reset() {\n\t\t\t\t\r\n\t\t\t}",
"public Builder clearPagination() {\n if (paginationBuilder_ == null) {\n pagination_ = null;\n onChanged();\n } else {\n pagination_ = null;\n paginationBuilder_ = null;\n }\n\n return this;\n }",
"public Builder clearPagination() {\n if (paginationBuilder_ == null) {\n pagination_ = null;\n onChanged();\n } else {\n pagination_ = null;\n paginationBuilder_ = null;\n }\n\n return this;\n }",
"public Builder clearPagination() {\n if (paginationBuilder_ == null) {\n pagination_ = null;\n onChanged();\n } else {\n pagination_ = null;\n paginationBuilder_ = null;\n }\n\n return this;\n }",
"public Builder clearPagination() {\n if (paginationBuilder_ == null) {\n pagination_ = null;\n onChanged();\n } else {\n pagination_ = null;\n paginationBuilder_ = null;\n }\n\n return this;\n }",
"public Builder clearPagination() {\n if (paginationBuilder_ == null) {\n pagination_ = null;\n onChanged();\n } else {\n pagination_ = null;\n paginationBuilder_ = null;\n }\n\n return this;\n }",
"public Builder clearPagination() {\n if (paginationBuilder_ == null) {\n pagination_ = null;\n onChanged();\n } else {\n pagination_ = null;\n paginationBuilder_ = null;\n }\n\n return this;\n }",
"public Builder clearQueryParameters() {\n\t\t\turl.query.clear();\n\t\t\treturn this;\n\t\t}",
"public void reset() {\n _pageIndex = 0;\n //cbxPage.setSelectedIndex(0);\n dispatchEvent(new Event(\"reset\", true, false));\n }",
"public void clear() {\n oredCriteria.clear();\n orderByClause = null;\n distinct = false;\n this.offset= 0;\n this.limit= Integer.MAX_VALUE;\n this.sumCol=null;\n this.groupSelClause=null;\n this.groupByClause=null;\n }",
"@Override\n public void reset() {\n iterator = collection.iterator();\n }",
"@Override\r\n\tpublic void reset() {\n\t\tthis.dcn = null;\r\n\t\tthis.pairs.clear();\r\n\t\tthis.successfulCount = 0;\r\n\t\tthis.failedCount = 0;\r\n\t\tthis.metrics.clear();\r\n\t}",
"public void resetChildSearchParameters() {\n\n\t\tsetRegio(null);\n\t\tsetKnooppuntNummer(null);\n\t\tsetTrajectNaam(null);\n\t\tsetProbleemType(null);\n\n\t\t// Probleem ook mee resetten\n\t\tif (probleem != null) {\n\t\t\tprobleem = null;\n\t\t\tobject.setProbleem(null);\n\t\t}\n\t}",
"public synchronized void reset()\n\t{\n\t\tthis.snapshots.clear();\n\t\tthis.selfPositions.clear();\n\t}",
"public synchronized void resetCustomValues() {\n customValues = null;\n }",
"public void resetChanges() {\n\t\tthis.resetStatus();\n\t\ttheStructures.resetStatus();\n\n\t\tfireDocumentInit();\n\t}",
"public URIBuilder clearParameters() {\n this.queryParams = null;\n this.encodedQuery = null;\n this.encodedSchemeSpecificPart = null;\n return this;\n }",
"public static void reset() {\r\n\t\t// System.out.println(\"ExPar.reset()\");\r\n\t\t// new RuntimeException().printStackTrace();\r\n\t\truntimePars.clear();\r\n\t\tresetValues();\r\n\t\tGlobalAssignments.exec();\r\n\t}",
"@Override\n\t\tprotected void reset()\n\t\t{\n\t\t}",
"public void resetFilter() {\n searchList.clear();\n mediaCategoryList.clear();\n\n searchList.addAll(viewModel.getMediaList());\n mediaCategoryList.addAll(viewModel.getMediaList());\n }",
"protected void setFilterInMapChanged() {\n rowCount = null;\n }",
"@Generated(hash = 750945346)\n public synchronized void resetResult() {\n result = null;\n }",
"protected void resetCache() {\n if (cacheResults && initialized) {\n dataCache.clear();\n }\n }",
"public void reset() {\n counters = null;\n counterMap = null;\n counterValueMap = null;\n }",
"public void resetFilters() {\n filtersSet.values().stream().forEach((filter) -> {\n filter.reset();\n });\n DatasetPieChartFiltersComponent.this.updateSystem(filterSelectionUnit());\n resetFilterIcon();\n }",
"@Override\n public void reset()\n {\n state = \"initial state\";\n nbChanges = 0;\n nbResets++;\n }",
"public void reset(){\r\n\t\tdialogToDisplay=0;\r\n\t\tqueuedDialog=0;\r\n\t\toptionSelection=null;\r\n\t\tdone=false;\r\n\t}",
"private void resetSearchAheadList() {\n if (!searchResultsData.isEmpty()) {\n searchResultsData.clear();\n searchAdapter.notifyDataSetChanged();\n }\n }",
"protected void resetState()\n {\n // Nothing to do by default.\n }",
"public void reset() {\n next = 0;\n renderList.clear();\n viewList.clear();\n }",
"private void resetAll() {\n resetResources();\n resetStory();\n refresh();\n }",
"private void reset() {\n }",
"protected static void resetStateOfExecution(){\n collumsCalculated.set(0);\n updateExecutionStateProperty();\n }",
"@Override\n\tpublic void refreshData(){\n\t\tpageNum = 1;\n\t\tlist.clear();\n\t\tloadData();\n\t}",
"@Override\n\tprotected void setAllResultsToPar() {\n\t}",
"@Override\r\n\tpublic void reset()\r\n\t{\r\n\t}",
"public void reset() {\n firstUpdate = true;\n }",
"public void reset () {\n\t\tclearField();\n\t\tstep_ = 0;\n\t}",
"@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}",
"public void reset() {\n \titems.clear();\n \tsetProcessCount(0);\n }",
"public void reset() {\n initEntries();\n }",
"public static void clearSearch() {\n searchQuery = null;\n numberOfAdults = 0;\n childAges = null;\n resetDates();\n FOUND_HOTELS.clear();\n selectedHotel = null;\n selectedRoom = null;\n EXTENDED_INFOS.clear();\n HOTEL_ROOMS.clear();\n IMAGE_DRAWABLES.clear();\n }",
"public synchronized void reset() {\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}",
"public void resetFilter();",
"public void reset()\n\t{\n\t\t//taskTable.setFilters(new FilterPipeline());\n\t\tmodel = new TaskTableModel(projects);\n\t\ttaskTable.setModel(model);\n\t\tresetComboxes();\n\t}"
] |
[
"0.69331163",
"0.6775451",
"0.66696626",
"0.6661157",
"0.6551462",
"0.6495355",
"0.64770854",
"0.6462467",
"0.6462188",
"0.6421853",
"0.6417053",
"0.6399001",
"0.6356446",
"0.63331294",
"0.6327089",
"0.6279292",
"0.6260878",
"0.6248194",
"0.6228384",
"0.62036544",
"0.61697197",
"0.61628807",
"0.61331856",
"0.612744",
"0.6125975",
"0.6112457",
"0.6101452",
"0.60966474",
"0.60965806",
"0.6065471",
"0.6063219",
"0.60494614",
"0.6045572",
"0.6036053",
"0.6017652",
"0.6010389",
"0.6007539",
"0.60062504",
"0.6003163",
"0.599767",
"0.5994011",
"0.5993835",
"0.5991914",
"0.59639823",
"0.5961597",
"0.5950254",
"0.59421384",
"0.59263754",
"0.5907915",
"0.5905666",
"0.59033304",
"0.58935535",
"0.58926326",
"0.58926326",
"0.58926326",
"0.58926326",
"0.58926326",
"0.58926326",
"0.58793676",
"0.58681345",
"0.58592373",
"0.5847646",
"0.5838594",
"0.5832029",
"0.5819854",
"0.58088595",
"0.580852",
"0.58068585",
"0.5794821",
"0.57889915",
"0.5785136",
"0.5784441",
"0.57835066",
"0.5776122",
"0.5774458",
"0.5767294",
"0.57642734",
"0.5761598",
"0.5755619",
"0.5738579",
"0.5737255",
"0.5713297",
"0.57077426",
"0.5704746",
"0.5702765",
"0.57004404",
"0.569761",
"0.56965977",
"0.56954664",
"0.56915504",
"0.56877637",
"0.56858665",
"0.5684429",
"0.56787425",
"0.56699026",
"0.56699026",
"0.56699026",
"0.56699026",
"0.5660899",
"0.56484324"
] |
0.70140445
|
0
|
Ensure all named parameters have nonnull values.
|
public void validateNamedParameters() {
if (namedParameters != null) {
for (Map.Entry<String, Object> e : namedParameters.entrySet()) {
if (e.getValue() == null) {
throw log.queryParameterNotSet(e.getKey());
}
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void checkParameters() {\n }",
"@Override\n\tprotected void validateParameterValues() {\n\t\t\n\t}",
"public static void notNullOrEmpty(Object[] parameter, String name) throws IllegalArgumentException\n {\n if(parameter == null || parameter.length == 0) {\n throw new IllegalArgumentException(name + \" parameter is empty.\");\n }\n }",
"@Ignore\n\t@Test\n\tpublic void testParamNull() {\n\t\tregisterParamException(null, keyString, valueString);\n\t\tregisterParamException(groupString, null, valueString);\n\t\tregisterParamException(groupString, keyString, null);\n\t}",
"private boolean checkParams(String[] params){\r\n\t\tfor(String param:params){\r\n\t\t\tif(param == \"\" || param == null || param.isEmpty()){\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\tpublic String[] getParameterValues(String name) {\n\t\treturn null;\n\t}",
"private boolean validParams(String name, String company) {\n\t\treturn (name != null && !name.trim().equals(\"\")) \n\t\t\t\t&& (company != null && !company.trim().equals(\"\"));\n\t}",
"@Override\n\tprotected boolean validateRequiredParameters() throws Exception {\n\t\treturn true;\n\t}",
"protected void missingParams() {\r\n throw new IllegalStateException(\r\n \"Function is missing parameters: \" + getName());\r\n }",
"@Override\n\t\tpublic String[] getParameterValues(String name) {\n\t\t\treturn null;\n\t\t}",
"protected void validateParameter(String... param) throws NavigationException {\r\n\t\tif (param.length > 0){\r\n\t\t\tfor(int i = 0; i < param.length; i++){\r\n\t\t\t\tif (param[i] != null && param[i].isEmpty()) {\r\n\t\t\t\t\tthrow new NavigationException(\"parametro no enviado\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"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}",
"public boolean getSendParameterValuesAsPostBody() {\n if(getPostBodyRaw()) {\n return true;\n } else {\n boolean noArgumentsHasName = true;\n PropertyIterator args = getArguments().iterator();\n while (args.hasNext()) {\n HTTPArgument arg = (HTTPArgument) args.next().getObjectValue();\n if(arg.getName() != null && arg.getName().length() > 0) {\n noArgumentsHasName = false;\n break;\n }\n }\n return noArgumentsHasName;\n }\n }",
"@Override\n\tpublic boolean hasParameterGuard() {\n\t\treturn true;\n\t}",
"protected int checkParam(Object o, String name)\n {\n if (o == null) {\n System.err.println(format(\"Parameter %s is not set\", name));\n return 1;\n }\n return 0;\n }",
"private void validateInputParameters(){\n\n }",
"private boolean isParamsEmpty(String... params){\n for (String param : params) {\n if (param.isEmpty())\n return true;\n }\n return false;\n }",
"private void fillMandatoryFields() {\n\n }",
"private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }",
"@Override\n\tpublic String[] getParameterValues(String arg0) {\n\t\treturn null;\n\t}",
"private void checkForNullOrEmptyParameter(String param, String paramName)\n\t\t\tthrows MissingParameterException, InvalidParameterException {\n\t\tif (param == null) {\n\t\t\tthrow new MissingParameterException(paramName + \" can not be null\");\n\t\t} else if (param.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(paramName + \" can not be empty\");\n\t\t}\n\t}",
"private void checkMandatoryArguments() throws ArgBoxException {\n\t\tfinal List<String> errors = registeredArguments.stream()\n\t\t\t\t.filter(arg -> arg.isMandatory())\n\t\t\t\t.filter(arg -> !parsedArguments.containsKey(arg))\n\t\t\t\t.map(arg -> String.format(\"The argument %1s is required !\", arg.getLongCall()))\n\t\t\t\t.collect(Collectors.toList());\n\t\tthrowException(() -> !errors.isEmpty(), getArgBoxExceptionSupplier(\"Some arguments are missing !\", errors));\n\t}",
"public static void notNullOrEmpty(String parameter, String name)\n {\n if(parameter == null || parameter.isEmpty()) {\n throw new IllegalArgumentException(name + \" is null or empty.\");\n }\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 }",
"protected boolean checkEmpty(String[] parameters) {\n return parameters == null || parameters.length == 0;\n }",
"public abstract ImmutableSet<String> getExplicitlyPassedParameters();",
"public boolean getSendParameterValuesAsPostBody() {\n if (getPostBodyRaw()) {\n return true;\n } else {\n boolean noArgumentsHasName = true;\n for (JMeterProperty jMeterProperty : getArguments()) {\n HTTPArgument arg = (HTTPArgument) jMeterProperty.getObjectValue();\n if (arg.getName() != null && arg.getName().length() > 0) {\n noArgumentsHasName = false;\n break;\n }\n }\n return noArgumentsHasName;\n }\n }",
"public boolean hasParameter(String name) throws IllegalArgumentException {\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"hasParameter() \");\n Via via=(Via)sipHeader;\n \n if(name == null) throw new IllegalArgumentException\n (\"JAIN-EXCEPTION: null parameter\");\n return via.hasParameter(name);\n }",
"public boolean hasParameterName() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"boolean hasParameters();",
"@Override\n\tpublic Enumeration<String> getParameterNames() {\n\t\treturn null;\n\t}",
"public boolean hasParameterName()\n {\n return this.paramName != null;\n }",
"private static boolean paramValid(String paramName,String paramValue){\n return paramName!=null&¶mName.length()>0&¶mValue!=null&¶mValue.length()>0;\n }",
"public boolean hasParameterName() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"private void checkFormNullInput(Point[] points) {\n // No null inputs are allowed\n if (points == null) throw new IllegalArgumentException();\n\n for (Point p : points) {\n // No null elements are allowed\n if (p == null) {\n throw new IllegalArgumentException();\n }\n }\n }",
"private void checkForEmptyParameter(String param, String paramName)\n\t\t\tthrows MissingParameterException, InvalidParameterException {\n\t\tif (param != null && param.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(paramName + \" can not be empty\");\n\t\t}\n\t}",
"public boolean isSetParams() {\n return this.params != null;\n }",
"private void validateBuildParameters() {\n if (TextUtils.isEmpty(consumerKey)) {\n throw new IllegalArgumentException(\"CONSUMER_KEY not set\");\n }\n if (TextUtils.isEmpty(consumerSecret)) {\n throw new IllegalArgumentException(\"CONSUMER_SECRET not set\");\n }\n if (TextUtils.isEmpty(token)) {\n throw new IllegalArgumentException(\"TOKEN not set, the user must be logged it\");\n }\n if (TextUtils.isEmpty(tokenSecret)) {\n throw new IllegalArgumentException(\"TOKEN_SECRET not set, the user must be logged it\");\n }\n }",
"boolean hasParameterName();",
"private void validateParameters(CustomMap<String, CustomList<String>> parameters) {\n /* Verify if the parameters are the students number. */\n if(parameters == null || parameters.size() > 3){\n errorValidator.addError(\"name\", \"This parameter must exist.\");\n errorValidator.addError(\"num\", \"This parameter must exist.\");\n errorValidator.addError(\"email\", \"This parameter must exist.\");\n return;\n }\n\n /* Verify if the parameters are correct. */\n CustomList nameAux = parameters.get(\"name\"), numAux = parameters.get(\"num\"), emailAux = parameters.get(\"email\");\n\n if(nameAux == null)\n errorValidator.addError(\"name\", \"This parameter must exist.\");\n\n if(numAux == null)\n errorValidator.addError(\"num\", \"This parameter must exist.\");\n\n if(emailAux == null)\n errorValidator.addError(\"email\", \"This parameter must exist.\");\n\n if(errorValidator.hasError())\n return;\n\n /* Verify num, pid email and name parameters type. */\n num = numAux.getVerifiedInt(0, errorValidator, \"num\");\n email = emailAux.getVerifiedString(0, errorValidator, \"email\");\n name = nameAux.getVerifiedString(0, errorValidator, \"name\");\n }",
"private void checkParameters()\n\t\tthrows DiameterMissingAVPException {\n\t\tDiameterClientRequest request = getRequest();\n\t\tDiameterAVPDefinition def = ShUtils.getUserIdentityAvpDefinition(getVersion());\n\t\tif (request.getDiameterAVP(def) == null) {\n\t\t\tthrow new DiameterMissingAVPException(def.getAVPCode());\n\t\t}\n\t\tdef = ShUtils.getDataReferenceAvpDefinition(getVersion());\n\t\tif (request.getDiameterAVP(def) == null) {\n\t\t\tthrow new DiameterMissingAVPException(def.getAVPCode());\n\t\t}\n\t}",
"public boolean isParameterProvided();",
"private void verifyField() {\n try {\n if (type != Function.class && type != Foreign.class)\n throw new DataMapperException(\"The field annotated with @ColumnName must be of type Function or Foreign\");\n String[] nameDefaultValue = (String[]) ColumnName.class.getDeclaredMethod(\"name\").getDefaultValue();\n\n checkNameParameter(nameDefaultValue);\n } catch (NoSuchMethodException e) {\n throw new DataMapperException(e);\n }\n }",
"private boolean validParams(Platform platform, String name, String company) {\n\t\treturn platform != null && validParams(name, company);\n\t}",
"@Override\n\t\tpublic Enumeration getParameterNames() {\n\t\t\treturn null;\n\t\t}",
"public static void confirmNotNull(Object... o) throws InvalidParameterException {\n\t\tfor (Object object : o) {\n\t\t\tif (object == null) {\n\t\t\t\tthrow new InvalidParameterException(\"Invalid parameters\");\n\t\t\t}\n\t\t}\n\t}",
"public void validateRequired(Arguments arguments) {\n if (StructuredLoggerFactory.requiredValuesEnabled() && !requireds.isEmpty()) {\n requireds.forEach(index -> {\n if (arguments.get(index) == null) {\n throw new MissingSchemaValueException(\"Entire schema must be specified. Missing: \" + names.get(index));\n }\n });\n }\n }",
"@Test(expected=IllegalArgumentException.class)\n public void testNamedParamValueTypeValidation() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1);\n query.named().setValue(NAMED_PARAM_1, \"Astring\");\n }",
"public boolean isSetParams() {\n return this.params != null;\n }",
"public boolean isSetParams() {\n return this.params != null;\n }",
"public boolean isSetParams() {\n return this.params != null;\n }",
"public boolean isSetParams() {\n return this.params != null;\n }",
"public boolean isSetParams() {\n return this.params != null;\n }",
"@Test(expected=IllegalArgumentException.class)\n public void testNamedValueMustExistValidation() {\n query.named().setValue(NAMED_PARAM_1, Collections.singletonList(10D));\n }",
"private void validateRequestParamsNotNull(LoginRequest loginRequest) throws EmptyFieldException {\n validateParamNotNull(loginRequest.getEmail(), \"Email\");\n validateParamNotNull(loginRequest.getPassword(), \"Password\");\n }",
"@Implementation\n protected String getParameters(String keys) {\n return null;\n }",
"public boolean validateParameters(IGetParameterDefinitionTask task,\n\t\t\tMap parameters)\n\t{\n\t\tassert task != null;\n\t\tassert parameters != null;\n\n\t\tboolean missingParameter = false;\n\n\t\tCollection parameterList = task.getParameterDefns(false);\n\t\tfor (Iterator iter = parameterList.iterator(); iter.hasNext();)\n\t\t{\n\t\t\tIScalarParameterDefn parameterObj = (IScalarParameterDefn) iter.next();\n\t\t\t// ScalarParameterHandle paramHandle = (ScalarParameterHandle)\n\t\t\t// parameterObj\n\t\t\t// .getHandle();\n\n\t\t\tString parameterName = parameterObj.getName();\n\t\t\tObject parameterValue = parameters.get(parameterName);\n\n\t\t\tif (parameterObj.isHidden())\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (parameterValue == null && !parameterObj.allowNull())\n\t\t\t{\n\t\t\t\tmissingParameter = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (IScalarParameterDefn.TYPE_STRING == parameterObj.getDataType())\n\t\t\t{\n\t\t\t\tString parameterStringValue = (String) parameterValue;\n\t\t\t\tif (parameterStringValue != null\n\t\t\t\t\t\t&& parameterStringValue.length() <= 0\n\t\t\t\t\t\t&& !parameterObj.allowBlank())\n\t\t\t\t{\n\t\t\t\t\tmissingParameter = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn missingParameter;\n\t}",
"@Override\r\n public boolean isValidParameterCount(int parameterCount) {\n return parameterCount> 0;\r\n }",
"@Test(expected=IllegalArgumentException.class)\n public void testNamedParamCollectionNotAllowedForSingleValuesValidation() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).eq().named(NAMED_PARAM_1);\n query.named().setValue(NAMED_PARAM_1, Collections.singletonList(10D));\n }",
"private static boolean arePostRequestParametersValid(String title, String description,\n String imageUrl, String releaseDate, String runtime, String genre, String directors,\n String writers, String actors, String omdbId) {\n return isParameterValid(title, MAX_TITLE_CHARS) && isParameterValid(description, MAX_CHARS)\n && isParameterValid(imageUrl, MAX_CHARS) && isParameterValid(releaseDate, MAX_CHARS)\n && isParameterValid(runtime, MAX_CHARS) && isParameterValid(genre, MAX_CHARS)\n && isParameterValid(directors, MAX_CHARS) && isParameterValid(writers, MAX_CHARS)\n && isParameterValid(actors, MAX_CHARS) && isParameterValid(omdbId, MAX_CHARS);\n }",
"@Override\n\tpublic boolean isHaveParam() {\n\t\treturn param !=null;\n\t}",
"public void validate() throws ParameterValuesException {\n\t\tif (txtTenTaiSan.getText().isEmpty())\n\t\t\tthrow new ParameterValuesException(\"Bạn cần nhập tên tài sản\", null);\n\t}",
"private void validateInitialParams() throws IllegalArgumentException {\n if (StringUtils.isBlank(this.apiKey)) {\n throw new IllegalArgumentException(\"API key is not specified!\");\n }\n if (StringUtils.isBlank(this.baseUrl)) {\n throw new IllegalArgumentException(\"The Comet base URL is not specified!\");\n }\n }",
"private boolean validateParams(String userName, String password, String fullName) {\n if (userName == null || password == null || fullName == null) {\n return false;\n }\n\n if (userName.length() == 0 || password.length() == 0 || fullName.length() == 0) {\n return false;\n }\n\n return true;\n }",
"public static void checkNull(Object value, String name) {\r\n if (value == null) {\r\n throw new IllegalArgumentException(\"The \" + name + \" is null.\");\r\n }\r\n }",
"protected abstract boolean checkedParametersAppend();",
"public void clearParams() {\n setParams((String[]) null);\n }",
"private void checkForMissingParameter(Object param, String paramName)\n\t\t\tthrows MissingParameterException {\n\t\tif (param == null) {\n\t\t\tthrow new MissingParameterException(paramName + \" can not be null\");\n\t\t}\n\t}",
"@Override\n\t\tpublic void checkPreconditions() {\n\t\t}",
"@Override\n\tpublic Collection<Parameter<?>> getParameters() {\n\t\treturn null;\n\t}",
"public static void ensureNotNull(String parameterName, Object value) {\n if(value == null) {\n throw LOG.parameterIsNullException(parameterName);\n }\n }",
"static void checkNull(final Object param, final String paramName) {\r\n if (param == null) {\r\n throw new IllegalArgumentException(\"The argument '\" + paramName\r\n + \"' should not be null.\");\r\n }\r\n }",
"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}",
"private static void checkArg(Object paramObject) {\n/* 687 */ if (paramObject == null)\n/* 688 */ throw new NullPointerException(\"Argument must not be null\"); \n/* */ }",
"boolean hasParameterValue();",
"private void validateInputAttributes() throws JspTagException {\n if (query == null) {\n if (var == null) {\n throw new JspTagException(\"<tolog:set> : requires a 'var'- or a\"\n + \" 'query'-attribute (or both), but got neither.\");\n }\n\n if (!(reqparam == null || value == null)) {\n throw new JspTagException(\"<tolog:set> : requires either a\"\n + \" 'query'-, a 'reqparam'- or a 'value'-attribute,\"\n + \" but got both.\");\n }\n\n } else {\n if (reqparam != null || value != null) {\n throw new JspTagException(\"<tolog:set> : requires either a\"\n + \" 'query'-, a 'reqparam'- or a 'value'-attribute,\"\n + \" but got more than one of them.\");\n }\n }\n }",
"protected void validateParams(String nxql, Collection<String> inputProperties,\n Collection<String> outputProperties) {\n if (StringUtils.isBlank(nxql) || inputProperties == null || inputProperties.isEmpty()\n || outputProperties == null || outputProperties.isEmpty()) {\n throw new IllegalArgumentException(\"nxql and properties are required parameters\");\n }\n if (!nxql.toUpperCase().contains(\"WHERE\")) {\n throw new IllegalArgumentException(\"You cannot use an unbounded nxql query, please add a WHERE clause.\");\n }\n }",
"private static void checkArg(Object s) {\n if (s == null) {\n throw new NullPointerException(\"Argument must not be null\");\n }\n }",
"@Test\n public void noneNullArgumentIsNullTest() throws GeneralException {\n for (String noneNullArgument : SAMLCorrelationRule.NONE_NULL_ARGUMENTS_NAME) {\n\n JavaRuleContext testRuleContext = buildTestJavaRuleContext();\n testRuleContext.getArguments().remove(noneNullArgument);\n\n assertThrows(GeneralException.class, () -> testRule.execute(testRuleContext));\n verify(testRule).internalValidation(eq(testRuleContext));\n verify(testRule, never()).internalExecute(eq(testRuleContext), any());\n }\n }",
"public void checkExistingParameter() {\n parameterList.clear();\n if (!attribute[13].equalsIgnoreCase(\"NA\")) {\n parameterList.add(parameterStore.getParameterWithCode(\"HB000\"));\n }\n\n if (!attribute[14].equalsIgnoreCase(\"NA\")) {\n parameterList.add(parameterStore.getParameterWithCode(\"WBC00\"));\n }\n\n if (!attribute[15].equalsIgnoreCase(\"NA\")) {\n parameterList.add(parameterStore.getParameterWithCode(\"PLT00\"));\n }\n\n if (!attribute[16].equalsIgnoreCase(\"NA\")) {\n parameterList.add(parameterStore.getParameterWithCode(\"RBC00\"));\n }\n\n if (!attribute[20].equalsIgnoreCase(\"NA\")) {\n parameterList.add(parameterStore.getParameterWithCode(\"IgGAN\"));\n }\n }",
"public static void verifyParams(String title, Map<?,?> defparams, Param... params) throws MissingArgumentException {\n\t\tString mapstr = title + \":\" + MapUtils.map2str(defparams);\n\t\t\n\t\t// Verify parameters\n\t\tfor (Param param: params) {\n\t\t\tif (!defparams.containsKey(param.getName())) {\n\t\t\t\tthrow new MissingArgumentException(String.format(\"The action %s is missing the parameter [%s]\", mapstr, param));\n\t\t\t} else if (!param.isInstance(defparams.get(param.getName()))) {\n\t\t\t\tthrow new IllegalArgumentException(String.format(\"The parameter %s in action %s should be [%s], but got [%s]\", param.getName(), mapstr, param.getClazz(), defparams.get(param.getName()).getClass()));\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic String getParameter(String name) {\n\t\treturn null;\n\t}",
"private void checkRequiredFields() {\n // check the fields which should be non-null\n if (configFileName == null || configFileName.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'configFileName' should not be null.\");\n }\n if (configNamespace == null || configNamespace.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'configNamespace' should not be null.\");\n }\n if (searchBundleManagerNamespace == null\n || searchBundleManagerNamespace.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'searchBundleManagerNamespace' should not be null.\");\n }\n if (entityManager == null) {\n throw new DAOConfigurationException(\n \"The 'entityManager' should not be null.\");\n }\n }",
"@SuppressWarnings(\"unchecked\")\n public ParametersImpl(Map<String, Object> parameters) {\n parameters.forEach((parameterName, parameterValues) -> {\n if (parameterValues == null) {\n String nullValuedParameters = parameters\n .entrySet()\n .stream()\n .filter(entry -> isNull(entry.getValue()))\n .map(Entry::getKey)\n .sorted()\n .collect(joining(\", \"));\n throw new IllegalArgumentException(String.format(\n \"parameters must not have null values: %s\",\n nullValuedParameters));\n }\n\n this.parameters.put(parameterName, (V) parameterValues);\n });\n }",
"private void checkForEmptyLine() throws OutmatchingParametersToMethodCall {\n if (this.params.isEmpty() && method.getParamAmount() != 0) {\n throw new OutmatchingParametersToMethodCall();\n } else if (method.getParamAmount() == 0 && !this.params.isEmpty()) {\n throw new OutmatchingParametersToMethodCall();\n }\n }",
"private void checkParameters(List actualParameters)\n throws AbnormalTerminationException {\n if (actualParameters.size() != this._formalParameters.size()) {\n throw new AbnormalTerminationException(\"Ongeldig aantal parameters in \" + this.getName() + \"!\");\n }\n }",
"@Test\n public void testIsNullValidName() {\n FieldVerifier service = new FieldVerifier();\n String name = null;\n boolean result = service.isValidName(name);\n assertEquals(false, result);\n }",
"public boolean hasParam(String name)\r\n {\r\n try {\r\n return lookup.get(name) != null;\r\n } catch(Exception e) {}\r\n \r\n return false;\r\n }",
"@Test\n public void testValidateParams() {\n String[] params;\n\n // valid params - just the application name\n params = new String[]{\"Application\"};\n instance.validateParams(params);\n\n // valid params - extra junk\n params = new String[]{\"Application\", \"Other\", \"Other\"};\n instance.validateParams(params);\n\n // invalid params - empty\n params = new String[0];\n try {\n instance.validateParams(params);\n fail(\"Expected IllegalArgumentException\");\n } catch (IllegalArgumentException ex) {\n // expected\n }\n\n // invalid params - null first param\n params = new String[]{null};\n try {\n instance.validateParams(params);\n fail(\"Expected IllegalArgumentException\");\n } catch (IllegalArgumentException ex) {\n // expected\n }\n\n // invalid params - empty string\n params = new String[]{\"\"};\n try {\n instance.validateParams(params);\n fail(\"Expected IllegalArgumentException\");\n } catch (IllegalArgumentException ex) {\n // expected\n }\n }",
"private void validate() {\n\n if (this.clsname == null)\n throw new IllegalArgumentException();\n if (this.dimension < 0)\n throw new IllegalArgumentException();\n if (this.generics == null)\n throw new IllegalArgumentException();\n }",
"private void fillMandatoryFields_custom() {\n\n }",
"boolean isNameRequired();",
"public boolean assertNotNullKeys(Map<String, String> viewparams, String...keys) {\n\t\tif (viewparams == null || keys == null) return false;\n\t\tfor(String k : keys) {\n\t\t\tif (viewparams.get(k) == null) {\n\t\t\t\tthrow new IllegalArgumentException(\"proc-argument-exception :key[\"+ k + \"] is missing\");\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private static void checkNull(Object value, String name) throws LateDeliverablesProcessingException {\r\n if (value == null) {\r\n throw new LateDeliverablesProcessingException(\"The \" + name + \" should not be null.\");\r\n }\r\n }",
"private void validateOptionalParams(StringBuilder errors) throws Exception {\n // Validate RECON_PARTIAL_TRIGGER Option configuration.\n String paramValue = inputParams.getProperty(\"RECON_PARTIAL_TRIGGER\");\n if(paramValue!=null && !paramValue.trim().isEmpty()){\n StringTokenizer tokens = new StringTokenizer(paramValue, Constants.TOKEN_SEPARATOR);\n while(tokens.hasMoreElements()){\n try{\n PartialTriggerOptions.valueOf(tokens.nextToken());\n }catch(Exception ex){\n errors.append(\"Invalid Parameter Configuration for RECON_PARTIAL_TRIGGER. Please correct.\"\n + System.getProperty(\"line.separator\"));\n }\n }\n }\n // Validate TARGET_SHARED_IDSTORE_SEARCHBASE\n paramValue = inputParams.getProperty(\"TARGET_SHARED_IDSTORE_SEARCHBASE\");\n if(paramValue==null || paramValue.trim().isEmpty()){\n Logger.getLogger(IdentityReconciliationProcessor.class.getName()).log(Level.INFO, \n \"Parameter [Optional] TARGET_SHARED_IDSTORE_SEARCHBASE not configured. \" +\n \"Highly recommended to configure this parameter. Note that - This may result in performance issue.\");\n }\n paramValue = inputParams.getProperty(Constants.BATCH_SIZE_ATTR);\n if(paramValue!=null && !paramValue.trim().isEmpty()){\n try{\n getBatchSize(paramValue);\n }catch(Exception ex){\n errors.append(\"Invalid Parameter Configuration for Batch Size. Please correct.\"\n + System.getProperty(\"line.separator\"));\n }\n }\n }",
"private void checkAttributes() throws JellyTagException\n {\n if (getField() == null)\n {\n throw new MissingAttributeException(\"field\");\n }\n if (getVar() == null)\n {\n if (!(getParent() instanceof ValueSupport))\n {\n throw new JellyTagException(\n \"No target for the resolved value: \"\n + \"Specify the var attribute or place the tag \"\n + \"in the body of a ValueSupport tag.\");\n }\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}",
"public boolean hasParameter(){\n\t\tif (parameterType==null)\n\t\t\treturn false;\n\t\telse{\n\t\t\treturn true;\n\t\t}\n\t}",
"protected void check(String name, Object value, boolean mayBeNull) {\n\t\tif (!mayBeNull)\n\t\t\tassertNotNull(name+\" should not be null\",value);\n\t\tif (debug) {\n\t\t\tLOGGER.log(Level.INFO, name + \"='\" + value + \"'\");\n\t\t}\n\t}"
] |
[
"0.6554759",
"0.64848727",
"0.63643116",
"0.63378084",
"0.62648267",
"0.6257161",
"0.6225915",
"0.61991674",
"0.6185394",
"0.61318034",
"0.6099707",
"0.6080056",
"0.59258926",
"0.592367",
"0.5918118",
"0.59140843",
"0.5913335",
"0.5887501",
"0.5872988",
"0.5853082",
"0.5839605",
"0.58236146",
"0.5812838",
"0.5787072",
"0.5774251",
"0.57612467",
"0.5757073",
"0.5756371",
"0.5734952",
"0.5707579",
"0.5703892",
"0.56993693",
"0.5698857",
"0.56899047",
"0.5682275",
"0.5677932",
"0.5677828",
"0.567356",
"0.5663145",
"0.5641699",
"0.56414825",
"0.563922",
"0.5637952",
"0.5630385",
"0.5624182",
"0.5604751",
"0.5596408",
"0.55951905",
"0.5590287",
"0.55802786",
"0.55802786",
"0.55802786",
"0.55802786",
"0.55802786",
"0.5571756",
"0.5568042",
"0.5567925",
"0.5561149",
"0.5553642",
"0.55333316",
"0.55249405",
"0.5521763",
"0.5510403",
"0.5509735",
"0.5501832",
"0.5491101",
"0.5479162",
"0.5474813",
"0.5465",
"0.5454962",
"0.5441808",
"0.5436038",
"0.54261816",
"0.5405435",
"0.5399695",
"0.5389118",
"0.53742796",
"0.5365971",
"0.53587025",
"0.5358309",
"0.5352107",
"0.5343739",
"0.5338294",
"0.5325392",
"0.5315649",
"0.53148204",
"0.5310349",
"0.527843",
"0.5271366",
"0.5261525",
"0.52592593",
"0.52533543",
"0.5253003",
"0.52516514",
"0.52475685",
"0.52391756",
"0.5236847",
"0.522247",
"0.52193373",
"0.5219205"
] |
0.78972715
|
0
|
DFS will use stack
|
public void depthFirstSearch(){
Stack<TreeNode<T>> nodeStack = new Stack<TreeNode<T>>();
if(root!=null){
nodeStack.push(root);
System.out.println(root.data);
TreeNode<T> topNode = root;
while(!nodeStack.isEmpty()){
if(topNode.left!=null){
nodeStack.push(topNode.left);
System.out.println(topNode.data);
topNode = topNode.left;
} else if(topNode.right!=null){
nodeStack.push(topNode.right);
System.out.println(topNode.data);
topNode = topNode.right;
} else{
try{
nodeStack.pop();
}catch(Exception ex){
ex.printStackTrace();
}
}
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void DFS() {\n\t\tfor(Node node: nodeList) {\r\n\t\t\tif(!node.isVisited())\r\n\t\t\t\tdfsVisit(node);\r\n\t\t}\r\n\t}",
"public void dfs() {\n int currentVertexIndex = 0;\r\n dfsStack.push(0);\r\n vertexList[0].wasVisited = true;\r\n System.out.println(vertexList[dfsStack.peek()]);\r\n while (dfsStack.top != -1) {\r\n\r\n\r\n currentVertexIndex = this.getAdjUnvisitedVert(dfsStack.peek());\r\n if (currentVertexIndex != -1) {\r\n dfsStack.push(currentVertexIndex);\r\n vertexList[currentVertexIndex].wasVisited = true;\r\n System.out.println(vertexList[dfsStack.peek()]);\r\n\r\n\r\n } else {\r\n currentVertexIndex = dfsStack.pop();\r\n\r\n }\r\n }\r\n// reset wasVisted\r\n for (Vertex x : vertexList) {\r\n x.wasVisited = false;\r\n }\r\n }",
"void dfs(){\n // start from the index 0\n for (int vertex=0; vertex<v; vertex++){\n // check visited or not\n if (visited[vertex]==false){\n Explore(vertex);\n }\n }\n }",
"public void dfs()\n{\n Stack s=new Stack();\n s.push(this.rootNode);\n rootNode.visited=true;\n printNode(rootNode);\n while(!s.isEmpty())\n {\n Node n=(Node)s.peek();\n Node child=getUnvisitedChildNode(n);\n if(child!=null)\n {\n child.visited=true;\n printNode(child);\n s.push(child);\n }\n else\n {\n s.pop();\n }\n }\n //Clear visited property of nodes\n clearNodes();\n}",
"private void dfsVisit(Node node) {\n\t\tStack<Node>stack = new Stack<>();\r\n\t\tstack.push(node); //add source node to queue\r\n\t\twhile(!stack.isEmpty()) {\r\n\t\t\tNode presentNode = stack.pop();\r\n\t\t\tpresentNode.setVisited(true);\r\n\t\t\tSystem.out.print(presentNode.getName()+\" \");\r\n\t\t\tfor(Node neighbor: presentNode.getNeighbors()) { //for each neighbor of present node\r\n\t\t\t\tif(!neighbor.isVisited()) { //if neighbor is not visited then add it to queue\r\n\t\t\t\t\tstack.push(neighbor);\r\n\t\t\t\t\tneighbor.setVisited(true);\r\n\t\t\t\t}\r\n\t\t\t}//end of for loop\r\n\t\t}//end of while loop\r\n\t\t\r\n\t}",
"private void DFS(Vertex start, Set<Vertex> visited, Stack<Vertex> stack) {\r\n\t\t// if(visited.contains(start)) return;\r\n\r\n\t\t// Mark the current node as visited and push it\r\n\t\tvisited.add(start);\r\n\t\tstack.push(start);\r\n\r\n\t\tVertex currentNode;\r\n\t\tSet<Vertex> neighbors;\r\n\r\n\t\twhile (stack.size() > 0) {\r\n\t\t\t// Pop a vertex from stack and print it\r\n\t\t\tcurrentNode = stack.pop();\r\n\r\n\t\t\tSystem.out.print(currentNode + \" \");\r\n\r\n\t\t\t// Get all adjacent vertices of the dequeued vertex s\r\n\t\t\t// If a adjacent has not been visited, then mark it\r\n\t\t\t// visited and enqueue it\r\n\t\t\tneighbors = currentNode.getNeighbors();\r\n\r\n\t\t\tfor (Vertex n : neighbors) {\r\n\t\t\t\tif (!visited.contains(n)) {\r\n\t\t\t\t\tvisited.add(n);\r\n\t\t\t\t\tstack.push(n);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void dfs (String input)\r\n\t {\r\n\t\t \tNode root_dfs = new Node (input);\r\n\t\t \tNode current = new Node(root_dfs.getState());\r\n\t\t \t\r\n\t\t\tArrayList<String> visited = new ArrayList<String>();\r\n\t\t\tArrayList<String> children = new ArrayList<String>();\r\n\t\t\tStack<Node> stack_dfs = new Stack<Node>();\r\n\t\t\t\r\n\t\t\tint nodes_popped = 0;\r\n\t\t\tint stack_max_size = 0;\r\n\t\t\tint stack_size = 0;\r\n\t\t\tcurrent.cost = 0;\r\n\t\t\t\r\n\t\t\tgoal_dfs = isGoal(current.getState());\r\n\t\t\t\r\n\t\t\twhile(!goal_dfs)\r\n\t\t\t{\r\n\t\t\t\tvisited.add(current.getState());\r\n\t\t\t\tchildren = Successor.findChildren(current.getState());\r\n\t\t\t\t\r\n\t\t\t\tfor (String a : children)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (visited.contains(a))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tNode nino = new Node(a);\r\n\t\t\t\t\t\tcurrent.children_nodes.add(nino);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tint cost = isCost(current.getState(), nino.getState());\r\n\t\t\t\t\t\tnino.cost = cost;\r\n\t\t\t\t\t\tnino.parent = current;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Repeated state check\r\n\t\t\t\t\t\tif (!stack_dfs.contains(nino))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tstack_dfs.add(nino);\r\n\t\t\t\t\t\t\tstack_size++;\r\n\t\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\r\n\t\t\t\t// Popping off the stack. LIFO architecture\r\n\t\t\t\tcurrent = stack_dfs.pop();\r\n\t\t\t\tnodes_popped++;\r\n\t\t\t\t\r\n\t\t\t\tif (stack_size > stack_max_size)\r\n\t\t\t\t{\r\n\t\t\t\t\tstack_max_size = stack_size;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tstack_size--;\r\n\t\t\t\tgoal_dfs = isGoal(current.getState());\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgoal_dfs = false;\r\n\t\t\tSystem.out.println(\"DFS Solved!!\");\r\n\t\t\tSolution.performSolution(current, root_dfs, nodes_popped, stack_max_size);\r\n\t }",
"public void DFS() {\r\n\t\tSet<Vertex> visited = new HashSet<Vertex>();\r\n\r\n\t\t// Create a stack for DFS\r\n\t\tStack<Vertex> stack = new Stack<Vertex>();\r\n\r\n\t\tDFS(this.vertices[3], visited, stack); // DFS starting with 40\r\n\r\n\t\t// Call the helper function to print DFS traversal\r\n\t\t// 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\tDFS(this.vertices[i], visited, stack);\r\n\t}",
"public static void main(String[] args) {\n\n BDNode a = new BDNode(\"A\");\n BDNode b = new BDNode(\"B\");\n BDNode c = new BDNode(\"C\");\n BDNode d = new BDNode(\"D\");\n BDNode e = new BDNode(\"E\");\n\n a.link(b);\n a.link(d);\n b.link(a);\n b.link(c);\n b.link(e);\n c.link(b);\n c.link(d);\n d.link(a);\n d.link(c);\n d.link(e);\n e.link(b);\n e.link(d);\n\n BDNode target = e;\n\n/*\n // BFS\n Queue<BDNode> queue = new LinkedList<>();\n queue.offer(a);\n\n while(!queue.isEmpty()) {\n BDNode n = queue.poll();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if(n.equals(target)) {\n System.out.println(\"BFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if(l.isVisited()) continue;\n if (queue.contains(l)) continue;\n queue.offer(l);\n }\n\n // 위랑 같은 표현\n// n.links.stream()\n// .filter(l -> !queue.contains(l))\n// .forEach(queue::offer);\n }\n*/\n\n // DFS\n Stack<BDNode> stack = new Stack<>();\n stack.push(a);\n\n while(!stack.isEmpty()) {\n BDNode n = stack.pop();\n n.visit();\n System.out.println(n); // 찾는 여정 출력\n\n if (n.equals(target)) {\n System.out.println(\"DFS Found! \" + n);\n break;\n }\n\n for (BDNode l : n.links) {\n if (l.isVisited()) continue;\n if (stack.contains(l)) continue;\n\n stack.push(l);\n }\n }\n\n\n }",
"void DFS() {\n \t\n \t// Mark all the vertices as not visited(set as false by default in java) \n \tboolean visited[] = new boolean[V];\n \t\n \t// Call the recursive helper function to print DFS traversal \n // starting from all vertices one by one \n \tfor (int i=0; i<V; i++) { \n \t\t if (visited[i] == false)\n \t\t\t DFSUtil(i, visited);\n \t}\n }",
"private void DepthFirstSearch(Node current){\n helperDFS( current );\n }",
"public void dfsPrint(Node start){\n Stack<Node> stack = new Stack<>();\n Set<Node> visited = new HashSet<>(); //we can use integer for better space\n\n stack.push(start);\n while (!stack.isEmpty()){\n Node curr = stack.pop();\n if(!visited.contains(curr)){\n visited.add(curr);\n //do something\n }\n for(Node n: curr.adj){\n if(!visited.contains(n)){\n stack.push(n);\n }\n }\n }\n }",
"public Stack<Integer> dfs(Maze tmp) {\n \n int tmpx = tmp.positionX();\n int tmpy = tmp.positionY();\n Stack<Integer> s = new Stack<Integer>();\n while (!tmp.gameOver()) {\n choosedirection(s, tmp);\n while (!s.isEmpty() && !tmp.gameOver()) {\n if (s.peek() == 0) {\n if (tmp.right()) {\n s.push(1);\n } else if (tmp.up()) {\n s.push(0);\n } else if (tmp.left()) {\n s.push(3);\n } else {\n this.stackpop(s, tmp);\n }\n } else if (s.peek() == 1) {\n if (tmp.down()) {\n s.push(2);\n } else if (tmp.right()) {\n s.push(1);\n } else if (tmp.up()) {\n s.push(0);\n } else {\n this.stackpop(s, tmp);\n }\n } else if (s.peek() == 2) {\n if (tmp.left()) {\n s.push(3);\n } else if (tmp.down()) {\n s.push(2);\n } else if (tmp.right()) {\n s.push(1);\n } else {\n this.stackpop(s, tmp);\n }\n } else if (s.peek() == 3) {\n if (tmp.up()) {\n s.push(0);\n } else if (tmp.left()) {\n s.push(3);\n } else if (tmp.down()) {\n s.push(2);\n } else {\n this.stackpop(s, tmp);\n }\n\n }\n\n }\n }\n\n Stack<Integer> stack = new Stack<Integer>();\n while (!s.isEmpty()) {\n stack.push(s.pop());\n }\n\n tmp.setLocation(tmpx, tmpy);\n return stack;\n\n }",
"public static void main(String args[]) {\n int V = 4;\n Graph g = new Graph(V);\n g.addEdge(0, 1);\n g.addEdge(0, 2);\n g.addEdge(1, 2);\n g.addEdge(2, 0);\n g.addEdge(2, 3);\n g.addEdge(3, 3);\n\n int src = 1;\n int dest = 3;\n boolean[] visited = new boolean[V];\n\n // To store the complete path between source and destination\n Stack<Integer> path1 = new Stack<>();\n\n if (hasPathDFS(g, src, dest, visited, path1)) {\n System.out.println(\"There is a path from \" + src + \" to \" + dest);\n System.out.println(\"The complete path is \" + path1);\n } else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n src = 3;\n dest = 1;\n // To store the complete path between source and destination\n Stack<Integer> path2 = new Stack<>();\n\n if (hasPathDFS(g, src, dest, visited, path2)) System.out.println(\"There is a path from \" + src + \" to \" + dest);\n else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n // total number of nodes in the graph (labeled from 0 to 7)\n int n = 8;\n\n // List of graph edges as per the above diagram\n Graph g2 = new Graph(n);\n /**\n * There is a path from 1 to 3\n * The complete path is [1, 2, 3]\n * There is no path from 3 to 1\n * There is a path from 0 to 7\n * The complete path is [0, 3, 4, 6, 7]\n */\n\n g2.addEdge(0, 3);\n g2.addEdge(1, 0);\n g2.addEdge(1, 2);\n g2.addEdge(1, 4);\n g2.addEdge(2, 7);\n g2.addEdge(3, 4);\n g2.addEdge(3, 5);\n g2.addEdge(4, 3);\n g2.addEdge(4, 6);\n g2.addEdge(5, 6);\n g2.addEdge(6, 7);\n\n // source and destination vertex\n src = 0;\n dest = 7;\n\n // To store the complete path between source and destination\n Stack<Integer> path = new Stack<>();\n boolean[] visited2 = new boolean[n];\n\n if (hasPathDFS(g2, src, dest, visited2, path)) {\n System.out.println(\"There is a path from \" + src + \" to \" + dest);\n System.out.println(\"The complete path is \" + path);\n } else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n\n }",
"void DFS(Node root) {\n\t\tStack<Node> s = new Stack<Node>();\n\t\ts.add(root);\n\n\t\twhile(!s.isEmpty()) {\n\t\t\tNode n = s.pop();\n\t\t\tif (n != null) {\n\t\t\t\tSystem.out.print(n.data + \",\");\n\t\t\t\ts.push(n.right);\n\t\t\t\ts.push(n.left);\n\t\t\t}\n\t\t}\n\t}",
"public void dfs (int start) {\n vertexList[start].wasVisited = true; // mark it\n print(start); stack.push(start);\n while (!stack.isEmpty()) {\n int b = getNextUnvisitedNeighbor(stack.peek());\n if (b==-1) stack.pop(); // no unvisited neighbor;\n else {\n vertexList[b].wasVisited = true;\n print(b); stack.push(b);\n }\n }\n // clear wasVisited marks\n }",
"private static void dfsAgain(int[][] arr, int sv, boolean[] visited, Stack<Integer> stack, ArrayList<Integer> list) {\n\t\t\n\t\twhile(!stack.isEmpty()) {\n\t\t\tint top=stack.pop();\n\t\t\tif(!visited[top]) {\n\t\t\t\t\n\t\t\tvisited[top]= true;\n\t\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\t\tif(arr[top][i]==1 && !visited[i]) {\n\t\t\t\t\tvisited[i]=true;\n\t\t\t\t\tlist.add(i);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public boolean dfs_iterative_util(LinkedList<Integer>[] graph, boolean[] visited, int s){\n Stack<Integer> fringe = new Stack<Integer>();\n Set<Integer> currStack = new HashSet<Integer>();\n \n fringe.push(s);\n currStack.add(s);\n \n while(!fringe.isEmpty()){\n int curr = fringe.pop();\n if(currStack.contains(curr))\n return false;\n visited[curr] = true;\n currStack.add(curr);\n if(graph[curr] != null){\n Iterator<Integer> itr = graph[curr].iterator();\n while(itr.hasNext()){\n int n = itr.next();\n \n if(!visited[n]){\n fringe.push(n);\n }\n }\n currStack.remove(curr);\n }\n \n }\n \n return true;\n }",
"static void dfs(Node current, Set<Node> visited) {\n System.out.print(\"Node \" + current.val + \", \");\n\n // adds the current node to the set of already visited nodes\n visited.add(current);\n\n // loops over the neighbours of the current node\n for (Node neighbour: current.neighbours) {\n\n // if the neighbour has not been already visited\n if (! visited.contains(neighbour)) {\n\n // recursively processes the neighbour\n dfs(neighbour, visited);\n }\n }\n }",
"public static void dfs(TreeNode root) {\n Stack<TreeNode> stack = new Stack<TreeNode>();\n stack.push(root);\n root.visited = true;\n System.out.println(root.val);\n while (!stack.isEmpty()){\n TreeNode node = stack.peek();\n TreeNode child=getUnVisitedChiledNode(node);\n if (child!=null){\n child.visited=true;\n System.out.println(child.val);\n stack.push(child);\n }else {\n stack.pop();\n }\n }\n }",
"public void doDfsIterative(Graph g, int s) {\n boolean[] myVisited = new boolean[8];\n Stack<Integer> stack = new Stack<>();\n stack.push(s);\n myVisited[s] = true;\n while (!stack.isEmpty()) {\n int top = stack.pop();\n System.out.print(\"[\" + top + \"] \");\n for (int e : g.adj[top]) {\n if (!myVisited[e]) {\n stack.push(e);\n myVisited[e] = true;\n }\n }\n }\n\n }",
"private static void iddfs(State curr, int depth) {\n for(int i = 0; i <= depth; i++) {\r\n\r\n if(curr.isGoalState()) \r\n System.out.println(i+\":\"+curr.getOrderedPair()+\" Goal\");//initial is goal state\r\n else\r\n System.out.println(i+\":\"+curr.getOrderedPair());//initial\r\n\r\n curr.close.add(curr);\r\n State currState = curr;\r\n while(!currState.isGoalState()) {\r\n if(currState.depth < i)\r\n curr.buildStack(currState.getSuccessors(currState));\r\n System.out.print(i+\":\");\r\n curr.printHelp(currState, 5);\r\n if(!curr.open.isEmpty()) {\r\n currState = curr.open.get(curr.open.size()-1);\r\n curr.close.add(curr.open.remove(curr.open.size()-1));\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n if(currState.isGoalState()) {\r\n System.out.println(i+\":\"+currState.getOrderedPair() + \" Goal\");\r\n curr.printPath(currState);\r\n return;\r\n }\r\n curr.open.clear(); curr.close.clear();\r\n }\r\n }",
"public void dfs(DSAGraphVertex vx, DSAStack visited, DSAQueue queue)\n\t{\n\t\ttry {\n\t\t\tif(vx != null) //base case if it's null end recursion\n\t\t\t{\n\t\t\t\tvisited.push(vx); //push onto visited stack\n\n\t\t\t\tIterator<DSAGraphVertex> itr = vx.getAdjacent().iterator();\n\n\t\t\t\tdo{\n\t\t\t\t\twhile (itr.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tvx = itr.next();\n\t\t\t\t\t\tif(!vx.getVisited()) //if not visited traverse here\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tqueue.enqueue(vx); //adds to output queue\n\t\t\t\t\t\t\tvx.setVisited(); //sets to visited\n\t\t\t\t\t\t\tdfs(vx, visited, queue);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvisited.pop();\n\n\t\t\t\t} while(!visited.isEmpty());\n\t\t\t}\n\t\t}\n\t\tcatch (IllegalArgumentException e) //catches empty stack exceptions\n\t\t{\n\t\t\t//System.out.println(e.getMessage());\n\t\t}\n\n\t}",
"private void visitDFS(Dot node, Set< Dot > visited ) {\n\n board.getNeighbors( node ).forEach( nbr -> {\n if ( !visited.contains( nbr ) ) {\n visited.add( nbr );\n visitDFS( nbr, visited );\n }\n } );\n }",
"public void DFS() {\r\n for (int i = 0; i < vertexNum; i++) {\r\n DFS(i);\r\n }\r\n }",
"public void dfs(DirectedGraph graph, int node){\n onStack[node] = true;\n // marked the node as visited\n marked[node] = true;\n // traverse through the neigh of the node\n for(int neigh: graph.adj[node]){\n // if the cycle stack is not empty then we have cycle\n if (this.hasCycle()) return;\n else if (!marked[neigh]){\n // assign node as neigh parent to check cycle later\n parent[neigh] = node;\n // traverse through unvisited node\n dfs(graph,neigh);\n // if neigh is already visited and onstack then trace back to\n // check if the parent of node is the same as neigh\n }else if (onStack[neigh]){\n// System.out.println(\"neigh = \"+ neigh + \" node = \"+ node);\n // put all the vertex in the cycle to the stack\n int v = node;\n cycle.push(v);\n while(v != neigh){\n v = parent[v];\n cycle.push(v);\n }\n if(cycle.size() < 3) cycle = new Stack<>();\n else {\n System.out.print(\"The cycle is \");\n for (int vertex : cycle) System.out.print(vertex + \",\");\n System.out.println();\n }\n\n }\n }\n onStack[node] = false;\n }",
"static boolean dfs(TreeNode root) {\n Stack<TreeNode> stack = new Stack<TreeNode>();\n stack.push(root);\n while (!stack.isEmpty()) {\n TreeNode node = (TreeNode) stack.pop();\n if (node == null)\n continue;\n\n System.out.println(\"Checking node \" + node.data);\n if (isGoal(node)) {\n System.out.println(\"\\nFound goal node \" + node.data);\n return true;\n }\n stack.addAll(node.getChildren());\n // dump(stack);\n }\n return false;\n }",
"public static void depthFirstSearchIterative(ArrayList<Node> graph) {\n\t\tSystem.out.println(\"DFS Iterative:\");\n\t\tif(graph.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tGraphUtils.cleanGraph(graph);\n\n\t\tDeque<Node> stack = new ArrayDeque<Node>();\n\t\tfor(Node node : graph) {\n\t\t\tif(node.state != Node.State.UNDISCOVERED) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tnode.state = Node.State.DISCOVERED;\n\t\t\tstack.push(node);\n\t\t\twhile(!stack.isEmpty()) {\n\t\t\t\tnode = stack.pop();\n\t\t\t\t\n\t\t\t\t//process node\n\t\t\t\tSystem.out.print(node.name + \" -> \");\n\t\t\t\t\n\t\t\t\tfor(Edge e : node.edges) {\n\t\t\t\t\t//process edge\n\t\t\t\t\tNode neighbor = e.getNeighbor(node);\n\t\t\t\t\t\n\t\t\t\t\t//first time we see this node it gets added to the stack for later processing\n\t\t\t\t\tif(neighbor.state == Node.State.UNDISCOVERED) {\n\t\t\t\t\t\tneighbor.state = Node.State.DISCOVERED;\n\t\t\t\t\t\tstack.push(neighbor);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//finished with this node\n\t\t\t\tnode.state = Node.State.COMPLETE;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t\tGraphUtils.cleanGraph(graph);\n\t}",
"@SuppressWarnings({\"rawtypes\", \"unchecked\", \"SuspiciousMethodCalls\"})\n private List getDepthFirstTraversal_iterative_usingStack_BigO_VPlusE() throws Exception {\n Map<Object, Boolean> visited = new LinkedHashMap<>();\n Stack watchStack = new Stack();\n\n V root = data.keySet().stream().findFirst().orElseThrow(() -> new Exception(\"Graph is Empty\"));\n watchStack.push(root);\n visited.put(root, true);\n\n while(!watchStack.isEmpty()) {\n Object currentVertex = watchStack.top();\n\n BinarySearchTree<E> edgeTree = data.getOrDefault(currentVertex, new BinarySearchTree<>());\n List<E> edges = edgeTree.getTreeByInOrder_depthFirst();\n\n //Remove an item from the stack when there are no edges or all the edges are visited for that vertex\n if(edgeTree.isEmpty() || visited.keySet().containsAll(edges)) {\n watchStack.pop();\n } else {\n for(E edge : edges) {\n if(!visited.containsKey(edge)) {\n watchStack.push(edge);\n visited.put(edge, true);\n break;\n }\n }\n }\n }\n return new ArrayList<>(visited.keySet());\n }",
"public void dfs(Vertex<T> start) {\n\t\t\t// DFS uses Stack data structure\n\t\t\tStack<Vertex<T>> stack = new Stack<Vertex<T>>();\n\t\t\tstart.visited = true;\n\t\t\tstack.push(start);\n\t\t\tprintNode(start);\n\t\t\twhile (!stack.isEmpty()) {\n\t\t\t\tVertex<T> n = stack.peek();\n\t\t\t\tVertex<T> child = getUnvisitedChildren(n);\n\t\t\t\tif (child != null) {\n\t\t\t\t\tchild.visited = true;\n\t\t\t\t\tstack.push(child);\n\t\t\t\t\tprintNode(child);\n\t\t\t\t} else {\n\t\t\t\t\tstack.pop();\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void depthFirstSearch() {\n List<Vertex> visited = new ArrayList<Vertex>();\r\n // start the recursive depth first search on the current vertex\r\n this.dfs(visited);\r\n }",
"static void DFS(int Node)\n {\n\n visit[Node] = true;\n for (int i = 1; i < ver+1; i++) {\n\n\n if (map[Node][i] == 1 && visit[i] == false) {\n DFS(i);\n }\n\n }\n\n\n }",
"static void dfs(int[][] G){\n\t\tStack<Integer> s = new Stack<Integer>();\n\t\tfor (int ver_start=0; ver_start<N; ver_start++){\n\t\t\tif (visited[ver_start]) continue;\n\t\t\ts.push(ver_start);\n\t\t\tvisited[ver_start] = true;\n\n\t\t\twhile(!s.isEmpty()){\n\t\t\t\tint vertex = s.pop();\n\t\t\t\tSystem.out.print((vertex+1) + \" \");\n\t\t\t\tfor (int i=0; i<N; i++){\n\t\t\t\t\tif (G[vertex][i] == 1 && !visited[i]){\n\t\t\t\t\t\t// find neigbor of current vertex and not visited\n\t\t\t\t\t\t// add into the stack\n\t\t\t\t\t\ts.push(i);\n\t\t\t\t\t\tvisited[i] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"private static void dfs(int idx, boolean[] visited, boolean[] isbreak) {\n\t\tif(idx==N) {\n\t\t\t//System.out.println(\"����������\");\n\t\t\tint cnt=0;\n\t\t\tfor(int i=0; i<N; i++) {\n\t\t\t\tif(isbreak[i]) cnt++; \n\t\t\t}\n\t\t\tans=Math.max(ans, cnt);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(isbreak[idx]) {\n\t\t\tdfs(idx+1, visited, isbreak); return;\n\t\t}\n\t\t\n\t\tboolean flag = false;\n\t\tfor(int i=0; i<N; i++) {\n\t\t\t//System.out.println(\"i:\"+i);\n\t\t\tif(i==idx) continue;\n\t\t\t\n\t\t\tif(!isbreak[i]) {\n\t\t\t\tflag=true;\n\t\t\t\t/*System.out.println(i+\"�� ģ��\");\n\t\t\t\tSystem.out.println(\"ġ����\");\n\t\t\t\tSystem.out.println(list.get(idx).inner+\" \"+list.get(idx).weight);\n\t\t\t\tSystem.out.println(list.get(i).inner+\" \"+list.get(i).weight);*/\n\t\t\t\tlist.get(idx).inner-=list.get(i).weight;\n\t\t\t\tlist.get(i).inner-=list.get(idx).weight;\n\t\t\t\t/*System.out.println(\"ġ����\");\n\t\t\t\tSystem.out.println(list.get(idx).inner+\" \"+list.get(idx).weight);\n\t\t\t\tSystem.out.println(list.get(i).inner+\" \"+list.get(i).weight);*/\n\t\t\t\tif(list.get(i).inner <= 0) isbreak[i]=true;\n\t\t\t\tif(list.get(idx).inner <= 0) isbreak[idx]=true;\n\t\t\t\t\n\n\t\t\t\tdfs(idx+1,visited,isbreak);\n\t\t\t\t\n\t\t\t\tlist.get(idx).inner+=list.get(i).weight;\n\t\t\t\tlist.get(i).inner+=list.get(idx).weight;\n\t\t\t\tif(list.get(i).inner > 0) isbreak[i]=false;\n\t\t\t\tif(list.get(idx).inner > 0) isbreak[idx]=false;\n\t\t\t}\n\t\t}\n\t\tif(!flag) {\n\t\t\tint cnt=0;\n\t\t\tfor(int i=0; i<N; i++) {\n\t\t\t\tif(isbreak[i]) cnt++; \n\t\t\t}\n\t\t\tans=Math.max(ans, cnt);\n\t\t\treturn;\n\t\t}\n\t\t\n\t}",
"Set<String> dfsTraversal(Graph graph, String root) {\n Set<String> seen = new LinkedHashSet<String>();\n Stack<String> stack = new Stack<String>();\n stack.push(root);\n\n while (!stack.isEmpty()) {\n String node = stack.pop();\n if (!seen.contains(node)) {\n seen.add(node);\n for (Node n : graph.getAdjacentNodes(node)) {\n stack.push(n.data);\n }\n\n }\n }\n\n return seen;\n }",
"@Test\n public void dfsRecursiveTest() {\n Map<String, List<String>> graph = new HashMap<>();\n graph.put(\"A\", Lists.newArrayList(\"B\", \"S\"));\n graph.put(\"B\", Lists.newArrayList(\"A\"));\n graph.put(\"C\", Lists.newArrayList(\"D\", \"E\", \"F\", \"S\"));\n graph.put(\"D\", Lists.newArrayList(\"C\"));\n graph.put(\"E\", Lists.newArrayList(\"C\", \"H\"));\n graph.put(\"F\", Lists.newArrayList(\"C\", \"G\"));\n graph.put(\"G\", Lists.newArrayList(\"F\", \"H\", \"S\"));\n graph.put(\"H\", Lists.newArrayList(\"E\", \"G\"));\n graph.put(\"S\", Lists.newArrayList(\"A\", \"C\", \"G\"));\n\n List<String> traversal = new DFSRecursive().runDFS(\"A\", graph);\n\n Assert.assertEquals(Lists.newArrayList(\"A\", \"B\", \"S\", \"C\", \"D\", \"E\", \"H\", \"G\", \"F\"), traversal);\n }",
"public void dfs() {\n\t\tfor (Vertice v : vertices) {\n\t\t\tv.setVisited(false);\n\t\t}\n\t\tfor (Vertice v : vertices) {\n\t\t\tif (!v.getVisited()) {\n\t\t\t\tVisitar(v, -1);\n\t\t\t}\n\t\t}\n\t}",
"public void depthFirstSearch(Node vertex){\n vertex.visited = true;\n if(vertex.row == row_size-1 && vertex.col == col_size-1){\n while(!dfs_stack.isEmpty()){\n exitPath +=dfs_stack.peek(); \n dfs_stack.pop();\n } \n }\n if(vertex.north!=null && vertex.north.visited==false){\n dfs_stack.push(\"N\");\n vertex.depthFirstSearch(vertex.north);\n }\n if(vertex.south!=null && vertex.south.visited==false){\n dfs_stack.push(\"S\");\n vertex.depthFirstSearch(vertex.south);\n }\n if(vertex.west !=null && vertex.west.visited ==false){\n dfs_stack.push(\"W\");\n vertex.depthFirstSearch(vertex.west);\n }\n if(vertex.east !=null && vertex.east.visited==false){\n dfs_stack.push(\"E\");\n vertex.depthFirstSearch(vertex.east);\n }\n if (!dfs_stack.isEmpty()){\n dfs_stack.pop();\n }\n return;\n }",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint V = sc.nextInt();\n\t\tint E = sc.nextInt();\n\n\t\tList<Integer>[]adjList = new ArrayList[10010];\n\t\tList<Integer>[]reverseAdjList = new ArrayList[10010];\n\n\t\tList<List<Integer>>scc = new ArrayList<List<Integer>>();\n\t\tint visited[] = new int[10010];\n\n\t\tfor(int i = 1 ; i <= V ; i++){\n\t\t\tadjList[i] = new ArrayList<Integer>();\n\t\t\treverseAdjList[i] = new ArrayList<Integer>();\n\t\t}\n\n\t\tfor(int i = 1 ; i <= E ; i++){\n\n\t\t\tint start = sc.nextInt();\n\t\t\tint end = sc.nextInt();\n\t\t\tadjList[start].add(end);\n\t\t\treverseAdjList[end].add(start);\n\t\t}\n\n\n\t\t//선작업 DFS 스택에 담음.\n\t\tStack <Integer>stack = new Stack<Integer>();\n\t\tfor(int i = 1 ; i <= V ; i++){\n\t\t\tif(visited[i] == 0){\n\t\t\t\tdfs(i,visited,stack,adjList);\n\t\t\t}\n\t\t}\n\n\n\t\t//후작업 역 DFS\n\t\tvisited = new int[10010];\n\n\t\tint r = 0;\n\t\twhile(!stack.isEmpty()){\n\n\t\t\tint here = stack.peek();\n\t\t\tstack.pop();\n\t\t\tif(visited[here] == 1){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tscc.add(new ArrayList<Integer>());\n\t\t\t++r;\n\t\t\treverseDFS(here, r-1, visited, scc, reverseAdjList);\n\n\t\t}\n\n\t\tSystem.out.println(r);\n\t\tfor(int i = 0 ; i < r ; i++){\n\t\t\tList <Integer>temp = scc.get(i);\n\t\t\tCollections.sort(temp);\n\t\t}\n\n\t\tscc.sort(new Comparator<List<Integer>>() {\n\t\t\t@Override\n\t\t\tpublic int compare(List<Integer> o1, List<Integer> o2) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(o1.get(0)< o2.get(0)){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.get(0) > o2.get(0)){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\n\t\t\tfor(List <Integer>list : scc){\n\t\t\t\tfor(int i = 0 ; i < list.size() ; i++){\n\t\t\t\t\tSystem.out.print(list.get(i) + \" \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"-1\");\n\t\t\t}\n\n\t}",
"@Override\r\n\tpublic void DFS(E src) {\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tvertices.forEach((E e, Vertex<E> u) -> {\r\n\t\t\t\tu.setDiscovered(0);\r\n\t\t\t\tu.setFinished(0);\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t});\r\n\t\t\tDFStime = 1;\r\n\t\t\tVertex<E> s = vertices.get(src);\r\n\t\t\ts.setColor(Color.GRAY);\r\n\t\t\ts.setDiscovered(DFStime);\r\n\t\t\t//s.predecessor is already null so skip that step\r\n\t\t\tStack<Vertex<E>> stack = new Stack<>();\r\n\t\t\tstack.push(s);\r\n\t\t\twhile(!stack.isEmpty()) {\r\n\t\t\t\tVertex<E> u = stack.pop();\r\n\t\t\t\tArrayList<Edge<E>> adj = adjacencyLists.get(u.getElement());\r\n\t\t\t\tfor(Edge<E> ale: adj) {\r\n\t\t\t\t\tVertex<E> v = vertices.get(ale.getDst());\r\n\t\t\t\t\tif(v.getColor() == Color.WHITE) {\r\n\t\t\t\t\t\tDFStime++;\r\n\t\t\t\t\t\tv.setColor(Color.GRAY);\r\n\t\t\t\t\t\tv.setDiscovered(DFStime);\r\n\t\t\t\t\t\tv.setPredecessor(u);\r\n\t\t\t\t\t\tstack.push(v);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t\tDFStime++;\r\n\t\t\t\tu.setFinished(DFStime);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void BFS(int s, int d) \r\n { \r\n int source = s;\r\n int destination = d;\r\n boolean visited[] = new boolean[V];\r\n int parent[] = new int[V];\r\n \r\n // Create a queue for BFS \r\n LinkedList<Integer> queue = new LinkedList<Integer>(); \r\n \r\n // Mark the current node as visited and enqueue it \r\n \r\n visited[s]=true; \r\n queue.add(s); \r\n System.out.println(\"Search Nodes: \");\r\n while (queue.size() != 0) \r\n { \r\n int index = 0;\r\n \r\n // Dequeue a vertex from queue and print it \r\n \r\n s = queue.poll();\r\n \r\n System.out.print(convert2(s)); \r\n \r\n if(s == destination)\r\n {\r\n break;\r\n }\r\n \r\n System.out.print(\" -> \");\r\n while(index < adj[s].size()) \r\n { \r\n \r\n \r\n int n = adj[s].get(index); \r\n if (!visited[n]) \r\n { \r\n visited[n] = true;\r\n parent[n] = s;\r\n queue.add(n); \r\n }\r\n index = index+ 2;\r\n \r\n \r\n }\r\n \r\n \r\n \r\n }\r\n int check = destination;\r\n int cost = 0, first, second = 0;\r\n String string = \"\" + convert2(check);\r\n while(check!=source)\r\n {\r\n \r\n first = parent[check];\r\n string = convert2(first) + \" -> \" + string;\r\n while(adj[first].get(second) != check)\r\n {\r\n second++;\r\n }\r\n cost = cost + adj[first].get(second +1);\r\n check = first;\r\n second = 0;\r\n \r\n }\r\n \r\n System.out.println(\"\\n\\nPathway: \");\r\n \r\n System.out.println(string);\r\n \r\n \r\n System.out.println(\"\\nTotal cost: \" + cost);\r\n }",
"public void bfs(int s) {\n boolean[] visited = new boolean[v];\n int level = 0;\n parent[s] = 0;\n levels[s] = level;\n Queue<Integer> queue = new LinkedList<>();\n queue.add(s);\n visited[s] = true;\n while (!queue.isEmpty()){\n Integer next = queue.poll();\n System.out.print(next+\", \");\n Iterator<Integer> it = adj[next].listIterator();\n\n while (it.hasNext()){\n Integer i = it.next();\n if(!visited[i]){\n visited[i] = true;\n levels[i] = level;\n parent[i] = next;\n queue.add(i);\n }\n }\n\n level++;\n }\n }",
"private void dfs(Node s, HashSet<Integer> visited) {\n\t\tif(visited.contains(s.id)) {\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(s.id);\n\t\tvisited.add(s.id);\n\t\tfor(Node n :s.adj) {\n\t\t\tdfs(n,visited);\n\t\t}\n\t}",
"private void dfs(Digraph G, int current) {\n onStack[current] = true;\n marked[current] = true;\n for (int next : G.adj(current)) {\n //At least one cycle has already been found\n if (cycle != null) {\n return;\n } else if (marked[next] == false) { //The next vertex hasn't been visited\n edgeTo[next] = current;\n dfs(G, next);\n } else if (onStack[next] == true) { //The next vertex has already been visited in this path\n cycle = new Stack<Integer>();\n //Traverse backwards through current stack and add to cycle stack\n for (int i = current; i != next; i = edgeTo[i]) {\n cycle.push(i);\n }\n cycle.push(next);\n cycle.push(current);\n }\n }\n onStack[current] = false;\n }",
"private static void dfs(State curr) {\n curr.buildStack(curr.getSuccessors(curr));\r\n \r\n if(curr.isGoalState()) \r\n System.out.println(curr.getOrderedPair()+\" Goal\");//initial is goal state\r\n else\r\n System.out.println(curr.getOrderedPair());//initial\r\n \r\n curr.close.add(curr);\r\n while(!curr.open.isEmpty()&&!curr.isGoalState()) {\r\n curr.buildStack(curr.getSuccessors(curr));\r\n curr.printHelp(curr, 4);\r\n curr = curr.open.get(curr.open.size()-1);\r\n curr.close.add(curr.open.remove(curr.open.size()-1));\r\n }\r\n \r\n if(curr.isGoalState()) {\r\n System.out.println(curr.getOrderedPair() + \" Goal\");\r\n curr.printPath(curr);\r\n }\r\n }",
"public static void depthFirstSearchRecursive(ArrayList<Node> graph) {\n\t\tSystem.out.println(\"DFS Recursive:\");\n\t\tif(graph.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tGraphUtils.cleanGraph(graph);\n\t\t\n\t\tfor(Node node : graph) {\n\t\t\tdfsRecursive(node);\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tGraphUtils.cleanGraph(graph);\n\t}",
"void DFS(int head) {\n //visited boolean array maintained to keep track of visited nodes and to avoid infinite looping\n boolean visited[] = new boolean[V+1];\n if(visited[head] == false)\n DFS(head,visited);\n\n System.out.println(V-connected);\n }",
"static void iterativeDfs(Node startingNode) {\n Set<Node> markedAsVisited = new HashSet<>();\n\n // creates a stack for piling up the nodes to visit\n ArrayDeque<Node> toBeVisited = new ArrayDeque<>();\n\n // sets the starting node as to be visited\n toBeVisited.push(startingNode);\n\n // adds the starting node to the set of marked as visited nodes\n markedAsVisited.add(startingNode);\n\n // while there nodes to visit\n while (!toBeVisited.isEmpty()) {\n\n // gets the current node\n Node current = toBeVisited.pop();\n\n // processes the node\n System.out.print(\"Node \" + current.val + \", \");\n\n // loops over the neighbours of the current node\n for (Node neighbour: current.neighbours) {\n\n // if the neighbour has not been already visited\n if (! markedAsVisited.contains(neighbour)) {\n\n // adds the neighbour to the ones to be visited\n toBeVisited.push(neighbour);\n\n // adds the neighbour to the set of marked as visited nodes\n markedAsVisited.add(neighbour);\n }\n }\n }\n }",
"private void DFSUtil(graph copy,node_data n) {\n\t\tn.setTag(1);\n\t\tCollection<edge_data> temp = copy.getE(n.getKey());\n\t\tif (temp != null) {\n\t\t\tfor (edge_data edge : temp) {\n\t\t\t\tif (copy.getNode(edge.getDest()) != null && copy.getE(edge.getDest()) != null && copy.getNode(edge.getDest()).getTag() == 0) {\n\t\t\t\t\tDFSUtil(copy,copy.getNode(edge.getDest()));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static Stack<Integer> topologicalKosarajuDFSRecursive(ArrayList<ArrayList<Integer>> adj,int u,Stack<Integer> stack,boolean[] visited){\r\n visited[u]=true;\r\n for(int i:adj.get(u))\r\n if(!visited[u])\r\n topologicalKosarajuDFSRecursive(adj,i,stack,visited);\r\n stack.push(u);\r\n return stack;\r\n }",
"public static int[] dfs_Stack(gNode[] G, boolean[] visited, int[] path, int s){\n\t\tStack <Integer> dfs = new Stack<Integer>();\n\n\t\tdfs.push(s);\n\t\tvisited[s] = true;\n\t\twhile(!dfs.isEmpty()){\n\t\t\ts = dfs.pop();\n\t\t\tfor(gNode t=G[s]; t!= null; t=t.dest){\n\t\t\t\tif(!visited[t.item]){\t\t//once an item has been visited, set it equal to true\n\t\t\t\t\tvisited[t.item] = true;\n\t\t\t\t\tpath[t.item] = s;\t\t//change the int value of the path\n\t\t\t\t\tdfs.push(t.item);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn path;\n\n\n\t}",
"private void doDepthFirstTraverse(int start, boolean[] visited, List<Edge> path) {\n visited[start] = true;\n\n for (int i: this.heads[start]) {\n if (!visited[i]) {\n path.add(new Edge(start, i));\n doDepthFirstTraverse(i, visited, path);\n }\n }\n }",
"public MyArrayList<MyArrayList<Node>> DFS() {\n t = 0;\n for (int i = 0; i < nodes.size(); i++) {\n Node node = nodes.get(i);\n // reset all nodes in the graph to the initial DFS state\n node.setColor(Color.WHITE);\n node.setD(0);\n node.setF(0);\n node.setParent(null);\n }\n MyArrayList<MyArrayList<Node>> components = new MyArrayList<>();\n for (int i = 0; i < nodes.size(); i++) {\n Node node = nodes.get(i);\n if (node.getColor() == Color.WHITE) {\n // each time we start from a vertex here we are starting a new DFS component\n MyArrayList<Node> component = new MyArrayList<>();\n dfsVisit(node, component);\n components.add(component);\n }\n }\n return components;\n }",
"private void dfs(String source) {\n visited.add(source);\n\n System.out.println(source);\n\n for (Object vertex : graph.get(source)) {\n if (!visited.contains(vertex))\n dfs((String) vertex);\n }\n }",
"private boolean DFSUtil(State state, ArrayList<String> visited, int currentDepth) {\n // Mark the current node as visited and print it\n visited.add(state.joinValues());\n\n this.path.push(state);\n\n if (this.problem.goalTest(state)) {\n return true;\n }\n\n // Recur for all the vertices adjacent to this vertex\n // extend the current node\n ListIterator<State> iterator = this.extend(state).listIterator();\n this.incrementExtendedNumber();\n while (iterator.hasNext()) {\n State state1 = iterator.next();\n if (this.limit > currentDepth) {\n if (this.graphSearch && !visited.contains(state1.joinValues())) {\n this.incrementVisitedNumber();\n if (DFSUtil(state1, visited, currentDepth + 1))\n return true;\n else\n this.path.pop();\n } else if (!this.graphSearch) {\n this.incrementVisitedNumber();\n if (DFSUtil(state1, visited, currentDepth + 1))\n return true;\n else\n this.path.pop();\n }\n }\n\n\n this.setMaxMemory(this.path.size());\n }\n return false;\n }",
"static void dfs(int node) {\n for (int adj : adjList[node]) {\n if (adj != firstParents[node]) {\n firstParents[adj] = node;\n depth[adj] = depth[node] + 1;\n maxDepth = Math.max(maxDepth, depth[adj]);\n dfs(adj);\n }\n }\n }",
"public void DFS(int current) {\r\n if (vertexList.get(current).isVisited) {\r\n return;\r\n }\r\n visit(current);\r\n int next = nextNeighbour(current);\r\n while (next != -1) {\r\n DFS(next);\r\n next = nextNeighbour(current);\r\n }\r\n }",
"public static void dfsRecursion(gNode[] G, boolean[] visited, int[] path, int s){\n\t\tvisited[s] =true;\n\t\tfor(gNode t = G[s]; t!=null; t=t.dest){\n\t\t\tif(!visited[t.item]){\n\t\t\t\tpath[t.item]=s;\n\t\t\t\tdfsRecursion(G, visited, path, t.item);\n\t\t\t}\n\t\t}\t\n\t}",
"public String DFS(int g) {\n\t\t//TODO\n\t}",
"private void DFS(int[] array, int level, List<Integer> list) {\n\t\tif (level == array.length) {\n\t\t\tif (Math.abs(sum - 2 * cur) < min) {\n\t\t\t\tmin = Math.abs(sum - 2 * cur);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tcur += array[level];\n\t\tlist.add(array[level]);\n\t\tDFS(array, level + 1, list);\n\t\tcur -= array[level];\n\t\tlist.remove(list.size() - 1);\n\t\tDFS(array, level + 1, list);\n\t}",
"private void bfs(Dungeon d, Site s) {\n\t\t\n\t\t// use a queue to do BFS, and initialize instance variables\n\t\tQueue<Site> q = new LinkedList<Site>();\n\t\tfor (int x = 0; x < d.size(); x++)\n\t\t\tfor (int y = 0; y < d.size(); y++)\n\t\t\t\tdistTo[x][y] = INFINITY; \n\t\tdistTo[s.getX()][s.getY()] = 0;\n\t\tmarked[s.getX()][s.getY()] = true;\n\t\t\n\t\t// pop site from queue until it's empty\n\t\tq.offer(s);\n\t\twhile (!q.isEmpty()) {\n\t\t\t\n\t\t\t// pop the next site in the queue\n\t\t\tSite v = q.poll(); \t \n\t\t\tint x = v.getX();\n\t\t\tint y = v.getY();\n\n\t\t\t// 4 adjacent sites\n\t\t\tSite east = new Site(x + 1, y);\n\t\t\tSite west = new Site(x - 1, y);\n\t\t\tSite north = new Site(x, y - 1);\n\t\t\tSite south = new Site(x, y + 1);\n\n\t\t\t// BFS the rest of the dungeon\n\t\t\tif (d.isLegalMove(v, east) && !marked[east.getX()][east.getY()]) {\n\t\t\t\tedgeTo[east.getX()][east.getY()] = v;\n\t\t\t\tdistTo[east.getX()][east.getY()] = distTo[x][y] + 1;\n\t\t\t\tmarked[east.getX()][east.getY()] = true;\n\t\t\t\tq.offer(east);\n\t\t\t}\n\t\t\tif (d.isLegalMove(v, west) && !marked[west.getX()][west.getY()]) {\n\t\t\t\tedgeTo[west.getX()][west.getY()] = v;\n\t\t\t\tdistTo[west.getX()][west.getY()] = distTo[x][y] + 1;\n\t\t\t\tmarked[west.getX()][west.getY()] = true;\n\t\t\t\tq.offer(west);\n\t\t\t}\n\t\t\tif (d.isLegalMove(v, north) && !marked[north.getX()][north.getY()]) {\n\t\t\t\tedgeTo[north.getX()][north.getY()] = v;\n\t\t\t\tdistTo[north.getX()][north.getY()] = distTo[x][y] + 1;\n\t\t\t\tmarked[north.getX()][north.getY()] = true;\n\t\t\t\tq.offer(north);\n\t\t\t}\n\t\t\tif (d.isLegalMove(v, south) && !marked[south.getX()][south.getY()]) {\n\t\t\t\tedgeTo[south.getX()][south.getY()] = v;\n\t\t\t\tdistTo[south.getX()][south.getY()] = distTo[x][y] + 1;\n\t\t\t\tmarked[south.getX()][south.getY()] = true;\n\t\t\t\tq.offer(south);\n\t\t\t}\n\n\t\t}\n\n\t}",
"@Override\n public void dfs() {\n\n }",
"void BFS(int s);",
"private static void dfsRecursive(Node node) {\n\t\t//if the node state isn't undiscovered it has already been accounted for\n\t\tif(node == null || node.state != Node.State.UNDISCOVERED) {\n\t\t\treturn;\n\t\t}\n\t\tnode.state = Node.State.DISCOVERED;\n\n\t\t//process node\n\t\tSystem.out.print(node.name + \" -> \");\n\t\t\n\t\tfor(Edge e : node.edges) {\n\t\t\tdfsRecursive(e.getNeighbor(node));\n\t\t}\n\t\t\t\n\t\t//finished with this node\n\t\tnode.state = Node.State.COMPLETE;\n\t}",
"public MyArrayList<MyArrayList<Node>> DFSRecursive() {\n t = 0;\n for (int i = 0; i < nodes.size(); i++) {\n Node node = nodes.get(i);\n // reset all nodes in the graph to the initial DFS state\n node.setColor(Color.WHITE);\n node.setD(0);\n node.setParent(null);\n }\n MyArrayList<MyArrayList<Node>> components = new MyArrayList<>();\n for (int i = 0; i < nodes.size(); i++) {\n Node node = nodes.get(i);\n if (node.getColor() == Color.WHITE) {\n MyArrayList<Node> component = new MyArrayList<>();\n this.dfsVisitRecursive(node, component);\n components.add(component);\n }\n }\n return components;\n }",
"private void depthFirstSearch(Slot start, ArrayList<Pair<Slot, Slot>> moves, HashMap<Slot, Slot> parents) {\n boolean[][] visitedSlots = new boolean[Board.MAX_ROW][Board.MAX_COLUMN];\n\n setSlotsAsNotVisited(visitedSlots);\n\n Stack<Slot> dfsStack = new Stack<>();\n int color = start.getColor();\n\n dfsStack.push(start);\n Slot previous = start;\n\n boardObject.setSlotColor(boardObject.getSlot(start.getRow(), start.getColumn()), Slot.EMPTY);\n\n while (!dfsStack.empty()) {\n Pair<Slot, Slot> next;\n Slot current = dfsStack.pop();\n\n if (!visitedSlots[current.getRow()][current.getColumn()] && !current.equals(previous)) {\n if (!current.equals(start)) {\n visitedSlots[current.getRow()][current.getColumn()] = true;\n }\n\n next = new Pair<>(start, current);\n\n moves.add(next);\n }\n\n Slot up = getUp(current);\n Slot down = getDown(current);\n Slot left = getLeft(current);\n Slot right = getRight(current);\n\n if (left != null && !visitedSlots[left.getRow()][left.getColumn()]) {\n if (!isChild(current, left, parents)) {\n dfsStack.push(left);\n parents.put(left, current);\n }\n }\n\n if (down != null && !visitedSlots[down.getRow()][down.getColumn()]) {\n if (!isChild(current, down, parents)) {\n dfsStack.push(down);\n parents.put(down, current);\n }\n }\n\n if (right != null && !visitedSlots[right.getRow()][right.getColumn()]) {\n if (!isChild(current, right, parents)) {\n dfsStack.push(right);\n parents.put(right, current);\n }\n }\n\n if (up != null && !visitedSlots[up.getRow()][up.getColumn()]) {\n if (!isChild(current, up, parents)) {\n dfsStack.push(up);\n parents.put(up, current);\n }\n }\n\n previous = current;\n }\n\n boardObject.setSlotColor(boardObject.getSlot(start.getRow(), start.getColumn()), color);\n }",
"public void mst() {\n int currentVertexIndex = 0;\r\n dfsStack.push(0);\r\n vertexList[0].wasVisited = true;\r\n// System.out.println(vertexList[dfsStack.peek()]);\r\n while (dfsStack.top != -1) {\r\n\r\n\r\n currentVertexIndex = this.getAdjUnvisitedVert(dfsStack.peek());\r\n if (currentVertexIndex != -1) {\r\n System.out.print(vertexList[dfsStack.peek()]);\r\n dfsStack.push(currentVertexIndex);\r\n vertexList[currentVertexIndex].wasVisited = true;\r\n System.out.print(vertexList[dfsStack.peek()]);\r\n System.out.print(\", \");\r\n\r\n\r\n } else {\r\n currentVertexIndex = dfsStack.pop();\r\n\r\n }\r\n }\r\n for (Vertex x : vertexList) {\r\n x.wasVisited = false;\r\n }\r\n }",
"void DFSearch(BFSNode n){\n\t\tn.discovered=true;\r\n\t\tSystem.out.print(\" discovered\");\r\n\t\tn.preProcessNode();\r\n\t\tfor( Integer edg: n.edges){\r\n\t\t\tn.processEdge(edg);\r\n\t\t\tif(!nodes[edg].discovered){\r\n\t\t\t\tnodes[edg].parent = n; \r\n\t\t\t\tnodes[edg].depth = n.depth +1;\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.print(\"{new track with parent [\"+ nodes[edg].parent.value+\"] }\");\r\n\t\t\t\tDFSearch(nodes[edg]);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(nodes[edg] != n.parent){\r\n\t\t\t\t\tSystem.out.print(\"{LOOP}\");\r\n\t\t\t\t\tif(nodes[edg].depth < n.reachableLimit.depth){\r\n\t\t\t\t\t\tn.reachableLimit = nodes[edg];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.print(\"{second visit}\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"back from node [ \"+n.value +\" ]\");\r\n\t\tn.postProcessNode();\r\n\t\tn.processed = true;\r\n\t\t\r\n\t}",
"public static void botched_dfs3(Graph g, int s) {\n int cpt = 0;\n\n Stack<Integer> stack = new Stack<Integer>();\n boolean visited[] = new boolean[g.vertices()];\n stack.push(s);\n while (!stack.empty()) {\n System.out.println(\"Capacité : \" + stack.capacity());\n int u = stack.pop();\n if (!visited[u]) {\n visited[u] = true;\n System.out.println(u);\n for (Edge e : g.next(u))\n if (!visited[e.to]) {\n stack.push(e.to);\n cpt++;\n }\n }\n }\n }",
"public void DFSRecursive(Vertex start) {\r\n\t\tSet<Vertex> visited = new HashSet<Vertex>();\r\n\r\n\t\tif (start == null)\r\n\t\t\treturn;\r\n\r\n\t\tDFSRecursive(start, visited);\r\n\t}",
"public void dfs(int v) {\n marked[v] = true;\n onStack[v] = true;\n for (DirectedEdge e : G.incident(v)) {\n int w = e.to();\n if (hasCycle())\n return;\n else if (!marked[w]) {\n parent[w] = v;\n dfs(w);\n } else if (onStack[w]) {\n cycle = new Stack<>();\n cycle.push(w);\n for (int u = v; u != w; u = parent[u])\n cycle.push(u);\n cycle.push(w);\n return;\n }\n }\n onStack[v] = false;\n reversePost.push(v);\n }",
"public void iterativeDfs(Graph graph, int sourceVertex) {\n\n stack.addLast(sourceVertex);\n\n while (!stack.isEmpty()) {\n int vertex = stack.removeLast();\n\n if (!marked[vertex]) {\n sourceVertexCount++;\n marked[vertex] = true;\n\n for (int adjacentVertex : graph.adj(vertex)) {\n if (!marked[adjacentVertex]) {\n stack.addLast(adjacentVertex);\n }\n }\n }\n }\n }",
"public static void botched_dfs2(Graph g, int s) {\n Stack<Integer> stack = new Stack<Integer>();\n boolean visited[] = new boolean[g.vertices()];\n stack.push(s);\n System.out.println(s);\n visited[s] = true;\n while (!stack.empty()) {\n int u = stack.pop();\n for (Edge e : g.next(u))\n if (!visited[e.to]) {\n System.out.println(e.to);\n visited[e.to] = true;\n stack.push(e.to);\n }\n }\n }",
"public Stack<MazePoint> DepthFirstSearch(int row, int column)\n {\n //cMaze[row][column].wasVisited()\n if(cMaze[row][column].isExit())\n {\n sPath.push(cMaze[row][column]);\n //print out the path\n PrintPath(sPath, true);\n return sPath;\n }\n else\n {\n //when not visit\n if(!cMaze[row][column].wasVisited())\n {\n if(cMaze[row][column].hasItem())\n {\n String itemName = cMaze[row][column].pickUpItem();\n Item item = new Item(itemName);\n //check if the item is in the hashmap\n if(availableItemsHashMap.get(item) != null)\n {\n inventoryList.insert(itemName);\n }\n else\n {\n cMaze[row][column].dropItem();\n }\n }\n //mark as vist\n cMaze[row][column].markVisited();\n //push into stack\n sPath.push(cMaze[row][column]);\n }\n //determine where to traverse next (S, E, W, N)\n //recursively\n if(cMaze[row+1][column].canBeNavigated() || cMaze[row+1][column].isExit())// or (cMaze[row+1][column] != VISITED_MARKER && cMaze[row+1][column] != 'W')\n {\n return DepthFirstSearch(row+1, column);\n }\n else if(cMaze[row][column+1].canBeNavigated() || cMaze[row][column+1].isExit())\n {\n return DepthFirstSearch(row, column+1);\n }\n else if(cMaze[row][column-1].canBeNavigated() || cMaze[row][column-1].isExit())\n {\n return DepthFirstSearch(row, column-1);\n }\n else if(cMaze[row-1][column].canBeNavigated() || cMaze[row-1][column].isExit())\n {\n return DepthFirstSearch(row-1, column);\n }\n //no where could go, then return\n else\n {\n sPath.pop();\n if(sPath.isEmpty())\n {\n //print nothing found\n PrintPath(sPath, false);\n return sPath;\n }\n MazePoint mp = sPath.top();\n int mpRow = mp.getRow();\n int mpColumn = mp.getColumn();\n return DepthFirstSearch(mpRow, mpColumn);\n }\n }\n }",
"private static void DFS(char grid[][], int row, int col, int ROW, int COL, boolean visited[][]) {\n\t\t// these arrays are used to get row and column numbers of 8 neighbors of a given cell.\n\t\tint rowNum[] = new int[] {-1, -1, -1, 0, 0, 1, 1, 1};\n\t\tint colNum[] = new int[] {-1, 0, 1, -1, 1, -1, 0, 1};\n\t\t\n\t\t// mark this cell as visited\n\t\tvisited[row][col] = true;\n\t\t\n\t\t// recur for all connected neighbors\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tif (isSafe(grid, row+rowNum[i], col+colNum[i], ROW, COL, visited)) {\n\t\t\t\tDFS(grid, row+rowNum[i], col+colNum[i], ROW, COL, visited);\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint tc = sc.nextInt();\n\t\tfor (int T = 0; T < tc; T++) {\n\t\t\tint V = sc.nextInt();\n\t\t\tint E = sc.nextInt();\n\t\t\tint[][] graph = new int[V][V];\n\t\t\tfor (int i = 0; i < E; i++) {\n\t\t\t\tint start = sc.nextInt();\n\t\t\t\tint end = sc.nextInt();\n\t\t\t\tgraph[start][end] = 1;\n\t\t\t\t// graph[end][start] = 1;\n\t\t\t}\n\n\t\t\tfront = 0;\n\t\t\tstack = new int[V];\n\t\t\tjava.util.Arrays.fill(stack, -1);\n\t\t\tvisited = new int[V];\n\t\t\tfound = false;\n\t\t\tint src = 0;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tfor (int i = 0; i < V; i++) {\n\t\t\t\t\n\t\t\t\tif(found == false && visited[i] ==0){\n\t\t\t\t\tstack[front++] = i;\n\t\t\t\t\tDFS(graph,i);\n\t\t\t\t}\n\t\t\t\tif(found == true)\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif(found == true){\n\t\t\t\tSystem.out.println(\"Found\");\n\t\t\t\tfor (int j = 0; j < front; j++) {\n\t\t\t\t\tSystem.out.println(stack[j]);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Not Found\");\n\t\t\t}\n\t\t}\n\t}",
"boolean dfs(int node, Map<Integer, List<Integer>> graph, boolean[] visited, Set<Integer> dfsPath) {\n if(dfsPath.contains(node))\n return false;\n\n // If this node is already visited via some other source node then avoid checking further again\n if(visited[node])\n return true;\n\n dfsPath.add(node);\n visited[node] = true;\n\n for(int adjVertex : graph.get(node)) {\n if(!dfs(adjVertex, graph, visited, dfsPath)) {\n return false;\n }\n }\n\n dfsPath.remove(node);\n return true;\n }",
"ArrayList<Node> DFSIter( Graph graph, final Node start, final Node end)\n {\n boolean visited[] = new boolean[graph.numNodes];\n Stack<Node> stack = new Stack<Node>();\n Map< Node,Node> parentPath = new HashMap< Node,Node>(); \n stack.push(start);\n\n while ( !stack.isEmpty() )\n {\n Node currNode = stack.pop();\n // end loop when goal node is found\n if ( currNode == end )\n break;\n // If node has already been visited, skip it\n if ( visited[currNode.id] )\n continue;\n else\n {\n visited[currNode.id] = true;\n int numEdges = currNode.connectedNodes.size();\n\n for ( int i = 0; i < numEdges; i++ )\n {\n Node edgeNode = currNode.connectedNodes.get(i);\n if ( !visited[edgeNode.id] )\n {\n stack.push( edgeNode );\n parentPath.put( edgeNode, currNode);\n }\n }\n \n }\n }\n\n ArrayList<Node> path = new ArrayList<Node>();\n Node currNode = end;\n while ( currNode != null )\n {\n path.add(0, currNode);\n currNode = parentPath.get(currNode);\n }\n\n return path;\n }",
"private boolean helperDFS(Node current){\n\n if(expandedNode.size() == 999){\n //limit has been reached. jump out of recursion.\n expandedNode.add(current);\n System.out.println(\"No solution found.\");\n printExpanded(expandedNode);\n System.exit(0);\n return false;\n }\n\n boolean b = cycleCheck(current,expandedNode);\n\n if(!b){\n expandedNode.add(current);\n }else{\n return false;\n }\n\n if(current.getDigit().getDigitString().equals(goalNode.getDigit().getDigitString())){\n //goal reached.\n //expandedNode.add(current);\n solutionPath(current);\n printExpanded(expandedNode);\n System.exit(0);\n }\n\n //Now make the children.\n\n if(!forbidden.contains(current.getDigit().getDigitString())){\n\n if(current.getDigit().last_changed != 0){\n\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n\n //+1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n\n if(current.getDigit().last_changed != 1){\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n\n //+1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n\n if(current.getDigit().last_changed != 2){\n if ((Integer.parseInt(current.getDigit().getThird_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n //+1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n }\n return false;\n }",
"public static int bfs() {\r\n check = new int[N][N]; // check 변수 초기화\r\n q = new LinkedList<Point>();\t\t\t\t\t//bfs 할때 필요한 그 stack. first in first out\r\n q.offer(new Point(shark.x, shark.y));\t\t\t//q.offer == 해당 큐의 맨 뒤에 전달된 요소를 삽입함. list에서 list.add와 같은 말임.\r\n check[shark.x][shark.y] = 1;\r\n\r\n int FishCheck = 0;\t\t\t\t\t\t\t\t//the number of the fish in the sea map\r\n Shark fish = new Shark(N, N);\t\t\t\t\t//new shark initiation\r\n loop: while (!q.isEmpty()) {\r\n int r = q.peek().x;\t\t\t\t\t\t\t//q.peek == 해당 큐의 맨 앞에 있는(제일 먼저 저장된) 요소를 반환함\r\n int c = q.poll().y;\t\t\t\t\t\t\t//q.poll == 해당 큐의 맨 앞에 있는(제일 먼저 저장된) 요소를 반환하고, 해당 요소를 큐에서 제거함. 만약 큐가 비어있으면 null을 반환함.\r\n\r\n for (int d = 0; d < dr.length; d++) {\r\n int nr = r + dr[d];\t\t\t\t\t\t//북(0),남(1),동(2),서(3) 순으로. nr == new row\r\n int nc = c + dc[d];\t\t\t\t\t\t//북(0),남(1),동(2),서(3) 순으로. nc == new column\r\n\r\n // 지나갈 수 있는 곳: 자신보다 큰 물고기가 없는 곳\r\n if (isIn(nr, nc) && check[nr][nc] == 0 && sea[nr][nc] <= shark.lv) {\r\n check[nr][nc] = check[r][c] + 1;\r\n q.offer(new Point(nr, nc));\r\n\r\n // 위치가 더 커질 경우, 더이상 확인할 필요 X\r\n if (FishCheck != 0 && FishCheck < check[nr][nc]) {\r\n break loop;\r\n }\r\n \r\n // 처음 먹을 수 있는 자기보다 물고기가 발견 되었을 때\r\n if (0 < sea[nr][nc] && sea[nr][nc] < shark.lv && FishCheck == 0) {\r\n FishCheck = check[nr][nc];\r\n fish.x = nr;\r\n fish.y = nc;\r\n fish.lv = sea[nr][nc];\r\n }\r\n // 같은 위치에 여러 마리 있을 경우, 가장 위의 가장 왼쪽 물고기부터 먹음\r\n else if (FishCheck == check[nr][nc] && 0 < sea[nr][nc] && sea[nr][nc] < shark.lv) {\r\n if (nr < fish.x) { // 가장 위에 있는 거 우선권\r\n fish.x = nr;\r\n fish.y = nc;\r\n fish.lv = sea[nr][nc];\r\n } else if (nr == fish.x && nc < fish.y) { // 다 가장 위일 경우, 가장 왼쪽 우선권\r\n fish.x = nr;\r\n fish.y = nc;\r\n fish.lv = sea[nr][nc];\r\n }\r\n\r\n }\r\n\r\n }else if(isIn(nr, nc) && check[nr][nc] == 0) {\r\n check[nr][nc] = -1;\r\n }\r\n }\r\n }\r\n // idx 초과 안날 경우\r\n if (fish.x != N && fish.y != N) {\r\n eatFish(fish);\r\n }\r\n \r\n return (FishCheck - 1);\r\n }",
"void DFS(int v) {\n // Mark all the vertices as not visited(set as\n // false by default in java)\n boolean visited[] = new boolean[V];\n\n // Call the recursive helper function to print DFS traversal\n DFSUtil(v, visited);\n }",
"public void dfs (Node node) {\r\n\t\t\r\n\t\tSystem.out.print(node.data+\" \");\r\n\t\tList<Node> adding = node.getPartners();\r\n\t\tnode.visited = true;\r\n\t\t\tfor(int loop=0; loop<adding.size(); loop++) {\r\n\t\t\t\tNode n = adding.get(loop);\r\n\t\t\t\t\tif (n!=null && !n.visited) {\r\n\t\t\t\t\t\tdfs(n);\r\n\t\t\t\t\t} // if loop ends here\r\n\t\t\t\t\t\r\n\t\t\t} // for loop ends here\r\n\t\t\r\n\t}",
"@Override\n public void traverse()\n {\n System.out.print(\"DFS Tree: \");\n DFSHelper(root);\n System.out.println();\n }",
"public static void main(String[] args) {\n Graph graph = new Graph(16);\n graph.addEdge(0,1);\n graph.addEdge(1,2);\n graph.addEdge(2,3);\n graph.addEdge(3,4);\n graph.addEdge(4,5);\n graph.addEdge(5,6);\n graph.addEdge(6,7);\n graph.addEdge(8,9);\n graph.addEdge(9,10);\n graph.addEdge(10,11);\n graph.addEdge(11,12);\n graph.addEdge(13,14);\n graph.addEdge(14,15);\n graph.addEdge(15,0);\n graph.addEdge(0,8);\n graph.addEdge(1,10);\n graph.addEdge(2,9);\n graph.addEdge(3,11);\n graph.addEdge(3,14);\n graph.addEdge(4,7);\n graph.addEdge(4,13);\n graph.addEdge(5,8);\n graph.addEdge(5,15);\n graph.printGraph();\n System.out.println(\"DFS Traversal\");\n graph.DFS(3);\n System.out.println();\n System.out.println(\"BFS Traversal\");\n graph.BFS(3);\n// System.out.println();\n// for (int i=0; i<graph.vertices; i++)\n// {\n// if(graph.visited[i]!=true)\n// {\n// graph.DFS(i);\n// }\n// }\n\n }",
"public DepthFirstSearch(Graph graph) throws Exception {\n\n this.graph = graph;\n int n = graph.getNumV();\n\n parent = new int[n];\n Arrays.fill( parent , -1);\n\n visited = new boolean[n];\n Arrays.fill( visited , false );\n\n discoveryOrder = new int[n];\n finishOrder = new int[n];\n\n for (int i = 0; i < n; i++) {\n if (!visited[i])\n depthFirstSearch(i);\n }\n\n }",
"private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (nextNodes == null || curr.id == treeNodes.get(0).id)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (Node node : nextNodes) {\n\t\t\t\t\tq.add(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"private void doDFSRecursive(int vertex) {\n markVisited(vertex);\n\n for (Integer adjacentVertex : graph.getAdjacentVertices(vertex)) {\n if (!isVisitedNode(adjacentVertex)) {\n System.out.print(adjacentVertex + \" \");\n doDFSRecursive(adjacentVertex);\n }\n }\n }",
"public boolean serch(String word){\n return searchDFS(word, 0, root);\n}",
"private static void bfs(int idx) {\n\t\t\n\t\tQueue<node> q =new LinkedList<node>();\n\t\tq.add(new node(idx,0,\"\"));\n\t\twhile (!q.isEmpty()) {\n\t\t\tnode tmp = q.poll();\n\t\t\tif(tmp.idx<0 ||tmp.idx > 200000) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(tmp.cnt> min) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tmp.idx == k) {\n\t\t\t\tif(tmp.cnt < min) {\n\t\t\t\t\tmin = tmp.cnt;\n\t\t\t\t\tminnode = tmp;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(!visit[tmp.idx] && tmp.idx<=100000) {\n\t\t\t\tvisit[tmp.idx]= true;\n\t\t\t\tq.add(new node(tmp.idx*2, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx-1, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx+1, tmp.cnt+1,tmp.s));\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public static int largestIslandChain(Scanner sc) {\n int islands=sc.nextInt();\r\n boolean graph[][] = new boolean[islands][islands];\r\n\r\n //System.out.print(\"How many ziplines? \");\r\n int ziplines=sc.nextInt();\r\n\r\n for (int edge=0; edge<ziplines; edge++) {\r\n int from=sc.nextInt();\r\n int to=sc.nextInt();\r\n graph[from][to]=true;\r\n }\r\n\r\n\r\n /* Find the SCCs... */\r\n\r\n //Utility Data Structures\r\n Stack<Integer> stack = new Stack<Integer>(); \r\n\r\n\r\n //First DFS\r\n boolean[] visited01 = new boolean[islands];\r\n int exitTimeTicker=0;\r\n int[] exitTimes = new int[islands];\r\n int[] exitPoints = new int[islands];\r\n for (int island=0; island<islands; island++) {\r\n int source;\r\n if (!visited01[island])\r\n {\r\n visited01[island]=true;\r\n stack.push(island);\r\n source=island;\r\n\r\n int destination=0;\r\n while (!stack.isEmpty())\r\n {\r\n source=stack.peek();\r\n destination=0;\r\n while (destination<islands)\r\n {\r\n if (graph[source][destination] && !visited01[destination])\r\n {\r\n stack.push(destination);\r\n visited01[destination]=true;\r\n source=destination;\r\n destination=0;\r\n }\r\n else {\r\n destination++;\r\n }\r\n }\r\n exitTimes[stack.peek()]=exitTimeTicker;\r\n exitPoints[exitTimeTicker]=stack.peek();\r\n stack.pop();\r\n exitTimeTicker++;\r\n }\r\n }\r\n }\r\n\r\n\r\n boolean graphTransposeUsingExits[][] = new boolean[islands][islands];\r\n for (int i=0; i<islands; i++)\r\n {\r\n for (int j=0; j<islands; j++)\r\n {\r\n if (graph[i][j])\r\n graphTransposeUsingExits[exitTimes[j]][exitTimes[i]]=true;\r\n }\r\n }\r\n\r\n\r\n //Second DFS\r\n boolean[] visited02 = new boolean[islands];\r\n int[] numberOfSCC = new int[islands];\r\n int currSCCnum=0;\r\n for (int exitTime=islands-1; exitTime>=0; exitTime--)\r\n {\r\n if (!visited02[exitTime])\r\n {\r\n //entryPointToScc=exitTime;\r\n visited02[exitTime]=true;\r\n numberOfSCC[exitPoints[exitTime]]=++currSCCnum;\r\n stack.push(exitTime);\r\n int source=exitTime;\r\n while (!stack.isEmpty())\r\n {\r\n source=stack.peek();\r\n int destination=0;\r\n while (destination<islands)\r\n {\r\n if (graphTransposeUsingExits[source][destination] && !visited02[destination])\r\n {\r\n if (numberOfSCC[exitPoints[destination]]==0) {\r\n numberOfSCC[exitPoints[destination]]=currSCCnum;\r\n }\r\n stack.push(destination);\r\n visited02[destination]=true;\r\n source=destination;\r\n destination=0;\r\n }\r\n else {\r\n destination++;\r\n } \r\n }\r\n stack.pop();\r\n } \r\n }\r\n }\r\n\r\n\r\n int[] sizeOfSCCs = new int[currSCCnum];\r\n for (int i=0; i<islands; i++) {\r\n sizeOfSCCs[numberOfSCC[i]-1]++;\r\n }\r\n \r\n int sccsMax = Integer.MIN_VALUE;\r\n for(int i=0; i<sizeOfSCCs.length; ++i) {\r\n \tif(sizeOfSCCs[i] > sccsMax) {\r\n \t\tsccsMax = sizeOfSCCs[i];\r\n \t}\r\n }\r\n return sccsMax;\r\n \r\n // Java 8\r\n //return Arrays.stream(sizeOfSCCs).summaryStatistics().getMax();\r\n }",
"private int dfs(TreeNode node, TreeNode target, int K, List<Integer> res) {\r\n if (node == null) return -1;\r\n\r\n if (node.val == target.val) {\r\n // add nodes from current subtree\r\n addNodes(node, K, res);\r\n return 0;\r\n }\r\n\r\n int left = dfs(node.left, target, K, res);\r\n int right = dfs(node.right, target, K, res);\r\n \r\n // at most one of left and right could be not -1\r\n if (right != -1) {\r\n // current node is k far from target\r\n if (K == right + 1) res.add(node.val);\r\n // target is in the right subtree, add nodes in left subtree\r\n else addNodes(node.left, K - right - 2, res);\r\n return right + 1;\r\n }\r\n\r\n if (left != -1) {\r\n // current node is k far from target\r\n if (K == left + 1) res.add(node.val);\r\n // target is in the left subtree, add nodes in right subtree\r\n else addNodes(node.right, K - left - 2, res);\r\n return left + 1;\r\n }\r\n\r\n // both left and right are - 1\r\n return -1;\r\n }",
"public DFS()\n {\n\n\n writeLock = lock.writeLock();\n readLock = lock.readLock();\n\n recoverINodes();\n\n createDir(\"/\"); // add a root if it does not exist .\n\n }",
"private void dfsVisit(Node node, MyArrayList<Node> component) {\n Stack<Node> stack = new Stack<Node>();\n Node v = node;\n // while there are still nodes in the stack to be processed\n while (v != null) {\n if (v.getColor() == Color.WHITE) {\n t++;\n v.setD(t);\n v.setColor(Color.GRAY);\n // when we turn a vertex gray, we add it to the current component\n component.add(v);\n // we push this to the stack again and when we reach a gray vertex in the stack,\n // we know that all of its children have been processed and we can assign a finishing time\n stack.push(v);\n for (int i = 0; i < v.getAdjacencyList().size(); i++) {\n Node u = v.getAdjacencyList().get(i);\n if (u.getColor() == Color.WHITE) {\n u.setParent(v);\n stack.push(u);\n }\n }\n } else if (v.getColor() == Color.GRAY){\n // if the node in the stack is already gray, then we know we have finished all of its children\n // and it can be turned black\n t++;\n v.setF(t);\n v.setColor(Color.BLACK);\n }\n v = stack.pop();\n }\n }",
"private ArrayList<Vertex> dfs(boolean[] visited, Vertex start, Vertex target) {\n \n //TEST VALUES: if start/end are out of bounds of array of vertices\n if (start.getID() < 0) {\n return null;\n }\n \n if (target.getID() > arrayOfVertices.length) {\n return null;\n }\n \n \n //base case: if start = target, return start vertex right there.\n if (start == target) {\n solution.add(0, start);\n return solution;\n }\n \n //has this vertex been visited before? yes? then just return. if no, \n if (visited[start.getID()]) {\n return null;\n }\n \n //since it hasn't been visited before, mark it as visited\n visited[start.getID()] = true;\n \n //does it have kids? no? return.\n if (start.getDegree() == 0) {\n return null;\n }\n \n //create ArrayList of adjacent vertices to the given start\n ArrayList<Vertex> adjacents = start.getAdjacent();\n \n //go through its edges, for loop. to go through edges\n for (int i = 0; i < start.getDegree(); i++) {\n \n //(from testing)\n NavigateMaze.advance(start.getID(), adjacents.get(i).getID());\n \n //do the dfs; if it's not equal to null \n //(i.e. we found the target, then add it to path\n if (dfs(visited, adjacents.get(i), target) != null) {\n //then add to path\n solution.add(0, start); \n return solution;\n }\n \n //(from testing)\n else {\n NavigateMaze.backtrack(adjacents.get(i).getID(), start.getID());\n }\n \n } \n \n //return null\n return null;\n }",
"void DFS(int v, boolean visited[]) {\n visited[v] = true;\n connected++;\n //LinkedList Iterator to Recursively traverse all adjacent nodes of v\n Iterator<Integer> itr = adj[v].listIterator();\n\n while(itr.hasNext()) {\n int x = itr.next();\n if(visited[x] == false)\n DFS(x,visited);\n }\n }",
"public void depthFirstTraverse() {\n\t\tInteger first = (Integer) edges.keySet().toArray()[0];\n\t\t// track whether vertex was visited\n\t\tHashMap<Integer, Boolean> visited = buildVisited();\n\t\tdepthFirstTraverse(first, visited);\n\t}",
"@Override\r\n\tpublic void DFS() {\r\n\t\tvertices.forEach((E e, Vertex<E> u) -> {\r\n\t\t\tu.setColor(Color.WHITE);\r\n\t\t\tu.setPredecessor(null);\r\n\t\t});\r\n\t\tDFStime = 0;\r\n\t\tvertices.forEach((E e, Vertex<E> u) -> {\r\n\t\t\tif(u.getColor() == Color.WHITE) {\r\n\t\t\t\tDFSVisit(u);\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"static void dfs(int u) { // DFS for normal usage: as graph traversal\r\n\t\t\t\t\t\t\t\t// algorithm\r\n\t\tSystem.out.printf(\" %d\", u); // this vertex is visited\r\n\t\tdfs_num[u] = DFS_BLACK; // important step: we mark this vertex as\r\n\t\t\t\t\t\t\t\t// visited\r\n\t\tfor (int j = 0; j < AdjList[u].size(); j++) {\r\n\t\t\tEdge v = AdjList[u].get(j); // v is a (neighbor,\r\n\t\t\t\t\t\t\t\t\t\t// weight) pair\r\n\t\t\tif (dfs_num[v.to] == DFS_WHITE) // important check to avoid\r\n\t\t\t\t\t\t\t\t\t\t\t// cycle\r\n\t\t\t\tdfs(v.to); // recursively visits unvisited neighbors v of\r\n\t\t\t\t\t\t\t// vertex u\r\n\t\t}\r\n\t}",
"ArrayList<Node> DFSRec_helper(Graph graph, final Node start, final Node end, boolean visited[] )\n {\n if ( start == end )\n {\n ArrayList<Node> path = new ArrayList<Node>();\n path.add(end);\n return path;\n }\n\n int numEdges = start.connectedNodes.size();\n for ( int i = 0; i < numEdges; i++ )\n {\n // Create a new array each loop and add the start node\n ArrayList<Node> path = new ArrayList<Node>();\n path.add(start);\n Node nodeToCheck = start.connectedNodes.get(i);\n\n if ( !visited[nodeToCheck.id] )\n {\n visited[nodeToCheck.id] = true;\n path.addAll(DFSRec_helper(graph, nodeToCheck, end, visited));\n }\n\n if ( path.get(path.size() - 1) == end )\n return path;\n \n // If the path doesnt contain 'end' then discard path, what was returned in recursive call\n }\n\n // return an empty array if path not found.\n ArrayList<Node> path = new ArrayList<Node>();\n\n return path;\n\n }",
"public void traverseStack(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // check if stack is empty\n if(this.topOfStack==-1){\n System.out.println(\"Stack is empty, can't traverse\");\n return;\n }\n // if stack is not empty\n System.out.println(\"Printing stack...\");\n for(int i=0;i<=this.topOfStack;i++){\n System.out.print(this.arr[i]+\" \");\n }\n System.out.println();\n }"
] |
[
"0.7618202",
"0.7465105",
"0.7401052",
"0.73732597",
"0.72783834",
"0.72646093",
"0.72376347",
"0.70273024",
"0.6973818",
"0.6937109",
"0.6930359",
"0.6876668",
"0.6847069",
"0.6843536",
"0.6840902",
"0.68324584",
"0.67743397",
"0.6673448",
"0.66522706",
"0.664073",
"0.6613326",
"0.66061515",
"0.65901077",
"0.65880215",
"0.657735",
"0.6574549",
"0.6566546",
"0.65470743",
"0.65247643",
"0.64795285",
"0.64722514",
"0.6461105",
"0.64556545",
"0.6454223",
"0.64224184",
"0.6420315",
"0.64113843",
"0.639409",
"0.63348526",
"0.633439",
"0.6328335",
"0.6319091",
"0.63161576",
"0.6315682",
"0.63143164",
"0.6310178",
"0.6297191",
"0.62862355",
"0.6278853",
"0.624461",
"0.62417316",
"0.62409616",
"0.62348676",
"0.62314206",
"0.62283725",
"0.61757684",
"0.61714715",
"0.6159515",
"0.61558974",
"0.61446726",
"0.61403453",
"0.61403155",
"0.61393994",
"0.6134075",
"0.6128968",
"0.61237144",
"0.6109427",
"0.61004055",
"0.6099087",
"0.6093816",
"0.6091971",
"0.6091182",
"0.60853744",
"0.6074658",
"0.60726464",
"0.6050189",
"0.6031585",
"0.6025838",
"0.6005902",
"0.60014117",
"0.5993553",
"0.5990825",
"0.59865683",
"0.59767187",
"0.59738296",
"0.5971227",
"0.5967747",
"0.59672344",
"0.5962422",
"0.5956138",
"0.5953369",
"0.59476346",
"0.5947196",
"0.59372354",
"0.59347564",
"0.59300184",
"0.5927257",
"0.59255475",
"0.59247935",
"0.5923848"
] |
0.6117889
|
66
|
TODO Autogenerated method stub
|
private void ini() {
mLinearLayoutpush = (LinearLayout)findViewById(R.id.mLinearLayoutpush);
mDialogText = (TextView)findViewById(R.id.mDialogText);
mDialogTitle = (TextView)findViewById(R.id.mDialogTitle);
mButtonpush = (Button)findViewById(R.id.mButtonpush);
mbtn_back = (ImageButton)findViewById(R.id.mbtn_back);
mLinearLayoutpush.setOnClickListener(this);
mDialogText.setOnClickListener(this);
mDialogTitle.setOnClickListener(this);
mButtonpush.setOnClickListener(this);
mbtn_back.setOnClickListener(this);
}
|
{
"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
|
/ Passes from date and to date search criteria.
|
public void passParameter(LodgementViewParamsBean params) {
LodgementViewParamsTO paramsTO = TypeConverters.BeanToTrasferObject(params,
LodgementViewParamsTO.class);
List<LodgementViewTO> lodgementViewTO =
WSManager.getInstance().getCaseManagementService().getLodgementView(paramsTO);
TypeConverters.TransferObjectListToBeanList(lodgementViewTO,
LodgementDealBean.class, (List) lodgementList);
List<LodgementTimingTO> lodgementTimingTO =
WSManager.getInstance().getCaseManagementService().getLodgementTiming(paramsTO);
TypeConverters.TransferObjectListToBeanList(lodgementTimingTO,
LodgementTimingBean.class, (List) lodgementTimingList);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void accept(SearchCriteriaVisitor visitor) throws Exception {\r\n visitor.visitDateCriteria(this);\r\n }",
"public void searchAvailability(Connection connection, String hotel_name, int branchID, java.sql.Date from, java.sql.Date to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT type, num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND date_from >= Convert(datetime, ?) AND date_to <= Convert(datetime, ?)\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n pStmt.setDate(3, from);\n pStmt.setDate(4, to);\n\n try {\n\n System.out.printf(\" Availiabilities at %S, branch ID (%d): \\n\", getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2) + \" \" + rs.getInt(3));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }",
"public int dateSearch(String o1_date, String o1_time, String o2_date, String o2_time) {\n\n int yearStartUser = Integer.valueOf(o1_date.substring(6));\n int monthStartUser = Integer.valueOf(o1_date.substring(3, 5));\n int dayStartUser = Integer.valueOf(o1_date.substring(0, 2));\n\n int yearEnd = Integer.valueOf(o2_date.substring(6));\n int monthEnd = Integer.valueOf(o2_date.substring(3, 5));\n int dayEnd = Integer.valueOf(o2_date.substring(0, 2));\n\n if (yearEnd > yearStartUser)\n return 1;\n if (yearEnd == yearStartUser && monthEnd > monthStartUser)\n return 1;\n if (yearEnd == yearStartUser && monthEnd == monthStartUser && dayEnd > dayStartUser)\n return 1;\n if (yearEnd == yearStartUser && monthEnd == monthStartUser && dayEnd == dayStartUser){\n if (o2_time.compareTo(o1_time)>0)return 1;\n if (o2_time.compareTo(o1_time)==0)return 0;\n\n }\n\n\n\n return -1;\n }",
"private void addDateRangeFiltering(Map params, String dateProperty, Date startDate, Date endDate) {\n\n\t\t// date range filter is enabled\n\t\tif (dateProperty != null) {\n\n\t\t\tparams.put(IReportDAO.DATE_COLUMN, dateProperty);\n\t\t\tString check = (String) params.get(IReportDAO.DATE_COLUMN);\n\t\t\tif (check.equalsIgnoreCase(\"lastModifiedTime\")) {\n\t\t\t\t// from date\n\t\t\t\tparams.put(IReportDAO.FROM_DATE, null);\n\t\t\t\t// to date\n\t\t\t\tparams.put(IReportDAO.TO_DATE, null);\n\t\t\t} else {\n\t\t\t\t// from date\n\t\t\t\tparams.put(IReportDAO.FROM_DATE, startDate);\n\t\t\t\t// to date\n\t\t\t\tparams.put(IReportDAO.TO_DATE, endDate);\n\t\t\t}\n\n\t\t}\n\t}",
"public void searchHotelReservations(Connection connection, String hotel_name, int branchID, LocalDate checkIn, LocalDate checkOut) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT c_id, res_num, check_in, check_out FROM Booking WHERE hotel_name = ? AND branch_ID = ? AND check_in >= to_date(?, 'YYYY-MM-DD') AND check_out <= to_date(?, 'YYYY-MM-DD')\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n\n if (checkIn == null && checkOut == null){\n pStmt.setString(3, LocalDate.parse(\"2000-01-01\").toString());\n pStmt.setString(4, LocalDate.parse(\"3000-01-01\").toString());\n }\n else if (checkIn == null){\n pStmt.setString(3, checkIn.toString());\n pStmt.setString(4, LocalDate.parse(\"3000-01-01\").toString());\n }\n else if (checkOut == null){\n pStmt.setString(3, LocalDate.parse(\"2000-01-01\").toString());\n pStmt.setString(4, checkOut.toString());\n }\n else {\n pStmt.setString(3, checkIn.toString());\n pStmt.setString(4, checkOut.toString());\n }\n\n try {\n\n System.out.printf(\" Reservations for %S, branch ID (%d): \\n\", getHotelName(), getBranchID());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(\" \" + rs.getString(1) + \" \" + rs.getInt(2));\n System.out.println(\" Reservation DATES: \" + rs.getDate(3) + \" TO \" + rs.getDate(4));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }",
"public void searchDjia(Date dt){\n\t\t//compare date entered to max()\n\t\tif(dt.compareTo(max) == 1){\n\t\t\tvalFound = dja.get(max);\n\t\t\tprintNoDataFound(dt, max);\n\t\t\tprintKeyVal(max, valFound);\n\t\t\treturn;\n\t\t}\n\t\t\t\n\t\t//compare date entered to min()\n\t\tif(dt.compareTo(min) == -1){\n\t\t\tvalFound = dja.get(min);\n\t\t\tprintNoDataFound(dt, min);\n\t\t\tprintKeyVal(min, valFound);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tvalFound = dja.get(dt);\n\t\t//confirm date return is not null\n\t\tif(valFound != null){\n\t\t\tprintKeyVal(dt, valFound);\n\t\t} else {\n\t\t\t//get the ceiling of the date\n\t\t\tdtFound = dja.ceiling(dt);\n\t\t\tvalFound = dja.get(dtFound);\n\t\t\tprintNoDataFound(dt, dtFound);\n\t\t\tprintKeyVal(dtFound, valFound);\n\t\t}\n\t}",
"public void selectSpecificDate(String dateFrom, String dateTo) {\r\n\r\n\t\tdriver.findElement(\r\n\t\t\t\tBy.xpath(\"//table[@class='calendar-table']//button[@class='calendar-button']/*[.='\" + dateFrom + \"']\"))\r\n\t\t\t\t.click();\r\n\r\n\t\tdriver.findElement(\r\n\t\t\t\tBy.xpath(\"//table[@class='calendar-table']//button[@class='calendar-button']/*[.='\" + dateTo + \"']\"))\r\n\t\t\t\t.click();\r\n\r\n\t}",
"@RequestMapping(value = \"/getEmployeesReportBetweenDates\", method = RequestMethod.POST)\r\n public @ResponseBody String getEmployeesReportBetweenDates(\r\n @RequestParam(\"fromDate\") String fromDate, @RequestParam(\"toDate\") String toDate) {\r\n logger.info(\"inside ReportGenerationController getEmployeesReportBetweenDates()\");\r\n\r\n return reportGenerationService.getEmployeesReportBetweenDates(new Date(Long.valueOf(fromDate)),\r\n new Date(Long.valueOf(toDate)));\r\n }",
"List<Map<String, Object>> betweenDateFind(String date1, String date2) throws ParseException;",
"public void searchAvailabilityType(Connection connection, String hotel_name, int branchID, String type, LocalDate from, LocalDate to) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT num_avail, price FROM Information WHERE hotel_name = ? AND branch_ID = ? AND type >= ? AND date_from <= to_date(?, 'YYYY-MM-DD') AND date_to = to_date(?, 'YYYY-MM-DD')\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branchID);\n pStmt.setInt(2, getBranchID());\n setType(type);\n pStmt.setString(3, getType());\n pStmt.setString(4, from.toString());\n pStmt.setString(5, to.toString());\n\n try {\n\n System.out.printf(\" Availabilities for %S type at %S, branch ID (%d): \\n\", getType(), getHotelName(), getBranchID());\n System.out.printf(\" Date Listing: \" + String.valueOf(from) + \" TO \" + String.valueOf(to) + \"\\n\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while(rs.next()) {\n System.out.println(rs.getInt(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }",
"@RequestMapping(value = \"/getReportByNameBetweenDates\", method = RequestMethod.POST)\r\n public @ResponseBody String getReportByNameDates(@RequestParam(\"employeeId\") String employeeId,\r\n @RequestParam(\"fromDate\") String fromDate, @RequestParam(\"toDate\") String toDate) {\r\n logger.info(\"inside ReportGenerationController getReportByNameDates()\");\r\n\r\n return reportGenerationService.getReportByNameDates(employeeId,\r\n new Date(Long.valueOf(fromDate)), new Date(Long.valueOf(toDate)));\r\n }",
"public void setDateBounds(PortfolioRecord portRecord, LocalDate fromDate, LocalDate toDate) {\n List<DataPoint> history = portRecord.getHistory();\n LocalDate minDate = history.get(0).getDate();\n LocalDate maxDate = history.get(history.size() - 1).getDate();\n\n if (fromDate != null && toDate != null && !(fromDate.equals(fromDateBound) && toDate.equals(toDateBound))) {\n userSetDates = true;\n\n if (fromDate.compareTo(minDate) < 0) {\n fromDateBound = minDate;\n } else {\n fromDateBound = fromDate;\n }\n\n if (toDate.compareTo(maxDate) > 0) {\n toDateBound = maxDate;\n } else {\n toDateBound = toDate;\n }\n\n updatePerformanceGraph(true, portRecord);\n }\n }",
"public void testQueryDateRange() throws Exception {\n //db.expense.find({ date: { $gte:ISODate(\"2018-02-19T14:00:00Z\"), $lt: ISODate(\"2018-03-19T20:00:00Z\") } })\n /*BasicQuery query = new BasicQuery(\"{ date: { $gte:ISODate(\\\"2018-02-19T14:00:00Z\\\"), $lt: ISODate(\\\"2018-02-27T20:00:00Z\\\") } }\");\n List<Expense> expenses = mongoOperation.find(query, Expense.class);\n\n for(Expense e: expenses){\n System.out.println(e.toString());\n }*/\n // query.addCriteria(Criteria.where(\"age\").lt(50).gt(20));\n //List<User> users = mongoTemplate.find(query,User.class);\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n Date d1 = sdf.parse(\"01/01/2018\");\n Date d2 = sdf.parse(\"01/02/2018\");\n\n\n List<Expense> expenses = expenseRepository.findByDateBetween(d1, d2);\n\n for (Expense e : expenses) {\n System.out.println(e.toString());\n }\n\n }",
"public void generalSearch(Connection connection, LocalDate check_in, LocalDate check_out, int party_size, String city) throws SQLException {\n\n String sql = \"SELECT I.hotel_name, I.branch_ID, I.type, I.price FROM INFORMATION I, ROOM R, HOTEL_ADDRESS HA WHERE R.capacity >= ? AND HA.city = ? AND I.date_from >= to_date(?, 'YYYY-MM-DD') AND I.date_from <= to_date(?,'YYYY-MM-DD') GROUP BY I.date_from, I.date_to HAVING I.num_avail > 0\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setPartySize(party_size);\n pStmt.setInt(1, getPartySize());\n setCity(city);\n pStmt.setString(2, getCity());\n pStmt.setString(3, check_in.toString());\n pStmt.setString(4, check_out.toString());\n\n ResultSet rs = null;\n\n try {\n\n System.out.printf(\" Hotels available: \");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2) + \" \" + rs.getString(3) + \" \" + rs.getInt(4));\n }\n }\n catch (SQLException e) { e.printStackTrace(); }\n finally {\n pStmt.close();\n if (rs != null){\n rs.close();\n }\n }\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString resultString = sqlHelper.searchDate(company_nameString\n\t\t\t\t\t\t, Long.valueOf(numberEditText.getText().toString()));\n\t\t\t\n\t\t\t\tToast.makeText(getApplicationContext(), \"检定日期为\" + resultString, Toast.LENGTH_LONG).show();\n\t\t\t}",
"@RequestMapping(value = \"/getReportByIdFromDateToDate\", method = RequestMethod.GET)\r\n public @ResponseBody String getReportByIdFromDateToDate(\r\n @RequestParam(\"employeeId\") int employeeId, @RequestParam(\"fromDate\") String fromDate,\r\n @RequestParam(\"toDate\") String toDate) {\r\n logger.info(\"inside ReportGenerationController getReportByIdFromDateToDate()\");\r\n\r\n return reportGenerationService.getEmployeeWorkingDetailsByDates(employeeId,\r\n new Date(Long.valueOf(fromDate)), new Date(Long.valueOf(toDate)));\r\n }",
"public List findByDate( String queryDeadline );",
"public void showBookingsByDates(JTextArea output, Date fromDate, Date toDate)\r\n {\r\n output.setText(\"Bookinger mellom \" \r\n + (DateFormat.getDateInstance(DateFormat.MEDIUM).format(fromDate)) \r\n + \" og \" + (DateFormat.getDateInstance(DateFormat.MEDIUM).format(toDate)) + \"\\n\\n\");\r\n \r\n Iterator<Booking> iter = bookings.iterator();\r\n \r\n while(iter.hasNext())\r\n {\r\n Booking booking = iter.next();\r\n \r\n if((booking.getToDate().compareTo(toDate) >= 0 &&\r\n booking.getFromDate().compareTo(fromDate) <= 0) ||\r\n (booking.getToDate().compareTo(toDate) <= 0) && \r\n booking.getFromDate().compareTo(fromDate) >= 0)\r\n {\r\n output.append(booking.toString() \r\n + \"\\n*******************************************************\\n\");\r\n }//End of if\r\n }// End of while\r\n }",
"private String buildQuery(final String projectId, final Date date,\r\n\t\t\tfinal State from, final State to) {\r\n\r\n\t\treturn from.equals(to) ? buildReflexiveStateQuery(projectId, date, from)\r\n\t\t\t\t: buildFromToStateQuery(projectId, date, from, to);\r\n\t}",
"public List<Campsite> findCampsitesByReservationDate(long campground_id, LocalDate from_date,LocalDate to_date);",
"public void searchByRangeDate(long firstDate, long secondDate, final int limit) throws IOException {\n final IndexSearcher indexSearcher = new IndexSearcher(reader);\n\n Query q = NumericRangeQuery.newLongRange(\"creationDate\", secondDate, firstDate, true, true);\n System.out.println(\"Type of query: \" + q.getClass().getSimpleName());\n\n final TopDocs search = indexSearcher.search(q, limit);\n final ScoreDoc[] hits = search.scoreDocs;\n showHits(hits);\n }",
"boolean isFilterByDate();",
"@Override\n\t\tprotected void onActivityResult(int requestCode, int resultCode, Intent data)\n\t\t{\n\t\t\tLog.i(TAG, \"onActivityResult()\");\n\n\t\t\tString str = \"Req: \"+requestCode+\",\"+\" Res: \"+resultCode+\",\"+\" data: \"+data;\n\t\t\tLog.e(\"Result from SearchActivity: \", str);\n\n\t\t\tString findKey = null;\n\t\t\tString findValue = null;\n\t\t\tlong lDate = 0;\n\t\t\t\n\t\t\tif (resultCode == RESULT_OK) {\n\t\t\t\tif (requestCode == Constants.FIND_REQ) {\n\t\t\t\t\tfindKey = data.getStringExtra(Constants.FIND_KEY);\n\t\t\t\t\tfindValue = data.getStringExtra(Constants.FIND_VALUE);\n\t\t\t\t\tLog.v(TAG, \"Search result: key: \"+ findKey +\" value: \"+ findValue );\n\t\t\t\t}\n\n\t\t\t\tif (findKey.compareTo(Constants.EVENT_DATE) == 0) {\n\t\t\t\t\tlDate = data.getLongExtra(\"long_date\", 0);\n\t\t\t\t\tLog.v(TAG, \"Search result: key: \"+ findKey + \" value: \" + lDate );\n\t\t\t\t\t}\n\t\t\t\telse //---not a date ---//\n\t\t\t\t\t{\n\t\t\t\t\t\t// yet another ?? code \n\t\t\t\t\t\tLog.v(TAG, \"Criteria returned, key:\" + findKey + \" value: \" + findValue );\n\t\t\t\t\t}\n\t\t\t\t\t//--- end Find Date or Keyword ---//\t\n\n\t\t\t\tList<BELEvent> findEventsList1 = null;\t//from getfindlist in EBMainActivity (current or saved)\n\t\t\t\tfindEventsList1 = new ArrayList<BELEvent>(eventsListFind);// = m_webEventsList);\n\t\t\t\tCollections.copy(findEventsList1, eventsListFind); \t// no need: after construct w/collection copy is already made\n\n\t\t\t\tFindHandler fH = new FindHandlerImpl(this, m_mainAppScreen);\n\t\t\t\tVector<BELEvent> findEventsList2 = new Vector<BELEvent> ( findEventsList1 );\n\t\t\t\t// Pass the result back down the line.\n\n\t\t\t\t// JGB - Ticket # 86 : Date search fails to return valid events\n\t\t\t\tif (lDate == 0)\n\t\t\t\t\teventsListResult = fH.doFind( findEventsList2, findKey, findValue);\n\t\t\t\telse\n\t\t\t\t\teventsListResult = fH.doFind( findEventsList2, lDate );\n\t\t\t\t//eventsListResult = fH.doFind( findEventsList2, findKey, findValue);\n\n\t\t\t\tm_mainAppScreen.setEventList(eventsListResult, \"Search Result\");\n\t\t\t\tstr = \"Found \" + eventsListResult.size();\n\t\t\t\tLog.e(\"Search result\", str);\n\t\t\t\tMakeToast.makeToast(this, str, MakeToast.LEVEL_USER);\n\n\t\t\t\tm_statusView = (TextView) (m_mainAppView.findViewById(R.id.status_line));\n\t\t\t\tm_statusView.setText(str);\n\n\t\t\t\tsetResult( RESULT_OK ); \n\t\t\t\t}\t// RESULT_OK\n\t\t\t\telse { //--- not RESULT_OK --- \n\t\t\t\t// failed to return Find criteria\n\t\t\t\tLog.i(TAG, \"Unknown Find Criteria\");\n\t\t\t\tsetResult( RESULT_CANCELED ); \n\t\t\t\t}\n\n\t\t}",
"public Flowable<List<Transaction>> searchTransactionWithDate(int day, int month, int year,\n int isDailyOrMonthlyOrYearly) {\n\n return getData(Transaction.class, query -> {\n if (isDailyOrMonthlyOrYearly == 2) {\n query.beginsWith(\"date\", year + \"-\");\n } else if (isDailyOrMonthlyOrYearly == 1) {\n query.beginsWith(\"date\", String.format(Locale.ENGLISH, \"%d-%02d\", year, month));\n } else if (isDailyOrMonthlyOrYearly == 0) {\n query.equalTo(\"date\", String.format(Locale.ENGLISH, \"%d-%02d-%02d\", year, month, day));\n }\n return query.findAll();\n });\n }",
"private void advancedSearch(StringBuilder consult,\r\n\t\t\tList<SelectItem> parameters, ResourceBundle bundle,\r\n\t\t\tStringBuilder unionMessagesSearch) {\r\n\r\n\t\tif (this.startDateReport != null && this.endDateReport != null) {\r\n\t\t\tconsult.append(\"WHERE p.dateRecord BETWEEN :startDateReport AND :endDateReport \");\r\n\t\t\tif (this.startDateReport != null) {\r\n\t\t\t\tDate date = ControladorFechas.diaInicialSemana(startDateReport);\r\n\t\t\t\tSelectItem item = new SelectItem(date, \"startDateReport\");\r\n\t\t\t\tparameters.add(item);\r\n\t\t\t\tString dateFrom = bundle.getString(\"label_start_date\")\r\n\t\t\t\t\t\t+ \": \"\r\n\t\t\t\t\t\t+ '\"'\r\n\t\t\t\t\t\t+ ControladorFechas.formatDate(date,\r\n\t\t\t\t\t\t\t\tConstantes.DATE_FORMAT_MESSAGE_SIMPLE) + '\"'\r\n\t\t\t\t\t\t+ \" \";\r\n\t\t\t\tunionMessagesSearch.append(dateFrom);\r\n\t\t\t}\r\n\t\t\tif (this.endDateReport != null) {\r\n\t\t\t\tDate date = ControladorFechas.diaFinalSemana(endDateReport);\r\n\t\t\t\tyear = ControladorFechas.getYear(ControladorFechas\r\n\t\t\t\t\t\t.diaInicialSemana(endDateReport));\r\n\t\t\t\tSelectItem item2 = new SelectItem(date, \"endDateReport\");\r\n\t\t\t\tparameters.add(item2);\r\n\t\t\t\tString dateTo = bundle.getString(\"label_end_date\")\r\n\t\t\t\t\t\t+ \": \"\r\n\t\t\t\t\t\t+ '\"'\r\n\t\t\t\t\t\t+ ControladorFechas.formatDate(date,\r\n\t\t\t\t\t\t\t\tConstantes.DATE_FORMAT_MESSAGE_SIMPLE) + '\"'\r\n\t\t\t\t\t\t+ \" \";\r\n\t\t\t\tunionMessagesSearch.append(dateTo);\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tconsult.append(\"WHERE p.dateRecord BETWEEN :initialDateSearch AND :finalDateSearch \");\r\n\r\n\t\t\tif (this.initialDateSearch != null) {\r\n\t\t\t\tDate date = ControladorFechas\r\n\t\t\t\t\t\t.diaInicialSemana(initialDateSearch);\r\n\t\t\t\tSelectItem item = new SelectItem(date, \"initialDateSearch\");\r\n\t\t\t\tparameters.add(item);\r\n\t\t\t\tString dateFrom = bundle.getString(\"label_start_date\")\r\n\t\t\t\t\t\t+ \": \"\r\n\t\t\t\t\t\t+ '\"'\r\n\t\t\t\t\t\t+ ControladorFechas.formatDate(date,\r\n\t\t\t\t\t\t\t\tConstantes.DATE_FORMAT_MESSAGE_SIMPLE) + '\"'\r\n\t\t\t\t\t\t+ \" \";\r\n\t\t\t\tunionMessagesSearch.append(dateFrom);\r\n\t\t\t} else {\r\n\t\t\t\tDate date = new Date();\r\n\t\t\t\tif (this.finalDateSearch != null) {\r\n\t\t\t\t\tdate = ControladorFechas.diaInicialSemana(finalDateSearch);\r\n\t\t\t\t}\r\n\t\t\t\tdate = calculateRangeDate(date, false);\r\n\t\t\t\tSelectItem item = new SelectItem(date, \"initialDateSearch\");\r\n\t\t\t\tparameters.add(item);\r\n\t\t\t}\r\n\t\t\tif (this.finalDateSearch != null) {\r\n\t\t\t\tDate date = ControladorFechas.diaFinalSemana(finalDateSearch);\r\n\t\t\t\tyear = ControladorFechas.getYear(ControladorFechas\r\n\t\t\t\t\t\t.diaInicialSemana(finalDateSearch));\r\n\t\t\t\tSelectItem item2 = new SelectItem(date, \"finalDateSearch\");\r\n\t\t\t\tparameters.add(item2);\r\n\t\t\t\tString dateTo = bundle.getString(\"label_end_date\")\r\n\t\t\t\t\t\t+ \": \"\r\n\t\t\t\t\t\t+ '\"'\r\n\t\t\t\t\t\t+ ControladorFechas.formatDate(date,\r\n\t\t\t\t\t\t\t\tConstantes.DATE_FORMAT_MESSAGE_SIMPLE) + '\"'\r\n\t\t\t\t\t\t+ \" \";\r\n\t\t\t\tunionMessagesSearch.append(dateTo);\r\n\t\t\t} else {\r\n\t\t\t\tSelectItem item2 = new SelectItem(maxDate, \"finalDateSearch\");\r\n\t\t\t\tparameters.add(item2);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static String genDateConstraint(String strFieldName, String strFromDate, String strToDate) {\r\n StringBuffer sbTemp = new StringBuffer();\r\n if (strFromDate != null) {\r\n if (strFromDate.trim().length() > 0) {\r\n sbTemp.append(\" AND \").append(strFieldName)\r\n .append(\">=TO_DATE('\")\r\n .append(strFromDate).append(\"','\")\r\n .append(NCMS.SQL_DATE_FORMAT_EXT)\r\n .append(\"')\");\r\n }\r\n }\r\n if (strToDate != null) {\r\n if (strToDate.trim().length() > 0) {\r\n // [To Date] means that end of this date e.g time is 23:59:59\r\n sbTemp.append(\" AND \")\r\n .append(strFieldName).append(\"<=TO_DATE('\")\r\n// .append(strToDate).append(\" 23:59:59\").append(\"','\")\r\n// .append(NCMS.SQL_DATE_FORMAT_FULL)\r\n// .append(\"')\");\r\n .append(strToDate).append(\" 23:59:59\").append(\"','DD-MON-YY HH24:MI:SS')\");\r\n }\r\n }\r\n return sbTemp.toString();\r\n }",
"@Override\n\tpublic void search() {\n\n\t\tif (firstMonth.equalsIgnoreCase(secondMonth)) {\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(\n\t\t\t\t\t\t\t\"please choose different months to compare\"));\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\n\t\t\tString queury = \"SELECT nvl(TO_CHAR(INVOICES.INVOICE_ORDER) ,'NA') AS INVOICE_ORDER \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.INVOICE_NUMBER ,'NA') AS INVOICE_NUMBER \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.BOOKING_FILE_NUMBER ,'NA') AS BOOKING_FILE_NUMBER \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.DEPARTURE_DATE, 'dd/mm/yyyy') ,'NA') AS DEPARTURE_DATE \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.ARRIVAL_DATE, 'dd/mm/yyyy') ,'NA') AS ARRIVAL_DATE \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.EMPLOYEE_ID ,'NA') AS EMPLOYEE_ID \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.COST_CENTER ,'NA') AS COST_CENTER \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.COST_CENTER_DEPARTMENT ,'NA') AS COST_CENTER_DEPARTMENT \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.PASSENGER_NAME ,'NA') AS PASSENGER_NAME \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.SERVICE_TYPE ,'NA') AS SERVICE_TYPE \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.SERVICE_DESC ,'NA') AS SERVICE_DESC \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.ROUTING ,'NA') AS ROUTING \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.INTER_DOM ,'NA') AS INTER_DOM \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.CHECK_IN, 'dd/mm/yyyy') ,'NA') AS CHECK_IN \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.CHECK_OUT, 'dd/mm/yyyy') ,'NA') AS CHECK_OUT \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.NUMBER_OF_NIGHTS) ,0) AS NUMBER_OF_NIGHTS \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.NUMBER_OF_ROOMS) ,0) AS NUMBER_OF_ROOMS \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.AIRLINE ,'NA') AS AIRLINE \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.ROOM_TYPE ,'NA') AS ROOM_TYPE \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.SUPPLIER_NAME ,'NA') AS SUPPLIER_NAME \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.NET_AMOUNT ,0) AS NET_AMOUNT \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.OPERATION_FEES ,0) AS OPERATION_FEES \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.TOTAL_AMOUNT ,0) AS TOTAL_AMOUNT \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.TICKET_NO ,'NA') AS TICKET_NO \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.TRAVEL_FORM_NUMBER ,'NA') AS TRAVEL_FORM_NUMBER \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.DESCRIPTION ,'NA') AS DESCRIPTION \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.FROM_DATE, 'dd/mm/yyyy') ,'NA') AS FROM_DATE \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.TO_DATE, 'dd/mm/yyyy') ,'NA') AS TO_DATE \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.EMPLOYEE_DEPARTMENT ,'NA') AS EMPLOYEE_DEPARTMENT \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.INVOICE_DATE, 'dd/mm/yyyy') ,'NA') AS INVOICE_DATE \\n\"\n\t\t\t\t\t+ \" ,nvl(UPLOADED_INVOICE_FILE.INVOICES_MONTH ,'NA') AS INVOICES_MONTH \\n\"\n\t\t\t\t\t+ \" FROM INVOICES INNER JOIN UPLOADED_INVOICE_FILE \\n\"\n\t\t\t\t\t+ \" ON INVOICES.UPLOADED_INVOICE_FILE_ID = UPLOADED_INVOICE_FILE.ID \\n\"\n\t\t\t\t\t+ \" WHERE UPLOADED_INVOICE_FILE.INVOICES_MONTH IN ('\"\n\t\t\t\t\t+ firstMonth\n\t\t\t\t\t+ \"','\"\n\t\t\t\t\t+ secondMonth\n\t\t\t\t\t+ \"') \\n\"\n\t\t\t\t\t+ \" ORDER BY UPLOADED_INVOICE_FILE.INVOICES_MONTH,INVOICES.INVOICE_ORDER \\n\";\n\n\t\t\tdynamicReport = new GenerateDynamicReport();\n\t\t\tdynamicReport.setReportName(\"InvoicesComparisonReport\");\n\t\t\tdynamicReport.setReportTitle(\"Invoices Comparison Report\");\n\t\t\tdynamicReport.setReportQuery(queury);\n\n\t\t\tdynamicReport.columnsNames.add(\"Invoice Order\");\n\t\t\tdynamicReport.columnsNames.add(\"Invoice Number\");\n\t\t\tdynamicReport.columnsNames.add(\"Booking File Number\");\n\t\t\tdynamicReport.columnsNames.add(\"Departure Date\");\n\t\t\tdynamicReport.columnsNames.add(\"Arrival Date\");\n\t\t\tdynamicReport.columnsNames.add(\"Employee Id\");\n\t\t\tdynamicReport.columnsNames.add(\"Cost Center\");\n\t\t\tdynamicReport.columnsNames.add(\"Cost Center Department\");\n\t\t\tdynamicReport.columnsNames.add(\"Passenger Name\");\n\t\t\tdynamicReport.columnsNames.add(\"Service Type\");\n\t\t\tdynamicReport.columnsNames.add(\"Service Description\");\n\t\t\tdynamicReport.columnsNames.add(\"Routing\");\n\t\t\tdynamicReport.columnsNames.add(\"Int'l / Dom\");\n\t\t\tdynamicReport.columnsNames.add(\"Check In\");\n\t\t\tdynamicReport.columnsNames.add(\"Check Out\");\n\t\t\tdynamicReport.columnsNames.add(\"Number of Nights\");\n\t\t\tdynamicReport.columnsNames.add(\"Number of Rooms\");\n\t\t\tdynamicReport.columnsNames.add(\"Airline\");\n\t\t\tdynamicReport.columnsNames.add(\"Room Type\");\n\t\t\tdynamicReport.columnsNames.add(\"Supplier Name\");\n\t\t\tdynamicReport.columnsNames.add(\"Net Amount\");\n\t\t\tdynamicReport.columnsNames.add(\"Operation Fees\");\n\t\t\tdynamicReport.columnsNames.add(\"Total Amount\");\n\t\t\tdynamicReport.columnsNames.add(\"Ticket No\");\n\t\t\tdynamicReport.columnsNames.add(\"Travel Form Number\");\n\t\t\tdynamicReport.columnsNames.add(\"Description\");\n\t\t\tdynamicReport.columnsNames.add(\"From Date\");\n\t\t\tdynamicReport.columnsNames.add(\"To Date\");\n\t\t\tdynamicReport.columnsNames.add(\"Employee Department\");\n\t\t\tdynamicReport.columnsNames.add(\"Invoice Date\");\n\t\t\tdynamicReport.columnsNames.add(\"Invoices Month\");\n\n\t\t\tdynamicReport.fieldsNames.add(\"INVOICE_ORDER\");\n\t\t\tdynamicReport.fieldsNames.add(\"INVOICE_NUMBER\");\n\t\t\tdynamicReport.fieldsNames.add(\"BOOKING_FILE_NUMBER\");\n\t\t\tdynamicReport.fieldsNames.add(\"DEPARTURE_DATE\");\n\t\t\tdynamicReport.fieldsNames.add(\"ARRIVAL_DATE\");\n\t\t\tdynamicReport.fieldsNames.add(\"EMPLOYEE_ID\");\n\t\t\tdynamicReport.fieldsNames.add(\"COST_CENTER\");\n\t\t\tdynamicReport.fieldsNames.add(\"COST_CENTER_DEPARTMENT\");\n\t\t\tdynamicReport.fieldsNames.add(\"PASSENGER_NAME\");\n\t\t\tdynamicReport.fieldsNames.add(\"SERVICE_TYPE\");\n\t\t\tdynamicReport.fieldsNames.add(\"SERVICE_DESC\");\n\t\t\tdynamicReport.fieldsNames.add(\"ROUTING\");\n\t\t\tdynamicReport.fieldsNames.add(\"INTER_DOM\");\n\t\t\tdynamicReport.fieldsNames.add(\"CHECK_IN\");\n\t\t\tdynamicReport.fieldsNames.add(\"CHECK_OUT\");\n\t\t\tdynamicReport.fieldsNames.add(\"NUMBER_OF_NIGHTS\");\n\t\t\tdynamicReport.fieldsNames.add(\"NUMBER_OF_ROOMS\");\n\t\t\tdynamicReport.fieldsNames.add(\"AIRLINE\");\n\t\t\tdynamicReport.fieldsNames.add(\"ROOM_TYPE\");\n\t\t\tdynamicReport.fieldsNames.add(\"SUPPLIER_NAME\");\n\t\t\tdynamicReport.fieldsNames.add(\"NET_AMOUNT\");\n\t\t\tdynamicReport.fieldsNames.add(\"OPERATION_FEES\");\n\t\t\tdynamicReport.fieldsNames.add(\"TOTAL_AMOUNT\");\n\t\t\tdynamicReport.fieldsNames.add(\"TICKET_NO\");\n\t\t\tdynamicReport.fieldsNames.add(\"TRAVEL_FORM_NUMBER\");\n\t\t\tdynamicReport.fieldsNames.add(\"DESCRIPTION\");\n\t\t\tdynamicReport.fieldsNames.add(\"FROM_DATE\");\n\t\t\tdynamicReport.fieldsNames.add(\"TO_DATE\");\n\t\t\tdynamicReport.fieldsNames.add(\"EMPLOYEE_DEPARTMENT\");\n\t\t\tdynamicReport.fieldsNames.add(\"INVOICE_DATE\");\n\t\t\tdynamicReport.fieldsNames.add(\"INVOICES_MONTH\");\n\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.DOUBLE.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.DOUBLE.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.DOUBLE.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\n\t\t\tString reportPath = dynamicReport.exportDynamicReportToExcel();\n\t\t\tgetDownloadableReportFile(reportPath);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"List<LocalDate> getAvailableDates(@Future LocalDate from, @Future LocalDate to);",
"private boolean checkdates(java.util.Date date,java.util.Date date2)\n\t{\n\t\tif (date==null||date2==null) return true;\n\t\tif (!date.after(date2)&&!date.before(date2))return true;\n\t\treturn date.before(date2);\n\t}",
"public static void goTo() {\n\t\tMONTHS[] arrayOfMonths = MONTHS.values();\n\t\tLONGDAYS[] arrayOfLongDays = LONGDAYS.values();\n\t\tScanner sc = new Scanner(System.in);\n\t\tString date = \"\";\n\t\tSystem.out.println(\"Enter a date on MM/DD/YYYY format: \");\n\t\tif (sc.hasNextLine()) {\n\t\t\tdate = sc.nextLine().toLowerCase();\n\t\t}\n\t\tint month = Integer.parseInt(date.substring(0, 2));\n\t\tint day = Integer.parseInt(date.substring(3, 5));\n\t\tint year = Integer.parseInt(date.substring(6, 10));\n\t\tGregorianCalendar toDisplay = new GregorianCalendar(year, month, day);\n\t\tString value = getValues(toDisplay);\n\t\tif (value != \"\") {\n\t\t\tSystem.out.println(value);\n\t\t} else {\n\t\t\tSystem.out.println(\"There are no events at this day\");\n\t\t}\n\t}",
"@Query(\"select dailyReservation from DailyReservation dailyReservation where dailyReservation.date between :startDate and :endDate\")\n List<DailyReservation> findAllDailyReservation(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate );",
"private void checkDateBounds(PortfolioRecord portRecord) {\n List<DataPoint> history = portRecord.getHistory();\n\n if (!userSetDates) {\n fromDateBound = null;\n toDateBound = null;\n }\n\n if (history.size() > 0) {\n LocalDate minDate = history.get(0).getDate();\n LocalDate maxDate = history.get(history.size() - 1).getDate();\n\n if (fromDateBound == null && toDateBound == null) {\n fromDateBound = minDate;\n toDateBound = maxDate;\n } else if (toDateBound.compareTo(maxDate) < 0) {\n toDateBound = maxDate;\n }\n } else {\n fromDateBound = null;\n toDateBound = null;\n userSetDates = false;\n }\n }",
"public List<Timetable> getListSearch(String from, String to) throws Exception;",
"private ArticleSearchQuery.SearchCriterion parseDateRange(String dateRangeParam, LocalDate startDate, LocalDate endDate) {\n ArticleSearchQuery.SearchCriterion dateRange = ArticleSearchQuery.SolrEnumeratedDateRange.ALL_TIME;\n if (!Strings.isNullOrEmpty(dateRangeParam)) {\n dateRange = ArticleSearchQuery.SolrEnumeratedDateRange.valueOf(dateRangeParam);\n } else if (startDate != null && endDate != null) {\n dateRange = new ArticleSearchQuery.SolrExplicitDateRange(\"explicit date range\",\n startDate.toString(), endDate.toString());\n }\n return dateRange;\n }",
"void onClickDateRange();",
"@Query(value = FIND_BOOKED_DATES)\n\tpublic List<BookingDate> getBooking(Date startDate, Date endDate);",
"public List<String> getAccountBetweenDate(String first_date, String second_date) throws Exception{\n Session session= sessionFactory.getCurrentSession();\n List<String> accountList= session.createQuery(\"select account_no from Account where date(opening_date) BETWEEN '\"+first_date+\"' AND '\"+second_date+\"'\",String.class).list();\n return AccountDto.AccountBtwDate(accountList);\n }",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) { todo:\n // let tmp = after set stop time\n // if tmp time < start time, do nothing.\n //\n Calendar tmp = Calendar.getInstance();\n tmp.set(year, monthOfYear, dayOfMonth, EventListFragment.this.mStopSearchCalendar.get(Calendar.HOUR_OF_DAY), EventListFragment.this\n .mStopSearchCalendar.get(Calendar.MINUTE), 0);\n\n if (tmp.after(EventListFragment.this.mStartSearchCalendar) || tmp.equals(EventListFragment.this.mStartSearchCalendar)) {\n\n EventListFragment.this.mStopSearchCalendar.set(year, monthOfYear, dayOfMonth, EventListFragment.this.mStopSearchCalendar.get\n (Calendar.HOUR_OF_DAY), EventListFragment.this.mStopSearchCalendar.get(Calendar.MINUTE), 0);\n\n btnStopDate.setText(dateFormat.format(EventListFragment.this.mStopSearchCalendar.getTime()));\n\n }\n }",
"private void buildQueryFilterTemporal(String dateField,\n String startDate,\n String endDate,\n boolean isDatesContainedChecked,\n String namedTimescale, \n String namedTimescaleQueryType,\n TermsList termsList\n ) \n \t\tthrows UnsupportedEncodingException {\n\t boolean endDateSpecified = false;\n\t boolean startDateSpecified = false;\n\t \n /* If the user specified a named time-scale query, search for it\n * in the \"timescale\" field.\n */\n if ((namedTimescale != null) && (!(namedTimescale.equals(\"\")))) {\n termsList.addTerm(namedTimescale);\n String parenthesizedValue = parenthesizeQueryValue(namedTimescale);\n String escapedValue = Search.escapeQueryChars(parenthesizedValue);\n String encodedValue = URLEncoder.encode(escapedValue, \"UTF-8\");\n String timescaleQuery = String.format(\"timescale:%s\", encodedValue);\n updateQString(timescaleQuery);\n }\n \n if ((startDate == null) || (startDate.equals(\"\"))) {\n \tstartDate = \"*\";\n }\n else {\n startDate = ISO8601Utility.formatTimestamp(startDate, \"DAY\");\n if (startDate != null) startDateSpecified = true;\n }\n\n if ((endDate == null) || (endDate.equals(\"\"))) {\n \tendDate = \"NOW\";\n }\n else {\n \tendDate = ISO8601Utility.formatTimestamp(endDate, \"DAY\");\n \tif (endDate != null) endDateSpecified = true;\n }\n\n validateDateRange(startDate, endDate);\n \n // If a start date or an end date was specified, search temporal coverage\n //\n if (startDateSpecified || endDateSpecified) {\n \tString temporalFilter = null;\n \tString collectionFilter = null;\n \tString pubDateFilter = null;\n \tString LEFT_BRACKET = \"%5B\";\n \tString RIGHT_BRACKET = \"%5D\";\n\n if (dateField.equals(\"ALL\") || dateField.equals(\"COLLECTION\")) {\n \t String singleDateQuery = String.format(\"singledate:%s%s+TO+%s%s\", LEFT_BRACKET, startDate, endDate, RIGHT_BRACKET);\n \t String startDateQuery = String.format(\"begindate:%s*+TO+%s%s\", LEFT_BRACKET, endDate, RIGHT_BRACKET);\n \t String endDateQuery = String.format(\"enddate:%s%s+TO+NOW%s\", LEFT_BRACKET, startDate, RIGHT_BRACKET);\n \t collectionFilter = String.format(\"(%s+OR+(%s+AND+%s))\", singleDateQuery, startDateQuery, endDateQuery);\n }\n \n if (dateField.equals(\"ALL\") || dateField.equals(\"PUBLICATION\")) {\n \t pubDateFilter = String.format(\"pubdate:%s%s+TO+%s%s\", LEFT_BRACKET, startDate, endDate, RIGHT_BRACKET);\n }\n \n if (dateField.equals(\"ALL\")) {\n \t temporalFilter = String.format(\"(%s+OR+%s)\", pubDateFilter, collectionFilter);\n }\n else if (dateField.equals(\"COLLECTION\")) {\n \t temporalFilter = collectionFilter;\n }\n else if (dateField.equals(\"PUBLICATION\")) {\n \t temporalFilter = pubDateFilter;\n }\n \n updateFQString(temporalFilter); \n }\n\n }",
"private void search() {\n if (dateFind.getValue() == null) {\n dateFind.setValue(LocalDate.now().minusDays(DEFAULT_PERIOD));\n }\n Long days = ChronoUnit.DAYS.between(dateFind.getValue(), LocalDate.now());\n final List<Project> findProject = ServiceFactory.getProjectService().getFindProject(days, comboProject.getValue());\n observableProjects.clear();\n observableProjects.addAll(findProject);\n table.setItems(observableProjects);\n }",
"public void setValidFrom(Date validFrom);",
"public List<Reservation>reporteFechas(String date1, String date2){\n\n\t\t\tSimpleDateFormat parser = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\tDate dateOne = new Date();\n\t\t\tDate dateTwo = new Date();\n\n\t\t\ttry {\n\t\t\t\tdateOne = parser.parse(date1);\n\t\t\t\tdateTwo = parser.parse(date2);\n\t\t\t} catch (ParseException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif(dateOne.before(dateTwo)){\n\t\t\t\treturn repositoryR.reporteFechas(dateOne, dateTwo);\n\t\t\t}else{\n\t\t\t\treturn new ArrayList<>();\n\t\t\t}\n\n\t \t\n\t }",
"public void test_no_adjustment_basic() {\n // ## Arrange ##\n String expected = \"2008-12-14 12:34:56\";\n FromToOption option = createOption();\n\n // ## Act ##\n Date fromDate = option.filterFromDate(DfTypeUtil.toDate(expected));\n Date toDate = option.filterToDate(DfTypeUtil.toDate(expected));\n\n // ## Assert ##\n assertEquals(ConditionKey.CK_GREATER_EQUAL, option.getFromDateConditionKey());\n assertEquals(ConditionKey.CK_LESS_EQUAL, option.getToDateConditionKey());\n assertEquals(expected, DfTypeUtil.toString(fromDate, \"yyyy-MM-dd HH:mm:ss\"));\n assertEquals(expected, DfTypeUtil.toString(toDate, \"yyyy-MM-dd HH:mm:ss\"));\n }",
"boolean isSetFoundingDate();",
"public void setDefaultDateRange() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\n Calendar todaysDate = Calendar.getInstance();\n toDateField.setText(dateFormat.format(todaysDate.getTime()));\n\n todaysDate.set(Calendar.DAY_OF_MONTH, 1);\n fromDateField.setText(dateFormat.format(todaysDate.getTime()));\n }",
"private void crawlSourceForCriteria(final LocalDate date, final String contractingAuthority,\n final boolean isActive) {\n\n logger.info(\"Data filtering for criteria [date: '{}', contracting authority:'{}', active:'{}']\", date,\n contractingAuthority, isActive);\n\n HtmlPage actualPage = getSearchResultsStartPageForCriteria(date, contractingAuthority, isActive, null);\n\n int recordsCount = getRecordsCountWithComment(actualPage);\n //no results for criteria\n if (actualPage == null || recordsCount == 0) {\n return;\n }\n\n HashMap<String, Object> metaData = new HashMap<>();\n metaData.put(\"date\", date.toString());\n metaData.put(\"contractingAuthority\", contractingAuthority);\n metaData.put(\"isActive\", isActive);\n\n if (recordsCount > RECORDS_MAX_COUNT) {\n /**\n * Appends the new filtering criterion, the supply type.\n */\n for (TenderSupplyType type : Arrays.asList(TenderSupplyType.values())) {\n logger.info(\"Data filtering for criteria starts [date: '{}', contracting authority:'{}', active:'{}',\"\n + \" supplyType: '{}']\", date, contractingAuthority, isActive, type);\n\n actualPage = getSearchResultsStartPageForCriteria(date, contractingAuthority, isActive, type);\n recordsCount = getRecordsCountWithComment(actualPage);\n //no results for criteria\n if (actualPage == null || recordsCount == 0) {\n continue;\n }\n\n metaData.put(\"supplyType\", type);\n processAllPages(actualPage, metaData);\n }\n } else {\n processAllPages(actualPage, metaData);\n }\n }",
"List<SpotPrice> getByCommodityAndFromDateAndToDateAndLocation(\n Commodity commodity,\n Date fromDate,\n Date toDate,\n Location location\n );",
"@Override\n\tpublic List<Project> findProjectsByStartDateRange(int ownerAccountId,\n\t\t\tDateTime fromDate, DateTime toDate, Set<String> currentPhases, boolean headerOnly) {\n\t\ttry {\n\t\t\tList<Project> projects = super.findDomainObjectsByDateTimeRange(ownerAccountId, outJoins,\n\t\t\t\t\t\"o.StartDate\", fromDate, toDate, currentPhases, null);\n\t\t\treturn getQueryDetail(projects, headerOnly);\n\t\t}\n\t\tcatch (MustOverrideException e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByStartDateRange MustOverrideException: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByStartDateRange Exception: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}",
"private void doSearch(String query, boolean art,\n boolean music,\n boolean tech,\n boolean careers,\n boolean culture,\n boolean sports,\n boolean science,\n boolean education){\n ArrayList<String> categories = new ArrayList<String>();\n if(art) categories.add(\"Art\");\n if(music) categories.add(\"Music\");\n if(tech) categories.add(\"Tech\");\n if(careers) categories.add(\"Careers\");\n if(culture) categories.add(\"Culture\");\n if(sports) categories.add(\"Sports\");\n if(science) categories.add(\"Science\");\n if(education) categories.add(\"Education\");\n\n //if none selected search for all categories\n if(!art && !music && !tech && !careers && !culture && !sports && !science && !education){\n categories.add(\"Art\");\n categories.add(\"Music\");\n categories.add(\"Tech\");\n categories.add(\"Careers\");\n categories.add(\"Culture\");\n categories.add(\"Sports\");\n categories.add(\"Science\");\n categories.add(\"Education\");\n }\n eventServices.searchEventFeed(query, null, null, categories, new AppCallback<List<Event>>() {\n @Override\n public void call(final List<Event> events) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n eventList.addAll(events);\n adapter.notifyDataSetChanged();\n }\n });\n }\n\n @Override\n public void call() {\n\n }\n });\n\n// Log.d(TAG, \"doSearch: \" + query + \" \" + SearchActivity.DATE_RANGE_LABELS[dateRange] + \" \");\n adapter.notifyDataSetChanged();\n }",
"public void searchByBeforeDate(long date, final int limit) throws IOException {\n final IndexSearcher indexSearcher = new IndexSearcher(reader);\n\n Query q = NumericRangeQuery.newLongRange(\"creationDate\", 0L, date, true, true);\n System.out.println(\"Type of query: \" + q.getClass().getSimpleName());\n\n final TopDocs search = indexSearcher.search(q, limit);\n final ScoreDoc[] hits = search.scoreDocs;\n showHits(hits);\n }",
"public GetACDHistoryRequest setFromDate(Date d) {\n this.fromDate = d;\n return this;\n }",
"@RequestMapping(\n value = \"/{start}/{end}\",\n method = RequestMethod.GET\n )\n public final Iterable<Entry> filter(\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date start,\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date end\n ) {\n if (end.before(start)) {\n throw new IllegalArgumentException(\"Start date must be before end\");\n }\n final List<Entry> result = new LinkedList<Entry>();\n List<Entry> entries = SecurityUtils.actualUser().getEntries();\n if (entries == null) {\n entries = Collections.emptyList();\n }\n for (final Entry entry : entries) {\n if (entry.getDate().after(start)\n && entry.getDate().before(end)) {\n result.add(entry);\n }\n }\n return result;\n }",
"protected Pair<Date, Date> askForDates(boolean onlyEnd, int numDaysAsDefault) {\n\t\tthis.checkForDatesForm(onlyEnd, numDaysAsDefault);\r\n\t\tthis.datesDialog.setVisible(Boolean.TRUE);\r\n\r\n\t\t// Result?\r\n\t\tObject result = this.datesForm.getDataFieldValue(\"RESULT\");\r\n\t\tif (!ParseUtilsExtended.getBoolean(result, false)) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tDate from = (Date) this.datesForm.getDataFieldValue(\"INIT_DATE\");\r\n\t\tDate to = (Date) this.datesForm.getDataFieldValue(\"END_DATE\");\r\n\r\n\t\t// Validate dates\r\n\t\tif ((from != null) && (to != null) && to.before(from)) {\r\n\t\t\tMessageManager.getMessageManager().showMessage(this.getForm(), \"W_INVALID_DATES\", MessageType.WARNING, new Object[] {});\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Past dates (ends before now) -> the check must not be activated -> Considered in service implementation\r\n\t\t// Future dates (starts after than now)? -> not problem? -> Must not be a problem, access will be restricted by check and dates\r\n\r\n\t\treturn new Pair(from, to);\r\n\t}",
"Collection<Campanha> findInVigencia(Date fimVigencia, Date inicioVigencia);",
"@Deprecated\n public FilterBuilder byDate(Date from, Date to) {\n //instance.dateFrom = from;\n //instance.dateTo = to;\n instance.arguments.put(\"dateFrom\", CotUtils.convertDateToTimestring(from));\n instance.arguments.put(\"dateTo\", CotUtils.convertDateToTimestring(to));\n return this;\n }",
"public void setFromDate(LocalDate fromDate) {\n\t\tthis.fromDate = fromDate;\n\t}",
"public Date getValidFrom();",
"public void fillList(int roomid, String inputdateTo, String inputdateFrom) {\n list = new ArrayList();\n Connection cnn = null;\n Statement st = null;\n ResultSet rs = null;\n\n String sql = \"select sche.scheduleID as ID,shift.shiftname as shiftname,lab.roomName as roomName,d.dateword as datework,\"\n + \" we.keyword as keywork,sche.status as status,sche.dateworkID sdateworkID from tbl_schedule as sche inner join \"\n + \" tbl_shiftname as shift on sche.shiftID=shift.shiftID inner \"\n + \" join tbl_labroom as lab on sche.roomID=lab.roomID inner join \"\n + \" tbl_datework as d on sche.dateworkID=d.datewordID inner join \"\n + \" days_week as we on d.dayID=we.dayID where lab.roomID=\" + roomid;\n if (inputdateTo.trim().length() > 3) {\n sql += \" and d.dateword >='\" + inputdateTo + \"'\";\n }\n if (inputdateFrom.trim().length() > 3) {\n sql += \" and d.dateword <='\" + inputdateFrom + \"'\";\n }\n sql += \" order by ID desc \";\n //String connectionURL = \"jdbc:odbc:sem4\";\n try {\n //Class.forName(\"sun.jdbc.odbc.JdbcOdbcDriver\");\n //cnn = DriverManager.getConnection(connectionURL, \"lab\", \"\");\n cnn = dbconnect.Connect();\n st = cnn.createStatement();\n rs = st.executeQuery(sql);\n int count = 0;\n String ID = \"\";\n String shiftname = \"\";\n String status = \"\";\n String roomName = \"\";\n String datework = \"\";\n String daysweek = \"\";\n int dateworkID = 0;\n SimpleDateFormat formarter = new SimpleDateFormat(\"EE, MMM d,yyyy\");\n while (rs.next()) {\n count = count + 1;\n ID += rs.getInt(\"ID\") + \"/\";\n shiftname += rs.getString(\"shiftname\") + \"/\";\n roomName = rs.getString(\"roomName\");\n\n datework = formarter.format(rs.getDate(\"datework\"));\n daysweek = rs.getString(\"keywork\");\n status += rs.getString(\"status\") + \"/\";\n dateworkID = rs.getInt(\"sdateworkID\");\n int totalShift = cntShiftShow();\n if (count % totalShift == 0) {\n list.add(new classSchedule(ID, shiftname, roomName, datework, daysweek, status, dateworkID));\n ID = \"\";\n shiftname = \"\";\n status = \"\";\n roomName = \"\";\n datework = \"\";\n daysweek = \"\";\n }\n\n }\n } catch (SQLException ex) {\n Logger.getLogger(showSchedule.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }",
"void calculateValues(final FinancialAnalysisParameter financialParameter, final Date dateFrom,\n final Date dateTo);",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\n\t\t\tint m = cal.get(Calendar.MONTH);\n\t\t\tint d = cal.get(Calendar.DAY_OF_MONTH);\n\t\t\tint y = cal.get(Calendar.YEAR);\n\t\t\t\n\t\t\n\t\t\t\n\t\t\tDatePickerDialog dpd = new DatePickerDialog(MainActivity.this, dateListener, y, m, d);\n\t\t\tdpd.setButton(DatePickerDialog.BUTTON_POSITIVE, \"Search\", dpd);\n\t\t\tdpd.show();\n\t\t\t\t//new DatePickerDialog(MainActivity.this, dateListener, y, m, d).show();\n\t\t\t}",
"private static void executeQuery3(PersistenceManager pm) {\n Query query = pm.newQuery(Book.class);\n query.setFilter(\"date >= fromDate && date <= toDate\");\n query.declareImports(\"import java.util.Date\");\n query.declareParameters(\"Date fromDate, Date toDate\");\n query.setOrdering(\"date descending\"); // order from new to old\n Collection results =\n (Collection)query.execute(getYearDate(2002), getYearDate(2003));\n printCollection(\"Books published in 2002:\", results.iterator());\n query.closeAll();\n }",
"@RequestMapping(value=\"/rs/search\", method = {RequestMethod.GET,RequestMethod.POST})\r\n\tpublic RestSearchResultModel search(\r\n\t\t\t@RequestParam(value = \"logPathPatterns\", required=false) String logPathPatterns,\r\n\t\t\t@RequestParam(value = \"logFileNamePatterns\", required=false) String logFileNamePtterns,\r\n\t\t\t@RequestParam(value = \"search\", required=true) String search,\r\n\t\t\t@RequestParam(value = \"searchOnLabels\", required=true) String searchOnLabels,\r\n\t\t\t@RequestParam(value = \"fromDateTime\", required=false) String fromDateTime,\r\n\t\t\t@RequestParam(value = \"toDateTime\", required=false) String toDateTime,\r\n\t\t\t@RequestParam(value = \"viewTz\", required=true) String viewTz) {\n\t\tRestSearchInput input = new RestSearchInput();\r\n\t\tinput.setLogPathPatterns(logPathPatterns);\r\n\t\tinput.setLogFileNamePtterns(logFileNamePtterns);\r\n\t\tinput.setSearch(search);\r\n\t\tinput.setSearchOnLabels(searchOnLabels);\r\n\t\tinput.setFromDateTime(fromDateTime);\r\n\t\tinput.setToDateTime(toDateTime);\r\n\t\tinput.setViewTz(viewTz);\r\n\t\treturn search(input);\r\n\t}",
"@Override\n public Flux<PersistentAuditEvent> findAllByAuditEventDateBetween(Instant fromDate, Instant toDate, Pageable pageable) {\n OffsetDateTime fromDateH2 = OffsetDateTime.ofInstant(fromDate, ZoneId.systemDefault());\n OffsetDateTime toDateH2 = OffsetDateTime.ofInstant(toDate, ZoneId.systemDefault());\n Criteria criteria = Criteria\n .where(\"event_date\").greaterThan(fromDateH2)\n .and(\"event_date\").lessThan(toDateH2);\n return findAllFromSpec(select().matching(criteria).page(pageable));\n }",
"void setFoundingDate(java.lang.String foundingDate);",
"private void gButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gButtonActionPerformed\n // TODO add your handling code here:\n try {\n java.sql.Date fDate = new java.sql.Date(new SimpleDateFormat(\"M-d-yy\").parse(fromDate.getText()).getTime()); \n java.sql.Date tDate = new java.sql.Date(new SimpleDateFormat(\"M-d-yy\").parse(toDate.getText()).getTime()); \n DefaultTableModel tData = or.getOrderData(fDate,tDate);\n oTable.setModel(tData);\n setSales(tData);\n }\n catch(Exception ex) {\n System.out.println(ex);\n \n }\n }",
"public void onDateSet(DatePicker view, int year, int month, int day) {\n\n if (getTag().equals(\"begin\")) {\n\n String y = Integer.toString(year);\n String m = Integer.toString(month + 1);\n String d = Integer.toString(day);\n\n if (d.length() == 1) {\n d = \"0\" + d;\n }\n if (m.length() == 1) {\n m = \"0\" + m;\n }\n\n SearchActivity.setBeginDate(d + \"/\" + m + \"/\" + y);\n }\n\n if (getTag().equals(\"end\")) {\n String y = Integer.toString(year);\n String m = Integer.toString(month + 1);\n String d = Integer.toString(day);\n if (d.length() == 1) {\n d = \"0\" + d;\n }\n if (m.length() == 1) {\n m = \"0\" + m;\n }\n SearchActivity.setEndDate(d + \"/\" + m + \"/\" + y);\n }\n }",
"Map<Date, Double> getValues(final FinancialAnalysisParameter financialParameter,\n final Date dateFrom, final Date dateTo);",
"void setDateRange(Date start, Date end);",
"public static boolean isDateBetweenSpecifiedDate(Date date, Date from, Date to) {\n return date.compareTo(from) >= 0 && date.compareTo(to) <= 0;\n }",
"private void calculateFinancialStartDate(DepreciationCriteria criteria) {\n\t\tLong todate = criteria.getToDate();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.setTimeInMillis(todate);\n\t\tint year = calendar.get(Calendar.YEAR);\n\t\tint month = calendar.get(Calendar.MONTH);\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 23);\n\t\tcalendar.set(Calendar.MINUTE, 59);\n\t\tcriteria.setToDate(calendar.getTimeInMillis());\n\n\t\t// choosing the finacial year based on todate month\n\t\tif (month < 3) {\n\t\t\tcriteria.setFinancialYear(year-1+\"-\"+year);\n\t\t\tyear = year - 1;\n\t\t}else\n\t\t\tcriteria.setFinancialYear(year+\"-\"+(year+1));\n\n\t\t// setting from date value\n\t\tcalendar.set(Calendar.YEAR, year);\n\t\tcalendar.set(Calendar.MONTH, Calendar.APRIL);\n\t\tcalendar.set(Calendar.DATE, 1);\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 0);\n\t\tcalendar.set(Calendar.MINUTE, 0);\n\t\tcriteria.setFromDate(calendar.getTimeInMillis());\n\t\tSystem.err.println(\"from date calculated : \" + criteria.getFromDate());\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tmodelDates.setRowCount(0);\r\n\t\t\t\tif (dateCheckIn.getDate() == null || dateCheckOut.getDate() == null) {\r\n\t\t\t\t\tlblInvalidDate.setForeground(Color.RED);\r\n\t\t\t\t\tlblInvalidDate.setText(\"No date selected!\");\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tlong diffDays = ChronoUnit.DAYS.between(dateCheckIn.getDate().toInstant(),\r\n\t\t\t\t\t\t\tdateCheckOut.getDate().toInstant());\r\n\r\n\t\t\t\t\tint selectedRowIndex = table.getSelectedRow();\r\n\r\n\t\t\t\t\tPeriod pastDate = Period.between(date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(),\r\n\t\t\t\t\t\t\tdateCheckIn.getDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate());\r\n\r\n\t\t\t\t\tif (diffDays <= 0 || selectedRowIndex == -1 || pastDate.getDays() < 0) {\r\n\r\n\t\t\t\t\t\tlblInvalidDate.setForeground(Color.RED);\r\n\t\t\t\t\t\tlblInvalidDate.setText(\"Invalid dates or no room selected!\");\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSessionFactory factory = new Configuration().configure(\"hibernate.cfg.xml\")\r\n\t\t\t\t\t\t\t\t.addAnnotatedClass(Customer.class).addAnnotatedClass(Rooms.class)\r\n\t\t\t\t\t\t\t\t.addAnnotatedClass(Reservation.class).addAnnotatedClass(Review.class)\r\n\t\t\t\t\t\t\t\t.buildSessionFactory();\r\n\r\n\t\t\t\t\t\tSession session = factory.getCurrentSession();\r\n\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tsession.beginTransaction();\r\n\t\t\t\t\t\t\tQuery customerQ = session.createQuery(\"from Customer where email=:custEmail\");\r\n\t\t\t\t\t\t\tcustomerQ.setParameter(\"custEmail\", lblUserEmail.getText());\r\n\r\n\t\t\t\t\t\t\tCustomer customer = (Customer) customerQ.getResultList().get(0);\r\n\r\n\t\t\t\t\t\t\tQuery roomQ = session.createQuery(\"from Rooms where roomNumber=:roomNr\");\r\n\t\t\t\t\t\t\troomQ.setParameter(\"roomNr\", lblGetRN.getText());\r\n\t\t\t\t\t\t\tRooms room = (Rooms) roomQ.getResultList().get(0);\r\n\r\n\t\t\t\t\t\t\tQuery resQ = session.createQuery(\"from Reservation where room_id=:roomId\");\r\n\t\t\t\t\t\t\tresQ.setParameter(\"roomId\", room.getId());\r\n\t\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\t\t\t\tList<Reservation> resList = resQ.getResultList();\r\n\t\t\t\t\t\t\tint boolRes = 0;\r\n\t\t\t\t\t\t\tfor(int i = 0; i<resList.size();i++) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif((dateCheckIn.getDate().compareTo(resList.get(i).getCheckOut()) <0) && (dateCheckOut.getDate().compareTo(resList.get(i).getCheckIn()) > 0)) {\r\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(btnCreateReservation, \"The room is reserved at this date\");\r\n\t\t\t\t\t\t\t\t\tboolRes = 1;\r\n\t\t\t\t\t\t\t\t\trowDates[0] = resList.get(i).getCheckIn();\r\n\t\t\t\t\t\t\t\t\trowDates[1] = resList.get(i).getCheckOut();\r\n\t\t\t\t\t\t\t\t\tmodelDates.addRow(rowDates);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tboolRes= 0;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttableDates.setModel(modelDates);\r\n\t\t\t\t\t\t\tif(boolRes == 0) {\r\n\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tdouble totalPrice = room.getPrice() * diffDays;\r\n\r\n\t\t\t\t\t\t\tjava.sql.Date sqldateCheckIn = new java.sql.Date(dateCheckIn.getDate().getTime());\r\n\t\t\t\t\t\t\tjava.sql.Date sqldateCheckOut = new java.sql.Date(dateCheckOut.getDate().getTime());\r\n\r\n\t\t\t\t\t\t\tReservation reserve = new Reservation(customer, room, sqldateCheckIn, sqldateCheckOut,\r\n\t\t\t\t\t\t\t\t\ttotalPrice);\r\n\r\n\t\t\t\t\t\t\tint answer = JOptionPane.showConfirmDialog(btnCreateReservation,\r\n\t\t\t\t\t\t\t\t\t\"Total price is: \" + totalPrice + \". Are you agree?\", \"Warning\",\r\n\t\t\t\t\t\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\t\t\tif (answer == JOptionPane.YES_OPTION) {\r\n\r\n\t\t\t\t\t\t\t\tsession.save(reserve);\r\n\t\t\t\t\t\t\t\tlblInvalidDate.setForeground(Color.GREEN);\r\n\t\t\t\t\t\t\t\tlblInvalidDate.setText(\"Reservation succesfully created!\");\r\n\r\n\t\t\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\t\t\t\t\tList<Rooms> roomsList = (List<Rooms>) session\r\n\t\t\t\t\t\t\t\t\t\t.createQuery(\"from Rooms\").list();\r\n\t\t\t\t\t\t\t\tmodel = new DefaultTableModel();\r\n\r\n\t\t\t\t\t\t\t\tmodel.setColumnIdentifiers(column);\r\n\r\n\t\t\t\t\t\t\t\tfor (int i = 0; i < roomsList.size(); i++) {\r\n\t\t\t\t\t\t\t\t\trow[0] = roomsList.get(i).getRoomNumber();\r\n\t\t\t\t\t\t\t\t\trow[1] = roomsList.get(i).getPrice();\r\n\t\t\t\t\t\t\t\t\trow[2] = roomsList.get(i).getRoomType();\r\n\t\t\t\t\t\t\t\t\tmodel.addRow(row);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\ttable.setModel(model);\r\n\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tsession.getTransaction().commit();\r\n\t\t\t\t\t\t\t}}\r\n\r\n\t\t\t\t\t\t} finally {\r\n\t\t\t\t\t\t\tfactory.close();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"@Then(\"^select the onward date$\")\n\tpublic void select_the_onward_date() throws Throwable {\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tdriver.findElement(By.xpath(\"//*[@id='search']/div/div[3]/div/label\")).click();\n\t\tdriver.findElement(By.xpath(\"//*[@id='rb-calendar_onward_cal']/table/tbody/tr[6]/td[5]\")).click();\n\t\t//driver.findElement(By.xpath(\"//label[text()='Onward Date']\")).sendKeys(Keys.TAB);\n\t\t//driver.findElementByXPath(\"//label[text()='Return Date']\").sendKeys(Keys.TAB);\n\t\t\n\t}",
"void setFilterByDate(boolean isFilterByDate);",
"public void getOrdersByDate() throws FlooringDaoException {\n boolean validDate = true;\n do {\n try {\n String date = view.getOrdersDate();\n List<Order> ordersByDate = new ArrayList<>();\n ordersByDate = service.getOrdersByDate(date);\n validDate = true;\n view.displayOrdersByDate(ordersByDate);\n } catch (FlooringDaoException ex) {\n view.displayError(\"Orders file not found for given date. Please make sure your date is entered EXACTLY as YYYY-MM-DD or try a different date.\");\n validDate = false;\n }\n } while (!validDate);\n }",
"public boolean dateCompartFromTo(String[] sdate, String[] edate) {\r\n\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tDate startdate = null;\r\n\t\tDate enddate = null;\r\n\t\ttry {\r\n\t\t\t// 시작일 종료일 날짜 비교\r\n\t\t\tfor (int idx = 0; idx < sdate.length; idx++) {\r\n\r\n\t\t\t\tstartdate = dateFormat.parse(sdate[idx]);\r\n\t\t\t\tenddate = dateFormat.parse(edate[idx]);\r\n\t\t\t\t\r\n\t\t\t\tif (startdate.compareTo(enddate) >= 0) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (ParseException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}",
"public void setValidatedTo(Date validatedTo);",
"public void setValidatedFrom(Date validatedFrom);",
"Set<StewardSimpleDTO> getAllAvailable(Date from, Date to);",
"@Override\n\tpublic List<Project> findProjectsByEndDateRange(int ownerAccountId,\n\t\t\tDateTime fromDate, DateTime toDate, Set<String> currentPhases, boolean headerOnly) {\n\t\ttry {\n\t\t\tList<Project> projects = super.findDomainObjectsByDateTimeRange(ownerAccountId, outJoins,\n\t\t\t\t\t\"o.EndDate\", fromDate, toDate, currentPhases, null);\n\t\t\treturn getQueryDetail(projects, headerOnly);\n\t\t}\n\t\tcatch (MustOverrideException e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByEndDateRange MustOverrideException: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByEndDateRange Exception: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}",
"public void searchByAfterDate(long date, final int limit) throws IOException {\n final IndexSearcher indexSearcher = new IndexSearcher(reader);\n\n long now = System.currentTimeMillis() / 1000L;\n\n Query q = NumericRangeQuery.newLongRange(\"creationDate\", date, now, true, true);\n System.out.println(\"Type of query: \" + q.getClass().getSimpleName());\n\n final TopDocs search = indexSearcher.search(q, limit);\n final ScoreDoc[] hits = search.scoreDocs;\n showHits(hits);\n }",
"@Query(\"FROM Consulta c WHERE c.fecha BETWEEN :fechaConsulta AND :fechaSgte\")\n\tList<Consulta> buscarFecha(@Param(\"fechaConsulta\") LocalDateTime fechaConsulta,@Param(\"fechaSgte\") LocalDateTime fechaSgte);",
"public Vector<Event> getEventsInDay(Date par){\n Connection con = null;\n PreparedStatement st = null;\n ResultSet rs = null;\n Vector<Event> result = new Vector<Event>();\n try {\n //obtain the database connection by calling getConn()\n con = getConn();\n \n SimpleDateFormat format1 = new SimpleDateFormat(\"dd-MM-YY\");\n \n //build the sql statement\n String sql = \"select * from event where to_date('\" + format1.format(par) + \"','DD-MM-YY') \";\n sql+= \"between to_date(start_time,'DD-MM-YY') and to_date(end_time,'DD-MM-YY')\";\n \n \n //System.out.println(sql);\n //create the PreparedStatement from the Connection object by calling prepareCall\n //method, passing it the sql that is constructed using the supplied parameters\n st = con.prepareCall(sql);\n \n \n //Calls executeQuery and the resulting data is returned in the resultset\n rs = st.executeQuery();\n \n //loop through the result set and save the data in the datamodel objects\n while (rs.next()){\n \n Event e = new Event(rs.getLong(\"id\"),rs.getString(\"id\") + \",\" + rs.getString(\"name\"),rs.getDate(\"start_time\"),rs.getDate(\"end_time\"));\n ;\n result.add(e);\n \n }\n \n }\n catch (SQLException e){\n e.printStackTrace();\n }\n //close the resultset,preparedstatement and connection to relase resources \n if (rs != null){\n try{\n rs.close();\n rs = null;\n }\n catch (SQLException e){\n \n }\n }\n if (st != null){\n try{\n st.close();\n st = null;\n }\n catch (SQLException e){\n \n }\n }\n \n \n \n if (con != null){\n try{\n con.close();\n con = null;\n }\n catch (SQLException e){\n \n }\n }\n return result;\n \n \n }",
"private SearchAction makeSearchAction(boolean isSearchFree)\r\n throws MakeActionException, InvalidDateRangeException {\r\n if (params.length == 0) {\r\n throw new MakeActionException(SearchAction.ERR_INSUFFICIENT_ARGS);\r\n }\r\n\r\n SearchAction searchAction = new SearchAction(goku);\r\n\r\n // determine if search is to find free slots\r\n if (isSearchFree == true) {\r\n // test if datetime received is free of tasks\r\n searchAction.isSearchFree = isSearchFree;\r\n searchAction.freeDateQuery = parseDate();\r\n if (searchAction.freeDateQuery == null) {\r\n throw new MakeActionException(SearchAction.ERR_NO_VALID_DATE_FOUND);\r\n }\r\n } else {\r\n // search normally\r\n DateTime dq = extractDateQuery();\r\n DateTime dl = extractDeadline();\r\n DateRange dr = extractPeriod();\r\n searchAction.onDateQuery = dq;\r\n searchAction.dline = dl;\r\n searchAction.period = dr;\r\n\r\n // if datequery, deadline or periods are null, ignore keywords\r\n // \"on, by, from, to\"\r\n if (dq == null) {\r\n paramsOnIndex = null;\r\n }\r\n if (dl == null) {\r\n paramsByIndex = null;\r\n }\r\n if (dr == null) {\r\n paramsFromIndex = null;\r\n }\r\n\r\n String title = extractTitle();\r\n if (!title.isEmpty()) {\r\n searchAction.title = title;\r\n }\r\n }\r\n\r\n return searchAction;\r\n }",
"public Date getValidatedTo();",
"private ResultSet getResultSetSalaryReport(String departmentId, LocalDate dateFrom, LocalDate dateTo){\n PreparedStatement ps;\n try {\n ps = connection.prepareStatement(SQL_SELECT);\n ps.setString(0, departmentId);\n ps.setDate(1, new java.sql.Date(dateFrom.toEpochDay()));\n ps.setDate(2, new java.sql.Date(dateTo.toEpochDay()));\n return ps.executeQuery();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n }",
"void findTransaction(String fromDate, String toDate, String description, String category, Ui ui)\n throws TransactionException {\n transactions.findMatchingTransaction(fromDate, toDate, description, category, ui);\n }",
"public static boolean validateRangeDate(String from, String to) {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_FORMAT);\n if (validateDateFormat(from, DATE_FORMAT) && validateDateFormat(to, DATE_FORMAT)) {\n if (LocalDate.parse(from, formatter).isBefore(LocalDate.parse(to, formatter)) ||\n LocalDate.parse(from, formatter).isEqual(LocalDate.parse(to, formatter))) {\n return true;\n }\n }\n return false;\n }",
"public List<MiniRecordElement> search(String startdate, String enddate,\n\t\t\tString user, boolean failonly) throws OdenException;",
"@Override\n\t@Transactional(readOnly=true)\n\tpublic Page<ProductDTO> findByDateOfExpiryBetweenAndVisibleTrue(LocalDate from, LocalDate to, Pageable pageable) {\n\t\tlog.debug(\"Request to get all Products by dateOfExpiry from \"+from+\" to \"+to);\n return productRepository.findByDateOfExpiryBetweenAndVisibleTrue(from,to,pageable)\n .map(productMapper::toDto);\n\t}",
"@Override\n public List<Event> searchByInterval(Date leftDate, Date rightDate) {\n TypedQuery<EventAdapter> query = em.createQuery(\n \"SELECT e FROM EventAdapter e \"\n + \"WHERE e.dateBegin BETWEEN :leftDate and :rightDate \"\n + \"ORDER BY e.id\", EventAdapter.class)\n .setParameter(\"leftDate\", leftDate)\n .setParameter(\"rightDate\", rightDate);\n\n return query.getResultList()\n .parallelStream()\n .map(EventAdapter::getEvent)\n .collect(Collectors.toList());\n }",
"public void setFromDate(Date fromDate) {\n\t\tthis.fromDate = fromDate;\n\t}",
"public void setToDate(Date toDate) {\n\t\tthis.toDate = toDate;\n\t}",
"public DateFilter(int smonth, int sday, int emonth, int eday) {\n\t\t//TODO you will need to implement this method\n\t}",
"@CrossOrigin(origins = \"http://campsiteclient.herokuapp.com\", maxAge = 3600)\n\t@GetMapping\n\tpublic JSONArray checkAvaibility(@RequestParam(value = \"from\") Optional<String> from,\n\t\t\t@RequestParam(value = \"to\") Optional<String> to) throws java.text.ParseException {\n\n\t\tString startDateStringFormat = from\n\t\t\t\t.orElse(dateUtils.formatDate(dateUtils.addDays(1, new Date())));\n\t\tString endDateStringFormat = to\n\t\t\t\t.orElse(dateUtils.formatDate(dateUtils.addDays(31, new Date())));\n\n\t\tDate startDate = bookingServiceImpl.formatDate(startDateStringFormat);\n\t\tDate endDate = dateUtils.formatDate(endDateStringFormat);\n\n\t\tList<BookingDate> bookedDates = bookingDateRepository.getBooking(startDate, endDate);\n\n\t\tList<String> list = new ArrayList<String>();\n\n\t\tfor (BookingDate bookingDate : bookedDates) {\n\t\t\tDate date = bookingDate.getBookingDate();\n\t\t\tString dateToString = dateUtils.formatDate(date);\n\t\t\tlist.add(dateToString);\n\t\t}\n\n\t\tJSONArray result = bookingServiceImpl\n\t\t\t\t.getAvailableDates(new HashSet<BookingDate>(bookedDates), startDate, endDate);\n\t\treturn result;\n\t}",
"public DeadlineDateInRangePredicate(long numberOfDays) throws ParseException {\n DeadlineDate dateSpecifiedByUser;\n try {\n dateSpecifiedByUser = new DeadlineDate(\n LocalDate.now().plusDays(numberOfDays).format(dateDateFormatter));\n } catch (DateTimeException e) {\n throw new ParseException(\n String.format(MESSAGE_INVALID_COMMAND_FORMAT, DueInCommand.MESSAGE_USAGE));\n } catch (IllegalArgumentException re) {\n throw new ParseException(\n String.format(MESSAGE_INVALID_COMMAND_FORMAT, DueInCommand.MESSAGE_USAGE));\n }\n this.numberOfDays = numberOfDays;\n this.endDate = minimumOf(dateSpecifiedByUser, maxDate);\n }",
"@SearchQueryMethod(name = \"autoxReportSearch\", queryModel = AutoxReportSearchQuery.class)\r\n\t@OrderBy(\"createdOn\")\r\n\tpublic List<AutoxReportSearchResult> searchCandidates(SearchQuery searchQuery);",
"private void validateDate() {\n if (dtpSightingDate.isEmpty()) {\n dtpSightingDate.setErrorMessage(\"This field cannot be left empty.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is after research began (range check)\n else if (!validator.checkDateAfterMin(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter from \" + researchDetails.MIN_DATE + \" and afterwards. This is when the research period began.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is not in the future (range check / logic check)\n else if (!validator.checkDateNotInFuture(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter a date from today or before. Sighting date cannot be in the future.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n }",
"@Test\n\tpublic void shouldReturnPagedOpenDocumentsFilteredByDateRange() throws ParseException\n\t{\n\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getAllPagedDocuments(\n\t\t\t\tcreatePageableData(0, 10, \"byDocumentDateAsc\"), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createDateRangeCriteriaObject(\"08/10/2013\", DATE_08_11_2013, DOCUMENT_STATUS_OPEN, FILTER_BY_DATE)));\n\n\t\tTestCase.assertEquals(2, result.getResults().size());\n\n\t\tTestCase.assertEquals(DATE_2013_08_11, sdf.format(result.getResults().get(0).getDate()));\n\t\tTestCase.assertEquals(DATE_2013_08_11, sdf.format(result.getResults().get(1).getDate()));\n\t}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface DailyReservationRepository extends JpaRepository<DailyReservation, Long> {\n\n @Query(\"select dailyReservation from DailyReservation dailyReservation where dailyReservation.user.login = ?#{principal.username}\")\n List<DailyReservation> findByUserIsCurrentUser();\n\n List<DailyReservation> findAllByDateIsBetween(LocalDate startDate, LocalDate endDate);\n // findAllByDateGreaterThanEqualStartDateAndDateLessThanEqualEndDate(LocalDate startDate, LocalDate endDate);\n //findAllByStartDateGreaterThanEqualAndEndDateLessThanEqual\n\n @Query(\"select dailyReservation from DailyReservation dailyReservation where dailyReservation.date between :startDate and :endDate\")\n List<DailyReservation> findAllDailyReservation(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate );\n\n}",
"public void setUntilDate(Date date);",
"protected Date getFromDate() {\n\t\treturn from;\n\t}"
] |
[
"0.63662165",
"0.6263236",
"0.62508076",
"0.61084455",
"0.60430497",
"0.5995506",
"0.5929204",
"0.5897527",
"0.5871354",
"0.58370525",
"0.583189",
"0.57779163",
"0.5751926",
"0.5660618",
"0.5650295",
"0.5648881",
"0.5645549",
"0.56396973",
"0.56161356",
"0.56018907",
"0.5601112",
"0.5590444",
"0.5576179",
"0.5556998",
"0.5553555",
"0.5546942",
"0.55325896",
"0.5529079",
"0.55172443",
"0.5509674",
"0.5502182",
"0.54923815",
"0.54775226",
"0.54753464",
"0.54716104",
"0.5470809",
"0.5465147",
"0.54394585",
"0.54254484",
"0.5402387",
"0.539458",
"0.5384006",
"0.53596485",
"0.5338039",
"0.53263724",
"0.53139615",
"0.5309552",
"0.5305087",
"0.52954036",
"0.52722466",
"0.5271626",
"0.5268878",
"0.5267731",
"0.52669346",
"0.52629364",
"0.52560157",
"0.52560025",
"0.52451634",
"0.52427864",
"0.52326053",
"0.52284855",
"0.52260834",
"0.52187175",
"0.52173495",
"0.5212864",
"0.52075046",
"0.5203213",
"0.52026886",
"0.5197951",
"0.51838547",
"0.51833284",
"0.51772636",
"0.51733655",
"0.51704204",
"0.5168162",
"0.5167835",
"0.5167004",
"0.5164951",
"0.5146299",
"0.51454926",
"0.51392174",
"0.51378924",
"0.51376235",
"0.5134592",
"0.5131805",
"0.5129163",
"0.51289505",
"0.512442",
"0.511394",
"0.51081336",
"0.5106591",
"0.5106512",
"0.50990283",
"0.50978464",
"0.5096388",
"0.50956684",
"0.5090548",
"0.5089907",
"0.508775",
"0.5085533",
"0.5084246"
] |
0.0
|
-1
|
////////////////////////////////////////////////////////////////////////////////////////// private methods ///////////////////////////////////////////////////////////////////////////////////////
|
private void _openEditor() {
Window w = new Window(_caption.getValue());
w.setId("tinyEditor");
w.setCaptionAsHtml(true);
_tinyEditor = new TinyMCETextField();
_tinyEditor.setValue(_hiddenField.getValue());
w.setResizable(true);
w.center();
w.setWidth(800, Unit.PIXELS);
w.setHeight(600, Unit.PIXELS);
VerticalLayout vl = new VerticalLayout();
vl.setSizeFull();
w.setContent(vl);
vl.addComponent(_tinyEditor);
Button close = new Button(_i18n.getMessage("close"));
close.addClickListener(evt -> w.close());
Button accept = new Button(_i18n.getMessage("accept"));
accept.addStyleName(ValoTheme.BUTTON_PRIMARY);
accept.addClickListener(evt -> {
String oldValue = _hiddenField.getValue();
_hiddenField.setValue(_tinyEditor.getValue());
if (!oldValue.equals(_hiddenField.getValue())) {
this.fireEvent(new ValueChangeEvent<String>(this,
oldValue,
true));
}
_html.removeAllComponents();
_html.addComponent(new Label(_tinyEditor.getValue(), ContentMode.HTML));
w.close();
});
HorizontalLayout hl = new HorizontalLayout();
hl.addComponents(close, accept);
hl.setWidth(100, Unit.PERCENTAGE);
hl.setExpandRatio(close, 1);
hl.setComponentAlignment(accept, Alignment.BOTTOM_RIGHT);
hl.setComponentAlignment(close, Alignment.BOTTOM_RIGHT);
vl.addComponent(hl);
vl.setExpandRatio(_tinyEditor, 1);
getUI().addWindow(w);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private stendhal() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n protected void init() {\n }",
"public final void mo51373a() {\n }",
"private Rekenhulp()\n\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\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private void kk12() {\n\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"private void m50366E() {\n }",
"@Override\n public int describeContents() { return 0; }",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"private void poetries() {\n\n\t}",
"private void init() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"private void getStatus() {\n\t\t\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}",
"@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 dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n public void init() {\n\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n public void init() {\n }",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private void strin() {\n\n\t}",
"@Override\n void init() {\n }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void init2() throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void init() {}",
"private Util() { }",
"public void method_4270() {}",
"@Override public int describeContents() { return 0; }",
"@Override\n\tprotected void initialize() {\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}",
"private MetallicityUtils() {\n\t\t\n\t}",
"private ReportGenerationUtil() {\n\t\t\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\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\tprotected void initData() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"private static void iterator() {\n\t\t\r\n\t}",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"private Singletion3() {}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"public void smell() {\n\t\t\n\t}",
"zzafe mo29840Y() throws RemoteException;",
"@Override\n public void init() {}",
"private static void cajas() {\n\t\t\n\t}",
"private TMCourse() {\n\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tprotected void processInit() {\n\r\n\t}",
"@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"private void initialize() {\n\t\t\n\t}",
"protected void mo6255a() {\n }",
"@Override\n\tprotected void prepare() {\n\t\t\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"private OMUtil() { }",
"private void init() {\n }",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"public void mo38117a() {\n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"public abstract void mo70713b();",
"@Override\n\t\t\t\t\t\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}"
] |
[
"0.60679215",
"0.60205585",
"0.5968894",
"0.5940879",
"0.5862326",
"0.583333",
"0.5824895",
"0.5744953",
"0.5730207",
"0.5713545",
"0.5689478",
"0.5676747",
"0.56685543",
"0.56685543",
"0.56685543",
"0.56685543",
"0.56685543",
"0.56685543",
"0.56637746",
"0.56637746",
"0.56454754",
"0.5614345",
"0.56090397",
"0.55981135",
"0.5577038",
"0.55769604",
"0.5574273",
"0.5563984",
"0.5558057",
"0.5554263",
"0.5547817",
"0.554056",
"0.554056",
"0.5534419",
"0.5534419",
"0.55165815",
"0.55165815",
"0.5503905",
"0.54990065",
"0.5488318",
"0.54859966",
"0.5481471",
"0.5479901",
"0.5478535",
"0.5466813",
"0.546279",
"0.54598415",
"0.5459183",
"0.54544646",
"0.54504895",
"0.5449718",
"0.54479444",
"0.5438632",
"0.54381573",
"0.543671",
"0.54310036",
"0.5430678",
"0.5422542",
"0.5418508",
"0.5418508",
"0.5418508",
"0.5418508",
"0.5418508",
"0.5417003",
"0.54155415",
"0.54141164",
"0.5411844",
"0.54107773",
"0.54107773",
"0.54107773",
"0.54000187",
"0.5398708",
"0.5397821",
"0.53975683",
"0.5389779",
"0.5375994",
"0.5369589",
"0.5369118",
"0.53680223",
"0.53632987",
"0.53630185",
"0.53621477",
"0.53603345",
"0.5358136",
"0.5355364",
"0.5350266",
"0.53502625",
"0.5349505",
"0.5347431",
"0.5344314",
"0.5328752",
"0.53229624",
"0.5321788",
"0.5320438",
"0.5318496",
"0.5318496",
"0.53136444",
"0.5312908",
"0.530778",
"0.5307458",
"0.53052104"
] |
0.0
|
-1
|
TextView tv = (TextView)v;
|
@Override
public void choiced(String result) {
target.setText(result);
target.setTextColor(getResources().getColor(R.color.app_color));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"abstract TextView getTextView();",
"public ViewHolder(View v) {\n super(v);\n Typeface oldLondon = Typeface.createFromAsset(context.getAssets(), \"fonts/Blackwood Castle.ttf\");\n\n iView = (ImageView) v.findViewById(to[0]);\n nameView = (TextView) v.findViewById(to[1]);\n nameView.setTypeface(oldLondon);\n descView = (TextView) v.findViewById(to[2]);\n boostView = (TextView) v.findViewById(to[3]);\n }",
"@Override\n\tpublic View getView(Context context, ViewGroup parent) {\n\t\ttv = new TextView(context);\n\t\treturn tv;\n\t}",
"android.view.View mo12148b();",
"TextView getTagView();",
"public void onClick(View v) {\n \tsetTxtViews();\n }",
"interface bi {\n void a(TextView textView);\n}",
"@Override\r\n public Object getItem(int position) {\r\n return mTextViews.get(position);\r\n }",
"public void onClick(View view) {\n // this is from the activity main\n TextView tv = (TextView) findViewById(R.id.tv1);\n EditText et = (EditText) findViewById(R.id.et1);\n\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic View getView(int id) {\n\t\t\n\t\tt = (T) activity.findViewById(id);\n\t\treturn (View)t;\n\t}",
"TextView getDescriptionView();",
"TextView getTitleView();",
"@SuppressWarnings(\"unchecked\")\n\tpublic View getView(String id) {\n\t\tid =id.trim();\n\t\tt = (T) activity.findViewById(getId(id));\n\t\treturn (View)t;\n\t}",
"void mo12147a(View view);",
"@Override\n\t\t\tpublic void setTextView(String str) {\n\t\t\t\t\n\t\t\t}",
"void convert(ViewHolder holder, T item, int position);",
"@Override\n\tpublic String toString(View v) {\n\t\treturn null;\n\t}",
"interface View extends BaseView {\n void onTextLoaded(String text);\n }",
"public void onClick(View v) {\n\t}",
"java.lang.String getView();",
"@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setText(\"Android is AWESOME!!\");\n }",
"@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.tv_praise:\n tv_praise(v);\n break;\n case R.id.tv_bad_review:\n tv_bad_review(v);\n break;\n case R.id.tv_custom:\n tv_custom(v);\n break;\n//\n default:\n break;\n }\n }",
"public View getView() { return view; }",
"public interface IRingTextView {\n void setOnclick(RingTextView ring);\n}",
"public MyViewHolder(View view)\n {\n super(view);\n titleview = (TextView) view.findViewById(R.id.news_title);\n dateView = (TextView) view.findViewById(R.id.dateview);\n\n timeView = (TextView) view.findViewById(R.id.timeview);\n\n }",
"public void onClick(View v) {\n\n }",
"public void onClick(View v) {\n\n }",
"public void onClick(View v) \n {\n Button b = (Button) v;\n Toast.makeText(this.mAnchorView.getContext(), b.getText(), Toast.LENGTH_SHORT).show();\n this.dismiss();\n }",
"public ViewHolder (View view){\n super(view);\n jView = view;\n //tvJoin = (TextView) view.findViewById(R.id.tvGroup);\n tvGroupTitle = view.findViewById(R.id.tvGroupTitle);\n }",
"@Override\n public void onClick(View v) {\n }",
"@Override\n public void onClick(View v) {\n }",
"public void onClick(View view){ // that executes the following code.\n // Take the text input to the EditText field...\n String changeText = editV.getText().toString();\n // and set the TextView to that input.\n textV.setText(changeText);\n }",
"public ViewHolder(View itemView) {\n super(itemView);\n imageView = itemView.findViewById(R.id.ivSomeImage);\n textView = itemView.findViewById(R.id.tvSomeText);\n }",
"public void onClick(View v) {\n }",
"public void onClick(View v) {\n }",
"public ViewHolder(View v) {\n super(v);\n }",
"protected TextView textView( final int childViewIndex )\n {\n return updater.textView( childViewIndex );\n }",
"public TextView getView(int paramInt, View paramView, ViewGroup paramViewGroup) {\n }",
"@Override\n public void onClick(View v)\n {\n }",
"@Override\r\n\tpublic void onClick(View v) {\n\r\n\t}",
"@Override\r\n\tpublic void onClick(View v) {\n\r\n\t}",
"@Override\r\n\tpublic void onClick(View v) {\n\r\n\t}",
"@Override\r\n\tpublic void onClick(View v) {\n\r\n\t}",
"@Override\n public void onClick(View v) {\n\n }",
"@Override\n public void onClick(View v) {\n\n }",
"@Override\n public void onClick(View v) {\n\n }",
"@Override\n public void onClick(View v) {\n\n }",
"@Override\n public void onClick(View v) {\n\n }",
"@Override\n public void onClick(View v) {\n\n }",
"public interface TextItemViewProtocol extends ViewProtocol {\n\n void setText(CharSequence text);\n}",
"public NoticiaViewHolder(View itemView) {\n super(itemView);\n itemView.setOnClickListener(this);\n txtTitulo = (TextView) itemView.findViewById(R.id.titulo);\n\n\n }",
"@Override\n public View getView ( int position, View convertView, ViewGroup parent ) {\n convertView = (LinearLayout) inflater.inflate( resource, null );\n\n /* Extract the SWMovie object to show. getItem() comes from ArrayAdapter class */\n Lesson lesson = getItem(position);\n\n\n /* set SWMovie movie in movie TextView. getMovie is from our SWMovie class */\n TextView txtLesson = (TextView) convertView.findViewById(R.id.lesson);\n txtLesson.setText(lesson.getName());\n\n /* set SWMovie episode in episode TextView */\n TextView txtTurn = (TextView) convertView.findViewById(R.id.turn);\n txtTurn.setText(lesson.getTurn());\n\n TextView txtId = (TextView) convertView.findViewById(R.id.lesson_id);\n txtId.setText(\"\"+lesson.getId());\n\n return convertView;\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void setupView() {\n\t\ttv = (TextView) findViewById(R.id.mjson_layout_text);\r\n\t}",
"public abstract View a(Object obj);",
"public void onClick(View v)\n {\n }",
"@Override\n public View getView() {\n return mView;\n }",
"private DetailsEditWatcher(TextView textView) {\n mTextTarget = textView;\n\n }",
"@Override\n\tpublic void onClick(View v) {\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t}",
"void setView(View v);",
"@Override\n\tpublic void onClick(View v) {\n\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\n\t}",
"public MyMusicholder(View v) {\n super(v);\n ivDaily = v.findViewById(R.id.ivDaily);\n tvDaily = v.findViewById(R.id.tvDaily);\n }",
"@Override\r\n\tpublic void onClick(View v) \r\n\t{\n\t}",
"@Override\n public View getView(final int position, View convertView, ViewGroup parent) {\n Holder holder=new Holder();\n View rowView;\n rowView = inflater.inflate(R.layout.teamrow, null);\n holder.tv=(TextView) rowView.findViewById(R.id.teamrowitem);\n holder.tv.setText(result.get(position).get(\"title\"));\n Log.d(\"adapter\",result.get(position).get(\"title\"));\n\n\n\n\n return rowView;\n }",
"@Override\n public void onClick(View v){\n }",
"@Override\n public void onClick(View arg0) {\n\n }",
"@Override\n public void onClick(View v) {\n }",
"@Override\n public void onClick(View v) {\n }",
"@Override\n public void onClick(View v) {\n }",
"@Override\n public void onClick(View v) {\n }",
"@Override\n public void onClick(View v) {\n }",
"@Override\n public void onClick(View v) {\n }",
"public void onClick(View v) {\n }",
"public ViewHolder3(View view)\n {\n super(view);\n this.view = view;\n\n this.author = (TextView) view.findViewById(R.id.author);\n this.rate = (TextView) view.findViewById(R.id.vote_by);\n this.content = (TextView) view.findViewById(R.id.my_review);\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t}",
"@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\t}",
"@Override\n public void onClick(View v) {\n }",
"public TextView getTextView(String text,int textsize){\n TextView textView=new TextView(context);\n textView.setTextColor(Color.parseColor(\"#000000\"));\n textView.setTextSize(textsize);\n textView.setGravity(Gravity.CENTER);\n textView.setText(text);\n textView.setLayoutParams(layoutParams);\n return textView;\n }",
"@Override\n public void onClick(View v) {\n }",
"@Override\n public void onClick(View v) {\n }",
"@Override\n public void onClick(View v) {\n }",
"public RecyclerCardViewHolder(View itemView) {\n super(itemView);\n ivLsPicture = (ImageView) itemView.findViewById(R.id.ivLsPicture);\n tvTitle = (TextView) itemView.findViewById(R.id.tvTitle);\n // textView5 = (TextView) itemView.findViewById(R.id.textView5);\n }",
"TextView getSubTitleView();",
"@Override\r\n public void onClick(View arg0) {\n\r\n }",
"@Override\n public View getView()\n {\n return view;\n }",
"private void setText(View view, String text) {\n\t\t((TextView) view.findViewById(android.R.id.text1)).setText(text);\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\t\n\t}"
] |
[
"0.65789175",
"0.6063401",
"0.60119015",
"0.5998569",
"0.59041584",
"0.58619255",
"0.5833455",
"0.5776519",
"0.57698923",
"0.5705183",
"0.56770957",
"0.5675255",
"0.56090885",
"0.5602747",
"0.5598929",
"0.5593778",
"0.55815107",
"0.5557634",
"0.5555724",
"0.5539827",
"0.5514287",
"0.55117035",
"0.5492176",
"0.54891837",
"0.5488917",
"0.5486892",
"0.5486892",
"0.54668707",
"0.54580235",
"0.54434305",
"0.54434305",
"0.54368967",
"0.5424955",
"0.54246855",
"0.54246855",
"0.5424152",
"0.5417339",
"0.54169774",
"0.5411164",
"0.54055333",
"0.54055333",
"0.54055333",
"0.54055333",
"0.54004985",
"0.54004985",
"0.54004985",
"0.54004985",
"0.54004985",
"0.54004985",
"0.53958744",
"0.539155",
"0.5381079",
"0.5380203",
"0.53801966",
"0.5372433",
"0.5369724",
"0.53681904",
"0.536671",
"0.53568685",
"0.53568685",
"0.5341854",
"0.5337271",
"0.5337271",
"0.5337271",
"0.5334978",
"0.53339165",
"0.5330326",
"0.53286403",
"0.5322148",
"0.53203267",
"0.53203267",
"0.53203267",
"0.53203267",
"0.53203267",
"0.53203267",
"0.53189397",
"0.53170115",
"0.5316226",
"0.5313213",
"0.5312914",
"0.53125155",
"0.5310684",
"0.5310684",
"0.5310684",
"0.53090113",
"0.53083384",
"0.5306515",
"0.5295413",
"0.5294906",
"0.5294629",
"0.5294629",
"0.5294629",
"0.5294629",
"0.5294629",
"0.5294629",
"0.5294629",
"0.5294629",
"0.5294629",
"0.5294629",
"0.5294629",
"0.5294629"
] |
0.0
|
-1
|
consist of the coordinate of the current square
|
QuadTree(String name, double ullon, double ullat, double lrlon, double lrlat, int depth) {
this.ullon = ullon;
this.ullat = ullat;
this.lrlon = lrlon;
this.lrlat = lrlat;
this.name = name;
this.depth = depth;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Square getCurrentPosition();",
"public int getSquareLocation()\n\t\t{\n\t\t\treturn location; // return location of square\n\t\t}",
"public byte getStartSquare (){\r\n\t\treturn start_sq;\r\n\t}",
"public boolean isInside(Square cell) {\n\t\treturn (cell.getRow()>=0 && cell.getRow()<getRows() && cell.getColumn()>=0 && cell.getColumn()<getColumns());\n\t}",
"boolean isPaintedSquare(int row, int col) {\n return grid[row][col];\n }",
"public boolean onStairs(){\n\t\tint yp = 0; int xp = 0;\n\t\tint ys = 1; int xs = 1;\n\t\tfor(int i = 0; i < this.position.length; i ++){//looks though arrays to gather position\n\t\t\tfor(int p = 0 ; p < this.position.length; p++){\n\t\t\t\tif(this.position[i][p] == 1 && this.Stairs[i][p] == 1){\n\t\t\t\t\typ=i; xp=p;\n\t\t\t\t\tys=i; xs=p;\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\tif(yp==ys && xp==xs){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;//if they are not in the same location, return false\n\t}",
"private boolean checkIfGoodSquare(MapLocation location) {\n return (location.x % 2 == location.y % 2) && !location.isAdjacentTo(Cache.myECLocation);\n }",
"public boolean isSquare()\n {\n return width == height;\n }",
"boolean hasCoordinates();",
"boolean hasCoordinates();",
"boolean hasCoordinates();",
"public boolean isSquare() {\r\n \tif (getLength() == getWidth()) {\r\n \t\treturn(true);\r\n \t} else {\r\n \t\treturn(false);\r\n \t}\r\n }",
"public CellPosition isInside(Vector2i coord){\n\t\tCellPosition pos;\n\t\tpos = display.gridDisplay.isInside(coord);\n\t\tif(pos.isFound)\n\t\t\treturn pos;\n\t\t\n\t\tpos = canva.isInside(coord);\n\t\treturn pos;\n\t}",
"boolean hasRect2Value();",
"private static Square[] reachableAdjacentSquares\n (GameBoard board, Square currLoc, int pno) {\n return reachableAdjacentSquares(board, currLoc, pno, -1, 0,true);\n }",
"public boolean isMine(int x, int y);",
"public abstract Rectangle getSnapshotSquareBounds();",
"public boolean isSquareVisited(int row, int col) {\n return playingBoard[row][col].isVisited();\n }",
"public GRect getSquare() {\n\t\treturn square;\n\t}",
"public boolean isOpenSquare(int x, int y)\r\n {\r\n return isValidSqr(x, y) && board[x][y] == null;\r\n }",
"public boolean isSquare() {\n return (getRowDimension() == getColumnDimension());\n }",
"public void verificaCoordenada() {\r\n\t\tif (X < 0) {\r\n\t\t\tX = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tX = X % Const.TAMANHO;\r\n\t\t}\r\n\r\n\t\tif (Y < 0) {\r\n\t\t\tY = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tY = Y % Const.TAMANHO;\r\n\t\t}\r\n\t}",
"public Square getStartSquare() {\n\t\treturn squares.get(0);\n\t}",
"public boolean contains(Ship s){\n\t\treturn myPolygon.contains(s.getX()-10, s.getY()-10,s.getW()/2,s.getH()/2);\n\t\t\n\t}",
"public boolean isSelectedSquare(int sx, int sy) {\n\t\tfor (int i = 0; i < selectedsquares.size(); i++) {\n\t\t\tif (selectedsquares.get(i).getX() == sx && selectedsquares.get(i).getY() == sy) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"Square kingPosition() {\r\n return king;\r\n }",
"Square getSquare(int x, int y);",
"public boolean verifShipCoordinates( IPlayer iPlayer, String startCoord,String endCoord, int size) {\n\t\tif (goodCoordinatesForm(startCoord) && goodCoordinatesForm(endCoord) ) {\r\n\r\n\t\t\tCoordinates coord1 = new Coordinates(startCoord);\r\n\t\t\tCoordinates coord2 = new Coordinates(endCoord);\r\n\t\t\tcoordinatesShipConverter(coord1, coord2);\r\n\t\t\tif (inMap(iPlayer,coord1) && inMap(iPlayer,coord2) ) {\r\n\t\t\t\tif (nonDiagonal(coord1,coord2)) {\r\n\t\t\t\t\tif(goodSize(coord1,coord2, size)) {\r\n\t\t\t\t\t\tif (isEmpty(iPlayer, coord1, coord2)) {\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse { System.out.println(\"Another ship is already on it\");\r\n\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 { System.out.println(\"The size of the ship isn't good, try again it should be \"+ size + \" coordinates large\");\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\telse {System.out.println(\"The ship is in diagonal, try again it should be like A-2\");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse { System.out.println(\"Coordinates out of map, try again it should be between 0 and 10, and A to J\" );// can't do this.height.. because cannot do a static reference to a non static..\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telse { System.out.println(\"Wrong coordinates writing, try again it should be like A-2\");\r\n\t\t}\r\n\t\t// is this presentation very clear ?\r\n\t\t\r\n\treturn false;\r\n\t\r\n\t}",
"@Override\r\n\tpublic boolean hasAsSquare(Square square) {\r\n\t\treturn squares.containsValue(square);\r\n\t}",
"private boolean onBoard(int x, int y){\n if((x<WIDTH&&y<HEIGHT)){\n if(0<=x&&0<=y){\n return true;\n }\n return false;\n }else{\n return false;\n }\n\t}",
"private boolean isInSquare(int k, int row, int col) {\n int[][] square = getSquare(row,col);\n return isInSquare(k,square);\n }",
"public Rectangle getSquare(){\n\t\treturn this.square;\n\t}",
"public boolean coordOnBoard(int row, int col, ArrayList<ArrayList<GamePiece>> board) {\n return (0 <= row && row < board.size()) && (0 <= col && col < board.get(0).size());\n }",
"int occupationHelper(int xPos, int yPos, Board b, char myColor);",
"public boolean needCoordinates() { return needCoords; }",
"public boolean availableSquare(Location location)\n {\n boolean available = false;\n if(countTrees() + countGrasses() <= 10) {\n available = true;\n }\n return available;\n }",
"public boolean isValid() {\n\t\treturn (x >= 0 && x < Board.SIZE && y >= 0 && y < Board.SIZE);\n\t}",
"boolean hasCoordInfo();",
"static boolean isInside(int x, int y, int N) {\n if (x >= 1 && x <= N && y >= 1 && y <= N) {\n return true;\n }\n return false;\n }",
"@Override\n\tpublic double getXLoc() {\n\t\tdouble side = Math.sqrt(getMySize())/2;\n\t\treturn x+side;\n\t}",
"private boolean isInCanvas() {\n\t\tif ((sens.getXPos() >= sens.getXMax()) || (sens.getYPos() >= sens.getYMax()) || (sens.getXPos() < 0) || (sens.getYPos() < 0)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private boolean isInCanvas() {\n\t\tif ((sens.getXPos() >= sens.getXMax()) || (sens.getYPos() >= sens.getYMax()) || (sens.getXPos() < 0) || (sens.getYPos() < 0)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"Boolean CheckIfInside(float xVal, float yVal) {\r\n double distance = Math.sqrt((this.x-xVal)*(this.x-xVal) + (this.y-yVal)*(this.y-yVal));\r\n return (distance <= this.radius);\r\n }",
"boolean hasRect();",
"boolean hasHasXCoordinate();",
"public boolean isInside(){\n\t\tinside = true;\n\t\tif(map.contains(new Rectangle(x,y,(int)spriteSize.getHeight(), (int)spriteSize.getWidth()))==false){\n\t\t\tinside = false;\n\t\t}\n\t\treturn(inside);\n\t}",
"protected boolean checkForWin() {\r\n \t\r\n if (squaresRevealed == this.width * this.height - this.mines) {\r\n finishFlags();\r\n finish(GameStateModel.WON);\r\n return true;\r\n } \t\r\n \t\r\n return false;\r\n \t\r\n }",
"public void setStart() {\r\n // this code handles all events for squares\r\n int x1 = this.origin.getX(); //origin point is used to keep track\r\n int y1 = this.origin.getY(); //of where the rectangle was first pressed\r\n int x2 = this.end.getX();\r\n int y2 = this.end.getY();\r\n int L = this.length;\r\n\r\n if (x1 >= x2 && y1 >= y2) {\r\n this.start = new Point(x1 - L, y1 - L);\r\n } else if (x1 >= x2 && y1 <= y2) {\r\n this.start = new Point(x1 - L, y1);\r\n } else if (x1 <= x2 && y1 >= y2) {\r\n this.start = new Point(x1, y1 - L);\r\n } else if (x1 <= x2 && y1 <= y2) {\r\n this.start = new Point(x1, y1);\r\n }\r\n }",
"public boolean isCellAlive(int x, int y) {\n return this.startGeneration[x][y];\n }",
"boolean isInsideScreen() {\n if (_hitbox.length == 1) {\n float r = _hitbox[0].x;\n PVector c = _getCenter();\n return 0 <= c.x + r && c.x - r < width && 0 <= c.y + r && c.y - r < height;\n }\n \n PVector[] points = this._getPoints();\n for(PVector p : points) {\n if(0 <= p.x && p.x < width && 0 <= p.y && p.y < height) {\n return true;\n }\n }\n return false;\n }",
"private int rowPos(int pos) {\r\n return pos / squareDimension;\r\n }",
"public boolean isValidHorizontal(Square curB, Square preB) {\n \n value = true;\n \n int xdistance = curB.getRow1() - preB.getRow1();\n int ydistance = curB.getCol1() - preB.getCol1();\n int i1;\n \n if ((ydistance < 0) && (xdistance == 0)) {\n for (i1 = curB.getCol1(); i1 < preB.getCol1(); i1 += 1) {\n if (Board.squares[preB.getRow1()][i1].isOccupied()) {\n value = false;\n }\n }\n } else if ((ydistance > 0) && (xdistance == 0)) {\n for (i1 = preB.getCol1(); i1 < curB.getCol1(); i1 += 1) {\n if (Board.squares[preB.getRow1()][i1].isOccupied()) {\n value = false;\n }\n }\n }\n return value;\n }",
"public boolean isValiddiagonal(Square curB, Square preB) {\n boolean value = true;\n int xdistance = curB.getRow1() - preB.getRow1();\n int ydistance = curB.getCol1() - preB.getCol1();\n int i1;\n int j1 = 0;\n \n if ((ydistance != 0) && (xdistance != 0)) {\n if ((xdistance > 0) && (ydistance > 0)) { //move right down\n for (i1 = preB.getCol1(); i1 < curB.getCol1(); i1 += 1) {\n j1++;\n if (Board.squares[preB.getRow1() + j1][preB.getCol1() + j1].isOccupied()) {\n value = false;\n }\n }\n } else if ((xdistance > 0) && (ydistance < 0)) { //move left down\n for (i1 = curB.getCol1(); i1 < preB.getCol1(); i1 += 1) {\n j1++;\n if (Board.squares[preB.getRow1() + j1][preB.getCol1() - j1].isOccupied()) {\n value = false;\n System.out.println(value);\n }\n }\n } else if ((xdistance < 0) && (ydistance > 0)) { //move right up\n for (i1 = preB.getCol1(); i1 < curB.getCol1(); i1 += 1) {\n j1++;\n if (Board.squares[preB.getRow1() - j1][preB.getCol1() + j1].isOccupied()) {\n value = false;\n }\n }\n } else if ((xdistance < 0) && (ydistance < 0)) {\n for (i1 = curB.getCol1(); i1 < preB.getCol1(); i1 += 1) {\n j1++;\n if (Board.squares[preB.getRow1() - j1][preB.getCol1() - j1].isOccupied()) {\n value = false;\n }\n }\n } \n }\n return value;\n }",
"public Square(Point start, Point end, Boolean fill){ //constructor for class Rectangle\r\n this.origin = start;\r\n this.start = start;\r\n this.end = end;\r\n this.fill = fill;\r\n }",
"private boolean inCircle(int x, int y) {\n return Math.pow(x - xs, 2) + Math.pow(y - ys, 2) <= Math.pow(r, 2);\n }",
"public byte getEndSquare (){\r\n\t\treturn end_sq;\r\n\t}",
"boolean isCellAlive(int x, int y);",
"public abstract boolean currentSizeVSCageSize(int row, int col);",
"private static void drawSquare(Graphics2D g, int pSize, int numOfSqr, int startX) {\r\n \r\n for(int i = 0; i < numOfSqr; i++) {\r\n g.setColor(Color.BLACK);\r\n g.fillRect(startX * i - numOfSqr, 0, numOfSqr, pSize);\r\n g.fillRect(0, startX * i - numOfSqr, pSize, numOfSqr);\r\n drawSquare(g, startX, numOfSqr, startX * i, pSize);\r\n \r\n }\r\n }",
"public boolean onGrid(int xValue, int yValue);",
"public boolean isInside(int x, int y) {\r\n if (this.state == 0) {\r\n if ((x >= this.x && x <= (this.x +width)) &&\r\n y >= this.y && y <= (this.y +height)) {\r\n return true;\r\n }\r\n } else if (this.state == 1) {\r\n if ((x <= this.x && x >= (this.x - height)) &&\r\n y >= this.y && y <= (this.y + width)) {\r\n return true;\r\n }\r\n } else if (this.state == 2) {\r\n if ((x <= this.x && x >= (this.x - width)) &&\r\n y <= this.y && y >= (this.y - height)) {\r\n return true;\r\n }\r\n } else if (this.state == 3) {\r\n if ((x >= this.x && x <= (this.x + height)) &&\r\n y <= this.y && y >= (this.y - width)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"protected boolean validCoord(int row, int col) {\n\t\treturn (row >= 0 && row < b.size() && col >= 0 && col < b.size());\n\t}",
"public boolean isWithinObject(int x, int y)\n {\n if( x > coX-Xsize/2 &&\n x < coX+Xsize/2 &&\n y > coY-Ysize/2 &&\n y < coY+Ysize/2 )\n return true;\n else\n return false;\n }",
"public boolean isValidSqr(int x, int y)\r\n {\r\n return (x >= 0) && (x < xLength) && (y >= 0) && (y < yLength);\r\n }",
"private boolean isSquare(int i) {\n return findPreviousPerfectSquare(i) == i;\n }",
"boolean testCoords(Tester t) {\n return t.checkExpect(this.p3.xCoord(), 50) && t.checkExpect(this.p4.yCoord(), 600);\n }",
"void setCurrentPosition(Square currentPosition);",
"@Override\n public boolean isInBounds(int row, int col) {\n return row >= 0 && row < grid.length && col >= 0 && col < grid[0].length;\n }",
"public boolean checkRep() {\n return location.x() >= 0 && location.x() < board.getWidth() && \n location.y() >= 0 && location.y() < board.getHeight(); \n }",
"boolean insideSprite(Sprite s){\n if (s._hitbox.length == 1) {\n if (_hitbox.length == 1) {\n return PVector.dist(s._getCenter(),this._getCenter()) <\n s._hitbox[0].x - this._hitbox[0].x;\n }\n return _insideCirc(_getPoints(), s._getCenter(), s._hitbox[0].x);\n }\n if (s._hitbox.length == 1) {\n // TODO: check if center is in middle but NOT touching any side\n // (will want to adapt existing _circPoly to separate side-touching\n // code into individual method)\n return false;\n }\n return _insidePts(this._getPoints(), s._getPoints());\n }",
"public boolean isOpen(int row, int col) {\n if (isInBounds(row-1, col-1)) {\n return grid[row-1][col-1];\n }\n else {\n throw new java.lang.IllegalArgumentException(\"Bad Coordinates\");\n }\n }",
"private boolean isOccupied(Location loc)\n\t{\n\t\treturn grid[loc.getRow()][loc.getCol()] != null;\n\t}",
"private boolean inBounds(int row, int col){\n if (row > -1 && row < 120 && col > -1 && col < 160)\n return true;\n return false;\n }",
"public boolean mouseWithinBox() {\n return (mouseX > x && mouseX < x + w && mouseY > y && mouseY < y + h);\r\n }",
"public abstract boolean pointerInside(int iPosX, int iPosY);",
"private boolean inBounds(int row, int col)\n {\n return ((row >= 0) && (row < NUM_ROWS) &&\n (col >= 0) && (col < NUM_COLS)); \n }",
"private boolean isMyPiece(Loc thisSpot) {\n\t\tfor (Loc loc : currentPiece.getLocation()) {\n\t\t\tif (loc.row == thisSpot.row && loc.col == thisSpot.col) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n\t@Basic\r\n\tpublic Point getPositionOfSquare(Square square) {\r\n\t\tfor (Map.Entry<Point, Square> e : squares.entrySet()) {\r\n\t\t\tif (e.getValue() == square)\r\n\t\t\t\treturn e.getKey();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private int hitWhichSquare(float testX, float testY) {\r\n int row = 0;\r\n int col = 0;\r\n\r\n // width of each square in the board\r\n float tileWidth = scaleFactor * width / 4;\r\n float tileHeight = scaleFactor * height / 4;\r\n\r\n // where is the top and left of the board right now\r\n float leftX = dx + (1-scaleFactor) * width / 2;\r\n float topY = dy + (1-scaleFactor) * height / 2;\r\n\r\n\r\n for (int i = 0; i < 4; i += 1) {\r\n // test if we are in column i (between the i line and i+1 line)\r\n // leftmost vertical line = line 0\r\n // example: if we are between line 2 and line 3, we are in row 2\r\n if (testX < (i+1) * tileWidth + leftX && i * tileWidth + leftX < testX) {\r\n col = i;\r\n }\r\n\r\n // test if we are in row i (between the i line and i+1 line)\r\n // topmost horizontal line = line 0\r\n // example: if we are between line 0 and line 1, we are in row 0\r\n if (testY < (i+1) * tileHeight + topY && i * tileHeight + topY < testY) {\r\n row = i;\r\n }\r\n }\r\n return row * 4 + col;\r\n }",
"private static int CoordinateFilled(int y, int x) {\r\n\t\tint retVal = y*9+x;\r\n\t\treturn retVal;\r\n\t}",
"public boolean computeCell() {\n boolean b = false;\n int[] tab = null;\n switch (course) {\n case 4:\n tab = CMap.givePositionTale(x, y - (CMap.TH / 2));\n break;\n default:\n tab = CMap.givePositionTale(x, y - (CMap.TH / 2));\n break;\n }\n\n Cell c = game.getMap().getCell(tab);\n if (c != current) {\n current = c;\n b = true;\n }\n return b;\n }",
"public boolean equals(Square other){\n\t\t\treturn this.x==other.x && this.y==other.y;\n\t\t}",
"public boolean isStart () {\n if (this.equals(SquareType.START))\n return true;\n else\n return false;\n }",
"public boolean isFull(int x, int y){\r\n\t\tif (_squares[x][y] == null){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"public Square getSquare(Location loc)\n {\n return squares[loc.getRow()][loc.getCol()];\n }",
"private boolean inOneQuadrant(double x, double y,\n double llx, double lly,\n double urx, double ury) {\n boolean horCond = llx < x == urx < x;\n boolean verCond = lly < y == ury < y;\n return horCond && verCond;\n }",
"private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }",
"public abstract boolean containsPoint(int x, int y);",
"protected boolean positionCorrect(BoatDrawing activeBoat) {\n // Gets the active rectangle's bound\n Rectangle activeRectangle = activeBoat.getBoatRectangle();\n Bounds boundR1 = activeRectangle.getBoundsInParent();\n\n // Tries to find any intersection with the other boats.\n for (Rectangle myRectangle : boatMap.keySet()) {\n if(activeRectangle.equals(myRectangle)) {} else {\n Bounds boundR2 = myRectangle.getBoundsInParent();\n if (boundR1.intersects(boundR2)) {\n return false ;\n }\n }\n } \n // Checks the boat's position in relation to the grid.\n int index ;\n if(activeBoat.isRotation()) {\n index= activeBoat.getGridRow();\n } else {\n index= activeBoat.getGridCol();\n }\n\n return activeBoat.getBoatSize()+index <= NB_CASES_GRID ; \n }",
"public boolean inValidSpot(Path p1){\n\t\t// Checks to see it the path piece placed expects an entrance or exit piece out of bounds\n\t\t\n\t\tint largestRow = (height*width-1)/width;\n\t\t\n\t\t// if entrance or exit pos expected is negative, know it is expecting a path outside the top bound\n\t\tif(p1.getEntry()<0 || p1.getExit()<0){\n\t\t\treturn false;\n\t\t}\n\t\t// if entrance or exit's row greater than the maximum row, know it is expecting a path outside bottom bound\n\t\tif(p1.getEntryRow()>largestRow || p1.getExitRow()>largestRow){\n\t\t\treturn false;\n\t\t}\n\t\tint currentRow = p1.getRow();\n\t\tint nextRow=0;\n\t\tif(Math.abs(p1.getPos()-p1.getEntry())==1){\n\t\t\t// If the absolute value of the difference between the current position and its entrance is 1 ...\n\t\t\t// Checking to see if the entrance is expected to be outside of the left or right edges of Map\n\t\t\tnextRow = p1.getEntryRow();\n\t\t\tif(currentRow!=nextRow){\n\t\t\t\t// This means that the entrance expected is not to the left or to the right\n\t\t\t\t// In other words, the entrance is expected in another row\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(Math.abs(p1.getPos()-p1.getExit())==1){\n\t\t\t// If the absolute value of the difference between the current position and its exit is 1 ...\n\t\t\t// Checking to see if the exit is expected to be outside of the left or right edges of Map\n\t\t\tnextRow = p1.getExitRow();\n\t\t\tif(currentRow!=nextRow){\n\t\t\t\t// This means that the exit expected is not to the left or to the right\n\t\t\t\t// In other words, the exit is expected in another row\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t/*\n\t\tif(Math.abs(p1.getPos()-p1.getEntry())==width){\n\t\t\tnextRow = p1.getEntryRow();\n\t\t\tif(p1.getEntry()<0 || nextRow>(height-1/width)){//it used to be calculaterow(height*width-1\n\t\t\t\t//Less than zero would make it on top of the top edge\n\t\t\t\t//First term calculated in this manner because any negative entrance between -1 and \n\t\t\t\t// -width+1 will have an integer rounded to zero. The double casting will give an \n\t\t\t\t// accurate number without losing the sign\n\t\t\t\t\n\t\t\t\t//Greater than height*width-1 would make in lower than the bottom edge\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(Math.abs(p1.getPos()-p1.getExit())==width){\n\t\t\tnextRow = p1.getExitRow();\n\t\t\tif(p1.getEntry()<0 || nextRow>(height-1/width)){//it used to be calculaterow(height*width-1\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\treturn true;\n\t\t\n\t}",
"Map<BoardCellCoordinates, Set<Integer>> getWinningCoordinates();",
"@Test\n\tpublic void testIfKingIsCaptureBySpecialSquareVert()\n\t{\n\t\tData d=new Data();\n\t\td.set(0,100);\n\t\td.set(29,89);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(89);\n\t\tassertEquals(test_arr.size(),0);\n\t}",
"public Point findSpace(){\r\n Point toReturn = new Point(-1, -1);\r\n for (int i = 0; i<puzzleSize; i++){\r\n for (int j = 0; j<puzzleSize; j++){\r\n if (this.state[i][j] == 0)\r\n toReturn.setLocation(i,j);\r\n }\r\n }\r\n return toReturn;\r\n }",
"private boolean isInSquare(int k, int[][] square) {\n for (int r = 0; r < square.length; r++) {\n for (int c = 0; c < square[r].length; c++) {\n if (square[r][c] == k) return true;\n }\n }\n return false;\n }",
"MazePoint getActivePlayerCoordinates();",
"@Override\r\n\t@Basic\r\n\tpublic Square getSquareAt(Point position) {\r\n\t\t// get() does an equality check, not a reference check\r\n\t\treturn squares.get(position);\r\n\t}",
"public boolean isFull(int row, int col) {\n if (isOpen(row, col)) {\n return mainObject.connected(vsite1, coordinateConvertFrom(row, col));\n }\n return false;\n }",
"public boolean isChessOnWay(location start, location end, chess[][] board) {\n int startX = start.getX();\n int startY = start.getY();\n int endX = end.getX();\n int endY = end.getY();\n\n if(Math.abs(startX-endX) > 0){\n int step = startX < endX ? 1 : -1;\n for(int i = startX+step; i != endX ; i+=step){\n if(board[i][startY]!=null){\n return true;\n }\n }\n }\n else if(Math.abs(startY-endY) > 0){\n int step = startY < endY ? 1 : -1;\n for(int i = startY+step; i != endY; i+=step){\n if(board[startX][i]!=null){\n return true;\n }\n }\n\n }\n return false;\n\n }",
"private boolean isLegalCoordinate(int row, int col) {\n return row > 0 && row <= getSize() && col > 0 && col <= getSize();\n }",
"public boolean contains(double x, double y){\t\t\n\t\t\n\t\treturn x > xCoord - getWidth()/2 &&\n\t\t\t x < xCoord + getWidth()/2 &&\n\t\t\t y > yCoord - getHeight()/2 &&\n\t\t\t y < yCoord + getHeight()/2;\n\t}",
"protected boolean isInside(int x, int y){\n if(x <= super.getLocationX())\n return false;\n\n if(x >= (super.getLocationX() + super.getWidth() - 1))\n return false;\n\n if(y <= super.getLocationY())\n return false;\n\n if(y >= (super.getLocationY() + super.getHeight() - 1))\n return false;\n\n //return true if inside\n return true;\n\n }"
] |
[
"0.6998451",
"0.63961023",
"0.6323392",
"0.6272122",
"0.62617207",
"0.61580163",
"0.6104677",
"0.6101818",
"0.60767895",
"0.60767895",
"0.60767895",
"0.6061543",
"0.60130966",
"0.5936864",
"0.58877194",
"0.5882491",
"0.5880793",
"0.58688897",
"0.58640844",
"0.58365995",
"0.5812901",
"0.57972956",
"0.57922447",
"0.5779065",
"0.5774282",
"0.57645476",
"0.5762555",
"0.57440484",
"0.5713537",
"0.5712467",
"0.57021135",
"0.5696063",
"0.56711",
"0.5668474",
"0.5665593",
"0.56519705",
"0.56443834",
"0.5642264",
"0.5624793",
"0.562315",
"0.5611492",
"0.5611492",
"0.56093967",
"0.56029236",
"0.55999243",
"0.559794",
"0.5597756",
"0.5592051",
"0.55918723",
"0.55842596",
"0.55820405",
"0.55701685",
"0.55665725",
"0.55636764",
"0.5559164",
"0.55590326",
"0.5556131",
"0.5546293",
"0.554235",
"0.5540324",
"0.5532781",
"0.5527404",
"0.5518327",
"0.5513798",
"0.5510988",
"0.5510204",
"0.5509398",
"0.550848",
"0.5507226",
"0.55062616",
"0.5500251",
"0.54998237",
"0.5495287",
"0.54937404",
"0.54920006",
"0.5481583",
"0.54809713",
"0.5480968",
"0.54780495",
"0.5476054",
"0.5473446",
"0.54693174",
"0.5464388",
"0.54528105",
"0.54476535",
"0.54427713",
"0.5441055",
"0.5440041",
"0.543454",
"0.54336023",
"0.54313636",
"0.5429394",
"0.5424907",
"0.5419174",
"0.541755",
"0.54107106",
"0.54053605",
"0.5404917",
"0.54022866",
"0.5398014",
"0.5390458"
] |
0.0
|
-1
|
find the four child of the parent and return as a QuadTree array
|
private QuadTree[] findChild(QuadTree parent) {
double point1_lon = parent.ullon;
double point1_lat = parent.ullat;
double point2_lon = (parent.lrlon + parent.ullon) / 2;
double point2_lat = parent.ullat;
double point3_lon = parent.ullon;
double point3_lat = (parent.ullat + parent.lrlat) / 2;
double point4_lon = (parent.lrlon + parent.ullon) / 2;
double point4_lat = (parent.ullat + parent.lrlat) / 2;
double point5_lon = (parent.lrlon + parent.ullon) / 2;
double point5_lat = parent.lrlat;
double point6_lon = parent.lrlon;
double point6_lat = parent.lrlat;
double point7_lon = parent.lrlon;
double point7_lat = (parent.ullat + parent.lrlat) / 2;
QuadTree ul, ur, ll, lr;
if (parent.name.equals("root")) {
ul = new QuadTree("1", point1_lon, point1_lat, point4_lon, point4_lat, parent.depth + 1);
ur = new QuadTree("2", point2_lon, point2_lat, point7_lon, point7_lat, parent.depth + 1);
ll = new QuadTree("3", point3_lon, point3_lat, point5_lon, point5_lat, parent.depth + 1);
lr = new QuadTree("4", point4_lon, point4_lat, point6_lon, point6_lat, parent.depth + 1);
} else {
ul = new QuadTree(parent.name + "1", point1_lon, point1_lat, point4_lon, point4_lat, parent.depth + 1);
ur = new QuadTree(parent.name + "2", point2_lon, point2_lat, point7_lon, point7_lat, parent.depth + 1);
ll = new QuadTree(parent.name + "3", point3_lon, point3_lat, point5_lon, point5_lat, parent.depth + 1);
lr = new QuadTree(parent.name + "4", point4_lon, point4_lat, point6_lon, point6_lat, parent.depth + 1);
}
QuadTree[] child = new QuadTree[4];
child[0] = ul;
child[1] = ur;
child[2] = ll;
child[3] = lr;
return child;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Object[] getChildArray();",
"private int[] getChildren(int index) {\r\n int[] children = new int[] {\r\n 2 * index + 1,\r\n 2 * index + 2\r\n };\r\n return children;\r\n }",
"Node[] getChildren(Node node);",
"public Node[] getChildren(){return children;}",
"private int get_parent(int index){\r\n return (index-1)/2;\r\n }",
"ArrayList<Cell> getChildren(Integer[][] level){\n int[][] values={{0,1},{0,-1},{1,0},{-1,0}};\n ArrayList<Cell> children = new ArrayList<>();\n for (int i = 0; i < values.length; i++){\n if (isLegalMove(this.getI()+values[i][0], this.getJ()+values[i][1],level)){\n children.add(new Cell(this.getI()+values[i][0], this.getJ()+values[i][1]));\n }\n }\n //the code below achieves the same goal; still here for clarity\n\n// if (isLegalMove(this.getI(), this.getJ()+1, level)) {\n// children.add(new Cell(this.getI(), this.getJ()+1));\n// }\n// if (isLegalMove(this.getI(), this.getJ()-1, level)) {\n// children.add(new Cell(this.getI(), this.getJ()-1));\n// }\n// if (isLegalMove(this.getI()+1, this.getJ(), level)) {\n// children.add(new Cell(this.getI()+1, this.getJ()));\n// }\n// if (isLegalMove(this.getI()-1, this.getJ(), level)) {\n// children.add(new Cell(this.getI()-1, this.getJ()));\n// }\n return children;\n }",
"@Pure\n public QuadTreeNode<D> getUpperLeftChild() {\n QuadTreeNode<D>[] _children = this.children;\n QuadTreeNode<D> _get = null;\n if (_children!=null) {\n _get=_children[1];\n }\n return _get;\n }",
"private int get_left_child(int index){\r\n return 2 * index + 1;\r\n }",
"public XMLElement[] getChildren()\n/* */ {\n/* 532 */ int childCount = getChildCount();\n/* 533 */ XMLElement[] kids = new XMLElement[childCount];\n/* 534 */ this.children.copyInto(kids);\n/* 535 */ return kids;\n/* */ }",
"private int parent(int i){return (i-1)/2;}",
"public RMShape getChild(int anIndex) { return null; }",
"private Node<?> findClosestAncestor(ZQuadTree<?> tree, long quad) {\n assert ZQuad.isAncestor(this.quad, quad);\n if (this.size <= tree.splitThreshold || this.quad == quad) {\n return this;\n } else {\n Node<?>[] children = (Node<?>[]) data;\n for (int i = 0; i < kJunctionChildCount; i++) {\n Node<?> child = children[i];\n if (child != null && ZQuad.isAncestor(child.quad, quad))\n return child.findClosestAncestor(tree, quad);\n }\n return kEmpty;\n }\n }",
"public Node[] getChildren(){\n return children.values().toArray(new Node[0]);\n }",
"Object getChild(int groupPosition, int childPosition);",
"public static List<Node> getChildren(Node parent, int player){\n //System.out.println(\"Parent Board: \");\n //printBoard(parent.board);\n \tList<Node> children = new ArrayList<Node>();\n int[][] parent_matrix = parent.board;\n int[][] copy_matrix = new int[ROW][COLUMN];\n //deep copy\n for(int i=0;i<ROW;i++){\n for(int j=0;j<COLUMN;j++){\n copy_matrix[i][j]=parent_matrix[i][j];\n }\n }\n \n int[][] child_matrix = new int[ROW][COLUMN];\n int column = 0;\n for(column=0; column< COLUMN; column++){\n //if a column is already full, then no need to generate it as a child.\n if(isValid(parent_matrix, column)){\n child_matrix = generateChildMatrix(copy_matrix, column, player);\n Node child_node = new Node(parent, child_matrix);\n children.add(child_node);\n }\n }\n int counter =1; \n for(Node child : children){\n //System.out.println(\"Child: \"+counter++);\n //printBoard(child.board);\n }\n return children;\n }",
"private int parent(int index) {\n return (index - 1) / 2; // 2 = binary heap\n }",
"public TreeNode getChildAt(int i) { return data[i]; }",
"private int parent(int index) {\n return index / 2;\n }",
"private int parent(int index) {\n return index / 2;\n }",
"private int leftChild(int i){return 2*i+1;}",
"@Pure\n public QuadTreeNode<D> getLowerLeftChild() {\n QuadTreeNode<D>[] _children = this.children;\n QuadTreeNode<D> _get = null;\n if (_children!=null) {\n _get=_children[0];\n }\n return _get;\n }",
"public static ArrayList<Node> getChildren(Node current) {\r\n\r\n ArrayList<Node> OpChild = new ArrayList<Node>();\r\n if (current.getParentMove() == null) current.setParentMove(\"\");\r\n if (current.getDirection()==null) current.setDirection(\"\");\r\n int i_Zero = 0, j_Zero = 0;\r\n int[][] CurrState = current.mat;\r\n /*\r\n explain for the fucntions\r\n the function get node and the list. check the border and the parent.\r\n swap the state matrix and then create Node with state mat.\r\n set to the node the cost the direction iterazit and it to the list.\r\n after that add it to the list.\r\n */\r\n\r\n DobleLeft(current, OpChild);\r\n DoubleUp(current, OpChild);\r\n\r\n DoubleRight(current, OpChild);\r\n DoubleDown(current, CurrState, OpChild);\r\n// for the first zero\r\n leftMove(current, current.zero1[0], current.zero1[1], OpChild);\r\n upMove(current, current.zero1[0], current.zero1[1], OpChild);\r\n rightMove(current, current.zero1[0], current.zero1[1], OpChild);\r\n downMove(current, current.zero1[0], current.zero1[1], OpChild);\r\n // check if has 2 zeros\r\n if (current.zero2[0]!=-1) {\r\n leftMove(current, current.zero2[0], current.zero2[1], OpChild);\r\n upMove(current, current.zero2[0], current.zero2[1], OpChild);\r\n rightMove(current, current.zero2[0], current.zero2[1], OpChild);\r\n downMove(current, current.zero2[0], current.zero2[1], OpChild);\r\n\r\n }\r\n return OpChild;\r\n }",
"private static Parent[] makeParents() {\n\t\treturn null;\n\t}",
"public VNode[] getParents() throws VlException // for Graph\n {\n VNode parent=getParent();\n \n if (parent==null)\n return null; \n \n VNode nodes[]=new VNode[1]; \n nodes[0]=parent; \n return nodes;\n }",
"private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }",
"@Pure\n public QuadTreeNode<D> getLowerRightChild() {\n QuadTreeNode<D>[] _children = this.children;\n QuadTreeNode<D> _get = null;\n if (_children!=null) {\n _get=_children[2];\n }\n return _get;\n }",
"public Object[] getChildren(Object parentElement) {\n\t\treturn null;\r\n\t}",
"private Node parent(int i) {\n return heap[parentIndex(i)];\n }",
"private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}",
"public String[] getChildList() {\n if (this.children == null) {\n return this.pointsByChild.keySet().toArray(new String[this.pointsByChild.size()]);\n } else {\n return this.children.clone();\n }\n }",
"public static int size_parentId() {\n return (16 / 8);\n }",
"public abstract List<Node> getChildNodes();",
"private int parent(int index) {\n // Formula to calculate the index of the parent node\n return Math.floorDiv(index - 1, d);\n }",
"public static TreeNode getTree() {\n\t\tTreeNode a = new TreeNode(\"a\", 314);\n\t\tTreeNode b = new TreeNode(\"b\", 6);\n\t\tTreeNode c = new TreeNode(\"c\", 271);\n\t\tTreeNode d = new TreeNode(\"d\", 28);\n\t\tTreeNode e = new TreeNode(\"e\", 0);\n\t\tTreeNode f = new TreeNode(\"f\", 561);\n\t\tTreeNode g = new TreeNode(\"g\", 3);\n\t\tTreeNode h = new TreeNode(\"h\", 17);\n\t\tTreeNode i = new TreeNode(\"i\", 6);\n\t\tTreeNode j = new TreeNode(\"j\", 2);\n\t\tTreeNode k = new TreeNode(\"k\", 1);\n\t\tTreeNode l = new TreeNode(\"l\", 401);\n\t\tTreeNode m = new TreeNode(\"m\", 641);\n\t\tTreeNode n = new TreeNode(\"n\", 257);\n\t\tTreeNode o = new TreeNode(\"o\", 271);\n\t\tTreeNode p = new TreeNode(\"p\", 28);\n\t\t\n\t\ta.left = b; b.parent = a;\n\t\tb.left = c; c.parent = b;\n\t\tc.left = d;\t d.parent = c;\n\t\tc.right = e; e.parent = c;\n\t\tb.right = f; f.parent = b;\n\t\tf.right = g; g.parent = f;\n\t\tg.left = h; h.parent = g;\n\t\ta.right = i; i.parent = a;\n\t\ti.left = j; j.parent = i;\n\t\ti.right = o; o.parent = i;\n\t\tj.right = k; k.parent = j;\n\t\to.right = p; p.parent = o;\n\t\tk.right = n; n.parent = k;\n\t\tk.left = l; l.parent = k;\n\t\tl.right = m; m.parent = l;\n\t\t\n\t\td.childrenCount = 0;\n\t\te.childrenCount = 0;\n\t\tc.childrenCount = 2;\n\t\tb.childrenCount = 6;\n\t\tf.childrenCount = 2;\n\t\tg.childrenCount = 1;\n\t\th.childrenCount = 0;\n\t\tl.childrenCount = 1;\n\t\tm.childrenCount = 0;\n\t\tn.childrenCount = 0;\n\t\tk.childrenCount = 3;\n\t\tj.childrenCount = 4;\n\t\to.childrenCount = 1;\n\t\tp.childrenCount = 0;\n\t\ti.childrenCount = 7;\n\t\ta.childrenCount = 15;\n\t\t\n\t\treturn a;\n\t}",
"public TreeNode getParent() { return par; }",
"@DISPID(4)\n\t// = 0x4. The runtime will prefer the VTID if present\n\t@VTID(10)\n\tcom.gc.IList children();",
"public abstract Graph getChildren(String parentHash);",
"private void split(){\n // Slice horizontaly to get sub nodes width\n float subWidth = this.getBounds().width / 2;\n // Slice vertically to get sub nodes height\n float subHeight = this.getBounds().height / 2;\n float x = this.getBounds().x;\n float y = this.getBounds().y;\n int newLevel = this.level + 1;\n\n // Create the 4 nodes\n this.getNodes().add(0, new QuadTree(newLevel, new Rectangle(x + subWidth, y, subWidth, subHeight)));\n this.getNodes().add(1, new QuadTree(newLevel, new Rectangle(x, y, subWidth, subHeight)));\n this.getNodes().add(2, new QuadTree(newLevel, new Rectangle(x, y + subHeight, subWidth, subHeight)));\n this.getNodes().add(3, new QuadTree(newLevel, new Rectangle(x + subWidth, y + subHeight, subWidth, subHeight)));\n\n }",
"public Object[] getParentInfo(String path);",
"@Test\n public void testParseSingleRoot2() {\n double[] root = new double[] {0.0, 0.75, 0.25};\n double[][] child = new double[][]{ {0.0, 0.0, 0.75}, {1.0, 0.0, 0.0}, {0.0, 0.25, 0.0} };\n int[] parents = new int[3]; \n double score = ProjectiveDependencyParser.parseSingleRoot(root, child, parents);\n System.out.println(Arrays.toString(parents)); \n assertEquals(0.0 + 1.0 + 0.75, score, 1e-13);\n JUnitUtils.assertArrayEquals(new int[]{1, -1, 1}, parents);\n }",
"@Test\n\tpublic void testGetParent() {\n\t\tassertEquals(3, testArrayList.get(Heap.getParent(4)).intValue());\n\t}",
"public abstract Graph getParents(String childVertexHash);",
"private void pruneTree(QuadNode node){\n int i;\n while(node.parent != null && node.quads[0] == null && node.quads[1] == null && node.quads[2] == null && node.quads[3] == null){\n i=0;\n if(node.x != node.parent.x){\n i++;\n }\n if(node.z != node.parent.z){\n i+=2;\n }\n node = node.parent;\n node.quads[i] = null;\n }\n }",
"private EmbeddedTreePlaneSubset getTreeSubset() {\n if (treeSubset == null) {\n treeSubset = new EmbeddedTreePlaneSubset(plane);\n\n if (convexSubset != null) {\n treeSubset.add(convexSubset);\n\n convexSubset = null;\n }\n }\n\n return treeSubset;\n }",
"protected int parent(int i) { return (i - 1) / 2; }",
"@Test\n public void testParseMultiRoot2() {\n double[] root = new double[] {0.0, 0.75, 0.25};\n double[][] child = new double[][]{ {0.0, 0.0, 0.75}, {1.0, 0.0, 0.0}, {0.0, 0.25, 0.0} };\n int[] parents = new int[3]; \n double score = ProjectiveDependencyParser.parseMultiRoot(root, child, parents);\n System.out.println(Arrays.toString(parents)); \n assertEquals(0.75 + 1.0 + 0.25, score, 1e-13);\n JUnitUtils.assertArrayEquals(new int[]{1, -1, -1}, parents);\n }",
"public Node getChild();",
"@Pure\n public QuadTreeNode<D> getUpperRightChild() {\n QuadTreeNode<D>[] _children = this.children;\n QuadTreeNode<D> _get = null;\n if (_children!=null) {\n _get=_children[3];\n }\n return _get;\n }",
"@Override\n\tpublic TreeNode[] getChildren() {\n\t\treturn this.children ;\n\t}",
"private int numChildren(int index){\n\t\t\n\t\tint children = 0;\n\t\t\n\t\tif((index*2) + 1 <= this.currentSize){\n\t\t\tif(array[(index * 2) + 1] != null){\n\t\t\t\tchildren++;\n\t\t\t}\n\t\t}\n\t\tif((index*2) + 1 <= this.currentSize){\n\t\t\tif(array[(index * 2) + 2] != null){\n\t\t\t\tchildren++;\n\t\t\t}\n\t\t}\n\t\treturn children;\n\t}",
"public AST[] getChildren()\r\n {\n \tif (children == null) {\r\n \t\tList<AST> temp = new java.util.ArrayList<AST>();\r\n \t\ttemp.addAll(fields);\r\n \t\ttemp.addAll(predicates);\r\n \t\ttemp.addAll(constructors);\r\n \t\ttemp.addAll(methods);\r\n \t\tchildren = (AST[]) temp.toArray(new AST[0]);\r\n \t}\r\n \treturn children;\r\n }",
"public int[] getChildNodeObjectIDs(){\n\t\treturn _lodNodeData.getChildNodeObjectIDs();\n\t}",
"@DISPID(-2147417075)\n @PropGet\n com4j.Com4jObject children();",
"private int getParent(int index) {\r\n return (index - 1) / 2;\r\n }",
"ArrayList<Expression> getChildren();",
"public int getParent();",
"TreeNodeValueModel<T>[] path();",
"public ListNode[] getChildren(){\n\t\tListNode[] ret = new ListNode[length()];\n\t\tListNode temp = firstNode;\n\t\tfor(int i = 0; i < ret.length && temp != null; i++){\n\t\t\tret[i] = temp;\n\t\t\ttemp = temp.getNextNode();\n\t\t}\n\n\t\treturn ret;\n\t}",
"private ArrayList<Chromosome> selectParentsTournament() {\n ArrayList<Chromosome> parents = new ArrayList<Chromosome>(Defines.crossoverParentCt);\n ArrayList<Chromosome> matingPool = new ArrayList<Chromosome>(Defines.crossoverParentCt);\n\n // Run tournaments to select parents - for each parent\n for (int parentIdx = 0; parentIdx < Defines.crossoverParentCt; parentIdx++) {\n\n // Run tournaments - get random contestants (run.getPaTournamentSize())\n for (int tournIdx = 0; tournIdx < Defines.tournamentSize; tournIdx++) {\n int contestantID = Defines.randNum(0, this.chromosomes.size() - 1);\n matingPool.add(this.chromosomes.get(contestantID));\n }\n Collections.sort(matingPool);\n parents.add(matingPool.get(0));\n }\n\n return parents;\n }",
"public Node[] getChildren() {\n\t\treturn children.toArray(new Node[0]);\n\t}",
"public T deleteMin()\n\t{\t\n\t\t//declating variables\n\t\tint minIndex = 0;\n\t\tboolean flag = false;\n\t\tboolean flag2 = false;\n\t\t//if size == 0; returns null\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t//if checks size and deletes accordingly.\n\t\tif(size == 1)\n\t\t{\n\t\t\tT tempo = array[0];\n\t\t\tarray[0] = null;\n\t\t\tsize--;\n\t\t\treturn tempo;\n\n\t\t}\n\n\t\tif(size == 2)\n\t\t{\n\t\t\tT temp = array[0];\n\t\t\tarray[0] = array[1];\n\t\t\tarray[1] = null;\n\t\t\tsize--;\n\t\t\treturn temp;\n\n\t\t}\n\t\tif(size == 3)\n\t\t{\n\t\t\tT tempo = array[0];\n\t\t\tint small = grandChildMin(1, 2);\n\t\t\tarray[0] = array[small];\n\t\t\tif(small == 2)\n\t\t\t{\n\t\t\t\tarray[small] = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tarray[1] = array[2];\n\t\t\t\tarray[2] = null;\n\t\t\t}\n\n\t\t\tsize--;\n\t\t\treturn tempo;\n\t\t}\n\n\t\t//if size > 3 does sophisticated deleting\n\t\tT temp = array[0];\n\t\tarray[0] = array[size-1];\n\t\tarray[size-1] = null;\n\t\tsize--;\n\t\tint index = 0;\n\n\t\t//gets the smallest of the children & grandchildren\n\t\tint smallest = min(index).get(0);\n\t\t//while it has grandchildren, keeps going\n\t\twhile(smallest != 0)\n\t\t{\n\t\t\t//doesn't switch if im less than the smallest grandchild\n\t\t\t//& breaks\n\t\t\tif(object.compare(array[index], array[smallest]) <= 0 )\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//special case when i could switch with child or grandchild\n\t\t\tif( min(index).size() > 1)\n\t\t\t{\n\t\t\t\tflag2 = true;\n\t\t\t}\n\n\t\t\t//switches the locations and updates index\n\t\t\tT lemp = array[index];\n\t\t\tarray[index] = array[smallest];\n\t\t\tarray[smallest] = lemp;\n\t\t\tindex = smallest;\n\t\t\tsmallest = min(smallest).get(0);\n\n\t\t}\n\t\t//if i dont switch, i check if i have to switch then percolate back up\n\t\tif(flag == true)\n\t\t{\n\t\t\tif(object.compare(array[index], array[grandChildMin(2*index+1, 2*index+2)]) > 0)\n\t\t\t{\n\t\t\t\tint mIndex = grandChildMin(2*index+1, 2*index+2);\n\t\t\t\tT k = array[mIndex];\n\t\t\t\tarray[mIndex] = array[index];\n\t\t\t\tarray[index] = k;\n\n\t\t\t\tint y = mIndex;\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT f = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = f;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(object.compare(array[index], array[(index-1)/2]) > 0)\n\t\t\t{\n\t\t\t\tT m = array[(index-1)/2];\n\t\t\t\tarray[(index-1)/2] = array[index];\n\t\t\t\tarray[index] = m;\n\t\t\t\tint y = (index-1)/2;\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse if(flag2 == true)\n\t\t{\n\t\t\tint y = index;\n\n\t\t\tif(getLevel(y+1) % 2 == 1)\n\t\t\t{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y > 2)\n\t\t\t\t{\n\t\t\t\t\tT k = array[(y-3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = k;\n\t\t\t\t\ty = (y-3)/4;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\n\t\telse if(object.compare(array[index], array[grandChildMin(2*index +1, 2*index+2)]) > 0 && grandChildMin(2*index +1, 2*index+2) != 0)\n\t\t{\n\t\t\tminIndex = grandChildMin(2*index+1, 2*index+2);\n\t\t\tT wemp = array[index];\n\t\t\tarray[index] = array[minIndex];\n\t\t\tarray[minIndex] = wemp;\n\n\t\t\tint y = minIndex;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\t\telse if (object.compare(array[index], array[(index-1)/2]) > 0) \n\t\t{\n\n\t\t\tT femp = array[(index-1)/2];\n\t\t\tarray[(index-1)/2] = array[index];\n\t\t\tarray[index] = femp;\n\n\t\t\tint y = (index-1)/2;\n\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t{\n\t\t\t\tT demp = array[(y-3)/4];\n\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\tarray[y] = demp;\n\t\t\t\ty = (y-3)/4;\n\t\t\t}\n\t\t}\n\n\t\t\n\t\treturn temp;\n\t}",
"private static Object[] getArray(Object[] root, int depth, int index) {\n if (depth == 0) {\n\n // This is a leaf node, return the array.\n return root;\n\n } else {\n\n // This is an internal node; recurse into the appropriate child.\n int nodeIndex = getNodeIndex(index, depth);\n Object[] child = (Object[]) root[nodeIndex];\n return getArray(child, depth - 5, index);\n\n }\n }",
"private int getParentOf(int index) {\n // TODO: YOUR CODE HERE\n return index / 2;\n }",
"@DisplayName(\"Test if the childs are assigned correctly over a path 4 -> 0 -> 1 -> 2 -> 3\")\n @Test\n public void testGetChilds() {\n boolean directed1 = true;\n Graph instance = new Graph(new Edge[0], directed1, 4, 5, GraphType.RANDOM);\n instance.addEdges(edges);\n List<Integer> l0 = new ArrayList<>();\n List<Integer> l1 = new ArrayList<>();\n List<Integer> l2 = new ArrayList<>();\n List<Integer> l3 = new ArrayList<>();\n List<Integer> l4 = new ArrayList<>();\n l0.add(4);\n l1.add(0);\n l2.add(1);\n l3.add(2);\n List[] foo = {l0, l1, l2, l3, l4};\n for (int i = 0; i < 5; i++) {\n Assertions.assertArrayEquals(foo[i].toArray(), instance.getChilds(i).toArray());\n }\n }",
"public Human[] getChildren() {\n return children;\n }",
"private PMCGenotype[] selectParents()\n\t{\n\t\tPMCGenotype[] bestGenes = new PMCGenotype[parentsToSelect];\n\n\t\tint lowestFitnessOfSelectedIndex = 0;\n\t\tdouble lowestFitnessOfSelected = -1;\n\n\t\t// Select initial set of parents.\n\t\tbestGenes[0] = population[0];\n\t\tlowestFitnessOfSelectedIndex = 0;\n\t\tlowestFitnessOfSelected = bestGenes[0].getFitness();\n\t\tfor (int i = 1; i < this.parentsToSelect; i++)\n\t\t{\n\t\t\tbestGenes[i] = population[i];\n\n\t\t\tif (bestGenes[i].getFitness() < lowestFitnessOfSelected)\n\t\t\t{\n\t\t\t\tlowestFitnessOfSelectedIndex = i;\n\t\t\t\tlowestFitnessOfSelected = bestGenes[i].getFitness();\n\t\t\t}\n\t\t}\n\n\t\t// Select candidates with the highest fitness, replacing those with lowest fitness.\n\t\tfor (int i = parentsToSelect; i < population.length; i++)\n\t\t{\n\t\t\tPMCGenotype pmcg = population[i];\n\t\t\tif (pmcg.getFitness() > lowestFitnessOfSelected)\n\t\t\t{\n\t\t\t\tbestGenes[lowestFitnessOfSelectedIndex] = pmcg;\n\n\t\t\t\tlowestFitnessOfSelectedIndex = 0;\n\t\t\t\tlowestFitnessOfSelected = bestGenes[0].getFitness();\n\n\t\t\t\tfor (int j = 1; j < parentsToSelect; j++)\n\t\t\t\t{\n\t\t\t\t\tif (bestGenes[j].getFitness() < lowestFitnessOfSelected)\n\t\t\t\t\t{\n\t\t\t\t\t\tlowestFitnessOfSelectedIndex = j;\n\t\t\t\t\t\tlowestFitnessOfSelected = bestGenes[j].getFitness();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn bestGenes;\n\t}",
"private int parent(int i)\n {\n return (i-1)/d;\n }",
"public ArrayList<Double> branch(BGStem parent) {\n\t\t\n\t\t// Store the node coordinates\n\t\tArrayList <Double> node = new ArrayList<Double>();\n\t\t\n\t\t// Calculate\n\t\tnode.add(parent.getLength() * Math.cos(parent.getDirection()) + parent.getX());\n\t\tnode.add(parent.getLength() * Math.sin(parent.getDirection()) + parent.getY());\n\t\t\n\t\treturn node;\n\t}",
"public XMLElement[] getChildren(String path)\n/* */ {\n/* 641 */ if (path.indexOf('/') != -1) {\n/* 642 */ return getChildrenRecursive(PApplet.split(path, '/'), 0);\n/* */ }\n/* */ \n/* */ \n/* 646 */ if (Character.isDigit(path.charAt(0))) {\n/* 647 */ return new XMLElement[] { getChild(Integer.parseInt(path)) };\n/* */ }\n/* 649 */ int childCount = getChildCount();\n/* 650 */ XMLElement[] matches = new XMLElement[childCount];\n/* 651 */ int matchCount = 0;\n/* 652 */ for (int i = 0; i < childCount; i++) {\n/* 653 */ XMLElement kid = getChild(i);\n/* 654 */ String kidName = kid.getName();\n/* 655 */ if ((kidName != null) && (kidName.equals(path))) {\n/* 656 */ matches[(matchCount++)] = kid;\n/* */ }\n/* */ }\n/* 659 */ return (XMLElement[])PApplet.subset(matches, 0, matchCount);\n/* */ }",
"DendrogramNode<T> getParent();",
"private Object[] getArray(int index) {\n if (index >= getTreeSize(totalSize)) {\n return tail;\n } else {\n return getArray(treeRoot, treeDepth, index);\n }\n }",
"MergeHandler[] getChildren();",
"public int getChildCount();",
"private int parentIndex(int i) {\n return i / 2;\n }",
"TreeNodeValueModel<T> child(int index);",
"private int rightChild(int i){return 2*i+2;}",
"public static int[] getParents(EdgeScores scores) {\n // \n int n = scores.root.length;\n int[] parents = new int[n];\n Arrays.fill(parents, ParentsArray.EMPTY_POSITION);\n if (InsideOutsideDepParse.singleRoot) {\n ProjectiveDependencyParser.parseSingleRoot(scores.root, scores.child, parents);\n } else {\n ProjectiveDependencyParser.parseMultiRoot(scores.root, scores.child, parents);\n }\n return parents;\n }",
"public int getChildCount() {return children.size();}",
"private String[][] childrenNames(LinkedList<QuadTree> Linked) {\n LinkedList<Double> latName = new LinkedList<>();\n Map<Double, LinkedList<String>> res = new HashMap<>();\n for (QuadTree q : Linked) {\n if (!res.containsKey(q.ullat)) {\n res.put(q.ullat, new LinkedList<>());\n latName.addLast(q.ullat);\n }\n res.get(q.ullat).addLast(q.name);\n }\n\n String[][] emptyTree = twoDArray(Linked);\n for (int row = 0; row < emptyTree.length; row++) {\n for (int col = 0; col < emptyTree[0].length; col++) {\n emptyTree[row][col] = \"img/\" + res.get(latName.get(row)).get(col) + \".png\";\n }\n }\n return emptyTree;\n }",
"public static void main(String[] args) {\n\t\tint array[]={2,3,4,6};\n\t\tint n=array.length;\n\t\tint maximum=Integer.MIN_VALUE;\n\t\tint minimum=Integer.MAX_VALUE;\n\t\tfor(int i:array)\n\t\t{\n\t\t\tif(i>maximum)\n\t\t\t\tmaximum=i;\n\t\t\tif(i<minimum)\n\t\t\t\tminimum=i;\n\t\t}\n\t\t\n\t\tint mark[]=new int[maximum+2];\n\t\tint value[]=new int[maximum+2];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tmark[array[i]]=1; // marking ki exist karta hai no need to search in the array.\n\t\t\tvalue[array[i]]=1; //har value se ek fbt to banega hi (1 node ka)\n\t\t}\n\t\tint ans=0;\n\t\tfor(int i=minimum;i<=maximum;i++){\n\t\t\tif(mark[i]==1) // element is present in the array.// we have found the first factor now find 2nd factor.\n\t\t\t{\n\t\t// find the multiples of arr[i] which are less than max value and also less than its square\n\t\t\tfor(int j=i+i ;j<=maximum && j/i<=i;j=j+i)\n\t\t\t{\n\t\t\t\tif(mark[j]==1 && mark[j/i]==1) // i is the first factor and j/i is the 2nd factor.j is the product that serves as root.\n\t\t\t\t{\n\t\t\t\t\t// value =all combination of left child with right child.\n\t\t\t\t\tvalue[j]=value[j] + (value[i] * value[j/i]);\n\t\t\t\t\t\n\t\t\t\t\t// if the 2 child are not same then one more orientation.\n\t\t\t\t\tif(i!=(j/i))\n\t\t\t\t\t\tvalue[j]=value[j] + (value[i] * value[j/i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\tans=ans+value[i];\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"String getFullParentId();",
"public Collection<V> getChildren(V vertex);",
"private void heapify(int arr[], Node parent, int parentPosition) {\n if (parentPosition > arr.length) {\n return;\n }\n try {\n parent.leftChild = new Node(arr[2 * parentPosition - 1]);\n heapify(arr, parent.leftChild, 2 * parentPosition);\n parent.rightChild = new Node(arr[2 * parentPosition]);\n heapify(arr, parent.rightChild, 2 * parentPosition + 1);\n } catch (Exception e) {\n e.getMessage();\n }\n }",
"private int parent(int child) {\n\t\treturn (child-1)/2;\n\t}",
"public Node[] getChildren() {\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\treturn nextLayer;\n\t}",
"public Node getChild(int quadrant) {\n\t\t\tif (quadrant < 0 || quadrant > 3) {\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t} else {\n\t\t\t\treturn children[quadrant];\n\t\t\t}\n\t\t}",
"public V getParent(V vertex);",
"public int findParent(int[] parent, int u) {\n\t\tif (parent[u] == -1) { // matlab u khud ka parent hai/godfather/leader/founder\n\t\t\treturn u;\n\t\t}\n\t\treturn findParent(parent, parent[u]);\n\t}",
"private int leftChild(int index) {\n return index * 2;\n }",
"public Vector<GraphicalLatticeElement> getChildren() {\n\t\tVector<GraphicalLatticeElement> children = new Vector<GraphicalLatticeElement>();\n\t\tif (childrenEdges != null)\n\t\t\tfor (int i = 0; i < childrenEdges.size(); i++) {\n\t\t\t\tEdge edge = childrenEdges.elementAt(i);\n\t\t\t\tchildren.add(edge);\n\t\t\t\tchildren.add(edge.getDestination());\n\t\t\t}\n\t\t\n\t\treturn children;\n\t}",
"public LinkedList<Node> getChildren() { \r\n LinkedList<Node> nodes = new LinkedList<>();\r\n for(int i=0;i<=size;i++)\r\n nodes.add(children[i]);\r\n return nodes;\r\n }",
"public static List<Artist> makeChild4() {\n Artist q = new Artist(\"\", true);\n\n return Arrays.asList(q);\n }",
"Collection<DendrogramNode<T>> getChildren();",
"public int[] getChildNodeObjectIDs(){\n\t\treturn _groupNodeData.getChildNodeObjectIDs();\n\t}",
"int childrenParent () {\r\n\treturn OS.PtWidgetChildBack (handle);\r\n}",
"private BinaryNode<E> buildTree(ArrayList<E> arr, int height, BinaryNode<E> parent) {\n\n if (arr.isEmpty()) return null;\n BinaryNode<E> curr = new BinaryNode<>(arr.remove(0), null, null, parent);\n if (height > 0) {\n curr.left = buildTree(arr, height - 1, curr);\n curr.right = buildTree(arr, height - 1, curr);\n }\n return curr;\n }",
"private int findParent(int[] parent, int i) {\n if (parent[i] == i)\n return i;\n return findParent(parent, parent[i]);\n }",
"public List<RealObject> getChildren();",
"public int getChildCount() { return data.length; }",
"public int[] getChildJustifications() {return childJustifications;}"
] |
[
"0.6511842",
"0.61401516",
"0.60418993",
"0.6006669",
"0.59544355",
"0.58504856",
"0.58103216",
"0.5781958",
"0.57748294",
"0.5711323",
"0.5687178",
"0.5668894",
"0.5650483",
"0.5641603",
"0.56319654",
"0.56132275",
"0.5606957",
"0.5593407",
"0.5593407",
"0.55876136",
"0.55665255",
"0.55461335",
"0.55394876",
"0.5535108",
"0.550025",
"0.547661",
"0.5461044",
"0.54521805",
"0.54065806",
"0.54042506",
"0.5400141",
"0.5388963",
"0.5385438",
"0.5367052",
"0.53659403",
"0.53531474",
"0.5332641",
"0.5331985",
"0.533116",
"0.53291005",
"0.53283805",
"0.53259754",
"0.53165936",
"0.5316304",
"0.5306408",
"0.5305427",
"0.5305062",
"0.5301166",
"0.52995366",
"0.5285931",
"0.527853",
"0.5263345",
"0.5257772",
"0.5249132",
"0.5245553",
"0.5233808",
"0.5233684",
"0.5232713",
"0.52181107",
"0.5207999",
"0.52010614",
"0.5196156",
"0.5195232",
"0.51794136",
"0.5178751",
"0.5178634",
"0.5176444",
"0.5174628",
"0.51726747",
"0.5169351",
"0.51613414",
"0.51529706",
"0.5150795",
"0.5149462",
"0.5147261",
"0.5144096",
"0.51435864",
"0.51406676",
"0.51400805",
"0.513454",
"0.51319605",
"0.5129028",
"0.5124433",
"0.51165277",
"0.5114721",
"0.51106256",
"0.5110501",
"0.51044226",
"0.5102488",
"0.5097602",
"0.509622",
"0.5095129",
"0.509251",
"0.50903517",
"0.50889707",
"0.5088653",
"0.50808394",
"0.5077846",
"0.50755924",
"0.5067755"
] |
0.81279004
|
0
|
return true if the lonDPP of the current box is smaller that the target londpp hence don't need to find more depth
|
private boolean checkResolution(double tar_LonDPP) {
double LonDPP = (this.lrlon - this.ullon) / 256;
return LonDPP <= tar_LonDPP;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private boolean tooSmallforThisPaddock(PaddockCoordinates coor) {\n return ((coor.getX() + coor.getWidth() > this.width)\n || (coor.getY() + coor.getHeight() > this.height));\n }",
"boolean isOverflow() {\r\n\r\n if (children.size() > branchingFactor) {\r\n return true;\r\n }\r\n return false;\r\n }",
"private boolean seeNextFloorX(Position target) {\n if (target.x == position.x) {\n return false;\n }\n if (target.x > position.x) {\n\n return world[position.x + 1][position.y].equals(Tileset.FLOOR);\n }\n if (target.x < position.x) {\n return world[position.x - 1][position.y].equals(Tileset.FLOOR);\n }\n return false;\n }",
"private static boolean isLocalMaximum(Integer pid, double searchRadius) {\n\t\tdouble[] coordinates = points.get(pid);\n\t\tint density = pointID_Density.get(pid) == null ? 0 : pointID_Density.get(pid);\n\t\tEnvelope itemEnv;\n\t\t;\n\t\tList<Integer> result;\n\t\titemEnv = new Envelope(coordinates[0] - searchRadius, coordinates[0] + searchRadius,\n\t\t\t\tcoordinates[1] - searchRadius, coordinates[1] + searchRadius);\n\t\tresult = tree.query(itemEnv);\n\t\tfor (Integer nid : result) {\n\t\t\tdouble[] coordinates2 = points.get(nid);\n\t\t\tdouble dist = calculateDistanceBetweenPoints(coordinates, coordinates2);\n\t\t\tif (dist <= searchRadius) {\n\t\t\t\tdouble density_near = pointID_Density.get(nid) == null ? 0 : pointID_Density.get(nid);\n\t\t\t\tif (density_near > density)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private boolean reachX(Position target) {\n return position.x == target.x;\n }",
"public boolean wideSnakeOnDot()\n {\n if(up || down)\n {\n //Location p = new Location(head.getA()-30,head.getB());\n //Location m = new Location(head.getA()-15,head.getB());\n //Location n = new Location(head.getA()+15,head.getB());\n //Location o = new Location(head.getA()+30,head.getB()); \n //if(dot.isEqual(m) || dot.isEqual(n) || dot.isEqual(o) || head.isEqual(p))\n // return true;\n \n if(Math.abs(head.getA()-dot.getA())<50 && (head.getB()-dot.getB() == 0))\n {\n return true;\n } \n } \n else if(left || right)\n {\n //Location p = new Location(head.getA(),head.getB()-30);\n //Location m = new Location(head.getA(),head.getB()-15);\n //Location n = new Location(head.getA(),head.getB()+15);\n //Location o = new Location(head.getA(),head.getB()+30); \n //if(dot.isEqual(m) || dot.isEqual(n) || dot.isEqual(o) || head.isEqual(p))\n // return true;\n \n \n if(Math.abs(head.getB()-dot.getB())<50 && (head.getA()-dot.getA() == 0))\n {\n return true;\n }\n }\n return false;\n }",
"private boolean hasReachedBottom() {\n\t\tfor (Segment s:this.getHorizontalProjection().getShapeSegments()){\n\t\t\t\n\t\t\tHeightProfile hs = this.grid.heightAt(s);\n\t\t\t\n\t\t\tfor (int h : hs){\n\t\t\t\t\n\t\t\t\tif (this.bottomLeft.getY() <= h){\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 leftBoundsReached(float delta) {\n return (textureRegionBounds2.x - (delta * speed)) <= 0;\n }",
"public boolean isOverflow() {\n\t\treturn (children.size() >= degree + 1) || (data.size() >= degree);\n\t}",
"public boolean nearMaxMin() {\n double water = this.levelMessage.getDoubleParameter();\n double no = (this.configuration.getMaximalLimitLevel()\n - this.configuration.getMaximalNormalLevel()) / 4;\n if (water > this.configuration.getMaximalLimitLevel()\n || water > this.configuration.getMaximalLimitLevel() - no) {\n return true;\n } else if (water < this.configuration.getMinimalLimitLevel()\n || water < this.configuration.getMinimalLimitLevel() + no) {\n\n return true;\n }\n return false;\n }",
"private boolean isSurroundedByDeepSpace() {\n List<Cell> surrounding = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n int i = 0;\n boolean isAllDeepSpace = true;\n while (i < surrounding.size() && (isAllDeepSpace)) {\n if (!isDeepSpace(surrounding.get(i))) {\n isAllDeepSpace = false;\n } else {\n i++;\n }\n }\n return isAllDeepSpace;\n }",
"private boolean cutoffTest(Node state) {\n\t\tboolean checkCutOff = state.getGame().gameWon() != Chip.NONE || state.getDepth() >= this.maxDepth;\n\t\tif (checkCutOff) {\n\t\t\tif (this.maximumDepthReachedThisTurn < state.getDepth())\n\t\t\t\tthis.maximumDepthReachedThisTurn = state.getDepth();\n\t\t}\n\t\t\t\n\t\treturn checkCutOff;\n\t}",
"private boolean check(int[] bestPoint) {\n\t\tif (bestPoint[0] > Mirror.spec || bestPoint[1] > Mirror.spec || bestPoint[0] < width - Mirror.spec\n\t\t\t\t|| bestPoint[1] < width - Mirror.spec) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\n\t}",
"public boolean overLaps(Property prop) {\n if (this.getXRight() <= prop.getXLeft() || this.getXLeft() >= prop.getXRight()\n || this.getYTop() >= prop.getYBottom() || this.getYBottom() <= prop.getYTop()) {\n return false;\n }\n return true;\n }",
"@Override\r\n public boolean canMove() {\r\n Grid<Actor> gr = getGrid();\r\n int dirs[] = {\r\n Location.AHEAD, Location.HALF_CIRCLE, Location.LEFT,\r\n Location.RIGHT };\r\n // 当终点在周围时,不能移动且isEnd应当为true\r\n for (int i = 0; i < dirs.length; i++) {\r\n Location tarLoc = getLocation().getAdjacentLocation(dirs[i]);\r\n if (gr.isValid(tarLoc) && gr.get(tarLoc) != null) {\r\n // Color直接用==计算竟然不可行(真是哔了dog...\r\n if (gr.get(tarLoc) instanceof Rock\r\n && gr.get(tarLoc).getColor().equals(Color.RED)) {\r\n isEnd = true;\r\n return false;\r\n }\r\n }\r\n }\r\n ArrayList<Location> nextLocs = getValid(getLocation());\r\n // 当附近没有可以移动的位置时,不能移动\r\n if (nextLocs.size() == 0) {\r\n return false;\r\n }\r\n // 当可以移动的位置>1时,说明存在一个节点,这个节点应当被新建一个arraylist入栈\r\n if (nextLocs.size() > 1) {\r\n ArrayList<Location> newStackElem = new ArrayList<Location>();\r\n newStackElem.add(getLocation());\r\n crossLocation.push(newStackElem);\r\n }\r\n // 有可以移动的位置时,向概率最高的方向移动\r\n int maxProbLoc = 0;\r\n // 由于nextLocs不一定有4个location,所以只好循环判断取最大值\r\n for (int i = 0; i < nextLocs.size(); i++) {\r\n Location loc = nextLocs.get(i);\r\n int dirNum = getLocation().getDirectionToward(loc) / 90;\r\n if (probablyDir[dirNum] > probablyDir[maxProbLoc]) {\r\n maxProbLoc = i;\r\n }\r\n }\r\n next = nextLocs.get(maxProbLoc);\r\n return true;\r\n }",
"private Point2D nearest(Node x, Point2D p, RectHV rect, boolean test) {\n\t\tPoint2D incumbent = x.point;\n\t\tPoint2D challenger;\n\t\tRectHV leftRect, rightRect;\n\t\tdouble distance = incumbent.distanceTo(p);\n\t\t\n\t\tif (test) {\n\t\t\tleftRect = new RectHV(rect.xmin(), rect.ymin(), x.point.x(), rect.ymax());\n\t\t\trightRect = new RectHV(x.point.x(), rect.ymin(), rect.xmax(), rect.ymax());\n\t\t} else {\n\t\t\tleftRect = new RectHV(rect.xmin(), rect.ymin(), rect.xmax(), x.point.y());\n\t\t\trightRect = new RectHV(rect.xmin(), x.point.y(), rect.xmax(), rect.ymax());\n\t\t}\n\n\t\tdouble comp = comparePoints(x, p, test);\n\t\tif (comp <= 0) {\n\t\t\tif (x.left != null) {\n\t\t\t\tif ((challenger = nearest(x.left, p, leftRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (x.right != null) {\n\t\t\t\tif (rightRect.distanceTo(p) < distance) {\n\t\t\t\t\tif ((challenger = nearest(x.right, p, rightRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\tif (x.right != null) {\n\t\t\t\tif ((challenger = nearest(x.right, p, rightRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (x.left != null) {\n\t\t\t\tif (leftRect.distanceTo(p) < distance) {\n\t\t\t\t\tif ((challenger = nearest(x.left, p, leftRect, !test)).distanceTo(p) < distance) {\n\t\t\t\t\t\tincumbent = challenger;\n\t\t\t\t\t\tdistance = challenger.distanceTo(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn incumbent;\n\t}",
"private boolean rightBoundsReached(float delta) {\n return (textureRegionBounds2.x - (delta * speed)) > Constants.APP_WIDTH;\n }",
"boolean canBeOnTop(Box b2) {\n\t\t\tif(b2 == null)\n\t\t\t\treturn true;\n\t\t\t\n\t\t\tif(this.width < b2.width && this.height < b2.height && this.depth < b2.depth)\n\t\t\t\treturn true;\n\t\t\t\n\t\t\treturn false;\n\t\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 boolean isPerdu() {\n\t\tassert(f.getLevel() != null);\n\t\t\n\t\tLevel l = f.getLevel();\n\t\t\n\t\tif(l.getBall() == null) {//pour le menu principal -> pas de balle\n\t\t\treturn false;\n\t\t}\n\t\tif(l.getType() == Type.INVERSE) {\n\t\t\treturn l.getBall().getPosY()<50;//en haut de l'ecran\n\t\t}else {\n\t\t\treturn l.getBall().getPosY()>f.getHauteurFenetre()-50;//en bas de l'ecran\n\t\t}\n\t}",
"boolean growing(boolean bothDimensions) {\n if (complete()) {\n if (bothDimensions)\n return (start2D.x < stop2D.x) && (start2D.y <= stop2D.y);\n else\n return (start2D.x < stop2D.x) || (start2D.y <= stop2D.y);\n } else\n return true;\n }",
"public boolean sameAsGold() {\n\t\tif (this.level == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\tArrayList<Gold> goldObjects = this.level.getGoldObjects();\n\n\t\tfor (int i = 0; i < goldObjects.size(); i++) {\n\t\t\tif (this.tilePositionX == goldObjects.get(i).getPositionX()\n\t\t\t\t\t&& this.tilePositionY == goldObjects.get(i).getPositionY()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"protected boolean findTarget(){\n\t\t// shoot units\n\t\tfloat tmpDist = -1;\n\t\tUnit tmpUnit = null;\n\t\tfor(Unit u:Game.map.get(tileId).unitMap){ // loop through units on\n\t\t\t\t\t\t\t\t\t\t\t\t\t// maptile\n\t\t\tif(this.id == u.id)\n\t\t\t\tcontinue;\n\t\t\tif(this.ownerId == u.ownerId)\n\t\t\t\tcontinue;\n\t\t\tif(u.dead)\n\t\t\t\tcontinue;\n\t\t\tVector3f tmp = Vector3f.sub(this.modelPos, u.modelPos, null);\n\t\t\tif(tmpDist == -1 || tmp.length() < tmpDist){\n\t\t\t\ttmpUnit = u;\n\t\t\t\ttmpDist = tmp.length();\n\t\t\t}else\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(tmpDist != -1 && tmpDist <= range && tmpUnit != null){\n\t\t\tthis.hostile = tmpUnit;\n\t\t\tthis.target = this.hostile.modelPos;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean lessP(Stella_Object y) {\n { Ratio x = this;\n\n { Ratio yRatio = ((Ratio)(x.coerceTo(y)));\n\n return ((x.numerator * yRatio.denominator) < (yRatio.numerator * x.denominator));\n }\n }\n }",
"private PointDist findNearest(Node curr, RectHV rect, PointDist minP, boolean Isx) {\n double currDist;\n PointDist p1;\n PointDist p2;\n // double currDist = findNearP.distanceSquaredTo(curr.point);\n /*\n if (currDist < pointDist.dist)\n minP = new PointDist(curr.point, currDist);\n else\n minP = pointDist;\n\n */\n if (Isx) {\n if (curr.left != null) {\n RectHV leftRect = new RectHV(rect.xmin(), rect.ymin(), curr.point.x(), rect.ymax());\n currDist = findNearP.distanceSquaredTo(curr.left.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.left.point, currDist);\n if (minP.dist > leftRect.distanceSquaredTo(findNearP)) {\n p1 = findNearest(curr.left, leftRect, minP, false);\n if (p1 != null)\n if (p1.dist < minP.dist)\n minP = p1;\n }\n }\n if (curr.right != null) {\n RectHV rightRect = new RectHV(curr.point.x(), rect.ymin(), rect.xmax(), rect.ymax());\n currDist = findNearP.distanceSquaredTo(curr.right.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.right.point, currDist);\n if (minP.dist > rightRect.distanceSquaredTo(findNearP)) {\n p2 = findNearest(curr.right, rightRect, minP, false);\n if (p2 != null)\n if (p2.dist < minP.dist)\n minP = p2;\n }\n }\n }\n else {\n if (curr.left != null) {\n RectHV leftRect = new RectHV(rect.xmin(), rect.ymin(), rect.xmax(), curr.point.y());\n currDist = findNearP.distanceSquaredTo(curr.left.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.left.point, currDist);\n if (minP.dist > leftRect.distanceSquaredTo(findNearP)) {\n p1 = findNearest(curr.left, leftRect, minP, true);\n if (p1 != null)\n if (p1.dist < minP.dist)\n minP = p1;\n }\n }\n if (curr.right != null) {\n RectHV rightRect = new RectHV(rect.xmin(), curr.point.y(), rect.xmax(), rect.ymax());\n currDist = findNearP.distanceSquaredTo(curr.right.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.right.point, currDist);\n if (minP.dist > rightRect.distanceSquaredTo(findNearP)) {\n p2 = findNearest(curr.right, rightRect, minP, true);\n if (p2 != null)\n if (p2.dist < minP.dist)\n minP = p2;\n }\n }\n }\n return minP;\n }",
"public boolean percolates() {\n for (int i = 0; i < size; i++) {\r\n if (flowGrid[size * (size - 1) + i] < size) { // if any of the bottom row points at any of the index in the top row\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"private boolean isAboveLimit(FallingPiece piece){\r\n\t\tfor (Point p : piece.allOuterPoints()) {\r\n if (p.Y() >= height) \r\n return true;\r\n }\r\n\t\treturn false;\r\n\t}",
"private boolean isBigger(int pos1, int pos2) {\n //Comparable c1 = heap.get(pos1);\n //Comparable c2 = heap.get(pos2);\n //return c1.compareTo(c2) > 0;\n return heap.get(pos1).compareTo(heap.get(pos2)) > 0;\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}",
"public boolean percolates(){\n \tif(this.gridLength == 1){\n \t\treturn isOpen(1,1);\n \t}\n \treturn (this.bottom[unionTest.find(0)]);\n }",
"public boolean determineWinner(){\n // search top down\n for(int x = 0; x < SIZE; x++){\n if(!stacks[x][0].isEmpty()){\n Point startingPoint = new Point(x, 0);\n ArrayList<Point> visited = new ArrayList<>();\n visited.add(startingPoint);\n TakTree<TakPiece> tree = new TakTree<>();\n tree.addRoot(getTop(startingPoint));\n treeBuilder(tree, startingPoint, visited);\n }\n\n if(whiteWins && blackWins){ // Only exit if we have found that both win\n return true;\n }\n }\n\n for(int y = 1; y < SIZE; y++){\n if(!stacks[0][y].isEmpty()){\n Point startingPoint = new Point(0, y);\n ArrayList<Point> visited = new ArrayList<>();\n visited.add(startingPoint);\n TakTree<TakPiece> tree = new TakTree<>();\n tree.addRoot(getTop(startingPoint));\n treeBuilder(tree, startingPoint, visited);\n }\n\n if(whiteWins && blackWins){ // Only exit if we have found that both win\n return true;\n }\n }\n\n // did we find a winner?\n return whiteWins || blackWins;\n }",
"private boolean isSurroundedByDirtAndLava() {\n List<Cell> surrounding = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n int i = 0;\n boolean isAllDirt = true;\n while (i < surrounding.size() && (isAllDirt)) {\n if (!isDirt(surrounding.get(i)) && !isLava(surrounding.get(i))) {\n isAllDirt = false;\n } else {\n i++;\n }\n }\n return isAllDirt;\n }",
"private boolean isItThisNode(KdNode kdNode, Point2D p) {\n int comparison;\n\n if (kdNode == null) return false;\n if (kdNode.point.equals(p))\n return true;\n\n if (kdNode.dimension) { // if this KdNode is vertical (root.dimension == true)\n comparison = Double.compare(p.x(), kdNode.point.x());\n if (comparison == 0) comparison = Double.compare(p.y(), kdNode.point.y());\n }\n else { // if this KdNode is horizontal (root.dimension == false)\n comparison = Double.compare(p.y(), kdNode.point.y());\n if (comparison == 0) comparison = Double.compare(p.x(), kdNode.point.x());\n }\n\n if (comparison > 0) {\n if (kdNode.right == null) {\n // dead end when searching for where point should be, it is not in the set\n return false;\n }\n else {\n return isItThisNode(kdNode.right, p);\n }\n }\n else { // comparison < 0\n if (kdNode.left == null) {\n // dead end when searching for where point should be, it is not in the set\n return false;\n }\n else {\n return isItThisNode(kdNode.left, p);\n }\n }\n }",
"public boolean estaLlena() {\n return (capacidad == top+1); // regresa verdadero si la capacidad es igual al tope (la cima +1)\r\n }",
"public boolean hasReachedLEDTarget() {\n\t\tif (closestWhiteLED != null) {\n\t\t\tif (sens.isCloseTo(closestWhiteLED.getTargetX(), closestWhiteLED.getTargetY(), 2)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private static boolean moveCloserToTarget() {\n Direction f = forward;\n int startingDistance = target.distanceSquaredTo(S.rc.getLocation());\n forward = S.rc.getLocation().directionTo(target);\n forward = forward.rotateLeft();\n for (int i = 0; i < 8; i++) {\n if (target.distanceSquaredTo(S.rc.getLocation().add(forward)) < startingDistance)\n if (moveForwardStrict())\n return true;\n forward = forward.rotateRight();\n }\n forward = f;\n return false;\n }",
"public boolean hitPaddle(boolean is_right_dir){\n\t\tif(is_right_dir){\n\t\t\tif(b.getX() >= p1.getX() && b.getX() < (p1.getX() + p1.getWidth()) && b.getY() >= p1.getY() && b.getY() <= p1.getY() + p1.getHeight()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(b.getX() <= p2.getX() && b.getX() > (p2.getX() - p2.getWidth()) && b.getY() >= p2.getY() && b.getY() <= p2.getY() + p2.getHeight()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"boolean hasDepth();",
"boolean hasDepth();",
"private void searchForNearest(KdNode kdNode, Point2D p, RectHV rectangle) {\n int comparison;\n // 2 rectangles that will store the coordinates of the rectangles that are delimited by kdNode's children,\n // used in order to calculate the distance to them and see if it's worth looking down the path inside them as well\n // (i.e. if the distance from point p to the rectangle is less than the distance to an already established nearest)\n RectHV rectLeftBelow, rectRightAbove;\n\n if (kdNode.point.equals(p)) {\n // if the point we're looking at actually equals the query point, we return here,\n // as we can no longer find a distance lower than 0\n nearest = kdNode.point;\n return;\n }\n\n // if the point in the current node is closer to the searched node, we update nearest\n if (p.distanceSquaredTo(kdNode.point) < p.distanceSquaredTo(nearest))\n nearest = kdNode.point;\n\n if (kdNode.dimension) { // if this KdNode is vertical (root.dimension == true), then we have left/right rectangles\n rectLeftBelow = new RectHV(rectangle.xmin(), rectangle.ymin(),\n kdNode.point.x(), rectangle.ymax());\n rectRightAbove = new RectHV(kdNode.point.x(), rectangle.ymin(),\n rectangle.xmax(), rectangle.ymax());\n }\n else { // if this KdNode is horizontal (root.dimension == false), then we have below/above rectangles\n rectLeftBelow = new RectHV(rectangle.xmin(), rectangle.ymin(),\n rectangle.xmax(), kdNode.point.y());\n rectRightAbove = new RectHV(rectangle.xmin(), kdNode.point.y(),\n rectangle.xmax(), rectangle.ymax());\n }\n // we look at which rectangle is nearest to the query point, in order to go down that path first\n comparison = Double.compare(rectLeftBelow.distanceSquaredTo(p),\n rectRightAbove.distanceSquaredTo(p));\n\n if (comparison < 0) { // if distance to left/lower rectangle is lower than to right/upper\n if (kdNode.left != null) {\n if (rectLeftBelow.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.left, p, rectLeftBelow);\n }\n // if it's larger than to nearest, the distance to the other\n // rectangle will certainly be even larger, so we return here\n else return;\n }\n if (kdNode.right != null) {\n if (rectRightAbove.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.right, p, rectRightAbove);\n }\n // else return; // return statement not needed, if (comparison < 0) statement terminates here anyway\n }\n }\n else { // comparison < 0, the opposite situation holds: distance to right/upper rectangle is lower than to left/lower\n if (kdNode.right != null) {\n if (rectRightAbove.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.right, p, rectRightAbove);\n }\n else return;\n }\n if (kdNode.left != null) {\n if (rectLeftBelow.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.left, p, rectLeftBelow);\n }\n }\n\n }\n }",
"private boolean isAtLeastOneMemberNotToFarAwayFromSpawnPoint(final LinkedList<Fightable> kis) {\n\t\t\n\t\tfor (Fightable ki : kis) {\n\t\t\tif (Points.distBetweenTwoPoints(ki.getCoord(), ki.getSpawnPoint()) \n\t\t\t\t\t< ki.getAttributeValue(Attribute.viewRange) * VIEWRANGE_FACTOR) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean offScreen() {\r\n\t\treturn (this.getY() < -TREE_HEIGHT || this.getY() > 1000); \r\n\t}",
"private boolean check(SparseFractalSubTree reciver){\r\n boolean reciverPast = false;\r\n\r\n SparseFractalSubTree prev = reciver;\r\n for(int i = 0; i < subTrees.length-1; i++){\r\n if(!reciverPast) {\r\n if(subTrees[i] == reciver) {\r\n //(i+1)*h\r\n reciverPast = true;\r\n } else {\r\n //h+1\r\n assert (subTrees[i].getTailHeight() >= subTrees[i].getMinLevel()-1);\r\n }\r\n } else {\r\n SparseFractalSubTree subTree = subTrees[i];\r\n //2h\r\n assert(prev.getTailHeight() == Byte.MAX_VALUE ||\r\n (\r\n (subTree.getTailHeight() >= prev.getTailHeight()) &&\r\n (subTree.getTailHeight() >= prev.getMinLevel())\r\n )\r\n );\r\n\r\n prev = subTree;\r\n }\r\n\r\n }\r\n return true;\r\n }",
"private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }",
"public final boolean lessThan() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue < topMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean percolates(){\n\t\treturn unionFind.connected(virtualBottom, virtualTop);\n\t}",
"boolean hasTargetPos();",
"private static boolean _isTooTarget(SPTarget p1Target, ObservationElements elems) {\n final ISPObservation obs = elems.getObservationNode();\n if (obs == null || !Too.isToo(obs)) return false;\n\n final ITarget t = p1Target.getTarget();\n if (t instanceof HmsDegTarget) {\n final HmsDegTarget hmsDeg = (HmsDegTarget) t;\n return hmsDeg.getRa().getValue() == 0.0 &&\n hmsDeg.getDec().getValue() == 0.0; ///\n }\n\n return false;\n }",
"public boolean isDead() {\n\t\tint boxX = parentBox.x;\n\t\tint boxY = parentBox.y;\n\t\tint boxLength = parentBox.LENGTH;\n\t\n\t\tif (boxX == x && boxY < y + length && boxY > y) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean hitMyPaddle() {\n if (b.numX - 60 <= 0) {\n if ((b.numY <= (this.touchedY + 260)) && (b.numY >= (this.touchedY - 260))) {\n } else {\n this.wentOffWall();\n }\n return true;\n } else {\n return false;\n }\n }",
"private boolean overlappingGateways(BpmnShape s1, BpmnShape s2) {\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\tdouble firstApothem = (s1.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\tdouble secondApothem = (s2.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX - firstApothem < secondX + secondApothem || firstY - firstApothem < secondY + secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstApothem < secondX + secondApothem || firstY + firstApothem > secondY - secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif ((firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX + firstApothem > secondX - secondApothem || firstY - firstApothem < secondY + secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstApothem < secondX + secondApothem || firstY + firstApothem > secondY - secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isWin_LordVetinari(){\r\n // player got lordVetinari card\r\n Player playerHoldCard = null;\r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(player.getPersonalityCardID() == 1){\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if (playerHoldCard != null) {\r\n int numPlayers = discWorld.getPlayer_HASH().size();\r\n\r\n Set<Integer> areaList = new HashSet<Integer>();\r\n for (Integer minionID : playerHoldCard.getMinionList()) {\r\n int minion_ID = minionID;\r\n MinionPiece minion = discWorld.getMinionPiece_HASH().get(minion_ID);\r\n if (minion.getAreaNumber() != ConstantField.DEFAULT_UNDEFINED_PLAYID) {\r\n int areaID = minion.getAreaNumber();\r\n Area area = discWorld.getArea_HASH().get(areaID);\r\n // make sure free of demon\r\n if (area.getDemonList().size() == 0) {\r\n areaList.add(minion.getAreaNumber());\r\n }\r\n }\r\n\r\n }\r\n\r\n if (numPlayers == 2) {\r\n\r\n if (areaList.size() >= 11) {\r\n return true;\r\n }\r\n\r\n } else if (numPlayers == 3) {\r\n\r\n if (areaList.size() >= 10) {\r\n return true;\r\n }\r\n\r\n } else if (numPlayers == 4) {\r\n\r\n if (areaList.size() >= 9) {\r\n return true;\r\n }\r\n\r\n }\r\n }\r\n\r\n return false;\r\n }",
"public boolean findBestMatch() {\n\t\t\tif(nodes.size() >= nodeLimit) return false;\n\n\t\t\tdouble bestScore = 0.0;\n\t\t\tint bestLight = -1;\n\t\t\tfor(int p = 0; p < lights.size(); p++) {\n\t\t\t\tif(nodeIndex.contains(p)) continue;\n\t\t\t\tdouble score = scoreByDistance(lights.get(p));\n\t\t\t\tif(score != Double.NaN && score > bestScore) {\n\t\t\t\t\tbestScore = score;\n\t\t\t\t\tbestLight = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(bestLight >= 0) {\n\t\t\t\taddNode(bestLight);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"private boolean checkNearbyVillagers() {\n\t\tIterator<Integer> it = sprites.keySet().iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tSprite as = sprites.get(it.next());\n\t\t\tif (as instanceof Villager) {\n\t\t\t\tVillager v = (Villager) as;\n\t\t\t\tif (v.checkTalkable(player.pos, player.direction)) {\n\t\t\t\t\treturn executeTalkableVillager(v);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private boolean isRockTouchingCity(RockView targetRock) {\n\n boolean isTouching = false;\n\n for (int i = 0; i < cityCount; ++i) {\n double distance = targetRock.calcDistance(cityLocations[i]);\n\n if (distance <= citySize * 1.5) {\n isTouching = true;\n }\n }\n\n return isTouching;\n }",
"public static boolean isLarger(Circle x, Rectangle y){\n if(x.getArea() > y.area()){\n return true;\n }\n else{\n return false;\n }\n }",
"public boolean isWinner() {\n\t\t//initialize row, column, and depth\n\t\tint row = 0;\n\t\tint col = 0;\n\t\tint dep = 0;\n\t\t\n\t\t//Checks for a vertical four in a row\n\t\t//row is restriced from the full size to >=3 to avoid\n\t\t//an out of bounds exception\n\t\tfor(row = size - 1; row >= 3; row --)\n\t\t\tfor(col = 0; col < size; col ++)\n\t\t\t\tfor(dep = 0; dep < size; dep ++) {\n\t\t\t\t\t//a variable check is made to save lines\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\t//checks if the value is a player, and it\n\t\t\t\t\t//qualifies as a vertical win. If it does,\n\t\t\t\t\t//the for loop returns true.\n\t\t\t\t\tif (check != -1\n\t\t\t\t\t\t && check == board[row - 1][col][dep] &&\n\t\t\t\t\t\t\tcheck == board[row - 2][col][dep] &&\n\t\t\t\t\t\t\tcheck == board[row - 3][col][dep] )\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t//check for horizontal four in a row\n\t\t//col is restriced and increasing (+)\n\t\tfor (dep = 0; dep < size; dep ++)\n\t\t\tfor(row = size - 1; row >= 0; row --)\n\t\t\t\tfor(col = 0; col < size - 3; col ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t\t&& check == board[row][col + 1][dep]\n\t\t\t\t\t\t\t&& check == board[row][col + 2][dep] \n\t\t\t\t\t\t\t&& check == board[row][col + 3][dep])\n\t\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\t\t//check for x,y upDiagnol four in a row on each depth\n\t\t//row is restricted and decreasing (-)\n\t\t//col is restricted and increasing (+)\n\t\tfor (dep = 0; dep < size; dep ++)\n\t\t\tfor(row = size - 1; row >= 3; row --)\n\t\t\t\tfor(col = 0; col < size - 3; col ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t\t&& check == board[row - 1][col + 1][dep]\n\t\t\t\t\t\t\t&& check == board[row - 2][col + 2][dep]\n\t\t\t\t\t\t\t&& check == board[row - 3][col + 3][dep])\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for x,y downDiagnol four in a row on each depth\n\t\t//row is restricted and increasing (+)\n\t\t//col is restricted and increasing (+)\n\t\tfor (dep = 0; dep < size; dep ++)\n\t\t\tfor(row = 0; row < size - 3; row ++)\n\t\t\t\tfor(col = 0; col < size - 3; col ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t\t&& check == board[row + 1][col + 1][dep]\n\t\t\t\t\t\t\t&& check == board[row + 2][col + 2][dep]\n\t\t\t\t\t\t\t&& check == board[row + 3][col + 3][dep])\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for x,z horizontal four in a row on each column\n\t\t//dep is restricted and increasing (+)\n\t\tfor(col = 0; col < size; col ++)\n\t\t\tfor(row = size - 1; row >= 0; row --)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t\t&& check == board[row][col][dep + 1]\n\t\t\t\t\t\t\t&& check == board[row][col][dep + 2]\n\t\t\t\t\t\t\t&& check == board[row][col][dep + 3])\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for x,z upDiagnol four in a row on ecah column\n\t\t//row is restricted and decreasing (-)\n\t\t//dep is restricted and increasing (+)\n\t\tfor(col = 0; col < size; col ++)\n\t\t\tfor(row = size - 1; row >= 3; row --)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t\t&& check == board[row - 1][col][dep + 1]\n\t\t\t\t\t\t\t&& check == board[row - 2][col][dep + 2]\n\t\t\t\t\t\t\t&& check == board[row - 3][col][dep + 3])\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for x,z downDiagnol four in a row\n\t\t// dep +, row +\n\t\tfor(col = 0; col < size; col ++)\n\t\t\tfor(row = 0; row > size - 3; row ++)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t\t&& check == board[row + 1][col][dep + 1]\n\t\t\t\t\t\t\t&& check == board[row + 2][col][dep + 2]\n\t\t\t\t\t\t\t&& check == board[row + 3][col][dep + 3])\n\t\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\t\t//check for x,y,z up diagnol to the top right\n\t\t//row -, col +, dep +\n\t\tfor(row = size - 1; row >= 3; row --)\n\t\t\tfor(col = 0; col < size - 3; col ++)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row - 1][col + 1][dep + 1]\n\t\t\t\t\t\t&& check == board[row - 2][col + 2][dep + 2]\n\t\t\t\t\t\t&& check == board[row - 3][col + 3][dep + 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for x,y,z up diagnol to the top left\n\t\t//row -, col -, dep +\n\t\tfor(row = size - 1; row >= 3; row --)\n\t\t\tfor(col = size -1; col >= 3; col --)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row - 1][col - 1][dep + 1]\n\t\t\t\t\t\t&& check == board[row - 2][col - 2][dep + 2]\n\t\t\t\t\t\t&& check == board[row - 3][col - 3][dep + 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for x,y,z up diagnol to the down left\n\t\t//row -, col -, dep -\n\t\tfor(row = size - 1; row >= 3; row --)\n\t\t\tfor(col = size -1; col >= 3; col --)\n\t\t\t\tfor(dep = size - 1; dep >= 3; dep --) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row - 1][col - 1][dep - 1]\n\t\t\t\t\t\t&& check == board[row - 2][col - 2][dep - 2]\n\t\t\t\t\t\t&& check == board[row - 3][col - 3][dep - 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for x,y,z up diagnol to the down right\n\t\t//row -, col +, dep -\n\t\tfor(row = size - 1; row >= 3; row --)\n\t\t\tfor(col = 0; col < size - 3; col ++)\n\t\t\t\tfor(dep = size - 1; dep >= 3; dep --) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row - 1][col + 1][dep - 1]\n\t\t\t\t\t\t&& check == board[row - 2][col + 2][dep - 2]\n\t\t\t\t\t\t&& check == board[row - 3][col + 3][dep - 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//Same as above, but now row increases rather than decreasing\n\t\t//check for down diagnol from top left to center\n\t\t//row +, col +, dep +\n\t\tfor(row = 0; row > size - 3; row ++)\n\t\t\tfor(col = 0; col < size - 3; col ++)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1\n\t\t\t\t\t\t&& check == board[row + 1][col + 1][dep + 1]\n\t\t\t\t\t\t&& check == board[row + 2][col + 2][dep + 2]\n\t\t\t\t\t\t&& check == board[row + 3][col + 3][dep + 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for down diagnol from top right to center\n\t\t//row + , col -, dep +\n\t\tfor(row = 0; row > size - 3; row ++)\n\t\t\tfor(col = size -1; col >= 3; col --)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row + 1][col - 1][dep + 1]\n\t\t\t\t\t\t&& check == board[row + 2][col - 2][dep + 2]\n\t\t\t\t\t\t&& check == board[row + 3][col - 3][dep + 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for down diagnol from bottom left to center\n\t\t//row +, col -, dep -\n\t\tfor(row = 0; row > size - 3; row ++)\n\t\t\tfor(col = size -1; col >= 3; col --)\n\t\t\t\tfor(dep = size - 1; dep >= 3; dep --) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row + 1][col - 1][dep - 1]\n\t\t\t\t\t\t&& check == board[row + 2][col - 2][dep - 2]\n\t\t\t\t\t\t&& check == board[row + 3][col - 3][dep - 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//check for down diagnol from bottom right to center\n\t\t//row +, col +, dep -\n\t\tfor(row = 0; row > size - 3; row ++)\n\t\t\tfor(col = 0; col < size - 3; col ++)\n\t\t\t\tfor(dep = size - 1; dep >= 3; dep --) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row + 1][col + 1][dep - 1]\n\t\t\t\t\t\t&& check == board[row + 2][col + 2][dep - 2]\n\t\t\t\t\t\t&& check == board[row + 3][col + 3][dep - 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\n\t\t//check for diagonals where row stays the same, but x,z change\n\t\t//depth up diagnol, col +, dep +\n\t\tfor(row = size - 1; row >= 0 ; row --)\n\t\t\tfor(col = 0; col < size - 3; col ++)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row][col + 1][dep + 1]\n\t\t\t\t\t\t&& check == board[row][col + 2][dep + 2]\n\t\t\t\t\t\t&& check == board[row][col + 3][dep + 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\n\t\t//depth down diagnol, col +, dep -\n\t\tfor(row = size - 1; row >= 0 ; row --)\n\t\t\tfor(col = 0; col < size - 3; col ++)\n\t\t\t\tfor(dep = size - 1; dep >= 3; dep --) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row][col + 1][dep - 1]\n\t\t\t\t\t\t&& check == board[row][col + 2][dep - 2]\n\t\t\t\t\t\t&& check == board[row][col + 3][dep - 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\n\t\t// depth down left diagnol, col -, dep +\n\t\tfor(row = size - 1; row >= 0 ; row --)\n\t\t\tfor(col = size - 1; col >= 3; col --)\n\t\t\t\tfor(dep = 0; dep < size - 3; dep ++) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row][col - 1][dep + 1]\n\t\t\t\t\t\t&& check == board[row][col - 2][dep + 2]\n\t\t\t\t\t\t&& check == board[row][col - 3][dep + 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\n\t\t//depth down right diagnol, col -, dep -\n\t\tfor(row = size - 1; row >= 0 ; row --)\n\t\t\tfor(col = size - 1; col >= 3; col --)\n\t\t\t\tfor(dep = size - 1; dep >= 3; dep --) {\n\t\t\t\t\tint check = board[row][col][dep];\n\t\t\t\t\tif(check != -1 \n\t\t\t\t\t\t&& check == board[row][col - 1][dep - 1]\n\t\t\t\t\t\t&& check == board[row][col - 2][dep - 2]\n\t\t\t\t\t\t&& check == board[row][col - 3][dep - 3])\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t//returns false if none of the above return true\n\t\treturn false;\n\t}",
"private boolean checkSurroundingOfPoint(Point p) {\n\t\tPoint check = new Point();\n\t\tcheck.x\t\t= p.x;\n\t\tcheck.y \t= p.y;\n\t\t\n\t\tfor(int y = -1; y <= 1; y++) {\n\t\t\tcheck.y += y;\n\t\t\tfor(int x = -1; x <= 1; x++) {\n\t\t\t\tcheck.x += x;\n\t\t\t\tif(occupiedPositions.contains(check)) return false;\n\t\t\t\t//restore values\n\t\t\t\tcheck.x\t= p.x;\n\t\t\t}\n\t\t\t//restore values\n\t\t\tcheck.y = p.y;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isDrooping() {\n return (((this.theta % 360) + 360) % 360) > 180\n || tree.isDrooping();\n }",
"public boolean percolates() {\n\t\tint top = uf.find(0);\n\t\tint bottom = uf.find(size * size + 1);\n\t\treturn top == bottom;\n\t}",
"public static boolean hasWinningMove(int[][] gamePlay){\n\t\tfor(int i=0;i<4;i++){\n\t\t\tfor(int j=0;j<4;j++){\n\t\t\t\tif(gamePlay[i][j]==1){\n\t\t\t\t\tfor(int k=1;k<9;k++){\n\t\t\t\t\t\tint[] root={i,j};\n\t\t\t\t\t\tint[] root1={i,j};\n\t\t\t\t\t\tint[] source=root;\n\t\t\t\t\t\tsource=calculatePosition(root,k);\n\t\t\t\t\t\t//System.out.println(\"Looking in direction \"+k+\" For root\"+i+\",\"+j);\n\t\t\t\t\t\tif(isValidLocation(source)){ \n\t\t\t\t\t\t\tif(gamePlay[source[0]][source[1]]==1){\n\t\t\t\t\t\t\t\tint[] newSource=calculatePosition(source,k);\n\t//System.out.println(\"Two contigous isValid:\"+isValidLocation(newSource)+\"newSource(\"+newSource[0]+\",\"+newSource[1]+\")\"+\" gamePlay:\"+(isValidLocation(newSource)?gamePlay[newSource[0]][newSource[1]]:-1));\n\t\t\t\t\t\t\t\tif(isValidLocation(newSource)){ \n\t\t\t\t\t\t\t\t\tif(gamePlay[newSource[0]][newSource[1]]==0){\n\t\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Looking in opposite direction\");\n\t\t\t\t\t\t\t\t\t//Lookup in opposite direction\n\t\t\t\t\t\t\t\t\tnewSource=calculatePosition(root1,9-k);\n\t\t\t\t\t\t\t\t\tif(isValidLocation(newSource) && gamePlay[newSource[0]][newSource[1]]==1){\n\t\t\t\t\t\t\t\t\t\t//System.out.println(\"Valid Location:\"+newSource[0]+\" \"+newSource[1]+\" gamePlay\"+gamePlay[newSource[0]][newSource[1]]);\n\t\t\t\t\t\t\t\t\t\treturn true;\n\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}else if(gamePlay[source[0]][source[1]]==0){\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Looking for alternate\");\n\t\t\t\t\t\t\t\t\tsource=calculatePosition(source,k);\n\t\t\t\t\t\t\t\t\tif(isValidLocation(source) && gamePlay[source[0]][source[1]]==1){\n\t\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t//System.out.println(\"Invalid direction or no move here isValid:\"+isValidLocation(source)+\"Source(\"+source[0]+\",\"+source[1]+\")\"+\" gamePlay:\"+(isValidLocation(source)?gamePlay[source[0]][source[1]]:-1));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"protected static boolean nudge(JComponent c,Rectangle dest) {\n\t\tRectangle bounds = c.getBounds();\n\t\t\n\t\tdouble lastDX = getDouble(c,PROPERTY_LAST_DX,0);\n\t\tdouble lastDY = getDouble(c,PROPERTY_LAST_DY,0);\n\t\tdouble lastDW = getDouble(c,PROPERTY_LAST_DW,0);\n\t\tdouble lastDH = getDouble(c,PROPERTY_LAST_DH,0);\n\t\t\n\t\tdouble dx = dest.x-bounds.x;\n\t\tdouble dy = dest.y-bounds.y;\n\t\tdouble dw = dest.width-bounds.width;\n\t\tdouble dh = dest.height-bounds.height;\n\t\t\n\t\tdx = limit(.5*sign(dx)*Math.sqrt(Math.abs(dx))+.5*lastDX,dx);\n\t\tdy = limit(.5*sign(dy)*Math.sqrt(Math.abs(dy))+.5*lastDY,dy);\n\t\tdw = limit(.5*sign(dw)*Math.sqrt(Math.abs(dw))+.5*lastDW,dw);\n\t\tdh = limit(.5*sign(dh)*Math.sqrt(Math.abs(dh))+.5*lastDH,dh);\n\n\t\tc.putClientProperty(PROPERTY_LAST_DX, new Double(dx));\n\t\tc.putClientProperty(PROPERTY_LAST_DY, new Double(dy));\n\t\tc.putClientProperty(PROPERTY_LAST_DW, new Double(dw));\n\t\tc.putClientProperty(PROPERTY_LAST_DH, new Double(dh));\n\t\t\n\t\tif(Math.abs(dx)<1.2 && \n\t\t\t\tMath.abs(dy)<1.2 &&\n\t\t\t\tMath.abs(dw)<1.2 && \n\t\t\t\tMath.abs(dh)<1.2 ) {\n\t\t\tc.setBounds(dest);\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tbounds.x += (int)(dx+.5);\n\t\tbounds.y += (int)(dy+.5);\n\t\tbounds.width += (int)(dw+.5);\n\t\tbounds.height += (int)(dh+.5);\n\t\n\t\tc.setBounds(bounds);\n\t\n\t\treturn false;\n\t}",
"public boolean isTotallyOnGrid() {\n\t\t\tfor(int i=0; i<4; i++) {\n\t\t\t\tif(position.y + i >= 0)\n\t\t\t\t\treturn true; //everything from here down is on grid\n\t\t\t\t// this row is above grid so look for non-empty squares\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\tif(squares[i][j])\n\t\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\tSystem.err.println(\"TetrisPiece.isTotallyOnGrid internal error\");\n\t\t\treturn false;\n\t\t}",
"boolean losCompare(double x1, double y1, double x2, double y2, CObject pHo)\r\n {\r\n double delta;\r\n int x, y;\r\n\r\n int xLeft = pHo.hoX - pHo.hoImgXSpot;\r\n int xRight = xLeft + pHo.hoImgWidth;\r\n int yTop = pHo.hoY - pHo.hoImgYSpot;\r\n int yBottom = yTop + pHo.hoImgHeight;\r\n\r\n if (x2 - x1 > y2 - y1)\r\n {\r\n delta = (double) (y2 - y1) / (double) (x2 - x1);\r\n if (x2 > x1)\r\n {\r\n if (xRight < x1 || xLeft >= x2)\r\n {\r\n return false;\r\n }\r\n }\r\n else\r\n {\r\n if (xRight < x2 || xLeft >= x1)\r\n {\r\n return false;\r\n }\r\n }\r\n y = (int) (delta * (xLeft - x1) + y1);\r\n if (y >= yTop && y < yBottom)\r\n {\r\n return true;\r\n }\r\n\r\n y = (int) (delta * (xRight - x1) + y1);\r\n if (y >= yTop && y < yBottom)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n delta = (double) (x2 - x1) / (double) (y2 - y1);\r\n if (y2 > y1)\r\n {\r\n if (yBottom < y1 || yTop >= y2)\r\n {\r\n return false;\r\n }\r\n }\r\n else\r\n {\r\n if (yBottom < y2 || yTop >= y1)\r\n {\r\n return false;\r\n }\r\n }\r\n x = (int) (delta * (yTop - y1) + x1);\r\n if (x >= xLeft && x < xRight)\r\n {\r\n return true;\r\n }\r\n\r\n x = (int) (delta * (yTop - y1) + x1);\r\n if (x >= xLeft && x < xRight)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n }",
"private boolean didBallHitFloor() {\n \tdouble y = ball.getY();\n \t\n \treturn (y + BALL_RADIUS * 2) <= HEIGHT;\n }",
"public boolean CheckTimeInLevel(){\n \n Long comparetime = ((System.nanoTime() - StartTimeInLevel)/1000000000);\n \n return (comparetime>TILData.critpoints.get((int)speed));\n // stop tetris because this subject is an outlier for this level\n \n \n }",
"private boolean leftUpCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((this.getY() - obj.getY()) < obj.getHeight()) && (this.getY() > obj.getY()));\n\t}",
"private boolean isTargetTerritoryOneBlockAway() {\n for(Territory territory:getCurrentPlayerTerritories()) {\n if(Math.abs(territory.getID()-selectedTerritoryByPlayer.getID()) == 1) {\n int minID = Math.min(territory.getID(),selectedTerritoryByPlayer.getID());\n int maxID = Math.max(territory.getID(),selectedTerritoryByPlayer.getID());\n if(maxID % gameDescriptor.getColumns() == 0)\n return true;\n if((minID % gameDescriptor.getColumns() != 0 )\n && (minID / gameDescriptor.getColumns() == maxID / gameDescriptor.getColumns())) {\n return true;\n }\n }\n else if(Math.abs(territory.getID()-selectedTerritoryByPlayer.getID()) == gameDescriptor.getColumns())\n return true;\n }\n return false;\n }",
"boolean nextLevel() {\r\n\t\treturn this.ship.getRow() == 0 && this.ship.getCol() == this.board.getDimCol() - 1;\r\n\t}",
"private boolean isDFltdFMin()\n {\n double fLow = (x2.getF(0) < x1.getF(0)) ? x2.getF(0) : x1.getF(0);\n double dF = Math.abs(fLowBor-fLow);\n return (dF < dFMin) ? true : false;\n }",
"private boolean leftDownCollision(InteractiveObject obj){\n\t\treturn (((this.getX() - obj.getX()) < obj.getWidth()) && (this.getX() > obj.getX()) &&\n\t\t\t\t((obj.getY() - this.getY()) < this.getHeight()) && (obj.getY() > this.getY()));\n\t}",
"private boolean nextIsWall()\n {\n return this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].isHasWall();\n }",
"public boolean hasCollided(float _x, float _y, float _width, float _height) \r\n {\n\t \t \tfloat leftA = _x;\r\n\t \t \tfloat rightA = _x + _width;\r\n\t \t \tfloat topA = _y;\r\n\t \t \tfloat bottomA = _y + _height;\r\n\t \t \r\n\t \t //Calculate the sides of leaf\r\n\t \t \tfloat leftB = x;\r\n\t \t \tfloat rightB = x + width;\r\n\t \t \tfloat topB = y;\r\n\t \t \tfloat bottomB = y + height;\r\n\t \t \r\n\t\r\n\t \t //If any of the sides from A are outside of B\r\n\t \t if( bottomA <= topB || topA >= bottomB || rightA <= leftB || leftA >= rightB)\r\n\t \t {\r\n\t \t return false;\r\n\t \t }\r\n\t \t else\r\n\t \t {\r\n\t \t \t//If none of the sides from A are outside B\r\n\t \t \treturn true;\r\n\t \t }\r\n\t\r\n\t \t \r\n\t \r\n \t \t\r\n }",
"private boolean isNearThumb(int x, int y) {\n tmpRect.set(thumbOffset.getPointXToInt(), thumbOffset.getPointYToInt(), thumbOffset.getPointXToInt() + thumbWidth,\n thumbOffset.getPointYToInt() + thumbHeight);\n // tmpRect.inset(touchInset, touchInset);\n return tmpRect.contains(x, y, x, y);\n }",
"public boolean detectBound(){\n if(posX < 10){\n posX = 10;\n velX = 0;\n accX = 0;\n return true;\n }\n else if(posX > width - 10){\n posX = width - 10;\n velX = 0;\n accX = 0;\n return true;\n }\n if(posY < 10){\n posY = 10;\n velY = 0;\n accY = 0;\n return true;\n }\n else if(posY > height - 10){\n posY = height - 10;\n velY = 0;\n accY = 0;\n return true;\n }\n return false;\n }",
"public boolean itemonfloor(){\n\t\tint XI = 0;\n\t\tint YI = 0;\n\t\tint Xyou = 1;\n\t\tint Yyou = 1;\n\t\tfor(int i = 0 ; i < this.Items.length;i++){\n\t\t\tfor(int p = 0; p < this.Items.length;p++){\n\t\t\t\tif(this.Items[i][p] != null && this.position[i][p] == 1){\n\t\t\t\t\tYI = i;\n\t\t\t\t\tXI = p;\n\t\t\t\t\tYyou = i;\n\t\t\t\t\tXyou = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}//end of outter for\n\t\tif(YI==Yyou && XI==Xyou){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean isLocalTree(byte treeProducerId) {\n assert _computeOOB : \"Calling this method makes sense only for oobee\";\n int idx = H2O.SELF.index();\n return idx == treeProducerId;\n }",
"private boolean isDominated(Image img1, Image img2) {\r\n\t\tint size1 = img1.getWidth() * img1.getHeight();\r\n\t\tint size2 = img2.getWidth() * img2.getHeight();\r\n\t\treturn size1 < size2;\r\n\t}",
"public boolean percolates() {\n if (openSitesCount < gridSize) {\n return false;\n }\n\n if (gridSize == 1 && openSitesCount == 1) {\n return true;\n }\n\n return wquf2.connected(virtualTopSiteIndex, virtualBottomSiteIndex);\n }",
"public boolean checkBallOutTopBottom() {\n //if ball is out of top and bottom\n if (y <= -radius || y >= GameView.height + radius) {\n out = true;\n return true;\n }\n return false;\n }",
"private boolean overlappingTaskAndGateway(BpmnShape s1, BpmnShape s2) {\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\t\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\tdouble apothem = (s2.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY - firstHeight < secondY + apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY + firstHeight > secondY - apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif ((firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX + firstWidth > secondX - apothem || firstY - firstHeight < secondY + apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstWidth < secondX + apothem || firstY + firstHeight > secondY - apothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}",
"boolean isAllOnDestination(){\n\n if(player.getCurrentX()-player.getDestinationX()!=0 || player.getCurrentY()-player.getDestinationY()!=0)\n return false;\n\n for(int i = 0; i < boxes.size(); i++){\n Box item = boxes.get(i);\n if(item.getCurrentX()-item.getDestinationX()!=0 || item.getCurrentY()-item.getDestinationY()!=0)\n return false;\n }\n return true;\n }",
"public boolean isLargeStraight(){\n // TODO\n return false;\n }",
"public boolean smallerThan(PositionRadians p) {\n\t\tif (value < p.value) \n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"private boolean isNextBoxUsed(Box box, int directionNextBox) {\n if (directionNextBox < 0 || directionNextBox > 3)\n throw new IllegalArgumentException(\"The only allowed values are between 0 and 3.\");\n if (box == null)\n throw new IllegalArgumentException(\"Error. Null pointer in isNextBoxUsed().\");\n // [row,column] - coordinates of the box in the maze\n int[] boxPosition = box.getPosition();\n int row = boxPosition[0];\n int column = boxPosition[1];\n if (directionNextBox == 0) {\n if (row == 0)\n return true;\n return this.grid[row - 1][column].isUsed();\n }\n if (directionNextBox == 1) {\n if (column == this.grid[column].length - 1)\n return true;\n return this.grid[row][column + 1].isUsed();\n }\n if (directionNextBox == 2) {\n if (row == this.grid.length - 1)\n return true;\n return this.grid[row + 1][column].isUsed();\n }\n if (directionNextBox == 3) {\n if (column == 0)\n return true;\n return this.grid[row][column - 1].isUsed();\n }\n return false;\n }",
"public final boolean insideRadarRange(Target target)\n{\n\tif (_rules.getRadarRange() == 0)\n\t\treturn false;\n\n\tboolean inside = false;\n\tdouble newrange = _rules.getRadarRange() * (1 / 60.0) * (Math.PI / 180);\n\tfor (double lon = target.getLongitude() - 2*Math.PI; lon <= target.getLongitude() + 2*Math.PI; lon += 2*Math.PI)\n\t{\n\t\tdouble dLon = lon - _base.getLongitude();\n\t\tdouble dLat = target.getLatitude() - _base.getLatitude();\n\t\tinside = inside || (dLon * dLon + dLat * dLat <= newrange * newrange);\n\t}\n return inside;\n}",
"public boolean reachBorder() {\n // check up\n if (direction == 12) {\n if (this.getY() < speed) {\n return true;\n }\n }\n //check down\n if (direction == 6) {\n if (this.getY() + this.getHeight() + speed > GameUtility.GameUtility.MAP_HEIGHT) {\n return true;\n }\n\n }\n //check left\n if (direction == 9) {\n if (this.getX() < speed) {\n return true;\n }\n }\n //check right\n if (direction == 3) {\n if (this.getX()\n + this.getWidth() + speed > GameUtility.GameUtility.MAP_WIDTH) {\n return true;\n }\n }\n return false;\n\n }",
"public boolean percolates() {\n // bottom row (grid[n - 1][0] ... grid[n - 1][n - 1])\n for (int j = 1; j <= size; j++) {\n // StdOut.println(\"j: \"+j+\" isOpen: \"+ isOpen(size, j) +\n // \" isFull: \" + isFull(size, j));\n if (isFull(size, j)) {\n return true;\n }\n }\n return false;\n }",
"private static boolean isBalanced_Better(TreeNode root) {\n if (getHeight_Better(root) == -1) return false;\n\n return true;\n }",
"public boolean withinBounds(int target_row, int target_col) {\n\r\n if (target_row < 0 || target_row > size - 1 || target_col < 0 || target_col > size - 1) {\r\n return false;\r\n }\r\n return isOpen(target_row, target_col) || isFull(target_row, target_col);\r\n }",
"public boolean mouseWithinBox() {\n return (mouseX > x && mouseX < x + w && mouseY > y && mouseY < y + h);\r\n }",
"public boolean nearMaxRescue() {\n double water = this.waterLevel;\n double no = (this.configuration.getMaximalLimitLevel()\n - this.configuration.getMaximalNormalLevel()) / 2;\n if (water > this.configuration.getMaximalLimitLevel()\n || water > this.configuration.getMaximalLimitLevel() - no) {\n return true;\n } else if (water < this.configuration.getMinimalLimitLevel()\n || water < this.configuration.getMinimalLimitLevel() + no) {\n\n return true;\n }\n return false;\n }",
"public boolean outOfBounds()\n {\n if((lastpowerUp.equals(\"BLUE\") || lastpowerUp.equals(\"RAINBOW\")) && powerupTimer > 0)\n {\n return false;\n }\n \n if(head.getA() < 150 || head.getA() >= 1260)\n return true;\n else if(head.getB() <150 || head.getB() >=630)\n return true;\n else \n return false;\n \n \n }",
"private static boolean withinArea(Point dronePos) {\r\n\t\tvar droneLat = dronePos.latitude();\r\n\t\tvar droneLon = dronePos.longitude();\r\n\t\treturn droneLat<latUB && droneLat>latLB && droneLon<lonUB && droneLon>lonLB;\r\n\t}",
"public boolean hitPaddle (Paddle myPaddle){\n Bounds ivPower = myExtendedPaddle.getBoundsInParent();\n Bounds ivPaddle = myPaddle.getView().getBoundsInParent();\n if(ivPower.intersects(ivPaddle)){\n return true;\n }\n return false;\n }",
"private boolean hitSides() {\n if (b.numY + 60 >= BOX_HEIGHT || (b.numY - 60 <= 0)) {\n return true;\n } else {\n return false;\n }\n }",
"private boolean isTreeFull() {\n // The number of leaf nodes required to store the whole vector\n // (each leaf node stores 32 elements).\n int requiredLeafNodes = (totalSize >>> 5);\n\n // The maximum number of leaf nodes we can have in a tree of this\n // depth (each interior node stores 32 children).\n int maxLeafNodes = (1 << treeDepth);\n\n return (requiredLeafNodes > maxLeafNodes);\n }",
"public boolean percolates() {\n if (mGridSize == 1 && !isOpen(1, 1))\n return false;\n //return mUnionFind.connected(0, mGridSize * mGridSize + 1);\n return mUnionFind.find(0) == mUnionFind.find(mGridSize * mGridSize + 1);\n\n }",
"public boolean percolates() {\n return unionFind.connected(topRoot, bottomRoot);\n }",
"public boolean isLargerThan(Rectangle other){\n\t\treturn this.getArea() > other.getArea();\n\t\n\t}"
] |
[
"0.59533805",
"0.5913915",
"0.58918923",
"0.5868604",
"0.5861346",
"0.584508",
"0.58292943",
"0.5768039",
"0.5739381",
"0.57189643",
"0.57077754",
"0.56730384",
"0.56716037",
"0.5633302",
"0.56293005",
"0.5626254",
"0.56212807",
"0.56196135",
"0.5607047",
"0.5583986",
"0.55697745",
"0.5558812",
"0.5553967",
"0.55471784",
"0.5542598",
"0.5536714",
"0.5532472",
"0.5525054",
"0.5496027",
"0.5486743",
"0.5475854",
"0.54753447",
"0.5474051",
"0.54576623",
"0.54558414",
"0.54540676",
"0.54518235",
"0.54516083",
"0.54516083",
"0.5449035",
"0.5443845",
"0.5427224",
"0.5424852",
"0.54178166",
"0.54172164",
"0.5413134",
"0.5406309",
"0.5404133",
"0.5402311",
"0.53979",
"0.5393029",
"0.5392949",
"0.5389704",
"0.5381794",
"0.53808457",
"0.5378595",
"0.53716403",
"0.53655314",
"0.53589743",
"0.5348082",
"0.5335547",
"0.53211683",
"0.532026",
"0.53116834",
"0.5307819",
"0.5291407",
"0.52908397",
"0.5288566",
"0.52870804",
"0.5283972",
"0.5280673",
"0.5275353",
"0.5275113",
"0.5261981",
"0.5261666",
"0.5254156",
"0.524995",
"0.5244828",
"0.52442575",
"0.524393",
"0.52358186",
"0.52335495",
"0.52316755",
"0.5228536",
"0.52277267",
"0.5220184",
"0.52108675",
"0.52065974",
"0.5203962",
"0.5203849",
"0.52007616",
"0.5193619",
"0.5192458",
"0.51922727",
"0.51918",
"0.5189892",
"0.5189734",
"0.5183049",
"0.51802176",
"0.51761717"
] |
0.6119688
|
0
|
Takes a user query and finds the grid of images that best matches the query. These images will be combined into one big image (rastered) by the front end. The grid of images must obey the following properties, where image in the grid is referred to as a "tile". The tiles collected must cover the most longitudinal distance per pixel (LonDPP) possible, while still covering less than or equal to the amount of longitudinal distance per pixel in the query box for the user viewport size. Contains all tiles that intersect the query bounding box that fulfill the above condition. The tiles must be arranged inorder to reconstruct the full image.
|
public Map<String, Object> getMapRaster(Map<String, Double> params) {
// System.out.println(params);
//query box info
double tar_lrlon, tar_ullon, tar_ullat, tar_lrlat, tar_w, tar_h, tar_LonDPP;
tar_lrlon = params.get("lrlon");
tar_ullon = params.get("ullon");
tar_ullat = params.get("ullat");
tar_lrlat = params.get("lrlat");
tar_w = params.get("w");
tar_h = params.get("h");
tar_LonDPP = (tar_lrlon - tar_ullon) / tar_w;
Map<String, Object> results = new HashMap<>();
//check if query box make sense
QuadTree rootTree = new QuadTree("root", ROOT_ULLON, ROOT_ULLAT, ROOT_LRLON, ROOT_LRLAT, 0);
QuadTree targetTree = new QuadTree("target", tar_ullon, tar_ullat, tar_lrlon, tar_lrlat, 0);
if (tar_ullon >= tar_lrlon || tar_ullat <= tar_lrlat || !rootTree.checkOverlap(targetTree)) {
results.put("raster_ul_lon", 0);
results.put("raster_ul_lat", 0);
results.put("raster_lr_lon", 0);
results.put("raster_lr_lat", 0);
results.put("query_success:", false);
} else {
work(rootTree, targetTree, results, tar_LonDPP);
}
return results;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void fetchTile() {\n\t\t\tif (tile.getRequest().isCancelled() || tile.isFinal()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tMapSource source = tile.getRequest().getSource();\n\t\t\tProjObj proj = tile.getRequest().getProjection();\n\t\t\tfinal int ppd = tile.getRequest().getPPD();\n\t\t\t\n\t\t\tfor (int fuzzyPPD = ppd/2 ; fuzzyPPD > 1 ; fuzzyPPD /= 2){\t\t\t\t\n\t\t\t\tint ratio = ppd / fuzzyPPD;\n\t\t\t\t\n\t\t\t\t// A tile has 256 pixels on a side.\n\t\t\t\t// Using this method, we can't upscale data to be fuzzy if it's more than 256 times larger \n\t\t\t\t// than the area we are looking to fill. Upscaling data more than 16 times seems unlikely to provide\n\t\t\t\t// any real benefit to the user, so we will quit our search at this point\n\t\t\t\tif (ratio>16) break;\n\t\t\t\t\n\t\t\t\tString tileName = CacheManager.getTileName(\n\t\t\t\t\tsource.getName(), proj, fuzzyPPD,\n\t\t\t\t\ttile.getXtile()/ratio, tile.getYtile()/ratio,\n\t\t\t\t\tsource.hasNumericKeyword());\n\t\t\t\t\n\t\t\t\tBufferedImage tileImage = CacheManager.getTile(source, tileName);\n\t\t\t\t\n\t\t\t\tif (tileImage==null) {\t\t\t\t\t\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint xtileindex = tile.getXtile() % ratio;\n\t\t\t\tint ytileindex = ratio - (tile.getYtile() % ratio) - 1;\n\t\t\t\t\n\t\t\t\tdouble fuzzyxstep = MapRetriever.tiler.getPixelWidth() / ratio;\n\t\t\t\tdouble fuzzyystep = MapRetriever.tiler.getPixelHeight() / ratio;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\ttileImage = tileImage.getSubimage((int)(xtileindex * fuzzyxstep), (int)(ytileindex * fuzzyystep), (int)fuzzyxstep, (int)fuzzyystep);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog(e);\n\t\t\t\t\tlog(\"xtileindex:\"+xtileindex+\" fuzzyxstep:\"+fuzzyxstep+\" ytileindex:\"+ytileindex+\" fuzzyystep:\"+fuzzyystep);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong outputImageSize = (tileImage.getWidth()*ratio)*(tileImage.getHeight()*ratio);\n\t\t\t\tif (outputImageSize <= 0 || outputImageSize > Integer.MAX_VALUE){\n\t\t\t\t\tlog(\"Scaling tile from \"+fuzzyPPD+\" to \"+ppd+\" will result in image size overflow.\"+\n\t\t\t\t\t\t\t\" Stopping further search for lower PPDs for this tile.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttileImage = CacheManager.scaleImage(tileImage, ratio);\n\t\t\t\t\n\t\t\t\tmyRetriever.fuzzyResponse(tile, tileImage);\n\t\t\t}\t\t\t\t\t\t\n\t\t}",
"protected void calculatePathfindingGrid(Tile[] tiles) {\n \n if(tiles == null) {\n return;\n }\n \n /**\n * Problem:\n * Because the tile size used by the path finding engine will most likely be\n * different from that of the visual effect size, we have to\n * look at all the visual tiles and judge whether they are blocking of\n * particular kinds of unit.\n * \n * Algorithm:\n * For land, air and sea take a look at the number of blocking/non-blocking\n * tiles there are and if there is over 50% either way then that will be the\n * PathTiles result.\n */\n \n // First get the size of the map in PathTile(s)\n int rows = getActualHeightInTiles();\n int cols = getActualWidthInTiles();\n \n // Calculate the number of tiles to a PathTile\n int tilesPerActualTilesX = getActualTileWidth() / getTileWidth();\n int tilesPerActualTilesY = getActualTileHeight() / getTileHeight();\n int tileCount = tilesPerActualTilesX * tilesPerActualTilesY;\n \n int tileCols = getWidthInTiles();\n \n // Create an array\n mPathTiles = new PathTile[ rows * cols ];\n \n // Iterate through these tiles\n for(int x = 0; x < cols ; x++) {\n for(int y = 0; y < rows; y++) {\n \n // Setup some variables\n int blockSea, blockAir, blockLand;\n blockAir = blockLand = blockSea = 0;\n \n // Figure out the percentage of each block\n for(int tx = 0; tx < tilesPerActualTilesX; tx++) {\n for(int ty = 0; ty < tilesPerActualTilesY; ty++) {\n \n int tileX = (x * tilesPerActualTilesX) + tx;\n int tileY = (y * tilesPerActualTilesY) + ty;\n \n Tile thisTile = tiles[ (tileY * tileCols) + tileX ];\n \n if(thisTile.blockAir()) {\n blockAir++;\n }\n \n if(thisTile.blockLand()) {\n blockLand++;\n }\n \n if(thisTile.blockSea()) {\n blockSea++;\n }\n \n }\n }\n \n // Calculate percentage\n float a,b,c;\n a = (float)blockAir / (float)tileCount;\n b = (float)blockLand / (float)tileCount;\n c = (float)blockSea / (float)tileCount;\n \n // Set the new tile\n mPathTiles[ (y * cols) + x ] = new PathTile( (a >= .5f), (b >= .5f), (c >= .5f) );\n \n // System.out.println(\"Grid \" + ((y * cols) + x) + \" (\" + x + \", \" + y + \") Air: \" + a + \" Land: \" + b + \" Sea: \" + c);\n \n }\n }\n \n }",
"private void findGrid(int x, int y) {\n\tgx = (int) Math.floor(x / gs);\n\tgy = (int) Math.floor(y / gs);\n\n\tif (debug){\n\tSystem.out.print(\"Actual: (\" + x + \",\" + y + \")\");\n\tSystem.out.println(\" Grid square: (\" + gx + \",\" + gy + \")\");\n\t}\n }",
"protected void computeGridParameters() {\n float padding = 0.02f * overlay.getScalingValue();\n boolean flipX = x2 < x1;\n float xx1 = flipX ? (x1 + padding) : (x1 - padding);\n float xx2 = flipX ? (x2 - padding) : (x2 + padding);\n boolean flipY = y2 < y1;\n float yy1 = flipY ? (y1 + padding) : (y1 - padding);\n float yy2 = flipY ? (y2 - padding) : (y2 + padding);\n \n xGrid1 = xx1; yGrid1 = yy1;\n xGrid2 = xx2; yGrid2 = yy1;\n xGrid3 = xx1; yGrid3 = yy2;\n xGrid4 = xx2; yGrid4 = yy2;\n horizGridCount = 3; vertGridCount = 3;\n }",
"private void getPhotoList(String query){\n for(Photo p : photolist){\n for(String s : p.getLocationTaglist()){\n if(s.toLowerCase().contains(query)){\n searchResult.add(p);\n break;\n }\n }\n for(String s : p.getPersonTaglist()){\n if(s.toLowerCase().contains(query)){\n searchResult.add(p);\n break;\n }\n }\n }\n }",
"public boolean isApplicable(int xCells, int yCells, int tileSize)\n{\n //int actualXCells = m.getOutputImageManager().getMosaic().getFlipH().length;\n //int actualYCells = m.getOutputImageManager().getMosaic().getFlipH()[0].length;\n \n int actualTileSize = (int)cp5.getController(\"sizeOfTiles\").getValue();\n boolean isThereMatch = false;\n \n int actualXCells;\n int actualYCells;\n \n for(int i = 1; i < cp5.getController(\"sizeOfTiles\").getMax()+1; i++)\n {\n actualXCells = (m.getOutputImageManager().getMosaic().getXCanvasSize())/(m.getOutputImageManager().getMosaic().getTiles()[0].getW()*i)+3;\n actualYCells = (m.getOutputImageManager().getMosaic().getYCanvasSize())/(m.getOutputImageManager().getMosaic().getTiles()[0].getH()*i);\n if(xCells == actualXCells && yCells == actualYCells)\n isThereMatch = true;\n //println(xCells, yCells, i);\n //println(actualXCells,actualYCells, actualTileSize);\n //println(\"\");\n }\n return isThereMatch;\n}",
"@Override\n\tpublic List<DisplayResult> getResults(ReferencedEnvelope bounds) {\n\t\t\n\t\tString whereClause = bounds != null ? \"WHERE ST_Transform(geom, 4326) && ST_MakeEnvelope(\"+bounds.getMinX()+\",\"+bounds.getMinY()+\",\"+bounds.getMaxX()+\",\"+bounds.getMaxY()+\") \" : \"\";\n\t\t\n\t\t//Only latest results\n\t\tString query = \"SELECT DISTINCT ON (meshblock_id) id, meshblock_id, operat_score, date_entered, ST_AsText(ST_Transform(centroid,4326)), ST_AsText(ST_Transform(geom,4326)), \"\n\t\t\t\t+ \"natural_elements_score, incivilities_and_nuisance_score, navigation_and_mobility_score, territorial_score \"\n\t\t\t\t+ \"FROM result \"\n\t\t\t\t+ whereClause\n\t\t\t\t+ \"ORDER BY meshblock_id, date_entered DESC;\";\n\n\t\tSystem.out.println(query);\n\t GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();\n\n\t WKTReader reader = new WKTReader(geometryFactory);\n\t \n\t\tRowMapper<DisplayResult> rowMapper = (rs, rowNum) -> {\n\t\t\t\n\t\t\tDisplayResult result = new DisplayResult();\n\t\t\tresult.setResultId(rs.getInt(1));\n\t\t\tresult.setMeshblockId(rs.getInt(2));\n\t\t\tresult.setOperatScore(rs.getDouble(3));\n\t\t\t\t\n\t\t\tresult.setNaturalElementsScore(rs.getDouble(7));\n\t\t\tresult.setIncivilitiesScore(rs.getDouble(8));\n\t\t\tresult.setNavigationScore(rs.getDouble(9));\n\t\t\tresult.setTerritorialScore(rs.getDouble(10));\n\t\t\tPoint point;\n\t\t\ttry {\n\t\t\t\tpoint = (Point) reader.read(rs.getString(5));\n\t\t\t\tresult.setCentroid(point.toString());\n\t\t\t\tresult.setLat(point.getCoordinate().y);\n\t\t\t\tresult.setLng(point.getCoordinate().x);\n\t\t\t\t\t\n\t\t\t\tresult.setGeom(rs.getString(6));\n\t\t\t\t\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\t\n\t\treturn jdbcTemplate.query(query, rowMapper);\n\t\t\n\t}",
"public Map<String, Object> getMapRaster(Map<String, Double> params) {\n Map<String, Object> results = new HashMap<>();\n double lrlon = params.get(\"lrlon\");\n double ullon = params.get(\"ullon\");\n double w = params.get(\"w\");\n double h = params.get(\"h\");\n double ullat = params.get(\"ullat\");\n double lrlat = params.get(\"lrlat\");\n int depth = computeDepth(lrlon, ullon, w);\n boolean query_success = true;\n if (lrlat >= ullat || lrlon <= ullon || lrlat >= ROOT_ULLAT || lrlon <= ROOT_ULLON || ullat <= ROOT_LRLAT ||ullon >= ROOT_LRLON) {\n query_success = false;\n }\n int numImg = (int) Math.pow(2, depth);\n double wPerImg = W / Math.pow(2.0, depth);\n double hPerImg = H / Math.pow(2.0, depth);\n int xSt = (int) Math.floor(Math.abs(ullon - ROOT_ULLON) / wPerImg);\n int ySt = (int) Math.floor(Math.abs(ullat - ROOT_ULLAT) / hPerImg);\n int xEn = (int) Math.floor(Math.abs(lrlon - ROOT_ULLON) / wPerImg);\n int yEn = (int) Math.floor(Math.abs(lrlat - ROOT_ULLAT) / hPerImg);\n String[][] render_grid = new String[yEn - ySt + 1][xEn - xSt + 1];\n double raster_ul_lon = ROOT_ULLON + xSt * wPerImg;\n double raster_ul_lat = ROOT_ULLAT - ySt * hPerImg;\n double raster_lr_lon = ROOT_ULLON + (xEn + 1) * wPerImg;\n double raster_lr_lat = ROOT_ULLAT - (yEn + 1) * hPerImg;\n if (ullon < ROOT_ULLON) {\n xSt = 0;\n raster_ul_lon = ROOT_ULLON;\n }\n if (ullat > ROOT_ULLAT) {\n ySt = 0;\n raster_ul_lat = ROOT_ULLAT;\n }\n if (lrlon > ROOT_LRLON) {\n xEn = numImg - 1;\n raster_lr_lon = ROOT_LRLON;\n }\n if (lrlat < ROOT_LRLAT) {\n yEn = numImg - 1;\n raster_lr_lat = ROOT_LRLAT;\n }\n for (int i = 0; i < xEn - xSt + 1; ++i) {\n for (int j = 0; j < yEn - ySt + 1; ++j) {\n int x = i + xSt;\n int y = j + ySt;\n render_grid[j][i] = \"d\" + depth + \"_x\" + x + \"_y\" + y + \".png\";\n }\n }\n results.put(\"render_grid\", render_grid);\n results.put(\"raster_ul_lon\", raster_ul_lon);\n results.put(\"raster_ul_lat\", raster_ul_lat);\n results.put(\"raster_lr_lon\", raster_lr_lon);\n results.put(\"raster_lr_lat\", raster_lr_lat);\n results.put(\"depth\", depth);\n results.put(\"query_success\", query_success);\n return results;\n }",
"public static Image createImageFromRawTiles(String[] rawTiles) {\n List<Tile> tiles = Arrays.stream(rawTiles).map(Tile::parseTile).collect(Collectors.toList());\n // Create and populate borderMap. Maps from each border -> a list of tiles it belongs to\n Map<Border, List<Tile>> borderMap = new HashMap<>();\n for (Tile tile : tiles) {\n for (Border border : tile.getBorders()) {\n if (!borderMap.containsKey(border)) {\n borderMap.put(border, new ArrayList<>());\n }\n borderMap.get(border).add(tile);\n }\n }\n // The corners are those tiles where two of its borders only belong to 1 tile.\n List<Tile> corners =\n tiles.stream()\n .filter(t -> isCornerTile(t, borderMap))\n .collect(Collectors.toList());\n // Get the two borders that only belong to 1 tile for an arbitrary corner tile\n Border[] topLeftCornerBorders = getCornerBorders(corners.get(0), borderMap);\n // Rotate the tile so that its corner borders are in the top and left positions\n corners.get(0).makeTopLeft(topLeftCornerBorders[0], topLeftCornerBorders[1]);\n int imageSize = (int) Math.sqrt(tiles.size());\n Tile[][] result = new Tile[imageSize][imageSize];\n result[0][0] = corners.get(0); // Set the top left tile of the image to this tile\n for (int i = 0; i < result.length; i++) {\n // For every row but the first, get the matching tile for the bottom border of the\n // tile at index 0 of the row above, then rotate/flip the tile (.match(toMa..)), and place\n // it at index 0 of the current row\n if (i != 0) {\n Border toMatch = result[i - 1][0].getBottomBorder(); // The bottom border of the tile just above\n List<Tile> possibleTiles = borderMap.get(toMatch); // Get the matching tile for that border\n Tile otherTile = possibleTiles.get(possibleTiles.get(0) == result[i - 1][0] ? 1 : 0);\n otherTile.match(toMatch, 'T'); // Rotate/flip tile to match\n result[i][0] = otherTile;\n }\n // For every other tile in that row, match it to the tile directly to the left of it,\n // using a similar process as above\n for (int j = 1; j < result[i].length; j++) {\n Border toMatch = result[i][j - 1].getRightBorder();\n List<Tile> possibleTiles = borderMap.get(toMatch);\n Tile otherTile = possibleTiles.get(possibleTiles.get(0) == result[i][j - 1] ? 1 : 0);\n otherTile.match(toMatch, 'L');\n result[i][j] = otherTile;\n }\n }\n return new Image(result);\n }",
"ObstacleQuery createObstacleQuery();",
"private void showSearchResults(String query){\n searchResultGV = (GridView) findViewById(R.id.searchResultGV);\n setTitle(\"Search Result for: \" + query);\n query = query.toLowerCase();\n\n getPhotoList(query);\n\n searchResultGV.setAdapter(adapter);\n }",
"abstract GridPane createSearchResultArea(ResultSet result);",
"@Transactional(readOnly = true)\n public List<Picture> search(String query) {\n log.debug(\"Request to search Pictures for query {}\", query);\n return StreamSupport\n .stream(pictureSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }",
"protected void computeImage(Raster[] sources, WritableRaster dest, Rectangle destRect) {\n Raster source = sources[0];\n\n // ROI check\n ROI roiTile = null;\n\n RandomIter roiIter = null;\n\n boolean roiContainsTile = false;\n boolean roiDisjointTile = false;\n\n // If a ROI is present, then only the part contained inside the current\n // tile bounds is taken.\n if (hasROI) {\n Rectangle srcRectExpanded = mapDestRect(destRect, 0);\n // The tile dimension is extended for avoiding border errors\n srcRectExpanded.setRect(srcRectExpanded.getMinX() - 1, srcRectExpanded.getMinY() - 1,\n srcRectExpanded.getWidth() + 2, srcRectExpanded.getHeight() + 2);\n if (!roiBounds.intersects(srcRectExpanded)) {\n roiDisjointTile = true;\n } else {\n roiTile = roi.intersect(new ROIShape(srcRectExpanded));\n roiContainsTile = roiTile.contains(srcRectExpanded);\n if (!roiContainsTile) {\n if (!roiTile.intersects(srcRectExpanded)) {\n roiDisjointTile = true;\n } else {\n PlanarImage roiIMG = getImage();\n roiIter = RandomIterFactory.create(roiIMG, null, TILE_CACHED, ARRAY_CALC);\n }\n }\n }\n }\n\n // Image completely outside ROI, fill with the background value\n if (roiDisjointTile) {\n ImageUtil.fillBackground(dest, destRect, new double[] { destNoData });\n return;\n }\n\n if (isOptimizedCase) {\n computeImageOptimized(source, dest, destRect, roiIter, roiContainsTile);\n } else {\n computeImageDefault(source, dest, destRect, roiIter, roiContainsTile);\n }\n }",
"private void analyzeForObstacles() {\n \t\n \t\n \tStack<Rect> bestFound = new Stack<Rect>();//This is a stack as the algorithm moves along x linearly\n \tboolean[][] blackWhiteGrid = getBlackWhiteGrid();\n \tint[] cache = new int[grid.length];\n \t\n \twhile (true) {\n\t\t\tboolean noneFound = true;\n\t\t\t\n\t\t\tfor (int i = 0; i<cache.length; i++)\n\t\t\t\tcache[i] = 0;\n\t\t\tfor (int llx = grid.length -1; llx >= 0; llx--) {\n\t\t\t\tupdate_cache(blackWhiteGrid,cache, llx);\n\t\t\t\tfor (int lly = 0; lly < grid.length; lly++) {\n\t\t\t\t\tRect bestOfRound = new Rect(llx,lly,llx,lly);\n\t\t\t\t\tint y = lly;\n\t\t\t\t\tint x_max = 9999;\n\t\t\t\t\tint x = llx;\n\t\t\t\t\twhile (y+1<grid.length && blackWhiteGrid[llx][y]) {\n\t\t\t\t\t\ty++;\n\t\t\t\t\t\tx = Math.min(llx+cache[y]-1, x_max);\n\t\t\t\t\t\tx_max = x;\n\t\t\t\t\t\tRect tryRect = new Rect(llx,lly-1,x,y);\n\t\t\t\t\t\tif (tryRect.area() > bestOfRound.area()) {\n\t\t\t\t\t\t\tbestOfRound = tryRect;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (bestOfRound.area() > 40) {\n\t\t\t\t\t\tif (noneFound) {\n\t\t\t\t\t\t\tbestFound.push(bestOfRound);\n\t\t\t\t\t\t\tnoneFound = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tRect lastRect = bestFound.peek();\n\t\t\t\t\t\t\tif (lastRect.area() < bestOfRound.area()) {\n\t\t\t\t\t\t\t\tbestFound.pop();\n\t\t\t\t\t\t\t\tbestFound.push(bestOfRound);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (noneFound)\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tclearFoundRectangle(blackWhiteGrid, bestFound.peek());\n \t}\n \t\n \t//add found rectanlges\n \tobstacles.clear();\n \tobstacles.addAll(bestFound);\n \tSystem.out.println(\"Sweep done:\");\n \tfor (Rect r : bestFound){\n \t\tSystem.out.println(\"Rect: llx=\" + (r.llx-400) + \"\\tlly=\" + (r.lly-400) + \"\\turx=\" + (r.urx-400) + \"\\tury=\" + (r.ury-400));\n \t\tList<Point2D.Double> corners = new ArrayList<Point2D.Double>();\n \t\tcorners.add(new Point2D.Double((r.llx-400),(r.lly-400)));\n \t\tcorners.add(new Point2D.Double((r.llx-400),(r.ury-400)));\n \t\tcorners.add(new Point2D.Double((r.urx-400),(r.lly-400)));\n \t\tcorners.add(new Point2D.Double((r.urx-400),(r.ury-400)));\n \t\tobstaclesF.add(new Obstacle(corners));\n \t}\n \t\n \ttoExplore.clear();\n \tint i = 0;\n \tRandom rand = new Random();\n \twhile (toExplore.size() < 10 && i < 1000) {\n \t\tint x = rand.nextInt(grid.length);\n \t\tint y = rand.nextInt(grid.length);\n \t\tif (grid[x][y] == .5) {\n \t\t\ttoExplore.add(new Flag(\"blue\",x,y));\n \t\t}\n \t}\n }",
"Render() {\n int imgNum;\n SampleModel sm = baseImage.getSampleModel(); // Set up the attributes for the new image.\n newImage = new TiledImage(baseImage.getMinX(),\n baseImage.getMinY(),\n (pixWidth * hTiles),\n (pixHeight * vTiles),\n baseImage.getTileGridXOffset(),\n baseImage.getTileGridYOffset(),\n baseImage.getSampleModel(),\n baseImage.getColorModel());\n RenderedImage smallImage; // Variable for holding the scaled down image to be placed in the large image.\n int tileArray[][] = new int[hTiles][vTiles]; // The array of how the tiles are arranged.\n // First, we select what tiles go where...\n for (int x = 0; x < hTiles; x++) { // Cycle through the image tiles, horizontally.\n for (int y = 0; y < vTiles; y++) { // Cycle through the image tiles, vertically.\n try {\n tileArray[x][y] = findBestFit(mapArray[x][y], tileArray, x, y); // Find the tile to go there.\n setCurr((x * vTiles) + y); // Update task stuff.\n setMsg(\"Choosing Image For Tile #\" + ((x * vTiles) + y));\n } catch (Exception e) {}\n }\n }\n\n setCurr(0); // Task stuff, for progress indicators...\n setMsg(\"Done Selecting Tiles... Generating Image\");\n\n // Next, we actually build the image based on the tiles we chose.\n for (int x = 0; x < hTiles; x++) { // Again, cycle horizonally,\n for (int y = 0; y < vTiles; y++) { // And vertically. ( for every tile in the image )\n try {\n smallImage = imageLoader.getRenderedImage(tileLibrary.get(tileArray[x][y]).getFileName()); // Load the image from the tile we selected.\n smallImage = imageOps.scale(smallImage, pixWidth, pixHeight); // Scale the image to the appropriate size.\n // Create a region of interest on the large image to paste the small image into.\n ROIShape myROI = new ROIShape(new Rectangle((x*pixWidth), (y*pixHeight), smallImage.getWidth(), smallImage.getHeight()));\n ParameterBlock pb = new ParameterBlock(); // Move the image to the appropriate spot...\n pb.addSource(smallImage);\n pb.add((float)(x*pixWidth));\n pb.add((float)(y*pixHeight));\n pb.add(new InterpolationNearest());\n smallImage = JAI.create(\"translate\", pb, null); // Do the translation.\n newImage.setData(smallImage.getData(), myROI); // Stick the tile image into the large image.\n setCurr((x * vTiles) + y); // Update task stuff.\n setMsg(\"Building Tile# \" + ((x * vTiles) + y));\n } catch (Exception e) {}\n }\n }\n setCurr(lengthOfTask); // Finish up the task stuff.\n setMsg(\"DONE!\");\n }",
"private void searchNeighborhood(int nx, int ny, int nz) {\n\n if ((nx < 1) || (ny < 1) || (nz < 1)) return;\n if ((nx > w - 2) || (ny > h - 2) || (nz > d - 2)) return;\n\n float[] pixels = stack.getVoxels(nx - 1, ny -1, nz -1 , 3, 3, 3, null);\n\n //System.out.println(\"working on: \" + nx + \" \" + ny + \" \" + nz + \" : \" + pixels[13]);\n\n for (int i = 0; i < pixels.length; i++) {\n if (i == pixels.length/2) continue; //do check the center pixel\n\n int rx = (i % 9) % 3 - 1;\n int ry = (i % 9) / 3 - 1;\n int rz = i / 9 - 1;\n\n int sx = nx + rx;\n int sy = ny + ry;\n int sz = nz + rz;\n\n if (((pixels[i] > .5*value) && pixels[i] > threshold) ||\n (pixels[i] > (value - tolerance)) && (pixels[i] > threshold)) {\n\n Long index = (long)(sz*w*h + sy*w + sx);\n if (!neighborsList.contains((Long)index)) {\n neighborsList.add(index);\n //System.out.println(\"Added: \" + sx + \" \" + sy + \" \" + sz + \" : \" + pixels[i]);\n float d = (nx - sx)*(nx - sx) + (ny - sy)*(ny - sy) + (nz - sz)*(nz - sz);\n if (d < 15*15) {\n searchNeighborhood(sx, sy, sz);\n }\n }\n }\n else {\n //System.out.println(\"Rejected: \" + sx + \" \" + sy + \" \" + sz + \" : \" + pixels[i]);\n }\n\n }\n }",
"private void work(QuadTree current, QuadTree target, Map<String, Object> results, double tar_LonDPP) {\n LinkedList<QuadTree> grid = new LinkedList<>();\n LinkedList<QuadTree> Linked = new LinkedList<>();\n grid.addLast(current);\n while (grid.size() != 0) {\n QuadTree cur = grid.removeFirst();\n if (cur.checkResolution(tar_LonDPP) && cur.checkOverlap(target) || cur.checkOverlap(target) && cur.depth == 7) {\n Linked.addLast(cur);\n } else if (cur.checkOverlap(target) && cur.depth < cur.maxDepth) {\n QuadTree[] children = cur.findChild(cur);\n for (QuadTree c : children) {\n grid.addLast(c);\n }\n }\n }\n String[][] childrenNames = childrenNames(Linked);\n\n results.put(\"render_grid\", childrenNames);\n double[] fourPoints = findFourPoints(Linked);\n results.put(\"raster_ul_lon\", fourPoints[0]);\n results.put(\"raster_lr_lon\", fourPoints[1]);\n results.put(\"raster_lr_lat\", fourPoints[2]);\n results.put(\"raster_ul_lat\", fourPoints[3]);\n results.put(\"depth\", Linked.getFirst().depth);\n results.put(\"query_success\", true);\n }",
"public static Bitmap CreateBitmapFromGridOfCells(TrafficCell[][] i_grid,int i_mode, boolean i_drawVehicles) {\n// The first index is the y coordinate measured from the top; the second\n// index is the x coordinate measured from the left.\nint t_height = i_grid.length;\nint t_width = 0;\nif (i_grid[0] != null)\nt_width = i_grid[0].length;\n\nBitmap.Config t_conf = Bitmap.Config.ARGB_8888;\nBitmap t_bitmap = Bitmap.createBitmap(t_width, t_height, t_conf);\n\n// this is a slow method\n// TODO: change this to setPixels or to copyPixelsFrom...\nfor (int i = 0; i < t_height; i++) {\nfor (int j = 0; j < t_width; j++) {\nt_bitmap.setPixel(j, i,\nCalulateColorFromTrafficCell(i_grid[i][j], i_mode,i_drawVehicles));\n}\n}\nreturn t_bitmap;\n}",
"private void createTiles() {\n\t\tint tile_width = bitmap.getWidth() / gridSize;\n\t\tint tile_height = bitmap.getHeight() / gridSize;\n\n\t\tfor (short row = 0; row < gridSize; row++) {\n\t\t\tfor (short column = 0; column < gridSize; column++) {\n\t\t\t\tBitmap bm = Bitmap.createBitmap(bitmap, column * tile_width,\n\t\t\t\t\t\trow * tile_height, tile_width, tile_height);\n\n\t\t\t\t// if final, Tile -> blank\n\t\t\t\tif ((row == gridSize - 1) && (column == gridSize - 1)) {\n\t\t\t\t\tbm = Bitmap.createBitmap(tile_width, tile_height,\n\t\t\t\t\t\t\tbm.getConfig());\n\t\t\t\t\tbm.eraseColor(Color.WHITE);\n\t\t\t\t\ttheBlankTile = new Tile(bm, row, column);\n\t\t\t\t\ttiles.add(theBlankTile);\n\t\t\t\t} else {\n\t\t\t\t\ttiles.add(new Tile(bm, row, column));\n\t\t\t\t}\n\t\t\t} // end column\n\t\t} // end row\n\t\tbitmap.recycle();\n\n\t}",
"public List<Grid> getGrids() {\n\tList<Grid> grids = new ArrayList<Grid>();\n\tList<Line> currentLines = _path;\n\twhile(currentLines.size()>1) {\n\t Grid grid = new Grid();\n\t grids.add(grid);\n\t List<Line> nonOverlappingLines = grid.overlapping(currentLines);\n\t \t \n\t Double[] xs = grid.xs();\n\t Double[] ys = grid.ys();\n\t \n\t if (xs.length>3 && ys.length>3) {\n\t\tDouble minx = xs[0];\n\t\tDouble maxx = xs[xs.length-1];\n\t\t\n\t\tDouble miny = ys[0];\n\t\tDouble maxy = ys[ys.length-1];\n\t\t\n\t\tfor(int i=0; i<xs.length; i++) {\n\t\t System.out.println(\"Line: \" + xs[i].toString() + \",\" + miny.toString() + \",\" + xs[i].toString() + \",\" + maxy.toString());\n\t\t}\n\t\tfor(int i=0; i<ys.length; i++) {\n\t\t System.out.println(\"Line: \" + minx.toString() + \",\" + ys[i].toString() + \",\" + maxx.toString() + \",\" + ys[i].toString());\n\t\t}\n\t }\n\n\t currentLines = nonOverlappingLines;\n\t}\n\treturn grids;\n }",
"public List<Square> getSquareGrid();",
"Data<List<Boards>> getSearchBoards(String query);",
"FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}",
"com.ctrip.ferriswheel.proto.v1.Grid getGrid();",
"private void searchQuery(String query) {\n mSearchAheadServiceV3 = new SearchAheadService(this, API_KEY);\n\n String queryString = query;\n\n LatLng surreyBC = new LatLng(49.104599F, -122.823509F);\n\n List searchCollections = Arrays.asList(SearchCollection.AIRPORT, SearchCollection.ADMINAREA,\n SearchCollection.ADDRESS, SearchCollection.FRANCHISE, SearchCollection.POI);\n try {\n SearchAheadQuery searchAheadQuery = new SearchAheadQuery\n .Builder(queryString, searchCollections)\n .location(surreyBC)\n .limit(5)\n .build();\n\n mSearchAheadServiceV3.predictResultsFromQuery(searchAheadQuery,\n new SearchAheadService.SearchAheadResponseCallback() {\n\n @Override\n public void onSuccess(@NonNull SearchAheadResponse searchAheadResponse) {\n\n //Get search results from the request response\n List<SearchAheadResult> searchAheadResults = searchAheadResponse.getResults();\n\n //if we have requests\n if (searchAheadResults.size() > 0) {\n\n //clear the current data to display\n searchResultsData.clear();\n\n try {\n\n int size = (searchAheadResults.size() < 5) ? searchAheadResults.size() : 5;\n\n for (int i = size - 1; i >= 0; i--) {\n // create a hashmap\n HashMap<String, String> hashMap = new HashMap<>();\n\n AddressProperties addressProperties = searchAheadResults.get(i).getPlace().getAddressProperties();\n\n // convert image int to a string and place it into the hashmap with an images key\n hashMap.put(\"address\", searchAheadResults.get(i).getName());\n hashMap.put(\"city\", addressProperties.getCity() + \", \" + addressProperties.getStateCode());\n hashMap.put(\"lat\", String.valueOf(searchAheadResults.get(i).getPlace().getLatLng().getLatitude()));\n hashMap.put(\"long\", String.valueOf(searchAheadResults.get(i).getPlace().getLatLng().getLongitude()));\n\n\n // add this hashmap to the list\n searchResultsData.add(hashMap);\n }\n\n //handle null pointer exception on address properties\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n\n //adapter inputs\n String[] from = {\n \"address\",\n \"city\",\n \"lat\",\n \"long\"\n };\n\n int[] to = {R.id.text_result_address, R.id.text_result_city, R.id.hidden_location_lat, R.id.hidden_location_long};\n\n searchAdapter = new SimpleAdapter(getApplicationContext(), searchResultsData, R.layout.item_search_result, from, to);\n mListViewSearch.setAdapter(searchAdapter);\n mListViewSearch.setVisibility(View.VISIBLE);\n } else {\n resetSearchAheadList();\n }\n }\n\n @Override\n public void onError(Exception e) {\n Log.e(\"MAPQUEST\", \"Search Ahead V3 Failure\", e);\n }\n });\n } catch (IllegalQueryParameterException e) {\n Log.e(\"Error performing search\", e.getMessage());\n }\n }",
"private void obtainRefiningPoints(ArrayList<double[]> points2d_in, Matrix P, double gridSize_in, int gridCount_in[], ArrayList<double[]> points2d_out, ArrayList<double[]> points3d_out) {\n\t\tdouble fuzziness = 25;\n\t\tfor (int x = (gridCount_in[0] > 1 ? 1 : 0); x < gridCount_in[0]; x += 2) {\n\t\t\tfor (int y = (gridCount_in[1] > 1 ? 1 : 0); y < gridCount_in[1]; y += 2) {\n\t\t\t\tfor (int z = 1; z < gridCount_in[2]; z += 2) {\n\t\t\t\t\tMatrix x3D = new Matrix(4, 1);\n\t\t\t\t\tx3D.set(0, 0, x * gridSize_in);\n\t\t\t\t\tx3D.set(1, 0, y * gridSize_in);\n\t\t\t\t\tx3D.set(2, 0, z * gridSize_in);\n\t\t\t\t\tx3D.set(3, 0, 1.0);\n\t\t\t\t\tMatrix x2D = P.mul(x3D);\n\t\t\t\t\tx2D = x2D.div(x2D.get(2));\n\t\t\t\t\tdouble minDistance = 100000;\n\t\t\t\t\tint minDistanceIndex = 0;\n\t\t\t\t\tfor (int j=0;j<points2d_in.size();j++) {\n\t\t\t\t\t\tdouble distance = Math.pow(x2D.get(0) - points2d_in.get(j)[0], 2) + Math.pow(x2D.get(1) - points2d_in.get(j)[1], 2);\n\t\t\t\t\t\tif (distance < minDistance) {\n\t\t\t\t\t\t\tminDistance = distance;\n\t\t\t\t\t\t\tminDistanceIndex = j;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (minDistance < fuzziness) {\n\t\t\t\t\t\tpoints2d_out.add(points2d_in.get(minDistanceIndex));\n\t\t\t\t\t\tpoints3d_out.add(new Matrix(x3D).data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private Task reloadImageList() {\n\n mainModel.setLoadingNewImages(true);\n\n final LatLng loc = mainModel.getLastLoc();\n\n LatLng topRight = SphericalUtil.computeOffset(loc, 5000, 0);\n topRight = SphericalUtil.computeOffset(topRight, 5000, 90);\n\n LatLng bottomLeft = SphericalUtil.computeOffset(loc, 5000, 180);\n bottomLeft = SphericalUtil.computeOffset(bottomLeft, 5000, 270);\n\n Query lat = mainModel.getDataStore().collection(MainModel.IMAGE_COLLECTION)\n .whereGreaterThan(\"lat\", bottomLeft.latitude)\n .whereLessThan(\"lat\", topRight.latitude)\n .orderBy(\"lat\")\n .orderBy(\"timestamp\", Query.Direction.DESCENDING)\n .limit(100);\n\n final LatLng finalTopRight = topRight;\n final LatLng finalBottomLeft = bottomLeft;\n\n\n return lat.get()\n .addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {\n @Override\n public void onSuccess(QuerySnapshot documentSnapshots) {\n imagesInRange.clear();\n List<DocumentSnapshot> docs = documentSnapshots.getDocuments();\n for (DocumentSnapshot doc : docs) {\n double lon = (double) doc.get(\"lon\");\n if (lon < finalTopRight.longitude && lon > finalBottomLeft.longitude) {\n imagesInRange.add(doc);\n }\n }\n\n List<DocumentSnapshot> sortedImages = sortImages(imagesInRange);\n imagesInRange.clear();\n imagesInRange.addAll(sortedImages);\n }\n })\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n mainModel.setLoadingNewImages(false);\n mainModel.setImagesInRange(imagesInRange);\n imagesLength = mainModel.getImagesInRange().size();\n\n pager.setAdapter(pagerAdapter);\n pagerAdapter = new ScreenSlidePagerAdapter(getFragmentManager());\n pager.setAdapter(pagerAdapter);\n pager.setOffscreenPageLimit(30);\n pagerAdapter.notifyDataSetChanged();\n//\n// pager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {\n// @Override\n// public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n// }\n//\n// @Override\n// public void onPageSelected(int position) {\n// System.out.println(position);\n// }\n//\n// @Override\n// public void onPageScrollStateChanged(int state) {\n// System.out.println(state);\n// }\n// });\n\n\n showProgress(false);\n }\n });\n }",
"public LiveData<List<PhotoData>> getImagesInsideBounds(LatLngBounds latLngBounds) {\n\n locationImages = mRepository.findImagesInsideBounds(latLngBounds);\n return locationImages;\n }",
"private List<String> getImages(String query, int id) {\n\t\tResultSet rs=null;\n\t\tList<String> imageList = new ArrayList<String>();\n\t\ttry {\n\t\t\t\n\t\t\t//pstmt = con.prepareStatement(query);\n\t\t\tPreparedStatement pstmt = dataSource.getConnection().prepareStatement(query);\n\t\t\tpstmt.setInt(1, id);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) \n\t\t\t{\n\t\t\t\timageList.add(rs.getString(1));\n\t\t\t}\n\t\t}catch (SQLException e) {\n\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\treturn imageList;\n\t}",
"private int findBestFit(Color c, int[][] tileArray, int x, int y) {\n int radiusTiles = 10; // The number of radius tiles... this WILL be user-configurable.\n int closestSoFar = 0; // Index of the tile that best matches the color so far.\n int redDiff, greenDiff, blueDiff, totalDiff = 0;\n totalDiff = (256*3); // Initialize the total difference to the largest reasonable number.\n if (c==null) { // assume that the color is black...\n c = new Color(0,0,0);\n }\n for (int count = 0; count < tileLibrary.getSize(); count++) { // Cycle through all of the library tiles.\n if (tileLibrary.get(count).getColor() != null) {\n\n/********* UNCOMMENT THE FOLLOWING TO USE THE NO-REP ALGORITHM ***********/\n /* // This is the no-rep algorithm.\n redDiff = Math.abs(c.getRed() - images.get(count).getColor().getRed());\n blueDiff = Math.abs(c.getBlue() - images.get(count).getColor().getBlue());\n greenDiff = Math.abs(c.getGreen() - images.get(count).getColor().getGreen());\n if (((redDiff + blueDiff + greenDiff) < totalDiff) && (used[count] == false)) {\n totalDiff = redDiff + blueDiff + greenDiff;\n closestSoFar = count;\n }\n */\n/**************************************************************************/\n\n/********** COMMENT OUT TO USE NO-REP ALGORITHM INSTEAD *******************/\n // Is this image in our no-dice radius?\n boolean inRadius = false;\n for (int newX = (x - radiusTiles); newX < (x+radiusTiles); newX++) { // Cycle through the width of the box...\n for (int newY = (y - radiusTiles); newY < (y+radiusTiles); newY++) { // Cycle through the height of the box...\n // If we are still within the bounds of the image....\n if ((newX >= 0) && (newY >= 00) && (newX < hTiles) && (newY < vTiles)) { // && !((newX >= x) && (newY >= y))) {\n try {\n if (tileArray[newX][newY] == count) { // If that tile is already in the box...\n inRadius = true;\n }\n } catch (Exception e) {System.out.println(e);}\n }\n }\n }\n if (inRadius == false) { // If this tile isn't in the box, find the difference in color.\n redDiff = Math.abs(c.getRed() - tileLibrary.get(count).getColor().getRed());\n blueDiff = Math.abs(c.getBlue() - tileLibrary.get(count).getColor().getBlue());\n greenDiff = Math.abs(c.getGreen() - tileLibrary.get(count).getColor().getGreen());\n if (((redDiff + blueDiff + greenDiff) < totalDiff)) { // if this is closer than the previous closest...\n totalDiff = redDiff + blueDiff + greenDiff;\n closestSoFar = count; // Keep track of this tile.\n }\n }\n }\n }\n return closestSoFar; // return the tile we chose.\n }",
"public void draw() {\n PImage grid = loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/tile.png\");\n for(int i = 0 ; i < 10 ; i++){\n for(int j = 0 ; j < 6 ; j++){\n image(grid, i*grid.width, j*grid.height);\n if(gridPlane.get(List.of(i, j)).getOwner() != null){\n if(gridPlane.get(List.of(i, j)).getOwner().getColor().equals(\"Red\")){\n if(gridPlane.get(List.of(i, j)).getAtomCount() == 1){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red1.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 2){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red2.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 3){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red3.png\"), i*grid.width, j*grid.height);\n }\n }else if(gridPlane.get(List.of(i, j)).getOwner().getColor().equals(\"Green\")){\n if(gridPlane.get(List.of(i, j)).getAtomCount() == 1){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green1.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 2){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green2.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 3){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green3.png\"), i*grid.width, j*grid.height);\n }\n }\n }\n }\n }\n if(this.finish == true){\n System.exit(0);\n }\n }",
"@Override\n public void computeTileStack(Map<Band, Tile> targetTileMap, Rectangle targetRectangle, ProgressMonitor pm) throws OperatorException {\n try {\n\n int y0 = targetRectangle.y;\n int yN = y0 + targetRectangle.height - 1;\n int x0 = targetRectangle.x;\n int xN = targetRectangle.x + targetRectangle.width - 1;\n final Window tileWindow = new Window(y0, yN, x0, xN);\n\n Band topoPhaseBand;\n Band targetBand_I;\n Band targetBand_Q;\n\n // TODO: smarter extension of search space : foreshortening extension? can I calculate how bit tile I\n // need (extra space) for the coverage, taking into the consideration only height of the tile?\n for (String ifgKey : targetMap.keySet()) {\n\n ProductContainer product = targetMap.get(ifgKey);\n\n /// get dem of tile ///\n\n // compute tile geo-corners ~ work on ellipsoid\n GeoPoint[] geoCorners = GeoUtils.computeCorners(product.sourceMaster.metaData,\n product.sourceMaster.orbit,\n tileWindow);\n\n // get corners as DEM indices\n PixelPos[] pixelCorners = new PixelPos[2];\n pixelCorners[0] = dem.getIndex(new GeoPos((float) geoCorners[0].lat, (float) geoCorners[0].lon));\n pixelCorners[1] = dem.getIndex(new GeoPos((float) geoCorners[1].lat, (float) geoCorners[1].lon));\n\n // get max/min height of tile ~ uses 'fast' GCP based interpolation technique\n double[] tileHeights = computeMaxHeight(pixelCorners, targetRectangle);\n\n // compute extra lat/lon for dem tile\n GeoPoint geoExtent = GeoUtils.defineExtraPhiLam(tileHeights[0], tileHeights[1],\n tileWindow, product.sourceMaster.metaData, product.sourceMaster.orbit);\n\n // extend corners\n geoCorners = GeoUtils.extendCorners(geoExtent, geoCorners);\n\n // update corners\n pixelCorners[0] = dem.getIndex(new GeoPos((float) geoCorners[0].lat, (float) geoCorners[0].lon));\n pixelCorners[1] = dem.getIndex(new GeoPos((float) geoCorners[1].lat, (float) geoCorners[1].lon));\n\n pixelCorners[0] = new PixelPos((float) Math.ceil(pixelCorners[0].x), (float) Math.floor(pixelCorners[0].y));\n pixelCorners[1] = new PixelPos((float) Math.floor(pixelCorners[1].x), (float) Math.ceil(pixelCorners[1].y));\n\n GeoPos upperLeftGeo = dem.getGeoPos(pixelCorners[0]);\n\n int nLatPixels = (int) Math.abs(pixelCorners[1].y - pixelCorners[0].y);\n int nLonPixels = (int) Math.abs(pixelCorners[1].x - pixelCorners[0].x);\n\n int startX = (int) pixelCorners[0].x;\n int endX = startX + nLonPixels;\n int startY = (int) pixelCorners[0].y;\n int endY = startY + nLatPixels;\n\n double[][] elevation = new double[nLatPixels][nLonPixels];\n for (int y = startY, i = 0; y < endY; y++, i++) {\n for (int x = startX, j = 0; x < endX; x++, j++) {\n try {\n float elev = dem.getSample(x, y);\n if (Float.isNaN(elev))\n elev = demNoDataValue;\n elevation[i][j] = elev;\n } catch (Exception e) {\n elevation[i][j] = demNoDataValue;\n }\n }\n }\n\n DemTile demTile = new DemTile(upperLeftGeo.lat * Constants.DTOR, upperLeftGeo.lon * Constants.DTOR,\n nLatPixels, nLonPixels, Math.abs(demSamplingLat), Math.abs(demSamplingLon), (long) demNoDataValue);\n demTile.setData(elevation);\n\n final TopoPhase topoPhase = new TopoPhase(product.sourceMaster.metaData, product.sourceMaster.orbit,\n product.sourceSlave.metaData, product.sourceSlave.orbit, tileWindow, demTile);\n topoPhase.radarCode();\n topoPhase.gridData();\n\n /// check out results from source ///\n Tile tileReal = getSourceTile(product.sourceMaster.realBand, targetRectangle);\n Tile tileImag = getSourceTile(product.sourceMaster.imagBand, targetRectangle);\n ComplexDoubleMatrix complexIfg = TileUtilsDoris.pullComplexDoubleMatrix(tileReal, tileImag);\n\n final ComplexDoubleMatrix cplxTopoPhase = new ComplexDoubleMatrix(\n MatrixFunctions.cos(new DoubleMatrix(topoPhase.demPhase)),\n MatrixFunctions.sin(new DoubleMatrix(topoPhase.demPhase)));\n\n SarUtils.computeIfg_inplace(complexIfg, cplxTopoPhase.conji());\n\n /// commit to target ///\n targetBand_I = targetProduct.getBand(product.targetBandName_I);\n Tile tileOutReal = targetTileMap.get(targetBand_I);\n TileUtilsDoris.pushDoubleMatrix(complexIfg.real(), tileOutReal, targetRectangle);\n\n targetBand_Q = targetProduct.getBand(product.targetBandName_Q);\n Tile tileOutImag = targetTileMap.get(targetBand_Q);\n TileUtilsDoris.pushDoubleMatrix(complexIfg.imag(), tileOutImag, targetRectangle);\n\n topoPhaseBand = targetProduct.getBand(product.masterSubProduct.targetBandName_I);\n Tile tileOutTopoPhase = targetTileMap.get(topoPhaseBand);\n TileUtilsDoris.pushDoubleArray2D(topoPhase.demPhase, tileOutTopoPhase, targetRectangle);\n\n }\n\n } catch (Exception e) {\n throw new OperatorException(e);\n }\n }",
"SearchResult getBestResult(List<SearchResult> results, SearchQuery query);",
"public static FPoint2[] findSnapErrors(Grid grid, SnapArrangement ar) {\n\n DArray a = new DArray();\n do {\n extractSnapPoints(ar);\n\n // construct a list of segment sections between snap points\n DArray fragList = new DArray();\n FRect fragBounds = null;\n\n Graph g = ar.getGraph();\n for (int jj = 0; jj < ar.nNodes(); jj++) {\n int id1 = jj + ar.idBase();\n for (int kk = 0; kk < g.nCount(id1); kk++) {\n int id2 = g.neighbor(id1, kk);\n if (id2 < id1)\n continue;\n\n // Segment seg = segs[i];\n // for (int j = 0; j < seg.nSnapPoints() - 1; j++) {\n Endpoints ep = new Endpoints(grid, ar.hotPixel(id1), ar.hotPixel(id2));\n if (fragBounds == null)\n fragBounds = new FRect(ep.v0, ep.v1);\n fragBounds.add(ep.v0);\n fragBounds.add(ep.v1);\n fragList.add(ep);\n }\n }\n\n if (fragList.isEmpty())\n break;\n\n // to speed up this process, divide bounds into a grid of bucket/pixels.\n // Each bucket contains the fragments whose minimum bounding rectangles\n // intersect the bucket's pixel. \n // Thus we need only compare fragments against others from the same bucket.\n\n int nBuckets = Math.max(1, ar.nNodes() / 60);\n DArray[] buckets = new DArray[nBuckets * nBuckets];\n {\n double bWidth = fragBounds.width / nBuckets, bHeight = fragBounds.height\n / nBuckets;\n for (int i = 0; i < buckets.length; i++)\n buckets[i] = new DArray();\n for (int i = 0; i < fragList.size(); i++) {\n Endpoints e = (Endpoints) fragList.get(i);\n // add endpoint to every bucket it may intersect\n int y0 = (int) ((Math.min(e.v0.y, e.v1.y) - fragBounds.y) / bHeight);\n int y1 = MyMath.clamp(\n (int) ((Math.max(e.v0.y, e.v1.y) - fragBounds.y) / bHeight), 0,\n nBuckets - 1);\n int x0 = (int) ((Math.min(e.v0.x, e.v1.x) - fragBounds.x) / bWidth);\n int x1 = MyMath.clamp(\n (int) ((Math.max(e.v0.x, e.v1.x) - fragBounds.x) / bWidth), 0,\n nBuckets - 1);\n\n for (int y = y0; y <= y1; y++) {\n for (int x = x0; x <= x1; x++) {\n buckets[y * nBuckets + x].add(e);\n }\n }\n }\n }\n\n final double NEARZERO = .00001;\n\n for (int k = 0; k < buckets.length; k++) {\n DArray b = buckets[k];\n for (int i = 0; i < b.size(); i++) {\n Endpoints ei = (Endpoints) b.get(i);\n\n for (int j = i + 1; j < b.size(); j++) {\n Endpoints ej = (Endpoints) b.get(j);\n\n FPoint2 pt = MyMath.lineSegmentIntersection(ei.v0, ei.v1, ej.v0,\n ej.v1, null);\n if (pt == null)\n continue;\n String err = null;\n\n // make sure the intersection occurs at an endpoint of each\n double di = Math.min(pt.distance(ei.v0), pt.distance(ei.v1));\n double dj = Math.min(pt.distance(ej.v0), pt.distance(ej.v1));\n\n // in triangle grid, fragment endpoint can lie on other fragment.\n // To eliminate this possibility, intersection point must be\n // distinct from all four endpoints.\n\n if (Math.min(di, dj) > NEARZERO) {\n err = \"\";\n }\n if (err != null) {\n a.add(pt);\n // a.add(err);\n }\n }\n }\n }\n } while (false);\n return (FPoint2[]) a.toArray(FPoint2.class);\n }",
"public void createList () {\n imageLocs = new ArrayList <Location> ();\n for (int i = xC; i < xLength * getPixelSize() + xC; i+=getPixelSize()) {\n for (int j = yC; j < yLength * getPixelSize() + yC; j+=getPixelSize()) {\n Location loc = new Location (i, j, LocationType.POWERUP, true);\n\n imageLocs.add (loc);\n getGridCache().add(loc);\n \n }\n }\n }",
"public void createGrid() {\n\t\tint[][] neighbours = getIo().getNeighbours();\n\t\tsetGrid(new GridAlg(neighbours, animals));\n\t\tgetGrid().setStep(getStep());\n\t}",
"public PostingsList intersect(Query query){\n\n LinkedList<PostingsList> listQueriedPostings = new LinkedList<PostingsList>();\n // List with postings corresponding to the queries\n for (int i = 0; i<query.size(); i++){\n // If any query has zero matches, return 0 results\n //if(!(new File(\"postings/t\"+hash(query.terms.get(i))+\".json\")).exists()){\n if (!this.index.containsKey(query.terms.get(i))){\n return null;\n }\n // Otherwise store postings in the list\n listQueriedPostings.add(this.getPostings(query.terms.get(i)));\n }\n\n // Order the posting list by increasing document frequency\n listQueriedPostings = sortByIncreasingFrequency(listQueriedPostings);\n\n PostingsList result = (PostingsList)listQueriedPostings.get(0);\n\n // In case only one word is queried\n if (listQueriedPostings.size() == 1){\n return result;\n }\n\n // Apply algorithm as many times as words in the query\n for(int i = 1; i < listQueriedPostings.size(); i++){\n result = intersect(result, listQueriedPostings.get(i));\n if (result.isEmpty()){\n return null;\n }\n }\n return result;\n }",
"private static GridSearch9734Mod initializeGridSearch() {\r\n\t\tGridSearch9734Mod grid = new GridSearch9734Mod();\r\n\t\t// the metric to optimize\r\n\t\tgrid.setEvaluation(\r\n\t\t\t\tnew SelectedTag(GridSearch9734Mod.EVALUATION_WAUC, GridSearch9734Mod.TAGS_EVALUATION));\r\n\t\tgrid.setGridIsExtendable(false);\r\n\t\tgrid.setNumExecutionSlots(2);\r\n\t\tgrid.setSampleSizePercent(100);\r\n\t\tgrid.setInitialNumFolds(2);\r\n\t\tgrid.setStopAfterFirstGrid(true);\r\n\t\tgrid.setTraversal(\r\n\t\t\t\tnew SelectedTag(GridSearch9734Mod.TRAVERSAL_BY_ROW, GridSearch9734Mod.TAGS_TRAVERSAL));\r\n\t\tgrid.setDebug(false);\r\n\t\treturn grid;\r\n\t}",
"public void createScaledImage(String location, int type, int orientation, int session, int database_id) {\n\n // find portrait or landscape image\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(location, options);\n final int imageHeight = options.outHeight; //find the width and height of the original image.\n final int imageWidth = options.outWidth;\n\n int outputHeight = 0;\n int outputWidth = 0;\n\n\n //set the output size depending on type of image\n switch (type) {\n case EdittingGridFragment.SIZE4R :\n if (orientation == EdittingGridFragment.LANDSCAPE) {\n outputWidth = 1800;\n outputHeight = 1200;\n } else if (orientation == EdittingGridFragment.PORTRAIT) {\n outputWidth = 1200;\n outputHeight = 1800;\n }\n break;\n case EdittingGridFragment.SIZEWALLET:\n if (orientation == EdittingGridFragment.LANDSCAPE) {\n outputWidth = 953;\n outputHeight = 578;\n } else if (orientation ==EdittingGridFragment.PORTRAIT ) {\n outputWidth = 578;\n outputHeight = 953;\n }\n\n break;\n case EdittingGridFragment.SIZESQUARE:\n outputWidth = 840;\n outputHeight = 840;\n break;\n }\n\n assert outputHeight != 0 && outputWidth != 0;\n\n\n //fit images\n //FitRectangles rectangles = new FitRectangles((int) outputWidth, (int) outputHeight, imageWidth, imageHeight);\n\n //scaled images\n ScaledRectangles rectangles = new ScaledRectangles((int) outputWidth, (int) outputHeight, imageWidth, imageHeight);\n\n Rect canvasSize = rectangles.getCanvasSize();\n Rect canvasImageCoords = rectangles.getCanvasImageCoords();\n Rect imageCoords = rectangles.getImageCoords();\n\n\n\n /*\n //set the canvas size based on the type of image\n Rect canvasSize = new Rect(0, 0, (int) outputWidth, (int) outputHeight);\n Rect canvasImageCoords = new Rect();\n //Rect canvasImageCoords = new Rect (0, 0, outputWidth, outputHeight); //set to use the entire canvas\n Rect imageCoords = new Rect(0, 0, imageWidth, imageHeight);\n //Rect imageCoords = new Rect();\n\n\n // 3 cases, exactfit, canvas width larger, canvas height larger\n if ((float) outputHeight/outputWidth == (float) imageHeight/imageWidth) {\n canvasImageCoords.set(canvasSize);\n //imageCoords.set(0, 0, imageWidth, imageHeight); //map the entire image to the entire canvas\n Log.d(\"Async\", \"Proportionas Equal\");\n\n }\n\n\n\n else if ( (float) outputHeight/outputWidth > (float) imageHeight/imageWidth) {\n //blank space above and below image\n //find vdiff\n\n\n //code that fits the image without whitespace\n Log.d(\"Async\", \"blank space above and below\");\n\n float scaleFactor = (float)imageHeight / (float) outputHeight; //amount to scale the canvas by to match the height of the image.\n int scaledCanvasWidth = (int) (outputWidth * scaleFactor);\n int hDiff = (imageWidth - scaledCanvasWidth)/2;\n imageCoords.set (hDiff, 0 , imageWidth - hDiff, imageHeight);\n\n\n\n //code fits image with whitespace\n float scaleFactor = (float) outputWidth / (float) imageWidth;\n int scaledImageHeight = (int) (imageHeight * scaleFactor);\n assert scaledImageHeight < outputHeight;\n\n int vDiff = (outputHeight - scaledImageHeight)/2;\n canvasImageCoords.set(0, vDiff, outputWidth, outputHeight - vDiff);\n\n\n\n } else if ((float) outputHeight/outputWidth < (float) imageHeight/imageWidth) {\n //blank space to left and right of image\n\n\n //fits the image without whitespace\n float scaleFactor = (float) imageWidth / (float) outputWidth;\n int scaledCanvasHeight = (int) (outputHeight * scaleFactor);\n int vDiff = (imageHeight - scaledCanvasHeight)/2;\n imageCoords.set(0, vDiff, imageWidth, imageHeight - vDiff);\n\n //fits image with whitespace\n\n Log.d(\"Async\", \"blank space left and right\");\n float scaleFactor = (float) outputHeight / (float) imageHeight;\n int scaledImageWidth = (int) (imageWidth * scaleFactor);\n assert scaledImageWidth < outputWidth;\n\n int hDiff = (outputWidth - scaledImageWidth)/2;\n\n canvasImageCoords.set(hDiff, 0, outputWidth - hDiff, outputHeight);\n }\n\n */\n\n Log.d(\"Async\", \"Canvas Image Coords:\" + canvasImageCoords.toShortString());\n\n SaveImage imageSaver = new SaveImage(getApplicationContext(), database);\n ImageObject imageObject = new ImageObject(location);\n Bitmap imageBitmap = imageObject.getImageBitmap();\n int sampleSize = imageObject.getSampleSize();\n\n Rect sampledImageCoords = imageSaver.getSampledCoordinates(imageCoords, sampleSize);\n\n System.gc();\n BackgroundObject backgroundObject = new BackgroundObject(outputWidth, outputHeight);\n Bitmap background = backgroundObject.getBackground();\n\n\n background = imageSaver.drawOnBackground(background, imageBitmap,\n sampledImageCoords, canvasImageCoords);\n\n imageSaver.storeImage(background, database_id, session);\n background.recycle();\n\n }",
"GridGeometry invertGridGeometry(Map<String, Object> input, Query targetQuery,\n GridGeometry targetGridGeometry) throws ProcessException;",
"private void locateBestMatch(int queryStartIdx){\n \n double dist;\n double bsfDist = Double.MAX_VALUE;\n int bsfIdx = -1;\n\n double[] query = zNormalise(series, queryStartIdx, this.windowSize, false);\n double[] comparison;\n\n for(int comparisonStartIdx = 0; comparisonStartIdx <= seriesLength-windowSize; comparisonStartIdx+=stride){\n \n // exclusion zone +/- windowSize/2 around the window\n if(comparisonStartIdx >= queryStartIdx-windowSize*1.5 && comparisonStartIdx <= queryStartIdx+windowSize*1.5){\n continue;\n }\n \n // using a bespoke version of this, rather than the shapelet version, for efficiency - see notes with method\n comparison = zNormalise(series, comparisonStartIdx, windowSize, false);\n dist = 0;\n\n for(int j = 0; j < windowSize;j++){\n dist += (query[j]-comparison[j])*(query[j]-comparison[j]);\n if(dist > bsfDist){\n dist = Double.MAX_VALUE;\n break;\n }\n }\n\n if(dist < bsfDist){\n bsfDist = dist;\n bsfIdx = comparisonStartIdx;\n }\n\n }\n \n this.distances[queryStartIdx] = bsfDist;\n this.indices[queryStartIdx] = bsfIdx;\n }",
"public void draw_grid() {\n for (int i = 0; i <= xNumTiles; i++) {\n stroke(100);\n line(i * tileSize, 0, i * tileSize, yNumTiles * tileSize);\n }\n\n for (int j = 0; j <= yNumTiles; j++) {\n stroke(100);\n line(0, j * tileSize, xNumTiles * tileSize, j * tileSize);\n }\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic static void prepareQuery() throws InterruptedException, FileNotFoundException, IOException{\n\t\tint querySetSize=2;\n\t\tHashMap<Integer, Integer> totQ=(HashMap<Integer, Integer>) General.readObject(\"O:/ImageRetrieval/Herve1.5K/Herve_querys_L_to_L.hashMap\");\n\t\t\n\t\tString subQSetFolder=\"O:/ImageRetrieval/Herve1.5K/HerveQuerys_LtoL_perSubSet\"+querySetSize+\"/\";\n\t\tGeneral.makeORdelectFolder(subQSetFolder);\n\t\tRandom rand=new Random();\n\t\tArrayList<HashMap<Integer, Integer>> Qsets =General.randSplitHashMap(rand, totQ, 0, querySetSize);\n\t\tint totQnum=0;\n\t\tfor (int i = 0; i < Qsets.size(); i++) {\n\t\t\tGeneral.writeObject(subQSetFolder+\"Q\"+i+\".hashMap\", Qsets.get(i));\n\t\t\tSystem.out.println(i+\", \"+Qsets.get(i).size());\n\t\t\ttotQnum+=Qsets.get(i).size();\n\t\t}\n\t\tGeneral.Assert(totQnum==totQ.size(), \"err, totQnum:\"+totQnum+\", should ==\"+totQ.size());\n\t\tSystem.out.println(\"taget querySetSize:\"+querySetSize+\", totQnum:\"+totQnum+\", should ==\"+totQ.size());\n\t}",
"public static void main ( String[] args )\n {\n int[][] grid = new int[][] {{9, 0, 2, 5, 0, 9, 0, 5, 8, 5},\n {4, 8, 1, 7, 0, 5, 3, 6, 2, 0},\n {7, 7, 5, 6, 0, 5, 6, 6, 4, 0},\n {5, 1, 6, 2, 2, 2, 0, 9, 1, 9},\n {0, 7, 8, 9, 0, 7, 4, 3, 8, 6},\n {1, 0, 5, 6, 3, 2, 9, 3, 5, 3},\n {5, 3, 1, 4, 9, 9, 1, 3, 4, 8},\n {5, 6, 9, 9, 7, 8, 7, 3, 9, 3},\n {1, 0, 4, 8, 3, 1, 0, 2, 1, 5},\n {1, 7, 3, 6, 3, 7, 8, 3, 3, 6}};\n int[] rowproduct= new int[10]; //{0,0,....,0}\n int[] colproduct= new int[10];\n for( int i = 0; i < 10; i++)\n {\n rowproduct[i] = 1;\n colproduct[i] = 1;\n }\n int rhp=0;\n int chp=0;\n int rp=0;\n int cp=0;\n int intersection = 0;\n for (int row=0; row < grid.length; row++)\n {\n for (int col=0; col < grid[0].length; col++)\n {\n if (grid[row][col]!=0) // find product\n {\n rowproduct[row] *= grid[row][col];\n colproduct[col] *= grid[row][col];\n }//end if \n }\n }\n for(int i = 0 ;i < 10; i ++)\n {\n if(rowproduct[i]>rhp) //[rows] or [col] ?? row cuz we only compare when it has finished multiplying\n {\n rp=i;\n rhp = rowproduct[i];\n }\n if(colproduct[i]>chp)\n {\n cp=i;\n chp =colproduct[i];\n }\n }\n intersection = grid[rp][cp];\n System.out.println(\"--------------\");\n System.out.println(\"Number replaced = \"+ intersection + \"(Row \" + (rp+1)+\", Col \"+(cp+1) +\")\" );\n System.out.println(\"--------------\");\n for (int rows=0; rows < grid.length; rows++)\n {\n for (int col=0; col < grid[0].length; col++)\n {\n if (grid[rows][col]==0) // locate all zeros\n {\n grid[rows][col]=intersection;\n }\n\n if (grid[rows][col]==intersection) // locate all num intersections \n {\n grid[rows][col]=0;\n }\n System.out.print(grid[rows][col] + \" \");\n }\n System.out.print(\"\\n\");\n }\n }",
"Query invertQuery(Map<String, Object> input, Query targetQuery, GridGeometry gridGeometry) throws ProcessException;",
"private void getWorkoutGalleryImagesFromDatabase(){\n ArrayList<ArrayList<Object>> data;\n\n for(int i = 0; i < mWorkoutIds.size(); i++) {\n data = mDbHelperWorkouts.getImages(mWorkoutIds.get(i));\n\n ArrayList<String> gallery = new ArrayList<String>();\n\n // If image gallery is not available for selected workout id,\n // add workout image to the gallery\n if(data.size() > 0) {\n // store data to arraylist variable\n for (int j = 0; j < data.size(); j++) {\n ArrayList<Object> row = data.get(j);\n gallery.add(row.get(0).toString());\n }\n }else{\n gallery.add(mWorkoutImages.get(i));\n }\n mWorkoutGalleries.put(mWorkoutIds.get(i), gallery);\n }\n }",
"private void loadImagePanel(){\r\n\timagePanel = new JPanel(){\r\n\t\t@Override\r\n\t\tprotected void paintComponent(Graphics g) {\r\n\t\t\t// TODO Auto-generated method stub\r\n\t\t\tsuper.paintComponents(g);\r\n\t\t\t\t//drawing image\r\n\t\t\t\tg.drawImage(image, 0, 0, null);\r\n\t\t\t\t\r\n\t\t\t\tQuery q = getQuery();\r\n\t\t\t\tif(q == null || q.getSelectedQuery() == null)\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\r\n\t\t\t\tif(q.getSelectedQuery().trim().equalsIgnoreCase(\"Whole Region\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tif(getQuery().isSubmitFlag())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttry\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tStringBuffer sqlText = new StringBuffer();\r\n\t\t\t\t\t\t\t\tConnection con=hw2.getDBConnection();\r\n\t\t\t\t\t\t\t\tStatement st=con.createStatement();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(getQuery().isBuildingFlag())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tString sqlAll=\"select shape from buildings1\";\r\n\t\t\t\t\t\t\t\t\tResultSet rs=st.executeQuery(sqlAll);\r\n\t\t\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.BUILDINGS,rs,Color.YELLOW);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(getQuery().isAsFlag())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tString sqlAll=\"select loc,rad from announcementsystems\";\r\n\t\t\t\t\t\t\t\t\tResultSet rs=st.executeQuery(sqlAll);\r\n\t\t\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.AS,rs,Color.RED);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(getQuery().isStudentFlag())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tString sqlAll=\"select cord from test1\";\r\n\t\t\t\t\t\t\t\t\tResultSet rs=st.executeQuery(sqlAll);\r\n\t\t\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.STUDENTS,rs,Color.GREEN);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(Exception e)\r\n\t\t\t\t\t\t{\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}\r\n\t\t\t\t}//whole region ends\r\n\t\t\t\t\r\n\t\t\t\tif(q.getSelectedQuery().trim().equalsIgnoreCase(\"Point Query\")){\r\n\t\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\t\tg.drawRect(pqX, pqY, 5, 5);\r\n\t\t\t\t\tg.drawOval(pqX-50, pqY-50, 50*2, 50*2);\r\n\t\t\t\t\tif(getQuery().isSubmitFlag())\r\n\t\t\t\t\t{\r\n\t\t\t\t\tStringBuffer sqlText = new StringBuffer();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tConnection con=hw2.getDBConnection();\r\n\t\t\t\t\t\tStatement st=con.createStatement();\r\n\t\t\t\t\t\tif(getQuery().isBuildingFlag()){\r\n\t\t\t\t\t\t\tString sqlAll=\"select a.shape from buildings1 a where \" +\r\n\t\t\t\t\t\t\t\t\t\"sdo_geom.relate(sdo_geometry(2003,null\" +\r\n\t\t\t\t\t\t\t\t\t\",null,sdo_elem_info_array(1,1003,4),sdo_ordinate_array(\"+(pqX-50)+\",\"+(pqY)+\",\"+(pqX+50)+\",\"+(pqY)+\",\"+(pqX)+\",\"+(pqY-50)+\")),\" +\r\n\t\t\t\t\t\t\t\t\t\"'anyinteract',a.shape,0.005)='TRUE'\";\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tString sqlNearest=\"select b.shape from buildings1 b where \" +\r\n\t\t\t\t\t\t\t\t\t\"sdo_nn(b.shape,sdo_geometry(2001,null\" +\r\n\t\t\t\t\t\t\t\t\t\",sdo_point_type(\"+pqX+\",\"+(pqY)+\",null),null,null),\"+\r\n\t\t\t\t\t\t\t\t\t\"'sdo_num_res=1')='TRUE'\";\r\n\t\t\t\t\t\t\tResultSet rs1=st.executeQuery(sqlAll);\r\n\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.BUILDINGS,rs1,Color.GREEN);\r\n\t\t\t\t\t\t\tResultSet rs2=st.executeQuery(sqlNearest);\r\n\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.BUILDINGS,rs2,Color.YELLOW);\r\n\t\t\t\t\t\t\tsqlText.append(sqlAll + \"\\n\" +sqlNearest);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(getQuery().isAsFlag())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tString sqlAll =\"select a.loc,a.rad from announcementsystems a where \" +\r\n\t\t\t\t\t\t\t\t\t\"sdo_geom.relate(sdo_geometry(2003,null,null,sdo_elem_info_array(1,1003,4),\" +\r\n\t\t\t\t\t\t\t\t\t\"sdo_ordinate_array(\"+(pqX-50)+\",\"+(pqY)+\",\"+(pqX+50)+\",\"+(pqY)+\",\"+(pqX)+\",\"+(pqY-50)+\")),'anyinteract',a.loc,0.005)='TRUE'\";\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tString sqlNearest=\"select b.loc,b.rad from announcementsystems b where \" +\r\n\t\t\t\t\t\t\t\t\t\"sdo_nn(b.loc,sdo_geometry(2001,null\" +\r\n\t\t\t\t\t\t\t\t\t\",sdo_point_type(\"+pqX+\",\"+(pqY)+\",null),null,null),\"+\r\n\t\t\t\t\t\t\t\t\t\"'sdo_num_res=1')='TRUE'\";\r\n\t\t\t\t\t\t\tResultSet rs1=st.executeQuery(sqlAll);\r\n\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.AS,rs1,Color.GREEN);\r\n\t\t\t\t\t\t\tResultSet rs2=st.executeQuery(sqlNearest);\r\n\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.AS,rs2,Color.YELLOW);\r\n\t\t\t\t\t\t\tsqlText.append(sqlAll + \"\\n\" +sqlNearest);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(getQuery().isStudentFlag())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tString sqlAll=\" select s.cord from test1 s where \" +\r\n\t\t\t\t\t\t\t\t\t\"sdo_geom.relate(sdo_geometry(2003,null\" +\r\n\t\t\t\t\t\t\t\t\t\",null,sdo_elem_info_array(1,1003,4),sdo_ordinate_array(\"+(pqX-50)+\",\"+(pqY)+\",\"+(pqX+50)+\",\"+(pqY)+\",\"+(pqX)+\",\"+(pqY-50)+\")),\" +\r\n\t\t\t\t\t\t\t\t\t\"'anyinteract',s.cord,0.005)='TRUE'\";\r\n\t\t\t\t\t\t\tString sqlNearest=\"select s.cord from test1 s where \" +\r\n\t\t\t\t\t\t\t\t\t\"sdo_nn(s.cord,sdo_geometry(2001,null\" +\r\n\t\t\t\t\t\t\t\t\t\",sdo_point_type(\"+pqX+\",\"+(pqY)+\",null),null,null),\"+\r\n\t\t\t\t\t\t\t\t\t\"'sdo_num_res=1')='TRUE'\";\r\n\t\t\t\t\t\t\tResultSet rs1=st.executeQuery(sqlAll);\r\n\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.STUDENTS,rs1,Color.GREEN);\r\n\t\t\t\t\t\t\tResultSet rs2=st.executeQuery(sqlNearest);\r\n\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.STUDENTS,rs2,Color.YELLOW);\r\n\t\t\t\t\t\t\tsqlText.append(sqlAll + \"\\n\" +sqlNearest);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tgetDispQuery().setText(sqlText.toString());\r\n\t\t\t\t\t\tst = null;\r\n\t\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(q.getSelectedQuery().trim().equalsIgnoreCase(\"Range Query\")){\r\n\t\t\t\t\tif(path.size() == 1){\r\n\t\t\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\t\t\tg.drawRect(path.get(0).x, path.get(0).y, 10, 10);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\t\t\tfor(int i=1;i<path.size();i++){\r\n\t\t\t\t\t\t\tint a = path.get(i-1).x;\r\n\t\t\t\t\t\t\tint b = path.get(i-1).y;\r\n\t\t\t\t\t\t\tint c = path.get(i).x;\r\n\t\t\t\t\t\t\tint d = path.get(i).y;\r\n\t\t\t\t\t\t\txi= path.get(i).x;\r\n\t\t\t\t\t\t\tyi= path.get(i).y;\r\n\t\t\t\t\t\t\tg.drawLine(a, b, c, d);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tif(getQuery().isSubmitFlag())\r\n\t\t\t\t\t{\r\n\t\t\t\t\tStringBuffer sqlText = new StringBuffer();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tConnection con=hw2.getDBConnection();\r\n\t\t\t\t\t\tStatement st=con.createStatement();\r\n\t\t\t\t\t\tString coordinates=\"\";\r\n\t\t\t\t\t\tfor(int i=0;i<path.size();i++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcoordinates+=path.get(i).x+\",\"+path.get(i).y+\",\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcoordinates+=path.get(0).x+\",\"+path.get(0).y;\r\n\t\t\t\t\t\tif(getQuery().isBuildingFlag()){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tString sqlAll=\"select a.shape from buildings1 a where \" +\r\n\t\t\t\t\t\t\t\t\t\"sdo_geom.relate(sdo_geometry(2003,null\" +\r\n\t\t\t\t\t\t\t\t\t\",null,sdo_elem_info_array(1,1003,1),sdo_ordinate_array(\"+coordinates+\")),\" +\r\n\t\t\t\t\t\t\t\t\t\"'anyinteract',a.shape,0.005)='TRUE'\";\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tResultSet rs1=st.executeQuery(sqlAll);\r\n\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.BUILDINGS,rs1,Color.YELLOW);\r\n\t\t\t\t\t\t\tsqlText.append(sqlAll + \"\\n\" );\r\n\t\t\t\t\t\t\tgetDispQuery().setText(sqlText.toString());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(getQuery().isAsFlag())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tString sqlAll =\"select a.loc,a.rad from announcementsystems a where \" +\r\n\t\t\t\t\t\t\t\t\t\"sdo_geom.relate(sdo_geometry(2003,null,null,sdo_elem_info_array(1,1003,1),\" +\r\n\t\t\t\t\t\t\t\t\t\"sdo_ordinate_array(\"+coordinates+\")),'anyinteract',a.loc,0.005)='TRUE'\";\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tResultSet rs1=st.executeQuery(sqlAll);\r\n\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.AS,rs1,Color.RED);\r\n\t\t\t\t\t\t\tsqlText.append(sqlAll + \"\\n\" );\r\n\t\t\t\t\t\t\tgetDispQuery().setText(sqlText.toString());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getQuery().isStudentFlag())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tString sqlAll=\" select s.cord from test1 s where \" +\r\n\t\t\t\t\t\t\t\t\t\"sdo_geom.relate(sdo_geometry(2003,null\" +\r\n\t\t\t\t\t\t\t\t\t\",null,sdo_elem_info_array(1,1003,1),sdo_ordinate_array(\"+coordinates+\")),\" +\r\n\t\t\t\t\t\t\t\t\t\"'anyinteract',s.cord,0.005)='TRUE'\";\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tResultSet rs1=st.executeQuery(sqlAll);\r\n\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.STUDENTS,rs1,Color.GREEN);\r\n\t\t\t\t\t\t\tsqlText.append(sqlAll + \"\\n\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tgetDispQuery().setText(sqlText.toString());\r\n\t\t\t\t\t\tst = null;\r\n\t\t\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\te.printStackTrace();\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\t\r\n\t\t\t\t\t}\t// end of Range Query\r\n\t\t\t\t\r\n\t\t\t\tif(q.getSelectedQuery().trim().equalsIgnoreCase(\"Surrounding Student\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\t\tStringBuffer sqlText = new StringBuffer();\r\n\t\t\t\t\tg.drawRect(pqX, pqY, 5, 5);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tConnection con=hw2.getDBConnection();\r\n\t\t\t\t\t\tStatement st=con.createStatement();\r\n\t\t\t\t\t\tString sqlNearest=\"select a.loc,a.rad from announcementsystems a where \" +\r\n\t\t\t\t\t\t\t\t\"sdo_nn(a.loc,sdo_geometry(2001,null\" +\r\n\t\t\t\t\t\t\t\t\",sdo_point_type(\"+pqX+\",\"+(pqY)+\",null),null,null),\"+\r\n\t\t\t\t\t\t\t\t\"'sdo_num_res=1')='TRUE'\";\r\n\t\t\t\t\t\tResultSet rs2=st.executeQuery(sqlNearest);\r\n\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.AS,rs2,Color.RED);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getQuery().isSubmitFlag())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint xco,yco,rad;\r\n\t\t\t\t\t\t\tString sqlAll=\"select p.rad,q.X,q.Y from announcementsystems p\" +\r\n\t\t\t\t\t\t\t\t\t\",table(sdo_util.getvertices(p.loc))q where p.bid in\" +\r\n\t\t\t\t\t\t\t\t\t\"(select a.bid from announcementsystems a where sdo_nn\" +\r\n\t\t\t\t\t\t\t\t\t\"(a.loc,sdo_geometry(2001,null\" +\r\n\t\t\t\t\t\t\t\t\t\",sdo_point_type(\"+pqX+\",\"+(pqY)+\",null),null,null),\"+\r\n\t\t\t\t\t\t\t\t\t\"'sdo_num_res=1')='TRUE')\";\r\n\t\t\t\t\t\t\tResultSet rs3=st.executeQuery(sqlAll);\r\n\t\t\t\t\t\t\trs3.next();\r\n\t\t\t\t\t\t\t rad=rs3.getInt(1);\r\n\t\t\t\t\t\t\t xco=rs3.getInt(2);\r\n\t\t\t\t\t\t\t yco=rs3.getInt(3);\r\n\t\t\t\t\t\t\tString sqlsurr=\"select c.cord from test1 c where sdo_geom.relate\" +\r\n\t\t\t\t\t\t\t\t\t\"(c.cord,'anyinteract',sdo_geometry(2003,null,null,sdo_elem_info_array(1,1003,4)\" +\r\n\t\t\t\t\t\t\t\t\t\",sdo_ordinate_array(\"+(xco+rad)+\",\"+(yco)+\",\"+(xco-rad)+\",\"+(yco)+\",\"+(xco)+\",\"+(yco+rad)+\r\n\t\t\t\t\t\t\t\t\t\")),0.005)='TRUE'\";\r\n\t\t\t\t\t\t\tResultSet rs8=st.executeQuery(sqlsurr);\r\n\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.STUDENTS,rs8,Color.GREEN);\t\r\n\t\t\t\t\t\t\tsqlText.append(\"Query1:\"+sqlAll + \"\\n\"+\"Query2:\" +sqlNearest+\"\\n\"+\"Query3:\"+sqlsurr);\r\n\t\t\t\t\t\t\tgetDispQuery().setText(sqlText.toString());\r\n\t\t\t\t\t\t}\t\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\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t}//surronding query end\r\n\t\t\t\t\r\n\t\t\t\tif(q.getSelectedQuery().trim().equalsIgnoreCase(\"Emergency Query\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\t\tStringBuffer sqlText = new StringBuffer();\r\n\t\t\t\t\tg.drawRect(pqX, pqY, 5, 5);\r\n\t\t\t\t\tint no4=0;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tConnection con=hw2.getDBConnection();\r\n\t\t\t\t\t\tStatement st=con.createStatement();\r\n\t\t\t\t\t\tString sqlNearest=\"select a.loc,a.rad from announcementsystems a where \" +\r\n\t\t\t\t\t\t\t\t\"sdo_nn(a.loc,sdo_geometry(2001,null\" +\r\n\t\t\t\t\t\t\t\t\",sdo_point_type(\"+pqX+\",\"+(pqY)+\",null),null,null),\"+\r\n\t\t\t\t\t\t\t\t\"'sdo_num_res=1')='TRUE'\";\r\n\t\t\t\t\t\tno4++;\r\n\t\t\t\t\t\tsqlText.append(\"Query\"+no4+\":\"+sqlNearest+\"\\n\");\r\n\t\t\t\t\t\tResultSet rs2=st.executeQuery(sqlNearest);\r\n\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.AS,rs2,Color.RED);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getQuery().isSubmitFlag())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint xco,yco,rad;\r\n\t\t\t\t\t\t\tString aname;\r\n\t\t\t\t\t\t\tno4++;\r\n\t\t\t\t\t\t\tString sqlAll=\"select p.rad,p.bid,q.X,q.Y from announcementsystems p\" +\r\n\t\t\t\t\t\t\t\t\t\",table(sdo_util.getvertices(p.loc))q where p.bid in\" +\r\n\t\t\t\t\t\t\t\t\t\"(select a.bid from announcementsystems a where sdo_nn\" +\r\n\t\t\t\t\t\t\t\t\t\"(a.loc,sdo_geometry(2001,null\" +\r\n\t\t\t\t\t\t\t\t\t\",sdo_point_type(\"+pqX+\",\"+(pqY)+\",null),null,null),\"+\r\n\t\t\t\t\t\t\t\t\t\"'sdo_num_res=1')='TRUE')\";\r\n\t\t\t\t\t\t\tsqlText.append(\"Query\"+no4+\":\"+sqlAll+\"\\n\");\r\n\t\t\t\t\t\t\tResultSet rs3=st.executeQuery(sqlAll);\r\n\t\t\t\t\t\t\trs3.next();\r\n\t\t\t\t\t\t\trad=rs3.getInt(1);\r\n\t\t\t\t\t\t\taname=rs3.getString(2);\r\n\t\t\t\t\t\t\txco=rs3.getInt(3);\r\n\t\t\t\t\t\t\tyco=rs3.getInt(4);\r\n\t\t\t\t\t\t\tString[] A=new String[200];\r\n\t\t\t\t\t\t\tString[] alt=new String[100];\r\n\t\t\t\t\t\t\tString rem=\"select bid from announcementsystems where bid \" +\r\n\t\t\t\t\t\t\t\t\t\"not like '%\"+aname+\"%'\";\r\n\t\t\t\t\t\t\tno4++;\r\n\t\t\t\t\t\t\tsqlText.append(\"Query\"+no4+\":\"+rem+\"\\n\");\r\n\t\t\t\t\t\t\tResultSet remAS=st.executeQuery(rem);\r\n\t\t\t\t\t\t\tint i=0;\r\n\t\t\t\t\t\t\twhile(remAS.next())\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tA[i]=remAS.getString(1);\r\n\t\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tint k=0;\r\n\t\t\t\t\t\t\tfor(k=0;k<i;k++)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tno4++;\r\n\t\t\t\t\t\t\t\talt[k]=\"select x.cord from announcementsystems y,test1 x \" +\r\n\t\t\t\t\t\t\t\t\t\t\"where sdo_nn(y.loc,x.cord,'sdo_num_res=2')='TRUE' and y.bid \" +\r\n\t\t\t\t\t\t\t\t\t\t\"like '%\" +A[k]+\"%'\"+\" and x.name in \" +\r\n\t\t\t\t\t\t\t\t\t\t\"(select a.name from test1 a where sdo_geom.relate\" +\r\n\t\t\t\t\t\t\t\t\t\t\"(a.cord,'anyinteract',sdo_geometry(2003,null,\" +\r\n\t\t\t\t\t\t\t\t\t\t\"null,sdo_elem_info_array(1,1003,4)\" +\r\n\t\t\t\t\t\t\t\t\t\t\",sdo_ordinate_array(\"+(xco+rad)+\",\"+(yco)+\",\"+(xco-rad)\r\n\t\t\t\t\t\t\t\t\t\t+\",\"+(yco)+\",\"+(xco)+\",\"+(yco+rad)+\r\n\t\t\t\t\t\t\t\t\t\t\")),0.005)='TRUE')\";\r\n\t\t\t\t\t\t\t\tsqlText.append(\"Query\"+no4+\":\"+alt[k]+\"\\n\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tResultSet rs7=st.executeQuery(alt[0]);\r\n\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.STUDENTS,rs7,Color.WHITE);\r\n\t\t\t\t\t\t\tResultSet rs8=st.executeQuery(alt[1]);\r\n\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.STUDENTS,rs8,Color.BLUE);\r\n\t\t\t\t\t\t\tResultSet rs9=st.executeQuery(alt[2]);\r\n\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.STUDENTS,rs9,Color.CYAN);\r\n\t\t\t\t\t\t\tResultSet rs10=st.executeQuery(alt[2]);\r\n\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.STUDENTS,rs10,Color.MAGENTA);\r\n\t\t\t\t\t\t\tResultSet rs11=st.executeQuery(alt[2]);\r\n\t\t\t\t\t\t\tdrawCustomPolygon(g,FeatureTypeEnum.STUDENTS,rs11,Color.green);\r\n\t\t\t\t\t\t\tgetDispQuery().setText(sqlText.toString());\r\n\t\t\t\t\t\t}\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\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}//Emergency Query Ends\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t};\r\n\t\r\n\t\t\timagePanel.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent me) {\r\n\t\t\t\t\tsuper.mouseClicked(me);\r\n\t\t\t\t\tgetQuery().setSubmitFlag(false);\r\n\t\t\t\t\tpqX = me.getX();\r\n\t\t\t\t\tpqY = me.getY();\r\n\t\t\t\t\tQuery q = getQuery();\r\n\t\t\t\t\tif(me.getButton() == MouseEvent.BUTTON1 && drawPoly && q.getSelectedQuery() != null && (q.getSelectedQuery().trim().equalsIgnoreCase(\"Range Query\")) ){\r\n\t\t\t\t\t\tpath.add(new Point(me.getX(), me.getY()));\r\n\t\t\t\t\t\tdrawPoly = true;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t}else if(me.getButton() == MouseEvent.BUTTON3 && q.getSelectedQuery() != null && (q.getSelectedQuery().trim().equalsIgnoreCase(\"Range Query\")) ){\r\n\t\t\t\t\t\tpath.add(new Point(path.get(0).x, path.get(0).y));\r\n\t\t\t\t\t\tdrawPoly = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\trepaint();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\timagePanel.addMouseMotionListener(new MouseAdapter() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void mouseMoved(MouseEvent me) {\r\n\t\t\t\t\tsuper.mouseMoved(me);\r\n\t\t\t\t\tx = me.getX();\r\n\t\t\t\t\ty = me.getY();\r\n\t\t\t\t\trepaint();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t//ToolTipManager.sharedInstance().registerComponent(this);\r\n\t}",
"@Dimensional(designDocument = \"userGeo\", spatialViewName = \"byLocation\")\n List<User> findByLocationWithin(Box cityBoundingBox);",
"private void initGrids() {\n grid0 = new Grid(100f, 50f, 100f, 0);\n grid1 = new Grid(100f, 150f, 100f, 1);\n grid2 = new Grid(100f, 250f, 100f, 2);\n grid3 = new Grid(100f, 350f, 100f, 3);\n grid4 = new Grid(100f, 50f, 200f, 4);\n grid5 = new Grid(100f, 150f, 200f, 5);\n grid6 = new Grid(100f, 250f, 200f, 6);\n grid7 = new Grid(100f, 350f, 200f, 7);\n grid8 = new Grid(100f, 50f, 300f, 8);\n grid9 = new Grid(100f, 150f, 300f, 9);\n grid10 = new Grid(100f, 250f, 300f, 10);\n grid11 = new Grid(100f, 350f, 300f, 11);\n grid12 = new Grid(100f, 50f, 400f, 12);\n grid13 = new Grid(100f, 150f, 400f, 13);\n grid14 = new Grid(100f, 250f, 400f, 14);\n grid15 = new Grid(100f, 350f, 400f, 15);\n\n /**\n * Adding grids from 0 to 15 to static ArayList of all grids\n */\n grids.clear();\n\n grids.add(grid0);\n grids.add(grid1);\n grids.add(grid2);\n grids.add(grid3);\n grids.add(grid4);\n grids.add(grid5);\n grids.add(grid6);\n grids.add(grid7);\n grids.add(grid8);\n grids.add(grid9);\n grids.add(grid10);\n grids.add(grid11);\n grids.add(grid12);\n grids.add(grid13);\n grids.add(grid14);\n grids.add(grid15);\n }",
"List<GridCoordinate> getCoordinates(int cellWidth, int cellHeight);",
"@Test\n public void testGridViewImages() {\n /* use of the content desc from the cursor data gets us the specific imageview.\n Use of the 'anyOf' is an or statement for matching multiple content descriptions if necessary\n */\n final int COL_TITLE = 2;\n Cursor cursor = mActivityRule.getActivity().getContentResolver().query(\n TVContract.TVEntry.CONTENT_URI,\n null, // leaving \"columns\" null just returns all the columns.\n null, // cols for \"where\" clause\n null, // values for \"where\" clause\n null // sort order\n );\n\n cursor.moveToFirst();\n onView(anyOf(withContentDescription(cursor.getString(COL_TITLE)))).check(matches(isDisplayed()));\n }",
"public void addToCache () {\n ArrayList <Location> gridCache = getGridCache();\n for (Location l : imageLocs) {\n gridCache.add (l);\n }\n }",
"default CompletableFuture<List<Box>> search(@Nullable Float price,@Nullable Float size,@Nullable LitterType litterType,@Nullable Boolean window,@Nullable Boolean indoor) {\n //Fill search Map with the Values\n final Map<String,Object> searchData = new HashMap<String,Object>() {\n {\n put(BoxPersistenceDAO.QUERY_PARAM_DELFLAG, false);\n put(BoxPersistenceDAO.QUERY_PARAM_LITTER, litterType);\n put(BoxPersistenceDAO.QUERY_PARAM_PRICE, price);\n put(BoxPersistenceDAO.QUERY_PARAM_SIZE, size);\n put(BoxPersistenceDAO.QUERY_PARAM_INDOOR, indoor);\n put(BoxPersistenceDAO.QUERY_PARAM_WINDOW, window);\n }\n\n @Override\n public Object put(String key, Object o) {\n if (o != null) return super.put(key, o);\n return null;\n }\n };\n\n return query(searchData);\n }",
"Data<List<Boards>> getSearchBoardsCursor(String query, String cursor);",
"private void drawImages(int imageScale, Cell[][] gridCells) {\r\n\t\t//If the background buffer isn't null, draw it to the screen\r\n\t\tif (this.backgroundBuffer != null) {\r\n\t\t\timage(this.backgroundBuffer, 0, 0);\r\n\t\t}\r\n\t\tif (this.currentGameState == DisplayStates.RUNNING) {\r\n\t\t\t//Loop through each hexagon, and draw the markers, then food, then\r\n\t\t\t//ants in that order\r\n\t\t\tfor (int row = 0; row < this.numHexRow; row++) {\r\n\t\t\t\tfor (int col = 0; col < this.numHexCol; col++) {\r\n\t\t\t\t\tif (this.isMarkers) {\r\n\t\t\t\t\t\tdrawMarker(row, col, gridCells);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdrawFood(imageScale, row, col);\r\n\t\t\t\t\tdrawAnt(imageScale, row, col);\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private boolean withinGridDimensions(int startX, int startY, int endX, int endY) {\n boolean within = true;\n int largerX = Math.max(startX, endX);\n int smallerX = Math.min(startX, endX);\n int largerY = Math.max(startY, endY);\n int smallerY = Math.min(startY, endY);\n \n if (smallerX < 1 || smallerY < 1 || largerX > GRID_DIMENSIONS || largerY > GRID_DIMENSIONS) {\n within = false;\n }\n \n return within;\n }",
"public void populate(int xinitial, int yinitial, int xfinal, int yfinal) {\n \r\n if (yinitial > yfinal) { //if the initial point is lower than the final point\r\n int temp = yinitial; //swap the y values\r\n yinitial = yfinal;\r\n yfinal = temp;\r\n }\r\n if (xinitial > xfinal) { //if the initial point is to the right of the final point\r\n int temp = xinitial; //swap the x values\r\n xinitial = xfinal;\r\n xfinal = temp;\r\n }\r\n for (int i = xinitial; i < xfinal; i++) { //go through the area (where the initial point is top left and final point is bottom right) \r\n for (int j = yinitial; j < yfinal; j++) {\r\n int random = r.nextInt(100);\r\n if (random<85){ //make 85% of the grid populated by setting values to true\r\n grid[i][j] = true;\r\n }\r\n }\r\n }\r\n }",
"private void updateGrid() {\n\t\tfor (Neighbor neighbor : upsetNeighbors) {\n\t\t\tClear vacated_cell = new Clear(neighbor.getCoordsX(), neighbor.getCoordsY());\n\t\t\tgrid.setGridIndex(vacated_cell, vacated_cell.getCoordsX(), vacated_cell.getCoordsY());\n\t\t\tCell new_location = availableSpaces.get((int) (Math.random() * (availableSpaces.size() - 1)));\n\t\t\tint new_x = new_location.getCoordsX();\n\t\t\tint new_y = new_location.getCoordsY();\n\t\t\tif (neighbor.getClass().equals(Group1.class))\n\t\t\t\tgrid.setGridIndex(new Group1(new_x, new_y, percentSimilar), new_x, new_y);\n\t\t\telse\n\t\t\t\tgrid.setGridIndex(new Group2(new_x, new_y, percentSimilar), new_x, new_y);\n\t\t\tavailableSpaces.remove(new_location);\n\t\t\tavailableSpaces.add(vacated_cell);\n\t\t}\n\t}",
"public List<Image> parseBestOfImagesResult(Document doc) {\n\n ArrayList<Image> bestOfImages = new ArrayList<>();\n Elements htmlImages = doc.select(CSS_BEST_OF_IMAGE_QUERY);\n Timber.i(\"Best OfImages: %s\", htmlImages.toString());\n String href;\n Image bestOfImage;\n for (Element image : htmlImages) {\n href = image.attr(\"src\");\n Timber.i(\"Image src: %s\", href);\n bestOfImage = new Image(href);\n bestOfImages.add(bestOfImage);\n }\n return bestOfImages;\n }",
"public static void main(String[] args) {\n\t\tString[] src = null;\n\t\ttry {\n\t\t\tsrc = Files.lines(Paths.get(\"inputs/day20.txt\"))\n\t\t\t\t\t.map(s -> s.replace(\".\", \"0\").replace(\"#\", \"1\"))\n\t\t\t\t\t.collect(Collectors.joining(\"\\n\"))\n\t\t\t\t\t.split(\"\\n\\n\");\n\t\t}catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tList<Tile> tiles = new ArrayList<Tile>();\n\t\tfor(String s : src) {\n\t\t\tString[] tile = s.split(\":\\n\");\n\t\t\tlong id = Long.parseLong(tile[0].substring(5));\n\t\t\tString[] data = tile[1].split(\"\\n\");\n\t\t\ttiles.add(new Tile(id, data));\n\t\t}\n\t\t\n\t\t/* PART 1 */\n\t\t// Compile all hashes and their mirror images, each paired with its frequency\n\t\tHashMap<Integer,Integer> hashes = new HashMap<Integer,Integer>();\n\t\tfor(Tile t : tiles) {\n\t\t\tList<Integer> h = t.getHashes(); List<Integer> hr = t.getReverseHashes();\n\t\t\tfor(int i = 0; i < h.size(); i++) {\n\t\t\t\tputTileHash(hashes, h.get(i));\n\t\t\t\tputTileHash(hashes, hr.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// The corner tiles are the 4 tiles such that 2 of their edge hashes match no other hashes\n\t\t// Find these tiles and then the product of their IDs\n\t\tList<Integer> uniqueHashes = hashes.keySet().stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t.filter(i -> hashes.get(i) == 1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\t\tlong ans = tiles.stream()\n\t\t\t\t\t\t.filter(t -> isCornerTile(t, uniqueHashes))\n\t\t\t\t\t\t.mapToLong(Tile::getID)\n\t\t\t\t\t\t.reduce(1, (x,y) -> x*y);\n\t\tSystem.out.println(ans);\n\t\t\n\t\t// Assemble the image.\n\t\t// Start by placing any of the 4 corner pieces in the top left corner.\n\t\t// Build the first row by matching another tile's edge hash with the rightmost tile's right edge hash.\n\t\t// For subsequent rows, match a tile's edge hash with the bottom hash of the tile above it.\n\t\tIMG_DIM = (int)Math.sqrt(tiles.size());\n\t\tTile[][] img = new Tile[IMG_DIM][IMG_DIM];\n\t\timg[0][0] = tiles.stream()\n\t\t\t\t\t\t .filter(t -> isCornerTile(t, uniqueHashes))\n\t\t\t\t\t\t .findAny()\n\t\t\t\t\t\t .get();\n\t\twhile(!(uniqueHashes.contains(img[0][0].getLHash()) && uniqueHashes.contains(img[0][0].getTHash()))) {\n\t\t\timg[0][0].rotate(1);\n\t\t}\n\t\ttiles.remove(img[0][0]);\n\t\t\n\t\t// First row\n\t\tfor(int col = 1; col < IMG_DIM; col++) {\n\t\t\tIterator<Tile> it = tiles.iterator();\n\t\t\tTile target = null;\n\t\t\tint rHash = img[0][col-1].getRHash();\n\t\t\twhile(target == null) {\n\t\t\t\t// If the tile has a matching hash, flip it such that the existing tile's right hash\n\t\t\t\t// equals the new tile's reverse left hash\n\t\t\t\tTile t = it.next();\n\t\t\t\tif(rHash == t.getTHash()) {\n\t\t\t\t\tt.flipVertical();\n\t\t\t\t\tt.rotate(1);\n\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t}else if(rHash == reverse(t.getTHash())) {\n\t\t\t\t\tt.rotate(3);\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == t.getRHash()) {\n\t\t\t\t\tt.flipHorizontal();\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == reverse(t.getRHash())) {\n\t\t\t\t\tt.rotate(2);\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == t.getBHash()) {\n\t\t\t\t\tt.flipHorizontal();\n\t\t\t\t\tt.rotate(1);\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == reverse(t.getBHash())) {\n\t\t\t\t\tt.rotate(1);\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == t.getLHash()) {\n\t\t\t\t\tt.flipVertical();\n\t\t\t\t\ttarget = t;\n\t\t\t\t\n\t\t\t\t}else if(rHash == reverse(t.getLHash())) {\n\t\t\t\t\t// do nothing\n\t\t\t\t\ttarget = t;\n\t\t\t\t}\t\n\t\t\t}\n\t\t\timg[0][col] = target;\n\t\t\ttiles.remove(target);\n\t\t}\n\t\t\n\t\t// Rest of the picture\n\t\tfor(int row = 1; row < IMG_DIM; row++) {\n\t\t\tfor(int col = 0; col < IMG_DIM; col++) {\n\t\t\t\tIterator<Tile> it = tiles.iterator();\n\t\t\t\tTile target = null;\n\t\t\t\tint bHash = img[row-1][col].getBHash();\n\t\t\t\twhile(target == null) {\n\t\t\t\t\t// If the tile has a matching hash, flip it such that the existing tile's bottom hash\n\t\t\t\t\t// equals the new tile's reverse top hash\n\t\t\t\t\tTile t = it.next();\n\t\t\t\t\tif(bHash == t.getTHash()) {\n\t\t\t\t\t\tt.flipHorizontal();\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == reverse(t.getTHash())) {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == t.getRHash()) {\n\t\t\t\t\t\tt.flipHorizontal();\n\t\t\t\t\t\tt.rotate(1);\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == reverse(t.getRHash())) {\n\t\t\t\t\t\tt.rotate(3);\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == t.getBHash()) {\n\t\t\t\t\t\tt.flipVertical();\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == reverse(t.getBHash())) {\n\t\t\t\t\t\tt.rotate(2);\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == t.getLHash()) {\n\t\t\t\t\t\tt.flipVertical();\n\t\t\t\t\t\tt.rotate(1);\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t\n\t\t\t\t\t}else if(bHash == reverse(t.getLHash())) {\n\t\t\t\t\t\tt.rotate(1);\n\t\t\t\t\t\ttarget = t;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\timg[row][col] = target;\n\t\t\t\ttiles.remove(target);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Build image\n\t\tString[] sea = new String[IMG_DIM * (TILE_DIM-2)];\n\t\tfor(int irow = 0; irow < IMG_DIM; irow++) {\n\t\t\tfor(int trow = 1; trow < TILE_DIM-1; trow++) {\n\t\t\t\tfinal int TROW = trow;\n\t\t\t\tsea[irow*(TILE_DIM-2) + (trow-1)] = Arrays.stream(img[irow])\n\t\t\t\t\t\t\t\t\t\t\t\t\t.map(tile -> tile.getData()[TROW].substring(1, TILE_DIM-1))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.collect(Collectors.joining());\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* PART 2 */\n\t\t// Rotate and flip the sea image until at least one monster is found\n\t\tint[][] monsters = new int[sea.length][sea.length];\n\t\tint iter = 1; boolean done = false;\n\t\twhile(iter <= 8 && !done) {\n\t\t\tfor(int row = 1; row < sea.length-1; row++) {\n\t\t\t\tfor(int col = 0; col < sea.length-20; col++) {\n\t\t\t\t\tif(findMonster(sea, row, col)) {\n\t\t\t\t\t\tdone = true;\n\t\t\t\t\t\tmarkMonster(monsters, row, col);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(done) {break;}\n\t\t\t// Iterate\n\t\t\tif(iter == 4) {\n\t\t\t\tsea = flipGridVertical(sea);\n\t\t\t}else {\n\t\t\t\tsea = rotateGrid(sea);\n\t\t\t}\n\t\t\titer++;\n\t\t}\n\n\t\t// Count unused 1's in the original image\n\t\tfinal String[] SEA = sea;\n\t\tlong roughness = IntStream.rangeClosed(0, SEA.length-1)\n\t\t\t\t\t\t\t.flatMap(i -> IntStream.rangeClosed(0, SEA.length-1)\n\t\t\t\t\t\t\t\t\t\t\t\t.filter(j -> SEA[i].charAt(j) == '1' && monsters[i][j] == 0))\n\t\t\t\t\t\t\t.count();\n\t\tSystem.out.println(roughness);\n\t\t\n\t}",
"private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }",
"int match(ArrayList<ImageCell> images);",
"private void helperDisplayResults ()\r\n\t{\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t\t//---- Check if the project is empty or not\r\n\t\t\tif (tableSize != 0)\r\n\t\t\t{\r\n\t\t\t\tint indexImage = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t\tif (indexImage >= 0 && indexImage < tableSize)\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\tint samplesCount = DataController.getTable().getElement(indexImage).getChannelCount();\r\n\r\n\t\t\t\t\tfor (int i = 0; i < Math.min(samplesCount, FormMainPanelRight.TABLE_SIZE); i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//---- ABSOLUTE --------------------------------------------\r\n\r\n\t\t\t\t\t\t//---- Count\r\n\t\t\t\t\t\tint featureCount = DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getAbsoluteCellCount();\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featureCount, 0, i + 1);\r\n\r\n\t\t\t\t\t\t//---- Length\r\n\t\t\t\t\t\tdouble featureLength = (double) Math.round(DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getAbsoluteCellLengthMean() * 1000) / 1000;\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featureLength, 1, i + 1);\r\n\r\n\t\t\t\t\t\t//---- Pixel density\r\n\t\t\t\t\t\tdouble featurePixelDensity = (double) Math.round (DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getAbsolutePixelDensity() * 1000) / 1000;\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featurePixelDensity, 2, i + 1);\r\n\r\n\t\t\t\t\t\t//---- RELATIVE --------------------------------------------\r\n\r\n\t\t\t\t\t\t//---- Count\r\n\t\t\t\t\t\tdouble featureCountR = (double) Math.round(DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getRelativeCellCount() * 1000) / 1000;\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featureCountR, 3, i + 1);\r\n\r\n\t\t\t\t\t\t//---- Length\r\n\t\t\t\t\t\tdouble featureLengthR = (double) Math.round(DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getRelativeCellLengthMean() * 1000) / 1000;\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featureLengthR, 4, i + 1);\r\n\r\n\t\t\t\t\t\t//---- Pixel density\r\n\t\t\t\t\t\tdouble featurePixelDensityR = (double) Math.round (DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getRelativeCellPixelDensity() * 1000) / 1000;\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featurePixelDensityR, 5, i + 1);\r\n\r\n\t\t\t\t\t\t//---- SENSETIVITY\r\n\t\t\t\t\t\tSensitivity sampleSensitivity = DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getSensitivity();\r\n\r\n\t\t\t\t\t\tswitch (sampleSensitivity)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tcase RESISTANT: mainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"R\", 6, i + 1); break;\r\n\t\t\t\t\t\tcase SENSITIVE: mainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"S\", 6, i + 1); break;\r\n\t\t\t\t\t\tcase UNKNOWN: mainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"U\", 6, i + 1); break;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tfor (int i = 0; i < FormMainPanelRight.TABLE_SIZE; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t//---- ABSOLUTE\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 0, i + 1);\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 1, i + 1);\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 2, i + 1);\r\n\r\n\t\t\t\t\t//---- RELATIVE\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 3, i + 1);\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 4, i + 1);\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 5, i + 1);\r\n\r\n\t\t\t\t\t//---- SENSETIVITY\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 6, i + 1);\r\n\t\t\t\t}\r\n\r\n\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage exception)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(exception);\r\n\t\t}\r\n\t}",
"public Map<String, Object> getMapRaster(Map<String, Double> params) {\r\n System.out.println(params);\r\n Map<String, Object> results = new HashMap<>();\r\n MapServer server = new MapServer();\r\n double lrlon = params.get(\"lrlon\");\r\n double ullon = params.get(\"ullon\");\r\n double lrlat = params.get(\"lrlat\");\r\n double ullat = params.get(\"ullat\");\r\n double width = params.get(\"w\");\r\n double height = params.get(\"h\");\r\n double lonDPP = (lrlon - ullon) / width;\r\n boolean success = false;\r\n int depth = 7;\r\n double xInterval = (server.ROOT_LRLON - server.ROOT_ULLON) / Math.pow(2, 7);\r\n for (int d = 0; d <= 7; d++) {\r\n double step = (server.ROOT_LRLON - server.ROOT_ULLON) / Math.pow(2, d);\r\n double tempDPP = step / server.TILE_SIZE;\r\n if (tempDPP <= lonDPP) {\r\n depth = d;\r\n xInterval = step;\r\n break;\r\n }\r\n }\r\n int k = (int) Math.pow(2, depth);\r\n int minX = 0;\r\n int maxX = 0;\r\n double yInterval = (server.ROOT_ULLAT - server.ROOT_LRLAT) / k;\r\n int minY = 0;\r\n int maxY = 0;\r\n boolean xDone = false;\r\n boolean yDone = false;\r\n for (int i = 0; i < k; i++) {\r\n if (server.ROOT_ULLON + (i * xInterval) <= ullon) {\r\n minX = i;\r\n }\r\n if (server.ROOT_ULLON + ((i + 1) * xInterval) >= lrlon && !xDone) {\r\n maxX = i;\r\n xDone = true;\r\n }\r\n if (server.ROOT_ULLAT - (i * yInterval) >= ullat) {\r\n minY = i;\r\n }\r\n if (server.ROOT_ULLAT - ((i + 1) * yInterval) <= lrlat && !yDone) {\r\n maxY = i;\r\n yDone = true;\r\n }\r\n if (xDone && yDone) {\r\n break;\r\n }\r\n }\r\n String[][] grid = new String[maxY - minY + 1][maxX - minX + 1];\r\n for (int i = 0; i < grid.length; i++) {\r\n for (int j = 0; j < grid[0].length; j++) {\r\n grid[i][j] = \"d\" + Integer.toString(depth)\r\n + \"_x\" + Integer.toString(minX + j)\r\n + \"_y\" + Integer.toString(minY + i)\r\n + \".png\";\r\n }\r\n }\r\n success = true;\r\n results.put(\"render_grid\", grid);\r\n results.put(\"raster_ul_lon\", server.ROOT_ULLON + (minX * xInterval));\r\n results.put(\"raster_lr_lon\", server.ROOT_ULLON + ((maxX + 1) * xInterval));\r\n results.put(\"raster_ul_lat\", server.ROOT_ULLAT - (minY * yInterval));\r\n results.put(\"raster_lr_lat\", server.ROOT_ULLAT - ((maxY + 1) * yInterval));\r\n results.put(\"depth\", depth);\r\n results.put(\"query_success\", success);\r\n\r\n System.out.println(\"Since you haven't implemented getMapRaster, nothing is displayed in \"\r\n + \"your browser.\");\r\n return results;\r\n }",
"public List<ImageThumbnail> getImageThumbnails(String searchConstraints){\n //Places markers on treeItems.\n getFileMenu().getRoot().getChildren()\n .stream()\n .peek(treeItem -> treeItem.setGraphic(null))\n .flatMap(treeItem -> {\n if(treeItem.getValue().contains(searchConstraints) && !searchConstraints.isEmpty()) {\n ImageView fileHourGlass = new ImageView(\"/views/img/search.png\");\n fileHourGlass.setPreserveRatio(true);\n fileHourGlass.setFitWidth(17);\n fileHourGlass.setFitHeight(17);\n treeItem.setGraphic(fileHourGlass);\n }\n return treeItem.getChildren().stream();\n }).peek(treeItem -> treeItem.setGraphic(null))\n .forEach(treeItem -> {\n if(treeItem.getValue().contains(searchConstraints) && !searchConstraints.isEmpty()){\n ImageView fileHourGlass = new ImageView(\"/views/img/search.png\");\n fileHourGlass.setPreserveRatio(true);\n fileHourGlass.setFitWidth(17);\n fileHourGlass.setFitHeight(17);\n treeItem.setGraphic(fileHourGlass);\n if(treeItem.getParent().getGraphic() == null) {\n ImageView folderHourGlass = new ImageView(\"/views/img/search.png\");\n folderHourGlass.setPreserveRatio(true);\n folderHourGlass.setFitWidth(17);\n folderHourGlass.setFitHeight(17);\n treeItem.getParent().setGraphic(folderHourGlass);\n }\n }\n });\n //Places markers on treeItems.\n getTagsMenu().getRoot().getChildren()\n .stream()\n .peek(treeItem -> treeItem.setGraphic(null))\n .flatMap(treeItem -> {\n if(treeItem.getValue().contains(searchConstraints) && !searchConstraints.isEmpty()) {\n ImageView fileHourGlass = new ImageView(\"/views/img/search.png\");\n fileHourGlass.setPreserveRatio(true);\n fileHourGlass.setFitWidth(17);\n fileHourGlass.setFitHeight(17);\n treeItem.setGraphic(fileHourGlass);\n }\n return treeItem.getChildren().stream();\n }).peek(treeItem -> treeItem.setGraphic(null))\n .forEach(treeItem -> {\n if(treeItem.getValue().contains(searchConstraints) && !searchConstraints.isEmpty()){\n ImageView fileHourGlass = new ImageView(\"/views/img/search.png\");\n fileHourGlass.setPreserveRatio(true);\n fileHourGlass.setFitWidth(17);\n fileHourGlass.setFitHeight(17);\n treeItem.setGraphic(fileHourGlass);\n if(treeItem.getParent().getGraphic() == null) {\n ImageView folderHourGlass = new ImageView(\"/views/img/search.png\");\n folderHourGlass.setPreserveRatio(true);\n folderHourGlass.setFitWidth(17);\n folderHourGlass.setFitHeight(17);\n treeItem.getParent().setGraphic(folderHourGlass);\n }\n }\n });\n\n //Filters images based on search constraint\n return getFiles()\n .stream()\n .map(this::procureImageThumbnail)\n .filter(imageThumbnail -> imageThumbnail.getImageView().getId().contains(searchConstraints) ||\n IMAGE_DATA.get(IMAGES.inverse().get(imageThumbnail)).getTags().toString().contains(searchConstraints)\n || IMAGE_DATA.get(IMAGES.inverse().get(imageThumbnail)).getMetadata().toString().contains(searchConstraints))\n .collect(Collectors.toList());\n }",
"public static List<Vec2i> solve(int[][] grid, Vec2i start, Vec2i goal, Heuristic h){\n if(h == null){ //if null replace with default heuristic\n h = new Heuristic() {\n @Override\n\n public double eval(Vec2i loc) {\n double dx = (loc.x - goal.x);\n double dy = (loc.y - goal.y);\n return Math.sqrt(dx*dx + dy*dy);\n }\n };\n }\n\n PriorityQueue<GridLocation> edge = new PriorityQueue<GridLocation>(10, AStarGrid::compareGridLocations);\n edge.add(new GridLocation(start,0));\n\n Map<Vec2i, Vec2i> cameFrom = new HashMap<Vec2i, Vec2i>();\n Map<Vec2i, Double> g = new HashMap<Vec2i, Double>(); //distance to node\n g.put(start,0.0);\n Map<Vec2i, Double> f = new HashMap<Vec2i, Double>(); //distance from start to goal through this node\n f.put(start,h.eval(start));\n //f = g + h\n\n while(!edge.isEmpty()){\n\n Vec2i current = edge.poll().loc;\n if(current.x == goal.x && current.y == goal.y){\n return reconstructPath(cameFrom, current);\n }\n\n LinkedList<Vec2i> neighbors = new LinkedList<Vec2i>();\n if(current.x != 0 && grid[current.x - 1][current.y] == 0)\n neighbors.add(new Vec2i(current.x - 1,current.y));\n if(current.x != grid.length-1 && grid[current.x + 1][current.y] == 0)\n neighbors.add(new Vec2i(current.x + 1,current.y));\n if(current.y != 0 && grid[current.x][current.y - 1] == 0)\n neighbors.add(new Vec2i(current.x,current.y - 1));\n if(current.y != grid[0].length-1 && grid[current.x][current.y + 1] == 0)\n neighbors.add(new Vec2i(current.x,current.y + 1));\n\n\n for(Vec2i neighbor: neighbors){\n double score = g.get(current) + 1;\n if(!g.containsKey(neighbor) || score < g.get(neighbor)){\n cameFrom.put(neighbor,current);\n g.put(neighbor, score);\n f.put(neighbor, score + h.eval(neighbor));\n if(!edge.contains(neighbor)){\n edge.add(new GridLocation(neighbor,score + h.eval(neighbor)));\n }\n }\n }\n }\n //No path was found\n return null;\n }",
"private void initIslandGrid()\n {\n // Add the grid\n int rows = game.getNumRows();\n int columns = game.getNumColumns();\n // set up the layout manager for the island grid panel\n pnlIsland.setLayout(new GridLayout(rows, columns));\n // create all the grid square panels and add them to the panel\n // the layout manager of the panel takes care of assigning them to the\n // the right position\n for ( int row = 0 ; row < rows ; row++ )\n {\n for ( int col = 0 ; col < columns ; col++ )\n {\n pnlIsland.add(new GridSquarePanel(game, row, col));\n }\n }\n }",
"public List<MagicSquare> buildMagicSquares() {\n solutions = new ArrayList<>();\n sampler = new Sampler(Bound.getAllElements(1, totalNumbersCnt));\n\n for (int possibleNumber : sampler.getNumbers(new Bound(1, totalNumbersCnt))) {\n if (sampler.contains(possibleNumber)) {\n buildRow(sampler.getNumber(possibleNumber), 0, 0);\n }\n }\n\n return solutions;\n }",
"private void getMatches(){\r\n\t\tString cLong = commandList.get(2);//holds client's longitude in string form\r\n\t\tString cLat = commandList.get(3);//holds the client's latitude in String form\r\n\r\n\t\tArrayList<String> matchList = new ArrayList<>();//holds user names of found matches\r\n\t\t\r\n\t\tString[] clientPSliders = getPSliders(commandList.get(1));\r\n\r\n\t\t//load in SQL command to find matches using given client's min and max values\r\n\t\tcommand =\"SELECT location.userName FROM (location INNER JOIN users \"\r\n\t\t\t\t+ \"ON location.userName = users.userName) INNER JOIN personalSlider \"\r\n\t\t\t\t+ \"ON users.userName = personalSlider.userName WHERE (((location.longitude) <= \";\r\n\t\tcommand += roundLongUp(cLong) + \" And (location.longitude) >= \";\r\n\t\tcommand += roundLongDown(cLong) + \") AND ((location.latitude) <= \";\r\n\t\tcommand += roundLatUp(cLat) + \" And (location.latitude) >= \";\r\n\t\tcommand += roundLatDown(cLat) + \") AND ((personalSlider.pGender) >= \";\r\n\t\tcommand += commandList.get(4) + \" And (personalSlider.pGender) <= \" + commandList.get(5);\r\n\t\tcommand += \" AND ((personalSlider.pExpression) >= \" + commandList.get(6) +\r\n\t\t\t\t\" And (personalSlider.pExpression) <= \" + commandList.get(7) + \")\";\r\n\t\tcommand += \" AND ((personalSlider.pOrientation) >= \" + commandList.get(8) +\r\n\t\t\t\t\" And (personalSlider.pOrientation) <= \" + commandList.get(9) + \")));\";\r\n\r\n\t\t\r\n\t\ttry {//try block for sending SQL command\r\n\t\t\trs = stmt.executeQuery(command);//send command\r\n\r\n\t\t\twhile(rs.next()){//while there are matches\r\n\t\t\t\tmatchList.add(rs.getString(\"userName\"));//load userName\r\n\t\t\t}\r\n\r\n\t\t\t//each String[] is a match, 0 = userName, 1 = pGenderMin, .....6=pOrientationMax, 7=distance (used later)\r\n\t\t\tArrayList<String[]> fullMatches = getSeekingSlider(matchList);\r\n\r\n\t\t\t//remove the non-overlapping matches, pass clients ratings and the list of matches\r\n\t\t\tcrossMatch(strArrToIntArr(clientPSliders), fullMatches);\r\n\t\t\t\r\n\t\t\t//remove matches over 25 miles away\r\n\t\t\tlimitDistance(Double.valueOf(cLat), Double.valueOf(cLong), fullMatches);\r\n\t\t\t\r\n\t\t\trs = null;//null the result set\r\n\t\t\t\r\n\t\t\tString[] tempStrArr;//holds the personal slider for the current match\r\n\t\t\tfor(String[] currArr: fullMatches){//for all the remaining matches\r\n\t\t\t\ttempStrArr = getPSliders(currArr[0]);//get personal slider for current matches\r\n\t\t\t\tout.println(tempStrArr[0] + \", \" + tempStrArr[1] + \", \"//loads userName, pGen, pExpr, pOrient\r\n\t\t\t\t\t\t\t+ tempStrArr[2] + \", \" + tempStrArr[3] + \", \" + currArr[7]);//line 2\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());\r\n\t\t}\r\n\t}",
"public void hardMode(Boolean hitResult) throws LocationHitException{\r\n\t\tint x = 0, y = 0;\r\n\t\tint mostProbable;\r\n\r\n\t\tif (minMax == 0) {\r\n\t\t\tmostProbable = 1;\r\n\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\tif (probabilityGrid[i][j] > mostProbable) {\r\n\t\t\t\t\t\tmostProbable = probabilityGrid[i][j];\r\n\t\t\t\t\t\tx = i;\r\n\t\t\t\t\t\ty = j;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tminMax = 1;\r\n\t\t} else {\r\n\t\t\tmostProbable = 1000;\r\n\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\tif (probabilityGrid[i][j] < mostProbable && probabilityGrid[i][j] > 0) {\r\n\t\t\t\t\t\tmostProbable = probabilityGrid[i][j];\r\n\t\t\t\t\t\tx = i;\r\n\t\t\t\t\t\ty = j;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tminMax = 0;\r\n\t\t}\r\n\r\n\t\tif (!hitResult && direction.isEmpty()) {\r\n\t\t\tboolean newHit = false;\r\n\t\t\twhile (!newHit) {\r\n\t\t\t\tif (Player.userGrid[x][y] == 2 || Player.userGrid[x][y] == 3) {\r\n\t\t\t\t\tprobabilityGrid[x][y] = -1;\r\n\t\t\t\t\tif (minMax == 0) {\r\n\t\t\t\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\t\t\t\tif (probabilityGrid[i][j] > mostProbable) {\r\n\t\t\t\t\t\t\t\t\tmostProbable = probabilityGrid[i][j];\r\n\t\t\t\t\t\t\t\t\tx = i;\r\n\t\t\t\t\t\t\t\t\ty = j;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tminMax = 1;\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\t\t\t\tif (probabilityGrid[i][j] < mostProbable && probabilityGrid[i][j] > 0) {\r\n\t\t\t\t\t\t\t\t\tmostProbable = probabilityGrid[i][j];\r\n\t\t\t\t\t\t\t\t\tx = i;\r\n\t\t\t\t\t\t\t\t\ty = j;\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tminMax = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tnewHit = true;\r\n\t\t\t}\r\n\t\t} else if (direction.isEmpty()) {\r\n\t\t\thitFound.add(hitX + \";\" + hitY);\r\n\t\t\tcounter++;\r\n\t\t\tif ((hitX + 1) < 9) {\r\n\t\t\t\tx = hitX + 1;\r\n\t\t\t\ty = hitY;\r\n\t\t\t\tdirection = \"HorizontalFront\";\r\n\t\t\t} else {\r\n\t\t\t\tx = hitX - 1;\r\n\t\t\t\ty = hitY;\r\n\t\t\t\tdirection = \"HorizontalBack\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (direction.equals(\"HorizontalFront\")) {\r\n\t\t\t\tint tempX = Integer.parseInt(hitFound.get(0).split(\";\")[0]);\r\n\t\t\t\tint tempY = Integer.parseInt(hitFound.get(0).split(\";\")[1]);\r\n\t\t\t\tif (hitResult && (hitX + 1 < 9)) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t\tx = hitX + 1;\r\n\t\t\t\t\ty = hitY;\r\n\t\t\t\t} else if (tempX > 0) {\r\n\t\t\t\t\tx = tempX - 1;\r\n\t\t\t\t\ty = tempY;\r\n\t\t\t\t\tdirection = \"HorizontalBack\";\r\n\t\t\t\t} else if ((Integer.parseInt(hitFound.get(0).split(\";\")[1]) + 1 < 11)) {\r\n\t\t\t\t\tx = Integer.parseInt(hitFound.get(0).split(\";\")[0]);\r\n\t\t\t\t\ty = Integer.parseInt(hitFound.get(0).split(\";\")[1]) + 1;\r\n\t\t\t\t\tdirection = \"VerticalFront\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tx = Integer.parseInt(hitFound.get(0).split(\";\")[0]);\r\n\t\t\t\t\ty = Integer.parseInt(hitFound.get(0).split(\";\")[1]) - 1;\r\n\t\t\t\t\tdirection = \"VerticalBack\";\r\n\t\t\t\t}\r\n\t\t\t} else if (direction.equals(\"HorizontalBack\")) {\r\n\t\t\t\tif (hitResult && (hitX > 0)) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t\tx = hitX - 1;\r\n\t\t\t\t\ty = hitY;\r\n\t\t\t\t} else if (Integer.parseInt(hitFound.get(0).split(\";\")[1]) + 1 < 11 && counter < 2) {\r\n\t\t\t\t\tx = Integer.parseInt(hitFound.get(0).split(\";\")[0]);\r\n\t\t\t\t\ty = Integer.parseInt(hitFound.get(0).split(\";\")[1]) + 1;\r\n\t\t\t\t\tdirection = \"VerticalFront\";\r\n\t\t\t\t} else if (counter < 2) {\r\n\t\t\t\t\tx = Integer.parseInt(hitFound.get(0).split(\";\")[0]);\r\n\t\t\t\t\ty = Integer.parseInt(hitFound.get(0).split(\";\")[1]) - 1;\r\n\t\t\t\t\tdirection = \"VerticalBack\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (minMax == 0) {\r\n\t\t\t\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\t\t\t\tif (probabilityGrid[i][j] > mostProbable) {\r\n\t\t\t\t\t\t\t\t\tmostProbable = probabilityGrid[i][j];\r\n\t\t\t\t\t\t\t\t\tx = i;\r\n\t\t\t\t\t\t\t\t\ty = j;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tminMax = 1;\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\t\t\t\tif (probabilityGrid[i][j] < mostProbable && probabilityGrid[i][j] > 0) {\r\n\t\t\t\t\t\t\t\t\tmostProbable = probabilityGrid[i][j];\r\n\t\t\t\t\t\t\t\t\tx = i;\r\n\t\t\t\t\t\t\t\t\ty = j;\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tminMax = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdirection = \"\";\r\n\t\t\t\t\thitFound.clear();\r\n\t\t\t\t\tcounter = 0;\r\n\t\t\t\t}\r\n\t\t\t} else if (direction.equals(\"VerticalFront\") && counter < 2) {\r\n\t\t\t\tif (hitResult && (hitY + 1 < 11)) {\r\n\t\t\t\t\tx = hitX;\r\n\t\t\t\t\ty = hitY + 1;\r\n\t\t\t\t} else if (Integer.parseInt(hitFound.get(0).split(\";\")[1]) > 0) {\r\n\t\t\t\t\tx = Integer.parseInt(hitFound.get(0).split(\";\")[0]);\r\n\t\t\t\t\ty = Integer.parseInt(hitFound.get(0).split(\";\")[1]) - 1;\r\n\t\t\t\t\tdirection = \"VerticalBack\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (minMax == 0) {\r\n\t\t\t\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\t\t\t\tif (probabilityGrid[i][j] > mostProbable) {\r\n\t\t\t\t\t\t\t\t\tmostProbable = probabilityGrid[i][j];\r\n\t\t\t\t\t\t\t\t\tx = i;\r\n\t\t\t\t\t\t\t\t\ty = j;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tminMax = 1;\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\t\t\t\tif (probabilityGrid[i][j] < mostProbable && probabilityGrid[i][j] > 0) {\r\n\t\t\t\t\t\t\t\t\tmostProbable = probabilityGrid[i][j];\r\n\t\t\t\t\t\t\t\t\tx = i;\r\n\t\t\t\t\t\t\t\t\ty = j;\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tminMax = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdirection = \"\";\r\n\t\t\t\t\thitFound.clear();\r\n\t\t\t\t\tcounter = 0;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (hitResult && (hitY > 0) && counter < 2) {\r\n\t\t\t\t\tx = hitX;\r\n\t\t\t\t\ty = hitY - 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (minMax == 0) {\r\n\t\t\t\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\t\t\t\tif (probabilityGrid[i][j] > mostProbable) {\r\n\t\t\t\t\t\t\t\t\tmostProbable = probabilityGrid[i][j];\r\n\t\t\t\t\t\t\t\t\tx = i;\r\n\t\t\t\t\t\t\t\t\ty = j;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tminMax = 1;\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\t\t\t\t\tfor (int j = 0; j < 11; j++) {\r\n\t\t\t\t\t\t\t\tif (probabilityGrid[i][j] < mostProbable && probabilityGrid[i][j] > 0) {\r\n\t\t\t\t\t\t\t\t\tmostProbable = probabilityGrid[i][j];\r\n\t\t\t\t\t\t\t\t\tx = i;\r\n\t\t\t\t\t\t\t\t\ty = j;\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tminMax = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdirection = \"\";\r\n\t\t\t\t\thitFound.clear();\r\n\t\t\t\t\tcounter = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tprobabilityGrid[x][y] = -1;\r\n\t\thitX = x;\r\n\t\thitY = y;\r\n\r\n\t\tint hitCoord[] = { x, y };\r\n\t\tsetCoords(hitCoord);\r\n\r\n\t\tif (Player.userGrid[x][y] == 1) {\r\n\t\t\t// change the grid value from 1 to 2 to signify hit\r\n\t\t\tPlayer.userGrid[x][y] = 2;\r\n\t\t\tString coordx = Integer.toString(x);\r\n\t\t\tString coordy = Integer.toString(y);\r\n\t\t\tif(!time1) {\r\n\t\t\t\ttimea=java.lang.System.currentTimeMillis();\r\n\t\t\t\ttime1=!time1;\r\n\t\t\t}else if(!time2) {\r\n\t\t\t\ttimeb=java.lang.System.currentTimeMillis();\r\n\t\t\t\t\ttime2=!time2;\r\n\t\t\t}else {\r\n\t\t\t\tdouble t=timeb-timea;\r\n\t\t\t\tif(t<3000) {\r\n\t\t\t\t\tsetScore(20);\r\n\t\t\t\t}\r\n\t\t\t\ttime1=false;\r\n\t\t\t\ttime2=false;\r\n\t\t\t\ttimea=0;\r\n\t\t\t\ttimeb=0;\r\n\t\t\t\t\r\n\t\t\t}//if time between consecutive hit is less than 3 seconds ,then bonus score\r\n\t\t\tsetScore(10);\r\n\t\t\tPlayer.coordinatesHit.add(coordx + \",\" + coordy);\r\n\t\t\tsetReply(\"It's a Hit!!!!!\");\r\n\t\t} else if (Player.userGrid[x][y] == 0) {\r\n\t\t\tPlayer.userGrid[x][y] = 3;\r\n\t\t\tsetScore(-1);\r\n\t\t\tsetReply(\"It's a miss!!!!!\");\r\n\t\t} else if (Player.userGrid[x][y] == 2 || Player.userGrid[x][y] == 3) {\r\n\t\t\tsetReply(\"The location has been hit earlier\");\r\n\t\t\t//throw new LocationHitException(\"The location has been hit earlier\");\r\n\r\n\t\t}\r\n\r\n\t}",
"public IImage createCheckerboard() {\n List<List<Pixel>> grid = new ArrayList<>();\n for (int i = 0; i < this.height; i++) {\n List<Pixel> row;\n // alternating between making rows starting with black or white tiles\n if (i % 2 == 0) {\n // start white\n for (int j = 0; j < this.tileSize; j++) {\n row = createRow(255, 0, (i * this.tileSize) + j);\n grid.add(row);\n }\n }\n else {\n // start black\n for (int m = 0; m < this.tileSize; m++) {\n row = createRow(0, 255, (i * this.tileSize) + m);\n grid.add(row);\n }\n }\n }\n return new Image(grid, 255);\n }",
"public static ArrayList<BufferedImage> loadTileImages(String folder, int tileWidth, int tileHeight){\n\t\tArrayList<String> fileNames = new ArrayList<String>();\n\t\tFile newFolder = new File(folder);\n\t\tString child [] = newFolder.list();\n\t\tif (child == null){\n\t\t\tSystem.out.println(\"Folder does not exist!\");\n\t\t\tSystem.exit(1);\n\t\t} else {\n\t\t\tfor(int l=0; l<child.length; l++){\n\t\t\t\tfileNames.add(child[l]);\n\t\t\t}\n\t\t}\n\t\tArrayList<BufferedImage> tileImages = new ArrayList<BufferedImage>();\n\t\tfor(int x=0; x<fileNames.size(); x++) {\n\t\t\tBufferedImage tileScale;\n\t\t\ttileScale = readImage(folder + \"/\" +fileNames.get(x));\n\t\t\ttileScale = ScaleImage.scaleImage(tileScale, tileWidth, tileHeight);\n\t\t\ttileImages.add(tileScale);\n\t\t}\n\t\treturn tileImages;\n\t}",
"public static void main(String args[]) throws IOException {\n int[] distance = new int[999 * 999]; // 999 is the max size of rows and cols\n int[] grid = new int[999 * 999];\n int tests = Integer.parseInt(getLine().trim());\n for (int i = 1; i <= tests; i++) {\n int rows = Integer.parseInt(getLine().trim());\n int cols = Integer.parseInt(getLine().trim());\n for (int r = 0; r < rows; r++) {\n StringTokenizer st = new StringTokenizer(getLine());\n for (int c = 0; c < cols; c++) {\n grid[r * cols + c] = Integer.parseInt(st.nextToken());\n }\n }\n\n int goal = (rows - 1) * cols + (cols - 1);\n int start = 0;\n Arrays.fill(distance, 0, rows * cols, INFINITY);\n distance[start] = grid[0];\n CustomPriorityQueue pq = new CustomPriorityQueue();\n pq.add(new Tuple(grid[0], start), grid[0]);\n while (!pq.isEmpty()) {\n Tuple current = pq.remove();\n if (distance[current.cell] < current.d); // we know shorter path already\n if (current.cell == goal) break;\n int r = current.cell / cols;\n int c = current.cell % cols;\n for (int j = 0; j < DELTA_R.length; j++) {\n int nr = r + DELTA_R[j];\n int nc = c + DELTA_C[j];\n if (nr < 0 || nr >= rows || nc < 0 || nc >= cols) continue; // out of bounds\n int next = nr * cols + nc;\n if (distance[next] > distance[current.cell] + grid[next]) {\n distance[next] = distance[current.cell] + grid[next];\n pq.add(new Tuple(distance[next], next), grid[next]);\n }\n }\n }\n\n out.println(distance[goal]);\n }\n out.close();\n }",
"private void calculateMaps() {\n\tsrcrows = new int[destHeight + 1];\n\tfor (int y = 0; y <= destHeight; y++) {\n\t srcrows[y] = (2 * y * srcHeight + srcHeight) / (2 * destHeight);\n\t}\n\tsrccols = new int[destWidth + 1];\n\tfor (int x = 0; x <= destWidth; x++) {\n\t srccols[x] = (2 * x * srcWidth + srcWidth) / (2 * destWidth);\n\t}\n\n float xscale = ( ( float ) srcWidth - 1 ) / ( ( float ) destWidth );\n float yscale = ( ( float ) srcHeight - 1 ) / ( ( float ) destHeight ) ;\n\n srcxlarr = new int[destWidth+1];\n srcxuarr = new int[destWidth+1];\n srcxarr = new int[destWidth+1];\n\n for (int x = 0 ; x <= destWidth;x++) {\n float tmp = x * xscale ;\n srcxlarr[x] = (int) Math.floor( tmp ) ;\n srcxuarr[x] = (int) Math.ceil( tmp ) ;\n srcxarr[x] = (int) ( ( tmp - srcxlarr[x] ) * 255f );\n }\n\n srcylarr = new int[destHeight+1];\n srcyuarr = new int[destHeight+1];\n srcyarr = new int[destHeight+1];\n\n for (int y = 0 ; y <= destHeight;y++) {\n float tmp = y * yscale ;\n srcylarr[y] = (int) Math.floor( tmp ) ;\n srcyuarr[y] = (int) Math.ceil( tmp ) ;\n srcyarr[y] = (int) ( ( tmp - srcylarr[y] ) * 255f );\n }\n\n /*\n System.out.println( \"srcrows\" );\n for (int i=0;i<srcrows.length;i++) {\n System.out.print( srcrows[i] + \" \" );\n }\n\n System.out.println( \"\\nsrccols\" );\n for (int i=0;i<srccols.length;i++) {\n System.out.print( srccols[i] + \" \" );\n }\n\n System.out.println( \"\\nsrcxlarr\" );\n for (int i=0;i<srcxlarr.length;i++) {\n System.out.print( srcxlarr[i] + \" \" );\n }\n\n System.out.println( \"\\nsrcxuarr\" );\n for (int i=0;i<srcxuarr.length;i++) {\n System.out.print( srcxuarr[i] + \" \" );\n }\n\n System.out.println( \"\\nsrcylarr\" );\n for (int i=0;i<srcxlarr.length;i++) {\n System.out.print( srcylarr[i] + \" \" );\n }\n\n System.out.println( \"\\nsrcyuarr\" );\n for (int i=0;i<srcxuarr.length;i++) {\n System.out.print( srcyuarr[i] + \" \" );\n }\n */\n }",
"@SuppressWarnings({ \"unchecked\", \"null\" })\n public List<String> calcSimilarity(String imgPath) {\n\n FileInputStream imageFile;\n double minDistance = Double.MAX_VALUE;\n\n // 返回查询结果\n List<String> matchUrls = new ArrayList<String>();\n\n\n try {\n\n imageFile = new FileInputStream(imgPath);\n BufferedImage bufferImage;\n\n bufferImage = ImageIO.read(imageFile);\n LTxXORP.setRotaIvaPats();//设定旋转模式值\n\n //得到图片的纹理一维数组特征向量(各颜色分量频率(统计量))\n double[] lbpSourceFecture = LTxXORP.getLBPFeature(imgPath);\n\n // 提取数据库数据\n List<Object> list = DBHelper.fetchALLCloth();\n\n // long startTime = System.currentTimeMillis();\n\n // 把每个条数据的路径和最短距离特征提取出来并存储在lbpResultMap的键值对中。\n Map<String, Double> lbpResultMap = new HashMap<String, Double>();\n\n for (int i = 0; i < list.size(); i++) {\n\n Map<String, Object> map = (Map<String, Object>) list.get(i);\n\n Object candidatePath = map.get(\"path\");\n Object candidateLBP = map.get(\"lbpFeature\");\n\n // 从快速搜索中选取TOP N结果,继续进行纹理特征匹配\n //获取当前由颜色匹配相似度排序的结果并提取其LBP纹理特征\n\n double[] lbpTargetFeature = MatchUtil.jsonToArr((String) candidateLBP);\n double lbpDistance = textureStrategy.similarity(lbpTargetFeature, lbpSourceFecture);\n lbpResultMap.put((String) candidatePath, lbpDistance);\n\n // 判断衡量标准选取距离还是相似度\n if (lbpDistance < minDistance)\n minDistance = lbpDistance;\n\n }\n\n Map<String, Double> tempResultMap;\n\n System.out.println(\"Min Distance : \" + (float) minDistance);\n\n\n\n System.out.println(\"============== finish Texture =================\");\n\n Map<String, Double> finalResult = MatchUtil.sortByValueAsc(lbpResultMap);\n\n int counter = 0;\n for (Map.Entry<String, Double> map : finalResult.entrySet()) {\n if (counter >= Config.finalResultNumber)\n break;\n //matchUrls截取只存储finalResultNumber数量的查询结果\n matchUrls.add(map.getKey());\n counter ++;\n double TSimilarity=Math.pow(Math.E,-map.getValue());\n System.out.println(TSimilarity + \" 图片路径 \" + map.getKey());\n\n }\n\n System.out.println();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return matchUrls;\n }",
"public static void main(String[] args) {\n int[][] map = new int[N][N];\r\n // 1D to 2D index map\r\n CustomPair[] indToVal = new CustomPair[(N * N) + 1];\r\n // 2D to value map\r\n Map<CustomPair, Integer> gridToValue = new HashMap<>();\r\n // Direction to start\r\n Direction dir = Direction.RIGHT;\r\n int j = 1;\r\n int y = N / 2;\r\n // shift left for even n's\r\n int x = (N % 2 == 0) ? y - 1 : y;\r\n /**\r\n * We use y, x here because the grid is sort of turned around.\r\n * */\r\n while(j <= ((N * N))) {\r\n CustomPair currentIndex = new CustomPair(y, x);\r\n // if the number is not prime it is traversable\r\n if (!isPrime(j)) {\r\n map[y][x] = 1;\r\n gridToValue.put(currentIndex, j);\r\n } else {\r\n map[y][x] = -1;\r\n }\r\n // add the value to 1d to 2d index values\r\n indToVal[j] = currentIndex;\r\n switch(dir){\r\n case RIGHT:\r\n if(x <= (N - 1) && map[y - 1][x] == 0 && j > 1)\r\n dir = Direction.UP;\r\n break;\r\n case UP:\r\n if(map[y][x - 1] == 0)\r\n dir = Direction.LEFT;\r\n break;\r\n case LEFT:\r\n if(x == 0 || map[y + 1][x] == 0)\r\n dir = Direction.DOWN;\r\n break;\r\n case DOWN:\r\n if(map[y][x + 1] == 0)\r\n dir = Direction.RIGHT;\r\n break;\r\n }\r\n // update the grid index\r\n switch(dir){\r\n case RIGHT:\r\n x++;\r\n break;\r\n case UP:\r\n y--;\r\n break;\r\n case LEFT:\r\n x--;\r\n break;\r\n case DOWN:\r\n y++;\r\n break;\r\n }\r\n // update 1D index\r\n j++;\r\n }\r\n\r\n Scanner sc = new Scanner(System.in);\r\n int caseNum = 1;\r\n while (sc.hasNextInt()) {\r\n int start = sc.nextInt();\r\n int goal = sc.nextInt();\r\n // find the shortest path\r\n Queue<CustomPair> q = new LinkedList<>();\r\n // 2D grid to distance values\r\n Map<CustomPair, Integer> distMap = new HashMap<>();\r\n // start is 0\r\n distMap.put(indToVal[start], 0);\r\n q.add(indToVal[start]);\r\n while (!q.isEmpty()) {\r\n CustomPair cur = q.remove();\r\n // for each neighbour (4 potential moves)\r\n for (int i = 0; i < 4; i++) {\r\n int nx = cur.a + X_NEIG_INDEX[i];\r\n int ny = cur.b + Y_NEIG_INDEX[i];\r\n CustomPair neighP = new CustomPair(nx, ny);\r\n // if the value is not in the grid\r\n if (!gridToValue.containsKey(neighP))\r\n continue;\r\n // if the value is already visited\r\n if (distMap.containsKey(neighP))\r\n continue;\r\n distMap.put(neighP, distMap.get(cur) + 1);\r\n q.add(neighP);\r\n }\r\n }\r\n // print for Kattis reasons\r\n String msg = \"Case \" + caseNum + \": \";\r\n if (!distMap.containsKey(indToVal[goal]) ||\r\n distMap.getOrDefault(indToVal[goal], -1) == -1 && start != goal)\r\n System.out.println(msg + \" impossible\");\r\n else\r\n System.out.println(msg + \"\" + distMap.get(indToVal[goal]));\r\n caseNum++;\r\n }\r\n }",
"public GiantBombMultiResourceResponse<GiantBombGame> searchForGame(\n\t\t\tString query, GiantBombRequestOptions options) {\n\t\tResponseEntity<GiantBombMultiResourceResponse<GiantBombGame>> responseEntity = restTemplate\n\t\t\t\t.exchange(\n\t\t\t\t\t\tBASE_URI\n\t\t\t\t\t\t\t\t+ \"/search/?api_key={apikey}&format=json&query={query}&limit={limit}&offset={offset}&field_list={field_list}\",\n\t\t\t\t\t\tHttpMethod.GET,\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\tnew ParameterizedTypeReference<GiantBombMultiResourceResponse<GiantBombGame>>() {\n\t\t\t\t\t\t}, props.getApikey(), query, options.limit,\n\t\t\t\t\t\toptions.offset,\n\t\t\t\t\t\tcreateFieldListParameter(options.fieldList));\n\t\tGiantBombMultiResourceResponse<GiantBombGame> searchresult = responseEntity\n\t\t\t\t.getBody();\n\t\treturn searchresult;\n\t}",
"public int[][] calGrid(CensusData data){\n\t\tGridThread[] gt = new GridThread[THREAD_NUM];\n\t\tint[][] result = new int[y + 1][x + 1];\n\t\tint[] xOrY = new int[]{x, y};\n\t\tString[][] lock = new String[y + 1][x + 1];\n\t\tfor(int i = 0; i < y + 1; i++) {\n\t\t\tfor(int j = 0; j < x + 1; j++) {\n\t\t\t\tlock[i][j] = i + \",\" + j;\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < THREAD_NUM - 1; i++) {\n\t\t\tint lo = i * (data.data_size / THREAD_NUM);\n\t\t\tint hi = (i + 1) * (data.data_size / THREAD_NUM);\n\t\t\tgt[i] = new GridThread(lo, hi, lock, result, map, xOrY, data);\n\t\t\tgt[i].start();\n\t\t}\n\t\tint lo = (THREAD_NUM -1 ) * (data.data_size / THREAD_NUM);\n\t\tgt[THREAD_NUM - 1] = new GridThread(lo, data.data_size, lock, result, map, xOrY, data);\n\t\tgt[THREAD_NUM - 1].start();\n\t\tfor(int i = 0; i < THREAD_NUM; i++) {\n\t\t\ttry {\n\t\t\t\tgt[i].join();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn result;\n\t}",
"public ArrayList<Entity> checkGrid(int x, int y) {\n \tArrayList<Entity> entitiesOnGrid = new ArrayList<Entity>();\n \tfor (Entity e: entities) {\n \t\tif (e != null) {\n \t\tif (e.getX() == x && e.getY() == y) {\n \t\t\tentitiesOnGrid.add(e);\n \t\t} \t\t\t\n \t\t}\n \t}\n \treturn entitiesOnGrid;\n }",
"private void searchImages()\n {\n searchWeb = false;\n search();\n }",
"public void showGrid(Vector<int[]> predictionList) \n{\n int width=1000, height=600;\n//System.out.println(\"I am here\");\n\t//readChartData();\n\t//f.pack();\n\t//Demo2D.setSize(new Dimension(width, height));\n //f.setSize(new Dimension(width, height));\n //f.setVisible(true);\n\t//BufferedImage bi=(BufferedImage)Demo2D.createImage(width, height);\n\tBufferedImage bi=ImgFactory.getImg(width, height); //new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n\tGraphics g=bi.getGraphics();\n\t//paint(g);\n\t//Demo2D.paint(g);\n\t//int i=0;\n\t//if (myQuotes.size() <1) return;\n\t\n\tGraphics2D g2 = (Graphics2D) g;\n \t//BufferedImage toDraw=buildImgBuf(new Dimension(width, height));\n\tboolean ok=drawGrid(g2, new Dimension(width, height), predictionList);\n\t//if (toDraw == null) return false;\n\tg2.setBackground(Color.white);\n\t\n\tg2.drawImage(bi, null, 0, 0);\n\t\n\tg2.getBackground();\n \n\tg2.drawImage(bi, null, 0, 0);\n\t\n\tString dFF=\"PossibleHits\";\n\tFile myPredic=new File(dFF+\".png\");\n\ttry {\n\t\tImageIO.write(bi, \"png\", myPredic);\n\t} catch (IOException e){return ;}\n\t\t\n\t\n\t\n\t\tFile myDup=new File(dFF+\"_2.png\");\n\t\tFile myOld=new File(dFF+\"Old.png\");\n\t\tif (myOld.exists()) myOld.delete();\n\t\tif (myDup.exists() && !myOld.exists()) myDup.renameTo(myOld);\n\t\tmyPredic.renameTo(myDup);\n\t\n}",
"public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n GridlandMetro ts = new GridlandMetro();\n long rows = s.nextLong();\n long cols = s.nextLong();\n long numTracks = s.nextLong();\n HashMap<Long, List<Pair>> map_t = new HashMap();\n long numLampposts = 0L;\n\n\n for(long j=0; j<numTracks; j+=1L){\n\n long current_row = s.nextLong();\n long c1 = s.nextLong();\n long c2 = s.nextLong();\n if(!map_t.containsKey(current_row))\n map_t.put(current_row, new ArrayList<Pair>());\n map_t.get(current_row).add(ts.new Pair(c1,c2));\n\n }\n\n for(long i=(map_t.keySet().size()+1); i<=rows; i++)\n numLampposts += cols;\n\n for(Long current_key:map_t.keySet()){\n Collections.sort(map_t.get(current_key));\n long current_max = 1L;\n for(int i=0; i<map_t.get(current_key).size(); i++){\n if(current_max < map_t.get(current_key).get(i).start)\n numLampposts += map_t.get(current_key).get(i).start - current_max;\n if(current_max <= map_t.get(current_key).get(i).end)\n current_max = map_t.get(current_key).get(i).end + 1L;\n }\n numLampposts += cols-current_max+1;\n }\n\n\n\n\n System.out.println(numLampposts);\n }",
"private static ArrayImg< UnsignedByteType, ByteArray > createLargeRectangularImage() {\n\t\tArrayImg< UnsignedByteType, ByteArray > img = ArrayImgs.unsignedBytes( 1024, 512 );\n\t\tfor ( int i = 0; i < 3; i++ ) {\n\t\t\tlong[] xmin = new long[] { 199 + i * 200, 0 };\n\t\t\tlong[] xmax = new long[] { 299 + i * 200, 511 };\n\t\t\tIntervalView< UnsignedByteType > iview = Views.interval( img, xmin, xmax );\n\t\t\tiview.forEach( pixel -> pixel.set( ( byte ) 255 ) );\n\t\t}\n\t\treturn img;\n\t}",
"Data<List<Boards>> getSearchBoardsCursor(String query, String cursor, String fields);",
"public void queryAttribute4Query(String objId, String layerUrl,\n final ArrayList resultList, final Handler handler) {\n Query query = new Query();\n // query.setGeometry(geometry);\n // query.setReturnGeometry(true);\n query.setOutFields(new String[] { \"OBJECTID\", \"NAME\",\"OBJ_NAME_C\" });\n // SpatialRelationship.CONTAINS: 框中整个盆地范围,才能查询到\n query.setSpatialRelationship(SpatialRelationship.CONTAINS);\n // Log.d(\"searchtask\", \"queryAttribute4Query......SpatialReference: \" +\n // query.getSpatialRelationship());\n query.setOutSpatialReference(mapView.getSpatialReference());\n query.setWhere(objId);\n\n Log.v(\"mandy\", \"objId: \" + objId);\n\n SearchQueryTask task = new SearchQueryTask(mapView.getContext(),\n layerUrl, CommonData.TypeOperateFrameChoos, mProgressDialog);\n task.execute(query);\n\n task.setQueryFinishListener(new OnQueryFinishListener() {\n\n @Override\n public void onFinish(FeatureSet results) {\n\n\n SinoApplication.mFeatureSet4Query = results;\n Graphic[] graphics = results.getGraphics();\n\n\n Message.obtain(handler,0,graphics).sendToTarget();\n\n DrawTool.this.graphics = graphics;\n\n // 把之前高亮显示结果清除\n mDrawLayer4HighLight.removeAll();\n if (graphics != null) {\n Log.d(\"mandy\", \"模糊查询 结果个数 : \" + graphics.length + \" \"\n + results.getDisplayFieldName());\n\n for (int j = 0; j < graphics.length; j++) {\n drawHighLight4Query(graphics[j], Color.RED);\n mylog.i(\"DrawTool\",\" \" +graphics[j].getAttributes());\n }\n\n zoomExtent(graphics);\n mProgressDialog.dismiss();\n // deactivate();\n // mCallback.setSearchData4Query(results);\n // Toast.makeText(mapView.getContext(), sb.toString() ,\n // Toast.LENGTH_LONG).show();\n }\n }\n\n });\n\n }",
"public boolean checkForAdjacentHextiles(int x, int y, int radius, HexGrid hexGrid) {\r\n\t\t//System.out.println(\"x:\" + x + \" y: \" + y);\r\n\t\tint maxIndex = radius;\r\n\t\tint minIndex = radius * -1;\r\n\t\tboolean result = false;\r\n\t\t//System.out.println(\"x = \" + maxIndex + \"; y = \" + minIndex );\r\n\t\t//System.out.println(\"maxIndex = \" + maxIndex + \"; minIndex = \" + minIndex );\r\n\t\t// Top and bottom require the same calculations whether x is even or odd\r\n\t\t\r\n\t\t// Check if there exist a hextile above the one we are trying to place\r\n\t\tif ((y > minIndex) && (hexGrid.getHex(x, y - 1) != null)) {\r\n\t\t\tif (hexGrid.getHex(x, y).getHextile().connectTo(hexGrid.getHex(x, y - 1).getHextile(), Config.IncompleteRoadwayDirection.TOP)) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check if there exist a hextile below the one we are trying to place\r\n\t\tif ((y < maxIndex) && (hexGrid.getHex(x, y + 1) != null)) {\r\n\t\t\tif (hexGrid.getHex(x, y).getHextile().connectTo(hexGrid.getHex(x, y + 1).getHextile(), Config.IncompleteRoadwayDirection.BOTTOM)) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check if there exist a hextile above-right to the one we are trying to place\r\n\t\tif ((x < maxIndex) && (y > minIndex) && (hexGrid.getHex(x + 1, y - 1) != null)) {\r\n\t\t\tif (hexGrid.getHex(x, y).getHextile().connectTo(hexGrid.getHex(x + 1, y - 1).getHextile(), Config.IncompleteRoadwayDirection.TOP_RIGHT)) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check if there exist a hextile below-right to the one we are trying to place\r\n\t\tif ((x < maxIndex) && (hexGrid.getHex(x + 1, y) != null)) {\r\n\t\t\tif (hexGrid.getHex(x, y).getHextile().connectTo(hexGrid.getHex(x + 1, y).getHextile(), Config.IncompleteRoadwayDirection.BOTTOM_RIGHT)) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check if there exist a hextile below-left to the one we are trying to place\r\n\t\tif ((x > minIndex) && (y < maxIndex) && (hexGrid.getHex(x - 1, y + 1) != null)) {\r\n\t\t\tif (hexGrid.getHex(x, y).getHextile().connectTo(hexGrid.getHex(x - 1, y + 1).getHextile(), Config.IncompleteRoadwayDirection.BOTTOM_LEFT)) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check if there exist a hextile above-left to the one we are trying to place\r\n\t\tif ((x > minIndex) && (hexGrid.getHex(x - 1, y) != null)) {\r\n\t\t\tif (hexGrid.getHex(x, y).getHextile().connectTo(hexGrid.getHex(x - 1, y).getHextile(), Config.IncompleteRoadwayDirection.TOP_LEFT)) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"public StrictImageFinder(BufferedImage area) {\n bigWidth = area.getWidth();\n bigHeight = area.getHeight();\n bigPixels = new int[bigWidth][bigHeight];\n for(int x = 0; x < bigWidth; x++) {\n for(int y = 0; y < bigHeight; y++) {\n bigPixels[x][y] = area.getRGB(x, y);\n }\n }\n }",
"public static BufferedImage[] createCodedImg(BufferedImage frameI, BufferedImage frameP, int thrs, int tileSize, int seekRange, int comparator) {\n //Compute the tiles of the image\n ArrayList<Tile> tilesP = doTiles(frameP,tileSize);\n //Lists that contains the important data of every tile\n ArrayList<Integer> bestTilesX = new ArrayList<>();\n ArrayList<Integer> bestTilesY = new ArrayList<>();\n ArrayList<Integer> bestOriginX = new ArrayList<>();\n ArrayList<Integer> bestOriginY = new ArrayList<>();\n int tileWidth = tileSize;\n int tileHeight = tileSize;\n \n int[] colorsTileX;\n int[] colors;\n //3-position array where we will store the mean value of every pixel of every channel\n int[] meanColorTileX = new int[3];\n int[] meanColor = new int[3];\n //mean values for every channel\n double meanRed=0, meanGreen=0, meanBlue =0;\n double meanRedX, meanGreenX, meanBlueX;\n \n double nPixels;\n double compareValue;\n \n WritableRaster bitmap = (WritableRaster) frameP.getData();\n WritableRaster bitmap2 = (WritableRaster) frameP.getData();\n WritableRaster frameP_mod = bitmap.createWritableChild(frameP.getMinX(), frameP.getMinY(), frameP.getWidth(), frameP.getHeight(), 0,0, null);\n WritableRaster ref_P = bitmap2.createWritableChild(frameP.getMinX(), frameP.getMinY(), frameP.getWidth(), frameP.getHeight(), 0,0, null);\n\n //For every tile\n for (Tile tile: tilesP) {\n\n double bestValue = 9999;\n int bestX = -1, bestY = -1;\n Tile bestTile = null;\n nPixels = tile.getImg().getWidth() * tile.getImg().getHeight();\n int red = 0, green=0, blue = 0;\n //Get the mean of every channel of every pixel of every tile\n for (int tileX = 0; tileX < tile.getImg().getWidth(); tileX++) {\n for (int tileY = 0; tileY < tile.getImg().getHeight(); tileY++) {\n colorsTileX = getPixelColor(tile.getImg(),tileX,tileY);\n red += colorsTileX[0];\n green += colorsTileX[1];\n blue += colorsTileX[2];\n }\n }\n meanRedX = (double) red / nPixels;\n meanGreenX = (double) green / nPixels;\n meanBlueX = (double) blue / nPixels;\n \t//2 fors to iterate through the tile size + seekRange\n for (int seekX = tile.getX() - seekRange; seekX < tile.getX()+ seekRange; seekX++) {\n for (int seekY = tile.getY() - seekRange; seekY < tile.getY()+ seekRange; seekY++) {\n \t//those if's correct the possible out of bounds coordinates\n if (seekY < 0){\n seekY = 0;\n }\n if (seekY > frameI.getHeight()){\n seekY = frameI.getHeight();\n }\n if (seekX < 0){\n seekX = 0;\n }\n if (seekX > frameI.getWidth()){\n seekX = frameI.getWidth();\n }\n red = 0;\n green = 0;\n blue = 0;\n //2 fors that can be understand like a window that goes through the tile size + seekRange\n //Getting the values of every channel of every pixel so we can later compute the mean of every each of them\n for (int f = seekX; f < seekX + tileSize; f++) {\n for (int k = seekY; k < seekY + tileSize; k++) {\n if((f < frameP.getWidth()) && (k < frameP.getHeight()) && (f >= 0) && (k >= 0)){\n colors = getPixelColor(frameI,f,k);\n red += colors[0];\n green += colors[1];\n blue += colors[2];\n }\n }\n }\n meanRed = (double) red / nPixels;\n meanGreen = (double) green / nPixels;\n meanBlue = (double) blue / nPixels;\n\n //Now that we have the 2 means, get the correlation factor\n compareValue = compareSelector(comparator,meanRedX,meanGreenX,meanBlueX,meanRed,meanGreen,meanBlue);\n\n //If this value is over a treshold, replace the tile with the n-1 frame pixels\n if ( compareValue < thrs && seekY <= frameP.getHeight() - tileSize && seekX <= frameP.getWidth() - tileSize) {\n //Maybe there's more than one 'window' that gets over the treshold\n //Get the best one!\n if(compareValue < bestValue){\n bestValue = compareValue;\n bestTile = tile;\n bestX = seekX;\n bestY = seekY;\n }\n }\n\n }\n }\n \t//Now that we have the tile info,\n if(bestTile != null){\n \t//Iterate through it\n for (int temp_tileX = tile.getX(); temp_tileX < tile.getImg().getWidth() + tile.getX(); temp_tileX++) {\n for (int temp_tileY = tile.getY(); temp_tileY < tile.getImg().getHeight() + tile.getY(); temp_tileY++) {\n \t//(Using the same array, but we decided to put the black color so we put zero in every pixel channel)\n meanColor[0] = (int) 0;//meanRedX;\n meanColor[1] = (int) 0;//meanGreenX;\n meanColor[2] = (int) 0;//meanBlueX;\n \n //Replace the pixels of the tile with black color for the 'coded' image\n frameP_mod.setPixel(temp_tileX,temp_tileY,meanColor);\n \n //And to the new 'frame I' image that were gonna use in the next iteration, replace the tile with the colors of the frame I image (the previous one)\n colors = getPixelColor(frameI, bestX + (temp_tileX - tile.getX()), bestY+(temp_tileY - tile.getY()));\n ref_P.setPixel(temp_tileX, temp_tileY, colors);\n \n }\n }\n //Add the info of the tiles for the decode\n bestTilesX.add(bestTile.getX());\n bestTilesY.add(bestTile.getY());\n bestOriginX.add(bestX);\n bestOriginY.add(bestY);\n }\n }\n //Create the codedData object with all the info of every tile\n CodedData codedData = new CodedData(bestTilesX, bestTilesY, bestOriginX, bestOriginY, tileWidth, tileHeight);\n dataList.add(codedData); //add it to the list\n //Create the images and return it!\n BufferedImage frameP_new = new BufferedImage(frameP.getColorModel(),frameP_mod,frameP.isAlphaPremultiplied(),null);\n BufferedImage ref_buf = new BufferedImage(frameP.getColorModel(),ref_P,frameP.isAlphaPremultiplied(),null);\n BufferedImage[] result = new BufferedImage[2];\n result[0] = frameP_new;\n result[1] = ref_buf;\n return result;\n }",
"public void computeBoundingBox() {\n\taveragePosition = new Point3(center);\n tMat.rightMultiply(averagePosition);\n \n minBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n maxBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n // Initialize\n Point3[] v = new Point3[8];\n for (int i = 0; i < 8; i++)\n \tv[i] = new Point3(center);\n // Vertices of the box\n v[0].add(new Vector3(-radius, -radius, -height/2.0));\n v[1].add(new Vector3(-radius, radius, -height/2.0));\n v[2].add(new Vector3(radius, -radius, -height/2.0));\n v[3].add(new Vector3(radius, radius, -height/2.0));\n v[4].add(new Vector3(-radius, -radius, height/2.0));\n v[5].add(new Vector3(-radius, radius, height/2.0));\n v[6].add(new Vector3(radius, -radius, height/2.0));\n v[7].add(new Vector3(radius, radius, height/2.0));\n // Update minBound and maxBound\n for (int i = 0; i < 8; i++)\n {\n \ttMat.rightMultiply(v[i]);\n \tif (v[i].x < minBound.x)\n \t\tminBound.x = v[i].x;\n \tif (v[i].x > maxBound.x)\n \t\tmaxBound.x = v[i].x;\n \tif (v[i].y < minBound.y)\n \t\tminBound.y = v[i].y;\n \tif (v[i].y > maxBound.y)\n \t\tmaxBound.y = v[i].y;\n \tif (v[i].z < minBound.z)\n \t\tminBound.z = v[i].z;\n \tif (v[i].z > maxBound.z)\n \t\tmaxBound.z = v[i].z;\n }\n \n }",
"private void debug(int[] query) {\n\t\tSystem.out.print(\"How many rounds you want? \");\n\t\tint round = scanner.nextInt();\n\t\tTJSGM tjsgm = new TJSGM();\n\t\tlong[][][][] result = new long[1][round][query.length][4];\n\t\tfor (int j = 0; j < round; j++) {\n\t\t\tfor (int i = 0; i < query.length; i++) {\n\t\t\t\tresult[0][j][i] = tjsgm.run(QUERY[query[i]]);\n\t\t\t}\n\t\t}\n\n\t\t// print\n\t\tString[] Q = {\"TJSGM\" };\n\t\tfor (int i = 0; i < result.length; i++) {// alg\n\t\t\tSystem.out.println(\"Algorithm:\" + Q[i]);\n\t\t\tfor (int k = 0; k < result[i][0].length; k++) {// query\n\t\t\t\tSystem.out.print(QUERY[query[k]] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tfor (int j = 0; j < result[i].length; j++) {// round\n\n\t\t\t\tfor (int m = 0; m < 4; m++) {//t\n\t\t\t\t\tfor (long[] q : result[i][j]) {// query\n\t\t\t\t\t\tSystem.out.print(q[m]+\"\\t\");\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\t\t\n\t}",
"public void solve(int startX, int startY, int endX, int endY) {\r\n // re-inicializar células para encontrar o caminho\r\n for (Cell[] cellrow : this.cells) {\r\n for (Cell cell : cellrow) {\r\n cell.parent = null;\r\n cell.visited = false;\r\n cell.inPath = false;\r\n cell.travelled = 0;\r\n cell.projectedDist = -1;\r\n }\r\n }\r\n // células ainda estão sendo consideradas\r\n ArrayList<Cell> openCells = new ArrayList<>();\r\n // célula sendo considerada\r\n Cell endCell = getCell(endX, endY);\r\n if (endCell == null) return; // saia se terminar fora dos limites\r\n { // bloco anônimo para excluir o início, porque não usado posteriormente\r\n Cell start = getCell(startX, startY);\r\n if (start == null) return; // saia se começar fora dos limites\r\n start.projectedDist = getProjectedDistance(start, 0, endCell);\r\n start.visited = true;\r\n openCells.add(start);\r\n }\r\n boolean solving = true;\r\n while (solving) {\r\n if (openCells.isEmpty()) return; // sair, nenhum caminho\r\n // classifique openCells de acordo com a menor distância projetada\r\n Collections.sort(openCells, new Comparator<Cell>() {\r\n @Override\r\n public int compare(Cell cell1, Cell cell2) {\r\n double diff = cell1.projectedDist - cell2.projectedDist;\r\n if (diff > 0) return 1;\r\n else if (diff < 0) return -1;\r\n else return 0;\r\n }\r\n });\r\n Cell current = openCells.remove(0); // célula pop menos projetada\r\n if (current == endCell) break; // no final\r\n for (Cell neighbor : current.neighbors) {\r\n double projDist = getProjectedDistance(neighbor,\r\n current.travelled + 1, endCell);\r\n if (!neighbor.visited || // ainda não visitado\r\n projDist < neighbor.projectedDist) { // melhor caminho\r\n neighbor.parent = current;\r\n neighbor.visited = true;\r\n neighbor.projectedDist = projDist;\r\n neighbor.travelled = current.travelled + 1;\r\n if (!openCells.contains(neighbor))\r\n openCells.add(neighbor);\r\n }\r\n }\r\n }\r\n // criar caminho do fim ao começo\r\n Cell backtracking = endCell;\r\n backtracking.inPath = true;\r\n while (backtracking.parent != null) {\r\n backtracking = backtracking.parent;\r\n backtracking.inPath = true;\r\n }\r\n }",
"private void jobFilter_30_Run1st() {\r\n\r\n//\t\tfinal long start = System.nanoTime();\r\n\r\n\t\tif (_allPhotos.length == 0) {\r\n\r\n\t\t\t// there are no images in the current folder,\r\n\r\n\t\t\t/*\r\n\t\t\t * gallery MUST be updated even when no images are displayed because images from the\r\n\t\t\t * previous folder are still displayed\r\n\t\t\t */\r\n\r\n\t\t\tupdateUI_GalleryInfo();\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfinal boolean isGPSFilter = _imageFilterGPS == PhotoFilterGPS.WITH_GPS;\r\n\t\tfinal boolean isNoGPSFilter = _imageFilterGPS == PhotoFilterGPS.NO_GPS;\r\n\t\tfinal boolean isTourFilter = _imageFilterTour == PhotoFilterTour.WITH_TOURS;\r\n\t\tfinal boolean isNoTourFilter = _imageFilterTour == PhotoFilterTour.NO_TOURS;\r\n\r\n\t\tfinal boolean isFilterSet = isGPSFilter || isNoGPSFilter || isTourFilter || isNoTourFilter;\r\n\r\n\t\t// get current dirty counter\r\n\t\tfinal int currentDirtyCounter = _jobFilterDirtyCounter;\r\n\r\n\t\tPhoto[] newFilteredPhotos = null;\r\n\r\n\t\tif (isFilterSet) {\r\n\r\n\t\t\tfinal int numberOfPhotos = _allPhotos.length;\r\n\t\t\tfinal Photo[] tempFilteredPhotos = new Photo[numberOfPhotos];\r\n\r\n\t\t\t// filterindex is incremented when the filter contains a gallery item\r\n\t\t\tint filterIndex = 0;\r\n\t\t\tint photoIndex = 0;\r\n\r\n\t\t\t// loop: all photos\r\n\t\t\tfor (final Photo photo : _allPhotos) {\r\n\r\n\t\t\t\tif (_filterJobIsCanceled) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tboolean isPhotoInFilter = false;\r\n\r\n\t\t\t\tif (photo.isExifLoaded == false) {\r\n\r\n\t\t\t\t\t// image is not yet loaded, it must be loaded to get the gps state\r\n\r\n\t\t\t\t\tputInExifLoadingQueue(photo);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// check again, the gps state could have been cached and set\r\n\t\t\t\tif (photo.isExifLoaded) {\r\n\r\n\t\t\t\t\tfinal boolean isPhotoWithGps = _isLinkPhotoDisplayed\r\n\t\t\t\t\t\t\t? photo.isLinkPhotoWithGps\r\n\t\t\t\t\t\t\t: photo.isTourPhotoWithGps;\r\n\r\n\t\t\t\t\tif (isGPSFilter) {\r\n\t\t\t\t\t\tif (isPhotoWithGps) {\r\n\t\t\t\t\t\t\tisPhotoInFilter = true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else if (isNoGPSFilter) {\r\n\r\n\t\t\t\t\t\tif (!isPhotoWithGps) {\r\n\t\t\t\t\t\t\tisPhotoInFilter = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfinal boolean isSavedInTour = photo.isSavedInTour;\r\n\r\n\t\t\t\tif (isTourFilter) {\r\n\t\t\t\t\tif (isSavedInTour) {\r\n\t\t\t\t\t\tisPhotoInFilter = true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else if (isNoTourFilter) {\r\n\r\n\t\t\t\t\tif (!isSavedInTour) {\r\n\t\t\t\t\t\tisPhotoInFilter = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (isPhotoInFilter) {\r\n\r\n\t\t\t\t\ttempFilteredPhotos[filterIndex] = _allPhotos[photoIndex];\r\n\r\n\t\t\t\t\tfilterIndex++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tphotoIndex++;\r\n\t\t\t}\r\n\r\n\t\t\t// remove trailing array items which are not set\r\n\t\t\tnewFilteredPhotos = Arrays.copyOf(tempFilteredPhotos, filterIndex);\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// a filter is not set, display all images but load exif data which is necessary when sorting by date\r\n\r\n\t\t\tnewFilteredPhotos = Arrays.copyOf(_allPhotos, _allPhotos.length);\r\n\r\n\t\t\t// loop: all photos\r\n\t\t\tfor (final Photo photo : _allPhotos) {\r\n\r\n\t\t\t\tif (_filterJobIsCanceled) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (photo.isExifLoaded == false) {\r\n\r\n\t\t\t\t\t// image is not yet loaded, it must be loaded to get the gps state\r\n\t\t\t\t\tputInExifLoadingQueue(photo);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// check sorting\r\n//\t\tif (_initialSorting != _currentSorting) {\r\n//\r\n//\t\t\t/*\r\n//\t\t\t * photo must be sorted because sorting is different than the initial sorting, this\r\n//\t\t\t * will sort only the filtered photo\r\n//\t\t\t */\r\n//\r\n\t\tArrays.sort(newFilteredPhotos, getCurrentComparator());\r\n//\t\t}\r\n\r\n\t\t/**\r\n\t\t * Update UI\r\n\t\t * <p>\r\n\t\t * gallery MUST be updated even when no images are displayed because images from the\r\n\t\t * previous folder are still displayed\r\n\t\t */\r\n\t\tupdateUI_GalleryItems(newFilteredPhotos, null);\r\n\r\n\t\tif (_jobFilterDirtyCounter > currentDirtyCounter) {\r\n\r\n\t\t\t// filter is dirty again\r\n\r\n\t\t\tjobFilter_23_ScheduleSubsequentWithoutRunCheck();\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// clear progress bar\r\n\r\n\t\t\tjobUILoading_20_Schedule();\r\n\t\t}\r\n\r\n//\t\tfinal float timeDiff = (float) (System.nanoTime() - start) / 1000000;\r\n////\t\tif (timeDiff > 10) {}\r\n//\t\tSystem.out.println(\"filterJob_20_RunInitial:\\t\" + timeDiff + \" ms\\t\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n//\t\t// TODO remove SYSTEM.OUT.PRINTLN\r\n\t}",
"public boolean fillGrid(int[][] grid) {\n Integer[] intArray = {1, 2, 3, 4, 5, 6, 7, 8, 9};\n\n //Find unfilled cell and fill it.\n for (int i = 0; i < 81; i++) {\n int row = i / 9;\n int col = i % 9;\n if (grid[row][col] == 0) {\n\n //Shuffle collection\n List<Integer> intList = Arrays.asList(intArray);\n Collections.shuffle(intList);\n Integer[] numbers = intList.toArray(intArray);\n for (int j = 0; j < numbers.length; j++) {\n\n //Test Row to see if it contains the value\n if (!Arrays.asList(grid[row][0], grid[row][1], grid[row][2], \n \t\tgrid[row][3], grid[row][4], grid[row][5], grid[row][6], \n \t\tgrid[row][7], grid[row][8]).contains(numbers[j])) {\n\n //Test Column to see if it contains the value\n if (!Arrays.asList(grid[0][col],grid[1][col],grid[2][col],\n \t\tgrid[3][col],grid[4][col],grid[5][col],grid[6][col],\n \t\tgrid[7][col],grid[8][col]).contains(numbers[j])) {\n\n //Test squares to see if they contain value\n int[] testsquare;\n if (row < 3) {\n if (col < 3) {\n testsquare = testSection(grid, 3, 3, 0, 0);\n } else if (col < 6){\n testsquare = testSection(grid, 3, 6, 0, 3);\n } else {\n testsquare = testSection(grid, 3, 9, 0, 6);\n }\n } else if (row < 6){\n if (col < 3) {\n testsquare = testSection(grid, 6, 3, 3, 0);\n } else if (col < 6) {\n testsquare = testSection(grid, 6, 6, 3, 3);\n } else {\n testsquare = testSection(grid, 6, 9, 3, 6);\n }\n } else {\n if (col < 3) {\n testsquare = testSection(grid, 9, 3, 6, 0);\n } else if (col < 6) {\n testsquare = testSection(grid, 9, 6, 6, 3);\n } else {\n testsquare = testSection(grid, 9, 9, 6, 6);\n }\n }\n if (!Arrays.asList(testsquare[0], testsquare[1], testsquare[2], testsquare[3], testsquare[4],\n testsquare[5], testsquare[6], testsquare[7], testsquare[8]).contains(numbers[j])) {\n grid[row][col] = numbers[j];\n if (isFull(grid))\n return true;\n else if (fillGrid(grid))\n break;\n }\n }\n }\n }\n break;\n }\n }\n return false;\n }",
"private void evaluateQueriesGroup(String queryName, String[] queryKeyword, int k_max, String city, int numKey, double radius, String type) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, SQLException {\n\n\t\tconnect();\n\t\t\n\t\tint inc = 5, k = 5, a = 0;\n\t\tdouble[][] metrics = new double[4][4];\n\n\t\tFileUtils.cleanDirectory(new File(\"./thrash\"));\n\t\tFileUtils.cleanDirectory(new File(\"./evaluations\"));\n\t\t\n\t\tfor (int ind = 0; ind < queryKeyword.length; ind++) {\n\n\t\t\tSystem.out.println(\"========== KEY: \" + queryKeyword[ind].toUpperCase() + \" ==========\\n\");\n\n\t\t\twhile (k <= k_max) {\n\n\t\t\t\tboolean arquivoCriado = false;\n\n\t\t\t\tString fileName = queryName + \"-LD [k=\" + k + \", kw=\" + queryKeyword[ind] + \"].txt\";\n\n\t\t\t\tif (!arquivoCriado) {\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tWriter output = new OutputStreamWriter(\n\t\t\t\t\t\t\tnew FileOutputStream(\"./thrash/\" + fileName.split(\"\\\\.txt\")[0] + \" --- ratings.txt\"),\n\t\t\t\t\t\t\t\"ISO-8859-1\");\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * Evaluation methods: \n\t\t\t\t\t * default --> using only Google Maps rate \n\t\t\t\t\t * cosine --> considers cosine similarity score and Google Maps rate \n\t\t\t\t\t * tripAdvisor --> using an opinRank query, it searches for user's judgment related to the query. It\n\t\t\t\t\t * is necessary to set the rate file manually. \n\t\t\t\t\t * personalized --> searches for the rate related to the the user preference. Each user preference is represented\n\t\t\t\t\t * by a profile. The user preference must be described manually in the method.\n\t\t\t\t\t */\n\t\t\t\t\tRatingExtractor obj = new RatingExtractor(\"cosine\", city);\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tArrayList<String> rateResults = obj.rateLODresult(\"evaluator/\" + fileName);\n\n\t\t\t\t\tfor (String x : rateResults) {\n\n\t\t\t\t\t\toutput.write(x + \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\toutput.close();\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tQueryEvaluation q = new QueryEvaluation(fileName.split(\"\\\\.txt\")[0] + \" --- ratings.txt\");\n\n\t\t\t\tmetrics[a] = q.execute();\t\n\t\t\t\tif(queryName.equals(\"SKPQ\")) {\n\t\t\t\t\tstoreSKPQResult(queryName.toLowerCase(),k, numKey, queryKeyword[ind], radius, city, \"recsys20\", metrics[a][0], metrics[a][1], \"default\", type);\n\t\t\t\t}else if(queryName.equals(\"Pareto\")) {\n\t\t\t\t\tstoreSKPQResult(\"skpq\",k, numKey, queryKeyword[ind], radius, city, \"recsys20\", metrics[a][0], metrics[a][1], \"default\", type);\n\t\t\t\t}else if(queryName.equals(\"InfluenceSearch\")) {\n\t\t\t\t\tstoreSKPQResult(\"skpq\",k, numKey, queryKeyword[ind], radius, city, \"recsys20\", metrics[a][0], metrics[a][1], \"default\", type);\n\t\t\t\t}else if(queryName.equals(\"ParetoSearch\")) {\n\t\t\t\t\tstoreParetoSearch(queryName.toLowerCase(),k, numKey, queryKeyword[ind], radius, city, \"recsys20\", alpha,metrics[a][0], metrics[a][1], \"default\");\n\t\t\t\t}else {\n\t\t\t\t\tSystem.err.print(\"Query not implemented in database yet!\");\n\t\t\t\t}\n\n//\t\t\t\tSystem.out.println(metrics[a]);\n\t\t\t\ta++;\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tk = k + inc;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Tau:\");\n\t\t\tfor(double[] n : metrics) {\n\t\t\t\tSystem.out.println(n[0]);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"NDCG:\");\n\t\t\tfor(double[] n : metrics) {\n\t\t\t\tSystem.out.println(n[1]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tdouble soma = 0;\n\n\t\t\tfor (int b = 0; b < metrics.length; b++) {\n\t\t\t\tsoma = soma + metrics[b][1];\n\t\t\t\tSystem.out.print(metrics[b][1] + \" \");\n\t\t\t}\n\n\t\t\tSystem.out.println(\"\\nAverage NDCG: \" + soma / 4 + \"\\n\\n\");\n\t\t\ta = 0;\n\t\t\tk = 5;\n\t\t}\t\t\t\t\n\t}",
"public static SearchHit[] query(String query) {\n \tNode node = nodeBuilder().client(true).clusterName(\"clarke\").node();\r\n\t\tClient client = node.client();\r\n\r\n SearchResponse scrollResp = client.prepareSearch(index).addField(\"url\")\r\n .setSearchType(SearchType.QUERY_THEN_FETCH)\r\n .setScroll(new TimeValue(60000))\r\n .setQuery(QueryBuilders.matchQuery(\"text\", query)).setSize(200)\r\n .execute().actionGet();\r\n\r\n return scrollResp.getHits().getHits();\r\n\r\n }",
"Image[][] getImagesToDisplayInCells(boolean showBarriers);",
"@Override\n\tprotected String doInBackground(String... args) {\n\t\tString url = \"https://apps.blitzm.com/statisticsserver-test/demographics/getHighlightedAreaMap\";\n\t\tString factPackId = args[0];\n\t\tString bbox = args[1];\n\t\tString latitude = args[2];\n\t\tString longitude = args[3];\n\t\tString width = args[4];\n\t\tString height = args[5];\n\n\t\t// Generate URL based on previously gathered parameters\n\t\tString overlayUrl = String.format(url\n\t\t\t\t+ \"?factPackId=%s&bbox=%s&width=%s&height=%s&sy=%s&sx=%s\",\n\t\t\t\tfactPackId, bbox, width, height, latitude, longitude);\n\n\t\t// Create geographic coordinate bounding box\n\t\tmOverlayBounds = Utility.parseBoundingBox(bbox);\n\n\t\t// Load content from URL into Facts\n\t\tmOverlay = Utility.drawableFromUrl(overlayUrl);\n\n\t\t// Return the URL for debug\n\t\treturn overlayUrl;\n\t}",
"public Rectangle getVisibleAreaInTiles(int screenCellsX, int screenCellsY, Coordinate center) {\n\t\tCoordinate upperLeft = getUpperLeftScreenTile(screenCellsX, screenCellsY, center);\n\t\tint w;\n\t\tint h;\n\n\t\tw = Math.min(this.width - upperLeft.x, screenCellsX);\n\t\th = Math.min(this.height - upperLeft.y, screenCellsY);\n\n\t\treturn new Rectangle(upperLeft.x, upperLeft.y, w, h);\n\t}",
"private void kNN(List<Room> roomList, HashMap<String, Integer> query) {\n resultList.clear();\n kNearestRooms.clear();\n\n calculateDistances(roomList, query);\n initializeKClosest();\n String majority = findMajority();\n setCurrTextView(majority);\n currTextView.setBackgroundColor(Color.parseColor(\"#FFA500\"));\n // textLocate.setText(\"You are in room : \" + majority);\n }"
] |
[
"0.55727416",
"0.5321115",
"0.50891197",
"0.5022333",
"0.49962065",
"0.49860412",
"0.49672416",
"0.4966487",
"0.4934035",
"0.488288",
"0.48710188",
"0.4869459",
"0.4853739",
"0.48355192",
"0.48161215",
"0.48147383",
"0.48119465",
"0.48109108",
"0.48003578",
"0.4745684",
"0.47438192",
"0.47339046",
"0.47232226",
"0.47230205",
"0.4717404",
"0.47047612",
"0.4696778",
"0.46835804",
"0.46784928",
"0.46673054",
"0.46554965",
"0.46410277",
"0.4637688",
"0.46259236",
"0.46075246",
"0.46064705",
"0.4602819",
"0.4602574",
"0.45983097",
"0.45982113",
"0.45935282",
"0.45732006",
"0.45712274",
"0.45580763",
"0.45574012",
"0.45549363",
"0.4553759",
"0.45535612",
"0.45530364",
"0.45398188",
"0.45397598",
"0.45373812",
"0.45347095",
"0.45338514",
"0.45283267",
"0.45275292",
"0.45272863",
"0.4523741",
"0.45209894",
"0.4514202",
"0.45124406",
"0.45120806",
"0.45095557",
"0.45071462",
"0.45034492",
"0.45031437",
"0.4487471",
"0.448655",
"0.4483776",
"0.44732237",
"0.44695237",
"0.44643852",
"0.44534358",
"0.44487804",
"0.4445415",
"0.44353166",
"0.44325453",
"0.44313675",
"0.44195768",
"0.44178855",
"0.44170025",
"0.44152763",
"0.44150582",
"0.44129893",
"0.4412015",
"0.44101703",
"0.4403758",
"0.44026166",
"0.44000596",
"0.4395857",
"0.43957013",
"0.43909016",
"0.43852365",
"0.4384946",
"0.4384323",
"0.43807644",
"0.4379419",
"0.4376393",
"0.4373071",
"0.43709195"
] |
0.5393317
|
1
|
put all the information into result
|
private void work(QuadTree current, QuadTree target, Map<String, Object> results, double tar_LonDPP) {
LinkedList<QuadTree> grid = new LinkedList<>();
LinkedList<QuadTree> Linked = new LinkedList<>();
grid.addLast(current);
while (grid.size() != 0) {
QuadTree cur = grid.removeFirst();
if (cur.checkResolution(tar_LonDPP) && cur.checkOverlap(target) || cur.checkOverlap(target) && cur.depth == 7) {
Linked.addLast(cur);
} else if (cur.checkOverlap(target) && cur.depth < cur.maxDepth) {
QuadTree[] children = cur.findChild(cur);
for (QuadTree c : children) {
grid.addLast(c);
}
}
}
String[][] childrenNames = childrenNames(Linked);
results.put("render_grid", childrenNames);
double[] fourPoints = findFourPoints(Linked);
results.put("raster_ul_lon", fourPoints[0]);
results.put("raster_lr_lon", fourPoints[1]);
results.put("raster_lr_lat", fourPoints[2]);
results.put("raster_ul_lat", fourPoints[3]);
results.put("depth", Linked.getFirst().depth);
results.put("query_success", true);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tprotected void parseResult() {\n\t\t\n\t}",
"public static void showResultPerson( Result<Record> result){\n \t for (Record r : result) {\n// Integer id = r.getValue(PERSON.PERSO_ID);\n String firstName = r.getValue(PERSON.PERSO_FIRSTNAME);\n String lastName = r.getValue(PERSON.PERSO_LASTNAME);\n\n System.out.println(\"Name : \" + firstName + \" \" + lastName);\n }\n }",
"@Override\n \tpublic Object getResult() {\n \t\treturn result;\n \t}",
"private void writeResults() {\n\t\tgetContext().writeName(\"searchResults\");\n\t // Open the Array of affectedParties\n\t TypeContext itemTypeContext = getContext().writeOpenArray();\n\t \n\t for(Person person : results){\n\t\t\t// Add a comma after each affectedParty object is written\n if (!itemTypeContext.isFirst()){\n \tgetContext().writeComma();\n }\n itemTypeContext.setFirst(false);\n\t\t\t\n // Open the affectedParty object and write the fields\n\t\t\tgetContext().writeOpenObject();\n\t\t\t\n\t\t\t// Write out the fields\n\t\t getContext().writeName(\"id\");\n\t\t getContext().transform(person.getId());\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"name\");\n\t\t getContext().transform(person.getName());\n\t\t getContext().writeComma();\n\n\t\t getContext().writeName(\"sex\");\n\t\t getContext().transform(person.getSex());\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"dob\");\n\t\t getContext().transform(person.getDob() == null?null:new SimpleDateFormat(\"dd/MM/yyyy\").format(person.getDob()));\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"dod\");\n\t\t getContext().transform(person.getDod() == null?null:new SimpleDateFormat(\"dd/MM/yyyy\").format(person.getDod()));\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"placeOfBirth\");\n\t\t getContext().transform(person.getPlaceOfBirth());\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"placeOfDeath\");\n\t\t getContext().transform(person.getPlaceOfDeath());\n\t\t getContext().writeComma();\n \t getContext().writeName(\"href\");\n \t getContext().transform(url + \"/\" + person.getId());\n\t\t\t\n \t // Close the affectedParty object\n \t getContext().writeCloseObject();\n }\n\t\t// Close the Array of affectedParties\n getContext().writeCloseArray();\n\t}",
"private synchronized void addResultToMultiList() {\n\t addObjectToMultiList(resultArrayList);\r\n\t }",
"public Result() {\n getLatenciesSuccess = new ArrayList<Long>();\n getLatenciesFail = new ArrayList<Long>();\n postLatenciesSuccess = new ArrayList<Long>();\n postLatenciesFail = new ArrayList<Long>();\n getRequestFailNum = 0;\n postRequestFailNum = 0;\n getRequestSuccessNum = 0;\n postRequestSuccessNum = 0;\n// getTimestamps = new ArrayList<Long>();\n// postTimestamps = new ArrayList<Long>();\n }",
"private void dumpResultMapping ()\r\n {\r\n for (Entry<Result, Set<Candidate>> entry : connection.getResultMap().\r\n entrySet()) {\r\n logger.debug(\"Result: {}\", entry.getKey());\r\n\r\n for (Candidate candidate : entry.getValue()) {\r\n logger.debug(\"* candidate: {}\", candidate);\r\n }\r\n }\r\n }",
"void mo24178a(ResultData resultdata);",
"public void setResult() {\n }",
"@Override\n public void setResult(Object result) throws EngineException {\n \n }",
"@Override\n\tvoid putData() {\n\t\tSystem.out.println(\"Brand : \"+brand);\n\t\tSystem.out.println(\"Model : \"+model);\n\t\tSystem.out.println(\"Year of manufacture : \"+year_of_manufacture);\n\t\tSystem.out.println(\"CC : \"+cc);\n\t}",
"public static void setResult(String resultInfo) {\n }",
"public Result getResults()\r\n {\r\n return result;\r\n }",
"public Results() {\n\t\t\t// TODO Auto-generated constructor stub\n\t\t}",
"@Override\n\tpublic String getResult() {\n\t\treturn result;\n\t}",
"private void writeSpecificResult(GroupOfLogs res) throws ServiceFailureException {\r\n writeStartOfElement(\"Log\");\r\n \r\n if(res.getType().compareTo(\"Error\") == 0 || res.getType().compareTo(\"Critical\") == 0) {\r\n writeElementWithCharacters(\"info\", removeNonValidXMLCharacters(res.getIdentity()));\r\n } else {\r\n writeElementWithCharacters(\"info\", String.valueOf(res.getIdentity()));\r\n }\r\n \r\n writeElementWithCharacters(\"startID\", String.valueOf(res.getStartID()));\r\n writeElementWithCharacters(\"endID\", String.valueOf(res.getEndID()));\r\n writeElementWithCharacters(\"startDate\", res.getStartDate());\r\n writeElementWithCharacters(\"endDate\", res.getEndDate());\r\n writeElementWithCharacters(\"module\", String.valueOf(res.getModule()));\r\n writeElementWithCharacters(\"level\", String.valueOf(res.getLevel()));\r\n writeElementWithCharacters(\"type\", res.getType());\r\n writeElementWithCharacters(\"tid\", String.valueOf(res.getThreadID()));\r\n writeElementWithCharacters(\"pid\", String.valueOf(res.getProcessID()));\r\n writeElementWithCharacters(\"count\", String.valueOf(res.getCount()));\r\n writeEndOfElement();\r\n }",
"java.lang.String getResult();",
"public void getResults() {\n\t\tSystem.out.println(\"|V| : \" + g.getV());\n\t\tSystem.out.println(\"|E| : \" + g.getE());\n\t\tSystem.out.println(\"Max flow : \" + g.getVertex(sink).e);\n\t\tSystem.out.println(\"Run time : \" + (System.currentTimeMillis()-timeStart) + \" ms\"+\"\\n\");\n\t}",
"private List<Result> addAllResults(List<Result> result) {\n\n MongoCollection<Document> collection = mongoDatabase.getCollection(\"result\");\n List<Result> allResults = new LinkedList<>();\n for (Result res : result) {\n Document newResult = new Document();\n newResult.put(\"student1\", res.getStudent1());\n newResult.put(\"student2\", res.getStudent2());\n newResult.put(\"percentage\", res.getPercentage());\n newResult.put(\"snippets\", res.getSnippets());\n newResult.put(\"type\", res.getType().toString());\n collection.insertOne(newResult);\n\n\n ObjectId resultId = newResult.getObjectId(\"_id\");\n res.setObjectId(resultId);\n newResult.put(\"hexId\", resultId.toHexString());\n res.setHexId(resultId.toHexString());\n Bson updateOperationDocument = new Document(\"$set\", newResult);\n collection.updateOne(eq(\"_id\", new ObjectId(resultId.toHexString())), updateOperationDocument);\n\n allResults.add(res);\n }\n return allResults;\n }",
"public void writeResults() {\n gfmBroker.storeResults(this.responses, fileOutputPath);\n }",
"protected void addToResult(Instance instance) {\n\t\tthis.resultBuffer.add(instance);\n\t}",
"public void dump() {\n for(Object object : results) {\n System.out.println( object );\n }\n }",
"public void saveResults();",
"@Override\r\n public void onSuccess(JSONArray result)\r\n {\r\n dataBase.addAllProgramsToTable(result);\r\n }",
"public QRInfo (Result res){\n ResultPoint center = midPoint(res.getResultPoints()[0],res.getResultPoints()[2]);\n this.xPosition = center.getX();\n this.yPosition = center.getY();\n this.distance = distanceBetweenPoints(res.getResultPoints()[1],center);\n this.idString = res.getText();\n this.rp1 = res.getResultPoints()[0];\n this.rp2 = res.getResultPoints()[1];\n this.rp3 = res.getResultPoints()[2];\n }",
"public AllPoojaResult() {}",
"private static void flushResult(IQueryResult result) throws IOException\n {\n while (result.next()) {\n System.out.println(result.getValueArray().toString());\n }\n }",
"@Override\n\t\tpublic void onGetPoiResult(PoiResult arg0) {\n\t\t\tList<PoiInfo> lists=arg0.getAllPoi();\n\t\t\tif(lists!=null){\n\t\t\tfor(PoiInfo poiInfo : lists){\n\t\t\t\tAppContext.listmap.add(poiInfo);\n\t\t\t\tico(poiInfo.location);\n\t\t\t\t}\n\t\t\t}\n\t \n\t\t\tLog.d(\"测试数据\", \"\");\n\t\t\t\n\t\t}",
"private void showResult(TYPE type){\r\n\t\tString brand = \"\";//brand\r\n\t\tString sub = \"\";//sub brand\r\n\t\tString area = \"\";//area\r\n\t\tString cus = \"\";//customer name\r\n\t\tString time = \"\";//time in second level\r\n\t\tKIND kind = null;//profit or shipment \r\n\t\t\r\n\t\tif(item1.getExpanded()){\r\n\t\t\tkind = KIND.SHIPMENT;\r\n\t\t\tbrand = combo_brand_shipment.getText();\r\n\t\t\tsub = combo_sub_shipment.getText();\r\n\t\t\tarea = combo_area_shipment.getText();\r\n\t\t\tcus = combo_cus_shipment.getText();\r\n\t\t}else if(item2.getExpanded()){\r\n\t\t\tkind = KIND.PROFIT;\r\n\t\t\tbrand = combo_brand_profit.getText();\r\n\t\t\tsub = combo_sub_profit.getText();\r\n\t\t\tarea = combo_area_profit.getText();\r\n\t\t\tcus = combo_cus_profit.getText();\r\n\t\t}else{//either item1 & item2 are not expanded\r\n\t\t\t//show a message?\r\n\t\t\tkind = KIND.NONE;\r\n\t\t}\r\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n\t\ttime = formatter.format(new Date());\r\n\t\tfinal Map<String, Object> args = new HashMap<String ,Object>();\r\n\t\targs.put(\"brand\", brand);\r\n\t\targs.put(\"sub_brand\", sub);\r\n\t\targs.put(\"area\", area);\r\n\t\targs.put(\"customer\", cus);\r\n\t\targs.put(\"time\", time);\r\n\t\targs.put(\"kind\", kind.toString());\r\n\t\targs.put(\"type\", type.toString());\r\n\t\t//call engine to get the data\t\r\n\t\t\r\n\t\tProgressMonitorDialog progressDialog = new ProgressMonitorDialog(Display.getCurrent().getActiveShell());\r\n\t\tIRunnableWithProgress runnable = new IRunnableWithProgress() { \r\n\t\t public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { \r\n\t\t \t\r\n\t\t Display.getDefault().asyncExec(new Runnable() { \r\n\t\t public void run() { \r\n\t\t monitor.beginTask(\"正在进行更新,请勿关闭系统...\", 100); \r\n\t\t \r\n\t\t monitor.worked(25); \r\n\t monitor.subTask(\"收集数据\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tro.getMap().clear();\r\n\t\t\t\t\tro=statistic.startAnalyzing(args, monitor);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tMessageBox mbox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t\t\t\t\tmbox.setMessage(\"分析数据失败,请重试\");\r\n\t\t\t\t\tmbox.open();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\tmonitor.worked(100); \r\n\t monitor.subTask(\"分析完成\");\r\n\t \r\n\t\t monitor.done();\r\n\t\t }\r\n\t\t \t });\r\n\t\t } \r\n\t\t}; \r\n\t\t \r\n\t\ttry { \r\n\t\t progressDialog.run(true,/*是否开辟另外一个线程*/ \r\n\t\t false,/*是否可执行取消操作的线程*/ \r\n\t\t runnable/*线程所执行的具体代码*/ \r\n\t\t ); \r\n\t\t} catch (InvocationTargetException e) { \r\n\t\t\tMessageBox mbox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t\t\tmbox.setMessage(\"分析数据失败,请重试\");\r\n\t\t\tmbox.open();\r\n\t\t\treturn;\r\n\t\t} catch (InterruptedException e) { \r\n\t\t\tMessageBox mbox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t\t\tmbox.setMessage(\"分析数据失败,请重试\");\r\n\t\t\tmbox.open();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(ro.getMap().isEmpty())\r\n\t\t\treturn;\r\n\t\t\r\n\t\tPagination page1 = (Pagination) ro.get(\"table1\");\r\n\t\tPagination page2 = (Pagination) ro.get(\"table2\");\r\n\t\tPagination page3 = (Pagination) ro.get(\"table3\");\r\n\t\tList<Object> res1 = new ArrayList<Object>();\r\n\t\tList<Object> res2 = new ArrayList<Object>();\r\n\t\tList<Object> res3 = new ArrayList<Object>();\r\n\t\tif(page1 != null)\r\n\t\t\tres1 = (List<Object>)page1.getItems();\r\n\t\tif(page2 != null)\r\n\t\t\tres2 = (List<Object>)page2.getItems();\r\n\t\tif(page2 != null)\r\n\t\t\tres3 = (List<Object>)page3.getItems();\r\n\t\t\r\n\t\tif(res1.size()==0 && res2.size()==0 && res3.size()==0){\r\n\t\t\tMessageBox messageBox = new MessageBox(MainUI.getMainUI_Instance(Display.getDefault()));\r\n\t \tmessageBox.setMessage(\"没有满足查询条件的数据可供分析,请查询其他条件\");\r\n\t \tmessageBox.open();\r\n\t \treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//this if/else can be optimized, since it looks better in this way, leave it\t\t\r\n\t\t//case 1: brand ratio, area ratio, trend\r\n\t\tif(brand.equals(AnalyzerConstants.ALL_BRAND) && area.equals(AnalyzerConstants.ALL_AREA)){\r\n\t\t\t\t\t\t\r\n\t\t\t//brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(true);//all brands\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \t\t\r\n \t\t//area ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(true);//all areas\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\r\n\t\t}\r\n\t\t//case 2: brand ratio, customer ratio, trend\r\n\t\telse if(brand.equals(AnalyzerConstants.ALL_BRAND) && cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(true);//all brands\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \r\n \t\t//customer ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(false);//all areas\r\n \t\trb2.setArea(area);\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 3: brand ratio, trend\r\n\t\telse if(brand.equals(AnalyzerConstants.ALL_BRAND) && !area.equals(AnalyzerConstants.ALL_AREA) && !cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(true);//all brands\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 4: sub brand ratio, area ratio, trend\r\n\t\telse if(sub.equals(AnalyzerConstants.ALL_SUB) && area.equals(AnalyzerConstants.ALL_AREA)){\r\n\t\t\t//sub brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(false);//all brands\r\n\t\t\trb.setBrand(brand);\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \r\n \t\t//area ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(true);//all areas\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 5: sub brand ratio, customer ratio, trend\r\n\t\telse if(sub.equals(AnalyzerConstants.ALL_SUB) && cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//sub brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(false);//all brands\r\n\t\t\trb.setBrand(brand);\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n \r\n \t\t//customer ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(false);//all areas\r\n \t\trb2.setArea(area);\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//area\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 6: sub brand ratio, trend\r\n\t\telse if(sub.equals(AnalyzerConstants.ALL_SUB) && !area.equals(AnalyzerConstants.ALL_AREA) && !cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//sub brand ratio\r\n\t\t\tRatioBlock rb = new RatioBlock();\r\n\t\t\trb.setBrand_sub(false);//all brands\r\n\t\t\trb.setBrand(brand);\r\n\t\t\trb.setKind(kind);\r\n\t\t\trb.setBrand_area(true);//brand\r\n\t\t\tRatioResultList rrl = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl.initilByQuery(res1, 1);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc = new RatioComposite(composite_content, 0, rb, rrl); \r\n \t\talys.add(bc);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 7: area ratio, trend\r\n\t\telse if(!brand.equals(AnalyzerConstants.ALL_BRAND) && !sub.equals(AnalyzerConstants.ALL_SUB) && area.equals(AnalyzerConstants.ALL_AREA)){\r\n \t\t//area ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(true);//all areas\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//brand\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 8: customer ratio, trend\r\n\t\telse if(!brand.equals(AnalyzerConstants.ALL_BRAND) && !sub.equals(AnalyzerConstants.ALL_SUB) && cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n \t\t//customer ratio\r\n \t\tRatioBlock rb2 = new RatioBlock();\r\n \t\trb2.setArea_customer(false);//all areas\r\n \t\trb2.setArea(area);\r\n \t\trb2.setKind(kind);\r\n \t\trb2.setBrand_area(false);//brand\r\n\t\t\tRatioResultList rrl2 = new RatioResultList();\r\n\t\t\t//we should notice that, all the table can not be modified!\r\n\t\t\trrl2.initilByQuery(res2, 2);//the input arg is the query result from Engine\t\t\t\r\n\t\t\tRatioComposite bc2 = new RatioComposite(composite_content, 0, rb2, rrl2); \r\n \t\talys.add(bc2);\r\n \t\tcomposite_content.setLayout(layout_content);\r\n composite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t//case 9: trend\r\n\t\telse if(!brand.equals(AnalyzerConstants.ALL_BRAND) && !sub.equals(AnalyzerConstants.ALL_SUB) && !area.equals(AnalyzerConstants.ALL_AREA) & !cus.equals(AnalyzerConstants.ALL_CUSTOMER)){\r\n\t\t\t//now, just trend, do nothing here\r\n\t\t}\r\n\t\tif(!kind.equals(KIND.NONE)){\r\n\t\t\t//trend, always has the trend graph \t\r\n\t\t\tTrendDataSet ts = new TrendDataSet();\r\n\t\t\tts.setKind(kind);\t\r\n\t\t\tts.setType(type);\r\n\t\t\tTrendComposite tc = new TrendComposite(composite_content, 0, ts, res3); \r\n\t\t\talys.add(tc);\r\n\t\t\tcomposite_content.setLayout(layout_content);\r\n\t\t\tcomposite_scroll.setMinSize(composite_content.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\t}\r\n\t\t\t\t\r\n\t}",
"protected R getResult() {\n\t\treturn result;\n\t}",
"protected void tijiaoListInfo(String result) {\n\t\ttry {\n\t\t\tJSONObject object = new JSONObject(result);\n\t\t\tString code = object.getString(\"code\");\n\t\t\tif (\"200\".equals(code)) {\n\t\t\t\trzid = object.getString(\"id\");\n\t\t\t\thandler.sendEmptyMessage(HANDLER_TIJIAO_SUCCESS);\n\t\t\t} else if (\"700\".equals(code)) {\n\t\t\t\tString message = object.getString(\"message\");\n\t\t\t\thandler.sendMessage(handler.obtainMessage(\n\t\t\t\t\t\tHANDLER_TOKEN_FAILURE, message));\n\t\t\t} else {\n\t\t\t\tString message = object.getString(\"message\");\n\t\t\t\thandler.sendMessage(handler.obtainMessage(\n\t\t\t\t\t\tHANDLER_GETINFO_FAILURE, message));\n\t\t\t}\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\thandler.sendEmptyMessage(HANDLER_NN_FAILURE);\n\t\t}\n\t}",
"public void summarizeData() {\n\t\t//take json object and populate a POJO\n\t\t\n//\t\tfor(javaObject : x) {\n\t\t\n\t\t\t//new JobSummaryObject\n\t\t\t//\n\t}",
"private static void writeResults() {\n\t\t//Sort hashMap before sending to file\n\t\tTreeSet<Word> mySet = new TreeSet<>(hm.values());\n\n\t\t//Create result.txt file and write treeMap out to it\n\t\tWriter writer = null;\n\t\ttry {\n\t\t\t//System.out.println(\"Here\");\n\t\t\twriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(\"output\\\\results.txt\")));\n\t\t\tfor (Word word : mySet) {\n\t\t\t\twriter.write(word.getValue() + \"\\t\" + word.getCount() + \"\\n\");\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\twriter.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"protected void calculaterVSMforAllQuery(String type)\n {\n ArrayList<String> resultAll=new ArrayList<>();\n for(String qid: this.queryTFscore.keySet())\n {\n //System.out.println(qid+\"----------------------------------------------------------------------------------------------\"+this.maxLength+\" \"+this.minLength);\n HashMap<String, Double> queryInfo=this.queryTFscore.get(qid);\n System.out.println(qid+\" \"+queryInfo);\n HashMap <String, Double> finalResult=new HashMap<>();\n for(String docID:this.corpusTFscore.keySet())\n {\n HashMap<String, Double> docInfo=this.corpusTFscore.get(docID);\n double upperscore=this.calculateUpperPart(queryInfo, docInfo, docID);\n double lowerscore=this.calculateLowerPart(queryInfo, docInfo, docID);\n double score=0.0;\n \n //Calculate gTerms\n //Calculate Nx\n double Nx=0.0;\n if(this.LengthInfoMap.containsKey(docID)){\n Nx=(this.LengthInfoMap.get(docID)-this.minLength)/(this.maxLength-this.minLength);\n }\n \n //Calculate gTerms\n double gTerms=1/(1+Math.exp(-Nx));\n if(upperscore!=0&&lowerscore!=0) score=gTerms*(upperscore)/lowerscore;\n //if(upperscore!=0&&lowerscore!=0) score=(upperscore)/lowerscore;\n if(score>0) {\n //System.out.println(docID+\" = \"+score);\n finalResult.put(docID, score);\n }\n \n }\n HashMap<String, Double> normalizedAndSortedResult=doNormalization(finalResult);\n //HashMap<String, Double> sortedResult=MiscUtility.sortByValues(finalResult);\n //System.out.println(normalizedAndSortedResult);\n int count=0;\n for(String docID:normalizedAndSortedResult.keySet())\n {\n if(count>9) break;\n String fullPath=this.corpusMap.get(docID);\n resultAll.add(qid+\",\"+fullPath+\",\"+normalizedAndSortedResult.get(docID));\n count++;\n }\n }\n ContentWriter.writeContent(this.base+\"\\\\Result\\\\\"+this.corpus+\"_result\"+type+\".txt\", resultAll);\n }",
"protected void addResultNodes(DefaultMutableTreeNode root, Cluster result_cluster, GeneralInfo info) {\r\n addExpressionImages(root);\r\n// addHierarchicalTrees(root, result_cluster, info);\r\n// addCentroidViews(root);\r\n addTableViews(root);\r\n addGeneSetInfo(root);\r\n// addClusterInfo(root);\r\n \r\n addGeneralInfo(root, info);\r\n }",
"private void collectResultSet(Cursor cursor, ArrayList<String> result_list) {\n\n\t\t//\n\t\t// are there any data sets\n\t\t//\n\t\tif (!cursor.moveToFirst())\n\t\t\treturn;\n\n\t\t//\n\t\t// add the result\n\t\t//\n\t\tdo {\n\t\t\tresult_list.add(cursor.getString(0));\n\t\t} while (cursor.moveToNext());\n\t}",
"public abstract String getResult();",
"@Override\n\tprotected void setAllResultsToPar() {\n\t}",
"@Override\n public void onNext(Result result) {\n\n int dbSize = getDBSize(contactsDB); //retrieve dbsize\n //2. parse through results\n\n MyLocation mLocation = new MyLocation(result.getGeometry().getLocation().getLat(),\n result.getGeometry().getLocation().getLng());\n String name = result.getName();\n String photo_ref = result.getPhotos()==null?\"\":result.getPhotos().get(0).getPhotoReference();\n double rating = result.getRating()==null?0: result.getRating();\n String vicinity = result.getVicinity();\n String place_id = result.getPlaceId();\n //Add a new Target to the DB\n Target target = new Target(1 + dbSize, name, rating, subject, vicinity, photo_ref, place_id, mLocation);\n\n //insert a contact to the DB\n fillTargetRecordInDB(target, contactsDB);\n\n }",
"@Override\n public void execute() {\n modelFacade.getFoodItems().addAll(modelFacade.fetchMatchingFoodItemResults(sb.toString()));\n }",
"private List<HashMap<String,String>> performQuery(Model model, String queryName) throws Exception {\n String sparqlQueryString = this.getQueryFromFile(queryName);\n\n //Parameterized Queries with Jena\n //see: https://jena.apache.org/documentation/query/parameterized-sparql-strings.html\n ParameterizedSparqlString pss = new ParameterizedSparqlString();\n pss.setCommandText(sparqlQueryString);\n\n //build the prefix for source and target before run the query\n\n String inputURIMetadata = Dictionary.AVAILABLE_ONTOLOGIES_HASH.get(myJob.getInputFormat());\n String outputURIMetadata = Dictionary.AVAILABLE_ONTOLOGIES_HASH.get(myJob.getOutputFormat());\n\n //Node file = NodeFactory.createURI(inputURIMetadata+ myJob.getSourceFile());\n //Node object = NodeFactory.createURI(inputURIMetadata+ myJob.getSourceOjbect());\n\n //set parameters for the query\n //pss.setParam(\"fileName\",file);\n //pss.setParam(\"object\",object);\n pss.setNsPrefix(\"metadataSource\", inputURIMetadata);\n pss.setNsPrefix(\"metadataTarget\", outputURIMetadata);\n\n //Prints query after parameter set up\n System.out.println(\"\\n\"+pss.toString());\n\n Query query = pss.asQuery();\n\n QueryExecution qexec = QueryExecutionFactory.create(query, model);\n ResultSetRewindable results = ResultSetFactory.makeRewindable(qexec.execSelect());\n\n if(results.hasNext()){\n List<HashMap<String,String>> resultsObject = new ArrayList<>();\n while (results.hasNext()){\n QuerySolution q = results.next();\n HashMap<String,String> rowMap = new HashMap<>();\n for(String attribute : results.getResultVars()){\n RDFNode obj = q.get(attribute);\n String value = obj.toString();\n rowMap.put(attribute,value);\n }\n System.out.println(rowMap);\n resultsObject.add(rowMap);\n }\n qexec.close() ;\n return resultsObject;\n }else{\n throw new Exception(\"No results\");\n }\n }",
"Result getResult();",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\tLog.e(TAG,result);\t\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\tLog.e(TAG,result);\t\n\t\t\t\t}",
"public void writeTourResultsAllCarrier() {\n\t\tString fileName = this.outputFolder + \"total_tour_infos_per_vehicleType.csv\";\n\t\tFile file = new File(fileName);\n\n\t\ttry {\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(file));\n\t\t\tbw.write(fileName);\n\t\t\tbw.newLine();\n\t\t\tbw.write(\"____________________________________________________________________________\");\n\t\t\tbw.newLine();\n\n\t\t\tbw.write(\"personId; vehType Id;distance [m] ; distance [km] ;TravelTime [s]; TravelTime [h];\" +\n\t\t\t\t\t\"FuelConsumption[l]; Emission [t Co2]; FuelConsumptionRate[l/100m]; \" +\n\t\t\t\t\t\"EmissionRate [g/m]; \");\n\t\t\tbw.newLine();\n\n\n\n\t\t\t//\t\t\tKT:\n\t\t\tMap<Id<Person>, Double> personId2tourDistance = this.handler.getPersonId2TourDistances();\n\t\t\tMap<Id<Person>, Double> personId2tourTravelTimes = this.handler.getPersonId2TravelTimes();\n\n\t\t\tMap<Id<VehicleType>, VehicleTypeSpezificCapabilities> vehTypId2Capabilities = new TreeMap<Id<VehicleType>, VehicleTypeSpezificCapabilities>();\n\n\t\t\tCarrierVehicleTypes vehicleTypes = this.handler.getVehicleTypes();\n\n\t\t\t//preparation:\n\t\t\tfor (Id<VehicleType> vehicleTypeId : vehicleTypes.getVehicleTypes().keySet()){\n\t\t\t\tVehicleTypeSpezificCapabilities capabilities = this.handler.getVehTypId2Capabilities().get(vehicleTypeId);\n\t\t\t\tif (capabilities != null){\n\t\t\t\t\tvehTypId2Capabilities.put(vehicleTypeId, capabilities);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//write results:\n\t\t\tfor (Id<Person> personId :personId2tourDistance.keySet()) {\n\n\t\t\t\tDouble tourDistanceMeter = personId2tourDistance.get(personId);\n\t\t\t\tDouble tourTravelTimeSec = personId2tourTravelTimes.get(personId);\n\n\t\t\t\tId<VehicleType> vehTypeId = null;\n\n\t\t\t\tfor (Id<VehicleType> vehTypeIdsAvail : vehicleTypes.getVehicleTypes().keySet()) {\n\t\t\t\t\tif(personId.toString().contains(\"_\"+vehTypeIdsAvail.toString()+\"_\")){\n\t\t\t\t\t\tif (vehTypeIdsAvail.toString().endsWith(\"frozen\") == personId.toString().contains(\"frozen\")) {//only frozen\n\t\t\t\t\t\t\tvehTypeId = vehTypeIdsAvail;\n\t\t\t\t\t\t} else { //not \"frozen\"\n\t\t\t\t\t\t\tvehTypeId = vehTypeIdsAvail;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (vehTypeId == null) {\n\t\t\t\t\tlog.error(\"Vehicle type for person not defined: \" + personId);\n\t\t\t\t}\n\n\t\t\t\tdouble fuelConsuptionRate = (vehTypId2Capabilities.get(vehTypeId)).getFuelConsumtion()*1000; // Usually in l/100km\n\t\t\t\tdouble emissionsRatePerMeter = vehTypId2Capabilities.get(vehTypeId).getEmissionsPerMeter(); \n\n\t\t\t\tbw.write(personId + \";\" +\n\t\t\t\t\t\tvehTypeId + \";\" +\n\t\t\t\t\t\ttourDistanceMeter + \";\" + \n\t\t\t\t\t\ttourDistanceMeter/1000 + \";\" + //km\n\t\t\t\t\t\ttourTravelTimeSec + \";\" + \n\t\t\t\t\t\ttourTravelTimeSec/3600 + \";\" + \t//h\n\t\t\t\t\t\ttourDistanceMeter*fuelConsuptionRate/100/1000 + \";\" + // rate is in [liter/100km]\n\t\t\t\t\t\ttourDistanceMeter*emissionsRatePerMeter /1000000 +\";\" + \t// CO2-Ausstoss in t (= 1Mio g)\n\t\t\t\t\t\tfuelConsuptionRate+ \";\" + \n\t\t\t\t\t\temissionsRatePerMeter \n\t\t\t\t\t\t);\n\t\t\t\tbw.newLine();\n\n\t\t\t}\t\n\t\t\t\n\t\t\tlog.info(\"Output written to \" + fileName);\n\t\t\tbw.close();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void saveResult() {\n\t\ttry {\n\t\t\tPrintWriter out = new PrintWriter(new FileOutputStream(resultFile));\n\t\t\tout.println(record.resultToString());\n\t\t\tout.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void getAllResults()\n {\n for(String module: modules.keySet())\n {\n getResults(module);\n }\n }",
"public String getResult();",
"public String getResult();",
"public String getResult();",
"public InformationResultPanel(GenericResult result) {\n this();\n fieldsNotToDisplay.add(\"id\");\n fieldsNotToDisplay.add(\"the_geom\");\n this.tblResult.removeAll();\n DefaultTableModel tableModel = new DefaultTableModel();\n List<Integer> indexListToShow = new ArrayList<Integer>();\n\n //Add columns\n for (Integer fieldInd = 0; fieldInd < result.getFieldNames().size(); fieldInd++) {\n String fieldName = result.getFieldNames().get(fieldInd);\n if (fieldsNotToDisplay.contains(fieldName)) {\n continue;\n }\n tableModel.addColumn(fieldName);\n indexListToShow.add(fieldInd);\n }\n\n //Add values\n for (Object row : result.getValues()) {\n StringArray rowAsArray = (StringArray) row;\n String[] rowToAdd = new String[indexListToShow.size()];\n for (Integer fieldIndIndex = 0; \n fieldIndIndex < indexListToShow.size(); fieldIndIndex++) {\n rowToAdd[fieldIndIndex] = \n rowAsArray.getItem().get(indexListToShow.get(fieldIndIndex));\n }\n tableModel.addRow(rowToAdd);\n }\n this.tblResult.setModel(tableModel);\n }",
"ArrayList<Map<String,Object>> parseQueryResult(Object result) { return null;}",
"protected void outputResultData (FinalReport report)\n {\n trc.show (\"outputResultData\", \"output simulation results\");\n\n\tmodelReport = report;\n\tnew HandleReportDialog (this);\n\n }",
"private void writeAnalysisResults(Map<SillyBot, List<IntermediateResult>> analysisCallResults)\n\t\t\tthrows InterruptedException, ExecutionException {\n\t\tfor (SillyBot sillyBot : analysisCallResults.keySet()) {\n\t\t\tSystem.out.println(\"PRINT SILLY BOT ANALYZED RESULTS:\");\n\t\t\tfor (IntermediateResult botsAnalysisCall : analysisCallResults.get(sillyBot)) {\n\t\t\t\tProposal propsal;\n\t\t\t\tif (sillyBot instanceof PerformanceSillyBot) {\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tpropsal = new PerformanceProposal(getResponseValue(botsAnalysisCall.analysisResult),\n\t\t\t\t\t\t\tbotsAnalysisCall.name);\n\t\t\t\t\tSystem.out.println(\"For Model \" + botsAnalysisCall.name + \" metric is \"\n\t\t\t\t\t\t\t+ getResponseValue(botsAnalysisCall.analysisResult));\n\t\t\t\t} else if (sillyBot instanceof ModifiabilitySillyBot) {\n\t\t\t\t\tpropsal = new ModifiabilityProposal(getResponseValue(botsAnalysisCall.analysisResult),\n\t\t\t\t\t\t\tbotsAnalysisCall.name);\n\t\t\t\t\tSystem.out.println(\"For Model \" + botsAnalysisCall.name + \" metric is \"\n\t\t\t\t\t\t\t+ getResponseValue(botsAnalysisCall.analysisResult));\n\t\t\t\t} else {\n\t\t\t\t\tthrow new IllegalArgumentException(\"Unknown type of Silly Bot.\");\n\t\t\t\t}\n\n\t\t\t\tsillyBot.insertInOrder(propsal);\n\t\t\t}\n\t\t}\n\t}",
"public String getAllResults() {\n StringBuilder sb = new StringBuilder();\n for (Map.Entry<String, String> results : resultMap.entrySet()) {\n sb.append(results.getKey().toString() + \" : \" + results.getValue().toString() + \"\\n\");\n }\n return sb.toString();\n }",
"static void _cpmvMergeResult(Object result_, Vector vresult_)\r\n {\r\n if (result_ == null) return;\r\n if (result_ instanceof Component || result_ instanceof Port)\r\n vresult_.addElement(result_);\r\n else {\r\n Object[] tmp_ = (Object[])result_;\r\n for (int j=0; j<tmp_.length; j++) vresult_.addElement(tmp_[j]);\r\n }\r\n }",
"public void setResult(Object result) {\n this.result = result;\n }",
"public void addResult(Result result) {\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n dbb.addResult(result);\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"public void doResult() throws Exception {\n\t\tJSONObject map=new JSONObject(getResult());\n\t\tif(!\"ok\".equalsIgnoreCase(map.getString(\"status\"))){\n\t\t\tdoFailureResult();\n\t\t\treturn;\n\t\t}\n\t\tif(getHandler()!=null){\n\t\t\tMessage hmsg=getHandler().obtainMessage();\n\t\t\thmsg.obj=map;\n\t\t\thmsg.arg1=1;\n\t\t\tgetHandler().sendMessage(hmsg);\n\t\t\tsetHandler(null);\n\t\t}\n\t}",
"@Override\n public void processResult(ArrayList<Droplet> result) {\n Log.d(TAG, \"Finished executing droplet query.\");\n if (result != null) {\n int size = result.size();\n for (int i = 0; i < size; ++i) {\n adapter.add(result.get(i).getData());\n }\n }\n }",
"@Override\n public void begin() throws IOException {\n ps.write(\"{ \\\"results\\\": [\\n\");\n }",
"@Override\n\tpublic void onGetPoiResult(PoiResult result) {\n\t\tif (result == null\n\t\t\t\t|| result.error == SearchResult.ERRORNO.RESULT_NOT_FOUND) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tlist = result.getAllPoi();\n\t\t\tif (list != null && list.size() > 0) {\n\t\t\t\tMyLocationData locData = new MyLocationData.Builder()\n\t\t\t\t\t\t.direction(100).latitude(list.get(0).location.latitude)\n\t\t\t\t\t\t.longitude(list.get(0).location.longitude).build();\n\t\t\t\tbaiduMap.setMyLocationData(locData);\n\n\t\t\t\tfor (PoiInfo item : list) {\n\t\t\t\t\tSystem.out.println(\"item:::::::\" + item.name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void results() {\n\t\t// when the election is not closed,\n\t\ttry{\n\t\t\tMap<String,Integer> results = election.getResultsFromPolls();\n\t\t\t// when the election is closed,\n\n\t\t\tCollection<Integer> values = results.values();\n\t\t\tint totalVotes = 0;\n\n\t\t\tfor(Integer i:values){\n\t\t\t\ttotalVotes += i;\n\t\t\t}\n\t\t\tSystem.out.println(\"Current election results for all polling places.\");\n\t\t\tSystem.out.println(\"NAME PARTY VOTES %\");\n\t\t\tprintResultsHelper(results,totalVotes);\n\n\t\t}catch(UnsupportedOperationException uoe){\n\t\t\tSystem.out.println(\"The election is still open for votes.\");\n\t\t\tSystem.out.println(\"You must close the election before viewing results.\");\n\t\t}\n\t}",
"ArrayList<HashMap<String,Object>> processQueryResult(Object result,String collectionName) {\n ArrayList<Map<String,Object>> rawRows = parseQueryResult(result);\n if (rawRows == null || rawRows.size()==0) return null;\n ArrayList<HashMap<String,Object>> resultRows = new ArrayList<>();\n for (Map<String,Object> rawRow: rawRows) {\n HashMap<String,Object> resultRow = processQueryResultRow(rawRow,collectionName);\n if (resultRow.size()>0) resultRows.add(resultRow);\n }\n return resultRows;\n }",
"public void add(ProcessingResult<T> result) {\n failures.addAll(result.getFailures());\n successes.addAll(result.getSuccesses());\n }",
"void ComputeResult(Object result);",
"public void postResult(int result, int index) {\n for (int i = 0; i < table.length; i++) {\n if (table[i] != null && table[i].isBusy()) {\n if (table[i].getQj() != null && table[i].getQj() == index) {\n InstructionBase instructionBase = table[i].getInstruction();\n ReservationStationEntry reservationStationEntry = new ReservationStationEntry(instructionBase, null, false);\n reservationStationEntry.setVj(result);\n table[i] = reservationStationEntry;\n }\n\n }\n }\n\n //LOGGER.info(\"after set result reorderBufferEntry index #\"+index+\" qj \"+reservationStationEntry.getQj()+\" vj \"+reservationStationEntry.getVj());\n }",
"public void onSuccess(Object result) {\n\t\t\tSystem.err.println(\"showing results...\");\n\t\t\t//refgview.getNavPanel().getBrowseView().displayTargets((NodeDTO[])result);\n\n\t\t\trefgview.getSearchPanel().displaySearchTargets((NodeDTO[])result);\n\t\t}",
"Map<String, ?> getOutputData();",
"protected void returnData() {\n\t\t// go through queued messages\n\t\twhile (_messages.size() > 0) {\n\t\t\tKeyword kw =\n\t\t\t\tnew Keyword(\n\t\t\t\t\t\"mirrorKFkeyword: \" + _counter++ +\" \" + _messages.get(0),\n\t\t\t\t\tnew Context(),\n\t\t\t\t\tKeyword.NO_DELAY,\n\t\t\t\t\tnew Relevance());\n\t\t\t// add the keyword to the return container\n\t\t\ttry {\n\t\t\t\t_returnData.add(kw);\n\t\t\t} catch (GenericException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t_messages.remove(0);\n\t\t}\n\t}",
"@Override\n\tpublic void update(HashMap result) {\n\t\t// TODO Auto-generated method stub\n\t\tgetListJson(result);\n\t}",
"@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}",
"public String logResult(List<EvaluatedCandidate<NAryTree>> result) {\r\n\t\tStringBuilder str = new StringBuilder();\r\n\r\n\t\tfor (EvaluatedCandidate<NAryTree> cand : result) {\r\n\t\t\tNAryTree tree = cand.getCandidate();\r\n\r\n\t\t\tString detailedFitness = \"\";\r\n\t\t\tif (centralRegistry != null && centralRegistry.isFitnessKnown(tree)) {\r\n\t\t\t\tdetailedFitness = centralRegistry.getFitness(tree).toString();\r\n\t\t\t}\r\n\r\n\t\t\t//Log the fitnessValue tree detailedFitness\r\n\t\t\tstr.append(String.format(\"f: %2.10f %s %s \\r\\n\", cand.getFitness(),\r\n\t\t\t\t\tTreeUtils.toString(tree, centralRegistry.getEventClasses()), detailedFitness));\r\n\t\t}\r\n\r\n\t\treturn str.toString();\r\n\t}",
"private void setResult(String term){\n\t\taddResponseToResult(term);\n\t}",
"static void createResultHashMap(Set<String> fields, FetchValue.Response response,\n HashMap<String, ByteIterator>resultHashMap) {\n // If everything went fine, then a result must be given. Such an object is a hash table containing the (field,\n // value) pairs based on the requested fields. Note that in a read operation, ONLY ONE OBJECT IS RETRIEVED!\n // The following line retrieves the previously serialized table which was store with an insert transaction.\n byte[] responseFieldsAndValues = response.getValues().get(0).getValue().getValue();\n\n // Deserialize the stored response table.\n HashMap<String, ByteIterator> deserializedTable = new HashMap<>();\n deserializeTable(responseFieldsAndValues, deserializedTable);\n\n // If only specific fields are requested, then only these should be put in the result object!\n if (fields != null) {\n // Populate the HashMap to provide as result.\n for (Object field : fields.toArray()) {\n // Comparison between a requested field and the ones retrieved. If they're equal (i.e. the get() operation\n // DOES NOT return a null value), then proceed to store the pair in the resultHashMap.\n ByteIterator value = deserializedTable.get(field);\n\n if (value != null) {\n resultHashMap.put((String) field, value);\n }\n }\n } else {\n // If, instead, no field is specified, then all those retrieved must be provided as result.\n for (String field : deserializedTable.keySet()) {\n resultHashMap.put(field, deserializedTable.get(field));\n }\n }\n }",
"private void extractDataPackage() {\n ArrayList<Parcelable> arrayListBundle = new ArrayList<Parcelable>();\n arrayListBundle = getIntent().getParcelableArrayListExtra(\"usersList\");\n\n UserEntity userEntity;\n StringBuilder builder = new StringBuilder();\n\n for (Parcelable bundle : arrayListBundle) {\n\n //Tracking Data by UserEntity Object ;\n userEntity = (UserEntity) bundle;\n //Set StringBuilder Object ;\n builder.append(userEntity.getId() + \" : \" + userEntity.getUsername() + \" / \" + userEntity.getEmailAddress() + \" / \" + userEntity.getPhoneNumber() + \" / \" + userEntity.getJobTitle() + \"\\n\\n\");\n }\n extractedData = builder.toString();\n }",
"@Override\n public void onSuccess(ResultSet result) {\n }",
"private MrnWoatlas5[] doGet(Vector result) {\n if (dbg) System.out.println (\"vector size = \" + result.size());\n int latitudeCol = db.getColNumber(LATITUDE);\n int longitudeCol = db.getColNumber(LONGITUDE);\n int depthCol = db.getColNumber(DEPTH);\n int temperatureMinCol = db.getColNumber(TEMPERATURE_MIN);\n int temperatureMaxCol = db.getColNumber(TEMPERATURE_MAX);\n int salinityMinCol = db.getColNumber(SALINITY_MIN);\n int salinityMaxCol = db.getColNumber(SALINITY_MAX);\n int oxygenMinCol = db.getColNumber(OXYGEN_MIN);\n int oxygenMaxCol = db.getColNumber(OXYGEN_MAX);\n int nitrateMinCol = db.getColNumber(NITRATE_MIN);\n int nitrateMaxCol = db.getColNumber(NITRATE_MAX);\n int phosphateMinCol = db.getColNumber(PHOSPHATE_MIN);\n int phosphateMaxCol = db.getColNumber(PHOSPHATE_MAX);\n int silicateMinCol = db.getColNumber(SILICATE_MIN);\n int silicateMaxCol = db.getColNumber(SILICATE_MAX);\n int chlorophyllMinCol = db.getColNumber(CHLOROPHYLL_MIN);\n int chlorophyllMaxCol = db.getColNumber(CHLOROPHYLL_MAX);\n MrnWoatlas5[] cArray = new MrnWoatlas5[result.size()];\n for (int i = 0; i < result.size(); i++) {\n Vector row = (Vector) result.elementAt(i);\n cArray[i] = new MrnWoatlas5();\n if (latitudeCol != -1)\n cArray[i].setLatitude ((String) row.elementAt(latitudeCol));\n if (longitudeCol != -1)\n cArray[i].setLongitude ((String) row.elementAt(longitudeCol));\n if (depthCol != -1)\n cArray[i].setDepth ((String) row.elementAt(depthCol));\n if (temperatureMinCol != -1)\n cArray[i].setTemperatureMin((String) row.elementAt(temperatureMinCol));\n if (temperatureMaxCol != -1)\n cArray[i].setTemperatureMax((String) row.elementAt(temperatureMaxCol));\n if (salinityMinCol != -1)\n cArray[i].setSalinityMin ((String) row.elementAt(salinityMinCol));\n if (salinityMaxCol != -1)\n cArray[i].setSalinityMax ((String) row.elementAt(salinityMaxCol));\n if (oxygenMinCol != -1)\n cArray[i].setOxygenMin ((String) row.elementAt(oxygenMinCol));\n if (oxygenMaxCol != -1)\n cArray[i].setOxygenMax ((String) row.elementAt(oxygenMaxCol));\n if (nitrateMinCol != -1)\n cArray[i].setNitrateMin ((String) row.elementAt(nitrateMinCol));\n if (nitrateMaxCol != -1)\n cArray[i].setNitrateMax ((String) row.elementAt(nitrateMaxCol));\n if (phosphateMinCol != -1)\n cArray[i].setPhosphateMin ((String) row.elementAt(phosphateMinCol));\n if (phosphateMaxCol != -1)\n cArray[i].setPhosphateMax ((String) row.elementAt(phosphateMaxCol));\n if (silicateMinCol != -1)\n cArray[i].setSilicateMin ((String) row.elementAt(silicateMinCol));\n if (silicateMaxCol != -1)\n cArray[i].setSilicateMax ((String) row.elementAt(silicateMaxCol));\n if (chlorophyllMinCol != -1)\n cArray[i].setChlorophyllMin((String) row.elementAt(chlorophyllMinCol));\n if (chlorophyllMaxCol != -1)\n cArray[i].setChlorophyllMax((String) row.elementAt(chlorophyllMaxCol));\n } // for i\n return cArray;\n }",
"public void addAll(List<ContentValues> result) {\n for (ContentValues c : result) {\n add(c);\n }\n }",
"public void setResult(Result result) {\n this.result = result;\n }",
"public download.Map getResult() {\n return result;\n }",
"@Override\r\n\tpublic String toString() {\n\t\treturn result;\r\n\t}",
"public void generateRevisionOutput(RevisionResult resultAllAnalyzed);",
"private void readResultSet() throws IOException {\n\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t(new InputStreamReader(new FileInputStream(new File(\"./thrash/\" + fileName)), \"ISO-8859-1\")));\n\n\t\tString line = reader.readLine();\n\n\t\twhile (line != null) {\n\n\t\t\tString rate = line.split(\"rate=\")[1].trim();\n\t\t\tString label = line.split(\"[0-9]\\\\.[0-9]\")[0].trim();\n//\t\t\tString googleDescription = line.split(\"googleDescription=\")[1].split(\"score\")[0].trim();\n\t\t\tString score = line.split(\"score=\")[1].split(\"rate=\")[0].trim();\n\n\t\t\tSpatialObject obj = new SpatialObject(label, Double.parseDouble(rate), Double.parseDouble(score));\n//\t\t\tSystem.out.println(\"Label: \" + label);\n//\t\t\tSystem.out.println(\"Rate: \" + rate);\n//\t\t\tSystem.out.println(\"Score: \" + score);\n//\t\t\tSpatialObject idealObj = new SpatialObject(googleDescription, Double.parseDouble(rate), Double.parseDouble(rate));\n\t\t\tSpatialObject idealObj = new SpatialObject(label, Double.parseDouble(rate), Double.parseDouble(rate));\n\n\t\t\tresults.add(obj);\n\t\t\tidealResults.add(idealObj);\n\n\t\t\tline = reader.readLine();\n\t\t}\n\n\t\treader.close();\n\t}",
"private void setAllLocalResults() {\n TreeMap<FlworKey, List<FlworTuple>> keyValuePairs = mapExpressionsToOrderedPairs();\n // get only the values(ordered tuples) and save them in a list for next() calls\n keyValuePairs.forEach((key, valueList) -> valueList.forEach((value) -> _localTupleResults.add(value)));\n\n _child.close();\n if (_localTupleResults.size() == 0) {\n this._hasNext = false;\n } else {\n this._hasNext = true;\n }\n }",
"public Vector getResultObjects() {\n\treturn _vcResults;\n }",
"abstract protected void reportResult(Result result);",
"public Map<String, Object> getResultObject() {\n return resultObject;\n }",
"private void publishResults()\r\n\t{\n\t\tif (toBeOutputBranches.size() >= guiObject.getNumberOfBranchesFilter()) {\r\n\t\t\t\r\n\t\t\t//prints the default header each block gets\r\n\t\t\tmultiThreadingObj.myPublish(mainHeader);\r\n\t\t\t\r\n\t\t\t//prints out all of the branches (of a block) which passed the filters\r\n\t\t\tfor (Entry<String, String> branch : toBeOutputBranches.entrySet()) {\r\n\t\t\t\tString branchHeader = branch.getKey();\r\n\t\t\t\tString formattedBranch = branch.getValue();\r\n\t\t\t\tmultiThreadingObj.myPublish(branchHeader + formattedBranch);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//prints the upper state energies at the end of the block\r\n\t\t\tmultiThreadingObj.myPublish(energyVals);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void getResultat() {\n\t\tcalcul();\n\t}",
"public ExportResults()\n\t{\n\t\tthis.evalNaiveBayesList = new ArrayList<Evaluation>();\n\t\tthis.evalSMOList = new ArrayList<Evaluation>();\n\t}",
"protected void write_results(String output) {\r\n\t\t// File OutputFile = new File(output_train_name.substring(1,\r\n\t\t// output_train_name.length()-1));\r\n\t\ttry {\r\n\t\t\tFileWriter file_write = new FileWriter(output);\r\n\r\n\t\t\tfile_write.write(IS.getHeader());\r\n\r\n\t\t\t// now, print the normalized data\r\n\t\t\tfile_write.write(\"@data\\n\");\r\n\t\t\tfor (int i = 0; i < ndatos; i++) {\r\n\t\t\t\tif (!filtered[i]) {\r\n\t\t\t\t\tfile_write.write(X[i][0]);\r\n\t\t\t\t\tfor (int j = 1; j < nvariables; j++) {\r\n\t\t\t\t\t\tfile_write.write(\",\" + X[i][j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfile_write.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfile_write.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"IO exception = \" + e);\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"@Override\n public void onSuccess(Object result, List params) {\n }"
] |
[
"0.6571514",
"0.62311035",
"0.615651",
"0.6142556",
"0.6106652",
"0.60557586",
"0.6039538",
"0.5939473",
"0.58243436",
"0.5822356",
"0.5802186",
"0.5774369",
"0.57269996",
"0.57228696",
"0.56795764",
"0.564898",
"0.5625149",
"0.5617741",
"0.5612119",
"0.5601929",
"0.5601295",
"0.56008494",
"0.5591691",
"0.55902165",
"0.55781513",
"0.5572445",
"0.55709195",
"0.55690676",
"0.55420095",
"0.5535431",
"0.55319935",
"0.5529761",
"0.5526272",
"0.5520334",
"0.55115443",
"0.55108213",
"0.55063385",
"0.5505402",
"0.5504423",
"0.5501036",
"0.5496145",
"0.5493781",
"0.5485241",
"0.5485241",
"0.54822564",
"0.5479986",
"0.5479223",
"0.5465476",
"0.5465476",
"0.5465476",
"0.54608953",
"0.5460435",
"0.54543495",
"0.54514945",
"0.5443225",
"0.542262",
"0.54201674",
"0.541594",
"0.54140776",
"0.54075676",
"0.54052234",
"0.54026455",
"0.539486",
"0.5393779",
"0.5383758",
"0.5379481",
"0.5375549",
"0.5372973",
"0.5370192",
"0.53694254",
"0.5354513",
"0.53511524",
"0.5350141",
"0.53496546",
"0.5345841",
"0.5334123",
"0.53323805",
"0.5331756",
"0.5329113",
"0.53259254",
"0.53136283",
"0.5311649",
"0.530687",
"0.5306503",
"0.53040093",
"0.5303871",
"0.53030735",
"0.5298816",
"0.52986425",
"0.5285589",
"0.52853906",
"0.5282147",
"0.52802753",
"0.52802753",
"0.52802753",
"0.52802753",
"0.52802753",
"0.52802753",
"0.52802753",
"0.52802753",
"0.5278971"
] |
0.0
|
-1
|
return empty String[][] of the right dimension
|
private String[][] twoDArray(LinkedList<QuadTree> Linked) {
if (Linked.size() < 1) {
return new String[0][0];
} else if (Linked.size() == 1) {
return new String[1][1];
} else {
int rowCount, columnCount;
Set<Double> count = new HashSet<>();
for (QuadTree q : Linked) {
count.add(q.ullat);
}
rowCount = count.size();
columnCount = Linked.size() / rowCount;
return new String[rowCount][columnCount];
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String[][] get();",
"private String[][] initBoard() {\n String[][] tmp=new String[this.SIZE][this.SIZE];\n for (String[] ae:\n tmp) {\n Arrays.fill(ae, \" \");\n }\n return tmp;\n }",
"private String[][] createEmptyMatrix(int rows, int columns) {\r\n\t\tString[][] outputMatrix = new String[rows][columns];\r\n\t\tfor (int i = 0; i < rows; i++) {\r\n\t\t\tfor (int j = 0; j < columns; j++) {\r\n\t\t\t\toutputMatrix[i][j] = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn outputMatrix;\r\n\t}",
"public static String[][][] soRandom(){\n Random randomGen = new Random();\n \n //Generate the size of each of the array dimensions, ensuring they are no longer than 10\n int firstD = randomGen.nextInt(9);\n \n //Generate a random size for the first dimension of the array\n String [][][] multiD = new String[firstD][][];\n \n //For each of the arrays in the first dimension, there is a two dimension array of random length\n for(int i = 0; i < firstD; i++){\n int secondD = randomGen.nextInt(9);\n multiD[i] = new String[secondD][];\n //For each two dimensional array, there is a one dimensional array of random length\n for(int j = 0; j < secondD; j++){\n int thirdD = randomGen.nextInt(9);\n multiD[i][j] = new String[thirdD];\n }\n } \n return multiD;\n }",
"public static String[][][] soRandom() {\n Random r = new Random();\n int length = r.nextInt(10) + 1;\n //3D is length\n String[][][] array = new String[length][][];\n //array = new String[length][][];\n //System.out.println(length);\n \n //create 2D's with random length\n for (int i = 0; i < array.length; i++) {\n int length1 = r.nextInt(10) + 1;\n //System.out.println(length1);\n array[i] = new String[length1][];\n\n }\n //create 1D's with random length\n for (int i = 0; i < array.length; i++) {\n for (int j = 0; j < array[i].length; j++) {\n int length2 = r.nextInt(10) + 1;\n //System.out.println(length2);\n array[i][j] = new String[length2];\n\n }\n\n\n }\n\n //return empty randomized 3D array\n return array;\n\n }",
"public String[][] toStringArray() {\n\t\tString[][] solvedBoard=new String[dimension][dimension];\n\t\t\n\t\tfor (int i=0; i<dimension; i++) {\n\t\t\tfor (int j=0; j<dimension; j++) {\n\t\t\t\tsolvedBoard[i][j]=Character.toString(squares[i][j].getValue());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn solvedBoard;\n\t}",
"public String[][] arrayAusgabe(){\n\t\treturn spielfeld;\n\t}",
"String[][] getBoard();",
"public String[][] getContent() {\n\t\tString[][] result = new String[input.size()][getColumnCount()];\n\t\tfor (int i = 0; i < input.size(); i++) {\n\t\t\tfor (int j = 0; j < getColumnCount(); j++) {\n\t\t\t\tresult[i][j] = input.get(i).get(j);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"String[][] packData();",
"public String[][] fill_table()\n {\n int j=0;\n String[][] data = new String[0][];\n for (Map.Entry<String,Descriptor> entry :parms.getDescriptors().entrySet()) {\n\n data[j][0]=entry.getValue().getId();\n data[j][1]= String.valueOf(entry.getValue().getType());\n data[j][2]= String.valueOf(entry.getValue().getCapacity());\n data[j][3]= String.valueOf(entry.getValue().getState());\n data[j][4]= String.valueOf(entry.getValue().getNbRequest());\n data[j][5]= String.valueOf(entry.getValue().getRequest());\n data[j][6]= String.valueOf(entry.getValue().getRange());\n data[j][7]= String.valueOf(entry.getValue().getService());\n Point p=entry.getValue().getPosition();\n data[j][8]= String.valueOf(p.getX());\n data[j][9]= String.valueOf(p.getY());\n j++;\n }\n return data;\n }",
"public static String[][] createBoard() {\r\n final int ROW_LENGTH = 10;\r\n final int COL_LENGTH = 10;\r\n String[][] board = new String[ROW_LENGTH][COL_LENGTH];\r\n for (int r = 0; r < board.length; r++) {\r\n for (int c = 0; c < board[0].length; c++) {\r\n board[r][c] = \" * \";\r\n }\r\n }\r\n return board;\r\n }",
"public static String[][] createArr(int row, int col){\n String constant= \"asdfghjkls\";\n array = new String[row][col];\n\t for (int ctr1 = 0; ctr1 < array.length; ctr1 ++) {\n\t for (int ctr2 = 0; ctr2 < array[ctr1].length; ctr2 ++) {\n String entry = \"\";\n int stringCount;\n int a = 0;\n //random chooses if string is 3 or 4 characters\n\t\t if (Math.random() < 0.5){\n\t\t stringCount = 3;\n\t\t }\n\t\t else {\n\t\t stringCount = 4;\n\t\t }\n\t\twhile (a < stringCount){\n //strings created from String constant\n\t\t int i = (int)(Math.random()*constant.length());\n\t\t entry += constant.substring(i,i+1);\n\t\t a+=1;\n }\n\t\tarray[ctr1][ctr2] = entry;\n }\n}\n print( array);\n return array;\n }",
"private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }",
"@Override\n\tpublic String[][] generateArrayStringXML(String source, String destination) {\n\t\treturn null;\n\t}",
"public static String[][][] holoport(String[][][] original, String[][][] placeholder){\n int i, j, k = 0;\n \n if(original.length >= placeholder.length){\n for(i = 0; i < placeholder.length; i++){\n if(original[i].length >= placeholder[i].length){\n for(j = 0; j < placeholder[i].length; j++){\n if(original[i][j].length >= placeholder[i][j].length){\n for(k = 0; k < placeholder[i][j].length; k++){\n placeholder[i][j][k] = original[i][j][k];\n } \n }\n else{\n for(k = 0; k < original[i][j].length; k++){\n placeholder[i][j][k] = original[i][j][k];\n } \n for(k = original[i][j].length; k < placeholder[i][j].length; k++){\n placeholder[i][j][k] = \"$$$$$$\";\n }\n }\n }\n }\n else{\n for(j = 0; j < original[i].length; j++){\n placeholder[i][j] = original[i][j];\n }\n for(j = original[i].length; j < placeholder[i].length; j++){\n placeholder[i][j] = new String[0];\n } \n \n }\n }\n }\n else{\n for(i = 0; i < original.length; i++){\n placeholder[i] = original[i];\n }\n for(i = original.length; i < placeholder.length; i++){\n placeholder[i]= new String[0][0];\n } \n \n }\n return placeholder;\n }",
"public static String[][] getTableData(){\n int row=getRowCount();//jgets total number of non empty rows\n String TableData[][]=new String[row][6]; \n for(int i=0; i<row;i++){\n for(int j=0; j<6; j++){\n TableData[i][j]=(String)jTable1.getValueAt(i, j);\n }\n }\n return TableData; //returns table data\n }",
"private String[][] getDeckblattInhalt() {\r\n String tmpString[][] = new String[1][1];\r\n tmpString[0][0] = view.getDeckblattTextField().getText();\r\n\r\n return tmpString;\r\n }",
"public String[] infoToArray()//changed\r\n\t {\r\n\t\t if(this.size() == 0)\r\n\t\t {\r\n\t\t\t return new String[0];\r\n\t\t }\r\n\t\t String[] arr = new String[this.size()];\r\n\t\t int[] count = new int[1];\r\n\t\t count[0] = 0;\r\n\t\t return this.root.infoToArray(arr, count); \r\n\t }",
"@Override\n public int[][] getIntArray(String str) {\n return null;\n }",
"public static char[][] buildEmptyGraph(int maxX) {\n char[][] graph = new char[102][maxX];\n for (char[] row: graph) {\n Arrays.fill(row, ' ');\n }\n return graph;\n }",
"public abstract String[][] getTopWords();",
"public String[][] loadData(String fileName)\n{\n String[] rows = loadStrings(fileName);\n String[][] dataa = new String [24][7];\n int i = 0;\n for (String row : rows) \n {\n String[] columns = row.split(\",\");\n if (columns.length >= 7) \n {\n for (int j = 0; j < 7; j=j+1)\n {\n dataa [i][j]=columns[j];\n }\n i = i +1;\n }\n }\n return dataa;\n}",
"private String[][] getTableData (JTable table,int[] dim) {\n\t DefaultTableModel model = (DefaultTableModel) table.getModel();\n\t int rowNo = model.getRowCount(), colNo = model.getColumnCount();\n\t dim[0] = rowNo;\n\t dim[1] = colNo;\n\t logInfo(\"rowNo:\"+rowNo+\" colNo:\"+colNo);\n\t String[][] tableData = new String[rowNo][colNo];\n\t for (int i = 0 ; i < rowNo ; i++) {\n\t for (int j = 0 ; j < colNo ; j++) {\n\t tableData[i][j] = model.getValueAt(i, j) != null ? model.getValueAt(i,j).toString() : \"\\\"\\\"\";\n\t logInfo(\"i:\"+i+\" j:\" + j + \" \" + tableData[i][j]);\n\t }\n\t }\n\t return tableData;\n\t}",
"public static String[][] a() {\n/* 178 */ return p;\n/* */ }",
"public String[] getStringArray();",
"protected String[][] factors() { return null; }",
"public static final String[][] NORMALISE_ARRAY(final int length, String[][] ar){\n\t\tint width = 0;\n\t\t//get the length of the longest array, use that as width in normalization\n\t\tfor(int row=0; row<ar.length; row++){ //TODO not null safe\n\t\t\twidth = Math.max(width, ArrayUtils.getLength(ar[row]));\n\t\t}\n\t\tif(width==0){\n\t\t\twidth = 1;\n\t\t}\n\t\tString[][] ret = new String[length][width];\n\n\t\tfor(int row=0; row<ar.length; row++){ //not null safe\n\t\t\tif(ar[row]==null){\n\t\t\t\tfor(int i=0; i<width; i++){\n\t\t\t\t\tret[row][i] = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(ar[row].length==0){\n\t\t\t\tfor(int i=0; i<width; i++){\n\t\t\t\t\tret[row][i] = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int col=0; col<ar[row].length; col++){\n\t\t\t\t\tret[row][col] = ar[row][col];\n\t\t\t\t}\n\t\t\t\tif(ar[row].length<width){\n\t\t\t\t\tfor(int i=ar[row].length; i<width; i++){\n\t\t\t\t\t\tret[row][i] = \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"public String[][] getDoubleStrings() {\n int numPoints = getNumPoints();\n String[][] ret = new String[numPoints][dimensions];\n\n for (int i = 0; i < numPoints; i++) {\n double[] tempPoint = getPoint(i).getVector();\n\n for (int j = 0; j < tempPoint.length; j++) {\n ret[i][j] = Double.toString(tempPoint[j]);\n }\n }\n\n return ret;\n }",
"public native java.lang.String[][] __String2dArrayMethod( long __swiftObject, java.lang.String[][] arg );",
"private Object[] buildEmptyRow() {\n Object[] rowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() );\n\n return rowData;\n }",
"public String[] getStringArray() {\r\n\t\tString[] a = value.getStringArray();\r\n\t\tif (a == null)\r\n\t\t\treturn null;\r\n\t\tint n = a.length;\r\n\t\tString[] b = new String[n];\r\n\t\tfor (int i = 0; i < n; i++)\r\n\t\t\tb[i] = substitution(a[i]);\r\n\t\treturn (b);\r\n\t}",
"String[][] createGameBoard(int size) {\r\n\t\tString board[][] = new String[size][size];\r\n\t\t// Create a 3*3 board first\r\n\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\tfor (int j = 0; j < 3; j++) {\r\n\t\t\t\tboard[i][j] = \"@\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Board created successfully\");\r\n\t\treturn board;\r\n\r\n\t}",
"protected static String[][] growArray(String[][] base, String[] items) {\n if (base == null) {\n return new String[][] { items };\n } else {\n int length = base.length;\n String[][] grow = new String[length+1][];\n System.arraycopy(base, 0, grow, 0, length);\n grow[length] = items;\n return grow;\n }\n }",
"public static String [][] fileToStringArray(File file, int[] xLength, int []yLength, Boolean[] cantPlay){\n //this is where the array is created\n String [][] arr = new String [yLength[0]][xLength[0]];\n //we call this irrelevant because it felt fitting because what is in there beforehand is irrelevant as long\n //as it isnt [\n String board = \"irrelevant\";\n //this breaks a loop - which needs to also cause the file to not go through - edit this eventually!****\n \n //this is set to 2 because there are 3 characters per element in an array - which is a count of 2\n int f = 2;\n try{\n Scanner console = new Scanner((file));\n \n //this makes sure that the only thing that is scanned has to do with the game board and not the title\n \n while(board.charAt(0) != '['){\n //this will grab an entire row of the board, one row at a time\n board = console.next();\n }\n for(int i = 0; i<yLength[0]; i++){\n //if there are two points where there are two chracters in [ ] then the program is suppose to \n //send an error message to the user - WIP\n if(cantPlay[0] == true){\n break;\n }\n //to make the scanner move to the next row\n if(i>0){\n board = console.next();\n }\n for(int j = 0; j<xLength[0]; j++){\n arr[i][j] = \"\";\n // System.out.println(\"TU\");\n //System.out.println(\"f: \" +f);\n //this makes it so that if f is >2 then it will be greater then 3 if it has another\n //situation where there are two characters in [ ]\n f = f - 2;\n // we increment it by f+j*3 so that it goes through each character in each row\n while(board.charAt(f+((j*3))) != ']'){\n arr[i][j] += board.charAt(f+((j*3)));\n f++;\n \n }\n if(f>3){\n cantPlay[0] = true;\n }\n //this should always snag the ] that was missed in the while loop for each element of the array\n arr[i][j] += board.charAt(f+((j*3)));\n }\n }\n }catch(FileNotFoundException fnfe){\n System.exit(1);\n }\n return arr;\n }",
"protected static String[][] shrinkArray(String[][] base) {\n int length = base.length;\n if (length == 1) {\n return null;\n } else {\n String[][] shrink = new String[length-1][];\n System.arraycopy(base, 0, shrink, 0, length-1);\n return shrink;\n }\n }",
"public static String[][] map2array(Map<String, String> map) {\n if (map == null) return new String[2][0];\n int n = map.size();\n String[][] rt = new String[2][n];\n rt[0] = (String[]) map.keySet().toArray(new String[n]);\n rt[1] = (String[]) map.values().toArray(new String[n]);\n return rt;\n }",
"public String[][] getNames () ;",
"private Object[][] getTableData() {\n Object[][] lclArray = null;\n\n if (articles.size() == 0) {\n lclArray = new Object[1][NUM_COLS];\n lclArray[0][0] = \"\";\n lclArray[0][1] = \"\";\n lclArray[0][2] = \"\";\n return lclArray;\n } // no articles yet !!!!\n if (articles != null) {\n lclArray = new Object[articles.size()][NUM_COLS];\n }\n for (int i = 0; i < articles.size(); i++) {\n NewsArticle article = (NewsArticle) articles.elementAt(i);\n\n lclArray[i][0] = article.getSubject();\n lclArray[i][1] = String.valueOf(article.getScore(filterType));\n lclArray[i][2] = article.getUserRating();\n }\n return lclArray;\n }",
"@Test\n public void stringToNestedArrayTest(){\n \tString[][] testArr = sa.stringToNestedArray(sample);\n \t\n \t//Check the length of the array\n assertTrue(sa.stringToNestedArray(sample).length == 3);\n \n // Check the length of each nested array\n for (String[] arr:sa.stringToNestedArray(sample)) {\n \tassertTrue(arr.length == 3);\n }\n \n //Confirm the presence of the word in the nested array\n assertTrue(Arrays.asList(testArr[1]).contains(\"triangle\"));\n // CAN DO USEING JUST LISTS/ARRAYLIST!!!, DONT NEED TO CONVERT TO LIST\n }",
"private Function1<Seq<String>, String[]> arrayFunction() {\n return new AbstractFunction1<Seq<String>, String[]>() {\n @Override\n public String[] apply(Seq<String> v1) {\n String[] array = new String[v1.size()];\n v1.copyToArray(array);\n return array;\n }\n };\n }",
"public String[][] getParameterInfo() {\n/* 409 */ return (String[][])null;\n/* */ }",
"public static String[][] getData(){\n\t\t\tint rowCount, colCount;\n\t\t\trowCount=xlsFile.getRowCount(testName);\n\t\t\tcolCount=xlsFile.getColCount(testName);\n\t\t\t\n\t\t\ttabArray=new String[rowCount-1][colCount];\n\t\t\t\n\t\t\tnewRowIndex=0;\n\t\t\tfor(int cellRow=1;cellRow<rowCount;cellRow++)\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tif(xlsFile.readCell(testName,cellRow,0).equals(className))\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int cellColoumn=0;cellColoumn<colCount;cellColoumn++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\ttabArray[newRowIndex][cellColoumn]=xlsFile.readCell(testName,cellRow,cellColoumn);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnewRowIndex+=1;\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}\n\t\t\t\n\t\t//\tlogger.log(LogStatus.INFO, \"Excel Data Read Successfully\");\n\t\t\t\n\t\t\t\n\t\tString[][] newTabArray=new String[newRowIndex][colCount];\n\t\t\n\t\tfor(int cellRow=0;cellRow<newRowIndex;cellRow++){\n\t\t\tfor(int cellColoumn=0;cellColoumn<colCount;cellColoumn++){\n\t\t\t\tnewTabArray[cellRow][cellColoumn]=tabArray[cellRow][cellColoumn];\t\n\t\t\t}\n\t\t}\n\t\t//logger.log(LogStatus.INFO, \"Returing 2 dimentional data for \"+className);\n\t\treturn (newTabArray);\n\t\t}",
"public MultiArrayDimension() {\n\t\tthis(\"\", 0, 0);\n\t}",
"public String[][] clearBoard(String[][] board) {\r\n // Clear the board.\r\n for(int i = 0; i < MAX_LENGTH; i++) {\r\n for(int j = 0; j < MAX_LENGTH; j++) {\r\n board[i][j] = \"\";\r\n }\r\n }\r\n return board;\r\n }",
"private String[] toArray(String str) { String arr[] = new String[1]; arr[0] = str; return arr; }",
"private static String[][] parseStringArray(DynamicArray<String> matrix) {\n if (matrix.get(0).toLowerCase().equals(\"directed\")) {\n matrix.delete(0);\n directed = true;\n } else {\n directed = false;\n }\n String[][] adjacencyMatrix = new String[matrix.getSize()][matrix.getSize()];\n for (int i = 0; i < matrix.getSize(); i++) {\n String[] parsedString = matrix.get(i).split(\"\\\\s+\");\n for (int j = 0; j < parsedString.length; j++) {\n adjacencyMatrix[i][j] = parsedString[j];\n }\n }\n return adjacencyMatrix;\n }",
"private void createArray()\r\n\t{\r\n\t\tscorers = new String[NUMBER_OF_ENTRIES];\r\n\t\tfor(int i = 0; i < NUMBER_OF_ENTRIES; i += 2)\r\n\t\t{\r\n\t\t\tscorers[i] = \"[NULL]\";\r\n\t\t\tscorers[i + 1] = String.valueOf(-1);\r\n\t\t}\r\n\t}",
"private static String[] getNewArray(HashMap listas){\n ArrayList<String> result = new ArrayList<String>();\n for (int i = 0; i< listas.size(); i++ ){\n String key = \"L\" + i;\n ArrayList<String> itemsList = (ArrayList<String>) listas.get(key);\n result.addAll(itemsList);\n }\n return result.toArray(new String[0]);\n }",
"public String[][] getPairForTest() {\n String[][] ret = new String[allPairs.size()][2];\n\n for (int i = 0; i < allPairs.size(); i++) {\n ret[i][0] = allPairs.get(i).getFirst();\n ret[i][1] = allPairs.get(i).getSecond();\n }\n\n return ret;\n }",
"protected ArrayList<ArrayList<String>> method2() {\n ArrayList<ArrayList<String>> arr = new ArrayList<ArrayList<String>>();\n ArrayList<String> n_clone = new ArrayList<>(Arrays.asList(input));\n\n int whole = Math.floorDiv(input.length,this.num);\n int rem = input.length - whole*this.num; // 'rem' can be interpreted as number of exceptions\n // where each exception gets an extra item\n\n // Create equal number of containers as requested\n for (int i=0;i<this.num;i++) {\n arr.add(new ArrayList<String>());\n }\n\n // Iterate through given Array while putting items into containers\n Iterator itor = n_clone.iterator();\n int count = 0;\n while (itor.hasNext()) {\n for (int i = 0; i < whole; i++) {\n if (itor.hasNext()) {\n arr.get(count).add((String)itor.next());\n } else {\n break;\n }\n }\n if (rem != 0 && itor.hasNext()) {\n arr.get(count).add((String)itor.next());\n rem--;\n }\n count++;\n }\n\n printMatrix(arr);\n\n return arr;\n }",
"public static String[][] createPattern()\n {\n //the game is more like a table of 6 columns and 6 rows\n\t\n\t//we're going to have to make a 2D array of 7 rows \n\n String[][] f = new String[7][15];\n\n //Time to loop over each row from up to down\n\n for (int i = 0; i < f.length; i++)\n { \n for (int j = 0; j < f[i].length; j++)\n {\n if (j % 2 == 0) f[i][j] =\"|\";\n\n else f[i][j] = \" \";\n \n if (i==6) f[i][j]= \"-\";\n } \n }\n return f;\n }",
"public char[][] initializeBoard(char[][] grid){\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n grid[row][col] = ' ';\n }\n }\n return grid;\n }",
"private static String[][] getDataForGrid(CWaypoint[] wayPoints) {\r\n\t\tString data[][] = new String[wayPoints.length][1];\r\n\t\tfor (int i = 0; i < data.length; i++) {\r\n\t\t\tdata[i][0] = wayPoints[i].getTime().toString();\r\n\t\t}\r\n\t\treturn data;\r\n\t}",
"public String toString(){\n StringBuffer returnString = new StringBuffer();\n for(int i = 0; i < this.matrixSize; i++){\n if(rows[i].length() != 0){\n returnString.append((i+1) + \":\" + rows[i]+ \"\\n\");\n }\n }\n return returnString.toString();\n }",
"public String[][] getData(String stmt, int numOfFields) {\n String[][] result = new String[0][];\n try {\n Statement stmnt = connection.createStatement();\n result = new String[100][100];\n ResultSet rs = stmnt.executeQuery(stmt);\n int row = 0;\n while (rs.next()) {\n for (int i = 1; i <= numOfFields; i++) {\n\n result[row][i - 1] = rs.getString(i);\n\n } //for\n row++;\n } //while\n } //try\n catch (SQLException sqlex) {\n System.out.println(sqlex.getMessage());\n } //catch\n return result;\n }",
"protected ArrayList<ArrayList<String>> method1() {\n\n ArrayList<ArrayList<String>> arr = new ArrayList<ArrayList<String>>();\n ArrayList<String> n_clone = new ArrayList<>(Arrays.asList(input));\n\n // Create equal amount of containers as requested.\n for (int i=0;i<num;i++) {\n arr.add(new ArrayList<String>());\n }\n\n // Iterate through given Array while putting items\n // into the containers you just created.\n Iterator itor = n_clone.iterator();\n int count = 0;\n while (itor.hasNext()) {\n if (count < this.num) {\n arr.get(count).add((String)itor.next());\n count++;\n } else {\n count = 0;\n }\n }\n\n System.out.println(\"Paying no attention to order, the Array - \");\n printArrayList(new ArrayList<>(Arrays.asList(input)));\n System.out.println(\"divided into \" + this.num + \" sections is: \\n\");\n printMatrix(arr);\n\n return arr;\n }",
"public String[][] datosEstiloViaje()\n {\n ResultSet sql; \n try {\n Connection con = conexion.abrirConexion();\n Statement s = con.createStatement();\n sql = s.executeQuery(\"SELECT `idEstiloViaje`, `tipo` FROM `estiloviaje` ;\");\n //número de registros obrenidos\n int count = 0;\n while (sql.next()) {\n ++count;\n }\n //declaración del array\n String [][] a = new String [count][2];\n //se regresa al primero\n sql.beforeFirst();\n //contador para copiar del resultset al array\n int i = 0;\n //copiar del resultset al array\n while (sql.next())\n {\n a[i][0] = sql.getString(1);\n a[i][1] = sql.getString(2);\n i++;\n } \n conexion.cerrarConexion(con);\n return a;\n }\n catch (SQLException ex)\n {\n return null;\n }\n catch(NullPointerException e){\n JOptionPane.showMessageDialog(null, \"Error al intentar conectar con el servidor.\");\n return null;\n }\n }",
"public static String[][] generateBoard(String puzzle) {\n //1 2 3 8 B 4 7 6 5\n String puzzleString = puzzle.replaceAll(\"\\\\s+\", \"\");\n String[][] puzzleBoard = new String[3][3];\n for (int i = 0; i < puzzleString.length(); i++) {\n char c = puzzleString.charAt(i);\n\n if (i < 3) {\n puzzleBoard[0][i] = String.valueOf(c);\n } else if (i > 2 && i < 6) {\n puzzleBoard[1][i - 3] = String.valueOf(c);\n } else {\n puzzleBoard[2][i - 6] = String.valueOf(c);\n }\n }\n\n return puzzleBoard;\n\n\n }",
"private int[][] listEmptyCells() {\n int nbEmpty = 0;\n int[][] emptyCells;\n int k = 0;\n\n for (int i = 0; i < sb.size; i++) {\n for (int j = 0; j < sb.size; j++) {\n if (sb.get(i, j) == 0)\n nbEmpty++;\n }\n }\n emptyCells = new int[nbEmpty][2];\n\n for (int i = 0; i < sb.size; i++) {\n for (int j = 0; j < sb.size; j++) {\n if (sb.get(i, j) == 0) {\n emptyCells[k][0] = i;\n emptyCells[k][1] = j;\n k++;\n }\n }\n }\n return emptyCells;\n }",
"private String[] convertList(String[][] l){\n String[] list = new String[l.length];\n for(int i =0; i<list.length;i++){\n String input = l[i][1];\n System.out.println(input);\n list[i] = input;\n }\n \n return list;\n }",
"private String[][] generate(DefaultListModel<String> wordListModel) {\r\n\t\tString[][] level = new String[6][6];\r\n\t\t\r\n\t\tfor(int x = 0; x < 6; x++){\r\n\t\t\tfor(int y = 0; y < 6; y++){\r\n\t\t\t\tif(m.getBoard().tiles[x][y].isEnabled()){\r\n\t\t\t\t\tlevel[x][y] = \"_\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlevel[x][y] = \"!\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\ttry {\r\n\t\t\tString[][] levelAdded = level;\r\n\t\t\tfor(Object word : wordListModel.toArray()){\r\n\t\t\t\tString word1 = (String) word;\r\n\t\t\t\tword1 = word1.toUpperCase();\r\n\t\t\t\tif (word1.contains(\"QU\")) {\r\n\t\t\t\t\tword1 = word1.replaceAll(\"QU\", \"Q\");\r\n\t\t\t\t}\r\n\t\t\t\tlevelAdded = addWord(levelAdded, word1);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Letter could not be placed around other tile\");\r\n\t\t\tJOptionPane.showMessageDialog(builder, \"Not all of your words could be added to the board. \\nPlease shorten your word list and/or its words to make room.\");\r\n\t\t}\r\n\t\tfor (int x = 0; x < 6; x++) { \r\n\t\t\tfor (int y = 0; y < 6; y++) {\r\n\t\t\t\tif (level[x][y] == \"_\") {\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\t\r\n\t\treturn level;\r\n\t}",
"String[] getDimensionNames();",
"public static final String[][] FLIP_ARRAY(String[][] ar){\n\t\tif(ar==null){\n\t\t\treturn null;\n\t\t}\n\t\tString[][] ret=new String[ar[0].length][ar.length];\n\n\t\tfor(int i=0; i<ar[0].length; i++){\n\t\t\tfor(int k=0; k<ar.length; k++){\n\t\t\t\tret[i][k] = ar[k][i];\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"public static MekString[] getStringConfig(){\n\t\tif (setOfStrings != null) return Arrays.copyOf(setOfStrings, setOfStrings.length);\n\t\telse return null;\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tint[] arr1D = {1,2,3};\n\t\t\n\t//\t2 dimensional array: array that contains multiple 1 dimensional arrays\n\t\t\n\t\tint[][] arr2D = { {1,2,3} , {4,5,6} };\n\t\t\n\t\t\n\t\tString[] arr = {\"A\" ,\"B\"};\n\t\t\n\t\t//\t\t\t\t\t\t 0 1 0 1 2\n\t\tString[][] str2D = { {\"A\" ,\"B\"} , {\"C\" ,\"D\",\"E\"} };\n\t\t//\t\t\t\t\t\t\t 0 1\n\t\t\n// [represents the index number of 1 dimensional arrays ][ represents the index number of the values]\n\t\t\n\t\t\t\t// print A:\n\t\t\t\tSystem.out.println( str2D[0][0] );\n\t\t\t\t\n\t\t\t\t// print D:\n\t\t\t\tSystem.out.println( str2D[1][1] );\n\t\t\t\t\n\t\t\t\t//print E:\n\t\t\t\tSystem.out.println(str2D[1][2]);\n\t\t\n\t\t\t\t// print [A ,B]:\n\t\t\t\tSystem.out.println( str2D[0] );\n\t\t\t\tSystem.out.println( Arrays.toString( str2D[0] ) );\n\t\t\t\t\n\t\t\t\t// print [C, D, E]:\n\t\t\t\tSystem.out.println( str2D[1] );\n\t\t\t\tSystem.out.println( Arrays.toString( str2D[1] ));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//print [[A,B], [C, D, E]]\n\t\t\t\tSystem.out.println( Arrays.toString(str2D) );\n\t\t\t\tSystem.out.println( Arrays.deepToString( str2D ) );\n\t\n\t\t\t// Arrays.deepToString(variableName ): converts multi-Dimensional Arrays to STring value\n\t\t\t\n\t\t\t\t\n\t\t\t// \t 0 1 0 1 0 1 \n\t\t\tint[][] Numbers2D = {\t{1,2} , {3, 4} , {5, 6, 7, 8, 9 , 10} };\n\t\t\t//\t\t\t\t\t 0 1 2\n\t\t\t\t\n\t\t\t\t// print 6:\n\t\t\tSystem.out.println( Numbers2D[2][1] );\n\t\t\t\n\t\t\t\t// print 10:\n\t\t\tSystem.out.println( Numbers2D[2][5] );\n\t\t\t\n\t\t\t\t// print {5, 6, 7, 8, 9 , 10}:\n\t\t\tSystem.out.println( Numbers2D[2] );\n\t\t\tSystem.out.println( Arrays.toString( Numbers2D[2] ) );\n\t\t\t\n\t\t\t\t// print the entire 2D array:\n\t\t\tSystem.out.println(Arrays.deepToString( Numbers2D ));\n\t\t\t\t\n\t\t\t\t\n\t\t// 3 dimensional array contains multiple 2 dimensional arrays\n\t\tint[][] Array2D = { {1,2}, {3,4} };\n\t\t//\t\t\t\t\t\t\t 0 1 0 1\n\t\tint[][][] Array3D = { { {1,2}, {3,4} } , { {5, 6}, {7, 8} } };\n// 0 1\t\n//[index numbers of 2D array][ index number of 1D array] [ index number of value]\n\n\t\t\t//print 8:\n\t\tSystem.out.println(Array3D[1][1][1]);\n\t\t\n\t\t// print {5, 6}:\n\t\tSystem.out.println( Array3D[1][0] );\n\t\tSystem.out.println( Arrays.toString( Array3D[1][0] ) );\n\t\t\n\t\t// print { {5, 6}, {7, 8} }:\n\t\tSystem.out.println( Array3D[1] );\n\t\tSystem.out.println( Arrays.toString( Array3D[1] ) );\n\t\tSystem.out.println( Arrays.deepToString( Array3D[1] ));\n\t\t\n\t\t\n\t\t// print the entire 3d array:\n\t\t\tSystem.out.println(Arrays.deepToString( Array3D ));\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\tint[][][] numbers3D = { { {1,2} } , { {3,4} } };\t\n\t\t\n\t\t\n\t\t\n\t//\t4 dimensional array contains multiple 3 dimensional arrays\n\tint[][][][] numbers4D = { { { {1,2} } , { {3,4} } } , { { {1,2} } , { {3,4} } } };\t\n\t\n\t\n\t\n\t\n\t\t\n\t}",
"private Board(int size)\n {\n array = new char[size][size];\n \n for (int i = 0; i < size; i++)\n for (int j = 0; j < size; j++)\n array[i][j] = EMPTY;\n }",
"private String getMatrixString(int[][] input)\n {\n // Building strings with the StringBuilder is much more efficient\n // then concatenating strings! \n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < input.length; i++)\n {\n for (int j = 0; j < input[i].length; j++)\n {\n sb.append(Integer.toString(input[i][j]) + \"\\t\");\n }\n sb.append(\"\\n\"); // append the linebreaker\n }\n\n // Finally, return the StringBuilder as a string\n return sb.toString();\n }",
"protected String[][] backup(String[][] temp) {\n\t\tString[][] dest = new String[10][10];\n\t\tfor(int i = 0; i < 10; i++) {\n\t\t\tfor(int j = 0; j < 10; j++) {\n\t\t\t\tdest[i][j] = temp[i][j];\n\t\t\t}\n\t\t}\n\t\treturn dest;\n\t}",
"public void makeSmartMatrix() {\n int colCount = findLongestWordLength();\n int rowCount = wordsArray.length + 2; //a row for each word and one for the summation word and a row for the carry over numbers\n smartMatrix = new String[rowCount][colCount];\n //fill the matrix\n for (int i = 0; i < rowCount; i++) {\n for (int j = 0; j < colCount; j++) {\n //do something\n if (i == 0) {\n //carry row\n smartMatrix[i][j] = \"Carry\" + Math.abs(colCount - 1 - j);\n } else if (i == rowCount - 1) {\n //summation row\n if (j < summationLetters.length) {\n smartMatrix[i][j] = summationLetters[j];\n } else {\n smartMatrix[i][j] = \"blank\";\n }\n } else {\n //words rows\n if (j < wordsArray[i - 1].length()) {\n smartMatrix[i][j] = wordsArray[i - 1].substring(j, j + 1);\n } else {\n smartMatrix[i][j] = \"blank\";\n }\n }\n }\n }\n \n for (int j = 0; j < findLongestWordLength(); j++) {\n for (int i = 1; i <= wordsArray.length; i++) {\n if (\"blank\".equals(smartMatrix[i][findLongestWordLength() - 1])) {\n lastToFirst(smartMatrix[i]);\n }\n }\n }\n System.out.println(Arrays.deepToString(smartMatrix));\n }",
"public static String[][] unwrapXml(String str){\n\t\tString[][] result=null;\n\t\t\n\t\ttry {\n\t\t\tDocument document = DocumentHelper.parseText(str);\n\t\t\tElement root = document.getRootElement();\n\n\t\t\tList nodes = root.elements();\n\t\t\t\n\t\t\tint row = root.nodeCount()+1; // number of rows in the table displayed (including field name)\n\t\t\t\t\t\t\t\t\t\t\t// nodeCount() only counts the number of direct children\n\t\t\tint col = 0;\n\t\t\tif(!nodes.isEmpty()){\n\t\t\t\tcol = ((Element)(nodes.get(0))).nodeCount(); \n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"row = \" + row);\n\t\t\t//System.out.println(\"column = \" + col);\n\t\t\t\n\t\t\t\n\t\t\tresult = new String[row][col]; // create the displayed table\n\t\t\t\n\t\t\t// insert field names\n\t\t\tfor(int i=0;i<col;i++){\n\t\t\t\tList elms = ((Element)(nodes.get(i))).elements();\n\t\t\t\tresult[0][i]=((Element)(elms.get(i))).getQualifiedName();\n\t\t\t\t//System.out.println(\"result[0][\"+i+\"] = \" + result[0][i]);\n\t\t\t}\n\t\t\t\n\t\t\t// insert values\n\t\t\tfor(int i=1;i<row;i++){ \n\t\t\t\tList elms = ((Element)(nodes.get(i-1))).elements();\n\t\t\t\t//System.out.println(\"elms in loop size = \"+elms.size());\n\t\t\t\tfor(int j=0;j<col;j++){ \n\t\t\t\t\tresult[i][j]= ((Element)(elms.get(j))).getText();\n\t\t\t\t\t//System.out.println(\"result[\"+i+\"][\"+j+\"] = \" + result[i][j]);\n\t\t\t\t}\t\n\t\t\t}\n\t\t} catch (DocumentException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn result;\n\t}",
"public static void main(String[] args)\n {\n String[][] stringArray = new String[10][10];\n for (int row = 0; row < stringArray.length; row++)\n {\n for (int i = 0; i < stringArray.length; i++)\n {\n stringArray[row][i] = \"Row \" + row + \" Item \" + i;\n }\n }\n for (int row = 0; row < stringArray.length; row++)\n {\n for (int i = 0; i < stringArray.length; i++)\n {\n System.out.println(stringArray[row][i]); \n }\n }\n\n }",
"public void reset_array() {\r\n\t\tfor(int i=0;i<9;i++) {\r\n\t\t\ts[i]=\"\";\r\n\t\t}\r\n\t}",
"public static String[][] getMapMatrix(HashMap<String, Tile> tiles) {\n\n Iterator<String> tileList = tiles.keySet().iterator();\n String[][] matrix = new String[tiles.keySet().size() + 1][tiles.keySet().size() + 1];\n\n // Initialize matrix\n int i = 1;\n matrix[0][0] = \"\";\n\n\n while (i <= tiles.keySet().size()) {\n if (tileList.hasNext()) {\n String tileName = tileList.next();\n matrix[i][0] = tileName;\n matrix[0][i] = tileName;\n i++;\n }\n }\n\n\n for (int j = 1; j <= tiles.keySet().size(); j++) {\n\n Tile t = tiles.get(matrix[j][0]);\n\n List<String> neighbours = t.getNeighbourTile();\n\n int k = 1;\n\n while (k <= tiles.keySet().size()) {\n\n if (neighbours.contains(matrix[0][k]))\n matrix[j][k] = \"Yes\";\n else\n matrix[j][k] = \"No \";\n\n k++;\n }\n }\n\n // Print matrix\n for (int j = 0; j <= tiles.keySet().size(); j++) {\n\n for (int k = 0; k <= tiles.keySet().size(); k++) {\n\n if (matrix[j][k].length() == 2)\n matrix[j][k] = matrix[j][k] + \" \";\n\n System.out.print(matrix[j][k] + \" \");\n }\n System.out.println();\n }\n\n return matrix;\n }",
"public int[][] createEmptyGrid() {\n int[][] emptyGrid = new int[9][9];\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n emptyGrid[row][col] = 0;\n }\n }\n return emptyGrid;\n }",
"public String getArrayValues(){\n String tempString = \"\";\r\n for(int y = 0; y < this.arraySize; y++){\r\n tempString += \" \"+this.arr[y]+\" \";\r\n }\r\n return tempString;\r\n }",
"private String[][] getCanvasLayoutMatrix() {\n\t\t\n\t\tint CANVAS_DIV_X = 25;\n\t\tint CANVAS_DIV_Y = 25;\n\n\t\tString[][] layout = new String[CANVAS_DIV_X][CANVAS_DIV_Y];\n\t\t\n\t\ttry(BufferedReader br = new BufferedReader(new FileReader(new ClassPathResource(\"./static/config/canvasLayout.txt\").getFile()))) {\n\t\t\tString line;\n\t\t\tint i=0,j;\n\t\t\twhile((line = br.readLine())!=null) {\n\t\t\t\tj=0;\n\t\t\t\tfor(char c : line.toCharArray()) {\n\t\t\t\t\tif(c!=' ') {\n\t\t\t\t\t\tlayout[i][j++]=c+\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn layout;\n\t}",
"public String[] list(){\n\t\t\n\t\tSet<String> t = contents.keySet();\n\t\tString s[] = t.toArray(new String[0]);\n\t\treturn s;\n\t}",
"public static String[][] getDimensions(String inputFile)\r\n\t{\n\t\t\t\tFile text = new File(inputFile);\r\n\t\t\t\tScanner rowColumn;\r\n\t\t\t\tString[][] dimensions = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\trowColumn = new Scanner(text);\r\n\t\t\t\t\tString row = rowColumn.next();\r\n\t\t\t\t\tString column = rowColumn.next();\r\n\t\t\t\t\tInteger row2 = Integer.parseInt(row);\r\n\t\t\t\t\tInteger column2 = Integer.parseInt(column);\t\t\r\n\t\t\t\t\tdimensions = new String[row2][column2];\r\n\t\t\t\t\trowColumn.close();\r\n\t\t\t\t} catch (FileNotFoundException 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\treturn dimensions;\r\n\t}",
"public problemThree(){\n for(int i=0;i<3;i++){\n for(int j=0;j<3;j++){\n gameBoard[i][j] = \"\";\n }\n }\n }",
"public String[][] getBoard() {\n ArrayList<Point<Integer,Integer>> bomb_positions = new ArrayList<>(this.NUMBOMBS);\n\n int size=0;\n while ( size < this.NUMBOMBS) {\n int x=(int)Math.floor(Math.random()*this.SIZE);\n int y=(int)Math.floor(Math.random()*this.SIZE);\n if (!bomb_positions.contains(new Point<>(x,y))) {\n bomb_positions.add(new Point<>(x,y));\n size++;\n }\n }\n // [ , , , ]\n // [ ,cnrXY, , ]\n // [ , ,Bomb, ]\n // [ , , , ]\n for (Point<Integer,Integer> bomb:\n bomb_positions) {\n int cornerX = bomb.getX()-1;\n int cornerY= bomb.getY()-1;\n for (int i = cornerX; i < cornerX+3 ; i++) {\n for (int j = cornerY; j < cornerY+3; j++) {\n if(i>=0 && i<SIZE && j>=0 && j< SIZE){\n if ((new Point<>(i,j)).equals(bomb)){\n board[i][j]=\"B\";\n }else {\n if (!board[i][j].equals(\"B\") && board[i][j].equals(\" \")){\n board[i][j] = \"1\";\n }else if (!board[i][j].equals(\"B\") && !board[i][j].equals(\" \")){\n int n = Integer.parseInt(board[i][j]);\n n=n+1;\n board[i][j] = String.valueOf(n);\n }\n }\n\n }\n }\n }\n }\n return board;\n }",
"protected static char[][] update_Board(){\n return null;\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 }",
"@Override\n public void buildGrid(){\n for(int column=0; column<columns; column++){\n for(int row=0; row<rows; row++){\n grid[column][row] = \"[ ]\";\n }\n }\n }",
"public String[] getStrings(){\n\t\tArrayList<String> s = new ArrayList<>();\n\t\tif (answertext0!=null && answertext0.isEmpty() == false)\n\t\t\ts.add(answertext0);\n\t\tif (answertext1!=null && answertext1.isEmpty() == false)\n\t\t\ts.add(answertext1);\n\t\tif (answertext2!=null && answertext2.isEmpty() == false)\n\t\t\ts.add(answertext2);\n\t\tif (answertext3!=null && answertext3.isEmpty() == false)\n\t\t\ts.add(answertext3);\n\t\tif (answertext4!=null && answertext4.isEmpty() == false)\n\t\t\ts.add(answertext4);\n\t\tif (answertext5!=null && answertext5.isEmpty() == false)\n\t\t\ts.add(answertext5);\n\t\tif (answertext6!=null && answertext6.isEmpty() == false)\n\t\t\ts.add(answertext6);\n\t\tif (answertext7!=null && answertext7.isEmpty() == false)\n\t\t\ts.add(answertext7);\n\t\tif (answertext8!=null && answertext8.isEmpty() == false)\n\t\t\ts.add(answertext8);\n\t\tif (answertext9!=null && answertext9.isEmpty() == false)\n\t\t\ts.add(answertext9);\n\t\treturn (String[]) s.toArray(new String[0]);\n\t}",
"Object[][] procurarCampo(String nomeCampo, String chave, String campoDescricao);",
"@Override\n\tpublic byte[][] Transform(String[] lines) {\n\n\t\tbyte[] all = ArrayUtils.toPrimitive(\n\t\t\t\tArrays.stream(lines)\n\t\t\t\t\t\t.filter(s->!s.isEmpty())\n\t\t\t\t\t\t.flatMap(l->l.chars().boxed())\n\t\t\t\t\t\t.map(ch->convertMap.getOrDefault(ch,(byte)NA))\n\t\t\t\t\t\t.toArray(Byte[]::new));\n\n\n\t\t//we want to work with the smallest primitive available to store 3 possible values.\n\t\tbyte[][] dim = new byte[3][];\n\t\tint start = 0;\n\n\t\tfor(int i=0 ; i < 3 ; ++i){\n\t\t\tdim[i] = Arrays.copyOfRange(all,start,start +LINE_LENGTH);\n\t\t\tstart += LINE_LENGTH;\n\t\t}\n\t\treturn dim;\n\t}",
"public String[][] rowData(){\n\t\t int n=(int) ((endeInterval-startInterval)/schritt);\n\t\t String[][] Data = new String[n+1][2];\n\t\t for(int i = 0;i<=n;i++){\n\t\t\t Data[i][0] = String.valueOf(startInterval + i*schritt);\n\t\t\t Data[i][1] = String.valueOf(Auswerten.plotter((startInterval + i*schritt),funcString));\n\t\t }\n\t\treturn Data ; \n\t }",
"public static void print(String[][][] god){\n for(int i = 0; i < god.length; i++){\n for(int j = 0; j < god[i].length; j++){\n for(int k = 0; k < god[i][j].length; k++){\n if(k == 0){\n System.out.print(\"[\" + god[i][j][k] + \",\");\n }\n if(k == (god[i][j].length - 1)){\n System.out.print(god[i][j][k] +\"]|\");\n }\n else{\n System.out.print(god[i][j][k] + \",\");\n }\n }\n }\n System.out.print(\"---\");\n }\n \n }",
"public Object[][] get2DArray();",
"@Override\n\tpublic int getContentNbDims() {\n\t\treturn 0;\n\t}",
"public static char[][] arrayStringAmatrizChar(String[] array) {\n\tchar[][] matriz = new char[array.length][];\n\tfor (int i = 0; i < array.length; i++) {\n\t matriz[i] = array[i].toCharArray();\n\t}\n\treturn matriz;\n }",
"public String[][] toSummaryArray(String[][] rawData){\n String[][] toReturn = new String[5][3];\n for(int i=0; i<5; i++){\n int min=100000;\n int max=0;\n int avg=0;\n for(int j=0; j<rawData[i].length; j++){\n min = Math.min(min, Integer.parseInt(rawData[i][j]));\n max = Math.max(max, Integer.parseInt(rawData[i][j]));\n avg = avg + Integer.parseInt(rawData[i][j]);\n }\n avg = avg/rawData[i].length;\n toReturn[i][0] = String.valueOf(min);\n toReturn[i][1] = String.valueOf(max);\n toReturn[i][2] = String.valueOf(avg);\n }\n return toReturn; \n }",
"public String[] camposDivididos(){\r\nString[] args=column().split(\"[,]\");\r\nreturn args;\r\n //return Arrays.toString(args);\r\n}",
"public String[] getArrayValue();",
"private String[] fixStringArray(String[] input) {\n\n List<String> loutput = new ArrayList<String>();\n\n for (String st : input) {\n if (!\"\".equalsIgnoreCase(st)) {\n loutput.add(st);\n }\n }\n String[] output = new String[loutput.size()];\n for (int i = 0; i < loutput.size(); i++) {\n output[i] = loutput.get(i);\n }\n return output;\n }",
"public static String[][] leerPrestados() {\n int cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //matriz para guardar los registros\n String[][] reporte = new String[cont][11];\n cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n //leolos registros y los guardo cada uno en un renglon de la matriz\n System.out.println(\"ResultSet: \" + result.getString(1));\n \n reporte[cont][0] = result.getString(1);\n reporte[cont][1] = result.getString(2);\n reporte[cont][2] = result.getString(3);\n reporte[cont][3] = result.getString(4);\n reporte[cont][4] = result.getString(5);\n reporte[cont][5] = result.getString(6);\n reporte[cont][6] = result.getString(7);\n reporte[cont][7] = result.getString(8);\n reporte[cont][8] = result.getString(9);\n reporte[cont][9] = result.getString(10);\n reporte[cont][10] = result.getString(11);\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //regreso reporte completo\n return reporte;\n }",
"public String[] getStrings(String mkey) {\n\t\tString last;\n\t\tint i = 0;\n\t\tArrayList<String> v = new ArrayList<>();\n\t\twhile (true) {\n\t\t\tlast = getString(mkey + i);\n\t\t\ti++;\n\t\t\tif (last == null)\n\t\t\t\tbreak;\n\t\t\tv.add(last);\n\t\t}\n\t\tif (v.size() != 0) {\n\t\t\tString[] str = new String[v.size()];\n\t\t\treturn v.toArray(str);\n\t\t} else {\n\t\t\treturn (String[]) getDefault(mkey);\n\t\t}\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\tif (size == 0) {\r\n\t\t\treturn \"[]\";\r\n\t\t}\r\n\r\n\t\tString s = \"[\";\r\n\r\n\t\tint currentRow = 0;\r\n\t\twhile (table[currentRow] == null) {\r\n\t\t\tcurrentRow++;\r\n\t\t}\r\n\r\n\t\ts += table[currentRow].toString();\r\n\t\ts += rowOfEntriesToString(table[currentRow].next);\r\n\r\n\t\tcurrentRow++;\r\n\r\n\t\twhile (currentRow < table.length) {\r\n\t\t\ts += rowOfEntriesToString(table[currentRow]);\r\n\t\t\tcurrentRow++;\r\n\t\t}\r\n\r\n\t\ts += \"]\";\r\n\t\treturn s;\r\n\t}",
"public static int[][] init() {\n int[][] arr={\n {0,1,0,1,0,0,0},\n {0,0,1,0,0,1,0},\n {1,0,0,1,0,1,0},\n {0,0,1,0,0,1,0},\n {0,0,1,1,0,1,0},\n {1,0,0,0,0,0,0}\n };\n return arr;\n }"
] |
[
"0.7051423",
"0.6943445",
"0.6861523",
"0.6650742",
"0.6627415",
"0.63698107",
"0.6316506",
"0.6312832",
"0.6252798",
"0.621575",
"0.6117029",
"0.6070945",
"0.6005029",
"0.5999908",
"0.59786993",
"0.59533453",
"0.5907379",
"0.5892663",
"0.5886107",
"0.5802534",
"0.5708447",
"0.5671074",
"0.5670675",
"0.5661763",
"0.56526494",
"0.5639553",
"0.5636175",
"0.55878156",
"0.55815184",
"0.5577203",
"0.5556866",
"0.5542454",
"0.5528097",
"0.55142814",
"0.5512832",
"0.5492236",
"0.5486283",
"0.5475443",
"0.54706573",
"0.5459492",
"0.54537964",
"0.5443469",
"0.5440341",
"0.54297507",
"0.5421892",
"0.5419615",
"0.5419329",
"0.5413553",
"0.5406093",
"0.5392454",
"0.5390476",
"0.5389516",
"0.53870803",
"0.5385667",
"0.5379962",
"0.5367292",
"0.5364847",
"0.5364421",
"0.5356039",
"0.53524464",
"0.5328281",
"0.53199214",
"0.53195333",
"0.53194743",
"0.5318526",
"0.5306234",
"0.5296356",
"0.5293122",
"0.5288901",
"0.5282756",
"0.5278005",
"0.52708954",
"0.5255326",
"0.5236568",
"0.5235281",
"0.5233981",
"0.5227014",
"0.5225222",
"0.5224708",
"0.52193075",
"0.52191275",
"0.52167517",
"0.5211752",
"0.52092075",
"0.5207646",
"0.5186786",
"0.51792365",
"0.51780105",
"0.5176133",
"0.5176131",
"0.51673985",
"0.51554275",
"0.5152375",
"0.51454735",
"0.51411664",
"0.513423",
"0.5121382",
"0.50952995",
"0.5094541",
"0.5075861"
] |
0.6596464
|
5
|
return a String[][] with the childrenNames with the file format
|
private String[][] childrenNames(LinkedList<QuadTree> Linked) {
LinkedList<Double> latName = new LinkedList<>();
Map<Double, LinkedList<String>> res = new HashMap<>();
for (QuadTree q : Linked) {
if (!res.containsKey(q.ullat)) {
res.put(q.ullat, new LinkedList<>());
latName.addLast(q.ullat);
}
res.get(q.ullat).addLast(q.name);
}
String[][] emptyTree = twoDArray(Linked);
for (int row = 0; row < emptyTree.length; row++) {
for (int col = 0; col < emptyTree[0].length; col++) {
emptyTree[row][col] = "img/" + res.get(latName.get(row)).get(col) + ".png";
}
}
return emptyTree;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String[] getTreeNames();",
"public String[] listChildren()\n/* */ {\n/* 519 */ int childCount = getChildCount();\n/* 520 */ String[] outgoing = new String[childCount];\n/* 521 */ for (int i = 0; i < childCount; i++) {\n/* 522 */ outgoing[i] = getChild(i).getName();\n/* */ }\n/* 524 */ return outgoing;\n/* */ }",
"@Override\n public String getFileList() {\n StringBuilder string = null;\n //if (parentFile.isDirectory()) {\n File parentFile = currentDir;\n string = new StringBuilder();\n for (File childFile : parentFile.listFiles()) {\n try {\n //TODO: Verify that Paths.get() is retrieving a valid path relative to the project's location.\n Path file = Paths.get(childFile.getPath());\n\n BasicFileAttributes attr = Files.readAttributes(file, BasicFileAttributes.class);\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"M\");\n String month = dateFormat.format(attr.creationTime().toMillis());\n dateFormat.applyPattern(\"d\");\n String dayOfMonth = dateFormat.format(attr.creationTime().toMillis());\n dateFormat.applyPattern(\"y\");\n String year = dateFormat.format(attr.creationTime().toMillis());\n\n char fileType = childFile.isDirectory() ? 'd' : '-'; //'-' represents a file.\n string.append(String.format(\"%srw-r--r--\", fileType)); //Linux style permissions\n string.append(\"\\t\");\n string.append(\"1\"); //?\n string.append(\" \");\n string.append(\"0\"); //?\n string.append(\"\\t\");\n string.append(\"0\"); //?\n string.append(\"\\t\");\n string.append(childFile.length()); //Length\n string.append(\" \");\n string.append(month); //Month\n string.append(\" \");\n string.append(dayOfMonth); //Day\n string.append(\" \");\n string.append(\" \");\n string.append(year); //Year\n string.append(\" \");\n string.append(childFile.getName());\n string.append(System.getProperty(\"line.separator\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n //}\n\n String format = \"%S\\t%d %d\\t%d\\t%d %S %d %d %S\";\n //return \"-rw-r--r-- 1 0 0 1073741824000 Feb 19 2016 1000GB.zip\";\n if (!string.equals(null)) {\n return string.toString();\n } else {\n return \"Error when creating file list.\";\n }\n }",
"private String[] getFileNames() {\n\t\tFile directory = new File(this.getClass().getClassLoader()\n\t\t\t\t.getResource(\"data\").getFile());\n\t\tList<String> fileNames = new ArrayList<String>();\n\n\t\tfor (File file : directory.listFiles())\n\t\t\tfileNames.add(file.getName());\n\n\t\treturn fileNames.toArray(new String[fileNames.size()]);\n\t}",
"protected String[] doListChildren()\n {\n return (String[])m_children.toArray( new String[ m_children.size() ] );\n }",
"public List<String> stringy() {\n\t\t\tList<String> temp = new ArrayList<>();\n\t\t\t// add all the file names\n\t\t\ttemp.addAll(getFileNames());\n\t\t\t// add all the directories [indicated by a \"-\"]\n\t\t\tfor (DirectoryObjects t : subdirectories) {\n\t\t\t\ttemp.add(t.name);\n\t\t\t}\n\n\t\t\treturn temp;\n\t\t}",
"java.lang.String getFileNames(int index);",
"java.lang.String getFileNames(int index);",
"public String[] getFileName();",
"public List<String> getChildNames() {\n\t\treturn _childNames;\n\t}",
"public String[] getListOfFileInArray() {\n String[] items = new String[this.listOfFile.size()];\n for(int x=0;x<this.listOfFile.size();x++) {\n items[x]=this.listOfFile.get(x).getName();\n }\n return items;\n }",
"public Object[] getParentInfo(String path);",
"private static List<String[]> process(String[] files) {\n String path = files[0];\n List<String[]> list = new ArrayList<String[]>();\n for (int i = 1, j = 0; i < files.length; i++) {\n String name = files[i];\n for (j = 0; j < name.length(); j++) {\n if (name.charAt(j) == '('){\n break;\n }\n }\n list.add(new String[]{path+\"/\"+name.substring(0, j), name.substring(j+1, name.length() - 1)});\n }\n \n return list;\n }",
"@Override public List<String> getSliceList() {\n\t\tList<String> names = new ArrayList<>();\n\t\tfor (File t : tiffs) names.add(t.toString());\n\t\treturn names;\n\t}",
"public MatrizGrafo arrayNames() throws IOException\n {\n // se lee el archivo \n flireReader = new FileReader (archivo);\n bufferedReader = new BufferedReader(flireReader);\n String fila;\n while((fila=bufferedReader.readLine())!=null)\n {\n // se van agregando al arreglo \n String[] arreglo;\n arreglo=fila.split(\" \");\n grafo.nuevoN(arreglo[0]);\n grafo.nuevoN(arreglo[1]);\n }\n // se regresa el grafo \n return grafo;\n }",
"public String[] getInfoFile(){\n String [] values = new String[4];\n values[0]= _file.getName(); //nombre\n values[1]= cities.size()+\"\";//ciudades\n values[2]= paths.length+\"\";\n return values;\n }",
"public File[] elements() {\n File plik = new File(katalog);\n katalog = plik.getAbsolutePath();\n if (katalog.endsWith(\".\")) {\n katalog = katalog.substring(0, katalog.length() - 1);\n }\n return plik.listFiles();\n }",
"private String[] getNomeArquivosCaixa(File ordem) throws IOException\n\t{\n\t\tCollection arquivos = new LinkedList();\n\t\tFileReader \t\tfReader \t= new FileReader(ordem);\n\t\tBufferedReader \tbuffReader \t= new BufferedReader(fReader);\n\t\tString patternNomArqCaixa = getPropriedade(\"ordemVoucher.patternArquivosCaixa\");\n\t\tString linha=null;\n\t\twhile ( (linha=buffReader.readLine()) != null )\n\t\t\t/* Verifica se o pattern dos nomes de arquivos foi encontrado */\n\t\t\tif (linha.indexOf(patternNomArqCaixa) > -1)\n\t\t\t{\n\t\t\t\t/* Faz o split da linha que contem diferentes campos separados por \",\"\n\t\t\t\t * Utiliza a classe abaixo devido a maquina da Tecnomen possuir\n\t\t\t\t * a versao 1.3 do Java\n\t\t\t\t */\n\t\t\t\t//String campos[] = linha.split(\",\");\n\t\t\t\tStringTokenizer strToken = new StringTokenizer(linha,\",\");\n\t\t\t\tString campos[] = new String[strToken.countTokens()];\n\t\t\t\tfor (int i=0; i < campos.length; i++)\n\t\t\t\t\tcampos[i] = strToken.nextToken();\n\n\t\t\t\t/* O primeiro campo e o nome do arquivo */\n\t\t\t\tarquivos.add(campos[0]);\n\t\t\t}\n\n\t\tbuffReader.close();\n\t\tfReader.close();\n\t\treturn (String[])arquivos.toArray(new String[0]);\n\t}",
"public String[] getChildList() {\n if (this.children == null) {\n return this.pointsByChild.keySet().toArray(new String[this.pointsByChild.size()]);\n } else {\n return this.children.clone();\n }\n }",
"public List<String> list(String path) throws IOException {\n Path destionationPath = new Path(path);\n\n List<String> childsList = new ArrayList<>();\n FileStatus[] childElements = hdfs.listStatus(destionationPath);\n Arrays.stream(childElements).forEach(child -> childsList.add(child.getPath().getName()));\n return childsList;\n }",
"public String[][] getNames () ;",
"java.util.List<java.lang.String>\n getFileNamesList();",
"@Override\n public List<String> getChildren(String path) {\n return null;\n }",
"public String[] infoToArray()//changed\r\n\t {\r\n\t\t if(this.size() == 0)\r\n\t\t {\r\n\t\t\t return new String[0];\r\n\t\t }\r\n\t\t String[] arr = new String[this.size()];\r\n\t\t int[] count = new int[1];\r\n\t\t count[0] = 0;\r\n\t\t return this.root.infoToArray(arr, count); \r\n\t }",
"java.util.List<java.lang.String>\n getFileNamesList();",
"public abstract String[] names() throws TrippiException;",
"public String[] getPictureNames() {\r\n\t\tif(!isReady) prepare();\r\n\t\tif(!isReady) {\r\n\t\t\tLog.e(TAG,\"The system was not ready. No external media\");\r\n\t\t\treturn new String[]{};\r\n\t\t}\r\n\t\tFile[] pictureFiles = directory.listFiles(new AlbumFileFilter());\r\n\t\tString[] pictureFileNames = new String[pictureFiles.length];\r\n\t\tfor(int a=0;a<pictureFiles.length;a++) {\r\n\t\t\tpictureFileNames[a] = pictureFiles[a].getName();\r\n\t\t}\r\n\t\treturn pictureFileNames;\r\n\t}",
"public String ls()\n\t{\n\t\tString toReturn = \"\";\n\t\tIterable<Position<FileElement>> kids = fileSystem.children(currentFileElement);\n\t\tif (kids == null) return \"Nothing to list\";\n\t\t{\n\t\t\tfor (Position<FileElement> fe : kids)\n\t\t\t{\n\t\t\t\ttoReturn += fe.toString() + \", \";\n\t\t\t}\n\t\t}\n\t\treturn toReturn;\n\t}",
"protected abstract String[] getFolderList() throws IOException;",
"static String[] getRepositoryNames(File rootDirFile) {\n\t\tFile[] dirList = rootDirFile.listFiles();\n\t\tif (dirList == null) {\n\t\t\t//throw new FileNotFoundException(\"Folder \" + rootDirFile + \" not found\");\n\t\t\treturn new String[0];\n\t\t}\n\t\tArrayList<String> list = new ArrayList<>(dirList.length);\n\t\tfor (File element : dirList) {\n\t\t\tif (!element.isDirectory() ||\n\t\t\t\tLocalFileSystem.isHiddenDirName(element.getName())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!NamingUtilities.isValidMangledName(element.getName())) {\n\t\t\t\tlog.warn(\"Ignoring repository directory with bad name: \" + element);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlist.add(NamingUtilities.demangle(element.getName()));\n\t\t}\n\t\tCollections.sort(list);\n\t\tString[] names = new String[list.size()];\n\t\treturn list.toArray(names);\n\t}",
"public String getChildren() {\n return children;\n }",
"public static String childrenNames(Element element){\n String concl = \"\";\n for (Element child : element.children()){\n concl += child.tagName();\n if (!child.className().equals(\"\")) concl += \":\" + child.className();\n concl += \" \";\n }\n return concl;\n }",
"public String[] listObjectNames(String path, boolean recursive);",
"public String getChildren() {\n\t\treturn children;\n\t}",
"String[] getMetadataNames();",
"protected static List<String> flatTree(List<ObjectInFolderContainer> tree) throws Exception {\n if (tree == null) {\n return null;\n }\n List<String> r = new LinkedList<>();\n for (ObjectInFolderContainer child : tree) {\n String name = getString(child.getObject().getObject(), PropertyIds.NAME);\n String elem = name;\n List<String> sub = flatTree(child.getChildren());\n if (sub != null) {\n elem += \"[\" + StringUtils.join(sub, \", \") + \"]\";\n }\n r.add(elem);\n }\n Collections.sort(r);\n return r.isEmpty() ? null : r;\n }",
"public XMLElement[] getChildren(String path)\n/* */ {\n/* 641 */ if (path.indexOf('/') != -1) {\n/* 642 */ return getChildrenRecursive(PApplet.split(path, '/'), 0);\n/* */ }\n/* */ \n/* */ \n/* 646 */ if (Character.isDigit(path.charAt(0))) {\n/* 647 */ return new XMLElement[] { getChild(Integer.parseInt(path)) };\n/* */ }\n/* 649 */ int childCount = getChildCount();\n/* 650 */ XMLElement[] matches = new XMLElement[childCount];\n/* 651 */ int matchCount = 0;\n/* 652 */ for (int i = 0; i < childCount; i++) {\n/* 653 */ XMLElement kid = getChild(i);\n/* 654 */ String kidName = kid.getName();\n/* 655 */ if ((kidName != null) && (kidName.equals(path))) {\n/* 656 */ matches[(matchCount++)] = kid;\n/* */ }\n/* */ }\n/* 659 */ return (XMLElement[])PApplet.subset(matches, 0, matchCount);\n/* */ }",
"public List<String> getListFilePath() throws AncestryException {\n\t\tList<String> listFormKey = new ArrayList<String>();\n\t\tConnection con = null;\n\t\tString sql = \"\";\n\t\ttry {\n\t\t\tsql = \"SELECT filepath FROM \" + management + \" WHERE step =4 GROUP BY filepath ORDER BY filepath\";\n\t\t\tcon = db.getConnectByProject(project);\n\t\t\tlistFormKey = JdbcHelper.queryToSingleList(con, sql , true);\n\t\t} catch (Exception e) {\n\t\t\tthrow new AncestryException(\"getListFilePath : \" + e.toString() ,e);\n\t\t}\n\t\tfinally {\n\t\t\tJdbcHelper.close(con);\n\t\t}\n\t\treturn listFormKey;\n\t}",
"protected abstract String[] getFrameNames();",
"public String[] getTrees(){\n LinkedList l = new LinkedList();\n for(TreeInfo t : TreeInfo.values()){\n l.add(t.getTreeType());\n }\n return Arrays.copyOf(l.toArray(), l.toArray().length, String[].class);\n }",
"public List<String> getChildren() {\n\t\treturn null;\n\t}",
"public static ArrayList<String> getReglesNoms() throws IOException{\n return ctrl_Persistencia.llistaFitxers(\"@../../Dades\",\"regles\");\n }",
"public String[] list() {\n String[] list = _file.list();\n if (list == null) {\n return null;\n }\n for (int i = list.length; i-- > 0; ) {\n if (new File(_file, list[i]).isDirectory() && !list[i].endsWith(\"/\")) {\n list[i] += \"/\";\n }\n }\n return list;\n }",
"public abstract Map<String, ? extends FilesystemEntry> getChildren();",
"private static String[] getSubCollectionNames (String subcolInfo) {\r\n List nameList = new LinkedList();\r\n int lastIndex = subcolInfo.lastIndexOf(\"</subcolName>\");\r\n int index = 0;\r\n while (index < lastIndex) {\r\n index = subcolInfo.indexOf(\"<subcolName>\", index);\r\n int endIndex = subcolInfo.indexOf(\"</subcolName>\", index);\r\n\r\n String name = subcolInfo.substring(index+12, endIndex).trim();\r\n nameList.add (name);\r\n index = endIndex;\r\n }\r\n return (String[]) nameList.toArray (new String[0]);\r\n }",
"public String[] GetAllFileNames() {\n \tFile dir = new File(fileStorageLocation.toString());\n \tString[] matchingFiles = dir.list(new FilenameFilter() {\n \t public boolean accept(File dir, String name) {\n \t return name.startsWith(\"1_\");\n \t }\n \t});\n \t\n \tfor (int i=0; i < matchingFiles.length; i++)\n \t{\n \t\tmatchingFiles[i] = matchingFiles[i].replaceFirst(\"1_\", \"\");\n \t}\n \t\n return matchingFiles;\n }",
"public static List<String> findLinkageNameInChildren(DebugInfoEntry die) {\n\t\tDWARFProgram prog = die.getCompilationUnit().getProgram();\n\t\tfor (DebugInfoEntry childDIE : die.getChildren(DWARFTag.DW_TAG_subprogram)) {\n\t\t\tDIEAggregate childDIEA = prog.getAggregate(childDIE);\n\t\t\tString linkage = childDIEA.getString(DWARFAttribute.DW_AT_linkage_name, null);\n\t\t\tif (linkage == null) {\n\t\t\t\tlinkage = childDIEA.getString(DWARFAttribute.DW_AT_MIPS_linkage_name, null);\n\t\t\t}\n\n\t\t\tif (linkage != null) {\n\t\t\t\tList<String> nestings = parseMangledNestings(linkage);\n\t\t\t\tif (!nestings.isEmpty()) {\n\t\t\t\t\tnestings.remove(nestings.size() - 1);\n\t\t\t\t\treturn nestings;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn Collections.EMPTY_LIST;\n\t}",
"public List<String> nomsFactures() {\n File folder = new File(\"factures/\");\n File[] listOfFiles = folder.listFiles();\n List<String> noms = new ArrayList<String>();\n\n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n noms.add(listOfFiles[i].getName());\n }\n }\n return noms;\n }",
"public String hierarchy();",
"public com.walgreens.rxit.ch.cda.PN[] getNameArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(NAME$8, targetList);\n com.walgreens.rxit.ch.cda.PN[] result = new com.walgreens.rxit.ch.cda.PN[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }",
"protected ClassTreeNode[] getChildNodesForPackageName(String packageName)\n {\n // Handle root package special\n if (packageName.length() == 0)\n return _rootChildren;\n\n // Get files\n WebFile[] nodeFiles = getFilesForPackageName(packageName);\n if (nodeFiles.length == 0)\n return EMPTY_NODE_ARRAY;\n\n // Iterate over files and Find child classes and packages for each\n List<ClassTreeNode> classTreeNodes = new ArrayList<>(nodeFiles[0].getFileCount());\n for (WebFile nodeFile : nodeFiles)\n findChildNodesForDirFile(nodeFile, classTreeNodes);\n\n // Return array\n return classTreeNodes.toArray(EMPTY_NODE_ARRAY);\n }",
"public String getNameChildren(int childPosition)\n {\n ExpandableListItems_Child tempChild = children.get(childPosition);\n return(tempChild.getName());\n }",
"public static String[] getSchemaList() {\n final File dataFile = new File(kMemoryPath);\n final File[] schemaFiles = dataFile.listFiles();\n String[] schemaNames = new String[schemaFiles.length];\n\n for (int i = 0; i < schemaNames.length; ++i) {\n schemaNames[i] = schemaFiles[i].getName();\n }\n\n return schemaNames;\n }",
"public static List<String> getProjectTreeRingDataFileNames(Project project)\n\t{\n\t\tList<String> resultList = new ArrayList<String>();\n\n\t\tList<MeasurementSeriesEntity> measurementList = project.getMeasurementSeriesEntities();\n\t\t// only series with external file ref's\n\t\tfor(MeasurementSeriesEntity measurementSeries : measurementList)\n\t\t{\n\t\t\t// check the genericFields\n\t\t\tTridasMeasurementSeries tridas = (TridasMeasurementSeries)measurementSeries.getTridasAsObject();\n\n\t\t\tif (tridas.isSetGenericFields())\n\t\t\t{\n\t\t\t\t// Ok we have potential candidates\n\t\t\t\tList<TridasGenericField> fields = tridas.getGenericFields();\n\t\t\t\tfor(TridasGenericField field : fields)\n\t\t\t\t{\n\t\t\t\t\tif (field.isSetValue() && field.isSetName() &&\n\t\t\t\t\t\tisTreeRingDataFileIndicator(field.getName()))\n\t\t\t\t\t{\n\t\t\t\t\t\tresultList.add(field.getValue());\n\t\t\t\t\t\tbreak; // only one, the first in this case!\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// also derived series\n\t\t// TODO refactor into two functions\n\t\tList<DerivedSeriesEntity> derivedList = project.getDerivedSeriesEntities();\n\t\t// only series with external file ref's\n\t\tfor(DerivedSeriesEntity derivedtSeries : derivedList)\n\t\t{\n\t\t\t// check the genericFields\n\t\t\tTridasDerivedSeries tridas = (TridasDerivedSeries)derivedtSeries.getTridasAsObject();\n\n\t\t\tif (tridas.isSetGenericFields())\n\t\t\t{\n\t\t\t\t// Ok we have potential candidates\n\t\t\t\tList<TridasGenericField> fields = tridas.getGenericFields();\n\t\t\t\tfor(TridasGenericField field : fields)\n\t\t\t\t{\n\t\t\t\t\tif (field.isSetValue() && field.isSetName() &&\n\t\t\t\t\t\tisTreeRingDataFileIndicator(field.getName()))\n\t\t\t\t\t{\n\t\t\t\t\t\tresultList.add(field.getValue());\n\t\t\t\t\t\tbreak; // only one, the first in this case!\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn resultList;\n\t}",
"List<File> getSystemDescriptionFiles();",
"public List getAllLogFileNames() {\n File folder = new File(path);\n File[] listOfFiles = folder.listFiles();\n List<String> fileList = new ArrayList<>();\n\n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n String fileName = listOfFiles[i].getName();\n if ((!fileName.contains(\".tar\")) && (!fileName.contains(\".zip\")) && (!fileName.contains(\".gz\")) && (!fileName.contains(\".lck\")))\n fileList.add(fileName);\n }\n }\n return fileList;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn level+\":\"+title + \":\"+refId+\"::\"+childElems;\n\t}",
"String[] getFileTypes();",
"public Files(){\n this.fileNameArray.add(\"bridge_1.txt\");\n this.fileNameArray.add(\"bridge_2.txt\");\n this.fileNameArray.add(\"bridge_3.txt\");\n this.fileNameArray.add(\"bridge_4.txt\");\n this.fileNameArray.add(\"bridge_5.txt\");\n this.fileNameArray.add(\"bridge_6.txt\");\n this.fileNameArray.add(\"bridge_7.txt\");\n this.fileNameArray.add(\"bridge_8.txt\");\n this.fileNameArray.add(\"bridge_9.txt\");\n this.fileNameArray.add(\"ladder_1.txt\");\n this.fileNameArray.add(\"ladder_2.txt\");\n this.fileNameArray.add(\"ladder_3.txt\");\n this.fileNameArray.add(\"ladder_4.txt\");\n this.fileNameArray.add(\"ladder_5.txt\");\n this.fileNameArray.add(\"ladder_6.txt\");\n this.fileNameArray.add(\"ladder_7.txt\");\n this.fileNameArray.add(\"ladder_8.txt\");\n this.fileNameArray.add(\"ladder_9.txt\");\n }",
"private ObservableList<TreeItem<Path>> buildChildren() {\r\n if (Files.isDirectory(getValue())) {\r\n try {\r\n\r\n return Files.list(getValue())\r\n .map(FileTreeItem::new)\r\n .collect(Collectors.toCollection(() -> FXCollections.observableArrayList()));\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n return FXCollections.emptyObservableList();\r\n } \r\n }\r\n\r\n return FXCollections.emptyObservableList();\r\n }",
"public String[] list() {\n\t\tSet<String> fileSet = fileList.keySet();\n\t\tString[] fileListArray = fileSet.toArray(new String[fileList.size()]);\n \treturn fileListArray;\n }",
"public List<IFile> getAllChildFiles() {\n return this.childFiles;\n }",
"Object[] getChildArray();",
"private String[] createNamesArray(){\n\t\t//TODO just test data\n\t\t/*\n\t\tfor(int i=0; i<20; i++){\n\t\t\tReplayData rd = new ReplayData(\"Game \" + i);\n\t\t\ttotalData.replays.add(rd);\n\t\t}*/\n\t\tString[] gameNames = new String[totalData.replays.size()];\n\t\tfor(int i =0; i<totalData.replays.size(); i++){\n\t\t\tgameNames[i] = totalData.replays.get(i).getName() + \" @ \" + totalData.replays.get(i).getDate();\n\t\t}\n\t\treturn gameNames;\n\t}",
"private File[] arrayDosArquivos() {\r\n\t\tFile file = new File(CAMINHO);\r\n\t\tfile.mkdirs();\r\n\t\treturn file.listFiles();\r\n\t}",
"public static String[] listFilesAsArray() {\n\t\t// Recursively find all .java files\n\t\tFile path = new File(Project.pathWorkspace());\n\t\tFilenameFilter filter = new FilenameFilter() {\n\n\t\t\tpublic boolean accept(File directory, String fileName) {\n\t\t\t\treturn fileName.endsWith(\".java\");\n\t\t\t}\n\t\t};\n\t\tCollection<File> files = listFiles(path, filter, true);\n\n\t\tArrayList<File> t = new ArrayList<File>(files);\n\t\tfor (int i = 0; i < t.size(); i++) {\n\t\t\tString s = t.get(i).getAbsolutePath();\n\t\t\tif (s.contains(\"XX\") || s.contains(\"testingpackage\") || s.contains(\"datageneration\")) {\n\t\t\t\tt.remove(t.get(i));\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\tfiles = t;\n\n\t\t// Convert the Collection into an array\n\t\tFile[] allJavaFiles = new File[files.size()];\n\t\tfiles.toArray(allJavaFiles);\n\n\t\tString[] allTestClasses = new String[allJavaFiles.length];\n\t\tString temp = \"\";\n\n\t\t// convert file path to full package declaration for the class\n\t\tfor (int i = 0; i < allJavaFiles.length; i++) {\n\t\t\ttemp = allJavaFiles[i].toString();\n\t\t\ttemp = temp.replace(\".java\", \"\").replace(\"\\\\\", \".\"); // remove .java convert backslash\n\t\t\tif (temp.indexOf(\"com.textura\") < 0) {\n\t\t\t\tallTestClasses[i] = \"null\";\n\t\t\t} else {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"com.textura\"));\n\t\t\t\ttemp = temp.replace(\"com.\", \"\");\n\t\t\t\tallTestClasses[i] = temp;\n\t\t\t}\n\t\t}\n\t\treturn allTestClasses;\n\t}",
"public String[] listObjectNames(String path);",
"public String[] getNames(){\n \t\tString[] outStrings = new String[otherNames.length+1];\n \t\toutStrings[0] = this.name;\n\t\tfor(int i=1;i<otherNames.length;i++)\n \t\t\toutStrings[i] = this.otherNames[i-1];\n \t\treturn outStrings;\n \t}",
"public abstract String toStringForFileName();",
"private String[] getArrayGroupName() {\n java.util.List<StudentGroupThrift> studentGroupThrifts = mainWindow.getStudentClient().getAllStudentGroup();\n List<String> groupName = studentGroupThrifts.stream()\n .map(StudentGroupThrift::getName).collect(Collectors.toList());\n return groupName.toArray(new String[groupName.size()]);\n }",
"List<String> getTrees();",
"public List<FileNode> getChildren() {\r\n return this.children;\r\n }",
"public String[] infoToArray()// return an array of the tree's value, using the recursion method infoToArray2\r\n {\r\n\t String [] arr = new String[root.sizen]; \r\n if (empty()) {\r\n return arr;\r\n }\r\n int index = 0;\r\n infoToArray2(this.root, arr, index);\r\n return arr;\r\n }",
"public List<String> children() {\n return this.children;\n }",
"public String getFileNamingDetails();",
"public Set<VfsFile> getChildren()\n {\n return children;\n }",
"@Nonnull\r\n List<DataSet> children(@Nonnull DataSet parent) throws IllegalArgumentException, IOException;",
"@Override\n\tpublic String toString() {\n\t\tString path = \"\";\n\tfor (int i = 0; i < paths.size(); i ++) {\n\t\tfor (int j = 0; j < paths.get(i).size(); j++)\n\t\t\tpath += paths.get(i).get(j) + \", \";\n\t\tpath += \"\\n\";\n\t}\n\treturn path;\n\t\t\n\t}",
"private static String[] extractName(String[] fileNames) {\n\t\tString[] nameOfFiles = new String[4];\n\t\tString[] file = null;\n\t\tString fileName = \"\";\n\t\tString name = \"\";\n\t\t\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tfile = fileNames[i].split(\"\\\\/\");\n\t\t\tfileName = file[file.length - 1];\n\t\t\tname = fileName.substring(0, fileName.length() - 10);\n\t\t\tnameOfFiles[i] = name;\n\t\t}\n\t\t\n\t\treturn nameOfFiles;\n\t}",
"public abstract String getFileFormatName();",
"public String[] getFoldersNames(){\n\t\tCollection<String> listNames = new ArrayList<String>();\n\t\tfor( Folder folder : m_Folders){\n\t\t\tlistNames.add(folder.m_Name);\n\t\t}\n\t\t\n\t\tString[] names = new String[listNames.size()]; \n\t\tnames = listNames.toArray(names);\n\t\treturn names;\t\t\n\t}",
"private static ArrayList<String> getPlayerFileNames() {\n\n ArrayList<String> fileNames = new ArrayList<String>();\n\n File folder = new File(\"otterbein/pig/player\");\n File[] listOfFiles = folder.listFiles();\n\n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n if (listOfFiles[i].getName().endsWith(\".class\")) {\n fileNames.add(listOfFiles[i].getName());\n }\n }\n }\n\n return fileNames;\n }",
"private static List<Class<?>>\n getClassNameFromFile(String path, String packageName, boolean isRecursion, String postfix) {\n List<Class<?>> lct = new ArrayList<>();\n\n try {\n path = java.net.URLDecoder.decode(\n new String(path.getBytes(\"ISO-8859-1\"),\"UTF-8\"),\"UTF-8\");\n\n File file =new File(path);\n File[] files = file.listFiles();\n\n for (File childFile : files) {\n if (childFile.isDirectory()) {\n if (isRecursion) {\n lct.addAll(getClassNameFromFile(childFile.getPath(),\n packageName + \".\" +childFile.getName(), isRecursion, postfix));\n }\n } else {\n String fileName = childFile.getName();\n if (fileName.endsWith(postfix) && !fileName.contains(\"$\")) {\n System.out.println(fileName);\n lct.add(Class.forName(packageName + \".\" + fileName.replace(\".class\", \"\")));\n }\n }\n }\n }catch (UnsupportedEncodingException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n return lct;\n }",
"public List<String> useTreeOnData() {\n\t\tList<String> classifierWithData = new ArrayList<String>();\n\t\tString header = \"LEARND\\tACTUAL\";\n\t\tfor (String s : attributeNames) {\n\t\t\tchar[] truncated = Arrays.copyOf(s.toCharArray(),5);\n\t\t\tString tr = \"\";\n\t\t\tfor (int i = 0; i < 5 && Character.isAlphabetic(truncated[i]); i++) {\n\t\t\t\ttr += truncated[i];\n\t\t\t}\n\t\t\theader += \"\\t\"+ tr +\".\";\n\t\t}\n\t\tclassifierWithData.add(header);\n\t\tif (root == null || data == null || attributeNames.size() == 0) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tfor (Instance inst : data) {\n\t\t\tString s = root.classify(inst) +\"\\t\"+ inst.toString();\n\t\t\tclassifierWithData.add(s);\n\t\t}\n\t\treturn classifierWithData;\n\t}",
"public String[] getNames() {\r\n\t\tfinal List<String> names=new ArrayList<>();\r\n\r\n\t\tString s;\r\n\t\tfor (Map.Entry<String,Map<String,Object>> entry1: data.entrySet()) {\r\n\t\t\ts=entry1.getKey();\r\n\t\t\tif (names.indexOf(s)<0) names.add(s);\r\n\t\t\tfor (Map.Entry<String,Object> entry2: entry1.getValue().entrySet()) {\r\n\t\t\t\ts=entry2.getKey();\r\n\t\t\t\tif (names.indexOf(s)<0) names.add(s);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn names.toArray(new String[0]);\r\n\t}",
"public void testGetChildren() throws IOException {\n FileObject fobj = getFileObject(testFile);\n FileObject parent = fobj.getParent();\n parent = parent.createFolder(\"parent\");\n File pFile = getFile(parent);\n for (int i = 0; i < 10; i++) {\n assertTrue(new File(pFile, \"file\" + i).createNewFile());\n assertTrue(new File(pFile, \"fold\" + i).mkdir());\n }\n monitor.reset();\n FileObject[] children = parent.getChildren();\n //20 x children, 1 x File.listFiles \n monitor.getResults().assertResult(21, StatFiles.ALL);\n monitor.getResults().assertResult(21, StatFiles.READ);\n //second time\n monitor.reset();\n children = parent.getChildren();\n monitor.getResults().assertResult(0, StatFiles.ALL);\n }",
"java.util.List<ds.hdfs.generated.FileMetadata> \n getFilesList();",
"public NSMutableArray<Pair> formattedFiles()\n {\n if ( formattedFiles == null )\n {\n formattedFiles = new NSMutableArray<Pair>();\n Pair[] rawPairs = (Pair[])task.result();\n if (rawPairs != null && rawPairs.length > 0)\n {\n EOEditingContext taskContext =\n rawPairs[0].file.editingContext();\n try\n {\n taskContext.lock();\n for (int i = 0; i < rawPairs.length; i++)\n {\n Pair pair = new Pair();\n formattedFiles.addObject(pair);\n pair.file = rawPairs[i].file\n .localInstance(localContext());\n pair.html = rawPairs[i].html;\n }\n }\n finally\n {\n taskContext.unlock();\n }\n }\n task.resultNoLongerNeeded();\n }\n return formattedFiles;\n }",
"protected abstract String childFolderPath();",
"public String[] getTransforms() {\r\n List<String> al = new ArrayList<String>();\r\n // Iterate through the transforms\r\n Iterator<BundlesDT.DT> it_dt = transforms.keySet().iterator();\r\n while (it_dt.hasNext()) {\r\n BundlesDT.DT datatype = it_dt.next();\r\n Iterator<String> it_trans = transforms.get(datatype).keySet().iterator();\r\n while (it_trans.hasNext()) {\r\n String trans = it_trans.next();\r\n\tal.add(\"\" + datatype + BundlesDT.DELIM + trans);\r\n }\r\n }\r\n // Convert back to strings\r\n String strs[] = new String[al.size()]; for (int i=0;i<strs.length;i++) strs[i] = al.get(i);\r\n return strs;\r\n }",
"private List<FileDescription> GetFileTree(String blobName) throws URISyntaxException, StorageException {\n CloudBlobDirectory directory = _container.getDirectoryReference(blobName);\n List<FileDescription> fileTree = new ArrayList<FileDescription>();\n for (ListBlobItem blob : directory.getContainer().listBlobs()) {\n FileDescription fileDescription;\n CloudBlobDirectory blobDirectory = (CloudBlobDirectory) blob;\n if (blobDirectory != null) {\n fileDescription = new FileDescription(blobDirectory.getPrefix(), true);\n } else {\n CloudBlob blobFile = (CloudBlob) blob;\n fileDescription = new FileDescription(blobFile.getName(), false);\n fileDescription.setSize(blobFile.getProperties().getLength());\n fileDescription.setLastModificationDate(getDateTimeOrEmptyDate(blobFile.getProperties().getLastModified()));\n }\n fileTree.add(fileDescription);\n }\n return fileTree;\n }",
"protected Set<?> _getChildrenNames(Fqn fqn) throws Exception\n {\n Set cn;\n synchronized (this)\n {\n out.reset();\n out.writeByte(TcpCacheOperations.GET_CHILDREN_NAMES);\n out.writeObject(fqn);\n out.flush();\n Object retval = in.readObject();\n if (retval instanceof Exception)\n {\n throw (Exception) retval;\n }\n cn = (Set) retval;\n }\n\n // the cache loader contract is a bit different from the cache when it comes to dealing with childrenNames\n if (cn.isEmpty()) return null;\n return cn;\n }",
"public String[] getFileNamesFromDir(File dir) {\n\t\tFile[] allFiles = dir.listFiles();\n\t\tSystem.out.println(\"Total Files: \" + allFiles.length);\n\t\tString[] allFileNames = new String[allFiles.length];\n\t\tfor (int i = 0; i < allFiles.length; i++) {\n\t\t\tallFileNames[i] = allFiles[i].getName();\n//\t\t\tSystem.out.println(\"\\t\" + allFiles[i].getName());\n\t\t}\n\t\t\n\t\treturn allFileNames;\n\t}",
"public String toString(){\n String str = \"\";\n for(int i = level; i>0; i--){\n str+=\"\\t\";\n }\n str += getClass().toString();\n if(noOfChildren != 0){\n str+=\" containing\\n\";\n for (int i = 0; i<this.noOfChildren; i++)\n str += getChild(i).toString();\n }\n else{\n str+=\"\\n\";\n }\n return str;\n }",
"private static final String[] buildVariants(String root) {\r\n if (nlSuffixes == null) {\r\n // build list of suffixes for loading resource bundles\r\n String nl = Locale.getDefault().toString();\r\n ArrayList<String> result = new ArrayList<String>(4);\r\n int lastSeparator;\r\n while (true) {\r\n result.add('_' + nl + EXTENSION);\r\n lastSeparator = nl.lastIndexOf('_');\r\n if (lastSeparator == -1) {\r\n break;\r\n }\r\n nl = nl.substring(0, lastSeparator);\r\n }\r\n // add the empty suffix last (most general)\r\n result.add(EXTENSION);\r\n nlSuffixes = result.toArray(new String[result.size()]);\r\n }\r\n root = root.replace('.', '/');\r\n String[] variants = new String[nlSuffixes.length];\r\n for (int i = 0; i < variants.length; i++) {\r\n variants[i] = root + nlSuffixes[i];\r\n }\r\n return variants;\r\n }",
"private void get_file_List() {\n\tString file_name=null;\r\n\tfor (int i = 0; i < listOfFiles.length; i++) \r\n\t {\r\n\t \r\n\t if (listOfFiles[i].isFile()) \r\n\t {\r\n\t\t file_name = listOfFiles[i].getName();\r\n\t if (file_name.endsWith(\".xml\") || file_name.endsWith(\".XML\"))\r\n\t {\r\n\t file_list.add(file_name) ;\r\n\t }\r\n\t }\r\n\t }\r\n\t\r\n}",
"private static List<File> listChildFiles(File dir) throws IOException {\n\t\t List<File> allFiles = new ArrayList<File>();\n\t\t \n\t\t File[] childFiles = dir.listFiles();\n\t\t for (File file : childFiles) {\n\t\t if (file.isFile()) {\n\t\t allFiles.add(file);\n\t\t } else {\n\t\t List<File> files = listChildFiles(file);\n\t\t allFiles.addAll(files);\n\t\t }\n\t\t }\n\t\t return allFiles;\n\t\t }",
"Node[] getChildren(Node node);",
"public String[] listFilesString() {\n\t\tFile[] FL = listFiles();\n\t\treturn FU.listFilesString(FL);\n\t}",
"public List <WebFile> getChildFiles()\n{\n if(_type==FileType.SOURCE_DIR) return getSourceDirChildFiles();\n return _file.getFiles();\n}"
] |
[
"0.6730068",
"0.65251696",
"0.63798636",
"0.6245726",
"0.6002854",
"0.59777445",
"0.5879443",
"0.5879443",
"0.584201",
"0.58002615",
"0.5784389",
"0.5763873",
"0.5716523",
"0.56715196",
"0.5638236",
"0.5636032",
"0.5624182",
"0.5581287",
"0.5551884",
"0.5531189",
"0.55285007",
"0.55221266",
"0.54931796",
"0.5449788",
"0.5449691",
"0.5421834",
"0.541235",
"0.5408655",
"0.5384997",
"0.5382347",
"0.53655505",
"0.5360871",
"0.53506804",
"0.5337951",
"0.5323014",
"0.53207904",
"0.5318656",
"0.5293342",
"0.52862865",
"0.52705926",
"0.5268161",
"0.5259975",
"0.5259839",
"0.52559084",
"0.5240492",
"0.5238543",
"0.52319",
"0.52314276",
"0.52163035",
"0.5214459",
"0.5198241",
"0.5190333",
"0.5188734",
"0.5187777",
"0.51865596",
"0.51828843",
"0.5182129",
"0.5181482",
"0.5173459",
"0.51732916",
"0.5172715",
"0.5167271",
"0.51616246",
"0.51558477",
"0.51546395",
"0.5151518",
"0.5150982",
"0.5125197",
"0.5123378",
"0.5114235",
"0.51132214",
"0.5111206",
"0.5110377",
"0.51082027",
"0.5090544",
"0.5082587",
"0.5078091",
"0.5070436",
"0.50571185",
"0.5054163",
"0.5052062",
"0.504607",
"0.5021587",
"0.5021307",
"0.5007675",
"0.5005448",
"0.5004741",
"0.5000903",
"0.49827474",
"0.4981487",
"0.49777132",
"0.49726632",
"0.4968736",
"0.49606687",
"0.4951002",
"0.495003",
"0.49498203",
"0.49491048",
"0.49459374",
"0.49435908"
] |
0.6625959
|
1
|
Populates the form for creating an event with valid information. Useful so that users do not have to think when filling out the form for testing.
|
@PostMapping( value = "/new", params = "auto" )
public String createEventFormAutoPopulate( @ModelAttribute CreateEventForm createEventForm )
{
// provide default values to make user submission easier
createEventForm.setSummary( "A new event...." );
createEventForm.setDescription( "This was autopopulated to save time creating a valid event." );
createEventForm.setWhen( new Date() );
// make the attendee not the current user
CalendarUser currentUser = userContext.getCurrentUser();
int attendeeId = currentUser.getId() == 0 ? 1 : 0;
CalendarUser attendee = calendarService.getUser( attendeeId );
createEventForm.setAttendeeEmail( attendee.getEmail() );
return "events/create";
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void fillForm(Event e){\n // name\n eventName.setText(e.getEventname().toString());\n // room\n room.setText(e.getRoom() + \"\");\n // dates\n Calendar from = extractDate(e.getFromDate());\n writeDateToButton(from, R.id.newEvent_button_from);\n Calendar to = extractDate(e.getToDate());\n writeDateToButton(to, R.id.newEvent_button_to);\n Calendar fromTime = null;\n Calendar toTime = null;\n if(e.getFromTime() == -1)\n wholeDay.setChecked(true);\n else {\n fromTime = extractTime(e.getFromTime());\n writeDateToButton(fromTime, R.id.newEvent_button_from_hour);\n toTime = extractTime(e.getToTime());\n writeDateToButton(toTime, R.id.newEvent_button_to_hour);\n }\n // notification\n spinner.setSelection(e.getNotificiation());\n // patient\n PatientAdapter pa = new PatientAdapter(this);\n Patient p = pa.getPatientById(e.getPatient());\n patient_id = p.getPatient_id();\n patient.setText(p.getName());\n // desc\n desc.setText(e.getDescription().toString());\n // putting time and date togehter\n this.fromDate = Calendar.getInstance();\n this.toDate = Calendar.getInstance();\n this.fromDate.set(from.get(Calendar.YEAR), from.get(Calendar.MONTH), from.get(Calendar.DAY_OF_MONTH),\n (fromTime != null ? fromTime.get(Calendar.HOUR_OF_DAY) : 0),\n (fromTime != null ? fromTime.get(Calendar.MINUTE) : 0));\n this.toDate.set(to.get(Calendar.YEAR), to.get(Calendar.MONTH), to.get(Calendar.DAY_OF_MONTH),\n (toTime != null ? toTime.get(Calendar.HOUR_OF_DAY) : 0),\n (toTime != null ? toTime.get(Calendar.MINUTE) : 0));\n startYear = fromDate.get(Calendar.YEAR);\n startMonth = fromDate.get(Calendar.MONTH);\n startDay = fromDate.get(Calendar.DAY_OF_MONTH);\n startHour = fromDate.get(Calendar.HOUR_OF_DAY);\n }",
"@PostMapping(\"/createevent\")\n public String createEventSubmit(@ModelAttribute Event event, Model model) {\n\n Boolean isValid = true;\n String reasonForFailure = \"\";\n Studio studioLookup = mainDBService.lookupStudioByShortName(event.getStudioShortName());\n if (studioLookup == null) {\n isValid = false;\n reasonForFailure += \"Studio not found\";\n }\n\n String eventType = event.getEventType();\n if (!(eventType.equalsIgnoreCase(\"movie\") || eventType.equalsIgnoreCase(\"ppv\"))) {\n isValid = false;\n reasonForFailure += \"Event type is not movie or ppv\";\n }\n\n Event saved = null;\n if (isValid) {\n System.out.println(\"passed validation steps\");\n saved = mainDBService.saveEvent(event);\n //saved = eventRepository.save(event);\n }\n\n if (saved != null) {\n model.addAttribute(\"successmessage\", \"Event Saved Successfully!\");\n return \"index.xhtml\";\n } else {\n model.addAttribute(\"errormessage\", String.format(\"Event save Failed for the following reasons: %s, Please try again\", reasonForFailure));\n model.addAttribute(\"event\", event);\n return \"createevent.xhtml\";\n }\n }",
"private void createFrame() {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfinal JFrame frame = new JFrame(\"Create Event\");\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\t\t\ttry {\n\t\t\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tfinal JTextArea textArea = new JTextArea(15, 50);\n\t\t\t\ttextArea.setText(\"Untitled Event\");\n\t\t\t\ttextArea.setWrapStyleWord(true);\n\t\t\t\ttextArea.setEditable(true);\n\t\t\t\ttextArea.setFont(Font.getFont(Font.SANS_SERIF));\n\n\t\t\t\tJPanel panel = new JPanel();\n\t\t\t\tpanel.setLayout(new GridLayout(1, 4));\n\t\t\t\tfinal JTextField d = new JTextField(\"\" + year + \"/\" + month + \"/\" + day);\n\t\t\t\tfinal JTextField startTime = new JTextField(\"1:00am\");\n\t\t\t\tJTextField t = new JTextField(\"to\");\n\t\t\t\tt.setEditable(false);\n\t\t\t\tfinal JTextField endTime = new JTextField(\"2:00am\");\n\t\t\t\tJButton save = new JButton(\"Save\");\n\t\t\t\tpanel.add(d);\n\t\t\t\tpanel.add(startTime);\n\t\t\t\tpanel.add(t);\n\t\t\t\tpanel.add(endTime);\n\t\t\t\tpanel.add(save);\n\n\t\t\t\tsave.addActionListener(new ActionListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\teventsData.addEvent(new Event(YYYYMMDD(d.getText().trim()), startTime.getText(),\n\t\t\t\t\t\t\t\t\tendTime.getText(), textArea.getText()));\n\t\t\t\t\t\t\tupdateEventsView(eventsRender);\n\t\t\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t\t\tif (ex instanceof IllegalArgumentException)\n\t\t\t\t\t\t\t\tpromptMsg(ex.getMessage(), \"Error\");\n\t\t\t\t\t\t\telse promptMsg(ex.getMessage(), \"Error\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tframe.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tframe.setSize(500, 100);\n\t\t\t\tframe.setLayout(new GridLayout(2, 1));\n\t\t\t\tframe.add(textArea);\n\t\t\t\tframe.add(panel);\n\t\t\t\tframe.setLocationByPlatform(true);\n\t\t\t\tframe.setVisible(true);\n\t\t\t}\n\t\t});\n\t}",
"public EventForm(String type, int eventID, Day day, CalendarForm mainForm) {\n formType = type;\n this.eventID = eventID;\n initialDay = day;\n chosenDay = day;\n this.mainForm = mainForm;\n eventToEdit = day.getEvent(eventID);\n frame = new JFrame();\n lblDay = new JLabel(\"Day:\");\n lblMonth = new JLabel(\"Month:\");\n lblName = new JLabel(\"Event name:\");\n lblTime = new JLabel(\"Start Time:\");\n lblDuration = new JLabel(\"Duration:\");\n cmbDay = new JComboBox();\n cmbMonth = new JComboBox();\n txtName = new JTextField(10);\n radSelectTime = new JRadioButton(\"Choose Time\", true);\n radAutoTime = new JRadioButton(\"Generate Time\", false);\n buttonGroup = new ButtonGroup();\n cmbTime = new JComboBox();\n cmbDuration = new JComboBox();\n btnSubmit = new JButton(type);\n DateFormatSymbols cal = new DateFormatSymbols();\n monthNames = cal.getMonths();\n gbc = new GridBagConstraints();\n freeTimes = new ArrayList();\n usedTimes = new ArrayList();\n txtName.requestFocus();\n }",
"public EventDetails() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel7 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n eventCapJTxtField = new javax.swing.JTextField();\n eventNameJTxtField = new javax.swing.JTextField();\n eventDesJTxtField = new javax.swing.JTextField();\n locJTxtField = new javax.swing.JTextField();\n backJBtn = new javax.swing.JButton();\n createEventJBtn = new javax.swing.JButton();\n eventDate = new com.toedter.calendar.JDateChooser();\n\n jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Pics/party-51.jpg\"))); // NOI18N\n jLabel7.setText(\"jLabel7\");\n\n setBackground(new java.awt.Color(0, 0, 0));\n setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 153, 153));\n jLabel1.setText(\"Create New Event\");\n add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 11, -1, -1));\n\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Event Name: \");\n add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 61, 120, -1));\n\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"Event Description: \");\n add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 99, 120, -1));\n\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"Date: \");\n add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 134, 120, -1));\n\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"No of People:\");\n add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 175, 120, -1));\n\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\"Location: \");\n add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 213, 120, -1));\n add(eventCapJTxtField, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 172, 200, -1));\n add(eventNameJTxtField, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 58, 200, -1));\n add(eventDesJTxtField, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 96, 200, -1));\n add(locJTxtField, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 210, 200, -1));\n\n backJBtn.setText(\"Back\");\n backJBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backJBtnActionPerformed(evt);\n }\n });\n add(backJBtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 248, -1, -1));\n\n createEventJBtn.setText(\"Create Event\");\n createEventJBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n createEventJBtnActionPerformed(evt);\n }\n });\n add(createEventJBtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 248, -1, -1));\n add(eventDate, new org.netbeans.lib.awtextra.AbsoluteConstraints(158, 134, 200, -1));\n }",
"private void buildFrame() {\n String title = \"\";\n switch (formType) {\n case \"Add\":\n title = \"Add a new event\";\n break;\n case \"Edit\":\n title = \"Edit an existing event\";\n break;\n default:\n }\n frame.setTitle(title);\n frame.setResizable(false);\n frame.setPreferredSize(new Dimension(300, 350));\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n // sets the main form to be visible if the event form was exited\n // and not completed.\n mainForm.getFrame().setEnabled(true);\n mainForm.getFrame().setVisible(true);\n }\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 jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jTextField6 = new javax.swing.JTextField();\n jTextField7 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Ubuntu\", 1, 24)); // NOI18N\n jLabel1.setText(\"Add Events\");\n\n jLabel2.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel2.setText(\"Event Name :-\");\n\n jLabel3.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel3.setText(\"Event Id :-\");\n\n jLabel4.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel4.setText(\"Event Created On :-\");\n\n jLabel5.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel5.setText(\"Last Date of Registration :-\");\n\n jLabel6.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel6.setText(\"Event Will Be On :-\");\n\n jLabel7.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel7.setText(\"Event Description :-\");\n\n jLabel8.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel8.setText(\"Event Venue :-\");\n jLabel8.setToolTipText(\"\");\n\n jTextField1.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField2.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField3.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField4.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField5.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField6.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jTextField7.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n jButton1.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n jButton1.setText(\"Close\");\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.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n jButton2.setText(\"Save \");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(70, 70, 70)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(51, 51, 51)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jTextField3, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)\n .addComponent(jTextField4)\n .addComponent(jTextField5))\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(244, 244, 244)\n .addComponent(jLabel1)))\n .addContainerGap(146, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(34, 34, 34)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(54, 54, 54)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(17, 17, 17)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(22, 22, 22)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addComponent(jLabel7))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addGap(38, 38, 38))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn \"EventViewForm [event=\" + event + \", eventAttender=\"\r\n\t\t\t\t+ eventAttender + \", post=\" + post + \", wallElements=\"\r\n\t\t\t\t+ wallElements + \"]\";\r\n\t}",
"public static void create() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString title = \"\";\n\t\tString date = \"\";\n\t\tString startTime = \"\";\n\t\tString endTime = \"\";\n\t\tSystem.out.println(\"Enter the title of the event you would like to create: \");\n\t\tif (sc.hasNextLine()) {\n\t\t\ttitle = sc.nextLine().toLowerCase();\n\t\t}\n\t\tSystem.out.println(\"Enter the date on MM/DD/YYYY format: \");\n\t\tif (sc.hasNextLine()) {\n\t\t\tdate = sc.nextLine().toLowerCase();\n\t\t}\n\t\tSystem.out.println(\"Enter the starting time in 24 hour format (ex 15:30): \");\n\t\tif (sc.hasNextLine()) {\n\t\t\tstartTime = sc.nextLine().toLowerCase();\n\t\t}\n\t\tSystem.out.println(\"Enter the ending time: in 24 hour format (ex 15:30): \"); // if there's no end time set the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// end time to the start time.\n\t\tif (sc.hasNextLine()) {\n\t\t\tendTime = sc.nextLine().toLowerCase();\n\t\t\tif (endTime.equals(\"\")) {\n\t\t\t\tendTime = startTime;\n\t\t\t}\n\t\t}\n\t\tEvent toAdd = new Event(title, date, startTime, endTime);\n\n\t\tGregorianCalendar calendar = new GregorianCalendar(toAdd.getYear(), toAdd.getMonth(), toAdd.getDay());\n\t\tif (calendarToEvent.get(calendar) == null) { // there are no events under this date\n\t\t\tTreeSet<Event>treeSetForMap = new TreeSet<Event>();\n\t\t\ttreeSetForMap.add(toAdd);\n\t\t\tcalendarToEvent.put(calendar, treeSetForMap);\n\t\t} else { // there are already events, add event to the treeset\n\t\t\tboolean canAdd = true;\n\t\t\tfor (Event e : calendarToEvent.get(calendar)) {\n\t\t\t\tif (e.conflictCheck(toAdd)) { //check this (e.getIntEndTime()) < (toAdd.getIntStartTime()) ////return true if there is a conflict, false if there isn't\n\t\t\t\t\tSystem.out.println(\"Sorry can't add that event, there is a conflict\");\n\t\t\t\t\tcanAdd = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (canAdd) {\n\t\t\t\tcalendarToEvent.get(calendar).add(toAdd); // THAT'S WHAT IT USED TO BE calendarToEvent.get(toAdd.getDate()).add(toAdd);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void onFormCreate(AbstractForm arg0, DataMsgBus arg1) {\n\t}",
"public void createEvent(View view){\n showDatePickerDialog();\n }",
"public void fillForm() {\n\t\t// fills the name field with nameOfProject\n\t\tprojName.sendKeys(nameOfProject);\n\t\t// selects the first option from the 'Client partner' dropdown list\n\t\tSelect sel = new Select(clientList);\n\t\tsel.selectByIndex(1);\n\t\t// enters valid date data\n\t\tstartDate.sendKeys(\"06042018\");\n\t\tendDate.sendKeys(\"06052018\");\n\t}",
"@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void handleAddEvent(ActionEvent event)\n {\n if(eventDate.getValue() == null)\n {\n MessageAlert.showErrorMessage(null, \"Date was not selected!\");\n return;\n }\n if(eventHour.getValue() == null)\n {\n MessageAlert.showErrorMessage(null, \"Hour was not selected!\");\n return;\n }\n if(eventMinute.getValue() == null)\n {\n MessageAlert.showErrorMessage(null, \"Minute was not selected!\");\n return;\n }\n DecimalFormat decimalFormat = new DecimalFormat(\"00\");\n String date = eventDate.getValue().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd\")) + \" \" + decimalFormat.format(eventHour.getValue()) + \":\" + decimalFormat.format(eventMinute.getValue());\n try\n {\n service.addEvent(new Event(mainPage.getId(), eventName.getText(), date, new ArrayList<Long>()));\n MessageAlert.showMessage(null, Alert.AlertType.CONFIRMATION, \"SUCCESS!\", \"Event added successfully!\");\n\n Node node = (Node) event.getSource();\n Stage thisStage = (Stage) node.getScene().getWindow();\n thisStage.hide();\n }\n catch (ValidationException e)\n {\n MessageAlert.showErrorMessage(null, e.getMessage());\n }\n }",
"private void saveEvent(){\n boolean cancel = false;\n View focusView = null;\n\n // Reset errors.\n eventName.setError(null);\n room.setError(null);\n btnFrom.setError(null);\n btnTo.setError(null);\n btnHourFrom.setError(null);\n btnHourTo.setError(null);\n patient.setError(null);\n\n // Check if user entered an eventname\n String name = this.eventName.getText().toString();\n if(TextUtils.isEmpty(name)){\n eventName.setError(getString(R.string.error_field_required));\n focusView = eventName;\n cancel = true;\n }\n // Check if user entered an room\n String room = this.room.getText().toString();\n if(TextUtils.isEmpty(room)){\n this.room.setError(getString(R.string.error_field_required));\n focusView = this.room;\n cancel = true;\n }\n\n // Check if user entered an valid room\n if(!TextUtils.isEmpty(room)) {\n if (!checkRoom(rooms, Integer.parseInt(room))) {\n this.room.setError(getString(R.string.error_invalid_room));\n focusView = this.room;\n cancel = true;\n }\n }\n\n // Check if user entered a fromDate\n if(fromDate == null){\n this.btnFrom.setError(getString(R.string.error_field_required));\n focusView = this.btnFrom;\n cancel = true;\n if(!wholeDay.isChecked()){\n this.btnHourFrom.setError(getString(R.string.error_field_required));\n }\n }\n\n // Check if user entered a toDate\n if(toDate == null){\n this.btnTo.setError(getString(R.string.error_invalid_dates));\n focusView = this.btnTo;\n cancel = true;\n if(!wholeDay.isChecked()){\n this.btnHourTo.setError(getString(R.string.error_field_required));\n }\n }\n\n // Check if user entered an hour if whole day is unchecked\n if(!wholeDay.isChecked()){\n if(this.btnHourFrom.getText().toString().compareTo(getString(R.string.prompt_hour_from)) == 0){\n this.btnHourFrom.setError(getString(R.string.error_field_required));\n focusView = this.btnHourFrom;\n cancel = true;\n }\n if(this.btnHourTo.getText().toString().compareTo(getString(R.string.prompt_hour_to)) == 0){\n this.btnHourTo.setError(getString(R.string.error_field_required));\n focusView = this.btnHourTo;\n cancel = true;\n }\n }\n\n // Check if user entered right dates\n if(toDate != null && fromDate != null) {\n if (toDate.before(fromDate)) {\n this.btnTo.setError(getString(R.string.error_invalid_dates));\n if (!wholeDay.isChecked())\n this.btnHourTo.setError(getString(R.string.error_invalid_dates));\n focusView = this.btnTo;\n cancel = true;\n }\n }\n\n // Check if user entered a patient\n String patient = this.patient.getText().toString();\n if(TextUtils.isEmpty(patient)){\n this.patient.setError(getString(R.string.error_field_required));\n focusView = this.patient;\n cancel = true;\n }\n\n // Check if user entered an valid patient\n if(!TextUtils.isEmpty(patient)) {\n if (!checkPatient(patients, patient)) {\n this.patient.setError(getString(R.string.error_invalid_patient));\n focusView = this.patient;\n cancel = true;\n }\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n Event e = null;\n if(updating)\n e = ea.getEventById(event_id);\n else\n e = new Event();\n\n // required fields\n e.setEventname(this.eventName.getText().toString().trim());\n e.setRoom(Integer.parseInt(this.room.getText().toString().trim()));\n e.setFromDate(parseDateForDB(fromDate));\n e.setToDate(parseDateForDB(toDate));\n e.setNotificiation(this.notification);\n e.setPatient(checkPatientID(patients, patient));\n e.setDoctor(IdCollection.doctor_id);\n\n // optionals fields\n e.setDescription(this.desc.getText().toString().trim());\n if(!wholeDay.isChecked()){\n e.setFromTime(parseTimeForDB(fromDate));\n e.setToTime(parseTimeForDB(toDate));\n }else {\n e.setFromTime(-1);\n e.setToTime(-1);\n }\n\n if(updating)ea.updateEvent(e);\n else ea.createEvent(e);\n\n\n startAlarm(e,fromDate);\n goBackToCal();\n }\n }",
"private void continueWithForm(final Events<Result> events) {\n\n\t\tif (registrar.getGroupFormInitialException() != null) {\n\t\t\tresult.setException(registrar.getGroupFormInitialException());\n\t\t\tevents.onFinished(getResult());\n\t\t\treturn;\n\t\t}\n\n\t\tform.setFormItems(registrar.getGroupFormInitial());\n\n\t\tif (!form.containsSubmitButton() && !form.containsOnlyTextItems()) {\n\t\t\tPerunException ex = PerunException.createNew(\"0\", \"FormWrongFormedException\", \"Group registration form is wrongly formed.\");\n\t\t\tresult.setException(ex);\n\t\t\tevents.onError(ex);\n\t\t\treturn;\n\t\t}\n\n\t\tform.setApp(Application.createNew(registrar.getVo(), registrar.getGroup(), Application.ApplicationType.INITIAL,\n\t\t\t\tgetFedInfo(localPP, Window.Location.getParameter(\"targetnew\")), localPP.getActor(), localPP.getExtSource(), localPP.getExtSourceType(), localPP.getExtSourceLoa(), localPP.getUser()));\n\n\t\tform.setOnSubmitEvent(getOnSubmitEvent(events));\n\n\t\tform.performAutoSubmit();\n\n\t}",
"@FXML\n void addEvent () {\n\n// checks if ChoiceBox has a selected Timeline\n if (timelineChoice.getSelectionModel().getSelectedItem() == null)\n return;\n\n// loads data from ChoiceBox and TextField(s)\n try {\n\n boolean singleDate = false;\n\n Timeline timeline = app.timelines.get(timelineChoice.getSelectionModel().getSelectedIndex());\n\n String name = event_nameField.getText().trim();\n String startDay = event_startDayField.getText().trim();\n String startMonth = event_startMonthField.getText().trim();\n String startYear = event_startYearField.getText().trim();\n String endDay = event_endDayField.getText().trim();\n String endMonth = event_endMonthField.getText().trim();\n String endYear = event_endYearField.getText().trim();\n String notes = event_notesField.getText().trim();\n\n// checks if all TextFields have correct contents in them\n if (name.isEmpty()) {\n setMessage(\"Event creation failed: Invalid Event name\", false);\n return;\n }\n\n if (startDay.isEmpty() || startDay.length() > 2 || !startDay.matches(\"[0-9]+\") || Integer.parseInt(startDay) > 31) {\n setMessage(\"Event creation failed: Invalid Event start day\", false);\n return;\n }\n\n if (startMonth.isEmpty() || startMonth.length() > 2 || !startMonth.matches(\"[0-9]+\") || Integer.parseInt(startMonth) > 12) {\n setMessage(\"Event creation failed: Invalid Event start month\", false);\n return;\n }\n\n if (startYear.isEmpty() || !startYear.matches(\"-?\\\\d+\")) {\n setMessage(\"Event creation failed: Invalid Event start year\", false);\n return;\n }\n\n// if all end date fields are empty, start date values are copied\n if (endDay.isEmpty() && endMonth.isEmpty() && endYear.isEmpty()) {\n\n singleDate = true;\n\n } else {\n\n if (endDay.isEmpty() || endDay.length() > 2 || !endDay.matches(\"[0-9]+\") || Integer.parseInt(endDay) > 31) {\n setMessage(\"Event creation failed: Invalid Event end day\", false);\n return;\n }\n\n if (endMonth.isEmpty() || endMonth.length() > 2 || !endMonth.matches(\"[0-9]+\") || Integer.parseInt(endMonth) > 12) {\n setMessage(\"Event creation failed: Invalid Event end month\", false);\n return;\n }\n\n if (endYear.isEmpty() || !endYear.matches(\"-?\\\\d+\")) {\n setMessage(\"Event creation failed: Invalid Event end year\", false);\n return;\n }\n }\n\n // creates start date\n int[] startDate = new int[]{\n Integer.parseInt(startDay),\n Integer.parseInt(startMonth),\n Integer.parseInt(startYear)};\n\n if (singleDate) {\n\n// adds Event to selected Timeline with single-date mode\n timeline.addEvent(name, startDate, startDate, false, notes);\n\n } else {\n\n// creates end date\n int[] endDate = new int[]{\n Integer.parseInt(endDay),\n Integer.parseInt(endMonth),\n Integer.parseInt(endYear)};\n\n// checks whether endDate is later than startDate\n if (!timeline.wasSooner(startDate, endDate)) {\n setMessage(\"Event creation failed: End Date is sooner than Start Date\", false);\n return;\n }\n\n// adds Event to selected Timeline with both start- and end-date\n timeline.addEvent(name, startDate, endDate, false, notes);\n }\n\n// exits the Add window, loads Menu\n cancelEventEdit();\n\n setMessage(\"Successfully created Event: \" + name, false);\n\n } catch (Exception e) {\n setMessage(\"Event creation failed: Invalid Timeline\", false);\n }\n }",
"public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_add_user, container, false);\n name = view.findViewById(R.id.name);\n date = view.findViewById(R.id.date);\n time = view.findViewById(R.id.time);\n description = view.findViewById(R.id.description);\n addevent = view.findViewById(R.id.addevent);\n addevent.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String Name = name.getText().toString();\n String Date = date.getText().toString();\n String Time= time.getText().toString();\n String Description= description.getText().toString();\n\n Event event = new Event();\n event.setName(Name);\n event.setTime(Time);\n event.setDescription(Description);\n event.setDate(Date);\n Main2Activity.eventDatabase.myDao().addEvent(event);\n Toast.makeText(getActivity(), \"Event added\", Toast.LENGTH_SHORT).show();\n event.setName(\"\");\n event.setTime(\"\");\n event.setDate(\"\");\n event.setDescription(\"\");\n\n }\n });\n\n return view;\n }",
"public void createTask(){\n final String name = newTaskNameField.getText().toString();\n final String description = newTaskDescriptionField.getText().toString();\n\n if (name.isEmpty()){\n newTaskNameField.setText(\"Please Enter a name\");\n newTaskNameField.requestFocus();\n newTaskNameField.selectAll();\n return;\n }\n\n if (description.isEmpty()){\n newTaskDescriptionField.setText(\"Please Enter a Description\");\n newTaskDescriptionField.requestFocus();\n newTaskDescriptionField.selectAll();\n return;\n }\n\n if(!getValidDate(newtaskDateField.getText().toString())) {\n handleInvalidDate();\n return;\n }\n\n if(newTaskAssignee == null) {\n newTaskAssigneeField.setText(\"Please assign a user\");\n newTaskAssigneeField.selectAll();\n return;\n }\n\n TaskManager.sharedInstance().CreateTask(name, description, newTaskAssignee, DueDate, false);\n newTaskDialog.dismiss();\n }",
"private void populateUI(Event event){\n mTitle.setText(event.getTitle()); //sets title to event title\n mDescription.setText(event.getDescription());\n }",
"private void validateEvent(final Event event) {\n if (null == event) {\n throw new NullPointerException(\"event cannot be null\");\n }\n if (null == event.getAuthor()) {\n throw new NullPointerException(\"author cannot be null\");\n }\n if (null == event.getAuthor().getId()) {\n throw new NullPointerException(\"author ID cannot be null\");\n }\n if (null == event.getCustomer()) {\n throw new NullPointerException(\"customer cannot be null\");\n }\n if (null == event.getCustomer().getId()) {\n throw new NullPointerException(\"customer ID cannot be null\");\n }\n if (null == event.getProcedure()) {\n throw new NullPointerException(\"procedure cannot be null\");\n }\n if (null == event.getProcedure().getId()) {\n throw new NullPointerException(\"procedure ID cannot be null\");\n }\n if (Utensils.stringIsBlank(event.getText())) {\n throw new IllegalArgumentException(\"text cannot be blank\");\n }\n if (0 == event.getText().trim().length()) {\n throw new IllegalArgumentException(\"text cannot be blank\");\n }\n if (Event.Type.IN_CALENDAR == event.enumType()) {\n if (null == event.getStartTime()) {\n throw new NullPointerException(\"start time cannot be null\");\n }\n if (event.getLength() <= 0) {\n throw new IllegalArgumentException(\"length lesser then 0\");\n }\n }\n }",
"public void formEventOccurred(FormEvent e){\n\t\t\t\tcontroller.addPerson(e);\r\n\t\t\t\ttablePanel.refresh();\r\n\t\t\t}",
"public void createEvent(Event e) {\n\t\tLocalDate date = e.sDate;\n\t\tif(!map.containsKey(date)) {\n\t\t\tArrayList<Event> newList = new ArrayList<>();\n\t\t\tnewList.add(e);\n\t\t\tmap.put(date, newList);\n\t\t}\n\t\telse {\n\t\t\tmap.get(date).add(e);\n\n\t\t}\n\t}",
"private void initForm(@Nullable View view){\n inputCalendar = formatCalendar(new GregorianCalendar());\n\n if (view == null) view = getView();\n\n setValueOfField(view, R.id.at_button_date, getContext().getString(R.string.ad_button_date));\n setValueOfField(view, R.id.at_editTextNumberSigned_timeValue, \"0\");\n setValueOfField(view, R.id.at_editTextNumberSigned_levelEasyValue, \"0\");\n setValueOfField(view, R.id.at_editTextNumberSigned_levelMiddleValue, \"0\");\n setValueOfField(view, R.id.at_editTextNumberSigned_levelHighValue, \"0\");\n setValueOfField(view, R.id.at_editTextNumberSigned_levelExpertValue, \"0\");\n }",
"public AddEvent() {\n initComponents();\n }",
"FORM createFORM();",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n eventname = new javax.swing.JLabel();\n date = new javax.swing.JLabel();\n starttime = new javax.swing.JLabel();\n endtime = new javax.swing.JLabel();\n starttimeval = new javax.swing.JTextField();\n endtimeval = new javax.swing.JTextField();\n save = new javax.swing.JButton();\n eventname2 = new javax.swing.JLabel();\n eventname2val = new javax.swing.JTextField();\n delete = new javax.swing.JButton();\n back = new javax.swing.JButton();\n eventname_val = new javax.swing.JComboBox<>();\n dateval = new com.toedter.calendar.JDateChooser();\n eventid = new javax.swing.JTextField();\n eventname1 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n back1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n eventname.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 24)); // NOI18N\n eventname.setForeground(new java.awt.Color(254, 254, 254));\n eventname.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n eventname.setText(\"Event Name\");\n\n date.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 24)); // NOI18N\n date.setForeground(new java.awt.Color(254, 254, 254));\n date.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n date.setText(\"Date\");\n\n starttime.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 24)); // NOI18N\n starttime.setForeground(new java.awt.Color(254, 254, 254));\n starttime.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n starttime.setText(\"Start Time \");\n\n endtime.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 24)); // NOI18N\n endtime.setForeground(new java.awt.Color(254, 254, 254));\n endtime.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n endtime.setText(\"End Time\");\n\n starttimeval.setBackground(new java.awt.Color(1, 1, 1));\n starttimeval.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 18)); // NOI18N\n starttimeval.setForeground(new java.awt.Color(254, 254, 254));\n\n endtimeval.setBackground(new java.awt.Color(1, 1, 1));\n endtimeval.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 18)); // NOI18N\n endtimeval.setForeground(new java.awt.Color(254, 254, 254));\n\n save.setBackground(new java.awt.Color(45, 99, 95));\n save.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 24)); // NOI18N\n save.setForeground(new java.awt.Color(254, 254, 254));\n save.setText(\"SAVE\");\n save.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveActionPerformed(evt);\n }\n });\n\n eventname2.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 24)); // NOI18N\n eventname2.setForeground(new java.awt.Color(254, 254, 254));\n eventname2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n eventname2.setText(\"Event Name\");\n\n eventname2val.setBackground(new java.awt.Color(1, 1, 1));\n eventname2val.setForeground(new java.awt.Color(254, 254, 254));\n eventname2val.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n eventname2valActionPerformed(evt);\n }\n });\n\n delete.setBackground(new java.awt.Color(45, 99, 95));\n delete.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 24)); // NOI18N\n delete.setForeground(new java.awt.Color(254, 254, 254));\n delete.setText(\"DELETE\");\n delete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n deleteActionPerformed(evt);\n }\n });\n\n back.setBackground(new java.awt.Color(45, 99, 95));\n back.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 24)); // NOI18N\n back.setForeground(new java.awt.Color(254, 254, 254));\n back.setText(\"BACK\");\n back.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backActionPerformed(evt);\n }\n });\n\n eventname_val.setBackground(new java.awt.Color(1, 1, 1));\n eventname_val.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 18)); // NOI18N\n eventname_val.setForeground(new java.awt.Color(254, 254, 254));\n eventname_val.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n eventname_valActionPerformed(evt);\n }\n });\n\n dateval.setBackground(new java.awt.Color(1, 1, 1));\n dateval.setForeground(new java.awt.Color(254, 254, 254));\n\n eventid.setBackground(new java.awt.Color(1, 1, 1));\n eventid.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 18)); // NOI18N\n eventid.setForeground(new java.awt.Color(254, 254, 254));\n\n eventname1.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 24)); // NOI18N\n eventname1.setForeground(new java.awt.Color(254, 254, 254));\n eventname1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n eventname1.setText(\"Event ID\");\n\n jLabel1.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 36)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(254, 254, 254));\n jLabel1.setText(\"MODIFY EVENT\");\n\n jLabel2.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 36)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(254, 254, 254));\n jLabel2.setText(\"DELETE EVENT\");\n\n back1.setBackground(new java.awt.Color(45, 99, 95));\n back1.setFont(new java.awt.Font(\"DejaVu Sans Condensed\", 3, 24)); // NOI18N\n back1.setForeground(new java.awt.Color(254, 254, 254));\n back1.setText(\"REFRESH\");\n back1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n back1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(174, 174, 174)\n .addComponent(save, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(eventname2, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(95, 95, 95)\n .addComponent(eventname2val, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(198, 198, 198)\n .addComponent(delete, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 88, Short.MAX_VALUE)\n .addComponent(back1, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(70, 70, 70)\n .addComponent(back, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(date, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(starttime, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE)\n .addComponent(endtime, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE)\n .addComponent(eventname, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(eventname1, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(starttimeval)\n .addComponent(endtimeval)\n .addComponent(dateval, javax.swing.GroupLayout.DEFAULT_SIZE, 303, Short.MAX_VALUE)\n .addComponent(eventname_val, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(eventid)))\n .addGroup(layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(66, 66, 66))\n .addGroup(layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 325, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(35, 35, 35)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(eventname_val, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(eventname, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(21, 21, 21)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(eventid, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(eventname1, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(dateval, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(date, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(starttimeval, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(starttime, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(47, 47, 47)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(endtimeval, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(endtime, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(save, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(33, 33, 33)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(39, 39, 39)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(eventname2, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(eventname2val, javax.swing.GroupLayout.DEFAULT_SIZE, 66, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(delete, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(back, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(back1, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n pack();\n }",
"private void onClickCreateAddressButton() {\n // Validate\n if (!formValidated()) {\n } else {\n\n ContentValues values = new ContentValues();\n values.put(\"address_form[id]\", \"\");\n values.put(\"address_form[first_name]\", name.getText().toString());\n values.put(\"address_form[last_name]\", family.getText().toString());\n values.put(\"address_form[address1]\", address.getText().toString());\n values.put(\"address_form[address2]\", postal_code.getText().toString());\n values.put(\"address_form[region]\", region_Id);\n values.put(\"address_form[city]\", city_Id);\n if (post_id != UNKNOWN_POSTAL_CODE) {\n values.put(\"address_form[postcode]\", post_id);\n } else {\n values.put(\"address_form[postcode]\", \"\");\n }\n values.put(\"address_form[phone]\", cellphone.getText().toString());\n values.put(\"address_form[is_default_shipping]\", 1);\n values.put(\"address_form[is_default_billing]\", 1);\n\n values.put(\"address_form[gender]\", gender_lable);\n\n\n triggerCreateAddress(createAddressUrl, values);\n }\n }",
"public void createAppointment(View v) {\n checkFields();\n\n // grab the info in the fields and turn it into usable stuff\n int mon = parseInt(month.getText().toString());\n int d = Integer.parseInt(day.getText().toString());\n int y = Integer.parseInt(year.getText().toString());\n int h = Integer.parseInt(hour.getText().toString());\n int min = Integer.parseInt(minute.getText().toString());\n String AorP = AMorPM.getText().toString();\n String p = place.getText().toString();\n\n\n // all of the fields have been checked now. Create a new appointment\n //Appointment apt = new Appointment(d, mon, y, h, min, AorP, p);\n Appointment apt = new Appointment();\n apt.setDay(d);\n apt.setMonth(mon);\n apt.setYear(y);\n apt.setHour(h);\n apt.setMinute(min);\n apt.setAmOrPm(AorP);\n apt.setPlace(p);\n apt.setConfirmed(false);\n apt.setTaken(false);\n\n // push it onto the database\n DatabaseReference aptsRef = ref.child(\"appointmentList\");\n aptsRef.push().setValue(apt);\n\n // send out a toast signalling that we've successfully created an appointment\n Toast.makeText(getApplicationContext(), \"Appointment successfully created\", Toast.LENGTH_SHORT).show();\n\n // now send the user back to the main activity -> with their membership number\n Intent intent = new Intent(this, MainActivity.class);\n intent.putExtra(MESSAGE, memberNumber);\n startActivity(intent);\n }",
"private void populateDataForEventEditObject(CalendarEventEdit eventEdit, SignupMeeting meeting,String title_suffix, \n\t\t\tDate startTime, Date endTime ){\n\t\tTimeService timeService = getSakaiFacade().getTimeService();\n\t\tTime start = timeService.newTime(startTime.getTime());\n\t\tTime end = timeService.newTime(endTime.getTime());\n\t\tTimeRange timeRange = timeService.newTimeRange(start, end, true, false);\n\t\teventEdit.setRange(timeRange);\n\t\t\n\t\tString attendeeNamesMarkup = \"\";\n\t\tint num = 0;\n\n if(meeting.getSignupTimeSlots().size() > 0) {\n attendeeNamesMarkup += \"<br /><br /><span style=\\\"font-weight: bold\\\"><b>\" + rb.getString(\"signup.event.attendees\") + \"</b></span><br />\";\n }\n\n boolean displayAttendeeName = false;\n for(SignupTimeslot ts : meeting.getSignupTimeSlots()) {\n \tdisplayAttendeeName = ts.isDisplayAttendees();//just need one of TS, it is not fine-grained yet\n \t//case: custom calender blocks, only print the related info\n \tif((startTime.getTime() <= ts.getStartTime().getTime()) && endTime.getTime() >= ts.getEndTime().getTime()){\n \t\tnum += ts.getAttendees().size();\n\t if(ts.isDisplayAttendees() && !ts.getAttendees().isEmpty()){\n\t \t//privacy issue\n\t\t for(SignupAttendee attendee : ts.getAttendees()) {\n\t\t attendeeNamesMarkup += (\"<span style=\\\"font-weight: italic\\\"><i>\" + sakaiFacade.getUserDisplayName(attendee.getAttendeeUserId()) + \"</i></span><br />\");\n\t\t }\n\t }\n \t}\n }\n \n if(!displayAttendeeName || num < 1){\n \tString currentAttendees = MessageFormat.format(rb.getString(\"signup.event.currentattendees\") ,new Object[] { num });\n \tattendeeNamesMarkup += (\"<span style=\\\"font-weight: italic\\\"><i>\" + currentAttendees + \"</i></span><br />\");\n }\n \n\t\tString desc = meeting.getDescription() + attendeeNamesMarkup;\n\t\teventEdit.setDescription(PlainTextFormat.convertFormattedHtmlTextToPlaintext(desc));\n\t\teventEdit.setLocation(meeting.getLocation());\n\t\tString eventTitleAttendees = MessageFormat.format(rb.getString(\"signup.event.attendeestitle\") ,new Object[] { num });\n\t\teventEdit.setDisplayName(meeting.getTitle() + title_suffix + \" (\" + eventTitleAttendees + \")\");\t\t\t\n\t\teventEdit.setRange(timeRange);\n\t}",
"public Event() {\n this.name = null;\n this.description = null;\n this.date = new GregorianCalendar();\n }",
"@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\tuf = new UserForm(AktuellerAnwender.getAnwender());\r\n\t\t\tRootPanel.get(\"details\").add(uf);\r\n\t\t}",
"@Override\r\n public void createEvent(EventBean event) throws BusinessLogicException {\n }",
"public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession.getEmployeeName(), CMSSession.getEmployeeId());\r\n\t\treturn ok(backdrop.render(firstDecision));\r\n\t}",
"@Override\n\tpublic EventDto createEvent(EventDto event) {\n\t\tEventEntity eventEntity=new EventEntity();\n\t\tBeanUtils.copyProperties(event, eventEntity);\n\t\t\n\t\tString eventid=utils.generateEventId(20);\n\t\teventEntity.setEventid(eventid);\n\t\t\n\t\tEventEntity storedEvent=eventRepository.save(eventEntity);\n\t\t\n\t\tEventDto returnvalue=new EventDto();\n\t\tBeanUtils.copyProperties(storedEvent, returnvalue);\n\t\t\n\t\treturn returnvalue;\n\t}",
"private void addNewAssessment() {\n //instantiate converters object for LocalDate conversion\n Converters c = new Converters();\n\n //get UI fields\n int courseId = thisCourseId;\n String title = editTextAssessmentTitle.getText().toString();\n LocalDate dueDate = c.stringToLocalDate(textViewAssessmentDueDate.getText().toString());\n String status = editTextAssessmentStatus.getText().toString();\n String note = editTextAssessmentNote.getText().toString();\n String type = editTextAssessmentType.getText().toString();\n\n if (title.trim().isEmpty() || dueDate == null || status.trim().isEmpty() || type.trim().isEmpty()) {\n Toast.makeText(this, \"Please complete all fields\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n //instantiate Assessment object\n Assessment assessment = new Assessment(courseId, title, dueDate, status, note, type);\n\n //add new assessment\n addEditAssessmentViewModel.insert(assessment);\n\n //notification\n Long longDue = c.localDateToMilliseconds(dueDate);\n makeAlarm(title+\" is due today.\", longDue);\n\n finish();\n }",
"@Override\n public void formPopulated(FormEvent fe) {\n formObject = FormContext.getCurrentInstance().getFormReference();\n\n formObject.setNGValue(\"purchasestatus\", \"\");\n formObject.setNGValue(\"purchaseremarks\", \"\");\n formObject.setNGValue(\"previousstatus\", \"\");\n formObject.setNGValue(\"returnpo\", \"\");\n\n String previousactivity = formObject.getNGValue(\"previousactivity\");\n if (previousactivity.equalsIgnoreCase(\"Initiator\")\n || previousactivity.equalsIgnoreCase(\"StoreMaker\")\n || previousactivity.equalsIgnoreCase(\"StoreChecker\")\n || previousactivity.equalsIgnoreCase(\"AccountsMaker\")\n || previousactivity.equalsIgnoreCase(\"AccountsChecker\")) {\n formObject.addComboItem(\"purchasestatus\", \"Hold\", \"Hold\");\n formObject.addComboItem(\"purchasestatus\", \"Exception Cleared\", \"Exception Cleared\");\n }\n\n if (previousactivity.equalsIgnoreCase(\"QualityMaker\")\n || previousactivity.equalsIgnoreCase(\"QualityChecker\")) {\n formObject.addComboItem(\"purchasestatus\", \"Hold\", \"Hold\");\n formObject.addComboItem(\"purchasestatus\", \"Replacement or Exchange\", \"Replacement or Exchange\");\n formObject.addComboItem(\"purchasestatus\", \"Purchase Return\", \"Purchase Return\");\n }\n\n formObject.clear(\"proctype\");\n Query = \"select HeadName from supplypoheadmaster order by HeadName asc\";\n System.out.println(\"Query is \" + Query);\n result = formObject.getDataFromDataSource(Query);\n for (int i = 0; i < result.size(); i++) {\n formObject.addComboItem(\"proctype\", result.get(i).get(0), result.get(i).get(0));\n }\n }",
"void onPrepareForRender() {\n\t\tcreatePersonsList();\n\n\t\t// If fresh start (ie. not rendering after a redirect), add an example person.\n\n\t\tif (form.isValid()) {\n\t\t\tpersons.set(0, new Person(\"Example\", \"Person\", Regions.EAST_COAST, getTodayDate()));\n\t\t}\n\t}",
"public Form(){\n\t\ttypeOfLicenseApp = new TypeOfLicencsApplication();\n\t\toccupationalTrainingList = new ArrayList<OccupationalTraining>();\n\t\taffiadavit = new Affidavit();\n\t\tapplicationForReciprocity = new ApplicationForReciprocity();\n\t\teducationBackground = new EducationBackground();\n\t\toccupationalLicenses = new OccupationalLicenses();\n\t\tofficeUseOnlyInfo = new OfficeUseOnlyInfo();\n\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\tString name=nameField.getText();\n\t\t\tString occupation=occupationField.getText();\n\t\t\t\n\t\t\tFormEvent eve= new FormEvent(this,name,occupation);\n\t\t\t//lista.add(eve);\n\t\t\t\n\t\t\t//if(formListener!=null){\n\t\t\t\t//formListener.formEventOcurred(eve);\n\t\t\t//}\n\t\t\t\n\t\t\tif(formListener!=null){\n\t\t\t\tformListener.formEventOcurred(eve);\n\t\t\t}\n\t\t\t\n\t\t}",
"public void createButtonFrame()\n {\n JFrame createFrame = new JFrame();\n createFrame.setSize(560,200);\n Container pane2;\n pane2 = createFrame.getContentPane();\n JPanel createPanel = new JPanel(null);\n createEvent = new JTextArea(\"MM/DD/YYYY\");\n timeField1 = new JTextArea(\"00:00\");\n timeField2 = new JTextArea(\"00:00\");\n EventNameField = new JTextArea(\"UNTILED NAME\");\n JLabel EnterEventLabel = new JLabel(\"Enter Event Name:\");\n JLabel EnterDateLabel = new JLabel(\"Date:\");\n JLabel EnterStartLabel = new JLabel(\"Start:\");\n JLabel EnterEndLabel = new JLabel(\"End:\");\n JLabel toLabel = new JLabel(\"to\");\n pane2.add(createPanel);\n createPanel.add(createEvent);\n createPanel.add(timeField1);\n createPanel.add(EventNameField);\n createPanel.add(timeField2);\n createPanel.add(create);\n createPanel.add(EnterEventLabel);\n createPanel.add(EnterDateLabel);\n createPanel.add(EnterStartLabel);\n createPanel.add(EnterEndLabel);\n createPanel.add(toLabel);\n\n createPanel.setBounds(0, 0, 400, 200); //panel\n createEvent.setBounds(20, 90, 100, 25); //Date field\n timeField1.setBounds(150, 90, 80, 25); //Time field\n timeField2.setBounds(280, 90, 80, 25); //Time field 2\n create.setBounds(380, 100, 150, 50); //Create Button\n\n EnterStartLabel.setBounds(150, 65, 80, 25);\n EnterEndLabel.setBounds(280, 65, 80, 25);\n toLabel.setBounds(250, 90, 80, 25);\n EnterDateLabel.setBounds(20, 65, 80, 25);\n EventNameField.setBounds(20, 30, 300, 25); //Event Name Field\n EnterEventLabel.setBounds(20, 5, 150, 25);\n\n\n\n\n createFrame.setVisible(true);\n createFrame.setResizable(false);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n txtEventID = new javax.swing.JTextField();\n txtEventName = new javax.swing.JTextField();\n txtEventBudget = new javax.swing.JTextField();\n comboOrganisation = new javax.swing.JComboBox<>();\n btnSubmit = new javax.swing.JButton();\n backBtn = new javax.swing.JButton();\n jLabel6 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n txtEventOutcome = new javax.swing.JTextArea();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel1.setText(\"Add an event\");\n\n jLabel2.setText(\"Event name\");\n\n jLabel3.setText(\"Organisation\");\n\n jLabel4.setText(\"Budget Needed\");\n\n jLabel5.setText(\"Event Id\");\n\n txtEventID.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtEventIDActionPerformed(evt);\n }\n });\n\n btnSubmit.setBackground(new java.awt.Color(255, 255, 255));\n btnSubmit.setText(\"Submit\");\n btnSubmit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSubmitActionPerformed(evt);\n }\n });\n\n backBtn.setBackground(new java.awt.Color(255, 255, 255));\n backBtn.setText(\"<<Back\");\n backBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backBtnActionPerformed(evt);\n }\n });\n\n jLabel6.setText(\"Budget Outcome\");\n\n txtEventOutcome.setColumns(20);\n txtEventOutcome.setRows(5);\n jScrollPane1.setViewportView(txtEventOutcome);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(77, 77, 77)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(backBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(36, 36, 36)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addGap(173, 173, 173)\n .addComponent(btnSubmit, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(txtEventName)\n .addComponent(txtEventBudget)\n .addComponent(txtEventID)\n .addComponent(comboOrganisation, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1))))\n .addContainerGap(89, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(jLabel1)\n .addGap(69, 69, 69)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txtEventID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtEventName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(comboOrganisation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtEventBudget, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(14, 14, 14)\n .addComponent(jLabel6))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnSubmit)\n .addComponent(backBtn))\n .addContainerGap(164, Short.MAX_VALUE))\n );\n }",
"public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}",
"public void createGenesisEvent() {\n handleNewEvent(buildEvent(null, null));\n }",
"@Override\n\t\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\t\tint eventSelection = eventOptions.getSelectionModel().getSelectedIndex();\n\t\t\t\t\t\tString description = new String(descriptionField.getText());\n\t\t\t\t\t\tdouble priceFactor = Double.parseDouble(priceFactorField.getText());\n\n\t\t\t\t\t\tif (eventSelection == 0) {\n\t\t\t\t\t\t\tConcert selection = new Concert(description, priceFactor);\n\t\t\t\t\t\t\tevents.add(selection);\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tmessage.setText(\"Concert event created.\\n\");\n\t\t\t\t\t\t} else if (eventSelection == 1) {\n\t\t\t\t\t\t\tPlay selection = new Play(description, priceFactor);\n\t\t\t\t\t\t\tevents.add(selection);\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tmessage.setText(\"Play event created.\\n\");\n\t\t\t\t\t\t} else if (eventSelection == 2) {\n\t\t\t\t\t\t\tMeeting selection = new Meeting(description, priceFactor);\n\t\t\t\t\t\t\tevents.add(selection);\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tmessage.setText(\"Meeting event created.\\n\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmessage.setText(\"Please choose Concert, Play, or Meeting from the Event Options list.\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprimaryStage.setTitle(\"Events\");\n\t\t\t\t\t\tprimaryStage.setScene(scene);\n\t\t\t\t\t}",
"public void submit(View view) {\n boolean boolRepeat = false;\n boolean boolReminder = false;\n int repeatOffset = 0;\n int color;\n\n EditText editTitle = findViewById(R.id.editTextName);\n String title;\n try {\n title = editTitle.getText().toString();\n if (title.equals(\"\")) {\n title = \"New Event\";\n }\n } catch (Exception e) {\n title = \"New Event\";\n }\n\n EditText editLocation = findViewById(R.id.editTextLocation);\n String location;\n try {\n location = editLocation.getText().toString();\n } catch (Exception e) {\n location = \"None\";\n }\n\n EditText editNotes = findViewById(R.id.editTextNotes);\n String notes;\n try {\n notes = editNotes.getText().toString();\n } catch (Exception e) {\n notes = \"None\";\n }\n\n final int hour1 = parseInt(startHour);\n final int minute1 = parseInt(startMinute);\n final int hour2 = parseInt(endHour);\n final int minute2 = parseInt(endMinute);\n\n Calendar startCalendar = Calendar.getInstance();\n Calendar endCalendar = Calendar.getInstance();\n\n Button btnDate = findViewById(R.id.editTextDate);\n date = btnDate.getText().toString();\n String[] numbers = date.split(\"/\");\n int year = parseInt(numbers[2]);\n int month = parseInt(numbers[0]) - 1;\n int day = parseInt(numbers[1]);\n\n startCalendar.set(year, month, day, hour1, minute1);\n endCalendar.set(year, month, day, hour2, minute2);\n\n\n if (!(repeat.equals(\"Never\"))) {\n boolRepeat = true;\n switch (repeat) {\n case \"Daily\":\n repeatOffset = 1;\n break;\n case \"Weekly\":\n repeatOffset = 2;\n break;\n case \"Biweekly\":\n repeatOffset = 3;\n break;\n case \"Monthly\":\n repeatOffset = 4;\n break;\n default:\n repeatOffset = 0;\n break;\n }\n }\n\n if (!(reminder.equals(\"Never\"))) {\n boolReminder = true;\n\n }\n\n switch (groupColor) {\n case \"Orange\":\n color = R.color.orange;\n break;\n case \"Yellow\":\n color = R.color.yellow;\n break;\n case \"Green\":\n color = R.color.green;\n break;\n case \"Blue\":\n color = R.color.blue;\n break;\n case \"Purple\":\n color = R.color.purple_200;\n break;\n case \"Red\":\n default:\n color = R.color.red;\n break;\n }\n\n Switch gradedSwitch = findViewById(R.id.gradedSwitch);\n Boolean graded = gradedSwitch.isChecked();\n\n Event event = new Event(title, startCalendar, endCalendar, color,\n location, boolRepeat, repeatOffset, boolReminder, notes, graded, grade);\n /* Toast.makeText(getApplicationContext(),\n event.getEventStart().get(Calendar.MONTH) + \"/\" +\n event.getEventStart().get(Calendar.DATE), Toast.LENGTH_LONG)\n .show(); */\n\n if (!editing) {\n eventId = eventDao.insert(event);\n if (boolRepeat) {\n repeat(eventId);\n }\n event.setId(eventId);\n if (event.getSendReminders()) {\n event.setRemindOffset(getRemindOffset());\n NotificationPublisher.scheduleEventNotification(this, event);\n }\n\n if (event.isGraded()) {\n NotificationPublisher.scheduleGradeEventNotification(this, event);\n }\n\n Intent intent = new Intent(this, DayViewV2.class);\n intent.putExtra(dateMessage, date);\n startActivity(intent);\n } else {\n event.setReviewNote(reviewNote);\n event.setId(eventId);\n eventDao.updateEvent(event);\n Intent intent = new Intent(this, EventView.class);\n intent.putExtra(eventMessage, eventId);\n startActivity(intent);\n }\n finish();\n }",
"private void createForm(ArrayList<HashMap<String, String>> data) {\n\t\tLayoutInflater inflater = LayoutInflater.from(IPropertyRegistrationActivity.this);\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT,\n\t\t\t\tandroid.widget.LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\tparams.topMargin = 10;\n\n\t\tfields = data;\n\t\tLinearLayout layout = null;\n\t\tint len = fields.size();\n\t\tfor (int j = 0; j < len; j++) {\n\t\t\tfinal HashMap<String, String> field = fields.get(j);\n\t\t\tView fieldView = inflater.inflate(R.layout.iproperty_registration_dynamic_view_item, null);\n\n\t\t\tif (field.get(TYPE).equals(LABEL)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrLabel));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditArea));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\n\t\t\t\tif (field.get(VALUE).toString().trim().length() > 0) {\n\t\t\t\t\tedit.setText(field.get(VALUE));\n\t\t\t\t} else {\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tfinal ImageView imgMap;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditMap));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\timgMap = ((ImageView) layout.findViewById(R.id.imgMap));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.state))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getAdminArea().replace(address.getCountryName() == null ? \"\" : address.getCountryName(), \"\")\n\t\t\t\t\t\t\t\t.replace(address.getPostalCode() == null ? \"\" : address.getPostalCode(), \"\"));\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(NAME).equalsIgnoreCase(getString(R.string.city_town))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getSubAdminArea());\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\timgMap.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\teditMap = edit;\n\t\t\t\t\t\tIntent intent = new Intent(IPropertyRegistrationActivity.this, IjoomerMapAddress.class);\n\t\t\t\t\t\tstartActivityForResult(intent, GET_ADDRESS_FROM_MAP);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(SELECT)) {\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrSpin));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tfinal Spinner spn;\n\t\t\t\tspn = ((Spinner) layout.findViewById(R.id.txtValue));\n\t\t\t\tspn.setAdapter(IjoomerUtilities.getSpinnerAdapter(field));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.country))) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tString country = address.getCountryName();\n\t\t\t\t\t\tint selectedIndex = 0;\n\t\t\t\t\t\tJSONArray jsonArray = null;\n\n\t\t\t\t\t\tjsonArray = new JSONArray(field.get(OPTIONS));\n\t\t\t\t\t\tint optionSize = jsonArray.length();\n\t\t\t\t\t\tfor (int k = 0; k < optionSize; k++) {\n\t\t\t\t\t\t\tJSONObject options = (JSONObject) jsonArray.get(k);\n\n\t\t\t\t\t\t\tif (options.getString(VALUE).equalsIgnoreCase(country)) {\n\t\t\t\t\t\t\t\tselectedIndex = k;\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\tspn.setSelection(selectedIndex);\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tspn.setSelection(0);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getDateDialog(((IjoomerEditText) v).getText().toString(), true, new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(TIME)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getTimeDialog(((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getMultiSelectionDialog(field.get(NAME), field.get(OPTIONS), ((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (field.get(REQUIRED).equalsIgnoreCase(\"1\")) {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME) + \" *\");\n\t\t\t} else {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t}\n\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEdit)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditArea)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrSpin)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrLabel)).setVisibility(View.GONE);\n\n\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrReadOnly));\n\t\t\tlayout.setVisibility(View.VISIBLE);\n\n\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t((IjoomerEditText) layout.findViewById(R.id.txtValue)).setText(field.get(VALUE));\n\t\t\tfieldView.setTag(field);\n\t\t\tlnr_form.addView(fieldView, params);\n\t\t}\n\t}",
"public ScheduleForm() {\n initComponents();\n }",
"private void createEvent() \n\t{\n\t\t// When the user clicks on the add button\n\t\tbtnAdd.addActionListener(new ActionListener() \n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\t//////////////////////////////////\n\t\t\t\t//////////////////////////////////\n\t\t\t\t//Adding Info To Reservation.txt//\n\t\t\t\t//////////////////////////////////\n\t\t\t\t//////////////////////////////////\n\t\t\t\t/**\n\t\t\t\t * First i surround the whole with with try.. catch block\n\t\t\t\t * First in the try block \n\t\t\t\t * i get the values of the check-in and check-out info\n\t\t\t\t * i save them in strings \n\t\t\t\t * then cast them in integers \n\t\t\t\t * and finally add it to Reservation.txt\n\t\t\t\t * then i close the file.\n\t\t\t\t */\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tObject HotelID = cbHotelsOptions.getSelectedItem();\n\t\t\t\t\tHotel hotel;\n\t\t\t\t\thotel = (Hotel) HotelID;\n\t\t\t\t\tlong id = hotel.getUniqueId();\n\t\t\t\t\t//\tSystem.out.println(id);\n\t\t\t\t\tString inmonth = txtInMonth.getText();\n\t\t\t\t\tint inMonth = Integer.valueOf(inmonth);\n\t\t\t\t\tString inday = txtInDay.getText();\n\t\t\t\t\tint inDay = Integer.parseInt(inday);\n\t\t\t\t\tString outmonth = txtOutMonth.getText();\n\t\t\t\t\tint outMonth = Integer.valueOf(outmonth);\n\t\t\t\t\tString outday = txtOutDay.getText();\n\t\t\t\t\tint OutDay = Integer.parseInt(outday);\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\"Reservation.txt\", true);\n\t\t\t\t\tPrintWriter pw = new PrintWriter(fos);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * i then check the canBook method and according to the canBook method \n\t\t\t\t\t * i check if they can book, and if yes i add the reservation\n\t\t\t\t\t * otherwise it prints so the user may enter different values\n\t\t\t\t\t */\n\t\t\t\t\t{\n\t\t\t\t\t\tif(h.canBook(new Reservation(id,inMonth, inDay, OutDay)) == true) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treservation.add(new Reservation (id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\tr = new Reservation (id,inMonth, inDay, OutDay);\n\t\t\t\t\t\t\th.addResIfCanBook(new Reservation(id,inMonth, inDay, outMonth, OutDay));\n\t\t\t\t\t\t\treservationsModel.addElement(r);\n\t\t\t\t\t\t\tpw.println( id + \" - \" + inMonth + \"-\"+ inDay+ \" - \" + outMonth + \"-\" + OutDay);\n\t\t\t\t\t\t\tpw.close();\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"These dates are already reserved\"\n\t\t\t\t\t\t\t\t\t+ \"\\nPlease try again!\");\t\n\t\t\t\t\t\t\ttxtInMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtOutMonth.setText(\"\");\n\t\t\t\t\t\t\ttxtInDay.setText(\"\");\n\t\t\t\t\t\t\ttxtOutDay.setText(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t/**\n\t\t\t\t * Then the catch Block checks for file not found exception\n\t\t\t\t */\n\t\t\t\tcatch (FileNotFoundException fnfe) \n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"File not found.\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// When the user selects a specific hotel \n\t\tcbHotelsOptions.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * first i save selected hotel in a hotel object\n\t\t\t\t * then i get reservations for the selected hotel\n\t\t\t\t * then i make all the labels and text fields visible \n\t\t\t\t */\n\t\t\t\tHotel selectedHotel = (Hotel)cbHotelsOptions.getSelectedItem();\n\t\t\t\tJOptionPane.showMessageDialog(null, \"You selected the \" + selectedHotel.getHotelName());\n\t\t\t\tselectedHotel.getReservations();\n\t\t\t\tlblCheckIn.setVisible(true);\n\t\t\t\tlblInMonth.setVisible(true);\n\t\t\t\ttxtInMonth.setVisible(true);\n\t\t\t\tlblInDay.setVisible(true);\n\t\t\t\ttxtInDay.setVisible(true);\n\t\t\t\tlblCheckout.setVisible(true);\n\t\t\t\tlblOutMonth.setVisible(true);\n\t\t\t\ttxtOutMonth.setVisible(true);\n\t\t\t\tlblOutDay.setVisible(true);\n\t\t\t\ttxtOutDay.setVisible(true);\n\t\t\t\tbtnAdd.setVisible(true);\n\t\t\t\treservationsModel.removeAllElements();\n\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t//Reading Info From Reservation.txt//\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t/////////////////////////////////////\n\t\t\t\t/**\n\t\t\t\t * First i surround everything is a try.. catch blocks \n\t\t\t\t * then in the try block i declare the file input stream\n\t\t\t\t * then a scanner \n\t\t\t\t * then in a while loop i check if the file has next line \n\t\t\t\t * and a user a delimiter \"-\"\n\t\t\t\t * and it adds it to a new reservation\n\t\t\t\t * then it adds it to the ArrayList reservation\n\t\t\t\t * and it also adds it to the hotel object\n\t\t\t\t * then it checks if it can book that hotel\n\t\t\t\t * and if yes it adds it to the ReservationsModel\n\t\t\t\t */\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tFileInputStream fis = new FileInputStream(\"Reservation.txt\");\n\t\t\t\t\tScanner fscan = new Scanner (fis);\n\t\t\t\t\tint INMonth = 0;\n\t\t\t\t\tint INday = 0;\n\t\t\t\t\tint OUTmonth = 0;\n\t\t\t\t\tint OUTday = 0;\n\t\t\t\t\tlong iD = 0;\n\t\t\t\t\twhile (fscan.hasNextLine())\n\t\t\t\t\t{\n\t\t\t\t\t\tScanner ls = new Scanner (fscan.nextLine());\n\t\t\t\t\t\tls.useDelimiter(\"-\");\n\t\t\t\t\t\tiD = Integer.parseInt(ls.next().trim());\n\t\t\t\t\t\tINMonth = Integer.parseInt(ls.next().trim());\n\t\t\t\t\t\tINday = Integer.parseInt(ls.next().trim()); \n\t\t\t\t\t\tOUTmonth = Integer.parseInt(ls.next().trim());\n\t\t\t\t\t\tOUTday = Integer.parseInt(ls.next().trim()); \n\t\t\t\t\t\tr = new Reservation (iD,INMonth, INday, OUTmonth, OUTday);\n\t\t\t\t\t\th.addReservation(new Reservation(iD,INMonth, INday, OUTmonth, OUTday));\n\t\t\t\t\t\tHotel hotel = (Hotel) cbHotelsOptions.getSelectedItem();\n\t\t\t\t\t\tlong hotID = hotel.getUniqueId();\n\t\t\t\t\t\tif(iD == hotID)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treservationsModel.addElement((new Reservation(iD, INMonth, INday, OUTday)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * The catch block checks to make sure that the file is found\n\t\t\t\t */\n\t\t\t\tcatch( FileNotFoundException fnfe)\n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"File not found!\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * This is the setRenderer to make the hotel appear in the hotelsOptions \n\t\t * just the hotel name.\n\t\t */\n\t\tcbHotelsOptions.setRenderer(new DefaultListCellRenderer() {\n\t\t\t@Override\n\t\t\tpublic Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus)\n\t\t\t{\n\t\t\t\tComponent renderer = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n\t\t\t\tif (renderer instanceof JLabel && value instanceof Hotel)\n\t\t\t\t{\n\t\t\t\t\t// Here value will be of the Type 'Hotel'\n\t\t\t\t\t((JLabel) renderer).setText(((Hotel) value).getHotelName());\n\t\t\t\t}\n\t\t\t\treturn renderer;\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * The setCallRenderer is for the reservation's list\n\t\t * it only prints the check-in and check-out info\n\t\t */\n\t\tlstReservation.setCellRenderer(new DefaultListCellRenderer() {\n\t\t\t@Override\n\t\t\tpublic Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus)\n\t\t\t{\n\t\t\t\tComponent renderer = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n\t\t\t\tif (renderer instanceof JLabel && value instanceof Reservation)\n\t\t\t\t{\n\t\t\t\t\t// Here value will be of the Type 'Reservation'\n\t\t\t\t\tHotel selectedHotel = (Hotel) cbHotelsOptions.getSelectedItem();\n\t\t\t\t\t((JLabel) renderer).setText(((Reservation) value).getFormattedDisplayString());\n\t\t\t\t}\n\t\t\t\treturn renderer;\n\t\t\t}\n\t\t});\t\n\t}",
"public AnalyticsEvent build() {\n AnalyticsEvent purchaseEvent = null;\n if(isValid() && doBaseValidation()) {\n purchaseEvent = eventClient.createEvent(PURCHASE_EVENT_NAME);\n\n purchaseEvent.addAttribute(PURCHASE_EVENT_PRODUCT_ID_ATTR, productId);\n purchaseEvent.addAttribute(PURCHASE_EVENT_STORE_ATTR, store);\n purchaseEvent.addMetric(PURCHASE_EVENT_QUANTITY_METRIC, quantity);\n\n if(formattedItemPrice != null) {\n purchaseEvent.addAttribute(PURCHASE_EVENT_PRICE_FORMATTED_ATTR, formattedItemPrice);\n }\n\n if(itemPrice != null) {\n purchaseEvent.addMetric(PURCHASE_EVENT_ITEM_PRICE_METRIC, itemPrice);\n }\n\n if(transactionId != null) {\n purchaseEvent.addAttribute(PURCHASE_EVENT_TRANSACTION_ID_ATTR, transactionId);\n }\n\n if(currency != null) {\n purchaseEvent.addAttribute(PURCHASE_EVENT_CURRENCY_ATTR, currency);\n }\n }\n \n return purchaseEvent;\n }",
"public void onCreate() {\r\n Session session = sessionService.getCurrentSession();\r\n Map<String, Region> items = ControlUtility.createForm(Pc.class);\r\n\r\n ControlUtility.fillComboBox((ComboBox<Kind>) items.get(\"Kind\"), session.getCampaign().getCampaignVariant().getKinds());\r\n ControlUtility.fillComboBox((ComboBox<Race>) items.get(\"Race\"), session.getCampaign().getCampaignVariant().getRaces());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Ability>) items.get(\"SavingThrows\"), Arrays.asList(Ability.values()));\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Proficiency>) items.get(\"Proficiencies\"), session.getCampaign().getCampaignVariant().getProficiencies());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Feature>) items.get(\"Features\"), session.getCampaign().getCampaignVariant().getFeatures());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Trait>) items.get(\"Traits\"), session.getCampaign().getCampaignVariant().getTraits());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Equipment>) items.get(\"Equipment\"), session.getCampaign().getCampaignVariant().getEquipments());\r\n\r\n Campaign campaign = session.getCampaign();\r\n\r\n Dialog<String> dialog = ControlUtility.createDialog(\"Create Playable Character\", items);\r\n dialog.show();\r\n\r\n dialog.setResultConverter(buttonType -> {\r\n if (buttonType != null) {\r\n Pc pc = null;\r\n try {\r\n pc = ControlUtility.controlsToValues(Pc.class, items);\r\n } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InstantiationException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n if (pc != null) {\r\n try {\r\n characterService.createPlayerCharacter(pc);\r\n } catch (SessionAlreadyExists | IndexAlreadyExistsException sessionAlreadyExists) {\r\n sessionAlreadyExists.printStackTrace();\r\n }\r\n try {\r\n playerManagementService.addOrUpdatePcForRegisteredPlayer(pc);\r\n Player player = playerManagementService.getRegisteredPlayer();\r\n campaign.addPlayer(player);\r\n campaign.addCharacter(pc);\r\n if (campaignListingService.campaignExists(campaign.getId())) {\r\n manipulationService.updateCampaign(campaign);\r\n } else {\r\n manipulationService.createCampaign(campaign);\r\n }\r\n } catch (MultiplePlayersException | EntityNotFoundException | SessionAlreadyExists | IndexAlreadyExistsException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n playerManagementService.addOrUpdatePcForRegisteredPlayer(pc);\r\n } catch (MultiplePlayersException | EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n sessionService.updateParticipant(playerManagementService.getRegisteredPlayer().getId(), pc.getId());\r\n sessionService.updateCampaign(campaign);\r\n } catch (EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n render();\r\n return pc.toString();\r\n }\r\n }\r\n return null;\r\n });\r\n }",
"private void setFields() {\n\t\tfirstname.setText(guest.getFirstName());\n\t\tlastname.setText(guest.getLastName());\n\t\tpassport.setText(guest.getPassportNumber());\n\t\ttelephone.setText(guest.getTelephoneNumber());\n\t\tarrival.setText(arrivalDate.toString());\n\t\tdeparture.setText(departureDate.toString());\n\n\t\tif (hotelChoice.getName() != null && hotelChoice.getName() != \"\"\n\t\t\t\t&& !(hotelChoice.getName() == Controller.DEFAULT_HOTEL_CHOICE)) {\n\t\t\thotel.setText(hotelChoice.getName());\n\t\t} else {\n\t\t\thotelChoice = new Hotel();\n\t\t\thotelChoice.setName(\"\");\n\t\t\thotel.clear();\n\t\t}\n\t\tif (roomQualityChoice.getQuality() != null && roomQualityChoice.getQuality() != \"\"\n\t\t\t\t&& !(roomQualityChoice.getQuality() == Controller.DEFAULT_QUALITY_CHOICE)) {\n\t\t\tquality.setText(roomQualityChoice.getQuality());\n\t\t} else {\n\t\t\troomQualityChoice = new RoomQuality();\n\t\t\troomQualityChoice.setQuality(\"\");\n\t\t\tquality.clear();\n\t\t}\n\t\tif (discountChoice > 0) {\n\t\t\tdiscount.setText(\"(-\" + discountChoice + \"%)\");\n\t\t}\n\n\t\tloadAvailableRooms();\n\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString eventName = edittext_event_name.getText().toString().trim();\n\t\t\t\tString eventLimit = edittext_event_limit.getText().toString().trim();\n\t\t\t\t// Check for server connectivity issues\n\t\t\t\tif (!checkServer(CreateEventActivity.this)) {\n\t\t\t\t\t/*Toast.makeText(CreateEventActivity.this, \"Server issue exists\",\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();*/\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (chosenGame.equals(\"\")) {\n\t\t\t\t\tToast.makeText(CreateEventActivity.this, \"Please select a game to invite\",\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (eventName.equals(\"\")) {\n\t\t\t\t\tToast.makeText(CreateEventActivity.this, \"Please enter an event name\",\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (eventLimit.equals(\"\")) {\n\t\t\t\t\tToast.makeText(CreateEventActivity.this, \"Please set the event limit\",\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Call the execute method for AsyncTask\n\t\t\t\tnew eventCreation().execute();\n\t\t\t}",
"public void createEvent(String eventTitle, Date eventStartDate, Date eventEndDate, String description){\n Event event = new Event(\n eventTitle, eventStartDate, eventEndDate, description, this.userId\n );\n\n }",
"private void prepareInformation() {\r\n TextView textDate = findViewById(R.id.textDate);\r\n String date = event.getStartDateFormatted() + \" - \" + event.getEndDateFormatted();\r\n textDate.setText(date);\r\n\r\n TextView textNumber = findViewById(R.id.textNumber);\r\n textNumber.setText(event.contactNumber);\r\n\r\n TextView textWebsite = findViewById(R.id.textWebsite);\r\n textWebsite.setText(event.homePage);\r\n\r\n TextView textMail = findViewById(R.id.textMail);\r\n textMail.setText(event.mail);\r\n\r\n TextView textDescription = findViewById(R.id.textDescription);\r\n textDescription.setText(event.description);\r\n }",
"@TargetApi(Build.VERSION_CODES.HONEYCOMB)\n\t@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.event_details);\n\t\tgetActionBar().setDisplayHomeAsUpEnabled(true);\n\n\t\ttitle = (TextView) findViewById(R.id.event_name);\n\t\torganization = (TextView) findViewById(R.id.organization);\n\t\tdepartment = (TextView) findViewById(R.id.department);\n\t\tlocation = (TextView) findViewById(R.id.location);\n\t\tdate = (TextView) findViewById(R.id.date);\n\t\ttime = (TextView) findViewById(R.id.time);\n\t\tdescription = (TextView) findViewById(R.id.description);\n\n\t\tIntent i = getIntent();\n\t\tevent = (EventData)i.getSerializableExtra(\"the_event\");\n\n\t\ttitle.setText(event.getTitle());\n\t\torganization.setText(event.getOrganization());\n\t\tif (event.getOrganization().equals(event.getDepartment()))\n\t\t\tdepartment.setText(\"\");\n\t\telse\n\t\t\tdepartment.setText(event.getDepartment());\n\t\tlocation.setText(event.getLocation());\n\t\tif (event.getDateFrom().equals(event.getDateTo())) \n\t\t\tdate.setText(event.getRegularDateFrom());\n\t\telse \n\t\t\tdate.setText(event.getRegularDateFrom() + \" to \" + event.getRegularDateTo());\n\n\t\tif (event.getTimeFrom().equals(event.getTimeTo())) \n\t\t\ttime.setText(event.getRegularTimeFrom());\n\t\telse \n\t\t\ttime.setText(event.getRegularTimeFrom() + \" to \" + event.getRegularTimeTo());\n\t\tdescription.setText(event.getDescription());\n\n\t\tfinal Button calendar = (Button) findViewById(R.id.btn1);\n\t\tcalendar.setOnClickListener(new View.OnClickListener() {\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tCalendar cal = Calendar.getInstance(); \n\t\t\t\tIntent intent = new Intent(Intent.ACTION_EDIT);\n\t\t\t\tintent.setType(\"vnd.android.cursor.item/event\");\n\t\t\t\tintent.putExtra(\"beginTime\", event.getBeginTime());\n\t\t\t\tintent.putExtra(\"endTime\", event.getEndTime());\n\t\t\t\tintent.putExtra(\"title\", event.getOrganization() + \"- \" + event.getTitle());\n\t\t\t\tintent.putExtra(Events.EVENT_LOCATION, event.getLocation());\n\t\t\t\tintent.putExtra(Events.DESCRIPTION, event.getDescription());\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\n\t\tfinal Button reminder = (Button) findViewById(R.id.btn2);\n\t\treminder.setOnClickListener(new View.OnClickListener() {\n\t\t\tprivate Calendar mcurrentTime;\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmcurrentTime = Calendar.getInstance();\n\n\t\t\t\tDatePickerDialog datePicker = new DatePickerDialog(EventDetailsActivity.this, new DatePickerDialog.OnDateSetListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onDateSet(DatePicker view, int year, int monthOfYear,\n\t\t\t\t\t\t\tint dayOfMonth) {\n\t\t\t\t\t\tmcurrentTime.set(Calendar.YEAR, year);\n\t\t\t\t\t\tmcurrentTime.set(Calendar.MONTH, monthOfYear);\n\t\t\t\t\t\tmcurrentTime.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n\t\t\t\t\t}\n\t\t\t\t}, mcurrentTime.get(Calendar.YEAR), mcurrentTime.get(Calendar.MONTH), mcurrentTime.get(Calendar.DAY_OF_MONTH));\n\t\t\t\t\n\t\t\t\t//now add the time\n\t\t\t\tint hour = mcurrentTime.get(Calendar.HOUR_OF_DAY);\n\t\t\t\tint minute = mcurrentTime.get(Calendar.MINUTE);\n\t\t\t\tTimePickerDialog mTimePicker = new TimePickerDialog(EventDetailsActivity.this, new TimePickerDialog.OnTimeSetListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {\n\t\t\t\t\t\tmcurrentTime.set(Calendar.HOUR_OF_DAY, selectedHour);\n\t\t\t\t\t\tmcurrentTime.set(Calendar.MINUTE, selectedMinute);\n\n\t\t\t\t\t\t//create alarm notification\n\t\t\t\t\t\tcreateAlarm(mcurrentTime);\n\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\"Sucessfully added reminder\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}, hour, minute, false);\n\t\t\t\t\n\t\t\t\tmTimePicker.setTitle(\"Select Time\");\n\t\t\t\tmTimePicker.show();\n\t\t\t\t\n\t\t\t\tdatePicker.show();\n\t\t\t\tdatePicker.setTitle(\"Select Date\");\n\t\t\t}\n\t\t});\n\t}",
"private void submitNewUser() {\n\t\tboolean validationFlag = true;\n\t\tArrayList<HashMap<String, String>> signUpFields = new ArrayList<HashMap<String, String>>();\n\t\tint size = lnr_form.getChildCount();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tLinearLayout v = (LinearLayout) lnr_form.getChildAt(i);\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tHashMap<String, String> field = (HashMap<String, String>) v.getTag();\n\n\t\t\tIjoomerEditText edtValue = null;\n\t\t\tSpinner spnrValue = null;\n\n\t\t\tif (field != null) {\n\t\t\t\tif (field.get(TYPE).equals(TEXT)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEdit)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditArea)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrPassword)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditMap)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(\"type\").equals(LABEL)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrLabel)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\n\t\t\t\t\tif (edtValue.getText().toString().trim().length() > 0) {\n\t\t\t\t\t\tif (!IjoomerUtilities.birthdateValidator(edtValue.getText().toString().trim())) {\n\t\t\t\t\t\t\tedtValue.setFocusable(true);\n\t\t\t\t\t\t\tedtValue.setError(getString(R.string.validation_invalid_birth_date));\n\t\t\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\t\t\t\t}\n\t\t\t\tif (field.get(TYPE).equals(TIME)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\t\t\t\t}\n\n\t\t\t\tif (field.get(TYPE).equals(SELECT)) {\n\t\t\t\t\tspnrValue = (Spinner) ((LinearLayout) v.findViewById(R.id.lnrSpin)).findViewById(R.id.txtValue);\n\t\t\t\t\tfield.put(VALUE, spnrValue.getSelectedItem().toString());\n\t\t\t\t\tsignUpFields.add(field);\n\t\t\t\t} else if (field.get(TYPE).equals(PASSWORD) && field.get(NAME).equals(\"Retype Password\")) {\n\t\t\t\t\tint len = lnr_form.getChildCount();\n\t\t\t\t\tfor (int j = 0; j < len; j++) {\n\t\t\t\t\t\tLinearLayout view = (LinearLayout) lnr_form.getChildAt(i);\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tHashMap<String, String> row = (HashMap<String, String>) view.getTag();\n\t\t\t\t\t\tif (row.get(TYPE).equals(PASSWORD) && field.get(NAME).equals(\"Password\")) {\n\t\t\t\t\t\t\tString password = ((IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrPassword)).findViewById(R.id.txtValue)).getText().toString();\n\t\t\t\t\t\t\tif (password.equals(edtValue.getText().toString())) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tedtValue.setError(getString(R.string.validation_password_not_match));\n\t\t\t\t\t\t\t\tvalidationFlag = false;\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} else if (edtValue != null && edtValue.getText().toString().trim().length() <= 0 && (field.get(REQUIRED).equals(\"1\"))) {\n\t\t\t\t\tedtValue.setError(getString(R.string.validation_value_required));\n\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t} else {\n\t\t\t\t\tfield.put(VALUE, edtValue.getText().toString().trim());\n\t\t\t\t\tsignUpFields.add(field);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (validationFlag) {\n\t\t\tfinal SeekBar proSeekBar = IjoomerUtilities.getLoadingDialog(getString(R.string.dialog_loading_register_newuser));\n\t\t\tnew IjoomerRegistration(this).submitNewUser(signUpFields, new WebCallListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onProgressUpdate(int progressCount) {\n\t\t\t\t\tproSeekBar.setProgress(progressCount);\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onCallComplete(final int responseCode, String errorMessage, ArrayList<HashMap<String, String>> data1, Object data2) {\n\t\t\t\t\tif (responseCode == 200) {\n\t\t\t\t\t\tIjoomerUtilities.getCustomOkDialog(getString(R.string.dialog_loading_profile), getString(R.string.registration_successfully), getString(R.string.ok),\n\t\t\t\t\t\t\t\tR.layout.ijoomer_ok_dialog, new CustomAlertNeutral() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void NeutralMethod() {\n\n\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(\"clearStackActivity\");\n\t\t\t\t\t\t\t\t\t\tintent.setType(\"text/plain\");\n\t\t\t\t\t\t\t\t\t\tsendBroadcast(intent);\n\t\t\t\t\t\t\t\t\t\tIjoomerWebService.cookies = null;\n\n\t\t\t\t\t\t\t\t\t\tloadNew(IjoomerLoginActivity.class, IPropertyRegistrationActivity.this, true);\n\t\t\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tIjoomerUtilities.getCustomOkDialog(getString(R.string.dialog_loading_profile),\n\t\t\t\t\t\t\t\tgetString(getResources().getIdentifier(\"code\" + responseCode, \"string\", getPackageName())), getString(R.string.ok), R.layout.ijoomer_ok_dialog,\n\t\t\t\t\t\t\t\tnew CustomAlertNeutral() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void NeutralMethod() {\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}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}",
"@FXML\n\tpublic void createClient(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString names = txtClientNames.getText();\n\t\tString surnames = txtClientSurnames.getText();\n\t\tString id = txtClientId.getText();\n\t\tString adress = txtClientAdress.getText();\n\t\tString phone = txtClientPhone.getText();\n\t\tString observations = txtClientObservations.getText();\n\n\t\tif (!names.equals(empty) && !surnames.equals(empty) && !id.equals(empty) && !adress.equals(empty)\n\t\t\t\t&& !phone.equals(empty) && !observations.equals(empty)) {\n\t\t\tcreateClient(names, surnames, id, adress, phone, observations, 1);\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.setContentText(\"Todos los campos de texto deben ser llenados\");\n\t\t\tdialog.show();\n\t\t}\n\t}",
"public AuditFunctionForm() {\n initComponents();\n init();\n }",
"public static void createEvent(String token){\n ensureGraphClient(token);\n\n LinkedList<Option> requestOptions = new LinkedList<Option>();\n //requestOptions.add(new HeaderOption(\"Authorization\", \"Bearer nupl9.C5rb]aO5:yvT:3L.TKcH7tB1Im\" ));\n\n // Participantes:\n LinkedList<Attendee> attendeesList = new LinkedList<Attendee>();\n Attendee mentor = new Attendee();\n Attendee mentorado = new Attendee();\n\n EmailAddress mentorMail = new EmailAddress();\n mentorMail.address = \"[email protected]\";\n mentorMail.name = \"Daniell Wagner\";\n mentor.emailAddress = mentorMail;\n\n EmailAddress mentoradoMail = new EmailAddress();\n mentoradoMail.address = \"[email protected]\";\n mentoradoMail.name = \"Guilherme Carneiro\";\n mentorado.emailAddress = mentoradoMail;\n\n mentor.type = AttendeeType.REQUIRED;\n mentorado.type = AttendeeType.REQUIRED;\n\n attendeesList.add(mentor);\n attendeesList.add(mentorado);\n\n // Evento:\n Event event = new Event();\n event.subject = \"Mentoria com \" + mentor.emailAddress.name;\n\n ItemBody body = new ItemBody();\n body.contentType = BodyType.HTML;\n body.content = \"\" +\n \"<b>Mentoria sobre SCRUM</b> <br>\" +\n \"Olá, \" + mentorado.emailAddress.name + \" <br> \" +\n \"Você tem uma mentoria marcada com o mentor \"\n + mentor.emailAddress.name + \"!!\";\n\n event.body = body;\n\n DateTimeTimeZone start = new DateTimeTimeZone();\n start.dateTime = \"2020-03-26T16:00:00\";\n start.timeZone = \"Bahia Standard Time\";\n event.start = start;\n\n DateTimeTimeZone end = new DateTimeTimeZone();\n end.dateTime = \"2020-03-26T18:00:00\";\n end.timeZone = \"Bahia Standard Time\";\n event.end = end;\n\n Location location = new Location();\n location.displayName = \"Stefanini Campina Grande\";\n event.location = location;\n\n event.attendees = attendeesList;\n\n try {\n graphClient.me().calendar().events()\n .buildRequest()\n .post(event);\n }catch(Exception e) {\n\n System.out.println(\"Deu águia: \");\n e.printStackTrace();\n }\n }",
"public CreateEventFragment() {\n // Required empty public constructor\n }",
"public void addEvent() {\n TimetableUserItem event;\n try {\n String description = getDescription();\n String date = getDate();\n String startTime = getStartTime();\n String endTime = getEndTime();\n verifyCorrectTime(startTime, endTime);\n String location = getLocation();\n event = new TimetableUserItem(description, date, startTime, endTime, location);\n verifyNoConflict(event);\n timetable.addEvent(event.getDayOfWeek(), event);\n timetable.addToEvents(event);\n addUI.printEventMessage(event);\n } catch (AddException e) {\n e.printMessage();\n logger.log(Level.WARNING, \"Invalid event created, event has not been added to timetable\");\n }\n }",
"public void storeEvent(Event event) {\n Entity eventEntity = new Entity(\"Event\", event.getEventId().toString());\n eventEntity.setProperty(\"speaker\", event.getSpeaker());\n eventEntity.setProperty(\"organization\", event.getOrganization());\n eventEntity.setProperty(\"eventDate\", event.getEventDate());\n eventEntity.setProperty(\"externalLink\", event.getExternalLink());\n eventEntity.setProperty(\"ownerId\", event.getOwnerId());\n eventEntity.setProperty(\"publicType\", event.getPublicType());\n // eventEntity.setProperty(\"timeStamp\", event.getTimeStamp());\n // This try/catch statement is to prevent null pointer exceptions from fields\n // that might not be defined yet in an event\n // Currently, the events form does not handle these fields so they are in the\n // try catch together\n try {\n eventEntity.setProperty(\"location\", event.getLocation());\n for (String am : event.getAmenities()) {\n storeAmenity(am, event.getEventId());\n }\n for (ThreadComment cm : event.getThread()) {\n storeThreadComment(cm);\n }\n } catch (NullPointerException e) {\n eventEntity.setProperty(\"location\", null);\n }\n\n datastore.put(eventEntity);\n }",
"Event createEvent();",
"Event createEvent();",
"private void createEvents() {\n\t}",
"@Test\n public void addEvent_whenModelIsValid_successful() throws CreateException, UpdateException {\n\n /* create and save schedule */\n SportCenter sportCenter = this.modelMapper\n .map(validSportCenterServiceModel1, SportCenter.class);\n SportCenter savedSportCenter = this.sportCenterRepository.saveAndFlush(sportCenter);\n SportCenterServiceModel sportCenterServiceModel = this.modelMapper\n .map(savedSportCenter, SportCenterServiceModel.class);\n ScheduleServiceModel savedScheduleServiceModel = this.scheduleService\n .createSchedule(sportCenterServiceModel, \"11\", \"11\", \"2011\");\n\n ScheduleServiceModel updatedScheduleServiceModel = this.scheduleService\n .addEvent(savedScheduleServiceModel, validEventServiceModel2);\n\n assertEquals(savedScheduleServiceModel.getId(), updatedScheduleServiceModel.getId());\n assertEquals(11, updatedScheduleServiceModel.getDay());\n assertEquals(11, updatedScheduleServiceModel.getMonth());\n assertEquals(2011, updatedScheduleServiceModel.getYear());\n }",
"public ListingFormValidationObject() {\n this.titleValid = true;\n this.descriptionValid = true;\n this.initPriceValid = true;\n this.minBidValid = true;\n this.startDateAndTimeValid = true;\n this.categoryValid = true;\n this.endDateAndTimeValid = true;\n }",
"public Event createBooking(RequestContext context) {\n\tHotel hotel = (Hotel) context.getFlowScope().get(\"hotel\");\n\tUser user = (User) context.getConversationScope().get(\"user\");\n\tBooking booking = new Booking(hotel, user);\n\tEntityManager em = (EntityManager) context.getFlowScope().get(\"entityManager\");\n\tem.persist(booking);\n\tcontext.getFlowScope().put(\"booking\", booking);\n\treturn success();\n }",
"@Test\n public void createFormSceduleEntry(){\n ScheduleEntry entry = new ScheduleEntry(\"9;00AM\", new SystemCalendar(2018,4,25));\n }",
"private void createEvents()\r\n\t{\r\n\t\teventsCount.add(new Event(RequestMethod.PUT, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.GET, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.POST, 0));\r\n\t}",
"public\n CreateEvent()\n {}",
"private void populateForm() {\n Part selectedPart = (Part) PassableData.getPartData();\n partPrice.setText(String.valueOf(selectedPart.getPrice()));\n partName.setText(selectedPart.getName());\n inventoryCount.setText(String.valueOf(selectedPart.getStock()));\n partId.setText(String.valueOf(selectedPart.getId()));\n maximumInventory.setText(String.valueOf(selectedPart.getMax()));\n minimumInventory.setText(String.valueOf(selectedPart.getMin()));\n\n if (PassableData.isOutsourced()) {\n Outsourced part = (Outsourced) selectedPart;\n variableTextField.setText(part.getCompanyName());\n outsourced.setSelected(true);\n\n } else if (!PassableData.isOutsourced()) {\n InHouse part = (InHouse) selectedPart;\n variableTextField.setText(String.valueOf(part.getMachineId()));\n inHouse.setSelected(true);\n }\n\n\n }",
"public OverdueRecordForm() {\n initComponents();\n display_Overdue();\n }",
"public void testEventListenersInSubForm() throws Exception\n {\n builderData.setBuilderName(TEST_TABLEEVENTS_BUILDER);\n context.setVariable(\"tabModel\", new ArrayList<Object>());\n executeScript(SCRIPT);\n builderData.invokeCallBacks();\n checkFormEventRegistration(\"firstName -> CHANGE, lastName -> ACTION, \"\n + \"firstName -> CHANGE\");\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(validateRequiredFields() == false) return;\n\t\t\t\t\n\t\t\t\t//create new appointment\n\t\t\t\tAppointment appointment = new Appointment();\n\n\t\t\t\t//set user input data to appointment\n\t\t\t\tappointment = setUserInputDataToAppointment(appointment);\n\t\t\t\t\n\t\t\t\t//add\n\t\t\t\tString result = AppointmentController.addAppointment(appointment);\n\t\t\t\t\n\t\t\t\t//check result\n\t\t\t\tif(result.equals(AppointmentController.SUCCESS)) {\n\t\t\t\t\tMainForm.showMessage(\"Added successfully!\");\n\t\t\t\t\t\n\t\t\t\t\t//update UI\n\t\t\t\t\tupdateTable();\n\t\t\t\t\tclearForm();\n\t\t\t\t}else {\n\t\t\t\t\tMainForm.showMessage(result);\n\t\t\t\t}\n\t\t\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_event_addition);\n\n ImageButton btnStart = findViewById(R.id.pickStartDate);\n ImageButton btnEnd = findViewById(R.id.pickEndDate);\n ImageButton btnFinal = findViewById(R.id.finalEvent);\n\n titleView = findViewById(R.id.eventTitle);\n sDayView = findViewById(R.id.enterDate);\n eDayView = findViewById(R.id.endDate);\n sTimeView = findViewById(R.id.startTime);\n eTimeView = findViewById(R.id.endTime);\n campusView = findViewById(R.id.campusSpin);\n buildingView = findViewById(R.id.buildingSpin);\n roomView = findViewById(R.id.enterRoom);\n catView = findViewById(R.id.catSpin);\n noteView = findViewById(R.id.enterNote);\n\n btnStart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showDatePickerDialog(1);\n }\n });\n btnEnd.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showDatePickerDialog(2);\n }\n });\n btnFinal.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (validate()) {\n returnReply();\n }\n }\n });\n\n sDayView.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n //do nothing\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n String edit = sDayView.getText().toString();\n if (edit.length() == 10 && before != 10) {\n Calendar c = Calendar.getInstance();\n\n int day = Integer.parseInt(edit.substring(0, 2));\n int mon = Integer.parseInt(edit.substring(3, 5));\n int year = Integer.parseInt(edit.substring(6, 10));\n\n //format to UK date standard if user does not use picker\n if (mon > 12) { mon = 12; }\n c.set(Calendar.MONTH, mon - 1);\n if (year < c.get(Calendar.YEAR) - 1) { year = c.get(Calendar.YEAR) - 1; }\n else if (year > c.get(Calendar.YEAR) + 1) { year = c.get(Calendar.YEAR) + 1; }\n c.set(Calendar.YEAR, year);\n if (day > c.getActualMaximum(Calendar.DATE)) { day = c.getActualMaximum(Calendar.DATE); }\n String strDate = String.format(Locale.UK, \"%02d%02d%02d\", day, mon, year);\n strDate = String.format(\"%s/%s/%s\", strDate.substring(0, 2),\n strDate.substring(2, 4),\n strDate.substring(4, 8));\n sDayView.setText(strDate);\n }\n if ((edit.length() == 2 || edit.length() == 5) && (before != 1)) {\n sDayView.append(\"/\");\n }\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n //do nothing\n }\n });\n\n eDayView.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n //do nothing\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n String edit = eDayView.getText().toString();\n if (edit.length() == 10 && before != 10) {\n Calendar c = Calendar.getInstance();\n\n int day = Integer.parseInt(edit.substring(0, 2));\n int mon = Integer.parseInt(edit.substring(3, 5));\n int year = Integer.parseInt(edit.substring(6, 10));\n\n //format to UK date standard if user does not use picker\n if (mon > 12) { mon = 12; }\n c.set(Calendar.MONTH, mon - 1);\n if (year < c.get(Calendar.YEAR) - 1) { year = c.get(Calendar.YEAR) - 1; }\n else if (year > c.get(Calendar.YEAR) + 1) { year = c.get(Calendar.YEAR) + 1; }\n c.set(Calendar.YEAR, year);\n if (day > c.getActualMaximum(Calendar.DATE)) { day = c.getActualMaximum(Calendar.DATE); }\n String strDate = String.format(Locale.UK, \"%02d%02d%02d\", day, mon, year);\n strDate = String.format(\"%s/%s/%s\", strDate.substring(0, 2),\n strDate.substring(2, 4),\n strDate.substring(4, 8));\n eDayView.setText(strDate);\n }\n if ((edit.length() == 2 || edit.length() == 5) && (before != 1)) {\n eDayView.append(\"/\");\n }\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n //do nothing\n }\n });\n\n sTimeView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showTimePickerDialog(1);\n }\n });\n\n eTimeView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showTimePickerDialog(2);\n }\n });\n\n Spinner campusView = findViewById(R.id.campusSpin);\n campusView.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View v, int pos, long id) {\n Spinner buildingView = findViewById(R.id.buildingSpin);\n ArrayAdapter<CharSequence> newSpin;\n switch (pos) {\n case 0:\n newSpin = ArrayAdapter.createFromResource(campusView.getContext(), R.array.granBuilding, android.R.layout.simple_spinner_item);\n break;\n case 1:\n newSpin = ArrayAdapter.createFromResource(campusView.getContext(), R.array.eastBuilding, android.R.layout.simple_spinner_item);\n break;\n case 2:\n newSpin = ArrayAdapter.createFromResource(campusView.getContext(), R.array.falmBuilding, android.R.layout.simple_spinner_item);\n break;\n case 3:\n newSpin = ArrayAdapter.createFromResource(campusView.getContext(), R.array.moulBuilding, android.R.layout.simple_spinner_item);\n break;\n default:\n newSpin = ArrayAdapter.createFromResource(campusView.getContext(), R.array.granBuilding, android.R.layout.simple_spinner_item);\n System.out.println(\"Invalid Campus selected.\");\n }\n buildingView.setAdapter(newSpin);\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n //do nothing\n }\n });\n }",
"private void fillCreateOrEditForm(String name, int branchId) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as expected heading '\" + FORM_HEADING\n + \"'.\");\n logger.info(\"# User is on '\" + actual + \"' form\");\n assertAndType(xpathNameTF, name);\n logger.info(\"# Entered staff name: \" + name);\n selectByValue(xpathSelectBranch, \"number:\" + branchId);\n logger.info(\"# Select branch id: \" + branchId);\n }",
"private void initFormCreateMode() {\n initSpinnerSelectionChamps();\n //TODO\n }",
"private void loadForm() {\n service.getReasons(refusalReasons);\n service.getVacEligibilty(vacElig);\n service.getVacSites(vacSites);\n service.getReactions(vacReactions);\n service.getOverrides(vacOverrides);\n updateComboValues();\n \n selPrv = \"\";\n selLoc = \"\";\n \n //datGiven.setDateConstraint(new SimpleDateConstraint(SimpleDateConstraint.NO_NEGATIVE, DateUtil.addDays(patient.getBirthDate(), -1, true), null, BgoConstants.TX_BAD_DATE_DOB));\n datGiven.setDateConstraint(getConstraintDOBDate());\n datEventDate.setConstraint(getConstraintDOBDate());\n radFacility.setLabel(service.getParam(\"Caption-Facility\", \"&Facility\"));\n if (immunItem != null) {\n \n txtVaccine.setValue(immunItem.getVaccineName());\n txtVaccine.setAttribute(\"ID\", immunItem.getVaccineID());\n txtVaccine.setAttribute(\"DATA\", immunItem.getVaccineID() + U + immunItem.getVaccineName());\n setEventType(immunItem.getEventType());\n \n radRefusal.setDisabled(!radRefusal.isChecked());\n radHistorical.setDisabled(!radHistorical.isChecked());\n radCurrent.setDisabled(!radCurrent.isChecked());\n \n visitIEN = immunItem.getVisitIEN();\n if (immunItem.getProvider() != null) {\n txtProvider.setText(FhirUtil.formatName(immunItem.getProvider().getName()));\n txtProvider.setAttribute(\"ID\", immunItem.getProvider().getId().getIdPart());\n selPrv = immunItem.getProvider().getId().getIdPart() + U + U + immunItem.getProvider().getName();\n }\n switch (immunItem.getEventType()) {\n case REFUSAL:\n ListUtil.selectComboboxItem(cboReason, immunItem.getReason());\n txtComment.setText(immunItem.getComment());\n datEventDate.setValue(immunItem.getDate());\n break;\n case HISTORICAL:\n datEventDate.setValue(immunItem.getDate());\n txtLocation.setValue(immunItem.isImmunization() ? immunItem.getLocationName() : \"\");\n txtLocation.setAttribute(\"ID\", immunItem.isImmunization() ? immunItem.getLocationID() : \"\");\n selLoc = immunItem.getLocationID() + U + U + immunItem.getLocationName();\n radOther.setSelected(txtLocation.getAttribute(\"ID\") != null\n ? txtLocation.getAttribute(\"ID\").toString().isEmpty() : false);\n txtAdminNote.setText(immunItem.getAdminNotes());\n ZKUtil.disableChildren(fraDate, true);\n ZKUtil.disableChildren(fraHistorical, true);\n default:\n service.getLot(lotNumbers, getVaccineID());\n loadComboValues(cboLot, lotNumbers, comboRenderer);\n loadVaccination();\n txtLocation.setValue(immunItem.isImmunization() ? immunItem.getLocationName() : \"\");\n txtLocation.setAttribute(\"ID\", immunItem.isImmunization() ? immunItem.getLocationID() : \"\");\n selLoc = immunItem.getLocationID() + U + U + immunItem.getLocationName();\n radOther.setSelected(txtLocation.getAttribute(\"ID\") != null\n ? txtLocation.getAttribute(\"ID\").toString().isEmpty() : false);\n ListUtil.selectComboboxItem(cboLot, immunItem.getLot());\n ListUtil.selectComboboxItem(cboSite, StrUtil.piece(immunItem.getInjSite(), \"~\", 2));\n spnVolume.setText(immunItem.getVolume());\n datGiven.setDate(immunItem.getDate());\n datVIS.setValue(immunItem.isImmunization() ? immunItem.getVISDate() : null);\n ListUtil.selectComboboxItem(cboReaction, immunItem.getReaction());\n ListUtil.selectComboboxData(cboOverride, immunItem.getVacOverride());\n txtAdminNote.setText(immunItem.getAdminNotes());\n cbCounsel.setChecked(immunItem.wasCounseled());\n }\n } else {\n IUser user = UserContext.getActiveUser();\n Practitioner provider = new Practitioner();\n provider.setId(user.getLogicalId());\n provider.setName(FhirUtil.parseName(user.getFullName()));\n txtProvider.setValue(FhirUtil.formatName(provider.getName()));\n txtProvider.setAttribute(\"ID\", VistAUtil.parseIEN(provider)); //provider.getId().getIdPart());\n selPrv = txtProvider.getAttribute(\"ID\") + U + U + txtProvider.getValue();\n Location location = new Location();\n location.setName(\"\");\n location.setId(\"\");\n datGiven.setDate(getBroker().getHostTime());\n onClick$btnVaccine(null);\n \n if (txtVaccine.getValue().isEmpty()) {\n close(true);\n return;\n }\n \n Encounter encounter = EncounterContext.getActiveEncounter();\n if (!EncounterUtil.isPrepared(encounter)) {\n setEventType(EventType.HISTORICAL);\n radCurrent.setDisabled(true);\n } else {\n if (isCategory(encounter, \"E\")) {\n setEventType(EventType.HISTORICAL);\n Date date = encounter == null ? null : encounter.getPeriod().getStart();\n datEventDate.setValue(DateUtil.stripTime(date == null ? getBroker().getHostTime() : date));\n radCurrent.setDisabled(true);\n txtLocation.setText(user.getSecurityDomain().getName());\n PromptDialog.showInfo(user.getSecurityDomain().getLogicalId());\n txtLocation.setAttribute(\"ID\", user.getSecurityDomain().getLogicalId());\n \n } else {\n if (isVaccineInactive()) {\n setEventType(EventType.HISTORICAL);\n radCurrent.setDisabled(true);\n } else {\n setEventType(EventType.CURRENT);\n radCurrent.setDisabled(false);\n }\n }\n }\n selectItem(cboReason, NONESEL);\n }\n btnSave.setLabel(immunItem == null ? \"Add\" : \"Save\");\n btnSave.setTooltiptext(immunItem == null ? \"Add record\" : \"Save record\");\n txtVaccine.setFocus(true);\n }",
"private void save(ActionEvent e){\r\n // Make sure all required fields are filled out before saving\r\n if (formIsValid()){\r\n // Check if client currently exists. If so, modify. Otherwise create new entry.\r\n if (existingClient){\r\n // Modify the existing currentClient holder -- Change the variable to global currentClient cache holder\r\n currClient.setName(NAME_FIELD.getText());\r\n currClient.setAddress1(ADDRESS_1_FIELD.getText());\r\n currClient.setAddress2(ADDRESS_2_FIELD.getText());\r\n currClient.setCity(CITY_FIELD.getText());\r\n currClient.setZip(ZIP_FIELD.getText());\r\n currClient.setCountry(COUNTRY_FIELD.getText());\r\n currClient.setPhone(PHONE_FIELD.getText());\r\n // Update client in database\r\n Client.modifyClient(currClient, currClient.getClientID());\r\n }\r\n // Create new client entry\r\n else { \r\n Client c = new Client (NAME_FIELD.getText(),ADDRESS_1_FIELD.getText(),\r\n ADDRESS_2_FIELD.getText(),CITY_FIELD.getText(),\r\n ZIP_FIELD.getText(),COUNTRY_FIELD.getText(),PHONE_FIELD.getText());\r\n Client.addNewClient(c);\r\n }\r\n\r\n existingClient = false; // reset existing client flag\r\n clearFields(); // remove data from fields\r\n // Return to Appt Mgmt Screen if we came from there\r\n if (fromAppt){\r\n goToManageApptScreen();\r\n }\r\n }\r\n // If forms are not complete throw an alert\r\n else {\r\n AlertBox.display(\"Invalid Submission\", \"Form is missing required information or has invalid input.\"\r\n + \" The following information is required:\\n\"\r\n + \"Name\\nAddress 1\\nCity, State, Country, Zipcode\\nPhoneNumber\"\r\n + \"\\nPlease complete form with valid input and submit again.\");\r\n }\r\n }",
"@Before\n public void initValidString()\n {\n eventName = \"Espresso Test Event Name\";\n eventLocation = \"Espresso Test Event Location\";\n eventNotes = \"Espresso Test Event Description\";\n }",
"public void saveForm(ActionEvent event) throws SQLException, ParseException {\n actionItemClass obj = new actionItemClass();\n obj.saveForm(this);\n }",
"public void setUpComponents() {\n for (int i = 1; i <= 31; i++) {\n cmbDay.addItem(String.format(\"%02d\", i));\n }\n\n for (int i = 0; i <= 11; i++) {\n cmbMonth.addItem(monthNames[i]);\n }\n\n updateTimeComboBox();\n\n updateDurationComboBox();\n\n cmbDay.setSelectedIndex(initialDay.getDay() - 1);\n cmbMonth.setSelectedIndex(initialDay.getMonth());\n\n if (formType.equals(\"Edit\")) {\n txtName.setText(eventToEdit.getName());\n cmbTime.setSelectedIndex(eventToEdit.getStartTime() - usedTimes.size());\n cmbDuration.setSelectedIndex(eventToEdit.getDuration() - 1);\n }\n\n cmbTime.addItemListener(new MyItemListener());\n cmbDay.addItemListener(new MyItemListener());\n cmbMonth.addItemListener(new MyItemListener());\n radAutoTime.addActionListener(new TimeHandler());\n radSelectTime.addActionListener(new TimeHandler());\n\n buttonGroup.add(radSelectTime);\n buttonGroup.add(radAutoTime);\n\n frame.setLayout(new GridBagLayout());\n gbc.insets = new Insets(5, 5, 5, 5);\n addComponents();\n\n btnSubmit.addActionListener(new EventHandler());\n frame.getRootPane().setDefaultButton(btnSubmit);\n\n buildFrame();\n }",
"public void showEventWindow()\n\t{\n\t\tJDialog eventWindow = new JDialog();\n\t\teventWindow.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);\n\t\t\n\t\t//set size and title\n\t\tDimension d = new Dimension(350,200);\n\t\teventWindow.setSize(d);\n\t\teventWindow.setTitle(\"Make Event\");\n\t\t\n\t\t//make parts of event window\n\t\tJTextField theEvent = new JTextField(25);\n\t\tDimension d2 = new Dimension(250,100);\n\t\ttheEvent.setPreferredSize(d2);\n\t\tJLabel eventLabel = new JLabel();\n\t\teventLabel.setText(\"Event: \");\n\t\t\n\t\tJTextField start = new JTextField(5);\n\t\tJTextField end = new JTextField(5);\n\t\tJLabel date = new JLabel();\n\t\tdate.setText(getEventDate(cModel.getSelectedDate()) + \" \");\n\t\tJLabel to = new JLabel(\"to\");\n\t\tJButton saveButton = new JButton(\"Save\");\n\t\t\n\t\tsaveButton.addActionListener(new \n\t\t\t\tActionListener()\n\t\t\t\t{\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t\t{\n\t\t\t\t\t\tif (cModel.hasConflict(start.getText(), end.getText())) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//make an error message\n\t\t\t\t\t\t\tJDialog errorPopUp = new JDialog();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\terrorPopUp.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);\n\t\t\t\t\t\t\terrorPopUp.setLayout(new FlowLayout());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tJLabel errorMessage = new JLabel(\"There is a time conflict. Please enter a different time.\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tJButton close = new JButton(\"Close\");\n\t\t\t\t\t\t\tclose.addActionListener(new \n\t\t\t\t\t\t\t\t\tActionListener() \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\terrorPopUp.dispose();\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\n\t\t\t\t\t\t\terrorPopUp.add(errorMessage);\n\t\t\t\t\t\t\terrorPopUp.add(close);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\terrorPopUp.pack();\n\t\t\t\t\t\t\terrorPopUp.setVisible(true);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\teventWindow.dispose();\n\t\t\t\t\t\t\tcModel.addEvent(theEvent.getText(), start.getText(), end.getText());\n\t\t\t\t\t\t\twriteEvents(cModel.getSelectedDate());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t});\n\t\t\n\t\tJPanel topPanel = new JPanel();\n\t\ttopPanel.add(eventLabel);\n\t\ttopPanel.add(theEvent);\n\t\t\n\t\tJPanel bottomPanel = new JPanel();\n\t\tbottomPanel.add(date);\n\t\tbottomPanel.add(start);\n\t\tbottomPanel.add(to);\n\t\tbottomPanel.add(end);\n\t\tbottomPanel.add(saveButton);\n\t\t\n\t\teventWindow.setLayout(new BorderLayout());\n\t\teventWindow.add(topPanel,BorderLayout.NORTH);\n\t\teventWindow.add(bottomPanel,BorderLayout.SOUTH);\n\t\t\n\t\teventWindow.setVisible(true);\n\t}",
"public boolean createEvent(String eventId, String eventTitle, ArrayList<String> speakerEmails, String roomName,\n LocalDateTime start, LocalDateTime end, int capacity, boolean vipRestricted){\n Room eventRoom = findRoom(roomName);\n ArrayList<Speaker> speakers = new ArrayList<Speaker>();\n for(String speaker: speakerEmails){\n Speaker s = findSpeaker(speaker);\n speakers.add(s);\n }\n for (Speaker s: speakers){\n if (!(checkDoubleBooking(start, end, s.getEventList()))){\n return false;\n };\n }\n if (eventRoom != null && start.getHour() >= 9 && end.getHour() <= 17 &&\n checkDoubleBooking(start, end, eventRoom.getEventList())){\n Event event = new Event(eventTitle, start, end, eventId, roomName, speakerEmails, capacity, vipRestricted);\n this.addEvent(event, eventRoom, speakers , start, end);\n for (Speaker s: speakers){\n userManager.addEvent(s.getEmail(), event.getEventId());\n }\n roomManager.addEvent(roomName, event.getEventId());\n return true;\n }\n else{\n return false;\n }\n }",
"@Test\n public void constructor() {\n Event event1 = new Event(\"Eat Apple\", \"2020-12-12 12:00\", \"2020-12-12 13:00\",\n false);\n Event event2 = new Event(\"Write paper\", \"2020-05-05 12:00\", \"2020-05-06 23:59\",\n true);\n\n assertEquals(\"Eat Apple\", event1.description);\n assertEquals(LocalDateTime.parse(\"2020-12-12 12:00\", Event.PARSER_FORMATTER), event1.startAt);\n assertEquals(LocalDateTime.parse(\"2020-12-12 13:00\", Event.PARSER_FORMATTER), event1.endAt);\n assertEquals(false, event1.isDone);\n assertEquals(\"Write paper\", event2.description);\n assertEquals(LocalDateTime.parse(\"2020-05-05 12:00\", Event.PARSER_FORMATTER), event2.startAt);\n assertEquals(LocalDateTime.parse(\"2020-05-06 23:59\", Event.PARSER_FORMATTER), event2.endAt);\n assertEquals(true, event2.isDone);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n descripTextField = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n validButton = new javax.swing.JButton();\n startHour = new javax.swing.JTextField();\n endHour = new javax.swing.JTextField();\n eventLabel = new javax.swing.JLabel();\n startMinute = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n endMinute = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n dateTextField = new javax.swing.JTextField();\n todayRadioButton = new javax.swing.JRadioButton();\n alerteEmptyField = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel1.setText(\"Heure de début :\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel2.setText(\"Heure de fin :\");\n\n descripTextField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n descripTextFieldActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel3.setText(\"Description (optionnelle)\");\n\n validButton.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n validButton.setText(\"Valider\");\n validButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n validButtonActionPerformed(evt);\n }\n });\n\n startHour.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n startHourActionPerformed(evt);\n }\n });\n\n endHour.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n endHourActionPerformed(evt);\n }\n });\n\n eventLabel.setText(\"Ajouter une \" + eventType);\n eventLabel.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n\n jLabel4.setText(\"H\");\n\n jLabel5.setText(\"H\");\n\n jLabel6.setText(\"min\");\n\n jLabel7.setText(\"min\");\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel8.setText(\"Le : (ex: 27/08/2001)\");\n\n todayRadioButton.setText(\"Aujourd'hui\");\n todayRadioButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n todayRadioButtonActionPerformed(evt);\n }\n });\n\n alerteEmptyField.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n alerteEmptyField.setForeground(new java.awt.Color(255, 0, 51));\n alerteEmptyField.setText(\"Champ obligatoire vide /!\\\\\");\n alerteEmptyField.addComponentListener(new java.awt.event.ComponentAdapter() {\n public void componentShown(java.awt.event.ComponentEvent evt) {\n alerteEmptyFieldComponentShown(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(119, 119, 119)\n .addComponent(eventLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(descripTextField)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel8))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 91, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(startHour, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(endHour, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(startMinute, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(20, 20, 20)\n .addComponent(endMinute, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addComponent(dateTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6)\n .addComponent(jLabel7))\n .addGap(38, 38, 38))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(todayRadioButton)\n .addGroup(layout.createSequentialGroup()\n .addGap(63, 63, 63)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(99, 99, 99)\n .addComponent(validButton)\n .addGap(18, 18, 18)\n .addComponent(alerteEmptyField, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(eventLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, Short.MAX_VALUE)\n .addComponent(todayRadioButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(dateTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(startHour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(startMinute, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(endHour, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(endMinute, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5)\n .addComponent(jLabel7))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(descripTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(alerteEmptyField, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(validButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n\n pack();\n }",
"public LeaveForm() {\n initComponents();\n }",
"private void loadData() {\r\n titleField.setText(existingAppointment.getTitle());\r\n descriptionField.setText(existingAppointment.getDescription());\r\n contactField.setText(existingAppointment.getContact());\r\n customerComboBox.setValue(customerList.stream()\r\n .filter(x -> x.getCustomerId() == existingAppointment.getCustomerId())\r\n .findFirst().get());\r\n typeComboBox.setValue(existingAppointment.getType());\r\n locationComboBox.setValue(existingAppointment.getLocation());\r\n startTimeComboBox.setValue(existingAppointment.getStart().toLocalTime().format(DateTimeFormatter.ofPattern(\"HH:mm\")));\r\n endTimeComboBox.setValue(existingAppointment.getEnd().toLocalTime().format(DateTimeFormatter.ofPattern(\"HH:mm\")));\r\n startDatePicker.setValue(existingAppointment.getStart().toLocalDate());\r\n endDatePicker.setValue(existingAppointment.getEnd().toLocalDate());\r\n }",
"public void submit(ActionEvent actionEvent) {\n if(checkFields()) {\n try {\n newStudent = new Student(firstName.getText(), lastName.getText(),birthday.getValue(),selectImage.getImage());\n activities();\n System.out.println(\"new student: \" + newStudent);\n studentList.add(newStudent);\n viewStudent(actionEvent);\n } catch (IllegalArgumentException | IOException e){\n errorDisplay.setText(e.getMessage());\n }\n }\n }",
"public EventException() {\n super(\"OOPS!!! The description or time of an event cannot be empty.\");\n }",
"private Event createEditedEvent(Optional<EventName> name, Optional<Address> location, Optional<Set<Tag>> tags) {\n EventName eventName = name.orElse(currentEvent.getName());\n Address eventLocation = location.orElse(currentEvent.getLocation());\n Set<Tag> eventTags = tags.orElse(currentEvent.getTags());\n Event editedEvent = new Event(eventName, eventLocation, eventTags);\n\n if (currentEvent.getDate().isPresent()) {\n editedEvent.setDate(currentEvent.getDate().get());\n }\n if (currentEvent.getStartTime().isPresent() && currentEvent.getEndTime().isPresent()) {\n editedEvent.setTime(currentEvent.getStartTime().get(), currentEvent.getEndTime().get());\n }\n editedEvent.setOrganiser(currentEvent.getOrganiser());\n editedEvent.setPolls(currentEvent.getPolls());\n editedEvent.setParticipantList(currentEvent.getParticipantList());\n return editedEvent;\n }",
"public long createEvent(Event event) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(EVENT_NAME, event.getName());\n values.put(EVENT_DATE, event.getDate());\n\n // insert row\n long _id = db.insert(EVENTS_TABLE_NAME, null, values);\n\n return _id;\n }",
"private void saveForm() {\n\n if (reportWithCurrentDateExists()) {\n // Can't save this case\n return;\n }\n\n boolean isNewReport = (mRowId == null);\n\n // Get field values from the form elements\n\n // Date\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n String date = df.format(mCalendar.getTime());\n\n // Value\n Double value;\n try {\n value = Double.valueOf(mValueText.getText().toString());\n } catch (NumberFormatException e) {\n value = 0.0;\n }\n\n // Create/update report\n boolean isSaved;\n if (isNewReport) {\n mRowId = mDbHelper.getReportPeer().createReport(mTaskId, date, value);\n isSaved = (mRowId != 0);\n } else {\n isSaved = mDbHelper.getReportPeer().updateReport(mRowId, date, value);\n }\n\n // Show toast notification\n if (isSaved) {\n int toastMessageId = isNewReport ?\n R.string.message_report_created :\n R.string.message_report_updated;\n Toast toast = Toast.makeText(getApplicationContext(), toastMessageId, Toast.LENGTH_SHORT);\n toast.show();\n }\n }",
"private @Nullable Pub validateFormData() {\n\n if ( !sm.hasSessionStored() ) {\n\n Utils.simpleDialog(this, getString(R.string.new_pub_activity_no_session_title),\n getString(R.string.not_logged_in));\n return null;\n }\n\n Pub tempPub = null; // This object is just a container of some data from the form\n\n String pubName = txtName.getText().toString();\n String pubUrl = txtUrl.getText().toString();\n\n if (pubName.equals(\"\")) {\n Utils.simpleDialog(this, getString(R.string.invalid_data), getString(R.string.new_pub_activity_must_name));\n txtName.requestFocus();\n }\n\n else if (latitude == null || longitude == null) {\n Utils.simpleDialog(this, getString(R.string.new_pub_activity_invalid_location),\n getString(R.string.new_pub_activity_invalid_location_message));\n txtLocation.requestFocus();\n }\n\n // All data are correct, prepare the temp Pub\n else {\n\n if (pubUrl.equals(\"\"))\n pubUrl = null;\n\n List<String> events = new ArrayList<String>();\n List<String> remoteImageNames = getRemoteImageFilenames();\n\n tempPub = new Pub(\"\", pubName, latitude, longitude, pubUrl, \"\", events, remoteImageNames);\n }\n\n return tempPub;\n }",
"public void setEventCreated() {\n Date now = new Date();\n this.eventCreated = now;\n }",
"private void populateSpecialEvent() {\n try {\n vecSpecialEventKeys = new Vector();\n vecSpecialEventLabels = new Vector();\n StringTokenizer stk = null;\n //MSB -09/01/05 -- Changed configuration file and Keys\n // config = new ConfigMgr(\"customer.cfg\");\n // String strSubTypes = config.getString(\"SPECIAL_EVENT_TYPES\");\n// config = new ConfigMgr(\"ArmaniCommon.cfg\");\n config = new ArmConfigLoader();\n String strSubTypes = config.getString(\"SPECIAL_EVT_TYPE\");\n int i = -1;\n if (strSubTypes != null && strSubTypes.trim().length() > 0) {\n stk = new StringTokenizer(strSubTypes, \",\");\n } else\n return;\n types = new String[stk.countTokens()];\n while (stk.hasMoreTokens()) {\n types[++i] = stk.nextToken();\n String key = config.getString(types[i] + \".CODE\");\n vecSpecialEventKeys.add(key);\n String value = config.getString(types[i] + \".LABEL\");\n vecSpecialEventLabels.add(value);\n }\n cbxSpcEvt.setModel(new DefaultComboBoxModel(vecSpecialEventLabels));\n } catch (Exception e) {}\n }"
] |
[
"0.6799244",
"0.59307337",
"0.590694",
"0.58977634",
"0.5826707",
"0.5822676",
"0.5796269",
"0.5710837",
"0.56638104",
"0.5656551",
"0.5656104",
"0.56560946",
"0.56374276",
"0.56190395",
"0.5615799",
"0.5607655",
"0.5571237",
"0.55419725",
"0.5537911",
"0.5526385",
"0.5526131",
"0.5483676",
"0.5430146",
"0.54285",
"0.5418755",
"0.5417026",
"0.5403101",
"0.5381754",
"0.5377383",
"0.5363432",
"0.53564703",
"0.5349721",
"0.5335238",
"0.5320855",
"0.5320521",
"0.53039235",
"0.5277976",
"0.5270277",
"0.5233856",
"0.5228215",
"0.5224913",
"0.5223699",
"0.52201706",
"0.5212312",
"0.5212273",
"0.5211889",
"0.52059245",
"0.52026767",
"0.51666045",
"0.5164854",
"0.5147726",
"0.51453394",
"0.51409245",
"0.5134539",
"0.51196486",
"0.5117107",
"0.51152414",
"0.51139146",
"0.51135814",
"0.51130927",
"0.5107735",
"0.51011896",
"0.5099341",
"0.5097146",
"0.50961995",
"0.50879747",
"0.50879747",
"0.5087423",
"0.5085506",
"0.5069107",
"0.5067612",
"0.50599515",
"0.505509",
"0.5051445",
"0.5034324",
"0.50251263",
"0.50238574",
"0.50074834",
"0.5004084",
"0.50019383",
"0.4994916",
"0.49894226",
"0.4988765",
"0.4986813",
"0.49834386",
"0.49826795",
"0.4981993",
"0.497772",
"0.49589902",
"0.49570385",
"0.49535277",
"0.49527383",
"0.4950059",
"0.49430904",
"0.4942535",
"0.49392405",
"0.49346045",
"0.4932807",
"0.49291652",
"0.49290887"
] |
0.71164185
|
0
|
This function is called periodically during autonomous
|
public void autonomousPeriodic() {
try{
if(joy.getRawButton(2)){
frontLeft.set(1);
}else if(joy.getRawButton(3)){
frontRight.set(1);
}else if(joy.getRawButton(4)){
backRight.set(1);
}else if(joy.getRawButton(5)){
backLeft.set(1);
}
}catch(Exception e){
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n }",
"@Override\n public void autonomousPeriodic() {\n \n }",
"public void autonomousPeriodic()\r\n {\r\n \r\n }",
"public void autonomousPeriodic() {\r\n }",
"public void autonomousPeriodic() {\r\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n drive.updateAuto();\n sensor.updateAuto();\n }",
"public void autonomousPeriodic() {\n \n }",
"public void autonomousPeriodic() {\n \tauto.autonomousPeriodic();\n\t}",
"public void autonomousPeriodic() {\n }",
"public void autonomousPeriodic() {\n }",
"public void autonomousPeriodic() {\n // RobotMap.helmsman.trackPosition();\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n\n }",
"public void autonomousPeriodic() {\n\n }",
"public void autonomousPeriodic() {\r\n Scheduler.getInstance().run();\r\n }",
"public void autonomousPeriodic() {\r\n \r\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }",
"public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}",
"@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n //Scheduler.getInstance().run();\n }",
"public void autonomousPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}",
"public void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\t\n shooterArm.updateSmartDashboard();\n\t\tdriveTrain.getDegrees();\n\n\t\tvision.findGoal();\n\t\tvision.getGoalXAngleError();\n\t\tvision.getGoalArmAngle();\n\n\t\t// Stop auto mode if the robot is tilted too much\n\t\tif (Math.abs(driveTrain.getRobotPitch())<=60 && Math.abs(driveTrain.getRobotRoll())<=60)\n\t\t\ttimerTilt.reset();\n\t\t\n\t\t// For some reason, robot did not move in last match in auto, so this code is suspect\n\t\t// Do the Pitch/Roll values need to be zeroed?\n//\t\tif ( autonomousCommand != null && timerTilt.get()>0.5)\n//\t\t\tautonomousCommand.cancel();\n\n\t}",
"@Override\n public void autonomousPeriodic() {\n\t// updateDiagnostics();9\n\tScheduler.getInstance().run();\n }",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tSmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = true;\n\t\tisTeleoperated = false;\n\t\tisEnabled = true;\n\t\tvisionNetworkTable.getGearData();\n\t\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\t\n\t\tupdateLedState();\n\t\t//visionNetworkTable.getHighData();\n\t}",
"public void autonomousPeriodic() {\n if (m_apFirstRun) {\n System.out.println(\"Default autonomousPeriodic() method... Override me!\");\n m_apFirstRun = false;\n }\n }",
"@Override\n public void autonomousPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }",
"@Override\npublic void autonomousPeriodic() {\n\n}",
"@Override\n public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }",
"@Override\n public void autonomousPeriodic()\n {\n Scheduler.getInstance().run();\n }",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\t\n\t}",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n rumbleInYourPants();\n turnSpindleIfNeeded();\n turnWinchIfNeeded();\n if (arcadeDrive != null) \n arcadeDrive.start();\n }",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tif (state == \"auton\") {\n\t\t\tlastState = \"auton\";\n\t\t}\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putNumber(\"Left encoder\", Actuators.getLeftDriveMotor().getEncPosition());\n\t\tSmartDashboard.putNumber(\"Right encoder\", Actuators.getRightDriveMotor().getEncPosition());\n\t\tSmartDashboard.putNumber(\"Left speed\", Actuators.getLeftDriveMotor().get());\n\t\tSmartDashboard.putNumber(\"Right speed\", Actuators.getRightDriveMotor().get());\n\t\t\n\t\t\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}",
"@Override\n\tpublic void autonomousPeriodic() //runs the autonomous mode, repeating every 20ms\n\t{\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putNumber(\"Encoder Left: \", RobotMap.encoderLeft.getRaw()); //putting the value of the left encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Encoder Right: \", RobotMap.encoderRight.getRaw()); //putting the value of the right encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Ultrasonic sensor\", ultrasonic.getDistanceIn()); //putting the value of the ultrasonic sensor to the smartDashboard\n\t\tdriveExecutor.execute(); //running the execute() method in driveExecutor\n\t\tgrab.execute(); //running the execute() method in GearGrab_Command (should run without this but this is ensuring us that it is on)\n\t}",
"@Override\n public void autonomousPeriodic()\n {\n commonPeriodic();\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void robotPeriodic() {\n }",
"@Override\n public void periodic() {\n UpdateDashboard();\n }",
"public void autonomousPeriodic() {\n //Scheduler.getInstance().run();\n /** if(autoLoopCounter < 100) { //Checks to see if the counter has reached 100 yet\n myRobot.drive(-0.5, 0.0); //If the robot hasn't reached 100 packets yet, the robot is set to drive forward at half speed, the next line increments the counter by 1\n autoLoopCounter++;\n } else {\n myRobot.drive(0.0, 0.0); //If the robot has reached 100 packets, this line tells the robot to stop\n }*/\n }",
"@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\tupdateLedState();\n\t\t//SmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\t\tSmartDashboard.putNumber(\"Climber Current Motor 1\", Robot.climber.climberTalon.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"Climber Current motor 2\", Robot.climber.climberTalon2.getOutputCurrent());\n\t\t//visionNetworkTable.getGearData();\n\t//\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\n\t\tif(Robot.debugging){\t\t\t\n\t\t\tSmartDashboard.putNumber(\"Shooter1RPM Setpoint\", shooter.shooter1.getSetpoint());\n\t \tSmartDashboard.putNumber(\"Intake Pivot Encoder Position\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\n\t\t\tSmartDashboard.putNumber(\"Gear Manipulator Setpoint\", gearManipulator.gearManipulatorPivot.getSetpoint());\n\t\t}\n\t\t//\tvisionNetworkTable.getGearData();\n\t\t//visionNetworkTable.getHighData();\n\t}",
"@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }",
"@Override\n public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n log();\n }",
"@Override\n\tpublic void robotPeriodic() {\n\t}",
"@Override\n\tpublic void robotPeriodic() {\n\t}",
"public void teleopPeriodic() {\n\t\t// resetAndDisable();\n\t\tupdateDashboard();\n\t\tLogitechJoystick.controllers();\n\t\tDrivetrain.arcadeDrive();\n\t\tShooterAngleMotor.angleShooter();\n\t\tBallShooter.shootBalls();\n\t\tSonicSensor.updateSensors();\n\t\t\n\t\t//if(LogitechJoystick.rightBumper2)\n\t\t\t//{\n\t\t\t\t//LowBar.makeArmStable();\n\t\t\t//}\n\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tlog();\n\t}",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void teleopPeriodic() {\n CommandScheduler.getInstance().run();\n OI.getInstance().getPilot().run();\n SmartDashboard.putNumber(\"gyro\", getRobotContainer().getTecbotSensors().getYaw());\n SmartDashboard.putBoolean(\"isSpeed\", getRobotContainer().getDriveTrain().getTransmissionMode() == DriveTrain.TransmissionMode.speed);\n SmartDashboard.putString(\"DT_MODE\", getRobotContainer().getDriveTrain().getCurrentDrivingMode().toString());\n SmartDashboard.putNumber(\"x_count\", getRobotContainer().getClimber().getxWhenPressedCount());\n\n }",
"public void teleopPeriodic() {\n \t//getInstance().run();;\n \t//RobotMap.robotDrive1.arcadeDrive(oi.stickRight); //This line drives the robot using the values of the joystick and the motor controllers selected above\n \tScheduler.getInstance().run();\n\t\n }",
"@Override\n public void autonomousPeriodic() {\n \n //Switch is used to switch the autonomous code to whatever was chosen\n // on your dashboard.\n //Make sure to add the options under m_chooser in robotInit.\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n if (m_timer.get() < 2.0){\n m_driveTrain.arcadeDrive(0.5, 0); //drive forward at half-speed\n } else {\n m_driveTrain.stopMotor(); //stops motors once 2 seconds have elapsed\n }\n break;\n }\n }",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tSmartDashboard.putNumber(\"Left Speed\", Robot.driveSubsystem.getLeftSpeed());\n\t\tSmartDashboard.putNumber(\"Right Speed\", Robot.driveSubsystem.getRightSpeed());\n\n\t\tScheduler.getInstance().run();\n\t}",
"public void updatePeriodic() {\r\n }",
"public void autonomous() {\n /*myRobot.setSafetyEnabled(false);\n myRobot.drive(-0.5, 0.0);\t// drive forwards half speed\n Timer.delay(2.0);\t\t// for 2 seconds\n myRobot.drive(0.0, 0.0);\t// stop robot\n */\n \t/*gyro.reset();\n \twhile(isAutonomous()){\n \t\tdouble angle = gyro.getAngle();\n \tmyRobot.drive(0, -angle * Kp);\t\n \tTimer.delay(.004);\n \t}\n \tmyRobot.drive(0.0, 0.0);\n \t*/\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }"
] |
[
"0.8242393",
"0.8238804",
"0.8235853",
"0.8235853",
"0.8235853",
"0.820495",
"0.8199907",
"0.8194021",
"0.8194021",
"0.8177311",
"0.8151588",
"0.8147766",
"0.81250346",
"0.81250346",
"0.80807847",
"0.8016792",
"0.8016792",
"0.79744554",
"0.79655135",
"0.7948241",
"0.7948241",
"0.7948241",
"0.7948241",
"0.7948241",
"0.7948241",
"0.7943544",
"0.79032373",
"0.78828543",
"0.77641433",
"0.77600986",
"0.7759355",
"0.77590984",
"0.77569574",
"0.7660986",
"0.7649747",
"0.76439685",
"0.76273406",
"0.7605097",
"0.7603722",
"0.758448",
"0.75753826",
"0.7555205",
"0.7555205",
"0.7555205",
"0.7555205",
"0.7537244",
"0.75159377",
"0.75070035",
"0.75070035",
"0.75070035",
"0.75070035",
"0.75070035",
"0.75070035",
"0.74829936",
"0.7457939",
"0.7456864",
"0.74545246",
"0.743304",
"0.7385487",
"0.7385487",
"0.7343646",
"0.7335342",
"0.72733426",
"0.72733426",
"0.7264387",
"0.72604746",
"0.72574127",
"0.72546506",
"0.7238183",
"0.722407",
"0.7209448",
"0.7209448",
"0.7209448",
"0.7209448",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939",
"0.7169939"
] |
0.0
|
-1
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.