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
Retourne le solde du compte.
public int getSomme() { return somme; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void afficheSolde() \r\n\t\t\t\t\t\t{ // d�but de la fonction\r\n\t\t\t\t\t\tSystem.out.println(\"Valeur du solde : \" + this.solde);\t\t\r\n\t\t\t\t\t\t}", "public void consulterSoldes() {\n\t\tint i=0;\n\t\tfor (Compte compte : listeComptes) {\n\t\t\ti++;\n\t \tSystem.out.println(i+\". Compte n°\"+compte.getNumero()+\" : solde=\"+compte.getSolde());\n\t\t}\n\t}", "private double getSol(){\n return this.sol;\n }", "public CouleurFeu suivant() {\r\n // on choisit ici un algo très basique (je l'avais d'abord fait\r\n // en utisant la liste des valeurs, mais ça n'est pas très lisible.\r\n switch (this) {\r\n case VERT:\r\n return ORANGE;\r\n case ORANGE:\r\n return ROUGE;\r\n case ROUGE:\r\n return VERT;\r\n default:\r\n throw new RuntimeException(\"couleur inconnue ?? (impossible normalement)\");\r\n }\r\n }", "public String getSolStr() {\n this.tanSolve();\n return \"x = \" + this.x;\n }", "public Compte getCompte() {\n\t\treturn compte;\n\t}", "public void setSolde(double solde) {\n\t\t\tthis.solde = solde;\n\t}", "public double getSolDeg() {\n this.tanSolve();\n return this.xdeg;\n }", "public String getSolucion() {\n String sol = new String();\n for (int i = 0; i < n; i++) {\n sol += solucion[i] + \" \";\n }\n return sol;\n }", "public NiveauCentreDTO getEtablissement(){\n\t\treturn getNomenclatureDomainService().getNiveauCentreFromLibelle(DonneesStatic.CG_ETAB);\n\t}", "public String getSolDegStr() {\n this.tanSolve();\n return \"x = \" + this.xdeg;\n }", "public double getSol() {\n this.tanSolve();\n return this.x;\n }", "public String getLibCompletUeChoisie() {\r\n\t\tif (eoDiplSelected != null) {\r\n\t\t\treturn (String)eoDiplSelected.valueForKey(\"mueCode\")+ \" \" +\r\n\t\t\t(String)eoDiplSelected.valueForKey(\"mueLibelle\");\r\n\t\t}\r\n\t\telse return null;\r\n\t}", "Integer getSOLid();", "public ComponenteCosto getComponenteCosto()\r\n/* 68: */ {\r\n/* 69: 91 */ return this.componenteCosto;\r\n/* 70: */ }", "@Override\n\tpublic String getSolution() {\n\t\t// COMPLETE THIS\n\t\tString sol = solutions.first();\n\t\treturn sol;\n\t}", "public String primerTicketDisponible() {\n\t\tString ticketLibre = \"|L|\";\n\t\tString ticketLibrePosicion;\n\t\tfor (int i = 0; i < getNumeroAsientosFila(); i++) {\n\t\t\tfor (int j = 0; j < getNumeroAsientosColumna(); j++) {\n\t\t\t\tif (vagonVacio[i][j].equals(ticketLibre)) {\n\t\t\t\t\tticketLibrePosicion = Integer.toString(i) +\" \"+ Integer.toString(j);\n\t\t\t\t\treturn ticketLibrePosicion;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic String getSolution() {\n\t\treturn \"Ajouter des composants au circuit\";\n\t}", "public String getLibelle() {\n\t\treturn getTo(true).getLibelle();\n\t}", "public Club employeur() {\n Embauche dernierEmbauche = myEmployees.get(myEmployees.size()-1);\n if(dernierEmbauche.estTerminee()){\n return null;\n }\n return dernierEmbauche.getEmployeur();\n }", "public Number getSolineId() {\n return (Number)getAttributeInternal(SOLINEID);\n }", "public int getSoluong() {\n return soluong;\n }", "public Complemento getC() {\n return C;\n }", "public String getCalidad()\n {\n String cadenaADevolver = \"\";\n \n cadenaADevolver = (calidad >= FULLHD) ? \"FullHD\" : \"HD\";\n \n return cadenaADevolver;\n }", "public String vystiskniCestu(){\n\t\t\n\t\tString vypis = \"Euleruv tah : \" + cesta.get(cesta.size()-1);\n\t\tfor(int i = cesta.size()-2 ; i >= 0;i--){\n\t\t\tvypis += \" -> \" + cesta.get(i);\n\t\t}\n\t\t\n\t\treturn vypis;\n\t}", "public PortAllié getLeCaire() {\n\t\treturn this.LeCaire;\n\t}", "public String getFinalCurso()\n\t{\n\t\treturn finalCurso.getDate();\n\t}", "protected TriangularDecomp getDecomp() {\n\t if (decomp == null) {\n\t\tif (H != null) {\n\t\t decomp = new CholeskyDecomp(H);\n\t\t H = null;\n\t\t}\n\t }\n\t return decomp;\n\t}", "public NiveauCentreDTO getEtape(){\n\t\treturn getNomenclatureDomainService().getNiveauCentreFromLibelle(DonneesStatic.CG_ETAPE);\n\t}", "public String getClasz() {\r\n \t\treturn clasz;\r\n \t}", "public int deplacementMax(Couleur couleurJoueur) {\n\t\tint max = 0;\n\t\tDeplacement deplacementCourant;\n\t\tfor(int i = 0; i < Constantes.N; i++) {\n\t\t\tfor(int j = 0; j < Constantes.N; j++) {\n\t\t\t\tPosition pos = new Position(i, j);\n\t\t\t\tif((obtenirPion(pos) != null) && obtenirPion(pos).aMemeCouleur(couleurJoueur)) {\n\t\t\t\t\tdeplacementCourant = new Deplacement();\n\t\t\t\t\tdeplacementCourant.add(pos);\n\t\t\t\t\tint maxCourant = backtrack(deplacementCourant, couleurJoueur);\n\t\t\t\t\tif(maxCourant > max) {\n\t\t\t\t\t\tmax = maxCourant;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"DeplMax: \" + max);\n\t\treturn max;\n\t}", "public double darExcentricidad( )\n {\n return excentricidad;\n }", "public Arbre delMotVide(){\n\t\tgauche = gauche.delMotVide();\n\t\tdroit = droit.delMotVide();\n\t\tif(gauche.symbole == '0' && droit.symbole == '0') return new Feuille('0');\n\t\tif(gauche.symbole == '0') return droit;\n\t\tif(droit.symbole == '0') return gauche;\n\t\treturn this;\n\t}", "public int getIdDetalleComponenteCosto()\r\n/* 58: */ {\r\n/* 59: 83 */ return this.idDetalleComponenteCosto;\r\n/* 60: */ }", "public String getMotEnCours() {\n\t\treturn null;\n\t}", "public PortAllié getSparte() {\n\t\treturn this.Sparte;\n\t}", "int getCedula();", "public String getSolution() {\n\t\treturn solution;\n\t}", "public String getDPTitel(){\n\t\treturn this.m_sDPTitel;\n\t}", "String getCidade();", "public int getValeurCourante() {\n\t\treturn this.valC;\n\t}", "public double get_Cd (double effaoa) {\n if (current_part.camber < 0) effaoa = -effaoa;\n return current_part.foil.get_Cd(current_part.cl, effaoa, current_part.thickness, current_part.camber, true);\n }", "public final TrajectoryInfo getSolution() { \n\t\treturn solution; \n\t}", "public java.lang.String getDesignador() {\r\n return designador;\r\n }", "public ControladorSoluciones() {\n this.soluciones = new ArrayList<Solucion>();\n }", "private double determinanteCuadrada(){\n\t\tdouble deter = 1;\n\t\tdouble [][] matriz = this.clone().getComponentes();\n\t\t\t\t\n\t\tfor(int i=0;i<this.dimensionCol;i++){\n\t\t\tif(matriz[i][i]==0){\n\t\t\t\tif(this.intercambiarConRenglonNoNuloPorDebajo(matriz, i)==true){\n\t\t\t\t\tdeter *= (-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.llevarACeroPosicionesPorDebajo(matriz, i);\n\t\t\tdeter*=matriz[i][i];\n\t\t}\n\t\t\t\t\n\t\treturn deter;\n\t}", "public String getThePanel() {\r\n\t\treturn secretIt.currentS().puzzle();\r\n\t}", "public void affichageSolution() {\n\t\t//On commence par retirer toutes les traces pré-existantes du labyrinthe\n\t\tfor (int i = 0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Trace) {\n\t\t\t\t\tthis.laby.getLabyrinthe()[i][j] = new Case();\n\t\t\t\t\t((JLabel)grille.getComponents()[i*this.laby.getLargeur()+j]).setIcon(this.laby.getLabyrinthe()[i][j].imageCase(themeJeu));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//On parcourt toutes les cases du labyrinthe. Si on trouve un filon non extrait dont le chemin qui le sépare au mineur est plus petit que shortestPath, on enregistre la longueur du chemin ainsi que les coordonnees de ledit filon\n\t\tint shortestPath = Integer.MAX_VALUE;\n\t\tint[] coordsNearestFilon = {-1,-1};\n\t\tfor (int i=0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tfor (int j=0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Filon && ((Filon)this.laby.getLabyrinthe()[i][j]).getExtrait() == false) {\n\t\t\t\t\tif (this.laby.solve(j,i) != null) {\n\t\t\t\t\t\tint pathSize = this.laby.solve(j,i).size();\n\t\t\t\t\t\tif (pathSize < shortestPath) {\n\t\t\t\t\t\t\tshortestPath = pathSize;\n\t\t\t\t\t\t\tcoordsNearestFilon[0] = j;\n\t\t\t\t\t\t\tcoordsNearestFilon[1] = 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}\n\n\t\t//Si il n'y a plus de filon non extrait atteignable, on cherche les coordonnes de la clef\n\t\tif (coordsNearestFilon[0] == -1) {\n\t\t\tcoordsNearestFilon = this.laby.getCoordsClef();\n\t\t\t//Si il n'y a plus de filon non extrait atteignable et que la clef a deja ouvert la porte, on cherche les coordonnes de la sortie\n\t\t\tif (coordsNearestFilon == null)\tcoordsNearestFilon = this.laby.getCoordsSortie();\n\t\t}\n\n\t\t//On cree une pile qui contient des couples de coordonnees qui correspondent a la solution, puis on depile car le dernier element est l'objectif vise\n\t\tStack<Integer[]> solution = this.laby.solve(coordsNearestFilon[0], coordsNearestFilon[1]);\n\t\tsolution.pop();\n\n\t\t//Tant que l'on n'arrive pas au premier element de la pile (cad la case ou se trouve le mineur), on depile tout en gardant l'element depile, qui contient les coordonnees d'une trace que l'on dessine en suivant dans la fenetre\n\t\twhile (solution.size() != 1) {\n\t\t\tInteger[] coordsTmp = solution.pop();\n\t\t\tTrace traceTmp = new Trace();\n\t\t\tthis.laby.getLabyrinthe()[coordsTmp[1]][coordsTmp[0]] = new Trace();\n\t\t\t((JLabel)grille.getComponents()[coordsTmp[1]*this.laby.getLargeur()+coordsTmp[0]]).setIcon(traceTmp.imageCase());\n\t\t}\n\t\tSystem.out.println(\"\\n========================================== SOLUTION =====================================\\n\");\n\t\tthis.affichageLabyrinthe();\n\t}", "public int getDegree() {\n this.polySolve();\n return this.degree;\n }", "public String getCommodityStructrueName() {\r\n return commodityStructrueName;\r\n }", "public String getLibelle() {\n\t\treturn _libelle;\n\t}", "Integer getChnlCde();", "String getCognome();", "@Override\n\tpublic String getSolverExe() {\n\t\treturn model.getSolverExe();\n\t}", "public java.lang.String getFeccorte() {\n return feccorte;\n }", "String getVorlesungKennung();", "public String getCommodityStructrueId() {\r\n return commodityStructrueId;\r\n }", "public String getLibelle() {\n return libelle;\n }", "public static Department getDepartment() {\n\t\treturn Departments.getDepartment(\"Computing Science\");\n\t}", "public String getCouleur() {\n return this.COULEUR;\n }", "public String getCouleur() {\n return this.COULEUR;\n }", "public String getX2SubCompStr() {\n this.polySubSolve();\n return this.x2compsub;\n }", "public CaseRecherchee getCheminEnCours() {\n int index = listeOuverte.indexOf(caseArrivee);\n return index != -1 ? listeOuverte.get(index) : null;\n }", "java.lang.String getDepartureAirportCity();", "public java.lang.String getLibelle(){\r\n return this.libelle;\r\n }", "public String consultaEqCiudad() {\n\t\tString res = \"\";\n\t\tString query = \"SELECT E.NOMBRE, C.NOMBRE FROM EQUIPOS E, CIUDADES C WHERE E.COD_CIUDAD == C.CODIGO\";\n\n\t\tConnection con = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rslt = null;\n\n\t\ttry {\n\t\t\tcon = acceso.getConnection();\n\t\t\tpstmt = con.prepareStatement(query);\n\t\t\trslt = pstmt.executeQuery();\n\n\t\t\twhile (rslt.next()) {\n\t\t\t\tres = res + rslt.getString(1) + \" - \" + rslt.getString(2) + \"\\n\";\n\t\t\t}\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (rslt != null)\n\t\t\t\t\trslt.close();\n\t\t\t\tif (pstmt != null)\n\t\t\t\t\tpstmt.close();\n\t\t\t\tif (con != null)\n\t\t\t\t\tcon.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}", "public String obtenerCicloLetra() {\n\n if (conectado) {\n try {\n String letra = \"\";\n\n String Query = \"SELECT `CURRENT_CICLO`() AS `CURRENT_CICLO`; \";\n Logy.mi(\"Query: \" + Query);\n Statement st = Conexion.createStatement();\n ResultSet resultSet;\n resultSet = st.executeQuery(Query);\n\n if (resultSet.next()) {\n letra = resultSet.getString(\"CURRENT_CICLO\");\n Logy.m(\"letra obtenida ------------ : \" + letra);\n } else {\n Logy.me(\"no se obtuvieron resultados de CURRENT_CICLO()\");\n }\n\n if (letra != null && (letra.equals(\"A\") || letra.equals(\"B\"))) {\n return letra;\n } else {\n Logy.me(\"error al obtener la letra del CICLO de DB\");\n return null;\n }\n\n } catch (SQLException ex) {\n Logy.me(\"No se pudo consultar CURRENT_CICLO`() de la DB: \" + ex.getMessage());\n return null;\n }\n } else {\n Logy.me(\"No se ha establecido previamente una conexion a la DB\");\n return null;\n }\n }", "public double getSueldo() {\n return sueldo;\n }", "public DegreeCurricularPlan getLastDegreeCurricularPlan() {\n\t\tDegreeCurricularPlan result = null;\n\t\tfor (DegreeCurricularPlan degreeCurricularPlan : getDegreeCurricularPlans()) {\n\t\t\tif (result == null\n\t\t\t\t\t|| degreeCurricularPlan.getBeginDate().after(\n\t\t\t\t\t\t\tresult.getBeginDate())) {\n\t\t\t\tresult = degreeCurricularPlan;\n\t\t\t}\n\n\t\t}\n\n\t\treturn result;\n\t}", "public Celda getIzquierda(){\r\n\t\tif(columna == 0)\r\n\t\t\treturn null;\r\n\t\telse\r\n\t\t\treturn mapa.getCelda(fila*Logica.CHEIGHT, (columna-1)*Logica.CWIDTH);\r\n\t}", "public String getX2CompStr() {\n this.polySolve();\n return this.x2comp;\n }", "public SolverDescription getSolverDescription() {\n\t\treturn fieldSolverDescription;\n\t}", "public double getCelsius(){\n return ((fahrenheit-32)*(5.0/9));\n }", "String getDepartureLocation();", "public java.lang.String getIdentificadorODE()\r\n {\r\n return this.identificadorODE;\r\n }", "public int getCxlangue() {\r\r\r\r\r\r\r\n return cxlangue;\r\r\r\r\r\r\r\n }", "Debut getDebut();", "@Override\n\tpublic String getDesignation() {\n\t\treturn libelle;\n\t}", "public ArrayList<Cella> getCelle() {\n\t\treturn celle;\n\t}", "public String getCouleur() {\n\t\treturn this.couleur;\n\t}", "public String findMaxDegree(String parolaInserire) {\n\t\t//System.err.println(\"findMaxDegree -- TODO\");\n\t\t//return -1;\n\t/*Set<String>vertici=grafo.vertexSet();\n\tint maxDegree=0;\n\tString vertexMaxDegree=null;\n\tfor(String vertice: vertici) {\n\t\tint vertexDegree=grafo.degreeOf(vertice);\n\t\tif(vertexDegree>=maxDegree) {\n\t\t\tmaxDegree=vertexDegree;\n\t\t\tvertexMaxDegree=vertice;}\n\t}\n\treturn maxDegree;*/\n\t\tList<String>vicini=Graphs.neighborListOf(grafo, parolaInserire);\n\t\tSet<String>vertici=grafo.vertexSet();\n\t\tint maxDegree=0;\n\t\tString vMaxDegree=null;\n\t\tfor(String parola: vertici) {\n\t\t\tif(vicini.contains(parola)) {\n\t\t\t int pDegree=grafo.degreeOf(parola);\n\t\t\t if(pDegree>=maxDegree) {\n\t\t\t\t maxDegree=pDegree;\n\t\t\t\t vMaxDegree=parola;\n\t\t\t }\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn maxDegree+\" \"+vMaxDegree;\n\t\n\t\t\n\t\t\n\t}", "public int getCoeficienteBernua()\n {\n return potenciaCV;\n }", "public String getCodedepartement() {\n return (String) getAttributeInternal(CODEDEPARTEMENT);\n }", "public Optional<ComponentSymbol> getComponent() {\r\n if (!this.getEnclosingScope().getSpanningSymbol().isPresent()) {\r\n return Optional.empty();\r\n }\r\n if (!(this.getEnclosingScope().getSpanningSymbol().get() instanceof ComponentSymbol)) {\r\n return Optional.empty();\r\n }\r\n return Optional.of((ComponentSymbol) this.getEnclosingScope().getSpanningSymbol().get());\r\n }", "public String getvCodtupa() {\n return vCodtupa;\n }", "int getC();", "public static String solution() {\r\n\t\treturn \"73162890\";\r\n\t}", "public double getPrecioCompra() {\n return precioCompra;\n }", "String getCE();", "String getCE();", "String getCE();", "String getCE();", "public String getNiveauEtude() {\n\t\treturn niveauEtude;\n\t}", "private double calculaDiametro(){\r\n double diametro;\r\n diametro=((cir.getY()-cir.getX())*2);\r\n return diametro;\r\n }", "public double berechneVolumen() {\n\t\treturn laenge * breite * hoehe;\n\t}", "public String getEstablecimiento()\r\n/* 114: */ {\r\n/* 115:188 */ return this.establecimiento;\r\n/* 116: */ }", "double getStation();", "public String getNomComplet() {\r\n\t\treturn nomComplet;\r\n\t}", "public java.lang.String getHora_desde();", "public String getSolveMethod() {\n return solveMethod;\n }", "public String getDepartureAirport();" ]
[ "0.7187706", "0.63070035", "0.61499155", "0.6103374", "0.60897344", "0.60804516", "0.60740525", "0.6066307", "0.6045591", "0.6001524", "0.5966037", "0.59585917", "0.59274346", "0.5872123", "0.58506083", "0.5842332", "0.583898", "0.5823196", "0.5821631", "0.58111864", "0.5802075", "0.5750333", "0.5736414", "0.5734118", "0.5724211", "0.57144016", "0.5704769", "0.56625783", "0.5655828", "0.5619258", "0.55983704", "0.5594289", "0.5582987", "0.55602396", "0.55543953", "0.5551213", "0.5534381", "0.55298597", "0.5527866", "0.55199474", "0.5516736", "0.5514487", "0.55104685", "0.5490734", "0.54879606", "0.5480528", "0.5479871", "0.54789305", "0.54787546", "0.5474581", "0.54556865", "0.5447303", "0.5443185", "0.5437791", "0.5427703", "0.5421811", "0.54216903", "0.5417455", "0.54132557", "0.5413206", "0.5413206", "0.54074836", "0.54034036", "0.5392082", "0.5388397", "0.5386316", "0.5378738", "0.5373106", "0.53728634", "0.5372778", "0.5372241", "0.53699327", "0.5368098", "0.536152", "0.53532296", "0.53514725", "0.5345302", "0.53385997", "0.5337726", "0.5336151", "0.53346974", "0.5332043", "0.5331942", "0.5330211", "0.5326222", "0.5308364", "0.53077835", "0.53067243", "0.530158", "0.530158", "0.530158", "0.530158", "0.5295739", "0.5288163", "0.5287669", "0.5283882", "0.52819204", "0.52791417", "0.52747256", "0.5273268", "0.52707005" ]
0.0
-1
Registers a shutdown hook for the Neo4j instance so that it shuts down nicely when the VM exits (even if you "CtrlC" the running application).
private static void registerShutdownHook( final GraphDatabaseService graphDb ) { Runtime.getRuntime().addShutdownHook( new Thread() { @Override public void run() { graphDb.shutdown(); } } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void registerShutdownHook() {\r\n\t\t// Registers a shutdown hook for the Neo4j instance so that it\r\n\t // shuts down nicely when the VM exits (even if you \"Ctrl-C\" the\r\n\t // running application).\r\n\t Runtime.getRuntime().addShutdownHook( new Thread()\r\n\t {\r\n\t @Override\r\n\t public void run()\r\n\t {\r\n\t _db.shutdown();\r\n\t }\r\n\t } );\r\n\t\t\r\n\t}", "private void registerShutdownHook()\n {\n Runtime.getRuntime().addShutdownHook( new Thread()\n {\n @Override\n public void run()\n {\n db.shutdown();\n }\n } );\n }", "private void registerShutdownHook() {\n Runtime.getRuntime().addShutdownHook(new Thread(\"Metastore Janitor Shutdown Hook\"){\n\n @Override\n public void run() {\n log.info(\"Shutting down all threads\");\n \n synchronized(tasks) {\n for(AbstractDynamoDBTask task : tasks) {\n task.running = false;\n }\n }\n \n synchronized(futures) {\n for(Future future: futures) {\n try {\n future.get();\n } catch (Exception ex) {\n log.error(\"\",ex);\n }\n }\n }\n \n executor.shutdown();\n }\n \n });\n }", "private static void registerShutdownHook(GraphDatabaseService graphDatabaseService,String database ) {\n\t\tRuntime.getRuntime()\n\t\t.addShutdownHook( new Thread() \n\t\t{ \n\t\t\t@Override \n\t\t\tpublic void run() \n\t\t\t{ \n\t\t\t\tSystem.out.println(\"neo4j graph database shutdown hook (\"+database+\")... \"); \n\t\t\t\tgraphDatabaseService.shutdown();\n\t\t\t} \n\t\t} ); \n\t}", "public void shutDown()\n {\n // Runtime.getRuntime().removeShutdownHook(shutdownListener);\n //shutdownListener.run();\n }", "private static void registerShutdownHook(final GraphDatabaseService graphDb) {\n\t\tRuntime.getRuntime().addShutdownHook( new Thread()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\tgraphDb.shutdown();\n\t\t\t}\n\t\t} );\n\t}", "private void registerShutdownHook(final GraphDatabaseService graphDb) {\n Runtime.getRuntime().addShutdownHook(new Thread() {\n @Override\n public void run() {\n graphDb.shutdown();\n }\n });\n }", "private static void registerShutdownHook(final GraphDatabaseService graphDb) {\n\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tgraphDb.shutdown();\n\t\t\t}\n\t\t});\n\t}", "private static void registerShutdownHook(final GraphDatabaseService graphDb) {\n\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tgraphDb.shutdown();\n\t\t\t}\n\t\t});\n\t}", "private static void addShutdownHook() {\n Runtime.getRuntime().addShutdownHook(new Thread() {\n @Override\n public void run() {\n System.out.println(\"I'm packing my stuff together.\");\n shutdown = true;\n Utility.sleep(WAIT_TIME_TO_SHUTDOWN);\n System.out.println(\"I'm going home.\");\n }\n });\n }", "public void shutdown();", "public void shutdown();", "public void shutdown();", "public void shutdown();", "public void shutdown()\n {\n // todo\n }", "@Override\n public void shutdown() {\n }", "@Override\n public void shutdown() {\n }", "@Override\n public void shutdown() {\n }", "public static void shutdown() {\n\t}", "public void shutdown() {\n // no-op\n }", "@Test\n public void testShutdownHook() {\n JVMUtils.closeAtShutdown(() -> {\n });\n }", "public void shutdown() {\n }", "private void addShutdownHook() {\n if (!Boolean.getBoolean(\n org.apache.geode.distributed.internal.InternalDistributedSystem.DISABLE_SHUTDOWN_HOOK_PROPERTY)) {\n Runtime.getRuntime().addShutdownHook(shutdownHook);\n }\n }", "public void shutdown() {\n/* 188 */ this.shutdown = true;\n/* */ }", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "void shutdown();", "@Override\n\tpublic void shutdown()\n\t{\n\t}", "@Override\n\tpublic void shutdown() {\n\t}", "@Override\n\tpublic void shutdown() {\n\t}", "@Override\n\tpublic void shutdown() {\n\t\t\n\t}", "@Override\r\n\tpublic void shutdown() {\n\t\tunRigisterMBean();\r\n\t}", "@Override\n public void shutdown() {\n }", "public void shutdown() {\n\t\t\n\t}", "@Override\n\tpublic void shutdown() {\n\n\t}", "public static void shutdown() {\n\t\t// Ignore\n\t}", "@Override\n public void shutdown()\n {\n // nothing to do\n }", "public void shutdown()\n {\n // nothing to do here\n }", "void shutdown() throws Exception;", "public abstract void shutdown();", "public abstract void shutdown();", "public abstract void shutdown();", "public abstract void shutdown();", "@Override\n protected void shutdown() {\n super.shutdown();\n // Now perform any other shutdown tasks you need.\n // ...\n }", "public void shutdown() {\n this.isShutdown = true;\n }", "protected abstract void shutdown();", "public void shutdown() {\n // For now, do nothing\n }", "public void shutdown()\r\n\t{\r\n\t\tgraphDb.shutdown();\r\n\t\tSystem.out.println(\"Shutdown-Done!\");\r\n\t}", "@Override\n public void shutdown() {\n log.debug(\"Shutting down Ebean ..\");\n\n // TODO: Verificar si es necesario des-registrar el driver\n this.ebeanServer.shutdown(true, false);\n }", "public void abnormalShutDown() {\n\t}", "@Override\n public void shutdownNow() {\n }", "public void shutdown() {\n shutdown(false);\n }", "@Override\n public void shutDown() {\n }", "public void notifyShutdown();", "@Override\n\t\tprotected void shutdown() {\n\n\t\t}", "protected void shutdown() {\n\r\n }", "public static void shutdown()\n\t{\n\t\tinstance = null;\n\t}", "public void shutdown(IMountShutdownObserver observer) throws RemoteException;", "@Override\r\n\tprotected void shutdownSpecific() {\n\r\n\t}", "@Override\n\tprotected void onShutdown(ApplicationEvent event) {\n\t\t\n\t}", "public void cleanShutDown () {\n shutdown = true;\n }", "@Override\n public void shutdown() {\n // Do nothing.\n }", "public void shutdown(){\n \tSystem.out.println(\"SHUTTING DOWN..\");\n \tSystem.exit(0);\n }", "public void shutdownForUpdate();", "public void shutDown();", "public void shutdown()\n\t{\n\t\ttry\n\t\t{\n\t\t\tsave();\n\t\t\tgetPreparedStatement(\"SHUTDOWN\").executeUpdate();\n\t\t\tgetConnection().close();\n\t\t} \n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly shutdown.\", e);\n\t\t}\n\t}", "public void serverWasShutdown();", "public void shutdownNow() {\n }", "public static void shutdown ()\n\t{\n\t\tif (m_interpreter != null)\n\t\t{\n\t\t\tm_console.dispose ();\n\t\t\tm_interpreter.cleanup ();\n\t\t}\n\t}", "public void shutdown() {\r\n System.exit(0);\r\n }", "@Override\n protected void shutDown() {\n }", "public static void shutdown() {\n if(registry != null)\n StandardServiceRegistryBuilder.destroy(registry);\n }", "public void shutdown() {\n mGameHandler.shutdown();\n mTerminalNetwork.terminate();\n }", "void shutDown();", "public synchronized void terminate () {\n shutdown = true;\n }", "public static void bgfx_shutdown() {\n long __functionAddress = Functions.shutdown;\n invokeV(__functionAddress);\n }", "void prepareForShutdown();", "@AfterClass\n public static void shutdown()\n {\n }", "@Override\n public String shutdown() {\n instance.shutdown();\n return \"ok\";\n }", "public void shutdownSilently() {\n shutdownSilently(true);\n }", "@Override\n public void shutdown() throws PluginException {\n\n }", "public void shutDown(){\n sequence128db.shutDown();\n }", "public void shutdown() {\n\t\tinternalShutdown();\n\t\tC4JPluginLogging.getDefault().removeLogManager(this); \n\t}", "public void shutdown()\n\t{\n\t\t; // do nothing\n\t}", "public void shutdown()\n {\n shutdown = true;\n cil.shutdown();\n }", "public void shutdown() {\n this.dontStop = false;\n }" ]
[ "0.8533637", "0.75183195", "0.7100708", "0.6970848", "0.6818391", "0.67898774", "0.676077", "0.6706226", "0.6706226", "0.6659673", "0.6656801", "0.6656801", "0.6656801", "0.6656801", "0.6598788", "0.6579343", "0.6579343", "0.6579343", "0.65754014", "0.6515996", "0.6494269", "0.64902896", "0.64804333", "0.6473708", "0.64281243", "0.64281243", "0.64281243", "0.64281243", "0.64281243", "0.64281243", "0.64281243", "0.64281243", "0.64281243", "0.64281243", "0.64281243", "0.64281243", "0.64281243", "0.64281243", "0.64281243", "0.64281243", "0.64281243", "0.64266956", "0.64238065", "0.64238065", "0.639077", "0.6389945", "0.63864785", "0.63442016", "0.63050133", "0.6284554", "0.62808996", "0.62724495", "0.6257829", "0.6243371", "0.6243371", "0.6243371", "0.6243371", "0.6232806", "0.6186813", "0.6182898", "0.6152645", "0.61395985", "0.61284095", "0.6112536", "0.60692084", "0.60581887", "0.60389936", "0.60366917", "0.6001425", "0.5999323", "0.59518385", "0.59488124", "0.59355843", "0.59142566", "0.5904287", "0.58936757", "0.58919704", "0.58877456", "0.58788705", "0.58727825", "0.58680385", "0.5866462", "0.58563375", "0.58475155", "0.5823029", "0.58016443", "0.5775848", "0.5768668", "0.57508725", "0.5742384", "0.5706335", "0.570621", "0.57050925", "0.568477", "0.56844366", "0.56791747", "0.567904", "0.56359476", "0.5624494", "0.5621855" ]
0.6886678
4
Create contents of the window.
protected void createContents() { DelAllShell = new Shell(SWT.CLOSE | SWT.MIN); final int WIDTH=java.awt.Toolkit.getDefaultToolkit().getScreenSize().width; final int HEIGHT=java.awt.Toolkit.getDefaultToolkit().getScreenSize().height; DelAllShell.setBounds((WIDTH-441)/2,(HEIGHT-300)/2,441, 177); DelAllShell.setText("清空"); Label messgLabel_1 = new Label(DelAllShell, SWT.CENTER); messgLabel_1.setFont(SWTResourceManager.getFont("微软雅黑", 13, SWT.NORMAL)); messgLabel_1.setBounds(10, 10, 405, 23); messgLabel_1.setText("您所选择的分组为通讯录列表,确认删除时"); Label messgLabel_2 = new Label(DelAllShell, SWT.CENTER); messgLabel_2.setFont(SWTResourceManager.getFont("微软雅黑", 13, SWT.NORMAL)); messgLabel_2.setBounds(62, 39, 272, 23); messgLabel_2.setText("清空所有内容!"); Button yesButton = new Button(DelAllShell, SWT.NONE); yesButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { try{ TreeItem[] treeItem=mainTreeItem.getItems(); for(int i=0;i<treeItem.length;i++) { treeItem[i].dispose(); } Groups.getGroupList().clear(); Users.getUserList().clear(); Groups.updateToFile(); Users.updateToFile(); }catch(Exception ex){ System.out.println("清空文件失败"); } DelAllShell.close(); //final Group mainTreeItem = new Group(tree, SWT.NONE); //mainTreeItem.setText("通讯录列表"); //mainShell.setVisible(true); } }); yesButton.setBounds(86, 102, 80, 27); yesButton.setText("确定"); Button noButton = new Button(DelAllShell, SWT.NONE); noButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { DelAllShell.close(); } }); noButton.setText("取消"); noButton.setBounds(254, 102, 80, 27); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\r\n\t}", "void createWindow();", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), SWT.TITLE);\r\n\r\n\t\tgetParent().setEnabled(false);\r\n\r\n\t\tshell.addShellListener(new ShellAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void shellClosed(ShellEvent e) {\r\n\t\t\t\tgetParent().setEnabled(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tshell.setImage(SWTResourceManager.getImage(LoginInfo.class, \"/javax/swing/plaf/metal/icons/ocean/warning.png\"));\r\n\r\n\t\tsetMidden(397, 197);\r\n\r\n\t\tshell.setText(this.windows_name);\r\n\t\tshell.setLayout(null);\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 11, SWT.NORMAL));\r\n\t\tlabel.setBounds(79, 45, 226, 30);\r\n\t\tlabel.setAlignment(SWT.CENTER);\r\n\t\tlabel.setText(this.label_show);\r\n\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\tbutton.setBounds(150, 107, 86, 30);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tshell.close();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setText(\"确定\");\r\n\r\n\t}", "protected void createContents() {\r\n\t\tsetText(\"SWT Application\");\r\n\t\tsetSize(450, 300);\r\n\r\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(656, 296);\n\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(838, 649);\n\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(437, 529);\n\n\t}", "protected void createContents() {\n\t\tsetText(\"Muokkaa asiakastietoja\");\n\t\tsetSize(800, 550);\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(41, 226, 75, 25);\n\t\tbtnNewButton.setText(\"Limpiar\");\n\t\t\n\t\tButton btnGuardar = new Button(shell, SWT.NONE);\n\t\tbtnGuardar.setBounds(257, 226, 75, 25);\n\t\tbtnGuardar.setText(\"Guardar\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(25, 181, 130, 21);\n\t\t\n\t\ttext_1 = new Text(shell, SWT.BORDER);\n\t\ttext_1.setBounds(230, 181, 130, 21);\n\t\t\n\t\ttext_2 = new Text(shell, SWT.BORDER);\n\t\ttext_2.setBounds(25, 134, 130, 21);\n\t\t\n\t\ttext_3 = new Text(shell, SWT.BORDER);\n\t\ttext_3.setBounds(25, 86, 130, 21);\n\t\t\n\t\ttext_4 = new Text(shell, SWT.BORDER);\n\t\ttext_4.setBounds(25, 42, 130, 21);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(227, 130, 75, 25);\n\t\tbtnNewButton_1.setText(\"Buscar\");\n\t\t\n\t\tLabel label = new Label(shell, SWT.NONE);\n\t\tlabel.setBounds(25, 21, 55, 15);\n\t\tlabel.setText(\"#\");\n\t\t\n\t\tLabel lblFechaYHora = new Label(shell, SWT.NONE);\n\t\tlblFechaYHora.setBounds(25, 69, 75, 15);\n\t\tlblFechaYHora.setText(\"Fecha y Hora\");\n\t\t\n\t\tLabel lblPlaca = new Label(shell, SWT.NONE);\n\t\tlblPlaca.setBounds(25, 113, 55, 15);\n\t\tlblPlaca.setText(\"Placa\");\n\t\t\n\t\tLabel lblMarca = new Label(shell, SWT.NONE);\n\t\tlblMarca.setBounds(25, 161, 55, 15);\n\t\tlblMarca.setText(\"Marca\");\n\t\t\n\t\tLabel lblColor = new Label(shell, SWT.NONE);\n\t\tlblColor.setBounds(230, 161, 55, 15);\n\t\tlblColor.setText(\"Color\");\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setLayout(new GridLayout(1, false));\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t{\r\n\t\t\tfinal Button btnShowTheFake = new Button(shell, SWT.TOGGLE);\r\n\t\t\tbtnShowTheFake.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\t\tif (btnShowTheFake.getSelection()) {\r\n\t\t\t\t\t\tRectangle bounds = btnShowTheFake.getBounds();\r\n\t\t\t\t\t\tPoint pos = shell.toDisplay(bounds.x + 5, bounds.y + bounds.height);\r\n\t\t\t\t\t\ttooltip = showTooltip(shell, pos.x, pos.y);\r\n\t\t\t\t\t\tbtnShowTheFake.setText(\"Hide it\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (tooltip != null && !tooltip.isDisposed())\r\n\t\t\t\t\t\t\ttooltip.dispose();\r\n\t\t\t\t\t\tbtnShowTheFake.setText(\"Show The Fake Tooltip\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbtnShowTheFake.setText(\"Show The Fake Tooltip\");\r\n\t\t}\r\n\t}", "protected void createContents() {\n\t\tMonitor primary = this.getDisplay().getPrimaryMonitor();\n\t\tRectangle bounds = primary.getBounds();\n\t\tRectangle rect = getBounds();\n\t\tint x = bounds.x + (bounds.width - rect.width) / 2;\n\t\tint y = bounds.y + (bounds.height - rect.height) / 2;\n\t\tsetLocation(x, y);\n\t}", "private void createWindow() {\r\n\t\t// Create the picture frame and initializes it.\r\n\t\tthis.createAndInitPictureFrame();\r\n\r\n\t\t// Set up the menu bar.\r\n\t\tthis.setUpMenuBar();\r\n\r\n\t\t// Create the information panel.\r\n\t\t//this.createInfoPanel();\r\n\r\n\t\t// Create the scrollpane for the picture.\r\n\t\tthis.createAndInitScrollingImage();\r\n\r\n\t\t// Show the picture in the frame at the size it needs to be.\r\n\t\tthis.pictureFrame.pack();\r\n\t\tthis.pictureFrame.setVisible(true);\r\n\t\tpictureFrame.setSize(728,560);\r\n\t}", "protected void createContents() {\r\n\t\tsetText(Messages.getString(\"HMS.PatientManagementShell.title\"));\r\n\t\tsetSize(900, 700);\r\n\r\n\t}", "private void createContents() {\r\n\t\tshlOProgramie = new Shell(getParent().getDisplay(), SWT.DIALOG_TRIM\r\n\t\t\t\t| SWT.RESIZE);\r\n\t\tshlOProgramie.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tshlOProgramie.setText(\"O programie\");\r\n\t\tshlOProgramie.setSize(386, 221);\r\n\t\tint x = 386;\r\n\t\tint y = 221;\r\n\t\t// Get the resolution\r\n\t\tRectangle pDisplayBounds = shlOProgramie.getDisplay().getBounds();\r\n\r\n\t\t// This formulae calculate the shell's Left ant Top\r\n\t\tint nLeft = (pDisplayBounds.width - x) / 2;\r\n\t\tint nTop = (pDisplayBounds.height - y) / 2;\r\n\r\n\t\t// Set shell bounds,\r\n\t\tshlOProgramie.setBounds(nLeft, nTop, x, y);\r\n\t\tsetText(\"O programie\");\r\n\r\n\t\tbtnZamknij = new Button(shlOProgramie, SWT.PUSH | SWT.BORDER_SOLID);\r\n\t\tbtnZamknij.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlOProgramie.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnZamknij.setBounds(298, 164, 68, 23);\r\n\t\tbtnZamknij.setText(\"Zamknij\");\r\n\r\n\t\tText link = new Text(shlOProgramie, SWT.READ_ONLY);\r\n\t\tlink.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlink.setBounds(121, 127, 178, 13);\r\n\t\tlink.setText(\"Kontakt: [email protected]\");\r\n\r\n\t\tCLabel lblNewLabel = new CLabel(shlOProgramie, SWT.BORDER\r\n\t\t\t\t| SWT.SHADOW_IN | SWT.SHADOW_OUT | SWT.SHADOW_NONE);\r\n\t\tlblNewLabel.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlblNewLabel.setBounds(118, 20, 248, 138);\r\n\t\tlblNewLabel\r\n\t\t\t\t.setText(\" Kalkulator walut ver 0.0.2 \\r\\n -------------------------------\\r\\n Program umo\\u017Cliwiaj\\u0105cy pobieranie\\r\\n aktualnych kurs\\u00F3w walut ze strony nbp.pl\\r\\n\\r\\n Copyright by Wojciech Trocki.\\r\\n\");\r\n\r\n\t\tLabel lblNewLabel_1 = new Label(shlOProgramie, SWT.NONE);\r\n\t\tlblNewLabel_1.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(\"images/about.gif\"));\r\n\t\tlblNewLabel_1.setBounds(10, 20, 100, 138);\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell(SWT.CLOSE | SWT.MIN);// 取消最大化与拖拽放大功能\n\t\tshell.setImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/MC.ico\"));\n\t\tshell.setBackgroundImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/back.jpg\"));\n\t\tshell.setBackgroundMode(SWT.INHERIT_DEFAULT);\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tshell.setSize(1157, 720);\n\t\tshell.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tshell.setLocation(Display.getCurrent().getClientArea().width / 2 - shell.getShell().getSize().x / 2,\n\t\t\t\tDisplay.getCurrent().getClientArea().height / 2 - shell.getSize().y / 2);\n\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/base.png\"));\n\t\tmenuItem.setText(\"\\u7A0B\\u5E8F\");\n\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\n\t\tMenuItem menuI_main = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuI_main.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmenuI_main.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_BookShow window = new Admin_BookShow();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI_main.setText(\"\\u4E3B\\u9875\");\n\n\t\tMenuItem menu_exit = new MenuItem(menu_1, SWT.NONE);\n\t\tmenu_exit.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/reset.png\"));\n\t\tmenu_exit.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tWelcomPart window = new WelcomPart();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu_exit.setText(\"\\u9000\\u51FA\");\n\n\t\tMenuItem menubook = new MenuItem(menu, SWT.CASCADE);\n\t\tmenubook.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookTypeManager.png\"));\n\t\tmenubook.setText(\"\\u56FE\\u4E66\\u7BA1\\u7406\");\n\n\t\tMenu menu_2 = new Menu(menubook);\n\t\tmenubook.setMenu(menu_2);\n\n\t\tMenuItem menu1_add = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu1_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_add window = new Book_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_add.setText(\"\\u6DFB\\u52A0\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_select = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_select.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu1_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// 图书查询\n\t\t\t\tshell.close();\n\t\t\t\tBook_select window = new Book_select();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_select.setText(\"\\u67E5\\u8BE2\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_alter = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu1_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_alter window = new Book_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_alter.setText(\"\\u4FEE\\u6539\\u56FE\\u4E66\");\n\n\t\tMenuItem menuI1_delete = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuI1_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenuI1_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_del window = new Book_del();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI1_delete.setText(\"\\u5220\\u9664\\u56FE\\u4E66\");\n\n\t\tMenuItem menutype = new MenuItem(menu, SWT.CASCADE);\n\t\tmenutype.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookManager.png\"));\n\t\tmenutype.setText(\"\\u4E66\\u7C7B\\u7BA1\\u7406\");\n\n\t\tMenu menu_3 = new Menu(menutype);\n\t\tmenutype.setMenu(menu_3);\n\n\t\tMenuItem menu2_add = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu2_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_add window = new Booktype_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_add.setText(\"\\u6DFB\\u52A0\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_alter = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu2_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_alter window = new Booktype_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_alter.setText(\"\\u4FEE\\u6539\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_delete = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenu2_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_delete window = new Booktype_delete();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_delete.setText(\"\\u5220\\u9664\\u4E66\\u7C7B\");\n\n\t\tMenuItem menumark = new MenuItem(menu, SWT.CASCADE);\n\t\tmenumark.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/student.png\"));\n\t\tmenumark.setText(\"\\u501F\\u8FD8\\u8BB0\\u5F55\");\n\n\t\tMenu menu_4 = new Menu(menumark);\n\t\tmenumark.setMenu(menu_4);\n\n\t\tMenuItem menu3_borrow = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_borrow.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/edit.png\"));\n\t\tmenu3_borrow.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_borrowmark window = new Admin_borrowmark();\n\t\t\t\twindow.open();// 借书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_borrow.setText(\"\\u501F\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem menu3_return = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_return.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu3_return.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_returnmark window = new Admin_returnmark();\n\t\t\t\twindow.open();// 还书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_return.setText(\"\\u8FD8\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem mntmhelp = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmhelp.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmntmhelp.setText(\"\\u5173\\u4E8E\");\n\n\t\tMenu menu_5 = new Menu(mntmhelp);\n\t\tmntmhelp.setMenu(menu_5);\n\n\t\tMenuItem menu4_Info = new MenuItem(menu_5, SWT.NONE);\n\t\tmenu4_Info.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/me.png\"));\n\t\tmenu4_Info.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_Info window = new Admin_Info();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu4_Info.setText(\"\\u8F6F\\u4EF6\\u4FE1\\u606F\");\n\n\t\ttable = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable.setFont(SWTResourceManager.getFont(\"黑体\", 10, SWT.NORMAL));\n\t\ttable.setLinesVisible(true);\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setBounds(10, 191, 1119, 447);\n\n\t\tTableColumn tableColumn = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn.setWidth(29);\n\n\t\tTableColumn tableColumn_id = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_id.setWidth(110);\n\t\ttableColumn_id.setText(\"\\u56FE\\u4E66\\u7F16\\u53F7\");\n\n\t\tTableColumn tableColumn_name = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_name.setWidth(216);\n\t\ttableColumn_name.setText(\"\\u56FE\\u4E66\\u540D\\u79F0\");\n\n\t\tTableColumn tableColumn_author = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_author.setWidth(117);\n\t\ttableColumn_author.setText(\"\\u56FE\\u4E66\\u79CD\\u7C7B\");\n\n\t\tTableColumn tableColumn_pub = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_pub.setWidth(148);\n\t\ttableColumn_pub.setText(\"\\u4F5C\\u8005\");\n\n\t\tTableColumn tableColumn_stock = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_stock.setWidth(167);\n\t\ttableColumn_stock.setText(\"\\u51FA\\u7248\\u793E\");\n\n\t\tTableColumn tableColumn_sortid = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_sortid.setWidth(79);\n\t\ttableColumn_sortid.setText(\"\\u5E93\\u5B58\");\n\n\t\tTableColumn tableColumn_record = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_record.setWidth(247);\n\t\ttableColumn_record.setText(\"\\u767B\\u8BB0\\u65F6\\u95F4\");\n\n\t\tCombo combo_way = new Combo(shell, SWT.NONE);\n\t\tcombo_way.add(\"图书编号\");\n\t\tcombo_way.add(\"图书名称\");\n\t\tcombo_way.add(\"图书作者\");\n\t\tcombo_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tcombo_way.setBounds(314, 157, 131, 28);\n\n\t\t// 遍历查询book表\n\t\tButton btnButton_select = new Button(shell, SWT.NONE);\n\t\tbtnButton_select.setImage(SWTResourceManager.getImage(Book_select.class, \"/images/search.png\"));\n\t\tbtnButton_select.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tbtnButton_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tBook book = new Book();\n\t\t\t\tSelectbook selectbook = new Selectbook();\n\t\t\t\ttable.removeAll();\n\t\t\t\tif (combo_way.getText().equals(\"图书编号\")) {\n\t\t\t\t\tbook.setBook_id(text_select.getText().trim());\n\t\t\t\t\tString str[][] = selectbook.ShowAidBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书名称\")) {\n\t\t\t\t\tbook.setBook_name(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAnameBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书作者\")) {\n\t\t\t\t\tbook.setBook_author(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAauthorBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().length() == 0) {\n\t\t\t\t\tString str[][] = selectbook.ShowAllBook();\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnButton_select.setBounds(664, 155, 98, 30);\n\t\tbtnButton_select.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tbtnButton_select.setText(\"查询\");\n\n\t\ttext_select = new Text(shell, SWT.BORDER);\n\t\ttext_select.setBounds(472, 155, 186, 30);\n\n\t\tLabel lblNewLabel_way = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_way.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel_way.setBounds(314, 128, 107, 30);\n\t\tlblNewLabel_way.setText(\"\\u67E5\\u8BE2\\u65B9\\u5F0F\\uFF1A\");\n\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tlblNewLabel_1.setForeground(SWTResourceManager.getColor(255, 255, 255));\n\t\tlblNewLabel_1.setFont(SWTResourceManager.getFont(\"黑体\", 25, SWT.BOLD));\n\t\tlblNewLabel_1.setAlignment(SWT.CENTER);\n\t\tlblNewLabel_1.setBounds(392, 54, 266, 48);\n\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setText(\"\\u8F93\\u5165\\uFF1A\");\n\t\tlblNewLabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel.setBounds(472, 129, 76, 20);\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tnum1 = new Text(shell, SWT.BORDER);\n\t\tnum1.setBounds(32, 51, 112, 19);\n\t\t\n\t\tnum2 = new Text(shell, SWT.BORDER);\n\t\tnum2.setBounds(32, 120, 112, 19);\n\t\t\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setBounds(32, 31, 92, 14);\n\t\tlblNewLabel.setText(\"First Number:\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setBounds(32, 100, 112, 14);\n\t\tlblNewLabel_1.setText(\"Second Number: \");\n\t\t\n\t\tfinal Label answer = new Label(shell, SWT.NONE);\n\t\tanswer.setBounds(35, 204, 60, 14);\n\t\tanswer.setText(\"Answer:\");\n\t\t\n\t\tButton plusButton = new Button(shell, SWT.NONE);\n\t\tplusButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint number1, number2;\n\t\t\t\ttry {\n\t\t\t\t\tnumber1 = Integer.parseInt(num1.getText());\n\t\t\t\t}\n\t\t\t\tcatch (Exception exc) {\n\t\t\t\t\tMessageDialog.openError(shell, \"Error\", \"Bad number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tnumber2 = Integer.parseInt(num2.getText());\n\t\t\t\t}\n\t\t\t\tcatch (Exception exc) {\n\t\t\t\t\tMessageDialog.openError(shell, \"Error\", \"Bad number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tint ans = number1 + number2;\n\t\t\t\tanswer.setText(\"Answer: \" + ans);\n\t\t\t}\n\t\t});\n\t\tplusButton.setBounds(29, 158, 56, 28);\n\t\tplusButton.setText(\"+\");\n\t\t\n\t\t\n\n\t}", "private void createContents() {\r\n\t\tshlEventBlocker = new Shell(getParent(), getStyle());\r\n\t\tshlEventBlocker.setSize(167, 135);\r\n\t\tshlEventBlocker.setText(\"Event Blocker\");\r\n\t\t\r\n\t\tLabel lblRunningEvent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblRunningEvent.setBounds(10, 10, 100, 15);\r\n\t\tlblRunningEvent.setText(\"Running Event:\");\r\n\t\t\r\n\t\tLabel lblevent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblevent.setFont(SWTResourceManager.getFont(\"Segoe UI\", 15, SWT.BOLD));\r\n\t\tlblevent.setBounds(20, 31, 129, 35);\r\n\t\tlblevent.setText(eventName);\r\n\t\t\r\n\t\tButton btnFinish = new Button(shlEventBlocker, SWT.NONE);\r\n\t\tbtnFinish.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlEventBlocker.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFinish.setBounds(10, 72, 75, 25);\r\n\t\tbtnFinish.setText(\"Finish\");\r\n\r\n\t}", "private void createContents() {\n\t\tshlEditionRussie = new Shell(getParent(), getStyle());\n\t\tshlEditionRussie.setSize(470, 262);\n\t\tshlEditionRussie.setText(\"Edition r\\u00E9ussie\");\n\t\t\n\t\tLabel lblLeFilm = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblLeFilm.setBounds(153, 68, 36, 15);\n\t\tlblLeFilm.setText(\"Le film\");\n\t\t\n\t\tLabel lblXx = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblXx.setBounds(195, 68, 21, 15);\n\t\tlblXx.setText(\"\" + getViewModel());\n\t\t\n\t\tLabel lblABient = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblABient.setText(\"a bien \\u00E9t\\u00E9 modifi\\u00E9\");\n\t\tlblABient.setBounds(222, 68, 100, 15);\n\t\t\n\t\tButton btnRevenirLa = new Button(shlEditionRussie, SWT.NONE);\n\t\tbtnRevenirLa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tm_Infrastructure.runController(shlEditionRussie, ListMoviesController.class);\n\t\t\t}\n\t\t});\n\t\tbtnRevenirLa.setBounds(153, 105, 149, 25);\n\t\tbtnRevenirLa.setText(\"Revenir \\u00E0 la liste des films\");\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tGroup group_1 = new Group(shell, SWT.NONE);\n\t\tgroup_1.setText(\"\\u65B0\\u4FE1\\u606F\\u586B\\u5199\");\n\t\tgroup_1.setBounds(0, 120, 434, 102);\n\t\t\n\t\tLabel label_4 = new Label(group_1, SWT.NONE);\n\t\tlabel_4.setBounds(10, 21, 61, 17);\n\t\tlabel_4.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel label_5 = new Label(group_1, SWT.NONE);\n\t\tlabel_5.setText(\"\\u7528\\u6237\\u7535\\u8BDD\");\n\t\tlabel_5.setBounds(10, 46, 61, 17);\n\t\t\n\t\tLabel label_6 = new Label(group_1, SWT.NONE);\n\t\tlabel_6.setText(\"\\u5BC6\\u7801\");\n\t\tlabel_6.setBounds(10, 75, 61, 17);\n\t\t\n\t\ttext = new Text(group_1, SWT.BORDER);\n\t\ttext.setBounds(121, 21, 140, 17);\n\t\t\n\t\ttext_1 = new Text(group_1, SWT.BORDER);\n\t\ttext_1.setBounds(121, 46, 140, 17);\n\t\t\n\t\ttext_2 = new Text(group_1, SWT.BORDER);\n\t\ttext_2.setBounds(121, 75, 140, 17);\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.setBounds(31, 228, 80, 27);\n\t\tbtnNewButton.setText(\"\\u63D0\\u4EA4\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(288, 228, 80, 27);\n\t\tbtnNewButton_1.setText(\"\\u91CD\\u586B\");\n\t\t\n\t\tGroup group = new Group(shell, SWT.NONE);\n\t\tgroup.setText(\"\\u539F\\u5148\\u4FE1\\u606F\");\n\t\tgroup.setBounds(0, 10, 320, 102);\n\t\t\n\t\tLabel label = new Label(group, SWT.NONE);\n\t\tlabel.setBounds(10, 20, 61, 17);\n\t\tlabel.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel lblNewLabel = new Label(group, SWT.NONE);\n\t\tlblNewLabel.setBounds(113, 20, 61, 17);\n\t\t\n\t\tLabel label_1 = new Label(group, SWT.NONE);\n\t\tlabel_1.setBounds(10, 43, 61, 17);\n\t\tlabel_1.setText(\"\\u6027\\u522B\");\n\t\t\n\t\tButton btnRadioButton = new Button(group, SWT.RADIO);\n\t\t\n\t\tbtnRadioButton.setBounds(90, 43, 97, 17);\n\t\tbtnRadioButton.setText(\"\\u7537\");\n\t\tButton btnRadioButton_1 = new Button(group, SWT.RADIO);\n\t\tbtnRadioButton_1.setBounds(208, 43, 97, 17);\n\t\tbtnRadioButton_1.setText(\"\\u5973\");\n\t\t\n\t\tLabel label_2 = new Label(group, SWT.NONE);\n\t\tlabel_2.setBounds(10, 66, 61, 17);\n\t\tlabel_2.setText(\"\\u7528\\u6237\\u7535\\u8BDD\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(group, SWT.NONE);\n\t\tlblNewLabel_1.setBounds(113, 66, 61, 17);\n\t\t\n\t\tLabel label_3 = new Label(group, SWT.NONE);\n\t\tlabel_3.setBounds(10, 89, 61, 17);\n\t\tlabel_3.setText(\"\\u5BC6\\u7801\");\n\t\tLabel lblNewLabel_2 = new Label(group, SWT.NONE);\n\t\tlblNewLabel_2.setBounds(113, 89, 61, 17);\n\t\t\n\t\ttry {\n\t\t\tUserDao userDao=new UserDao();\n\t\t\tlblNewLabel_2.setText(User.getPassword());\n\t\t\tlblNewLabel.setText(User.getUserName());\n\t\t\n\t\t\t\n\n\t\t\n\t\t\ttry {\n\t\t\t\tList<User> userList=userDao.query();\n\t\t\t\tString results[][]=new String[userList.size()][5];\n\t\t\t\tlblNewLabel.setText(User.getUserName());\n\t\t\t\tlblNewLabel_1.setText(User.getSex());\n\t\t\t\tlblNewLabel_2.setText(User.getUserPhone());\n\t\t\t\tButton button = new Button(shell, SWT.NONE);\n\t\t\t\tbutton.setBounds(354, 0, 80, 27);\n\t\t\t\tbutton.setText(\"\\u8FD4\\u56DE\");\n\t\t\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\t\t\tshell.dispose();\n\t\t\t\t\t\tbook book=new book();\n\t\t\t\t\t\tbook.open();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(int i = 0; i < userList.size(); i++) {\n\t\t\t\t\t\tUser user1 = (User)userList.get(i);\t\n\t\t\t\t\tresults[i][0] = user1.getUserName();\n\t\t\t\t\tresults[i][1] = user1.getSex();\t\n\t\t\t\t\tresults[i][2] = user1.getPassword();\t\n\t\n\t\t\t\t\tif(user1.getSex().equals(\"男\"))\n\t\t\t\t\t\tbtnRadioButton.setSelection(true);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tbtnRadioButton_1.setSelection(true);\n\t\t\t\t\tlblNewLabel_1.setText(user1.getUserPhone());\n\t\t\t\t}\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\t\t\t\n\t\t\tif(!text_1.getText().equals(\"\")&&!text.getText().equals(\"\")&&!text_2.getText().equals(\"\"))\n\t\t\tuserDao.updateUser(text_1.getText(), text.getText(), text_2.getText());\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\n\t\t\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tuserDao.updateUser(text_1.getText(), text.getText(), text_2.getText());\n\t\t\t\t\tif(!text_1.getText().equals(\"\")&&!text_2.getText().equals(\"\")&&!text.getText().equals(\"\"))\n\t\t\t\t\t{shell.dispose();\n\t\t\t\t\tbook book=new book();\n\t\t\t\t\tbook.open();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{JOptionPane.showMessageDialog(null,\"用户名或密码不能为空\",\"错误\",JOptionPane.PLAIN_MESSAGE);}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t});\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\t\ttext.setText(\"\");\n\t\t\t\t\ttext_1.setText(\"\");\n\t\t\t\t\ttext_2.setText(\"\");\n\t\t\t\n\t\t\t}\n\t\t});\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(764, 551);\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmFile = new MenuItem(menu, SWT.NONE);\n\t\tmntmFile.setText(\"File...\");\n\t\t\n\t\tMenuItem mntmEdit = new MenuItem(menu, SWT.NONE);\n\t\tmntmEdit.setText(\"Edit\");\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\tcomposite.setLayout(null);\n\t\t\n\t\tGroup grpDirectorio = new Group(composite, SWT.NONE);\n\t\tgrpDirectorio.setText(\"Directorio\");\n\t\tgrpDirectorio.setBounds(10, 86, 261, 387);\n\t\t\n\t\tGroup grpListadoDeAccesos = new Group(composite, SWT.NONE);\n\t\tgrpListadoDeAccesos.setText(\"Listado de Accesos\");\n\t\tgrpListadoDeAccesos.setBounds(277, 86, 477, 387);\n\t\t\n\t\tLabel label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabel.setBounds(10, 479, 744, 2);\n\t\t\n\t\tButton btnNewButton = new Button(composite, SWT.NONE);\n\t\tbtnNewButton.setBounds(638, 491, 94, 28);\n\t\tbtnNewButton.setText(\"New Button\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(composite, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(538, 491, 94, 28);\n\t\tbtnNewButton_1.setText(\"New Button\");\n\t\t\n\t\tToolBar toolBar = new ToolBar(composite, SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar.setBounds(10, 10, 744, 20);\n\t\t\n\t\tToolItem tltmAccion = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion.setText(\"Accion 1\");\n\t\t\n\t\tToolItem tltmAccion_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion_1.setText(\"Accion 2\");\n\t\t\n\t\tToolItem tltmRadio = new ToolItem(toolBar, SWT.RADIO);\n\t\ttltmRadio.setText(\"Radio\");\n\t\t\n\t\tToolItem tltmItemDrop = new ToolItem(toolBar, SWT.DROP_DOWN);\n\t\ttltmItemDrop.setText(\"Item drop\");\n\t\t\n\t\tToolItem tltmCheckItem = new ToolItem(toolBar, SWT.CHECK);\n\t\ttltmCheckItem.setText(\"Check item\");\n\t\t\n\t\tCoolBar coolBar = new CoolBar(composite, SWT.FLAT);\n\t\tcoolBar.setBounds(10, 39, 744, 30);\n\t\t\n\t\tCoolItem coolItem_1 = new CoolItem(coolBar, SWT.NONE);\n\t\tcoolItem_1.setText(\"Accion 1\");\n\t\t\n\t\tCoolItem coolItem = new CoolItem(coolBar, SWT.NONE);\n\n\t}", "@Override\n\tpublic void create() {\n\t\twithdrawFrame = new JFrame();\n\t\tthis.constructContent();\n\t\twithdrawFrame.setSize(800,500);\n\t\twithdrawFrame.show();\n\t\twithdrawFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t}", "void buildWindow()\n { main.gui.gralMng.selectPanel(\"primaryWindow\");\n main.gui.gralMng.setPosition(-30, 0, -47, 0, 'r'); //right buttom, about half less display width and hight.\n int windProps = GralWindow.windConcurrently;\n GralWindow window = main.gui.gralMng.createWindow(\"windStatus\", \"Status - The.file.Commander\", windProps);\n windStatus = window; \n main.gui.gralMng.setPosition(3.5f, GralPos.size -3, 1, GralPos.size +5, 'd');\n widgCopy = main.gui.gralMng.addButton(\"sCopy\", main.copyCmd.actionConfirmCopy, \"copy\");\n widgEsc = main.gui.gralMng.addButton(\"dirBytes\", actionButton, \"esc\");\n }", "protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\n\t}", "private void createContents() {\n\t\tshell = new Shell(getParent(), getStyle());\n\n\t\tshell.setSize(379, 234);\n\t\tshell.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tLabel dialogAccountHeader = new Label(shell, SWT.NONE);\n\t\tdialogAccountHeader.setAlignment(SWT.CENTER);\n\t\tdialogAccountHeader.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tdialogAccountHeader.setLayoutData(BorderLayout.NORTH);\n\t\tif(!this.isNeedAdd)\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u043B\\u0435\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.BOLD));\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\t\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel.setBounds(10, 16, 106, 21);\n\t\tlabel.setText(\"\\u0418\\u043C\\u044F \\u0441\\u0435\\u0440\\u0432\\u0435\\u0440\\u0430\");\n\t\t\n\t\ttextServer = new Text(composite, SWT.BORDER);\n\t\ttextServer.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextServer.setBounds(122, 13, 241, 32);\n\t\t\n\t\n\t\tLabel label_1 = new Label(composite, SWT.NONE);\n\t\tlabel_1.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_1.setText(\"\\u041B\\u043E\\u0433\\u0438\\u043D\");\n\t\tlabel_1.setBounds(10, 58, 55, 21);\n\t\t\n\t\ttextLogin = new Text(composite, SWT.BORDER);\n\t\ttextLogin.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextLogin.setBounds(122, 55, 241, 32);\n\t\ttextLogin.setFocus();\n\t\t\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_2.setText(\"\\u041F\\u0430\\u0440\\u043E\\u043B\\u044C\");\n\t\tlabel_2.setBounds(10, 106, 55, 21);\n\t\t\n\t\ttextPass = new Text(composite, SWT.PASSWORD | SWT.BORDER);\n\t\ttextPass.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextPass.setBounds(122, 103, 241, 32);\n\t\t\n\t\tif(isNeedAdd){\n\t\t\ttextServer.setText(\"imap.mail.ru\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttextServer.setText(this.account.getServer());\n\t\t\ttextLogin.setText(account.getLogin());\n\t\t\ttextPass.setText(account.getPass());\n\t\t}\n\t\t\n\t\tComposite composite_1 = new Composite(shell, SWT.NONE);\n\t\tcomposite_1.setLayoutData(BorderLayout.SOUTH);\n\t\t\n\t\tButton btnSaveAccount = new Button(composite_1, SWT.NONE);\n\t\tbtnSaveAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tString login = textLogin.getText();\n\t\t\t\tif(textServer.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле имя сервера не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textLogin.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if (!login.matches(\"^([_A-Za-z0-9-]+)@([A-Za-z0-9]+)\\\\.([A-Za-z]{2,})$\"))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин введен некорректно!\");\n\t\t\t\t\treturn;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(Setting.Instance().AnyAccounts(textLogin.getText(), isNeedAdd))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"такой логин уже существует!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textPass.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле пароль не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(isNeedAdd)\n\t\t\t\t{\n\t\t\t\t\tservice.AddAccount(textServer.getText(), textLogin.getText(), textPass.getText());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\taccount.setLogin(textLogin.getText());\n\t\t\t\t\taccount.setPass(textPass.getText());\n\t\t\t\t\taccount.setServer(textServer.getText());\t\n\t\t\t\t\tservice.EditAccount(account);\n\t\t\t\t}\n\t\t\t\tservice.RepaintAccount(table);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnSaveAccount.setLocation(154, 0);\n\t\tbtnSaveAccount.setSize(96, 32);\n\t\tbtnSaveAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tbtnSaveAccount.setText(\"\\u0421\\u043E\\u0445\\u0440\\u0430\\u043D\\u0438\\u0442\\u044C\");\n\t\t\n\t\tButton btnCancel = new Button(composite_1, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setLocation(267, 0);\n\t\tbtnCancel.setSize(96, 32);\n\t\tbtnCancel.setText(\"\\u041E\\u0442\\u043C\\u0435\\u043D\\u0430\");\n\t\tbtnCancel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(44, 47, 90, 24);\r\n\t\tlabel.setText(\"充值金额:\");\r\n\t\t\r\n\t\ttext_balance = new Text(shell, SWT.BORDER);\r\n\t\ttext_balance.setBounds(156, 47, 198, 30);\r\n\t\t\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\t//确认充值\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tString balance=text_balance.getText().trim();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tint i=dao.add(balance);\r\n\t\t\t\t\tif(i>0){\r\n\t\t\t\t\t\tswtUtil.showMessage(shell, \"成功提示\", \"充值成功\");\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswtUtil.showMessage(shell, \"错误提示\", \"所充值不能为零\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setBounds(140, 131, 114, 34);\r\n\t\tbutton.setText(\"确认充值\");\r\n\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.addShellListener(new ShellAdapter() {\n\t\t\t@Override\n\t\t\tpublic void shellActivated(ShellEvent e) {\n\t\t\t\tloadSettings();\n\t\t\t}\n\t\t});\n\t\tshell.setSize(450, 160);\n\t\tshell.setText(\"Settings\");\n\t\t\n\t\ttextUsername = new Text(shell, SWT.BORDER);\n\t\ttextUsername.setBounds(118, 10, 306, 21);\n\t\t\n\t\ttextPassword = new Text(shell, SWT.BORDER | SWT.PASSWORD);\n\t\ttextPassword.setBounds(118, 38, 306, 21);\n\t\t\n\t\tCLabel lblLogin = new CLabel(shell, SWT.NONE);\n\t\tlblLogin.setBounds(10, 10, 61, 21);\n\t\tlblLogin.setText(\"Login\");\n\t\t\n\t\tCLabel lblPassword = new CLabel(shell, SWT.NONE);\n\t\tlblPassword.setText(\"Password\");\n\t\tlblPassword.setBounds(10, 38, 61, 21);\n\t\t\n\t\tButton btnSave = new Button(shell, SWT.NONE);\n\t\tbtnSave.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tApplicationSettings as = new ApplicationSettings();\n\t\t as.savePassword(textPassword.getText());\n\t\t as.saveUsername(textUsername.getText());\n\t\t \n\t\t connectionOK = WSHandler.setAutoFillDailyReports(btnAutomaticDailyReport.getSelection());\n\t\t \n\t\t shell.close();\n\t\t if (!(parentDialog == null)) {\n\t\t \tparentDialog.reloadTable();\n\t\t }\n\t\t\t}\n\t\t});\n\t\tbtnSave.setBounds(10, 87, 414, 25);\n\t\tbtnSave.setText(\"Save\");\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 395);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t\r\n\t\tnachname = new Text(shell, SWT.BORDER);\r\n\t\tnachname.setBounds(32, 27, 76, 21);\r\n\t\t\r\n\t\tvorname = new Text(shell, SWT.BORDER);\r\n\t\tvorname.setBounds(32, 66, 76, 21);\r\n\t\t\r\n\t\tLabel lblNachname = new Label(shell, SWT.NONE);\r\n\t\tlblNachname.setBounds(135, 33, 55, 15);\r\n\t\tlblNachname.setText(\"Nachname\");\r\n\t\t\r\n\t\tLabel lblVorname = new Label(shell, SWT.NONE);\r\n\t\tlblVorname.setBounds(135, 66, 55, 15);\r\n\t\tlblVorname.setText(\"Vorname\");\r\n\t\t\r\n\t\tButton btnFgeListeHinzu = new Button(shell, SWT.NONE);\r\n\t\tbtnFgeListeHinzu.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t//\r\n\t\t\t\tPerson p = new Person();\r\n\t\t\t\tp.setNachname(getNachname().getText());\r\n\t\t\t\tp.setVorname(getVorname().getText());\r\n\t\t\t\t//\r\n\t\t\t\tPerson.getPersonenListe().add(p);\r\n\t\t\t\tgetGuiListe().add(p.toString());\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFgeListeHinzu.setBounds(43, 127, 147, 25);\r\n\t\tbtnFgeListeHinzu.setText(\"f\\u00FCge liste hinzu\");\r\n\t\t\r\n\t\tButton btnWriteJson = new Button(shell, SWT.NONE);\r\n\t\tbtnWriteJson.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tPerson.write2JSON();\r\n\t\t\t\t\t//\r\n\t\t\t\t\tMessageBox mb = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);\r\n\t\t\t\t\tmb.setText(\"JSON geschrieben\");\r\n\t\t\t\t\tmb.setMessage(Person.getPersonenListe().size() + \" Einträge erfolgreich geschrieben\");\r\n\t\t\t\t\tmb.open();\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\tMessageBox mb = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK);\r\n\t\t\t\t\tmb.setText(\"Fehler bei JSON\");\r\n\t\t\t\t\tmb.setMessage(e1.getMessage());\r\n\t\t\t\t\tmb.open();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnWriteJson.setBounds(54, 171, 75, 25);\r\n\t\tbtnWriteJson.setText(\"write 2 json\");\r\n\t\t\r\n\t\tguiListe = new List(shell, SWT.BORDER);\r\n\t\tguiListe.setBounds(43, 221, 261, 125);\r\n\r\n\t}", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), getStyle());\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(getText());\r\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite = new Composite(shell, SWT.NONE);\r\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite_1 = new Composite(composite, SWT.NONE);\r\n\t\tRowLayout rl_composite_1 = new RowLayout(SWT.VERTICAL);\r\n\t\trl_composite_1.center = true;\r\n\t\trl_composite_1.fill = true;\r\n\t\tcomposite_1.setLayout(rl_composite_1);\r\n\t\t\r\n\t\tComposite composite_2 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_2.setLayout(new FillLayout(SWT.VERTICAL));\r\n\t\t\r\n\t\tButton btnNewButton = new Button(composite_2, SWT.NONE);\r\n\t\tbtnNewButton.setText(\"New Button\");\r\n\t\t\r\n\t\tButton btnRadioButton = new Button(composite_2, SWT.RADIO);\r\n\t\tbtnRadioButton.setText(\"Radio Button\");\r\n\t\t\r\n\t\tButton btnCheckButton = new Button(composite_2, SWT.CHECK);\r\n\t\tbtnCheckButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCheckButton.setText(\"Check Button\");\r\n\r\n\t}", "private void buildWindow(){\r\n\t\tthis.setSize(new Dimension(600, 400));\r\n\t\tFunctions.setDebug(true);\r\n\t\tbackendConnector = new BackendConnector(this);\r\n\t\tguiManager = new GUIManager(this);\r\n\t\tmainCanvas = new MainCanvas(this);\r\n\t\tadd(mainCanvas);\r\n\t}", "public void createWindow(){\n JFrame frame = new JFrame(\"Baser Aps sick leave prototype\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setSize(screenSize.width,screenSize.height);\n frame.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\n /**\n * Setting up the main layout\n */\n Container allContent = frame.getContentPane();\n allContent.setLayout(new BorderLayout()); //main layout is BorderLayout\n\n /**\n * Stuff in the content pane\n */\n JButton button = new JButton(\"Press\");\n JTextPane text = new JTextPane();\n text.setText(\"POTATO TEST\");\n text.setEditable(false);\n JMenuBar menuBar = new JMenuBar();\n JMenu file = new JMenu(\"File\");\n JMenu help = new JMenu(\"Help\");\n JMenuItem open = new JMenuItem(\"Open...\");\n JMenuItem saveAs = new JMenuItem(\"Save as\");\n open.addMouseListener(new MouseListener() {\n @Override\n public void mouseClicked(MouseEvent e) {\n fileChooser.showOpenDialog(frame);\n }\n\n @Override\n public void mousePressed(MouseEvent e) {\n\n }\n\n @Override\n public void mouseReleased(MouseEvent e) {\n\n }\n\n @Override\n public void mouseEntered(MouseEvent e) {\n\n }\n\n @Override\n public void mouseExited(MouseEvent e) {\n\n }\n });\n file.add(open);\n file.add(saveAs);\n menuBar.add(file);\n menuBar.add(help);\n\n allContent.add(button, LINE_START); // Adds Button to content pane of frame at position LINE_START\n allContent.add(text, LINE_END); // Adds the text to the frame, at position LINE_END\n allContent.add(menuBar, PAGE_START);\n\n\n\n frame.setVisible(true);\n }", "protected void createContents() {\n\t\tshell = new Shell(SWT.TITLE | SWT.CLOSE | SWT.BORDER);\n\t\tshell.setSize(713, 226);\n\t\tshell.setText(\"ALT Planner\");\n\t\t\n\t\tCalendarPop calendarComp = new CalendarPop(shell, SWT.NONE);\n\t\tcalendarComp.setBounds(5, 5, 139, 148);\n\t\t\n\t\tComposite composite = new PlannerInterface(shell, SWT.NONE, calendarComp);\n\t\tcomposite.setBounds(0, 0, 713, 200);\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmFile = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmFile.setText(\"File\");\n\t\t\n\t\tMenu menu_1 = new Menu(mntmFile);\n\t\tmntmFile.setMenu(menu_1);\n\t\t\n\t\tMenuItem mntmSettings = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmSettings.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSettings settings = new Settings(Display.getDefault());\n\t\t\t\tsettings.open();\n\t\t\t}\n\t\t});\n\t\tmntmSettings.setText(\"Settings\");\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setImage(SWTResourceManager.getImage(mainFrame.class, \"/imgCompand/main/logo.png\"));\r\n\t\tshell.setSize(935, 650);\r\n\t\tshell.setMinimumSize(920, 650);\r\n\t\tcenter(shell);\r\n\t\tshell.setText(\"三合一\");\r\n\t\tshell.setLayout(new GridLayout(8, false));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setText(\"面单图片:\");\r\n\t\t\r\n\t\ttext_mdtp = new Text(shell, SWT.BORDER);\r\n\t\ttext_mdtp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\r\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setMessage(\"setMessage\"); \r\n\t\t\t\tdd.setText(\"选择保存面单图片的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString mdtp=dd.open();\r\n\t\t\t\tif(mdtp!=null){\r\n\t\t\t\t\ttext_mdtp.setText(mdtp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnNewButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\r\n\t\tgd_btnNewButton.widthHint = 95;\r\n\t\tbtnNewButton.setLayoutData(gd_btnNewButton);\r\n\t\tbtnNewButton.setText(\"浏览\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlblNewLabel = new Label(shell, SWT.NONE);\r\n\t\tGridData gd_lblNewLabel = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblNewLabel.widthHint = 87;\r\n\t\tlblNewLabel.setLayoutData(gd_lblNewLabel);\r\n\t\tlblNewLabel.setText(\"身份证图片:\");\r\n\t\t\r\n\t\ttext_sfztp = new Text(shell, SWT.BORDER);\r\n\t\ttext_sfztp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtnNewButton_1 = new Button(shell, SWT.NONE);\r\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setMessage(\"setMessage\"); \r\n\t\t\t\tdd.setText(\"选择保存身份证图片的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString sfztp=dd.open();\r\n\t\t\t\tif(sfztp!=null){\r\n\t\t\t\t\ttext_sfztp.setText(sfztp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnNewButton_1 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\r\n\t\tgd_btnNewButton_1.widthHint = 95;\r\n\t\tbtnNewButton_1.setLayoutData(gd_btnNewButton_1);\r\n\t\tbtnNewButton_1.setText(\"浏览\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setText(\"小票图片:\");\r\n\t\t\r\n\t\ttext_xptp = new Text(shell, SWT.BORDER);\r\n\t\ttext_xptp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbutton = new Button(shell, SWT.NONE);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setText(\"选择保存小票图片的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString xptp=dd.open();\r\n\t\t\t\tif(xptp!=null){\r\n\t\t\t\t\ttext_xptp.setText(xptp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_button = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\r\n\t\tgd_button.widthHint = 95;\r\n\t\tbutton.setLayoutData(gd_button);\r\n\t\tbutton.setText(\"浏览\");\r\n\t\t\r\n\t\tlabel_2 = new Label(shell, SWT.NONE);\r\n\t\tlabel_2.setText(\" \");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlblNewLabel_1 = new Label(shell, SWT.NONE);\r\n\t\tlblNewLabel_1.setText(\" \");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_5 = new Label(shell, SWT.NONE);\r\n\t\tlabel_5.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlabel_5.setText(\"三合一导入模板下载,请点击........\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbutton_1 = new Button(shell, SWT.NONE);\r\n\t\tGridData gd_button_1 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_button_1.widthHint = 95;\r\n\t\tbutton_1.setLayoutData(gd_button_1);\r\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\t\tdd.setText(\"请选择文件保存的位置\"); \r\n\t\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\t\tString saveFile=dd.open(); \r\n\t\t\t\t\tif(saveFile!=null){\r\n\t\t\t\t\t\tboolean flg = FileUtil.downloadLocal(saveFile, \"/template.xls\", \"三合一导入模板.xls\");\r\n\t\t\t\t\t\tif(flg){\r\n\t\t\t\t\t\t\tMessageDialog.openInformation(shell, \"系统提示\", \"模板下载成功!保存路径为:\"+saveFile+\"/三合一导入模板.xls\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tMessageDialog.openError(shell, \"系统提示\", \"模板下载失败!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t }catch(Exception ex){\r\n\t\t\t\t\t System.out.print(\"创建失败\");\r\n\t\t\t\t } \r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton_1.setText(\"导入模板\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_4 = new Label(shell, SWT.NONE);\r\n\t\tlabel_4.setText(\"合成信息:\");\r\n\t\t\r\n\t\ttext = new Text(shell, SWT.BORDER);\r\n\t\ttext.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtnexecl = new Button(shell, SWT.NONE);\r\n\t\tbtnexecl.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tFileDialog filedia = new FileDialog(shell, SWT.SINGLE);\r\n\t\t\t\tString filepath = filedia.open()+\"\";\r\n\t\t\t\ttext.setText(filepath.replace(\"null\",\"\"));\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnexecl = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btnexecl.widthHint = 95;\r\n\t\tbtnexecl.setLayoutData(gd_btnexecl);\r\n\t\tbtnexecl.setText(\"导入execl\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_3 = new Label(shell, SWT.NONE);\r\n\t\tlabel_3.setText(\"合成图片:\");\r\n\t\t\r\n\t\ttext_hctp = new Text(shell, SWT.BORDER);\r\n\t\ttext_hctp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtnNewButton_2 = new Button(shell, SWT.NONE);\r\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setText(\"选择合成图片将要保存的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString hctp=dd.open();\r\n\t\t\t\tif(hctp!=null){\r\n\t\t\t\t\ttext_hctp.setText(hctp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnNewButton_2 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btnNewButton_2.widthHint = 95;\r\n\t\tbtnNewButton_2.setLayoutData(gd_btnNewButton_2);\r\n\t\tbtnNewButton_2.setText(\"保存位置\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_6 = new Label(shell, SWT.NONE);\r\n\t\tlabel_6.setText(\"进度:\");\r\n\t\t\r\n\t\tprogressBar = new ProgressBar(shell, SWT.NONE);\r\n\t\tGridData gd_progressBar = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_progressBar.widthHint = 524;\r\n\t\tprogressBar.setMinimum(0);\r\n\t\tprogressBar.setMaximum(100);\r\n\t\tprogressBar.setLayoutData(gd_progressBar);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtn_doCompImg = new Button(shell, SWT.NONE);\r\n\t\tbtn_doCompImg.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t//导入信息\r\n\t\t\t\tdrxx = text.getText();\r\n\t\t\t\t//保存路径\r\n\t\t\t\thctp = text_hctp.getText();\r\n\t\t\t\t//面单图片路径\r\n\t\t\t\tmdtp = text_mdtp.getText();\r\n\t\t\t\t//身份证图片路径\r\n\t\t\t\tsfztp = text_sfztp.getText();\r\n\t\t\t\t//小票图片路径\r\n\t\t\t\txptp = text_xptp.getText();\r\n\t\t\t\t//清空信息框\r\n\t\t\t\ttext_info.setText(\"\");\r\n\t\t\t\tif(!drxx.equals(\"\")&&!hctp.equals(\"\")&&!mdtp.equals(\"\")&&!sfztp.equals(\"\")&&!xptp.equals(\"\")){\r\n\t\t\t\t\t(new IncresingOperator()).start();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tMessageDialog.openWarning(shell, \"系统提示\",\"各路径选项不能为空!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btn_doCompImg = new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btn_doCompImg.widthHint = 95;\r\n\t\tbtn_doCompImg.setLayoutData(gd_btn_doCompImg);\r\n\t\tbtn_doCompImg.setText(\"立即合成\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\ttext_info = new Text(shell, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tGridData gd_text_info = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n\t\tgd_text_info.heightHint = 217;\r\n\t\ttext_info.setLayoutData(gd_text_info);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\r\n\t}", "private void createContents() {\n\t\tshell = new Shell(getParent(), SWT.MIN |SWT.APPLICATION_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(WordWatermarkDialog.class, \"/com/yc/ui/1.jpg\"));\n\t\tshell.setSize(436, 321);\n\t\tshell.setText(\"设置文字水印\");\n\t\t\n\t\tLabel label_font = new Label(shell, SWT.NONE);\n\t\tlabel_font.setBounds(38, 80, 61, 17);\n\t\tlabel_font.setText(\"字体名称:\");\n\t\t\n\t\tLabel label_style = new Label(shell, SWT.NONE);\n\t\tlabel_style.setBounds(232, 77, 61, 17);\n\t\tlabel_style.setText(\"字体样式:\");\n\t\t\n\t\tLabel label_size = new Label(shell, SWT.NONE);\n\t\tlabel_size.setBounds(38, 120, 68, 17);\n\t\tlabel_size.setText(\"字体大小:\");\n\t\t\n\t\tLabel label_color = new Label(shell, SWT.NONE);\n\t\tlabel_color.setBounds(232, 120, 68, 17);\n\t\tlabel_color.setText(\"字体颜色:\");\n\t\t\n\t\tLabel label_word = new Label(shell, SWT.NONE);\n\t\tlabel_word.setBounds(38, 38, 61, 17);\n\t\tlabel_word.setText(\"水印文字:\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(115, 35, 278, 23);\n\t\t\n\t\tButton button_confirm = new Button(shell, SWT.NONE);\n\t\t\n\t\tbutton_confirm.setBounds(313, 256, 80, 27);\n\t\tbutton_confirm.setText(\"确定\");\n\t\t\n\t\tCombo combo = new Combo(shell, SWT.NONE);\n\t\tcombo.setItems(new String[] {\"宋体\", \"黑体\", \"楷体\", \"微软雅黑\", \"仿宋\"});\n\t\tcombo.setBounds(115, 77, 93, 25);\n\t\tcombo.setText(\"黑体\");\n\t\t\n\t\tCombo combo_1 = new Combo(shell, SWT.NONE);\n\t\tcombo_1.setItems(new String[] {\"粗体\", \"斜体\"});\n\t\tcombo_1.setBounds(300, 74, 93, 25);\n\t\tcombo_1.setText(\"粗体\");\n\t\t\n\t\tCombo combo_2 = new Combo(shell, SWT.NONE);\n\t\tcombo_2.setItems(new String[] {\"1\", \"3\", \"5\", \"8\", \"10\", \"12\", \"16\", \"18\", \"20\", \"24\", \"30\", \"36\", \"48\", \"56\", \"66\", \"72\"});\n\t\tcombo_2.setBounds(115, 117, 93, 25);\n\t\tcombo_2.setText(\"24\");\n\t\t\n\t\tCombo combo_3 = new Combo(shell, SWT.NONE);\n\t\tcombo_3.setItems(new String[] {\"红色\", \"绿色\", \"蓝色\"});\n\t\tcombo_3.setBounds(300, 117, 93, 25);\n\t\tcombo_3.setText(\"红色\");\n\t\t\n\t\tButton button_cancle = new Button(shell, SWT.NONE);\n\t\t\n\t\tbutton_cancle.setBounds(182, 256, 80, 27);\n\t\tbutton_cancle.setText(\"取消\");\n\t\t\n\t\tLabel label_X = new Label(shell, SWT.NONE);\n\t\tlabel_X.setBounds(31, 161, 68, 17);\n\t\tlabel_X.setText(\"X轴偏移值:\");\n\t\t\n\t\tCombo combo_4 = new Combo(shell, SWT.NONE);\n\t\tcombo_4.setItems(new String[] {\"10\", \"20\", \"30\", \"40\", \"50\", \"80\", \"100\", \"160\", \"320\", \"640\"});\n\t\tcombo_4.setBounds(115, 158, 93, 25);\n\t\tcombo_4.setText(\"50\");\n\t\t\n\t\tLabel label_Y = new Label(shell, SWT.NONE);\n\t\tlabel_Y.setText(\"Y轴偏移值:\");\n\t\tlabel_Y.setBounds(225, 161, 68, 17);\n\t\t\n\t\tCombo combo_5 = new Combo(shell, SWT.NONE);\n\t\tcombo_5.setItems(new String[] {\"10\", \"20\", \"30\", \"40\", \"50\", \"80\", \"100\", \"160\", \"320\", \"640\"});\n\t\tcombo_5.setBounds(300, 158, 93, 25);\n\t\tcombo_5.setText(\"50\");\n\t\t\n\t\tLabel label_alpha = new Label(shell, SWT.NONE);\n\t\tlabel_alpha.setBounds(46, 204, 53, 17);\n\t\tlabel_alpha.setText(\"透明度:\");\n\t\t\n\t\tCombo combo_6 = new Combo(shell, SWT.NONE);\n\t\tcombo_6.setItems(new String[] {\"0\", \"0.1\", \"0.2\", \"0.3\", \"0.4\", \"0.5\", \"0.6\", \"0.7\", \"0.8\", \"0.9\", \"1.0\"});\n\t\tcombo_6.setBounds(115, 201, 93, 25);\n\t\tcombo_6.setText(\"0.8\");\n\t\t\n\t\t//取消按钮\n\t\tbutton_cancle.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tWordWatermarkDialog.this.shell.dispose();\n\t\t\t}\n\t\t});\n\t\t\n\t\t//确认按钮\n\t\tbutton_confirm.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tif(text.getText().trim()==null || \"\".equals(text.getText().trim())\n\t\t\t\t\t\t||combo.getText().trim()==null || \"\".equals(combo.getText().trim()) \n\t\t\t\t\t\t\t||combo_1.getText().trim()==null || \"\".equals(combo_1.getText().trim())\n\t\t\t\t\t\t\t\t|| combo_2.getText().trim()==null || \"\".equals(combo_2.getText().trim())\n\t\t\t\t\t\t\t\t\t|| combo_3.getText().trim()==null || \"\".equals(combo_3.getText().trim())\n\t\t\t\t\t\t\t\t\t\t||combo_4.getText().trim()==null || \"\".equals(combo_4.getText().trim())\n\t\t\t\t\t\t\t\t\t\t\t||combo_5.getText().trim()==null || \"\".equals(combo_5.getText().trim())\n\t\t\t\t\t\t\t\t\t\t\t\t||combo_6.getText().trim()==null || \"\".equals(combo_6.getText().trim())){\n\t\t\t\t\tMessageDialog.openError(shell, \"错误\", \"输入框不能为空或输入空值,请确认后重新输入!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString word=text.getText().trim();\n\t\t\t\tString wordName=getFontName(combo.getText().trim());\n\t\t\t\tint wordStyle=getFonStyle(combo_1.getText().trim());\n\t\t\t\tint wordSize=Integer.parseInt(combo_2.getText().trim());\n\t\t\t\tColor wordColor=getFontColor(combo_3.getText().trim());\n\t\t\t\tint word_X=Integer.parseInt(combo_4.getText().trim());\n\t\t\t\tint word_Y=Integer.parseInt(combo_5.getText().trim());\n\t\t\t\tfloat word_Alpha=Float.parseFloat(combo_6.getText().trim());\n\t\t\t\t\n\t\t\t\tis=MeituUtils.waterMarkWord(EditorUi.filePath,word, wordName, wordStyle, wordSize, wordColor, word_X, word_Y,word_Alpha);\n\t\t\t\tCommon.image=new Image(display,is);\n\t\t\t\tWordWatermarkDialog.this.shell.dispose();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tcombo.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\n\t\tcombo_1.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_2.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_3.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\t\n\t\t\n\t\tcombo_4.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_5.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_6.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\".[0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\n\t}", "private void createWindow() throws Exception {\r\n Display.setFullscreen(false);\r\n Display.setDisplayMode(new DisplayMode(WIDTH, HEIGHT));\r\n Display.setTitle(\"Program 2\");\r\n Display.create();\r\n }", "public void createContents()\n\t{\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"TTS - Task Tracker System\");\n\t\t\n\t\tbtnLogIn = new Button(shell, SWT.NONE);\n\t\tbtnLogIn.setBounds(349, 84, 75, 25);\n\t\tbtnLogIn.setText(\"Log In\");\n\t\tbtnLogIn.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tif (cboxUserDropDown.getText() != \"\"\n\t\t\t\t\t\t&& cboxUserDropDown.getSelectionIndex() >= 0)\n\t\t\t\t{\n\t\t\t\t\tString selectedUserName = cboxUserDropDown.getText();\n\t\t\t\t\tusers.setLoggedInUser(selectedUserName);\n\t\t\t\t\tshell.setVisible(false);\n\t\t\t\t\tdisplay.sleep();\n\t\t\t\t\tnew TaskMainViewWindow(AccessUsers.getLoggedInUser());\n\t\t\t\t\tdisplay.wake();\n\t\t\t\t\tshell.setVisible(true);\n\t\t\t\t\tshell.forceFocus();\n\t\t\t\t\tshell.setActive();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnQuit = new Button(shell, SWT.CENTER);\n\t\tbtnQuit.setBounds(349, 227, 75, 25);\n\t\tbtnQuit.setText(\"Quit\");\n\t\tbtnQuit.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\t\n\t\tcboxUserDropDown = new Combo(shell, SWT.READ_ONLY);\n\t\tcboxUserDropDown.setBounds(146, 86, 195, 23);\n\t\t\n\t\tinitUserDropDown();\n\t\t\n\t\tlblNewLabel = new Label(shell, SWT.CENTER);\n\t\tlblNewLabel.setBounds(197, 21, 183, 25);\n\t\tlblNewLabel.setFont(new Font(display, \"Times\", 14, SWT.BOLD));\n\t\tlblNewLabel.setForeground(new Color(display, 200, 0, 0));\n\t\tlblNewLabel.setText(\"Task Tracker System\");\n\t\t\n\t\ticon = new Label(shell, SWT.BORDER);\n\t\ticon.setLocation(0, 0);\n\t\ticon.setSize(140, 111);\n\t\ticon.setImage(new Image(null, \"images/task.png\"));\n\t\t\n\t\tbtnCreateUser = new Button(shell, SWT.NONE);\n\t\tbtnCreateUser.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tshell.setEnabled(false);\n\t\t\t\tnew CreateUserWindow(users);\n\t\t\t\tshell.setEnabled(true);\n\t\t\t\tinitUserDropDown();\n\t\t\t\tshell.forceFocus();\n\t\t\t\tshell.setActive();\n\t\t\t}\n\t\t});\n\t\tbtnCreateUser.setBounds(349, 115, 75, 25);\n\t\tbtnCreateUser.setText(\"Create User\");\n\t\t\n\t}", "private void createContents() {\n\t\tshlAbout = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE);\n\t\tshlAbout.setMinimumSize(new Point(800, 600));\n\t\tshlAbout.setSize(800, 688);\n\t\tshlAbout.setText(\"About\");\n\t\t\n\t\tLabel lblKelimetrikAPsycholinguistic = new Label(shlAbout, SWT.CENTER);\n\t\tlblKelimetrikAPsycholinguistic.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tlblKelimetrikAPsycholinguistic.setBounds(0, 10, 784, 21);\n\t\tlblKelimetrikAPsycholinguistic.setText(\"KelimetriK: A psycholinguistic tool of Turkish\");\n\t\t\n\t\tScrolledComposite scrolledComposite = new ScrolledComposite(shlAbout, SWT.BORDER | SWT.V_SCROLL);\n\t\tscrolledComposite.setBounds(0, 37, 774, 602);\n\t\tscrolledComposite.setExpandHorizontal(true);\n\t\tscrolledComposite.setExpandVertical(true);\n\t\t\n\t\tComposite composite = new Composite(scrolledComposite, SWT.NONE);\n\t\t\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setSize(107, 21);\n\t\tlabel.setText(\"Introduction\");\n\t\tlabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\t\n\t\tLabel label_1 = new Label(composite, SWT.WRAP);\n\t\tlabel_1.setLocation(0, 27);\n\t\tlabel_1.setSize(753, 157);\n\t\tlabel_1.setText(\"Selection of appropriate words for a fully controlled word stimuli set is an essential component for conducting an effective psycholinguistic studies (Perea, & Polatsek, 1998; Bowers, Davis, & Hanley, 2004). For example, if the word stimuli set of a visual word recognition study is full of high frequency words, this may create a bias on the behavioral scores and would lead to incorrect inferences about the hypothesis. Thus, experimenters who are intended to work with any kind of verbal stimuli should consider such linguistic variables to obtain reliable results.\\r\\n\\r\\nKelimetriK is a query-based software program designed to demonstrate several lexical variables and orthographic statistics of words. As shown in Figure X, the user-friendly interface of KelimetriK is an easy-to-use software developed to be a helpful source experimenters who are preparing verbal stimuli sets for psycholinguistic studies. KelimetriK provides information about several lexical properties of word-frequency, neighborhood size, orthographic similarity and relatedness. KelimetriK\\u2019s counterparts in other language are N-watch in English (Davis, 2005) and BuscaPalabras in Spanish (Davis, & Perea, 2005).\");\n\t\t\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setLocation(0, 190);\n\t\tlabel_2.setSize(753, 21);\n\t\tlabel_2.setText(\"The lexical variables in KelimetriK Software\");\n\t\tlabel_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\t\n\t\tLabel label_3 = new Label(composite, SWT.WRAP);\n\t\tlabel_3.setBounds(0, 228, 753, 546);\n\t\tlabel_3.setText(\"Output lexical variables (and orthographic statistics) in KelimetriK are word-frequency, bigram and tri-gram frequency and average frequency values, orthographic neighborhood size (Coltheart\\u2019s N), orthographic Levensthein distance 20 (OLD20) and transposed letter and subset/superset similarity.\\r\\n\\r\\nWord frequency is a value that describes of how many times a word occurred in a given text. Research shows that there is a consistent logarithmic relationship between reaction time and word\\u2019s frequency score; the impact of effect is higher for smaller frequencies words that the effect gets smaller on higher frequency scores (Davis, 2005).\\r\\n\\r\\nBi-grams and tri-grams are are obtained by decomposing a word (string of tokens) into sequences of two and three number of neighboring elements (Manning, & Sch\\u00FCtze, 1999). For example, the Turkish word \\u201Ckule\\u201D (tower in English) can be decomposed into three different bigram sets (\\u201Cku\\u201D, \\u201Cul\\u201D, \\u201Cle\\u201D). Bigram/trigram frequency values are obtained by counting how many same letter (four in this case) words will start with first bigram set (e.g. \\u201Cku\\u201D), how many words have second bigram set in the middle (e.g. \\u201Cul\\u201D) in the middle, and how many words will end with last bigram set (\\u201Cle\\u201D) in a given lexical word database. The trigrams for the word \\u201Ckule\\u201D are \\u201Ckul\\u201D and \\u201Cule\\u201D. Average bi-gram/tri-gram frequency is obtained by adding a word\\u2019s entire bi-gram/ tri-gram frequencies and then dividing it by number of bigrams (\\u201Ckule\\u201D consist of three bigrams).\\r\\n\\r\\nOrthographic neighborhood size (Coltheart\\u2019s N) refers to number of words that can be obtained from a given lexical database word list by substituting a single letter of a word (Coltheart et al, 1977). For example, orthographic neighborhood size of the word \\u201Ckule\\u201D is 9 if searched on KelimetriK (\\u201C\\u015Fule\\u201D, \\u201Ckula\\u201D, \\u201Ckulp\\u201D, \\u201Cfule\\u201D, \\u201Ckale\\u201D, \\u201Ck\\u00F6le\\u201D, \\u201Ckele\\u201D, \\u201Ckile\\u201D, \\u201Cku\\u015Fe\\u201D). A word\\u2019s orthographic neighborhood size could influence behavioral performance in visual word recognition tasks of lexical decision, naming, perceptual identification, and semantic categorization (Perea, & Polatsek, 1998).\\r\\n\\r\\nOrthographic Levensthein distance 20 (OLD20) of a word is the average of 20 most close words in the unit of Levensthein distance (Yarkoni, Balota, & Yap, 2008). Levensthein distance between the two strings of letters is obtained by counting the minimum number of operations (substitution, deletion or insertion) required while passing from one letter string to the other (Levenshthein, 1966). Behavioral studies show that, OLD20 is negatively correlated with orthographic neighborhood size (r=-561) and positively correlated with word-length (r=868) for English words (Yarkoni, Balota, & Yap, 2008). Moreover, OLD20 explains more variance on visual word recognition scores than orthographic neighborhood size and word length (Yarkoni, Balota, & Yap, 2008).\\r\\n\\r\\nOrthographic similarity between two words means they are the neighbors of each other like the words \\u201Cal\\u0131n\\u201D (forehead in English) and \\u201Calan\\u201D (area in English). Transposed letter (TL) and subset/superset are the two most common similarities in the existing literature (Davis, 2005). TL similiarity is the case when the two letters differ from each other based on a single pair of adjacent letters as in the Turkish words of \\u201Cesen\\u201D (blustery) and \\u201Cesne\\u201D (yawn). Studies have shown that TL similarity may facilitate detection performance on naming and lexical decision task (Andrews, 1996). Subset/Superset similarity occurs when there is an embedded word in a given input word such as \\u201Cs\\u00FCt\\u201D (subset: milk in Turkish) \\u201Cs\\u00FCtun\\u201D (superset: pillar in Turkish). Presence of a subset in a word in a stimuli set may influence the subject\\u2019s reading performance, hence may create a confounding factor on the behavioral results (Bowers, Davis, & Hanley, 2005).\");\n\t\t\n\t\tLabel lblAndrewsLexical = new Label(composite, SWT.NONE);\n\t\tlblAndrewsLexical.setLocation(0, 798);\n\t\tlblAndrewsLexical.setSize(753, 296);\n\t\tlblAndrewsLexical.setText(\"Andrews (1996). Lexical retrieval and selection processes: Effects of transposed-letter confusability, Journal of Memory and Language 35, 775\\u2013800\\r\\n\\r\\nBowers, J. S., Davis, C. J., & Hanley, D. A. (2005). References automatic semantic activation of embedded words: Is there a \\u2018\\u2018hat\\u2019\\u2019 in \\u2018\\u2018that\\u2019\\u2019? Journal of Memory and Language, 52, 131-143.\\r\\n\\r\\nColtheart, M., Davelaar, E., Jonasson, J. T., & Besner, D. (1977). Access to the internal lexicon. Attention and Performance, 6, 535-555.\\r\\n\\r\\nDavis, C. J. (2005). N-Watch: A program for deriving neighborhood size and other psycholinguistic statistics. Behavior Research Methods, 37, 65-70.\\r\\n\\r\\nDavis, C. J., & Parea, M. (2005). BuscaPalabras: A program for deriving orthographic and phonological neighborhood statistics and other psycholinguistic indices in Spanish. Behavior Research Methods, 37, 665-671.\\r\\n\\r\\nLevenshtein, V. I. (1966, February). Binary codes capable of correcting deletions, insertions and reversals. In Soviet physics doklady (Vol. 10, p. 707).\\r\\n\\r\\nManning, C. D., & Sch\\u00FCtze, H. (1999). Foundations of statistical natural language processing. MIT press.\\r\\n\\r\\nPerea, M., & Pollatsek, A. (1998). The effects of neighborhood frequency in reading and lexical decision. Journal of Experimental Psychology, 24, 767-779.\\r\\n\\r\\nYarkoni, T., Balota, D., & Yap, M. (2008). Moving beyond Coltheart\\u2019s N: A new measure of orthographic similarity. Psychonomic Bulletin & Review, 15(5), 971-979.\\r\\n\");\n\t\t\n\t\tLabel label_4 = new Label(composite, SWT.NONE);\n\t\tlabel_4.setBounds(0, 771, 753, 21);\n\t\tlabel_4.setText(\"References\");\n\t\tlabel_4.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_4.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tscrolledComposite.setContent(composite);\n\t\tscrolledComposite.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));\n\n\t}", "protected void createContents() {\n\t\tshlCarbAndRemainder = new Shell(Display.getDefault(), SWT.TITLE|SWT.CLOSE|SWT.BORDER);\n\t\tshlCarbAndRemainder.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tshlCarbAndRemainder.setSize(323, 262);\n\t\tshlCarbAndRemainder.setText(\"CARB and Remainder\");\n\t\t\n\t\tGroup grpCarbSetting = new Group(shlCarbAndRemainder, SWT.NONE);\n\t\tgrpCarbSetting.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tgrpCarbSetting.setFont(SWTResourceManager.getFont(\"Calibri\", 12, SWT.BOLD));\n\t\tgrpCarbSetting.setText(\"CARB Setting\");\n\t\t\n\t\tgrpCarbSetting.setBounds(10, 0, 295, 106);\n\t\t\n\t\tLabel lblCARBValue = new Label(grpCarbSetting, SWT.NONE);\n\t\tlblCARBValue.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tlblCARBValue.setBounds(10, 32, 149, 22);\n\t\tlblCARBValue.setText(\"CARB Value\");\n\t\t\n\t\tLabel lblAuthenticationPIN = new Label(grpCarbSetting, SWT.NONE);\n\t\tlblAuthenticationPIN.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tlblAuthenticationPIN.setBounds(10, 68, 149, 22);\n\t\tlblAuthenticationPIN.setText(\"Authentication PIN\");\n\t\t\n\t\tSpinner spinnerCARBValue = new Spinner(grpCarbSetting, SWT.BORDER);\n\t\tspinnerCARBValue.setBounds(206, 29, 72, 22);\n\t\t\n\t\ttextAuthenticationPIN = new Text(grpCarbSetting, SWT.BORDER|SWT.PASSWORD);\n\t\ttextAuthenticationPIN.setBounds(206, 65, 72, 21);\n\t\t\t\t\n\t\tGroup grpRemainder = new Group(shlCarbAndRemainder, SWT.NONE);\n\t\tgrpRemainder.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tgrpRemainder.setFont(SWTResourceManager.getFont(\"Calibri\", 12, SWT.BOLD));\n\t\tgrpRemainder.setText(\"Remainder\");\n\t\tgrpRemainder.setBounds(10, 112, 296, 106);\n\t\t\n\t\tButton btnInjectBolus = new Button(grpRemainder, SWT.NONE);\n\t\tbtnInjectBolus.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tbtnInjectBolus.setBounds(183, 38, 103, 41);\n\t\tbtnInjectBolus.setText(\"INJECT BOLUS\");\n\t\t\n\t\tButton btnCancel = new Button(grpRemainder, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshlCarbAndRemainder.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setBounds(10, 38, 80, 41);\n\t\tbtnCancel.setText(\"Cancel\");\n\t\t\n\t\tButton btnSnooze = new Button(grpRemainder, SWT.NONE);\n\t\tbtnSnooze.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnSnooze.setBounds(96, 38, 81, 41);\n\t\tbtnSnooze.setText(\"Snooze\");\n\n\t}", "protected void createContents() {\n\t\tsetText(\"Account Settings\");\n\t\tsetSize(450, 225);\n\n\t}", "private static void createAndShowGUI() {\n\t\tJFrame window = MainWindow.newInstance();\n\t\t\n //Display the window.\n window.pack();\n window.setVisible(true);\n \n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tLabel lblUsername = new Label(shell, SWT.NONE);\n\t\tlblUsername.setBounds(73, 30, 55, 15);\n\t\tlblUsername.setText(\"Username\");\n\t\t\n\t\tLabel lblPassword = new Label(shell, SWT.NONE);\n\t\tlblPassword.setText(\"Password\");\n\t\tlblPassword.setBounds(73, 78, 55, 15);\n\t\t\n\t\ttxtUsername = new Text(shell, SWT.BORDER);\n\t\ttxtUsername.setText(\"lisa\");\n\t\ttxtUsername.setBounds(139, 24, 209, 21);\n\t\t\n\t\ttxtPassword = new Text(shell, SWT.BORDER);\n\t\ttxtPassword.setText(\"password1\");\n\t\ttxtPassword.setBounds(139, 72, 209, 21);\n\t\t\n\t\tButton btnLogin = new Button(shell, SWT.NONE);\n\t\tbtnLogin.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnLogin.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent e) {\n\t\t\t\tString usrname = txtUsername.getText();\n\t\t\t\tString usrpass = txtPassword.getText();\n\t\t\t\t\n\t\t\t\t// Call authenticate user credentials through authentication RMI server\n\t\t\t\tLoginInterface login;\n\t\t\t\ttry{\n\t\t\t\t\tlogin = (LoginInterface)Naming.lookup(\"rmi://localhost/login\");\n\t\t\t\t\t\n\t\t\t\t\tboolean authenticated = login.authenticate(usrname, usrpass);\n\t\t\t\t\tif(authenticated){\n\t\t\t\t\t\tSystem.out.println(\"User authenticated.\");\n\t\t\t\t\t\tclose();\n\n\t\t\t\t\t\tevaluator.EvaluatorClient.main(null);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tSystem.out.println(\"Username or password was incorrect. Please try again.\");\n\t\t\t\t\t\tlblMsgOut.setText(\"Username or password was incorrect. Please try again.\");\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}catch(Exception e2){\n\t\t\t\t\tSystem.out.println(\"LoginClient authentication exception: \" + e2);\n\t\t\t\t\tlblMsgOut.setText(\"LoginClient authentication exception: \" + e2);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLogin.setBounds(272, 118, 75, 25);\n\t\tbtnLogin.setText(\"Login\");\n\t\t\n\t\tlblMsgOut = new Label(shell, SWT.BORDER | SWT.WRAP);\n\t\tlblMsgOut.setBounds(10, 174, 414, 77);\n\t\tlblMsgOut.setText(\"Output:\");\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(1200, 1100);\n\t\tshell.setText(\"Zagreb Montaža d.o.o\");\n\n\t\tfinal Composite cmpMenu = new Composite(shell, SWT.NONE);\n\t\tcmpMenu.setBackground(SWTResourceManager.getColor(119, 136, 153));\n\t\tcmpMenu.setBounds(0, 0, 359, 1061);\n\t\t\n\t\tFormToolkit formToolkit = new FormToolkit(Display.getDefault());\n\t\tfinal Section sctnCalculator = formToolkit.createSection(cmpMenu, Section.TWISTIE | Section.TITLE_BAR);\n\t\tsctnCalculator.setExpanded(false);\n\t\tsctnCalculator.setBounds(10, 160, 339, 23);\n\t\tformToolkit.paintBordersFor(sctnCalculator);\n\t\tsctnCalculator.setText(\"Kalkulator temperature preddgrijavanja\");\n\n\t\tfinal Section sctn10112ce = formToolkit.createSection(cmpMenu, Section.TREE_NODE | Section.TITLE_BAR);\n\t\tsctn10112ce.setBounds(45, 189, 304, 23);\n\t\tformToolkit.paintBordersFor(sctn10112ce);\n\t\tsctn10112ce.setText(\"1011-2 CE\");\n\t\tsctn10112ce.setVisible(false);\n\n\t\tfinal Section sctn10112cet = formToolkit.createSection(cmpMenu, Section.TREE_NODE | Section.TITLE_BAR);\n\t\tsctn10112cet.setBounds(45, 218, 304, 23);\n\t\tformToolkit.paintBordersFor(sctn10112cet);\n\t\tsctn10112cet.setText(\"1011-2 CET\");\n\t\tsctn10112cet.setVisible(false);\n\n\t\tfinal Section sctnAws = formToolkit.createSection(cmpMenu, Section.TREE_NODE | Section.TITLE_BAR);\n\t\tsctnAws.setBounds(45, 247, 304, 23);\n\t\tformToolkit.paintBordersFor(sctnAws);\n\t\tsctnAws.setText(\"AWS\");\n\t\tsctnAws.setVisible(false);\n\t\t\n\t\tfinal Composite composite10112ce = new Composite(shell, SWT.COLOR_DARK_GRAY);\n\t\t//composite10112ce.setBackground(SWTResourceManager.getColor(255, 255, 255));\n\t\tcomposite10112ce.setBounds(365, 0, 829, 1061);\n\t\tcomposite10112ce.setVisible(false);\n\t\t\n\t\tfinal Composite composite10112cet = new Composite(shell, SWT.COLOR_DARK_GRAY);\n\t\t//composite10112ce.setBackground(SWTResourceManager.getColor(255, 255, 255));\n\t\tcomposite10112cet.setBounds(365, 0, 829, 1061);\n\t\tcomposite10112cet.setVisible(false);\n\t\t\n\t\tfinal Composite compositeAws = new Composite(shell, SWT.COLOR_DARK_GRAY);\n\t\t//composite10112ce.setBackground(SWTResourceManager.getColor(255, 255, 255));\n\t\tcompositeAws.setBounds(365, 0, 829, 1061);\n\t\tcompositeAws.setVisible(false);\n\t\t\n\t\tsctnCalculator.addExpansionListener(new IExpansionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\n\t\t\t\tif (sctnCalculator.isExpanded() == false) {\n\t\t\t\t\tsctn10112ce.setVisible(true);\n\t\t\t\t\tsctn10112cet.setVisible(true);\n\t\t\t\t\tsctnAws.setVisible(true);\n\n\t\t\t\t} else {\n\t\t\t\t\tsctn10112ce.setVisible(false);\n\t\t\t\t\tsctn10112cet.setVisible(false);\n\t\t\t\t\tsctnAws.setVisible(false);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t});\n\n\t\tsctn10112ce.addExpansionListener(new IExpansionListener() {\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\tif (sctn10112ce.isExpanded() == true) {\n\t\t\t\t\tsctn10112cet.setVisible(false);\n\t\t\t\t\tcompositeAws.setVisible(false);\n\t\t\t\t\tnew F10112ce(composite10112ce, cmpMenu.getStyle());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcomposite10112ce.setVisible(false);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tsctn10112cet.addExpansionListener(new IExpansionListener() {\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\tif (sctn10112cet.isExpanded() == true) {\n\t\t\t\t\tsctn10112ce.setVisible(false);\n\t\t\t\t\tcompositeAws.setVisible(false);\n\t\t\t\t\tnew F10112cet(composite10112cet, cmpMenu.getStyle());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcomposite10112ce.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\tsctnAws.addExpansionListener(new IExpansionListener() {\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\tif (sctnAws.isExpanded() == true) {\n\t\t\t\t\tsctn10112ce.setVisible(false);\n\t\t\t\t\tsctn10112cet.setVisible(false);\n\t\t\t\t\tnew FAws(compositeAws, cmpMenu.getStyle());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcompositeAws.setVisible(false);\n\t\t\t}\n\t\t});\n\t}", "public Container createContentPane()\r\n\t{\r\n\t\t//add items to lvl choice\r\n\t\tfor(int g=1; g<21; g++)\r\n\t\t{\r\n\t\t\tcharLvlChoice.addItem(String.valueOf(g));\r\n\t\t}\r\n\r\n\t\t//add stuff to panels\r\n\t\tinputsPanel.setLayout(new GridLayout(2,2,3,3));\r\n\t\tdisplayPanel.setLayout(new GridLayout(1,1,8,8));\r\n\t\tinputsPanel.add(runButton);\r\n\t\tinputsPanel.add(clearButton);\r\n\t\t\ttimesPanel.add(timesLabel);\r\n\t\t\ttimesPanel.add(runTimesField);\r\n\t\tinputsPanel.add(timesPanel);\r\n\t\t\tlevelPanel.add(levelLabel);\r\n\t\t\tlevelPanel.add(charLvlChoice);\r\n\t\tinputsPanel.add(levelPanel);\r\n\t\t\trunTimesField.setText(\"1\");\r\n\t\tdisplay.setEditable(false);\r\n\r\n\t\trunButton.addActionListener(this);\r\n\t\tclearButton.addActionListener(this);\r\n\r\n\t\tdisplay.setBackground(Color.black);\r\n\t\tdisplay.setForeground(Color.white);\r\n\r\n\t\tsetTabsAndStyles(display);\r\n\t\tdisplay = addTextToTextPane();\r\n\t\t\tJScrollPane scrollPane = new JScrollPane(display);\r\n\t\t\t\tscrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\t\t\tscrollPane.setPreferredSize(new Dimension(500, 200));\r\n\t\tdisplayPanel.add(scrollPane);\r\n\r\n\t\t//create Container and set attributes\r\n\t\tContainer c = getContentPane();\r\n\t\t\tc.setLayout(new BorderLayout());\r\n\t\t\tc.add(inputsPanel, BorderLayout.NORTH);\r\n\t\t\tc.add(displayPanel, BorderLayout.CENTER);\r\n\r\n\t\treturn c;\r\n\t}", "public void makeWindow(Container pane)\r\n\t{\r\n\t\tboard.display(pane, fieldArray);\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell(shell,SWT.SHELL_TRIM|SWT.APPLICATION_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\GupiaoNo4\\\\Project\\\\GupiaoNo4\\\\data\\\\chaogushenqi.png\"));\n\t\tshell.setSize(467, 398);\n\t\tshell.setText(\"\\u5356\\u7A7A\");\n\t\t\n\t\ttext_code = new Text(shell, SWT.BORDER);\n\t\ttext_code.setBounds(225, 88, 73, 23);\n\t\t\n\t\ttext_uprice = new Text(shell, SWT.BORDER | SWT.READ_ONLY);\n\t\ttext_uprice.setBounds(225, 117, 73, 23);\n\t\t\n\t\ttext_downprice = new Text(shell, SWT.BORDER | SWT.READ_ONLY);\n\t\ttext_downprice.setBounds(225, 146, 73, 23);\n\t\t\n\t\ttext_price = new Text(shell, SWT.BORDER);\n\t\ttext_price.setBounds(225, 178, 73, 23);\n\t\t\n\t\ttext_num = new Text(shell, SWT.BORDER);\n\t\ttext_num.setBounds(225, 207, 73, 23);\n\t\t\n\t\t//下单,取消按钮\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tpaceoder();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(116, 284, 58, 27);\n\t\tbtnNewButton.setText(\"\\u4E0B\\u5355\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setBounds(225, 284, 58, 27);\n\t\tbtnNewButton_1.setText(\"\\u53D6\\u6D88\");\n\t\t\n\t\tLabel lbl_code = new Label(shell, SWT.NONE);\n\t\tlbl_code.setBounds(116, 91, 60, 17);\n\t\tlbl_code.setText(\"股票代码:\");\n\t\t\n\t\tLabel lbl_upprice = new Label(shell, SWT.NONE);\n\t\tlbl_upprice.setBounds(116, 120, 60, 17);\n\t\tlbl_upprice.setText(\"涨停价格:\");\n\t\t\n\t\tLabel lbl_downprice = new Label(shell, SWT.NONE);\n\t\tlbl_downprice.setBounds(116, 152, 60, 17);\n\t\tlbl_downprice.setText(\"跌停价格:\");\n\t\t\n\t\tLabel lbl_price = new Label(shell, SWT.NONE);\n\t\tlbl_price.setBounds(116, 181, 60, 17);\n\t\tlbl_price.setText(\"委托价格:\");\n\t\t\n\t\tLabel lbl_num = new Label(shell, SWT.NONE);\n\t\tlbl_num.setBounds(116, 210, 60, 17);\n\t\tlbl_num.setText(\"委托数量:\");\n\t\t\n\t\tLabel lbl_date = new Label(shell, SWT.NONE);\n\t\tlbl_date.setBounds(116, 243, 61, 17);\n\t\tlbl_date.setText(\"日 期:\");\n\t\t\n\t\ttext_dateTime = new DateTime(shell, SWT.BORDER);\n\t\ttext_dateTime.setBounds(225, 237, 88, 24);\n\t\t\n\t\tlbl_notice = new Label(shell, SWT.BORDER);\n\t\tlbl_notice.setBounds(316, 333, 125, 17);\n\t\t\n\t\tif (information == null) {\n\n\t\t\tfinal Label lbl_search = new Label(shell, SWT.NONE);\n\t\t\tlbl_search.addMouseListener(new MouseAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseDown(MouseEvent e) {\n\n\t\t\t\t\tlbl_searchEvent();\n\t\t\t\t}\n\t\t\t});\n\t\t\tlbl_search.addMouseTrackListener(new MouseTrackAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseEnter(MouseEvent e) {\n\t\t\t\t\tlbl_search.setBackground(Display.getCurrent()\n\t\t\t\t\t\t\t.getSystemColor(SWT.COLOR_GREEN));\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseExit(MouseEvent e) {\n\t\t\t\t\tlbl_search\n\t\t\t\t\t\t\t.setBackground(Display\n\t\t\t\t\t\t\t\t\t.getCurrent()\n\t\t\t\t\t\t\t\t\t.getSystemColor(\n\t\t\t\t\t\t\t\t\t\t\tSWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));\n\t\t\t\t}\n\t\t\t});\n\t\t\tlbl_search\n\t\t\t\t\t.setImage(SWTResourceManager\n\t\t\t\t\t\t\t.getImage(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\GupiaoNo4\\\\Project\\\\GupiaoNo4\\\\data\\\\检查.png\"));\n\t\t\tlbl_search.setBounds(354, 91, 18, 18);\n\n\t\t\ttext_place = new Text(shell, SWT.BORDER);\n\t\t\ttext_place.setBounds(304, 88, 32, 23);\n\n\t\t} else {\n\t\t\ttrade_shortsell();// 显示文本框内容\n\t\t}\n\t\t\n\t}", "private void createContents() {\r\n\t\tshlAboutGoko = new Shell(getParent(), getStyle());\r\n\t\tshlAboutGoko.setSize(376, 248);\r\n\t\tshlAboutGoko.setText(\"About Goko\");\r\n\t\tshlAboutGoko.setLayout(new GridLayout(1, false));\r\n\r\n\t\tComposite composite_1 = new Composite(shlAboutGoko, SWT.NONE);\r\n\t\tcomposite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\r\n\t\tcomposite_1.setLayout(new GridLayout(1, false));\r\n\r\n\t\tLabel lblGokoIsA = new Label(composite_1, SWT.WRAP);\r\n\t\tGridData gd_lblGokoIsA = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblGokoIsA.widthHint = 350;\r\n\t\tlblGokoIsA.setLayoutData(gd_lblGokoIsA);\r\n\t\tlblGokoIsA.setText(\"Goko is an open source desktop application for CNC control and operation\");\r\n\r\n\t\tComposite composite_2 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\r\n\t\tcomposite_2.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblAlphaVersion = new Label(composite_2, SWT.NONE);\r\n\t\tlblAlphaVersion.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlblAlphaVersion.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.ITALIC));\r\n\t\tlblAlphaVersion.setText(\"Version\");\r\n\r\n\t\tLabel lblVersion = new Label(composite_2, SWT.NONE);\r\n\t\tlblVersion.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(composite_1, SWT.NONE);\r\n\r\n\t\tLabel lblDate = new Label(composite_2, SWT.NONE);\r\n\t\tlblDate.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlblDate.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.ITALIC));\r\n\t\tlblDate.setText(\"Build\");\r\n\t\t\r\n\t\tLabel lblBuild = new Label(composite_2, SWT.NONE);\r\n\t\tlblBuild.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\r\n\t\t\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\tClassLoader loader = Thread.currentThread().getContextClassLoader(); \r\n\t\tInputStream stream = loader.getResourceAsStream(\"/version.properties\");\r\n\t\ttry {\r\n\t\t\tprop.load(stream);\r\n\t\t\tString version = prop.getProperty(\"goko.version\");\r\n\t\t\tString build = prop.getProperty(\"goko.build.timestamp\");\r\n\t\t\tlblVersion.setText(version);\r\n\t\t\tlblBuild.setText(build);\t\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\tLOG.error(e);\r\n\t\t}\r\n\t\t\r\n\t\tComposite composite = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblMoreInformationOn = new Label(composite, SWT.NONE);\r\n\t\tGridData gd_lblMoreInformationOn = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblMoreInformationOn.widthHint = 60;\r\n\t\tlblMoreInformationOn.setLayoutData(gd_lblMoreInformationOn);\r\n\t\tlblMoreInformationOn.setText(\"Website :\");\r\n\r\n\t\tLink link = new Link(composite, SWT.NONE);\r\n\t\tlink.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent event) {\r\n\t\t\t\tif (event.button == 1) { // Left button pressed & released\r\n\t\t Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n\t\t if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\r\n\t\t try {\r\n\t\t desktop.browse(URI.create(\"http://www.goko.fr\"));\r\n\t\t } catch (Exception e) {\r\n\t\t LOG.error(e);\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\tlink.setText(\"<a>http://www.goko.fr</a>\");\r\n\t\t\r\n\t\tComposite composite_3 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_3.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel lblForum = new Label(composite_3, SWT.NONE);\r\n\t\tGridData gd_lblForum = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblForum.widthHint = 60;\r\n\t\tlblForum.setLayoutData(gd_lblForum);\r\n\t\tlblForum.setText(\"Forum :\");\r\n\t\t\r\n\t\tLink link_1 = new Link(composite_3, 0);\r\n\t\tlink_1.setText(\"<a>http://discuss.goko.fr</a>\");\r\n\t\tlink_1.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent event) {\r\n\t\t\t\tif (event.button == 1) { // Left button pressed & released\r\n\t\t Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n\t\t if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\r\n\t\t try {\r\n\t\t desktop.browse(URI.create(\"http://discuss.goko.fr\"));\r\n\t\t } catch (Exception e) {\r\n\t\t LOG.error(e);\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tComposite composite_4 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_4.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel lblContact = new Label(composite_4, SWT.NONE);\r\n\t\tGridData gd_lblContact = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblContact.widthHint = 60;\r\n\t\tlblContact.setLayoutData(gd_lblContact);\r\n\t\tlblContact.setText(\"Contact :\");\r\n\t\t\t \r\n\t\tLink link_2 = new Link(composite_4, 0);\r\n\t\tlink_2.setText(\"<a>\"+toAscii(\"636f6e7461637440676f6b6f2e6672\")+\"</a>\");\r\n\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(340, 217);\n\t\tshell.setText(\"Benvenuto\");\n\t\tshell.setLayout(new FormLayout());\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tFormData fd_composite = new FormData();\n\t\tfd_composite.bottom = new FormAttachment(100, -10);\n\t\tfd_composite.top = new FormAttachment(0, 10);\n\t\tfd_composite.right = new FormAttachment(100, -10);\n\t\tfd_composite.left = new FormAttachment(0, 10);\n\t\tcomposite.setLayoutData(fd_composite);\n\t\tcomposite.setLayout(new GridLayout(2, false));\n\t\t\n\t\tLabel lblUsername = new Label(composite, SWT.NONE);\n\t\tlblUsername.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblUsername.setText(\"Username\");\n\t\t\n\t\ttxtUsername = new Text(composite, SWT.BORDER);\n\t\ttxtUsername.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\t\tfinal String username = txtUsername.getText();\n\t\tSystem.out.println(username);\n\t\t\n\t\tLabel lblPeriodo = new Label(composite, SWT.NONE);\n\t\tlblPeriodo.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblPeriodo.setText(\"Periodo\");\n\t\t\n\t\tfinal CCombo combo_1 = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo_1.setVisibleItemCount(6);\n\t\tcombo_1.setItems(new String[] {\"1 settimana\", \"1 mese\", \"3 mesi\", \"6 mesi\", \"1 anno\", \"Overall\"});\n\t\t\n\t\tLabel lblNumeroCanzoni = new Label(composite, SWT.NONE);\n\t\tlblNumeroCanzoni.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblNumeroCanzoni.setText(\"Numero canzoni da analizzare\");\n\t\t\n\t\tfinal CCombo combo = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo.setItems(new String[] {\"25\", \"50\"});\n\t\tcombo.setVisibleItemCount(2);\n\t\tcombo.setToolTipText(\"Numero canzoni da analizzare\");\n\t\t\n\t\tLabel lblNumeroCanzoniDa = new Label(composite, SWT.NONE);\n\t\tlblNumeroCanzoniDa.setText(\"Numero canzoni da consigliare\");\n\t\t\n\t\tfinal CCombo combo_2 = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo_2.setVisibleItemCount(3);\n\t\tcombo_2.setToolTipText(\"Numero canzoni da consigliare\");\n\t\tcombo_2.setItems(new String[] {\"5\", \"10\", \"20\"});\n\t\t\n\t\tButton btnAvviaRicerca = new Button(composite, SWT.NONE);\n\t\tbtnAvviaRicerca.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tfinal String username = txtUsername.getText();\n\t\t\t\tfinal String numSong = combo.getText();\n\t\t\t\tfinal String period = combo_1.getText();\n\t\t\t\tfinal String numConsigli = combo_2.getText();\n\t\t\t\tif(username.isEmpty() || numSong.isEmpty() || period.isEmpty() || numConsigli.isEmpty()){\n\t\t\t\t\tSystem.out.println(\"si prega di compilare tutti i campi\");\n\t\t\t\t}\n\t\t\t\tif(!username.isEmpty() && !numSong.isEmpty() && !period.isEmpty() && !numConsigli.isEmpty()){\n\t\t\t\t\tSystem.out.println(\"tutto ok\");\n\t\t\t\t\t\n\t\t\t\t\tFileOutputStream out;\n\t\t\t\t\tPrintStream ps;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tout = new FileOutputStream(\"datiutente.txt\");\n\t\t\t\t\t\tps = new PrintStream(out);\n\t\t\t\t\t\tps.println(username);\n\t\t\t\t\t\tps.println(numSong);\n\t\t\t\t\t\tps.println(period);\n\t\t\t\t\t\tps.println(numConsigli);\n\t\t\t\t\t\tps.close();\n\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\tSystem.err.println(\"Errore nella scrittura del file\");\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tPrincipaleParteA.main();\n\t\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n\t\t\t\n\t\t});\n\t\tGridData gd_btnAvviaRicerca = new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1);\n\t\tgd_btnAvviaRicerca.heightHint = 31;\n\t\tbtnAvviaRicerca.setLayoutData(gd_btnAvviaRicerca);\n\t\tbtnAvviaRicerca.setText(\"Avvia Ricerca\");\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(new Point(500, 360));\n\t\tshell.setMinimumSize(new Point(500, 360));\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(new GridLayout(2, false));\n\t\t\n\t\tLabel label = new Label(shell, SWT.NONE);\n\t\tlabel.setText(\"欢迎 \"+user.getName()+\" 同学使用学生成绩管理系统\");\n\t\tnew Label(shell, SWT.NONE);\n\t\t\n\t\tComposite compositeStdData = new Composite(shell, SWT.NONE);\n\t\tcompositeStdData.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\t\tGridLayout gl_compositeStdData = new GridLayout(2, false);\n\t\tgl_compositeStdData.verticalSpacing = 15;\n\t\tcompositeStdData.setLayout(gl_compositeStdData);\n\t\t\n\t\tLabel labelStdData = new Label(compositeStdData, SWT.NONE);\n\t\tlabelStdData.setAlignment(SWT.CENTER);\n\t\tlabelStdData.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 2, 1));\n\t\tlabelStdData.setText(\"成绩数据\");\n\t\t\n\t\tLabel labelStdDataNum = new Label(compositeStdData, SWT.NONE);\n\t\tlabelStdDataNum.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlabelStdDataNum.setText(\"学号:\");\n\t\t\n\t\ttextStdDataNum = new Text(compositeStdData, SWT.BORDER);\n\t\ttextStdDataNum.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\n\t\t\n\t\tLabel labelStdDataName = new Label(compositeStdData, SWT.NONE);\n\t\tlabelStdDataName.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlabelStdDataName.setText(\"姓名:\");\n\t\t\n\t\ttextStdDataName = new Text(compositeStdData, SWT.BORDER);\n\t\ttextStdDataName.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\n\t\t\n\t\tLabel labelStdDataLine = new Label(compositeStdData, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabelStdDataLine.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 2, 1));\n\t\tlabelStdDataLine.setText(\"New Label\");\n\t\t\n\t\tLabel labelCourseName = new Label(compositeStdData, SWT.NONE);\n\t\tlabelCourseName.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlabelCourseName.setText(\"课程名\");\n\t\t\n\t\tLabel labelScore = new Label(compositeStdData, SWT.NONE);\n\t\tlabelScore.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlabelScore.setText(\"成绩\");\n\t\t\n\t\ttextCourseName = new Text(compositeStdData, SWT.BORDER);\n\t\ttextCourseName.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\t\n\t\ttextScore = new Text(compositeStdData, SWT.BORDER);\n\t\ttextScore.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\t\n\t\tLabel labelStdDataFill = new Label(compositeStdData, SWT.NONE);\n\t\tlabelStdDataFill.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));\n\t\tnew Label(compositeStdData, SWT.NONE);\n\t\t\n\t\tComposite compositeStdOp = new Composite(shell, SWT.NONE);\n\t\tcompositeStdOp.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));\n\t\tGridLayout gl_compositeStdOp = new GridLayout(1, false);\n\t\tgl_compositeStdOp.verticalSpacing = 15;\n\t\tcompositeStdOp.setLayout(gl_compositeStdOp);\n\t\t\n\t\tLabel labelStdOP = new Label(compositeStdOp, SWT.NONE);\n\t\tlabelStdOP.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));\n\t\tlabelStdOP.setAlignment(SWT.CENTER);\n\t\tlabelStdOP.setText(\"操作菜单\");\n\t\t\n\t\tButton buttonStdOPFirst = new Button(compositeStdOp, SWT.NONE);\n\t\tbuttonStdOPFirst.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tbuttonStdOPFirst.setText(\"第一门课程\");\n\t\t\n\t\tButton buttonStdOPNext = new Button(compositeStdOp, SWT.NONE);\n\t\tbuttonStdOPNext.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tbuttonStdOPNext.setText(\"下一门课程\");\n\t\t\n\t\tButton buttonStdOPPrev = new Button(compositeStdOp, SWT.NONE);\n\t\tbuttonStdOPPrev.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tbuttonStdOPPrev.setText(\"上一门课程\");\n\t\t\n\t\tButton buttonStdOPLast = new Button(compositeStdOp, SWT.NONE);\n\t\tbuttonStdOPLast.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tbuttonStdOPLast.setText(\"最后一门课程\");\n\t\t\n\t\tCombo comboStdOPSele = new Combo(compositeStdOp, SWT.NONE);\n\t\tcomboStdOPSele.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));\n\t\tcomboStdOPSele.setText(\"课程名?\");\n\t\t\n\t\tLabel labelStdOPFill = new Label(compositeStdOp, SWT.NONE);\n\t\tlabelStdOPFill.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\n\t}", "public void createPopupWindow() {\r\n \t//\r\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(538, 450);\n\t\tshell.setText(\"SWT Application\");\n\n\t\tfinal DateTime dateTime = new DateTime(shell, SWT.BORDER | SWT.CALENDAR);\n\t\tdateTime.setBounds(10, 10, 514, 290);\n\n\t\tfinal DateTime dateTime_1 = new DateTime(shell, SWT.BORDER | SWT.TIME);\n\t\tdateTime_1.setBounds(10, 306, 135, 29);\n\t\tvideoPath = new Text(shell, SWT.BORDER);\n\t\tvideoPath.setBounds(220, 306, 207, 27);\n\n\t\tButton btnBrowseVideo = new Button(shell, SWT.NONE);\n\t\tbtnBrowseVideo.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tFileDialog fileDialog = new FileDialog(shell, SWT.MULTI);\n\t\t\t\tString fileFilterPath = \"\";\n\t\t\t\tfileDialog.setFilterPath(fileFilterPath);\n\t\t\t\tfileDialog.setFilterExtensions(new String[] { \"*.*\" });\n\t\t\t\tfileDialog.setFilterNames(new String[] { \"Any\" });\n\t\t\t\tString firstFile = fileDialog.open();\n\t\t\t\tif (firstFile != null) {\n\t\t\t\t\tvideoPath.setText(firstFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnBrowseVideo.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t}\n\t\t});\n\t\tbtnBrowseVideo.setBounds(433, 306, 91, 29);\n\t\tbtnBrowseVideo.setText(\"browse\");\n\t\ttorrentPath = new Text(shell, SWT.BORDER);\n\t\ttorrentPath.setBounds(220, 341, 207, 27);\n\t\tButton btnBrowseTorrent = new Button(shell, SWT.NONE);\n\t\tbtnBrowseTorrent.setText(\"browse\");\n\t\tbtnBrowseTorrent.setBounds(433, 339, 91, 29);\n\t\tbtnBrowseTorrent.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tFileDialog fileDialog = new FileDialog(shell, SWT.MULTI);\n\t\t\t\tString fileFilterPath = \"\";\n\t\t\t\tfileDialog.setFilterPath(fileFilterPath);\n\t\t\t\tfileDialog.setFilterExtensions(new String[] { \"*.*\" });\n\t\t\t\tfileDialog.setFilterNames(new String[] { \"Any\" });\n\t\t\t\tString firstFile = fileDialog.open();\n\t\t\t\tif (firstFile != null) {\n\t\t\t\t\ttorrentPath.setText(firstFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tButton btnGenerateTorrent = new Button(shell, SWT.NONE);\n\t\tbtnGenerateTorrent.setBounds(10, 374, 516, 29);\n\t\tbtnGenerateTorrent.setText(\"Generate Torrent\");\n\n\t\tvideoLength = new Text(shell, SWT.BORDER);\n\t\tvideoLength.setBounds(10, 341, 135, 27);\n\t\t\n\t\tLabel lblNewLabel = new Label(shell, SWT.RIGHT);\n\t\tlblNewLabel.setAlignment(SWT.LEFT);\n\t\tlblNewLabel.setBounds(157, 315, 48, 18);\n\t\tlblNewLabel.setText(\"Video\");\n\t\t\n\t\tLabel lblTorrent = new Label(shell, SWT.RIGHT);\n\t\tlblTorrent.setText(\"Torrent\");\n\t\tlblTorrent.setBounds(157, 341, 48, 18);\n\t\tbtnGenerateTorrent.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tFile video = new File(videoPath.getText());\n\t\t\t\ttry {\n\t\t\t\t\tif (video.exists() && torrentPath.getText() != \"\") {\n\t\t\t\t\t\tMap parameters = new HashMap();\n\t\t\t\t\t\tparameters.put(\"start\", dateTime.getYear() + \"/\" + (dateTime.getMonth()+1) + \"/\" + dateTime.getDay() + \"-\" + dateTime_1.getHours() + \":\" + dateTime_1.getMinutes() + \":\" + dateTime_1.getSeconds());\n\t\t\t\t\t\tparameters.put(\"target\", torrentPath.getText());\n\t\t\t\t\t\tparameters.put(\"length\", videoLength.getText());\n\t\t\t\t\t\tSystem.out.println(\"start generating \"+parameters.get(\"length\"));\n\t\t\t\t\t\tnew MakeTorrent(videoPath.getText(), new URL(\"https://jomican.csie.org/~jimmy/tracker/announce.php\"), parameters);\n\t\t\t\t\t\tSystem.out.println(\"end generating\");\n\t\t\t\t\t\tFile var = new File(\"var.js\");\n\t\t\t\t\t\tPrintStream stream=new PrintStream(new FileOutputStream(var,false));\n\t\t\t\t\t\tstream.println(\"start_time = \"+(new SimpleDateFormat(\"yyyy/MM/dd-HH:mm:ss\").parse(dateTime.getYear() + \"/\" + (dateTime.getMonth()+1) + \"/\" + dateTime.getDay() + \"-\" + dateTime_1.getHours() + \":\" + dateTime_1.getMinutes() + \":\" + dateTime_1.getSeconds()).getTime() / 1000)+\";\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"jizz\");\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tshell.setSize(599, 779);\r\n\t\tshell.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tButton logoBtn = new Button(shell, SWT.NONE);\r\n\t\tlogoBtn.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tMainMenuKaff mm = new MainMenuKaff();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tmm.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tlogoBtn.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\logo for header button.png\"));\r\n\t\tlogoBtn.setBounds(497, 0, 64, 50);\r\n\r\n\t\tLabel headerLabel = new Label(shell, SWT.NONE);\r\n\t\theaderLabel.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\KaffPlatformheader.jpg\"));\r\n\t\theaderLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\theaderLabel.setBounds(0, 0, 607, 50);\r\n\r\n\t\tLabel bookInfoLabel = new Label(shell, SWT.NONE);\r\n\t\tbookInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\tbookInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\tbookInfoLabel.setAlignment(SWT.CENTER);\r\n\t\tbookInfoLabel.setBounds(177, 130, 192, 28);\r\n\t\tbookInfoLabel.setText(\"معلومات الكتاب\");\r\n\r\n\t\tLabel bookTitleLabel = new Label(shell, SWT.NONE);\r\n\t\tbookTitleLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookTitleLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookTitleLabel.setBounds(415, 203, 119, 28);\r\n\t\tbookTitleLabel.setText(\"عنوان الكتاب\");\r\n\r\n\t\tBookTitleTxt = new Text(shell, SWT.BORDER);\r\n\t\tBookTitleTxt.setBounds(56, 206, 334, 24);\r\n\r\n\t\tLabel bookIDLabel = new Label(shell, SWT.NONE);\r\n\t\tbookIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookIDLabel.setBounds(415, 170, 119, 32);\r\n\t\tbookIDLabel.setText(\"رمز الكتاب\");\r\n\r\n\t\tLabel editionLabel = new Label(shell, SWT.NONE);\r\n\t\teditionLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\teditionLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\teditionLabel.setBounds(415, 235, 119, 28);\r\n\t\teditionLabel.setText(\"إصدار الكتاب\");\r\n\r\n\t\teditionTxt = new Text(shell, SWT.BORDER);\r\n\t\teditionTxt.setBounds(271, 240, 119, 24);\r\n\r\n\t\tLabel lvlLabel = new Label(shell, SWT.NONE);\r\n\t\tlvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tlvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tlvlLabel.setText(\"المستوى\");\r\n\t\tlvlLabel.setBounds(415, 269, 119, 27);\r\n\r\n\t\tCombo lvlBookCombo = new Combo(shell, SWT.NONE);\r\n\t\tlvlBookCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\tlvlBookCombo.setBounds(326, 272, 64, 25);\r\n\t\tlvlBookCombo.select(0);\r\n\r\n\t\tLabel priceLabel = new Label(shell, SWT.NONE);\r\n\t\tpriceLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tpriceLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tpriceLabel.setText(\"السعر\");\r\n\t\tpriceLabel.setBounds(415, 351, 119, 28);\r\n\r\n\t\tGroup groupType = new Group(shell, SWT.NONE);\r\n\t\tgroupType.setBounds(56, 320, 334, 24);\r\n\r\n\t\tButton button = new Button(groupType, SWT.RADIO);\r\n\t\tbutton.setSelection(true);\r\n\t\tbutton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton.setBounds(21, 0, 73, 21);\r\n\t\tbutton.setText(\"مجاناً\");\r\n\r\n\t\tButton button_1 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_1.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_1.setBounds(130, 0, 73, 21);\r\n\t\tbutton_1.setText(\"إعارة\");\r\n\r\n\t\tButton button_2 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_2.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_2.setBounds(233, 0, 80, 21);\r\n\t\tbutton_2.setText(\"للبيع\");\r\n\r\n\t\tpriceTxtValue = new Text(shell, SWT.BORDER);\r\n\t\tpriceTxtValue.setBounds(326, 355, 64, 24);\r\n\r\n\t\tLabel ownerInfoLabel = new Label(shell, SWT.NONE);\r\n\t\townerInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\townerInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\townerInfoLabel.setText(\"معلومات صاحبة الكتاب\");\r\n\t\townerInfoLabel.setAlignment(SWT.CENTER);\r\n\t\townerInfoLabel.setBounds(147, 400, 242, 28);\r\n\r\n\t\tLabel ownerIDLabel = new Label(shell, SWT.NONE);\r\n\t\townerIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerIDLabel.setBounds(415, 441, 119, 34);\r\n\t\townerIDLabel.setText(\"الرقم الأكاديمي\");\r\n\r\n\t\townerIDValue = new Text(shell, SWT.BORDER);\r\n\t\townerIDValue.setBounds(204, 444, 186, 24);\r\n\t\t// need to check if the owner is already in the database...\r\n\r\n\t\tLabel nameLabel = new Label(shell, SWT.NONE);\r\n\t\tnameLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tnameLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tnameLabel.setBounds(415, 481, 119, 28);\r\n\t\tnameLabel.setText(\"الاسم الثلاثي\");\r\n\r\n\t\tnameTxt = new Text(shell, SWT.BORDER);\r\n\t\tnameTxt.setBounds(56, 485, 334, 24);\r\n\r\n\t\tLabel phoneLabel = new Label(shell, SWT.NONE);\r\n\t\tphoneLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tphoneLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tphoneLabel.setText(\"رقم الجوال\");\r\n\t\tphoneLabel.setBounds(415, 515, 119, 27);\r\n\r\n\t\tphoneTxt = new Text(shell, SWT.BORDER);\r\n\t\tphoneTxt.setBounds(204, 521, 186, 24);\r\n\r\n\t\tLabel ownerLvlLabel = new Label(shell, SWT.NONE);\r\n\t\townerLvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerLvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerLvlLabel.setBounds(415, 548, 119, 31);\r\n\t\townerLvlLabel.setText(\"المستوى\");\r\n\r\n\t\tCombo owneLvlCombo = new Combo(shell, SWT.NONE);\r\n\t\towneLvlCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\towneLvlCombo.setBounds(326, 554, 64, 25);\r\n\t\towneLvlCombo.select(0);\r\n\r\n\t\tLabel emailLabel = new Label(shell, SWT.NONE);\r\n\t\temailLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\temailLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\temailLabel.setBounds(415, 583, 119, 38);\r\n\t\temailLabel.setText(\"البريد الإلكتروني\");\r\n\r\n\t\temailTxt = new Text(shell, SWT.BORDER);\r\n\t\temailTxt.setBounds(56, 586, 334, 24);\r\n\r\n\t\tButton addButton = new Button(shell, SWT.NONE);\r\n\t\taddButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString bookQuery = \"INSERT INTO kaff.BOOK(bookID, bookTitle, price, level,available, type) VALUES (?, ?, ?, ?, ?, ?, ?)\";\r\n\t\t\t\t\tString bookEdition = \"INSERT INTO kaff.bookEdition(bookID, edition, year) VALUES (?, ?, ?)\";\r\n\t\t\t\t\tString ownerQuery = \"INSERT INTO kaff.user(userID, fname, mname, lastname, phone, level, personalEmail, email) VALUES (?, ?, ?, ?, ?, ?, ?, ?)\";\r\n\r\n\t\t\t\t\tString bookID = bookIDTxt.getText();\r\n\t\t\t\t\tString bookTitle = BookTitleTxt.getText();\r\n\t\t\t\t\tint bookLevel = lvlBookCombo.getSelectionIndex();\r\n\t\t\t\t\tString type = groupType.getText();\r\n\t\t\t\t\tdouble price = Double.parseDouble(priceTxtValue.getText());\r\n\t\t\t\t\tboolean available = true;\r\n\r\n\t\t\t\t\t// must error handle\r\n\t\t\t\t\tString[] ed = editionTxt.getText().split(\" \");\r\n\t\t\t\t\tString edition = ed[0];\r\n\t\t\t\t\tString year = ed[1];\r\n\r\n\t\t\t\t\tString ownerID = ownerIDValue.getText();\r\n\r\n\t\t\t\t\t// error handle if the user enters two names or just first name\r\n\t\t\t\t\tString[] name = nameTxt.getText().split(\" \");\r\n\t\t\t\t\tString fname = \"\", mname = \"\", lname = \"\";\r\n\t\t\t\t\tSystem.out.println(\"name array\" + name);\r\n\t\t\t\t\tif (name.length > 2) {\r\n\t\t\t\t\t\tfname = name[0];\r\n\t\t\t\t\t\tmname = name[1];\r\n\t\t\t\t\t\tlname = name[2];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString phone = phoneTxt.getText();\r\n\t\t\t\t\tint userLevel = owneLvlCombo.getSelectionIndex();\r\n\t\t\t\t\tString email = emailTxt.getText();\r\n\r\n\t\t\t\t\tDatabase.openConnection();\r\n\t\t\t\t\tPreparedStatement bookStatement = Database.getConnection().prepareStatement(bookQuery);\r\n\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, bookTitle);\r\n\t\t\t\t\tbookStatement.setInt(3, bookLevel);\r\n\t\t\t\t\tbookStatement.setString(4, type);\r\n\t\t\t\t\tbookStatement.setDouble(5, price);\r\n\t\t\t\t\tbookStatement.setBoolean(6, available);\r\n\r\n\t\t\t\t\tint bookre = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tbookStatement = Database.getConnection().prepareStatement(bookEdition);\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, edition);\r\n\t\t\t\t\tbookStatement.setString(3, year);\r\n\r\n\t\t\t\t\tint edResult = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tPreparedStatement ownerStatement = Database.getConnection().prepareStatement(ownerQuery);\r\n\t\t\t\t\townerStatement.setString(1, ownerID);\r\n\t\t\t\t\townerStatement.setString(2, fname);\r\n\t\t\t\t\townerStatement.setString(3, mname);\r\n\t\t\t\t\townerStatement.setString(4, lname);\r\n\t\t\t\t\townerStatement.setString(5, phone);\r\n\t\t\t\t\townerStatement.setInt(6, userLevel);\r\n\t\t\t\t\townerStatement.setString(7, ownerID + \"iau.edu.sa\");\r\n\t\t\t\t\townerStatement.setString(8, email);\r\n\t\t\t\t\tint ownRes = ownerStatement.executeUpdate();\r\n\r\n\t\t\t\t\tSystem.out.println(\"results: \" + ownRes + \" \" + edResult + \" bookre\");\r\n\t\t\t\t\t// test result of excute Update\r\n\t\t\t\t\tif (ownRes != 0 && edResult != 0 && bookre != 0) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is updated\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is not updated\");\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tDatabase.closeConnection();\r\n\t\t\t\t} catch (SQLException sql) {\r\n\t\t\t\t\tSystem.out.println(sql);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\taddButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\taddButton.setBounds(54, 666, 85, 26);\r\n\t\taddButton.setText(\"إضافة\");\r\n\r\n\t\tButton backButton = new Button(shell, SWT.NONE);\r\n\t\tbackButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tAdminMenu am = new AdminMenu();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tam.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbackButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbackButton.setBounds(150, 666, 85, 26);\r\n\t\tbackButton.setText(\"رجوع\");\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(177, 72, 192, 21);\r\n\t\tlabel.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tLabel label_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setBounds(22, 103, 167, 21);\r\n\t\t// get user name here to display\r\n\t\tString name = getUserName();\r\n\t\tlabel_1.setText(\"مرحباً ...\" + name);\r\n\r\n\t\tbookIDTxt = new Text(shell, SWT.BORDER);\r\n\t\tbookIDTxt.setBounds(271, 170, 119, 24);\r\n\r\n\t}", "public void createWindow() throws IOException {\n\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"adminEditorWindow.fxml\"));\n AnchorPane root = (AnchorPane) loader.load();\n Scene scene = new Scene(root);\n Stage stage = new Stage();\n stage.setResizable(false);\n stage.setScene(scene);\n stage.setTitle(\"Administrative Password Editor\");\n stage.getIcons().add(new Image(\"resources/usm seal icon.png\"));\n stage.show();\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tfinal TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\r\n\t\ttabFolder.setToolTipText(\"\");\r\n\t\t\r\n\t\tTabItem tabItem = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttabItem.setText(\"欢迎使用\");\r\n\t\t\r\n\t\tTabItem tabItem_1 = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttabItem_1.setText(\"员工查询\");\r\n\t\t\r\n\t\tMenu menu = new Menu(shell, SWT.BAR);\r\n\t\tshell.setMenuBar(menu);\r\n\t\t\r\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.NONE);\r\n\t\tmenuItem.setText(\"系统管理\");\r\n\t\t\r\n\t\tMenuItem menuItem_1 = new MenuItem(menu, SWT.CASCADE);\r\n\t\tmenuItem_1.setText(\"员工管理\");\r\n\t\t\r\n\t\tMenu menu_1 = new Menu(menuItem_1);\r\n\t\tmenuItem_1.setMenu(menu_1);\r\n\t\t\r\n\t\tMenuItem menuItem_2 = new MenuItem(menu_1, SWT.NONE);\r\n\t\tmenuItem_2.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tTabItem tbtmNewItem = new TabItem(tabFolder,SWT.NONE);\r\n\t\t\t\ttbtmNewItem.setText(\"员工查询\");\r\n\t\t\t\t//创建自定义组件\r\n\t\t\t\tEmpQueryCmp eqc = new EmpQueryCmp(tabFolder, SWT.NONE);\r\n\t\t\t\t//设置标签显示的自定义组件\r\n\t\t\t\ttbtmNewItem.setControl(eqc);\r\n\t\t\t\t\r\n\t\t\t\t//选中当前标签页\r\n\t\t\t\ttabFolder.setSelection(tbtmNewItem);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tmenuItem_2.setText(\"员工查询\");\r\n\r\n\t}", "public void createWindow(int x, int y, int width, int height, int bgColor, String title, String displayText) {\r\n\t\tWindow winnie = new Window(x, y, width, height, bgColor, title);\r\n\t\twinnie.add(displayText);\r\n\t\twindows.add(winnie);\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(550, 400);\n\t\tshell.setText(\"Source A Antenna 1 Data\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnNewButton_1.setBounds(116, 10, 98, 30);\n\t\tbtnNewButton_1.setText(\"pol 1\");\n\t\t\n\t\tButton btnPol = new Button(shell, SWT.NONE);\n\t\tbtnPol.setText(\"pol 2\");\n\t\tbtnPol.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol.setBounds(220, 10, 98, 30);\n\t\t\n\t\tButton btnPol_1 = new Button(shell, SWT.NONE);\n\t\tbtnPol_1.setText(\"pol 3\");\n\t\tbtnPol_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_1.setBounds(324, 10, 98, 30);\n\t\t\n\t\tButton btnPol_2 = new Button(shell, SWT.NONE);\n\t\tbtnPol_2.setText(\"pol 4\");\n\t\tbtnPol_2.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_2.setBounds(428, 10, 98, 30);\n\t\t\n\t\tButton button_3 = new Button(shell, SWT.NONE);\n\t\tbutton_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tPlot_graph nw = new Plot_graph();\n\t\t\t\tnw.GraphScreen();\n\t\t\t}\n\t\t});\n\t\tbutton_3.setBounds(116, 46, 98, 30);\n\t\t\n\t\tButton button_4 = new Button(shell, SWT.NONE);\n\t\tbutton_4.setBounds(116, 83, 98, 30);\n\t\t\n\t\tButton button_5 = new Button(shell, SWT.NONE);\n\t\tbutton_5.setBounds(116, 119, 98, 30);\n\t\t\n\t\tButton button_6 = new Button(shell, SWT.NONE);\n\t\tbutton_6.setBounds(116, 155, 98, 30);\n\t\t\n\t\tButton button_7 = new Button(shell, SWT.NONE);\n\t\tbutton_7.setBounds(220, 155, 98, 30);\n\t\t\n\t\tButton button_8 = new Button(shell, SWT.NONE);\n\t\tbutton_8.setBounds(220, 119, 98, 30);\n\t\t\n\t\tButton button_9 = new Button(shell, SWT.NONE);\n\t\tbutton_9.setBounds(220, 83, 98, 30);\n\t\t\n\t\tButton button_10 = new Button(shell, SWT.NONE);\n\t\tbutton_10.setBounds(220, 46, 98, 30);\n\t\t\n\t\tButton button_11 = new Button(shell, SWT.NONE);\n\t\tbutton_11.setBounds(428, 155, 98, 30);\n\t\t\n\t\tButton button_12 = new Button(shell, SWT.NONE);\n\t\tbutton_12.setBounds(428, 119, 98, 30);\n\t\t\n\t\tButton button_13 = new Button(shell, SWT.NONE);\n\t\tbutton_13.setBounds(428, 83, 98, 30);\n\t\t\n\t\tButton button_14 = new Button(shell, SWT.NONE);\n\t\tbutton_14.setBounds(428, 46, 98, 30);\n\t\t\n\t\tButton button_15 = new Button(shell, SWT.NONE);\n\t\tbutton_15.setBounds(324, 46, 98, 30);\n\t\t\n\t\tButton button_16 = new Button(shell, SWT.NONE);\n\t\tbutton_16.setBounds(324, 83, 98, 30);\n\t\t\n\t\tButton button_17 = new Button(shell, SWT.NONE);\n\t\tbutton_17.setBounds(324, 119, 98, 30);\n\t\t\n\t\tButton button_18 = new Button(shell, SWT.NONE);\n\t\tbutton_18.setBounds(324, 155, 98, 30);\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setModified(true);\n\t\tshell.setSize(512, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(null);\n\n\t\tLabel label = new Label(shell, SWT.SEPARATOR | SWT.VERTICAL);\n\t\tlabel.setBounds(253, 26, 2, 225);\n\n\t\tcomboCarBrandBuy = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarBrandBuy.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tlabel_1.setText(\"Selected\");\n\t\t\t}\n\t\t});\n\t\tcomboCarBrandBuy.setItems(new String[] {\"Maruti\", \"Fiat\", \"Tata\", \"Ford\", \"Honda\", \"Hyundai\"});\n\t\tcomboCarBrandBuy.setBounds(87, 33, 123, 23);\n\t\tcomboCarBrandBuy.setText(\"--select--\");\n\n\t\tLabel lblCarBrand = new Label(shell, SWT.NONE);\n\t\tlblCarBrand.setAlignment(SWT.RIGHT);\n\t\tlblCarBrand.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlblCarBrand.setBounds(12, 38, 71, 15);\n\t\tlblCarBrand.setText(\"Car Brand :\");\n\n\t\ttextCarNameBuy = new Text(shell, SWT.BORDER);\n\t\ttextCarNameBuy.setBounds(87, 67, 123, 21);\n\n\t\tLabel lblCarName = new Label(shell, SWT.NONE);\n\t\tlblCarName.setAlignment(SWT.RIGHT);\n\t\tlblCarName.setText(\"Car Name :\");\n\t\tlblCarName.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlblCarName.setBounds(12, 70, 71, 15);\n\n\t\tcomboCarModelBuy = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarModelBuy.setItems(new String[] {\"2015\", \"2014\", \"2013\", \"2012\", \"2011\", \"2010\", \"2009\", \"2008\", \"2007\", \"2006\", \"2005\", \"2004\", \"2003\", \"2002\", \"2001\", \"2000\"});\n\t\tcomboCarModelBuy.setBounds(87, 99, 91, 23);\n\t\tcomboCarModelBuy.setText(\"--select--\");\n\n\t\tLabel lblModelYear = new Label(shell, SWT.NONE);\n\t\tlblModelYear.setAlignment(SWT.RIGHT);\n\t\tlblModelYear.setText(\"Model :\");\n\t\tlblModelYear.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlblModelYear.setBounds(12, 105, 71, 15);\n\n\t\tButton buttonBuy = new Button(shell, SWT.NONE);\n\t\tbuttonBuy.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\n\t\t\t\tString carName = textCarNameBuy.getText();\n\t\t\t\tString carModel = comboCarModelBuy.getText();\n\n\t\t\t\tif(comboCarBrandBuy.getText().equalsIgnoreCase(\"maruti\")){\n\t\t\t\t\tmarutiMap.put(carName, carModel);\n\t\t\t\t}\n\n\t\t\t\tlabel_1.setText(\"Added to Inventory\");\n\t\t\t\tSystem.out.println(marutiMap);\n\t\t\t}\n\t\t});\n\t\tbuttonBuy.setBounds(87, 138, 63, 25);\n\t\tbuttonBuy.setText(\"BUY\");\n\n\t\tlabel_1 = new Label(shell, SWT.BORDER | SWT.HORIZONTAL | SWT.CENTER);\n\t\tlabel_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_1.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\n\t\tlabel_1.setBounds(73, 198, 137, 19);\n\n\t\tLabel lblStatus = new Label(shell, SWT.NONE);\n\t\tlblStatus.setBounds(22, 198, 45, 15);\n\t\tlblStatus.setText(\"Status :\");\n\n\t\tLabel label_2 = new Label(shell, SWT.NONE);\n\t\tlabel_2.setText(\"Car Brand :\");\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlabel_2.setAlignment(SWT.RIGHT);\n\t\tlabel_2.setBounds(280, 38, 71, 15);\n\n\t\tcomboCarBrandSell = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarBrandSell.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\n\t\t\t\tString carBrand = comboCarBrandSell.getText();\n\t\t\t\tcomboCarNameSell.clearSelection();\n\t\t\t\t\n\t\t\t\tif(carBrand.equalsIgnoreCase(\"maruti\")){\n\t\t\t\t\tSet<String> keyList = marutiMap.keySet();\n\t\t\t\t\tint i=0;\n\t\t\t\t\tfor(String key : keyList){\n\t\t\t\t\t\tcarNames.add(key);\n\t\t\t\t\t\t//comboCarNameSell.setItem(i, key);\n\t\t\t\t\t\t//i++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tString[] strArray = (String[]) carNames.toArray(new String[0]);\n\t\t\t\tSystem.out.println();\n\t\t\t\tcomboCarNameSell.setItems(strArray);\n\n\t\t\t}\n\t\t});\n\t\tcomboCarBrandSell.setItems(new String[] {\"Maruti\", \"Fiat\", \"Tata\", \"Ford\", \"Honda\", \"Hyundai\"});\n\t\tcomboCarBrandSell.setBounds(355, 33, 123, 23);\n\t\tcomboCarBrandSell.setText(\"--select--\");\n\n\t\tLabel label_3 = new Label(shell, SWT.NONE);\n\t\tlabel_3.setText(\"Car Name :\");\n\t\tlabel_3.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlabel_3.setAlignment(SWT.RIGHT);\n\t\tlabel_3.setBounds(280, 70, 71, 15);\n\n\t\tLabel label_4 = new Label(shell, SWT.NONE);\n\t\tlabel_4.setText(\"Model :\");\n\t\tlabel_4.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlabel_4.setAlignment(SWT.RIGHT);\n\t\tlabel_4.setBounds(280, 105, 71, 15);\n\n\t\tCombo comboCarModelSell = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarModelSell.setItems(new String[] {\"2015\", \"2014\", \"2013\", \"2012\", \"2011\", \"2010\", \"2009\", \"2008\", \"2007\", \"2006\", \"2005\", \"2004\", \"2003\", \"2002\", \"2001\", \"2000\"});\n\t\tcomboCarModelSell.setBounds(355, 99, 91, 23);\n\t\tcomboCarModelSell.setText(\"--select--\");\n\n\t\tButton buttonSell = new Button(shell, SWT.NONE);\n\t\tbuttonSell.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tlabel_5.setText(\"Sold Successfully\");\n\t\t\t}\n\t\t});\n\t\tbuttonSell.setText(\"SELL\");\n\t\tbuttonSell.setBounds(355, 138, 63, 25);\n\n\t\tlabel_5 = new Label(shell, SWT.BORDER | SWT.HORIZONTAL | SWT.CENTER);\n\t\tlabel_5.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_5.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\n\t\tlabel_5.setBounds(341, 198, 137, 19);\n\n\t\tLabel label_6 = new Label(shell, SWT.NONE);\n\t\tlabel_6.setText(\"Status :\");\n\t\tlabel_6.setBounds(290, 198, 45, 15);\n\n\t\tcomboCarNameSell = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarNameSell.setItems(new String[] {});\n\t\tcomboCarNameSell.setBounds(355, 65, 123, 23);\n\t\tcomboCarNameSell.setText(\"--select--\");\n\n\t}", "protected void createContents() {\n\t\tsetText(\"Termination\");\n\t\tsetSize(340, 101);\n\n\t}", "private JFrame buildWindow() {\n frame = WindowFactory.mainFrame()\n .title(\"VISNode\")\n .menu(VISNode.get().getActions().buildMenuBar())\n .size(1024, 768)\n .maximized()\n .interceptClose(() -> {\n new UserPreferencesPersistor().persist(model.getUserPreferences());\n int result = JOptionPane.showConfirmDialog(panel, Messages.get().singleMessage(\"app.closing\"), null, JOptionPane.YES_NO_OPTION);\n return result == JOptionPane.YES_OPTION;\n })\n .create((container) -> {\n panel = new MainPanel(model);\n container.add(panel);\n });\n return frame;\n }", "public static void render()\n {\n JWindow win = new JWindow(); //NOTE is this focusable?\n //sets the layout to add things from top to bottom\n win.getContentPane().setLayout(new BoxLayout(win.getContentPane(), BoxLayout.Y_AXIS));\n win.getContentPane().add(new JScrollPane(aboutApp.editorPane())); //adds HTML text\n JButton close = new JButton(\"Close\"); //creates the close button\n win.getContentPane().add(close);\n close.addActionListener(new ActionListener() //listens for close\n {\n public void actionPerformed(ActionEvent e) //when button is clicked\n {\n win.dispose(); //close window\n }\n });\n win.setSize(new Dimension(500, 500));\n win.setFocusableWindowState(true); //allowa the window to be focused on\n win.setVisible(true); //makes window visible\n }", "protected void createContents() {\n\n\t}", "protected void createContents() throws UnknownHostException, IOException, InterruptedException {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tshlUser = new Shell();\r\n\t\tshlUser.setSize(450, 464);\r\n\t\tshlUser.setText(\"QQ聊天室\\r\\n\");\r\n\t\t\r\n\t\ttext = new Text(shlUser, SWT.BORDER);\r\n\t\ttext.setEnabled(false);\r\n\t\ttext.setBounds(0, 52, 424, 187);\r\n\t\t\r\n\t\t\r\n\t\ttext_1 = new Text(shlUser, SWT.BORDER);\t\t\r\n\t\ttext_1.setBounds(23, 263, 274, 23);\r\n\t\t\r\n\t\tButton button = new Button(shlUser, SWT.CENTER);\r\n\t\tbutton.setText(\"发送\");\r\n\t\tbutton.setBounds(321, 257, 80, 27);\r\n\t\t\r\n\t\ttext_2 = new Text(shlUser, SWT.BORDER);\r\n\t\ttext_2.setText(\"abc\");\r\n\t\ttext_2.setBounds(61, 7, 91, 23);\r\n\t\t\r\n\t\tLabel lblNewLabel = new Label(shlUser, SWT.NONE);\r\n\t\tlblNewLabel.setBounds(0, 10, 51, 17);\r\n\t\tlblNewLabel.setText(\"昵称:\");\r\n\t\t\r\n\t\tButton btnNewButton = new Button(shlUser, SWT.NONE);\r\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tnew Thread() {\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\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t// 连接服务器\r\n\t\t\t\t\t\t\t\tsocket = new Socket(\"127.0.0.1\", 8888);\r\n\t\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\t\t// 如果连不上服务器,说明服务器未启动,则启动服务器\r\n\t\t\t\t\t\t\t\tserver = new ServerSocket(8888);\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"服务器启动完成,监听端口:8888\");\r\n\t\t\t\t\t\t\t\tsocket = server.accept();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t * 注意:所有在自定义线程中修改图形控件属性,\r\n\t\t\t\t\t\t\t * 都必须使用 shell.getDisplay().asyncExec() 方法\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tshlUser.getDisplay().asyncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tMessageBox mb = new MessageBox(shlUser,SWT.OK);\r\n\t\t\t\t\t\t\t\t\tmb.setText(\"系统提示\");\r\n\t\t\t\t\t\t\t\t\tmb.setMessage(\"连接成功!现在你可以开始聊天了!\");\r\n\t\t\t\t\t\t\t\t\tmb.open();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\ttalker = new Talker(socket, new MsgListener() {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void onMessage(String msg) {\r\n\t\t\t\t\t\t\t\t\t// 收到消息时,将消息更新到多行文本框\r\n\t\t\t\t\t\t\t\t\tshlUser.getDisplay().asyncExec(new Runnable() {\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\ttext.setText(text.getText() + msg + \"\\r\\n\");\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}\r\n\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void onConnect(InetAddress addr) {\r\n\t\t\t\t\t\t\t\t\t// 连接成功时,显示对方IP\r\n\t\t\t\t\t\t\t\t\tshlUser.getDisplay().asyncExec(new Runnable() {\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\tlblNewLabel.setText(\"好友IP:\" + addr.getHostAddress());\r\n\t\t\t\t\t\t\t\t\t\t\ttext.setEnabled(true);\r\n\t\t\t\t\t\t\t\t\t\t\tbutton.setEnabled(true);\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}\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} catch (IOException e) {\r\n\t\t\t\t\t\t\tthrow new RuntimeException(e);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}.start();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\ttMsg = new Text(shlUser, SWT.BORDER);\r\n\t\ttMsg.setEnabled(false);\r\n\t\ttMsg.setBounds(10, 364, 414, 26);\r\n\r\n\t\t\r\n\t\tbtnNewButton.setBounds(324, 7, 80, 27);\r\n\t\tbtnNewButton.setText(\"连接服务器\");\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (tMsg.getText().trim().isEmpty() == false) {\r\n\t\t\t\t\t\tString msg = talker.send(text_2.getText(), tMsg.getText());\r\n\t\t\t\t\t\ttext.setText(text.getText() + msg + \"\\r\\n\");\r\n\t\t\t\t\t\ttMsg.setText(\"\");\r\n\t\t\t\t\t\t// 设置焦点\r\n\t\t\t\t\t\ttMsg.setFocus();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t}", "private void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tshell.setSize(500, 400);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\tshell.setLayout(new FormLayout());\r\n\t\t\r\n\t\tSERVER_COUNTRY locale = SERVER_COUNTRY.DE;\r\n\t\tString username = JOptionPane.showInputDialog(\"Username\");\r\n\t\tString password = JOptionPane.showInputDialog(\"Password\");\r\n\t\tBot bot = new Bot(username, password, locale);\r\n\t\t\r\n\t\tGroup grpActions = new Group(shell, SWT.NONE);\r\n\t\tgrpActions.setText(\"Actions\");\r\n\t\tgrpActions.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tgrpActions.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\r\n\t\tgrpActions.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tgrpActions.setLayout(new GridLayout(5, false));\r\n\t\tFormData fd_grpActions = new FormData();\r\n\t\tfd_grpActions.left = new FormAttachment(0, 203);\r\n\t\tfd_grpActions.right = new FormAttachment(100, -10);\r\n\t\tfd_grpActions.top = new FormAttachment(0, 10);\r\n\t\tfd_grpActions.bottom = new FormAttachment(0, 152);\r\n\t\tgrpActions.setLayoutData(fd_grpActions);\r\n\t\t\r\n\t\tConsole = new Text(shell, SWT.BORDER | SWT.READ_ONLY | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tFormData fd_Console = new FormData();\r\n\t\tfd_Console.left = new FormAttachment(grpActions, 0, SWT.LEFT);\r\n\t\tfd_Console.right = new FormAttachment(100, -10);\r\n\t\tConsole.setLayoutData(fd_Console);\r\n\r\n\t\t\r\n\t\tButton Feed = new Button(grpActions, SWT.CHECK);\r\n\t\tFeed.setSelection(true);\r\n\t\tFeed.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tfeed = !feed;\r\n\t\t\t\tConsole.append(\"\\nTest\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tFeed.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tFeed.setText(\"Feed\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Drink = new Button(grpActions, SWT.CHECK);\r\n\t\tDrink.setSelection(true);\r\n\t\tDrink.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tdrink = !drink;\r\n\t\t\t}\r\n\t\t});\r\n\t\tDrink.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tDrink.setText(\"Drink\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Stroke = new Button(grpActions, SWT.CHECK);\r\n\t\tStroke.setSelection(true);\r\n\t\tStroke.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tstroke = !stroke;\r\n\t\t\t}\r\n\t\t});\r\n\t\tStroke.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tStroke.setText(\"Stroke\");\r\n\t\t\r\n\t\t\r\n\t\t//STATIC\r\n\t\tLabel lblNewLabel_0 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_0.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tlblNewLabel_0.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/feed.png\"));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_1 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/drink.png\"));\r\n\t\tlblNewLabel_1.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\t\r\n\t\tGroup grpBreeds = new Group(shell, SWT.NONE);\r\n\t\tgrpBreeds.setText(\"Breeds\");\r\n\t\tgrpBreeds.setLayout(new GridLayout(1, false));\r\n\t\t\r\n\t\tFormData fd_grpBreeds = new FormData();\r\n\t\tfd_grpBreeds.top = new FormAttachment(0, 10);\r\n\t\tfd_grpBreeds.bottom = new FormAttachment(100, -10);\r\n\t\tfd_grpBreeds.right = new FormAttachment(0, 180);\r\n\t\tfd_grpBreeds.left = new FormAttachment(0, 10);\r\n\t\tgrpBreeds.setLayoutData(fd_grpBreeds);\r\n\t\t\r\n\t\tButton Defaults = new Button(grpBreeds, SWT.RADIO);\r\n\t\tDefaults.setText(\"Defaults\");\r\n\t\t//END STATIC\r\n\t\t\r\n\t\tbot.account.api.requests.setTimeout(200);\r\n\t\tbot.logger.printlevel = 1;\t\r\n\t\t\r\n\t\tReturn<HashMap<Integer,Breed>> b = bot.getBreeds();\t\t\r\n\t\tif(!b.sucess) {\r\n\t\t\tConsole.append(\"\\nERROR!\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\tIterator<Breed> iterator = b.data.values().iterator();\r\n\t\tHashMap<String, java.awt.Button> buttons = new HashMap<String, Button>();\r\n\t\t\r\n\t\twhile(iterator.hasNext()) {\r\n\t\t\tBreed breed = iterator.next();\r\n\t\t\t\r\n\t\t\tString name = breed.name;\r\n\t\t\t\r\n\t\t\tButton btn = new Button(grpBreeds, SWT.RADIO);\r\n\t\t\tbtn.setText(name);\r\n\t\t\t\r\n\t\t\tbuttons.put(name, btn);\r\n\t\t\t\r\n\t\t\t//\tTODO - Für jeden Breed wird ein Button erstellt:\r\n\t\t\t//\tButton [HIER DER BREED NAME] = new Button(grpBreeds, SWT.RADIO); <-- Dass geht nicht so wirklich so\r\n\t\t\t//\tDefaults.setText(\"[BREED NAME]\");\r\n\t\t}\r\n\t\t\r\n\t\t// um ein button mit name <name> zu bekommen: Button whatever = buttons.get(<name>);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tButton btnStartBot = new Button(shell, SWT.NONE);\r\n\t\tfd_Console.top = new FormAttachment(0, 221);\r\n\t\tbtnStartBot.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tConsole.setText(\"Starting bot... \");\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t/*TODO\r\n\t\t\t\tBreed[] breeds = new Breed[b.data.size()];\r\n\t\t\t\t\r\n\t\t\t\tIterator<Breed> br = b.data.values().iterator();\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < b.data.size(); i++) {\r\n\t\t\t\t\tbreeds[i] = br.next();\r\n\t\t\t\t};\r\n\t\t\t\tBreed s = (Breed) JOptionPane.showInputDialog(null, \"Choose breed\", \"breed selector\", JOptionPane.PLAIN_MESSAGE, null, breeds, \"default\");\r\n\t\t\t\tEND TODO*/\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Breed breed, boolean drink, boolean stroke, boolean groom, boolean carrot, boolean mash, boolean suckle, boolean feed, boolean sleep, boolean centreMission, long timeout, Bot bot, Runnable onEnd\r\n\t\t\t\tReturn<BasicBreedTasksAsync> ret = bot.basicBreedTasks(0, drink, stroke, groom, carrot, mash, suckle, feed, sleep, mission, 500, new Runnable() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"FINISHED!\", \"Bot\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tbot.logout();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tif(!ret.sucess) {\r\n\t\t\t\t\tConsole.append(\"ERROR\");\r\n\t\t\t\t\tSystem.exit(-1);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tret.data.start();\r\n\t\t\t\t\r\n\t\t\t\t//TODO\r\n\t\t\t\twhile(ret.data.running()) {\r\n\t\t\t\t\tSleeper.sleep(5000);\r\n\t\t\t\t\tif(ret.data.getProgress() == 1)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tConsole.append(\"progress: \" + (ret.data.getProgress() * 100) + \"%\");\r\n\t\t\t\t\tConsole.append(\"ETA: \" + (ret.data.getEta() / 1000) + \"sec.\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tFormData fd_btnStartBot = new FormData();\r\n\t\tfd_btnStartBot.left = new FormAttachment(grpActions, 0, SWT.LEFT);\r\n\t\tbtnStartBot.setLayoutData(fd_btnStartBot);\r\n\t\tbtnStartBot.setText(\"Start Bot\");\r\n\t\t\r\n\t\tButton btnStopBot = new Button(shell, SWT.NONE);\r\n\t\tfd_btnStartBot.top = new FormAttachment(btnStopBot, 0, SWT.TOP);\r\n\t\tbtnStopBot.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tConsole.append(\"Stopping bot...\");\r\n\t\t\t\tbot.logout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tFormData fd_btnStopBot = new FormData();\r\n\t\tfd_btnStopBot.right = new FormAttachment(grpActions, 0, SWT.RIGHT);\r\n\t\tbtnStopBot.setLayoutData(fd_btnStopBot);\r\n\t\tbtnStopBot.setText(\"Stop Bot\");\r\n\t\t\t\r\n\t\t\r\n\t\tProgressBar progressBar = new ProgressBar(shell, SWT.NONE);\r\n\t\tfd_Console.bottom = new FormAttachment(progressBar, -6);\r\n\t\tfd_btnStopBot.bottom = new FormAttachment(progressBar, -119);\r\n\t\t\r\n\t\tFormData fd_progressBar = new FormData();\r\n\t\tfd_progressBar.left = new FormAttachment(grpBreeds, 23);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//STATIC\r\n\t\tLabel lblNewLabel_2 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_2.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/stroke.png\"));\r\n\t\tlblNewLabel_2.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\t\r\n\t\tButton Groom = new Button(grpActions, SWT.CHECK);\r\n\t\tGroom.setSelection(true);\r\n\t\tGroom.setSelection(true);\r\n\t\tGroom.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tgroom = !groom;\r\n\t\t\t}\r\n\t\t});\r\n\t\tGroom.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tGroom.setText(\"Groom\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Treat = new Button(grpActions, SWT.CHECK);\r\n\t\tTreat.setSelection(true);\r\n\t\tTreat.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tcarrot = !carrot;\r\n\t\t\t}\r\n\t\t});\r\n\t\tTreat.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tTreat.setText(\"Treat\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Mash = new Button(grpActions, SWT.CHECK);\r\n\t\tMash.setSelection(true);\r\n\t\tMash.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tmash = !mash;\r\n\t\t\t}\r\n\t\t});\r\n\t\tMash.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tMash.setText(\"Mash\");\r\n\t\t\r\n\t\tLabel lblNewLabel_3 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_3.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/groom.png\"));\r\n\t\tlblNewLabel_3.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_4 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_4.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/carotte.png\"));\r\n\t\tlblNewLabel_4.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_5 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_5.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/mash.png\"));\r\n\t\tlblNewLabel_5.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\t\r\n\t\tButton btnSleep = new Button(grpActions, SWT.CHECK);\r\n\t\tbtnSleep.setSelection(true);\r\n\t\tbtnSleep.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tsleep = !sleep;\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSleep.setText(\"Sleep\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton btnMission = new Button(grpActions, SWT.CHECK);\r\n\t\tbtnMission.setSelection(true);\r\n\t\tbtnMission.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tmission = !mission;\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnMission.setText(\"Mission\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\r\n\t}", "public void createUI() {\r\n\t\ttry {\r\n\t\t\tJPanel centerPanel = this.createCenterPane();\r\n\t\t\tJPanel westPanel = this.createWestPanel();\r\n\t\t\tm_XONContentPane.add(westPanel, BorderLayout.WEST);\r\n\t\t\tm_XONContentPane.add(centerPanel, BorderLayout.CENTER);\r\n\t\t\tm_XONContentPane.revalidate();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tRGPTLogger.logToFile(\"Exception at createUI \", ex);\r\n\t\t}\r\n\t}", "private void createContents() {\n\t\tshell = new Shell(getParent(), SWT.SHELL_TRIM | SWT.BORDER | SWT.PRIMARY_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/list-2x.png\"));\n\t\tshell.setSize(610, 340);\n\t\tshell.setText(\"Thuoc List View\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\tshell.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif(e.keyCode==SWT.ESC){\n\t\t\t\t\tobjThuoc = null;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n \n Composite compositeInShellThuoc = new Composite(shell, SWT.NONE);\n\t\tcompositeInShellThuoc.setLayout(new BorderLayout(0, 0));\n\t\tcompositeInShellThuoc.setLayoutData(BorderLayout.CENTER);\n \n\t\tComposite compositeHeaderThuoc = new Composite(compositeInShellThuoc, SWT.NONE);\n\t\tcompositeHeaderThuoc.setLayoutData(BorderLayout.NORTH);\n\t\tcompositeHeaderThuoc.setLayout(new GridLayout(5, false));\n\n\t\ttextSearchThuoc = new Text(compositeHeaderThuoc, SWT.BORDER);\n\t\ttextSearchThuoc.setFont(SWTResourceManager.getFont(\"Tahoma\", 10, SWT.NORMAL));\n\t\ttextSearchThuoc.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif(e.keyCode==13){\n\t\t\t\t\treloadTableThuoc();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnNewButtonSearchThuoc = new Button(compositeHeaderThuoc, SWT.NONE);\n\t\tbtnNewButtonSearchThuoc.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/media-play-2x.png\"));\n\t\tbtnNewButtonSearchThuoc.setFont(SWTResourceManager.getFont(\"Tahoma\", 10, SWT.NORMAL));\n\n\t\tbtnNewButtonSearchThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\treloadTableThuoc();\n\t\t\t}\n\t\t});\n\t\tButton btnNewButtonExportExcelThuoc = new Button(compositeHeaderThuoc, SWT.NONE);\n\t\tbtnNewButtonExportExcelThuoc.setText(\"Export Excel\");\n\t\tbtnNewButtonExportExcelThuoc.setImage(SWTResourceManager.getImage(KhamBenhListDlg.class, \"/png/spreadsheet-2x.png\"));\n\t\tbtnNewButtonExportExcelThuoc.setFont(SWTResourceManager.getFont(\"Tahoma\", 10, SWT.NORMAL));\n\t\tbtnNewButtonExportExcelThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\texportExcelTableThuoc();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tGridData gd_btnNewButtonThuoc = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnNewButtonThuoc.widthHint = 87;\n\t\tbtnNewButtonSearchThuoc.setLayoutData(gd_btnNewButtonThuoc);\n\t\tbtnNewButtonSearchThuoc.setText(\"Search\");\n \n\t\ttableViewerThuoc = new TableViewer(compositeInShellThuoc, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttableThuoc = tableViewerThuoc.getTable();\n\t\ttableThuoc.setFont(SWTResourceManager.getFont(\"Tahoma\", 10, SWT.NORMAL));\n\t\ttableThuoc.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif(e.keyCode==SWT.F5){\n\t\t\t\t\treloadTableThuoc();\n }\n if(e.keyCode==SWT.F4){\n\t\t\t\t\teditTableThuoc();\n }\n\t\t\t\telse if(e.keyCode==13){\n\t\t\t\t\tselectTableThuoc();\n\t\t\t\t}\n else if(e.keyCode==SWT.DEL){\n\t\t\t\t\tdeleteTableThuoc();\n\t\t\t\t}\n else if(e.keyCode==SWT.F7){\n\t\t\t\t\tnewItemThuoc();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n tableThuoc.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\tselectTableThuoc();\n\t\t\t}\n\t\t});\n \n\t\ttableThuoc.setLinesVisible(true);\n\t\ttableThuoc.setHeaderVisible(true);\n\t\ttableThuoc.setLayoutData(BorderLayout.CENTER);\n\n\t\tTableColumn tbTableColumnThuocMA_HOAT_CHAT = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_HOAT_CHAT.setWidth(100);\n\t\ttbTableColumnThuocMA_HOAT_CHAT.setText(\"MA_HOAT_CHAT\");\n\n\t\tTableColumn tbTableColumnThuocMA_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_AX.setWidth(100);\n\t\ttbTableColumnThuocMA_AX.setText(\"MA_AX\");\n\n\t\tTableColumn tbTableColumnThuocHOAT_CHAT = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocHOAT_CHAT.setWidth(100);\n\t\ttbTableColumnThuocHOAT_CHAT.setText(\"HOAT_CHAT\");\n\n\t\tTableColumn tbTableColumnThuocHOATCHAT_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocHOATCHAT_AX.setWidth(100);\n\t\ttbTableColumnThuocHOATCHAT_AX.setText(\"HOATCHAT_AX\");\n\n\t\tTableColumn tbTableColumnThuocMA_DUONG_DUNG = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_DUONG_DUNG.setWidth(100);\n\t\ttbTableColumnThuocMA_DUONG_DUNG.setText(\"MA_DUONG_DUNG\");\n\n\t\tTableColumn tbTableColumnThuocMA_DUONGDUNG_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_DUONGDUNG_AX.setWidth(100);\n\t\ttbTableColumnThuocMA_DUONGDUNG_AX.setText(\"MA_DUONGDUNG_AX\");\n\n\t\tTableColumn tbTableColumnThuocDUONG_DUNG = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocDUONG_DUNG.setWidth(100);\n\t\ttbTableColumnThuocDUONG_DUNG.setText(\"DUONG_DUNG\");\n\n\t\tTableColumn tbTableColumnThuocDUONGDUNG_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocDUONGDUNG_AX.setWidth(100);\n\t\ttbTableColumnThuocDUONGDUNG_AX.setText(\"DUONGDUNG_AX\");\n\n\t\tTableColumn tbTableColumnThuocHAM_LUONG = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocHAM_LUONG.setWidth(100);\n\t\ttbTableColumnThuocHAM_LUONG.setText(\"HAM_LUONG\");\n\n\t\tTableColumn tbTableColumnThuocHAMLUONG_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocHAMLUONG_AX.setWidth(100);\n\t\ttbTableColumnThuocHAMLUONG_AX.setText(\"HAMLUONG_AX\");\n\n\t\tTableColumn tbTableColumnThuocTEN_THUOC = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocTEN_THUOC.setWidth(100);\n\t\ttbTableColumnThuocTEN_THUOC.setText(\"TEN_THUOC\");\n\n\t\tTableColumn tbTableColumnThuocTENTHUOC_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocTENTHUOC_AX.setWidth(100);\n\t\ttbTableColumnThuocTENTHUOC_AX.setText(\"TENTHUOC_AX\");\n\n\t\tTableColumn tbTableColumnThuocSO_DANG_KY = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocSO_DANG_KY.setWidth(100);\n\t\ttbTableColumnThuocSO_DANG_KY.setText(\"SO_DANG_KY\");\n\n\t\tTableColumn tbTableColumnThuocSODANGKY_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocSODANGKY_AX.setWidth(100);\n\t\ttbTableColumnThuocSODANGKY_AX.setText(\"SODANGKY_AX\");\n\n\t\tTableColumn tbTableColumnThuocDONG_GOI = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocDONG_GOI.setWidth(100);\n\t\ttbTableColumnThuocDONG_GOI.setText(\"DONG_GOI\");\n\n\t\tTableColumn tbTableColumnThuocDON_VI_TINH = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocDON_VI_TINH.setWidth(100);\n\t\ttbTableColumnThuocDON_VI_TINH.setText(\"DON_VI_TINH\");\n\n\n\t\tTableColumn tbTableColumnThuocDON_GIA = new TableColumn(tableThuoc, SWT.NONE);\n\t\ttbTableColumnThuocDON_GIA.setWidth(100);\n\t\ttbTableColumnThuocDON_GIA.setText(\"DON_GIA\");\n\n\n\t\tTableColumn tbTableColumnThuocDON_GIA_TT = new TableColumn(tableThuoc, SWT.NONE);\n\t\ttbTableColumnThuocDON_GIA_TT.setWidth(100);\n\t\ttbTableColumnThuocDON_GIA_TT.setText(\"DON_GIA_TT\");\n\n\t\tTableColumn tbTableColumnThuocSO_LUONG = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocSO_LUONG.setWidth(100);\n\t\ttbTableColumnThuocSO_LUONG.setText(\"SO_LUONG\");\n\n\t\tTableColumn tbTableColumnThuocMA_CSKCB = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_CSKCB.setWidth(100);\n\t\ttbTableColumnThuocMA_CSKCB.setText(\"MA_CSKCB\");\n\n\t\tTableColumn tbTableColumnThuocHANG_SX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocHANG_SX.setWidth(100);\n\t\ttbTableColumnThuocHANG_SX.setText(\"HANG_SX\");\n\n\t\tTableColumn tbTableColumnThuocNUOC_SX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocNUOC_SX.setWidth(100);\n\t\ttbTableColumnThuocNUOC_SX.setText(\"NUOC_SX\");\n\n\t\tTableColumn tbTableColumnThuocNHA_THAU = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocNHA_THAU.setWidth(100);\n\t\ttbTableColumnThuocNHA_THAU.setText(\"NHA_THAU\");\n\n\t\tTableColumn tbTableColumnThuocQUYET_DINH = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocQUYET_DINH.setWidth(100);\n\t\ttbTableColumnThuocQUYET_DINH.setText(\"QUYET_DINH\");\n\n\t\tTableColumn tbTableColumnThuocCONG_BO = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocCONG_BO.setWidth(100);\n\t\ttbTableColumnThuocCONG_BO.setText(\"CONG_BO\");\n\n\t\tTableColumn tbTableColumnThuocMA_THUOC_BV = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_THUOC_BV.setWidth(100);\n\t\ttbTableColumnThuocMA_THUOC_BV.setText(\"MA_THUOC_BV\");\n\n\t\tTableColumn tbTableColumnThuocLOAI_THUOC = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocLOAI_THUOC.setWidth(100);\n\t\ttbTableColumnThuocLOAI_THUOC.setText(\"LOAI_THUOC\");\n\n\t\tTableColumn tbTableColumnThuocLOAI_THAU = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocLOAI_THAU.setWidth(100);\n\t\ttbTableColumnThuocLOAI_THAU.setText(\"LOAI_THAU\");\n\n\t\tTableColumn tbTableColumnThuocNHOM_THAU = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocNHOM_THAU.setWidth(100);\n\t\ttbTableColumnThuocNHOM_THAU.setText(\"NHOM_THAU\");\n\n\t\tTableColumn tbTableColumnThuocMANHOM_9324 = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocMANHOM_9324.setWidth(100);\n\t\ttbTableColumnThuocMANHOM_9324.setText(\"MANHOM_9324\");\n\n\t\tTableColumn tbTableColumnThuocHIEULUC = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocHIEULUC.setWidth(100);\n\t\ttbTableColumnThuocHIEULUC.setText(\"HIEULUC\");\n\n\t\tTableColumn tbTableColumnThuocKETQUA = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocKETQUA.setWidth(100);\n\t\ttbTableColumnThuocKETQUA.setText(\"KETQUA\");\n\n\t\tTableColumn tbTableColumnThuocTYP = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocTYP.setWidth(100);\n\t\ttbTableColumnThuocTYP.setText(\"TYP\");\n\n\t\tTableColumn tbTableColumnThuocTHUOC_RANK = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocTHUOC_RANK.setWidth(100);\n\t\ttbTableColumnThuocTHUOC_RANK.setText(\"THUOC_RANK\");\n\n Menu menuThuoc = new Menu(tableThuoc);\n\t\ttableThuoc.setMenu(menuThuoc);\n\t\t\n\t\tMenuItem mntmNewItemThuoc = new MenuItem(menuThuoc, SWT.NONE);\n\t\tmntmNewItemThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tnewItemThuoc();\n\t\t\t}\n\t\t});\n\t\tmntmNewItemThuoc.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/arrow-circle-top-2x.png\"));\n\t\tmntmNewItemThuoc.setText(\"New\");\n\t\t\n\t\tMenuItem mntmEditItemThuoc = new MenuItem(menuThuoc, SWT.NONE);\n\t\tmntmEditItemThuoc.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/wrench-2x.png\"));\n\t\tmntmEditItemThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\teditTableThuoc();\n\t\t\t}\n\t\t});\n\t\tmntmEditItemThuoc.setText(\"Edit\");\n\t\t\n\t\tMenuItem mntmDeleteThuoc = new MenuItem(menuThuoc, SWT.NONE);\n\t\tmntmDeleteThuoc.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/circle-x-2x.png\"));\n\t\tmntmDeleteThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdeleteTableThuoc();\n\t\t\t}\n\t\t});\n\t\tmntmDeleteThuoc.setText(\"Delete\");\n\t\t\n\t\tMenuItem mntmExportThuoc = new MenuItem(menuThuoc, SWT.NONE);\n\t\tmntmExportThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\texportExcelTableThuoc();\n\t\t\t}\n\t\t});\n\t\tmntmExportThuoc.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/spreadsheet-2x.png\"));\n\t\tmntmExportThuoc.setText(\"Export Excel\");\n\t\t\n\t\ttableViewerThuoc.setLabelProvider(new TableLabelProviderThuoc());\n\t\ttableViewerThuoc.setContentProvider(new ContentProviderThuoc());\n\t\ttableViewerThuoc.setInput(listDataThuoc);\n //\n //\n\t\tloadDataThuoc();\n\t\t//\n reloadTableThuoc();\n\t}", "public void createWindow(int x, int y, int width, int height, int bgColor, String title, int n) {\r\n\t\tWindow winnie = new Window(x, y, width, height, bgColor, title);\r\n\t\twinnie.type = n;\r\n\t\twindows.add(winnie);\r\n\t}", "protected void createContents(Display display) {\n\t\tshell = new Shell(display, SWT.CLOSE | SWT.TITLE | SWT.MIN);\n\t\tshell.setSize(539, 648);\n\t\tshell.setText(\"SiSi - Security-aware Event Log Generator\");\n\t\tshell.setImage(new Image(shell.getDisplay(), \"imgs/shell.png\"));\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmNewSubmenu = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu.setText(\"File\");\n\t\t\n\t\tMenu menu_1 = new Menu(mntmNewSubmenu);\n\t\tmntmNewSubmenu.setMenu(menu_1);\n\t\t\n\t\tMenuItem mntmOpenFile = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmOpenFile.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tFileDialog dialog = new FileDialog(shell, SWT.OPEN);\n\n\t\t\t\tString[] filterNames = new String[] { \"PNML\", \"All Files (*)\" };\n\t\t\t\tString[] filterExtensions = new String[] { \"*.pnml\", \"*\" };\n\t\t\t\tdialog.setFilterPath(System.getProperty(\"user.dir\"));\n\n\t\t\t\tdialog.setFilterNames(filterNames);\n\t\t\t\tdialog.setFilterExtensions(filterExtensions);\n\n\t\t\t\tString path = dialog.open();\n\t\t\t\tif( path != null ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tgenerateConfigCompositeFor(path);\n\t\t\t\t\t} catch (ParserConfigurationException | SAXException | IOException exception) {\n\t\t\t\t\t\terrorMessageBox(\"Could not load File.\", exception);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmntmOpenFile.setImage(new Image(shell.getDisplay(), \"imgs/open.png\"));\n\t\tmntmOpenFile.setText(\"Open File...\");\n\t\t\n\t\tMenuItem mntmOpenExample = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmOpenExample.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tgenerateConfigCompositeFor(\"examples/kbv.pnml\");\n\t\t\t\t\t} catch (ParserConfigurationException | SAXException | IOException exception) {\n\t\t\t\t\t\terrorMessageBox(\"Could not load Example.\", exception);\n\t\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmntmOpenExample.setImage(new Image(shell.getDisplay(), \"imgs/example.png\"));\n\t\tmntmOpenExample.setText(\"Open Example\");\n\t\t\n\t\tMenuItem mntmNewItem = new MenuItem(menu_1, SWT.SEPARATOR);\n\t\tmntmNewItem.setText(\"Separator1\");\n\t\t\n\t\tMenuItem mntmExit = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmExit.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.getDisplay().dispose();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t\tmntmExit.setImage(new Image(shell.getDisplay(), \"imgs/exit.png\"));\n\t\tmntmExit.setText(\"Exit\");\n\t\t\n\t\tmainComposite = new ScrolledComposite(shell, SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tmainComposite.setExpandHorizontal(true);\n\t\tmainComposite.setExpandVertical(true);\n\t\t\n\t\tactiveComposite = new Composite(mainComposite, SWT.NONE);\n\t\tGridLayout gl_activeComposite = new GridLayout(1, true);\n\t\tgl_activeComposite.marginWidth = 10;\n\t\tgl_activeComposite.marginHeight = 10;\n\t\tactiveComposite.setLayout(gl_activeComposite);\n\t\t\n\t\tLabel lblWelcomeToSisi = new Label(activeComposite, SWT.NONE);\n\t\tlblWelcomeToSisi.setFont(SWTResourceManager.getFont(\"Segoe UI\", 30, SWT.BOLD));\n\t\tGridData gd_lblWelcomeToSisi = new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1);\n\t\tgd_lblWelcomeToSisi.verticalIndent = 50;\n\t\tlblWelcomeToSisi.setLayoutData(gd_lblWelcomeToSisi);\n\t\tlblWelcomeToSisi.setText(\"Welcome to SiSi!\");\n\t\t\n\t\tLabel lblSecurityawareEvent = new Label(activeComposite, SWT.NONE);\n\t\tlblSecurityawareEvent.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));\n\t\tlblSecurityawareEvent.setText(\"- A security-aware Event Log Generator -\");\n\t\t\n\t\tLabel lblToGetStarted = new Label(activeComposite, SWT.NONE);\n\t\tlblToGetStarted.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.ITALIC));\n\t\tGridData gd_lblToGetStarted = new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1);\n\t\tgd_lblToGetStarted.verticalIndent = 150;\n\t\tlblToGetStarted.setLayoutData(gd_lblToGetStarted);\n\t\tlblToGetStarted.setText(\"To get started load a file or an example\");\n\t\t\n\t\tmainComposite.setContent(activeComposite);\n\t\tmainComposite.setMinSize(activeComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));\n\t}", "protected void createContents() {\n\t\tshlFaststone = new Shell();\n\t\tshlFaststone.setImage(SWTResourceManager.getImage(Edit.class, \"/image/all1.png\"));\n\t\tshlFaststone.setToolTipText(\"\");\n\t\tshlFaststone.setSize(944, 479);\n\t\tshlFaststone.setText(\"kaca\");\n\t\tshlFaststone.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tComposite composite = new Composite(shlFaststone, SWT.NONE);\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm = new SashForm(composite, SWT.VERTICAL);\n\t\t//\n\t\tMenu menu = new Menu(shlFaststone, SWT.BAR);\n\t\tshlFaststone.setMenuBar(menu);\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setSelection(true);\n\t\tmenuItem.setText(\"\\u6587\\u4EF6\");\n\t\t\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\t\t\n\t\tfinal Canvas down=new Canvas(shlFaststone,SWT.NONE|SWT.BORDER|SWT.DOUBLE_BUFFERED);\n\t\t\n\t\tComposite composite_4 = new Composite(sashForm, SWT.BORDER);\n\t\tcomposite_4.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_3 = new SashForm(composite_4, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_3);\n\t\tformToolkit.paintBordersFor(sashForm_3);\n\t\t\n\t\tToolBar toolBar = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.WRAP | SWT.RIGHT);\n\t\ttoolBar.setToolTipText(\"\");\n\t\t\n\t\tToolItem toolItem_6 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_6.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_2.notifyListeners(SWT.Selection,event1);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6253\\u5F00.jpg\"));\n\t\ttoolItem_6.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tToolItem tltmNewItem = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t\n\t\ttltmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttltmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\ttltmNewItem.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t//关闭\n\t\tToolItem tltmNewItem_4 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\ttltmNewItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttltmNewItem_4.setText(\"\\u5173\\u95ED\");\n\t\t\n\t\t\n\t\t\n\t\tToolItem tltmNewItem_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t//缩放\n\t\t\n\t\t\n\t\ttltmNewItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u653E\\u5927.jpg\"));\n\t\t\n\t\t//工具栏:放大\n\t\t\n\t\ttltmNewItem_1.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tToolItem tltmNewItem_2 = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t//工具栏:缩小\n\t\ttltmNewItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t\n\t\ttltmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F29\\u5C0F.jpg\"));\n\t\ttltmNewItem_2.setText(\"\\u7F29\\u5C0F\");\n\t\tToolItem toolItem_5 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttoolItem_5.setText(\"\\u9000\\u51FA\");\n\t\t\n\t\tToolBar toolBar_1 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\tformToolkit.adapt(toolBar_1);\n\t\tformToolkit.paintBordersFor(toolBar_1);\n\t\t\n\t\tToolItem toolItem_7 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:标题\n\t\ttoolItem_7.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_7.setText(\"\\u6807\\u9898\");\n\t\ttoolItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6807\\u9898.jpg\"));\n\t\t\n\t\tToolItem toolItem_1 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:调整大小\n\t\ttoolItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_1.setText(\"\\u8C03\\u6574\\u5927\\u5C0F\");\n\t\ttoolItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u8C03\\u6574\\u5927\\u5C0F.jpg\"));\n\t\t\n\t\tToolBar toolBar_2 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar_2.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));\n\t\tformToolkit.adapt(toolBar_2);\n\t\tformToolkit.paintBordersFor(toolBar_2);\n\t\t\n\t\tToolItem toolItem_2 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:裁剪\n\t\ttoolItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_2.setText(\"\\u88C1\\u526A\");\n\t\ttoolItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u88C1\\u526A.jpg\"));\n\t\t\n\t\tToolItem toolItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:剪切\n\t\ttoolItem_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_3.setText(\"\\u526A\\u5207\");\n\t\ttoolItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u526A\\u5207.jpg\"));\n\t\t\n\t\tToolItem toolItem_4 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\n\t\t//工具栏:粘贴\n\t\ttoolItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tcomposite_3.layout();\n\t\t\t\tFile f=new File(\"src/picture/beauty.jpg\");\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tButton lblNewLabel_3 = null;\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tcomposite_3.layout();\n\t\t\t}\n\t\t});\n\t\t//omposite;\n\t\t//\n\t\t\n\t\ttoolItem_4.setText(\"\\u590D\\u5236\");\n\t\ttoolItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u590D\\u5236.jpg\"));\n\t\t\n\t\tToolItem tltmNewItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\ttltmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\ttltmNewItem_3.setText(\"\\u7C98\\u8D34\");\n\t\tsashForm_3.setWeights(new int[] {486, 165, 267});\n\t\t\n\t\tComposite composite_1 = new Composite(sashForm, SWT.NONE);\n\t\tformToolkit.adapt(composite_1);\n\t\tformToolkit.paintBordersFor(composite_1);\n\t\tcomposite_1.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_1 = new SashForm(composite_1, SWT.VERTICAL);\n\t\tformToolkit.adapt(sashForm_1);\n\t\tformToolkit.paintBordersFor(sashForm_1);\n\t\t\n\t\tComposite composite_2 = new Composite(sashForm_1, SWT.NONE);\n\t\tformToolkit.adapt(composite_2);\n\t\tformToolkit.paintBordersFor(composite_2);\n\t\tcomposite_2.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tTabFolder tabFolder = new TabFolder(composite_2, SWT.NONE);\n\t\ttabFolder.setTouchEnabled(true);\n\t\tformToolkit.adapt(tabFolder);\n\t\tformToolkit.paintBordersFor(tabFolder);\n\t\t\n\t\tTabItem tbtmNewItem = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem.setText(\"\\u65B0\\u5EFA\\u4E00\");\n\t\t\n\t\tTabItem tbtmNewItem_1 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_1.setText(\"\\u65B0\\u5EFA\\u4E8C\");\n\t\t\n\t\tTabItem tbtmNewItem_2 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_2.setText(\"\\u65B0\\u5EFA\\u4E09\");\n\t\t\n\t\tButton button = new Button(tabFolder, SWT.CHECK);\n\t\tbutton.setText(\"Check Button\");\n\t\t\n\t\tcomposite_3 = new Composite(sashForm_1, SWT.H_SCROLL | SWT.V_SCROLL);\n\t\t\n\t\tformToolkit.adapt(composite_3);\n\t\tformToolkit.paintBordersFor(composite_3);\n\t\tcomposite_3.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tLabel lblNewLabel_3 = new Label(composite_3, SWT.NONE);\n\t\tformToolkit.adapt(lblNewLabel_3, true, true);\n\t\tlblNewLabel_3.setText(\"\");\n\t\tsashForm_1.setWeights(new int[] {19, 323});\n\t\t\n\t\tComposite composite_5 = new Composite(sashForm, SWT.NONE);\n\t\tcomposite_5.setToolTipText(\"\");\n\t\tcomposite_5.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_2 = new SashForm(composite_5, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_2);\n\t\tformToolkit.paintBordersFor(sashForm_2);\n\t\t\n\t\tLabel lblNewLabel = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel, true, true);\n\t\tlblNewLabel.setText(\"1/1\");\n\t\t\n\t\tLabel lblNewLabel_2 = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_2, true, true);\n\t\tlblNewLabel_2.setText(\"\\u5927\\u5C0F\\uFF1A1366*728\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(sashForm_2, SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_1, true, true);\n\t\tlblNewLabel_1.setText(\"\\u7F29\\u653E\\uFF1A100%\");\n\t\t\n\t\tLabel label = new Label(sashForm_2, SWT.NONE);\n\t\tlabel.setAlignment(SWT.RIGHT);\n\t\tformToolkit.adapt(label, true, true);\n\t\tlabel.setText(\"\\u5494\\u5693\\u5DE5\\u4F5C\\u5BA4\\u7248\\u6743\\u6240\\u6709\");\n\t\tsashForm_2.setWeights(new int[] {127, 141, 161, 490});\n\t\tsashForm.setWeights(new int[] {50, 346, 22});\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMenuItem mntmNewItem = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u65B0\\u5EFA.jpg\"));\n\t\tmntmNewItem.setText(\"\\u65B0\\u5EFA\");\n\t\t\n\t\tmntmNewItem_2 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\t//Label lblNewLabel_3 = new Label(composite_1, SWT.NONE);\n\t\t\t\t//Canvas c=new Canvas(shlFaststone,SWT.BALLOON);\n\t\t\t\t\n\t\t\t\tFileDialog dialog = new FileDialog(shlFaststone,SWT.OPEN); \n\t\t\t\tdialog.setFilterPath(System.getProperty(\"user_home\"));//设置初始路径\n\t\t\t\tdialog.setFilterNames(new String[] {\"文本文档(*txt)\",\"所有文档\"}); \n\t\t\t\tdialog.setFilterExtensions(new String[]{\"*.exe\",\"*.xls\",\"*.*\"});\n\t\t\t\tString path=dialog.open();\n\t\t\t\tString s=null;\n\t\t\t\tFile f=null;\n\t\t\t\tif(path==null||\"\".equals(path)) {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\ttry{\n\t\t\t f=new File(path);\n\t\t\t\tbyte[] bs=Fileutil.readFile(f);\n\t\t\t s=new String(bs,\"UTF-8\");\n\t\t\t\t}catch (Exception e1) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tMessageDialog.openError(shlFaststone, \"出错了\", \"打开\"+path+\"出错了\");\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t \n\t\t\t\ttext = new Text(composite_4, SWT.BORDER | SWT.WRAP\n\t\t\t\t\t\t| SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL\n\t\t\t\t\t\t| SWT.MULTI);\n\t\t\t\ttext.setText(s);\n\t\t\t\tcomposite_1.layout();\n\t\t\t\tshlFaststone.setText(shlFaststone.getText()+\"\\t\"+f.getName());\n\t\t\t\t\t\n\t\t\t\tFile f1=new File(path);\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f1));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u6253\\u5F00.jpg\"));\n\t\tmntmNewItem_2.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem mntmNewItem_1 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_1.setText(\"\\u4ECE\\u526A\\u8D34\\u677F\\u5BFC\\u5165\");\n\t\t\n\t\tMenuItem mntmNewItem_3 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\tmntmNewItem_3.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t\n\t\t mntmNewItem_5 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t boolean result=MessageDialog.openConfirm(shlFaststone,\"退出\",\"是否确认退出\");\n\t\t\t\t if(result) {\n\t\t\t\t\t System.exit(0);\n\t\t\t\t }\n\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u4FDD\\u5B58.jpg\"));\n\t\tmntmNewItem_5.setText(\"\\u5173\\u95ED\");\n\t\tevent2=new Event();\n\t\tevent2.widget=mntmNewItem_5;\n\n\t\t\n\t\tMenuItem mntmNewSubmenu = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu.setText(\"\\u6355\\u6349\");\n\t\t\n\t\tMenu menu_2 = new Menu(mntmNewSubmenu);\n\t\tmntmNewSubmenu.setMenu(menu_2);\n\t\t\n\t\tMenuItem mntmNewItem_6 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_6.setText(\"\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_7 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6355\\u6349\\u7A97\\u53E3\\u6216\\u5BF9\\u8C61.jpg\"));\n\t\tmntmNewItem_7.setText(\"\\u6355\\u6349\\u7A97\\u53E3\\u5BF9\\u8C61\");\n\t\t\n\t\tMenuItem mntmNewItem_8 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_8.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.jpg\"));\n\t\tmntmNewItem_8.setText(\"\\u6355\\u6349\\u77E9\\u5F62\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_9 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_9.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u624B\\u7ED8\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_9.setText(\"\\u6355\\u6349\\u624B\\u7ED8\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_10 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_10.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6574\\u4E2A\\u5C4F\\u5E55.jpg\"));\n\t\tmntmNewItem_10.setText(\"\\u6355\\u6349\\u6574\\u4E2A\\u5C4F\\u5E55\");\n\t\t\n\t\tMenuItem mntmNewItem_11 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_11.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_11.setText(\"\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_12 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_12.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_12.setText(\"\\u6355\\u6349\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem menuItem_1 = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349.jpg\"));\n\t\tmenuItem_1.setText(\"\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349\");\n\t\t\n\t\tMenuItem menuItem_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_2.setText(\"\\u7F16\\u8F91\");\n\t\t\n\t\tMenu menu_3 = new Menu(menuItem_2);\n\t\tmenuItem_2.setMenu(menu_3);\n\t\t\n\t\tMenuItem mntmNewItem_14 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_14.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_14.setText(\"\\u64A4\\u9500\");\n\t\t\n\t\tMenuItem mntmNewItem_13 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_13.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_13.setText(\"\\u91CD\\u505A\");\n\t\t\n\t\tMenuItem mntmNewItem_15 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_15.setText(\"\\u9009\\u62E9\\u5168\\u90E8\");\n\t\t\n\t\tMenuItem mntmNewItem_16 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_16.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7F16\\u8F91.\\u88C1\\u526A.jpg\"));\n\t\tmntmNewItem_16.setText(\"\\u88C1\\u526A\");\n\t\t\n\t\tMenuItem mntmNewItem_17 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_17.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u526A\\u5207.jpg\"));\n\t\tmntmNewItem_17.setText(\"\\u526A\\u5207\");\n\t\t\n\t\tMenuItem mntmNewItem_18 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_18.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u590D\\u5236.jpg\"));\n\t\tmntmNewItem_18.setText(\"\\u590D\\u5236\");\n\t\t\n\t\tMenuItem menuItem_4 = new MenuItem(menu_3, SWT.NONE);\n\t\tmenuItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\tmenuItem_4.setText(\"\\u7C98\\u8D34\");\n\t\t\n\t\tMenuItem mntmNewItem_19 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_19.setText(\"\\u5220\\u9664\");\n\t\t\n\t\tMenuItem menuItem_3 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_3.setText(\"\\u7279\\u6548\");\n\t\t\n\t\tMenu menu_4 = new Menu(menuItem_3);\n\t\tmenuItem_3.setMenu(menu_4);\n\t\t\n\t\tMenuItem mntmNewItem_20 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_20.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6C34\\u5370.jpg\"));\n\t\tmntmNewItem_20.setText(\"\\u6C34\\u5370\");\n\t\t\n\t\tPanelPic ppn = new PanelPic();\n\t\tMenuItem mntmNewItem_21 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_21.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tflag[0]=true;\n\t\t\t\tflag[1]=false;\n\n\t\t\t}\n\n\t\t});\n\t\t\n\t\tdown.addMouseListener(new MouseAdapter(){\n\t\t\tpublic void mouseDown(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=true;\n\t\t\t\tpt=new Point(e.x,e.y);\n\t\t\t\tif(flag[1])\n\t\t\t\t{\n\t\t\t\t\trect=new Composite(down,SWT.BORDER);\n\t\t\t\t\trect.setLocation(e.x, e.y);\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic void mouseUp(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=false;\n\t\t\t\tif(flag[1]&&dirty)\n\t\t\t\t{\n\t\t\t\t\trexx[n-1]=rect.getBounds();\n\t\t\t\t\trect.dispose();\n\t\t\t\t\tdown.redraw();\n\t\t\t\t\tdirty=false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tdown.addMouseMoveListener(new MouseMoveListener(){\n\t\t\t@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n if(mouseDown)\n {\n \t dirty=true;\n\t\t\t\tif(flag[0])\n\t\t\t {\n \t GC gc=new GC(down);\n gc.drawLine(pt.x, pt.y, e.x, e.y);\n list.add(new int[]{pt.x,pt.y,e.x,e.y});\n pt.x=e.x;pt.y=e.y;\n\t\t\t }\n else if(flag[1])\n {\n \t if(rect!=null)\n \t rect.setSize(rect.getSize().x+e.x-pt.x, rect.getSize().y+e.y-pt.y);\n// \t down.redraw();\n \t pt.x=e.x;pt.y=e.y;\n }\n }\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tdown.addPaintListener(new PaintListener(){\n\t\t\t@Override\n\t\t\tpublic void paintControl(PaintEvent e) {\n\t\t\t\tfor(int i=0;i<list.size();i++)\n\t\t\t\t{\n\t\t\t\t\tint a[]=list.get(i);\n\t\t\t\t\te.gc.drawLine(a[0], a[1], a[2], a[3]);\n\t\t\t\t}\n\t\t\t\tfor(int i=0;i<n;i++)\n\t\t\t\t{\n\t\t\t\t\tif(rexx[i]!=null)\n\t\t\t\t\t\te.gc.drawRectangle(rexx[i]);\n\t\t\t\t}\n\t\t\t}});\n\n\t\t\n\t\tmntmNewItem_21.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6587\\u5B57.jpg\"));\n\t\tmntmNewItem_21.setText(\"\\u753B\\u7B14\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_1 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_1.setText(\"\\u67E5\\u770B\");\n\t\t\n\t\tMenu menu_5 = new Menu(mntmNewSubmenu_1);\n\t\tmntmNewSubmenu_1.setMenu(menu_5);\n\t\t\n\t\tMenuItem mntmNewItem_24 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_24.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u653E\\u5927.jpg\"));\n\t\tmntmNewItem_24.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tMenuItem mntmNewItem_25 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_25.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u7F29\\u5C0F.jpg\"));\n\t\tmntmNewItem_25.setText(\"\\u7F29\\u5C0F\");\n\t\t\n\t\tMenuItem mntmNewItem_26 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_26.setText(\"\\u5B9E\\u9645\\u5C3A\\u5BF8\\uFF08100%\\uFF09\");\n\t\t\n\t\tMenuItem mntmNewItem_27 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_27.setText(\"\\u9002\\u5408\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_28 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_28.setText(\"100%\");\n\t\t\n\t\tMenuItem mntmNewItem_29 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_29.setText(\"200%\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_2.setText(\"\\u8BBE\\u7F6E\");\n\t\t\n\t\tMenu menu_6 = new Menu(mntmNewSubmenu_2);\n\t\tmntmNewSubmenu_2.setMenu(menu_6);\n\t\t\n\t\tMenuItem menuItem_5 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_5.setText(\"\\u5E2E\\u52A9\");\n\t\t\n\t\tMenu menu_7 = new Menu(menuItem_5);\n\t\tmenuItem_5.setMenu(menu_7);\n\t\t\n\t\tMenuItem menuItem_6 = new MenuItem(menu_7, SWT.NONE);\n\t\tmenuItem_6.setText(\"\\u7248\\u672C\");\n\t\t\n\t\tMenuItem mntmNewItem_23 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_23.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\t\n\t\tMenuItem mntmNewItem_30 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_30.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\n\t}", "private void createContents() {\r\n\t\tshlAjouterNouvelleEquation = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);\r\n\t\tshlAjouterNouvelleEquation.setSize(363, 334);\r\n\t\tif(modification)\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Modifier Equation\");\r\n\t\telse\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Ajouter Nouvelle Equation\");\r\n\t\tshlAjouterNouvelleEquation.setLayout(new FormLayout());\r\n\r\n\r\n\t\tLabel lblContenuEquation = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblContenuEquation = new FormData();\r\n\t\tfd_lblContenuEquation.top = new FormAttachment(0, 5);\r\n\t\tfd_lblContenuEquation.left = new FormAttachment(0, 5);\r\n\t\tlblContenuEquation.setLayoutData(fd_lblContenuEquation);\r\n\t\tlblContenuEquation.setText(\"Contenu Equation\");\r\n\r\n\r\n\t\tcontrainteButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnContrainte = new FormData();\r\n\t\tfd_btnContrainte.top = new FormAttachment(0, 27);\r\n\t\tfd_btnContrainte.right = new FormAttachment(100, -10);\r\n\t\tcontrainteButton.setLayoutData(fd_btnContrainte);\r\n\t\tcontrainteButton.setText(\"Contrainte\");\r\n\r\n\t\torientationButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnOrinet = new FormData();\r\n\t\tfd_btnOrinet.top = new FormAttachment(0, 27);\r\n\t\tfd_btnOrinet.right = new FormAttachment(contrainteButton, -10);\r\n\r\n\t\torientationButton.setLayoutData(fd_btnOrinet);\r\n\t\t\r\n\t\torientationButton.setText(\"Orient\\u00E9\");\r\n\r\n\t\tcontenuEquation = new Text(shlAjouterNouvelleEquation, SWT.BORDER|SWT.SINGLE);\r\n\t\tFormData fd_text = new FormData();\r\n\t\tfd_text.right = new FormAttachment(orientationButton, -10, SWT.LEFT);\r\n\t\tfd_text.top = new FormAttachment(0, 25);\r\n\t\tfd_text.left = new FormAttachment(0, 5);\r\n\t\tcontenuEquation.setLayoutData(fd_text);\r\n\r\n\t\tcontenuEquation.addListener(SWT.FocusOut, out->{\r\n\t\t\tSystem.out.println(\"Making list...\");\r\n\t\t\ttry {\r\n\t\t\t\tequation.getListeDeParametresEqn_DYNAMIC();\r\n\t\t\t\tif(!btnTerminer.isDisposed()){\r\n\t\t\t\t\tif(!btnTerminer.getEnabled())\r\n\t\t\t\t\t\t btnTerminer.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\tthis.showError(shlAjouterNouvelleEquation, e1.toString());\r\n\t\t\t\t btnTerminer.setEnabled(false);\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\t\r\n\t\t});\r\n\r\n\t\tLabel lblNewLabel = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblNewLabel = new FormData();\r\n\t\tfd_lblNewLabel.top = new FormAttachment(0, 51);\r\n\t\tfd_lblNewLabel.left = new FormAttachment(0, 5);\r\n\t\tlblNewLabel.setLayoutData(fd_lblNewLabel);\r\n\t\tlblNewLabel.setText(\"Param\\u00E8tre de Sortie\");\r\n\r\n\t\tparametreDeSortieCombo = new Combo(shlAjouterNouvelleEquation, SWT.DROP_DOWN |SWT.READ_ONLY);\r\n\t\tparametreDeSortieCombo.setEnabled(false);\r\n\r\n\t\tFormData fd_combo = new FormData();\r\n\t\tfd_combo.top = new FormAttachment(0, 71);\r\n\t\tfd_combo.left = new FormAttachment(0, 5);\r\n\t\tparametreDeSortieCombo.setLayoutData(fd_combo);\r\n\t\tparametreDeSortieCombo.addListener(SWT.FocusIn, in->{\r\n\t\t\tparametreDeSortieCombo.setItems(makeItems.apply(equation.getListeDeParametresEqn()));\r\n\t\t\tparametreDeSortieCombo.pack();\r\n\t\t\tparametreDeSortieCombo.update();\r\n\t\t});\r\n\r\n\t\tSashForm sashForm = new SashForm(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_sashForm = new FormData();\r\n\t\tfd_sashForm.top = new FormAttachment(parametreDeSortieCombo, 6);\r\n\t\tfd_sashForm.bottom = new FormAttachment(100, -50);\r\n\t\tfd_sashForm.right = new FormAttachment(100);\r\n\t\tfd_sashForm.left = new FormAttachment(0, 5);\r\n\t\tsashForm.setLayoutData(fd_sashForm);\r\n\r\n\r\n\r\n\r\n\t\tGroup propertiesGroup = new Group(sashForm, SWT.NONE);\r\n\t\tpropertiesGroup.setLayout(new FormLayout());\r\n\r\n\t\tpropertiesGroup.setText(\"Propri\\u00E9t\\u00E9s\");\r\n\t\tFormData fd_propertiesGroup = new FormData();\r\n\t\tfd_propertiesGroup.top = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.left = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.bottom = new FormAttachment(100, 0);\r\n\t\tfd_propertiesGroup.right = new FormAttachment(100, 0);\r\n\t\tpropertiesGroup.setLayoutData(fd_propertiesGroup);\r\n\r\n\r\n\r\n\r\n\r\n\t\tproperties = new Text(propertiesGroup, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);\r\n\t\tFormData fd_grouptext = new FormData();\r\n\t\tfd_grouptext.top = new FormAttachment(0,0);\r\n\t\tfd_grouptext.left = new FormAttachment(0, 0);\r\n\t\tfd_grouptext.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grouptext.right = new FormAttachment(100, 0);\r\n\t\tproperties.setLayoutData(fd_grouptext);\r\n\r\n\r\n\r\n\t\tGroup grpDescription = new Group(sashForm, SWT.NONE);\r\n\t\tgrpDescription.setText(\"Description\");\r\n\t\tgrpDescription.setLayout(new FormLayout());\r\n\t\tFormData fd_grpDescription = new FormData();\r\n\t\tfd_grpDescription.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grpDescription.right = new FormAttachment(100,0);\r\n\t\tfd_grpDescription.top = new FormAttachment(0);\r\n\t\tfd_grpDescription.left = new FormAttachment(0);\r\n\t\tgrpDescription.setLayoutData(fd_grpDescription);\r\n\r\n\t\tdescription = new Text(grpDescription, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tdescription.setParent(grpDescription);\r\n\r\n\t\tFormData fd_description = new FormData();\r\n\t\tfd_description.top = new FormAttachment(0,0);\r\n\t\tfd_description.left = new FormAttachment(0, 0);\r\n\t\tfd_description.bottom = new FormAttachment(100, 0);\r\n\t\tfd_description.right = new FormAttachment(100, 0);\r\n\r\n\t\tdescription.setLayoutData(fd_description);\r\n\r\n\r\n\t\tsashForm.setWeights(new int[] {50,50});\r\n\r\n\t\tbtnTerminer = new Button(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tbtnTerminer.setEnabled(false);\r\n\t\tFormData fd_btnTerminer = new FormData();\r\n\t\tfd_btnTerminer.top = new FormAttachment(sashForm, 6);\r\n\t\tfd_btnTerminer.left = new FormAttachment(sashForm,0, SWT.CENTER);\r\n\t\tbtnTerminer.setLayoutData(fd_btnTerminer);\r\n\t\tbtnTerminer.setText(\"Terminer\");\r\n\t\tbtnTerminer.addListener(SWT.Selection, e->{\r\n\t\t\t\r\n\t\t\tboolean go = true;\r\n\t\t\tresult = null;\r\n\t\t\tif (status.equals(ValidationStatus.ok())) {\r\n\t\t\t\t//perform all the neccessary tests before validating the equation\t\t\t\t\t\r\n\t\t\t\tif(equation.isOriented()){\r\n\t\t\t\t\tif(!equation.getListeDeParametresEqn().contains(equation.getParametreDeSortie()) || equation.getParametreDeSortie() == null){\t\t\t\t\t\t\r\n\t\t\t\t\t\tString error = \"Erreur sur l'équation \"+equation.getContenuEqn();\r\n\t\t\t\t\t\tgo = false;\r\n\t\t\t\t\t\tshowError(shlAjouterNouvelleEquation, error);\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (go) {\r\n\t\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation.setParametreDeSortie(null);\r\n\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t//Just some cleanup\r\n\t\t\t\t\tfor (Parametre par : equation.getListeDeParametresEqn()) {\r\n\t\t\t\t\t\tif (par.getTypeP().equals(TypeParametre.OUTPUT)) {\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tpar.setTypeP(TypeParametre.UNDETERMINED);\r\n\t\t\t\t\t\t\t\tpar.setSousTypeP(SousTypeParametre.FREE);\r\n\t\t\t\t\t\t\t} catch (Exception e1) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\te1.printStackTrace();\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\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t//\tSystem.out.println(equation.getContenuEqn() +\"\\n\"+equation.isConstraint()+\"\\n\"+equation.isOriented()+\"\\n\"+equation.getParametreDeSortie());\r\n\t\t});\r\n\r\n\t\t//In this sub routine I bind the values to the respective controls in order to observe changes \r\n\t\t//and verify the data insertion\r\n\t\tbindValues();\r\n\t}", "public abstract void createContents(Panel mainPanel);", "protected void createContents() {\n\t\t\n\t\tshlMailview = new Shell();\n\t\tshlMailview.addShellListener(new ShellAdapter() {\n\t\t\t@Override\n\t\t\tpublic void shellClosed(ShellEvent e) {\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\t\tshlMailview.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));\n\t\tshlMailview.setSize(1124, 800);\n\t\tshlMailview.setText(\"MailView\");\n\t\tshlMailview.setLayout(new BorderLayout(0, 0));\t\t\n\t\t\n\t\tMenu menu = new Menu(shlMailview, SWT.BAR);\n\t\tshlMailview.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmNewSubmenu = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu.setText(\"\\u0413\\u043B\\u0430\\u0432\\u043D\\u0430\\u044F\");\n\t\t\n\t\tMenu mainMenu = new Menu(mntmNewSubmenu);\n\t\tmntmNewSubmenu.setMenu(mainMenu);\n\t\t\n\t\tMenuItem menuItem = new MenuItem(mainMenu, SWT.NONE);\n\t\tmenuItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmyThready.stop();// interrupt();\n\t\t\t\tmyThready = new Thread(timer);\n\t\t\t\tmyThready.setDaemon(true);\n\t\t\t\tmyThready.start();\n\t\t\t}\n\t\t});\n\t\tmenuItem.setText(\"\\u041E\\u0431\\u043D\\u043E\\u0432\\u0438\\u0442\\u044C\");\n\t\t\n\t\tMenuItem exitMenu = new MenuItem(mainMenu, SWT.NONE);\n\t\texitMenu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\t\t\t\t\n\t\t\t\tshlMailview.close();\n\t\t\t}\n\t\t});\n\t\texitMenu.setText(\"\\u0412\\u044B\\u0445\\u043E\\u0434\");\n\t\t\n\t\tMenuItem filtrMenu = new MenuItem(menu, SWT.NONE);\n\t\tfiltrMenu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tfilterDialog fd = new filterDialog(shlMailview, 0);\n\t\t\t\tfd.open();\n\t\t\t}\n\t\t});\n\t\tfiltrMenu.setText(\"\\u0424\\u0438\\u043B\\u044C\\u0442\\u0440\");\n\t\t\n\t\tMenuItem settingsMenu = new MenuItem(menu, SWT.NONE);\n\t\tsettingsMenu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tsettingDialog sd = new settingDialog(shlMailview, 0);\n\t\t\t\tsd.open();\n\t\t\t}\n\t\t});\n\t\tsettingsMenu.setText(\"\\u041D\\u0430\\u0441\\u0442\\u0440\\u043E\\u0439\\u043A\\u0438\");\n\t\t\n\t\tfinal TabFolder tabFolder = new TabFolder(shlMailview, SWT.NONE);\n\t\ttabFolder.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif(tabFolder.getSelectionIndex() == 1)\n\t\t\t\t{\n\t\t\t\t\tservice.RepaintAccount(accountsTable);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttabFolder.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));\n\t\t\n\t\tTabItem lettersTab = new TabItem(tabFolder, SWT.NONE);\n\t\tlettersTab.setText(\"\\u041F\\u0438\\u0441\\u044C\\u043C\\u0430\");\n\t\t\n\t\tComposite composite_2 = new Composite(tabFolder, SWT.NONE);\n\t\tlettersTab.setControl(composite_2);\n\t\tcomposite_2.setLayout(new FormLayout());\n\t\t\n\t\tComposite composite_4 = new Composite(composite_2, SWT.NONE);\n\t\tFormData fd_composite_4 = new FormData();\n\t\tfd_composite_4.bottom = new FormAttachment(0, 81);\n\t\tfd_composite_4.top = new FormAttachment(0);\n\t\tfd_composite_4.left = new FormAttachment(0);\n\t\tfd_composite_4.right = new FormAttachment(0, 1100);\n\t\tcomposite_4.setLayoutData(fd_composite_4);\n\t\t\n\t\tComposite composite_5 = new Composite(composite_2, SWT.NONE);\n\t\tcomposite_5.setLayout(new BorderLayout(0, 0));\n\t\tFormData fd_composite_5 = new FormData();\n\t\tfd_composite_5.bottom = new FormAttachment(composite_4, 281, SWT.BOTTOM);\n\t\tfd_composite_5.left = new FormAttachment(composite_4, 0, SWT.LEFT);\n\t\tfd_composite_5.right = new FormAttachment(composite_4, 0, SWT.RIGHT);\n\t\tfd_composite_5.top = new FormAttachment(composite_4, 6);\n\t\tcomposite_5.setLayoutData(fd_composite_5);\n\t\t\n\t\tComposite composite_10 = new Composite(composite_2, SWT.NONE);\n\t\tFormData fd_composite_10 = new FormData();\n\t\tfd_composite_10.top = new FormAttachment(composite_5, 6);\n\t\tfd_composite_10.bottom = new FormAttachment(100, -10);\n\t\t\n\t\tlettersTable = new Table(composite_5, SWT.BORDER | SWT.FULL_SELECTION);\n\t\tlettersTable.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif(lettersTable.getItems().length>0)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\tTableItem item = lettersTable.getSelection()[0];\n\t\t\t\t\titem.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.NONE));\n\t\t\t\t\tbox.Preview(Integer.parseInt(item.getText(0)));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tlettersTable.setLinesVisible(true);\n\t\tlettersTable.setHeaderVisible(true);\n\t\tTableColumn msgId = new TableColumn(lettersTable, SWT.NONE);\n\t\tmsgId.setResizable(false);\n\t\tmsgId.setText(\"ID\");\n\t\t\n\t\tTableColumn from = new TableColumn(lettersTable, SWT.NONE);\n\t\tfrom.setWidth(105);\n\t\tfrom.setText(\"\\u041E\\u0442\");\n\t\tfrom.addListener(SWT.Selection, SortListenerFactory.getListener(SortListenerFactory.STRING_COMPARATOR));\n\t\t\n\t\tTableColumn to = new TableColumn(lettersTable, SWT.NONE);\n\t\tto.setWidth(111);\n\t\tto.setText(\"\\u041A\\u043E\\u043C\\u0443\");\n\t\tto.addListener(SWT.Selection, SortListenerFactory.getListener(SortListenerFactory.STRING_COMPARATOR));\n\t\t\n\t\tTableColumn subject = new TableColumn(lettersTable, SWT.NONE);\n\t\tsubject.setWidth(406);\n\t\tsubject.setText(\"\\u0422\\u0435\\u043C\\u0430\");\n\t\tsubject.addListener(SWT.Selection, SortListenerFactory.getListener(SortListenerFactory.STRING_COMPARATOR));\n\t\t\n\t\tTableColumn created = new TableColumn(lettersTable, SWT.NONE);\n\t\tcreated.setWidth(176);\n\t\tcreated.setText(\"\\u0421\\u043E\\u0437\\u0434\\u0430\\u043D\\u043E\");\n\t\tcreated.addListener(SWT.Selection, SortListenerFactory.getListener(SortListenerFactory.DATE_COMPARATOR));\n\t\t\n\t\tTableColumn received = new TableColumn(lettersTable, SWT.NONE);\n\t\treceived.setWidth(194);\n\t\treceived.setText(\"\\u041F\\u043E\\u043B\\u0443\\u0447\\u0435\\u043D\\u043E\");\n\t\treceived.addListener(SWT.Selection, SortListenerFactory.getListener(SortListenerFactory.DATE_COMPARATOR));\t\t\n\t\t\n\t\tMenu popupMenuLetter = new Menu(lettersTable);\n\t\tlettersTable.setMenu(popupMenuLetter);\n\t\t\n\t\tMenuItem miUpdate = new MenuItem(popupMenuLetter, SWT.NONE);\n\t\tmiUpdate.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmyThready.stop();// interrupt();\n\t\t\t\tmyThready = new Thread(timer);\n\t\t\t\tmyThready.setDaemon(true);\n\t\t\t\tmyThready.start();\n\t\t\t}\n\t\t});\n\t\tmiUpdate.setText(\"\\u041E\\u0431\\u043D\\u043E\\u0432\\u0438\\u0442\\u044C\");\n\t\t\n\t\tfinal MenuItem miDelete = new MenuItem(popupMenuLetter, SWT.NONE);\n\t\tmiDelete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif(lettersTable.getItems().length>0)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tTableItem item = lettersTable.getSelection()[0];\n\t\t\t\t\tbox.deleteMessage(Integer.parseInt(item.getText(0)), lettersTable.getSelectionIndex());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmiDelete.setText(\"\\u0412 \\u043A\\u043E\\u0440\\u0437\\u0438\\u043D\\u0443\");\n\t\tfd_composite_10.right = new FormAttachment(composite_4, 0, SWT.RIGHT);\n\t\t\n\t\tfinal Button btnInbox = new Button(composite_4, SWT.NONE);\n\t\tfinal Button btnTrash = new Button(composite_4, SWT.NONE);\n\t\t\n\t\tbtnInbox.setBounds(10, 10, 146, 39);\n\t\tbtnInbox.setEnabled(false);\n\t\tbtnInbox.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSetting.Instance().SetTab(false);\t\t\t\t\n\t\t\t\tbtnInbox.setEnabled(false);\n\t\t\t\tmiDelete.setText(\"\\u0412 \\u043A\\u043E\\u0440\\u0437\\u0438\\u043D\\u0443\");\n\t\t\t\tbtnTrash.setEnabled(true);\n\t\t\t\tbox.rePaint();\n\t\t\t}\n\t\t});\n\t\tbtnInbox.setText(\"\\u0412\\u0445\\u043E\\u0434\\u044F\\u0449\\u0438\\u0435\");\n\t\tbtnTrash.setLocation(170, 10);\n\t\tbtnTrash.setSize(146, 39);\n\t\tbtnTrash.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSetting.Instance().SetTab(true);\n\t\t\t\tbtnInbox.setEnabled(true);\n\t\t\t\tmiDelete.setText(\"\\u0423\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C\");\n\t\t\t\tbtnTrash.setEnabled(false);\n\t\t\t\tbox.rePaint();\n\t\t\t}\n\t\t});\n\t\tbtnTrash.setText(\"\\u041A\\u043E\\u0440\\u0437\\u0438\\u043D\\u0430\");\n\t\t\n\t\tButton deleteLetter = new Button(composite_4, SWT.NONE);\n\t\tdeleteLetter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif(lettersTable.getItems().length>0)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tTableItem item = lettersTable.getSelection()[0];\n\t\t\t\t\tbox.deleteMessage(Integer.parseInt(item.getText(0)), lettersTable.getSelectionIndex());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tdeleteLetter.setLocation(327, 11);\n\t\tdeleteLetter.setSize(146, 37);\n\t\tdeleteLetter.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.BOLD));\n\t\tdeleteLetter.setText(\"\\u0423\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C\");\n\t\t\n\t\tLabel label = new Label(composite_4, SWT.NONE);\n\t\tlabel.setLocation(501, 17);\n\t\tlabel.setSize(74, 27);\n\t\tlabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tlabel.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\t\n\t\tCombo listAccounts = new Combo(composite_4, SWT.NONE);\n\t\tlistAccounts.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlistAccounts.setLocation(583, 19);\n\t\tlistAccounts.setSize(180, 23);\n\t\tlistAccounts.setItems(new String[] {\"\\u0412\\u0441\\u0435\"});\n\t\tlistAccounts.select(0);\n\t\t\n\t\tprogressBar = new ProgressBar(composite_4, SWT.NONE);\n\t\tprogressBar.setBounds(10, 64, 263, 17);\n\t\tfd_composite_10.left = new FormAttachment(0);\n\t\tcomposite_10.setLayoutData(fd_composite_10);\n\t\t\n\t\theaderMessage = new Text(composite_10, SWT.BORDER);\n\t\theaderMessage.setFont(SWTResourceManager.getFont(\"Segoe UI\", 14, SWT.NORMAL));\n\t\theaderMessage.setBounds(0, 0, 1100, 79);\n\t\t\n\t\tsc = new ScrolledComposite(composite_10, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tsc.setBounds(0, 85, 1100, 230);\n\t\tsc.setExpandHorizontal(true);\n\t\tsc.setExpandVertical(true);\t\t\n\t\t\n\t\tTabItem accountsTab = new TabItem(tabFolder, SWT.NONE);\n\t\taccountsTab.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u044B\");\n\t\t\n\t\tComposite accountComposite = new Composite(tabFolder, SWT.NONE);\n\t\taccountsTab.setControl(accountComposite);\n\t\taccountComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\n\t\t\n\t\t\tLabel labelListAccounts = new Label(accountComposite, SWT.NONE);\n\t\t\tlabelListAccounts.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\n\t\t\tlabelListAccounts.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\t\tlabelListAccounts.setBounds(10, 37, 148, 31);\n\t\t\tlabelListAccounts.setText(\"\\u0421\\u043F\\u0438\\u0441\\u043E\\u043A \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u043E\\u0432\");\n\t\t\t\n\t\t\tComposite Actions = new Composite(accountComposite, SWT.NONE);\n\t\t\tActions.setBounds(412, 71, 163, 234);\n\t\t\t\n\t\t\tButton addAccount = new Button(Actions, SWT.NONE);\n\t\t\taddAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tAccountDialog ad = new AccountDialog(shlMailview, accountsTable, true);\n\t\t\t\t\tad.open();\n\t\t\t\t}\n\t\t\t});\n\t\t\taddAccount.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\t\taddAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\t\taddAccount.setBounds(10, 68, 141, 47);\n\t\t\taddAccount.setText(\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C\");\n\t\t\t\n\t\t\tButton editAccount = new Button(Actions, SWT.NONE);\n\t\t\teditAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tif(accountsTable.getItems().length>0)\n\t\t\t\t\t{\n\t\t\t\t\tAccountDialog ad = new AccountDialog(shlMailview, accountsTable, false);\n\t\t\t\t\tad.open();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\teditAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\t\teditAccount.setBounds(10, 121, 141, 47);\n\t\t\teditAccount.setText(\"\\u0418\\u0437\\u043C\\u0435\\u043D\\u0438\\u0442\\u044C\");\n\t\t\t\n\t\t\tButton deleteAccount = new Button(Actions, SWT.NONE);\n\t\t\tdeleteAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tif(accountsTable.getItems().length>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tTableItem item = accountsTable.getSelection()[0];\n\t\t\t\t\t\tif(MessageDialog.openConfirm(shlMailview, \"Удаление\", \"Вы хотите удалить учетную запись \" + item.getText(1)+\"?\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tservice.DeleteAccount(item.getText(0));\n\t\t\t\t\t\t\tservice.RepaintAccount(accountsTable);\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\tdeleteAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\t\t\t\n\t\t\tdeleteAccount.setBounds(10, 174, 141, 47);\n\t\t\tdeleteAccount.setText(\"\\u0423\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C\");\n\t\t\t\n\t\t\tfinal Button Include = new Button(Actions, SWT.NONE);\n\t\t\tInclude.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tif(accountsTable.getItems().length>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tTableItem item = accountsTable.getSelection()[0];\n\t\t\t\t\t\tservice.toogleIncludeAccount(item.getText(0));\n\t\t\t\t\t\tservice.RepaintAccount(accountsTable);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tInclude.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\t\tInclude.setBounds(10, 10, 141, 47);\n\t\t\tInclude.setText(\"\\u0412\\u043A\\u043B\\u044E\\u0447\\u0438\\u0442\\u044C\");\n\n\t\t\taccountsTable = new Table(accountComposite, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION);\n\t\t\taccountsTable.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tif(accountsTable.getSelection()[0].getText(2)==\"Включен\")\n\t\t\t\t\t{\n\t\t\t\t\t\tInclude.setText(\"\\u0412\\u044B\\u043A\\u043B\\u044E\\u0447\\u0438\\u0442\\u044C\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tInclude.setText(\"\\u0412\\u043A\\u043B\\u044E\\u0447\\u0438\\u0442\\u044C\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\taccountsTable.setBounds(10, 74, 396, 296);\n\t\t\taccountsTable.setHeaderVisible(true);\n\t\t\taccountsTable.setLinesVisible(true);\n\t\t\t\n\t\t\tTableColumn tblclmnId = new TableColumn(accountsTable, SWT.NONE);\n\t\t\ttblclmnId.setWidth(35);\n\t\t\ttblclmnId.setText(\"ID\");\n\t\t\t//accountsTable.setRedraw(false);\n\t\t\t\n\t\t\tTableColumn columnLogin = new TableColumn(accountsTable, SWT.LEFT);\n\t\t\tcolumnLogin.setWidth(244);\n\t\t\tcolumnLogin.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\t\t\n\t\t\tTableColumn columnState = new TableColumn(accountsTable, SWT.LEFT);\n\t\t\tcolumnState.setWidth(100);\n\t\t\tcolumnState.setText(\"\\u0421\\u043E\\u0441\\u0442\\u043E\\u044F\\u043D\\u0438\\u0435\");\n\t}", "protected void createContents() {\n\t\tmainShell = new Shell();\n\t\tmainShell.addDisposeListener(new DisposeListener() {\n\t\t\tpublic void widgetDisposed(DisposeEvent arg0) {\n\t\t\t\tLastValueManager manager = LastValueManager.getInstance();\n\t\t\t\tmanager.setLastAppEngineDirectory(mGAELocation.getText());\n\t\t\t\tmanager.setLastProjectDirectory(mAppRootDir.getText());\n\t\t\t\tmanager.setLastPythonBinDirectory(txtPythonLocation.getText());\n\t\t\t\tmanager.save();\n\t\t\t}\n\t\t});\n\t\tmainShell.setSize(460, 397);\n\t\tmainShell.setText(\"Google App Engine Launcher\");\n\t\tmainShell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tComposite mainComposite = new Composite(mainShell, SWT.NONE);\n\t\tmainComposite.setLayout(new GridLayout(1, false));\n\t\t\n\t\tComposite northComposite = new Composite(mainComposite, SWT.NONE);\n\t\tnorthComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));\n\t\tGridLayout gl_northComposite = new GridLayout(1, false);\n\t\tgl_northComposite.verticalSpacing = 1;\n\t\tnorthComposite.setLayout(gl_northComposite);\n\t\t\n\t\tComposite pythonComposite = new Composite(northComposite, SWT.NONE);\n\t\tpythonComposite.setLayout(new GridLayout(2, false));\n\t\t\n\t\tLabel lblPython = new Label(pythonComposite, SWT.NONE);\n\t\tlblPython.setText(\"Python : \");\n\t\t\n\t\ttxtPythonLocation = new Text(pythonComposite, SWT.BORDER);\n\t\ttxtPythonLocation.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\ttxtPythonLocation.setText(\"/usr/bin/python2.7\");\n\t\t\n\t\tLabel lblGaeLocation = new Label(pythonComposite, SWT.NONE);\n\t\tlblGaeLocation.setText(\"GAE Location :\");\n\t\t\n\t\tmGAELocation = new Text(pythonComposite, SWT.BORDER);\n\t\tmGAELocation.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tmGAELocation.setText(\"/home/zelon/Programs/google_appengine\");\n\t\t\n\t\tLabel lblProject = new Label(pythonComposite, SWT.NONE);\n\t\tlblProject.setText(\"Project : \");\n\t\t\n\t\tmAppRootDir = new Text(pythonComposite, SWT.BORDER);\n\t\tmAppRootDir.setSize(322, 27);\n\t\tmAppRootDir.setText(\"/home/zelon/workspaceIndigo/box.wimy.com\");\n\t\t\n\t\tComposite ActionComposite = new Composite(northComposite, SWT.NONE);\n\t\tActionComposite.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\n\t\tActionComposite.setLayout(new GridLayout(2, true));\n\t\t\n\t\tButton btnTestServer = new Button(ActionComposite, SWT.NONE);\n\t\tGridData gd_btnTestServer = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnTestServer.widthHint = 100;\n\t\tbtnTestServer.setLayoutData(gd_btnTestServer);\n\t\tbtnTestServer.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmExecuter.startTestServer(getPythonLocation(), mGAELocation.getText(), mAppRootDir.getText(), 8080);\n\t\t\t}\n\t\t});\n\t\tbtnTestServer.setText(\"Test Server\");\n\t\t\n\t\tButton btnDeploy = new Button(ActionComposite, SWT.NONE);\n\t\tGridData gd_btnDeploy = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnDeploy.widthHint = 100;\n\t\tbtnDeploy.setLayoutData(gd_btnDeploy);\n\t\tbtnDeploy.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmExecuter.deploy(getPythonLocation(), mGAELocation.getText(), mAppRootDir.getText());\n\t\t\t}\n\t\t});\n\t\tbtnDeploy.setText(\"Deploy\");\n\t\tActionComposite.setTabList(new Control[]{btnTestServer, btnDeploy});\n\t\tnorthComposite.setTabList(new Control[]{ActionComposite, pythonComposite});\n\t\t\n\t\tComposite centerComposite = new Composite(mainComposite, SWT.NONE);\n\t\tGridData gd_centerComposite = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);\n\t\tgd_centerComposite.heightHint = 200;\n\t\tcenterComposite.setLayoutData(gd_centerComposite);\n\t\tcenterComposite.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tlog = new StyledText(centerComposite, SWT.BORDER | SWT.V_SCROLL);\n\t\tlog.setAlignment(SWT.CENTER);\n\t}", "public static void createAndShowStartWindow() {\n\n\t\t// Create and set up the window.\n\n\t\tstartMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t// panel will hold the buttons and text\n\t\tJPanel panel = new JPanel() {\n\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\t// Fills the panel with a red/black gradient\n\t\t\tprotected void paintComponent(Graphics grphcs) {\n\t\t\t\tGraphics2D g2d = (Graphics2D) grphcs;\n\t\t\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\n\t\t\t\tColor color1 = new Color(119, 29, 29);\n\t\t\t\tColor color2 = Color.BLACK;\n\t\t\t\tGradientPaint gp = new GradientPaint(0, 0, color1, 0, getHeight() - 100, color2);\n\t\t\t\tg2d.setPaint(gp);\n\t\t\t\tg2d.fillRect(0, 0, getWidth(), getHeight());\n\n\t\t\t\tsuper.paintComponent(grphcs);\n\t\t\t}\n\t\t};\n\n\t\tpanel.setOpaque(false);\n\n\t\tpanel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\n\n\t Font customFont = null;\n\t \n\n\t\ttry {\n\t\t customFont = Font.createFont(Font.TRUETYPE_FONT, ClassLoader.getSystemClassLoader().getResourceAsStream(\"data/AlegreyaSC-Medium.ttf\")).deriveFont(32f);\n\n\t\t GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n\t\t ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, ClassLoader.getSystemClassLoader().getResourceAsStream(\"data/AlegreyaSC-Medium.ttf\")));\n\t\t\n\n\t\t} catch (IOException|FontFormatException e) {\n\t\t //Handle exception\n\t\t}\n\t\t\n\n\t\t\n\t\t// Some info text at the top of the window\n\t\tJLabel welcome = new JLabel(\"<html><center><font color='white'> Welcome to <br> Ultimate Checkers! </font></html>\",\n\t\t\t\tSwingConstants.CENTER);\n\t\twelcome.setFont(customFont);\n\t\n\n\t\twelcome.setPreferredSize(new Dimension(200, 25));\n\t\twelcome.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n\n\t\t// \"Rigid Area\" is used to align everything\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 40)));\n\t\tpanel.add(welcome);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 50)));\n\t\t//panel.add(choose);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\n\t\t// The start Window will have four buttons\n\t\t// Button1 will open a new window with a standard checkers board\n\t\tJButton button1 = new JButton(\"New Game (Standard Setup)\");\n\n\t\tbutton1.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\tNewGameSettings.createAndShowGameSettings();\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\t\t// Setting up button1\n\t\tbutton1.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton1.setMaximumSize(new Dimension(250, 40));\n\n\t\t// Button2 will open a new window where a custom setup can be created\n\t\tJButton button2 = new JButton(\"New Game (Custom Setup)\");\n\t\tbutton2.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// Begin creating custom game board setup for checkers\n\t\t\t\t\t\tNewCustomWindow.createAndShowCustomGame();\n\t\t\t\t\t\t// Close the start menu window and remove it from memory\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\t// Setting up button2\n\t\tbutton2.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton2.setMaximumSize(new Dimension(250, 40));\n\n\t\t// Button3 is not implemented yet, it will be used to load a saved game\n\t\tJButton button3 = new JButton(\"Load A Saved Game\");\n\t\tbutton3.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton3.setMaximumSize(new Dimension(250, 40));\n\t\tbutton3.addActionListener(new ActionListener() {\n\n\t\t\tfinal JFrame popupWrongFormat = new PopupFrame(\n\t\t\t\t\t\"Wrong Format!\",\n\t\t\t\t\t\"<html><center>\"\n\t\t\t\t\t\t\t+ \"The save file is in the wrong format! <br><br>\"\n\t\t\t\t\t\t\t+ \"Please make sure the load file is in csv format with an 8x8 table, \"\n\t\t\t\t\t\t\t+ \"followed by whose turn it is, \"\n\t\t\t\t\t\t\t+ \"the white player type and the black player type.\"\n\t\t\t\t\t\t\t+ \"</center></html>\");\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// This will create the file chooser\n\t\t\t\t\t\tJFileChooser chooser = new JFileChooser();\n\n\t\t\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"CSV Files\", \"csv\");\n\t\t\t\t\t\tchooser.setFileFilter(filter);\n\n\t\t\t\t\t\tint returnVal = chooser.showOpenDialog(startMenu);\n\t\t\t\t\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\t\t\tFile file = chooser.getSelectedFile();\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcheckAndPlay(file);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tpopupWrongFormat.setVisible(true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Do nothing. Load cancelled by user.\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\t// Button4 closes the game\n\t\tJButton button4 = new JButton(\"Exit Ultimate Checkers\");\n\t\tbutton4.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// Close the start menu window and remove it from memory\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\t// Setting up button4\n\t\tbutton4.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton4.setMaximumSize(new Dimension(250, 40));\n\n\t\t// The four buttons are added to the panel and aligned\n\t\tpanel.add(button1);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tpanel.add(button2);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tpanel.add(button3);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 80)));\n\t\tpanel.add(button4);\n\n\t\t// Setting up the start Menu\n\t\tstartMenu.setSize(400, 600);\n\t\tstartMenu.setResizable(false);\n\n\t\t// Centers the window with respect to the user's screen resolution\n\t\tDimension dimension = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tint x = (int) ((dimension.getWidth() - startMenu.getWidth()) / 2);\n\t\tint y = (int) ((dimension.getHeight() - startMenu.getHeight()) / 2);\n\t\tstartMenu.setLocation(x, y);\n\n\t\tstartMenu.add(panel, BorderLayout.CENTER);\n\t\tstartMenu.setVisible(true);\n\n\t}", "private void createAndShowGUI() {\n setSize(300, 200);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n addContent(getContentPane());\n\n //pack();\n setVisible(true);\n }", "public void createContentPane() {\n\t\tLOG.log(\"Creating the content panel.\");\n\t\tCONTENT_PANE = new JPanel();\n\t\tCONTENT_PANE.setBorder(null);\n\t\tCONTENT_PANE.setLayout(new BorderLayout());\n\t}", "protected void createContents() {\n shell = new Shell();\n shell.setSize(1024, 650);\n shell.setText(\"GMToolsTD\");\n shell.setLayout(new GridLayout());\n\n\n /* Création du menu principal */\n Menu menuPrincipal = new Menu(shell, SWT.BAR);\n shell.setMenuBar(menuPrincipal);\n\n MenuItem mntmModule = new MenuItem(menuPrincipal, SWT.CASCADE);\n mntmModule.setText(\"Module\");\n\n Menu menuModule = new Menu(mntmModule);\n mntmModule.setMenu(menuModule);\n\n mntmSpoolUsage = new MenuItem(menuModule, SWT.NONE);\n mntmSpoolUsage.setText(\"Spool Usage\");\n\n mntmUser = new MenuItem(menuModule, SWT.NONE);\n mntmUser.setText(\"User Information\");\n\n new MenuItem(menuModule, SWT.SEPARATOR);\n\n mntmConfig = new MenuItem(menuModule, SWT.NONE);\n mntmConfig.setText(\"Configuration\");\n\n new MenuItem(menuModule, SWT.SEPARATOR);\n\n mntmExit = new MenuItem(menuModule, SWT.NONE);\n mntmExit.setText(\"Exit\");\n\n MenuItem mntmHelp = new MenuItem(menuPrincipal, SWT.CASCADE);\n mntmHelp.setText(\"Help\");\n\n Menu menuAbout = new Menu(mntmHelp);\n mntmHelp.setMenu(menuAbout);\n\n mntmAbout = new MenuItem(menuAbout, SWT.NONE);\n mntmAbout.setText(\"About\");\n\n\n /* Creation main screen elements */\n pageComposite = new Composite(shell, SWT.NONE);\n pageComposite.setLayout(new GridLayout(2,false));\n gridData = new GridData();\n gridData.horizontalAlignment = SWT.FILL;\n gridData.grabExcessHorizontalSpace = true;\n gridData.verticalAlignment = SWT.FILL;\n gridData.grabExcessVerticalSpace = true;\n pageComposite.setLayoutData(gridData);\n\n\n grpConnexion = new Group(pageComposite, SWT.NONE );\n grpConnexion.setText(\"Connection\");\n grpConnexion.setLayout(new GridLayout(2,false));\n gridData = new GridData();\n gridData.heightHint = 110;\n grpConnexion.setLayoutData(gridData);\n\n\n Label lblServer = new Label(grpConnexion, SWT.NONE);\n lblServer.setText(\"Server :\");\n\n textServer = new Text(grpConnexion, SWT.NONE);\n textServer.setLayoutData(new GridData(110,20));\n\n Label lblUsername = new Label(grpConnexion, SWT.NONE);\n lblUsername.setSize(65, 20);\n lblUsername.setText(\"Username :\");\n\n textUsername = new Text(grpConnexion,SWT.NONE);\n textUsername.setLayoutData(new GridData(110,20));\n\n Label lblPassword = new Label(grpConnexion, SWT.NONE);\n lblPassword.setSize(65, 20);\n lblPassword.setText(\"Password :\");\n\n textPassword = new Text(grpConnexion, SWT.PASSWORD);\n textPassword.setLayoutData(new GridData(110,20));\n\n btnConnect = new Button(grpConnexion, SWT.NONE);\n btnConnect.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER, false, false));\n btnConnect.setText(\"Connect\");\n\n btnDisconnect = new Button(grpConnexion, SWT.NONE);\n btnDisconnect.setEnabled(false);\n btnDisconnect.setText(\"Disconnect\");\n\n\n\n groupInfo = new Group(pageComposite, SWT.NONE);\n groupInfo.setText(\"Information\");\n groupInfo.setLayout(new GridLayout(1, false));\n gridData = new GridData();\n gridData.horizontalAlignment = SWT.FILL;\n gridData.grabExcessHorizontalSpace = true;\n gridData.heightHint = 110;\n groupInfo.setLayoutData(gridData);\n\n textInformation = new Text(groupInfo, SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);\n gridData = new GridData();\n gridData.horizontalAlignment = SWT.FILL;\n gridData.grabExcessHorizontalSpace = true;\n gridData.verticalAlignment = SWT.FILL;\n gridData.grabExcessVerticalSpace = true;\n textInformation.setLayoutData(gridData);\n\n\n // renseignement des informations provenant de config\n textServer.setText(conf.getValueConf(conf.SERVER_TD));\n textUsername.setText(conf.getValueConf(conf.USERNAME_TD));\n textPassword.setText(\"\");\n\n\n mntmSpoolUsage.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n majAffichage(AFFICHE_SPOOL);\n }\n });\n\n\n mntmUser.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n majAffichage(AFFICHE_USER);\n }\n });\n\n mntmConfig.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n majAffichage(AFFICHE_CONFIG);\n }\n });\n\n mntmAbout.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n MessageBox messageBox = new MessageBox(shell, SWT.ICON_INFORMATION);\n messageBox.setText(\"About...\");\n messageBox.setMessage(\"Not implemented yet ...\");\n messageBox.open();\n }\n });\n\n mntmExit.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n // afficher un message box avec du blabla\n shell.close();\n\n }\n });\n\n btnConnect.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n // connexion Teradata\n btnConnect.setEnabled(false);\n entryServer = textServer.getText();\n entryUsername = textUsername.getText();\n entryPassword = textPassword.getText();\n\n new Thread(new Runnable() {\n public void run() {\n try {\n\n tdConnect = new TDConnexion(entryServer, entryUsername, entryPassword, conf);\n majInformation(MESSAGE_INFORMATION,nomModuleConnexion,\"Connexion OK\");\n connexionStatut = true;\n } catch ( SQLException err) {\n majInformation(MESSAGE_ERROR,nomModuleConnexion,\"Connexion KO : \"+err.getMessage());\n connexionStatut = false;\n } catch (ClassNotFoundException err) {\n majInformation(MESSAGE_ERROR,nomModuleConnexion,\"Error ClassNotFoundException : \"+err.getMessage());\n connexionStatut = false;\n }\n if (connexionStatut) {\n try {\n nbrAMP = tdConnect.requestNumberAMP();\n } catch (Exception err) {\n majInformation(MESSAGE_ERROR,nomModuleConnexion,\"Calculation of AMPs KO : \"+err.getMessage());\n connexionStatut = false;\n tdConnect.deconnexion();\n }\n }\n\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n\n if (connexionStatut) {\n activationON();\n\n textServer.setEnabled(false);\n textUsername.setEnabled(false);\n textPassword.setEnabled(false);\n\n btnConnect.setEnabled(false);\n btnDisconnect.setEnabled(true);\n } else {\n btnConnect.setEnabled(true);\n }\n }\n });\n }\n }).start();\n\n\n\n\n }\n });\n\n\n btnDisconnect.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n manageDisconnection();\n }\n });\n\n\n //creating secondary screen\n ecranUser = new EcranUser(this);\n ecranSpool = new EcranSpool(this);\n ecranConfig = new EcranConfig(this);\n\n\n // update of the information message (log)\n new Thread(new Runnable() {\n public void run() {\n try {\n while (true) {\n if (!listMessageInfo.isEmpty()) {\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n refreshInformation();\n }\n });\n }\n try {\n Thread.sleep(500);\n } catch (Exception e) {\n //nothing to do\n }\n }\n } catch (Exception e) {\n //What to do when the while send an error ?\n }\n }\n }).start();\n\n }", "public void open() {\n\t\tthis.createContents();\n\n\t\tWindowBuilder delegate = this.getDelegate();\n\t\tdelegate.setTitle(this.title);\n\t\tdelegate.setContents(this);\n\t\tdelegate.setIcon(this.iconImage);\n\t\tdelegate.setMinHeight(this.minHeight);\n\t\tdelegate.setMinWidth(this.minWidth);\n\t\tdelegate.open();\n\t}", "@Override\r\n\tprotected final void createAppWindows() {\r\n \t//Instantiate only DD-specific windows. SFDC-scope windows (such as mainWindow) are static\r\n \t// objects in the EISTestBase class\r\n \tmyDocumentsPopUp = createWindow(\"WINDOW_MY_DOCUMENTS_POPUP_PROPERTIES_FILE\");\r\n }", "protected void createContents() {\n\t\tregister Register = new register();\n\t\tRegisterDAOImpl RDI = new RegisterDAOImpl();\t\n\t\t\n\t\tload = new Shell();\n\t\tload.setSize(519, 370);\n\t\tload.setText(\"XX\\u533B\\u9662\\u6302\\u53F7\\u7CFB\\u7EDF\");\n\t\tload.setLayout(new FormLayout());\n\t\t\n\t\tLabel name = new Label(load, SWT.NONE);\n\t\tFormData fd_name = new FormData();\n\t\tfd_name.top = new FormAttachment(20);\n\t\tfd_name.left = new FormAttachment(45, -10);\n\t\tname.setLayoutData(fd_name);\n\t\tname.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tname.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel subjet = new Label(load, SWT.NONE);\n\t\tFormData fd_subjet = new FormData();\n\t\tfd_subjet.left = new FormAttachment(44);\n\t\tfd_subjet.top = new FormAttachment(50);\n\t\tsubjet.setLayoutData(fd_subjet);\n\t\tsubjet.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tsubjet.setText(\"\\u79D1\\u5BA4\");\n\t\t\n\t\tLabel doctor = new Label(load, SWT.NONE);\n\t\tFormData fd_doctor = new FormData();\n\t\tfd_doctor.top = new FormAttachment(60);\n\t\tfd_doctor.left = new FormAttachment(45, -10);\n\t\tdoctor.setLayoutData(fd_doctor);\n\t\tdoctor.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tdoctor.setText(\"\\u533B\\u751F\");\n\t\t\n\t\tnametext = new Text(load, SWT.BORDER);\n\t\tnametext.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tnametext.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_nametext = new FormData();\n\t\tfd_nametext.right = new FormAttachment(50, 94);\n\t\tfd_nametext.top = new FormAttachment(20);\n\t\tfd_nametext.left = new FormAttachment(50);\n\t\tnametext.setLayoutData(fd_nametext);\n\t\t\n\t\tLabel titlelabel = new Label(load, SWT.NONE);\n\t\tFormData fd_titlelabel = new FormData();\n\t\tfd_titlelabel.right = new FormAttachment(43, 176);\n\t\tfd_titlelabel.top = new FormAttachment(10);\n\t\tfd_titlelabel.left = new FormAttachment(43);\n\t\ttitlelabel.setLayoutData(fd_titlelabel);\n\t\ttitlelabel.setFont(SWTResourceManager.getFont(\"楷体\", 18, SWT.BOLD));\n\t\ttitlelabel.setText(\"XX\\u533B\\u9662\\u95E8\\u8BCA\\u6302\\u53F7\");\n\t\t\n\t\tLabel label = new Label(load, SWT.NONE);\n\t\tFormData fd_label = new FormData();\n\t\tfd_label.top = new FormAttachment(40);\n\t\tfd_label.left = new FormAttachment(44, -10);\n\t\tlabel.setLayoutData(fd_label);\n\t\tlabel.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tlabel.setText(\"\\u6302\\u53F7\\u8D39\");\n\t\t\n\t\tcosttext = new Text(load, SWT.BORDER);\n\t\tcosttext.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tcosttext.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_costtext = new FormData();\n\t\tfd_costtext.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_costtext.top = new FormAttachment(40);\n\t\tfd_costtext.left = new FormAttachment(50);\n\t\tcosttext.setLayoutData(fd_costtext);\n\t\t\n\t\tLabel type = new Label(load, SWT.NONE);\n\t\tFormData fd_type = new FormData();\n\t\tfd_type.top = new FormAttachment(30);\n\t\tfd_type.left = new FormAttachment(45, -10);\n\t\ttype.setLayoutData(fd_type);\n\t\ttype.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\ttype.setText(\"\\u7C7B\\u578B\");\n\t\t\n\t\tCombo typecombo = new Combo(load, SWT.NONE);\n\t\ttypecombo.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\ttypecombo.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_typecombo = new FormData();\n\t\tfd_typecombo.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_typecombo.top = new FormAttachment(30);\n\t\tfd_typecombo.left = new FormAttachment(50);\n\t\ttypecombo.setLayoutData(fd_typecombo);\n\t\ttypecombo.setText(\"\\u95E8\\u8BCA\\u7C7B\\u578B\");\n\t\ttypecombo.add(\"普通门诊\",0);\n\t\ttypecombo.add(\"专家门诊\",1);\n\t\tMySelectionListener3 ms3 = new MySelectionListener3(typecombo,costtext);\n\t\ttypecombo.addSelectionListener(ms3);\n\t\t\n\t\tCombo doctorcombo = new Combo(load, SWT.NONE);\n\t\tdoctorcombo.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tdoctorcombo.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_doctorcombo = new FormData();\n\t\tfd_doctorcombo.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_doctorcombo.top = new FormAttachment(60);\n\t\tfd_doctorcombo.left = new FormAttachment(50);\n\t\tdoctorcombo.setLayoutData(fd_doctorcombo);\n\t\tdoctorcombo.setText(\"\\u9009\\u62E9\\u533B\\u751F\");\n\t\t\n\t\tCombo subject = new Combo(load, SWT.NONE);\n\t\tsubject.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tsubject.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tfd_subjet.right = new FormAttachment(subject, -6);\n\t\tfd_subjet.top = new FormAttachment(subject, -1, SWT.TOP);\n\t\tFormData fd_subject = new FormData();\n\t\tfd_subject.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_subject.top = new FormAttachment(50);\n\t\tfd_subject.left = new FormAttachment(50);\n\t\tsubject.setLayoutData(fd_subject);\n\t\tsubject.setText(\"\\u79D1\\u5BA4\\uFF1F\");\n\t\tsubject.add(\"神经内科\", 0);\n\t\tsubject.add(\"呼吸科\", 1);\n\t\tsubject.add(\"泌尿科\", 2);\n\t\tsubject.add(\"放射科\", 3);\n\t\tsubject.add(\"五官\", 4);\n\t\tMySelectionListener myselection = new MySelectionListener(i,subject,doctorcombo,pdtabledaoimpl);\n\t\tsubject.addSelectionListener(myselection);\n\t\t\n\t\tMySelectionListener2 ms2 = new MySelectionListener2(subject,doctorcombo,Register,nametext,RDI);\n\t\tdoctorcombo.addSelectionListener(ms2);\n\t\t\n\t\tButton surebutton = new Button(load, SWT.NONE);\n\t\tFormData fd_surebutton = new FormData();\n\t\tfd_surebutton.top = new FormAttachment(70);\n\t\tfd_surebutton.left = new FormAttachment(44);\n\t\tsurebutton.setLayoutData(fd_surebutton);\n\t\tsurebutton.setFont(SWTResourceManager.getFont(\"楷体\", 12, SWT.BOLD));\n\t\tsurebutton.setText(\"\\u786E\\u5B9A\");\n\t\tsurebutton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n \t Register register = new Register();\n\t\t\t\tPatientDAOImpl patientdaoimpl = new PatientDAOImpl();\n\n/*\t\t\t\tregisterdaoimpl.Save(Register);*/\n\t\t\t\tPatientInfo patientinfo = null;\n\t\t\t\tpatientinfo = patientdaoimpl.findByname(nametext.getText());\n\t\t\t\tif(patientinfo.getId() > 0 ){\n\t\t\t\t\tMessageBox messagebox = new MessageBox(load);\n\t\t\t\t\tmessagebox.setMessage(\"挂号成功!\");\n\t\t\t\t\tmessagebox.open();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tMessageBox messagebox = new MessageBox(load);\n\t\t\t\t\tmessagebox.setMessage(\"此用户不存在,请先注册\");\n\t\t\t\t\tmessagebox.open();\n\t\t\t\t\tload.dispose();\n\t\t\t\t\tregister.open();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton registerbutton = new Button(load, SWT.NONE);\n\t\tFormData fd_registerbutton = new FormData();\n\t\tfd_registerbutton.top = new FormAttachment(70);\n\t\tfd_registerbutton.left = new FormAttachment(53);\n\t\tregisterbutton.setLayoutData(fd_registerbutton);\n\t\tregisterbutton.setFont(SWTResourceManager.getFont(\"楷体\", 12, SWT.BOLD));\n\t\tregisterbutton.setText(\"\\u6CE8\\u518C\");\n\t\tregisterbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\t\n\t\t\t\tRegister register = new Register();\n\t\t\t\tload.close();\n\t\t\t\tregister.open();\n\t\t\t}\n\t\t});\n\t}", "protected void createContents() {\n\n\t\tfinal FileServeApplicationWindow appWindow = this;\n\n\t\tthis.shlFileServe = new Shell();\n\t\tthis.shlFileServe.setSize(450, 300);\n\t\tthis.shlFileServe.setText(\"File Serve - Server\");\n\t\tthis.shlFileServe.setLayout(new BorderLayout(0, 0));\n\n\t\tthis.composite = new Composite(this.shlFileServe, SWT.NONE);\n\t\tthis.composite.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tthis.composite.setLayoutData(BorderLayout.CENTER);\n\t\tthis.composite.setLayout(new FormLayout());\n\n\t\tthis.lblServerTcpPort = new Label(this.composite, SWT.NONE);\n\t\tFormData fd_lblServerTcpPort = new FormData();\n\t\tfd_lblServerTcpPort.top = new FormAttachment(0, 10);\n\t\tfd_lblServerTcpPort.left = new FormAttachment(0, 10);\n\t\tthis.lblServerTcpPort.setLayoutData(fd_lblServerTcpPort);\n\t\tthis.lblServerTcpPort.setText(\"Server TCP Port:\");\n\n\t\tthis.serverTCPPortField = new Text(this.composite, SWT.BORDER);\n\t\tthis.serverTCPPortField.setTextLimit(5);\n\t\tthis.serverTCPPortField.addVerifyListener(new VerifyListener() {\n\t\t\t@Override\n\t\t\tpublic void verifyText(VerifyEvent e) {\n\t\t\t\te.doit = true;\n\t\t\t\tfor(int i = 0; i < e.text.length(); i++) {\n\n\t\t\t\t\tchar c = e.text.charAt(i);\n\n\t\t\t\t\tboolean b = false;\n\n\t\t\t\t\tif(c >= '0' && c <= '9') {b = true;}\n\t\t\t\t\telse if(c == SWT.BS) {b = true;}\n\t\t\t\t\telse if(c == SWT.DEL) {b = true;}\n\n\t\t\t\t\tif(b == false) {\n\t\t\t\t\t\te.doit = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tFormData fd_serverTCPPortField = new FormData();\n\t\tfd_serverTCPPortField.top = new FormAttachment(0, 7);\n\t\tfd_serverTCPPortField.right = new FormAttachment(100, -54);\n\t\tfd_serverTCPPortField.left = new FormAttachment(this.lblServerTcpPort, 12);\n\t\tthis.serverTCPPortField.setLayoutData(fd_serverTCPPortField);\n\n\t\tthis.btnStartServer = new Button(this.composite, SWT.NONE);\n\t\tFormData fd_btnStartServer = new FormData();\n\t\tfd_btnStartServer.bottom = new FormAttachment(100, -10);\n\t\tfd_btnStartServer.right = new FormAttachment(100, -10);\n\t\tthis.btnStartServer.setLayoutData(fd_btnStartServer);\n\t\tthis.btnStartServer.setText(\"Start Server\");\n\n\t\tthis.lblServerStatus = new Label(this.composite, SWT.NONE);\n\t\tFormData fd_lblServerStatus = new FormData();\n\t\tfd_lblServerStatus.right = new FormAttachment(this.btnStartServer, -6);\n\t\tfd_lblServerStatus.top = new FormAttachment(this.btnStartServer, 5, SWT.TOP);\n\t\tfd_lblServerStatus.left = new FormAttachment(this.lblServerTcpPort, 0, SWT.LEFT);\n\t\tthis.lblServerStatus.setLayoutData(fd_lblServerStatus);\n\t\tthis.lblServerStatus.setText(\"Server Status: Stopped\");\n\n\t\tthis.text = new Text(this.composite, SWT.BORDER);\n\t\tFormData fd_text = new FormData();\n\t\tfd_text.top = new FormAttachment(this.serverTCPPortField, 6);\n\t\tthis.text.setLayoutData(fd_text);\n\n\t\tthis.lblHighestDirectory = new Label(this.composite, SWT.NONE);\n\t\tfd_text.left = new FormAttachment(this.lblHighestDirectory, 6);\n\t\tFormData fd_lblHighestDirectory = new FormData();\n\t\tfd_lblHighestDirectory.top = new FormAttachment(this.lblServerTcpPort, 12);\n\t\tfd_lblHighestDirectory.left = new FormAttachment(this.lblServerTcpPort, 0, SWT.LEFT);\n\t\tthis.lblHighestDirectory.setLayoutData(fd_lblHighestDirectory);\n\t\tthis.lblHighestDirectory.setText(\"Highest Directory:\");\n\n\t\tthis.button = new Button(this.composite, SWT.NONE);\n\n\t\tfd_text.right = new FormAttachment(100, -54);\n\t\tFormData fd_button = new FormData();\n\t\tfd_button.left = new FormAttachment(this.text, 6);\n\t\tthis.button.setLayoutData(fd_button);\n\t\tthis.button.setText(\"...\");\n\n\t\tthis.grpConnectionInformation = new Group(this.composite, SWT.NONE);\n\t\tfd_button.bottom = new FormAttachment(this.grpConnectionInformation, -1);\n\t\tthis.grpConnectionInformation.setText(\"Connection Information:\");\n\t\tthis.grpConnectionInformation.setLayout(new BorderLayout(0, 0));\n\t\tFormData fd_grpConnectionInformation = new FormData();\n\t\tfd_grpConnectionInformation.bottom = new FormAttachment(this.btnStartServer, -6);\n\t\tfd_grpConnectionInformation.right = new FormAttachment(this.btnStartServer, 0, SWT.RIGHT);\n\t\tfd_grpConnectionInformation.top = new FormAttachment(this.lblHighestDirectory, 6);\n\t\tfd_grpConnectionInformation.left = new FormAttachment(this.lblServerTcpPort, 0, SWT.LEFT);\n\t\tthis.grpConnectionInformation.setLayoutData(fd_grpConnectionInformation);\n\n\t\tthis.scrolledComposite = new ScrolledComposite(this.grpConnectionInformation, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tthis.scrolledComposite.setLayoutData(BorderLayout.CENTER);\n\t\tthis.scrolledComposite.setExpandHorizontal(true);\n\t\tthis.scrolledComposite.setExpandVertical(true);\n\n\t\tthis.table = new Table(this.scrolledComposite, SWT.BORDER | SWT.FULL_SELECTION);\n\t\tthis.table.setLinesVisible(true);\n\t\tthis.table.setHeaderVisible(true);\n\t\tthis.scrolledComposite.setContent(this.table);\n\t\tthis.scrolledComposite.setMinSize(this.table.computeSize(SWT.DEFAULT, SWT.DEFAULT));\n\n\t}", "public PastDataWindow(){\n // Set the title\n setTitle(\"Past CS Data Viewer\");\n\n //Create a new BorderLayout manager\n setLayout(new BorderLayout());\n\n // Centers the window\n setLocationRelativeTo(null);\n \n //Build the view panel\n buildViewPanel();\n \n //Add text area to the window\n add(viewPanel, BorderLayout.CENTER);\n \n //Clean up and display the window\n pack();\n setVisible(true);\n }", "private void createContents() {\n shell = new Shell(getParent(), SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL);\n shell.setSize(FORM_WIDTH, 700);\n shell.setText(getText());\n shell.setLayout(new GridLayout(1, false));\n\n TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\n tabFolder.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n // STRUCTURE PARAMETERS\n\n TabItem tbtmStructure = new TabItem(tabFolder, SWT.NONE);\n tbtmStructure.setText(\"Structure\");\n\n Composite grpStructure = new Composite(tabFolder, SWT.NONE);\n tbtmStructure.setControl(grpStructure);\n grpStructure.setLayout(TAB_GROUP_LAYOUT);\n grpStructure.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n ParmDialogText.load(grpStructure, parms, \"meta\");\n ParmDialogText.load(grpStructure, parms, \"col\");\n ParmDialogText.load(grpStructure, parms, \"id\");\n ParmDialogChoices.load(grpStructure, parms, \"init\", Activation.values());\n ParmDialogChoices.load(grpStructure, parms, \"activation\", Activation.values());\n ParmDialogFlag.load(grpStructure, parms, \"raw\");\n ParmDialogFlag.load(grpStructure, parms, \"batch\");\n ParmDialogGroup cnn = ParmDialogText.load(grpStructure, parms, \"cnn\");\n ParmDialogGroup filters = ParmDialogText.load(grpStructure, parms, \"filters\");\n ParmDialogGroup strides = ParmDialogText.load(grpStructure, parms, \"strides\");\n ParmDialogGroup subs = ParmDialogText.load(grpStructure, parms, \"sub\");\n if (cnn != null) {\n if (filters != null) cnn.setGrouped(filters);\n if (strides != null) cnn.setGrouped(strides);\n if (subs != null) cnn.setGrouped(subs);\n }\n ParmDialogText.load(grpStructure, parms, \"lstm\");\n ParmDialogGroup wGroup = ParmDialogText.load(grpStructure, parms, \"widths\");\n ParmDialogGroup bGroup = ParmDialogText.load(grpStructure, parms, \"balanced\");\n if (bGroup != null && wGroup != null) {\n wGroup.setExclusive(bGroup);\n bGroup.setExclusive(wGroup);\n }\n\n // SEARCH CONTROL PARAMETERS\n\n TabItem tbtmSearch = new TabItem(tabFolder, SWT.NONE);\n tbtmSearch.setText(\"Training\");\n\n ScrolledComposite grpSearch0 = new ScrolledComposite(tabFolder, SWT.V_SCROLL);\n grpSearch0.setLayout(new FillLayout());\n grpSearch0.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n tbtmSearch.setControl(grpSearch0);\n Composite grpSearch = new Composite(grpSearch0, SWT.NONE);\n grpSearch0.setContent(grpSearch);\n grpSearch.setLayout(TAB_GROUP_LAYOUT);\n grpSearch.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n Enum<?>[] preferTypes = (this.modelType == TrainingProcessor.Type.CLASS ? RunStats.OptimizationType.values()\n : RunStats.RegressionType.values());\n ParmDialogChoices.load(grpSearch, parms, \"prefer\", preferTypes);\n ParmDialogChoices.load(grpSearch, parms, \"method\", Trainer.Type.values());\n ParmDialogText.load(grpSearch, parms, \"bound\");\n ParmDialogChoices.load(grpSearch, parms, \"lossFun\", LossFunctionType.values());\n ParmDialogText.load(grpSearch, parms, \"weights\");\n ParmDialogText.load(grpSearch, parms, \"iter\");\n ParmDialogText.load(grpSearch, parms, \"batchSize\");\n ParmDialogText.load(grpSearch, parms, \"testSize\");\n ParmDialogText.load(grpSearch, parms, \"maxBatches\");\n ParmDialogText.load(grpSearch, parms, \"earlyStop\");\n ParmDialogChoices.load(grpSearch, parms, \"regMode\", Regularization.Mode.values());\n ParmDialogText.load(grpSearch, parms, \"regFactor\");\n ParmDialogText.load(grpSearch, parms, \"seed\");\n ParmDialogChoices.load(grpSearch, parms, \"start\", WeightInit.values());\n ParmDialogChoices.load(grpSearch, parms, \"gradNorm\", GradientNormalization.values());\n ParmDialogChoices.load(grpSearch, parms, \"updater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"learnRate\");\n ParmDialogChoices.load(grpSearch, parms, \"bUpdater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"updateRate\");\n\n grpSearch.setSize(grpSearch.computeSize(FORM_WIDTH - 50, SWT.DEFAULT));\n\n // BOTTOM BUTTON BAR\n\n Composite grpButtonBar = new Composite(shell, SWT.NONE);\n grpButtonBar.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));\n grpButtonBar.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n Button btnSave = new Button(grpButtonBar, SWT.NONE);\n btnSave.setText(\"Save\");\n btnSave.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n Button btnClose = new Button(grpButtonBar, SWT.NONE);\n btnClose.setText(\"Cancel\");\n btnClose.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n shell.close();\n }\n });\n\n Button btnOK = new Button(grpButtonBar, SWT.NONE);\n btnOK.setText(\"Save and Close\");\n btnOK.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n shell.close();\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n }", "private void createContents() {\r\n this.shell = new Shell(this.getParent(), this.getStyle());\r\n this.shell.setText(\"自動プロキシ構成スクリプトファイル生成\");\r\n this.shell.setLayout(new GridLayout(1, false));\r\n\r\n Composite composite = new Composite(this.shell, SWT.NONE);\r\n composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n composite.setLayout(new GridLayout(1, false));\r\n\r\n Label labelTitle = new Label(composite, SWT.NONE);\r\n labelTitle.setText(\"自動プロキシ構成スクリプトファイルを生成します\");\r\n\r\n String server = Filter.getServerName();\r\n if (server == null) {\r\n Group manualgroup = new Group(composite, SWT.NONE);\r\n manualgroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n manualgroup.setLayout(new GridLayout(2, false));\r\n manualgroup.setText(\"鎮守府サーバーが未検出です。IPアドレスを入力して下さい。\");\r\n\r\n Label iplabel = new Label(manualgroup, SWT.NONE);\r\n iplabel.setText(\"IPアドレス:\");\r\n\r\n final Text text = new Text(manualgroup, SWT.BORDER);\r\n GridData gdip = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n gdip.widthHint = SwtUtils.DPIAwareWidth(150);\r\n text.setLayoutData(gdip);\r\n text.setText(\"0.0.0.0\");\r\n text.addModifyListener(new ModifyListener() {\r\n @Override\r\n public void modifyText(ModifyEvent e) {\r\n CreatePacFileDialog.this.server = text.getText();\r\n }\r\n });\r\n\r\n this.server = \"0.0.0.0\";\r\n } else {\r\n this.server = server;\r\n }\r\n\r\n Button storeButton = new Button(composite, SWT.NONE);\r\n storeButton.setText(\"保存先を選択...\");\r\n storeButton.addSelectionListener(new FileSelectionAdapter(this));\r\n\r\n Group addrgroup = new Group(composite, SWT.NONE);\r\n addrgroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n addrgroup.setLayout(new GridLayout(2, false));\r\n addrgroup.setText(\"アドレス(保存先のアドレスより生成されます)\");\r\n\r\n Label ieAddrLabel = new Label(addrgroup, SWT.NONE);\r\n ieAddrLabel.setText(\"IE用:\");\r\n\r\n this.iePath = new Text(addrgroup, SWT.BORDER);\r\n GridData gdIePath = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gdIePath.widthHint = SwtUtils.DPIAwareWidth(380);\r\n this.iePath.setLayoutData(gdIePath);\r\n\r\n Label fxAddrLabel = new Label(addrgroup, SWT.NONE);\r\n fxAddrLabel.setText(\"Firefox用:\");\r\n\r\n this.firefoxPath = new Text(addrgroup, SWT.BORDER);\r\n GridData gdFxPath = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gdFxPath.widthHint = SwtUtils.DPIAwareWidth(380);\r\n this.firefoxPath.setLayoutData(gdFxPath);\r\n\r\n this.shell.pack();\r\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(447, 310);\n\t\tshell.setText(\"Verisure ASCII Node\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tTabFolder tabFolder = new TabFolder(shell, SWT.NONE);\n\t\t\n\t\tTabItem basicItem = new TabItem(tabFolder, SWT.NONE);\n\t\tbasicItem.setText(\"Basic\");\n\t\t\n\t\tComposite basicComposite = new Composite(tabFolder, SWT.NONE);\n\t\tbasicItem.setControl(basicComposite);\n\t\tbasicComposite.setLayout(null);\n\t\t\n\t\tButton btnDelMeasurments = new Button(basicComposite, SWT.NONE);\n\t\t\n\t\tbtnDelMeasurments.setToolTipText(\"Delete the measurements from the device.\");\n\t\tbtnDelMeasurments.setBounds(269, 192, 159, 33);\n\t\tbtnDelMeasurments.setText(\"Delete measurements\");\n\t\t\n\t\tButton btnGetMeasurement = new Button(basicComposite, SWT.NONE);\n\t\tbtnGetMeasurement.setToolTipText(\"Get the latest measurement from the device.\");\n\t\t\n\t\tbtnGetMeasurement.setBounds(0, 36, 159, 33);\n\t\tbtnGetMeasurement.setText(\"Get new bloodvalue\");\n\t\t\n\t\tfinal StyledText receiveArea = new StyledText(basicComposite, SWT.BORDER | SWT.WRAP);\n\t\treceiveArea.setLocation(167, 30);\n\t\treceiveArea.setSize(259, 92);\n\t\treceiveArea.setToolTipText(\"This is where the measurement will be displayd.\");\n\t\t\n\t\tButton btnBase64 = new Button(basicComposite, SWT.RADIO);\n\t\tbtnBase64.setToolTipText(\"Show the latest blood value (base64 encoded).\");\n\t\tbtnBase64.setFont(SWTResourceManager.getFont(\"Cantarell\", 9, SWT.NORMAL));\n\t\t\n\t\tbtnDelMeasurments.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0){\n\t\t\t\treceiveArea.setText(\"Deleting measurements, please wait...\");\n\n\t\t\t}\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t\tRest rest = new Rest();\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\tString theText = \"DEL\";\n\t\t\t\tdo {\n\t\t\t\t\t// System.out.println(\"Längded på theText i restCallImpl \"+theText.length()\n\t\t\t\t\t// +\" och det står \" +theText);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//System.out.println(\"Hej\");\n\n\t\t\t\t\t\t//rest.doPut(\"lol\");\n\t\t\t\t\t\trest.doPut(theText);\n\t\t\t\t\t\tSystem.out.println(\"Sov i tre sekunder.\");\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile (!db.getAck(theText, rest));\n\t\t\t\treceiveArea.setText(\"Deleted measurements from device.\");\n\t\t\t}\n\t\t});\n\t\tbtnBase64.setSelection(true);\n\t\tbtnBase64.setBounds(137, 130, 74, 25);\n\t\tbtnBase64.setText(\"base64\");\n\t\t\n\t\tButton btnHex = new Button(basicComposite, SWT.RADIO);\n\t\tbtnHex.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\n\t\t\t\ttype = 2;\n\t\t\t\tSystem.out.println(\"Bytte type till: \"+type);\n\n\t\t\t}\n\t\t});\n\t\tbtnHex.setToolTipText(\"Show the measurement in hex.\");\n\t\tbtnHex.setFont(SWTResourceManager.getFont(\"Cantarell\", 9, SWT.NORMAL));\n\t\tbtnHex.setBounds(217, 130, 50, 25);\n\t\tbtnHex.setText(\"hex\");\n\t\t\n\t\tButton btnAscii = new Button(basicComposite, SWT.RADIO);\n\t\t\n\t\tbtnAscii.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\ttype = 1;\n\t\t\t\tSystem.out.println(\"Bytte type till: \"+type);\n\n\t\t\t}\n\t\t});\n\t\t\n\t\t/*\n\t\t * Return that the value should be represented as base64.\n\t\t * \n\t\t */\n\t\t\n\t\tbtnBase64.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\ttype = 0;\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnAscii.setToolTipText(\"Show the measurement in ascii.\");\n\t\tbtnAscii.setFont(SWTResourceManager.getFont(\"Cantarell\", 9, SWT.NORMAL));\n\t\tbtnAscii.setBounds(269, 130, 53, 25);\n\t\tbtnAscii.setText(\"ascii\");\n\t\t\n\t\tLabel label = new Label(basicComposite, SWT.NONE);\n\t\tlabel.setText(\"A master thesis project by Pétur and David\");\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Cantarell\", 7, SWT.NORMAL));\n\t\tlabel.setBounds(10, 204, 192, 21);\n\t\t\n\t\tButton btnGetDbValue = new Button(basicComposite, SWT.NONE);\n\t\tbtnGetDbValue.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\treceiveArea.setText(db.getNodeFaults(type));\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\treceiveArea.setText(\"Getting latest measurements from db, please wait...\");\n\t\t\t}\n\t\t});\n\t\tbtnGetDbValue.setBounds(0, 71, 159, 33);\n\t\tbtnGetDbValue.setText(\"Get latest bloodvalue\");\n\t\t\n\t\t/*\n\t\t *Get measurement from device event handler \n\t\t *\n\t\t *@param The Mouse Adapter\n\t\t * \n\t\t */\n\t\t\n\t\t\n\t\tbtnGetMeasurement.addMouseListener(new MouseAdapter() {\n\t\t\t\n\t\t\tpublic void MouseDown(MouseEvent arg0){\n\t\t\t\treceiveArea.setText(\"Getting measurement from device, please wait...\");\n\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\tRest rest = new Rest();\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\tString theText = \"LOG\";\n\t\t\t\t\n\t\t\t\tdo {\n\t\t\t\t\t// System.out.println(\"Längded på theText i restCallImpl \"+theText.length()\n\t\t\t\t\t// +\" och det står \" +theText);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//System.out.println(\"Hej\");\n\n\t\t\t\t\t\t//rest.doPut(\"lol\");\n\t\t\t\t\t\trest.doPut(theText);\n\t\t\t\t\t\t\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile (!db.getAck(theText, rest));\n\t\t\t\ttry{\n\t\t\t\t\tThread.sleep(2000);\n\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t\treceiveArea.setText(db.getNodeFaults(type));\n\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\treceiveArea.setText(\"Getting measurements from device, please wait...\");\n\t\t\t}\n\t\t});\n\n\t\t\n\t\t/*\n\t\t * The advanced tab section\n\t\t */\n\t\t\n\t\tTabItem advancedItem = new TabItem(tabFolder, SWT.NONE);\n\t\tadvancedItem.setText(\"Advanced\");\n\t\t\n\t\tComposite advComposite = new Composite(tabFolder, SWT.NONE);\n\t\tadvancedItem.setControl(advComposite);\n\t\tadvComposite.setLayout(null);\n\t\t\n\t\tButton advSendButton = new Button(advComposite, SWT.NONE);\n\t\t\n\t\n\t\tadvSendButton.setToolTipText(\"Send arbitary data to the device.\");\n\t\n\t\tadvSendButton.setBounds(307, 31, 121, 33);\n\t\tadvSendButton.setText(\"Send Data\");\n\t\t\n\t\tLabel lblNewLabel = new Label(advComposite, SWT.NONE);\n\t\tlblNewLabel.setFont(SWTResourceManager.getFont(\"Cantarell\", 7, SWT.NORMAL));\n\t\tlblNewLabel.setBounds(10, 204, 192, 21);\n\t\tlblNewLabel.setText(\"A master thesis project by Pétur and David\");\n\t\t\n\t\tfinal StyledText advSendArea = new StyledText(advComposite, SWT.BORDER | SWT.WRAP);\n\t\tadvSendArea.setToolTipText(\"This is where you type your arbitary data to send to the device.\");\n\t\tadvSendArea.setBounds(10, 31, 291, 33);\n\t\t\n\t\tButton advReceiveButton = new Button(advComposite, SWT.NONE);\n\t\t\n\n\t\t\n\t\tadvReceiveButton.setToolTipText(\"Receive data from the database.\");\n\t\tadvReceiveButton.setBounds(10, 70, 99, 33);\n\t\tadvReceiveButton.setText(\"Receive Data\");\n\t\t\n\t\tfinal StyledText advReceiveArea = new StyledText(advComposite, SWT.BORDER | SWT.WRAP);\n\t\tadvReceiveArea.setToolTipText(\"This is where the receive data will be presented.\");\n\t\tadvReceiveArea.setBounds(115, 67, 313, 70);\n\t\t\n\t\tButton advAscii = new Button(advComposite, SWT.RADIO);\n\t\tadvAscii.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\tadvType = 1;\n\t\t\t}\n\t\t});\n\t\t\n\t\tadvReceiveButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\tadvReceiveArea.setText(\"Receiving the data, please wait...\");\n\t\t\t\tXBNConnection xbn = new XBNConnection();\n\t\t\t\tString text = xbn.getNodeFaults(advType);\n\t\t\t\tadvReceiveArea.setText(text);\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\tadvReceiveArea.setText(\"Receivng data from device, please wait\");\n\t\t\t}\n\t\t});\n\t\tadvAscii.setSelection(true);\n\t\tadvAscii.setToolTipText(\"Show the database results as ascii.\");\n\t\tadvAscii.setFont(SWTResourceManager.getFont(\"Cantarell\", 9, SWT.NORMAL));\n\t\tadvAscii.setBounds(10, 109, 54, 25);\n\t\tadvAscii.setText(\"ascii\");\n\t\t\n\t\tButton advHex = new Button(advComposite, SWT.RADIO);\n\t\tadvHex.setToolTipText(\"Show the database results as hex.\");\n\t\tadvHex.setFont(SWTResourceManager.getFont(\"Cantarell\", 9, SWT.NORMAL));\n\t\tadvHex.setBounds(66, 109, 43, 25);\n\t\tadvHex.setText(\"hex\");\n\t\tadvHex.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\tadvType = 2;\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnDeleteDatabase = new Button(advComposite, SWT.NONE);\n\t\tbtnDeleteDatabase.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\tdb.deleteMessages();\n\t\t\t\tadvReceiveArea.setText(\"Deleted data from database\");\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnDeleteDatabase.setToolTipText(\"Delete entries in the database.\");\n\t\tbtnDeleteDatabase.setText(\"Delete database\");\n\t\tbtnDeleteDatabase.setBounds(269, 192, 159, 33);\n\t\t\n\t\n\t\t\n\n\t\t/*\n\t\t * This is the advanced send button. Can send arbitary text to the device.\n\t\t */\n\t\t\n\t\tadvSendButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t\t//advSendArea.setText(\"Sending: '\"+advSendArea.getText()+\"' to the device, please wait...\");\n\t\t\t\tString theText = advSendArea.getText();\n\t\t\t\tSystem.out.println(\"Texten som ska skickas är: \" + theText);\n\t\t\t\t\n\t\t\t\tRest rest = new Rest();\n\t\t\t\tString chunkText = \"\";\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\tStringBuilder sb = new StringBuilder(theText);\n\t\t\t\t// Add and @ to be sure that there will never be two strings that are\n\t\t\t\t// the same in a row.\n\t\t\t\t// for (int i = 3; i < sb.toString().length(); i += 6) {\n\t\t\t\t// sb.insert(i, \"@\");\n\t\t\t\t// }\n\t\t\t\t// theText = sb.toString();\n\t\t\t\tSystem.out.println(theText);\n\n\t\t\t\tdo {\n\t\t\t\t\t// System.out.println(\"Längded på theText i restCallImpl \"+theText.length()\n\t\t\t\t\t// +\" och det står \" +theText);\n\n\t\t\t\t\tif (theText.length() < 3) {\n\t\t\t\t\t\tchunkText = theText.substring(0, theText.length());\n\t\t\t\t\t\tint pad = theText.length() % 3;\n\t\t\t\t\t\tif (pad == 1) {\n\t\t\t\t\t\t\tchunkText = chunkText + \" \";\n\t\t\t\t\t\t\ttheText = theText + \" \";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchunkText = chunkText + \" \";\n\t\t\t\t\t\t\ttheText = theText + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchunkText = theText.substring(0, 3);\n\t\t\t\t\t}\n\n\t\t\t\t\ttheText = theText.substring(3);\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\trest.doPut(chunkText);\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twhile (theText.length() > 0 && db.getAck(chunkText, rest));\n\t\t\t\tadvSendArea.setText(\"Data sent to the device.\");\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t\n\t\t});\n\n\t}", "public static void createAndShowGUI() {\n windowContent.add(\"Center\",p1);\n\n //Create the frame and set its content pane\n JFrame frame = new JFrame(\"GridBagLayoutCalculator\");\n frame.setContentPane(windowContent);\n\n // Set the size of the window to be big enough to accommodate all controls\n frame.pack();\n\n // Display the window\n frame.setVisible(true);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }", "static public void make() {\n\t\tif (window != null)\n\t\t\treturn;\n\n\t\twindow = new JFrame();\n\t\twindow.setTitle(\"Finecraft\");\n\t\twindow.setMinimumSize(new Dimension(500, 300));\n\t\twindow.setSize(asInteger(WINDOW_WIDTH), asInteger(WINDOW_HEIGHT));\n\t\twindow.setResizable(asBoolean(WINDOW_RESIZE));\n\t\twindow.setLocationRelativeTo(null);\n\t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "private void makeContent(JFrame frame){\n Container content = frame.getContentPane();\n content.setSize(700,700);\n\n makeButtons();\n makeRooms();\n makeLabels();\n\n content.add(inputPanel,BorderLayout.SOUTH);\n content.add(roomPanel, BorderLayout.CENTER);\n content.add(infoPanel, BorderLayout.EAST);\n\n }", "private static void createAndShowGUI() {\r\n //Disable boldface controls.\r\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE); \r\n\r\n //Create and set up the window.\r\n JFrame frame = new JFrame(\"Exertion Scripting\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n //Create and set up the content pane.\r\n NetletEditor newContentPane = new NetletEditor(null);\r\n newContentPane.setOpaque(true); //content panes must be opaque\r\n frame.setContentPane(newContentPane);\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }", "private void initDialog() {\n Window subWindow = new Window(\"Sub-window\");\n \n FormLayout nameLayout = new FormLayout();\n TextField code = new TextField(\"Code\");\n code.setPlaceholder(\"Code\");\n \n TextField description = new TextField(\"Description\");\n description.setPlaceholder(\"Description\");\n \n Button confirm = new Button(\"Save\");\n confirm.addClickListener(listener -> insertRole(code.getValue(), description.getValue()));\n\n nameLayout.addComponent(code);\n nameLayout.addComponent(description);\n nameLayout.addComponent(confirm);\n \n subWindow.setContent(nameLayout);\n \n // Center it in the browser window\n subWindow.center();\n\n // Open it in the UI\n UI.getCurrent().addWindow(subWindow);\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell(SWT.APPLICATION_MODAL|SWT.CLOSE);\r\n\t\tshell.setSize(800, 600);\r\n\t\tshell.setText(\"租借/归还车辆\");\r\n\t\tshell.setBackgroundMode(SWT.INHERIT_DEFAULT);\r\n\r\n\t\t/**换肤功能已经实现*/\r\n\t\tString bgpath = ChangeSkin.getCurrSkin();\r\n\t\tInputStream bg = this.getClass().getResourceAsStream(bgpath);\r\n\t\t\r\n\t\tInputStream reimg = this.getClass().getResourceAsStream(\"/Img/icon1.png\");\r\n\t\tshell.setBackgroundImage(new Image(display,bg));\r\n\t\tshell.setImage(new Image(display, reimg));\r\n\t\t\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(52, 48, 168, 20);\r\n\t\tlabel.setText(\"\\u8BF7\\u60A8\\u8BA4\\u771F\\u586B\\u5199\\u79DF\\u8D41\\u4FE1\\u606F:\");\r\n\t\t\r\n\t\tLabel lblid = new Label(shell, SWT.NONE);\r\n\t\tlblid.setBounds(158, 180, 61, 20);\r\n\t\tlblid.setText(\"\\u8F66\\u8F86ID\");\r\n\t\t\r\n\t\tui_car_id = new Text(shell, SWT.BORDER);\r\n\t\tui_car_id.setBounds(225, 177, 129, 26);\r\n\t\t\r\n\t\tui_renter = new Text(shell, SWT.BORDER);\r\n\t\tui_renter.setBounds(225, 228, 129, 26);\r\n\t\t\r\n\t\tLabel label_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setBounds(159, 231, 61, 20);\r\n\t\tlabel_1.setText(\"\\u79DF\\u8D41\\u4EBA\");\r\n\t\t\r\n\t\tDateTime ui_start = new DateTime(shell, SWT.BORDER);\r\n\t\tui_start.setBounds(225, 271, 129, 28);\r\n\t\t\r\n\t\tLabel label_2 = new Label(shell, SWT.NONE);\r\n\t\tlabel_2.setBounds(144, 271, 76, 20);\r\n\t\tlabel_2.setText(\"\\u5F00\\u59CB\\u65F6\\u95F4\");\r\n\t\t\r\n\t\tLabel label_3 = new Label(shell, SWT.NONE);\r\n\t\tlabel_3.setBounds(144, 326, 76, 20);\r\n\t\tlabel_3.setText(\"\\u7ED3\\u675F\\u65F6\\u95F4\");\r\n\t\t\r\n\t\tLabel label_4 = new Label(shell, SWT.NONE);\r\n\t\tlabel_4.setBounds(559, 97, 76, 20);\r\n\t\tlabel_4.setText(\"\\u5F53\\u524D\\u8D39\\u7528:\");\r\n\t\t\r\n\t\tLabel ui_count_price = new Label(shell, SWT.BORDER | SWT.CENTER);\r\n\t\tui_count_price.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 16, SWT.NORMAL));\r\n\t\tui_count_price.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\r\n\t\tui_count_price.setBounds(539, 205, 156, 77);\r\n\t\tui_count_price.setText(\"0.00\");\r\n\t\t\r\n\t\tDateTime ui_end = new DateTime(shell, SWT.BORDER);\r\n\t\tui_end.setBounds(225, 318, 129, 28);\r\n\t\t\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tRentService rentser = new RentService();\r\n\t\t\t\tdouble day_pri = rentser.rentPrice(ui_car_id.getText());\r\n\t\t\t\t/*当前仅能计算一个月以内的租用情况\r\n\t\t\t\t * @Time 10/09/15.03\r\n\t\t\t\t * \r\n\t\t\t\t * **/\r\n\t\t\t\t//不管当月几天,都按照30天计算\r\n\t\t\t\tint month = ui_end.getMonth()-ui_start.getMonth();\r\n\t\t\t\tint day = (ui_end.getDay() - ui_start.getDay()) +\r\n\t\t\t\t\t\tmonth * 30\r\n\t\t\t\t\t\t;\r\n\t\t\t\tif(day_pri > 0) {\r\n\t\t\t\t\tui_count_price.setText(String.valueOf(day*day_pri));\r\n\t\t\t\t}else {\r\n\t\t\t\t\tui_count_price.setText(\"数据非法\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setBounds(122, 393, 141, 30);\r\n\t\tbutton.setText(\"\\u4F30\\u7B97\\u5F53\\u524D\\u79DF\\u8D41\\u4EF7\\u683C\");\r\n\t\t\r\n\t\tButton button_1 = new Button(shell, SWT.NONE);\r\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tRentService rentService = new RentService();\r\n\t\t\t\tString sdate = ui_start.getDay()+\"-\"+ui_start.getMonth()+\"月-\"+ui_start.getYear();\r\n\t\t\t\tString edate = ui_end.getDay()+\"-\"+ui_end.getMonth()+\"月-\"+ui_end.getYear();\r\n\t\t\t\t/**这个地方可能有问题*/\r\n\t\t\t\tboolean rentCar = rentService.rentCar(ui_car_id.getText(),sdate , edate, ui_count_price.getText());\r\n\t\t\t\tif(rentCar) {\r\n\t\t\t\t\tui_count_price.setText(\"租借成功!\");\r\n\t\t\t\t\t/**租借成功,就该让信息表中的数据减1**/\r\n\t\t\t\t\tCarService cars = new CarService();\r\n\t\t\t\t\tcars.minusCar(ui_car_id.getText());\r\n\t\t\t\t}else {\r\n\t\t\t\t\tui_count_price.setText(\"租借失败!\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton_1.setBounds(292, 393, 98, 30);\r\n\t\tbutton_1.setText(\"\\u79DF\\u501F\");\r\n\t\t\r\n\t\r\n\r\n\t}", "private void createContents() {\r\n shell = new Shell(getParent(), getStyle());\r\n shell.setSize(650, 300);\r\n shell.setText(getText());\r\n\r\n shell.setLayout(new FormLayout());\r\n\r\n lblSOName = new Label(shell, SWT.CENTER);\r\n lblSOName.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_lblSOName = new FormData();\r\n fd_lblSOName.bottom = new FormAttachment(0, 20);\r\n fd_lblSOName.right = new FormAttachment(100, -2);\r\n fd_lblSOName.top = new FormAttachment(0, 2);\r\n fd_lblSOName.left = new FormAttachment(0, 2);\r\n lblSOName.setLayoutData(fd_lblSOName);\r\n lblSOName.setText(soName);\r\n\r\n tableParams = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);\r\n tableParams.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_tableParams = new FormData();\r\n fd_tableParams.bottom = new FormAttachment(100, -40);\r\n fd_tableParams.right = new FormAttachment(100, -2);\r\n fd_tableParams.top = new FormAttachment(0, 22);\r\n fd_tableParams.left = new FormAttachment(0, 2);\r\n tableParams.setLayoutData(fd_tableParams);\r\n tableParams.setHeaderVisible(true);\r\n tableParams.setLinesVisible(true);\r\n fillInTable(tableParams);\r\n tableParams.addControlListener(new ControlAdapter() {\r\n\r\n @Override\r\n public void controlResized(ControlEvent e) {\r\n Table table = (Table)e.getSource();\r\n table.getColumn(0).setWidth((int)(table.getClientArea().width*nameSpace));\r\n table.getColumn(1).setWidth((int)(table.getClientArea().width*valueSpace));\r\n table.getColumn(2).setWidth((int)(table.getClientArea().width*hintSpace));\r\n }\r\n });\r\n tableParams.pack();\r\n //paramName.pack();\r\n //paramValue.pack();\r\n\r\n final TableEditor editor = new TableEditor(tableParams);\r\n //The editor must have the same size as the cell and must\r\n //not be any smaller than 50 pixels.\r\n editor.horizontalAlignment = SWT.LEFT;\r\n editor.grabHorizontal = true;\r\n editor.minimumWidth = 50;\r\n // editing the second column\r\n tableParams.addSelectionListener(new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(SelectionEvent e) {\r\n // Identify the selected row\r\n TableItem item = (TableItem) e.item;\r\n if (item == null) {\r\n return;\r\n }\r\n\r\n // The control that will be the editor must be a child of the Table\r\n IReplaceableParam<?> editedParam = (IReplaceableParam<?>)item.getData(DATA_VALUE_PARAM);\r\n if (editedParam != null) {\r\n // Clean up any previous editor control\r\n Control oldEditor = editor.getEditor();\r\n if (oldEditor != null) {\r\n oldEditor.dispose();\r\n }\r\n\r\n Control editControl = null;\r\n String cellText = item.getText(columnValueIndex);\r\n switch (editedParam.getType()) {\r\n case BOOLEAN:\r\n Combo cmb = new Combo(tableParams, SWT.READ_ONLY);\r\n String[] booleanItems = {Boolean.toString(true), Boolean.toString(false)};\r\n cmb.setItems(booleanItems);\r\n cmb.select(1);\r\n if (Boolean.parseBoolean(cellText)) {\r\n cmb.select(0);\r\n }\r\n editControl = cmb;\r\n cmb.addSelectionListener(new SelectionAdapter() {\r\n\r\n @Override\r\n public void widgetSelected(SelectionEvent se) {\r\n Combo text = (Combo) editor.getEditor();\r\n editor.getItem().setText(columnValueIndex, text.getText());\r\n }\r\n });\r\n break;\r\n case DATE:\r\n IReplaceableParam<LocalDateTime> calParam = (IReplaceableParam<LocalDateTime>)editedParam;\r\n LocalDateTime calToUse = calParam.getValue();\r\n Composite dateAndTime = new Composite(tableParams, SWT.NONE);\r\n RowLayout rl = new RowLayout();\r\n rl.wrap = false;\r\n dateAndTime.setLayout(rl);\r\n //Date cellDt;\r\n try {\r\n LocalDateTime locDT = LocalDateTime.parse(cellText, dtFmt);\r\n if (locDT != null) {\r\n calToUse = locDT;\r\n }\r\n /*cellDt = dateFmt.parse(cellText);\r\n if (cellDt != null) {\r\n calToUse.setTime(cellDt);\r\n }*/\r\n } catch (DateTimeParseException e1) {\r\n log.error(\"widgetSelected \", e1);\r\n }\r\n\r\n DateTime datePicker = new DateTime(dateAndTime, SWT.DATE | SWT.MEDIUM | SWT.DROP_DOWN);\r\n datePicker.setData(DATA_VALUE_PARAM, calParam);\r\n DateTime timePicker = new DateTime(dateAndTime, SWT.TIME | SWT.LONG);\r\n timePicker.setData(DATA_VALUE_PARAM, calParam);\r\n // for the date picker the months are zero-based, the first month is 0 the last is 11\r\n // for LocalDateTime the months range 1-12\r\n datePicker.setDate(calToUse.getYear(), calToUse.getMonthValue() - 1,\r\n calToUse.getDayOfMonth());\r\n timePicker.setTime(calToUse.getHour(), calToUse.getMinute(),\r\n calToUse.getSecond());\r\n\r\n datePicker.addSelectionListener(new SelectionAdapter() {\r\n\r\n @Override\r\n public void widgetSelected(SelectionEvent se) {\r\n DateTime source = (DateTime)se.getSource();\r\n IReplaceableParam<LocalDateTime> calParam1 = (IReplaceableParam<LocalDateTime>)source.getData(DATA_VALUE_PARAM);\r\n if (calParam1 != null) {\r\n LocalDateTime currDt = calParam1.getValue();\r\n // for the date picker the months are zero-based, the first month is 0 the last is 11\r\n // for LocalDateTime the months range 1-12\r\n calParam1.setValue(currDt.withYear(source.getYear()).withMonth(source.getMonth() + 1).withDayOfMonth(source.getDay()));\r\n String resultText = dtFmt.format(calParam1.getValue());\r\n log.debug(\"Result Text \" + resultText);\r\n editor.getItem().setText(columnValueIndex, resultText);\r\n } else {\r\n log.warn(\"widgetSelected param is null\");\r\n }\r\n }\r\n\r\n });\r\n timePicker.addSelectionListener(new SelectionAdapter() {\r\n\r\n @Override\r\n public void widgetSelected(SelectionEvent se) {\r\n DateTime source = (DateTime)se.getSource();\r\n IReplaceableParam<LocalDateTime> calParam1 = (IReplaceableParam<LocalDateTime>)source.getData(DATA_VALUE_PARAM);\r\n if (calParam1 != null) {\r\n LocalDateTime currDt = calParam1.getValue();\r\n calParam1.setValue(currDt.withHour(source.getHours()).withMinute(source.getMinutes()).withSecond(source.getSeconds()));\r\n String resultText = dtFmt.format(calParam1.getValue());\r\n log.debug(\"Result Text \" + resultText);\r\n editor.getItem().setText(columnValueIndex, resultText);\r\n } else {\r\n log.warn(\"widgetSelected param is null\");\r\n }\r\n }\r\n\r\n });\r\n dateAndTime.layout();\r\n editControl = dateAndTime;\r\n break;\r\n case INTEGER:\r\n Text intEditor = new Text(tableParams, SWT.NONE);\r\n intEditor.setText(item.getText(columnValueIndex));\r\n intEditor.selectAll();\r\n intEditor.addModifyListener(new ModifyListener() {\r\n @Override\r\n public void modifyText(ModifyEvent se) {\r\n Text text = (Text) editor.getEditor();\r\n Integer resultInt = null;\r\n try {\r\n resultInt = Integer.parseInt(text.getText());\r\n } catch (NumberFormatException nfe) {\r\n log.error(\"NFE \", nfe);\r\n }\r\n if (resultInt != null) {\r\n editor.getItem().setText(columnValueIndex, resultInt.toString());\r\n }\r\n }\r\n });\r\n editControl = intEditor;\r\n break;\r\n case STRING:\r\n default:\r\n Text newEditor = new Text(tableParams, SWT.NONE);\r\n newEditor.setText(item.getText(columnValueIndex));\r\n newEditor.setFont(tableParams.getFont());\r\n newEditor.selectAll();\r\n newEditor.addModifyListener(new ModifyListener() {\r\n @Override\r\n public void modifyText(ModifyEvent se) {\r\n Text text = (Text) editor.getEditor();\r\n editor.getItem().setText(columnValueIndex, text.getText());\r\n }\r\n });\r\n editControl = newEditor;\r\n break;\r\n }\r\n\r\n editControl.setFont(tableParams.getFont());\r\n editControl.setFocus();\r\n editor.setEditor(editControl, item, columnValueIndex);\r\n }\r\n }\r\n });\r\n\r\n\r\n btnOK = new Button(shell, SWT.NONE);\r\n btnOK.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_btnOK = new FormData();\r\n fd_btnOK.bottom = new FormAttachment(100, -7);\r\n fd_btnOK.right = new FormAttachment(40, 2);\r\n fd_btnOK.top = new FormAttachment(100, -35);\r\n fd_btnOK.left = new FormAttachment(15, 2);\r\n btnOK.setLayoutData(fd_btnOK);\r\n btnOK.setText(\"OK\");\r\n btnOK.addSelectionListener(new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(SelectionEvent e) {\r\n result = new DialogResult<>(SWT.OK, getParamMap());\r\n shell.close();\r\n }\r\n\r\n });\r\n shell.setDefaultButton(btnOK);\r\n\r\n btnCancel = new Button(shell, SWT.NONE);\r\n btnCancel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_btnCancel = new FormData();\r\n fd_btnCancel.bottom = new FormAttachment(100, -7);\r\n fd_btnCancel.left = new FormAttachment(60, -2);\r\n fd_btnCancel.top = new FormAttachment(100, -35);\r\n fd_btnCancel.right = new FormAttachment(85, -2);\r\n btnCancel.setLayoutData(fd_btnCancel);\r\n btnCancel.setText(\"Cancel\");\r\n btnCancel.addSelectionListener(new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(SelectionEvent e) {\r\n result = new DialogResult<>(SWT.CANCEL, null);\r\n shell.close();\r\n }\r\n\r\n });\r\n tableParams.redraw();\r\n }", "private void makeFrame(){\n frame = new JFrame(\"Rebellion\");\n\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n frame.setSize(800,800);\n\n makeContent(frame);\n\n frame.setBackground(Color.getHSBColor(10,99,35));\n frame.pack();\n frame.setVisible(true);\n }", "private void buildContentPane() {\n\t\t// The JPanel that will become the content pane\n\t\tJPanel cp = new JPanel();\n\t\tcp.setLayout(new BoxLayout(cp, BoxLayout.PAGE_AXIS));\n\n\t\tlanguagePanel = initLanguagePanel();\n\t\tcp.add(languagePanel);\n\n\t\tinputPanel = initInputPanel();\n\t\tcp.add(inputPanel);\n\n\t\tJPanel btnPanel = initBtnPanel();\n\t\tcp.add(btnPanel);\n\n\t\toutputPanel = initOutputPanel();\n\t\tcp.add(outputPanel);\n\n\t\tJPanel picturePanel = initPicturePanel();\n\t\tif(picturePanel == null) {\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_SMALL_HEIGHT);\n\t\t}\n\t\telse {\n\t\t\tcp.add(picturePanel);\n\t\t}\n\n\t\tLanguage selectedLang = languagePanel.getSelectedLanguage();\n\t\tsetLanguage(selectedLang);\n\n\t\tframe.setContentPane(cp);\n\t}", "protected void createContents() throws Exception\n\t{\n\t\tshell = new Shell();\n\t\tshell.setSize(755, 592);\n\t\tshell.setText(\"Impresor - Documentos v1.2\");\n\t\t\n\t\tthis.commClass.centrarVentana(shell);\n\t\t\n\t\tlistComandos = new List(shell, SWT.BORDER | SWT.H_SCROLL | SWT.COLOR_WHITE);\n\t\tlistComandos.setBounds(72, 22, 628, 498);\n\t\tlistComandos.setVisible(false);\n\n//Boton que carga los documentos\t\t\n\t\tButton btnLoaddocs = new Button(shell, SWT.NONE);\n\t\tbtnLoaddocs.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnLoaddocs.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\tloadDocs(false, false);\n\t\t\t}\n\t\t});\n\t\tbtnLoaddocs.setBounds(10, 20, 200, 26);\n\t\tbtnLoaddocs.setText(\"Cargar documentos a imprimir\");\n\t\t\n//Browser donde se muestra el documento descargado\n\t\tbrowser = new Browser(shell, SWT.BORDER);\n\t\tbrowser.setBounds(10, 289, 726, 231);\n\t\tbrowser.addProgressListener(new ProgressListener() \n\t\t{\n\t\t\tpublic void changed(ProgressEvent event) {\n\t\t\t\t// Cuando cambia.\t\n\t\t\t}\n\t\t\tpublic void completed(ProgressEvent event) {\n\t\t\t\t/* Cuando se completo \n\t\t\t\t Se usa para parsear el documento una vez cargado, el documento\n\t\t\t\t puede ser un doc xml que contiene un mensaje de error\n\t\t\t\t o un doc html que dara error de parseo Xml,es decir,\n\t\t\t\t ante este error entendemos que se cargo bien el doc HTML.\n\t\t\t\t Paradojico verdad? */\n\t\t\t\tleerDocumentoCargado();\n\t\t\t}\n\t\t });\n\n///Boton para iniciar impresion\t\t\n\t\tButton btnIniPrintW = new Button(shell, SWT.NONE);\n\t\tbtnIniPrintW.addKeyListener(new KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tiniciarImpresion(null);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnIniPrintW.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tiniciarImpresion(null);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnIniPrintW.setBounds(337, 532, 144, 26);\n\t\tbtnIniPrintW.setText(\"Iniciar impresion\");\n\t\t\n\t\tLabel label = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabel.setBounds(10, 52, 885, 2);\n\t\t\n\t\tButton btnSalir = new Button(shell, SWT.NONE);\n\t\tbtnSalir.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnSalir.addKeyListener(new KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnSalir.setBounds(659, 532, 77, 26);\n\t\tbtnSalir.setText(\"Salir\");\n\t\t\n\t\tthreadLabel = new Label(shell, SWT.BORDER);\n\t\tthreadLabel.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\t//mostrar / ocultar el historial de mensajes\n\t\t\t\tMOCmsgHist();\n\t\t\t}\n\t\t});\n\t\tthreadLabel.setAlignment(SWT.CENTER);\n\t\tthreadLabel.setBackground(new Color(display, 255,255,255));\n\t\tthreadLabel.setBounds(10, 0, 891, 18);\n\t\tthreadLabel.setText(\"\");\n\t\t\n\t\tLabel label_1 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabel_1.setBounds(10, 281, 726, 2);\n\n\t\ttablaDocs = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttablaDocs.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t//PabloGo, 12 de julio de 2013\n\t\t\t\t//verifUltDocSelected(e);\n\t\t\t\tseleccionarItemMouse(e);\n\t\t\t}\n\t\t});\n\t\ttablaDocs.addKeyListener(new KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tseleccionarItem(e);\n\t\t\t}\n\t\t});\n\t\ttablaDocs.setBounds(10, 52, 726, 215);\n\t\ttablaDocs.setHeaderVisible(true);\n\t\ttablaDocs.setLinesVisible(true);\n\t\tcrearColumnas(tablaDocs);\n\t\t\n//Label que muestra los mensajes\n\t\tmensajeTxt = new Label(shell, SWT.NONE);\n\t\tmensajeTxt.setAlignment(SWT.CENTER);\n\t\tmensajeTxt.setBounds(251, 146, 200, 26);\n\t\tmensajeTxt.setText(\"Espere...\");\n\t\t\n//Listado donde se muestran los documentos cargados\n\t\tlistaDocumentos = new List(shell, SWT.BORDER);\n\t\tlistaDocumentos.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t//PabloGo, 12 de julio de 2013\n\t\t\t\t//verifUltDocSelected(e);\n\t\t\t\tseleccionarItemMouse(e);\n\t\t\t}\n\t\t});\n\t\tlistaDocumentos.addKeyListener(new KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tseleccionarItem(e);\n\t\t\t}\n\t\t});\n\t\tlistaDocumentos.setBounds(10, 82, 726, 77);\n\t\t\n\t\tButton btnShowPreview = new Button(shell, SWT.CHECK);\n\t\tbtnShowPreview.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseUp(MouseEvent e) {\n\t\t\t\tif (((Button)e.getSource()).getSelection()){\n\t\t\t\t\tmostrarPreview = true;\n\t\t\t\t}else{\n\t\t\t\t\tmostrarPreview = false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnShowPreview.setBounds(215, 28, 118, 18);\n\t\tbtnShowPreview.setText(\"Mostrar preview\");\n\t\t\n\t\tButton btnAutoRefresh = new Button(shell, SWT.CHECK);\n\t\tbtnAutoRefresh.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseUp(MouseEvent e) {\n\t\t\t\tif (((Button)e.getSource()).getSelection()){\n\t\t\t\t\tautoRefresh = true;\n\t\t\t\t\tbeginTarea();\n\t\t\t\t}else{\n\t\t\t\t\tautoRefresh = false;\n\t\t\t\t\tponerMsg(\"Carga automática desactivada\");\n\t\t\t\t\tfinishTarea();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnAutoRefresh.setBounds(353, 28, 128, 18);\n\t\tbtnAutoRefresh.setText(\"Recarga Automática\");\n\t\t\n\t\ttareaBack(this, autoRefresh).start();\n\t\tloadDocs(false, false);\n\t}", "private static void createAndShowGUI() {\n //Create and set up the window.\n JFrame frame = new JFrame(\"FrameDemo\");\n frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n\n //main input TextArea\n JTextArea mainIn = new JTextArea(\"Type your Command here.\", 3, 1);\n \n //main Output Display Displays htmlDocuments\n JTextPane mainOut = new JTextPane(new HTMLDocument());\n mainOut.setPreferredSize(new Dimension(800, 600));\n \n //add components to Pane\n frame.getContentPane().add(mainOut);\n frame.getContentPane().add(mainIn);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "private void buildAndShowWindow() {\n SwingUtilities.invokeLater(() -> {\n buildWindow().setVisible(true);\n });\n }", "private static void createAndShowGUI() {\n\t\tint width = 500, height = 300;\n\t\tJFrame frame = new JFrame(\"Text File Reader\");\n\t\tframe.setSize(new Dimension(width, height));\n\t\tframe.setContentPane(new MainExecutor(width, height)); /* Adds the panel to the frame */\n\n\t\t/* Centralizing the frame */\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tint upperLeftCornerX = (screenSize.width - frame.getWidth()) / 2;\n\t\tint upperLeftCornerY = (screenSize.height - frame.getHeight()) / 2;\n\t\tframe.setLocation(upperLeftCornerX, upperLeftCornerY);\n\t\tframe.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n\n\t\t/* Shows the GUI */\n\t\tframe.setVisible(true);\n\t}", "public void createContents(Composite parent) {\n\t\tparent.setLayout(new FillLayout());\n\t\tfMainSection = fToolkit.createSection(parent, Section.TITLE_BAR);\n\n\t\tComposite mainComposite = fToolkit.createComposite(fMainSection, SWT.NONE);\n\t\tfToolkit.paintBordersFor(mainComposite);\n\t\tfMainSection.setClient(mainComposite);\n\t\tmainComposite.setLayout(new GridLayout(1, true));\n\t\t\n\t\tcreateClassListViewer(mainComposite);\n\t\tcreateBottomButtons(mainComposite);\n\t\tcreateTextClientComposite(fMainSection);\n\t}", "public void createAndShowGUI() {\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n //Create and set up the window.\n\tif(open==0)\n\t\tframe = new JFrame(\"Open a file\");\n\telse if(open ==1)\n\t\tframe = new JFrame(\"Save file as\");\n //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane =this ;\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n // frame.setSize(500,500);\n//\tvalidate();\n }", "private static void createWindow(){\n try{\n\n displayMode = new DisplayMode(1600 ,900);\n Display.setDisplayMode(displayMode);\n\n /*\n Display.setDisplayMode(getDisplayMode(1920 ,1080,false));\n if(displayMode.isFullscreenCapable()){\n Display.setFullscreen(true);\n }else{\n Display.setFullscreen(false);\n }\n */\n Display.setTitle(\"CubeKraft\");\n Display.create();\n }catch (Exception e){\n for(StackTraceElement s: e.getStackTrace()){\n System.out.println(s.toString());\n }\n }\n }", "public void CreateTheFrame()\n {\n setSize(250, 300);\n setMaximumSize( new Dimension(250, 300) );\n setMinimumSize(new Dimension(250, 300));\n setResizable(false);\n\n pane = getContentPane();\n insets = pane.getInsets();\n\n // Apply the null layout\n pane.setLayout(null);\n }", "public Scene Window(){\n Area.setPrefHeight(177);\n Area.setPrefWidth(650);\n Area.setOpacity(0.5);\n Area.setEditable(false);\n Area.setText(\"\\n\\nThe application is used for PV(photovoltaics) sizing to power a RO(Reverse osmosis) desalination unit\" +\n \"\\nThe system depends on batteries to store energy.\" +\n \"\\n\\nTo use this application without problems, you must have the following information\\n\" +\n \"\\t*The location of the desalination unit;\\n\" +\n \"\\t*Amount of power required to operate the unit in kilowatts;\\n\" +\n \"\\t*Time of operating for RO;\\n\" +\n \"\\t*Detailed specification information of the pv modules;\\n\" +\n \"\\t*The number of people the Ro unit will provide water for,and the average water consumption for regular person\");\n\n boxPane.setPrefHeight(44);\n boxPane.setPrefWidth(650);\n\n //Go user map selection interface\n nextWindow.setPrefHeight(30);\n nextWindow.setPrefWidth(300);\n nextWindow.setMnemonicParsing(false);\n nextWindow.setText(\"NEXT\");\n\n\n //HBox.setMargin(nextWindow, new Insets(5,0,5,0));\n // boxPane.getChildren().addAll(nextWindow);\n boxPane.setAlignment(Pos.CENTER);\n\n //Load text area and button to the container\n rootPane.setCenter(Area);\n rootPane.setBottom(boxPane);\n\n scene = new Scene(rootPane,640,300);\n return scene;\n }", "private static void createAndShowGUI() {\n\t\t//Create and set up the window.\n\t\tJFrame frame = new JFrame(\"Color test\");\n\t\tframe.setPreferredSize(new Dimension(700, 700));\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t//Create and set up the content pane.\n\t\tJComponent newContentPane = new ColorTest();\n\t\tnewContentPane.setOpaque(true); //content panes must be opaque\n\t\tframe.setContentPane(newContentPane);\n\n\t\t//Display the window.\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t}" ]
[ "0.78568476", "0.770408", "0.77024", "0.75711876", "0.747748", "0.7446512", "0.7418617", "0.74041", "0.7305366", "0.72465086", "0.7217618", "0.7171157", "0.71683043", "0.7142865", "0.71213007", "0.71075344", "0.7094211", "0.7083325", "0.707515", "0.69683087", "0.69569373", "0.69435936", "0.69432276", "0.69396424", "0.6924243", "0.6895419", "0.6850218", "0.68276834", "0.68074876", "0.68025005", "0.67898977", "0.67841756", "0.67757124", "0.674601", "0.67445385", "0.6740135", "0.6739461", "0.6706772", "0.6685774", "0.66814446", "0.66730106", "0.66603976", "0.6653801", "0.66439974", "0.6635548", "0.6622658", "0.66165483", "0.6613815", "0.66127455", "0.6610833", "0.6604642", "0.6603116", "0.65947884", "0.6588881", "0.65808713", "0.65702486", "0.6568938", "0.6566003", "0.65533143", "0.6551275", "0.65337104", "0.6527361", "0.65089124", "0.6486221", "0.64831036", "0.6473845", "0.6466729", "0.64224565", "0.6418808", "0.64153755", "0.63810664", "0.6373637", "0.6366111", "0.63491476", "0.63487905", "0.63265365", "0.6324279", "0.6314956", "0.63062686", "0.6295113", "0.6278655", "0.6273466", "0.62667793", "0.6245354", "0.6240118", "0.62346804", "0.62346417", "0.6215663", "0.62077373", "0.620583", "0.6200544", "0.6182369", "0.61820024", "0.61793536", "0.61787826", "0.6165086", "0.6160475", "0.6158696", "0.6157515", "0.615536", "0.6149862" ]
0.0
-1
Created by zhujianheng on 6/1/16.
public interface ApiService { /** * 问题列表 * @param city * @return */ @GET(URLs.QUESTIONS) Call<Result<ArrayList<Question>>> questions(@Query("city") String city); /** * 用户登录 * @param mobile * @param password * @return */ @FormUrlEncoded @POST(URLs.LOGIN) Call<Result<User>> login(@Field("mobile") String mobile, @Field("password") String password); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@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\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}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n public void func_104112_b() {\n \n }", "public void mo38117a() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "public final void mo51373a() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void memoria() {\n \n }", "private void poetries() {\n\n\t}", "private void init() {\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 void kk12() {\n\n\t}", "@Override\n\tprotected void interr() {\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 einkaufen() {\n\t}", "@Override\n protected void getExras() {\n }", "public void mo6081a() {\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\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void init() {\n\n\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void emprestimo() {\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}", "@Override\n public void init() {\n }", "@Override\n protected void initialize() \n {\n \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}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "private zza.zza()\n\t\t{\n\t\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "private void m50366E() {\n }", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public void mo9848a() {\n }", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "protected void mo6255a() {\n }", "public void mo12628c() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public void mo12930a() {\n }", "public void baocun() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }" ]
[ "0.6316391", "0.62598467", "0.61403024", "0.6136913", "0.6112278", "0.6112278", "0.6078009", "0.6073088", "0.6050938", "0.6041363", "0.60026836", "0.59875405", "0.59864587", "0.59843457", "0.5949988", "0.59275377", "0.59264106", "0.59181553", "0.5907238", "0.5898688", "0.5881366", "0.58793783", "0.58765364", "0.58544296", "0.58544296", "0.5847597", "0.5843583", "0.5832546", "0.5831583", "0.58207124", "0.5804811", "0.5794055", "0.57899696", "0.5765781", "0.5765781", "0.5765781", "0.5765781", "0.5765781", "0.5759097", "0.5755702", "0.57485706", "0.57485706", "0.57485706", "0.57485706", "0.57485706", "0.57485706", "0.57485706", "0.5739518", "0.5730235", "0.5723516", "0.57136995", "0.57136995", "0.57136995", "0.5713646", "0.5712919", "0.5683087", "0.5683087", "0.5682138", "0.5679648", "0.5677671", "0.56720936", "0.56720936", "0.56720936", "0.56630313", "0.566235", "0.5661577", "0.5661577", "0.5661577", "0.56611776", "0.5649552", "0.56265205", "0.5621556", "0.5612757", "0.5609306", "0.560661", "0.5601299", "0.5596239", "0.55842066", "0.5583572", "0.55809045", "0.5564645", "0.5564645", "0.55596614", "0.55593014", "0.55592805", "0.55527616", "0.5545937", "0.55399585", "0.5538744", "0.55341643", "0.55315995", "0.55315113", "0.55308473", "0.5525909", "0.55230653", "0.55219436", "0.5518625", "0.5518457", "0.55116254", "0.55116254", "0.5510385" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.splash, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View arg0) { prTab.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.grid_selected_bg)); if(Constants.connect.isConnectingToInternet(context)){ new RetrievePRList().execute(""); } else { Toast.makeText(context, Constants.NO_CONNECTION, Toast.LENGTH_LONG).show(); prTab.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.grid_bg)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { poTab.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.grid_selected_bg)); if(Constants.connect.isConnectingToInternet(context)){ new RetrievePOApproval().execute(""); } else { Toast.makeText(context, Constants.NO_CONNECTION, Toast.LENGTH_LONG).show(); poTab.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.grid_bg)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
a list of all items.
public static Items[] listAllItems() { List<Items> items = dao().listAllItems(); return items.toArray(new Items[items.size()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void listAllItems() {\n\t\t\n\t}", "public ArrayList<Item> getAllItems(){\n\t\treturn itemList; \n\t}", "public List<Item> getAllItems() {\r\n \t\tList<Item> items = persistenceManager.getAllItems();\r\n \t\tCollections.sort(items, Comparators.ITEM_COMPARATOR);\r\n \t\treturn items;\r\n \t}", "public List<Item> getAll()\r\n {\r\n\r\n CriteriaQuery<Item> criteria = this.entityManager\r\n .getCriteriaBuilder().createQuery(Item.class);\r\n return this.entityManager.createQuery(\r\n criteria.select(criteria.from(Item.class))).getResultList();\r\n }", "public List<BaseObject> getAllItems() {\n ArrayList<BaseObject> list = new ArrayList<BaseObject>(ufos);\n list.add(ship);\n list.addAll(bombs);\n list.addAll(rockets);\n return list;\n }", "public List<T> items() {\n return items;\n }", "private static List<Item> getItems() {\n\t\treturn items;\n\t}", "public List<Items> list() {\n\t\treturn itemDao.list();\r\n\t}", "@Override\n public String[] listAll() {\n return list();\n }", "@Override\r\n\t\tpublic List<Item> getItems() {\n\t\t\treturn null;\r\n\t\t}", "public List<Item> getAllItemsAvailable();", "public List<Item> listItems() {\n return this.items;\n }", "public static List<Item> findAll() {\n\t\treturn getPersistence().findAll();\n\t}", "public List<K> getItems() {\n\t\t\treturn items;\n\t\t}", "public List<Item> getItems() {\n return items;\n }", "public List<Item> getItems() {\n return items;\n }", "public List<Item> getItemList();", "public List<Item> getAllItems() {\r\n\t\tList<Item> itemList = new ArrayList<Item>();\r\n\t\tif(this.itemMap != null) {\r\n\t\t\tfor(Category2ItemMap map : this.itemMap) {\r\n\t\t\t\titemList.add(map.getItem());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn itemList;\r\n\t}", "@Override\n public List<Item> viewAllItems() {\n // calls List<Item> itemRepo.findCatalog();\n return itemRepo.findCatalog();\n }", "@Override\n\tpublic List<item> findAll() {\n\t\treturn donkyClientFeign.lista().stream().map(p -> new item(p,1)).collect(Collectors.toList());\n\t}", "java.util.List<com.rpg.framework.database.Protocol.Item> \n getItemsList();", "public List<T> getItems() {\n return SerDes.unmirrorList(getElement().getItems(), getItemClass());\n }", "@Override\n public List<E> allItems() {\n return new ArrayList(graphNodes.keySet());\n }", "public List<Item> getItems(){\n\t\treturn data;\n\t}", "@SuppressWarnings (\"rawtypes\") public java.util.List getItems(){\n return this.items;\n }", "public Item getItems() {\n return items;\n }", "@Override\n public Set<T> getItems() {\n return items;\n }", "public java.util.List<com.rpg.framework.database.Protocol.Item> getItemsList() {\n return items_;\n }", "public List<Item> getItems() {\n\t\treturn this.items;\n\t}", "public ArrayList<Item> getItems()\n {\n return items;\n }", "public Object[] getItems()\n {\n return items.toArray();\n }", "public List<T> getAll() {\n\t\treturn this.getAll(new ArrayList<String>(), false);\n\t}", "public List<Item> getItems() {\n\t\treturn Collections.unmodifiableList(items);\n\t}", "public List<T> getItems() {\n if (items == null) {\n items = this.ejbFacade.findAll();\n }\n return items;\n }", "public List<Item> getItems() {\n return Collections.unmodifiableList(items);\n }", "private void printAllItems() {\n Set<ClothingItem> items = ctrl.getAllItems();\n items.stream().forEach(System.out::println);\n }", "public String[] listItems() {\n \n\t\tif (itemCount==0) {\n\t\t\tSystem.out.println(\"\\tNo items available.\\n\");\n\t\t}\n\t\telse {\n\t\t\tfor(int index = 1; index<=itemCount; index++) {\n VendItem s = stock[index-1];\n itemList[index-1]=(s.getName());\n\t\t\t}\n System.out.println();\n \n }\n return itemList;\n\n }", "public Collection<Item> findAll() {\n\t\tCollection<Item> Items;\n\t\tItems = this.itemRepository.findAll();\n\n\t\treturn Items;\n\t}", "public ArrayList<Item> getAllItems() throws IllegalArgumentException {\r\n\r\n\t\tArrayList<Item> allItems = this.itemMapper.findAll();\r\n\r\n\t\treturn allItems;\r\n\r\n\t}", "public Item[] getList() {\n\t\treturn list;\n\t}", "public ArrayList<Item> getItems() {\r\n\t\treturn items;\r\n\t}", "@Override\n public List<Item> retrieveAllItems() throws VendingMachinePersistenceException {\n loadItemFile();\n List<Item> itemList = new ArrayList<>();\n for (Item currentItem: itemMap.values()) {\n itemList.add(currentItem);\n }\n\n return itemList;\n }", "public ArrayList<Item> getItems() {\n\t\treturn items;\n\t}", "public ArrayList<Item> getItems() {\n\t\treturn items;\n\t}", "public static List getList() {\r\n return Arrays.asList(ALL);\r\n }", "public Item[] getItems() {\n return items.toArray(new Item[0]);\n }", "public List<ReturnItem> getItems() {\n return (List<ReturnItem>) get(\"items\");\n }", "@Nonnull\n\t@Override\n\tpublic NodeCollection getItems() {\n\t\treturn items;\n\t}", "public ArrayList<Collectable> getItems(){\n return items;\n }", "public Item[] getItems() {\n/* 3068 */ if (this.vitems != null) {\n/* 3069 */ return this.vitems.getAllItemsAsArray();\n/* */ }\n/* 3071 */ return emptyItems;\n/* */ }", "public abstract List<T> all();", "public abstract List<Object> getAll();", "public ArrayList<Item> getItems() {\r\n\t\titems.clear();\r\n\t\tCursor cursor = db.query(SkyleConstants.TABLE_ITEMS, allColumns, null, null, null, null, null);\r\n\t\tcursor.moveToFirst();\r\n\t\t\r\n\t\twhile (!cursor.isAfterLast()) {\r\n\t\t\tString ID = cursor.getString(cursor.getColumnIndex(SkyleConstants.KEY_ID));\r\n\t\t\tString type = cursor.getString(cursor.getColumnIndex(SkyleConstants.ITEMS_TYPE));\r\n\t\t\tString date = cursor.getString(cursor.getColumnIndex(SkyleConstants.DATE_NAME));\r\n\t\t\tString path = cursor.getString(cursor.getColumnIndex(SkyleConstants.ITEMS_PATH));\r\n\t\t\t\r\n\t\t\tLog.i(TAG, \"elements: \"+type+\", \"+path);\r\n\t\t\t\r\n\t\t\tItem item = new Item(ID, type, date, path);\t\t\t\r\n\t\t\titems.add(item);\r\n\t\t\tcursor.moveToNext();\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tLog.i(TAG, \"arraylist: \"+items.toString());\r\n\t\treturn items;\r\n\t}", "public List<PlayerItem> getAll();", "public nl.webservices.www.soap.GCRItem[] getItems() {\n return items;\n }", "public java.util.List<com.rpg.framework.database.Protocol.Item> getItemsList() {\n if (itemsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(items_);\n } else {\n return itemsBuilder_.getMessageList();\n }\n }", "public List<IDataSetItem> getItems() {\n return items;\n }", "public Collection<T> getItems() {\r\n return Collections.unmodifiableCollection(items);\r\n }", "public List<T> getAll() {\n return Arrays.asList(buffer);\n }", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "public static List<Item> getItems() {\n\n HttpRequest request = HttpRequest.newBuilder().GET().uri(URI.create(\"http://localhost:8080/item/all\")).setHeader(\"Cookie\", Authenticator.SESSION_COOKIE).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 \"Communication with server failed\";\n }\n if (response.statusCode() != 200) {\n System.out.println(\"Status: \" + response.statusCode());\n }\n\n ObjectMapper mapper = new ObjectMapper();\n mapper.registerModule(new JavaTimeModule());\n List<Item> items = null;\n // TODO handle exception\n try {\n items = mapper.readValue(response.body(), new TypeReference<List<Item>>(){});\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "protected List<View> getItems() {\n return items;\n }", "public String getAllItems(String name){\n return \"\";\n }", "public List<ItemDTO> getItems()\n\t{\t\n\t\tList<ItemDTO> itemsList = new ArrayList<>();\n\t\tfor (ItemData item : items) \n\t\t\titemsList.add(new ItemDTO(item.idItem,item.description,item.price,item.VAT,item.quantitySold));\t\n\t\treturn itemsList;\n\t}", "public List<ItemStack> getItems()\n {\n return items;\n }", "public Item[] getItems()\n {\n return items;\n }", "List<CatalogItem> getAllCatalogItems();", "public final ObservableList<MenuItem> getItems() {\n return items;\n }", "@NotNull\r\n @Contract(pure = true)\r\n public abstract Collection<GuiItem> getItems();", "public List<CatalogoGeneralDTO> getItemsList() {\n\t\treturn itemsList;\n\t}", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "public T[] items();", "public List<GeneralItem> getList() {\n return stList;\n }", "public Map<Integer, Item> getAllItems() {\n\t\treturn hashOperations.entries(KEY);\n\t}", "public java.util.List<java.lang.Integer>\n getItemsList() {\n return items_;\n }", "public ArrayList<Item> getList() {\r\n\t\treturn inventory;\r\n\t}", "public DesktopClient printItemList() {\n String uri = \"http://localhost:8080/api/items\";\n RestTemplate restTemplate = new RestTemplate();\n ResponseEntity<Item[]> result = restTemplate.getForEntity(uri, Item[].class);\n Item[] items = result.getBody();\n List<Item> itemList = new ArrayList<>();\n if (items != null) {\n itemList.addAll(Arrays.asList(items));\n\n for (Item item :\n itemList) {\n System.out.println(item.toString());\n }\n } else {\n System.out.println(\"Didn't get items.\");\n }\n\n return this;\n }", "@Override\n\tpublic List<Estadoitem> listar() {\n\t\treturn estaitemdao.listar();\n\t}", "@Override\n\tpublic List<User> getAllItem() {\n\t\treturn userRepository.findAll();\n\t}", "@Override\r\n\tpublic List<?> getAll() {\n\t\treturn null;\r\n\t}", "public java.util.List<java.util.Map<String,AttributeValue>> getItems() {\n \n return items;\n }", "public List<Item> getAll() {\r\n List<Item> list = new ArrayList<Item>();\r\n //Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n\r\n try {\r\n //trans = session.beginTransaction();\r\n\r\n list = session.createQuery(\"from Item\").list();\r\n\r\n //trans.commit();\r\n } catch (HibernateException e) {\r\n //if (trans != null) { trans.rollback(); }\r\n e.printStackTrace();\r\n } finally {\r\n //session.flush();\r\n session.close();\r\n }\r\n return list;\r\n }", "List<PricedItem> getItems() {\n return Collections.unmodifiableList(items);\n }", "public ArrayList<ToDoList> getAllItems() {\n ArrayList<ToDoList> itemsList = new ArrayList<ToDoList>();\n String selectQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n ToDoList item = new ToDoList(cursor.getString(1), cursor.getString(2), cursor.getInt(0));\n itemsList.add(item);\n } while (cursor.moveToNext());\n }\n return itemsList;\n }", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();", "public String getItems(String name){\n return \"\";\n }", "private void getItems() {\n getComputers();\n getPrinters();\n }", "public ArrayList<Item> getItemList() {\n return this.items;\n }", "ArrayList<E> getAll();", "public @NotNull Set<Item> findAllItems() throws BazaarException;", "public ArrayList<Thing> getThings()\r\n {\r\n \tArrayList<Thing> inventory = new ArrayList<Thing>();\r\n \tfor (int i=0; i<items.size(); i++)\r\n \t\tinventory.add(items.get(i));\r\n \treturn inventory;\r\n }", "public java.util.List<java.util.Map<String, AttributeValue>> getItems() {\n return items;\n }", "@Override\n\t\tpublic boolean areAllItemsEnabled() {\n\t\t\treturn true;\n\t\t}", "public synchronized List<Item> getItems()\n\t{\n\t\t/**\n\t\t * TODO Q: Deep copy override clone in Item?\n\t\t * pre-condition: List not null;\n\t\t * Invariant:size list of active items cannot more than server capacity\n\t\t * post-condition:return the copy of items in the list.\n\t\t * Exception: list size more than server capacity.\n\t\t */\n\t\t// TODO: IMPLEMENT CODE HERE\n\t\t// Some reminders:\n\t\t// Don't forget that whatever you return is now outside of your control.\n\t\treturn new ArrayList<>(itemsUpForBidding);\n\t}", "@SuppressWarnings(\"unchecked\")\n public <T> List<T> list() {\n return (List<T>) journal\n .retrieve(BarbelQueries.all(id), queryOptions(orderBy(ascending(BarbelQueries.EFFECTIVE_FROM))))\n .stream().map(d -> processingState.expose(context, (Bitemporal) d)).collect(Collectors.toList());\n }", "private List getList() {\n if(itemsList == null) {\n itemsList = new ArrayList<>();\n }\n return itemsList;\n }" ]
[ "0.7921071", "0.7896998", "0.78265333", "0.7793254", "0.7711429", "0.76923794", "0.76421154", "0.76256424", "0.7518444", "0.74796253", "0.7475333", "0.746717", "0.7418141", "0.7407078", "0.7386788", "0.7386788", "0.73585826", "0.7342663", "0.73229015", "0.73157215", "0.7311983", "0.7301073", "0.72977716", "0.729456", "0.72695434", "0.7261415", "0.72382617", "0.7197353", "0.71937394", "0.71786237", "0.7167454", "0.71597093", "0.7111698", "0.71023786", "0.7095624", "0.70888484", "0.7080118", "0.7072526", "0.7068952", "0.7068098", "0.70313597", "0.70151454", "0.7013342", "0.7013342", "0.6991593", "0.69853705", "0.69743824", "0.69700396", "0.6964457", "0.6959524", "0.69522864", "0.69481814", "0.6936956", "0.6936526", "0.6914323", "0.6913959", "0.69125897", "0.6910065", "0.69080347", "0.6902341", "0.68914956", "0.6870926", "0.68652403", "0.68596786", "0.6837896", "0.6834627", "0.6796101", "0.67947453", "0.679056", "0.6782497", "0.67565185", "0.6749475", "0.67369145", "0.67317796", "0.67286485", "0.6710735", "0.6709", "0.6706313", "0.6694368", "0.66938514", "0.6688766", "0.6673092", "0.6667411", "0.66619104", "0.66604453", "0.66604453", "0.66604453", "0.66604453", "0.66604453", "0.66508615", "0.66363883", "0.66326356", "0.66300654", "0.66217667", "0.6619781", "0.66160196", "0.6611045", "0.66064936", "0.66042185", "0.66027665" ]
0.77755314
4
details of a particular item.
public static Items listItemDetails(final int argItemId) { Items item = dao().listItemDetails(argItemId); return item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getItemDetailName() {\n return itemDetailName;\n }", "public String getItemInformation()\n {\n return this.aDescription + \" qui a un poids de \" + this.aWeight;\n\n }", "public synchronized String getItemDetails(){\n \tString s = \"\\n========================================\";\n \ts += \"\\nID: \"+ ID;\n \ts += \"\\nName: \"+ item_name;\n \ts += \"\\nStarting Price: \"+ start_price;\n \ts += \"\\nNumber Of bidders: \" + bids.size();\n \ts += \"\\n status: \" + status;\n\n \tif(status == \"open\"){\n \t\tif(last_bidder == null){\n \t\t\t\ts += \"\\nLast Bidder: No bids yet\";\n \t\t}else{\n \t\t\ts += \"\\n last_bidder: \"+ last_bidderName;\n \t\t}\n \t}else if(status == \"closed\"){\n \t\tif(last_bidder == null){\n \t\t\t\ts += \"\\nLast Bidder: Closed with No bids\";\n \t\t}else{\n \t\t\ts += \"\\n Won by: \"+ last_bidderName +\" at price of \"+ start_price;\n \t\t}\n \t}\n \ts += \"\\n========================================\";\n return s;\n }", "public String getInfo()\r\n\t{\r\n\t\treturn theItem.getNote();\r\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tItemDetails itemDetails = (ItemDetails) list.getAdapter()\n\t\t\t\t\t\t.getItem(arg2);\n\n\t\t\t\tnew AlertDialog.Builder(FindAProductActivity.this)\n\t\t\t\t\t\t.setTitle(\"Information:\")\n\t\t\t\t\t\t.setMessage(\"\" + itemDetails.getName())\n\t\t\t\t\t\t.setIcon(android.R.drawable.ic_dialog_info)\n\t\t\t\t\t\t.setNeutralButton(\"OK\", null).show();\n\n\t\t\t\t// Bundle bundle = new Bundle();\n\t\t\t\t// bundle.putSerializable(\"ItemDetails\", itemDetails);\n\t\t\t\t// i.putExtras(bundle);\n\t\t\t\t// startActivity(i);\n\t\t\t}", "public String showItemInfo()\n {\n return \"The room has 1 \" + currentItem.getDescription() \n + \" weighted \" + currentItem.getWeight() + \" pounds\"; \n }", "public ItemInfoDTO getItemInfo() {\n return itemInfo;\n }", "public String getItemDesc() {\n return itemDesc;\n }", "public String getItem()\n {\n // put your code here\n return \"This item weighs: \" + weight + \"\\n\" + description + \"\\n\";\n }", "public String getItemDescription() {\n return itemDescription;\n }", "public Integer getItemDetailId() {\n return itemDetailId;\n }", "public interface MeleteItemDetail\n{\n\t/**\n\t * @return The item's status.\n\t */\n\tItemAccessStatus getAccessStatus();\n\n\t/**\n\t * @return The close date.\n\t */\n\tDate getCloseDate();\n\n\t/**\n\t * @return A display title for the section's module.\n\t */\n\tString getModuleTitle();\n\n\t/**\n\t * @return The number of \"Student\" participants who have viewed this section. TODO: drop\n\t */\n\tInteger getNumViewed();\n\n\t/**\n\t * @return The open date.\n\t */\n\tDate getOpenDate();\n\n\t/**\n\t * @return The percent (0..100) of \"Student\" participants who have viewed this section.\n\t */\n\tInteger getPctViewed();\n\n\t/**\n\t * @return A display title for the section.\n\t */\n\tString getTitle();\n\n\t/**\n\t * @return The total number of \"Student\" participants who have access to this section. TODO: drop\n\t */\n\tInteger getTotal();\n}", "public BoxItem.Info getItem() {\n return this.item;\n }", "private void inspectItem(String item)//Made by Lexi\n {\n itemFound = decodeItem(item);\n if (itemFound == null)\n {\n System.out.println(\"I don't know of any \" + item + \".\");\n }\n else\n {\n System.out.println(\"The item is: \" + itemFound.getTitle());\n System.out.println(\"Description of the item: \" + itemFound.getDescription());\n System.out.println(\"Item Weight: \" + itemFound.getWeight());\n System.out.println(\"Room item was found in: \" + itemFound.getLocation().getTitle());\n }\n }", "public String getItemDescription() {\r\n\t\treturn itemDescription;\r\n\t}", "public void handleGetItemDetailsButtonAction(ActionEvent event) {\n String itemID = updateItemItemID.getText();\n try{\n //get the details from mgr\n HashMap itemInfo = updateMgr.getItemInfo(itemID);\n //display on the fields\n updateItemTitle.setText((String)itemInfo.get(Table.BOOK_TITLE));\n updateItemAuthor.setText((String)itemInfo.get(Table.BOOK_AUTHOR));\n updateItemDescription.setText((String)itemInfo.get(Table.BOOK_DESCRIPTION));\n updateItemPublishDate.setText(formatDateString((Calendar)itemInfo.get(Table.BOOK_DATE)));\n updateItemISBN.setText((String)itemInfo.get(Table.BOOK_ISBN));\n updateItemGenre.setText((String)itemInfo.get(Table.BOOK_GENRE));\n //enable item info pane\n updateItemInfoPane.setDisable(false);\n this.tempItemID = itemID;\n }\n catch(ItemNotFoundException | SQLException | ClassNotFoundException e){\n this.displayWarning(\"Error\", e.getMessage());\n } catch (Exception ex) {\n this.displayWarning(\"Error\", ex.getMessage());\n } \n }", "void displayDetails(String title, String description);", "public String getDetail() {\r\n return detail;\r\n }", "public String getDetail() {\r\n return detail;\r\n }", "public String getItem() {\r\n return item;\r\n }", "public String getDetail()\n {\n return detail;\n }", "public String getDetail() {\n return detail;\n }", "public String getDetail() {\n return detail;\n }", "public String getDetail() {\n return detail;\n }", "public String getDetail() {\n return detail;\n }", "Object getViewDetails();", "public Item getItem() { \n return myItem;\n }", "public String getItem() {\r\n\t\treturn item;\r\n\t}", "@Override\n\tpublic Object getDetails() {\n\t\treturn details;\n\t}", "public String getDescription() {return \"Use an item in your inventory\"; }", "@Override\n public void onItemClick(View view, int position) {\n try {\n\n getItemInfo(view, position);\n\n } catch (Exception e) {\n\n }\n// String details=menuItems.get(position).getF1();\n// if(details!= null)\n// updateItemsDetails(details,view,position);\n\n\n }", "@Override\n\tpublic ItemDescription getItemDescription() {\n\t\tItemDescription item = new ItemDescription();\n\t\titem.title = \"电池充电测试\";\n\t\titem.board = \"通用\";\n\t\titem.desc = \"电池充电\";\n\t\treturn item;\n\t}", "public ItemInfo(int itemID, Sprite sprite, String name, String description) {\n\t\tid = itemID;\n\t\tthis.sprite = sprite;\n\t\tthis.name = name;\n\t}", "@Override\n public String toString()\n {\n final StringBuilder sb = new StringBuilder(\"Item{\");\n sb.append(\"id=\").append(id);\n sb.append(\", userId=\").append(userId);\n sb.append(\", listId=\").append(listId);\n sb.append(\", positionIndex=\").append(positionIndex);\n sb.append(\", title='\").append(title).append('\\'');\n sb.append(\", body='\").append(body).append('\\'');\n sb.append('}');\n return sb.toString();\n }", "public String getDetails() {\n return this.details;\n }", "public Item getItem() {\n return item;\n }", "public Item getItem() {\n return item;\n }", "@Override\n\tpublic void descriere() {\n\t\tSystem.out.println(\"Item: \"+this.numeSectiune);\n\t}", "public Item getItem ()\n\t{\n\t\treturn item;\n\t}", "@Override\n\tpublic ItemInfoWrap getItemInfoByItemId(long itemId) {\n\t\tString httpClientResult = HttpClientUtil.doGet(HTTPCLIENTURL + HTTPCLIENTITEMINFO + itemId);\n\t\tItemInfoWrap jsonToPojo = JsonUtils.jsonToPojo(httpClientResult, ItemInfoWrap.class);\n\t\treturn jsonToPojo;\n\t}", "Identifiable item();", "public int getITEM() {\r\n return item;\r\n }", "public Item getItem() {\n\t\treturn this.item;\n\t}", "public Item getItem() {\n\t\treturn this.item;\n\t}", "public String getDetails() {\n return details;\n }", "abstract String getDetails();", "public void setItemDetailName(String itemDetailName) {\n this.itemDetailName = itemDetailName;\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Item [UID=\" + UID + \", TITLE=\" + TITLE + \", NOOFCOPIES=\" + NOOFCOPIES + \"]\";\r\n\t}", "public Item getItem() {\n\t\treturn item;\n\t}", "public Item getItem() {\r\n\t\treturn this.item;\r\n\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(mContext, ItemDetailsActivity.class);\n\n intent.putExtra(\"name\", modellist.get(postition).getTitle());\n intent.putExtra(\"picture\", modellist.get(postition).getType() + postition);\n intent.putExtra(\"cost\", modellist.get(postition).getCost());\n intent.putExtra(\"id\", modellist.get(postition).getId());\n intent.putExtra(\"description\", modellist.get(postition).getDescription());\n intent.putExtra(\"extra\", modellist.get(postition).getExtra());\n\n mContext.startActivity(intent);\n// Toast.makeText(mContext, \"Make the user see the details of the item\", Toast.LENGTH_SHORT).show();\n }", "public jkt.hms.masters.business.MasStoreItem getItem () {\n\t\treturn item;\n\t}", "@Override\n\tpublic void getDetail() {\n\t\t\n\t}", "public String getItemTitle() {\n\t return this.itemTitle;\n\t}", "@Override\n public String toString() {\n return detail;\n }", "public int getItemID()\n {\n return itemID;\n }", "public String getDetails() {\n\t\treturn details;\n\t}", "public String getDetails() {\n\t\treturn details;\n\t}", "public abstract String showDetails();", "@Override\n public Object getItem(int index) {\n return listInfo.get(index);\n }", "public SpItem getItem() {\n return _spItem;\n }", "java.lang.String getDetails();", "public String getDetails() {\n return toString();\n }", "public String getItemName()\n {\n return itemName;\n }", "public String getDescription() {\n return ACTION_DETAILS[id][DESC_DETAIL_INDEX];\n }", "public Item getItem() {\n return mItem;\n }", "@Override\n\tpublic void showDetails(Manufacturer entity) {\n\n\t}", "public void itemClick(ItemClickEvent event) {\n \t\tAccount account = ((BeanItemContainer<Account>) accountList\n \t\t\t\t.getContainerDataSource()).getItem(event.getItemId()).getBean();\n \t\tAccountView accountView = new AccountView(account);\n \t\tgetNavigationManager().navigateTo(accountView);\n \t\t((CrmApp) getApplication()).showDetails(account);\n \t\tgetNavigationManager().addListener(new NavigationListener() {\n \t\t\tpublic void navigate(NavigationEvent event) {\n \t\t\t\t((CrmApp) getApplication()).hideDetails();\n \t\t\t}\n \t\t});\n \t}", "@Override\n\tpublic void viewItem() {\n\t\t\n\t}", "@Override\r\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Item item = items.get(position);\r\n\r\n //create a bundle object and add data to present in the details activity\r\n Bundle extras = new Bundle();\r\n extras.putInt(\"image\", item.getImageResourceId());\r\n extras.putString(\"title\", item.getTitleResourceId());\r\n extras.putString(\"text\", item.getTextResourceId());\r\n\r\n //create and initialise the intent\r\n Intent detailsIntent = new Intent(getActivity(), DetailsActivity.class);\r\n\r\n //attach the bundle to the intent object\r\n detailsIntent.putExtras(extras);\r\n\r\n //start the activity\r\n startActivity(detailsIntent);\r\n\r\n }", "@Override\r\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Item item = items.get(position);\r\n\r\n //create a bundle object and add data to present in the details activity\r\n Bundle extras = new Bundle();\r\n extras.putInt(\"image\", item.getImageResourceId());\r\n extras.putString(\"title\", item.getTitleResourceId());\r\n extras.putString(\"text\", item.getTextResourceId());\r\n\r\n //create and initialise the intent\r\n Intent detailsIntent = new Intent(getActivity(), DetailsActivity.class);\r\n\r\n //attach the bundle to the intent object\r\n detailsIntent.putExtras(extras);\r\n\r\n //start the activity\r\n startActivity(detailsIntent);\r\n\r\n }", "@Override\n\t\tpublic String toString() {\n\t\t\treturn \"ListItem \" + item;\n\t\t}", "@GetMapping(value=\"/item/view/{itemId}\")\r\n\tpublic ModelAndView itemDetailGetSingle(@PathVariable Long itemId) {\r\n\t\tEbayItem item;\r\n\t\tModelAndView modelAndView = new ModelAndView();\r\n\t\ttry {\r\n\t\t\titem = itemService.getItemForDisplay(itemId, null);\r\n\t\t} catch (Exception e) {\r\n\t\t\tmodelAndView.setViewName(\"redirect:/error\");\r\n\t\t\treturn modelAndView;\r\n\t\t}\r\n\t\tsetUpModelAndView(modelAndView, item);\r\n\t\tmodelAndView.setViewName(\"itemDetail\");\r\n\t\treturn modelAndView;\r\n\t}", "public String getItemID() {\n\t return this.itemID;\n\t}", "protected abstract void onBindDescription(ViewHolder vh, Object item);", "private void showFilmDetails(FilmItem filmItem) {\n if (filmItem != null) {\n // Fill the labels with info from the film object.\n \tString englishName = (filmItem.getEnglishName() == null || filmItem.getEnglishName().isEmpty()) ? \"\" : \" (\" + filmItem.getEnglishName() + \")\";\n nameLabel.setText(filmItem.getName() + englishName);\n yearLabel.setText(filmItem.getYear());\n genreLabel.setText(filmItem.getGenre());\n commentLabel.setText(filmItem.getComment());\n haveViewedLabel.setText(filmItem.getHaveViewed() ? \"Просмотрен\" : \"\");\n if (filmItem.getImageLocation() != null && !filmItem.getImageLocation().isEmpty()) {\n\t\t\t\t//Image img = new Image(\"file://\" + filmItem.getImageLocation());\n \tImage img = new Image(filmItem.getImageLocation());\n\t\t\t\tfilmImageView.setImage(img);\n\t\t\t} else {\n\t\t\t\tfilmImageView.setImage(null);\n\t\t\t}\n } else {\n // Film is null, remove all the text.\n \tnameLabel.setText(\"\");\n yearLabel.setText(\"\");\n genreLabel.setText(\"\");\n commentLabel.setText(\"\");\n haveViewedLabel.setText(\"\");\n filmImageView.setImage(null);\n }\n }", "@Override\n public String toString()\n {\n \treturn getName() + \" (\" + numItem + \")\";\n }", "public String toString() {\n return (\"Item: \" + itemCode + \" \" + itemName + \" \" + itemQuantityInStock + \" price: $\" + df.format(itemPrice) +\" cost: $\"+ df.format(itemCost) + \" farm supplier: \" + farmName);\n }", "@Override\n public Object getItem(int position) {\n return allDetail.get(position);\n }", "private static void summarySingleItem(List<Inventory> inventoryList, String itemId) {\n System.out.println(\"\\nSummary of Single item with id:\" + itemId);\n\n inventoryList.stream()\n .filter(p -> p.getId().equals(itemId))\n .forEach(System.out::println);\n }", "public String getName() {\n return item.getName();\n }", "public String getDetails() {\n if(details == null)\n return \"\";\n else return details;\n }", "public String getDetails() {\n return mDetails;\n }", "public String getDetails() {\n return mDetails;\n }", "public String wantDetail();", "InventoryItem getInventoryItem();", "public RepositoryItem getItem() {\n\t\t\treturn item;\n\t\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn infos.get(position);\n\t\t}", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n Item item = (Item) mItems.get(arg2);\n Intent intent = new Intent(this, ItemDetailActivity.class);\n intent.putExtra(\"TITLE\", item.getTitle());\n intent.putExtra(\"DESCRIPTION\", item.getDescription());\n intent.putExtra(\"DATE\", item.getDate());\n intent.putExtra(\"LINK\", item.getLink());\n startActivity(intent);\n }", "public Item getItem() { return this; }", "public static String display(AssessorDetails item) {\n if (item.getId() == null){\n return item.getValue();\n }\n return item.getId() + \": \" + item.getValue();\n }", "@RequestMapping(value=\"/displayitemdetails.htm\")\n\t@ResponseBody\n\tpublic String displayItemDetails(HttpServletRequest request,HttpServletResponse response) throws Exception{\n\t\tlog.info(\"inside displayItemDetails()\");\n\t\tJSONObject obj=new JSONObject();\n\t\tString error=null;\n\t\ttry{\n\t\t\tJSONObject json=JsonParser.getJson(request, response);\n\t\t\tInteger itemId=json.getInt(\"itemid\");\n\t\t\tSystem.out.println(itemId);\n\t\t\tItemsDto itemsDto=this.itemService.getItemById(itemId);\n\t\t\tSystem.out.println(itemsDto.getItemName());\n\t\t\tJSONObject itemJSON=new JSONObject();\n\t\t\titemJSON.accumulate(\"itemname\", itemsDto.getItemName());\n\t\t\titemJSON.accumulate(\"description\", itemsDto.getDescription());\n\t\t\titemJSON.accumulate(\"manufacturer\", itemsDto.getManufacturer());\n\t\t\titemJSON.accumulate(\"photos\", itemsDto.getPhotos());\n\t\t\titemJSON.accumulate(\"videos\", itemsDto.getVideos());\n\t\t\titemJSON.accumulate(\"ratings\", itemsDto.getRatings());\n\t\t\titemJSON.accumulate(\"itemcategory\", itemsDto.getCategoryId().getCategoryName());\n\t\t\tArrayList<JSONObject> jsonList=new ArrayList<JSONObject>();\n\t\t\tjsonList.add(itemJSON);\n\t\t\t//JSONArray array=new JSONArray(jsonList);\n\t\t\tJSONObject output=new JSONObject();\n\t\t\toutput.accumulate(\"itemdetails\", jsonList);\n\t\t\treturn output.toString();\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(ItemNotFoundException e){\n\t\t\t\n\t\t\tString message=\"Item Not Found\";\n\t\t\tlog.error(message+\"\"+e.toString());\n\t\t\tobj.accumulate(\"status\", message);\n\t\t\treturn obj.toString();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tString message=\"Error While Retrieving Item Details\";\n\t\t\tlog.error(message+\"\"+e.toString());\n\t\t\tobj.accumulate(\"status\", message);\n\t\t\treturn obj.toString();\n\t\t}\n\t}", "io.opencannabis.schema.commerce.OrderItem.Item getItem(int index);", "public Item getItem(final String pItem){return this.aItemsList.getItem(pItem);}", "public String getItemName() {\r\n return itemName;\r\n }", "public String getItemName() {\r\n return itemName;\r\n }", "public String getItemName() {\r\n return itemName;\r\n }", "public void showMovieInfo(MovieItem movie){\n //get houseKeeper in charge of displaying movie item info\n DetailKeeper keeper = (DetailKeeper)mKeeperStaff.getHouseKeeper(DetailHelper.NAME_ID);\n //update View with movie item data\n keeper.updateDetails(movie);\n }", "public synchronized String getDescription(){\n \treturn item_description;\n }", "@Override\n public String storeItem() {\n return \"N/\" + description;\n }" ]
[ "0.72659487", "0.72489727", "0.7235225", "0.71834797", "0.70207274", "0.7010496", "0.68622464", "0.684638", "0.6841649", "0.6834001", "0.6820761", "0.67776275", "0.6744819", "0.6701304", "0.66665816", "0.65841204", "0.65683347", "0.6560602", "0.6560602", "0.65567243", "0.6515528", "0.65008056", "0.65008056", "0.65008056", "0.65008056", "0.64960897", "0.649312", "0.6481994", "0.6467544", "0.646638", "0.6439878", "0.643723", "0.6413386", "0.64132446", "0.6397581", "0.6381489", "0.63701475", "0.63500947", "0.6337489", "0.6337126", "0.6335365", "0.6324766", "0.6310864", "0.6310864", "0.6308967", "0.6304858", "0.6298521", "0.62960565", "0.629356", "0.6285142", "0.62735635", "0.6266541", "0.6264062", "0.6261705", "0.6253898", "0.6245445", "0.6229464", "0.6229464", "0.6218764", "0.6196529", "0.61947477", "0.61914", "0.6190165", "0.617277", "0.61711824", "0.6169427", "0.61614835", "0.6150632", "0.61475277", "0.6134386", "0.6134386", "0.612578", "0.6121616", "0.6117375", "0.611598", "0.61024094", "0.61008584", "0.6096819", "0.6091923", "0.6087541", "0.6080734", "0.6079867", "0.6071411", "0.6071411", "0.6068075", "0.6067212", "0.6056807", "0.60298914", "0.60284233", "0.60125196", "0.6007761", "0.6005957", "0.600347", "0.59875524", "0.5984867", "0.5984867", "0.5984867", "0.5979582", "0.59777606", "0.5976029" ]
0.6810459
11
to update the price.
public static String updatePrice(final double price, final int argItemId) { String msg = "Update Unsuccessful"; int res = dao().updateItemPrice(price, argItemId); if (res > 0) { msg = "Price updated successfully"; } return msg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPrice(double newPrice) {\r\n price = newPrice;\r\n }", "public void priceUpdate(){\n \n double attractionPrices = 0;\n Attraction attraction;\n for(int i=0; i< getAttractionsList().size();i++)\n {\n attraction = (Attraction) getAttractionsList().get(i);\n attractionPrices += attraction.getPrice();\n }\n hotelPrice = diff(getEndDate(), getStartDate());\n price = getTravel().getPrice() + getHotel().getPrice()*(hotelPrice) \n + getTransport().getPrice()*getTravel().getDistance()\n + attractionPrices;\n }", "public void increasePrice() {\n //price doubled\n itemToSell.setBuyPrice(itemToSell.getBuyPrice() * 2);\n }", "public void changePrice(Booking booking, float price);", "private void updatePrice() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tfor(int i = first;i<last;i++){\r\n\t\t\tProduct product = products.get(i);\r\n\t\t\tproduct.setPrivce(product.getPrivce()*(1+increment));\r\n\t\t}\r\n\t\t\r\n\t}", "public void updatePrice(){\n\t\tprice = 0;\n\t\tfor (ParseObject selectedItem : selectedItems){\n\t\t\tprice += selectedItem.getInt(\"price\");\n\t\t}\n\n\t\tTextView orderTotal = (TextView) findViewById(R.id.orderTotal);\n\t\torderTotal.setText(\"$\" + price + \".00\");\n\t}", "public void setPrice(double price)\n {\n this.price = price;\n }", "public void setPrice(double price)\n {\n this.price = price;\n }", "public void setPrice(double price){this.price=price;}", "public void setPrice(double price) {\r\n this.price = price;\r\n }", "public void setPrice(double price) {\r\n this.price = price;\r\n }", "public void setPrice(double price) {\r\n this.price = price;\r\n }", "@Override\n\tdouble updateTotalPrice() {\n\t\treturn 0;\n\t}", "public void setPrice(double p)\r\n\t{\r\n\t\tprice = p;\r\n\t}", "public void updateCurrentPriceAndValue (Double newPrice) {\n\t\t\n\t\tcurrentPrice = newPrice;\n\t\tcurrentValue = currentPrice * quantity;\n\t\t\n\t\t\n\t}", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(Double price) {\r\n this.price = price;\r\n }", "public void priceUpdate(String security, double price) {\n logger.debug(\"There is a price update for stock: \" + security + \" :: updated price: \" + price);\n stockMap.get(security).setPricePerUnit(price);\n for (Map.Entry<String, PersonalStock> entrySet : personalStockMap.entrySet()) {\n entrySet.getValue().priceUpdate(security, price);\n }\n }", "private void updatePriceAndSaving() {\n movieOrder = new MovieOrder(movie, Weekday.weekdayForValue(selectedDay), flagsApplied, numberOfTickets);\n\n tvTotalPriceNewTickets.setText(getResources().getString(\n R.string.total_price_new_tickets,\n movieOrder.getTotalPriceAfterDiscount(),\n movieOrder.getNumberOfTicketsAfterOfferIsApplied())\n );\n\n tvSavingsNewTickets.setText(getResources().getString(\n R.string.today_saving_new_tickets,\n movieOrder.getTotalSaving()\n ));\n }", "public void changePrice(Product p, int price){\r\n\t\tp.price = price;\r\n\t}", "@Override\r\n\tpublic void setPrice(double p) {\n\t\tprice = p;\r\n\t}", "public void changePrice(TripDTO trip, BigDecimal price);", "public void setPrice(Double price) {\n this.price = price;\n }", "public void setPrice(Double price) {\n this.price = price;\n }", "public void setPrice(double p){\n\t\t// store into the instance variable price the value of the parameter p\n\t\tprice = p;\n\t}", "public void setPrice(double value) {\n this.price = value;\n }", "public void setPrice(double value) {\n this.price = value;\n }", "public void setPrice(float itemPrice) \n {\n price = itemPrice;\n }", "public void updateTotalPrice(){\n\t\tBigDecimal discount = currentOrder.getDiscount();\n\t\tBigDecimal subtotal = currentOrder.getSubtotal();\n\t\tthis.subtotal.text.setText(CURR+subtotal.add(discount).toString());\n\t\tthis.discount.text.setText(CURR + discount.toString());\n\t\tthis.toPay.text.setText(CURR+subtotal.toString());\n\t}", "public void setPrice(Double price);", "@Override\n\tpublic void doUpdate(SellOfer model, HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\t if(StringUtil.isEmpty(model.getPrice())){\n\t\t\t\t model.setPrice(\"0\");\n\t\t\t }\n\t\t\t double dprice =Double.parseDouble(model.getPrice());\n\t\t BigDecimal bg = new BigDecimal(dprice/10000);\n\t\t double f1 = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();\n\t\t model.setPrice(f1+\"\");\n\t\t model.setSource(\"001\");\n\t\t model.setSellContent(\"\");\n\t\tsuper.doUpdate(model, request, response);\n\t}", "public void setPrice(Float price) {\r\n this.price = price;\r\n }", "public void setPrice(Money price) {\n this.price = price;\n }", "public void setPrice(double p) {\n\t\tprice = p;\n\t}", "public void setPrice(double price) {\r\n\t\tthis.price = price;\r\n\t}", "public void setPrice(double price) {\r\n\t\tthis.price = price;\r\n\t}", "public void setPrice(double price) \n\t{\n\t\tthis.price = price;\n\t}", "public void setPrice (double ticketPrice)\r\n {\r\n price = ticketPrice;\r\n }", "public void setPrice(float price) {\n this.price = price;\n }", "public void setPrice(float price) {\n this.price = price;\n }", "public void setPrice(Float price) {\n this.price = price;\n }", "public void changePrice(String a) {\r\n getPrice().editAmount(a);\r\n }", "public void setPrice(int price) {\n this.price = (double)price;\n }", "public void setPrice(double price) \n\t{\n\t\tthis.price = price * quantity;\n\t}", "public void setPrice(int price) {\r\n this.price = price;\r\n }", "private void updatePriceStats(double newPrice) {\n this.currentPrice = newPrice;\n this.currentAvgPrice = Double.parseDouble(decimalFormat.format(computeSMA(newPrice, currentAvgPrice, priceHistory)));\n this.priceChangePCT = Double.parseDouble(decimalFormat.format(computeDifferentialPCT(newPrice, currentAvgPrice)));\n }", "@FXML\n\t private void updateProductPrice (ActionEvent actionEvent) throws SQLException, ClassNotFoundException {\n\t try {\n\t ProductDAO.updateProdPrice(prodIdText.getText(),newPriceText.getText());\n\t resultArea.setText(\"Price has been updated for, product id: \" + prodIdText.getText() + \"\\n\");\n\t } catch (SQLException e) {\n\t resultArea.setText(\"Problem occurred while updating price: \" + e);\n\t }\n\t }", "public void setPrice(double price) {\n\t\tthis.price = price;\n\t}", "public void setPrice(double price) {\n\t\tthis.price = price;\n\t}", "public void setPrice(double price) {\n\t\tthis.price = price;\n\t}", "public void setPrice(int price) {\n this.price = price;\n }", "@Override\n\tpublic void setPrice() {\n\t\tprice = 24.99;\n\n\t}", "public void setPrice(int newPrice){\n productRelation.setCost(newPrice);\n }", "public void editProductPrice(String price){\r\n\t\twdlib.waitForElement(getProductText());\r\n\t\tif(getProductText().getText().equals(\"None Included\")){\r\n\t\t\tselPproductBtn.click();\r\n\t\t\tProductsPage pdpage=new ProductsPage();\r\n\t\t\tpdpage.selectProducts();\r\n\t\t\tdriver.navigate().refresh();\r\n\t\t\tselProductOpt.click();\r\n\t\t\twdlib.waitForElement(getProductText());\r\n\t\t\teditBtn.click();\r\n\t\t\taddNewPrice(price);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t\r\n\t\t\teditBtn.click();\r\n\t\t\taddNewPrice(price);\r\n\t\t}\r\n\t\tdriver.navigate().refresh();\r\n\t}", "private void changePrice() {\n\t\tint sic_idHolder; // declares sic_idHolder\n\t\tdouble priceHolder; // declares priceHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC-ID of the book you'd like to change the price of:\");\n\t\tsic_idHolder = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\tif(inventoryObject.cardExists(sic_idHolder)) { // checks to see if card exists\n\t\t\tSystem.out.println(\"Please enter the new price of the book:\");\n\t\t\tpriceHolder = scan.nextDouble();\n\t\t\tscan.nextLine();\n\t\t\tif(priceHolder < 0) { // checks to see if priceHolder is negative\n\t\t\t\tSystem.out.println(\"The price cannot be below zero\\n\");\n\t\t\t\tgetUserInfo();\n\t\t\t}\n\t\t\tinventoryObject.changePrice(sic_idHolder, priceHolder);\n\t\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The ID you entered does not exist\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t}", "@Override\n\tpublic boolean updateShopCartMoney(double price) {\n\t\treturn false;\n\t}", "public void setPrice(BigDecimal price) {\r\n this.price = price;\r\n }", "public void setPrice(BigDecimal price) {\r\n this.price = price;\r\n }", "public void setPrice(BigDecimal price) {\n this.price = price;\n }", "public void setPrice(BigDecimal price) {\n this.price = price;\n }", "@Override\n public void update(float price) {\n float newPriceForBidding = Math.round(price + (Math.random() * 100) + (Math.random() * 100));\n display(newPriceForBidding);\n }", "public void setPrice(int value) {\n this.price = value;\n }", "@Override\n public void onPriceChange(String price) {\n poll.setPrice(YelpPriceLevel.fromYelpString(price));\n }", "@Override\n\tpublic void setPrice(double price) {\n\t\tconstantPO.setPrice(price);\n\t}", "public void setPrice(Double price) {\n\t\tthis.price = price;\n\t}", "public void setPrice(int price) {\n\tthis.price = price;\n}", "protected void setPrice(float price) {\n\t\t\tthis.price = price;\n\t\t}", "public void setPrice(Integer price) {\r\n this.price = price;\r\n }", "public void setPrice(Integer price) {\r\n this.price = price;\r\n }", "public void setPrice(java.math.BigDecimal price) {\n this.price = price;\n }", "void updatePriceReference(final ApplicationAssetPairTicker applicationAssetPairTicker);", "public void updatehotelincome(double price ){\n String query = \"update Hotel set Income = Income + ? \";\n \n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setDouble(1,price);\n Query.execute();\n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "@Override\n public double getPrice(){\n \n return currentPrice; \n }", "public void setPrice(Integer price) {\n this.price = price;\n }", "public void setPrice(Integer price) {\n this.price = price;\n }", "public void setPrice(Integer price) {\n this.price = price;\n }", "public void setPrice(Integer price) {\n this.price = price;\n }", "public void editServicePrice(String price){\r\n\t\twdlib.waitForElement(getServiceText());\r\n\t\tif(getServiceText().getText().equals(\"None Included\")){\r\n\t\t\tselServiceBtn.click();\r\n\t\t\tServicesPage srvpage=new ServicesPage();\r\n\t\t\tsrvpage.selectServices();\r\n//\t\t\tdriver.navigate().refresh();\r\n\t\t\tselServicOpt.click();\r\n\t\t\twdlib.waitForElement(getServiceText());\r\n\t\t\teditService.click();\r\n\t\t\taddNewPrice(price);\r\n\t\t}\r\n\t\telse{\r\n\t\t\teditService.click();\r\n\t\t\taddNewPrice(price);\r\n\t\t}\r\n\t\tdriver.navigate().refresh();\r\n\t}", "public void setPricePerSquareFoot(double newPricePerSquareFoot){\nif(newPricePerSquareFoot > 0){\npricePerSquareFoot = newPricePerSquareFoot;\n}\n}", "public void setPrice(final BigDecimal price) {\n this.price = price;\n }", "public void setPrice(java.lang.Integer _price)\n {\n price = _price;\n }", "void stockPriceChanged(Stock stock, double oldValue, double newValue);", "@Override\n\tpublic String updateFoodPrice(int fid, double price) {\n\t\treturn fb.updateFoodPrice(fid, price);\n\t}", "public void setPriceEntered (BigDecimal PriceEntered);", "public void putNewPrice(String symbol, double price);", "public void setPrice(Long price) {\n this.price = price;\n }", "public void setpPrice(double pPrice) {\n this.pPrice = pPrice;\n }", "public ProductWithStockItemTO changePrice(long storeID, StockItemTO stockItemTO) throws NotInDatabaseException, UpdateException;", "public void setPrice(Date price) {\n this.price = price;\n }", "public void changePrices()\n {\n String publisher = (String) publishers.getSelectedItem();\n if (publisher.equals(\"Any\"))\n {\n result.setText(\"I am sorry, but I cannot do that.\");\n return;\n }\n try\n { \n if (priceUpdateStmt == null)\n priceUpdateStmt = conn.prepareStatement(priceUpdate);\n priceUpdateStmt.setString(1, priceChange.getText());\n priceUpdateStmt.setString(2, publisher);\n int r = priceUpdateStmt.executeUpdate();\n result.setText(r + \" records updated.\"); \n } \n catch (SQLException e)\n {\n result.setText(\"\");\n while (e != null)\n {\n result.append(\"\" + e);\n e = e.getNextException();\n }\n }\n }", "private void setDiscountedPrice() {\n seekbarNewprice.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n @Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n tvDiscountPerc.setText(progress * 5 + \"%\");\n try {\n double originalPrice = Double.parseDouble(etOriginalPrice.getText().toString());\n double sp = (progress * 5 * originalPrice) / 100;\n\n tvNewPrice.setText(String.format(Locale.US, \"%.2f\", originalPrice - sp));\n } catch (NumberFormatException ne) {\n ne.printStackTrace();\n }\n }\n\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n\n }\n\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n\n }\n });\n }", "public static void setPrice() {\n double summe = 0.0;\n for (Object obj : dlm.getDisplayedArtikel()) {\n if (obj instanceof Article) {\n Article art = (Article) obj;\n if (!art.isIsAbfrage()) {\n if (((art.isJugendSchutz() && art.isJugendSchutzOk())) || !art.isJugendSchutz()) {\n if (art.isEloadingAmmountOk() && !art.isPriceZero()) {\n summe += ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n }\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe += card.getAufladung() / 100;\n }\n }\n for (Object obj : dlm.getRemovedObjects()) {\n if (obj instanceof Article) {\n if (!((Article) ((obj))).isStorno_error()) {\n summe -= ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe -= card.getAufladung() / 100;\n }\n }\n if (Math.round(summe) == 0) {\n summe = 0;\n }\n if (GUIOperations.isTraining()) {\n summe += 1000;\n }\n tfSumme.setText(String.format(\"%.2f\", summe));\n }", "public abstract void setTotalPrice();", "ResponseEntity<Price> updatePrice(String cartId);", "public void updateOptionPrice(String modelName, String optionName, String option, float newPrice){\n\t\tAutomobile auto= autoSet.readModel(modelName);\n\t\tauto.updateOptionPrice(optionName, option, newPrice);\n\t}" ]
[ "0.7802245", "0.769267", "0.7648065", "0.7628473", "0.7532752", "0.75131565", "0.7475249", "0.74576", "0.7455191", "0.74444145", "0.74444145", "0.74444145", "0.7434668", "0.7429608", "0.7428664", "0.7407453", "0.7407453", "0.7407453", "0.7407453", "0.7407453", "0.7407453", "0.7407453", "0.73789877", "0.73714197", "0.73537", "0.73521006", "0.7332897", "0.7318633", "0.7309125", "0.7309125", "0.7293919", "0.72770417", "0.72770417", "0.7275526", "0.7272905", "0.7269648", "0.7240671", "0.72390455", "0.7238548", "0.7233419", "0.7212436", "0.7212436", "0.7210595", "0.7201341", "0.7199924", "0.7199924", "0.7199044", "0.71573645", "0.7154084", "0.7150811", "0.71483344", "0.71329665", "0.7114069", "0.71021384", "0.71021384", "0.71021384", "0.71015036", "0.7098591", "0.7094838", "0.70834374", "0.7076523", "0.7062099", "0.70572996", "0.70572996", "0.70428056", "0.70428056", "0.70254165", "0.7019814", "0.70118254", "0.7009167", "0.6991165", "0.69679165", "0.69642425", "0.6933274", "0.6933274", "0.69323397", "0.69299036", "0.69195586", "0.69179714", "0.69018525", "0.69018525", "0.69018525", "0.69018525", "0.68966305", "0.6877495", "0.68631923", "0.68540156", "0.68533826", "0.6849404", "0.6845545", "0.68396044", "0.6837279", "0.68369615", "0.68362916", "0.68357116", "0.6835506", "0.6816727", "0.68109787", "0.6807512", "0.6801753", "0.6801136" ]
0.0
-1
to add a new item.
public static int uploadItem(final int argItemId, final String argItemName, final double argPrice, final String argItemCat, final int argSupplierId) { int res = dao().uploadNewItem(argItemId, argItemName, argPrice, argItemCat, argSupplierId); return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void add(Item item);", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "public abstract void addItem(AbstractItemAPI item);", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n items.add(item);\n }", "@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}", "public void addItem(Item toAdd) {\n\t\tthis.items.add(toAdd);\n\t}", "public void addItem(Item item) {\n _items.add(item);\n }", "public void addItem( Item anItem) {\n currentItems.add(anItem);\n }", "public boolean add(Type item);", "public void addItem(Item e) {\n\t\tItem o = new Item(e);\n\t\titems.add(o);\n\t}", "@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"addItem\")\n\tpublic ZuelResult addItem(TbItem item) {\n\t\treturn service.addItem(item);\n\t}", "public int addItem(Item i);", "public void addItem(Item i) {\n this.items.add(i);\n }", "public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }", "public void addItem(Item item) {\r\n\t\titems.add(item);\r\n\t}", "public void addItem(Object obj) {\n items.add(obj);\n }", "public void addItem(Object item) {\r\n\t\tlistModel.addElement(item);\r\n\t}", "public void addItem(Item item) {\n\t\thashOperations.put(KEY, item.getId(), item);\n\t\t//valueOperations.set(KEY + item.getId(), item);\n\t}", "public void addItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.add(item);\n\t}", "public void addItem(Item item) {\n\t\titems.add(item);\n\t}", "@RequestMapping(method=RequestMethod.POST, value = \"/item/{id}\", produces = \"application/json\")\n public void addItem(@RequestBody Item itemToAdd)\n {\n this.itemRepository.addItem(itemToAdd);\n }", "@attribute(value = \"\", required = false)\r\n\tpublic void addItem(Item i) {\r\n\t}", "public void addItem() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter Item Name: \");\n\t\tString itemName = scanner.nextLine();\n\t\tSystem.out.print(\"Enter Item Description: \");\n\t\tString itemDescription = scanner.nextLine();\n\t\tSystem.out.print(\"Enter minimum bid price for item: $\");\n\t\tdouble basePrice = scanner.nextDouble();\n\t\tLocalDate createDate = LocalDate.now();\n\t\tItem item = new Item(itemName, itemDescription, basePrice, createDate);\n\t\taddItem(item);\n\t}", "public void add(Item item) {\r\n\t\tcatalog.add(item);\r\n\t}", "public void addItem(ToDoList item) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(TITLE, item.getTitle());\n values.put(DETAILS, item.getDetails());\n\n db.insert(TABLE_NAME, null, values); //Insert query to store the record in the database\n db.close();\n\n }", "public void store(Item item) {\n this.items.add(item);\n }", "public void addItem(LibraryItem item){\r\n\t\t// use add method of list.class\r\n\t\tthis.inverntory.add(item);\r\n\t}", "public void additem(String item){\n\t\trep.takeitem(\"take \" + item);\n\t}", "void addItem(DataRecord record);", "public void add(E item);", "public void addItem(SoldItem item) {\n\n items.add(item);\n log.debug(\"Added \" + item.getName() + \" quantity of \" + item.getQuantity());\n\n }", "public void addTodoItem(TodoItem item) {\n todoItems.add(item);\n }", "@Override\n public void addItem(P_CK t) {\n \n }", "public Item addItem(Item item) {\r\n uniqueCounter++;\r\n items.add(item);\r\n return item;\r\n }", "public void addItem(final Item item) {\n\t\tnumberOfItems++;\n\t}", "void add(T item);", "public void add(ToDoItem item) {\n mItems.add(item);\n notifyDataSetChanged();\n }", "void addFruit(Fruit item){\n\t\tfruitList.add(item);\n\t}", "void add(E item);", "void add(E item);", "void add(E item);", "public void addItem(String item){\n adapter.add(item);\n }", "void addCpItem(ICpItem item);", "public void addItem(Item item) {\r\n if (items == null) {\r\n items = new ArrayList();\r\n }\r\n items.add(item);\r\n }", "public void addItem(Item newItem){\n // check for duplicate item ID\n for (Item item: items) {\n if (item.getItemID() == newItem.getItemID()) {\n item.setQuantity(item.getQuantity() + 1);\n return;\n }\n }\n newItem.setQuantity(1);\n this.items.add(newItem);\n }", "public void addProduct(Product item)\n {\n stock.add(item);\n }", "public void insert(KeyedItem newItem);", "public static void addNewItem(String itemName,Context context){\n\t\tItem item=new Item();\n\t\titem.updateName(itemName);\n\t\titem.updateCheckmark(false);\n\t\titem.updateArchived(false);\n\t\tItemListController.getItemListInstance().add(item);\n\t\ttodoList.add(itemName);\n\t\tItemListManager.saveListItem(context);\n\t}", "CatalogItem addCatalogItem(CatalogItem catalogItem);", "public void add(Thing newThing)\r\n {\r\n \titems.add(newThing);\r\n }", "public @NotNull Item newItem();", "public void add(TradeItem newItem) {\n if (newItem.isUnique()) {\n removeType(newItem);\n }\n items.add(newItem);\n }", "protected void addInventoryItemType() {\n\t\tProperties props = new Properties();\n\n\t\t/* DEBUG\n\t\t\n\t\tSystem.out.println(typeNameTF.getText());\n\t\tSystem.out.println(unitsTF.getText());\n\t\tSystem.out.println(unitMeasureTF.getText());\n\t\tSystem.out.println(validityDaysTF.getText());\n\t\tSystem.out.println(reorderPointTF.getText());\n\t\tSystem.out.println(notesTF.getText());\n\t\tSystem.out.println(statusCB.getValue());\n\t\n\t\t*/ \n\n\t\t// Set the values.\n\t\tprops.setProperty(\"ItemTypeName\", typeNameTF.getText());\n\t\tprops.setProperty(\"Units\", unitsTF.getText());\n\t\tprops.setProperty(\"UnitMeasure\", unitMeasureTF.getText());\n\t\tprops.setProperty(\"ValidityDays\", validityDaysTF.getText());\n\t\tprops.setProperty(\"ReorderPoint\", reorderPointTF.getText());\n\t\tprops.setProperty(\"Notes\", notesTF.getText());\n\t\tprops.setProperty(\"Status\", (String) statusCB.getValue());\n\n\t\t// Create the inventory item type.\n\t\tInventoryItemType iit = new InventoryItemType(props);\n\n\t\t// Save it into the database.\n\t\tiit.update();\n\n\t\tpopulateFields();\n\t\t\n\t\t// Display message on GUI.\n\t\t//submitBTN.setVisible(false);\n\t\tcancelBTN.setText(\"Back\");\n\t\tmessageLBL.setText(\"Inventory Item Type added.\");\n\t}", "public abstract void add(T item) throws RepositoryException;", "public void addProduct(Product item){\n inventory.add(item);\n }", "public void push(Object item) {\r\n\t\tdata.add(item);\r\n\r\n\t}", "public void addItem() {\r\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\r\n\t\tif (itemInvoice.getQuantidade() <= itemPO.getQuantidadeSaldo()) {\r\n\t\t\tBigDecimal total = itemInvoice.getPrecoUnit().multiply(\r\n\t\t\t\t\tnew BigDecimal(itemInvoice.getQuantidade()));\r\n\t\t\titemInvoice.setTotal(total);\r\n\t\t\tif (!editarItem) {\r\n\r\n\t\t\t\tif (itemInvoice.getPrecoUnit() == null) {\r\n\t\t\t\t\titemInvoice.setPrecoUnit(new BigDecimal(0.0));\r\n\t\t\t\t}\r\n\t\t\t\tif (itemInvoice.getQuantidade() == null) {\r\n\t\t\t\t\titemInvoice.setQuantidade(0);\r\n\t\t\t\t}\r\n\t\t\t\titemInvoice.setInvoice(invoice);\r\n\r\n\t\t\t\tinvoice.getItensInvoice().add(itemInvoice);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tinvoice.getItensInvoice().set(\r\n\t\t\t\t\t\tinvoice.getItensInvoice().indexOf(itemInvoice),\r\n\t\t\t\t\t\titemInvoice);\r\n\t\t\t}\r\n\t\t\tcarregarTotais();\r\n\t\t\tinicializarItemInvoice();\r\n\t\t\trequired = false;\r\n\t\t} else {\r\n\r\n\t\t\tMessages.adicionaMensagemDeInfo(TemplateMessageHelper.getMessage(\r\n\t\t\t\t\tMensagensSistema.INVOICE, \"lblQtdMaioSaldo\", fc\r\n\t\t\t\t\t\t\t.getViewRoot().getLocale()));\r\n\t\t}\r\n\t}", "private void add(GroceryItem itemObj, String itemName) {\n\t\tbag.add(itemObj);\n\t\tSystem.out.println(itemName + \" added to the bag.\");\n\t}", "@Override\n\tpublic void add() {\n\t\tHashMap<String, String> data = new HashMap<>();\n\t\tdata.put(\"title\", title);\n\t\tdata.put(\"author\", author);\n\t\tdata.put(\"publisher\", publisher);\n\t\tdata.put(\"isbn\", isbn);\n\t\tdata.put(\"bookID\", bookID);\n\t\tHashMap<String, Object> result = null;\n\t\tString endpoint = \"bookinfo/post.php\";\n\t\ttry {\n\t\t\tresult = APIClient.post(BookInfo.host + endpoint, data);\n\t\t\tvalid = result.get(\"status_code\").equals(\"Success\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void addItem(Movie item) {\n mDataset.add(item);\n notifyItemInserted(mDataset.size() );\n notifyDataSetChanged();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(T item){\n\t\t\n\n\t\tif(currentsize == data.length-1){\n\t\t\tgrow();\n\t\t}\n\n\t\t\n\t\tdata[currentsize] = item;\n\t\tcurrentsize++;\n\n\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\taddNewItem();\n\t\t\t}", "Item addItem(IDAOSession session, String title, String description,\n\t\t\tint userId);", "public void add(int index, Object item)\n {\n items[index] = item;\n numItems++;\n }", "public void addItem(Product p, int qty){\n //store info as an InventoryItem and add to items array\n this.items.add(new InventoryItem(p, qty));\n }", "public void addItem(Item i) {\r\n assert (ic != null);\r\n \r\n ic.setItem(i);\r\n ic.setHandler(handler);\r\n items.add(ic.getItem());\r\n }", "public void addItem(Item theItem) {\n\t\tif (inventory != null) {\n\t\t\tif (!isAuctionAtMaxCapacity()) {\n\t\t\t\t// Check item doesn't already exist as key in map\n\t\t\t\tif (inventory.containsKey(theItem)) {\n\t\t\t\t\t//ERROR CODE: ITEM ALREADY EXISTS\n\t\t\t\t\tSystem.out.println(\"That item already exists in the inventory.\");\n\t\t\t\t} else\n\t\t\t\t\tinventory.put(theItem, new ArrayList<Bid>());\n\t\t\t} else if (isAuctionAtMaxCapacity()) {\n\t\t\t\t//ERROR CODE: AUCTION AT MAX CAPACITY\n\t\t\t\tSystem.out.println(\"\\nYour auction is at maximum capacity\");\n\t\t\t} \n\t\t} else {\n\t\t\tinventory = new HashMap<Item, ArrayList<Bid>>();\n\t\t\tinventory.put(theItem, new ArrayList<Bid>());\t\t\t\t\n\t\t} \t\t\t\t\t\t\n\t}", "public void addItem(Item newItem){\n\t\tif(newItem!=null){\r\n\t\t\tif(newItem.stackable()){\r\n\t\t\t\taddItemStack(newItem);\r\n\t\t\t\tdisplayIcon();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\taddFullStack(newItem);\r\n\t\t\tdisplayIcon();\r\n\t\t}\r\n\t}", "public void addToList(View view) {\n Items newItem = new Items();\n EditText ETNew = (EditText) findViewById(R.id.ETNew);\n newItem.todo = ETNew.getText().toString();\n newItem.done = false;\n helper.create(newItem);\n Toast.makeText(this, \"Item added\", Toast.LENGTH_SHORT).show();\n adaptList2();\n ETNew.setText(\"\");\n ETNew.setHint(\"my new to-do\");\n }", "public void addItem(Item item) {\n inventory.add(item);\n Thread updateUserThread = userController.new UpdateUserThread(LoginActivity.USERLOGIN);\n updateUserThread.start();\n synchronized (updateUserThread) {\n try {\n updateUserThread.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void addItem(String nomItem, Item item) {\r\n \t\titems.putItem(nomItem, item);\r\n \t}", "public synchronized void addItem(IJABXAdvertisementItem item) {\n\t\tidMap.put(item.getSerialNo(), item);\n\t\titemList.add(item);\n\t}", "public void createNewItem(ActionEvent actionEvent) {\n // we will create a new item instance here (ideally we would use another window for this)\n // and then we will simply addItem() to the currently selected list\n }", "public void doCreateItem() {\r\n\t\tlogger.info(\"Se procede a crear el book \" + newItem.getDescription());\r\n\t\tBook entity = newItem.getEntity();\r\n\t\tentity.setUser(Global.activeUser());\r\n\t\tentity.setBookBalance(BigDecimal.ZERO);\r\n\t\tentity.setTotalBudget(BigDecimal.ZERO);\r\n\t\tentity.setTotalIncome(BigDecimal.ZERO);\r\n\t\tentity.setTotalExpenses(BigDecimal.ZERO);\r\n\t\tentity = bookService.create(entity);\r\n\r\n\t\t// Actualizar el mapa de books\r\n\t\tGlobalBook.instance().put(new BookData(entity));\r\n\r\n\t\tlogger.info(\"Se ha creado el book \" + newItem.getDescription());\r\n\t\tnewItem = new BookData(new Book());\r\n\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO, \"Libro creado\", \"Libro creado correctamente\"));\r\n\t}", "public void addNewItem(OrderItem newOrderItem){\n itemsInOrder.add(newOrderItem);\n }", "public void add(food entry)\n\t{\n\t\titems.add(entry);\n\t\t//updates isChanged to show changes\n\t\tisChanged = true;\n\t}", "private void add() {\n\n\t}", "public void add(T toAdd) {\n\t\tif (load.size() == maxLoad)\n\t\t\tSystem.out.println(\"\tERROR: Not enough room for the given item.\");\n\t\t\n\t\t//checks if this has already been loaded\n\t\telse {\n\n\t\t\tboolean loaded = false;\n\t\n\t\t\t\n\t\t\t\n\t\t\tfor (int i = 0; i < load.size(); i++) {\n\t\t\t\t\n\t\t\t\t/*System.out.println(\"***********\");\n\t\t\t\tSystem.out.println(load.get(i).getID());\n\t\t\t\tSystem.out.println(toAdd.getID());\n\t\t\t\tSystem.out.println(\"***********\");*/\n\t\t\t\t\n\t\t\t\tif (load.get(i).getID().equals(toAdd.getID()))\n\t\t\t\t\tloaded = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (loaded == false)\n\t\t\t\tload.add(toAdd);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"\tERROR: Invalid item, item with id \" + toAdd.getID() + \" already exists.\");\n\t\t}\n\t}", "public void add() {\n }", "public void adicionar(ItemProduto item) {\n\t\titens.add(item);\n\t}", "public void addItem(String i) {\n\t\tItem item = Item.getItem(ItemList, i);\n\t Inventory.add(item);\n\t inventoryList.getItems().add(i);\n\n\t}", "void addGroceryItem(String item) {\n\n\t}", "public void addGroceryItem(String item){\n groceryList.add(item);\n }", "public int addItem(Itemset i);", "@Test\n\tpublic void testAddItem() throws IOException{\n\t\tModel.addItem(item, amount + \"\");\n\t\tassertEquals(amount + \"\", Model.hash.get(item));\n\t\t\n\t}", "public Boolean add(Item item) {\n \tif (itemCollection.containsKey(item.getItemName())) {\r\n \tif (checkAvailability(item, 1)) {\r\n \t\titem.setQuatity(item.getQuatity() + 1);\r\n \t\titemCollection.put(item.getItemName(), item);\r\n \t\treturn true;\r\n \t} else return false;\r\n } else {\r\n \titemCollection.put(item.getItemName(), item);\r\n \treturn true;\r\n }\r\n \t\r\n }", "@Override\n public void onItemAdded(Object toAdd) {\n if(toAdd instanceof SpotifyItem)\n return;\n\n //Reflect changes in the drink list\n DrinkInfo item = (DrinkInfo)toAdd;\n Log.d(TAG, \"Array size = \" + mDrinkInfos.size());\n mDrinkInfos.add(mDrinkInfos.size(), item);\n mDrinkQueueAdapter.notifyDataSetChanged();\n Log.d(TAG, \"Added song: \" + item.getDrinkName());\n }", "@Override\n\tpublic void add() {\n\t\t\n\t}", "public void add();", "public void add() {\n\t\t\n\t}", "public void addItem(Product p) {\n\t\t_items.add(p);\n\t}", "public boolean add (E item)\n {\n add(size, item); // calling public method add\n return true;\n }", "public void addItem(Item param) {\r\n if (localItem == null) {\r\n localItem = new Item[] { };\r\n }\r\n\r\n //update the setting tracker\r\n localItemTracker = true;\r\n\r\n java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localItem);\r\n list.add(param);\r\n this.localItem = (Item[]) list.toArray(new Item[list.size()]);\r\n }", "@Override\r\n\tpublic void AddItem(int n) {\n\t\tSystem.out.println(\"ADDED:\" + n);\r\n\r\n\t}", "public void add(String nameItem)\n\t{\n\t\tmenu.add(nameItem);\n\t}", "public void add( Order item ) {\n\t\tsuper.internalAdd(item);\n\t}", "public String addItem(Item item){\n EntityManager em = emf.createEntityManager();\n try{\n utx.begin();\n em.joinTransaction();\n for(Tag tag : item.getTags()) {\n tag.incrementRefCount();\n tag.getItems().add(item);\n em.merge(tag);\n }\n em.persist(item);\n utx.commit();\n // index item\n if(bDebug) System.out.println(\"\\n***Item id of new item is : \" + item.getItemID());\n indexItem(new IndexDocument(item));\n \n } catch(Exception exe){\n try {\n utx.rollback();\n } catch (Exception e) {}\n throw new RuntimeException(\"Error persisting item\", exe);\n } finally {\n em.close();\n }\n return item.getItemID();\n }", "public void addItem(View v){\n //Creates a new IngredientModel, adds it to the List<IngredientModel>\n IngredientModel ingredientModel = new IngredientModel(ingredientEditText.getText().toString());\n ingredientModelList.add(ingredientModel);\n //Notifies the adapter the data set has changed in order to update the recyclerView\n ingredientSearchAdapter.notifyDataSetChanged();\n }", "public void addItem(LineItem item)\r\n {\r\n\t ChangeEvent event = new ChangeEvent(this);\r\n\t if(items.contains(item))\r\n\t {\r\n\t\t \r\n\t\t counter = 0;\r\n\t\t items.add(item);\r\n\t\t //tem.addQuantity();\r\n\t\t //tem.getQuantity();\r\n\t\t for(int i = 0; i < items.size(); i++)\r\n\t\t {\r\n\t\t\t if(items.get(i).equals(item))\r\n\t\t\t {\r\n\t\t\t counter++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t\t System.out.print(\"\\r Quantity of \" + item.toString() + \": \"+ counter);\r\n\t\t \r\n\t }\r\n\t else\r\n\t {\r\n\t\t counter = 1;\r\n\t// item.addQuantity();\r\n\t// item.getQuantity();\r\n\t\t items.add(item);\r\n\t// System.out.println(item.getQuantity());\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t \t\r\n\t \tSystem.out.print(\"\\n Quantity of \" + item.toString() + \": \"+ counter);\r\n\t \r\n\t\t \r\n\t }\r\n\t\t\r\n \r\n }" ]
[ "0.839818", "0.82415444", "0.79081327", "0.7810034", "0.7769183", "0.7769183", "0.77196974", "0.7648108", "0.7571845", "0.7571022", "0.7552313", "0.75395495", "0.7523731", "0.7504735", "0.74918026", "0.7485683", "0.7485236", "0.74238425", "0.74149615", "0.739027", "0.7381523", "0.7374387", "0.7362754", "0.735184", "0.7348796", "0.73424596", "0.73352695", "0.73192936", "0.73014015", "0.7296714", "0.72857094", "0.72808737", "0.7277615", "0.7275072", "0.7248084", "0.72371644", "0.72302777", "0.72162044", "0.7189083", "0.71618897", "0.7154856", "0.7154856", "0.7154856", "0.7134943", "0.7130139", "0.7119253", "0.70986956", "0.70854175", "0.7084123", "0.7072568", "0.70611656", "0.7049027", "0.704482", "0.7042341", "0.70323974", "0.70205307", "0.70002776", "0.6945636", "0.69334364", "0.69321895", "0.6921107", "0.6906377", "0.6898168", "0.6881102", "0.6875738", "0.68740916", "0.6872527", "0.6867258", "0.6862828", "0.68357855", "0.6825179", "0.6819225", "0.6819225", "0.6818304", "0.68170214", "0.68093944", "0.6799179", "0.67985314", "0.677993", "0.67726564", "0.67680025", "0.6763149", "0.6761061", "0.6759257", "0.6756887", "0.67566943", "0.6751869", "0.6751157", "0.6747256", "0.6746348", "0.6745622", "0.6738735", "0.67340297", "0.673303", "0.67308694", "0.67239374", "0.67202103", "0.6715268", "0.67114204", "0.671075", "0.66995853" ]
0.0
-1
to get the last row.
public static Items findLastRow() { Items item = dao().findLastRow(); return item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getEndRow();", "private Line getLastLine() {\n\t\treturn doily.lines.get(doily.lines.size()-1);\n\t}", "public int getLast() {\n\treturn _last;\n }", "public int getLast() {\n\t\treturn last;\n\t}", "public String getLastCell() {\n\t\treturn lastCell;\n\t}", "public abstract int getLastCageRow(int row, int col);", "public Item getLast() {\n return items[size - 1];\n }", "public E getLast() {\r\n\r\n\t\treturn (E) data.get(data.size() - 1);\r\n\t}", "public int endIndex(){\n\t\treturn this.startIndex()+this.getRows()-1;\n\t}", "public U getLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(numElems-1);\r\n\t }", "public TypeHere getLast() {\n return items[size - 1];\n }", "public boolean last() throws SQLException\n {\n return m_rs.last();\n }", "protected long getLastCleanedRow() {\n List<String> res = dbconnector.execRead(\"SELECT value FROM MS_DataCleaning_conf \" +\n \"WHERE name='sample_last_cleaned_row'\").get(0);\n return Long.parseLong(res.get(0));\n }", "@Override\n public int getRowCount() {\n return data.length-1; \n }", "public int getLastIndex() {\n return lastIndex;\n }", "public boolean isLast() throws SQLException {\n/* 219 */ return (this.lastRowFetched && this.currentPositionInFetchedRows == this.fetchedRows.size() - 1);\n/* */ }", "public Object lastElement();", "public Object last()throws ListExeption;", "public Item getLast();", "public E getLast() {\r\n\t\tif (tail == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(size - 1).data;\t\r\n\t\t}\r\n\t}", "protected long getLastDLRow() {\n List<String> res = dbconnector.execRead(\"SELECT id FROM DW_station_state \" +\n \"ORDER BY id DESC \" +\n \"LIMIT 1\").get(0);\n return Long.parseLong(res.get(0));\n }", "public Object getLast() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.previous.element;\r\n }", "public int getLastRowNum() {\n\t\treturn ExcelUtils.getLastRowNum(sheet);\n\t}", "public T getLast() {\n if (this.getSize() > 0) {\n return buffer[index];\n }\n return null;\n }", "public boolean isLast() throws SQLException\n {\n return m_rs.isLast();\n }", "public String getLastItem();", "protected int lastIdx() {\n return arrayIndex(currentWindowIndex() - 1);\n }", "public String getLast()\n {\n return lastItem;\n }", "public T getLast() {\n return this.getHelper(this.indexCorrespondingToTheLatestElement).data;\n }", "public org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle getLastRow()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().find_element_user(LASTROW$16, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public boolean isLast() throws SQLException {\n\n try {\n debugCodeCall(\"isLast\");\n checkClosed();\n int row = result.getRowId();\n return row >= 0 && row == result.getRowCount() - 1;\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public T getLast();", "public T getLast();", "public T getLast()\n\t{\n\t\treturn getLastNode().getData();\n\t}", "public T getLast()\n\t{\n\t\treturn getLastNode().getData();\n\t}", "public Object last() {\r\n\t\treturn elements.get(size() - 1);\r\n\t}", "public T getLast() {\n\t\t//return the data in the last node\n\t\treturn getLastNode().getData();\n\t}", "@Override\r\n\tpublic Object last(){\r\n\t\tcheck();\r\n\t\treturn tail.value;\r\n\t}", "@Override\r\n\tpublic int selectLastNo() {\n\t\treturn sqlSession.selectOne(namespace + \".selectLastNo\");\r\n\t}", "@Override\r\n\tpublic int selectLastNo() {\n\t\treturn sqlSession.selectOne(namespace + \".selectLastNo\");\r\n\t}", "private CommonTableExpression getLast() {\n\t\tCommonTableExpression cte = !nodes.isEmpty() ? (CommonTableExpression)nodes.get(nodes.size() - 1) : null;\n\t\tif (cte == null) {\n\t\t\tthrow new IllegalStateException(\"No nodes\");\n\t\t}\n\t\treturn cte;\n\t}", "public int getLast() {\n if (size == 0)\n return NO_ELEMENT;\n else\n return endOfBlock[numberOfBlocks - 1] - 1;\n }", "@Override\n\tpublic Integer findMaxRows() {\n\t\treturn daoService.getEmpMapper().findMaxRows();\n\t}", "public E getLast(){\n return tail.getPrevious().getElement();\n }", "public E last() {\n\r\n if(tail == null) {\r\n return null;\r\n } else {\r\n return tail.getItem();\r\n\r\n }\r\n }", "@Override\r\n\tpublic T last() {\n\t\treturn tail.content;\r\n\t}", "public E last() {\n if(isEmpty()){\n return null;\n }else{\n return trailer.getPrev().getElement();\n }\n }", "public int getMaxRow();", "public E getLast();", "E last() throws NoSuchElementException;", "public Node getLast() {\r\n\t\treturn getNode(this.size());\r\n\t}", "T last();", "public boolean isAfterLast() {\n/* 125 */ return (this.lastRowFetched && this.currentPositionInFetchedRows > this.fetchedRows.size());\n/* */ }", "public node getLast() {\n\t\tif(head == null) {\n\t\t\treturn null;\n\t\t}\n\t\tnode tmp = head;\n\t\twhile(tmp.next !=null) {\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp;\n\n\t\t//OR\n\t\t//getAt(size()-1);\n\t}", "public O last()\r\n {\r\n if (isEmpty()) return null;\r\n return last.getObject();\r\n }", "public T getLast( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//last node\r\n\t\tArrayNode<T> last = endMarker.prev;\r\n\t\ttry{\r\n\t\t\t//last elem\r\n\t\t\treturn last.getLast();\r\n\t\t}catch( IndexOutOfBoundsException e){\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic E getLast() {\n\t\treturn null;\r\n\t}", "@Override\n public Persona Last() {\n return array.get(tamano - 1);\n }", "public E last() {\n if (this.isEmpty()) return null;\r\n return this.tail.getElement();\r\n }", "public E last() { // returns (but does not remove) the last element\n // TODO\n\n if ( isEmpty()) return null ;\n return tail.getElement();\n }", "T butLast();", "public synchronized int lastEntryIndex() {\n return this.lastIndex;\n }", "public StrColumn getPageLast() {\n return delegate.getColumn(\"page_last\", DelegatingStrColumn::new);\n }", "public int lastElement() {\r\n\r\n\t\treturn (usedSize - 1);\r\n\r\n\t}", "public int getEnd() {\r\n\t\treturn this.offset + this.numResults;\r\n\t}", "public boolean last() throws SQLException {\n\n try {\n debugCodeCall(\"last\");\n checkClosed();\n return absolute(-1);\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public Taxi getLastInserted() {\n\t\t\n\t\tprepareStatement();\n\t\t\n\t\tquery = \"SELECT * FROM TAXI ORDER BY update DESC LIMIT 1\";\n\t\t\n\t\tlogger.debug(\"Taxi ->getLastInserted()\");\n\t\tlogger.debug(query);\n\t\t\n\t\texecuteStatement();\t\n\t\t\n\t\tassignResult();\n\t\t\n\t\treturn taxi;\n\t}", "public int getMaxRow() {\n return maxRow;\n }", "public T getLast(){\n\treturn _end.getCargo();\n }", "public int getLastOrderId() {\r\n ArrayList<OrderRecord> result = new ArrayList<>();\r\n String sqlQuery = \"SELECT * FROM `orders`\";\r\n try {\r\n PreparedStatement p = myConn.prepareStatement(sqlQuery);\r\n ResultSet rs = p.executeQuery(sqlQuery);\r\n rs.last();\r\n return rs.getInt(\"id\");\r\n } catch (Exception e) {\r\n System.out.println(\"Could not get orders \" + e.toString());\r\n System.out.println(myStmt);\r\n }\r\n return 0;\r\n }", "public SeleniumQueryObject last() {\n\t\treturn LastFunction.last(this, this.elements);\n\t}", "public Object getLastObject()\n {\n\tcurrentObject = lastObject;\n\n if (lastObject == null)\n \treturn null;\n else\n \treturn AL.get(AL.size()-1);\n }", "public void unsetLastRow()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(LASTROW$16, 0);\n }\n }", "public HistoryEntry getLastEntry() {\n\t\t\treturn null;\n\t\t}", "public Node getLast()\n {\n return this.last;\n }", "public Square getLastSquare() {\n\t\treturn squares.get(squares.size()-1);\n\t}", "Position<T> last();", "public abstract int getLastCageCellValue(int row, int col);", "public GPoint last() {\n\t\tif (points.isEmpty()) {\n\t\t\tthrow new IllegalStateException(\"line group is empty\");\n\t\t}\n\t\treturn points.get(points.size() - 1);\n\t}", "public E getLast()// you finish (part of HW#4)\n\t{\n\t\t// If the tree is empty, return null\n\t\t// FIND THE RIGHT-MOST RIGHT CHILD\n\t\t// WHEN you can't go RIGHT anymore, return the node's data to last Item\n\t\tif (root == null)\n\t\t\treturn null;\n\t\tBinaryNode<E> iteratorNode = root;\n\t\twhile (iteratorNode.hasRightChild())\n\t\t\titeratorNode = iteratorNode.getRightChild();\n\t\treturn iteratorNode.getData();\n\t}", "public boolean isAfterLast() throws SQLException {\n\n try {\n debugCodeCall(\"isAfterLast\");\n checkClosed();\n int row = result.getRowId();\n int count = result.getRowCount();\n return row >= count || count == 0;\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public int last() {\n\t\tif (bufferIndex == bufferLast)\n\t\t\treturn -1;\n\t\tsynchronized (buffer) {\n\t\t\tint outgoing = buffer[bufferLast - 1];\n\t\t\tbufferIndex = 0;\n\t\t\tbufferLast = 0;\n\t\t\treturn outgoing;\n\t\t}\n\t}", "private void endRow() throws TableFormatException {\n if ( readCol == 0 ) {\n return;\n }\n int nrow = rows.size();\n if ( nrow == 1 ) {\n ncol = ((List) rows.get( 0 )).size();\n }\n else if ( readCol != ncol ) {\n throw new TableFormatException( \n \"Column number mismatch in row \" + ( nrow - 1 ) +\n \" (\" + readCol + \" != \" + ncol + \")\" );\n }\n readCol = 0;\n }", "public GPoint getLastPoint() {\n\t\treturn (points.size() > 0) ? points.get(points.size() - 1) : null;\n\t}", "public JspElement getLast() {\r\n\treturn _last;\r\n}", "public void MoveLast()\r\n {\r\n\r\n \t try{\r\n \t\t rsTution.last();\r\n \t\t Display();\r\n\r\n\r\n \t }catch(SQLException sqle)\r\n \t {System.out.println(\"MoveLast Error:\"+sqle);}\r\n \t}", "public void afterLast() throws SQLException {\n\n try {\n debugCodeCall(\"afterLast\");\n checkClosed();\n while (nextRow()) {\n // nothing\n }\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public boolean isAfterLast() throws SQLException\n {\n return m_rs.isAfterLast();\n }", "public T last() throws EmptyCollectionException;", "public long LastInsertRowID() {\r\n\tlong result = 0;\r\n\r\n\tif (isConnected()) {\r\n\t Statement stat = null;\r\n\t ResultSet rs = null;\r\n\r\n\t try {\r\n\t\tstat = conn.createStatement();\r\n\t\trs = stat.executeQuery(\"select last_insert_rowid()\");\r\n\r\n\t\trs.next();\r\n\t\tresult = rs.getLong(1);\r\n\r\n\t } catch (Exception e) {\r\n\t\t// nothing todo here\r\n\t } finally {\r\n\t\tCleanup(stat, rs);\r\n\t }\r\n\t}\r\n\r\n\treturn result;\r\n }", "public boolean isSetLastRow()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(LASTROW$16) != 0;\n }\n }", "private ChameleonDirtyRegion getLastDirtyRegion() {\r\n\t\tint size= fDirtyRegions.size();\r\n\t\treturn (size == 0 ? null : (ChameleonDirtyRegion) fDirtyRegions.get(size - 1));\r\n\t}", "public Node<T> getLast() {\r\n\t\treturn last;\r\n\t}", "@Override\n\tpublic void findLastOverData() {\n\t\t\n\t}", "public final Outline getLastOutline() {\r\n return outlines.get(outlines.size()-1);\r\n }", "public synchronized DoubleLinkedListNodeInt getLast() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\treturn tail.getPrev();\n\t}", "public int getLastPos ()\r\n {\r\n return (getFirstPos() + getThickness()) - 1;\r\n }", "public Exception getLastException()\n\t{\n\t\treturn lastException;\n\t}", "@Override\n public E getLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[tail];\n }", "public CoreCell getLastCellInUniverse (){\r\n return cellsUniverse.get(cellsUniverse.size()-1);\r\n }" ]
[ "0.7860828", "0.73454624", "0.7268084", "0.7257062", "0.722845", "0.71535736", "0.70997083", "0.7098597", "0.7091197", "0.7082798", "0.70565814", "0.7050381", "0.7048838", "0.7047834", "0.7047503", "0.7033623", "0.7030284", "0.70250505", "0.7021034", "0.70166576", "0.690187", "0.6894503", "0.6888041", "0.6875481", "0.6867689", "0.6845773", "0.6832916", "0.67929465", "0.6791399", "0.67871684", "0.6774193", "0.6766089", "0.6766089", "0.67592347", "0.67592347", "0.6750163", "0.67424077", "0.67404515", "0.6739416", "0.6739416", "0.67125094", "0.67064905", "0.6696429", "0.6687211", "0.6671194", "0.6652688", "0.6646769", "0.6645594", "0.66455865", "0.6636894", "0.66202915", "0.6607732", "0.6600766", "0.6584738", "0.6574667", "0.65733796", "0.65678656", "0.65632147", "0.6559194", "0.65591", "0.65472126", "0.65398234", "0.6530068", "0.65270406", "0.6512563", "0.65120035", "0.65102345", "0.64991724", "0.6491628", "0.6485969", "0.6463268", "0.6461748", "0.64528704", "0.64437723", "0.6429793", "0.6419386", "0.64174074", "0.6412591", "0.6406485", "0.63919574", "0.638016", "0.6375754", "0.6374439", "0.6362161", "0.63549256", "0.63254005", "0.63242626", "0.63241637", "0.63223404", "0.6312266", "0.6311051", "0.6299698", "0.62893283", "0.6261399", "0.62514347", "0.6249926", "0.62436867", "0.62311965", "0.6226324", "0.6225295" ]
0.8200434
0
to get the list of items for a particular supplier.
public static Items[] retrieveItemsList(final int argSupplier) { List<Items> items = dao().listSupplierItems(argSupplier); return items.toArray(new Items[items.size()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String supplierList(SupplierDetails s);", "public List<Supplier> getSuppliers(){ \n\t List<Supplier> list=new ArrayList<Supplier>(); \n\t list=template.loadAll(Supplier.class); \n\t return list; \n\t}", "@Override\n\tpublic List<Supplier> getAllSupplier() {\n\t\tString sql=\"SELECT * FROM supplier\";\n\t\tRowMapper<Supplier> rowmapper=new BeanPropertyRowMapper<Supplier> (Supplier.class);\n\t\treturn this.getJdbcTemplate().query(sql, rowmapper);\n\t}", "List<ProductPurchaseItem> getAllSupplierProductPurchaseItems(long suppId, String searchStr);", "@Override\n\tpublic List<SupplierView> getAllSupplierInfo() {\n\t\tString sql=\"SELECT s.supplier_id, s.supplier_name, s.supplier_type, s.permanent_address, s.temporary_address,h.quantity,h.supplier_unique_id ,h.cost,h.buy_date,h.username,i.product_id, i.product_name FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id INNER JOIN product i on h.product_product_id=i.product_id\";\n\t\tRowMapper<SupplierView> rowmapper=new BeanPropertyRowMapper<SupplierView> (SupplierView.class);\n\t\treturn this.getJdbcTemplate().query(sql,rowmapper);\n\t}", "public List<SupplierEntity> getAllSuppliers() {\n\n List<SupplierEntity> suppliers = new ArrayList<SupplierEntity>();\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n suppliers = session.createQuery(\"FROM SupplierEntity ORDER BY supplierId\").list();\n tx.commit();\n\n } catch (HibernateException e) {\n\n if (tx != null) {\n tx.rollback();\n }\n\n e.printStackTrace();\n\n } finally {\n\n session.close();\n\n }\n\n return suppliers;\n\n }", "@Override\r\n\tpublic List<SenderdataMaster> fetchDataBasedonSupplier(List<String> incomingRefNbr, String supplier) {\n\t\treturn senderDataRepository.fetchDataBasedonSupplier(incomingRefNbr, supplier);\r\n\t}", "@Override\n\tpublic List<SupplierView> getSupplierByName(String supplierName) {\n\t\tString sql=\"SELECT s.supplier_id, s.supplier_name, s.supplier_type,s.image,s.permanent_address, s.temporary_address,h.quantity,h.cost,h.buy_date,h.supplier_unique_id,h.username,i.product_id, i.product_name FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id INNER JOIN product i on h.product_product_id=i.product_id WHERE supplier_name=?\";\n\t\tList<Map<String, Object>> row=getJdbcTemplate().queryForList(sql, supplierName);\n\t\tList<SupplierView> supplier_view=new ArrayList<SupplierView>();\n\t\tfor(Map<String, Object> rows:row)\n\t\t{\n\t\t\tSupplierView obj=new SupplierView();\n\t\t\tobj.setSupplierId((int)rows.get(\"supplier_id\"));\n\t\t\tobj.setSupplierName((String)rows.get(\"supplier_name\"));\n\t\t\tobj.setSupplierType((String)rows.get(\"supplier_type\"));\n\t\t\tobj.setImage((String)rows.get(\"image\"));\n\t\t\tobj.setPermanentAddress((String)rows.get(\"permanent_address\"));\n\t\t\tobj.setTemporaryAddress((String)rows.get(\"temporary_address\"));\n\t\t\tobj.setQuantity((int)rows.get(\"quantity\"));\n obj.setCost((double)rows.get(\"cost\"));\n obj.setSupplierUniqueId((int)rows.get(\"supplier_unique_id\"));\n obj.setBuyDate((Date)rows.get(\"buy_date\"));\n obj.setProductId((long)rows.get(\"product_id\"));\n obj.setProductName((String)rows.get(\"product_name\"));\n obj.setUsername((String) rows.get(\"username\"));\n supplier_view.add(obj);\n\t\t}\n\t\treturn supplier_view;\n\t}", "@Override\n public List<KitchenSupplier> getKitchenSupplier(String supplierName) {\n Query query = em.createQuery(\"SELECT k FROM KitchenSupplier k WHERE k.ksupplierName = :inSupplierName\");\n query.setParameter(\"inSupplierName\", supplierName);\n List<KitchenSupplier> s = null;\n try {\n s = query.getResultList();\n } catch (NoResultException ex) {\n System.out.println(\"caught no result exception\");\n }\n return s;\n }", "public List getEpSupplier() {\n\t\treturn getHibernateTemplate().find(\" from JSupplierNh \");\n\t}", "@Override\n\tpublic List<SupplierView> getSupplierDistinctName() {\n\t\tString sql=\"SELECT DISTINCT(s.supplier_name) FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id INNER JOIN product i on h.product_product_id=i.product_id\";\n\t\tRowMapper<SupplierView> rowmapper=new BeanPropertyRowMapper<SupplierView> (SupplierView.class);\n\t\treturn this.getJdbcTemplate().query(sql,rowmapper);\n\t}", "ProductPurchaseItem getSupplierProductPurchaseItemPerCatalogNo(long suppId, String catalogNo);", "public List<SupplierEntity> getSuppliersByType(String typeName) {\n\n List<SupplierEntity> suppliers = new ArrayList<>();\n\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n\n Criteria criteria = session.createCriteria(SupplierEntity.class);\n criteria.createCriteria(\"supplierType\").add(Restrictions.eq(\"name\", typeName));\n\n // Language lang = (Language)super.findByCriteria(criteria).get(0);\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n suppliers = criteria.list();\n\n } catch (HibernateException e) {\n\n if (tx != null) {\n tx.rollback();\n }\n\n log.error(e.getStackTrace());\n\n } finally {\n session.close();\n }\n\n return suppliers;\n\n }", "public ArrayList<GroupSupplier> getGroupSupplierList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupSupplier> list = new ArrayList<GroupSupplier>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupSupplier.class);\n\t\t\tList<TblGroupSupplier> groupsuppliers = cr.list();\n\t\t\tif (groupsuppliers.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupSupplier> iterator = groupsuppliers.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupSupplier tblgroupsupplier = iterator.next();\n\t\t\t\t\tGroupSupplier groupsupplier = new GroupSupplier();\n\t\t\t\t\tgroupsupplier.convertFromTable(tblgroupsupplier);\n\t\t\t\t\tlist.add(groupsupplier);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}", "public SupplierCard find_Supplier(Integer supplier_id) {\n return supplier_dao.find(supplier_id);\n }", "@Transactional\n\tpublic List<Supplier> list() {\n\t\tString hql=\"from Supplier\";\n\t\tQuery query=sessionFactory.getCurrentSession().createQuery(hql);\n\t\t\n\t\treturn query.list();\n\t}", "public void showSupplierList(){\n\t\tfor(int i = 0; i<supplierList.size();i++) {\n\t\t\tSystem.out.println(supplierList.get(i).getSupID()+\";\"+\n\t\t\t\t\tsupplierList.get(i).getCompanyName()+\";\"+\n\t\t\t\t\tsupplierList.get(i).getAddress()+\";\"+\n\t\t\t\t\tsupplierList.get(i).getSaleRep());\n\t\t}\n\t}", "public List<SupplierEntity> getSuppliersExclType(String typeName) {\n\n List<SupplierEntity> suppliers = new ArrayList<>();\n\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n\n Criteria criteria = session.createCriteria(SupplierEntity.class);\n criteria.createCriteria(\"supplierType\").add(Restrictions.ne(\"name\", typeName));\n\n // Language lang = (Language)super.findByCriteria(criteria).get(0);\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n suppliers = criteria.list();\n\n } catch (HibernateException e) {\n\n if (tx != null) {\n tx.rollback();\n }\n\n log.error(e.getStackTrace());\n\n } finally {\n session.close();\n }\n\n return suppliers;\n\n }", "public List<ProductWithSupplierTO> getAllProducts(long storeID) throws NotInDatabaseException;", "public void getSupplier(Supplier supplier) {\n\t\r\n}", "List<PurchaseOrderHeader> getAllPurchaseOrderHeaderPerOrguIdAndSupplierId(long supplierId);", "public String getSupplier() {\n return supplier;\n }", "public HashMap<Integer, Float> getProductsForSupplier(int supplierId) {\n\t\tHashMap<Integer, Float> map = new HashMap<Integer, Float>();\n\t\tString sql = \"select product_id, offer_price from supplier_products where supplier_id = ? order by product_id asc\";\n\t\ttry (Connection connection = DriverManager.getConnection(URL, user, password);\n\t\t\t\tPreparedStatement statement = connection.prepareStatement(sql)) {\n\t\t\tstatement.setInt(1, supplierId);\n\t\t\tResultSet res = statement.executeQuery();\n\n\t\t\twhile (res.next()) {\n\t\t\t\tmap.put(res.getInt(1), res.getFloat(2));\n\t\t\t}\n\t\t\treturn map;\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Couldn't find a supplier with the id: \" + supplierId);\n\t\t}\n\t\treturn null;\n\t}", "public List getEpIndepot(String suppliers) {\n\t\treturn getHibernateTemplate().find(\" from DIndepot a where a.SupplierId in \"+suppliers+\"\");\n\t}", "public <T> List<T> listOf(int count, Supplier<T> supplier) {\n List<T> list = new ArrayList<>();\n for (int i = 0; i < count; i++) {\n list.add(supplier.get());\n }\n return list;\n }", "@Override\n\tpublic List<SupplierView> getSupplierByBuyDate(String supplyStartDate, String supplyLastDate) {\n\t\tString sql=\"SELECT s.supplier_id, s.supplier_name, s.supplier_type, s.image, s.permanent_address, s.temporary_address, h.quantity,h.cost,h.supplier_unique_id,h.buy_date,h.username,i.product_id, i.product_name FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id INNER JOIN product i on h.product_product_id=i.product_id WHERE buy_date>=?::DATE and buy_date<=?::DATE \";\n\t List<Map<String, Object>> row=getJdbcTemplate().queryForList(sql, supplyStartDate, supplyLastDate);\n\t List<SupplierView> supplier_view=new ArrayList<SupplierView>();\n\t for(Map<String, Object> rows:row)\n\t {\n\t \tSupplierView obj=new SupplierView();\n\t \tobj.setSupplierId((int)rows.get(\"supplier_id\"));\n\t \tSystem.out.println(obj.getSupplierId());\n\t \tobj.setSupplierName((String)rows.get(\"supplier_name\"));\n\t \tSystem.out.println(obj.getSupplierName());\n\t \tobj.setSupplierType((String)rows.get(\"supplier_type\"));\n\t obj.setImage((String)rows.get(\"image\"));\n\t obj.setPermanentAddress((String)rows.get(\"permanent_address\"));\n\t obj.setTemporaryAddress((String)rows.get(\"temporary_address\"));\n\t obj.setQuantity((int)rows.get(\"quantity\"));\n\t obj.setCost((double)rows.get(\"cost\"));\n\t obj.setBuyDate((Date)rows.get(\"buy_date\"));\n\t obj.setSupplierUniqueId((Integer) rows.get(\"supplier_unique_id\"));\n\t obj.setProductId((long)rows.get(\"product_id\"));\n\t obj.setProductName((String)rows.get(\"product_name\"));\n\t obj.setUsername((String) rows.get(\"username\"));\n\t supplier_view.add(obj);\n\t }\n\t return supplier_view;\n\t}", "public Remote.Supplier<SortedSet<E>> getSupplier()\n {\n return m_supplier == null ? DEFAULT_SUPPLIER : m_supplier;\n }", "public ArrayList<String> getSellers(String productName);", "@Override\n\tpublic Supplier getSupplierId(long supplierId) {\n\t\tString sql=\"SELECT * FROM supplier WHERE supplier_id=?\";\n\t\tRowMapper<Supplier> rowmapper=new BeanPropertyRowMapper<Supplier> (Supplier.class);\n\t\treturn this.getJdbcTemplate().queryForObject(sql, rowmapper, supplierId);\n\t}", "public List<ProductWithSupplierAndStockItemTO> getProductsWithStockItems(long storeID) throws NotInDatabaseException;", "public List<UserSupplier> completeSupplier(String query) {\n List<UserSupplier> userSuppliers = user.getUserSuppliers();\n\n List<UserSupplier> suppliers = new ArrayList<>();\n for (UserSupplier userSupplier : userSuppliers) {\n if (userSupplier.getSupplier().getLabel().startsWith(query)) {\n suppliers.add(userSupplier);\n }\n }\n return suppliers;\n }", "public List zipcodeWithSuppliersList() throws AdException {\r\n\t\t try {\r\n\t\t begin();\r\n\t\t Query q = getSession().createSQLQuery(\"select DISTINCT zipcode from Zipcode\");\r\n\t\t List list = q.list();\r\n\t\t commit();\r\n\t\t return list;\r\n\t\t } catch (HibernateException e) {\r\n\t\t rollback();\r\n\t\t throw new AdException(\"Could not list the zipcodes where suppliers are present \", e);\r\n\t\t }\r\n\t\t }", "public jkt.hms.masters.business.MasStoreSupplier getSupplier () {\n\t\treturn supplier;\n\t}", "public ArrayList<CategorySupplier> getCategorySupplierList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<CategorySupplier> list = new ArrayList<CategorySupplier>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblCategorySupplier.class);\n\t\t\tList<TblCategorySupplier> categorysuppliers = cr.list();\n\t\t\tif (categorysuppliers.size() > 0){\n\t\t\t\tfor (Iterator<TblCategorySupplier> iterator = categorysuppliers.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblCategorySupplier tblcategorysupplier = iterator.next();\n\t\t\t\t\tCategorySupplier categorysupplier = new CategorySupplier();\n\t\t\t\t\tcategorysupplier.convertFromTable(tblcategorysupplier);\n\t\t\t\t\tlist.add(categorysupplier);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}", "@Override\n public Supplier<List<Integer>> supplier() {\n // constructor method reference\n // for an Object array use: Object[]::new\n return ArrayList::new;\n }", "public String getSupplierName() {\n return supplierName;\n }", "@Override\n\tpublic SupplierView getSupplierBySupplierIdAndProductId(long supplierId, long productId) {\n\t\tString sql=\"SELECT s.supplier_id, s.supplier_name, s.supplier_type,s.image,s.permanent_address, s.temporary_address,h.quantity,h.cost,i.product_id, i.product_name FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id INNER JOIN product i on h.product_product_id=i.product_id WHERE supplier_id=? and product_id=?\";\n\t\tRowMapper<SupplierView> rowmapper=new BeanPropertyRowMapper<SupplierView> (SupplierView.class);\n\t\treturn this.getJdbcTemplate().queryForObject(sql, rowmapper, supplierId, productId);\n\t}", "private void printSupplierList(Shop shop) {\n System.out.println(shop.supplierListToString());\n }", "public Integer getSupplierid() {\r\n return supplierid;\r\n }", "public Integer getSupplierId() {\n return supplierId;\n }", "List<PurchaseOrderHeader> getAllOutstandingAndConfirmedPurchaseOrderHeaderPerOrguIdAndSupplierId(long supplierId);", "@Override\n\tpublic ServResponse getServSupplierList(ServRequest servRequest) {\n\t\tInteger loginUserId = servRequest.getUserId();\n\t\tServResponse servResponse = new ServResponse();\n\t\ttry {\n\t\t\tString catalogNo = servRequest.getCatalogNo();\n\t\t\tList<VendorServiceDTO> verdonServiceList = this.servService.getSupplierList(catalogNo);\n\t\t\tservResponse.setVerdonServiceList(verdonServiceList);\n\t\t\tservResponse.setHasException(Boolean.FALSE);\n\t\t} catch (Exception e) {\n\t\t\tWSException exDTO = exceptionUtil.getExceptionDetails(e);\n\t\t\texceptionUtil.logException(exDTO, this.getClass(), e,\n\t\t\t\t\tnew Exception().getStackTrace()[0].getMethodName(),\n\t\t\t\t\t\"INTF0207\", loginUserId);\n\t\t\tservResponse.setHasException(true);\n\t\t\tservResponse.setWsException(exDTO);\n\t\t}\n\t\treturn servResponse;\n\t}", "public Map getAllBillBySuppliers1(String supplierId) {\n\t\tSupplierDetailDao dao = new SupplierDetailDao();\r\n\t\tList list = dao.getAllBillBySuppliers1(supplierId);\r\n\t\tMap map = new HashMap();\r\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\tObject[] o = (Object[]) list.get(i);\r\n\t\t\tcom.smt.bean.GetSupplierDetails bean = new com.smt.bean.GetSupplierDetails();\r\n\t\t\tSystem.out.println(Arrays.toString(o));\r\n\t\t\tbean.setBillNo(o[0].toString());\r\n\r\n\t\t\t// bean.setTotalAmount((Double)o[1]);\r\n\t\t\tSystem.out.println(\"***************\" + o[0]);\r\n\t\t\tmap.put(bean.getBillNo(), bean);\r\n\r\n\t\t}\r\n\t\treturn map;\r\n\t}", "List<ListObject> getSupplimentalCodeList();", "public Map getAllBillBySuppliers(String supplierId) {\n\t\tSupplierDetailDao dao = new SupplierDetailDao();\r\n\t\tList list = dao.getAllBillBySuppliers(supplierId);\r\n\t\tMap map = new HashMap();\r\n\t\tfor (int i = 0; i < list.size(); i++)\r\n\t\t{\r\n\t\t\tObject[] o = (Object[]) list.get(i);\r\n\t\t\tcom.smt.bean.GetSupplierDetails bean = new com.smt.bean.GetSupplierDetails();\r\n\t\t\tSystem.out.println(Arrays.toString(o));\r\n\r\n\t\t\tString pendingBal = o[2].toString();\r\n\t\t\tif (pendingBal.equals(\"0\")) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tbean.setBillNo(o[0].toString());\r\n\t\t\t\t//bean.setItemName(o[0].toString());\r\n\t\t\t\tbean.setSize(o[1].toString());\r\n\t\t\t\tbean.setBarcode(o[2].toString());\t\t\t\r\n\t\t\t}\r\n\t\t\t// bean.setTotalAmount((Double)o[1]);\r\n\t\t\tSystem.out.println(\"***************\" + o[0]);\r\n\t\t\tmap.put(bean.getBillNo(), bean);\r\n\r\n\t\t}\r\n\t\treturn map;\r\n\t}", "@Override\r\n\tpublic List<Supplies> findall() {\n\t\treturn suppliesDao.findall();\r\n\t}", "SupplierInfo selectByPrimaryKey(Long id);", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "@Override\n public Interface_SupplierReadOnly getSupplier() {\n return supplier;\n }", "public void setSupplier(Supplier supplier) {\n this.supplier = supplier;\n }", "List<EcsSupplierRebate> selectAll();", "@Override\n\tpublic DataTablesResponseInfo getSupplier() {\n\t\tDataTablesResponseInfo info = new DataTablesResponseInfo();\n\t\tinfo.setData(purchaseDao.getSupplier());\n\t\treturn info;\n\t}", "public Long getSupplierId() {\n\t\treturn supplierId;\n\t}", "public void setSupplierid(Integer supplierid) {\r\n this.supplierid = supplierid;\r\n }", "List<Route> getAllRouteByIdSupplier(Long id_supplier);", "String getSupplierID();", "public ResultSet getItemListForSold() throws IllegalStateException{\n\t \n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try{\n\t \t stmt = con.createStatement();\n String queryString = \"SELECT INUMBER , INAME , auc_start, auc_end_date , startbid , currentbid , CURRENTBID-STARTBID \" \n \t\t+ \"FROM ITEM \"\n + \" WHERE SELLERNO = '\" + this.id +\"' AND STATUS = 'SOLD' \"\n \t+\"GROUP BY SELLERNO, INUMBER, INAME, auc_start, auc_end_date,\"+ \n \t\t\" startbid, currentbid, CURRENTBID-STARTBID\";\n\n result = stmt.executeQuery(queryString);\n \n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t }\n\t return result; \n\t }", "Set<Ride> queryRidesFromSupplier(Trip trip, Supplier supplier){\n Map<String, String> parameters = journeyRequestLocationsToParameters(trip);\n String parsedParameters = new HttpUrlParameterParser().parseParameters(parameters);\n String urlAddress = REQUEST_ROOT_URL + supplier.toString() + \"?\" + parsedParameters;\n IConnection<HttpURLConnection, String> httpConnectionHandler = new HttpConnectionHandler();\n HttpURLConnection connection = httpConnectionHandler.connect(urlAddress);\n\n if(connection == null){\n return new HashSet<>();\n }\n\n String response = httpConnectionHandler.getResponse(connection);\n return extractRidesFromResponse(response, trip.getNumPassengers(), supplier);\n }", "public Opportunities[] findWhereSupplierIdEquals(int supplierId) throws OpportunitiesDaoException\r\n\t{\r\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE supplier_id = ? ORDER BY supplier_id\", new Object[] { new Integer(supplierId) } );\r\n\t}", "@Override\r\n\tpublic List<Supplies> findbyname(String name) {\n\t\treturn suppliesDao.findbyname(name);\r\n\t}", "public void setSupplierId(Integer supplierId) {\n this.supplierId = supplierId;\n }", "public List<Item> getItemList();", "public String getSupplierPartId() {\r\n return this.supplierPartId;\r\n }", "private void loadSupplierSpinner() {\n //Retrieve Suppliers list from database\n ArrayList<String> suppliers = getAllSuppliers();\n //Create Adapter for Spinner\n spinnerAdapter= new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, suppliers);\n // Specify dropdown layout style - simple list view with 1 item per line\n spinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n // attaching data adapter to spinner\n mSpinner.setAdapter(spinnerAdapter);\n mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String supplier = parent.getItemAtPosition(position).toString();\n // Showing selected spinner item\n //Toast.makeText(parent.getContext(), \"You selected: \" + supplier, Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n //Nothing for now\n }\n });\n }", "@Override\r\n public List querySupplierIdByAdcolumn(String str) throws SQLException {\n return sqlMapClient.queryForList(\"CMS_SUPPLIER_ADCOLUMN.abatorgenerated_querySupplierIdByAdcolumn\", str);\r\n }", "@Query(value = \"SELECT * \" +\n \"FROM suppliers as s\\n\" +\n \"inner JOIN parts p on s.id = p.supplier_id\\n\" +\n \"WHERE is_importer = false\\n\" +\n \"GROUP BY s.id;\",nativeQuery = true)\n List<Supplier> findAllThatDoNotImport();", "public List<StockItem> getStockList();", "@Override\n\tpublic List<Supplier> gets(int id) {\n\t\treturn null;\n\t}", "public Supplier findSupplier(int suppliernum, boolean retrieveAssociation);", "public String getSuppliersInforId() {\n return suppliersInforId;\n }", "public RowIterator getSupplierSiteEO()\n {\n return (RowIterator)getAttributeInternal(SUPPLIERSITEEO);\n }", "public List<Item> getAllItemsAvailable();", "List<PurchaseOrderHeader> getAllPurchaseOrderHeaderPerOrguIdAndSupplierIdAndStatusCode(long supplierId);", "public List getAllUnPaidBillAmount(HttpServletRequest request, HttpServletResponse response) {\n\r\n\t\tString supplierId = request.getParameter(\"supplier\");\r\n\r\n\t\tMap<Long, GetSupplierDetails> map = new HashMap<Long, GetSupplierDetails>();\r\n\r\n\t\tSupplierDetailDao dao = new SupplierDetailDao();\r\n\t\tList<GetSupplierDetails> custList = dao.getAllUnPaidBillAmount(supplierId);\r\n\r\n\t\treturn custList;\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\n\t\t\t\"ID: %d. Name: %s. Supplier: [ \"+supplier+\" ]\", id, name\n\t\t);\n\t}", "public String getSupplierNum() {\n return supplierNum;\n }", "@Override\r\n\tpublic List<Address> getAddressBySupplierId(int supplierId, int companyId) {\n\t\treturn getAddressDAO().getAddressBySupplierId(supplierId,companyId);\r\n\t}", "@Override\n public List<Object> getGroupMember(String name, int supplierId) {\n return null;\n }", "public abstract List getProviders();", "Supplier findSupplierById(Integer id)throws SQLException;", "public List<ProductDetails> retrieveOfferNamesAndIds() throws MISPException\n\t{\n\t\tlogger.entering(\"retrieveOfferNamesAndIds\");\n\t\t\n\t\tList<ProductDetails> products = null;\n\t\t\n\t\ttry{\t\t\n\t\t\tproducts = offerDetailsMgr.retrieveOfferNamesAndIds();\n\t\t}\n\t\tcatch (DBException exception){\t\t\t\n\t\t\tlogger.error\n\t\t\t\t\t(\"An exception occured while retrieving offers.\",exception);\n\t\t\tthrow new MISPException(exception);\n\t\t}\n\t\t\n\t\tlogger.exiting(\"retrieveOfferNamesAndIds\");\n\t\treturn products;\t\t\n\t}", "public List<TblPurchaseOrderDetail>getAllDataPurchaseOrderDetail(TblSupplier supplier,TblPurchaseOrder po,RefPurchaseOrderStatus poStatus,TblItem item,Date startDate,Date endDate,TblPurchaseRequest mr);", "List<Product> getProductsList();", "public List<ProductWithStockItemTO> getProductsWithLowStock(long storeID);", "public Supplier getById(int id){ \n\t Supplier e=(Supplier)template.get(Supplier.class,id); \n\t return e; \n\t}", "public Short getSuppliersId() {\n return suppliersId;\n }", "public void setSupplierPartId(String supplierPartId) {\r\n this.supplierPartId = supplierPartId;\r\n }", "public void setSupplier (jkt.hms.masters.business.MasStoreSupplier supplier) {\n\t\tthis.supplier = supplier;\n\t}", "public int getSupplierId()\n {\n return(this.SupplierId);\n }", "public Map getEditSupplier(Long suppilerId) {\r\n\r\n\t\tSupplierDetailDao dao1 = new SupplierDetailDao();\r\n\t\tList catList = dao1.getEditSupplier1(suppilerId);\r\n\t\t\r\n\t\tMap map = new HashMap();\r\n\t\tfor (int i = 0; i < catList.size(); i++) {\r\n\t\t\tObject[] o = (Object[]) catList.get(i);\r\n\t\t\tSupplierEditBean bean = new SupplierEditBean();\r\n\t\t\tbean.setAddress((String) o[0]);\r\n\t\t\tbean.setCity((String) o[1]);\r\n\t\t\tbean.setContactPerson((String) o[2]);\r\n\t\t\tbean.setPin((Long) o[3]);\r\n\t\t\tbean.setEmail((String) o[4]);\r\n\t\t\tbean.setMobileno((Long) o[5]);\r\n\t\t\tbean.setPanNo((String) o[6]);\r\n\t\t\tbean.setSupplierName((String) o[7]);\r\n\t\t\tbean.setSuppCode((String) o[8]);\r\n\t\t\tbean.setTaxType((String) o[9]);\r\n\r\n\t\t\tmap.put(bean.getSupplierName(), bean);\r\n\t\t}\r\n\t\treturn map;\r\n\t}", "@Override\r\n\tpublic List<SupplierStoreBalanceCardBean> queryStoreBalanceCard(SupplierStoreBalanceCardBean bean) {\n\t\treturn supplierStoreDao.queryStoreBalanceCard(bean);\r\n\t}", "public void setSupplierId(int SupplierIdIn)\n {\n this.SupplierId = SupplierIdIn;\n }", "@Override\n\tpublic List<SupplierProductDTO> getAllSupplierProductsByServiceId(\n\t\t\tInteger serviceId) {\n\n\n\n\t\tloggerService\n\t\t\t\t.logServiceInfo(\"Start getAllSupplierProductsByServiceId Method with serviceId \"\n\t\t\t\t\t\t+ serviceId);\n\n\t\ttry {\n\n\t\t\tString query = \"select model from SupplierProduct model where model.productId.serviceId.id = \"+serviceId;\n\t\t\tList<SupplierProduct> result = baseDao.findListByQuery(query);\n\n\t\t\tloggerService.logServiceInfo(\"End getAllSupplierProductsByServiceId Method\");\n\t\t\treturn mapper.mapAsList(result, SupplierProductDTO.class);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tloggerService.logServiceError(\"can't getAllSupplierProductsByServiceId \", e);\n\t\t\treturn null;\n\t\t}\n\t\n\t\n\t\n\t\n\t}", "public List<GeneralItem> getList() {\n return stList;\n }", "public List<ShelfItem> getAllShelf(String filter, String username, Integer from, Integer to);", "public List<Product> getProducts();", "public List<Product> getProducts();", "java.util.List<WorldUps.UDeliveryMade> \n getDeliveredList();", "public abstract List<String> getInventory();", "java.util.List<com.google.cloud.channel.v1.PurchasableOffer> \n getPurchasableOffersList();" ]
[ "0.74263495", "0.73481053", "0.71174467", "0.7041294", "0.68918884", "0.682338", "0.6739046", "0.66694486", "0.662023", "0.6608386", "0.65126294", "0.6432048", "0.63904977", "0.6328803", "0.6302069", "0.6298196", "0.62963665", "0.6292642", "0.62021166", "0.6187032", "0.6166099", "0.61069393", "0.6106442", "0.6103619", "0.6077399", "0.6063756", "0.60231745", "0.5976477", "0.5932756", "0.5915123", "0.58931977", "0.58867687", "0.5863513", "0.5860615", "0.5852245", "0.5851889", "0.583017", "0.5792988", "0.578376", "0.5769457", "0.57642627", "0.5751057", "0.5740683", "0.5734889", "0.57264566", "0.57192993", "0.5718311", "0.570114", "0.5694548", "0.5670379", "0.56700474", "0.56440586", "0.5620883", "0.55982286", "0.5573181", "0.55649984", "0.55475986", "0.5541706", "0.5540611", "0.5517471", "0.5516289", "0.5508255", "0.55033803", "0.54914033", "0.5490413", "0.5473097", "0.54708683", "0.54339457", "0.5428781", "0.5417791", "0.54172945", "0.5412856", "0.5409097", "0.54076934", "0.54060096", "0.5395667", "0.53688866", "0.53687805", "0.53590137", "0.5318226", "0.530748", "0.5288046", "0.5285356", "0.5274367", "0.5243396", "0.5239159", "0.52322394", "0.5226492", "0.52255553", "0.52252436", "0.5212667", "0.52116674", "0.52104425", "0.5204472", "0.5172443", "0.5172266", "0.5172266", "0.51685315", "0.5148646", "0.5147942" ]
0.71915954
2
Implement this interface in order to receive the flow of Mutations
public interface MutationListener { void accept(Mutation mutation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void introduceMutations() {\n }", "public abstract void mutate();", "public interface Mutation {\n void apply(Collection<PartType> parts);\n}", "public interface IMutationOperator extends IDescriptable, Opcodes {\n\t/**\n\t * Gets all possible points in given class (bytecode) where different\n\t * mutants can be produced.\n\t *\n\t * @param bytecode bytecode to be analyzed\n\t * @return list of mutation points witihn given class (bytecode)\n\t */\n\tList<IMutationPoint> getMutationPoints(byte[] bytecode);\n\n\t/**\n\t * Mutate given bytecode to create mutants with given mutation points.\n\t *\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPoint mutation point in given class (bytecode)\n\t * @return list of mutants created within given point\n\t */\n\tList<IMutantBytecode> mutate(byte[] bytecode, IMutationPoint mutationPoint);\n\n\t/**\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPointIndex mutation point in given class (bytecode)\n\t * @param mutantIndex specific mutant index within given point\n\t * @return mutated bytecode - mutant\n\t */\n\tIMutantBytecode mutate(byte[] bytecode, int mutationPointIndex, int mutantIndex);\n}", "MutateNda<V> getMut();", "interface Filter extends Mutator {\n\n }", "default MutateNda<V> mut() { return getMut(); }", "private void mutateHelper() {\n\t\tsynchronized (this) {\n\t\t\tRandom rand = new Random();\n\t\t\tint mutateType = rand.nextInt(5);\n\t\t\tif (rules.size() >= 14) {\n\t\t\t\tmutateType = rand.nextInt(6);\n\t\t\t}\n\t\t\tint index = rand.nextInt(rules.size());\n\t\t\tMutation m = null;\n\t\t\tswitch (mutateType) {\n\t\t\tcase 0:\n\t\t\t\tm = MutationFactory.getDuplicate();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tm = MutationFactory.getInsert();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tm = MutationFactory.getRemove();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tm = MutationFactory.getReplace();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tm = MutationFactory.getSwap();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tm = MutationFactory.getTransform();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void receive( Metadata metadata )\n\t{\n\t\tif( metadata.isReset() )\n\t\t{\n\t\t\treset();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmMetadata.add( metadata );\n\t\t\tprocessMetadata( metadata );\n\t\t}\n\t\t\n\t\tmUpdated = true;\n\t}", "@Override\n public boolean isMutable() {\n return true;\n }", "public void finish() throws MutationsRejectedException {\n // No-op since Mutations are now added on the fly.\n }", "interface Update {}", "public void askModification() {\n\t\t\n\t\n\t}", "@Override\n public boolean isMutable()\n {\n return true;\n }", "public interface MutableIVData extends DataManipulator<MutableIVData, ImmutableIVData> {\n\n Value<Integer> hpIVS();\n Value<Integer> attackIVS();\n Value<Integer> defenseIVS();\n Value<Integer> spAttackIVS();\n Value<Integer> spDefenseIVS();\n Value<Integer> speedIVS();\n\n}", "public void defaultMutate() {\n int mutationIndex = RNG.randomInt(0, this.m_GenotypeLength);\n //if (mutationIndex > 28) System.out.println(\"Mutate: \" + this.getSolutionRepresentationFor());\n if (this.m_Genotype.get(mutationIndex)) this.m_Genotype.clear(mutationIndex);\n else this.m_Genotype.set(mutationIndex);\n //if (mutationIndex > 28) System.out.println(this.getSolutionRepresentationFor());\n }", "void process(ToSend m) {\n ByteBuffer requestBuffer = buildMsg(m.state.ordinal(), m.leader, m.zxid, m.electionEpoch, m.peerEpoch, m.configData);\n\n manager.toSend(m.sid, requestBuffer);\n\n }", "@Override\n\tpublic void modify() {\n\t\t\n\t}", "@Override\n\tpublic void update(Member mem) {\n\t\t\n\t}", "@Override\n public void execute() {\n System.out.println(\"---------- OBSERVER PATTERN ----------\");\n Subject subject = new Subject();\n\n //create observers and pass in subject they want to observe (constructor code will add them as observers to the subject)\n new ObserverA(subject);\n new ObserverB(subject);\n\n //subject data changes and automatically updates all observers...triggering their souts (reporting the changed number)\n subject.changeUnstableInt();\n }", "@Override\r\n\tpublic void operations() {\n\t\tSystem.out.println(\"update self!\"); \r\n notifyObservers(); \r\n\r\n\t}", "@Override\n\tpublic void receive() {\n\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\r\n\tpublic void receive() {\n\t\tcurrentState.receive();\r\n\t}", "@Override\n public void run() {\n strategy.generateMutations(iContext.wildSequence, region, new MutationCallback() {\n @Override\n public void actOnSequence(String mutatedSequence, String regionId) {\n \t// Avoid duplicate mutations\n if (!mutationHistory.contains(mutatedSequence)) {\n \tconsecutiveDuplicates.set(0);\n mutationHistory.add(mutatedSequence);\n // le' successful mutation! :D\n MutationContext mContext = new MutationContext(iContext, mutatedSequence, regionId, mutIdCtr.incrementAndGet());\n supervisor.tell(new MutateSequenceResultMsg(mContext), self());\n }else{\n \t// If we hit the threshold for maximum, consecutive duplicate mutations, stop generating new mutations\n \t// because we've probably exhausted the problem space by now\n \tif(consecutiveDuplicates.incrementAndGet() >= maxConsecutiveDuplicateMutationsThreshold){\n \t\tlog.info(\"At least [\" + maxConsecutiveDuplicateMutationsThreshold + \"] consecutive, duplicate mutations have already been generated for region[ \" + regionId + \"]. Stopping further mutations...\");\n \t\tstrategy.stop();\n \t}\n }\n // Stop mutating if we reach our maximum unique mutation threshold\n if(mutationHistory.size() >= MAX_UNIQUE_MUTATIONS){\n \tlog.info(\"At least [\" + MAX_UNIQUE_MUTATIONS + \"] unique mutations have been generated for region[ \" + regionId + \"]. Stopping further mutations...\");\n \tstrategy.stop();\n }\n }\n @Override\n protected void onStop(long totalMutations) {\n \tfinished();\n }\n private void finished(){\n \t// le finished! :D\n supervisor.tell(new MutateSequenceRegionFinishedMsg(regionId, mutationHistory.size()), self());\n mutationHistory = new HashSet<>();\n getContext().become(ready);\n }\n });\n }", "@Override\r\n\tpublic void MemberUpdate() {\n\r\n\t}", "@Override\r\n\tpublic void transmit() {\n\t\tcurrentState.transmit();\r\n\t}", "@Override\n\tprotected void flowThrough(Object in, Object d, Object out) {\n\t\t\n\t}", "@Override\n\tpublic void updateFromPerception(IPerception perception)\n\t{\n\t}", "@Override\n\tpublic void updateFromPerception(IPerception perception)\n\t{\n\t}", "public interface MainUpdateInteractor {\n void execute();\n}", "@Override\n\tsynchronized void execute() {\n\t\t_dataOUTPipe.dataIN(op1.getText());\n\t\t_dataOUTPipe.dataIN(op2.getText());\n\t\t_dataOUTPipe.dataIN(op.getText());\n\t}", "@Override\r\n\tpublic void compute() {\n\t\t\r\n\t}", "public void mutate(NeuralPlayer p)\n\t{\n\t\tdouble[] genome = NetworkCODEC.networkToArray(p.net);\n\t\tRandom g = new Random();\n\t\tfor (int i = 0; i< genome.length; i++)\n\t\t{\n\t\t\tif (g.nextDouble() <= mutationPer)\n\t\t\t\tgenome[i] = randomNum(g) + genome[i];\n\t\t}\n\t\tNetworkCODEC.arrayToNetwork(genome, p.net);\n\t}", "@Override\r\n\tpublic void member() {\n\t\t\r\n\t}", "interface Update extends Appliable<JobTargetGroup>, UpdateStages.WithMembers {\n }", "@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}", "public interface Modifier<Type> {\n\n\tvoid modify(Type object);\n\n\tvoid undo(Type object);\n}", "@Override\n\tpublic void input() {\n\t\t\n\t}", "@Override\r\n\tpublic void updateState() {\r\n\t\tState<A> result = null;\r\n\t\tif(events.size() > 0){\r\n\t\t\tfor(Event<A> a : events){\r\n\t\t\t\tstate = (result = state.perform(this,a)) == null ? state : result;\r\n\t\t\t}\r\n\t\t\tevents.removeAllElements();\r\n\t\t}\r\n\t\tstate = (result = state.perform(this, null)) == null ? state : result;\r\n\t\trequestInput();\r\n\t\t\r\n\t}", "interface ColorTransformation extends Mutator {\n\n }", "interface Update {\n\n }", "@API.Public\npublic interface DocumentMutation extends Iterable<MutationOp> {\n\n /**\n * Empties this Mutation object.\n */\n public DocumentMutation empty();\n\n /**\n * Sets the value of given field to the specified value. If the value of\n * given field name doesn't exist in the existing document on the server\n * then new field will be created.\n *\n * If the value for the given field name exists in the existing document\n * on server and its of the same type as the new value then existing value\n * will be replaced by new value.\n *\n * If the value of given field name exists and it is not same type as the\n * type of newly set value then mutation will fail.\n *\n * @param path path of the field that needs to be updated\n * @return this Mutation object\n */\n public DocumentMutation setNull(String path);\n\n public DocumentMutation setNull(FieldPath path);\n\n public DocumentMutation set(String path, Value v);\n\n public DocumentMutation set(FieldPath path, Value v);\n\n public DocumentMutation set(String path, boolean b);\n\n public DocumentMutation set(FieldPath path, boolean b);\n\n public DocumentMutation set(String path, short s);\n\n public DocumentMutation set(FieldPath path, short s);\n\n public DocumentMutation set(String path, byte b);\n\n public DocumentMutation set(FieldPath path, byte b);\n\n public DocumentMutation set(String path, int i);\n\n public DocumentMutation set(FieldPath path, int i);\n\n public DocumentMutation set(String path, long l);\n\n public DocumentMutation set(FieldPath path, long l);\n\n public DocumentMutation set(String path, float f);\n\n public DocumentMutation set(FieldPath path, float f);\n\n public DocumentMutation set(String path, double d);\n\n public DocumentMutation set(FieldPath path, double d);\n\n public DocumentMutation set(String path, String value);\n\n public DocumentMutation set(FieldPath path, String value);\n\n public DocumentMutation set(String path, BigDecimal bd);\n\n public DocumentMutation set(FieldPath path, BigDecimal bd);\n\n public DocumentMutation set(String path, Time t);\n\n public DocumentMutation set(FieldPath path, Time t);\n\n public DocumentMutation set(String path, Timestamp t);\n\n public DocumentMutation set(FieldPath path, Timestamp t);\n\n public DocumentMutation set(String path, Date d);\n\n public DocumentMutation set(FieldPath path, Date d);\n\n public DocumentMutation set(String path, List<? extends Object> value);\n\n public DocumentMutation set(FieldPath path, List<? extends Object> value);\n\n public DocumentMutation set(String path, Interval intv);\n\n public DocumentMutation set(FieldPath path, Interval intv);\n\n public DocumentMutation set(String path, ByteBuffer bb);\n\n public DocumentMutation set(FieldPath path, ByteBuffer bb);\n\n public DocumentMutation set(String path, Map<String, ? extends Object> value);\n\n public DocumentMutation set(FieldPath path, Map<String, ? extends Object> value);\n\n public DocumentMutation set(String path, Document value);\n\n public DocumentMutation set(FieldPath path, Document value);\n\n\n /**\n * Sets or replaces the value of a given field with the new value given in the API.\n * This is a fast API that doesn't require a read on the server to validate\n * the path or type.\n *\n * If any element in the specified field path doesn't exist then that element\n * will be created on the server.\n * Example : Field is \"a.b.c\" and value is int 10.\n * Suppose the server has only the field \"a\" of type map, then a setOrReplace of \"a.b.c\"\n * will create element \"b\" of type map inside \"a\". It will also create an element\n * named \"c\" of type integer inside map \"b\".\n *\n * If any element specified in the field path is of a different type\n * than the existing field element on the server, it will be deleted and replaced by\n * a new element.\n * Example : Field is \"a.b.c\" and value is int 10.\n * Suppose on the server, there is a field \"a\" of type array. This operation\n * will delete \"a\", create new element \"a\" of type map, and insert \"b.c\" in it.\n *\n * @param path path of the field that needs to be updated\n * @return this Mutation object\n */\n public DocumentMutation setOrReplace(String path, Value v);\n\n public DocumentMutation setOrReplace(FieldPath path, Value v);\n\n public DocumentMutation setOrReplaceNull(String path);\n\n public DocumentMutation setOrReplaceNull(FieldPath path);\n\n public DocumentMutation setOrReplace(String path, boolean b);\n\n public DocumentMutation setOrReplace(FieldPath path, boolean b);\n\n public DocumentMutation setOrReplace(String path, short s);\n\n public DocumentMutation setOrReplace(FieldPath path, short s);\n\n public DocumentMutation setOrReplace(String path, byte b);\n\n public DocumentMutation setOrReplace(FieldPath path, byte b);\n\n public DocumentMutation setOrReplace(String path, int i);\n\n public DocumentMutation setOrReplace(FieldPath path, int i);\n\n public DocumentMutation setOrReplace(String path, long l);\n\n public DocumentMutation setOrReplace(FieldPath path, long l);\n\n public DocumentMutation setOrReplace(String path, float f);\n\n public DocumentMutation setOrReplace(FieldPath path, float f);\n\n public DocumentMutation setOrReplace(String path, double d);\n\n public DocumentMutation setOrReplace(FieldPath path, double d);\n\n public DocumentMutation setOrReplace(String path, String value);\n\n public DocumentMutation setOrReplace(FieldPath path, String value);\n\n public DocumentMutation setOrReplace(String path, BigDecimal bd);\n\n public DocumentMutation setOrReplace(FieldPath path, BigDecimal bd);\n\n public DocumentMutation setOrReplace(String path, Time t);\n\n public DocumentMutation setOrReplace(FieldPath path, Time t);\n\n public DocumentMutation setOrReplace(String path, Timestamp t);\n\n public DocumentMutation setOrReplace(FieldPath path, Timestamp t);\n\n public DocumentMutation setOrReplace(String path, Date d);\n\n public DocumentMutation setOrReplace(FieldPath path, Date d);\n\n public DocumentMutation setOrReplace(String path, List<? extends Object> value);\n\n public DocumentMutation setOrReplace(FieldPath path, List<? extends Object> value);\n\n public DocumentMutation setOrReplace(String path, Interval intv);\n\n public DocumentMutation setOrReplace(FieldPath path, Interval intv);\n\n public DocumentMutation setOrReplace(String path, ByteBuffer bb);\n\n public DocumentMutation setOrReplace(FieldPath path, ByteBuffer bb);\n\n public DocumentMutation setOrReplace(String path, Map<String, ? extends Object> value);\n\n public DocumentMutation setOrReplace(FieldPath path,\n Map<String, ? extends Object> value);\n\n public DocumentMutation setOrReplace(String path, Document value);\n\n public DocumentMutation setOrReplace(FieldPath path, Document value);\n\n /**\n * Appends elements to an existing array. If the field doesn't exist on server,\n * it will be created and this operation proceeds. If the field already exists,\n * this operation will validate that the existing field is of the array type.\n * If it is of a different type, then this operation will fail.\n */\n public DocumentMutation append(String path, List<? extends Object> value);\n\n public DocumentMutation append(FieldPath path, List<? extends Object> value);\n\n /**\n * Appends elements to an existing string. This operation will first\n * validate on the server that the field specified by the given path\n * exists and is of the string type. If the field doesn't exist or is\n * of a different type, then the operation will fail.\n */\n public DocumentMutation append(String path, String value);\n\n public DocumentMutation append(FieldPath path, String value);\n\n /**\n * Appends a given byte array to the existing binary data stored on the server\n * on the given path. This operation will fail if the given field on the server is not of the\n * BINARY type. If the field path specified for append doesn't\n * exist on a server record, then this operation will create a new element at the\n * append path. This new element will be of BINARY type and its value will be\n * as specified in the parameter.\n *\n * This operation will fail if any type of the intermediate path elements specified\n * in the append field path doesn't match the type of the corresponding field in the\n * record stored on server. For example, an operation on field \"a.b.c\" will fail if,\n * on the server, the record a itself is an array or integer.\n *\n * This operation will perform read-modify-write on the server.\n *\n * @param path field path\n * @param value byte array value\n * @param offset offset in byte array\n * @param len length in byte array\n * @return this Mutation Object\n */\n public DocumentMutation append(String path, byte[] value, int offset, int len);\n\n public DocumentMutation append(FieldPath path, byte[] value, int offset, int len);\n\n public DocumentMutation append(String path, byte[] value);\n\n public DocumentMutation append(FieldPath path, byte[] value);\n\n public DocumentMutation append(String path, ByteBuffer value);\n\n public DocumentMutation append(FieldPath path, ByteBuffer value);\n\n /**\n * Merges the existing value on the server for the given field path with the new map\n * provided in the input. This operation will first validate that the entry with the\n * given field name exists on the server and is of the MAP type.\n *\n * If the entry is of a type other than MAP, then the operation will fail.\n * If the field path specified for merge doesn't\n * exist in the record on the server, then this operation will create a new element at the\n * given path. This new element will be of the MAP type and its value will be\n * as specified in the parameter.\n *\n * This operation will fail if any type of intermediate path elements specified\n * in the append field path doesn't match the type of the corresponding field in the\n * record stored on the server. For example, an operation on field \"a.b.c\" will fail if,\n * on the server, record a itself is an array or integer.\n *\n * @param path field path\n * @param value the value to be merged with existing value of a field on the server\n * @return this record mutation\n */\n public DocumentMutation merge(String path, Document value);\n\n public DocumentMutation merge(FieldPath path, Document value);\n\n public DocumentMutation merge(String path, Map<String, Object> value);\n\n public DocumentMutation merge(FieldPath path, Map<String, Object> value);\n\n /**\n * Atomically applies an increment to a given field (in dot separated notation)\n * of the given row id.\n *\n * If the field path specified for the incremental change doesn't\n * exist in the server record then this operation will create a new element at the\n * given path. This new element will be of same type as the value specified\n * in the parameter.\n *\n * This operation will fail if the type of any intermediate path elements specified\n * in the append field path doesn't match the type of the corresponding field in the\n * record stored on the server. For example, an operation on field \"a.b.c\" will fail\n * if, on the server, record a itself is an array or integer.\n *\n * If the field doesn't exist on\n * the server then it will be created with the type of given incremental value.\n * An increment operation can be applied on any of the numeric types\n * of a field, such as byte, short, int, long, float, double, or decimal.\n * The operation will fail if the increment is applied to a field\n * that is of a non-numeric type.\n *\n * The increment operation won't change the type of the existing value stored in\n * the given field for the row. The resultant value of the field will be\n * truncated based on the original type of the field.\n *\n * For example, field 'score' is of type int and contains 60. The increment\n * '5.675', a double, is applied. The resultant value of the field\n * will be 65 (65.675 will be truncated to 65).\n *\n * @param path field name in dot separated notation\n * @param inc increment to apply to a field - can be positive or negative\n */\n public DocumentMutation increment(FieldPath path, byte inc);\n\n public DocumentMutation increment(String path, byte inc);\n\n public DocumentMutation increment(FieldPath path, short inc);\n\n public DocumentMutation increment(String path, short inc);\n\n public DocumentMutation increment(String path, int inc);\n\n public DocumentMutation increment(FieldPath path, int inc);\n\n public DocumentMutation increment(FieldPath path, long inc);\n\n public DocumentMutation increment(String path, long inc);\n\n public DocumentMutation increment(String path, float inc);\n\n public DocumentMutation increment(FieldPath path, float inc);\n\n public DocumentMutation increment(String path, double inc);\n\n public DocumentMutation increment(FieldPath path, double inc);\n\n public DocumentMutation increment(String path, BigDecimal inc);\n\n public DocumentMutation increment(FieldPath path, BigDecimal inc);\n\n /**\n * Deletes the field at the given path.\n * If the field does not exist, this method silently returns without doing anything.\n * For example, if a delete operation is attempted on a.b.c, and a.b is an array on the\n * server, then a.b.c will not be deleted.\n */\n public DocumentMutation delete(String path);\n\n public DocumentMutation delete(FieldPath path);\n\n}", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update() {}", "public interface MessageInputChannel extends\r\n Channel<MessageInput, MessageInputChannelAPI>, OneDimensional, MessageCallback {\r\n\r\n}", "public interface IMediator {\n\n /**\n * given two modules, sequence mediates the input to module2,\n * computed from the output of module1;\n * @see Mediators#seq for a possible implementation\n */\n public Object seq(IModule module1, IModule module2);\n\n /**\n * given an array of modules, parallelism constructs the final\n * result of a (quasi-)parallel independent computation of an\n * arbitrary number of modules, from the output of these modules;\n * @see Mediators#par for a possible implementation\n */\n public Object par(IModule[] modules);\n\n /**\n * given a single module, fixpoint construct a final result\n * by feeding the module with its own output; this computation,\n * of course, must not terminate;\n * @see Mediators#fix for a possible implementation\n */\n public Object fix(IModule module);\n\n}", "@Override\n @SuppressWarnings(\"unchecked\")\n protected void customSync() {\n Exchanger<Void>[] exchangers = (Exchanger<Void>[]) new Exchanger<?>[PRODUCERS_COUNT];\n\n for (int i = 0; i < PRODUCERS_COUNT; i++) {\n exchangers[i] = new Exchanger<>();\n new Producer(params.dataResults, params.postResult, exchangers[i]).start();\n }\n\n new Consumer(params.postFinish, exchangers).start();\n }", "public void mutate() {\n \t//POEY comment: for initialise() -> jasmine.gp.nodes.ercs\n //such as CustomRangeIntegerERC.java, PercentageERC.java, BoolERC.java \n \tsetValue(initialise());\n }", "@Override\n protected void prot() {\n }", "public interface Memento {\n\n}", "public Chromosome doExchangeMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n Collections.swap(newSelection, allele1, allele2);\n\n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "interface Update\n extends UpdateStages.WithSource,\n UpdateStages.WithDestination,\n UpdateStages.WithExpirationTimeIfNotActivatedUtc,\n UpdateStages.WithFilter,\n UpdateStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n EventChannel apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n EventChannel apply(Context context);\n }", "@Override\n\tpublic void visit(Modulo arg0) {\n\t\t\n\t}", "@Update\n Single<Integer> update(Motivator motivator);", "public void modify() {\n }", "public boolean commutes(){\n\t\treturn false;\n }", "private void processMutations(VertexResolver vertexResolver)\n throws IOException {\n for (Worker worker : mWorkers) {\n worker.processWorkerMutations(vertexResolver);\n }\n\n totalVertex = 0;\n totalEdge = 0;\n for (Worker w : mWorkers) {\n totalVertex += w.getVertexNumber();\n totalEdge += w.getEgeNumber();\n }\n\n for (Worker w : mWorkers) {\n w.setTotalNumVerticesAndEdges(totalVertex, totalEdge);\n }\n }", "public interface AMDPModelLearner extends AMDPPolicyGenerator{\n\n\n public void updateModel(State s, Action a, List<Double> rewards, State sPrime, GroundedTask gt);\n\n\n}", "@Override // kotlin.jvm.functions.Function0\n public Unit invoke() {\n RdsInputItemPresenterImpl.access$setupNewValue(this.a, this.b, \"\", this.c);\n return Unit.INSTANCE;\n }", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "void applyToComputationState();", "public void setMutationMethod(Mutation m){\n mutationType = m;\n }", "@Override\n\tpublic void modificada(Mao m, Participante p) {\n\t\t\n\t}", "@Override\n public void update() {\n }", "@Override\n\tpublic void update() { }", "@Override\n public void apply() {\n }", "protected FitnessAssignmentProcess() {\r\n super();\r\n }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Update\n Single<Integer> update(Motivator... motivators);", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void mutation() {\r\n\t\tfinal double MUTATION_PROB = 0.1;\r\n\t\tfor (int i=0; i<this.nChromosomes; i++) {\r\n\t\t\tArrayList<Integer> chr = (ArrayList<Integer>) this.chromosomes.get(i);\r\n\t\t\tfor (int j=0; j<this.nViaPoints; j++) {\r\n\t\t\t\tdouble rand = Math.random();\r\n\t\t\t\tif (rand < MUTATION_PROB) {\r\n\t\t\t\t\t// change the sign\r\n\t\t\t\t\tInteger vPoint = chr.get(j);\r\n\t\t\t\t\tchr.remove(j);\r\n\t\t\t\t\tchr.add(j, new Integer(- (vPoint.intValue()%100)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.printChromosomes(\"After Mutation\");\r\n\t}", "@Override\n public void update() {\n \n }", "interface Update extends UpdateStages.WithLevel, UpdateStages.WithNotes, UpdateStages.WithOwners {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n ManagementLockObject apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n ManagementLockObject apply(Context context);\n }", "@Override\r\n\tpublic void update() {\r\n\r\n\t}", "@Override\n\tpublic void invoke() {\n\t\t\n\t\tIBuffer b = Buffer.getBuffer();\n\t\tint r = b.getRemainingCapacity();\n\t\t\n\t\t// the buffer is empty - this means that invoke was called after a grid was removed\n\t\t// and we need to fill it up to prevent starvation. Ideally the only way this could\n\t\t// happen is if the buffer size was 1\n\t\tif (r == 0) {\n\t\t\tPublisher.getInstance().send(new ProduceMessage());\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (r < b.getCapacity())\n\t\t\tPublisher.getInstance().send(new ProduceMessage());\n\t\t\n\t\tif (r > 0)\n\t\t\tPublisher.getInstance().send(new ConsumeMessage());\n\t\t\n\t}", "@Override\n\tprotected void processInput() {\n\t}", "protected void apply(EventLog.Mutator mutator, Game game) {\n\t\tif (executed) {\n\t\t\tthrow new IllegalArgumentException(\"already applied\");\n\t\t}\n\t\tapplier.accept(mutator, game);\n\t\texecuted = true;\n\t}", "protected void mutateAddNode() {\n\t\t// Test if genome is fully disabled\n\t\tboolean fullydisabled = true;\n\t\tfor (Gene g : genes.values()) {\n\t\t\tif (g.enabled) {\n\t\t\t\tfullydisabled = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (fullydisabled)\n\t\t\treturn;\n\n\t\t// Select the gene to be split\n\t\tGene mutated;\n\t\tdo {\n\t\t\tmutated = getRandomGene();\n\t\t} while (!mutated.enabled);\n\n\t\t// Create the new structure\n\t\tNNode addition = new NNode(population.getNewNodeID(), NNode.HIDDEN);\n\t\tpopulation.registerNode(addition);\n\n\t\tint earlystart = mutated.start;\n\t\tint earlyend = addition.ID;\n\t\tint earlyinnov = population.getInnovation(earlystart, earlyend);\n\t\tGene early = new Gene(earlyinnov, earlystart, earlyend, 1, true);\n\t\tpopulation.registerGene(early);\n\n\t\tint latestart = addition.ID;\n\t\tint lateend = mutated.end;\n\t\tint lateinnov = population.getInnovation(latestart, lateend);\n\t\tGene late = new Gene(lateinnov, latestart, lateend, mutated.weight,\n\t\t\t\ttrue);\n\t\tpopulation.registerGene(late);\n\n\t\t// Disable old gene\n\t\tmutated.enabled = false;\n\n\t\t// Submit new node\n\t\tsubmitNewNode(addition);\n\n\t\t// Submit new genes\n\t\tsubmitNewGene(early);\n\t\tsubmitNewGene(late);\n\n\t\tif (Braincraft.gatherStats)\n\t\t\tBraincraft.genetics.add(\"node mutation \" + ID + \" \"\n\t\t\t\t\t+ mutated.innovation + \" \" + early.innovation + \" \"\n\t\t\t\t\t+ late.innovation + \" \" + addition.ID);\n\t}", "@Override\n\tpublic void execute() {\n\t\tthis.receiver.add(this.question, 42);\n\t}", "@Override\n\tpublic void receiveProduct(Product product) {\n\t\t\n\t}", "@Override\n\tpublic void receiveRequest() {\n\n\t}", "@Override\n\t\t\tpublic void onModifierStarted(IModifier<IEntity> arg0, IEntity arg1) {\n\t\t\t}", "@Override\r\n\tpublic void nextState() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\r\n\t}", "public interface ItfMemento {\n\n}", "@Override\n\tpublic void modify(int quantity) {\n\t}", "@Override\r\n\tpublic void compute() {\r\n\r\n\t\t// compute s1, s2 secret shares for all the parties\r\n\t\t// s1s2[i] - pair(s1 SecretShare, s2 SecretShare) for party i\r\n\t\tArrayList<ArrayList<SecretShare>> s1s2 = new ArrayList<ArrayList<SecretShare>>();\r\n\t\tfor (GateIO in : this.input) {\r\n\t\t\tArrayList<SecretShare> theShares = new ArrayList<SecretShare>();\r\n\t\t\ttheShares.add(0, in.getValue().get(0)); // s1\r\n\t\t\ttheShares.add(1, in.getValue().get(1)); // s2\r\n\t\t\ts1s2.add(in.getIndex(), theShares);\r\n\t\t\t// System.out.println(\"party \" + in.getIndex());\r\n\t\t\t// System.out.println(\"s1 = \" + in.getValue().get(0));\r\n\t\t\t// System.out.println(\"s2 = \" + in.getValue().get(1));\r\n\r\n\t\t}\r\n\r\n\t\t// compute locally - s1*s2\r\n\t\tArrayList<SecretShare> localMults = new ArrayList<SecretShare>();\r\n\t\tfor (int i = 0; i < s1s2.size(); i++) {\r\n\t\t\tlocalMults.add(i, new SecretShare(s1s2.get(i).get(0).x,\r\n\t\t\t\t\tmodField(s1s2.get(i).get(0).y * s1s2.get(i).get(1).y)));\r\n\t\t\t// System.out.println(new SecretShare(s1s2.get(i).get(0).x,\r\n\t\t\t// modField(s1s2.get(i).get(0).y * s1s2.get(i).get(1).y)));\r\n\t\t}\r\n\r\n\t\t// share the local multiplications between the parties\r\n\t\t// localMultShare[i] - the secrets shares of party i new secret(mult)\r\n\t\tArrayList<ArrayList<SecretShare>> localMultsShare = new ArrayList<ArrayList<SecretShare>>();\r\n\t\tfor (int i = 0; i < localMults.size(); i++) {\r\n\t\t\tlocalMultsShare.add(i, new ArrayList<SecretShare>());\r\n\t\t}\r\n\r\n\t\tfor (SecretShare mult : localMults) {\r\n\t\t\tArrayList<SecretShare> yiShares = Polynomial\r\n\t\t\t\t\t.createShareSecret(mult.y);\r\n\t\t\t// for (int i = 0; i < yiShares.size(); i++) {\r\n\t\t\t// System.out.println(\"i = \" + i + \" y = \" + yiShares.get(i));\r\n\t\t\t// }\r\n\t\t\tfor (int i = 0; i < yiShares.size(); i++) {\r\n\t\t\t\tArrayList<SecretShare> tmp = localMultsShare.get(i);\r\n\t\t\t\ttmp.add(yiShares.get(i));\r\n\t\t\t\tlocalMultsShare.set(i, tmp);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// System.out.println(\"start\");\r\n\t\t// for (int i = 0; i < localMultsShare.size(); i++) {\r\n\t\t// for (int j = 0; j < localMultsShare.get(i).size(); j++) {\r\n\t\t// System.out.println((localMultsShare.get(i)).get(j));\r\n\t\t// }\r\n\t\t// }\r\n\t\t// System.out.println(\"end\");\r\n\r\n\t\t// compute the outPut = Yi * Zi\r\n\t\tthis.result = new ArrayList<GateIO>();\r\n\t\tfor (int i = 0; i < localMultsShare.size(); i++) {\r\n\t\t\tGateIO out = new GateIO(i);\r\n\r\n\t\t\tint outYValue = 0;\r\n\t\t\tfor (int j = 0; j < localMultsShare.get(i).size(); j++) {\r\n\t\t\t\toutYValue += computeZi(j + 1)\r\n\t\t\t\t\t\t* ((localMultsShare.get(i)).get(j)).y;\r\n\t\t\t}\r\n\t\t\tout.value.add(new SecretShare(i + 1, modField(outYValue)));\r\n\t\t\tthis.result.add(out);\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < this.result.size(); i++) {\r\n\t\t\t// System.out.println(this.result.get(i).value.get(0));\r\n\t\t}\r\n\r\n\t}", "@Override\r\n\tpublic void visit(Design design) {\r\n\t\tif (isForward()) {\r\n\t\t\tsuper.preFilter((Visitable) design);\r\n\t\t\t// The designProp goes through all components in the\r\n\t\t\t// design module, no need to traverse the tasks\r\n\t\t\t// traverse(design);\r\n\r\n\t\t\t// NOTE! this line used to read:\r\n\t\t\t// this.modified |= designProp(design);\r\n\t\t\t// However this FAILED TO WORK! The 'this.modified'\r\n\t\t\t// variable was NOT getting updated correctly and we were\r\n\t\t\t// iterating only 1 time. Why/how this fixes this I do\r\n\t\t\t// not know!\r\n\t\t\tboolean designModified = designProp(design);\r\n\t\t\tmodified |= designModified;\r\n\t\t\t// this.modified |= designProp(design);\r\n\t\t\tsuper.postFilter((Visitable) design);\r\n\t\t} else {\r\n\t\t\tsuper.preFilter((Visitable) design);\r\n\t\t\t// The designProp goes through all components in the\r\n\t\t\t// design module, no need to traverse the tasks\r\n\r\n\t\t\t// NOTE! this line used to read:\r\n\t\t\t// this.modified |= designProp(design);\r\n\t\t\t// However this FAILED TO WORK! The 'this.modified'\r\n\t\t\t// variable was NOT getting updated correctly and we were\r\n\t\t\t// iterating only 1 time. Why/how this fixes this I do\r\n\t\t\t// not know!\r\n\t\t\tboolean designModified = designProp(design);\r\n\t\t\tmodified |= designModified;\r\n\t\t\t// this.modified |= designProp(design);\r\n\t\t\t// traverse(design);\r\n\t\t\tsuper.postFilter((Visitable) design);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "public interface Pipeline {\n void pushMessage(ChatMessage message);\n}", "@Override\n public void execute() {\n for (LinearEquation e : m) {\n ComplexNumber temp = new ComplexNumber(e.getCoefficient(a));\n e.setCoefficient(a, e.getCoefficient(b));\n e.setCoefficient(b, temp);\n }\n }", "protected abstract void updateImpl(M newValue);", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}" ]
[ "0.6260846", "0.6175893", "0.586564", "0.573373", "0.5600513", "0.5598968", "0.55977416", "0.55260104", "0.5476897", "0.54425436", "0.5434153", "0.53716874", "0.5329163", "0.5258573", "0.52456427", "0.5241168", "0.5221643", "0.5181067", "0.51574683", "0.5129573", "0.5124379", "0.5107792", "0.5103133", "0.5103133", "0.5103133", "0.5101825", "0.5093356", "0.508123", "0.50690454", "0.5063811", "0.5060901", "0.5060901", "0.5046893", "0.5034776", "0.5017447", "0.5016168", "0.5015006", "0.50120944", "0.50022006", "0.5000321", "0.4987881", "0.49856392", "0.49759218", "0.49681395", "0.49550557", "0.49473187", "0.49473187", "0.49443093", "0.49441358", "0.49326655", "0.49274564", "0.4922642", "0.49214864", "0.49115762", "0.490658", "0.49002957", "0.48952574", "0.48939022", "0.48918468", "0.48895055", "0.4889086", "0.48867813", "0.48734573", "0.48734573", "0.4870508", "0.48668242", "0.4864038", "0.4863161", "0.48620814", "0.48609123", "0.48576078", "0.48494402", "0.4841102", "0.48409006", "0.48349953", "0.48272172", "0.48248333", "0.48233598", "0.4822663", "0.4817813", "0.48163486", "0.48080102", "0.48077095", "0.48016435", "0.48015136", "0.47997192", "0.47971392", "0.47951686", "0.47881493", "0.47832453", "0.47819647", "0.47762188", "0.47708195", "0.4768398", "0.47683898", "0.47679693", "0.47679693", "0.47679693", "0.47679693", "0.47679693" ]
0.52358806
16
Stores a schema change for a table
void storeSchema(LogSequenceNumber lsn, Table table);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\tpublic void setSchema(String schema) throws SQLException {\n\t\t\t\r\n\t\t}", "private void processAlterTable() throws HsqlException {\n\n String tableName = tokenizer.getName();\n String schema =\n session.getSchemaNameForWrite(tokenizer.getLongNameFirst());\n Table t = database.schemaManager.getUserTable(session, tableName,\n schema);\n String token;\n\n if (t.isView()) {\n throw Trace.error(Trace.NOT_A_TABLE);\n }\n\n session.setScripting(true);\n\n token = tokenizer.getSimpleToken();\n\n switch (Token.get(token)) {\n\n case Token.RENAME : {\n processAlterTableRename(t);\n\n return;\n }\n case Token.ADD : {\n HsqlName cname = null;\n\n if (tokenizer.isGetThis(Token.T_CONSTRAINT)) {\n token = tokenizer.getName();\n\n String constraintSchema = tokenizer.getLongNameFirst();\n\n if (constraintSchema != null) {\n constraintSchema = session.getSchemaNameForWrite(\n tokenizer.getLongNameFirst());\n\n if (!t.getSchemaName().equals(constraintSchema)) {\n throw Trace.error(\n Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS,\n constraintSchema);\n }\n }\n\n cname = database.nameManager.newHsqlName(token,\n tokenizer.wasQuotedIdentifier());\n }\n\n token = tokenizer.getString();\n\n if (tokenizer.wasQuotedIdentifier()\n && tokenizer.wasSimpleName()) {\n tokenizer.back();\n processAlterTableAddColumn(t);\n\n return;\n }\n\n if (!tokenizer.wasSimpleToken()) {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, token);\n }\n\n switch (Token.get(token)) {\n\n case Token.FOREIGN :\n tokenizer.getThis(Token.T_KEY);\n processAlterTableAddForeignKeyConstraint(t, cname);\n\n return;\n\n case Token.UNIQUE :\n processAlterTableAddUniqueConstraint(t, cname);\n\n return;\n\n case Token.CHECK :\n processAlterTableAddCheckConstraint(t, cname);\n\n return;\n\n case Token.PRIMARY :\n tokenizer.getThis(Token.T_KEY);\n processAlterTableAddPrimaryKey(t, cname);\n\n return;\n\n default :\n if (cname != null) {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, token);\n }\n\n tokenizer.back();\n case Token.COLUMN :\n processAlterTableAddColumn(t);\n\n return;\n }\n }\n case Token.DROP : {\n token = tokenizer.getString();\n\n if (tokenizer.wasQuotedIdentifier()\n && tokenizer.wasSimpleName()) {\n tokenizer.back();\n processAlterTableDropColumn(t);\n\n return;\n }\n\n if (!tokenizer.wasSimpleToken()) {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, token);\n }\n\n switch (Token.get(token)) {\n\n case Token.PRIMARY :\n tokenizer.getThis(Token.T_KEY);\n\n if (t.hasPrimaryKey()) {\n processAlterTableDropConstraint(\n t, t.getPrimaryConstraint().getName().name);\n } else {\n throw Trace.error(Trace.CONSTRAINT_NOT_FOUND,\n Trace.TABLE_HAS_NO_PRIMARY_KEY,\n new Object[] {\n \"PRIMARY KEY\", t.getName().name\n });\n }\n\n return;\n\n case Token.CONSTRAINT :\n processAlterTableDropConstraint(t);\n\n return;\n\n default :\n tokenizer.back();\n case Token.COLUMN :\n processAlterTableDropColumn(t);\n\n return;\n }\n }\n case Token.ALTER : {\n tokenizer.isGetThis(Token.T_COLUMN);\n processAlterColumn(t);\n\n return;\n }\n default : {\n throw Trace.error(Trace.UNEXPECTED_TOKEN, token);\n }\n }\n }", "@Override\n public void handleSchemaChange(ConnectSchema lastSchema, ConnectSchema currSchema, String\n dpSchemaName, PrimaryKey primaryKey, boolean shouldStageData) {\n System.out.println(\"New schema has fields as \" + currSchema.fields().stream().map\n (Field::name).collect(Collectors.joining(\", \")));\n\n List<Field> lastFilelds = lastSchema.fields();\n List<Field> currFilelds = currSchema.fields();\n\n }", "private void processAlterSchema() throws HsqlException {\n processAlterSchemaRename();\n }", "void setTransactionSchema(Schema transactionSchema);", "public void audit(long oid,String _table,String undo_sql,String new_sql) throws RelationException;", "public void setSchema(DbEntity entity, String schema) {\n }", "private static void alterTable(String tableName, KuduClient client) throws KuduException {\n AlterTableOptions ato = new AlterTableOptions();\n ato.addColumn(\"added\", Type.DOUBLE, DEFAULT_DOUBLE);\n client.alterTable(tableName, ato);\n System.out.println(\"Altered the table\");\n }", "private void recreateDatabaseSchema() {\n\t\t// Fetch database schema\n\t\tlogger.info(\"Reading database schema from file\");\n\t\tString[] schemaSql = loadFile(\"blab_schema.sql\", new String[] { \"--\", \"/*\" }, \";\");\n\n\t\tConnection connect = null;\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\t// Get the Database Connection\n\t\t\tlogger.info(\"Getting Database connection\");\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconnect = DriverManager.getConnection(Constants.create().getJdbcConnectionString());\n\n\t\t\tstmt = connect.createStatement();\n\n\t\t\tfor (String sql : schemaSql) {\n\t\t\t\tsql = sql.trim(); // Remove any remaining whitespace\n\t\t\t\tif (!sql.isEmpty()) {\n\t\t\t\t\tlogger.info(\"Executing: \" + sql);\n\t\t\t\t\tSystem.out.println(\"Executing: \" + sql);\n\t\t\t\t\tstmt.executeUpdate(sql);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ClassNotFoundException | SQLException ex) {\n\t\t\tlogger.error(ex);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (stmt != null) {\n\t\t\t\t\tstmt.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tlogger.error(ex);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (connect != null) {\n\t\t\t\t\tconnect.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tlogger.error(ex);\n\t\t\t}\n\t\t}\n\t}", "public void parseAlterTable(StatementTree sTree) {\r\n\r\n\t}", "public void setSchema(Schema schema)\n {\n this.schema = schema;\n }", "void syncSchema(org.kaleta.entity.xml.Schema data);", "void setSchema(S schema);", "protected void preUpdateSchema(CiDb db) throws OrmException, SQLException {\n }", "@Override\r\n\tpublic void commit(String tableName) {\n\t}", "static void schemaUpdated(Configuration conf) {\n conf.setInt(SCHEMA_UPDATE_PROP, getCurrentIteration(conf));\n }", "public void saveState() {\n table.saveState(store);\n }", "public void schemaChanged(String serviceName, String version) {\n ServiceManager.schemaChanged();\n // If naming service has changed, reload the AM Servers\n if (serviceName.equalsIgnoreCase(ServiceManager.PLATFORM_SERVICE)) {\n ServiceManager.accessManagerServers = null;\n }\n }", "public void updateSchemaVersion() {\n // The schema version should never regress, so make sure we don't change\n // anything if this code is older than what's currently in the database\n if (latestCodeVersion > getVersionForSchema()) {\n updateSchemaVersionId(this.latestCodeVersion);\n }\n }", "public void setTableName(String newVal) {\n if ((newVal != null && this.tableName != null && (newVal.compareTo(this.tableName) == 0)) || \n (newVal == null && this.tableName == null && tableName_is_initialized)) {\n return; \n } \n this.tableName = newVal; \n\n tableName_is_modified = true; \n tableName_is_initialized = true; \n }", "private void processAlterTableRename(Table t) throws HsqlException {\n\n String schema = t.getSchemaName();\n String newName;\n boolean isquoted;\n\n // ensures that if temp table, it also belongs to this session\n/*\n if (!t.equals(session, name)) {\n throw Trace.error(Trace.TABLE_NOT_FOUND);\n }\n*/\n tokenizer.getThis(Token.T_TO);\n\n newName = tokenizer.getName();\n\n String newSchema = tokenizer.getLongNameFirst();\n\n isquoted = tokenizer.wasQuotedIdentifier();\n newSchema = newSchema == null ? schema\n : session.getSchemaNameForWrite(\n newSchema);\n\n if (!schema.equals(newSchema)) {\n throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS);\n }\n\n database.schemaManager.checkUserTableNotExists(session, newName,\n schema);\n session.commit();\n session.setScripting(true);\n database.schemaManager.renameTable(session, t, newName, isquoted);\n }", "public void store(String[] table) throws WoodsException{\n\t\t\tuserTable.addField(userTable.createDatatypes(table));\n\t\t}", "void schema(String schema);", "void schema(String schema);", "private static void atualizarBD(){\n SchemaUpdate se = new SchemaUpdate(hibernateConfig);\n se.execute(true, true);\n }", "public void updateTable()\r\n {\r\n ((JarModel) table.getModel()).fireTableDataChanged();\r\n }", "final public SqlStatement AlterStatement() throws ParseException {SqlStatement st;\n jj_consume_token(ALTER);\n st = AlterTableStatement();\nreturn st;\n}", "private void logTableDDL(Table t) throws HsqlException {\n\n StringBuffer tableDDL;\n String sourceDDL;\n\n tableDDL = new StringBuffer();\n\n DatabaseScript.getTableDDL(database, t, 0, null, true, tableDDL);\n\n sourceDDL = DatabaseScript.getDataSource(t);\n\n database.logger.writeToLog(session, tableDDL.toString());\n\n if (sourceDDL != null) {\n database.logger.writeToLog(session, sourceDDL);\n database.logger.synchLog();\n }\n }", "public void saveMe(String schema) {\r\n\t\tMultiSchemaHibernateUtil.beginTransaction(schema);\r\n\t\tMultiSchemaHibernateUtil.getSession(schema).saveOrUpdate(this);\r\n\t\tMultiSchemaHibernateUtil.commitAndCloseTransaction(schema);\r\n\t}", "public void saveMe(String schema) {\r\n\t\tMultiSchemaHibernateUtil.beginTransaction(schema);\r\n\t\tMultiSchemaHibernateUtil.getSession(schema).saveOrUpdate(this);\r\n\t\tMultiSchemaHibernateUtil.commitAndCloseTransaction(schema);\r\n\t}", "public void saveMe(String schema) {\r\n\r\n\t\tMultiSchemaHibernateUtil.beginTransaction(schema);\r\n\t\tMultiSchemaHibernateUtil.getSession(schema).saveOrUpdate(this);\r\n\t\tMultiSchemaHibernateUtil.commitAndCloseTransaction(schema);\r\n\r\n\t}", "public void setDatabaseSchema(SchemaElement root) throws ModelException {\n String old = getDatabaseSchemaName();\n String newRoot = ((root != null) ? root.getName().getFullName() : null);\n\n try {\n fireVetoableChange(PROP_DATABASE_ROOT, old, newRoot);\n databaseSchemaName = newRoot;\n firePropertyChange(PROP_DATABASE_ROOT, old, newRoot);\n } catch (PropertyVetoException e) {\n throw new ModelVetoException(e);\n }\n }", "public void createTable(Table table) throws SQLException {\n mysql.update(table.getCreateTableString());\n }", "public abstract void lockTableForWriting(String table) throws RollbackException;", "public static void createSchema(Connection conn, String schema) throws SQLException {\n\t\tString sqlString = \"CREATE SCHEMA `\" + schema + \"`\";\r\n\r\n\t\tif (PostgreSQL.isPostgreSQLConnection(conn))\r\n\t\t\tsqlString = PostgreSQL.replaceMySQLQuotes(sqlString);\r\n\r\n\t\tStatement stmt = null;\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\tstmt.executeUpdate(sqlString);\r\n\t\t\tSystem.out.println(\"SQLTableCreator.createSchema: schema \" + schema + \" created\");\r\n\t\t} catch (SQLException se) {\r\n//\t\t\tse.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n//\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (stmt != null)\r\n\t\t\t\tstmt.close();\r\n\t\t}\r\n\t}", "public void schemaUpdated() throws SQLException, IOException {\n ResultSet resultSet = databaseStatement.executeQuery(\"select count(datname) from pg_database\");\n int uniqueID = 0;\n if(resultSet.next()) {\n uniqueID = resultSet.getInt(1);\n }\n String newDBName = \"OSM\"+uniqueID;\n ProcessBuilder processBuilder = new ProcessBuilder(\"src/main/resources/schema/schemaUploader.sh\", newDBName, password);\n Process process = processBuilder.start();\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n String line = null; // This is here for testing purposes\n while ((line = bufferedReader.readLine()) != null ) {\n System.out.println(line);\n }\n }", "public void setSchema(String schema) {\n this.schema = schema;\n }", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "public final void schema() throws RecognitionException {\r\n try {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:219:2: ( SCHEMA )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:219:4: SCHEMA\r\n {\r\n match(input,SCHEMA,FOLLOW_SCHEMA_in_schema1347); \r\n putSchema();\r\n\r\n }\r\n\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "@Override\n public void createMetaTable(Connection conn) throws PersistenceException {\n String sql = String.format(\"CREATE TABLE %1$s (%2$s %3$s NOT NULL)\", metaTableName, META_TABLE_DATA_COLUMN, config.dataColumnType());\n executeUpdateSql(conn, sql);\n updateMetaTable(conn);\n }", "protected void executeSchemaOperations() {\n }", "public void doCreateTable();", "public void setSchema(java.lang.String schema) {\r\n this.schema = schema;\r\n }", "public void setTableName(String tableName) {\r\n\t\tcheckIfConfigurationModificationIsAllowed();\r\n\t\tthis.tableMetaDataContext.setTableName(tableName);\r\n\t}", "public List<SinkRecord> add(SinkRecord record) throws SQLException, TableAlterOrCreateException {\n if (config.autoSchema && record.valueSchema() == null) {\n // no value schema, value is a map, must convert to Struct\n if (!(record.value() instanceof HashMap)) {\n log.warn(\"auto schema convertToStruct only support hashmap to struct\");\n }\n Object structValue = convertToStruct(valueSchema, record.value());\n log.debug(\"auto schema convertToStruct {}\", structValue);\n record = new SinkRecord(record.topic(), record.kafkaPartition(), record.keySchema(),\n record.key(), valueSchema, structValue, record.kafkaOffset(), record.timestamp(),\n record.timestampType(), record.headers());\n }\n\n recordValidator.validate(record);\n final List<SinkRecord> flushed = new ArrayList<>();\n\n boolean schemaChanged = false;\n if (!Objects.equals(keySchema, record.keySchema())) {\n keySchema = record.keySchema();\n schemaChanged = true;\n }\n if (isNull(record.valueSchema())) {\n // For deletes, value and optionally value schema come in as null.\n // We don't want to treat this as a schema change if key schemas is the same\n // otherwise we flush unnecessarily.\n if (config.deleteEnabled) {\n deletesInBatch = true;\n }\n } else if (Objects.equals(valueSchema, record.valueSchema())) {\n if (config.deleteEnabled && deletesInBatch) {\n // flush so an insert after a delete of same record isn't lost\n flushed.addAll(flush());\n }\n } else {\n // value schema is not null and has changed. This is a real schema change.\n valueSchema = record.valueSchema();\n schemaChanged = true;\n }\n if (schemaChanged || updateStatementBinder == null) {\n // Each batch needs to have the same schemas, so get the buffered records out\n flushed.addAll(flush());\n\n // re-initialize everything that depends on the record schema\n final SchemaPair schemaPair = new SchemaPair(record.keySchema(), record.valueSchema());\n fieldsMetadata = FieldsMetadata.extract(\n tableId.tableName(), config.pkMode, config.pkFields, config.fieldsWhitelist, schemaPair);\n dbStructure.createOrAmendIfNecessary(config, connection, tableId, fieldsMetadata);\n final String insertSql = getInsertSql();\n final String deleteSql = getDeleteSql();\n log.debug(\"{} sql: {} deleteSql: {} meta: {}\", config.insertMode, insertSql, deleteSql,\n fieldsMetadata);\n close();\n updatePreparedStatement = dbDialect.createPreparedStatement(connection, insertSql);\n updateStatementBinder =\n dbDialect.statementBinder(updatePreparedStatement, config.pkMode, schemaPair,\n fieldsMetadata, dbStructure.tableDefinition(connection, tableId), config.insertMode);\n if (config.deleteEnabled && nonNull(deleteSql)) {\n deletePreparedStatement = dbDialect.createPreparedStatement(connection, deleteSql);\n deleteStatementBinder = dbDialect.statementBinder(deletePreparedStatement, config.pkMode,\n schemaPair, fieldsMetadata, dbStructure.tableDefinition(connection, tableId),\n config.insertMode);\n }\n }\n\n // set deletesInBatch if schema value is not null\n if (isNull(record.value()) && config.deleteEnabled) {\n deletesInBatch = true;\n }\n\n records.add(record);\n\n if (records.size() >= config.batchSize) {\n flushed.addAll(flush());\n }\n return flushed;\n }", "static void refreshSchema(Connection connection, String keyspace, String table, Cluster.Manager cluster) throws ConnectionException, BusyConnectionException, ExecutionException, InterruptedException {\n String whereClause = \"\";\n if (keyspace != null) {\n whereClause = \" WHERE keyspace_name = '\" + keyspace + \"'\";\n if (table != null)\n whereClause += \" AND columnfamily_name = '\" + table + \"'\";\n }\n\n ResultSetFuture ksFuture = table == null\n ? new ResultSetFuture(null, new QueryMessage(SELECT_KEYSPACES + whereClause, ConsistencyLevel.DEFAULT_CASSANDRA_CL))\n : null;\n ResultSetFuture cfFuture = new ResultSetFuture(null, new QueryMessage(SELECT_COLUMN_FAMILIES + whereClause, ConsistencyLevel.DEFAULT_CASSANDRA_CL));\n ResultSetFuture colsFuture = new ResultSetFuture(null, new QueryMessage(SELECT_COLUMNS + whereClause, ConsistencyLevel.DEFAULT_CASSANDRA_CL));\n\n if (ksFuture != null)\n connection.write(ksFuture.callback);\n connection.write(cfFuture.callback);\n connection.write(colsFuture.callback);\n\n cluster.metadata.rebuildSchema(keyspace, table, ksFuture == null ? null : ksFuture.get(), cfFuture.get(), colsFuture.get());\n }", "public void updateValuesToTables(Connection conn) {\n\t// update queries\n\t\n\tthis.updateAccountTables(conn);\n\t\n\n\t\n}", "public boolean setSchema(String schema){\n \ttry {\n \t\tsql = connection.createStatement();\n\t\t\tString sqlText;\n\t\t\tsqlText = \"SET search_path TO \" + schema;\n\t\t\tsql.executeUpdate(sqlText);\n\t\t} catch (SQLException e) {\n\t\t\treturn false;\n\t\t}\n \treturn true;\n }", "private void setTable(final String table) {\n if (!lastTable.equals(table)) {\n lastTable = table;\n BigtableTableName tableName = options\n .getInstanceName()\n .toTableName(table);\n lastTableBytes = tableName\n .toString()\n .getBytes();\n synchronized(this) {\n if (bulkMutation != null) {\n try {\n bulkMutation.flush();\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n throw new RuntimeException(e);\n }\n }\n bulkMutation = session.createBulkMutation(tableName);\n }\n }\n }", "public void updatedTable() {\r\n\t\tfireTableDataChanged();\r\n\t}", "public void setSchema(String schema)\n {\n if(this.props == null)\n {\n this.props = new Properties();\n }\n this.props.setProperty(\"db.schema\", schema);\n }", "public void setDbTable(String v) {this.dbTable = v;}", "public void ddlQuery(String query){\n try {\n s = conn.createStatement();\n s.executeUpdate(query);\n\n } catch (SQLException e) {\n System.out.println(\"Error trying to create or modify the database structure \" + e.getSQLState());\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void checkTableVersion() {\n\n\t}", "public void setSchemaName(String schemaName) {\r\n\t\tcheckIfConfigurationModificationIsAllowed();\r\n\t\tthis.tableMetaDataContext.setSchemaName(schemaName);\r\n\t}", "protected abstract String getAlterTable(boolean nextLine, boolean only);", "private void persistTable() {\n\n final EditText edit = findViewById(editId);\n final EditText edit2 = findViewById(editId2);\n String fileName = tableId;\n try {\n FileOutputStream fos = getBaseContext().openFileOutput(fileName, Context.MODE_PRIVATE);\n ObjectOutputStream os = new ObjectOutputStream(fos);\n os.writeObject(table);\n os.close();\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n edit.setText(table.getSerializedProducts());\n if (lastProductAdded != null)\n edit2.setText(lastProductAdded.getName());\n else\n edit2.setText(\"\");\n\n productNames = table.getProductNames();\n currentlySelectedProduct=0;\n\n refreshPrice();\n\n if (table.map.size() == 0) {\n deleteFile(tableId);\n return;\n }\n }", "long getNextChangeByTableName(String tableName, Object dbContext) throws SQLException;", "@Override\n\t\t\tpublic void CommitHandle(JTable table) {\n\t\t\t}", "@Override\n\t\t\tpublic void CommitHandle(JTable table) {\n\t\t\t}", "private void createSchema() throws Exception\n {\n LOG.info(\"Creating schema\");\n HibernateUtil.currentSession();\n }", "public void setTable(Table table)\n {\n this.table = table;\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n try {\n db.execSQL(DROP_TABLE); //drop/remove old table\n onCreate(db); //create new table using updated parameters\n ToastMessage.message(context, \"Change to database has been made!\");\n } catch (SQLException e) {\n //add toast message\n }\n }", "public void formDatabaseTable() {\n }", "public void createTable() {\r\n\t\tclient.createTable();\r\n\t}", "@Override\n public Pipe execute(DBMS engine) throws DBxicException {\n engine.storManager.createTable(table);\n engine.catalog.saveCatalog();\n return new MessageThroughPipe(\"Table \" + table.getName() + \" successfully created\");\n }", "public boolean updateInformationSchemaTable(){\n\t\tSchema currentSchema = Schema.getSchemaInstance();\n\t\tString currentSchemaName = currentSchema.getCurrentSchema();\n\t\tboolean isFound = false;\n\t\ttry {\n\t\t\tRandomAccessFile tablesTableFile = new RandomAccessFile(\"information_schema.table.tbl\", \"rw\");\n\n\t\t\t//Searching to see if the information schema is present or not\n\t\t\twhile(tablesTableFile.getFilePointer() < tablesTableFile.length()){\n\t\t\t\tString readSchemaName = \"\";\n\t\t\t\tbyte varcharLength = tablesTableFile.readByte();\n\t\t\t\tfor(int j = 0; j < varcharLength; j++)\n\t\t\t\t\treadSchemaName += (char)tablesTableFile.readByte();\n\n\t\t\t\tif(readSchemaName.equals(currentSchemaName)){\n\t\t\t\t\tString readTableName = \"\";\n\t\t\t\t\tbyte varcharTableLength = tablesTableFile.readByte();\n\t\t\t\t\tfor(int j = 0; j < varcharTableLength; j++)\n\t\t\t\t\t\treadTableName += (char)tablesTableFile.readByte();\n\n\t\t\t\t\tif(readTableName.equals(tableName)){\n\t\t\t\t\t\tisFound = true;\n\t\t\t\t\t\tSystem.out.println(\"Table '\" + tableName + \"' already exits...\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\ttablesTableFile.readLong();\n\t\t\t\t} else {\n\t\t\t\t\tbyte traverseLength = tablesTableFile.readByte();\n\t\t\t\t\tfor(int j = 0; j < traverseLength; j++)\n\t\t\t\t\t\ttablesTableFile.readByte();\n\t\t\t\t\ttablesTableFile.readLong();\n\t\t\t\t}\t\n\t\t\t}\n\n\t\t\tif(!isFound){\n\t\t\t\t//Traversing to the end of file\n\t\t\t\ttablesTableFile.seek(tablesTableFile.length());\n\t\t\t\ttablesTableFile.writeByte(currentSchemaName.length()); // TABLE_SCHEMA\n\t\t\t\ttablesTableFile.writeBytes(currentSchemaName);\n\t\t\t\ttablesTableFile.writeByte(tableName.length()); // TABLE_NAME\n\t\t\t\ttablesTableFile.writeBytes(tableName);\n\t\t\t\ttablesTableFile.writeLong(0); // TABLE_ROWS\n\t\t\t}\n\n\t\t\ttablesTableFile.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\n\t\treturn isFound;\n\t}", "public void modifyTable(final byte [] tableName, DBTableDescriptor htd)\n throws IOException {\n modifyTable(tableName, DBConstants.Modify.TABLE_SET_HTD, htd);\n }", "public void updateTapSchema(SchemaConfig newSchema, boolean createOnly) throws ConfigurationException;", "protected void migrate() {\r\n java.util.Date dateNow = new java.util.Date();\r\n SQLiteBuilder builder = createBuilder();\r\n for (AbstractTable<?, ?, ?> table : tables) {\r\n if (table.migrated() < table.migrations()) {\r\n //FIXME this doesn't yet implement table updates.\r\n builder.createMigration(table).up(this);\r\n VersionRecord<DBT> v = _versions.create();\r\n v.table.set(table.helper.getTable().getRecordSource().tableName);\r\n v.version.set(1);\r\n v.updated.set(dateNow);\r\n v.insert();\r\n }\r\n }\r\n }", "@Override\n\tpublic void addTransactionToDatabase(Transaction trans) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString insertQuery = \"insert into transaction_history values(default, ?, ?, ?, now())\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(insertQuery);\n \n\t\t\tprepStmt.setInt(1, trans.getAccountId());\n\t\t\tprepStmt.setString(2, trans.getUsername());\n\t\t\tprepStmt.setDouble(3, trans.getAmount());\n\t\t\tprepStmt.executeUpdate();\n\t}", "public void createNewSchema() throws SQLException {\n ResultSet resultSet = databaseStatement.executeQuery(\"select count(datname) from pg_database\");\n int uniqueID = 0;\n if(resultSet.next()) {\n uniqueID = resultSet.getInt(1);\n }\n if(uniqueID != 0) {\n uniqueID++;\n databaseStatement.executeQuery(\"CREATE DATABASE OSM\"+uniqueID+\";\");\n }\n }", "public void lockTable(Connection con, String table) throws SQLException\n {\n }", "private void processAlterSchemaRename() throws HsqlException {\n\n String name = tokenizer.getSimpleName();\n\n tokenizer.getThis(Token.T_RENAME);\n tokenizer.getThis(Token.T_TO);\n\n String newName = tokenizer.getSimpleName();\n boolean isQuoted = tokenizer.wasQuotedIdentifier();\n\n database.schemaManager.renameSchema(name, newName, isQuoted);\n }", "public void tableRefChanged() {\r\n\t\t// clear the table Element so it will be recreated\r\n\t\ttableElement = null;\r\n\t\t\r\n\t\t// tell the files that this table has changed\r\n\t\tif (refFiles != null) {\r\n\t\t\tfor(ReferenceFile refFile : refFiles) {\r\n\t\t\t\trefFile.setUpdated(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private TableSchema createTableSchema(Node entity) {\n\t\tString physicalName = handler.getChildValueByProperty(entity,\n\t\t\t\t\"EntityProps.Physical_Name\");\n\t\tString name = entity.getAttributes().getNamedItem(\"Name\").getNodeValue().trim();\n\t\tString id = entity.getAttributes().getNamedItem(\"id\").getNodeValue().trim();\n\t\tnodeMap.put(id, entity);\n\t\tTableSchema tableSchema = new TableSchema(\"\", \"\");\n\t\tif (physicalName != null) {\n\t\t\tphysicalNameMap.put(id, physicalName);\n\t\t\ttableSchema.setName(physicalName);\n\t\t} else {\n\t\t\ttableSchema.setName(name);\n\t\t}\n\n\t\treturn tableSchema;\n\t}", "public void commitChanges() {\n try {\n connection.commit();\n } catch (SQLException sqle) {\n LOGGER.log(Level.SEVERE, \"Unable to commit changes to the DB due to error {0}\", sqle.getMessage());\n }\n }", "public void tableChanged(TableModelEvent e) {\n reallocateIndexes();\n super.tableChanged(e);\n }", "public static void saveDrops() {\n DropTable.serialize(file);\n }", "@Override\n public RelInfo visit(RelContext context, RelNode node, List<RelInfo> inputStreams)\n {\n\n TableModify modify = (TableModify)node;\n Preconditions.checkArgument(modify.isInsert(), \"Only INSERT allowed for table modify\");\n\n ApexSQLTable table = modify.getTable().unwrap(ApexSQLTable.class);\n\n Endpoint endpoint = table.getEndpoint();\n return endpoint.populateOutputDAG(context.dag, context.typeFactory);\n }", "public void setSchema(String aValue) {\n String oldValue = schema;\n schema = aValue;\n changeSupport.firePropertyChange(\"schema\", oldValue, aValue);\n }", "public void appendSchemaDDL(MigrationConfiguration cfg) {\n\t\tMigrationConfiguration config = getMigrationWizard().getMigrationConfig();\n\t\t\n\t\tList<String> schemaList = config.getNewTargetSchema();\n\t\t\n\t\tfor (String schemaName : schemaList) {\n\t\t\ttxtDDL.append(\"CREATE USER \" + schemaName);\n\t\t\ttxtDDL.append(\";\");\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t}", "public void setTableName(String name) {\n this.tableName = name;\n }", "private void updateTable() {\n updateTableData();\n TableModelEvent e = new TableModelEvent(articleTableModel);\n\n articleTable.tableChanged(e);\n }", "@Override\n public void createTable() throws Exception {\n }", "public static Schema buildFromDBTable(Connection conn, String tableName,\n String newSchemaName)\n {\n try\n {\n DatabaseMetaData DBMeta = conn.getMetaData();\n ResultSet rset = DBMeta.getColumns(null, null,\n tableName, null);\n\n Schema schema = new Schema(newSchemaName);\n\n /*\n * Actually, this code is not needed if we return the\n * result set. But, I am just doing it for the sake!\n */\n while (rset.next())\n {\n String columnName = rset\n .getString(\"COLUMN_NAME\");\n // Get the java.sql.Types type to which this database-specific type is mapped\n short dataType = rset.getShort(\"DATA_TYPE\");\n // Get the name of the java.sql.Types value.\n String columnType = JDBCUtils.getJdbcTypeName(dataType);\n\n schema.addAttribute(columnName, columnType, columnType);\n }\n return schema;\n }\n\n catch (Exception e)\n {\n System.out.println(\" Cannot retrieve the schema : \"\n + e.toString());\n e.printStackTrace();\n return null;\n }\n }", "public void setTableName(String tableName) {\n this.tableName = tableName;\n }", "public void setTableName(String tableName) {\n this.tableName = tableName;\n }", "public void setTableName(String tableName) {\n this.tableName = tableName;\n }", "public boolean hasAlterTable() {\n \t\treturn true;\n \t}", "private void createSchemaInfo() {\n\t\tfor (String tableName : tableSchemas.keySet()) {\n\t\t\tERWinSchemaInfo schemaInfo = new ERWinSchemaInfo();\n\t\t\tschemaInfo.setType(\"user\");\n\t\t\tschemaInfo.setUniqueName(tableName);\n\t\t\tschemaInfos.put(tableName, schemaInfo);\n\t\t}\n\n\t\tinitCache();\n\t\tparseKeyGroupGroups();\n\n\t\tparseEntityProps();\n\t\tparseRelationGroups();\n\t\tparseAttributes();\n\n\t\tcreateSchemaDDL();\n\t}", "private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }", "public void updateTableData(String currentSchema,\n\t\t\tTreeMap<Integer,List<String>> tableDataMap,\n\t\t\tTreeMap<Integer,List<String>> tableSchemaMap){\n\t\ttry{\n\t\t\tInsertHelper iH = InsertHelper.getInsertHelperInstance();\n\t\t\tRandomAccessFile tableDataFile = new RandomAccessFile(currentSchema + \".\" + tableName + \".tbl\", \"rw\");\n\n\t\t\t//Table Data Map\n\t\t\tSet<Map.Entry<Integer,List<String>>> tableDataMapSet = tableDataMap.entrySet();\n\t\t\tIterator<Map.Entry<Integer,List<String>>> tableDataMapIterator = tableDataMapSet.iterator();\n\n\t\t\t//Table Schema Map\n\t\t\tSet<Map.Entry<Integer,List<String>>> columnSet = tableSchemaMap.entrySet();\n\t\t\tIterator<Map.Entry<Integer,List<String>>> columnIterator = columnSet.iterator();\n\t\t\tList<String> columnSchema = new ArrayList<String>();\n\n\t\t\t//Adding Column_Name,INT serially in the list\n\t\t\twhile(columnIterator.hasNext()){\n\t\t\t\tMap.Entry<Integer,List<String>> columnME = columnIterator.next();\n\t\t\t\tList<String> currentColumn = columnME.getValue();\n\t\t\t\tcolumnSchema.add(currentColumn.get(0));\n\t\t\t\tcolumnSchema.add(currentColumn.get(1));\n\t\t\t}\n\n\t\t\t//Checks the array list and writes accordingly to the File \n\t\t\twhile(tableDataMapIterator.hasNext()){\n\t\t\t\tMap.Entry<Integer,List<String>> columnME = tableDataMapIterator.next();\n\n\t\t\t\tList<String> currentColumn = columnME.getValue();\n\t\t\t\tint columnDataCounter = currentColumn.size();\n\t\t\t\tint columnSchemaCounter = 0;\n\n\t\t\t\tfor(int i = 0;i < columnDataCounter; i++){\n\t\t\t\t\tlong tableIndexPointer = tableDataFile.getFilePointer();\n\t\t\t\t\tif(columnSchema.get(columnSchemaCounter + 1).contains(\"VARCHAR\")){\n\t\t\t\t\t\ttableDataFile.writeByte(currentColumn.get(i).length());\n\t\t\t\t\t\ttableDataFile.writeBytes(currentColumn.get(i));\n\t\t\t\t\t\tiH.updateIndex(currentSchema, tableName, columnSchema.get(columnSchemaCounter), tableIndexPointer,columnSchema.get(columnSchemaCounter + 1), currentColumn.get(i));\n\t\t\t\t\t\tcolumnSchemaCounter = columnSchemaCounter + 2;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tswitch(columnSchema.get(columnSchemaCounter + 1)){\n\t\t\t\t\t\tcase \"CHAR\":\n\t\t\t\t\t\t\ttableDataFile.writeByte(currentColumn.get(i).length());\n\t\t\t\t\t\t\ttableDataFile.writeBytes(currentColumn.get(i));\n\t\t\t\t\t\t\tiH.updateIndex(currentSchema, tableName, columnSchema.get(columnSchemaCounter), tableIndexPointer,columnSchema.get(columnSchemaCounter + 1), currentColumn.get(i));\n\t\t\t\t\t\t\tcolumnSchemaCounter = columnSchemaCounter + 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"BYTE\": \n\t\t\t\t\t\t\ttableDataFile.writeBytes(currentColumn.get(i));\n\t\t\t\t\t\t\tiH.updateIndex(currentSchema, tableName, columnSchema.get(columnSchemaCounter), tableIndexPointer,columnSchema.get(columnSchemaCounter + 1), currentColumn.get(i));\n\t\t\t\t\t\t\tcolumnSchemaCounter = columnSchemaCounter + 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"SHORT\":\n\t\t\t\t\t\t\ttableDataFile.writeShort(Integer.parseInt(currentColumn.get(i)));\n\t\t\t\t\t\t\tiH.updateIndex(currentSchema, tableName, columnSchema.get(columnSchemaCounter), tableIndexPointer,columnSchema.get(columnSchemaCounter + 1), currentColumn.get(i));\n\t\t\t\t\t\t\tcolumnSchemaCounter = columnSchemaCounter + 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"INT\":\n\t\t\t\t\t\t\ttableDataFile.writeInt(Integer.parseInt(currentColumn.get(i)));\n\t\t\t\t\t\t\tiH.updateIndex(currentSchema, tableName, columnSchema.get(columnSchemaCounter), tableIndexPointer,columnSchema.get(columnSchemaCounter + 1), currentColumn.get(i));\n\t\t\t\t\t\t\tcolumnSchemaCounter = columnSchemaCounter + 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"LONG\": \n\t\t\t\t\t\t\ttableDataFile.writeLong(Integer.parseInt(currentColumn.get(i)));\n\t\t\t\t\t\t\tiH.updateIndex(currentSchema, tableName, columnSchema.get(columnSchemaCounter), tableIndexPointer,columnSchema.get(columnSchemaCounter + 1), currentColumn.get(i));\n\t\t\t\t\t\t\tcolumnSchemaCounter = columnSchemaCounter + 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"FLOAT\": \n\t\t\t\t\t\t\ttableDataFile.writeFloat(Integer.parseInt(currentColumn.get(i)));\n\t\t\t\t\t\t\tiH.updateIndex(currentSchema, tableName, columnSchema.get(columnSchemaCounter), tableIndexPointer,columnSchema.get(columnSchemaCounter + 1), currentColumn.get(i));\n\t\t\t\t\t\t\tcolumnSchemaCounter = columnSchemaCounter + 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"DOUBLE\": \n\t\t\t\t\t\t\ttableDataFile.writeDouble(Integer.parseInt(currentColumn.get(i)));\n\t\t\t\t\t\t\tiH.updateIndex(currentSchema, tableName, columnSchema.get(columnSchemaCounter), tableIndexPointer,columnSchema.get(columnSchemaCounter + 1), currentColumn.get(i));\n\t\t\t\t\t\t\tcolumnSchemaCounter = columnSchemaCounter + 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"DATETIME\": \n\t\t\t\t\t\t\tDateFormat dateTimeFormat = new SimpleDateFormat(\"yyyy-MM-dd_HH:mm:ss\", Locale.ENGLISH);\n\t\t\t\t\t\t\tDate dateTime = dateTimeFormat.parse(currentColumn.get(i));\n\t\t\t\t\t\t\ttableDataFile.writeLong(dateTime.getTime());\n\t\t\t\t\t\t\tiH.updateIndex(currentSchema, tableName, columnSchema.get(columnSchemaCounter), tableIndexPointer,columnSchema.get(columnSchemaCounter + 1), currentColumn.get(i));\n\t\t\t\t\t\t\tcolumnSchemaCounter = columnSchemaCounter + 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"DATE\": \n\t\t\t\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH);\n\t\t\t\t\t\t\tDate date = dateFormat.parse(currentColumn.get(i));\n\t\t\t\t\t\t\ttableDataFile.writeLong(date.getTime());\n\t\t\t\t\t\t\tiH.updateIndex(currentSchema, tableName, columnSchema.get(columnSchemaCounter), tableIndexPointer,columnSchema.get(columnSchemaCounter + 1), currentColumn.get(i));\n\t\t\t\t\t\t\tcolumnSchemaCounter = columnSchemaCounter + 2;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\ttableDataFile.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void analyzeCreateTableStmt(TCreateTableSqlStatement stmt) {\n\t\tString tableName=stmt.getTargetTable().toString();\n\t\tif(Input.tablesInfo.get(tableName)!=null){System.out.println(\"Table already exists..\"); return;}\n\t\tTColumnDefinition column;\n\t\ttry \n\t\t{\n\t\tFile file =new File(\"Resources/metadata.txt\");\n\t\tString NF=\"Resources/\"+tableName+\".csv\";\n\t\tFile newFile =new File(NF);\n\t\tif(!newFile.exists())\n\t\t\tnewFile.createNewFile();\n\t\tif(!file.exists())\n\t\t\t\tfile.createNewFile();\n\t\t\t\t\n\t\t\tFileWriter fileWritter = new FileWriter(file,true);\n\t\t\tBufferedWriter bufferWritter = new BufferedWriter(fileWritter);\n\t\t\t//bufferWritter.newLine(); \n\t\t\tbufferWritter.write(\"<begin_table>\".trim());\n\t\t\tbufferWritter.newLine(); bufferWritter.write(tableName);\n\t\t\n\t\t\tfor(int i=0;i<stmt.getColumnList().size();i++)\n\t\t{\n bufferWritter.newLine();\n column = stmt.getColumnList().getColumn(i);\n bufferWritter.write(column.getColumnName().toString().trim());\n \n }\n\t\t\n\t\tbufferWritter.newLine();\n\t\tbufferWritter.write(\"<end_table>\".trim());bufferWritter.newLine(); \n\t\tbufferWritter.close();\n\t\tSystem.out.println(\"Table created successfully...\");\n\t\t}\t\n\t\t catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t}", "public void createDB() {\n\t\ttry {\n\t\t\tBufferedReader br= new BufferedReader(new FileReader(\"db_schema.txt\"));\n\t\t\tString line= null;\n\t\t\tStringBuilder sb= new StringBuilder();\n\t\t\twhile ((line=br.readLine())!=null){\n\t\t\t\tsb.append(line);\n\t\t\t\tif(sb.length()>0 && sb.charAt(sb.length()-1)==';'){//see if it is the end of one line of command\n\t\t\t\t\tstatement.executeUpdate(sb.toString());\n\t\t\t\t\tsb= new StringBuilder();\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "Table fetchSchema(LogSequenceNumber lsn, String tableName);", "public abstract void configureTables();", "public interface TableDefinition extends BaseColumns {\n\n String tableName();\n\n String createStatement();\n\n String dropStatement();\n \n}", "public org.apache.spark.sql.SchemaRDD table (java.lang.String tableName) { throw new RuntimeException(); }", "private void fireStructureChanged() {\n\n tableModel.fireTableStructureChanged();\n paramsTable.getColumnModel().getColumn(COL_SAMPLING).setCellEditor(\n new SamplingEditor());\n }" ]
[ "0.6108253", "0.60760987", "0.60322434", "0.5969665", "0.59596235", "0.57938415", "0.5750076", "0.57238984", "0.5704376", "0.56502414", "0.56499684", "0.5622826", "0.5615353", "0.55795324", "0.5519535", "0.5518644", "0.54999167", "0.54903436", "0.5418514", "0.54162854", "0.5407109", "0.5399143", "0.53964365", "0.53964365", "0.5393358", "0.5365763", "0.5359733", "0.5353842", "0.53469425", "0.53469425", "0.534365", "0.5332922", "0.53020763", "0.5222955", "0.5220283", "0.5214639", "0.5205732", "0.5154262", "0.51461005", "0.513926", "0.51246405", "0.51217127", "0.50693196", "0.5068732", "0.5067112", "0.5065198", "0.50651485", "0.50628895", "0.5059981", "0.50529236", "0.50450015", "0.50346196", "0.5033301", "0.5012865", "0.50112927", "0.5005385", "0.49926916", "0.49881324", "0.49818173", "0.49818173", "0.49511176", "0.4943977", "0.49414885", "0.4933583", "0.49297523", "0.4922806", "0.4918483", "0.49177197", "0.49094498", "0.49065614", "0.4905272", "0.49034867", "0.4900646", "0.48908255", "0.48871619", "0.48843712", "0.48579776", "0.4845281", "0.48446062", "0.48426574", "0.48417872", "0.4835332", "0.48279998", "0.4826537", "0.48122987", "0.48116463", "0.48075548", "0.48075548", "0.48075548", "0.48061028", "0.4803368", "0.47949982", "0.47884616", "0.47878677", "0.47877604", "0.47860506", "0.47845805", "0.4784024", "0.47820064", "0.47818223" ]
0.6782002
0
Return the schema at the given log sequence number
Table fetchSchema(LogSequenceNumber lsn, String tableName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void storeSchema(LogSequenceNumber lsn, Table table);", "public MetaSchema getMetaSchema(int iSchema);", "public SchemaInfo getSchema () throws Exception;", "S getSchema();", "public static Schema loadSchema(Configuration conf) {\n SchemaWritable schema = new SchemaWritable();\n try {\n FileSystem fs = FileSystem.get(conf);\n Path schemaPath = getSchemaPath(conf);\n if (fs.isDirectory(schemaPath)) {\n for (FileStatus status : fs.listStatus(schemaPath)) {\n schemaPath = status.getPath();\n if (status.isFile() && status.getLen() > 0\n && !schemaPath.getName().startsWith(DEBUG_OUT)) {\n break;\n }\n }\n }\n SequenceFile.Reader in = new SequenceFile.Reader(conf,\n SequenceFile.Reader.file(schemaPath));\n NullWritable key = NullWritable.get();\n in.next(key, schema);\n in.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return schema;\n }", "String handlerSchema();", "public Schema getSchema();", "long getFirstLogIndex();", "@Override\n\tpublic String getSchemaName(int arg0) throws SQLException {\n\t\treturn null;\n\t}", "public String getSchemaLocation();", "private String getRuleSetName(String line) {\n\t\tString msg = StringUtils.substringBetween(line, \"title=\", \" schemaVersion=\");\n\t\tif (StringUtils.isNotEmpty(msg)) {\n\t\t return msg;\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n }", "void schema(String schema);", "void schema(String schema);", "public Schema getSchema() throws IOException {\n byte[] schemaBytes = jniWrapper.nativeGetSchema(nativeInstanceId);\n\n try (MessageChannelReader schemaReader = new MessageChannelReader(\n new ReadChannel(new ByteArrayReadableSeekableByteChannel(schemaBytes)),\n allocator)) {\n MessageResult result = schemaReader.readNext();\n if (result == null) {\n throw new IOException(\"Unexpected end of input. Missing schema.\");\n }\n\n return MessageSerializer.deserializeSchema(result.getMessage());\n }\n }", "String getSchemaVersion();", "@Override\r\n\tprotected String getSchemaSpacePattern() throws SQLException {\r\n\t\tString schema = databaseConnection.getSchema();\r\n\t\tif ((schema == null) || schema.isEmpty()) {\r\n\t\t\tschema = dbmd.getUserName();\r\n\t\t}\r\n\t\treturn schema;\r\n\t}", "String getSchemaId(String schema) {\n final String schemaId = schemaToIdCache.get(schema);\n\n if (schemaId != null) {\n // Simulate an access so that the entry does not expire.\n super.get(schemaId);\n }\n\n return schemaId;\n }", "String getSchemaName();", "String getSchemaName();", "public TapSchema findOneSchema(String schemaName);", "String getSchemaFile();", "public String getSchema()\n {\n return schema;\n }", "public static String getSchema( String url )\n\t{\n\t\tString db = url.split( \":\" )[ 1 ];\n\t\tString result = null;\n\t\tif( SCHEMAS.containsKey( db ) )\n\t\t{\n\t\t\tresult = SCHEMAS.get( db );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif( MYSQL.equals( db ) )\n\t\t\t{\n//\t\t\t\tString dbNameAndProps = url.split( \"/\" )[ 3 ];\n//\t\t\t\tresult = dbNameAndProps.split( \"[?]\" )[ 0 ];\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public Integer getSchema()\r\n\t{\r\n\t\tif(element instanceof Schema)\r\n\t\t\treturn ((Schema)element).getId();\r\n\t\treturn ((SchemaElement)element).getBase();\r\n\t}", "@Override\n public String getSchema() throws IOException, AutomationException {\n serverLog.addMessage(3, 200, \"Request received in Sample Object Interceptor for getSchema\");\n\n /*\n * Add code to manipulate schema requests here\n */\n\n IRESTRequestHandler restRequestHandler = soiHelper.findRestRequestHandlerDelegate(so);\n if (restRequestHandler != null) {\n return restRequestHandler.getSchema();\n }\n\n return null;\n }", "public SchemaInfo readServerSchema() {\n String path = \"/schema\";\n Span span = this.tracer.buildSpan(\"Client.Schema\").start();\n try {\n try (CloseableHttpResponse response = clientExecute(\"GET\", path, null, null, \"Error while reading schema\",\n ReturnClientResponse.ERROR_CHECKED_RESPONSE, false)) {\n HttpEntity entity = response.getEntity();\n if (entity != null) {\n try (InputStream src = entity.getContent()) {\n return SchemaInfo.fromInputStream(src);\n }\n }\n throw new PilosaException(\"Server returned empty response\");\n }\n } catch (IOException ex) {\n throw new PilosaException(\"Error while reading response\", ex);\n } finally {\n span.finish();\n }\n }", "AstroSchema getSchema();", "public String getSchemaName(int column) throws SQLException {\n\t\t\treturn null;\n\t\t}", "public String getSchema() {\n return schema;\n }", "public java.lang.String getSchema() {\r\n return schema;\r\n }", "static Path getSchemaPath(Configuration conf) {\n int iteration = lastSchemaUpdate(conf);\n return getOutputPath(conf, SCHEMA_BASE + iteration);\n }", "int getUnusedSchemaId();", "public String getSchema() {\n return schema;\n }", "public String getSchema() {\n return schema;\n }", "public SchemaDef getSourceSchema();", "public String getSchema()\n {\n String schema = \"\";\n if(this.props != null && !this.props.isEmpty())\n {\n schema = this.props.getProperty(\"db.schema\");\n }\n \n return schema;\n }", "@Override\n public String[] getCreateSequenceSQL(Sequence seq) {\n String seqName =\n checkNameLength(getFullName(seq), maxTableNameLength,\n \"long-seq-name\");\n String createSeq =\n MessageFormat.format(createSequenceSQL, new Object[] { seqName });\n if (seq.getInitialValue() == 0)\n return new String[] { createSeq };\n\n // Use String.valueOf to get rid of possible number formatting.\n String alterSeq =\n MessageFormat.format(alterSequenceSQL, new Object[] { seqName,\n String.valueOf(seq.getInitialValue()) });\n return new String[] { createSeq, alterSeq };\n }", "Schema createSchema();", "List<Log> mo13160a(String str, int i);", "public org.apache.spark.sql.catalyst.ScalaReflection.Schema schemaFor (org.apache.spark.sql.catalyst.ScalaReflection.universe tpe) ;", "BigDecimal getLqnSchemaVersion();", "public void setSchema(String schema) {\n this.schema = schema;\n }", "java.lang.String getField1121();", "public String schema() {\n return schemaName;\n }", "public String schema() {\n return schemaName;\n }", "@Override\n protected String getSequencesSQL(String schemaName, String sequenceName) {\n return getSequencesSQL(DBIdentifier.newSchema(schemaName), DBIdentifier.newSequence(sequenceName));\n }", "@Override\r\n\t\tpublic String getSchema() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "public org.apache.avro.Schema getSchema() { return SCHEMA$; }", "private static Schema getSchema(Path inputPathDir)\n throws IOException {\n FileSystem fs = FileSystem.get(new Configuration());\n Schema avroSchema = null;\n for (FileStatus fileStatus : fs.listStatus(inputPathDir)) {\n if (fileStatus.isFile() && fileStatus.getPath().getName().endsWith(\".avro\")) {\n _logger.info(\"Extracting schema from \" + fileStatus.getPath());\n avroSchema = extractSchemaFromAvro(fileStatus.getPath());\n break;\n }\n }\n return avroSchema;\n }", "java.lang.String getField1122();", "public Schema getSchema()\n {\n return schema;\n }", "@Query(\"SELECT d.idDatasetSchema from DatasetValue d where id=?1\")\n String findIdDatasetSchemaById(Long datasetId);", "public void setSchema(java.lang.String schema) {\r\n this.schema = schema;\r\n }", "public final void schema() throws RecognitionException {\r\n try {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:219:2: ( SCHEMA )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:219:4: SCHEMA\r\n {\r\n match(input,SCHEMA,FOLLOW_SCHEMA_in_schema1347); \r\n putSchema();\r\n\r\n }\r\n\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public String getPrimaryCardinalitySql(MigrationType node);", "RecordDataSchema getActionRequestSchema();", "BigDecimal getLqncoreSchemaVersion();", "String getRemoteSchema();", "public int getLogType(int index)\n {\n return m_Log.get(index).getType();\n }", "public <T extends java.lang.Object> org.apache.spark.sql.catalyst.ScalaReflection.Schema schemaFor (scala.reflect.api.TypeTags.TypeTag<T> evidence$2) ;", "public Schema getSchema() {\n return schema;\n }", "java.lang.String getField1404();", "public Schema getSchema() {\n return schema;\n }", "private String getSchema(Document doc) {\n\t\tElement rootElement = doc.getRootElement();\n\t\treturn rootElement.getAttributeValue(\"schemaLocation\", xsiNamespace).replace(\"http://www.github.com/biosemantics\", \"\").trim();\n\t}", "private static Schema schema(Properties props) {\n String schemaString = props.getProperty(InputFormatConfig.TABLE_SCHEMA);\n Preconditions.checkNotNull(schemaString, \"Table schema not set\");\n return SchemaParser.fromJson(props.getProperty(InputFormatConfig.TABLE_SCHEMA));\n }", "public MetaSchema getMetaSchema(String sName);", "private LogDataHolder parseLog()\n throws XMLStreamException \n {\n /*\n // These values don't seem to be used for anything, so don't try to set them\n String ascensionLogXMLVersion = \"\";\n String fileCreatorName = \"\";\n String fileCreatorVersion = \"\";\n */\n \n while (parser.hasNext()) {\n switch (parser.getEventType()) {\n case XMLStreamConstants.START_ELEMENT:\n final String nodeName = parser.getLocalName();\n /*\n if (nodeName.equals(\"ascensionlogxml\")) {\n for (int i = 0; i < parser.getAttributeCount(); i++)\n if (parser.getAttributeLocalName(i).equals(\"version\"))\n ascensionLogXMLVersion = parser.getAttributeValue(i);\n } else if (nodeName.equals(\"filecreator\")) {\n for (int i = 0; i < parser.getAttributeCount(); i++)\n if (parser.getAttributeLocalName(i).equals(\"programname\"))\n fileCreatorName = parser.getAttributeValue(i);\n else if (parser.getAttributeLocalName(i).equals(\"programversion\"))\n fileCreatorVersion = parser.getAttributeValue(i);\n } else */ \n if (nodeName.equals(\"ascension\"))\n parseAscension();\n\n break;\n default:\n break;\n }\n parser.next();\n }\n\n return logData;\n }", "public static void printSchemaStats(java.sql.Connection con, BaseDatabaseVendor vendor, final DatabaseMetaData md,\n final String catalog, final String schemaPattern) {\n\n ResultSet rs;\n\n // Get the list of catalogs\n try {\n writeMessage(\" Getting catalogs\");\n int counter = 0;\n rs = vendor.getCatalogs(con, md);\n writeMessage(\" Catalog Name\");\n while (rs.next()) {\n writeMessage(\" \" + rs.getString(1));\n counter++;\n }\n writeMessage(\"*** Total:\" + counter);\n rs.close();\n } catch (Exception e) {\n logError(\"Exception getting catalogs\", e);\n }\n\n // Get the list of catalogs\n try {\n writeMessage(\" Getting schemas\");\n int counter = 0;\n rs = vendor.getSchemas(con,md);\n writeMessage(\" Schema, Catalog\");\n while (rs.next()) {\n writeMessage(\" \" + rs.getString(1) + \",\" + rs.getString(2));\n counter++;\n }\n writeMessage(\"*** Total:\" + counter);\n rs.close();\n } catch (Exception e) {\n logError(\"Exception getting schemas\", e);\n }\n\n try {\n writeMessage(\" Getting tables\");\n int counter = 0;\n rs = vendor.getTables(con,md, catalog, schemaPattern);\n writeMessage(\" Catalog, Schema, Table Name\");\n while (rs.next()) {\n writeMessage(\" \" + rs.getString(1) + \",\" + rs.getString(2) + \",\"\n + rs.getString(3));\n counter++;\n }\n writeMessage(\"*** Total:\" + counter);\n rs.close();\n } catch (Exception e) {\n logError(\"Exception getting tables\", e);\n }\n\n try {\n writeMessage(\" Getting views\");\n int counter = 0;\n rs = vendor.getViews(con,md, catalog, schemaPattern);\n writeMessage(\" Catalog, Schema, Table Name\");\n while (rs.next()) {\n writeMessage(\" \" + rs.getString(1) + \",\" + rs.getString(2) + \",\"\n + rs.getString(3));\n counter++;\n }\n writeMessage(\"*** Total:\" + counter);\n rs.close();\n } catch (Exception e) {\n logError(\"Exception getting views\", e);\n }\n\n try {\n writeMessage(\" Getting functions\");\n int counter = 0;\n rs = vendor.getFunctions(con,md, catalog, schemaPattern);\n writeMessage(\" Catalog, Schema, Function Name\");\n while (rs.next()) {\n writeMessage(\" \" + rs.getString(1) + \",\" + rs.getString(2) + \",\"\n + rs.getString(3));\n counter++;\n }\n writeMessage(\"*** Total:\" + counter);\n rs.close();\n } catch (Exception e) {\n logError(\"Exception getting functions\", e);\n }\n\n try {\n writeMessage(\" Getting procedures\");\n int counter = 0;\n rs = vendor.getProcedures(con,md, catalog, schemaPattern);\n writeMessage(\" Catalog, Schema, Function Name\");\n while (rs.next()) {\n writeMessage(\" \" + rs.getString(1) + \",\" + rs.getString(2) + \",\"\n + rs.getString(3));\n counter++;\n }\n writeMessage(\"*** Total:\" + counter);\n rs.close();\n } catch (Exception e) {\n logError(\"Exception getting procedures\", e);\n }\n }", "public FeatureFilter getSchema();", "public void setSchemaVersion(int version) {\n this.SCHEMA_VERSION = version;\n }", "public static Schema getSchema(JobConf conf) throws IOException\n {\n TableExpr expr = getInputExpr(conf);\n return expr.getSchema(conf);\n }", "private String getCorrectCallLogTableName() {\n Uri uri = CallLog.Calls.CONTENT_URI;\n String testTableName = CallLog.Calls._ID + \" in (select \" + CallLog.Calls._ID +\n \" from calls group by \" + CallLog.Calls.NUMBER + \")\";\n\n Cursor cursor = null;\n try {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.READ_CALL_LOG) != PackageManager.PERMISSION_GRANTED) {\n\n }\n cursor = getContext().getContentResolver().query(uri,\n new String[]{CallLog.Calls._ID}, testTableName, null, null);\n cursor.moveToNext();\n } catch (Exception e) {\n if (e.getMessage().toLowerCase().contains(\"no such table\")) {\n return \"logs\";\n } else if (BuildConfig.DEBUG) {\n Log.d(TAG, \"Exception while checking table name\", e);\n }\n } finally {\n Util.close(cursor);\n }\n return \"calls\";\n }", "List<GlobalSchema> schemas();", "private String selectSEQTable(String prefix) {\n\t\tStringBuffer buildSQL = new StringBuffer();\n\t\tbuildSQL.append(\"SELECT next_val FROM \" + DEFAULT_SEQUENCE_NAME + BLANK_SPACE);\n\t\tbuildSQL.append(\"WHERE prefix_value ='\" + prefix + \"'\");\n\t\treturn buildSQL.toString();\n\t}", "public int getSeqNo();", "public int getSeqNo();", "public java.lang.String getScat_seq_num() {\n\t\treturn scat_seq_num;\n\t}", "@Override\n\tpublic ILogType parse(IFileStream stream) throws IOException{\n\t\tInteger value = stream.getInteger();\n\t\tLogType4Integer type = new LogType4Integer(value);\n\t\ttype.setTimestamp(stream.getInteger());\n\t\treturn type;\n\t}", "java.lang.String getField1414();", "SchemaDefinition createSchemaDefinition();", "public String getSchemaPath(final String requestUrl) {\n // find out if we have a known route, e.g. /rules, /bnrules, etc.\n final Optional<String> match = businessObjectToJsonSchema.keySet().stream().filter(requestUrl::contains).findAny();\n\n if (match.isEmpty()) {\n logger.debug(\"Schema validation not configured for: {}\", requestUrl);\n return null; // the request has not mapping, meaning there is no schema for this request URL's payload\n }\n\n final String route = match.get();\n // find out if there are trailing elements after the base mapping (e.g. rules/<hash>). If so, we validate.\n if (requestUrl.lastIndexOf(route) >= requestUrl.lastIndexOf(\"/\")) {\n // this means we have no hash or any other trailing path components after the route. We are not validating this.\n // The payloads we are interested in are always qualified with a hash, a country, etc.\n return null;\n }\n // since there is currently only one schema per route, we can take the route as a key for the schema\n // e.g. if we have /rules/<something>, we use the same schema, no matter what <something> is.\n return businessObjectToJsonSchema.get(route);\n }", "public TypeDescription getSchema() {\n return schema;\n }", "public int getVersionForSchema() {\n try (ITransaction tx = transactionProvider.getTransaction()) {\n try (Connection c = connectionProvider.getConnection()) {\n GetSchemaVersion cmd = new GetSchemaVersion(this.schemaName);\n return cmd.run(translator, c);\n } catch (SQLException x) {\n throw translator.translate(x);\n }\n }\n }", "EepHeadLoad findBySequenceNumber(Integer nr);", "public String getDocumentNo();", "public String getDocumentNo();", "public String getDocumentNo();", "public int getConstraintSchemaPart() {\n return schemaPart;\n }", "java.lang.String getField1320();", "public Schema readSchema() {\n Schema result = Schema.defaultSchema();\n SchemaInfo schema = readServerSchema();\n for (IndexInfo indexInfo : schema.getIndexes()) {\n Index index =\n result.index(indexInfo.getName(), indexInfo.getIndexOptions(), indexInfo.getShardWidth());\n List<FieldInfo> fields = indexInfo.getFields();\n if (fields != null) {\n for (IFieldInfo fieldInfo : indexInfo.getFields()) {\n // do not read system fields\n if (systemFields.contains(fieldInfo.getName())) {\n continue;\n }\n index.field(fieldInfo.getName(), fieldInfo.getOptions());\n }\n }\n }\n return result;\n }", "HdbSequencePackage getHdbSequencePackage();", "private void printSchema() {\n ArrayList<String> schema = sqlMngr.getSchema();\n\n System.out.println(\"\");\n System.out.println(\"------------\");\n System.out.println(\"Total number of tables: \" + schema.size());\n for (int i = 0; i < schema.size(); i++) {\n System.out.println(\"Table: \" + schema.get(i));\n }\n System.out.println(\"------------\");\n System.out.println(\"\");\n }", "public com.google.cloud.aiplatform.v1.MetadataSchema getMetadataSchema(\n com.google.cloud.aiplatform.v1.GetMetadataSchemaRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getGetMetadataSchemaMethod(), getCallOptions(), request);\n }", "int getUnusedTableId(Schema schema);", "default Schema getSchemaById(int schemaId) {\n return (Schema) this.getTargetById(schemaId);\n }", "java.lang.String getField1126();", "public String getSchema()\n\t{\n\t\t//begin vpj-cd e-evolution 03/04/2005\n\t\treturn \"compiere\";\n\t\t//end vpj-cd e-evolution 03/04/2005\n\t}", "String getSchemaProperty(Context context,String sSymbolicName) throws Exception{\n \tString strMQLCommand=\"print program $1 select $2 dump $3\";\r\n\t\tString strResults = MqlUtil.mqlCommand(context,strMQLCommand,\"eServiceSchemaVariableMapping.tcl\",\"property[\"+ sSymbolicName +\"]\",\"|\");\r\n\r\n StringTokenizer token = new StringTokenizer(strResults,\"|\");\r\n String val = null;\r\n while (token.hasMoreTokens()){\r\n String preParse = token.nextToken();\r\n\r\n\t\t //property returned as 'relationsip_xyz to relationship xyz'\r\n\t\t int toIndex = preParse.indexOf(\" to \");\r\n\t\t if (toIndex > -1){\r\n\r\n\t\t\t//split on \" to \"\r\n\t\t\tval = preParse.substring(toIndex+4,preParse.length());\r\n\t\t\tif (val != null){\r\n\t\t\t val.trim();\r\n\r\n\t\t\t //split on space and place result in hashtable\r\n\t\t\t val = val.substring(val.indexOf(' ')+1,val.length());\r\n\t\t\t }\r\n\t\t }\r\n\t\t}\r\n\r\n \treturn val;\r\n }", "public String getSchemaLocation() {\r\n return schemaLocation;\r\n }", "public int getMetaSchemas();" ]
[ "0.59169006", "0.544042", "0.5207841", "0.51963633", "0.5156373", "0.49758896", "0.4922038", "0.4908676", "0.48727655", "0.48601294", "0.48327264", "0.48297387", "0.48297387", "0.48111185", "0.47464612", "0.47428992", "0.4729392", "0.47207883", "0.47207883", "0.47174904", "0.47093225", "0.47064555", "0.4704338", "0.47032073", "0.46904454", "0.4659152", "0.4638484", "0.46196368", "0.46192238", "0.4613161", "0.46066535", "0.46055773", "0.4595927", "0.4595927", "0.45909584", "0.45816857", "0.45809254", "0.45232093", "0.4516114", "0.45120093", "0.44433826", "0.44367984", "0.4417948", "0.44166416", "0.44166416", "0.44111606", "0.44104597", "0.43961197", "0.43955418", "0.43810466", "0.4378273", "0.43745142", "0.43697536", "0.4363978", "0.4344814", "0.43447164", "0.43423098", "0.43405974", "0.43384027", "0.43358505", "0.4332195", "0.43308538", "0.43210486", "0.43202174", "0.4318715", "0.43130213", "0.42930415", "0.4279941", "0.4277973", "0.4276252", "0.42742023", "0.42726815", "0.42555147", "0.42513388", "0.42370152", "0.42370152", "0.4234877", "0.42333066", "0.4230693", "0.42301813", "0.4228197", "0.4219891", "0.42188004", "0.42129326", "0.42092928", "0.42092928", "0.42092928", "0.42076322", "0.42059684", "0.42058256", "0.4196116", "0.41917157", "0.41895145", "0.41872954", "0.41833857", "0.41813856", "0.41740996", "0.41723007", "0.41715047", "0.41621253" ]
0.6311464
0
Creates a new instance of CellBackup
private CellBackup(CellRevision cellRevision, TechPool techPool, boolean modified) { this.cellRevision = cellRevision; this.techPool = techPool; this.modified = modified; cellBackupsCreated++; if (Job.getDebug()) check(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static CellBackup newInstance(ImmutableCell d, TechPool techPool) {\n if (d.cellId.idManager != techPool.idManager)\n throw new IllegalArgumentException();\n if (techPool.getTech(d.techId) == null)\n throw new IllegalArgumentException();\n CellRevision cellRevision = new CellRevision(d);\n TechPool restrictedPool = techPool.restrict(cellRevision.techUsages, techPool);\n return new CellBackup(cellRevision, restrictedPool, true);\n }", "public CellBackup withoutModified() {\n if (!this.modified) return this;\n return new CellBackup(this.cellRevision, this.techPool, false);\n }", "public Backup() {\n initComponents();\n selecionarOpcoesDeBackup();\n }", "public Backup() {\n initComponents();\n }", "public DriverConfig createBackupDriver()\n {\n DriverConfig driver = new DriverConfig(this);\n \n _backupDriverList.add(driver);\n \n return driver;\n }", "protected Backup()\n {\n m_buffer_ = new StringBuffer();\n }", "Snapshot create();", "public TelaFazBackup() {\n initComponents();\n }", "@Test\n\tpublic void backupTest1() {\n\t\tMainPanel m = new MainPanel(15);\n\t\tCell[][] _cells = new Cell[15][15];\n\t\tfor(int i = 0; i < 15; i++) {\n\t\t\tfor(int j = 0; j < 15; j++) {\n\t\t\t _cells[i][j] = new Cell(false);\n\t\t\t}\n\t\t}\t\n\t\tm.backup1();\t\n\t\tassertEquals(m._backupCells[14][14].getAlive(), _cells[14][14].getAlive());\n\t}", "public Cell(){}", "public static void main_backup(){\n try {\n tableClone = (HiringTable) table.clone();\n System.out.println(\"Successfully created backup.\");\n } catch (CloneNotSupportedException ex){\n System.out.println(\"Clone not successful.\");\n main_menu();\n }\n }", "public edu.usfca.cs.dfs.StorageMessages.BackUp.Builder getBackupBuilder() {\n return getBackupFieldBuilder().getBuilder();\n }", "static CellBackup read(IdReader reader, TechPool techPool) throws IOException {\n CellRevision newRevision = CellRevision.read(reader);\n boolean modified = reader.readBoolean();\n TechPool restrictedPool = techPool.restrict(newRevision.techUsages, techPool);\n return new CellBackup(newRevision, restrictedPool, modified);\n }", "edu.usfca.cs.dfs.StorageMessages.BackUp getBackup();", "public abstract ICloudBackup getBackupImpl();", "public NotebookCell() {}", "public static ByteArrayCache instance() {\n if (_instance == null) try {\n _instance = (ByteArrayCache) ImmortalMemory.instance().newInstance( ByteArrayCache.class);\n ZenProperties.logger.log(Logger.INFO, ByteArrayCache.class, \"instance\", \"ByteArrayCache created\");\n } catch (Exception e) {\n ZenProperties.logger.log(Logger.FATAL, ByteArrayCache.class, \"instance\", e);\n System.exit(-1);\n }\n return _instance;\n }", "public CellBackup withRevisionDate(long revisionDate) {\n CellRevision newRevision = cellRevision.withRevisionDate(revisionDate);\n if (newRevision == cellRevision) return this;\n return new CellBackup(newRevision, this.techPool, true);\n }", "public abstract void doBackup();", "@Override\n\tpublic KBase newKB() throws RemoteException {\n\t\treturn BnetDistributedKB.create(this);\n\t}", "public abstract ModuleBackups backups();", "public yandex.cloud.api.operation.OperationOuterClass.Operation backup(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.BackupClusterRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getBackupMethod(), getCallOptions(), request);\n }", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "public SecurityManager newBackupBean() {\n return new SecurityManagerAdapter();\n }", "private File createBackupFile() throws IOException {\n File[] listFiles = dbBackupDir.listFiles();\n int length = listFiles.length;\n\n //Delete old copies\n if (length > 2) {\n for (int i = 0; i < length - 2; i++) {\n listFiles[i].delete();\n }\n }\n\n File dbBackup = new File(databaseFolderPath + \"/backup/db\" + time + \".db\");\n if (!dbBackup.exists()) {\n if (!dbBackup.createNewFile()) {\n throw new IOException(\"Cannot create backup file.\");\n }\n\n }\n return dbBackup;\n }", "Instance createInstance();", "public Cell()\n\t{\n\t}", "public yandex.cloud.api.ydb.v1.BackupOuterClass.Backup.Builder getBackupsBuilder(\n int index) {\n return getBackupsFieldBuilder().getBuilder(index);\n }", "private createSingletonDatabase()\n\t{\n\t\tConnection conn = createDatabase();\n\t\tcreateTable();\n\t\tString filename = \"Summer expereince survey 2016 for oliver.csv\"; \n\t\timportData(conn, filename);\n\t}", "void create(T instance) throws IOException;", "BTable createBTable();", "private static void createBackup(Path savegame, Path backups) {\r\n\r\n\t\ttry {\r\n\t\t\t// Copys savegame into backup directory, with an consecutive index \".bckXX\"\r\n\t\t\tFiles.copy(savegame,\r\n\t\t\t\t\tPaths.get(backups.toString() + \"\\\\\" + savegame.getFileName() + \".bck_\"\r\n\t\t\t\t\t\t\t+ new SimpleDateFormat(\"yyyy_MM_dd-HH_mm\").format(new Date())),\r\n\t\t\t\t\tStandardCopyOption.REPLACE_EXISTING);\r\n\t\t\tSystem.out.println(\"Backup Successful...\");\r\n\t\t\tif (backupInterval > 60_000) {\r\n\r\n\t\t\t\tSystem.out.println(\"Next Backup in \" + TimeUnit.MILLISECONDS.toMinutes(backupInterval) + \" Minutes..\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Next Backup in One Minute or less..\");\r\n\t\t\t}\r\n\t\t\tif (maxBackups != -1) {\r\n\t\t\t\tif (backups.toFile().listFiles().length > maxBackups) {\r\n\t\t\t\t\tbackups.toFile().listFiles()[0].delete();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// logBackup(backups);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error while backing up save\");\r\n\t\t\tSystem.out.println(\"Program aborted!\");\r\n\t\t\tprogramRunning = false;\r\n\t\t}\r\n\r\n\t}", "public abstract Instance duplicate();", "com.google.cloud.notebooks.v1beta1.Instance getInstance();", "protected T createNewBean() throws InstantiationException {\n try {\n return beanClass.getConstructor().newInstance();\n } catch (final InstantiationException |\n IllegalAccessException |\n IllegalArgumentException |\n InvocationTargetException |\n NoSuchMethodException |\n SecurityException e) {\n // fold it all into one type of exception\n throw new InstantiationException(e.getMessage());\n }\n }", "static Wallet createInMemoryWallet() {\n return new InMemoryWallet();\n }", "public BackupFSArchiveCopy() {\n super();\n }", "public SavedState createFromParcel(Parcel parcel) {\r\n return new SavedState(parcel, null);\r\n }", "public void InitialiseBackup(int backupSetId)\n\t{\n\t\t\n\t\tthis.backup = new Backup();\n\t\tthis.backupFileHandler = new BackupFileHandler(backup, connection.dalClient);\n\t\tthis.backup.setDatetime(Calendar.getInstance().getTime());\n\t\tthis.backup.setName(this.backupFileHandler.CreateBackupFolder());\n\t\tthis.backup.setIscdp(false);\n\t\tSession session = HibernateUtil.getSessionFactory().getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tthis.backupset = (Backupset)session.get(Backupset.class, backupSetId);\n\t\tthis.backup.setBackupset(this.backupset);\n\t\tthis.backup.setType(this.backupset.getType());\n\t\tthis.backup.setFilepermissions(this.backupset.getFilepermissions());\n\t\tthis.backup.setServerid(Integer.parseInt(Config.getProperty(\"ServerID\")));\n\t\tsession.save(backup);\n\t\tsession.getTransaction().commit();\n\n\t}", "public static JobBuilder newJob() {\n return new JobBuilder();\n }", "public Excel_Reporte_Borrador() {\r\n }", "public WorksheetBuilderImpl() {\n model = new BasicWorksheet();\n }", "private ReplicaInfo createNewReplicaObj(ExtendedBlock block, FsDatasetImpl\n fsDataSetImpl) throws IOException {\n ReplicaInfo replicaInfo = fsDataSetImpl.getReplicaInfo(block);\n FsVolumeSpi destVolume = getDestinationVolume(block, fsDataSetImpl);\n return fsDataSetImpl.copyReplicaToVolume(block, replicaInfo,\n destVolume.obtainReference());\n }", "public static DBMaker openMemory(){\n return new DBMaker();\n }", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> backup(\n yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.BackupClusterRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getBackupMethod(), getCallOptions()), request);\n }", "public static BatteryFragment newInstance() {\n\n Bundle args = new Bundle();\n\n BatteryFragment fragment = new BatteryFragment();\n fragment.setArguments(args);\n return fragment;\n }", "public ReplicationObject() {\n }", "public BackupManager(Context context) {\n this.context = context;\n dbOriginal = context.getDatabasePath(\"library_database.db\");\n databaseFolderPath = dbOriginal.getAbsolutePath().replace(\"library_database.db\", \"\");\n dbBackupDir = new File(databaseFolderPath + \"/backup\");\n\n time = new SimpleDateFormat(\"yyyy-MM-dd_HH:mm:ss\", Locale.getDefault()).format(new Date());\n standardCoverUrl = context.getApplicationInfo().dataDir + \"/files/covers/standard_cover.jpg\";\n }", "public ExcelResultBuilder() {\n }", "private Parameters createCheckpoint() {\n Parameters checkpoint = Parameters.create();\n checkpoint.set(\"lastDoc/identifier\", this.lastAddedDocumentIdentifier);\n checkpoint.set(\"lastDoc/number\", this.lastAddedDocumentNumber);\n checkpoint.set(\"indexBlockCount\", this.indexBlockCount);\n Parameters shards = Parameters.create();\n for (Bin b : this.geometricParts.radixBins.values()) {\n for (String indexPath : b.getBinPaths()) {\n shards.set(indexPath, b.size);\n }\n }\n checkpoint.set(\"shards\", shards);\n return checkpoint;\n }", "public BatchBackingStore createBatchBackingStore(Properties env)\n throws BackingStoreException;", "private synchronized static void createInstance() {\n if (INSTANCE == null) { \n INSTANCE = new DataConnection();\n }\n }", "public static GoldenCopy.Builder builder() {\n return new GoldenCopy.Builder();\n }", "public yandex.cloud.api.ydb.v1.BackupOuterClass.Backup.Builder addBackupsBuilder() {\n return getBackupsFieldBuilder().addBuilder(\n yandex.cloud.api.ydb.v1.BackupOuterClass.Backup.getDefaultInstance());\n }", "public void createSnapshot(){\n \t\tthis.snapshot = new SnapShot(this.getAddress(),this.getRoot() + File.separatorChar + this.snapshot_dir);\n \t\tthis.pRecursiveDelete(this.getRoot() + File.separatorChar + this.snapshot_dir);\n \t\tthis.clearFilelist();\n \n \t\tfor(String str : this.dirRecursiveRel(this.getRoot())){\n \t\t\tthis.pCreateFile(this.getSnapshot().getRoot() + File.separatorChar + str);\n \t\t\tthis.pCopyFile(this.getRoot() + File.separatorChar + str,this.getSnapshot().getRoot() + File.separatorChar + str);\n \t\t\tthis.addFile(str);\n \t\t\tthis.getFilelist().get(str).put(this.getAddress(),this.getFilelist().get(str).get(this.getAddress()) + 1);\n \t\t}\n \t\t\n \t\tthis.storeMetadata(this.getRoot());\n \t}", "public static CommandBrocker getInstance() {\n\t\tif (cb == null) {\n\t\t\tcb = new CommandBrocker();\n\t\t}\n\t\treturn cb;\n\t}", "@Test\n public void testCopy() {\n BuildingWorker worker = new BuildingWorker(\"one\", 1, 2);\n ICell copy = worker.copy();\n\n assertTrue(copy.isWorker());\n\n assertEquals(\"one\", copy.getPlayerName());\n assertEquals(1, copy.getWorkerNumber());\n assertEquals(2, copy.getHeight());\n\n assertNotEquals(worker, copy);\n }", "public abstract Cell createDataCell() throws DailyFollowUpException;", "public ManualBackupInstanceResponse ManualBackupInstance(ManualBackupInstanceRequest req) throws TencentCloudSDKException{\n JsonResponseModel<ManualBackupInstanceResponse> rsp = null;\n try {\n Type type = new TypeToken<JsonResponseModel<ManualBackupInstanceResponse>>() {\n }.getType();\n rsp = gson.fromJson(this.internalRequest(req, \"ManualBackupInstance\"), type);\n } catch (JsonSyntaxException e) {\n throw new TencentCloudSDKException(e.getMessage());\n }\n return rsp.response;\n }", "public Builder setBackups(\n int index, yandex.cloud.api.ydb.v1.BackupOuterClass.Backup value) {\n if (backupsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureBackupsIsMutable();\n backups_.set(index, value);\n onChanged();\n } else {\n backupsBuilder_.setMessage(index, value);\n }\n return this;\n }", "edu.usfca.cs.dfs.StorageMessages.BackUpOrBuilder getBackupOrBuilder();", "public static CellModel buildNewBoard(MainActivity activity) {\r\n if (cellModel == null) {\r\n cellModel = new CellModel();\r\n } else {\r\n cellModel.resetAllCells();\r\n }\r\n Random r = new Random(System.currentTimeMillis());\r\n int filledCells = r.nextInt(15) + 17;\r\n MaskBoardGeneratorTask task = new MaskBoardGeneratorTask(filledCells, activity);\r\n BackgroundTaskManager.getInstance().runTask(task, cellModel);\r\n return cellModel;\r\n }", "MemberCell createMemberCell();", "public Bomb newBomb() {\r\n return new Bomb(id(), position().containingCell(),\r\n Ticks.BOMB_FUSE_TICKS, bombRange);\r\n }", "@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void crearBillboardTest() {\r\n\r\n\t\tpd.crearBillboard();\r\n\t\tpd.pm.deletePersistent(pd.b1);\r\n\t\tpd.pm.deletePersistent(pd.b2);\r\n\t\tpd.pm.deletePersistent(pd.b3);\r\n\t\tpd.pm.deletePersistent(pd.b4);\r\n\r\n\t}", "public Clone() {}", "Parcelle createParcelle();", "public T newInstance();", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public CellEditorProyectGit(){}", "MemoryPartition createMemoryPartition();", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Backup_Label_Heading = new javax.swing.JLabel();\n Backup_Label_Date = new javax.swing.JLabel();\n Backup_Label_Time = new javax.swing.JLabel();\n Backup_TextF_Date = new javax.swing.JTextField();\n Backup_TextF_Time = new javax.swing.JTextField();\n Backup_Label_LastBackup = new javax.swing.JLabel();\n Backup_Label_LastDate = new javax.swing.JLabel();\n Backup_TextF_Path = new javax.swing.JTextField();\n Backup_Label_LastTime = new javax.swing.JLabel();\n Backup_Label_Path = new javax.swing.JLabel();\n Sep_1 = new javax.swing.JSeparator();\n Backup_Btn_Browse = new javax.swing.JButton();\n Backup_Btn_Back = new javax.swing.JButton();\n Backup_Btn_Backup = new javax.swing.JButton();\n\n setBackground(new java.awt.Color(204, 204, 204));\n setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n setPreferredSize(new java.awt.Dimension(1084, 550));\n\n Backup_Label_Heading.setFont(new java.awt.Font(\"SansSerif\", 1, 24)); // NOI18N\n Backup_Label_Heading.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_Heading.setText(\"Backup\");\n\n Backup_Label_Date.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Label_Date.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_Date.setText(\"Date : \");\n\n Backup_Label_Time.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Label_Time.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_Time.setText(\"Time : \");\n\n Backup_TextF_Date.setEditable(false);\n Backup_TextF_Date.setToolTipText(\"Date\");\n\n Backup_TextF_Time.setEditable(false);\n Backup_TextF_Time.setToolTipText(\"Time\");\n\n Backup_Label_LastBackup.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Label_LastBackup.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_LastBackup.setText(\"Last Backup : \");\n\n Backup_Label_LastDate.setFont(new java.awt.Font(\"SansSerif\", 0, 14)); // NOI18N\n Backup_Label_LastDate.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_LastDate.setText(\"Date\");\n Backup_Label_LastDate.setToolTipText(\"Last Backup Date\");\n\n Backup_TextF_Path.setEditable(false);\n Backup_TextF_Path.setToolTipText(\"Backup Path\");\n\n Backup_Label_LastTime.setFont(new java.awt.Font(\"SansSerif\", 0, 14)); // NOI18N\n Backup_Label_LastTime.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_LastTime.setText(\"Time\");\n Backup_Label_LastTime.setToolTipText(\"Last Backup Tme\");\n\n Backup_Label_Path.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Label_Path.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_Path.setText(\"Path : \");\n\n Sep_1.setBackground(new java.awt.Color(204, 204, 204));\n Sep_1.setForeground(new java.awt.Color(153, 153, 153));\n Sep_1.setOrientation(javax.swing.SwingConstants.VERTICAL);\n\n Backup_Btn_Browse.setBackground(new java.awt.Color(204, 204, 204));\n Backup_Btn_Browse.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Btn_Browse.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Btn_Browse.setText(\"Browse\");\n Backup_Btn_Browse.setToolTipText(\"Browse\");\n Backup_Btn_Browse.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n Backup_Btn_Browse.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Backup_Btn_BrowseActionPerformed(evt);\n }\n });\n\n Backup_Btn_Back.setBackground(new java.awt.Color(204, 204, 204));\n Backup_Btn_Back.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Btn_Back.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Btn_Back.setText(\"Back\");\n Backup_Btn_Back.setToolTipText(\"Back\");\n Backup_Btn_Back.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n Backup_Btn_Back.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Backup_Btn_BackActionPerformed(evt);\n }\n });\n\n Backup_Btn_Backup.setBackground(new java.awt.Color(204, 204, 204));\n Backup_Btn_Backup.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Btn_Backup.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Btn_Backup.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/Btn_icon/bacup_2.png\"))); // NOI18N\n Backup_Btn_Backup.setText(\"Backup\");\n Backup_Btn_Backup.setToolTipText(\"Backup\");\n Backup_Btn_Backup.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n Backup_Btn_Backup.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Backup_Btn_BackupActionPerformed(evt);\n }\n });\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(499, 499, 499)\n .addComponent(Backup_Label_Heading))\n .addGroup(layout.createSequentialGroup()\n .addGap(168, 168, 168)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(Backup_Label_Date)\n .addComponent(Backup_Label_Path, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Backup_Label_Time)\n .addComponent(Backup_Label_LastBackup))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Backup_TextF_Date, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Backup_TextF_Time, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(Backup_Label_LastDate, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(Sep_1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(Backup_Label_LastTime, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(Backup_TextF_Path, javax.swing.GroupLayout.PREFERRED_SIZE, 543, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(Backup_Btn_Back, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(Backup_Btn_Backup))\n .addComponent(Backup_Btn_Browse, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))))))\n .addContainerGap(60, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(Backup_Label_Heading)\n .addGap(50, 50, 50)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(Backup_Label_LastTime, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Sep_1)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Backup_Label_LastBackup, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Backup_Label_LastDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGap(18, 18, 18)\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.BASELINE)\n .addComponent(Backup_TextF_Path, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Backup_Label_Path)\n .addComponent(Backup_Btn_Browse, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(Backup_Label_Date))\n .addComponent(Backup_TextF_Date, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Backup_Label_Time)\n .addComponent(Backup_TextF_Time, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 239, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Backup_Btn_Backup)\n .addComponent(Backup_Btn_Back, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(30, 30, 30))\n );\n }", "CellBackup withRenamedIds(IdMapper idMapper, CellName newGroupName) {\n CellRevision newRevision = cellRevision.withRenamedIds(idMapper, newGroupName);\n if (newRevision == cellRevision) return this;\n return new CellBackup(newRevision, this.techPool, true);\n }", "public BackupRestore(String ip){\n\t backupFilename=dateFormat.format(date);\n\t this.repetitiveWork();\n\t log.info(\"Constructor of \"+log.getName()+ \" with only 1 parameter was called\\n\");\n\t deviceIP=ip;\n\t log.info(\"deviceIp set to \"+deviceIP+\"\\n\");\n\t log.info(\"Trying to open \"+DEFAULT_SETTINGS_FILE_LOCATION+\" file ...\\n\");\n\t try{\n\t\t properties.load(new FileInputStream(defaultSettingsFile));\n\t\t log.info(\"File \"+DEFAULT_SETTINGS_FILE_LOCATION+\" opened successfully :)\\n\");\n\t\t /*Initializing parameter from the file defaultSettings.properties*/\n\t\t log.info(\"Initializing parameter from the file defaultSettings.properties\\n\");\n\t\t FETCHING_DATA_VIA_DATABASE=Boolean.parseBoolean(properties.getProperty(\"viaDatabase\").toLowerCase());\n\t\t if(FETCHING_DATA_VIA_DATABASE){\n\t\t log.info(\"Method of fetching data is via database\");\n\t\t this.connectToDb();\n\t\t this.dbConnector();\n\t\t }\n\t\t else{\n\t\t\t log.info(\"Method of fetching data is via files\");\n\t\t\t if(properties.getProperty(\"connectionType\").toUpperCase().equals(\"TELNET\"))\n\t\t connectionType=ConnectionType.TELNET;\n\t\t\t else\n\t\t\t\tconnectionType=ConnectionType.SSH;\n\t\t log.info(\"Setting the default connection type as \"+connectionType);\n\t\t backupServerName=properties.getProperty(\"backupServerName\");\n\t\t log.info(\"backupServerName set to its default value \"+backupServerName+\"\\n\");\n\t\t backupServerIP=properties.getProperty(\"backupServerIP\");\n\t\t log.info(\"backupServerIP set to its default value \"+backupServerIP+\"\\n\");\n\t\t backupServerPassword=properties.getProperty(\"backupServerPassword\");\n\t\t log.info(\"backupServerPassword set to its default value \"+\"******\"+\"\\n\");\n\t\t backupServerFolderLocation=properties.getProperty(\"backupServerFolderLocation\");\n\t\t log.info(\"backupServerFolderLoaction set to its default value \"+backupServerFolderLocation+\"\\n\");\n\t\t if(properties.getProperty(\"backupServerType\").toLowerCase().equals(\"scp\"))\n\t\t backupServerType=BackupServerType.scp;\n\t\t else\n\t\t \t backupServerType=BackupServerType.tftp;\n\t\t log.info(\"backupServerType set to its default value \"+backupServerType+\"\\n\");\n\t\t if(properties.getProperty(\"deviceType\").toUpperCase().equals(\"CISCO\"))\n\t\t deviceType=RouterType.CISCO;\n\t\t else\n\t\t \t deviceType=RouterType.JUNIPER;\n\t\t log.info(\"deviceType set to its default value \"+deviceType+\"\\n\");\n\t\t deviceName=properties.getProperty(\"deviceUsername\");\n\t\t log.info(\"INFO:\"+dateFormat.format(date)+\"] \"+\"device user name set to its default value \"+deviceName+\"\\n\");\n\t\t devicePassword=properties.getProperty(\"devicePassword\"); \n\t\t log.info(\"devicePassword set to its default value \"+\"******\"+\"\\n\");\n\t\t deviceEnPassword=properties.getProperty(\"devieEnablePassword\");\n\t\t log.info(\"deviceEnablePassword set to its default value \"+\"******\"+\"\\n\");\n\t\t }\n\t }catch(Exception e){\n\t\t log.error(\"File \"+DEFAULT_SETTINGS_FILE_LOCATION+\" was not found!!\\n\");\n\t }\n }", "Excel getExcelInst();", "@Override\n\tpublic KBase createKB() {\n\t\treturn BnetDistributedKB.create(this);\n\t}", "public Builder setBackup(edu.usfca.cs.dfs.StorageMessages.BackUp value) {\n if (backupBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n msg_ = value;\n onChanged();\n } else {\n backupBuilder_.setMessage(value);\n }\n msgCase_ = 10;\n return this;\n }", "public Excel(Workbook workbook){\n this.workbook = workbook;\n isValid = false;\n initialized = false;\n }", "yandex.cloud.api.ydb.v1.BackupOuterClass.Backup getBackups(int index);", "public DBObject createNew() {\n DBObjectImpl obj = (DBObjectImpl) getNewObject();\n obj.DELETE_STMT_STR = DELETE_STMT_STR;\n obj.INSERT_STMT_STR = INSERT_STMT_STR;\n obj.UPDATE_STMT_STR = UPDATE_STMT_STR;\n obj.QUERY_STMT_STR = QUERY_STMT_STR;\n\n return obj;\n }", "public CsclAppointeeMaster create(long id_);", "public static void copyConstructor(){\n\t}", "public static Builder create(){\n return new Builder(Tribit.ZERO);\n }", "@Override\n\tpublic ModIndexedInstance createNewInstance() {\n\t\tModIndexedInstance newInst = new ModIndexedInstance(); // create the new instance\n\t\tnewInst.setRegComp(this); // set component type of new instance\n\t\taddInstanceOf(newInst); // add instance to list for this comp\n\t\treturn newInst;\n\t}", "public XL() {\n Reporter.log(\"New XL ctor\", true);\n }", "TableInstance createTableInstance();", "public BinaryContent createClone(BinaryContent t)\r\n\t{\n\t\treturn null;\r\n\t}", "public static DummyBuilder fromInstance(Object instance) {\n return new DummyBuilder(instance);\n }", "Snapshot create(Context context);", "public BinPackingAllocAlgorithm(VMCwMProblem instance) {\n super(instance);\n this.mappings = this.instance.getMappings();\n this.max_mig_percentile = this.instance.getMaxMigrationPercentile();\n this.pm_heap = buildPhysicalMachineHeap(this.instance.getPhysicalMachines(),\n this.mappings);\n this.vm_array = new VirtualMachine[this.instance.getVirtualMachines().size()];\n this.instance.getVirtualMachines().copyTo(this.vm_array);\n }", "public CellBackup with(ImmutableCell d,\n ImmutableNodeInst[] nodesArray, ImmutableArcInst[] arcsArray, ImmutableExport[] exportsArray,\n TechPool superPool) {\n CellRevision newRevision = cellRevision.with(d, nodesArray, arcsArray, exportsArray);\n TechPool restrictedPool = superPool.restrict(newRevision.techUsages, techPool);\n if (newRevision == cellRevision && restrictedPool == techPool) return this;\n if (arcsArray != null) {\n for (ImmutableArcInst a: arcsArray) {\n if (a != null && !a.check(restrictedPool))\n throw new IllegalArgumentException(\"arc \" + a.name + \" is not compatible with TechPool\");\n }\n }\n return new CellBackup(newRevision, restrictedPool, modified || newRevision != cellRevision);\n }" ]
[ "0.64367115", "0.6017605", "0.5985853", "0.59154814", "0.5756277", "0.54724705", "0.5445727", "0.53970873", "0.5302568", "0.5231002", "0.521997", "0.5210545", "0.5187615", "0.5175822", "0.5149038", "0.5035004", "0.5024127", "0.50082827", "0.498169", "0.4944441", "0.4937502", "0.49315268", "0.49179733", "0.49005422", "0.4880749", "0.48771837", "0.48717365", "0.48432392", "0.48242396", "0.47876754", "0.47874308", "0.47848895", "0.47773215", "0.47726357", "0.47517", "0.47467354", "0.47321397", "0.47298405", "0.47242934", "0.47067833", "0.47058812", "0.47030637", "0.4698437", "0.46672574", "0.46633753", "0.4658097", "0.4654395", "0.46542242", "0.46516424", "0.4644956", "0.46412998", "0.46382046", "0.46366367", "0.46340856", "0.46311012", "0.46299675", "0.46258518", "0.46182188", "0.46058625", "0.4595713", "0.45952746", "0.45948932", "0.45888656", "0.45803878", "0.45724264", "0.4571528", "0.4570502", "0.45534953", "0.45528665", "0.45528665", "0.4548095", "0.4548095", "0.4548095", "0.4548095", "0.4540064", "0.4539571", "0.45281753", "0.45281753", "0.45281753", "0.45281753", "0.45215845", "0.45176944", "0.4506203", "0.45002717", "0.44958088", "0.44924495", "0.44908655", "0.44875652", "0.4473639", "0.44722766", "0.44708353", "0.44684362", "0.44621623", "0.44505122", "0.4446764", "0.44463474", "0.44449782", "0.4443672", "0.444323", "0.44410264" ]
0.63274944
1
Creates a new instance of CellBackup
public static CellBackup newInstance(ImmutableCell d, TechPool techPool) { if (d.cellId.idManager != techPool.idManager) throw new IllegalArgumentException(); if (techPool.getTech(d.techId) == null) throw new IllegalArgumentException(); CellRevision cellRevision = new CellRevision(d); TechPool restrictedPool = techPool.restrict(cellRevision.techUsages, techPool); return new CellBackup(cellRevision, restrictedPool, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private CellBackup(CellRevision cellRevision, TechPool techPool, boolean modified) {\n this.cellRevision = cellRevision;\n this.techPool = techPool;\n this.modified = modified;\n cellBackupsCreated++;\n if (Job.getDebug())\n check();\n }", "public CellBackup withoutModified() {\n if (!this.modified) return this;\n return new CellBackup(this.cellRevision, this.techPool, false);\n }", "public Backup() {\n initComponents();\n selecionarOpcoesDeBackup();\n }", "public Backup() {\n initComponents();\n }", "public DriverConfig createBackupDriver()\n {\n DriverConfig driver = new DriverConfig(this);\n \n _backupDriverList.add(driver);\n \n return driver;\n }", "protected Backup()\n {\n m_buffer_ = new StringBuffer();\n }", "Snapshot create();", "public TelaFazBackup() {\n initComponents();\n }", "@Test\n\tpublic void backupTest1() {\n\t\tMainPanel m = new MainPanel(15);\n\t\tCell[][] _cells = new Cell[15][15];\n\t\tfor(int i = 0; i < 15; i++) {\n\t\t\tfor(int j = 0; j < 15; j++) {\n\t\t\t _cells[i][j] = new Cell(false);\n\t\t\t}\n\t\t}\t\n\t\tm.backup1();\t\n\t\tassertEquals(m._backupCells[14][14].getAlive(), _cells[14][14].getAlive());\n\t}", "public Cell(){}", "public static void main_backup(){\n try {\n tableClone = (HiringTable) table.clone();\n System.out.println(\"Successfully created backup.\");\n } catch (CloneNotSupportedException ex){\n System.out.println(\"Clone not successful.\");\n main_menu();\n }\n }", "public edu.usfca.cs.dfs.StorageMessages.BackUp.Builder getBackupBuilder() {\n return getBackupFieldBuilder().getBuilder();\n }", "static CellBackup read(IdReader reader, TechPool techPool) throws IOException {\n CellRevision newRevision = CellRevision.read(reader);\n boolean modified = reader.readBoolean();\n TechPool restrictedPool = techPool.restrict(newRevision.techUsages, techPool);\n return new CellBackup(newRevision, restrictedPool, modified);\n }", "edu.usfca.cs.dfs.StorageMessages.BackUp getBackup();", "public abstract ICloudBackup getBackupImpl();", "public NotebookCell() {}", "public static ByteArrayCache instance() {\n if (_instance == null) try {\n _instance = (ByteArrayCache) ImmortalMemory.instance().newInstance( ByteArrayCache.class);\n ZenProperties.logger.log(Logger.INFO, ByteArrayCache.class, \"instance\", \"ByteArrayCache created\");\n } catch (Exception e) {\n ZenProperties.logger.log(Logger.FATAL, ByteArrayCache.class, \"instance\", e);\n System.exit(-1);\n }\n return _instance;\n }", "public CellBackup withRevisionDate(long revisionDate) {\n CellRevision newRevision = cellRevision.withRevisionDate(revisionDate);\n if (newRevision == cellRevision) return this;\n return new CellBackup(newRevision, this.techPool, true);\n }", "public abstract void doBackup();", "@Override\n\tpublic KBase newKB() throws RemoteException {\n\t\treturn BnetDistributedKB.create(this);\n\t}", "public abstract ModuleBackups backups();", "public yandex.cloud.api.operation.OperationOuterClass.Operation backup(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.BackupClusterRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getBackupMethod(), getCallOptions(), request);\n }", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "public SecurityManager newBackupBean() {\n return new SecurityManagerAdapter();\n }", "private File createBackupFile() throws IOException {\n File[] listFiles = dbBackupDir.listFiles();\n int length = listFiles.length;\n\n //Delete old copies\n if (length > 2) {\n for (int i = 0; i < length - 2; i++) {\n listFiles[i].delete();\n }\n }\n\n File dbBackup = new File(databaseFolderPath + \"/backup/db\" + time + \".db\");\n if (!dbBackup.exists()) {\n if (!dbBackup.createNewFile()) {\n throw new IOException(\"Cannot create backup file.\");\n }\n\n }\n return dbBackup;\n }", "Instance createInstance();", "public Cell()\n\t{\n\t}", "public yandex.cloud.api.ydb.v1.BackupOuterClass.Backup.Builder getBackupsBuilder(\n int index) {\n return getBackupsFieldBuilder().getBuilder(index);\n }", "private createSingletonDatabase()\n\t{\n\t\tConnection conn = createDatabase();\n\t\tcreateTable();\n\t\tString filename = \"Summer expereince survey 2016 for oliver.csv\"; \n\t\timportData(conn, filename);\n\t}", "void create(T instance) throws IOException;", "BTable createBTable();", "private static void createBackup(Path savegame, Path backups) {\r\n\r\n\t\ttry {\r\n\t\t\t// Copys savegame into backup directory, with an consecutive index \".bckXX\"\r\n\t\t\tFiles.copy(savegame,\r\n\t\t\t\t\tPaths.get(backups.toString() + \"\\\\\" + savegame.getFileName() + \".bck_\"\r\n\t\t\t\t\t\t\t+ new SimpleDateFormat(\"yyyy_MM_dd-HH_mm\").format(new Date())),\r\n\t\t\t\t\tStandardCopyOption.REPLACE_EXISTING);\r\n\t\t\tSystem.out.println(\"Backup Successful...\");\r\n\t\t\tif (backupInterval > 60_000) {\r\n\r\n\t\t\t\tSystem.out.println(\"Next Backup in \" + TimeUnit.MILLISECONDS.toMinutes(backupInterval) + \" Minutes..\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Next Backup in One Minute or less..\");\r\n\t\t\t}\r\n\t\t\tif (maxBackups != -1) {\r\n\t\t\t\tif (backups.toFile().listFiles().length > maxBackups) {\r\n\t\t\t\t\tbackups.toFile().listFiles()[0].delete();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// logBackup(backups);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error while backing up save\");\r\n\t\t\tSystem.out.println(\"Program aborted!\");\r\n\t\t\tprogramRunning = false;\r\n\t\t}\r\n\r\n\t}", "public abstract Instance duplicate();", "com.google.cloud.notebooks.v1beta1.Instance getInstance();", "protected T createNewBean() throws InstantiationException {\n try {\n return beanClass.getConstructor().newInstance();\n } catch (final InstantiationException |\n IllegalAccessException |\n IllegalArgumentException |\n InvocationTargetException |\n NoSuchMethodException |\n SecurityException e) {\n // fold it all into one type of exception\n throw new InstantiationException(e.getMessage());\n }\n }", "static Wallet createInMemoryWallet() {\n return new InMemoryWallet();\n }", "public BackupFSArchiveCopy() {\n super();\n }", "public SavedState createFromParcel(Parcel parcel) {\r\n return new SavedState(parcel, null);\r\n }", "public void InitialiseBackup(int backupSetId)\n\t{\n\t\t\n\t\tthis.backup = new Backup();\n\t\tthis.backupFileHandler = new BackupFileHandler(backup, connection.dalClient);\n\t\tthis.backup.setDatetime(Calendar.getInstance().getTime());\n\t\tthis.backup.setName(this.backupFileHandler.CreateBackupFolder());\n\t\tthis.backup.setIscdp(false);\n\t\tSession session = HibernateUtil.getSessionFactory().getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tthis.backupset = (Backupset)session.get(Backupset.class, backupSetId);\n\t\tthis.backup.setBackupset(this.backupset);\n\t\tthis.backup.setType(this.backupset.getType());\n\t\tthis.backup.setFilepermissions(this.backupset.getFilepermissions());\n\t\tthis.backup.setServerid(Integer.parseInt(Config.getProperty(\"ServerID\")));\n\t\tsession.save(backup);\n\t\tsession.getTransaction().commit();\n\n\t}", "public static JobBuilder newJob() {\n return new JobBuilder();\n }", "public Excel_Reporte_Borrador() {\r\n }", "public WorksheetBuilderImpl() {\n model = new BasicWorksheet();\n }", "private ReplicaInfo createNewReplicaObj(ExtendedBlock block, FsDatasetImpl\n fsDataSetImpl) throws IOException {\n ReplicaInfo replicaInfo = fsDataSetImpl.getReplicaInfo(block);\n FsVolumeSpi destVolume = getDestinationVolume(block, fsDataSetImpl);\n return fsDataSetImpl.copyReplicaToVolume(block, replicaInfo,\n destVolume.obtainReference());\n }", "public static DBMaker openMemory(){\n return new DBMaker();\n }", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> backup(\n yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.BackupClusterRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getBackupMethod(), getCallOptions()), request);\n }", "public static BatteryFragment newInstance() {\n\n Bundle args = new Bundle();\n\n BatteryFragment fragment = new BatteryFragment();\n fragment.setArguments(args);\n return fragment;\n }", "public ReplicationObject() {\n }", "public BackupManager(Context context) {\n this.context = context;\n dbOriginal = context.getDatabasePath(\"library_database.db\");\n databaseFolderPath = dbOriginal.getAbsolutePath().replace(\"library_database.db\", \"\");\n dbBackupDir = new File(databaseFolderPath + \"/backup\");\n\n time = new SimpleDateFormat(\"yyyy-MM-dd_HH:mm:ss\", Locale.getDefault()).format(new Date());\n standardCoverUrl = context.getApplicationInfo().dataDir + \"/files/covers/standard_cover.jpg\";\n }", "public ExcelResultBuilder() {\n }", "private Parameters createCheckpoint() {\n Parameters checkpoint = Parameters.create();\n checkpoint.set(\"lastDoc/identifier\", this.lastAddedDocumentIdentifier);\n checkpoint.set(\"lastDoc/number\", this.lastAddedDocumentNumber);\n checkpoint.set(\"indexBlockCount\", this.indexBlockCount);\n Parameters shards = Parameters.create();\n for (Bin b : this.geometricParts.radixBins.values()) {\n for (String indexPath : b.getBinPaths()) {\n shards.set(indexPath, b.size);\n }\n }\n checkpoint.set(\"shards\", shards);\n return checkpoint;\n }", "public BatchBackingStore createBatchBackingStore(Properties env)\n throws BackingStoreException;", "private synchronized static void createInstance() {\n if (INSTANCE == null) { \n INSTANCE = new DataConnection();\n }\n }", "public static GoldenCopy.Builder builder() {\n return new GoldenCopy.Builder();\n }", "public yandex.cloud.api.ydb.v1.BackupOuterClass.Backup.Builder addBackupsBuilder() {\n return getBackupsFieldBuilder().addBuilder(\n yandex.cloud.api.ydb.v1.BackupOuterClass.Backup.getDefaultInstance());\n }", "public void createSnapshot(){\n \t\tthis.snapshot = new SnapShot(this.getAddress(),this.getRoot() + File.separatorChar + this.snapshot_dir);\n \t\tthis.pRecursiveDelete(this.getRoot() + File.separatorChar + this.snapshot_dir);\n \t\tthis.clearFilelist();\n \n \t\tfor(String str : this.dirRecursiveRel(this.getRoot())){\n \t\t\tthis.pCreateFile(this.getSnapshot().getRoot() + File.separatorChar + str);\n \t\t\tthis.pCopyFile(this.getRoot() + File.separatorChar + str,this.getSnapshot().getRoot() + File.separatorChar + str);\n \t\t\tthis.addFile(str);\n \t\t\tthis.getFilelist().get(str).put(this.getAddress(),this.getFilelist().get(str).get(this.getAddress()) + 1);\n \t\t}\n \t\t\n \t\tthis.storeMetadata(this.getRoot());\n \t}", "public static CommandBrocker getInstance() {\n\t\tif (cb == null) {\n\t\t\tcb = new CommandBrocker();\n\t\t}\n\t\treturn cb;\n\t}", "@Test\n public void testCopy() {\n BuildingWorker worker = new BuildingWorker(\"one\", 1, 2);\n ICell copy = worker.copy();\n\n assertTrue(copy.isWorker());\n\n assertEquals(\"one\", copy.getPlayerName());\n assertEquals(1, copy.getWorkerNumber());\n assertEquals(2, copy.getHeight());\n\n assertNotEquals(worker, copy);\n }", "public abstract Cell createDataCell() throws DailyFollowUpException;", "public ManualBackupInstanceResponse ManualBackupInstance(ManualBackupInstanceRequest req) throws TencentCloudSDKException{\n JsonResponseModel<ManualBackupInstanceResponse> rsp = null;\n try {\n Type type = new TypeToken<JsonResponseModel<ManualBackupInstanceResponse>>() {\n }.getType();\n rsp = gson.fromJson(this.internalRequest(req, \"ManualBackupInstance\"), type);\n } catch (JsonSyntaxException e) {\n throw new TencentCloudSDKException(e.getMessage());\n }\n return rsp.response;\n }", "public Builder setBackups(\n int index, yandex.cloud.api.ydb.v1.BackupOuterClass.Backup value) {\n if (backupsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureBackupsIsMutable();\n backups_.set(index, value);\n onChanged();\n } else {\n backupsBuilder_.setMessage(index, value);\n }\n return this;\n }", "edu.usfca.cs.dfs.StorageMessages.BackUpOrBuilder getBackupOrBuilder();", "public static CellModel buildNewBoard(MainActivity activity) {\r\n if (cellModel == null) {\r\n cellModel = new CellModel();\r\n } else {\r\n cellModel.resetAllCells();\r\n }\r\n Random r = new Random(System.currentTimeMillis());\r\n int filledCells = r.nextInt(15) + 17;\r\n MaskBoardGeneratorTask task = new MaskBoardGeneratorTask(filledCells, activity);\r\n BackgroundTaskManager.getInstance().runTask(task, cellModel);\r\n return cellModel;\r\n }", "MemberCell createMemberCell();", "public Bomb newBomb() {\r\n return new Bomb(id(), position().containingCell(),\r\n Ticks.BOMB_FUSE_TICKS, bombRange);\r\n }", "@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void crearBillboardTest() {\r\n\r\n\t\tpd.crearBillboard();\r\n\t\tpd.pm.deletePersistent(pd.b1);\r\n\t\tpd.pm.deletePersistent(pd.b2);\r\n\t\tpd.pm.deletePersistent(pd.b3);\r\n\t\tpd.pm.deletePersistent(pd.b4);\r\n\r\n\t}", "public Clone() {}", "Parcelle createParcelle();", "public T newInstance();", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public CellEditorProyectGit(){}", "MemoryPartition createMemoryPartition();", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Backup_Label_Heading = new javax.swing.JLabel();\n Backup_Label_Date = new javax.swing.JLabel();\n Backup_Label_Time = new javax.swing.JLabel();\n Backup_TextF_Date = new javax.swing.JTextField();\n Backup_TextF_Time = new javax.swing.JTextField();\n Backup_Label_LastBackup = new javax.swing.JLabel();\n Backup_Label_LastDate = new javax.swing.JLabel();\n Backup_TextF_Path = new javax.swing.JTextField();\n Backup_Label_LastTime = new javax.swing.JLabel();\n Backup_Label_Path = new javax.swing.JLabel();\n Sep_1 = new javax.swing.JSeparator();\n Backup_Btn_Browse = new javax.swing.JButton();\n Backup_Btn_Back = new javax.swing.JButton();\n Backup_Btn_Backup = new javax.swing.JButton();\n\n setBackground(new java.awt.Color(204, 204, 204));\n setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n setPreferredSize(new java.awt.Dimension(1084, 550));\n\n Backup_Label_Heading.setFont(new java.awt.Font(\"SansSerif\", 1, 24)); // NOI18N\n Backup_Label_Heading.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_Heading.setText(\"Backup\");\n\n Backup_Label_Date.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Label_Date.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_Date.setText(\"Date : \");\n\n Backup_Label_Time.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Label_Time.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_Time.setText(\"Time : \");\n\n Backup_TextF_Date.setEditable(false);\n Backup_TextF_Date.setToolTipText(\"Date\");\n\n Backup_TextF_Time.setEditable(false);\n Backup_TextF_Time.setToolTipText(\"Time\");\n\n Backup_Label_LastBackup.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Label_LastBackup.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_LastBackup.setText(\"Last Backup : \");\n\n Backup_Label_LastDate.setFont(new java.awt.Font(\"SansSerif\", 0, 14)); // NOI18N\n Backup_Label_LastDate.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_LastDate.setText(\"Date\");\n Backup_Label_LastDate.setToolTipText(\"Last Backup Date\");\n\n Backup_TextF_Path.setEditable(false);\n Backup_TextF_Path.setToolTipText(\"Backup Path\");\n\n Backup_Label_LastTime.setFont(new java.awt.Font(\"SansSerif\", 0, 14)); // NOI18N\n Backup_Label_LastTime.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_LastTime.setText(\"Time\");\n Backup_Label_LastTime.setToolTipText(\"Last Backup Tme\");\n\n Backup_Label_Path.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Label_Path.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_Path.setText(\"Path : \");\n\n Sep_1.setBackground(new java.awt.Color(204, 204, 204));\n Sep_1.setForeground(new java.awt.Color(153, 153, 153));\n Sep_1.setOrientation(javax.swing.SwingConstants.VERTICAL);\n\n Backup_Btn_Browse.setBackground(new java.awt.Color(204, 204, 204));\n Backup_Btn_Browse.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Btn_Browse.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Btn_Browse.setText(\"Browse\");\n Backup_Btn_Browse.setToolTipText(\"Browse\");\n Backup_Btn_Browse.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n Backup_Btn_Browse.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Backup_Btn_BrowseActionPerformed(evt);\n }\n });\n\n Backup_Btn_Back.setBackground(new java.awt.Color(204, 204, 204));\n Backup_Btn_Back.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Btn_Back.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Btn_Back.setText(\"Back\");\n Backup_Btn_Back.setToolTipText(\"Back\");\n Backup_Btn_Back.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n Backup_Btn_Back.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Backup_Btn_BackActionPerformed(evt);\n }\n });\n\n Backup_Btn_Backup.setBackground(new java.awt.Color(204, 204, 204));\n Backup_Btn_Backup.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Btn_Backup.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Btn_Backup.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/Btn_icon/bacup_2.png\"))); // NOI18N\n Backup_Btn_Backup.setText(\"Backup\");\n Backup_Btn_Backup.setToolTipText(\"Backup\");\n Backup_Btn_Backup.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n Backup_Btn_Backup.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Backup_Btn_BackupActionPerformed(evt);\n }\n });\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(499, 499, 499)\n .addComponent(Backup_Label_Heading))\n .addGroup(layout.createSequentialGroup()\n .addGap(168, 168, 168)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(Backup_Label_Date)\n .addComponent(Backup_Label_Path, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Backup_Label_Time)\n .addComponent(Backup_Label_LastBackup))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Backup_TextF_Date, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Backup_TextF_Time, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(Backup_Label_LastDate, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(Sep_1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(Backup_Label_LastTime, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(Backup_TextF_Path, javax.swing.GroupLayout.PREFERRED_SIZE, 543, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(Backup_Btn_Back, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(Backup_Btn_Backup))\n .addComponent(Backup_Btn_Browse, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))))))\n .addContainerGap(60, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(Backup_Label_Heading)\n .addGap(50, 50, 50)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(Backup_Label_LastTime, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Sep_1)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Backup_Label_LastBackup, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Backup_Label_LastDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGap(18, 18, 18)\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.BASELINE)\n .addComponent(Backup_TextF_Path, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Backup_Label_Path)\n .addComponent(Backup_Btn_Browse, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(Backup_Label_Date))\n .addComponent(Backup_TextF_Date, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Backup_Label_Time)\n .addComponent(Backup_TextF_Time, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 239, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Backup_Btn_Backup)\n .addComponent(Backup_Btn_Back, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(30, 30, 30))\n );\n }", "CellBackup withRenamedIds(IdMapper idMapper, CellName newGroupName) {\n CellRevision newRevision = cellRevision.withRenamedIds(idMapper, newGroupName);\n if (newRevision == cellRevision) return this;\n return new CellBackup(newRevision, this.techPool, true);\n }", "public BackupRestore(String ip){\n\t backupFilename=dateFormat.format(date);\n\t this.repetitiveWork();\n\t log.info(\"Constructor of \"+log.getName()+ \" with only 1 parameter was called\\n\");\n\t deviceIP=ip;\n\t log.info(\"deviceIp set to \"+deviceIP+\"\\n\");\n\t log.info(\"Trying to open \"+DEFAULT_SETTINGS_FILE_LOCATION+\" file ...\\n\");\n\t try{\n\t\t properties.load(new FileInputStream(defaultSettingsFile));\n\t\t log.info(\"File \"+DEFAULT_SETTINGS_FILE_LOCATION+\" opened successfully :)\\n\");\n\t\t /*Initializing parameter from the file defaultSettings.properties*/\n\t\t log.info(\"Initializing parameter from the file defaultSettings.properties\\n\");\n\t\t FETCHING_DATA_VIA_DATABASE=Boolean.parseBoolean(properties.getProperty(\"viaDatabase\").toLowerCase());\n\t\t if(FETCHING_DATA_VIA_DATABASE){\n\t\t log.info(\"Method of fetching data is via database\");\n\t\t this.connectToDb();\n\t\t this.dbConnector();\n\t\t }\n\t\t else{\n\t\t\t log.info(\"Method of fetching data is via files\");\n\t\t\t if(properties.getProperty(\"connectionType\").toUpperCase().equals(\"TELNET\"))\n\t\t connectionType=ConnectionType.TELNET;\n\t\t\t else\n\t\t\t\tconnectionType=ConnectionType.SSH;\n\t\t log.info(\"Setting the default connection type as \"+connectionType);\n\t\t backupServerName=properties.getProperty(\"backupServerName\");\n\t\t log.info(\"backupServerName set to its default value \"+backupServerName+\"\\n\");\n\t\t backupServerIP=properties.getProperty(\"backupServerIP\");\n\t\t log.info(\"backupServerIP set to its default value \"+backupServerIP+\"\\n\");\n\t\t backupServerPassword=properties.getProperty(\"backupServerPassword\");\n\t\t log.info(\"backupServerPassword set to its default value \"+\"******\"+\"\\n\");\n\t\t backupServerFolderLocation=properties.getProperty(\"backupServerFolderLocation\");\n\t\t log.info(\"backupServerFolderLoaction set to its default value \"+backupServerFolderLocation+\"\\n\");\n\t\t if(properties.getProperty(\"backupServerType\").toLowerCase().equals(\"scp\"))\n\t\t backupServerType=BackupServerType.scp;\n\t\t else\n\t\t \t backupServerType=BackupServerType.tftp;\n\t\t log.info(\"backupServerType set to its default value \"+backupServerType+\"\\n\");\n\t\t if(properties.getProperty(\"deviceType\").toUpperCase().equals(\"CISCO\"))\n\t\t deviceType=RouterType.CISCO;\n\t\t else\n\t\t \t deviceType=RouterType.JUNIPER;\n\t\t log.info(\"deviceType set to its default value \"+deviceType+\"\\n\");\n\t\t deviceName=properties.getProperty(\"deviceUsername\");\n\t\t log.info(\"INFO:\"+dateFormat.format(date)+\"] \"+\"device user name set to its default value \"+deviceName+\"\\n\");\n\t\t devicePassword=properties.getProperty(\"devicePassword\"); \n\t\t log.info(\"devicePassword set to its default value \"+\"******\"+\"\\n\");\n\t\t deviceEnPassword=properties.getProperty(\"devieEnablePassword\");\n\t\t log.info(\"deviceEnablePassword set to its default value \"+\"******\"+\"\\n\");\n\t\t }\n\t }catch(Exception e){\n\t\t log.error(\"File \"+DEFAULT_SETTINGS_FILE_LOCATION+\" was not found!!\\n\");\n\t }\n }", "Excel getExcelInst();", "@Override\n\tpublic KBase createKB() {\n\t\treturn BnetDistributedKB.create(this);\n\t}", "public Builder setBackup(edu.usfca.cs.dfs.StorageMessages.BackUp value) {\n if (backupBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n msg_ = value;\n onChanged();\n } else {\n backupBuilder_.setMessage(value);\n }\n msgCase_ = 10;\n return this;\n }", "public Excel(Workbook workbook){\n this.workbook = workbook;\n isValid = false;\n initialized = false;\n }", "yandex.cloud.api.ydb.v1.BackupOuterClass.Backup getBackups(int index);", "public DBObject createNew() {\n DBObjectImpl obj = (DBObjectImpl) getNewObject();\n obj.DELETE_STMT_STR = DELETE_STMT_STR;\n obj.INSERT_STMT_STR = INSERT_STMT_STR;\n obj.UPDATE_STMT_STR = UPDATE_STMT_STR;\n obj.QUERY_STMT_STR = QUERY_STMT_STR;\n\n return obj;\n }", "public CsclAppointeeMaster create(long id_);", "public static void copyConstructor(){\n\t}", "public static Builder create(){\n return new Builder(Tribit.ZERO);\n }", "@Override\n\tpublic ModIndexedInstance createNewInstance() {\n\t\tModIndexedInstance newInst = new ModIndexedInstance(); // create the new instance\n\t\tnewInst.setRegComp(this); // set component type of new instance\n\t\taddInstanceOf(newInst); // add instance to list for this comp\n\t\treturn newInst;\n\t}", "public XL() {\n Reporter.log(\"New XL ctor\", true);\n }", "TableInstance createTableInstance();", "public BinaryContent createClone(BinaryContent t)\r\n\t{\n\t\treturn null;\r\n\t}", "public static DummyBuilder fromInstance(Object instance) {\n return new DummyBuilder(instance);\n }", "Snapshot create(Context context);", "public BinPackingAllocAlgorithm(VMCwMProblem instance) {\n super(instance);\n this.mappings = this.instance.getMappings();\n this.max_mig_percentile = this.instance.getMaxMigrationPercentile();\n this.pm_heap = buildPhysicalMachineHeap(this.instance.getPhysicalMachines(),\n this.mappings);\n this.vm_array = new VirtualMachine[this.instance.getVirtualMachines().size()];\n this.instance.getVirtualMachines().copyTo(this.vm_array);\n }", "public CellBackup with(ImmutableCell d,\n ImmutableNodeInst[] nodesArray, ImmutableArcInst[] arcsArray, ImmutableExport[] exportsArray,\n TechPool superPool) {\n CellRevision newRevision = cellRevision.with(d, nodesArray, arcsArray, exportsArray);\n TechPool restrictedPool = superPool.restrict(newRevision.techUsages, techPool);\n if (newRevision == cellRevision && restrictedPool == techPool) return this;\n if (arcsArray != null) {\n for (ImmutableArcInst a: arcsArray) {\n if (a != null && !a.check(restrictedPool))\n throw new IllegalArgumentException(\"arc \" + a.name + \" is not compatible with TechPool\");\n }\n }\n return new CellBackup(newRevision, restrictedPool, modified || newRevision != cellRevision);\n }" ]
[ "0.63274944", "0.6017605", "0.5985853", "0.59154814", "0.5756277", "0.54724705", "0.5445727", "0.53970873", "0.5302568", "0.5231002", "0.521997", "0.5210545", "0.5187615", "0.5175822", "0.5149038", "0.5035004", "0.5024127", "0.50082827", "0.498169", "0.4944441", "0.4937502", "0.49315268", "0.49179733", "0.49005422", "0.4880749", "0.48771837", "0.48717365", "0.48432392", "0.48242396", "0.47876754", "0.47874308", "0.47848895", "0.47773215", "0.47726357", "0.47517", "0.47467354", "0.47321397", "0.47298405", "0.47242934", "0.47067833", "0.47058812", "0.47030637", "0.4698437", "0.46672574", "0.46633753", "0.4658097", "0.4654395", "0.46542242", "0.46516424", "0.4644956", "0.46412998", "0.46382046", "0.46366367", "0.46340856", "0.46311012", "0.46299675", "0.46258518", "0.46182188", "0.46058625", "0.4595713", "0.45952746", "0.45948932", "0.45888656", "0.45803878", "0.45724264", "0.4571528", "0.4570502", "0.45534953", "0.45528665", "0.45528665", "0.4548095", "0.4548095", "0.4548095", "0.4548095", "0.4540064", "0.4539571", "0.45281753", "0.45281753", "0.45281753", "0.45281753", "0.45215845", "0.45176944", "0.4506203", "0.45002717", "0.44958088", "0.44924495", "0.44908655", "0.44875652", "0.4473639", "0.44722766", "0.44708353", "0.44684362", "0.44621623", "0.44505122", "0.4446764", "0.44463474", "0.44449782", "0.4443672", "0.444323", "0.44410264" ]
0.64367115
0
Creates a new instance of CellBackup which differs from this CellBackup. Four array parameters are supplied. Each parameter may be null if its contents is the same as in this Snapshot.
public CellBackup with(ImmutableCell d, ImmutableNodeInst[] nodesArray, ImmutableArcInst[] arcsArray, ImmutableExport[] exportsArray, TechPool superPool) { CellRevision newRevision = cellRevision.with(d, nodesArray, arcsArray, exportsArray); TechPool restrictedPool = superPool.restrict(newRevision.techUsages, techPool); if (newRevision == cellRevision && restrictedPool == techPool) return this; if (arcsArray != null) { for (ImmutableArcInst a: arcsArray) { if (a != null && !a.check(restrictedPool)) throw new IllegalArgumentException("arc " + a.name + " is not compatible with TechPool"); } } return new CellBackup(newRevision, restrictedPool, modified || newRevision != cellRevision); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private CellBackup(CellRevision cellRevision, TechPool techPool, boolean modified) {\n this.cellRevision = cellRevision;\n this.techPool = techPool;\n this.modified = modified;\n cellBackupsCreated++;\n if (Job.getDebug())\n check();\n }", "public static CellBackup newInstance(ImmutableCell d, TechPool techPool) {\n if (d.cellId.idManager != techPool.idManager)\n throw new IllegalArgumentException();\n if (techPool.getTech(d.techId) == null)\n throw new IllegalArgumentException();\n CellRevision cellRevision = new CellRevision(d);\n TechPool restrictedPool = techPool.restrict(cellRevision.techUsages, techPool);\n return new CellBackup(cellRevision, restrictedPool, true);\n }", "public CellBackup withoutModified() {\n if (!this.modified) return this;\n return new CellBackup(this.cellRevision, this.techPool, false);\n }", "@Test\n\tpublic void backupTest1() {\n\t\tMainPanel m = new MainPanel(15);\n\t\tCell[][] _cells = new Cell[15][15];\n\t\tfor(int i = 0; i < 15; i++) {\n\t\t\tfor(int j = 0; j < 15; j++) {\n\t\t\t _cells[i][j] = new Cell(false);\n\t\t\t}\n\t\t}\t\n\t\tm.backup1();\t\n\t\tassertEquals(m._backupCells[14][14].getAlive(), _cells[14][14].getAlive());\n\t}", "public CellBackup withRevisionDate(long revisionDate) {\n CellRevision newRevision = cellRevision.withRevisionDate(revisionDate);\n if (newRevision == cellRevision) return this;\n return new CellBackup(newRevision, this.techPool, true);\n }", "@Override\n\tpublic String Backup(String[] args) throws RemoteException {\n\t\tSystem.out.println(\"Trying to backup with args: \" + args[2] + \" \" + args[3] );\n\t\t\n\t\treturn null;\n\t}", "public Backup() {\n initComponents();\n selecionarOpcoesDeBackup();\n }", "public Builder setBackups(\n int index, yandex.cloud.api.ydb.v1.BackupOuterClass.Backup value) {\n if (backupsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureBackupsIsMutable();\n backups_.set(index, value);\n onChanged();\n } else {\n backupsBuilder_.setMessage(index, value);\n }\n return this;\n }", "Prototype makeCopy();", "@Override\n\tpublic Instance copy(final double[] values) {\n\t\treturn null;\n\t}", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public static void main_compareBackup(){\n //table.equals(tableClone);\n\n if(table.equals(tableClone))\n System.out.println(\"Current list is the same as the backup copy.\");\n else\n System.out.println(\"Current list is not the same as the backup copy.\");\n }", "protected Backup()\n {\n m_buffer_ = new StringBuffer();\n }", "public JointSegmentationDatum(final double copyRatio) {\n this.copyRatio = Optional.of(copyRatio);\n allelicCount = Optional.empty();\n }", "static CellBackup read(IdReader reader, TechPool techPool) throws IOException {\n CellRevision newRevision = CellRevision.read(reader);\n boolean modified = reader.readBoolean();\n TechPool restrictedPool = techPool.restrict(newRevision.techUsages, techPool);\n return new CellBackup(newRevision, restrictedPool, modified);\n }", "public yandex.cloud.api.ydb.v1.BackupOuterClass.Backup.Builder addBackupsBuilder() {\n return getBackupsFieldBuilder().addBuilder(\n yandex.cloud.api.ydb.v1.BackupOuterClass.Backup.getDefaultInstance());\n }", "private Builder(Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.accountID)) {\n this.accountID = data().deepCopy(fields()[0].schema(), other.accountID);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.brokerId)) {\n this.brokerId = data().deepCopy(fields()[1].schema(), other.brokerId);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.createDate)) {\n this.createDate = data().deepCopy(fields()[2].schema(), other.createDate);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.TransferSerials)) {\n this.TransferSerials = data().deepCopy(fields()[3].schema(), other.TransferSerials);\n fieldSetFlags()[3] = true;\n }\n }", "public Backup() {\n initComponents();\n }", "private Parameters createCheckpoint() {\n Parameters checkpoint = Parameters.create();\n checkpoint.set(\"lastDoc/identifier\", this.lastAddedDocumentIdentifier);\n checkpoint.set(\"lastDoc/number\", this.lastAddedDocumentNumber);\n checkpoint.set(\"indexBlockCount\", this.indexBlockCount);\n Parameters shards = Parameters.create();\n for (Bin b : this.geometricParts.radixBins.values()) {\n for (String indexPath : b.getBinPaths()) {\n shards.set(indexPath, b.size);\n }\n }\n checkpoint.set(\"shards\", shards);\n return checkpoint;\n }", "@Override\n BinaryArrayReadWrite clone();", "public Builder addAllBackups(\n java.lang.Iterable<? extends yandex.cloud.api.ydb.v1.BackupOuterClass.Backup> values) {\n if (backupsBuilder_ == null) {\n ensureBackupsIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, backups_);\n onChanged();\n } else {\n backupsBuilder_.addAllMessages(values);\n }\n return this;\n }", "public Board deepCopy() {\n Board copy = new Board();\n for (int i = 0; i < DIMENSION; i++) {\n System.arraycopy(this.fields[i], 0, copy.fields[i], 0, DIMENSION);\n }\n return copy;\n }", "edu.usfca.cs.dfs.StorageMessages.BackUpOrBuilder getBackupOrBuilder();", "@Test\n public void testCopy() {\n BuildingWorker worker = new BuildingWorker(\"one\", 1, 2);\n ICell copy = worker.copy();\n\n assertTrue(copy.isWorker());\n\n assertEquals(\"one\", copy.getPlayerName());\n assertEquals(1, copy.getWorkerNumber());\n assertEquals(2, copy.getHeight());\n\n assertNotEquals(worker, copy);\n }", "Snapshot create();", "CellBackup withRenamedIds(IdMapper idMapper, CellName newGroupName) {\n CellRevision newRevision = cellRevision.withRenamedIds(idMapper, newGroupName);\n if (newRevision == cellRevision) return this;\n return new CellBackup(newRevision, this.techPool, true);\n }", "public yandex.cloud.api.ydb.v1.BackupOuterClass.Backup.Builder getBackupsBuilder(\n int index) {\n return getBackupsFieldBuilder().getBuilder(index);\n }", "@NotNull\n public static /* bridge */ /* synthetic */ Tuple17 copy$default(Tuple17 tuple17, Object obj, Object obj2, Object obj3, Object obj4, Object obj5, Object obj6, Object obj7, Object obj8, Object obj9, Object obj10, Object obj11, Object obj12, Object obj13, Object obj14, Object obj15, Object obj16, Object obj17, int i2, Object obj18) {\n return tuple17.copy((i2 & 1) != 0 ? tuple17.a : obj, (i2 & 2) != 0 ? tuple17.b : obj2, (i2 & 4) != 0 ? tuple17.c : obj3, (i2 & 8) != 0 ? tuple17.d : obj4, (i2 & 16) != 0 ? tuple17.e : obj5, (i2 & 32) != 0 ? tuple17.f : obj6, (i2 & 64) != 0 ? tuple17.g : obj7, (i2 & 128) != 0 ? tuple17.h : obj8, (i2 & 256) != 0 ? tuple17.i : obj9, (i2 & 512) != 0 ? tuple17.j : obj10, (i2 & 1024) != 0 ? tuple17.k : obj11, (i2 & 2048) != 0 ? tuple17.l : obj12, (i2 & 4096) != 0 ? tuple17.m : obj13, (i2 & 8192) != 0 ? tuple17.n : obj14, (i2 & 16384) != 0 ? tuple17.o : obj15, (i2 & 32768) != 0 ? tuple17.p : obj16, (i2 & 65536) != 0 ? tuple17.q : obj17);\n }", "yandex.cloud.api.ydb.v1.BackupOuterClass.BackupOrBuilder getBackupsOrBuilder(\n int index);", "private void forwardValuesForBackup() {\n\t\tnew Thread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tnew Action<Void>() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tVoid execute() throws RemoteException, NetworkHosedException {\n\t\t\t\t\t\t\tlong predecessorKey = predecessor.getNodeKey();\n\t\t\t\t\t\t\tlong predecessorPredecessorKey = predecessor.getPredecessor().getNodeKey();\n\t\t\t\t\t\t\tfor (Entry<Long, Serializable> pair : nodeStorage.entrySet()) {\n\t\t\t\t\t\t\t\t//send our predecessor its values that we have on backup\n\t\t\t\t\t\t\t\tif (ringRange.isInRange(false, predecessorPredecessorKey, pair.getKey(), predecessorKey, true))\n\t\t\t\t\t\t\t\t\tpredecessor.putBackup(pair.getKey(), pair.getValue());\n\t\t\t\t\t\t\t\t//send our successor our values for them to back up\n\t\t\t\t\t\t\t\tif (ringRange.isInRange(false, predecessorKey, pair.getKey(), nodeKey, true))\n\t\t\t\t\t\t\t\t\tfingerTable.getSuccessor().getNode().putBackup(pair.getKey(), nodeStorage.get(pair.getKey()));\n\t\t\t\t\t\t\t\t//trim out any excess values from old predecessors\n\t\t\t\t\t\t\t\tif (!ringRange.isInRange(false, predecessorPredecessorKey, pair.getKey(), nodeKey, true))\n\t\t\t\t\t\t\t\t\tnodeStorage.remove(pair.getKey());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t} catch (NetworkHosedException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}).start();\n\t}", "private Board(byte [] blocks) {\n this.state = Arrays.copyOf(blocks, blocks.length);\n }", "public StockBst(String[][] givenList){\r\n this.propertyList = givenList;\r\n setEverything();\r\n }", "public Matrix copy(){\r\n \t if(this==null){\r\n \t return null;\r\n \t }\r\n \t else{\r\n \t int nr = this.nrow;\r\n \t int nc = this.ncol;\r\n \t Matrix b = new Matrix(nr,nc);\r\n \t double[][] barray = b.getArrayReference();\r\n \t b.nrow = nr;\r\n \t b.ncol = nc;\r\n \t for(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tbarray[i][j]=this.matrix[i][j];\r\n \t\t}\r\n \t }\r\n \t for(int i=0; i<nr; i++)b.index[i] = this.index[i];\r\n \t return b;\r\n \t}\r\n \t}", "DataFrame<R,C> copy();", "@Override\n public BoardFramework copyBoard() {\n List<List<GamePiece>> pieceCopies= new ArrayList<>();\n for(List<GamePiece> row: myGamePieces){\n List<GamePiece> rowOfPieceCopies = new ArrayList<>();\n for(GamePiece piece: row){\n rowOfPieceCopies.add(piece.copy());\n }\n pieceCopies.add(rowOfPieceCopies);\n }\n return new Board(pieceCopies,new ArrayList<>(myNeighborhoods),myEmptyState);\n }", "@Override\n public BatchOptions clone() {\n BatchOptions clone;\n try {\n clone = (BatchOptions) super.clone();\n } catch (CloneNotSupportedException e) {\n clone = new BatchOptions();\n }\n\n return clone.partitionKey(partitionKey)\n .maximumSizeInBytes(maximumSizeInBytes);\n }", "private void backupInternalState(Backup backup)\n {\n backup.m_offset_ = m_source_.getIndex();\n backup.m_FCDLimit_ = m_FCDLimit_;\n backup.m_FCDStart_ = m_FCDStart_;\n backup.m_isCodePointHiragana_ = m_isCodePointHiragana_;\n backup.m_bufferOffset_ = m_bufferOffset_;\n backup.m_buffer_.setLength(0);\n if (m_bufferOffset_ >= 0) {\n backup.m_buffer_.append(m_buffer_);\n }\n }", "public DataFrame copy() {\n return new DataFrame(data.values, header.values, index.values);\n }", "public Tuple(Object... values) {\n data = Arrays.copyOf(values, values.length);\n }", "public Bytes32Snapshot(byte[] elements) {\n\t\tif (elements == null)\n\t\t\tthrow new IllegalArgumentException(\"Expected a non-null array of elements\");\n\t\tif (elements.length != length)\n\t\t\tthrow new IllegalArgumentException(\"Expected \" + length + \" elements, but got \" + elements.length);\n\n\t\tbyte0 = elements[0];\n\t\tbyte1 = elements[1];\n\t\tbyte2 = elements[2];\n\t\tbyte3 = elements[3];\n\t\tbyte4 = elements[4];\n\t\tbyte5 = elements[5];\n\t\tbyte6 = elements[6];\n\t\tbyte7 = elements[7];\n\t\tbyte8 = elements[8];\n\t\tbyte9 = elements[9];\n\t\tbyte10 = elements[10];\n\t\tbyte11 = elements[11];\n\t\tbyte12 = elements[12];\n\t\tbyte13 = elements[13];\n\t\tbyte14 = elements[14];\n\t\tbyte15 = elements[15];\n\t\tbyte16 = elements[16];\n\t\tbyte17 = elements[17];\n\t\tbyte18 = elements[18];\n\t\tbyte19 = elements[19];\n\t\tbyte20 = elements[20];\n\t\tbyte21 = elements[21];\n\t\tbyte22 = elements[22];\n\t\tbyte23 = elements[23];\n\t\tbyte24 = elements[24];\n\t\tbyte25 = elements[25];\n\t\tbyte26 = elements[26];\n\t\tbyte27 = elements[27];\n\t\tbyte28 = elements[28];\n\t\tbyte29 = elements[29];\n\t\tbyte30 = elements[30];\n\t\tbyte31 = elements[31];\n\t}", "private void copy()\n\t{\n\t\t//for loop for row\n\t\tfor (int row =0; row<nextVersion.length; row++)\n\t\t{\t//for loop for column\n\t\t\tfor (int column =0; column<nextVersion[row].length; column++)\n\t\t\t{\n\t\t\t\t//assigning values for currentVersion to nextVersion array\n\t\t\t\tnextVersion[row][column] = currentVersion[row][column];\n\t\t\t}\n\t\t}\n\t\n\t}", "public yandex.cloud.api.ydb.v1.BackupOuterClass.BackupOrBuilder getBackupsOrBuilder(\n int index) {\n if (backupsBuilder_ == null) {\n return backups_.get(index); } else {\n return backupsBuilder_.getMessageOrBuilder(index);\n }\n }", "public abstract ModuleBackups backups();", "public Matrix(Matrix bb){\r\n\t\tthis.nrow = bb.nrow;\r\n\t\tthis.ncol = bb.ncol;\r\n\t\tthis.matrix = bb.matrix;\r\n\t\tthis.index = bb.index;\r\n this.dswap = bb.dswap;\r\n \t}", "protected final Object clone() {\n\t\tBitBoardImpl clone = new BitBoardImpl();\n\t\tfor( int i = 0; i < 5; i++) {\n\t\t clone._boardLayer[i] = _boardLayer[i];\n\t\t}\n\t\treturn clone;\n }", "yandex.cloud.api.ydb.v1.BackupOuterClass.Backup getBackups(int index);", "public CopyBuilder copy() {\n return new CopyBuilder(this);\n }", "public BackupRestore(String ip,String argUsername,String argPassword,String argEnPassword,String argDeviceType){\n\t this.repetitiveWork();\n\t log.info(\"Constructor of \"+log.getName()+ \" with 4 parameter was called\\n\");\n\t deviceIP=ip;\n\t log.info(\"deviceIp set to \"+deviceIP+\"\\n\");\n\t if(argDeviceType.toUpperCase().equals(\"CISCO\"))\n\t deviceType=RouterType.CISCO;\n\t else\n\t \t deviceType=RouterType.JUNIPER;\n\t log.info(\"deviceType set to \"+deviceType+\"\\n\");\n\t deviceName=argUsername;\n\t log.info(\"deviceName set to \"+deviceName+\"\\n\");\n\t devicePassword=argPassword;\n\t log.info(\"devicePassword set to \"+\"******\\n\");\n\t deviceEnPassword=argEnPassword;\n\t log.info(\"deviceEnablePassword set to\"+\"******\\n\");\n\t try{\n\t\t properties.load(new FileInputStream(defaultSettingsFile));\n\t\t log.info(\"File \"+DEFAULT_SETTINGS_FILE_LOCATION+\" opened successfully :)\\n\");\n\t\t /*Initializing parameter from the file defaultSettings.properties*/\n\t\t log.info(\"Initializing parameter from the file defaultSettings.properties\\n\");\n\t\t FETCHING_DATA_VIA_DATABASE=Boolean.parseBoolean(properties.getProperty(\"viaDatabase\").toLowerCase());\n\t\t if(FETCHING_DATA_VIA_DATABASE){\n\t\t log.info(\"Method of fetching data is via database\");\n\t\t this.connectToDb();\n\t\t log.info(\"Insering the new device data\");\n\t\t this.dbConnect.insertInto(properties.getProperty(\"deviceDetailsTable\"),deviceIP,deviceName,devicePassword,deviceEnPassword,deviceType);\n\t\t log.info(\"Successfully inserted the data\");\n\t\t this.dbConnector();\n\t\t }\n\t\t else{\n\t\t log.info(\"Method of fetching data is via files\");\n\t\t if(properties.getProperty(\"connectionType\").toUpperCase().equals(\"TELNET\"))\n\t\t\t connectionType=ConnectionType.TELNET;\n\t\t\t else\n\t\t\t\t\tconnectionType=ConnectionType.SSH;\n\t\t log.info(\"Setting the default connection type as \"+connectionType);\n\t\t backupServerName=properties.getProperty(\"backupServerName\");\n\t\t log.info(\"backupServerName set to its default value \"+backupServerName+\"\\n\");\n\t\t backupServerIP=properties.getProperty(\"backupServerIP\");\n\t\t log.info(\"backupServerIP set to its default value \"+backupServerIP+\"\\n\");\n\t\t backupServerPassword=properties.getProperty(\"backupServerPassword\");\n\t\t log.info(\"backupServerPassword set to its default value \"+\"******\"+\"\\n\");\n\t\t backupServerFolderLocation=properties.getProperty(\"backupServerFolderLocation\");\n\t\t log.info(\"backupServerFolderLoaction set to its default value \"+backupServerFolderLocation+\"\\n\");\n\t\t if(properties.getProperty(\"backupServerType\").toLowerCase().equals(\"scp\"))\n\t\t backupServerType=BackupServerType.scp;\n\t\t else\n\t\t \t backupServerType=BackupServerType.tftp;\n\t\t log.info(\"backupServerType set to its default value \"+backupServerType+\"\\n\");\n\t\t }\n\t }catch(Exception e){\n\t\t log.error(\"File \"+DEFAULT_SETTINGS_FILE_LOCATION+\" was not found!!\\n\");\n\t }\n }", "public edu.usfca.cs.dfs.StorageMessages.BackUp.Builder getBackupBuilder() {\n return getBackupFieldBuilder().getBuilder();\n }", "public void setBackupTree1(TreeBuilder backupTree1) {\n\t\tthis.backupTree1 = backupTree1;\n\t}", "private Builder(baconhep.TTau.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.pt)) {\n this.pt = data().deepCopy(fields()[0].schema(), other.pt);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.eta)) {\n this.eta = data().deepCopy(fields()[1].schema(), other.eta);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.phi)) {\n this.phi = data().deepCopy(fields()[2].schema(), other.phi);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.m)) {\n this.m = data().deepCopy(fields()[3].schema(), other.m);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.e)) {\n this.e = data().deepCopy(fields()[4].schema(), other.e);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.q)) {\n this.q = data().deepCopy(fields()[5].schema(), other.q);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.dzLeadChHad)) {\n this.dzLeadChHad = data().deepCopy(fields()[6].schema(), other.dzLeadChHad);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.nSignalChHad)) {\n this.nSignalChHad = data().deepCopy(fields()[7].schema(), other.nSignalChHad);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.nSignalGamma)) {\n this.nSignalGamma = data().deepCopy(fields()[8].schema(), other.nSignalGamma);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.antiEleMVA5)) {\n this.antiEleMVA5 = data().deepCopy(fields()[9].schema(), other.antiEleMVA5);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.antiEleMVA5Cat)) {\n this.antiEleMVA5Cat = data().deepCopy(fields()[10].schema(), other.antiEleMVA5Cat);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.rawMuonRejection)) {\n this.rawMuonRejection = data().deepCopy(fields()[11].schema(), other.rawMuonRejection);\n fieldSetFlags()[11] = true;\n }\n if (isValidValue(fields()[12], other.rawIso3Hits)) {\n this.rawIso3Hits = data().deepCopy(fields()[12].schema(), other.rawIso3Hits);\n fieldSetFlags()[12] = true;\n }\n if (isValidValue(fields()[13], other.rawIsoMVA3oldDMwoLT)) {\n this.rawIsoMVA3oldDMwoLT = data().deepCopy(fields()[13].schema(), other.rawIsoMVA3oldDMwoLT);\n fieldSetFlags()[13] = true;\n }\n if (isValidValue(fields()[14], other.rawIsoMVA3oldDMwLT)) {\n this.rawIsoMVA3oldDMwLT = data().deepCopy(fields()[14].schema(), other.rawIsoMVA3oldDMwLT);\n fieldSetFlags()[14] = true;\n }\n if (isValidValue(fields()[15], other.rawIsoMVA3newDMwoLT)) {\n this.rawIsoMVA3newDMwoLT = data().deepCopy(fields()[15].schema(), other.rawIsoMVA3newDMwoLT);\n fieldSetFlags()[15] = true;\n }\n if (isValidValue(fields()[16], other.rawIsoMVA3newDMwLT)) {\n this.rawIsoMVA3newDMwLT = data().deepCopy(fields()[16].schema(), other.rawIsoMVA3newDMwLT);\n fieldSetFlags()[16] = true;\n }\n if (isValidValue(fields()[17], other.puppiChHadIso)) {\n this.puppiChHadIso = data().deepCopy(fields()[17].schema(), other.puppiChHadIso);\n fieldSetFlags()[17] = true;\n }\n if (isValidValue(fields()[18], other.puppiGammaIso)) {\n this.puppiGammaIso = data().deepCopy(fields()[18].schema(), other.puppiGammaIso);\n fieldSetFlags()[18] = true;\n }\n if (isValidValue(fields()[19], other.puppiNeuHadIso)) {\n this.puppiNeuHadIso = data().deepCopy(fields()[19].schema(), other.puppiNeuHadIso);\n fieldSetFlags()[19] = true;\n }\n if (isValidValue(fields()[20], other.puppiChHadIsoNoLep)) {\n this.puppiChHadIsoNoLep = data().deepCopy(fields()[20].schema(), other.puppiChHadIsoNoLep);\n fieldSetFlags()[20] = true;\n }\n if (isValidValue(fields()[21], other.puppiGammaIsoNoLep)) {\n this.puppiGammaIsoNoLep = data().deepCopy(fields()[21].schema(), other.puppiGammaIsoNoLep);\n fieldSetFlags()[21] = true;\n }\n if (isValidValue(fields()[22], other.puppiNeuHadIsoNoLep)) {\n this.puppiNeuHadIsoNoLep = data().deepCopy(fields()[22].schema(), other.puppiNeuHadIsoNoLep);\n fieldSetFlags()[22] = true;\n }\n if (isValidValue(fields()[23], other.hpsDisc)) {\n this.hpsDisc = data().deepCopy(fields()[23].schema(), other.hpsDisc);\n fieldSetFlags()[23] = true;\n }\n }", "public MRG32k3a clone() {\n MRG32k3a retour = null;\n\n retour = (MRG32k3a)super.clone();\n retour.Bg = new double[6];\n retour.Ig = new double[6];\n for (int i = 0; i<6; i++) {\n retour.Bg[i] = Bg[i];\n retour.Ig[i] = Ig[i];\n }\n return retour;\n }", "private static BemCandidato populate(String[] data) {\n\t\tBemCandidato bc = new BemCandidato();\n\t\tbc.setDataGeracao(data[0]);\n\t\tbc.setHoraGeracao(data[1]);\n\t\tbc.setAnoEleicao(data[2].trim());\n\t\tbc.setDescricaoEleicao(data[3]);\n\t\tbc.setSiglaUF(data[4].trim());\n\t\tbc.setSequencialCandidato(data[5].trim());\n\t\tbc.setDescricao(data[6]);\n\t\tbc.setCdTipoBemCandidato(data[7]);\n\t\tbc.setDsTipoBemCandidato(data[8]);\n\t\tbc.setValorBem(data[9].trim());\n\t\tbc.setDataUltimaAtualizacao(data[10]);\n\t\tbc.setHoraUltimaAtualizacao(data[11]);\n\t\treturn bc;\n\t}", "public Builder addBackups(\n int index, yandex.cloud.api.ydb.v1.BackupOuterClass.Backup value) {\n if (backupsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureBackupsIsMutable();\n backups_.add(index, value);\n onChanged();\n } else {\n backupsBuilder_.addMessage(index, value);\n }\n return this;\n }", "public BasicSudoku(Cell[][] cells, Cell[] availableValues) {\n this.cells = cells;\n size = cells.length;\n this.availableValues = availableValues;\n }", "public void backupCustom(String... tableName) throws Exception {\n // back up specific files\n QueryDataSet qds = new QueryDataSet(conn);\n for (String str : tableName) {\n\n qds.addTable(str);\n }\n FlatXmlDataSet.write(qds, new FileWriter(backupFile), \"UTF-8\");\n new XlsDataSetWriter().write(qds, new FileOutputStream(backupFile));\n }", "DSGeneMarker deepCopy();", "private Builder(Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.transferId)) {\n this.transferId = data().deepCopy(fields()[0].schema(), other.transferId);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.brokerId)) {\n this.brokerId = data().deepCopy(fields()[1].schema(), other.brokerId);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.accountID)) {\n this.accountID = data().deepCopy(fields()[2].schema(), other.accountID);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.accountAuthId)) {\n this.accountAuthId = data().deepCopy(fields()[3].schema(), other.accountAuthId);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.accountPassword)) {\n this.accountPassword = data().deepCopy(fields()[4].schema(), other.accountPassword);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.fundPassword)) {\n this.fundPassword = data().deepCopy(fields()[5].schema(), other.fundPassword);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.tradeCode)) {\n this.tradeCode = data().deepCopy(fields()[6].schema(), other.tradeCode);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.bankID)) {\n this.bankID = data().deepCopy(fields()[7].schema(), other.bankID);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.bankBranchID)) {\n this.bankBranchID = data().deepCopy(fields()[8].schema(), other.bankBranchID);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.bankPassword)) {\n this.bankPassword = data().deepCopy(fields()[9].schema(), other.bankPassword);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.currencyID)) {\n this.currencyID = data().deepCopy(fields()[10].schema(), other.currencyID);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.secuPwdFlag)) {\n this.secuPwdFlag = data().deepCopy(fields()[11].schema(), other.secuPwdFlag);\n fieldSetFlags()[11] = true;\n }\n }", "public abstract B copy();", "public static void main_backup(){\n try {\n tableClone = (HiringTable) table.clone();\n System.out.println(\"Successfully created backup.\");\n } catch (CloneNotSupportedException ex){\n System.out.println(\"Clone not successful.\");\n main_menu();\n }\n }", "public Builder addBackups(yandex.cloud.api.ydb.v1.BackupOuterClass.Backup value) {\n if (backupsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureBackupsIsMutable();\n backups_.add(value);\n onChanged();\n } else {\n backupsBuilder_.addMessage(value);\n }\n return this;\n }", "public Bytes32Snapshot(byte byte0, byte byte1, byte byte2, byte byte3, byte byte4, byte byte5, byte byte6, byte byte7,\n\t\t\tbyte byte8, byte byte9, byte byte10, byte byte11, byte byte12, byte byte13, byte byte14, byte byte15, byte byte16,\n\t\t\tbyte byte17, byte byte18, byte byte19, byte byte20, byte byte21, byte byte22, byte byte23, byte byte24,\n\t\t\tbyte byte25, byte byte26, byte byte27, byte byte28, byte byte29, byte byte30, byte byte31) {\n\n\t\tthis.byte0 = byte0;\n\t\tthis.byte1 = byte1;\n\t\tthis.byte2 = byte2;\n\t\tthis.byte3 = byte3;\n\t\tthis.byte4 = byte4;\n\t\tthis.byte5 = byte5;\n\t\tthis.byte6 = byte6;\n\t\tthis.byte7 = byte7;\n\t\tthis.byte8 = byte8;\n\t\tthis.byte9 = byte9;\n\t\tthis.byte10 = byte10;\n\t\tthis.byte11 = byte11;\n\t\tthis.byte12 = byte12;\n\t\tthis.byte13 = byte13;\n\t\tthis.byte14 = byte14;\n\t\tthis.byte15 = byte15;\n\t\tthis.byte16 = byte16;\n\t\tthis.byte17 = byte17;\n\t\tthis.byte18 = byte18;\n\t\tthis.byte19 = byte19;\n\t\tthis.byte20 = byte20;\n\t\tthis.byte21 = byte21;\n\t\tthis.byte22 = byte22;\n\t\tthis.byte23 = byte23;\n\t\tthis.byte24 = byte24;\n\t\tthis.byte25 = byte25;\n\t\tthis.byte26 = byte26;\n\t\tthis.byte27 = byte27;\n\t\tthis.byte28 = byte28;\n\t\tthis.byte29 = byte29;\n\t\tthis.byte30 = byte30;\n\t\tthis.byte31 = byte31;\n\t}", "public abstract CTxDestination clone();", "@Override\n public RawStore copy() {\n return new RawStore(this.toRawCopy2D(), myNumberOfColumns);\n }", "private Grid(Grid oldGrid) {\n\n grid = new String[Main.Y_SIZE][Main.X_SIZE][Main.Z_SIZE];\n this.gateDatabase = oldGrid.gateDatabase;\n this.netDatabase = oldGrid.netDatabase;\n\n for (int i = 0; i < Main.Z_SIZE; i++) {\n for (int k = 0; k < Main.X_SIZE; k++) {\n for (int n = 0; n < Main.Y_SIZE; n++) {\n grid[n][k][i] = oldGrid.grid[n][k][i];\n }\n }\n }\n }", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Board copy(boolean independent) {\n\t\tCell[][] cs = new Cell[9][9];\n\t\tfor (byte m = 0; m < 9; m++) {\n\t\t\tfor (byte n = 0; n < 9; n++) {\n\t\t\t\tCell c = cells[m][n];\n\t\t\t\tif (independent) {\n\t\t\t\t\tcs[m][n] = c.copy();\n\t\t\t\t} else {\n\t\t\t\t\tif (!c.isEmpty()) {\n\n\t\t\t\t\t\tcs[m][n] = c;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tcs[m][n] = c.copy();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Board(cs);\n\t}", "Builder copyValues(PropertyBox source);", "public DatabaseEditorConfig clone(){\n\t\t\n\t\tDatabaseEditorConfig clonedObject = new DatabaseEditorConfig();\n\t\tRGB bg = null;\n\t\tif (backGround != null) {\n\t\t\tbg = new RGB(backGround.red, backGround.green, backGround.blue);\n\t\t}\n\t\tclonedObject.setBackGround(bg);\n\t\tclonedObject.setDatabaseComment(databaseComment);\n\t\t\n\t\treturn clonedObject;\n\t}", "public Builder clearBackups() {\n if (backupsBuilder_ == null) {\n backups_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n backupsBuilder_.clear();\n }\n return this;\n }", "public HotelDatabase() {\n\n this.HOTEL = new ArrayList<String>(Arrays.asList(\"HOTEL\", \"HOTEL_NAME\", \"BRANCH_ID\", \"PHONE\"));\n this.ROOM = new ArrayList<String>(Arrays.asList(\"ROOM\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\", \"CAPACITY\"));\n this.CUSTOMER = new ArrayList<String>(Arrays.asList(\"CUSTOMER\", \"C_ID\", \"FIRST_NAME\", \"LAST_NAME\", \"AGE\", \"GENDER\"));\n this.RESERVATION = new ArrayList<String>(Arrays.asList(\"RESERVATION\", \"C_ID\", \"RES_NUM\", \"PARTY_SIZE\", \"COST\"));\n this.HOTEL_ADDRESS = new ArrayList<String>(Arrays.asList(\"HOTEL_ADDRESS\", \"HOTEL_NAME\", \"BRANCH_ID\", \"CITY\", \"STATE\", \"ZIP\"));\n this.HOTEL_ROOMS = new ArrayList<String>(Arrays.asList(\"HOTEL_ROOMS\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\", \"QUANTITY\"));\n this.BOOKING = new ArrayList<String>(Arrays.asList(\"BOOKING\", \"C_ID\", \"RES_NUM\", \"CHECK_IN\", \"CHECK_OUT\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\"));\n this.INFORMATION = new ArrayList<String>(Arrays.asList(\"INFORMATION\", \"HOTEL_NAME\", \"BRANCH_ID\", \"TYPE\", \"DATE_FROM\", \"DATE_TO\", \"NUM_AVAIL\", \"PRICE\"));\n this.NUMBERS = new ArrayList<String>(Arrays.asList(\"BRANCH_ID\", \"CAPACITY\", \"C_ID\", \"AGE\", \"RES_NUM\", \"PARTY_SIZE\", \"COST\", \"ZIP\", \"QUANTITY\", \"NUM_AVAILABLE\", \"PRICE\"));\n this.DATES = new ArrayList<String>(Arrays.asList(\"CHECK_IN\", \"CHECK_OUT\", \"DATE_FROM\", \"DATE_TO\"));\n\n // INDEXING: 0 1 2 3 4 5 6 7\n this.ALL = new ArrayList<ArrayList<String>>(Arrays.asList(HOTEL, ROOM, CUSTOMER, RESERVATION, HOTEL_ADDRESS, HOTEL_ROOMS, BOOKING, INFORMATION));\n }", "public edu.usfca.cs.dfs.StorageMessages.BackUpOrBuilder getBackupOrBuilder() {\n if ((msgCase_ == 10) && (backupBuilder_ != null)) {\n return backupBuilder_.getMessageOrBuilder();\n } else {\n if (msgCase_ == 10) {\n return (edu.usfca.cs.dfs.StorageMessages.BackUp) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.BackUp.getDefaultInstance();\n }\n }", "Model copy();", "public void m1254a(eb[] ebVarArr) {\n Object obj = this.f777b;\n if (obj == null) {\n this.f777b = ebVarArr;\n } else if (ebVarArr != null && ebVarArr.length > 0) {\n Object obj2 = new eb[(obj.length + ebVarArr.length)];\n System.arraycopy(obj, 0, obj2, 0, obj.length);\n System.arraycopy(ebVarArr, 0, obj2, obj.length, ebVarArr.length);\n this.f777b = obj2;\n }\n }", "public T copy() {\n T ret = createLike();\n ret.getMatrix().setTo(this.getMatrix());\n return ret;\n }", "public abstract Instance duplicate();", "public Builder clearBackup() {\n if (backupBuilder_ == null) {\n if (msgCase_ == 10) {\n msgCase_ = 0;\n msg_ = null;\n onChanged();\n }\n } else {\n if (msgCase_ == 10) {\n msgCase_ = 0;\n msg_ = null;\n }\n backupBuilder_.clear();\n }\n return this;\n }", "WorkoutBatch copy();", "public BinaryRefAddr(String paramString, byte[] paramArrayOfbyte, int paramInt1, int paramInt2) {\n/* 97 */ super(paramString);\n/* 98 */ this.buf = new byte[paramInt2];\n/* 99 */ System.arraycopy(paramArrayOfbyte, paramInt1, this.buf, 0, paramInt2);\n/* */ }", "public DriverConfig createBackupDriver()\n {\n DriverConfig driver = new DriverConfig(this);\n \n _backupDriverList.add(driver);\n \n return driver;\n }", "public Record copy() {\n return new Record(\n this.id,\n this.location.copy(),\n this.score\n );\n }", "public GameBoard clone(){\r\n\t\tGameBoard result = new GameBoard();\r\n\t\ttry{\r\n\t\t\tresult = (GameBoard) super.clone();\r\n\t\t}catch(CloneNotSupportedException e){\r\n\t\t\tthrow new RuntimeException();\r\n\t\t}\r\n\t\tresult.board = (Box[]) board.clone();\r\n\t\treturn result;\r\n\t}", "edu.usfca.cs.dfs.StorageMessages.BackUp getBackup();", "private Builder(com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.name)) {\n this.name = data().deepCopy(fields()[0].schema(), other.name);\n fieldSetFlags()[0] = other.fieldSetFlags()[0];\n }\n if (isValidValue(fields()[1], other.lastName)) {\n this.lastName = data().deepCopy(fields()[1].schema(), other.lastName);\n fieldSetFlags()[1] = other.fieldSetFlags()[1];\n }\n if (isValidValue(fields()[2], other.country)) {\n this.country = data().deepCopy(fields()[2].schema(), other.country);\n fieldSetFlags()[2] = other.fieldSetFlags()[2];\n }\n if (isValidValue(fields()[3], other.state)) {\n this.state = data().deepCopy(fields()[3].schema(), other.state);\n fieldSetFlags()[3] = other.fieldSetFlags()[3];\n }\n if (isValidValue(fields()[4], other.gender)) {\n this.gender = data().deepCopy(fields()[4].schema(), other.gender);\n fieldSetFlags()[4] = other.fieldSetFlags()[4];\n }\n if (isValidValue(fields()[5], other.date)) {\n this.date = data().deepCopy(fields()[5].schema(), other.date);\n fieldSetFlags()[5] = other.fieldSetFlags()[5];\n }\n if (isValidValue(fields()[6], other.height)) {\n this.height = data().deepCopy(fields()[6].schema(), other.height);\n fieldSetFlags()[6] = other.fieldSetFlags()[6];\n }\n if (isValidValue(fields()[7], other.weight)) {\n this.weight = data().deepCopy(fields()[7].schema(), other.weight);\n fieldSetFlags()[7] = other.fieldSetFlags()[7];\n }\n }", "private ListBackupsRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public MappingInfo copy()\r\n\t{\r\n\t\tArrayList<MappingCell> mappingCells = new ArrayList<MappingCell>();\r\n\t\tfor(MappingCell mappingCell : mappingCellHash.get())\r\n\t\t\tmappingCells.add(mappingCell);\r\n\t\treturn new MappingInfo(mapping.copy(),mappingCells);\r\n\t}", "public ImmutableList(T item, ImmutableList<T> rest) {\r\n this(new ConsCell<T>(item,rest.head));\r\n }", "@Test\n public void testEquals_differentParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI + 1,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are different\n assertThat(cellIdentityNr).isNotEqualTo(anotherCellIdentityNr);\n }", "public Cell(Cell original){\n this.i = original.i;\n this.j = original.j;\n this.type = original.type;\n if (original.entity != null) {\n if (original.entity instanceof Agent) {\n Agent agent = (Agent) original.entity;\n this.entity = new Agent(agent);\n }\n else if (original.entity instanceof Box) {\n Box box = (Box) original.entity;\n this.entity = new Box(box);\n }\n }\n else {\n this.entity = null;\n }\n this.goalLetter = original.goalLetter;\n }", "public Cell(){}", "@Test\n public void test_Copy() {\n //This tests the method with default values.\n System.out.println(\"Testing MeasuredRatioModel's copy()\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n MeasuredRatioModel expectedResult = instance;\n MeasuredRatioModel result = instance.copy();\n assertEquals(expectedResult, result);\n\n //This tests the method with specified values.\n instance=new MeasuredRatioModel(\"hello\",new BigDecimal(\"3.87695\"),\"ABS\",new BigDecimal(\"1.25\"),false,true);\n expectedResult = instance;\n result = instance.copy();\n assertEquals(expectedResult, result);\n }", "protected BlankRecord(Cell c)\r\n/* 25: */ {\r\n/* 26: 72 */ super(Type.BLANK, c);\r\n/* 27: */ }", "private Builder(baconhep.TTau other) {\n super(baconhep.TTau.SCHEMA$);\n if (isValidValue(fields()[0], other.pt)) {\n this.pt = data().deepCopy(fields()[0].schema(), other.pt);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.eta)) {\n this.eta = data().deepCopy(fields()[1].schema(), other.eta);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.phi)) {\n this.phi = data().deepCopy(fields()[2].schema(), other.phi);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.m)) {\n this.m = data().deepCopy(fields()[3].schema(), other.m);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.e)) {\n this.e = data().deepCopy(fields()[4].schema(), other.e);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.q)) {\n this.q = data().deepCopy(fields()[5].schema(), other.q);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.dzLeadChHad)) {\n this.dzLeadChHad = data().deepCopy(fields()[6].schema(), other.dzLeadChHad);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.nSignalChHad)) {\n this.nSignalChHad = data().deepCopy(fields()[7].schema(), other.nSignalChHad);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.nSignalGamma)) {\n this.nSignalGamma = data().deepCopy(fields()[8].schema(), other.nSignalGamma);\n fieldSetFlags()[8] = true;\n }\n if (isValidValue(fields()[9], other.antiEleMVA5)) {\n this.antiEleMVA5 = data().deepCopy(fields()[9].schema(), other.antiEleMVA5);\n fieldSetFlags()[9] = true;\n }\n if (isValidValue(fields()[10], other.antiEleMVA5Cat)) {\n this.antiEleMVA5Cat = data().deepCopy(fields()[10].schema(), other.antiEleMVA5Cat);\n fieldSetFlags()[10] = true;\n }\n if (isValidValue(fields()[11], other.rawMuonRejection)) {\n this.rawMuonRejection = data().deepCopy(fields()[11].schema(), other.rawMuonRejection);\n fieldSetFlags()[11] = true;\n }\n if (isValidValue(fields()[12], other.rawIso3Hits)) {\n this.rawIso3Hits = data().deepCopy(fields()[12].schema(), other.rawIso3Hits);\n fieldSetFlags()[12] = true;\n }\n if (isValidValue(fields()[13], other.rawIsoMVA3oldDMwoLT)) {\n this.rawIsoMVA3oldDMwoLT = data().deepCopy(fields()[13].schema(), other.rawIsoMVA3oldDMwoLT);\n fieldSetFlags()[13] = true;\n }\n if (isValidValue(fields()[14], other.rawIsoMVA3oldDMwLT)) {\n this.rawIsoMVA3oldDMwLT = data().deepCopy(fields()[14].schema(), other.rawIsoMVA3oldDMwLT);\n fieldSetFlags()[14] = true;\n }\n if (isValidValue(fields()[15], other.rawIsoMVA3newDMwoLT)) {\n this.rawIsoMVA3newDMwoLT = data().deepCopy(fields()[15].schema(), other.rawIsoMVA3newDMwoLT);\n fieldSetFlags()[15] = true;\n }\n if (isValidValue(fields()[16], other.rawIsoMVA3newDMwLT)) {\n this.rawIsoMVA3newDMwLT = data().deepCopy(fields()[16].schema(), other.rawIsoMVA3newDMwLT);\n fieldSetFlags()[16] = true;\n }\n if (isValidValue(fields()[17], other.puppiChHadIso)) {\n this.puppiChHadIso = data().deepCopy(fields()[17].schema(), other.puppiChHadIso);\n fieldSetFlags()[17] = true;\n }\n if (isValidValue(fields()[18], other.puppiGammaIso)) {\n this.puppiGammaIso = data().deepCopy(fields()[18].schema(), other.puppiGammaIso);\n fieldSetFlags()[18] = true;\n }\n if (isValidValue(fields()[19], other.puppiNeuHadIso)) {\n this.puppiNeuHadIso = data().deepCopy(fields()[19].schema(), other.puppiNeuHadIso);\n fieldSetFlags()[19] = true;\n }\n if (isValidValue(fields()[20], other.puppiChHadIsoNoLep)) {\n this.puppiChHadIsoNoLep = data().deepCopy(fields()[20].schema(), other.puppiChHadIsoNoLep);\n fieldSetFlags()[20] = true;\n }\n if (isValidValue(fields()[21], other.puppiGammaIsoNoLep)) {\n this.puppiGammaIsoNoLep = data().deepCopy(fields()[21].schema(), other.puppiGammaIsoNoLep);\n fieldSetFlags()[21] = true;\n }\n if (isValidValue(fields()[22], other.puppiNeuHadIsoNoLep)) {\n this.puppiNeuHadIsoNoLep = data().deepCopy(fields()[22].schema(), other.puppiNeuHadIsoNoLep);\n fieldSetFlags()[22] = true;\n }\n if (isValidValue(fields()[23], other.hpsDisc)) {\n this.hpsDisc = data().deepCopy(fields()[23].schema(), other.hpsDisc);\n fieldSetFlags()[23] = true;\n }\n }", "public Board(int width, int height) {\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t\tgrid = new boolean[width][height];\n\t\tcommitted = true;\n\t\twidths = new int[height];\n\t\theights = new int[width];\n\t\tmaxColumnHeight = 0;\n\n\t\tbackupGrid = new boolean[width][height];\n\t\tbackupHeights = new int[width];\n\t\tbackupWidths = new int [height];\n\t\tbackupMaxColumnHeight = 0;\n\t}" ]
[ "0.57085377", "0.5437258", "0.5390818", "0.52563286", "0.48526952", "0.48439628", "0.47962663", "0.45957166", "0.45912787", "0.45820835", "0.45343956", "0.45343956", "0.45343956", "0.45343956", "0.45301414", "0.44881538", "0.44746575", "0.44546455", "0.4441523", "0.44076666", "0.44003776", "0.4383655", "0.43774197", "0.43661836", "0.43223763", "0.43154866", "0.4313854", "0.4305714", "0.4303735", "0.43017155", "0.42980656", "0.42980283", "0.42746484", "0.42735037", "0.42678705", "0.42638654", "0.42465872", "0.4235119", "0.42344472", "0.4232763", "0.4230757", "0.4226959", "0.42268705", "0.42268634", "0.4217836", "0.42170742", "0.42008656", "0.41993156", "0.4195418", "0.41933954", "0.41916153", "0.419011", "0.41884902", "0.4187886", "0.41813964", "0.41756177", "0.41742125", "0.41729778", "0.41686046", "0.41667467", "0.4166614", "0.41654098", "0.41633013", "0.41600996", "0.41542786", "0.41508424", "0.41405162", "0.4120678", "0.41175815", "0.41175815", "0.41175815", "0.41175815", "0.4112592", "0.41093835", "0.4108606", "0.41077763", "0.41058788", "0.4105241", "0.41032758", "0.40977594", "0.40966004", "0.40913808", "0.40913272", "0.40874806", "0.40858498", "0.4084304", "0.40817815", "0.40785238", "0.4077108", "0.40647134", "0.4060463", "0.40574878", "0.40563828", "0.4052359", "0.40510067", "0.4038115", "0.4031331", "0.4022624", "0.40200853", "0.40161854" ]
0.53305835
3
Creates a new instance of CellBackup which differs from this CellBackup by revision date.
public CellBackup withRevisionDate(long revisionDate) { CellRevision newRevision = cellRevision.withRevisionDate(revisionDate); if (newRevision == cellRevision) return this; return new CellBackup(newRevision, this.techPool, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private CellBackup(CellRevision cellRevision, TechPool techPool, boolean modified) {\n this.cellRevision = cellRevision;\n this.techPool = techPool;\n this.modified = modified;\n cellBackupsCreated++;\n if (Job.getDebug())\n check();\n }", "public CellBackup withoutModified() {\n if (!this.modified) return this;\n return new CellBackup(this.cellRevision, this.techPool, false);\n }", "public static CellBackup newInstance(ImmutableCell d, TechPool techPool) {\n if (d.cellId.idManager != techPool.idManager)\n throw new IllegalArgumentException();\n if (techPool.getTech(d.techId) == null)\n throw new IllegalArgumentException();\n CellRevision cellRevision = new CellRevision(d);\n TechPool restrictedPool = techPool.restrict(cellRevision.techUsages, techPool);\n return new CellBackup(cellRevision, restrictedPool, true);\n }", "static CellBackup read(IdReader reader, TechPool techPool) throws IOException {\n CellRevision newRevision = CellRevision.read(reader);\n boolean modified = reader.readBoolean();\n TechPool restrictedPool = techPool.restrict(newRevision.techUsages, techPool);\n return new CellBackup(newRevision, restrictedPool, modified);\n }", "public AutomatizacionrevisionFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "@Override\n public void newRevision(Object revisionEntity) {\n }", "@Override\n public EditHistory createFromParcel(Parcel in) {\n return new EditHistory(in);\n }", "public static void main_revertBackup(){\n try {\n table = (HiringTable) tableClone.clone();\n System.out.println(\"Successfully reverted to the backup copy.\");\n } catch (CloneNotSupportedException ex){\n System.out.println(\"Clone not successful.\");\n main_menu();\n }\n }", "public CommonDDBean cloneVersion(String version) {\n return (CommonDDBean) clone();\n }", "Snapshot create();", "public DriverConfig createBackupDriver()\n {\n DriverConfig driver = new DriverConfig(this);\n \n _backupDriverList.add(driver);\n \n return driver;\n }", "public Backup() {\n initComponents();\n selecionarOpcoesDeBackup();\n }", "protected T copy() {\n\n // Initialize.\n T copy = null;\n\n try {\n\n // Create an instance of this entity class.\n copy = this.entityClass.newInstance();\n\n // Create a copy.\n copy.setCreateTime(this.getCreateTime());\n copy.setId(this.getId());\n copy.setModifyTime(this.getModifyTime());\n }\n catch (IllegalAccessException e) {\n // Ignore.\n }\n catch (InstantiationException e) {\n // Ignore.\n }\n\n return copy;\n }", "public FileVersion(int owner, int version, int revision) {\n this.owner = owner;\n this.version = version;\n this.revision = revision;\n }", "public abstract ModuleBackups backups();", "public Version(int major, int minor, int patch,\r\n\t\t\tboolean snapshot, Instant buildDate) {\r\n\t\t\r\n\t\tthis.major = major;\r\n\t\tthis.minor = minor;\r\n\t\tthis.patch = patch;\r\n\t\tthis.snapshot = snapshot;\r\n\t\tthis.buildDate = buildDate;\r\n\r\n\t\tthis.versionAsText = \"\" + major + \".\" + minor + \".\" + patch +\r\n\t\t\t\t(snapshot ? \"-SNAPSHOT\" : \"\") +\r\n\t\t\t\t(buildDate == null ? \"\" : \" \" + buildDate);\r\n\t}", "protected Backup()\n {\n m_buffer_ = new StringBuffer();\n }", "public static void main_backup(){\n try {\n tableClone = (HiringTable) table.clone();\n System.out.println(\"Successfully created backup.\");\n } catch (CloneNotSupportedException ex){\n System.out.println(\"Clone not successful.\");\n main_menu();\n }\n }", "public CellBackup with(ImmutableCell d,\n ImmutableNodeInst[] nodesArray, ImmutableArcInst[] arcsArray, ImmutableExport[] exportsArray,\n TechPool superPool) {\n CellRevision newRevision = cellRevision.with(d, nodesArray, arcsArray, exportsArray);\n TechPool restrictedPool = superPool.restrict(newRevision.techUsages, techPool);\n if (newRevision == cellRevision && restrictedPool == techPool) return this;\n if (arcsArray != null) {\n for (ImmutableArcInst a: arcsArray) {\n if (a != null && !a.check(restrictedPool))\n throw new IllegalArgumentException(\"arc \" + a.name + \" is not compatible with TechPool\");\n }\n }\n return new CellBackup(newRevision, restrictedPool, modified || newRevision != cellRevision);\n }", "long recalculateRevision();", "@DISPID(1)\r\n\t// = 0x1. The runtime will prefer the VTID if present\r\n\t@VTID(7)\r\n\tjava.util.Date revisionDateTime();", "@Test\n\tpublic void backupTest1() {\n\t\tMainPanel m = new MainPanel(15);\n\t\tCell[][] _cells = new Cell[15][15];\n\t\tfor(int i = 0; i < 15; i++) {\n\t\t\tfor(int j = 0; j < 15; j++) {\n\t\t\t _cells[i][j] = new Cell(false);\n\t\t\t}\n\t\t}\t\n\t\tm.backup1();\t\n\t\tassertEquals(m._backupCells[14][14].getAlive(), _cells[14][14].getAlive());\n\t}", "public static void main_compareBackup(){\n //table.equals(tableClone);\n\n if(table.equals(tableClone))\n System.out.println(\"Current list is the same as the backup copy.\");\n else\n System.out.println(\"Current list is not the same as the backup copy.\");\n }", "GitBlob(RevBlob aRB, String aPath) { _rev = aRB; _path = aPath; }", "public Record copy() {\n return new Record(\n this.id,\n this.location.copy(),\n this.score\n );\n }", "public CopyBuilder copy() {\n return new CopyBuilder(this);\n }", "@Nonnull\n public static UBL23WriterBuilder <ForecastRevisionType> forecastRevision ()\n {\n return UBL23WriterBuilder.create (ForecastRevisionType.class);\n }", "public OraRevision(ResultSet rs) throws SQLException {\n\t\trev_id = rs.getInt(\"rev_id\");\n\t\trev_page = rs.getInt(\"rev_page\");\n\t\trev_text_id = rs.getInt(\"rev_text_id\");\n\t\trev_timestamp = rs.getTimestamp(\"rev_timestamp\");\n\t\trev_comment = rs.getString(\"rev_comment\");\n\t\trev_user_text = rs.getString(\"user_name\");\n\t\t\n\t\tdbc = rs.getStatement().getConnection();\n\t}", "Model copy();", "public static GoldenCopy create(\n final String snapshotName,\n final String viewName,\n final Instant valuationTime,\n final CalculationResults calculationResults) {\n return new GoldenCopy(snapshotName, viewName, valuationTime, calculationResults);\n }", "public HeapElt copy() {\n HeapElt newElement = new HeapElt();\n \n newElement.setHandle(this.handle);\n newElement.setRecord(this.record);\n \n return newElement;\n }", "public RepositoryConfig copyWithBranch(String branch) {\n RepositoryConfig newConfig = GsonUtil.cloneGsonObject(this);\n newConfig.branch = branch;\n return newConfig;\n }", "public AddressBookEntry build() {\n return new AddressBookEntry(this);\n }", "public VCalendar clone() {\n\t\treturn new VCalendar(this.content, this.collectionId, this.resourceId, this.earliestStart, this.latestEnd, null);\n\t}", "private static Book createdChangedBook(Book book, Review review) {\n assert book != null;\n assert review != null;\n Name name = book.getName();\n Isbn isbn = book.getIsbn();\n Email email = book.getEmail();\n Language language = book.getLanguage();\n List<Review> reviews = book.getReviews();\n reviews.add(review);\n Times times = book.getTimes();\n Set<Category> categories = book.getCategories();\n Author author = book.getAuthor();\n Publisher publisher = book.getPublisher();\n Stocking stocking = book.getStocking();\n\n return new Book(name, isbn, email, language, times, categories, stocking, reviews, author, publisher);\n }", "public Builder setCreateDateBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n createDate_ = value;\n onChanged();\n return this;\n }", "public static SyncHistory createEntity() {\n return new SyncHistory();\n }", "public final ColumnInfo copy(boolean z) {\n return new BleKeyDataColumnInfo(this, z);\n }", "public Date getVersionDate ();", "private LCSRevisableEntity createRevisableEntry(LCSProduct product, LCSSKU lcsSKu,\n\t\t\tString materialNumber, String sizedefVR, String sourceVersion,\n\t\t\tString costsheetVersion, String specVersion, String sourceName, String costName,\n\t\t\tString specName, String nrfCode, String styleNumber, String materialDescription,\n\t\t\tString IBTINSTOREMONTH,Collection bomMOAStringColl) throws WTException , WTPropertyVetoException {\n\t\t\n\t\tLCSRevisableEntityLogic revisableEntityLogic = new LCSRevisableEntityLogic();\n\t\t\n\t\tLCSRevisableEntity createRevEntity=null;\n\n\t\tLCSLog.debug(CLASSNAME+\"createRevisableEntry(), this is a fresh entry\");\n\t\t\n\t\tFlexType IBTFlexType = FlexTypeCache\n\t\t.getFlexTypeFromPath(LFIBTConstants.ibtMaterialPath);\n\t\t\n\t\tLCSRevisableEntity ibtMaterialRevObj = LCSRevisableEntity.newLCSRevisableEntity();;\n\t\tString revId = \"\";\n\t\t// Create Blank Revisable Entity Object for the productId\n\t\t\n\t\t\n\t\t//revModel.load(FormatHelper.getObjectId(this.getRevObj()));\n\t\t// create a new model in order to create a new revisable entity.\n\t\t//LCSRevisableEntityClientModel ibtRevEntityModel = new LCSRevisableEntityClientModel();\n\t\t//ibtRevEntityModel.set\n\t\t//ibtRevEntityModel.load(FormatHelper.getObjectId(rev));\n\t\t// set the flextype to ibtRevEntityModel sub type\n\t\tibtMaterialRevObj.setFlexType(IBTFlexType);\n\t\t//System.out.println(\"****************Inside setFlexType ***********************\");\n\t\t//ibtMaterialRevObj.setRevisableEntityName(FormatHelper.format(materialNumber\n\t\t\t//\t+ dateFormat.format(Calendar.getInstance().getTime())));\n\t\t// set the product att in revisable entity child type\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTPRODUCT, product);\n\n\t\t//PLM-170 Adding product ID change\n\t\tString prodId = String.valueOf(((Double)product.getProductARevId()).intValue());\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTPRODUCTID, prodId);\n\t\t//PLM-170 Adding product ID change\n\n\t\t//System.out.println(\"****************Inside product ***********************\"+product);\n\n\t\t// setting the divison att for sap material. \n\t\t// This will drive the ACL functionality.\n\t\tString division = (String) season.getValue(divisionKey);\n\t\tLCSLog.debug(\"division -- \" + division);\n\t\t// setting division att in ibtRevEntityModel\n\t\tibtMaterialRevObj.setValue(\"lfDivision\", division);\n\n\t\t// set the colorway att in revisable entity child type\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTCOLORWAY, lcsSKu);\n\n\t\t// set the size definition version Id\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTMASTERGRID, sizedefVR);\n\t\t// set the sourcing-config version\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTSOURCINGCONFIG, sourceVersion);\n\t\t// set the cost-sheet version\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTCOSTSHEET, costsheetVersion);\n\t\t\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTSPECIFICATION, specVersion);\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.STAGINSPECNAME, specName);\n\t\t// set the source name that is used in the staging area\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTSTAGINGSOURCENAME, sourceName);\n\t\t// set the cost-sheet name to that is entered in staging area\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTSTAGINGCOSTSHEETNAME, costName);\n\t\t//Added for 7.6\n\t\tif (FormatHelper.hasContent(LFIBTConstants.IBTMATERIALSTATUS)) {\n\t\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTMATERIALSTATUS,\n\t\t\t\t\"Create\");\n\t\t}\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTCOSTSHEETSTATUS,\"Sent\");\n\t\t\n\t\t//Added for 7.6\n\t \t//Create BOM MOA Rows..\n\t\t//LFIBTUtil.setBOMMOARows(ibtRevEntityModel, \"lfIBTBOMDetails\", bomMOAStringColl,\"create\");\n\t\t// set the NRF code.\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTNRFCODE, nrfCode);\n\t\t// set style number\n\t\t// Build 6.14\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTSTYLENUMBER, styleNumber);\n\t\t// set material description\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTMATERIALDESC,\n\t\t\t\tmaterialDescription);\n\n\t\t// set In strore Month\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTINSTOREMONTH, IBTINSTOREMONTH);\n\t\t// set SAP material number\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTMATERIALNUMBER, materialNumber);\n\t\t// set the season att\n\t\tibtMaterialRevObj.setValue(LFIBTConstants.IBTMASTERSEASON, this.season);\n\n\t\t// set the boolean value to checked. This check is needed for the\n\t\t// plugin to pick up the revisable entity\n\t\t//ibtRevEntityModel.setValue(LFIBTConstants.IBTUPDATECHECK, Boolean.TRUE);\n\t\t// set the master object\n\t\tibtMaterialRevObj.setValue(\"lfIBTMaster\", this.masterRevEntity);\n\t\t\n\t//\tSystem.out.println(\"****************Inside 11111111 ***********************\");\n\n\t\t\n\t\t\n\t\tLCSRevisableEntity ibtMaterialRev = (LCSRevisableEntity)revisableEntityLogic.saveRevisableEntity(ibtMaterialRevObj);\n\t\t\n\t\t// masterModel.save();\n\t\t\n\t\t//createRevEntity=ibtRevEntityModel.getBusinessObject();\n\t\t//LCSLog.debug(\"slave created : -- \" + ibtMaterialRevObj);\n\t\t\n\t\tLCSLog.debug(CLASSNAME+\"createRevisableEntry(),Calling setBOMMOARows()\");\n\t\tLFIBTUtil.setBOMMOARows(ibtMaterialRev, \"lfIBTBOMDetails\", bomMOAStringColl, \"create\");\n\t\tLCSLog.debug(CLASSNAME+\"createRevisableEntry(),slave created : -- \" + ibtMaterialRev);\n return ibtMaterialRev;\n\t}", "@Override\n public LogStateColumn copy() {\n LogStateColumn newXCol = new LogStateColumn();\n copy(this, newXCol);\n return newXCol;\n }", "long getCurrentRevision();", "public AutoSnapshotDetails withDate(String date) {\n setDate(date);\n return this;\n }", "InstantDt createHistoryToTimestamp() {\n\t\treturn InstantDt.withCurrentTime();\n\t}", "public Builder setModifyDateBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n modifyDate_ = value;\n onChanged();\n return this;\n }", "public static Version getVersion() {\n return new Version();\n }", "public static Node copyFromJDO(DBONode jdo, DBORevision rev) throws DatastoreException{\r\n\t\tNode dto = new Node();\r\n\t\t copyFromJDO(dto, jdo, rev);\r\n\t\treturn dto;\r\n\t}", "public StrColumn getDateRevised() {\n return delegate.getColumn(\"date_revised\", DelegatingStrColumn::new);\n }", "long currentRevision();", "public Gateway copyChanges() {\n Gateway copy = new Gateway();\n copy.mergeChanges(this);\n copy.resetChangeLog();\n return copy;\n }", "public edu.usfca.cs.dfs.StorageMessages.BackUp.Builder getBackupBuilder() {\n return getBackupFieldBuilder().getBuilder();\n }", "CellBackup withRenamedIds(IdMapper idMapper, CellName newGroupName) {\n CellRevision newRevision = cellRevision.withRenamedIds(idMapper, newGroupName);\n if (newRevision == cellRevision) return this;\n return new CellBackup(newRevision, this.techPool, true);\n }", "public DataFrame copy() {\n return new DataFrame(data.values, header.values, index.values);\n }", "public void copy(RoomstlogBean bean) {\n setRoomstlogid(bean.getRoomstlogid());\n setRoomstid(bean.getRoomstid());\n setRoomid(bean.getRoomid());\n setStatusdate(bean.getStatusdate());\n setSt(bean.getSt());\n setRegbyid(bean.getRegbyid());\n setRegdate(bean.getRegdate());\n setReservationroomid(bean.getReservationroomid());\n setRoomtypeid(bean.getRoomtypeid());\n setBlockroomid(bean.getBlockroomid());\n setLogdate(bean.getLogdate());\n }", "public QueueEntry copy() {\n return new QueueEntry(playerName, string, loc, type);\n }", "public Revision(String revision) throws UnsupportedEncodingException{\n if (revision == null){\n throw new NullPointerException(\"Null revisons not allowed\");\n }\n this.revision = MessageLibrary.toBytes(revision);\n }", "@Override\n public BankPatch createNewPatch() {\n return super.createNewPatch();\n }", "Prototype makeCopy();", "public static RecentFragment newInstance(int pos){\n Extras.getInstance().setTabIndex(pos);\n return new RecentFragment();\n }", "public abstract B copy();", "public static VniHistory createEntity(EntityManager em) {\n VniHistory vniHistory = new VniHistory()\n .date(DEFAULT_DATE)\n .value(DEFAULT_VALUE);\n return vniHistory;\n }", "public \n OfflineExtFactory\n (\n String workUser, \n TreeMap<String,TreeSet<VersionID>> versions\n ) \n {\n super(workUser, versions); \n }", "protected VersionData() {}", "public BinaryContent createClone(BinaryContent t)\r\n\t{\n\t\treturn null;\r\n\t}", "public void setBackupTree1(TreeBuilder backupTree1) {\n\t\tthis.backupTree1 = backupTree1;\n\t}", "public Address copy() {\n\t\tAddress copy = new Address(this.street, this.city, this.state, this.zipCode);\n\t\treturn copy;\n\t}", "public Paper clone() \r\n\t{\r\n\t\tPaper copy = null;\r\n\t\ttry\r\n\t\t{ \r\n\t\t\tcopy = new Paper(this.getId(), new String(this.getTitle()), new String(this.getURI()),\r\n\t\t\t\tthis.year, new String(this.biblio_info), \r\n\t\t\t\tnew String(this.authors), new String(this.url) ); \r\n\t\t}\r\n\t\tcatch (Exception e) { e.printStackTrace(System.out); }\r\n\t\treturn copy;\r\n\t}", "public static IndexRow clone(IndexRow indexRow) {\r\n\t\tString idString = ResourceUtil.idString(indexRow.getArtifactID());\r\n\t\tString phyURI = indexRow.getPhyURI();\r\n\t\tIndexMetaData metaData = indexRow.getMetaData();\r\n\t\tboolean generated = indexRow.isGenerated();\r\n\r\n\t\treturn buildIndexRow(idString, phyURI, metaData, generated);\r\n\t}", "public yandex.cloud.api.ydb.v1.BackupOuterClass.Backup.Builder getBackupsBuilder(\n int index) {\n return getBackupsFieldBuilder().getBuilder(index);\n }", "public DatabaseEditorConfig clone(){\n\t\t\n\t\tDatabaseEditorConfig clonedObject = new DatabaseEditorConfig();\n\t\tRGB bg = null;\n\t\tif (backGround != null) {\n\t\t\tbg = new RGB(backGround.red, backGround.green, backGround.blue);\n\t\t}\n\t\tclonedObject.setBackGround(bg);\n\t\tclonedObject.setDatabaseComment(databaseComment);\n\t\t\n\t\treturn clonedObject;\n\t}", "protected SimulationVersion insertVersionableInit(InsertHashtable hash, Connection con, User user, Versionable versionable, String name, String annot, boolean bVersion, boolean bMathematicallyEquivalent) \r\n\t\t\tthrows DataAccessException, SQLException, RecordChangedException{\r\n\r\n\tSimulationVersion dbSimulationVersion = ((Simulation)versionable).getSimulationVersion();\r\n\tVersion newVersion = insertVersionableInit(hash,con,user,versionable,name,annot,bVersion);\r\n\t\r\n\t//\r\n\t// point to oldest mathematically equivalent ancestor, this will be used for all identification (status/data).\r\n\t//\r\n\tKeyValue parentSimRef = null;\r\n\tif (bMathematicallyEquivalent){\r\n\t\tif (dbSimulationVersion==null){\r\n\t\t\tthrow new RuntimeException(\"Simulation must have been saved for bMathematicallyEquivalent to be true\");\r\n\t\t}\r\n\t\tif (dbSimulationVersion.getParentSimulationReference()!=null){\r\n\t\t\t////\r\n\t\t\t//// mathematically equivalent, prior link is transitive (B->C and A==B, then A->C)\r\n\t\t\t////\r\n\t\t\tparentSimRef = dbSimulationVersion.getParentSimulationReference();\r\n\t\t}else{\r\n\t\t\t////\r\n\t\t\t//// mathematically equivalent, no prior link (A==B, then A->B)\r\n\t\t\t////\r\n\t\t\tparentSimRef = dbSimulationVersion.getVersionKey();\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn new SimulationVersion(newVersion.getVersionKey(),\r\n\t\t\t\t\t\t\t\tnewVersion.getName(),\r\n\t\t\t\t\t\t\t\tnewVersion.getOwner(),\r\n\t\t\t\t\t\t\t\tnewVersion.getGroupAccess(),\r\n\t\t\t\t\t\t\t\tnewVersion.getBranchPointRefKey(),\r\n\t\t\t\t\t\t\t\tnewVersion.getBranchID(),\r\n\t\t\t\t\t\t\t\tnewVersion.getDate(),\r\n\t\t\t\t\t\t\t\tnewVersion.getFlag(),\r\n\t\t\t\t\t\t\t\tnewVersion.getAnnot(),\r\n\t\t\t\t\t\t\t\tparentSimRef);\r\n}", "public Builder clearNewVersion() {\n \n newVersion_ = getDefaultInstance().getNewVersion();\n onChanged();\n return this;\n }", "@Test\n public void testCopy() {\n BuildingWorker worker = new BuildingWorker(\"one\", 1, 2);\n ICell copy = worker.copy();\n\n assertTrue(copy.isWorker());\n\n assertEquals(\"one\", copy.getPlayerName());\n assertEquals(1, copy.getWorkerNumber());\n assertEquals(2, copy.getHeight());\n\n assertNotEquals(worker, copy);\n }", "public Backup() {\n initComponents();\n }", "public IBusinessObject setCreationDate(Timestamp creationDate)\n throws ORIOException;", "GitCommit(RevCommit anRC) { _rev = anRC; }", "public ModuleDescriptorAdapter copy() {\n ModuleDescriptorAdapter copy = new ModuleDescriptorAdapter(getId(), getDescriptor(), getComponentId());\n copyTo(copy);\n copy.metaDataOnly = metaDataOnly;\n return copy;\n }", "public State dup (State self)\n {\n if (self == null)\n return null;\n\n State copy = new State ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.address = self.address;\n copy.addressPort = self.addressPort;\n copy.generation = self.generation;\n copy.max_version = self.max_version;\n copy.extra = new VersionedMap (self.extra);\n return copy;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\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 }", "public void createVersion(final ArtifactVersion version);", "Version create(Identity nodeId);", "public ConversionHistory() {\r\n conversionDate = LocalDate.now();\r\n }", "public RevisionHistoryDao(Connection conn) {\n super(conn);\n log.debug(\"Begin Constructor\");\n\n this.conn = conn;\n this.revisionDao = new RevisionDao(conn);\n\n log.debug(\"End Constructor\");\n }", "public static AutomatizacionrevisionFactory init() {\r\n\t\ttry {\r\n\t\t\tAutomatizacionrevisionFactory theAutomatizacionrevisionFactory = (AutomatizacionrevisionFactory)EPackage.Registry.INSTANCE.getEFactory(AutomatizacionrevisionPackage.eNS_URI);\r\n\t\t\tif (theAutomatizacionrevisionFactory != null) {\r\n\t\t\t\treturn theAutomatizacionrevisionFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new AutomatizacionrevisionFactoryImpl();\r\n\t}", "private File createBackupFile() throws IOException {\n File[] listFiles = dbBackupDir.listFiles();\n int length = listFiles.length;\n\n //Delete old copies\n if (length > 2) {\n for (int i = 0; i < length - 2; i++) {\n listFiles[i].delete();\n }\n }\n\n File dbBackup = new File(databaseFolderPath + \"/backup/db\" + time + \".db\");\n if (!dbBackup.exists()) {\n if (!dbBackup.createNewFile()) {\n throw new IOException(\"Cannot create backup file.\");\n }\n\n }\n return dbBackup;\n }", "public FormatVersion<TargetType, ReaderType> revision(int revision, StreamWriter<TargetType> writer, StreamReader<ReaderType> reader) {\n Preconditions.checkNotNull(writer, \"writer\");\n Preconditions.checkNotNull(reader, \"reader\");\n Preconditions.checkArgument(revision >= 0 && revision <= Byte.MAX_VALUE,\n \"Revision must be a non-negative value and less than or equal to %s.\", Byte.MAX_VALUE);\n Preconditions.checkArgument(this.revisions.isEmpty() || revision == this.revisions.get(this.revisions.size() - 1).getRevision() + 1,\n \"Expected revision to be incremental.\");\n this.revisions.add(new FormatRevision<>((byte) revision, writer, reader));\n return this;\n }", "private ReplicaInfo createNewReplicaObj(ExtendedBlock block, FsDatasetImpl\n fsDataSetImpl) throws IOException {\n ReplicaInfo replicaInfo = fsDataSetImpl.getReplicaInfo(block);\n FsVolumeSpi destVolume = getDestinationVolume(block, fsDataSetImpl);\n return fsDataSetImpl.copyReplicaToVolume(block, replicaInfo,\n destVolume.obtainReference());\n }", "@Nonnull\n private Observable<String> beginRevision() {\n JsonObject revision = new JsonObject()\n .put(Revision.DATE, Instant.now())\n .put(Revision.STATE, Revision.State.PENDING)\n .put(Revision.CHANGES, new JsonArray());\n\n return doCreate(REVISIONS_CNAME, revision);\n }", "public HistoryGraph() {\n revisions = new HashSet<Revision>();\n orderedRevisions = new ArrayList<Revision>();\n }", "public Builder setBackups(\n int index, yandex.cloud.api.ydb.v1.BackupOuterClass.Backup value) {\n if (backupsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureBackupsIsMutable();\n backups_.set(index, value);\n onChanged();\n } else {\n backupsBuilder_.setMessage(index, value);\n }\n return this;\n }", "private static Version createNewVersion(Version.VERSION_TYPE versionType, String username, String description,\r\n String oldVersionName) {\r\n Version version = new Version();\r\n String newVersionName = version.getNewVersionName(oldVersionName, versionType);\r\n\r\n version.setVersion(newVersionName);\r\n version.setVersionComment(description);\r\n version.setVersionDate(DateBean.toCompactString());\r\n version.setVersionUser(username);\r\n\r\n return version;\r\n }", "@Override\n public RelatedArtifactChangedColumn copy() {\n RelatedArtifactChangedColumn newXCol = new RelatedArtifactChangedColumn();\n super.copy(this, newXCol);\n return newXCol;\n }", "public void setCreationDate(Date bucketCreationDate)\n {\n this.creationDate = bucketCreationDate;\n }", "public abstract String getRevision();", "public java.util.Hashtable _copyFromEJB() {\n com.ibm.ivj.ejb.runtime.AccessBeanHashtable h = new com.ibm.ivj.ejb.runtime.AccessBeanHashtable();\n\n h.put(\"createdby\", getCreatedby());\n h.put(\"documentDate\", getDocumentDate());\n h.put(\"documentNumber\", getDocumentNumber());\n h.put(\"leaseDocument\", new Integer(getLeaseDocument()));\n h.put(\"created\", getCreated());\n h.put(\"modifiedby\", getModifiedby());\n h.put(\"operator\", getOperator());\n h.put(\"regionid\", new Integer(getRegionid()));\n h.put(\"modified\", getModified());\n h.put(\"__Key\", getEntityContext().getPrimaryKey());\n\n return h;\n\n}", "public Entry(Calendar date){\n this.date = date; \n }" ]
[ "0.6628871", "0.58714074", "0.58630973", "0.5769069", "0.47231615", "0.4718271", "0.46656173", "0.4623528", "0.4617655", "0.46007505", "0.45688382", "0.45568913", "0.45517212", "0.45516968", "0.45212102", "0.45197836", "0.45087945", "0.44998997", "0.44900995", "0.44879693", "0.44808185", "0.44726136", "0.44551978", "0.44310278", "0.44051304", "0.4404335", "0.4398539", "0.43948346", "0.4381057", "0.43751836", "0.43728226", "0.43687207", "0.43545207", "0.433544", "0.43285513", "0.4321511", "0.43099856", "0.43092522", "0.43001968", "0.4292799", "0.42880738", "0.42793494", "0.4265162", "0.4260414", "0.42490244", "0.4244757", "0.42389584", "0.4228585", "0.4226611", "0.42236638", "0.42226356", "0.422178", "0.42213562", "0.42183152", "0.42164454", "0.42134807", "0.42131844", "0.420454", "0.4195931", "0.41909844", "0.41897643", "0.4187917", "0.4183789", "0.41822636", "0.417963", "0.4177427", "0.4175344", "0.4175241", "0.41667598", "0.41659603", "0.41550714", "0.41534394", "0.41522643", "0.41513085", "0.4149504", "0.41435274", "0.41297206", "0.41213644", "0.41144046", "0.41144046", "0.41144046", "0.41144046", "0.41125783", "0.41119698", "0.4099731", "0.40997082", "0.40992972", "0.40986097", "0.4097632", "0.40911734", "0.40907934", "0.40906712", "0.40872478", "0.40871125", "0.40853986", "0.408517", "0.40816396", "0.40798613", "0.40758565", "0.40731585" ]
0.78400177
0
Creates a new instance of CellBackup with modified flag off.
public CellBackup withoutModified() { if (!this.modified) return this; return new CellBackup(this.cellRevision, this.techPool, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private CellBackup(CellRevision cellRevision, TechPool techPool, boolean modified) {\n this.cellRevision = cellRevision;\n this.techPool = techPool;\n this.modified = modified;\n cellBackupsCreated++;\n if (Job.getDebug())\n check();\n }", "public static CellBackup newInstance(ImmutableCell d, TechPool techPool) {\n if (d.cellId.idManager != techPool.idManager)\n throw new IllegalArgumentException();\n if (techPool.getTech(d.techId) == null)\n throw new IllegalArgumentException();\n CellRevision cellRevision = new CellRevision(d);\n TechPool restrictedPool = techPool.restrict(cellRevision.techUsages, techPool);\n return new CellBackup(cellRevision, restrictedPool, true);\n }", "protected Backup()\n {\n m_buffer_ = new StringBuffer();\n }", "@Test\n\tpublic void backupTest1() {\n\t\tMainPanel m = new MainPanel(15);\n\t\tCell[][] _cells = new Cell[15][15];\n\t\tfor(int i = 0; i < 15; i++) {\n\t\t\tfor(int j = 0; j < 15; j++) {\n\t\t\t _cells[i][j] = new Cell(false);\n\t\t\t}\n\t\t}\t\n\t\tm.backup1();\t\n\t\tassertEquals(m._backupCells[14][14].getAlive(), _cells[14][14].getAlive());\n\t}", "public Backup() {\n initComponents();\n selecionarOpcoesDeBackup();\n }", "public Builder clearBackup() {\n if (backupBuilder_ == null) {\n if (msgCase_ == 10) {\n msgCase_ = 0;\n msg_ = null;\n onChanged();\n }\n } else {\n if (msgCase_ == 10) {\n msgCase_ = 0;\n msg_ = null;\n }\n backupBuilder_.clear();\n }\n return this;\n }", "static CellBackup read(IdReader reader, TechPool techPool) throws IOException {\n CellRevision newRevision = CellRevision.read(reader);\n boolean modified = reader.readBoolean();\n TechPool restrictedPool = techPool.restrict(newRevision.techUsages, techPool);\n return new CellBackup(newRevision, restrictedPool, modified);\n }", "public static void main_backup(){\n try {\n tableClone = (HiringTable) table.clone();\n System.out.println(\"Successfully created backup.\");\n } catch (CloneNotSupportedException ex){\n System.out.println(\"Clone not successful.\");\n main_menu();\n }\n }", "public Backup() {\n initComponents();\n }", "public DriverConfig createBackupDriver()\n {\n DriverConfig driver = new DriverConfig(this);\n \n _backupDriverList.add(driver);\n \n return driver;\n }", "public static void main_revertBackup(){\n try {\n table = (HiringTable) tableClone.clone();\n System.out.println(\"Successfully reverted to the backup copy.\");\n } catch (CloneNotSupportedException ex){\n System.out.println(\"Clone not successful.\");\n main_menu();\n }\n }", "public CellIdentityWcdma copy() {\n return new CellIdentityWcdma(this);\n }", "private void backupInternalState(Backup backup)\n {\n backup.m_offset_ = m_source_.getIndex();\n backup.m_FCDLimit_ = m_FCDLimit_;\n backup.m_FCDStart_ = m_FCDStart_;\n backup.m_isCodePointHiragana_ = m_isCodePointHiragana_;\n backup.m_bufferOffset_ = m_bufferOffset_;\n backup.m_buffer_.setLength(0);\n if (m_bufferOffset_ >= 0) {\n backup.m_buffer_.append(m_buffer_);\n }\n }", "public Builder clearBackupId() {\n \n backupId_ = getDefaultInstance().getBackupId();\n onChanged();\n return this;\n }", "public Builder clearBackupId() {\n \n backupId_ = getDefaultInstance().getBackupId();\n onChanged();\n return this;\n }", "public Builder clearBackupId() {\n \n backupId_ = getDefaultInstance().getBackupId();\n onChanged();\n return this;\n }", "public Builder clearBackupId() {\n \n backupId_ = getDefaultInstance().getBackupId();\n onChanged();\n return this;\n }", "public Builder clearBackups() {\n if (backupsBuilder_ == null) {\n backups_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n backupsBuilder_.clear();\n }\n return this;\n }", "public Cell() {\r\n\t\tthis.mineCount = 0;\r\n\t\tthis.isFlagged = false;\r\n\t\tthis.isExposed = false;\r\n\t\tthis.isMine = false;\r\n\t}", "public edu.usfca.cs.dfs.StorageMessages.BackUp.Builder getBackupBuilder() {\n return getBackupFieldBuilder().getBuilder();\n }", "CellBackup withRenamedIds(IdMapper idMapper, CellName newGroupName) {\n CellRevision newRevision = cellRevision.withRenamedIds(idMapper, newGroupName);\n if (newRevision == cellRevision) return this;\n return new CellBackup(newRevision, this.techPool, true);\n }", "public DatabaseEditorConfig clone(){\n\t\t\n\t\tDatabaseEditorConfig clonedObject = new DatabaseEditorConfig();\n\t\tRGB bg = null;\n\t\tif (backGround != null) {\n\t\t\tbg = new RGB(backGround.red, backGround.green, backGround.blue);\n\t\t}\n\t\tclonedObject.setBackGround(bg);\n\t\tclonedObject.setDatabaseComment(databaseComment);\n\t\t\n\t\treturn clonedObject;\n\t}", "@Test\n public void testCopy() {\n BuildingWorker worker = new BuildingWorker(\"one\", 1, 2);\n ICell copy = worker.copy();\n\n assertTrue(copy.isWorker());\n\n assertEquals(\"one\", copy.getPlayerName());\n assertEquals(1, copy.getWorkerNumber());\n assertEquals(2, copy.getHeight());\n\n assertNotEquals(worker, copy);\n }", "public void setWarnBackup (boolean warnBackup)\r\n\t{\r\n\t\tm_warnBackup = warnBackup;\r\n\t}", "public SecurityManager newBackupBean() {\n return new SecurityManagerAdapter();\n }", "public abstract void doBackup();", "public CellBackup withRevisionDate(long revisionDate) {\n CellRevision newRevision = cellRevision.withRevisionDate(revisionDate);\n if (newRevision == cellRevision) return this;\n return new CellBackup(newRevision, this.techPool, true);\n }", "edu.usfca.cs.dfs.StorageMessages.BackUp getBackup();", "public CopyBuilder copy() {\n return new CopyBuilder(this);\n }", "public Builder clearCompressed() {\n \n compressed_ = false;\n onChanged();\n return this;\n }", "public Builder setOffline(boolean value) {\n copyOnWrite();\n instance.setOffline(value);\n return this;\n }", "public Binaire clone(){\n\t\treturn new Binaire(this.symbole, this.gauche.clone(), this.droit.clone());\n\t}", "Prototype makeCopy();", "public NotebookCell() {}", "public TransactionBuilder readOnly();", "public void forceBackup() {\n // If you configures storage support as a file,\n // method push() send all data from memory into file referenced into properties file.\n // Before writing, all expired data will be flushed.\n DacasTransaction.push();\n\n }", "public TelaFazBackup() {\n initComponents();\n }", "public yandex.cloud.api.operation.OperationOuterClass.Operation backup(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.BackupClusterRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getBackupMethod(), getCallOptions(), request);\n }", "static void setNotCopying(){isCopying=false;}", "public Builder clearModifiedTimestamp() {\n \n modifiedTimestamp_ = 0L;\n onChanged();\n return this;\n }", "static void setNotAutoCopy(){isAutoCopying=false;}", "public void markCellAccessModeCreate() throws JNCException {\n markLeafCreate(\"cellAccessMode\");\n }", "Cell() {\r\n\t\tstate = CellState.EMPTY;\r\n\t}", "public abstract ICloudBackup getBackupImpl();", "public IonModification createOpposite() {\n return new IonModification(getType(), name, molFormula, -mass, charge);\n }", "public Cell(){}", "public static GoldenCopy.Builder builder() {\n return new GoldenCopy.Builder();\n }", "private File createBackupFile() throws IOException {\n File[] listFiles = dbBackupDir.listFiles();\n int length = listFiles.length;\n\n //Delete old copies\n if (length > 2) {\n for (int i = 0; i < length - 2; i++) {\n listFiles[i].delete();\n }\n }\n\n File dbBackup = new File(databaseFolderPath + \"/backup/db\" + time + \".db\");\n if (!dbBackup.exists()) {\n if (!dbBackup.createNewFile()) {\n throw new IOException(\"Cannot create backup file.\");\n }\n\n }\n return dbBackup;\n }", "public Object clone() {\n \n\tQuerynotyfyaddressbol obj = new Querynotyfyaddressbol(getObjectsDatastore());\n\n\tobj.iNotifyaddress = iNotifyaddress; \n\n\treturn obj;\n }", "edu.usfca.cs.dfs.StorageMessages.BackUpOrBuilder getBackupOrBuilder();", "public DBMaker readonly() {\n readonly = true;\n return this;\n }", "public final ColumnInfo copy(boolean z) {\n return new BleKeyDataColumnInfo(this, z);\n }", "public Builder setBackup(\n edu.usfca.cs.dfs.StorageMessages.BackUp.Builder builderForValue) {\n if (backupBuilder_ == null) {\n msg_ = builderForValue.build();\n onChanged();\n } else {\n backupBuilder_.setMessage(builderForValue.build());\n }\n msgCase_ = 10;\n return this;\n }", "public static Builder create(){\n return new Builder(Tribit.ZERO);\n }", "public void makeImmutable() {\n mutable = false;\n }", "public DBObject createNew() {\n DBObjectImpl obj = (DBObjectImpl) getNewObject();\n obj.DELETE_STMT_STR = DELETE_STMT_STR;\n obj.INSERT_STMT_STR = INSERT_STMT_STR;\n obj.UPDATE_STMT_STR = UPDATE_STMT_STR;\n obj.QUERY_STMT_STR = QUERY_STMT_STR;\n\n return obj;\n }", "DSGeneMarker deepCopy();", "public Cell(){\n \tthis.shot=false;\n }", "Not createNot();", "Not createNot();", "public Gateway copyChanges() {\n Gateway copy = new Gateway();\n copy.mergeChanges(this);\n copy.resetChangeLog();\n return copy;\n }", "public boolean hasBackup() {\n return msgCase_ == 10;\n }", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> backup(\n yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.BackupClusterRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getBackupMethod(), getCallOptions()), request);\n }", "Snapshot create();", "public br.unb.cic.bionimbus.avro.gen.JobInfo.Builder clearTimestamp() {\n fieldSetFlags()[6] = false;\n return this;\n }", "public Builder clearOffline() {\n copyOnWrite();\n instance.clearOffline();\n return this;\n }", "public abstract ModuleBackups backups();", "public boolean backupWithoutPrompt() {\n boolean modOK = modIfChanged();\n boolean backedUp = false;\n if (modOK) {\n File backupFolder = getBackupFolder();\n if(backupFolder != null) {\n backedUp = backup (backupFolder);\n if (backedUp) {\n FileSpec fileSpec = recentFiles.get(0);\n fileSpec.setBackupFolder(backupFolder);\n }\n } // end if the user selected a backup location\n } // end if modIfChanged had no problems\n \n if (! backedUp) {\n trouble.report(\"Could not complete backup\", \"Backup Errors\");\n }\n \n return backedUp;\n }", "public Clone() {}", "protected final Object clone() {\n\t\tBitBoardImpl clone = new BitBoardImpl();\n\t\tfor( int i = 0; i < 5; i++) {\n\t\t clone._boardLayer[i] = _boardLayer[i];\n\t\t}\n\t\treturn clone;\n }", "@Nullable\n public static CustomerDeletedMessagePayload deepCopy(@Nullable final CustomerDeletedMessagePayload template) {\n if (template == null) {\n return null;\n }\n CustomerDeletedMessagePayloadImpl instance = new CustomerDeletedMessagePayloadImpl();\n return instance;\n }", "public void backup() \r\n\t{\r\n\t\tif (lastc != ALERT) {\r\n\t\t\tholdc = thisc;\r\n\t\t\tthisc = lastc;\r\n\t\t\tlastc = ALERT;\r\n\t\t}\r\n\t}", "public Record copy() {\n return new Record(\n this.id,\n this.location.copy(),\n this.score\n );\n }", "@Override\n public Board clone() {\n return new Board(copyOf(this.board));\n }", "public boolean hasBackup() {\n return msgCase_ == 10;\n }", "public Cell() {\n\t\tthis.alive = false; // Initially dead\n\t\tthis.age = 0; // Initially age of 0\n\t}", "public Builder clearTimestamp() {\n\n timestamp_ = getDefaultInstance().getTimestamp();\n onChanged();\n return this;\n }", "public static void main_compareBackup(){\n //table.equals(tableClone);\n\n if(table.equals(tableClone))\n System.out.println(\"Current list is the same as the backup copy.\");\n else\n System.out.println(\"Current list is not the same as the backup copy.\");\n }", "public\n BioterrainMarker() {\n\t\tmarker = new BioterrainMarkerDb();\n\t\tisNew = true;\n }", "@Override\r\n\tpublic ArrayList<Cell> behaviorClone() {\r\n\t\tenergy = (energy-20)/2;\r\n\t\tmass = mass/2;\r\n\t\tArrayList<Cell> newCell = new ArrayList<Cell>();\r\n\t\tnewCell.add(new Grazer(petri, rng, x, y, xVelocity, yVelocity, mass, energy));\r\n\t\treturn newCell;\r\n\t}", "public Builder clearCreatedTime() {\n copyOnWrite();\n instance.clearCreatedTime();\n return this;\n }", "public boolean isWarnBackup ()\r\n\t{\r\n\t\treturn m_warnBackup;\r\n\t}", "public Builder clearTimestamp() {\n \n timestamp_ = getDefaultInstance().getTimestamp();\n onChanged();\n return this;\n }", "public Builder clearTimestamp() {\n \n timestamp_ = getDefaultInstance().getTimestamp();\n onChanged();\n return this;\n }", "public CellBackup with(ImmutableCell d,\n ImmutableNodeInst[] nodesArray, ImmutableArcInst[] arcsArray, ImmutableExport[] exportsArray,\n TechPool superPool) {\n CellRevision newRevision = cellRevision.with(d, nodesArray, arcsArray, exportsArray);\n TechPool restrictedPool = superPool.restrict(newRevision.techUsages, techPool);\n if (newRevision == cellRevision && restrictedPool == techPool) return this;\n if (arcsArray != null) {\n for (ImmutableArcInst a: arcsArray) {\n if (a != null && !a.check(restrictedPool))\n throw new IllegalArgumentException(\"arc \" + a.name + \" is not compatible with TechPool\");\n }\n }\n return new CellBackup(newRevision, restrictedPool, modified || newRevision != cellRevision);\n }", "public Builder clearEditedTime() {\n copyOnWrite();\n instance.clearEditedTime();\n return this;\n }", "private DeleteBackupMetadata(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public State dup (State self)\n {\n if (self == null)\n return null;\n\n State copy = new State ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.address = self.address;\n copy.addressPort = self.addressPort;\n copy.generation = self.generation;\n copy.max_version = self.max_version;\n copy.extra = new VersionedMap (self.extra);\n return copy;\n }", "static Wallet createInMemoryWallet() {\n return new InMemoryWallet();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Backup_Label_Heading = new javax.swing.JLabel();\n Backup_Label_Date = new javax.swing.JLabel();\n Backup_Label_Time = new javax.swing.JLabel();\n Backup_TextF_Date = new javax.swing.JTextField();\n Backup_TextF_Time = new javax.swing.JTextField();\n Backup_Label_LastBackup = new javax.swing.JLabel();\n Backup_Label_LastDate = new javax.swing.JLabel();\n Backup_TextF_Path = new javax.swing.JTextField();\n Backup_Label_LastTime = new javax.swing.JLabel();\n Backup_Label_Path = new javax.swing.JLabel();\n Sep_1 = new javax.swing.JSeparator();\n Backup_Btn_Browse = new javax.swing.JButton();\n Backup_Btn_Back = new javax.swing.JButton();\n Backup_Btn_Backup = new javax.swing.JButton();\n\n setBackground(new java.awt.Color(204, 204, 204));\n setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n setPreferredSize(new java.awt.Dimension(1084, 550));\n\n Backup_Label_Heading.setFont(new java.awt.Font(\"SansSerif\", 1, 24)); // NOI18N\n Backup_Label_Heading.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_Heading.setText(\"Backup\");\n\n Backup_Label_Date.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Label_Date.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_Date.setText(\"Date : \");\n\n Backup_Label_Time.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Label_Time.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_Time.setText(\"Time : \");\n\n Backup_TextF_Date.setEditable(false);\n Backup_TextF_Date.setToolTipText(\"Date\");\n\n Backup_TextF_Time.setEditable(false);\n Backup_TextF_Time.setToolTipText(\"Time\");\n\n Backup_Label_LastBackup.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Label_LastBackup.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_LastBackup.setText(\"Last Backup : \");\n\n Backup_Label_LastDate.setFont(new java.awt.Font(\"SansSerif\", 0, 14)); // NOI18N\n Backup_Label_LastDate.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_LastDate.setText(\"Date\");\n Backup_Label_LastDate.setToolTipText(\"Last Backup Date\");\n\n Backup_TextF_Path.setEditable(false);\n Backup_TextF_Path.setToolTipText(\"Backup Path\");\n\n Backup_Label_LastTime.setFont(new java.awt.Font(\"SansSerif\", 0, 14)); // NOI18N\n Backup_Label_LastTime.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_LastTime.setText(\"Time\");\n Backup_Label_LastTime.setToolTipText(\"Last Backup Tme\");\n\n Backup_Label_Path.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Label_Path.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Label_Path.setText(\"Path : \");\n\n Sep_1.setBackground(new java.awt.Color(204, 204, 204));\n Sep_1.setForeground(new java.awt.Color(153, 153, 153));\n Sep_1.setOrientation(javax.swing.SwingConstants.VERTICAL);\n\n Backup_Btn_Browse.setBackground(new java.awt.Color(204, 204, 204));\n Backup_Btn_Browse.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Btn_Browse.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Btn_Browse.setText(\"Browse\");\n Backup_Btn_Browse.setToolTipText(\"Browse\");\n Backup_Btn_Browse.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n Backup_Btn_Browse.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Backup_Btn_BrowseActionPerformed(evt);\n }\n });\n\n Backup_Btn_Back.setBackground(new java.awt.Color(204, 204, 204));\n Backup_Btn_Back.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Btn_Back.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Btn_Back.setText(\"Back\");\n Backup_Btn_Back.setToolTipText(\"Back\");\n Backup_Btn_Back.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n Backup_Btn_Back.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Backup_Btn_BackActionPerformed(evt);\n }\n });\n\n Backup_Btn_Backup.setBackground(new java.awt.Color(204, 204, 204));\n Backup_Btn_Backup.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); // NOI18N\n Backup_Btn_Backup.setForeground(new java.awt.Color(51, 51, 51));\n Backup_Btn_Backup.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/Btn_icon/bacup_2.png\"))); // NOI18N\n Backup_Btn_Backup.setText(\"Backup\");\n Backup_Btn_Backup.setToolTipText(\"Backup\");\n Backup_Btn_Backup.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n Backup_Btn_Backup.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Backup_Btn_BackupActionPerformed(evt);\n }\n });\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(499, 499, 499)\n .addComponent(Backup_Label_Heading))\n .addGroup(layout.createSequentialGroup()\n .addGap(168, 168, 168)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(Backup_Label_Date)\n .addComponent(Backup_Label_Path, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Backup_Label_Time)\n .addComponent(Backup_Label_LastBackup))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Backup_TextF_Date, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Backup_TextF_Time, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(Backup_Label_LastDate, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(Sep_1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(Backup_Label_LastTime, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(Backup_TextF_Path, javax.swing.GroupLayout.PREFERRED_SIZE, 543, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(Backup_Btn_Back, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(Backup_Btn_Backup))\n .addComponent(Backup_Btn_Browse, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))))))\n .addContainerGap(60, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(Backup_Label_Heading)\n .addGap(50, 50, 50)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(Backup_Label_LastTime, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Sep_1)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Backup_Label_LastBackup, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Backup_Label_LastDate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGap(18, 18, 18)\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.BASELINE)\n .addComponent(Backup_TextF_Path, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Backup_Label_Path)\n .addComponent(Backup_Btn_Browse, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(Backup_Label_Date))\n .addComponent(Backup_TextF_Date, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Backup_Label_Time)\n .addComponent(Backup_TextF_Time, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 239, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Backup_Btn_Backup)\n .addComponent(Backup_Btn_Back, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(30, 30, 30))\n );\n }", "public Newsletter copy() throws TorqueException\n {\n return copyInto(new Newsletter());\n }", "public edu.usfca.cs.dfs.StorageMessages.BackUpOrBuilder getBackupOrBuilder() {\n if ((msgCase_ == 10) && (backupBuilder_ != null)) {\n return backupBuilder_.getMessageOrBuilder();\n } else {\n if (msgCase_ == 10) {\n return (edu.usfca.cs.dfs.StorageMessages.BackUp) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.BackUp.getDefaultInstance();\n }\n }", "@Override\n public BankPatch createNewPatch() {\n return super.createNewPatch();\n }", "public BinaryContent createClone(BinaryContent t)\r\n\t{\n\t\treturn null;\r\n\t}", "public static AddressableDataFile getEmptyImmutableDataFile() {\n return new EmptyDataFile();\n }", "@Override\n public BatchOptions clone() {\n BatchOptions clone;\n try {\n clone = (BatchOptions) super.clone();\n } catch (CloneNotSupportedException e) {\n clone = new BatchOptions();\n }\n\n return clone.partitionKey(partitionKey)\n .maximumSizeInBytes(maximumSizeInBytes);\n }", "@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void crearBillboardTest() {\r\n\r\n\t\tpd.crearBillboard();\r\n\t\tpd.pm.deletePersistent(pd.b1);\r\n\t\tpd.pm.deletePersistent(pd.b2);\r\n\t\tpd.pm.deletePersistent(pd.b3);\r\n\t\tpd.pm.deletePersistent(pd.b4);\r\n\r\n\t}", "@Override\n public boolean isFrozen() {\n return true;\n }", "public Memory() {\n this(false);\n }", "public MappingInfo copy()\r\n\t{\r\n\t\tArrayList<MappingCell> mappingCells = new ArrayList<MappingCell>();\r\n\t\tfor(MappingCell mappingCell : mappingCellHash.get())\r\n\t\t\tmappingCells.add(mappingCell);\r\n\t\treturn new MappingInfo(mapping.copy(),mappingCells);\r\n\t}" ]
[ "0.67033947", "0.58929306", "0.55815804", "0.55228317", "0.5355775", "0.52533776", "0.52262706", "0.5091471", "0.4948002", "0.48849827", "0.4875953", "0.48475528", "0.48121047", "0.47750422", "0.47750422", "0.47750422", "0.47750422", "0.4758603", "0.4756976", "0.47502872", "0.47026303", "0.46940997", "0.46714365", "0.46325892", "0.46282163", "0.46197414", "0.4615258", "0.46110302", "0.46042415", "0.45813906", "0.45804122", "0.45703858", "0.45628828", "0.45569927", "0.45478413", "0.45287114", "0.45128074", "0.45121172", "0.4509667", "0.45039847", "0.4500251", "0.44897696", "0.44851574", "0.4481754", "0.44775277", "0.44603264", "0.44528416", "0.44497043", "0.44419858", "0.4437142", "0.44319946", "0.4413646", "0.4403736", "0.43980837", "0.43967125", "0.43927613", "0.4391592", "0.4388368", "0.4386691", "0.4386691", "0.43848833", "0.43808624", "0.43795305", "0.43643972", "0.43629992", "0.43571883", "0.43567634", "0.43519217", "0.43494213", "0.43452612", "0.43441814", "0.43366638", "0.4336122", "0.4333777", "0.43327597", "0.43285632", "0.4328068", "0.43277615", "0.43214136", "0.43210799", "0.43202844", "0.431927", "0.43190512", "0.43190512", "0.43064207", "0.42995355", "0.42970112", "0.4291171", "0.4287547", "0.42865896", "0.42827278", "0.42809102", "0.42766228", "0.42724892", "0.42657185", "0.42582408", "0.42517054", "0.42514297", "0.42386413", "0.42383212" ]
0.78205913
0
Returns CellBackup which differs from this CellBackup by TechPool.
public CellBackup withTechPool(TechPool techPool) { TechPool restrictedPool = techPool.restrict(cellRevision.techUsages, this.techPool); if (this.techPool == restrictedPool) return this; if (techPool.idManager != this.techPool.idManager) throw new IllegalArgumentException(); // for (Technology tech: this.techPool.values()) { // if (techPool.get(tech.getId()) != tech) // throw new IllegalArgumentException(); // } return new CellBackup(this.cellRevision, restrictedPool, this.modified); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CellBackup withoutModified() {\n if (!this.modified) return this;\n return new CellBackup(this.cellRevision, this.techPool, false);\n }", "static CellBackup read(IdReader reader, TechPool techPool) throws IOException {\n CellRevision newRevision = CellRevision.read(reader);\n boolean modified = reader.readBoolean();\n TechPool restrictedPool = techPool.restrict(newRevision.techUsages, techPool);\n return new CellBackup(newRevision, restrictedPool, modified);\n }", "public static CellBackup newInstance(ImmutableCell d, TechPool techPool) {\n if (d.cellId.idManager != techPool.idManager)\n throw new IllegalArgumentException();\n if (techPool.getTech(d.techId) == null)\n throw new IllegalArgumentException();\n CellRevision cellRevision = new CellRevision(d);\n TechPool restrictedPool = techPool.restrict(cellRevision.techUsages, techPool);\n return new CellBackup(cellRevision, restrictedPool, true);\n }", "private CellBackup(CellRevision cellRevision, TechPool techPool, boolean modified) {\n this.cellRevision = cellRevision;\n this.techPool = techPool;\n this.modified = modified;\n cellBackupsCreated++;\n if (Job.getDebug())\n check();\n }", "edu.usfca.cs.dfs.StorageMessages.BackUp getBackup();", "public abstract ICloudBackup getBackupImpl();", "public DriverConfig createBackupDriver()\n {\n DriverConfig driver = new DriverConfig(this);\n \n _backupDriverList.add(driver);\n \n return driver;\n }", "public edu.usfca.cs.dfs.StorageMessages.BackUp getBackup() {\n if (backupBuilder_ == null) {\n if (msgCase_ == 10) {\n return (edu.usfca.cs.dfs.StorageMessages.BackUp) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.BackUp.getDefaultInstance();\n } else {\n if (msgCase_ == 10) {\n return backupBuilder_.getMessage();\n }\n return edu.usfca.cs.dfs.StorageMessages.BackUp.getDefaultInstance();\n }\n }", "public CellIdentityWcdma copy() {\n return new CellIdentityWcdma(this);\n }", "public TreeBuilder getBackupTree2() {\n\t\treturn backupTree2;\n\t}", "yandex.cloud.api.ydb.v1.BackupOuterClass.Backup getBackups(int index);", "public T m16770B() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n e.printStackTrace();\n return null;\n }\n }", "com.google.cloud.gkebackup.v1.BackupPlan.BackupConfig getBackupConfig();", "public Week getCopy() {\r\n Week w = new Week();\r\n for (int d = 0; d < 5; d++) {\r\n for (int h = 0; h < 13; h++) {\r\n w.setOne(d, h, weekData[d][h]);\r\n w.setName(\"+Copy of \" + this.getName());\r\n }\r\n }\r\n return w;\r\n }", "public edu.usfca.cs.dfs.StorageMessages.BackUp getBackup() {\n if (msgCase_ == 10) {\n return (edu.usfca.cs.dfs.StorageMessages.BackUp) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.BackUp.getDefaultInstance();\n }", "public edu.usfca.cs.dfs.StorageMessages.BackUp.Builder getBackupBuilder() {\n return getBackupFieldBuilder().getBuilder();\n }", "public GoLBoard copyBoard()\n\t{\n\t\t//tempBoard = A GoLBoard object that will become the copy\n\t\t//currCell = the cell that will be examined\n\t\t//compString = the actual class of the GoLCell in String form\n \tGoLBoard tempBoard = new GoLBoard(setSize);\n \tGoLCell currCell;\n \tString compString;\n \t\n \t//currRow = current row\n \t//currCol = current column\n \t//Copy the current GoLCell onto the copy GoLCell\n \t//Determine whether the cell is strong, weak, or normal\n \tfor (int currRow = 1; currRow <= setSize; currRow++)\n \t{\n \tfor (int currCol = 1; currCol <= setSize; currCol++)\n \t{\n \t\tcurrCell = myGoLCell[currRow][currCol];\n \t\tcompString = currCell.getClass().getName();\n \t\t\n \t\tif (compString.contains(\"Strong\"))\n \t\t{\n \t\t\ttempBoard.myGoLCell[currRow][currCol] =\n \t\t\t\t\tnew GoLStrongCell(this.myGoLCell[currRow][currCol].isAlive());\n \t\t\t\t\t\n \t\t}\n \t\telse if (compString.contains(\"Weak\"))\n \t\t{\n \t\t\ttempBoard.myGoLCell[currRow][currCol] =\n \t\t\t\t\tnew GoLWeakCell(this.myGoLCell[currRow][currCol].isAlive());\n \t\t}\n \t\telse\n \t\t{\n \t\t\ttempBoard.myGoLCell[currRow][currCol] =\n \t\t\t\t\tnew GoLCell(this.myGoLCell[currRow][currCol].isAlive());\n \t\t}\n \t}\n \t}\n \t \n \t//return the temporary board that was created\n \treturn tempBoard;\n\t}", "public static void main_compareBackup(){\n //table.equals(tableClone);\n\n if(table.equals(tableClone))\n System.out.println(\"Current list is the same as the backup copy.\");\n else\n System.out.println(\"Current list is not the same as the backup copy.\");\n }", "public static DataSourceSwapperRegistry getInstance() {\n return INSTANCE;\n }", "public static Note getB() {return (Note)B.clone();}", "public ConfabulatorObject getCopy() {\n\t\tConfabulatorObject copy = new ConfabulatorObject(getMessenger());\n\t\tlockMe(this);\n\t\tint maxD = maxLinkDistance;\n\t\tint maxC = maxLinkCount;\n\t\tList<Link> linksCopy = new ArrayList<Link>();\n\t\tfor (Link lnk: links) {\n\t\t\tlinksCopy.add(lnk.getCopy());\n\t\t}\n\t\tunlockMe(this);\n\t\tcopy.initialize(maxD,maxC,linksCopy);\n\t\treturn copy;\n\t}", "private Shop shallowCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "@Test\n\tpublic void backupTest1() {\n\t\tMainPanel m = new MainPanel(15);\n\t\tCell[][] _cells = new Cell[15][15];\n\t\tfor(int i = 0; i < 15; i++) {\n\t\t\tfor(int j = 0; j < 15; j++) {\n\t\t\t _cells[i][j] = new Cell(false);\n\t\t\t}\n\t\t}\t\n\t\tm.backup1();\t\n\t\tassertEquals(m._backupCells[14][14].getAlive(), _cells[14][14].getAlive());\n\t}", "public Memoable copy()\n {\n return new Zuc256Engine(this);\n }", "@Override\n protected Object clone() throws CloneNotSupportedException {\n throw new CloneNotSupportedException();\n // return super.clone(); // OR we can return the already present :: return getInstance();\n }", "public Grid copyGrid() {\n Grid copy = new Grid(grid.length);\n System.arraycopy(grid, 0, copy.getGrid(), 0, grid.length);\n return copy;\n }", "public T copy() {\n T ret = createLike();\n ret.getMatrix().setTo(this.getMatrix());\n return ret;\n }", "protected final Object clone() {\n\t\tBitBoardImpl clone = new BitBoardImpl();\n\t\tfor( int i = 0; i < 5; i++) {\n\t\t clone._boardLayer[i] = _boardLayer[i];\n\t\t}\n\t\treturn clone;\n }", "public QueueEntry copy() {\n return new QueueEntry(playerName, string, loc, type);\n }", "public edu.usfca.cs.dfs.StorageMessages.BackUpOrBuilder getBackupOrBuilder() {\n if ((msgCase_ == 10) && (backupBuilder_ != null)) {\n return backupBuilder_.getMessageOrBuilder();\n } else {\n if (msgCase_ == 10) {\n return (edu.usfca.cs.dfs.StorageMessages.BackUp) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.BackUp.getDefaultInstance();\n }\n }", "public Matrix copy(){\r\n \t if(this==null){\r\n \t return null;\r\n \t }\r\n \t else{\r\n \t int nr = this.nrow;\r\n \t int nc = this.ncol;\r\n \t Matrix b = new Matrix(nr,nc);\r\n \t double[][] barray = b.getArrayReference();\r\n \t b.nrow = nr;\r\n \t b.ncol = nc;\r\n \t for(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tbarray[i][j]=this.matrix[i][j];\r\n \t\t}\r\n \t }\r\n \t for(int i=0; i<nr; i++)b.index[i] = this.index[i];\r\n \t return b;\r\n \t}\r\n \t}", "public Table copy() {\n\t\tTableImpl vt;\n\n\t\t// Copy failed, maybe objects in a column that are not serializable.\n\t\tColumn[] cols = new Column[this.getNumColumns()];\n\t\tColumn[] oldcols = this.getColumns();\n\t\tfor (int i = 0; i < cols.length; i++) {\n\t\t\tcols[i] = oldcols[i].copy();\n\t\t}\n\t\tint[] newsubset = new int[subset.length];\n\t\tSystem.arraycopy(subset, 0, newsubset, 0, subset.length);\n\t\tvt = new SubsetTableImpl(cols, newsubset);\n\t\tvt.setLabel(this.getLabel());\n\t\tvt.setComment(this.getComment());\n\t\treturn vt;\n\t}", "public Object clone() {\n \n\tQuerynotyfyaddressbol obj = new Querynotyfyaddressbol(getObjectsDatastore());\n\n\tobj.iNotifyaddress = iNotifyaddress; \n\n\treturn obj;\n }", "public Borrower getBorrower() {\n if (isBeforeFirst() || isAfterLast())\n return null;\n Borrower borrower = new Borrower();\n borrower.setId(getLong(getColumnIndex(PayUpDataBaseHelper.COLUMN_BORROWER_ID)));\n borrower.setLoanAmount(getFloat(getColumnIndex(PayUpDataBaseHelper.COLUMN_BORROWER_AMOUNT_BORROWED)));\n borrower.setInterestRate(getFloat(getColumnIndex(PayUpDataBaseHelper.COLUMN_BORROWER_INTEREST_RATE)));\n borrower.setName(getString(getColumnIndex(PayUpDataBaseHelper.COLUMN_BORROWER_NAME)));\n borrower.setIsPaid((getInt(getColumnIndex(PayUpDataBaseHelper.COLUMN_BORROWER_PAID)) != 0));\n borrower.setPhoneNumber(getString(getColumnIndex(PayUpDataBaseHelper.COLUMN_BORROWER_PHONE_NUMBER)));\n borrower.setThumbnailUri(getString(getColumnIndex(PayUpDataBaseHelper.COLUMN_BORROWER_THUMBNAIL_URI)));\n borrower.setContactUri(Uri.parse(getString(getColumnIndex(PayUpDataBaseHelper.COLUMN_BORROWER_CONTACT_URI))));\n\n if (!getWrappedCursor().isNull((getColumnIndex(PayUpDataBaseHelper.COLUMN_BORROWER_AMOUNT_PAID)))) {\n borrower.setAmountPaid(getFloat(getColumnIndex(PayUpDataBaseHelper.COLUMN_BORROWER_AMOUNT_PAID)));\n }\n if (!getWrappedCursor().isNull((getColumnIndex(PayUpDataBaseHelper.COLUMN_BORROWER_LOAN_DURATION)))) {\n borrower.setLoanDuration(getInt(getColumnIndex(PayUpDataBaseHelper.COLUMN_BORROWER_LOAN_DURATION)));\n }\n\n borrower.setDateBorrowed(getDateBorrowed());\n borrower.setDateDue(getDateDue());\n\n\n return borrower;\n }", "@Test\n public void testCopy() {\n BuildingWorker worker = new BuildingWorker(\"one\", 1, 2);\n ICell copy = worker.copy();\n\n assertTrue(copy.isWorker());\n\n assertEquals(\"one\", copy.getPlayerName());\n assertEquals(1, copy.getWorkerNumber());\n assertEquals(2, copy.getHeight());\n\n assertNotEquals(worker, copy);\n }", "public CopyBuilder copy() {\n return new CopyBuilder(this);\n }", "public ModuleDescriptorAdapter copy() {\n ModuleDescriptorAdapter copy = new ModuleDescriptorAdapter(getId(), getDescriptor(), getComponentId());\n copyTo(copy);\n copy.metaDataOnly = metaDataOnly;\n return copy;\n }", "public Record copy() {\n return new Record(\n this.id,\n this.location.copy(),\n this.score\n );\n }", "public SubResource backendAddressPool() {\n return this.backendAddressPool;\n }", "public Long get_backuplist() throws Exception {\n\t\treturn this.backuplist;\n\t}", "protected BaseOracleBean getDatabeanInstance() {\n return new RkPaySumOracleBean();\n }", "java.util.List<yandex.cloud.api.ydb.v1.BackupOuterClass.Backup> \n getBackupsList();", "CopyrholderType getCopyrholder();", "public SecurityManager newBackupBean() {\n return new SecurityManagerAdapter();\n }", "public List<BookCopy> getBookCopy() {\n\t\treturn bookCopy;\n\t}", "public MappingInfo copy()\r\n\t{\r\n\t\tArrayList<MappingCell> mappingCells = new ArrayList<MappingCell>();\r\n\t\tfor(MappingCell mappingCell : mappingCellHash.get())\r\n\t\t\tmappingCells.add(mappingCell);\r\n\t\treturn new MappingInfo(mapping.copy(),mappingCells);\r\n\t}", "public Object clone()\n {\n Object o = null;\n try \n { o = super.clone(); } \n catch(CloneNotSupportedException e) \n { System.err.println(\"Erreur dans le clonage de la cellule...\"); }\n return o;\n }", "public Object clone() {\n\t\ttry {\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch(CloneNotSupportedException exc) {\n\t\t\treturn null;\n\t\t}\n\t}", "public CellIdentityCdma copy() {\n return new CellIdentityCdma(this);\n }", "public Instance clone() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneContent(copy);\n }", "@java.lang.Override\n public yandex.cloud.api.ydb.v1.BackupOuterClass.Backup getBackups(int index) {\n return backups_.get(index);\n }", "public yandex.cloud.api.ydb.v1.BackupOuterClass.Backup.Builder getBackupsBuilder(\n int index) {\n return getBackupsFieldBuilder().getBuilder(index);\n }", "IDataRow getCopy();", "@java.lang.Override\n public java.util.List<yandex.cloud.api.ydb.v1.BackupOuterClass.Backup> getBackupsList() {\n return backups_;\n }", "public Record copy() {\n\t\treturn new Record(video, numOwned, numOut, numRentals);\n\t}", "<T> AbstractMultiTenantPool.Entry<T> getEntry();", "@Override\n public RawStore copy() {\n return new RawStore(this.toRawCopy2D(), myNumberOfColumns);\n }", "@Override\n\tpublic List<BookCopies> get() throws SQLException {\n\t\treturn null;\n\t}", "CellBackup withRenamedIds(IdMapper idMapper, CellName newGroupName) {\n CellRevision newRevision = cellRevision.withRenamedIds(idMapper, newGroupName);\n if (newRevision == cellRevision) return this;\n return new CellBackup(newRevision, this.techPool, true);\n }", "private HikariDataSource getPool() {\n switch (DBtype) {\n case \"mariadb\":\n MariadbPool();\n break;\n case \"postgresql\":\n PostgresPool();\n break;\n }\n return null;\n\n }", "private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n while(iterator.hasNext()){\n\n books.add((Book) iterator.next().clone());\n }\n obj.setBooks(books);\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }", "public SoPickedPoint \ncopy() \n//\n////////////////////////////////////////////////////////////////////////\n{\n SoPickedPoint newCopy = new SoPickedPoint(this);\n return newCopy;\n}", "public edu.usfca.cs.dfs.StorageMessages.BackUpOrBuilder getBackupOrBuilder() {\n if (msgCase_ == 10) {\n return (edu.usfca.cs.dfs.StorageMessages.BackUp) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.BackUp.getDefaultInstance();\n }", "public String backupName() {\n return this.backupName;\n }", "public static BlockIndexStore getInstance() {\n return CARBONTABLEBLOCKSINSTANCE;\n }", "java.lang.String getBackupId();", "java.lang.String getBackupId();", "java.lang.String getBackupId();", "java.lang.String getBackupId();", "public Long get_backupnodemask() throws Exception {\n\t\treturn this.backupnodemask;\n\t}", "public CellBackup withRevisionDate(long revisionDate) {\n CellRevision newRevision = cellRevision.withRevisionDate(revisionDate);\n if (newRevision == cellRevision) return this;\n return new CellBackup(newRevision, this.techPool, true);\n }", "private JButton getCopyButton() {\n if (copyButton == null) {\n copyButton = new JButton();\n copyButton.setText(\"Copy\");\n copyButton.setToolTipText(\"Copy settings from an existing site to a new site\");\n copyButton.setActionCommand(\"Copy\");\n copyButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n copySelectedBalloonSettings();\n }\n });\n }\n return copyButton;\n }", "public Feature copy() {\n\t\tFeature ret = new AbbeelFeature();\n\t\treturn ret;\n\t}", "public final ColumnInfo copy(boolean z) {\n return new BleKeyDataColumnInfo(this, z);\n }", "public Object clone() {\r\n try {\r\n return super.clone();\r\n } catch (CloneNotSupportedException e) {\r\n return null;\r\n }\r\n }", "public Object clone() {\n try {\n // clones itself\n return super.clone();\n } catch (Exception exception) {\n ;\n }\n return null;\n }", "@Override\r\n\tpublic ComputerPart clone() {\n\t\treturn null;\r\n\t}", "public DataSourceSwapper getSwapper(final DataSource dataSource) {\n DataSourceSwapper result = DATA_SOURCE_SWAPPER_MAP.get(dataSource.getClass().getName());\n return null == result ? new DefaultDataSourceSwapper() : result;\n }", "@Override\n public BoardFramework copyBoard() {\n List<List<GamePiece>> pieceCopies= new ArrayList<>();\n for(List<GamePiece> row: myGamePieces){\n List<GamePiece> rowOfPieceCopies = new ArrayList<>();\n for(GamePiece piece: row){\n rowOfPieceCopies.add(piece.copy());\n }\n pieceCopies.add(rowOfPieceCopies);\n }\n return new Board(pieceCopies,new ArrayList<>(myNeighborhoods),myEmptyState);\n }", "public RetryPolicyConfig copy() {\n final RetryPolicyConfig copy = new RetryPolicyConfig();\n copy.maxAttempts = this.maxAttempts;\n copy.initialBackoff = this.initialBackoff;\n copy.maxBackoff = this.maxBackoff;\n copy.backoffMultiplier = this.backoffMultiplier;\n copy.retryableStatusCodes =\n new LinkedHashSet<>(requireNonNull(this.retryableStatusCodes, \"retryableStatusCodes\"));\n return copy;\n }", "public DataFrame copy() {\n return new DataFrame(data.values, header.values, index.values);\n }", "public Breeder[] getBreederList() {\n Breeder[] copyBreeders = new Breeder[breederList.length];\n for(int i = 0; i < breederList.length; i++){\n copyBreeders[i] = breederList[i].softClone(this);\n }\n return copyBreeders;\n }", "@Override\n public Board clone() {\n return new Board(copyOf(this.board));\n }", "public Point getBlackPool(){\n return new Point(blackPool, blackCapPool);\n }", "protected Object getAttributeValueFromBackupClone(Object backupClone) {\n return null;\n }", "Replica get(String resourceGroupName, String resourceName, String replicaName);", "public java.lang.String getBackupCuid() {\n return backupCuid;\n }", "public Client copy() {\n\t\tClient clone = new Client(ID, Email, PostalAddress);\n\t\treturn(clone);\n\t}", "WorkoutBatch copy();", "public CellPolicy\n getCellPolicy() \n {\n return pCellPolicy;\n }", "public Index copy() {\n return value < INSTANCES.length ? this : new Index(value);\n }", "public AcGlobalLinuxTimeZonePolicy getCopy()\n {\n return (AcGlobalLinuxTimeZonePolicy)super.getCopy();\n }", "private static ArrayList<ByteCopyUtils> variousBCUInstances_BB_overlapping() {\n ArrayList<ByteCopyUtils> result = new ArrayList<ByteCopyUtils>();\n // No need for helper since no MBB is involved for BB to BB copies.\n // Chunk size has no effect either.\n result.add(\n newBCU(\n null, // mbbHelper\n true, // threadSafe\n DEFAULT_TEST_MAX_CHUNK_SIZE));\n return result;\n }", "public Object clone() throws CloneNotSupportedException {\r\n super.clone();\r\n return new JMSCacheReplicator(replicatePuts, replicateUpdates,\r\n replicateUpdatesViaCopy, replicateRemovals, replicateAsync, asynchronousReplicationInterval);\r\n }", "public DatabaseEditorConfig clone(){\n\t\t\n\t\tDatabaseEditorConfig clonedObject = new DatabaseEditorConfig();\n\t\tRGB bg = null;\n\t\tif (backGround != null) {\n\t\t\tbg = new RGB(backGround.red, backGround.green, backGround.blue);\n\t\t}\n\t\tclonedObject.setBackGround(bg);\n\t\tclonedObject.setDatabaseComment(databaseComment);\n\t\t\n\t\treturn clonedObject;\n\t}", "public Gateway copyChanges() {\n Gateway copy = new Gateway();\n copy.mergeChanges(this);\n copy.resetChangeLog();\n return copy;\n }", "public static synchronized QuestStateTableDataGateway getSingleton()\n\t{\n\t\tif (singleton == null)\n\t\t{\n\t\t\tsingleton = new QuestStateTableDataGatewayRDS();\n\t\t}\n\t\treturn singleton;\n\t}", "public Ping dup (Ping self)\n {\n if (self == null)\n return null;\n\n Ping copy = new Ping ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.digest = new ArrayList <State> (self.digest);\n return copy;\n }", "public HeapElt copy() {\n HeapElt newElement = new HeapElt();\n \n newElement.setHandle(this.handle);\n newElement.setRecord(this.record);\n \n return newElement;\n }", "public Cell containingCell() {\n return new Cell(x / NBROFSUBCELLINCELL, y / NBROFSUBCELLINCELL);\n }" ]
[ "0.68990165", "0.60998446", "0.60694677", "0.55691993", "0.5442357", "0.5420464", "0.52474046", "0.52133644", "0.51579714", "0.51475537", "0.5129809", "0.5126889", "0.5119874", "0.5085943", "0.50579995", "0.5002538", "0.4985167", "0.49662688", "0.4964991", "0.49526665", "0.49458042", "0.4941487", "0.49361047", "0.4933442", "0.4891792", "0.48830312", "0.48360687", "0.4827694", "0.48140892", "0.4797613", "0.47920954", "0.47913224", "0.47442934", "0.47432986", "0.47392118", "0.47384474", "0.47340208", "0.4729908", "0.4726752", "0.471554", "0.47114238", "0.4704583", "0.4700119", "0.46991315", "0.4695923", "0.4690728", "0.46892846", "0.4655126", "0.46493986", "0.46414968", "0.4636245", "0.46281317", "0.46279618", "0.46198055", "0.4619458", "0.46093628", "0.46087837", "0.46079364", "0.45942065", "0.45750624", "0.45699403", "0.45686233", "0.45682344", "0.45671853", "0.45644948", "0.45635223", "0.45635223", "0.45635223", "0.45635223", "0.45601273", "0.45597303", "0.45596293", "0.45466042", "0.45432305", "0.45422745", "0.45345935", "0.45340085", "0.45327908", "0.45318246", "0.45316136", "0.45298508", "0.45267388", "0.45263976", "0.45256457", "0.45161775", "0.45126972", "0.45112082", "0.45098734", "0.4509387", "0.4507839", "0.4505579", "0.450214", "0.45020512", "0.45009544", "0.4495779", "0.44921198", "0.44820178", "0.4476929", "0.44747335", "0.44747177" ]
0.62828285
1
Returns CellBackup which differs from this CellBackup by renamed Ids.
CellBackup withRenamedIds(IdMapper idMapper, CellName newGroupName) { CellRevision newRevision = cellRevision.withRenamedIds(idMapper, newGroupName); if (newRevision == cellRevision) return this; return new CellBackup(newRevision, this.techPool, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getBackupId();", "java.lang.String getBackupId();", "java.lang.String getBackupId();", "java.lang.String getBackupId();", "public CellBackup withoutModified() {\n if (!this.modified) return this;\n return new CellBackup(this.cellRevision, this.techPool, false);\n }", "yandex.cloud.api.ydb.v1.BackupOuterClass.Backup getBackups(int index);", "@java.lang.Override\n public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n }\n }", "private Set<Staff> getClonedEquivalent(Set<Staff> originalStaff, Map<Long, Staff> oldIdToNewStaff) {\n\tSet<Staff> clonedStaffSet = new HashSet<Staff>();\n\tfor (Staff originalStf : originalStaff) {\n\t Staff newStaff = oldIdToNewStaff.get(originalStf.getId());\n\t if (newStaff == null) {\n\t\tcontinue;\n\t }\n\t clonedStaffSet.add(newStaff);\n\t}\n\treturn clonedStaffSet;\n }", "public static void main_compareBackup(){\n //table.equals(tableClone);\n\n if(table.equals(tableClone))\n System.out.println(\"Current list is the same as the backup copy.\");\n else\n System.out.println(\"Current list is not the same as the backup copy.\");\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public CellIdentityWcdma copy() {\n return new CellIdentityWcdma(this);\n }", "public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static List<Boekhouding.Bank> oldBankinstellingToNewBank() {\r\n List<Boekhouding.Bank> newBanken = new ArrayList();\r\n List<Old.Boekhouding.Bankinstelling> bankInstellingen = Import.getBankinstellingen().stream().map(b -> (Old.Boekhouding.Bankinstelling) b).collect(Collectors.toList());\r\n\r\n bankInstellingen.forEach(b -> {\r\n newBanken.add(new Bank(b.getId_bank(), b.getNaam(), b.getBankcode()));\r\n });\r\n return newBanken;\r\n }", "public String getIdcopy() {\r\n return idcopy;\r\n }", "public MappingInfo copy()\r\n\t{\r\n\t\tArrayList<MappingCell> mappingCells = new ArrayList<MappingCell>();\r\n\t\tfor(MappingCell mappingCell : mappingCellHash.get())\r\n\t\t\tmappingCells.add(mappingCell);\r\n\t\treturn new MappingInfo(mapping.copy(),mappingCells);\r\n\t}", "public String getIdcopy() {\r\n\t\treturn idcopy;\r\n\t}", "private long[] getClonedEquivalent(long[] originalStaffIds, Map<Long, Staff> oldIdToNewStaff) {\n\tSet<Long> clonedStaffSet = new HashSet<Long>();\n\tfor (long originalId : originalStaffIds) {\n\t Staff stf = oldIdToNewStaff.get(originalId);\n\t if (stf != null) {\n\t\tclonedStaffSet.add(stf.getId());\n\t }\n\t}\n\treturn Longs.toArray(clonedStaffSet);\n }", "@java.lang.Override\n public yandex.cloud.api.ydb.v1.BackupOuterClass.Backup getBackups(int index) {\n return backups_.get(index);\n }", "com.google.protobuf.ByteString\n getBackupIdBytes();", "com.google.protobuf.ByteString\n getBackupIdBytes();", "com.google.protobuf.ByteString\n getBackupIdBytes();", "com.google.protobuf.ByteString\n getBackupIdBytes();", "public static java.lang.String getEquivalentID(java.lang.String id, int index) { throw new RuntimeException(\"Stub!\"); }", "public CellIdentityCdma copy() {\n return new CellIdentityCdma(this);\n }", "edu.usfca.cs.dfs.StorageMessages.BackUp getBackup();", "@JsonProperty(\"backupId\")\n public String getBackupId() {\n return backupId;\n }", "Bean duplicateBean( String id, String alias, Bean source, boolean isAnonymous);", "public Record copy() {\n return new Record(\n this.id,\n this.location.copy(),\n this.score\n );\n }", "@Deprecated\n\tpublic IEntity getClone(int tab, String name);", "IDataRow getCopy();", "public ModuleDescriptorAdapter copy() {\n ModuleDescriptorAdapter copy = new ModuleDescriptorAdapter(getId(), getDescriptor(), getComponentId());\n copyTo(copy);\n copy.metaDataOnly = metaDataOnly;\n return copy;\n }", "public String backupName() {\n return this.backupName;\n }", "public yandex.cloud.api.ydb.v1.BackupOuterClass.Backup getBackups(int index) {\n if (backupsBuilder_ == null) {\n return backups_.get(index);\n } else {\n return backupsBuilder_.getMessage(index);\n }\n }", "java.util.List<yandex.cloud.api.ydb.v1.BackupOuterClass.Backup> \n getBackupsList();", "public CellId getCellIdWithRealColumnName(CellId diffId) {\n\t\tfor (ColumnSpec cs : getColumnSpecs()) {\n\t\t\tfor (CellId id : cs.getExpression().getAllCellIds()) {\n\t\t\t\tif (id.equals(diffId)) {\n\t\t\t\t\treturn new CellId(id.getTableId(), cs.getColumnName());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "String getOriginalName();", "TrackerAssignedOld getTrackerAssignedOld(final Integer id);", "private String getOngoingBackupId() throws IOException {\n ArrayList<BackupInfo> sessions = systemTable.getBackupInfos(BackupState.RUNNING);\n if (sessions.size() == 0) {\n return null;\n }\n return sessions.get(0).getBackupId();\n }", "@Test\n public void equalsDifferentName(){\n\n InputStream url1= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1.json\");\n InputStream url1h= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1h.json\");\n\n Backup backup_a = Backup.initFromFile(url1);\n Backup backup_b = Backup.initFromFile(url1h);\n\n assertNotEquals(backup_a, backup_b);\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 HashMap<PhoneNumber, BookEntry> cloneBook() {\n\t\tHashMap<PhoneNumber, BookEntry> clonedBook = new HashMap<>(); //Just for practice...\n\t\t//Create a Collection \n\t\tCollection<BookEntry> sourcePhoneBookValues = this.phoneBook.values(); //Based on the object instance's phoneBook field\n\t\t//Iterate through the collection and copy each entry to the cloneBook map\n\t\tfor (BookEntry currentEntry : sourcePhoneBookValues) {\n\t\t\tclonedBook.put(currentEntry.getNumber(), currentEntry);\n\t\t}\n\t\treturn clonedBook;\n\t}", "public Instance clone() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneContent(copy);\n }", "Long clone(Long id);", "@Test\n public void equalsBetweenDifferentBackups(){\n //backup_1 and backup_1b differs from\n InputStream url1= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1.json\");\n InputStream url1b= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1b.json\");\n\n Backup backup_a = Backup.initFromFile(url1);\n Backup backup_b = Backup.initFromFile(url1b);\n\n assertNotEquals(backup_a, backup_b);\n }", "public void setIdcopy(String idcopy) {\r\n this.idcopy = idcopy;\r\n }", "public ImmutableObject modifiedName(String name) {\n return new ImmutableObject(this.id, name);\n }", "public static Note getB() {return (Note)B.clone();}", "public ChangeRecord compareForChange(Object clone, Object backup, ObjectChangeSet owner, AbstractSession session) {\n Object cloneAttribute = null;\n Object backUpAttribute = null;\n \n // Fixed to match build-update-row.\n if (session.isClassReadOnly(this.getReferenceClass())) {\n return null;\n }\n \n cloneAttribute = getAttributeValueFromObject(clone);\n\n if (!owner.isNew()) {\n backUpAttribute = getAttributeValueFromObject(backup);\n if ((backUpAttribute == null) && (cloneAttribute == null)) {\n return null;\n }\n ContainerPolicy cp = getContainerPolicy();\n Object backupCollection = null;\n Object cloneCollection = null;\n\n cloneCollection = getRealCollectionAttributeValueFromObject(clone, session);\n backupCollection = getRealCollectionAttributeValueFromObject(backup, session);\n\n if (cp.sizeFor(backupCollection) != cp.sizeFor(cloneCollection)) {\n return convertToChangeRecord(cloneCollection, owner, session);\n }\n Object cloneIterator = cp.iteratorFor(cloneCollection);\n Object backUpIterator = cp.iteratorFor(backupCollection);\n boolean change = false;\n\n // For bug 2863721 must use a different UnitOfWorkChangeSet as here just\n // seeing if changes are needed. If changes are needed then a\n // real changeSet will be created later.\n UnitOfWorkChangeSet uowComparisonChangeSet = new UnitOfWorkChangeSet();\n while (cp.hasNext(cloneIterator)) {\n Object cloneObject = cp.next(cloneIterator, session);\n\n // For CR#2285 assume that if null is added the collection has changed.\n if (cloneObject == null) {\n change = true;\n break;\n }\n Object backUpObject = null;\n if (cp.hasNext(backUpIterator)) {\n backUpObject = cp.next(backUpIterator, session);\n } else {\n change = true;\n break;\n }\n if (cloneObject.getClass().equals(backUpObject.getClass())) {\n ObjectBuilder builder = getReferenceDescriptor(cloneObject.getClass(), session).getObjectBuilder();\n ObjectChangeSet initialChanges = builder.createObjectChangeSet(cloneObject, uowComparisonChangeSet, owner.isNew(), session);\n\n //compare for changes will return null if no change is detected and I need to remove the changeSet\n ObjectChangeSet changes = builder.compareForChange(cloneObject, backUpObject, uowComparisonChangeSet, session);\n if (changes != null) {\n change = true;\n break;\n }\n } else {\n change = true;\n break;\n }\n }\n if ((change == true) || (cp.hasNext(backUpIterator))) {\n return convertToChangeRecord(cloneCollection, owner, session);\n } else {\n return null;\n }\n }\n\n return convertToChangeRecord(getRealCollectionAttributeValueFromObject(clone, session), owner, session);\n }", "@Test\n\tpublic void backupTest1() {\n\t\tMainPanel m = new MainPanel(15);\n\t\tCell[][] _cells = new Cell[15][15];\n\t\tfor(int i = 0; i < 15; i++) {\n\t\t\tfor(int j = 0; j < 15; j++) {\n\t\t\t _cells[i][j] = new Cell(false);\n\t\t\t}\n\t\t}\t\n\t\tm.backup1();\t\n\t\tassertEquals(m._backupCells[14][14].getAlive(), _cells[14][14].getAlive());\n\t}", "@java.lang.Override\n public yandex.cloud.api.ydb.v1.BackupOuterClass.BackupOrBuilder getBackupsOrBuilder(\n int index) {\n return backups_.get(index);\n }", "public void setIdcopy(String idcopy) {\r\n\t\tthis.idcopy = idcopy;\r\n\t}", "public String getScannedIdCopy() {\n\t\treturn scannedIdCopy;\n\t}", "public MobileEntity getclone(MobileEntity ws){\n return ws.MakeCopy();\n }", "public static void main_revertBackup(){\n try {\n table = (HiringTable) tableClone.clone();\n System.out.println(\"Successfully reverted to the backup copy.\");\n } catch (CloneNotSupportedException ex){\n System.out.println(\"Clone not successful.\");\n main_menu();\n }\n }", "public DataFrame copy() {\n return new DataFrame(data.values, header.values, index.values);\n }", "public Week getCopy() {\r\n Week w = new Week();\r\n for (int d = 0; d < 5; d++) {\r\n for (int h = 0; h < 13; h++) {\r\n w.setOne(d, h, weekData[d][h]);\r\n w.setName(\"+Copy of \" + this.getName());\r\n }\r\n }\r\n return w;\r\n }", "public Binaire clone(){\n\t\treturn new Binaire(this.symbole, this.gauche.clone(), this.droit.clone());\n\t}", "public java.lang.String getBackupName() {\n return backupName;\n }", "public Map<String, Integer> getOriginalBosses() {\r\n\t\treturn originalBosses;\r\n\t}", "public static JwComparator<AcBatchNestChange> getBatchIdComparator()\n {\n return AcBatchNestChangeTools.instance.getBatchIdComparator();\n }", "public java.util.List<yandex.cloud.api.ydb.v1.BackupOuterClass.Backup> getBackupsList() {\n if (backupsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(backups_);\n } else {\n return backupsBuilder_.getMessageList();\n }\n }", "Field getCopy();", "@java.lang.Override\n public java.util.List<yandex.cloud.api.ydb.v1.BackupOuterClass.Backup> getBackupsList() {\n return backups_;\n }", "alluxio.proto.journal.File.RenameEntry getRename();", "@Override\n public RelatedArtifactChangedColumn copy() {\n RelatedArtifactChangedColumn newXCol = new RelatedArtifactChangedColumn();\n super.copy(this, newXCol);\n return newXCol;\n }", "yandex.cloud.api.ydb.v1.BackupOuterClass.BackupOrBuilder getBackupsOrBuilder(\n int index);", "void checkRename(Object oldId, Object newId) throws UPAException;", "synchronized String getOriginalName(String fixedName) {\r\n return fixedNamesToOriginalNames.get(fixedName);\r\n }", "public java.util.ArrayList getClones();", "@Override\r\n\tpublic Map<String, Object> getDocterBackById(int id) {\n\t\treturn docterMapper.selBackgroundById(id);\r\n\t}", "public Gateway copyChanges() {\n Gateway copy = new Gateway();\n copy.mergeChanges(this);\n copy.resetChangeLog();\n return copy;\n }", "public Table<Integer, Integer, String> getAnonymizedData();", "public Breeder[] getBreederList() {\n Breeder[] copyBreeders = new Breeder[breederList.length];\n for(int i = 0; i < breederList.length; i++){\n copyBreeders[i] = breederList[i].softClone(this);\n }\n return copyBreeders;\n }", "public List<BookCopy> getBookCopy() {\n\t\treturn bookCopy;\n\t}", "public Object clone() {\n \n\tQuerynotyfyaddressbol obj = new Querynotyfyaddressbol(getObjectsDatastore());\n\n\tobj.iNotifyaddress = iNotifyaddress; \n\n\treturn obj;\n }", "public abstract ICloudBackup getBackupImpl();", "@JsonProperty(\"backupName\")\n public String getBackupName() {\n return backupName;\n }", "public java.util.List<DataEntry> findByCopiedFrom(long copiedFrom);", "@Override\r\n public int hashCode() {\n return this.name.hashCode();\r\n }", "public Coordinates copy() {\n\t\treturn new Coordinates(this);\n\t}", "public edu.usfca.cs.dfs.StorageMessages.BackUp getBackup() {\n if (backupBuilder_ == null) {\n if (msgCase_ == 10) {\n return (edu.usfca.cs.dfs.StorageMessages.BackUp) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.BackUp.getDefaultInstance();\n } else {\n if (msgCase_ == 10) {\n return backupBuilder_.getMessage();\n }\n return edu.usfca.cs.dfs.StorageMessages.BackUp.getDefaultInstance();\n }\n }", "public java.lang.String getBeanIdentifier();", "@Test\n public void testRecordsWithDifferentIDsProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }", "static CellBackup read(IdReader reader, TechPool techPool) throws IOException {\n CellRevision newRevision = CellRevision.read(reader);\n boolean modified = reader.readBoolean();\n TechPool restrictedPool = techPool.restrict(newRevision.techUsages, techPool);\n return new CellBackup(newRevision, restrictedPool, modified);\n }", "@Test\n\tpublic void testDifferentID() {\n\t\tMainDish dessertTest = new MainDish(\"quiche\");\n\t\tMainDish dessertTest2 = new MainDish(\"quiche\");\n\t\tassertTrue(dessertTest.getId()!=dessertTest2.getId());\n\t}", "public yandex.cloud.api.ydb.v1.BackupOuterClass.Backup.Builder getBackupsBuilder(\n int index) {\n return getBackupsFieldBuilder().getBuilder(index);\n }", "protected Shingle copy() {\n return new Shingle(this);\n }" ]
[ "0.52480966", "0.52480966", "0.52480966", "0.52480966", "0.5158591", "0.49701664", "0.4952708", "0.4952708", "0.4952708", "0.4952708", "0.49057207", "0.4891133", "0.48786798", "0.48786798", "0.48786798", "0.48786798", "0.48310378", "0.48015738", "0.48015738", "0.48015738", "0.48015738", "0.47587934", "0.47587934", "0.47587934", "0.47587934", "0.47302556", "0.46409744", "0.46336967", "0.4610095", "0.4594313", "0.45599574", "0.4550975", "0.4550975", "0.4550975", "0.4550975", "0.4528135", "0.44775268", "0.44394308", "0.44178334", "0.44123358", "0.4376031", "0.4375622", "0.43695095", "0.43511346", "0.43466654", "0.4319364", "0.43134367", "0.4309209", "0.4294066", "0.42876816", "0.42850718", "0.42696762", "0.42642695", "0.42558625", "0.42507434", "0.42376295", "0.42133662", "0.42104897", "0.4200834", "0.41770568", "0.41614807", "0.4143295", "0.41385898", "0.41304547", "0.41273293", "0.41247457", "0.4119976", "0.41130546", "0.4107715", "0.41047895", "0.40927866", "0.40883866", "0.40864184", "0.40810394", "0.40809047", "0.407135", "0.40584576", "0.40578955", "0.40541694", "0.40463474", "0.40446493", "0.40390745", "0.40342984", "0.40277877", "0.40258104", "0.40213725", "0.40178657", "0.40166476", "0.40159544", "0.401349", "0.4009926", "0.40041226", "0.4000062", "0.3992772", "0.39717197", "0.39708173", "0.39649844", "0.39649218", "0.3964409", "0.39613295" ]
0.6803618
0
Writes this CellBackup to IdWriter.
void write(IdWriter writer) throws IOException { cellRevision.write(writer); writer.writeBoolean(modified); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void write(String id);", "@Override\r\n\tpublic void write(DataOutput out) throws IOException {\n\t\tWritableUtils.writeVInt(out, this.id);\r\n\t}", "com.google.protobuf.ByteString\n getBackupIdBytes();", "com.google.protobuf.ByteString\n getBackupIdBytes();", "com.google.protobuf.ByteString\n getBackupIdBytes();", "com.google.protobuf.ByteString\n getBackupIdBytes();", "@Override\n\tprotected void writeToXml(EwsServiceXmlWriter writer) throws Exception {\n\t\tthis.item.getId().writeToXml(writer);\n\n\t}", "@Override\n public void writeIdFile(String idName) throws IOException {\n File file = new File(getOutputDir() + \"/log\");\n file.mkdirs();\n FileWriter fw = new FileWriter(getOutputDir() + \"/log/\" + idName);\n for (String s : idMap.keySet()) fw.write(idMap.get(s) + \" \" + s + \"\\n\");\n fw.close();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getBackupIdBytes() {\n java.lang.Object ref = backupId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n backupId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void writeToFile() {\n try {\n // stworz plik\n File file = new File(\"../Alice.ids\");\n // stworz bufor zapisu do pliku\n FileWriter fileWriter = new FileWriter(file);\n for(int i = 0; i < identificationNumbers.length; i++) {\n for(int j = 0; j < identificationNumbers[i].length; j++)\n fileWriter.write(Integer.toString(identificationNumbers[i][j]));\n\t\t\t fileWriter.write(\"\\n\");\n }\n\t\t\tfileWriter.flush();\n\t\t\tfileWriter.close();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void write(DataOutputStream dataOutStream) throws IOException {\n\t\tdataOutStream.writeLong(id);\n\t\tsuper.write(dataOutStream);\n\t}", "public void commitWriter () {\n try {\n writer.commit();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "java.lang.String getBackupId();", "java.lang.String getBackupId();", "java.lang.String getBackupId();", "java.lang.String getBackupId();", "@Override\n public void writeAll() throws IOException {\n try\n {\n workbook.write(outputStream);\n outputStream.close();\n workbook.dispose();\n }\n catch (IOException io)\n {\n throw new IOException(io);\n }\n }", "public abstract void save(IntIntsCol col, DataOutputStream output) throws IOException;", "public long getWriteId() {\n return writeId;\n }", "public void storeID(String id) {\n try {\n FileWriter myWriter = new FileWriter(\"history_dao.txt\");\n myWriter.write(id);\n myWriter.close();\n System.out.println(\"Successfully wrote to the file.\");\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "public void writeTo(IonWriter writer)\n throws IOException;", "public void writeIDs() {\n try {\n FileOutputStream fileOut = new FileOutputStream(\"temp/ids.ser\");\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(ids);\n out.close();\n fileOut.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "void assignIDs(final BinaryPropertyListWriter out) {\n out.assignID(this);\n }", "public <T> void write(MDSKey id, T value) {\n try {\n table.put(new Put(id.getKey()).add(COLUMN, serialize(value)));\n } catch (Exception e) {\n throw Throwables.propagate(e);\n }\n }", "@Override\n\tpublic void write(DataOutput out) throws IOException {\n\t\tid.write(out);\n\t\ttag.write(out);\n\t}", "public void writeId(final Object instance, final ObjectStreamWriter writer)\n {\n Objects.requireNonNull(instance);\n Objects.requireNonNull(writer);\n final String id = registry.get(instance);\n Objects.requireNonNull(id);\n writer.writeObject(id);\n }", "public abstract void save(LongIntsCol col, DataOutputStream output) throws IOException;", "@java.lang.Override\n public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n }\n }", "public void write(DataOutput output) throws IOException {\n output.writeShort(this.id());\n this._write(output);\n }", "public void writeBackupStartCode(Long startCode) throws IOException {\n systemTable.writeBackupStartCode(startCode, backupInfo.getBackupRootDir());\n }", "public void writeId(ByteBuf output) {\n\t\twriteVarInt(output, id);\n\t}", "@Override\n public void write() {\n\n }", "public void write() {\r\n\t\ttry {\r\n\t\t\tDataOutputStream dat = new DataOutputStream(new FileOutputStream(signlink.getDirectory() + \"idk.dat\"));\r\n\t\t\tdat.writeShort(IdentityKit.cache.length);\r\n\t\t\tfor (IdentityKit idk : IdentityKit.cache) {\r\n\t\t\t\tif (idk.partId != -1) {\r\n\t\t\t\t\tdat.writeByte(1);\r\n\t\t\t\t\tdat.writeByte(idk.partId);\r\n\t\t\t\t}\r\n\t\t\t\tif (idk.models != null) {\r\n\t\t\t\t\tdat.writeByte(2);\r\n\t\t\t\t\tdat.writeByte(idk.models.length);\r\n\t\t\t\t\tfor (int index = 0; index < idk.models.length; index++) {\r\n\t\t\t\t\t\tdat.writeShort(idk.models[index]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (idk.disableDisplay) {\r\n\t\t\t\t\tdat.writeByte(3);\r\n\t\t\t\t}\r\n\t\t\t\tif (idk.oldColors != null) {\r\n\t\t\t\t\tfor (int index = 0; index < idk.oldColors.length; index++) {\r\n\t\t\t\t\t\tdat.writeByte(40 + index);\r\n\t\t\t\t\t\tdat.writeShort(idk.oldColors[index]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (idk.newColors != null) {\r\n\t\t\t\t\tfor (int index = 0; index < idk.newColors.length; index++) {\r\n\t\t\t\t\t\tdat.writeByte(50 + index);\r\n\t\t\t\t\t\tdat.writeShort(idk.newColors[index]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (idk.dialogModels != null) {\r\n\t\t\t\t\tfor (int index = 0; index < idk.dialogModels.length; index++) {\r\n\t\t\t\t\t\tdat.writeByte(60 + index);\r\n\t\t\t\t\t\tdat.writeShort(idk.dialogModels[index]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdat.writeByte(0);\r\n\t\t\t}\r\n\t\t\tdat.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public abstract void save(IntLongsCol col, DataOutputStream output) throws IOException;", "public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getBackupId() {\n java.lang.Object ref = backupId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n backupId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void flush() {\n writer.flush();\n }", "public void setID() throws IOException;", "public void writeIDfile(String ID,String password)throws IOException\n {\n\n\n List<String> lines = Files.readAllLines(Paths.get(\"idpassword.txt\"));\n /*write part*/\n\n BufferedWriter bw = null;\n FileWriter fw = null;\n try {\n int j=0;\n String content = \"\";\n while (j<lines.size())\n {\n content+= lines.get(j)+\"\\n\";\n j++;\n }\n content+=ID+\",\"+password;\n\n fw = new FileWriter(\"idpassword.txt\");\n bw = new BufferedWriter(fw);\n bw.write(content);\n\n bw.close();\n fw.close();\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n } finally {\n\n try {\n\n if (bw != null)\n bw.close();\n\n if (fw != null)\n fw.close();\n\n } catch (IOException ex) {\n\n ex.printStackTrace();\n\n }\n\n }\n }", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n backupId_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void put(Integer id, BookCopies object) throws SQLException {\n\t\t\n\t}", "@Override\n public void write(DataOutput output) throws IOException {\n output.writeUTF(getPartitionKey());\n output.writeUTF(getRowKey());\n output.writeLong(getTimestamp().getTime());\n // Write the rest of the properties.\n HashMap<String, EntityProperty> properties = getProperties();\n output.writeInt(properties.size());\n for (Map.Entry<String, EntityProperty> current : properties.entrySet()) {\n output.writeUTF(current.getKey());\n output.writeUTF(current.getValue().getValueAsString());\n }\n }", "@Override\r\n\tpublic void write() {\n\t\t\r\n\t}", "@Override\n protected void writeInternal(int index, int value) {\n\n }", "@Override\n protected void writeInternal(int index, int value) {\n\n }", "private void doWrite() throws IOException {\n\t\t\tbb.flip();\n\t\t\tsc.write(bb);\n\t\t\tbb.compact();\n\n\t\t\tupdateInterestOps();\n\t\t}", "public void save() {\n\n\t\tint[][] rawData = new int[2][CHUNK_SIZE * CHUNK_SIZE];\n\n\t\tfor (int l = 0; l < 2; l++) {\n\t\t\tLayer layer = Layer.get(l);\n\t\t\tfor (int y = 0; y < CHUNK_SIZE; y++) {\n\t\t\t\tfor (int x = 0; x < CHUNK_SIZE; x++) {\n\t\t\t\t\trawData[l][x + y * CHUNK_SIZE] = getTileId(layer, x, y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.saveData = new RawChunkData(rawData);\n\t}", "public abstract void save(LongLongsCol col, DataOutputStream output) throws IOException;", "@Override\n\tpublic void write(DataOutput out) throws IOException {\n\t\t\n\t\tout.writeInt(id);\n\t\tout.writeUTF(date);\n\t\tout.writeUTF(pid);\n\t\tout.writeInt(amount);\n\t\tout.writeUTF(name);\n\t\tout.writeUTF(category_id);\n\t\tout.writeInt(price);\n\t\tout.writeUTF(flag);\n\t\t\n\t}", "@Override\n public void write(int b) throws IOException {\n byte ib = (byte) b;\n long p = df.position();\n // If not at the end yet,\n if (p < df.size()) {\n // Get the current value,\n byte cur_b = df.get();\n // If the value we are inserting is different,\n if (cur_b != ib) {\n // Reposition and put the new value,\n df.position(p);\n df.put(ib);\n// ++change_count;\n }\n }\n // At the end so write the byte,\n else {\n df.put(ib);\n }\n }", "@Override\n public void flush()\n throws XMLStreamException\n {\n try {\n mWriter.flush();\n } catch (IOException ie) {\n throw new WstxIOException(ie);\n }\n }", "@Override\n public void write() throws IOException\n {\n super.write();//Chamada para metodo da superclasse ajusta ponteiro para \n //gravacao sequencial apos posicao do ultimo registro\n //gravado\n writeString(id, TOPIC_ID_STRLENGTH);\n writeString(title, TITLE_STRLENGTH);\n writeShort(rank);\n }", "protected abstract void writeIdsToXml(EwsServiceXmlWriter writer)\n\t\t\tthrows Exception;", "public static void write(\n\t\tBinaryDataOutput out,\n\t\tString collection,\n\t\tObject id,\n\t\tbyte[] chunk,\n\t\tint chunkOffset,\n\t\tint chunkLength\n\t)\n\t\tthrows IOException\n\t{\n\t\tout.writeString(collection);\n\t\tout.writeId(id);\n\t\tout.writeByteArray(chunk, chunkOffset, chunkLength);\n\t}", "@Override\r\n\tpublic void write(CEntity entity) {\n\t\tentity.write(writer);\t\t\r\n\t}", "@Override\n protected void writeAttributes(XMLStreamWriter out)\n throws XMLStreamException {\n super.writeAttributes(out);\n \n out.writeAttribute(\"nextID\", Integer.toString(nextID));\n }", "public void doWrite() throws IOException {\n bbout.flip();\n sc.write(bbout);\n bbout.compact();\n processOut();\n updateInterestOps();\n }", "public void doWrite() throws IOException {\n bbout.flip();\n sc.write(bbout);\n bbout.compact();\n processOut();\n updateInterestOps();\n }", "public void setBackupId(String backupId) {\n this.backupId = backupId;\n }", "@Override\n\tpublic void write(WorkVO workVO) {\n\t\tworkMapper.write(workVO);\n\t\t\n\t}", "@Override\n\tprotected void write(ObjectOutput out) throws IOException {\n\t\t\n\t}", "public void write(Writer writer) {\n this.write(writer, 0);\n }", "public void saveAccount() {\r\n\t\t\r\n\t\tString[] emailParts = GID.split(\"@\");\r\n\t\t//Recover the file name\r\n\t\tString fileName = name + \"_\" + emailParts[0] + \"_\" + emailParts[1];\r\n\t\t\r\n\t try {\r\n\t //use buffering\r\n\t OutputStream file = new FileOutputStream( fileName );\r\n\t OutputStream buffer = new BufferedOutputStream( file );\r\n\t ObjectOutput output = new ObjectOutputStream( buffer );\r\n\t \r\n\t try {\r\n\t \toutput.writeObject(this);\r\n\t }\r\n\t finally {\r\n\t \toutput.close();\r\n\t }\r\n\t }\r\n\t \r\n\t catch(IOException ex){\r\n\t \t System.out.println(\"Cannot perform output.\");\r\n\t }\r\n\t}", "@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeStringArray(new String[] {Objects.toString(this._id, null),\n this.pNote,\n this.pDate});\n }", "private void writeBackupState(long fileSize, long crc, ParcelFileDescriptor stateFile) throws IOException {\n DataOutputStream out = null;\n try {\n out = new DataOutputStream(new FileOutputStream(stateFile.getFileDescriptor()));\n out.writeLong(fileSize);\n out.writeLong(crc);\n out.writeInt(BACKUP_AGENT_VERSION);\n } catch (Exception e) {\n Log.w(TAG, \"writeBackupState: e = \" + e.toString());\n } finally {\n if (out != null) {\n out.close();\n }\n }\n\n }", "public void addNewIDtoCells() {\n\t\t//Get iterator to all the rows in current sheet\n\t\tIterator<Row> rowIteratorA = cells.iterator();\n\t\t\n\t\trowIteratorA.next();//Ignore the column names. We actually know it.\n\t\tRow row = null;\n\t\tint previousValue = -1;\n\t\tdouble key = -1;\n\t\t//For each row we will read the info. 12\n\t\twhile(rowIteratorA.hasNext()){\n\t\t\trow = rowIteratorA.next();\n\t\t\tdouble currentValue = Math.round(row.getCell(CELLQUERY).getNumericCellValue()*100)/100;\n\t\t\t//System.out.println(i++);\n\t\t\tif(currentValue!=previousValue){\n\t\t\t\tif(table.containsKey(currentValue))\n\t\t\t\t\tkey=table.get(currentValue);\n\t\t\t\telse\n\t\t\t\t\tkey=-1;\n\t\t\t}\n\t\t\trow.createCell(CELLKEY);\n\t\t\trow.getCell(CELLKEY).setCellValue(key);\n\t\t\tif(key==-1){\n\t\t\t\tSystem.err.println(\"Error: Value \"+currentValue+\" was not found in the matching table\");\n\t\t\t}\n\t\t}\n\t\tFileOutputStream dataFileOut;\n\t\ttry {\n\t\t\tdataFileOut = new FileOutputStream(\n\t\t\t\t\tcellsFile.getAbsolutePath().replace(\".xlsx\", \"out.xlsx\"));\n\t\t\t//System.out.println(dataFileOut+\" \"+cellsWorkbook);\n\t\t\t\n\t\t\tcellsWorkbook.write(dataFileOut);\n\t\t\tdataFileOut.flush();\n\t\t\tdataFileOut.close();\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}", "public void doWrite() throws IOException {\n\t\tbbout.flip();\n\t\tsc.write(bbout);\n\t\tbbout.compact();\n\t\tprocessOut();\n\t\tupdateInterestOps();\n\t}", "void saveAs() {\n writeFile.Export();\n }", "public void writeChunk(String id, byte[] data) throws IOException {\n byte[] identifier = id.getBytes(\"US-ASCII\");\n if (identifier.length != 4) {\n throw new IllegalArgumentException(\"ID length must match 4!\");\n }\n writeInt(data.length);\n write(identifier);\n write(data);\n CRC32 crc = new CRC32();\n crc.update(identifier);\n crc.update(data);\n writeInt((int) (crc.getValue() & 0xFFFFFFFFL));\n crc.reset();\n }", "public void storeData() {\n try {\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(\"DB/Guest.ser\"));\n out.writeInt(guestList.size());\n out.writeInt(Guest.getMaxID());\n for (Guest guest : guestList)\n out.writeObject(guest);\n //System.out.printf(\"GuestController: %,d Entries Saved.\\n\", guestList.size());\n out.close();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "@Override\n public void beginDatabaseBatchWrite() throws BlockStoreException {\n if (!autoCommit) {\n return;\n }\n if (instrument)\n beginMethod(\"beginDatabaseBatchWrite\");\n\n batch = db.createWriteBatch();\n uncommited = new HashMap<ByteBuffer, byte[]>();\n uncommitedDeletes = new HashSet<ByteBuffer>();\n utxoUncommittedCache = new HashMap<ByteBuffer, UTXO>();\n utxoUncommittedDeletedCache = new HashSet<ByteBuffer>();\n autoCommit = false;\n if (instrument)\n endMethod(\"beginDatabaseBatchWrite\");\n }", "@Override\r\n\tpublic void write(BoardDto dto) throws Exception {\n\t\tdao.write(dto);\r\n\t}", "public void write(NetOutput out)\r\n/* 42: */ throws IOException\r\n/* 43: */ {\r\n/* 44:41 */ out.writeInt(this.entityId);\r\n/* 45:42 */ NetUtil.writeEntityMetadata(out, this.metadata);\r\n/* 46: */ }", "Write createWrite();", "public void write(DataOutputStream output) throws IOException {\r\n output.writeInt(matrixId);\r\n int size = partMetas.size();\r\n output.writeInt(size);\r\n for (Map.Entry<Integer, MatrixPartitionMeta> partEntry : partMetas.entrySet()) {\r\n partEntry.getValue().write(output);\r\n }\r\n }", "public void writeWay(long id, Way way) throws IOException;", "private void _writeItemIdentifiers(final Construct construct) throws IOException {\n if (_exportIIds) {\n _writeLocators(\"item_identifiers\", construct.getItemIdentifiers());\n }\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "public Builder setBackupIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n backupId_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void write() throws IOException {\n\t\t// declare and instantiate a filewriter to write to the customer's file\n\t\tFileWriter wr = new FileWriter(this.customer);\n\t\tBufferedWriter br = new BufferedWriter(wr);\n\n\t\t// write the customers first and last name (seperate lines)\n\t\tbr.write(this.firstName + \"\\n\");\n\t\tbr.write(this.lastName + \"\\n\");\n\t\t// write the customers phone number (remove the parenthesis around the\n\t\t// area code and spaces)\n\t\t// only write a new line if the customer has transactions\n\t\t// (BufferedReader does not allow preceding \"\\n\")\n\t\tString phoneNum = this.phoneNum.substring(1, 4) + this.phoneNum.substring(6, 9) + this.phoneNum.substring(10);\n\n\t\tif (this.transactions.size() == 0) {\n\t\t\tbr.write(phoneNum);\n\t\t} else {\n\t\t\tbr.write(phoneNum + \"\\n\");\n\t\t}\n\n\t\t// write all of the transaction numbers\n\t\tfor (int i = 0; i < this.transactions.size(); i++) {\n\t\t\t// if this last transaction, do not write an enter\n\t\t\t// else, write an enter\n\t\t\tif (i == this.transactions.size() - 1) {\n\t\t\t\tbr.write(this.transactions.get(i));\n\t\t\t} else {\n\t\t\t\tbr.write(this.transactions.get(i) + \"\\n\");\n\t\t\t}\n\t\t}\n\n\t\t// close the filewriter (finished writing)\n\t\tbr.close();\n\t}", "public Builder clearBackupId() {\n \n backupId_ = getDefaultInstance().getBackupId();\n onChanged();\n return this;\n }", "public Builder clearBackupId() {\n \n backupId_ = getDefaultInstance().getBackupId();\n onChanged();\n return this;\n }", "public Builder clearBackupId() {\n \n backupId_ = getDefaultInstance().getBackupId();\n onChanged();\n return this;\n }" ]
[ "0.59342784", "0.56783664", "0.51089525", "0.51089525", "0.51089525", "0.51089525", "0.5098465", "0.50946087", "0.50745493", "0.50745493", "0.50745493", "0.50745493", "0.50322115", "0.50322115", "0.50322115", "0.50322115", "0.50297594", "0.50237083", "0.5015215", "0.5013993", "0.5013993", "0.5013993", "0.5013993", "0.49956533", "0.4983483", "0.49750847", "0.496896", "0.49667698", "0.4921637", "0.49114656", "0.4896062", "0.48915717", "0.48640898", "0.4860266", "0.48382828", "0.48382828", "0.48382828", "0.48382828", "0.4829384", "0.4794691", "0.47923073", "0.478038", "0.47451997", "0.47348046", "0.47091642", "0.47091642", "0.47091642", "0.47091642", "0.47075167", "0.4678757", "0.46679956", "0.463971", "0.463971", "0.463971", "0.463971", "0.46390605", "0.46295238", "0.4607495", "0.46043962", "0.46043962", "0.45994905", "0.45733967", "0.45641366", "0.4555983", "0.4550682", "0.4525784", "0.45190775", "0.4487391", "0.44841364", "0.4482593", "0.4462607", "0.4448814", "0.4448814", "0.44479486", "0.4441833", "0.44411552", "0.44326976", "0.44309467", "0.44305608", "0.44302022", "0.4427676", "0.44168583", "0.4412122", "0.44102868", "0.44069073", "0.44049838", "0.44042864", "0.4402208", "0.4398315", "0.43902835", "0.43784258", "0.43780893", "0.43678582", "0.43678582", "0.43678582", "0.43678582", "0.43643442", "0.43642434", "0.43642434", "0.43642434" ]
0.64435625
0
Reads CellBackup from SnapshotReader.
static CellBackup read(IdReader reader, TechPool techPool) throws IOException { CellRevision newRevision = CellRevision.read(reader); boolean modified = reader.readBoolean(); TechPool restrictedPool = techPool.restrict(newRevision.techUsages, techPool); return new CellBackup(newRevision, restrictedPool, modified); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initFromBackup(InputStream is) throws IOException {\n try (GzipCompressorInputStream gzIn = new GzipCompressorInputStream(is);\n JournalEntryStreamReader reader = new JournalEntryStreamReader(gzIn)) {\n List<Master> masters = mRegistry.getServers();\n\n // Executor for applying backup.\n ExecutorService es = Executors.newFixedThreadPool(\n 2, ThreadFactoryUtils.build(\"master-backup-%d\", true));\n CompletionService<Boolean> completionService = new ExecutorCompletionService<>(es);\n\n // List of active tasks.\n Set<Future<?>> activeTasks = new HashSet<>();\n\n // Entry queue will be used as a buffer and synchronization between readers and appliers.\n LinkedBlockingQueue<JournalEntry> journalEntryQueue = new LinkedBlockingQueue<>(\n Configuration.getInt(PropertyKey.MASTER_BACKUP_ENTRY_BUFFER_COUNT));\n\n // Whether still reading from backup.\n AtomicBoolean readingActive = new AtomicBoolean(true);\n\n // Index masters by name.\n Map<String, Master> mastersByName = Maps.uniqueIndex(masters, Master::getName);\n\n // Shows how many entries have been applied.\n AtomicLong appliedEntryCount = new AtomicLong(0);\n\n // Progress executor\n ScheduledExecutorService traceExecutor = Executors.newScheduledThreadPool(1,\n ThreadFactoryUtils.build(\"master-backup-tracer-%d\", true));\n traceExecutor.scheduleAtFixedRate(() -> {\n LOG.info(\"{} entries from backup applied so far...\", appliedEntryCount.get());\n }, 30, 30, TimeUnit.SECONDS);\n\n // Start the timer for backup metrics.\n long startRestoreTime = System.currentTimeMillis();\n\n // Create backup reader task.\n activeTasks.add(completionService.submit(() -> {\n try {\n JournalEntry entry;\n while ((entry = reader.readEntry()) != null) {\n journalEntryQueue.put(entry);\n }\n // Put termination entry for signaling the applier.\n journalEntryQueue\n .put(JournalEntry.newBuilder().setSequenceNumber(TERMINATION_SEQ).build());\n return true;\n } catch (InterruptedException ie) {\n // Continue interrupt chain.\n Thread.currentThread().interrupt();\n throw new RuntimeException(\"Thread interrupted while reading from backup stream.\", ie);\n } finally {\n readingActive.set(false);\n }\n }));\n\n // Create applier task.\n activeTasks.add(completionService.submit(() -> {\n try {\n // Read entries from backup.\n while (readingActive.get() || journalEntryQueue.size() > 0) {\n // Drain current elements.\n // Draining entries makes it possible to allow writes while current ones are\n // being applied.\n List<JournalEntry> drainedEntries = new LinkedList<>();\n if (0 == journalEntryQueue.drainTo(drainedEntries)) {\n // No elements at the moment. Fall back to polling.\n JournalEntry entry = journalEntryQueue.poll(10, TimeUnit.MILLISECONDS);\n if (entry == null) {\n // No entry yet.\n continue;\n }\n drainedEntries.add(entry);\n }\n // Apply drained entries.\n // Map for storing journal contexts.\n Map<Master, JournalContext> masterJCMap = new HashMap<>();\n try {\n // Pre-create journal contexts.\n // They should be closed after applying drained entries.\n for (Master master : masters) {\n masterJCMap.put(master, master.createJournalContext());\n }\n // Apply entries.\n for (JournalEntry entry : drainedEntries) {\n // Check for termination entry.\n if (entry.getSequenceNumber() == TERMINATION_SEQ) {\n // Reading finished.\n return true;\n }\n String masterName;\n try {\n masterName = JournalEntryAssociation.getMasterForEntry(entry);\n } catch (IllegalStateException ise) {\n ProcessUtils.fatalError(LOG, ise, \"Unrecognized journal entry: %s\", entry);\n throw ise;\n }\n try {\n Master master = mastersByName.get(masterName);\n master.applyAndJournal(masterJCMap.get(master), entry);\n appliedEntryCount.incrementAndGet();\n } catch (Exception e) {\n JournalUtils.handleJournalReplayFailure(LOG, e, \"Failed to apply \"\n + \"journal entry to master %s. Entry: %s\", masterName, entry);\n }\n }\n } finally {\n // Close journal contexts to ensure applied entries are flushed,\n // before next round.\n for (JournalContext journalContext : masterJCMap.values()) {\n journalContext.close();\n }\n }\n }\n return true;\n } catch (InterruptedException ie) {\n // Continue interrupt chain.\n Thread.currentThread().interrupt();\n throw new RuntimeException(\"Thread interrupted while applying backup content.\", ie);\n }\n }));\n\n // Wait until backup tasks are completed and stop metrics timer.\n try {\n safeWaitTasks(activeTasks, completionService);\n } finally {\n mRestoreTimeMs = System.currentTimeMillis() - startRestoreTime;\n mRestoreEntriesCount = appliedEntryCount.get();\n traceExecutor.shutdownNow();\n es.shutdown();\n }\n\n LOG.info(\"Restored {} entries from backup\", appliedEntryCount.get());\n }\n }", "public interface RawSnapshotReader extends Closeable, Iterable<RecordBatch> {\n /**\n * Returns the end offset and epoch for the snapshot.\n */\n OffsetAndEpoch snapshotId();\n\n /**\n * Returns the number of bytes for the snapshot.\n *\n * @throws IOException for any IO error while reading the size\n */\n long sizeInBytes() throws IOException;\n\n /**\n * Reads bytes from position into the given buffer.\n *\n * It is not guarantee that the given buffer will be filled.\n *\n * @param size size to read from snapshot file\n * @param position the starting position in the snapshot to read\n * @return the region read from snapshot\n * @throws IOException for any IO error while reading the snapshot\n */\n UnalignedRecords read(long position, int size) throws IOException;\n}", "private void doRecoveryRead() {\n if (!promise.isDone()) {\n startEntryToRead = endEntryToRead + 1;\n endEntryToRead = endEntryToRead + clientCtx.getConf().recoveryReadBatchSize;\n new RecoveryReadOp(lh, clientCtx, startEntryToRead, endEntryToRead, this, null)\n .initiate();\n }\n }", "yandex.cloud.api.ydb.v1.BackupOuterClass.Backup getBackups(int index);", "edu.usfca.cs.dfs.StorageMessages.BackUp getBackup();", "com.google.cloud.gkebackup.v1.Restore getRestore();", "public JournalReader read() {\n return new JournalReader(this);\n }", "private void recover() throws IOException, NumberFormatException,\n\t\t\tNotBoundException {\n\t\tFileReader fileReader = new FileReader(registryBackup);\n\n\t\t// Always wrap FileReader in BufferedReader.\n\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\t\tString line = null;\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\tlist.add(line);\t\n\t\t}\n\t\t// Always close files.\n\t\tbufferedReader.close();\n\n\t\tPrintWriter writer = new PrintWriter(registryBackup);\n\t\twriter.print(\"\");\n\t\twriter.close();\n\t\t\n\t\tfor(String conInfo : list){\n\t\tString[] split = conInfo.split(\" \");\n\t\ttry {\n\t\t\tthis.addReplica(split[0], Integer.parseInt(split[1]));\n\t\t} catch (Exception ex) {\n\t\t\tprint(ex.getMessage());\n\t\t}\n\t\t}\n\t}", "private ByteBuffer tryRead(long address, ByteBuffer destination)\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().lock();\n try\n {\n ByteBuffer read = null;\n do\n {\n Dereference dereference = bouquet.getAddressBoundary().dereference(address);\n dereference.getLock().lock();\n try\n {\n BlockPage blocks = dereference.getBlockPage();\n if (blocks != null)\n {\n read = blocks.read(address, destination);\n }\n }\n finally\n {\n dereference.getLock().unlock();\n }\n }\n while (read == null);\n \n return read;\n }\n finally\n {\n bouquet.getAddressBoundary().getPageMoveLock().readLock().unlock();\n }\n }", "public edu.usfca.cs.dfs.StorageMessages.BackUp getBackup() {\n if (backupBuilder_ == null) {\n if (msgCase_ == 10) {\n return (edu.usfca.cs.dfs.StorageMessages.BackUp) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.BackUp.getDefaultInstance();\n } else {\n if (msgCase_ == 10) {\n return backupBuilder_.getMessage();\n }\n return edu.usfca.cs.dfs.StorageMessages.BackUp.getDefaultInstance();\n }\n }", "Replica get(String resourceGroupName, String resourceName, String replicaName);", "protected void readSnapshotsSection(@SuppressWarnings(\"unused\") XmlNode section) {\n }", "public edu.usfca.cs.dfs.StorageMessages.BackUpOrBuilder getBackupOrBuilder() {\n if ((msgCase_ == 10) && (backupBuilder_ != null)) {\n return backupBuilder_.getMessageOrBuilder();\n } else {\n if (msgCase_ == 10) {\n return (edu.usfca.cs.dfs.StorageMessages.BackUp) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.BackUp.getDefaultInstance();\n }\n }", "public List<BackupInfo> getBackupHistory() throws IOException {\n return systemTable.getBackupHistory();\n }", "JournalEntry read() throws IOException, InvalidJournalEntryException;", "@java.lang.Override\n public yandex.cloud.api.ydb.v1.BackupOuterClass.BackupOrBuilder getBackupsOrBuilder(\n int index) {\n return backups_.get(index);\n }", "@java.lang.Override\n public yandex.cloud.api.ydb.v1.BackupOuterClass.Backup getBackups(int index) {\n return backups_.get(index);\n }", "public edu.usfca.cs.dfs.StorageMessages.BackUp getBackup() {\n if (msgCase_ == 10) {\n return (edu.usfca.cs.dfs.StorageMessages.BackUp) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.BackUp.getDefaultInstance();\n }", "public Long get_backuplist() throws Exception {\n\t\treturn this.backuplist;\n\t}", "com.google.cloud.gkebackup.v1.RestoreOrBuilder getRestoreOrBuilder();", "public String readBackupStartCode() throws IOException {\n return systemTable.readBackupStartCode(backupInfo.getBackupRootDir());\n }", "public yandex.cloud.api.ydb.v1.BackupOuterClass.Backup getBackups(int index) {\n if (backupsBuilder_ == null) {\n return backups_.get(index);\n } else {\n return backupsBuilder_.getMessage(index);\n }\n }", "yandex.cloud.api.ydb.v1.BackupOuterClass.BackupOrBuilder getBackupsOrBuilder(\n int index);", "public abstract byte[] getSnapshot();", "private void loadSnapshot()\n {\n m_snapshotDoc = null;\n m_Element = null;\n m_ElementStatus = null;\n m_bOffline = false;\n try\n {\n File snapshot = new File(MainFrame.getConfig().getUserPath(),\n SNAPSHOTFILE);\n if(snapshot.exists())\n {\n DocumentBuilder db = RXFileTracker.getDocumentBuilder();\n m_snapshotDoc = db.parse(snapshot.getPath());\n m_Element = m_snapshotDoc.getDocumentElement();\n }\n }\n catch(SAXException | IOException ioe)\n {\n log.error(PSExceptionUtils.getMessageForLog(ioe));\n }\n\n }", "static DataFrameRead read() {\n return DataFrameFactory.getInstance().read();\n }", "public edu.usfca.cs.dfs.StorageMessages.BackUpOrBuilder getBackupOrBuilder() {\n if (msgCase_ == 10) {\n return (edu.usfca.cs.dfs.StorageMessages.BackUp) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.BackUp.getDefaultInstance();\n }", "@Test\n public void testRead() {\n // Choose a random key to read, among the available ones.\n int readKeyNumber = new Random().nextInt(RiakKVClientTest.recordsToInsert);\n // Prepare two fields to read.\n Set<String> fields = new HashSet<>();\n fields.add(RiakKVClientTest.firstField);\n fields.add(RiakKVClientTest.thirdField);\n // Prepare an expected result.\n HashMap<String, String> expectedValue = new HashMap<>();\n expectedValue.put(RiakKVClientTest.firstField, Integer.toString(readKeyNumber));\n expectedValue.put(RiakKVClientTest.thirdField, Integer.toString((readKeyNumber * readKeyNumber)));\n // Define a HashMap to store the actual result.\n HashMap<String, ByteIterator> readValue = new HashMap<>();\n // If a read transaction has been properly done, then one has to receive a Status.OK return from the read()\n // function. Moreover, the actual returned result MUST match the expected one.\n Assert.assertEquals(\"Read transaction FAILED.\", OK, RiakKVClientTest.riakClient.read(RiakKVClientTest.bucket, ((RiakKVClientTest.keyPrefix) + (Integer.toString(readKeyNumber))), fields, readValue));\n Assert.assertEquals(\"Read test FAILED. Actual read transaction value is NOT MATCHING the expected one.\", expectedValue.toString(), readValue.toString());\n }", "com.google.protobuf.ByteString getSnapshotLocationBytes();", "private CellBackup(CellRevision cellRevision, TechPool techPool, boolean modified) {\n this.cellRevision = cellRevision;\n this.techPool = techPool;\n this.modified = modified;\n cellBackupsCreated++;\n if (Job.getDebug())\n check();\n }", "com.google.cloud.gkebackup.v1.BackupPlan.BackupConfig getBackupConfig();", "public yandex.cloud.api.ydb.v1.BackupOuterClass.BackupOrBuilder getBackupsOrBuilder(\n int index) {\n if (backupsBuilder_ == null) {\n return backups_.get(index); } else {\n return backupsBuilder_.getMessageOrBuilder(index);\n }\n }", "edu.usfca.cs.dfs.StorageMessages.BackUpOrBuilder getBackupOrBuilder();", "public static ExecutableReader reload(ExecutableReader in) throws Exception {\n\t\tByteArrayInputStream bis = new ByteArrayInputStream(in.getStream().getData());\n\t\tExecutableReader reader = null;\n\t\tif(in.is32bit())\n\t\t\treader = new ExecutableReader(bis);\n\t\telse\n\t\t\treader = new ExecutableReader64(bis);\n\t\tbis.close();\n\t\treturn reader;\n\t}", "public void checkReadLock() {\n checkNotDeleted();\n super.checkReadLock();\n }", "public CellBackup withoutModified() {\n if (!this.modified) return this;\n return new CellBackup(this.cellRevision, this.techPool, false);\n }", "@Override\n\tpublic BctsJobHeader read() throws Exception {\n\t\treturn fileReder();\n\t}", "@Override\n\tpublic Map<String, Object> read(int bno) throws Exception {\n\t\treturn boardDao.read(bno);\n\t}", "public Object clone() throws CloneNotSupportedException {\n\t\treturn (Reader) super.clone();\n\t}", "public void doRead() throws IOException {\n if (sc.read(bbin) == -1) {\n closed = true;\n }\n processIn();\n updateInterestOps();\n }", "public Long get_cachenummbreadfromdisk() throws Exception {\n\t\treturn this.cachenummbreadfromdisk;\n\t}", "@Test\n\t@Transactional\n\t@DirtiesContext\n\tpublic void testRestoreFromEmptyData() throws Exception {\n\t\tgetAsItemStream(reader).open(executionContext);\n\n\t\tFoo foo = reader.read();\n\t\tassertEquals(1, foo.getValue());\n\t}", "@Transactional(isolation = Isolation.READ_COMMITTED)\n\t@Override\n\tpublic BoardVO read(Integer b_no) throws Exception {\n\t\tdao.updateViewCnt(b_no);\n\t\treturn dao.read(b_no);\n\t}", "public void doReads(Reader reader) throws IOException;", "@Override public void checkpointReadLock() {\n if (checkpointLock.writeLock().isHeldByCurrentThread())\n return;\n\n long timeout = checkpointReadLockTimeout;\n\n long start = U.currentTimeMillis();\n\n boolean interruped = false;\n\n try {\n for (; ; ) {\n try {\n if (timeout > 0 && (U.currentTimeMillis() - start) >= timeout)\n failCheckpointReadLock();\n\n try {\n if (timeout > 0) {\n if (!checkpointLock.readLock().tryLock(timeout - (U.currentTimeMillis() - start),\n TimeUnit.MILLISECONDS))\n failCheckpointReadLock();\n }\n else\n checkpointLock.readLock().lock();\n }\n catch (InterruptedException e) {\n interruped = true;\n\n continue;\n }\n\n if (stopping) {\n checkpointLock.readLock().unlock();\n\n throw new IgniteException(new NodeStoppingException(\"Failed to perform cache update: node is stopping.\"));\n }\n\n if (checkpointLock.getReadHoldCount() > 1 || safeToUpdatePageMemories() || checkpointerThread == null)\n break;\n else {\n checkpointLock.readLock().unlock();\n\n if (timeout > 0 && U.currentTimeMillis() - start >= timeout)\n failCheckpointReadLock();\n\n try {\n checkpointer.wakeupForCheckpoint(0, \"too many dirty pages\").cpBeginFut\n .getUninterruptibly();\n }\n catch (IgniteFutureTimeoutCheckedException e) {\n failCheckpointReadLock();\n }\n catch (IgniteCheckedException e) {\n throw new IgniteException(\"Failed to wait for checkpoint begin.\", e);\n }\n }\n }\n catch (CheckpointReadLockTimeoutException e) {\n log.error(e.getMessage(), e);\n\n timeout = 0;\n }\n }\n }\n finally {\n if (interruped)\n Thread.currentThread().interrupt();\n }\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() + 1);\n }", "public StructManager read() throws Exception;", "public void backup(OutputStream os, AtomicLong entryCount) throws IOException {\n // Create gZIP compressed stream as back-up stream.\n GzipCompressorOutputStream zipStream = new GzipCompressorOutputStream(os);\n\n // Executor for taking backup.\n ExecutorService es = Executors.newFixedThreadPool(\n 4, ThreadFactoryUtils.build(\"master-backup-%d\", true));\n CompletionService<Boolean> completionService = new ExecutorCompletionService<>(es);\n\n // List of active tasks.\n Set<Future<?>> activeTasks = new HashSet<>();\n\n // Entry queue will be used as a buffer and synchronization between readers and writer.\n // Use of {@link LinkedBlockingQueue} is preferred because of {@code #drainTo()} method,\n // using which all existing entries can be drained while allowing writes.\n // Processing/draining one-by-one using {@link ConcurrentLinkedQueue} proved to be\n // inefficient compared to draining with dedicated method.\n LinkedBlockingQueue<JournalEntry> journalEntryQueue = new LinkedBlockingQueue<>(\n Configuration.getInt(PropertyKey.MASTER_BACKUP_ENTRY_BUFFER_COUNT));\n\n // Whether buffering is still active.\n AtomicBoolean bufferingActive = new AtomicBoolean(true);\n\n // Start the timer for backup metrics.\n long startBackupTime = System.currentTimeMillis();\n\n // Submit master reader task.\n activeTasks.add(completionService.submit(() -> {\n try {\n for (Master master : mRegistry.getServers()) {\n try (CloseableIterator<JournalEntry> it = master.getJournalEntryIterator()) {\n while (it.hasNext()) {\n journalEntryQueue.put(it.next());\n if (Thread.interrupted()) {\n throw new InterruptedException();\n }\n }\n }\n }\n // Put termination entry for signaling the writer.\n journalEntryQueue\n .put(JournalEntry.newBuilder().setSequenceNumber(TERMINATION_SEQ).build());\n return true;\n } catch (InterruptedException ie) {\n LOG.info(\"Backup reader task interrupted\");\n Thread.currentThread().interrupt();\n throw new RuntimeException(\"Thread interrupted while reading master state.\", ie);\n } finally {\n // Signal reader completion.\n bufferingActive.set(false);\n }\n }));\n\n // Submit writer task.\n activeTasks.add(completionService.submit(() -> {\n try {\n List<JournalEntry> pendingEntries = new LinkedList<>();\n while (bufferingActive.get() || journalEntryQueue.size() > 0) {\n // Drain pending entries.\n if (0 == journalEntryQueue.drainTo(pendingEntries)) {\n // No elements at the moment. Fall-back to blocking mode.\n pendingEntries.add(journalEntryQueue.take());\n }\n if (Thread.interrupted()) {\n throw new InterruptedException();\n }\n // Write entries to back-up stream.\n for (JournalEntry journalEntry : pendingEntries) {\n // Check for termination entry.\n if (journalEntry.getSequenceNumber() == TERMINATION_SEQ) {\n // Reading finished.\n return true;\n }\n journalEntry.writeDelimitedTo(zipStream);\n entryCount.incrementAndGet();\n }\n pendingEntries.clear();\n }\n return true;\n } catch (InterruptedException ie) {\n LOG.info(\"Backup writer task interrupted\");\n // Continue interrupt chain.\n Thread.currentThread().interrupt();\n throw new RuntimeException(\"Thread interrupted while writing to backup stream.\", ie);\n }\n }));\n\n // Wait until backup tasks are completed.\n safeWaitTasks(activeTasks, completionService);\n\n // Close timer and update entry count.\n mBackupTimeMs = System.currentTimeMillis() - startBackupTime;\n mBackupEntriesCount = entryCount.get();\n\n // finish() instead of close() since close would close os, which is owned by the caller.\n zipStream.finish();\n es.shutdown();\n LOG.info(\"Created backup with {} entries\", entryCount.get());\n }", "public void checkReadLock() {\r\n return;\r\n }", "public void deserializeSnapshot(InputArchive ia) throws IOException {\n clear();\n SerializeUtils.deserializeSnapshot(getDataTree(), ia, getSessionWithTimeOuts());\n initialized = true;\n }", "@Override\n public void validateRestoreSnapshot(BlockSnapshot snapshot, Volume parent) {\n // RecoverPoint snapshots (bookmarks) will be automatically activated\n // before restore.\n if (snapshot.getEmName() == null) {\n super.validateRestoreSnapshot(snapshot, parent);\n }\n }", "@Override\n\tpublic String readBlob() throws PersistBlobException {\n\t\tlog.debug(\"readString: \");\n\t\ttry {\n\t\t\tString contents = FileUtils.readFileToString(new File(full_file_name), \"UTF-8\");\n\t\t\tlog.debug(\"returned string: \"+contents);\n\t\t\treturn contents;\n\t\t} catch (IOException e) {\n\t\t\tthrow new PersistBlobException(\"can not read string\",e);\n\t\t}\n\n\t}", "private void doRead() throws IOException {\n\t\t\tvar res = sc.read(bb);\n\n\t\t\tif ( res == -1 ) {\n\t\t\t\tlogger.info(\"Connection closed with the client.\");\n\t\t\t\tclosed = true;\n\t\t\t}\n\n\t\t\tupdateInterestOps();\n\t\t}", "public static ObservableList<JobSheet> readingDB() throws IOException {\n\n ObservableList<JobSheet> sheet = FXCollections.observableArrayList();\n\n Scanner scan = new Scanner(new File(System.getProperty(\"user.dir\") + \"/src/jobSheet/jobSheetDB.txt\"));\n scan.useDelimiter(\"[,\\n]\");\n\n while (scan.hasNext()) {\n\n sheet.add(new JobSheet(scan.next(), scan.next(), scan.next(), scan.next()));\n }\n scan.close();\n\n return sheet;\n }", "private void recover() throws JournalException {\n if (!Utility.fileExists(this.node, this.filename)) {\n // no log file to recover, just start fresh\n startFresh();\n } else {\n PersistentStorageReader reader = null;\n try {\n reader = node.getReader(this.filename);\n } catch (IOException e) {\n throw new JournalException(\"Failed to open log file: \" \n + this.filename + \" for recovery.\");\n }\n\n if (reader != null) {\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n if (line.equals(COMPLETE_TOKEN)) {\n this.pendingOps.poll();\n } else {\n try {\n Serializable obj = (Serializable)Serialization.decode(Utility.fromBase64(line));\n this.pendingOps.offer(obj);\n } catch (Exception e) {\n throw new JournalException(\"Error deserializing on recovery.\");\n }\n }\n }\n } catch (IOException e) {\n throw new JournalException(\"Error while reading from recovery log.\");\n }\n } else {\n throw new JournalException(\"Failed to open log file: \"\n + this.filename + \" for recovery.\");\n }\n try {\n this.log = this.node.getWriter(this.filename, true);\n } catch (IOException e) {\n throw new JournalException(\"Failed to open log file.\");\n }\n }\n }", "public DescribeInstanceBackupsResponse DescribeInstanceBackups(DescribeInstanceBackupsRequest req) throws TencentCloudSDKException{\n JsonResponseModel<DescribeInstanceBackupsResponse> rsp = null;\n try {\n Type type = new TypeToken<JsonResponseModel<DescribeInstanceBackupsResponse>>() {\n }.getType();\n rsp = gson.fromJson(this.internalRequest(req, \"DescribeInstanceBackups\"), type);\n } catch (JsonSyntaxException e) {\n throw new TencentCloudSDKException(e.getMessage());\n }\n return rsp.response;\n }", "public JodaBeanBinReader binReader() {\n return new JodaBeanBinReader(this);\n }", "public ByteArrayInputStream readByteArrayObject() throws IOException {\n int blockCount = raf.readInt();\n\n // Reserved\n raf.skipBytes(4);\n\n int chunkSize;\n\n // data was deleted\n if ((chunkSize=raf.readInt()) == 0)\n return null;\n\n // Reserved\n raf.skipBytes(4);\n\n // Reserved\n raf.skipBytes(16);\n\n byte[] buffer = new byte[chunkSize];\n\n // read chunk of data from file to buffer\n raf.read(buffer);\n\n // move across padded area\n raf.skipBytes(blockCount*blockSize - chunkSize);\n\n // convert into bis, and return the bis\n return new ByteArrayInputStream(buffer);\n }", "@Test\n public void equalsBetweenDifferentBackups(){\n //backup_1 and backup_1b differs from\n InputStream url1= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1.json\");\n InputStream url1b= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1b.json\");\n\n Backup backup_a = Backup.initFromFile(url1);\n Backup backup_b = Backup.initFromFile(url1b);\n\n assertNotEquals(backup_a, backup_b);\n }", "public Backup() {\n initComponents();\n selecionarOpcoesDeBackup();\n }", "boolean hasBackup();", "@JRubyMethod(name = \"read\", meta = true, required = 1, optional = 3, compat = RUBY1_9)\n public static IRubyObject read19(ThreadContext context, IRubyObject recv, IRubyObject[] args, Block unusedBlock) {\n IRubyObject nil = context.getRuntime().getNil();\n IRubyObject path = args[0];\n IRubyObject length = nil;\n IRubyObject offset = nil;\n RubyHash options = null;\n if (args.length > 3) {\n if (!(args[3] instanceof RubyHash)) throw context.getRuntime().newTypeError(\"Must be a hash\");\n options = (RubyHash) args[3];\n offset = args[2];\n length = args[1];\n } else if (args.length > 2) {\n if (args[2] instanceof RubyHash) {\n options = (RubyHash) args[2];\n } else {\n offset = args[2];\n }\n length = args[1];\n } else if (args.length > 1) {\n if (args[1] instanceof RubyHash) {\n options = (RubyHash) args[1];\n } else {\n length = args[1];\n }\n }\n \n return read19(context, recv, path, length, offset, (RubyHash) options);\n }", "@Override\n public void doRead() throws IOException {\n if (sc.read(bbin) == -1) {\n state = State.CLOSED;\n }\n processIn();\n updateInterestOps();\n }", "public abstract ICloudBackup getBackupImpl();", "boolean onReadRow(int rowIndex, Map<String, String> rowData);", "public synchronized DataSnapshot getSnapshot() {\n if (!initialSnapshotReceived) {\n try {\n wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n return snapshot;\n }", "private boolean read(Reader reader, byte[] dst, int offset, int numBytes) {\n reader.droppedSamplesWarning = false;\n if (cumulativeWritten - reader.cumulativeRead > capacity) {\n logger.atSevere().log(\"We lost data before this read!\");\n // Skip ahead to the very end of the buffer.\n int skipAmount = (int) (cumulativeWritten - reader.cumulativeRead) - numBytes;\n reader.advance(skipAmount);\n reader.cumulativeRead += skipAmount;\n reader.droppedSamplesWarning = true;\n }\n if (peek(reader, dst, offset, numBytes)) {\n reader.advance(numBytes);\n return true;\n }\n return false;\n }", "List<BookStoreElement> load(Reader reader);", "protected IndexReader getReader() {\n\t\treturn indexReader;\n\t}", "boolean hasForRead();", "public CellBackup withRevisionDate(long revisionDate) {\n CellRevision newRevision = cellRevision.withRevisionDate(revisionDate);\n if (newRevision == cellRevision) return this;\n return new CellBackup(newRevision, this.techPool, true);\n }", "public java.util.List<? extends yandex.cloud.api.ydb.v1.BackupOuterClass.BackupOrBuilder> \n getBackupsOrBuilderList() {\n if (backupsBuilder_ != null) {\n return backupsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(backups_);\n }\n }", "private void restoreToCheckpoint(Parameters checkpoint) {\n assert geometricParts.diskShardCount() == 0 : \"Restore to Checkpoint should only be called at startup!\";\n\n this.lastAddedDocumentIdentifier = checkpoint.getString(\"lastDoc/identifier\");\n this.lastAddedDocumentNumber = (int) checkpoint.getLong(\"lastDoc/number\");\n this.indexBlockCount = (int) checkpoint.getLong(\"indexBlockCount\");\n Parameters shards = checkpoint.getMap(\"shards\");\n for (String indexPath : shards.getKeys()) {\n this.geometricParts.add((int) shards.getLong(indexPath), indexPath);\n }\n }", "public synchronized void readLog() {\n MemoryCache instance = MemoryCache.getInstance();\n try (Stream<String> stream = Files.lines(Paths.get(path)).skip(instance.getSkipLine())) {\n stream.forEach(s -> {\n Result result = readEachLine(s);\n instance.putResult(result);\n instance.setSkipLine(instance.getSkipLine() + 1);\n });\n } catch (IOException e) {\n logger.error(\"error during reading file \" + e.getMessage());\n }\n }", "public long loadDataBase() throws IOException {\n long startTime = Time.currentElapsedTime();\n long zxid = snapLog.restore(dataTree, sessionsWithTimeouts, commitProposalPlaybackListener);\n initialized = true;\n long loadTime = Time.currentElapsedTime() - startTime;\n ServerMetrics.getMetrics().DB_INIT_TIME.add(loadTime);\n LOG.info(\"Snapshot loaded in {} ms, highest zxid is 0x{}, digest is {}\",\n loadTime, Long.toHexString(zxid), dataTree.getTreeDigest());\n return zxid;\n }", "protected Object getAttributeValueFromBackupClone(Object backupClone) {\n return null;\n }", "public java.util.List<yandex.cloud.api.ydb.v1.BackupOuterClass.Backup> getBackupsList() {\n if (backupsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(backups_);\n } else {\n return backupsBuilder_.getMessageList();\n }\n }", "@java.lang.Override\n public java.util.List<? extends yandex.cloud.api.ydb.v1.BackupOuterClass.BackupOrBuilder> \n getBackupsOrBuilderList() {\n return backups_;\n }", "@Test\n public void resumeBackupWithoutKillingOrderAndKillingCounter(){\n GameModel gm = new GameModel();\n\n InputStream url1= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1.json\");\n\n gm.resumeMatchFromFile(url1);\n assertTrue(true);\n }", "private void backupToFileButtonClicked(java.awt.event.ActionEvent evt) {\n\t\tbyte[][] colFamilys;\n\n\t\tList<List<HBaseRow>> tableRows;\n\n\t\tfinal JFileChooser fc = new JFileChooser();\n\t\tFile backupFile = null;\n\n\t\tfc.showSaveDialog(this);\n\n\t\tbackupFile = fc.getSelectedFile();\n\n\t\ttry {\n\t\t\tgetLabelFileOperationStatus().setText(\"Backup in progress\");\n\t\t\tfor (int i = 0; i < listSelectedTables.getModel().getSize(); i++) {\n\t\t\t\tString tblName = (String) listSelectedTables.getModel().getElementAt(i);// (String)listSelectedTables.\n\t\t\t\tlistSelectedTables.setSelectedValue(tblName, true);\n\t\t\t\tLogger.getLogger(HbaseDataBackupRestoreDialog.class.getName()).log(Level.INFO, \"Table name: \" + tblName);\n\t\t\t\tHBaseTableStructure tableStructure = new HBaseTableStructure();\n\t\t\t\ttableStructure.createWriteTableStructure(tblName);\n\n\t\t\t\tcolFamilys = tableStructure.getAllColoumnFamilies();\n\n\t\t\t\tResultScanner resultScan = HBaseTableManager.getAllDataInRangeOfFamily(\"0\", \"zz\", colFamilys, tblName);\n\n\t\t\t\ttableRows = this.getDataObjectList(resultScan, colFamilys);\n\n\t\t\t\tIterator<List<HBaseRow>> iterator = tableRows.iterator();\n\t\t\t\tList<HBaseRow> rowList;\n\t\t\t\tList<HbaseTableObject> tableObject = new ArrayList<HbaseTableObject>();\n\t\t\t\twhile (iterator.hasNext()) {\n\n\t\t\t\t\trowList = iterator.next();\n\t\t\t\t\tHbaseTableObject hbTable = new HbaseTableObject();\n\t\t\t\t\tHBaseTableData tableData = new HBaseTableData();\n\n\t\t\t\t\ttableData.setHbaseTableData(rowList);\n\t\t\t\t\thbTable.setTableData(tableData);\n\t\t\t\t\thbTable.setTableStructure(tableStructure);\n\t\t\t\t\thbTable.setLastObject(false);\n\t\t\t\t\thbTable.setLinkedFileAvailable(true);\n\n\t\t\t\t\tif (!iterator.hasNext()) {\n\t\t\t\t\t\thbTable.setLastObject(true);\n\t\t\t\t\t}\n\t\t\t\t\ttableObject.add(hbTable);\n\n\t\t\t\t}\n\n\t\t\t\tFile targetFile = new File(backupFile.getAbsolutePath().concat(\"_\").concat(tblName));\n\n\t\t\t\tBackupRestoreFileUtil fileUtil = new BackupRestoreFileUtil(targetFile);\n\t\t\t\tlong rows = (tableObject.size() - 1) * 20001 + tableObject.get(tableObject.size() - 1).getTableData().getHbaseTableData().size();\n\t\t\t\tthis.getLabelFileOperationStatus().setText(\"Backup Done: ~ \" + rows + \" backed-up\");\n\t\t\t\tfileUtil.backupToFiles(tableObject);\n\n\t\t\t\t// writeObjectFile.writeObject(hbTable);\n\t\t\t\tlistBackupSelectedModel.remove(0);\n\n\t\t\t} // write hbTable to file, object stream;\n\n\t\t\tJOptionPane.showMessageDialog(this, \"Backup Complete. \\n Backup File : \" + fc.getSelectedFile().getName());\n\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Backup Failed.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t}\n\n\t}", "protected T doRead() throws Exception {\r\n\r\n\t\tif (noInput) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tT item = null;\r\n\r\n\t\tint success = 0;\r\n\t\ttry {\r\n\t\t\tsuccess = moveCursorToNextFragment(fragmentReader);\r\n\t\t}\r\n\t\tcatch (NonTransientResourceException e) {\r\n\t\t\t// Prevent caller from retrying indefinitely since this is fatal\r\n\t\t\tnoInput = true;\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\tif (success == 1) {\r\n\t\t\tfragmentReader.markStartFragment();\r\n\t\t\ttry {\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tT mappedFragment = (T) unmarshaller.unmarshal(StaxUtils.getSource(fragmentReader));\r\n\t\t\t\titem = mappedFragment;\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tfragmentReader.markFragmentProcessed();\r\n\t\t\t}\r\n\t\t}else if(success == 2){\r\n\t\t\tfragmentReader.markStartFragment();\r\n\t\t\ttry {\r\n\t\t\t\tSource currentSource = StaxUtils.getSource(fragmentReader);\r\n\t\t\t\tXmlStreamEvent event = StaxDefaultUnmarshaller.sourceToParsedEvent(currentSource);\r\n\t\t\t\theaderWriter.write(event);\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tfragmentReader.markFragmentProcessed();\r\n\t\t\t}\r\n\t\t\treturn doRead();\r\n\t\t}\r\n\t\treturn item;\r\n\t}", "private int readFromGCS(ByteBuffer byteBuffer, OptionalLong bytesToRead) throws IOException {\n int read = 0;\n StatusRuntimeException statusRuntimeException;\n BackOff backoff = backOffFactory.newBackOff();\n Sleeper sleeper = Sleeper.DEFAULT;\n do {\n Stopwatch stopwatch = Stopwatch.createStarted();\n try {\n if (resIterator == null) {\n positionInGrpcStream = positionForNextRead;\n resIterator =\n requestObjectMedia(\n resourceId.getObjectName(), objectGeneration, positionInGrpcStream, bytesToRead);\n if (bytesToRead.isPresent()) {\n contentChannelEndOffset = positionInGrpcStream + bytesToRead.getAsLong();\n }\n }\n while (byteBuffer.hasRemaining() && moreServerContent()) {\n read += readObjectContentFromGCS(byteBuffer);\n }\n recordSuccessMetric(LATENCY_MS, stopwatch.elapsed(MILLISECONDS));\n return read;\n } catch (StatusRuntimeException e) {\n cancelCurrentRequest();\n recordErrorMetric(LATENCY_MS, stopwatch.elapsed(MILLISECONDS), e);\n statusRuntimeException = e;\n }\n } while (nextSleep(sleeper, backoff, statusRuntimeException));\n throw convertError(statusRuntimeException, resourceId);\n }", "private void readSourceData() throws Exception {\n\t\tthis.fileDataList = new ArrayList<String>();\n\t\tReader reader = new Reader(this.procPath);\n\t\treader.running();\n\t\tthis.fileDataList = reader.getFileDataList();\n\t}", "NffgReader getReader() throws ServiceException;", "private boolean peek(Reader reader, byte[] dst, int offset, int numBytes) {\n int bytesToRead = numBytes;\n if (bytesToRead == 0) {\n return true;\n }\n if (bytesToRead < 0 || bytesToRead > reader.availableBytes()) {\n return false;\n }\n int endOfReadSection = (reader.readHead + bytesToRead) % capacity;\n if (reader.readHead < endOfReadSection) {\n System.arraycopy(buffer, reader.readHead, dst, offset, endOfReadSection - reader.readHead);\n } else { // Data wraps around buffer edge.\n System.arraycopy(buffer, reader.readHead, dst, offset, capacity - reader.readHead);\n int entriesBeforeWrap = capacity - reader.readHead;\n System.arraycopy(\n buffer, 0, dst, offset + capacity - reader.readHead, bytesToRead - entriesBeforeWrap);\n }\n return true;\n }", "@Override\n\tpublic List<RecoverySaleBillVO> getRecoverCellByCondication(\n\t\t\tString commonName, String status, int first, int pageseize) {\n\t\treturn recoveryCellDao.getRecoverCellByCondication(commonName, status, first, pageseize);\n\t}", "com.google.container.v1.GkeBackupAgentConfig getGkeBackupAgentConfig();", "@Override\n public int read(byte[] outBuf, int bufferBytePos, int len) throws EhcacheStreamException {\n checkIfOpen();\n\n // activeStreamMaster could be null here if there was no entry in cache in the first place...\n if(null == activeStreamMaster) {\n return -1;\n }\n\n //because we didn't increment the reader count, we need to check the cache to see if anything has changed since being open\n //And since we're not really atomic anyway (since we didn't lock anything in the open()), a simple get and compare would do i think...\n //overall, let's compare if the cache entry has not been written since we opened (the lastWritten bit would have changed)\n EhcacheStreamMaster currentStreamMaster = getEhcacheStreamUtils().getStreamMasterFromCache(getPublicCacheKey());\n boolean isWeaklyConsistent =\n currentStreamMaster != null &&\n currentStreamMaster.getChunkCount() == activeStreamMaster.getChunkCount() &&\n currentStreamMaster.getLastWrittenTime() == activeStreamMaster.getLastWrittenTime();\n\n if(!isWeaklyConsistent)\n throw new EhcacheStreamIllegalStateException(\"Concurrent modification exception: EhcacheStreamMaster has changed since opening: a concurrent write must have happened. Consider retrying in a bit.\");\n\n try {\n // copy the cache chunks into the buffer based on the internal index tracker\n return read1(outBuf, bufferBytePos, len);\n } catch (EhcacheStreamIllegalStateException exc){\n throw new EhcacheStreamIllegalStateException(String.format(\"Could not read the cache chunk. Current StreamMaster[=%s]\", EhcacheStreamUtilsInternal.toStringSafe(activeStreamMaster)), exc);\n }\n }", "java.util.List<yandex.cloud.api.ydb.v1.BackupOuterClass.Backup> \n getBackupsList();", "public void deserializeSnapshot(final InputArchive ia, final CheckedInputStream is) throws IOException {\n clear();\n\n // deserialize data tree\n final DataTree dataTree = getDataTree();\n FileSnap.deserialize(dataTree, getSessionWithTimeOuts(), ia);\n SnapStream.checkSealIntegrity(is, ia);\n\n // deserialize digest and check integrity\n if (dataTree.deserializeZxidDigest(ia, 0)) {\n SnapStream.checkSealIntegrity(is, ia);\n }\n\n // deserialize lastProcessedZxid and check integrity\n if (dataTree.deserializeLastProcessedZxid(ia)) {\n SnapStream.checkSealIntegrity(is, ia);\n }\n\n // compare the digest to find inconsistency\n if (dataTree.getDigestFromLoadedSnapshot() != null) {\n dataTree.compareSnapshotDigests(dataTree.lastProcessedZxid);\n }\n\n initialized = true;\n }", "@Test\n @Ignore(\"This is only applicable to Neo4j 2.0.0-M03 and below where transactions \" +\n \"were not mandatory for reading\")\n public void defaultReadingIsReadCommitted() throws Exception {\n assertNameAndAgeViaLookup(john.getId(), \"John\", 34, \"John\");\n\n // Do the update in a separate Thread and ensure its actually updated\n doUpdateInSeparateThread(new PersonUpdater(\"John\", 44));\n\n // Now, back in our thread, ensure we read the commited value\n assertNameAndAgeViaLookup(john.getId(), \"John\", 44, \"John\");\n }", "public ArrowRecordBatch readNext() throws IOException {\n ArrowRecordBatchBuilder recordBatchBuilder =\n jniWrapper.nativeReadNext(nativeInstanceId);\n if (recordBatchBuilder == null) {\n return null;\n }\n ArrowRecordBatchBuilderImpl recordBatchBuilderImpl =\n new ArrowRecordBatchBuilderImpl(recordBatchBuilder);\n ArrowRecordBatch batch = recordBatchBuilderImpl.build();\n if (batch == null) {\n throw new IllegalArgumentException(\"failed to build record batch\");\n }\n this.lastReadLength = batch.getLength();\n return batch;\n }", "private static String getString(Reader reader) {\n StringBuffer buf = new StringBuffer();\n char[] buffer = new char[1024];\n int count;\n try {\n while ((count = reader.read(buffer)) != -1) {\n buf.append(buffer, 0, count);\n }\n } catch (IOException e) {\n return null;\n }\n return buf.toString();\n }", "CompletableFuture<SnapshotRestoreResponse> requestSnapshotChunk(\n MemberId server, SnapshotRestoreRequest request);", "@java.lang.Override\n public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() {\n return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_;\n }", "@Override\n public String readFile(BufferedReader reader)\n {\n try\n {\n StringBuffer strLine = new StringBuffer();\n String line;\n\n while ((line = reader.readLine()) != null)\n {\n if (!line.startsWith(\"--\", 0))\n {\n strLine.append(line);\n\n // use ; as the command delimiter and execute the query on the database.\n if (line.endsWith(\";\"))\n {\n super.exeQuery(strLine.toString());\n strLine = new StringBuffer();\n }\n }\n }\n\n return strLine.toString();\n }\n catch (IOException ioex)\n {\n logger.error(\"Error reading contents from file.\");\n return null;\n }\n }", "java.util.List<? extends yandex.cloud.api.ydb.v1.BackupOuterClass.BackupOrBuilder> \n getBackupsOrBuilderList();", "public FilesInputStreamLoad readFile() throws ArcException {\r\n\tFile dir = new File(this.archiveChargement + \".dir\");\r\n\tString fileName = ManipString.substringAfterFirst(this.idSource, \"_\");\r\n\tFile toRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\tFilesInputStreamLoad filesInputStreamLoadReturned = null;\r\n\ttry {\r\n\t\tfilesInputStreamLoadReturned = new FilesInputStreamLoad (toRead);\r\n\t} catch (IOException ioReadException) {\r\n\t\tthrow new ArcException(ioReadException, ArcExceptionMessage.FILE_READ_FAILED, toRead);\r\n\t}\r\n\treturn filesInputStreamLoadReturned;\r\n }", "private void recover() throws IllegalStateException, InvalidRecordLocationException, IOException, IOException {\n \n RecordLocation pos = null;\n int transactionCounter = 0;\n \n log.info(\"Journal Recovery Started from: \" + journal);\n ConnectionContext context = new ConnectionContext();\n \n // While we have records in the journal.\n while ((pos = journal.getNextRecordLocation(pos)) != null) {\n org.activeio.Packet data = journal.read(pos);\n DataStructure c = (DataStructure) wireFormat.unmarshal(data);\n \n if (c instanceof Message ) {\n Message message = (Message) c;\n JournalMessageStore store = (JournalMessageStore) createMessageStore(message.getDestination());\n if ( message.isInTransaction()) {\n transactionStore.addMessage(store, message, pos);\n }\n else {\n store.replayAddMessage(context, message);\n transactionCounter++;\n }\n } else {\n switch (c.getDataStructureType()) {\n case JournalQueueAck.DATA_STRUCTURE_TYPE:\n {\n JournalQueueAck command = (JournalQueueAck) c;\n JournalMessageStore store = (JournalMessageStore) createMessageStore(command.getDestination());\n if (command.getMessageAck().isInTransaction()) {\n transactionStore.removeMessage(store, command.getMessageAck(), pos);\n }\n else {\n store.replayRemoveMessage(context, command.getMessageAck());\n transactionCounter++;\n }\n }\n break;\n case JournalTopicAck.DATA_STRUCTURE_TYPE: \n {\n JournalTopicAck command = (JournalTopicAck) c;\n JournalTopicMessageStore store = (JournalTopicMessageStore) createMessageStore(command.getDestination());\n if (command.getTransactionId() != null) {\n transactionStore.acknowledge(store, command, pos);\n }\n else {\n store.replayAcknowledge(context, command.getClientId(), command.getSubscritionName(), command.getMessageId());\n transactionCounter++;\n }\n }\n break;\n case JournalTransaction.DATA_STRUCTURE_TYPE:\n {\n JournalTransaction command = (JournalTransaction) c;\n try {\n // Try to replay the packet.\n switch (command.getType()) {\n case JournalTransaction.XA_PREPARE:\n transactionStore.replayPrepare(command.getTransactionId());\n break;\n case JournalTransaction.XA_COMMIT:\n case JournalTransaction.LOCAL_COMMIT:\n Tx tx = transactionStore.replayCommit(command.getTransactionId(), command.getWasPrepared());\n if (tx == null)\n break; // We may be trying to replay a commit that\n // was already committed.\n \n // Replay the committed operations.\n tx.getOperations();\n for (Iterator iter = tx.getOperations().iterator(); iter.hasNext();) {\n TxOperation op = (TxOperation) iter.next();\n if (op.operationType == TxOperation.ADD_OPERATION_TYPE) {\n op.store.replayAddMessage(context, (Message) op.data);\n }\n if (op.operationType == TxOperation.REMOVE_OPERATION_TYPE) {\n op.store.replayRemoveMessage(context, (MessageAck) op.data);\n }\n if (op.operationType == TxOperation.ACK_OPERATION_TYPE) {\n JournalTopicAck ack = (JournalTopicAck) op.data;\n ((JournalTopicMessageStore) op.store).replayAcknowledge(context, ack.getClientId(), ack.getSubscritionName(), ack\n .getMessageId());\n }\n }\n transactionCounter++;\n break;\n case JournalTransaction.LOCAL_ROLLBACK:\n case JournalTransaction.XA_ROLLBACK:\n transactionStore.replayRollback(command.getTransactionId());\n break;\n }\n }\n catch (IOException e) {\n log.error(\"Recovery Failure: Could not replay: \" + c + \", reason: \" + e, e);\n }\n }\n break;\n case JournalTrace.DATA_STRUCTURE_TYPE:\n JournalTrace trace = (JournalTrace) c;\n log.debug(\"TRACE Entry: \" + trace.getMessage());\n break;\n default:\n log.error(\"Unknown type of record in transaction log which will be discarded: \" + c);\n }\n }\n }\n \n RecordLocation location = writeTraceMessage(\"RECOVERED\", true);\n journal.setMark(location, true);\n \n log.info(\"Journal Recovered: \" + transactionCounter + \" message(s) in transactions recovered.\");\n }", "@Test\n public void equalsBetweenBackupsFromIdenticalFiles(){\n //backup_1 and backup_1b contain exactly the same text\n InputStream url= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1.json\");\n\n Backup backup_a = Backup.initFromFile(url);\n Backup backup_b = Backup.initFromFile(getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1.json\"));\n\n assertEquals(backup_a, backup_b);\n assertTrue(backup_a.equals(backup_b));\n }", "public PMBYWICReportPrefDataBean read() throws Exception,\n\tUnexpectedInputException, ParseException,\n\tNonTransientResourceException {\n\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\tLOGGER.debug(\" Entering into PMByWICCustomReader.read() \");\n\t\t}\n\t\tif(count == 0){\n\t\t\tcount++;\n\t\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\t\tLOGGER.debug(\" Exiting From PMByWICCustomReader.read() \");\n\t\t\t}\n\t\t\treturn objPMBYWICReportPrefDataBean;\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}" ]
[ "0.52914184", "0.50477064", "0.48002392", "0.47167847", "0.46904248", "0.46700493", "0.46373275", "0.45902982", "0.45527136", "0.45205528", "0.4516004", "0.45044485", "0.44370976", "0.4425822", "0.44248804", "0.44090223", "0.43620175", "0.43536037", "0.43448177", "0.43430522", "0.43335566", "0.4328911", "0.43179548", "0.43112332", "0.4309416", "0.4298982", "0.42952776", "0.42573607", "0.4242751", "0.42283684", "0.4225334", "0.42088902", "0.42084536", "0.41930375", "0.41509768", "0.4146179", "0.4130843", "0.4127422", "0.41266543", "0.41153672", "0.4087729", "0.4076859", "0.40667972", "0.4058236", "0.40560576", "0.40395856", "0.40358812", "0.40342003", "0.40210864", "0.4019839", "0.4015137", "0.40120104", "0.4011769", "0.40020645", "0.39961752", "0.3995045", "0.39921775", "0.39777383", "0.3967011", "0.39653167", "0.39650548", "0.39546117", "0.39515203", "0.3928017", "0.39228225", "0.39202526", "0.39184", "0.391689", "0.39099717", "0.39081106", "0.39058515", "0.39055797", "0.39043453", "0.38977894", "0.38958555", "0.38945836", "0.38943857", "0.38902643", "0.38870528", "0.38869533", "0.3885516", "0.38842595", "0.38833985", "0.388131", "0.3878539", "0.38779387", "0.3875523", "0.387323", "0.38657475", "0.3860204", "0.38593417", "0.38565716", "0.3854279", "0.38399032", "0.38361502", "0.3835405", "0.38328436", "0.38308564", "0.3830692", "0.38266352" ]
0.6492289
0
Returns data for size computation (connectivity etc).
public Memoization getMemoization() { Memoization m = this.m; if (m != null) return m; return this.m = new Memoization(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getDataSize() {\n return dataSize;\n }", "public int size() {\n return dataSize;\n }", "public abstract String get_size(DataRequest source) throws ConnectorOperationException;", "public int getDataSize() {\n\t\treturn (int)this.getSize(data);\n\t}", "public int dataSize() {\n\t\treturn data.size();\n\t}", "public static int size_infos_size_data() {\n return (8 / 8);\n }", "public int DataMemorySize() { return DATA_MEMORY_SIZE; }", "public long dataSize() {\n return this.dataSize;\n }", "int getDataCount();", "int getDataCount();", "int getDataCount();", "int getDataCount();", "int getDataCount();", "public int getResultDataCapacity() {\n return resultDataCapacity;\n }", "public int size() {\n return data.length;\n }", "public int getDataCount() {\n return data_.size();\n }", "public int dataSize() {\n\t\treturn _dataSet.dataSize();\n\t}", "public static int totalSize_data() {\n return (480 / 8);\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "@Override\n\tpublic int getSize() {\n\t\treturn datas.size();\n\t}", "public int size() {\n return data.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public static int size_dataType() {\n return (8 / 8);\n }", "public int size() {\r\n return theData.size();\r\n }", "int size() {\n return data.size();\r\n }", "public int getTotalSize();", "public int size()\r\n\t{\r\n\t\treturn data.size();\r\n\t}", "public int size() {\n\t\treturn data.length;\n\t}", "public int size()\n\t{\n\t\treturn data.length;\n\t}", "public int getLength() { return dataLength; }", "public int size()\n\t{\n\t\treturn _data.size();\n\t}", "public int getSizeOfData() {\n\t\treturn sizeOfData;\n\t}", "public int get_size();", "public int get_size();", "public int getLength(){\n\t\treturn data.length;\n\t}", "public static int elementSize_data() {\n return (8 / 8);\n }", "public int get_data_header_size() {\r\n return sizeof_dimension;\r\n }", "int getTotalSize();", "public Double testDataSize() {\n return this.testDataSize;\n }", "public int get_size() {\r\n return this.dimension * 2 * sizeof_float + 4 * sizeof_float + sizeof_dimension + sizeof_int;\r\n }", "public int size(){\n int size = 0;\n for(LinkedList<E> item : this.data){\n size += item.size();\n }\n return size;\n }", "public int length() {\n return data.length;\n }", "public double getSize() \n {\n return size;\n }", "private int infoCount() {\n return data.size();\n }", "double getSize();", "public int getLength() {\n\t\treturn data.length;\n\t\t\n\t}", "public int getLocalSize();", "public long getNumDefinedData();", "public static int offset_infos_size_data() {\n return (80 / 8);\n }", "public int getSize() { return size; }", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int Size(){\n \treturn size;\n\t}", "public double getSize()\n\t{\n\t\treturn size;\n\t}", "@Override\r\n\tpublic int size() {\r\n\r\n\t\treturn data.size();\r\n\t}", "@Override public long getInitializedDataLength() {\n return getDataLength();\n }", "public int length() {\n return data.length;\n }", "public long getSize();", "public double getSize() {\n return size_;\n }", "int getLocalSize();", "public int returnSize()\r\n {\r\n \treturn length;\r\n }", "long storageSize();", "long getSize();", "public int getSize()\n {\n return size;\n }", "public int getSize()\n {\n return size;\n }", "public int getSize()\n {\n return size;\n }", "public Integer getSize() {\n return size;\n }", "public int size( )\r\n {\r\n int size = (int) manyNodes;// Student will replace this return statement with their own code:\r\n return size;\r\n }", "public int getSize() {\r\n return _size;\r\n }", "public int getSize(){\n //To be written by student\n return localSize;\n }", "public int getSize() {\r\n return size;\r\n }", "public int getSize() { \n return size;\n }", "public int getSize()\r\n {\r\n return size;\r\n }", "public int getSize() {\n return size;\n }", "int sizeOfCrashDataArray();", "public int getSize()\r\n {\r\n return size;\r\n }", "public int getSize() {return size;}", "public int getSize( )\n {\n return size;\n }", "public int getSize() {\n\n return size;\n }", "private int getSize() {\n\t\t\treturn size;\n\t\t}", "public int GetSize() \n\t{\n\t\treturn numEntries; //dummy return so file would compile\n\t}", "public int getSize(){\n return size;\n }", "public long getSize() {\n return size;\n }", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();" ]
[ "0.7673035", "0.7456245", "0.7418065", "0.7375475", "0.7330785", "0.7265858", "0.71649057", "0.7096637", "0.7078756", "0.7078756", "0.7078756", "0.7078756", "0.7078756", "0.7058092", "0.7038984", "0.703168", "0.7020919", "0.6986825", "0.6977249", "0.6977249", "0.6977249", "0.6977249", "0.6977249", "0.69531167", "0.69153935", "0.68729097", "0.68729097", "0.68621135", "0.6851967", "0.68517494", "0.681291", "0.6799984", "0.67906815", "0.67806", "0.6755848", "0.673547", "0.67235214", "0.6716544", "0.6716544", "0.667483", "0.6666095", "0.66235304", "0.6608843", "0.65942174", "0.65929854", "0.6549163", "0.6539073", "0.65342134", "0.6529284", "0.65025574", "0.64975375", "0.64886546", "0.6478614", "0.6462196", "0.64505136", "0.6444825", "0.6444825", "0.6444825", "0.6444825", "0.6444825", "0.6444825", "0.6444825", "0.6444825", "0.6444825", "0.6444825", "0.64430636", "0.6430102", "0.64255106", "0.64183766", "0.64136475", "0.6406301", "0.64001226", "0.63789463", "0.63774604", "0.63689935", "0.63537997", "0.6351834", "0.6351834", "0.6351834", "0.6350793", "0.6348241", "0.6346922", "0.63439703", "0.63431334", "0.63364005", "0.6335152", "0.633413", "0.63306165", "0.63201296", "0.63165593", "0.63161606", "0.63129306", "0.631147", "0.6306955", "0.6306371", "0.63026106", "0.6299464", "0.6299464", "0.6299464", "0.6299464", "0.6299464" ]
0.0
-1
Returns data for arc shrinkage computation.
public AbstractShapeBuilder.Shrinkage getShrinkage() { if (shrinkage == null) shrinkage = new AbstractShapeBuilder.Shrinkage(this); return shrinkage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double[][][] getReduced(){\n \n return A4;\n }", "double getCostArc(K idVertexIni, K idVertexFin);", "@Override\n \tpublic double[] getdata(List<Pair<String, String>> alin, MoleculeManager manager, GapManager gap) {\n \n \n \tdouble S_max;\n \tdouble[][] p;\n \tdouble[] data;\n \tint N;\n \tint Len;\n \tint n_seqs=0;\n \n \tn_seqs = alin.size();\n \t\n \tLen = alin.get(0).getSecond().length();\n \tN = manager.alphabetSize();\n \t\n \tp = new double[Len][N];\n \t\n \tS_max = Math.log(N)/Math.log(2);\n \t\n \tp = getFreq(p,alin,n_seqs, manager.alphabet()); \n \n \tdata = new double[Len];\n \t\n \tfor (int i = 0; i < data.length; i++) {\n \t\t\n \t\tdouble s_obs=0;\n \t\t\n \t\tdouble freqSum = 0; \n \n \t\tfor (int j = 0; j < N; j++) {\n \t\t\t\n \t\t\tif (p[i][j]!= 0 ) { \n \t\t\t\t\n \t\t\t\ts_obs = s_obs + p[i][j] * Math.log(p[i][j]) / Math.log(2);\n \t\t\t\t\n \t\t\t\tfreqSum = gap.attempToSumFreq(freqSum, p[i][j]) ;\n \t\t\t\t\n \t\t\t}\n \t\t}\n \t\t\n \t\tdata[i] = (S_max + s_obs) * freqSum / S_max;\n \t}\n \n \treturn data;\n }", "public double[] getData() {\n return data;\n }", "private float[] calculateData(float[] data) {\n float total=0;\n for(int i=0;i<data.length;i++)\n {\n total+=data[i];\n }\n for(int i=0;i<data.length;i++)\n {\n data[i]=360*(data[i]/total); \n }\n return data;\n\n }", "public double[] getData(){\r\n\t\t//make a deeeeeep copy of data\r\n\t\tdouble[] returnData = new double[this.data.length];\r\n\t\t\r\n\t\t//fill with data values\r\n\t\tfor (int i = 0; i < this.data.length; i++){\r\n\t\t\treturnData[i] = this.data[i];\r\n\t\t}\r\n\t\t//return a ref to my deep copy\r\n\t\treturn returnData;\r\n\t}", "float getCostReduction();", "@JavascriptInterface\n public float[] getData() {\n float[]mis;\n int i,k;\n mis[0]=misC;\n for(k=0;k<12;k++){\n for (i=0;i<(k+1)*misC;i++){\n mis[k*i+1]=misure[i][k];\n }\n }\n\n return mis; // JS non ha gli array bidimensionali !!!!\n }", "public double getCosts();", "public bucket[] getData() {\n\t\treturn (bucket.clone());\n\t}", "@Override\n public Raster getData() {\n final Rectangle rect = new Rectangle(getMinX(), getMinY(), getWidth(),\n getHeight());\n return getData(rect);\n }", "private PieData generateDataPie() {\n\n ArrayList<PieEntry> entries = new ArrayList<>();\n String year = year_txt.getText().toString();\n String month1 =Utilities.getMonth(months,month_txt.getText().toString());\n TransactionBeans transactionBeans = transactionDB.getTransactionRecordsYear(month1,year);\n if(transactionBeans!=null) {\n float income = 0;\n float expense = 0;\n try{\n income = (float) (Double.parseDouble(transactionBeans.getIncome()));\n }catch(Exception e){\n income = 0;\n }\n try{\n expense = (float) (Double.parseDouble(transactionBeans.getExpense()));\n }catch(Exception e){\n expense = 0;\n }\n entries.add(new PieEntry(income, \"Income \"));\n entries.add(new PieEntry(expense, \"Expense \"));\n }\n PieDataSet d = new PieDataSet(entries, \"\");\n\n // space between slices\n d.setSliceSpace(2f);\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n\n return new PieData(d);\n }", "private double calcuCMetric() {\n\t\treturn (p-1)/fcost;\n\t}", "public interface CscData {\r\n\r\n\tpublic double getSpeed();\r\n\r\n\tpublic double getDistance();\r\n\r\n\tpublic int getWheelRevsSinceLastRead();\r\n\r\n\tpublic double getCadence();\r\n\r\n\tpublic int getCrankRevsSinceLastRead();}", "public HashMap<Integer, Double> getEstimatedCostForDataFile(Job job)\n\t\t\tthrows IOException {\n\t\treturn getEstimatedCostForDataFile(job.getID());\n\t}", "private SensorData collectMemoryInfo() throws SigarException {\n \n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Collecting Memory Utilization Information\");\n }\n SensorData data = new SensorData();\n \n Mem mem = sigar.getMem();\n \n data.add(SensorAttributeConstants.MemoryConstants.TOTAL_MEMORY, (mem.getTotal() / (1024 * 1024)));\n data.add(SensorAttributeConstants.MemoryConstants.FREE_MEMORY, (mem.getFree() / (1024 * 1024)));\n data.add(SensorAttributeConstants.MemoryConstants.MEM_ACTUAL_USED, (mem.getActualUsed() / (1024 * 1024)));\n \n return data;\n }", "public CostInfo getCostInfo();", "public double getResult(){\n double x;\n x= (3+Math.sqrt(9-4*3*(1-numberOfStrands)))/(2*3);\n if(x<0){\n x= (3-Math.sqrt(9-(4*3*(1-numberOfStrands))))/6;\n\n }\n numberOfLayers=(float) x;\n diameter=((2*numberOfLayers)-1)*strandDiameter;\n phaseSpacing=(float)(Math.cbrt(ab*bc*ca));\n\n netRadius=diameter/2;\n\n\n\n //SGMD calculation\n float prod=1;\n for(int rand=0;rand<spacingSub.size();rand++){\n prod*=spacingSub.get(rand);\n }\n\n //SGMD calculation\n sgmd=Math.pow((Math.pow(netRadius,subconductors)*prod*prod),1/(subconductors*subconductors));\n capacitance=((8.854e-12*2*3.14)/Math.log(phaseSpacing/sgmd));\n Log.d(\"How\",\"phase spacing:\"+phaseSpacing+\" sgmd=\"+sgmd);\n return capacitance*1000;\n\n\n }", "private BorderCrossingsData[] getSimulatedData() {\n\n\t\tBorderCrossingsDataBuilder builder1 = new BorderCrossingsDataBuilder();\n\t\tbuilder1.setFirstName(\"Tihomir\");\n\t\tbuilder1.setLastName(\"Raychev\");\n\t\tbuilder1.setCrossingsData(\"19021991\", \"New York\", true);\n\t\tbuilder1.setCrossingsData(\"19021945\", \"Atlanta\", true);\n\t\tbuilder1.setCrossingsData(\"19021994\", \"California\", true);\n\t\tbuilder1.setNationality(\"Bulgarian\");\n\t\tbuilder1.setPassportId(1623774232);\n\t\tBorderCrossingsData tihomirData = builder1.build();\n\n\t\tBorderCrossingsDataBuilder builder2 = new BorderCrossingsDataBuilder();\n\t\tbuilder2.setFirstName(\"test\");\n\t\tbuilder2.setLastName(\"test\");\n\t\tbuilder2.setCrossingsData(\"19021991\", \"testk\", true);\n\t\tbuilder2.setNationality(\"test\");\n\t\tbuilder2.setPassportId(1623773232);\n\t\tBorderCrossingsData test1Data = builder2.build();\n\n\t\tBorderCrossingsDataBuilder builder3 = new BorderCrossingsDataBuilder();\n\t\tbuilder3.setFirstName(\"test2\");\n\t\tbuilder3.setLastName(\"test2\");\n\t\tbuilder3.setCrossingsData(\"234234\", \"test3\", true);\n\t\tbuilder3.setNationality(\"test2\");\n\t\tbuilder3.setPassportId(1623773232);\n\t\tBorderCrossingsData test2Data = builder3.build();\n\n\t\tBorderCrossingsData[] result = new BorderCrossingsData[] { tihomirData, test1Data, test2Data };\n\t\treturn result;\n\t}", "double getCost();", "double getCost();", "protected abstract Object[] getData();", "public abstract double computeValue(Density density);", "public float carga(){\n return (this.capacidade/this.tamanho);\n }", "public double getPartialDerviative(double consumptionAllocation);", "Object getData() { /* package access */\n\t\treturn data;\n\t}", "double getTotalCost();", "public List<Double> getData( ) {\r\n return data;\r\n }", "public abstract double getCost();", "private byte[] getData() {\n\t\tStorage storage;\n\t\tint cont = 0;\n\t\tbyte[] data = null;\n\t\tsynchronized (store) {\n\t\t\tstorage = (Storage) store.getContents();\n\t\t\tif (storage != null && storage.data != null) {\n\t\t\t\tdata = storage.data;\n\t\t\t\tcont = storage.cont;\n\t\t\t}\n\t\t}\n\t\tif (cont == 0 || data == null) {\n\t\t\tdata = getImage();\n\t\t\tif (data == null)\n\t\t\t\treturn null;\n\t\t\tcont++;// It increments twice so on the next run it doesn't get\n\t\t\t// updated again\n\t\t}\n\t\tif (cont > 5)\n\t\t\tcont = 0; // it increments just next, so it never stays 0 (wich\n\t\t// is only initial state)\n\t\tcont++;\n\t\tsynchronized (store) {\n\t\t\tif (storage == null) {\n\t\t\t\tstorage = new Storage();\n\t\t\t}\n\t\t\tstorage.cont = cont;\n\t\t\tstore.setContents(storage);\n\t\t\tstore.commit();\n\t\t}\n\n\t\treturn data;\n\t}", "public void getCosts() {\n\t}", "int[] export();", "private void allocateValues(Hashtable<String, Double> data) {\n\t\tfor(String key:data.keySet()) {\n\t\t\tif(this.salesByPromo.containsKey(key)) {\n\t\t\t\tdouble input = this.salesByPromo.get(key)+ data.get(key);\n\t\t\t\tthis.setSalesByPromo(key, input);\n\t\t\t} else {\n\t\t\t\tthis.setSalesByPromo(key, data.get(key));\n\t\t\t}\n\t\t}\n\t}", "public static void calculatePersistentCSMACD() {\n ArrayList <Integer> arrivalRate = new ArrayList<Integer>();\n arrivalRate.add(7);\n arrivalRate.add(10);\n arrivalRate.add(20);\n double transmissionTime;\n for (int rate: arrivalRate) {\n System.out.printf(\"The values for a persistent CSMACD simulation with packet arrival rate of %d. (Number of nodes, efficiency, throughput(bps), throughput(mbps) %n\", rate);\n //Set transmission time for TA simulation so it doesnt take too long, we checked to see if the results are within +/- 5% in our report\n for (int nodes = 20; nodes <= 100; nodes += 20) {\n if(nodes > 60 && rate >= 10 ){\n transmissionTime = 100;\n } else if (rate == 20) {\n transmissionTime = 100;\n } else{\n transmissionTime = 1000;\n }\n Persistent persistentCSMACD = new Persistent(nodes, rate, 1000000, 1500, 10, 200000000, transmissionTime);\n persistentCSMACD.initalizeNodes();\n persistentCSMACD.startSimulation();\n persistentCSMACD.calculateEfficiency();\n }\n }\n\n }", "public byte[] getData()\r\n/* 20: */ {\r\n/* 21:60 */ byte[] data = new byte[2];\r\n/* 22: */ \r\n/* 23:62 */ IntegerHelper.getTwoBytes(this.calcCount, data, 0);\r\n/* 24: */ \r\n/* 25:64 */ return data;\r\n/* 26: */ }", "public final float[] exportSegmentation() {\n \tfloat[] seg = new float[nx*ny*nz];\n \tfor (int xyz=0; xyz<nx*ny*nz; xyz++) {\n \t\t//if (mgdmlabels[0][xyz]>-1) {\n\t\t\tif (segmentation[xyz]>-1) {\n\t\t\t\t//seg[xyz] = objLabel[mgdmlabels[0][xyz]];\n\t\t\t\tseg[xyz] = objLabel[segmentation[xyz]];\n\t\t\t}\n \t}\n \treturn seg;\n }", "Map<String, Map<String, Double>> getElementCosts();", "@Override\n\tpublic byte[] getBytes() {\n\t\tByteBuffer buf = ByteBuffer.allocate(8);\n\t\tbuf.putDouble(this.riskPremium);\n\t\treturn buf.array();\n\t}", "public static double[] getQuartileData(double data[]) {\r\n\t\t\t\r\n\t\t\tint datLength = data.length;\r\n\t \tdouble[] quartileData = {1, 2, 3};\r\n\t \t\r\n\t \tdouble Q1 = 0, Q3 = 0, IQR = 0;\r\n\t \t\t\r\n\t \t\r\n\t if((datLength % 2) == 0 && !( ((datLength / 2) % 2) == 0)){//good\r\n\t \t\t \r\n\t \tQ1 = data[Math.round(datLength / 4)];\r\n\r\n\t \tQ3 = data[Math.round(datLength * (3/4))];\r\n\t \t \r\n\t \tIQR = Q3 - Q1;\r\n\t \t\r\n\t }\r\n\t else if((datLength % 2) == 0 && ((datLength / 2) % 2) == 0){//good\r\n\t \t\r\n\t \tQ1 = ((data[datLength / 4] + data[(datLength / 4) - 1]) / 2);\r\n\r\n\t \tQ3 = ((data[datLength * (3/4)] + data[(datLength * (3/4)) - 1]) / 2);\r\n\t \t \r\n\t \tIQR = Q3 - Q1;\r\n\t \r\n\t }\r\n\t else if(!((datLength % 2) == 0) && (((datLength - 1) / 2) % 2) == 0){//good\r\n\t \t \r\n\t \tQ1 = (data[(datLength - 1) / 4] + data[(datLength - 1) / 4] - 1) / 2;\r\n\t \r\n\t \tQ3 = (data[datLength * (3/4)] + data[datLength * (3/4) + 1]) / 2;\r\n\t \t \t \r\n\t \tIQR = Q3 - Q1;\r\n\t \t\r\n\t }\r\n\t else if(!((datLength % 2) == 0) && !((((datLength - 1) / 2) % 2) == 0)){//good\r\n\t \t \r\n\t \tQ1 = data[Math.round((datLength - 1) / 4)];\r\n\t \t \r\n\t \tQ3 = data[Math.round((datLength) * (3/4))];\r\n\t \t \t \r\n\t \tIQR = Q3 - Q1;\r\n\t \r\n\t }\r\n\t \r\n\t quartileData[0] = Q1;\r\n\t quartileData[1] = Q3;\r\n\t quartileData[2] = IQR;\r\n\t \t\r\n\t return quartileData;\r\n\t }", "public byte[] getData()\r\n/* 140: */ {\r\n/* 141:254 */ byte[] celldata = super.getData();\r\n/* 142:255 */ byte[] formulaData = getFormulaData();\r\n/* 143:256 */ byte[] data = new byte[formulaData.length + celldata.length];\r\n/* 144:257 */ System.arraycopy(celldata, 0, data, 0, celldata.length);\r\n/* 145:258 */ System.arraycopy(formulaData, 0, data, celldata.length, \r\n/* 146:259 */ formulaData.length);\r\n/* 147:260 */ return data;\r\n/* 148: */ }", "public float getCost()\r\n/* 13: */ {\r\n/* 14:10 */ return this.costFromStart + this.estimatedCostToGoal;\r\n/* 15: */ }", "private void processData() {\n\t\tfloat S, M, VPR, VM;\n\t\tgetCal();\n\t\tgetTimestamps();\n\t\t\n \n\t\tfor(int i = 0; i < r.length; i++) {\n\t\t\t//get lux\n\t\t\tlux[i] = RGBcal[0]*vlam[0]*r[i] + RGBcal[1]*vlam[1]*g[i] + RGBcal[2]*vlam[2]*b[i];\n \n\t\t\t//get CLA\n\t\t\tS = RGBcal[0]*smac[0]*r[i] + RGBcal[1]*smac[1]*g[i] + RGBcal[2]*smac[2]*b[i];\n\t\t\tM = RGBcal[0]*mel[0]*r[i] + RGBcal[1]*mel[1]*g[i] + RGBcal[2]*mel[2]*b[i];\n\t\t\tVPR = RGBcal[0]*vp[0]*r[i] + RGBcal[1]*vp[1]*g[i] + RGBcal[2]*vp[2]*b[i];\n\t\t\tVM = RGBcal[0]*vmac[0]*r[i] + RGBcal[1]*vmac[1]*g[i] + RGBcal[2]*vmac[2]*b[i];\n \n\t\t\tif(S > CLAcal[2]*VM) {\n\t\t\t\tCLA[i] = M + CLAcal[0]*(S - CLAcal[2]*VM) - CLAcal[1]*683*(1 - pow((float)2.71, (float)(-VPR/4439.5)));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tCLA[i] = M;\n\t\t\t}\n\t\t\tCLA[i] = CLA[i]*CLAcal[3];\n\t\t\tif(CLA[i] < 0) {\n\t\t\t\tCLA[i] = 0;\n\t\t\t}\n \n\t\t\t//get CS\n\t\t\tCS[i] = (float) (.7*(1 - (1/(1 + pow((float)(CLA[i]/355.7), (float)1.1026)))));\n \n\t\t\t//get activity\n\t\t\ta[i] = (float) (pow(a[i], (float).5) * .0039 * 4);\n\t\t}\n\t}", "public short[] get_data() {\n short[] tmp = new short[60];\n for (int index0 = 0; index0 < numElements_data(0); index0++) {\n tmp[index0] = getElement_data(index0);\n }\n return tmp;\n }", "int[][] getData()\n {\n return block;\n }", "public abstract double calcSA();", "Object getData();", "Object getData();", "Map<Date, Float> getFullCost(Step step) throws SQLException;", "private byte[] genClassData(String name) {\n\t\tif (data == null) {\n\t\t\tthrow new RuntimeException(\"You must initialize the data array\");\n\t\t}\n\t\tif (dataLength != data.length)\t// EXPECT COMPILE ERROR in javasrc\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\"data corrupt, \" + dataLength + \"!=\" + data.length);\n\t\tbyte[] bd = new byte[data.length];\n\t\tfor (int i=0; i<bd.length; i++)\n\t\t\tbd[i] = (byte)data[i];\n\t\treturn bd;\n\t}", "private DataSet caucyDataSet(){\n CauchyDistribution cauchyDistribution = new CauchyDistribution(TARGET_MEAN, TARGET_MEAN/10);\n DataSet dataSet = new DataSet();\n Task[] tasks = new Task[NUM_DISTINCT_TASKS];\n //generate costs from sampling from normal distribution\n for(int i=0; i < NUM_DISTINCT_TASKS; i++){\n UUID uuid = UUID.randomUUID();\n Long cost = (long) Math.max(1, cauchyDistribution.sample()); //make sure no 0 cost events\n tasks[i] = new Task(cost, uuid);\n }\n //generate task multiplities from sampling from uniform distribution\n for(int i=0; i < NUM_TASKS; i++){\n dataSet.getTasks().add(tasks[random.nextInt(NUM_DISTINCT_TASKS)]);\n }\n return dataSet;\n }", "public ReducedCellInfo[] getEntries(double delta)\r\n {\r\n\r\n ReducedCellInfo compareTo = DataBase[0];\r\n\r\n Vector< ReducedCellInfo > V = new Vector< ReducedCellInfo >( );\r\n\r\n for( int i = 1 ; i < 45 ; i++ )\r\n\r\n if ( DataBase[i].distance( compareTo ) < delta )\r\n V.addElement( DataBase[i] );\r\n\r\n return V.toArray( new ReducedCellInfo[ 0 ] );\r\n }", "public List<Double> getData() {\n return data;\n }", "private void getCal() {\n \t\t\n \t\tif(isnew) {\n \t\t\tString[] parts0, parts1, parts2, parts3, parts4, parts5, parts6;\n \t\t\t\n \t\t\tparts0 = asciiheader[9].split(\"\\t\");\n \t\t\tparts1 = asciiheader[10].split(\"\\t\");\n \t\t\tparts2 = asciiheader[11].split(\"\\t\");\n \t\t\tparts3 = asciiheader[12].split(\"\\t\");\n \t\t\tparts4 = asciiheader[13].split(\"\\t\");\n \t\t\tparts5 = asciiheader[14].split(\"\\t\");\n \t\t\tparts6 = asciiheader[15].split(\"\\t\");\n \t\t\t\n \t\t\tfor(int i = 0; i < 3; i++) {\n \t\t\t\tRGBcal[i] = Float.parseFloat(parts0[i]);\n \t\t\t\tvlam[i] = Float.parseFloat(parts1[i]);\n \t\t\t\tvp[i] = Float.parseFloat(parts2[i]);\n \t\t\t\tmel[i] = Float.parseFloat(parts3[i]);\n \t\t\t\tvmac[i] = Float.parseFloat(parts4[i]);\n \t\t\t\tsmac[i] = Float.parseFloat(parts5[i]);\n \t\t\t\tCLAcal[i] = Float.parseFloat(parts6[i]);\n \t\t\t}\n \t\t\tCLAcal[3] = Float.parseFloat(parts6[3]);\n \t\t\treturn;\n \n \t\t}\n \t\t\n \t\tint temp = 0;\n \t\tint j = 0;\n \t\tString workingDirectory = new String(System.getProperty(\"user.dir\")+ \"\\\\src\\\\data\");\n \t\t\n \t\tString[] s = loadStrings(workingDirectory + \"\\\\Day12_Cal_Values.txt\");\n \t\t\n \n \t\t//Scone/macula\n \t\tfor(int i = 0; i < s[1].length(); i++) {\n \t\t\tif(s[1].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\t//smac[j] = float(s[1].substring(temp, i));\n \t\t\t\t\tsmac[j] = Float.parseFloat(s[1].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t\t}\n \t\tsmac[j] = Float.parseFloat(s[1].substring(temp, s[1].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//Vlamda/macula\n \t\tfor(int i = 0; i < s[2].length(); i++) {\n \t\t\tif(s[2].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tvmac[j] = Float.parseFloat(s[2].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t\t}\n \t\tvmac[j] = Float.parseFloat(s[2].substring(temp, s[2].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//Melanopsin\n \t\tfor(int i = 0; i < s[3].length(); i++) {\n \t\t\tif(s[3].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tmel[j] = Float.parseFloat(s[3].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t}\n \t\tmel[j] = Float.parseFloat(s[3].substring(temp, s[3].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//Vprime\n \t\tfor(int i = 0; i < s[4].length(); i++) {\n \t\t\tif(s[4].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tvp[j] = Float.parseFloat(s[4].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t\t}\n \t\tvp[j] = Float.parseFloat(s[4].substring(temp, s[4].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//Vlamda\n \t\tfor(int i = 0; i < s[5].length(); i++) {\n \t\t\tif(s[5].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tvlam[j] = Float.parseFloat(s[5].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t\t}\n \t\tvlam[j] = Float.parseFloat(s[5].substring(temp, s[5].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//CLA\n \t\tfor(int i = 0; i < s[8].length(); i++) {\n \t\t\tif(s[8].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tCLAcal[j] = Float.parseFloat(s[8].substring(temp, i));\n \t\t\t\t\tj++;\n \t\t\t\t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t\t}\n \t\tCLAcal[j] = Float.parseFloat(s[8].substring(temp, s[8].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \n \t\t//RGBcal\n \t\ts = loadStrings(workingDirectory + \"\\\\Day12 RGB Values.txt\");\n \t\tfor(int i = 0; i < s[ID].length(); i++) {\n \t\t\tif(s[ID].charAt(i) == 9) {\n \t\t\t\tif(temp != 0) {\n \t\t\t\t\tRGBcal[j] = Float.parseFloat(s[ID].substring(temp, i));\n \t\t\t\t\tj++;\n \t}\n \t\t\t\ttemp = i;\n \t\t\t}\n \t}\n \t\tRGBcal[j] = Float.parseFloat(s[ID].substring(temp, s[ID].length()));\n \t\ttemp = 0;\n \t\tj = 0;\n \t}", "static double[][] makeTestData() {\n double[][] data = new double[21][2];\n double xmax = 5;\n double xmin = -5;\n double dx = (xmax - xmin) / (data.length -1);\n for (int i = 0; i < data.length; i++) {\n double x = xmin + dx * i;\n double y = 2.5 * x * x * x - x * x / 3 + 3 * x;\n data[i][0] = x;\n data[i][1] = y;\n }\n return data;\n }", "public void recalculateStats(){\n weight = .25f * (shaftMat.getParameter(\"Density\") * length + headMat.getParameter(\"Density\") * .4f);\n sharpness = headMat.getParameter(\"Malleability\") + 1f / headMat.getParameter(\"Durability\"); //Malleable objects can be sharp, as can fragile objects\n// fragility = 1f / (shaftMat.getParameter(\"Durability\") * .5f + headMat.getParameter(\"Durability\") * .5f);\n durability = (shaftMat.getParameter(\"Durability\") * .5f + headMat.getParameter(\"Durability\") * .5f);\n trueness = shaftMat.getParameter(\"Regularity\") + headMat.getParameter(\"Regularity\");\n// length = 2f;\n }", "abstract public int getIncomeSegment( int hhIncomeInDollars );", "public double[][] getData() {\n return this.data;\n }", "public G getData (){\n return this._data;\n }", "public org.apache.spark.sql.catalyst.util.QuantileSummaries compress () { throw new RuntimeException(); }", "VectorArray getResHar();", "@Parameters\n public static Iterable<Object[]> getData() {\n List<Object[]> obj = new ArrayList<>();\n obj.add(new Object[] {3, 12});\n obj.add(new Object[] {2, 8});\n obj.add(new Object[] {1, 4});\n \n return obj;\n }", "public double[] ds() {\n double rval[] = new double[size()];\n for (int i = 0; i < rval.length; i++) {\n rval[i] = get(i) == null ? Double.NaN : get(i).doubleValue();\n }\n\n return rval;\n }", "@Override\n\tpublic synchronized Collection<Arc> getArcs() {\n\t\treturn this.arcs;\n\t}", "private double[][] calculateValues() throws ExafsScanPointCreatorException {\n\t\tscanTimes= new ArrayList<> ();\n\t\tdouble[][] preEdgeEnergies = createStepArray(initialEnergy, aEnergy, preEdgeStep, preEdgeTime, false,\n\t\t\t\tnumberDetectors);\n\t\tscanTimes.add(new ExafsScanRegionTime(\"PreEdge\", preEdgeEnergies.length, new double[]{preEdgeTime}));\n\t\tdouble[][] abEnergies = convertABSteps(aEnergy, bEnergy, preEdgeStep, edgeStep, preEdgeTime);\n\t\tscanTimes.add(new ExafsScanRegionTime(\"AbEdge\", abEnergies.length, new double[]{preEdgeTime}));\n\n\t\tdouble[][] bcEnergies = createStepArray(bEnergy+edgeStep, cEnergy, edgeStep, edgeTime, false, numberDetectors);\n\t\tscanTimes.add(new ExafsScanRegionTime(\"BcEnergy\", bcEnergies.length, new double[]{edgeTime}));\n\t\t// if varying time the temporarily set the exafs time to a fixed value\n\t\tif (!exafsConstantTime)\n\t\t\texafsTime = exafsFromTime;\n\n\t\tdouble[][] exafsEnergies;\n\t\tif (exafsConstantEnergyStep)\n\t\t\texafsEnergies = createStepArray(cEnergy, finalEnergy, exafsStep, exafsTime, true, numberDetectors);\n\t\telse\n\t\t\texafsEnergies = calculateExafsEnergiesConstantKStep();\n\t\t// now change all the exafs times if they vary\n\t\tif (!exafsConstantTime)\n\t\t\texafsEnergies = convertTimes(exafsEnergies, exafsFromTime, exafsToTime);\n\n\t\t// Smooth out the transition between edge and exafs region.\n\t\tfinal double[][][] newRegions = createEdgeToExafsSteps(cEnergy, exafsEnergies, edgeStep, exafsTime);\n\t\tfinal double[][] edgeToExafsEnergies = newRegions[0];\n\t\tif(edgeToExafsEnergies != null)\n\t\t\tscanTimes.add(new ExafsScanRegionTime(\"EdgetoExafs\", edgeToExafsEnergies.length, new double[]{exafsTime}));\n\t\texafsEnergies = newRegions[1];\n\n\t\t// The edgeToExafsEnergies replaces the first EXAFS_SMOOTH_COUNT\n\n\t\t// merge arrays\n\t\tdouble []exafsRegionTimeArray = new double[exafsEnergies.length];\n\t\tint k =0;\n\t\tfor(double[] exafsEnergy : exafsEnergies)\n\t\t\texafsRegionTimeArray[k++ ] = exafsEnergy[1];\n\t\tscanTimes.add(new ExafsScanRegionTime(\"Exafs\", 1, exafsRegionTimeArray));\n\t\tdouble[][] allEnergies = (double[][]) ArrayUtils.addAll(preEdgeEnergies, abEnergies);\n\t\tallEnergies = (double[][]) ArrayUtils.addAll(allEnergies, bcEnergies);\n\t\tif (edgeToExafsEnergies != null)\n\t\t\tallEnergies = (double[][]) ArrayUtils.addAll(allEnergies, edgeToExafsEnergies);\n\t\tallEnergies = (double[][]) ArrayUtils.addAll(allEnergies, exafsEnergies);\n\t\treturn allEnergies;\n\t}", "double CalcRager(double amount, double size, double sg, double time, double AA) {\n \t\tdouble ibu, utilization, ga;\n \t\t// should be tanh:\n \t\tdouble x = (time - 31.32) / 18.27;\n \t\t// tanh:\n \t\tdouble tanhx = (Math.exp(x) - Math.exp(-x)) / (Math.exp(x) + Math.exp(-x));\n \t\tutilization = 18.11 + (13.86 * tanhx / 18.27);\n\t\tga = sg < 1.050 ? 0.0 : ((sg - 1.050) / 0.2);\n \t\tibu = amount * (utilization / 100) * (AA / 100.0) * 7490;\n \t\tibu /= size * (1 + ga);\n \t\treturn ibu;\n \t}", "public Cashier(String name, double startTime, double endTime){\n this.name = name;\n this.startTime = startTime;\n this.endTime = endTime;\n this.breakTime = 0;\n this.allocations = new int[(int)((endTime - startTime)/0.25 + 1)];\n }", "public void finish(){\n numDCtoVolatility();\n }", "public double data (String name) {\n final DataReference data = module.getData(name);\n if (data == null) {\n Logger.missing(\"DataReference\", name);\n return 0D;\n } else {\n return data.get();\n }\n }", "public Matrice getMatrice(){\n int t = this.sommets.size();\n Matrice ret = new Matrice( (t), (t));\n\n List<Arc<T>> arcsTemps ;\n\n for(int i=0 ; i < t ;i++){\n arcsTemps = getArcsDepuisSource(this.sommets.get(i));\n\n for (Arc<T> arcsTemp : arcsTemps) {\n System.out.println(i + \" == \" + arcsTemp.getDepart().getInfo()+ \" , \" +arcsTemp.getArrivee().getId());\n ret.setValue(i, arcsTemp.getArrivee().getId(), 1);\n }\n System.out.println(\"***\");\n }\n\n return ret;\n }", "public CostItem[] getCostReport(String start, String end) throws CostManagerException;", "public Matrix originalData(){\n if(!this.pcaDone)this.pca();\n return this.data;\n }", "private static final byte[] pkgclose_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -29, 0, 0, 96,\n\t\t\t\t96, 96, -96, -96, -96, -33, -33, -33, 94, 94, 94, 94, 24, 24,\n\t\t\t\t-128, -128, -128, -1, -1, -1, -128, -128, -128, -112, -112,\n\t\t\t\t-112, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n\t\t\t\t-1, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101, 32,\n\t\t\t\t119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1, 10, 0,\n\t\t\t\t3, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 4, 75, 112, 72, 32, 103,\n\t\t\t\t-67, 3, -128, 64, 51, -17, -43, 22, -116, -38, 72, 98, -101,\n\t\t\t\t38, 104, 41, 54, 9, 48, 16, -69, -98, -54, 114, -88, -7, -23,\n\t\t\t\t-32, -108, 110, -123, -96, 80, -24, -29, 4, 10, -120, -92, 18,\n\t\t\t\t81, -104, -112, -114, 76, 37, -78, -23, 3, 38, -89, 87, 20, 0,\n\t\t\t\t121, -107, -46, -72, 88, -26, 55, -38, -91, 98, -72, 75, -79,\n\t\t\t\t107, -56, -114, 0, 0, 59 };\n\t\treturn data;\n\t}", "void getFreeStream () { \n /* MODS 19 Jan 00 whole routine*/\n double rgas = 1716.; /* ft2/sec2 R */\n double gama = 1.4;\n double height_m = alt_val/lconv;\n double mu0 = .000000362;\n double g0 = 32.2;\n\n switch (planet) {\n case 0: // Earth standard day\n if (height_m <= 36152.) { // Troposphere\n ts0 = 518.6 - 3.56 * height_m/1000.;\n ps0 = 2116. * Math.pow(ts0/518.6,5.256);\n } else if (height_m >= 36152. && height_m <= 82345.) { // Stratosphere\n ts0 = 389.98;\n ps0 = 2116. * .2236 *\n Math.exp((36000.-height_m)/(53.35*389.98));\n } else if (height_m >= 82345.) {\n ts0 = 389.98 + 1.645 * (height_m-82345)/1000.;\n ps0 = 2116. *.02456 * Math.pow(ts0/389.98,-11.388);\n }\n \n { \n double temf = ts0 - 459.6;\n if (temf <= 0.0) temf = 0.0; \n rho_EN = ps0/(rgas * ts0);\n rho_SI = 1.225; // kg/m3\n \n /* Eq 1:6A Domasch - effect of humidity \n */\n double pvap = rlhum*(2.685+.00354*Math.pow(temf,2.245))/100.;\n rho_EN = (ps0 - .379*pvap)/(rgas * ts0); \n viscos = mu0 * 717.408/(ts0 + 198.72)*Math.pow(ts0/518.688,1.5);\n }\n break;\n\n case 1: // Mars - curve fit of orbiter data\n rgas = 1149.; /* ft2/sec2 R */\n gama = 1.29;\n rlhum = 0.0;\n\n if (height_m <= 22960.) {\n ts0 = 434.02 - .548 * height_m/1000.;\n ps0 = 14.62 * Math.pow(2.71828,-.00003 * height_m);\n }\n if (height_m > 22960.) {\n ts0 = 449.36 - 1.217 * height_m/1000.;\n ps0 = 14.62 * Math.pow(2.71828,-.00003 * height_m);\n }\n rho_EN = ps0/(rgas*ts0);\n rho_SI = 515.378819 * rho_EN;\n viscos = mu0 * 717.408/(ts0 + 198.72)*Math.pow(ts0/518.688,1.5);\n break;\n\n case 2: // water -- constant density\n height_m = -alt_val/lconv;\n rlhum = 100.;\n\n ts0 = 520.;\n // for oceanic water (it is 1027 kg/m3). FoilSimIII has it as 1.9927 slug/ft3\n // One slug has a mass of 32.174049 lb or 14.593903 kg \n rho_EN = 1.9927; \n rho_SI = 1027; // this is rho_EN * 515.378819\n\n ps0 = (2116. - rho_EN * g0 * height_m);\n mu0 = .0000272;\n viscos = mu0 * 717.408/(ts0 + 198.72)*Math.pow(ts0/518.688,1.5);\n break;\n case 3: // specify air temp and pressure \n rho_EN = ps0/(rgas*ts0);\n // reiplot_trace_counto temf\n {\n double temf = ts0 - 459.6;\n double pvap = rlhum*(2.685+.00354*Math.pow(temf,2.245))/100.;\n rho_EN = (ps0 - .379*pvap)/(rgas * ts0); \n }\n\n rho_SI = 515.378819 * rho_EN;\n viscos = mu0 * 717.408/(ts0 + 198.72)*Math.pow(ts0/518.688,1.5);\n break;\n\n case 4: // specify fluid density and viscosity\n rlhum = 0.0;\n ps0 = 2116.;\n break;\n\n case 5: // Venus - surface conditions\n rgas = 1149.; \n gama = 1.29;\n rlhum = 0.0;\n\n ts0 = 1331.6;\n ps0 = 194672.;\n\n rho_EN = ps0/(rgas*ts0);\n rho_SI = 515.378819 * rho_EN;\n viscos = mu0 * 717.408/(ts0 + 198.72)*Math.pow(ts0/518.688,1.5);\n default:\n }\n\n set_q0();\n // pt0 = ps0 + q0_EN;\n\n return;\n }", "public abstract float getDensity();", "public BaseData[] getData()\n {\n return Cdata;\n }", "private BrandsData allocateDataStorage(BrandsData b1, BrandsData b2) {\n\t\tDouble [] data = new Double[12];\n\t\tdata[0] = b1.getSales(thisPeriod)+b2.getSales(thisPeriod);\n\t\tdata[1] = b1.getSales(lastPeriod)+b2.getSales(lastPeriod);\n\t\tdata[2] = b1.getAnyPromo(thisPeriod)+b2.getAnyPromo(thisPeriod);\n\t\tdata[3] = b1.getAnyPromo(lastPeriod)+b2.getAnyPromo(lastPeriod);\n\t\tdata[4] = b1.getPriceDisc(thisPeriod)+b2.getPriceDisc(thisPeriod);\n\t\tdata[5] = b1.getPriceDisc(lastPeriod)+b2.getPriceDisc(lastPeriod);\n\t\tdata[6] = b1.getFeat(thisPeriod)+b2.getFeat(thisPeriod);\n\t\tdata[7] = b1.getFeat(lastPeriod)+b2.getFeat(lastPeriod);\n\t\tdata[8] = b1.getDisplay(thisPeriod)+b2.getDisplay(thisPeriod);\n\t\tdata[9] = b1.getDisplay(lastPeriod)+b2.getDisplay(lastPeriod);\n\t\tdata[10] = b1.getQual(thisPeriod)+b2.getQual(thisPeriod);\n\t\tdata[11] = b1.getQual(lastPeriod)+b2.getQual(lastPeriod);\n\t\tString brand = b2.getBrand();\n\t\tBrandsData input = new BrandsData(brand, data);\n\t\treturn input;\n\t}", "double[] Write(){\n\n double[] volumes = new double[3]; /** Feature Vector */\n\n /** Reading image from file */\n ImageReader imageReader = new ImageReader(image_Location);\n \n /** Writing 175 images */\n imageReader.writeImagefiles();\n\n /** Image array of full size */\n Image = imageReader.getImage();\n\n\n /** Image compression by interpolation */\n Compress compress = new Compress(Image);\n\n /** Reduced image */\n Data_Nn = compress.getReduced();\n\n /** Writing Features in a text file */\n ImageWriter imageWriter = new ImageWriter(Data_Nn,text_Location);\n \n /** get feature vector from compressed image */\n volumes = imageWriter.getVolume();\n return volumes;\n }", "java.util.Map<String, Long>\n getMetricCostsMap();", "public double[] Cramer() {\r\n\t\tdouble MainDet; // Determinan Matriks utama\r\n\t\t\r\n\t\tdouble[] ValX = new double[KolEff-1]; // Array nilai setiap variabel X yang memenuhi\r\n\t\tdouble[] ArrB = new double[BrsEff]; // Array nilai konstanta B pada SPL\r\n\t\tdouble[] DetN = new double[KolEff-1]; // Array nilai determinan yang telah diganti sekolom dengan nilai B\r\n\t\t\r\n\t\tMatriks tempM = new Matriks(BrsEff,KolEff);\r\n\t\tMatriks tempM2 = new Matriks(BrsEff,KolEff-1);\r\n\t\t\r\n\t\ttempM = this;\r\n\t\t\r\n\t\tfor (int i=0; i<tempM.BrsEff; i++) {\r\n\t\t\tArrB[i] = tempM.Elmt[i][tempM.KolEff-1];\r\n\t\t}\r\n\t\t\r\n\t\ttempM.CutMatriks(0,1);\r\n\t\t\r\n\t\tMainDet = tempM.DetCofactor(tempM);\r\n\t\t\r\n\t\tfor (int j=0; j<tempM.KolEff; j++) {\r\n\t\t\ttempM2 = new Matriks(tempM.Elmt);\r\n\t\t\t\r\n\t\t\tfor (int i=0; i<tempM2.BrsEff; i++) {\r\n\t\t\t\ttempM2.Elmt[i][j] = ArrB[i];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tDetN[j] = tempM2.DetCofactor(tempM2);\r\n\t\t\t\r\n\t\t\tValX[j] = DetN[j]/MainDet;\r\n\t\t}\r\n\t\t\r\n\t\treturn ValX;\r\n\t}", "public double getCarbs() {\n\t\tdouble mealCarbs = 0;\n\t\tfor (String foodName : meal) {\n\t\t\tdouble carbs = foodDetail.get(foodName).getCarbs();\n\t\t\tdouble portion = foodPortion.get(foodName);\n\t\t\tmealCarbs += carbs * portion;\n\t\t}\n\t\treturn mealCarbs;\n\t}", "private void fillData() {\n timer = null;\n timer2 = null;\n timer = new Timer();\n timer2 = new Timer();\n\n ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();\n ActivityManager activityManager = (ActivityManager) getActivity().getSystemService(ACTIVITY_SERVICE);\n activityManager.getMemoryInfo(mi);\n double availableMegs = mi.availMem / 0x100000L;\n double percentAvail = mi.availMem / (double)mi.totalMem * 100.0;\n\n\n// long l = AppUtil.getAvailMemory(mContext);\n// long y = AppUtil.getTotalMemory(mContext);\n// final double x = (((y - l) / (double) y) * 100);\n// // arcProcess.setProgress((int) x);\n final double x = 100 - percentAvail;\n arcProcess.setProgress(0);\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n\n if (arcProcess.getProgress() >= (int) x) {\n timer.cancel();\n } else {\n arcProcess.setProgress(arcProcess.getProgress() + 1);\n }\n\n }\n });\n }\n }, 50, 20);\n\n SDCardInfo mSDCardInfo = StorageUtil.getSDCardInfo();\n SDCardInfo mSystemInfo = StorageUtil.getSystemSpaceInfo(mContext);\n\n long nAvailaBlock;\n long TotalBlocks;\n if (mSDCardInfo != null) {\n nAvailaBlock = mSDCardInfo.free + mSystemInfo.free;\n TotalBlocks = mSDCardInfo.total + mSystemInfo.total;\n } else {\n nAvailaBlock = mSystemInfo.free;\n TotalBlocks = mSystemInfo.total;\n }\n\n final double percentStore = (((TotalBlocks - nAvailaBlock) / (double) TotalBlocks) * 100);\n\n capacity.setText(StorageUtil.convertStorage(TotalBlocks - nAvailaBlock) + \"/\" + StorageUtil.convertStorage(TotalBlocks));\n arcStore.setProgress(0);\n\n timer2.schedule(new TimerTask() {\n @Override\n public void run() {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n\n if (arcStore.getProgress() >= (int) percentStore) {\n timer2.cancel();\n } else {\n arcStore.setProgress(arcStore.getProgress() + 1);\n }\n\n }\n });\n }\n }, 50, 20);\n\n\n }", "@Override\n\tpublic List<Double> computeValues() {\n\t\treturn null;\n\t}", "public com.cognos.developer.schemas.raas.Returns__by__Order__Method___x002d__Prompted__Chart.SizeValue getKashidaSpace() {\r\n return kashidaSpace;\r\n }", "public abstract Double getDataValue();", "public A getData()\n\t{\n\t\treturn data;\n\t}", "private void graphInfo() {\n \n this.distances = new double[this.cities.size()][this.cities.size()];\n \n City c1, c2;\n \n // take the city\n for (int i = 0; i < this.cities.size(); i++) {\n // go through all the other cities\n c1 = this.cities.get(i);\n for (int j = 0; j < this.cities.size(); j++) {\n c2 = this.cities.get(j);\n this.distances[i][j] = c1.to(c2);\n }\n }\n \n }", "public float getCapacity();", "public double[][] getTableData() {\n return data;\n }", "public abstract double[] roughOffsets();", "private static double[] allarga(double[] a)\r\n\t{\r\n\t\t// in alternativa a copyOf:\r\n\t\t\t\t\t/*\r\n\t\t\t\t\tdouble[] nuovoStorico = new double[storico.length+1];\r\n\t\t\t\t\tfor (int k = 0; k < storico.length; k++) nuovoStorico[k] = storico[k];\r\n\t\t\t\t\tnuovoStorico[storico.length-1] = energia;\r\n\t\t\t\t\tstorico = nuovoStorico;\r\n\t\t\t\t\t */\r\n\t\t\r\n\t\treturn Arrays.copyOf(a, a.length+1);\r\n\t}", "private XYDataset createDataset() {\n final XYSeriesCollection dataset = new XYSeriesCollection();\n //dataset.addSeries(totalDemand);\n dataset.addSeries(cerContent);\n //dataset.addSeries(cerDemand);\n dataset.addSeries(comContent);\n //dataset.addSeries(comDemand);\n dataset.addSeries(activation);\n dataset.addSeries(resolutionLevel);\n \n return dataset;\n }", "private int[] getMeasures(ImageData input, boolean byRows) {\n int[] result = new int[2];\n\n if (byRows) {\n result[0] = input.measures.width;\n result[1] = input.measures.height;\n } else {\n result[0] = input.measures.height;\n result[1] = input.measures.width;\n }\n\n return result;\n }", "VectorArray getPhsCHar();", "public int[] getData() {\n return data;\n }", "public HistogramDataSet getData();", "private Values getApproximateSizeValObj(String data){\n\t\tdata = data.replaceAll(\"[^0-9.x ]\", \"\");\r\n\t\tString[] values = data.split(\"x\");\r\n\t\tValue valObj1 = getValueObj(values[1].trim(), \"Length\", \"in\");\r\n\t\t Value valObj2 = getValueObj(values[2].trim(), \"Width\", \"in\");\r\n\t\t Values valuesObj = new Values();\r\n\t\t List<Value> listOfValue = new ArrayList<>();\r\n\t\t listOfValue.add(valObj1);\r\n\t\t listOfValue.add(valObj2);\r\n\t\t valuesObj.setValue(listOfValue);\r\n\t\t return valuesObj;\r\n\t}", "public Hashtable<String, BrandsData> getPromoPerBrand(){\n\t\tHashtable<String, BrandsData> brandsAnalysis = new Hashtable<String, BrandsData>();\n\t\tfor(String key:this.allItems.keySet()) {\n\t\t\tString brand = this.allItems.get(key).getBrand();\n\t\t\tBrandsData addition = this.convertDataStorageToBrandsData(brand, this.allItems.get(key));\n\t\t\tif(brandsAnalysis.containsKey(brand)) {\n\t\t\t\tBrandsData existing = brandsAnalysis.get(brand);\n\t\t\t\tBrandsData updated = this.allocateDataStorage(existing, addition);\n\t\t\t\tbrandsAnalysis.put(brand, updated);\n\t\t\t} else {\n\t\t\t\tbrandsAnalysis.put(brand, addition);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn brandsAnalysis;\n\t}", "double[] getReferenceValues();", "Measurement getAccumulation();", "int getData2();", "int getData2();" ]
[ "0.5029142", "0.49799925", "0.49681062", "0.49367857", "0.48824275", "0.48804224", "0.48282048", "0.48028937", "0.4744255", "0.47279477", "0.47018513", "0.47000194", "0.4696581", "0.46754256", "0.4663152", "0.46596825", "0.4652455", "0.4628449", "0.46232393", "0.46095005", "0.46095005", "0.4606412", "0.4605216", "0.4595016", "0.45795563", "0.4562099", "0.45608914", "0.45570022", "0.45514822", "0.4545732", "0.45423394", "0.45365444", "0.4531296", "0.45295212", "0.450151", "0.44941056", "0.44861788", "0.44764963", "0.44736123", "0.4471263", "0.44663435", "0.44596383", "0.44566256", "0.44428045", "0.44419318", "0.44394684", "0.44394684", "0.443885", "0.44251683", "0.44242063", "0.44155884", "0.44004226", "0.43951073", "0.43897492", "0.4386679", "0.43732008", "0.4370944", "0.43655902", "0.43654397", "0.43647248", "0.435907", "0.43570772", "0.4355506", "0.435054", "0.4343382", "0.43318754", "0.4327964", "0.43240032", "0.4320561", "0.43188548", "0.43185765", "0.4317678", "0.43160215", "0.43120515", "0.43007186", "0.42988688", "0.42927644", "0.42870492", "0.42824188", "0.42804852", "0.42755935", "0.42748317", "0.42697626", "0.42689824", "0.42686185", "0.4266166", "0.42641518", "0.42619723", "0.42613807", "0.42580137", "0.4257736", "0.4257167", "0.4255796", "0.42498022", "0.42492193", "0.42483884", "0.4245871", "0.42452157", "0.42447108", "0.4244478", "0.4244478" ]
0.0
-1
Returns bounds of all primitive arcs in this Cell or null if there are not primitives.
public ERectangle getPrimitiveBounds() { ERectangle primitiveBounds = this.primitiveBounds; if (primitiveBounds != null) return primitiveBounds; return this.primitiveBounds = computePrimitiveBounds(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BoundsObject getBounds() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Area getBoundsArea() {\n\t\treturn null;\r\n\t}", "public Rectangle getBounds() {\n return null;\n }", "public List<Float> getBoundingsOfCell() {\n\n\t\tfloat minXPoint = Float.POSITIVE_INFINITY;\n\t\tfloat maxXPoint = Float.NEGATIVE_INFINITY;\n\t\tfloat minYPoint = Float.POSITIVE_INFINITY;\n\t\tfloat maxYPoint = Float.NEGATIVE_INFINITY;\n\n\t\tfor (int i = 0; i < face.edges().size(); i++) {\n\n\t\t\tDCEL_Edge e = (DCEL_Edge) face.edges().get(i);\n\n\t\t\tArc2_Sweep arc = (Arc2_Sweep) e.reference;\n\n\t\t\t// Looking for most left located point of cell\n\t\t\tif (minXPoint > arc.minX().x) {\n\t\t\t\tminXPoint = arc.minX().x;\n\t\t\t}\n\t\t\t// Looking for most right located point of cell\n\t\t\tif (maxXPoint < arc.maxX().x) {\n\t\t\t\tmaxXPoint = arc.maxX().x;\n\t\t\t}\n\t\t\t// Looking for highest located point of cell\n\t\t\tif (minYPoint > arc.minY().y) {\n\t\t\t\tminYPoint = arc.minY().y;\n\t\t\t}\n\t\t\t// Looking for lowest located point of cell\n\t\t\tif (maxYPoint < arc.maxY().y) {\n\t\t\t\tmaxYPoint = arc.maxY().y;\n\t\t\t}\n\n\t\t}\n\n\t\tList<Float> boundings = new ArrayList<Float>();\n\t\tboundings.add(minXPoint);\n\t\tboundings.add(maxXPoint);\n\t\tboundings.add(minYPoint);\n\t\tboundings.add(maxYPoint);\n\t\treturn boundings;\n\n\t}", "public float[] getBounds() {\r\n\t\tfloat[] bounds = {x_ - width_/ 2, x_ + width_ / 2, y_ - height_ / 2, y_ + height_ / 2};\r\n\t\treturn bounds;\r\n\t}", "@Pure\n\tprotected Primitives getPrimitiveTypes() {\n\t\treturn this.primitives;\n\t}", "@Override\n public List<Bound> getBounds() {\n return Collections.unmodifiableList(bounds);\n }", "public Rectangle getBounds() {\n\t\tif (bounds == null) {\n\t\t\tsuper.getBounds();\n\t\t\tfor (int i = 0; i < getChildren().size(); i++) {\n\t\t\t\tIFigure child = (IFigure) getChildren().get(i);\n\t\t\t\tbounds.union(child.getBounds());\n\t\t\t}\n\t\t}\n\t\treturn bounds;\n\t}", "public double[] get_bounds() {\n System.out.println ( \"section.get_bounds() called\" );\n double[] current_bounds = null;\n if (contours != null) {\n for (int i=0; i<contours.size(); i++) {\n ContourClass contour = contours.get(i);\n double[] cont_bounds = contour.get_bounds();\n if (cont_bounds != null) {\n if (current_bounds == null) {\n current_bounds = new double[4];\n current_bounds[0] = cont_bounds[0];\n current_bounds[1] = cont_bounds[1];\n current_bounds[2] = cont_bounds[2];\n current_bounds[3] = cont_bounds[3];\n } else {\n if (cont_bounds[0] < current_bounds[0]) current_bounds[0] = cont_bounds[0]; // minx\n if (cont_bounds[1] > current_bounds[1]) current_bounds[1] = cont_bounds[1]; // maxx\n if (cont_bounds[2] < current_bounds[2]) current_bounds[2] = cont_bounds[2]; // miny\n if (cont_bounds[3] > current_bounds[3]) current_bounds[3] = cont_bounds[3]; // maxy\n }\n }\n }\n }\n return ( current_bounds );\n }", "public MWC.GenericData.WorldArea getBounds()\r\n\t{\n\t\treturn null;\r\n\t}", "public final BoundingBox getBounds() {\n\t\tif (bounds==null) {\n\t\t\tint srsID =( (Geometry)this.get(0).getDefaultGeometry()).getSRID();\n\t\t\tBoundingBox re = new BoundingBoxImpl(\"\"+srsID);\n\t\t\tfor (SimpleFeature f : this) {\n\t\t\t\tre.include(f.getBounds());\n\t\t\t}\n\t\t\tbounds = re;\n\t\t}\n\t\treturn bounds;\n\t}", "public IntegerValue[] getIntegerBoundsForVariable() {\n return select.getIntegerBounds();\n }", "public Bounds getBounds () { return (bounds); }", "@NonNull JavaBoundingBox[] collision();", "public List<Vector3D> getConvexCellsInsidePoints() {\n return convexCellsInsidePoints;\n }", "public IRectangleBound getClipBound();", "public Rectangle getBounds() {\r\n return bounds;\r\n }", "Collection<? extends Boundary> getIsBoundaryNodeOf();", "@NonNull\n public Rect getBounds() {\n return new Rect(mBounds);\n }", "public Rectangle getBounds();", "public Rectangle getBounds();", "public abstract Rectangle getBounds();", "public abstract Rectangle getBounds();", "public abstract Rectangle getBounds();", "public final native LatLngBounds getBounds() /*-{\n return this.getBounds();\n }-*/;", "public abstract Regionlike getGridBounds();", "Rectangle getBounds();", "@Override\n public GRectangle getBounds() {\n return null;\n }", "public DeclaredTypeListNode getBounds()throws ClassCastException;", "RectangleLatLng getBounds();", "@Override\n\tpublic Rectangle2D getBounds2D() {\n\t\treturn null;\n\t}", "@Override\n\tpublic GRectangle getBounds() {\n\t\tif (isEmpty()) {\n\t\t\treturn new GRectangle();\n\t\t} else {\n\t\t\tGPoint p0 = points.get(0);\n\t\t\tdouble minX = p0.getX();\n\t\t\tdouble maxX = minX;\n\t\t\tdouble minY = p0.getY();\n\t\t\tdouble maxY = minY;\n\t\t\tfor (int i = 1; i < size(); i++) {\n\t\t\t\tGPoint p1 = points.get(i);\n\t\t\t\tminX = Math.min(minX, p1.getX());\n\t\t\t\tmaxX = Math.max(maxX, p1.getX());\n\t\t\t\tminY = Math.min(minY, p1.getY());\n\t\t\t\tmaxY = Math.max(maxY, p1.getY());\n\t\t\t}\n\t\t\treturn new GRectangle(minX, maxX, minY, maxY);\n\t\t}\n\t}", "public Rectangle2D getBounds() {\n\t\tif (_child == null) {\n\t\t\treturn new Rectangle2D.Double();\n\t\t} else {\n\t\t\treturn _child.getBounds();\n\t\t}\n\t}", "public Stream<Area> extractBounds() {\n if (getPolygonsAsJson() != null && !getPolygonsAsJson().trim().equalsIgnoreCase(\"[]\")) {\n ObjectMapper mapper = new ObjectMapper();\n try {\n @SuppressWarnings(\"unchecked\")\n ArrayList<LinkedHashMap<String, Double>> bounds = (ArrayList<LinkedHashMap<String, Double>>) mapper.readValue(getPolygonsAsJson(), ArrayList.class);\n return bounds.stream().map(entry -> new Area(entry.get(LEFT), entry.get(TOP), entry.get(RIGHT), entry.get(BOTTOM)));\n } catch (IOException e) {\n throw new EmbryonicException(\"Error parsing json for InterestOfAreas\", e);\n }\n }\n return Stream.empty();\n }", "public List<String> getAllBoundaries() {\n\t\treturn getFieldsOfType(PropertyLocation.class, Boundary.class);\n\t}", "public boolean getBoundsVolatile() {\n\t\treturn true;\n\t}", "public Bounds getLogicalBounds() {\n return getDragContext().getLogicalBounds();\n }", "public Rectangle2D getBounds2D() {\n/* 155 */ if (this.usePrimitivePaint) {\n/* 156 */ Rectangle2D primitiveBounds = this.node.getPrimitiveBounds();\n/* 157 */ if (primitiveBounds == null) {\n/* 158 */ return new Rectangle2D.Double(0.0D, 0.0D, 0.0D, 0.0D);\n/* */ }\n/* 160 */ return (Rectangle2D)primitiveBounds.clone();\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 168 */ Rectangle2D bounds = this.node.getBounds();\n/* 169 */ if (bounds == null) {\n/* 170 */ return new Rectangle2D.Double(0.0D, 0.0D, 0.0D, 0.0D);\n/* */ }\n/* */ \n/* 173 */ AffineTransform at = this.node.getTransform();\n/* 174 */ if (at != null) {\n/* 175 */ bounds = at.createTransformedShape(bounds).getBounds2D();\n/* */ }\n/* 177 */ return bounds;\n/* */ }", "public RectF getBounds()\n {\n return bounds;\n }", "public String getRectangleBounds() {\n checkAvailable();\n return impl.getRectangle();\n }", "public Rectangle getBounds() {\n\treturn new Rectangle((int)x,(int)y,32,32);\n\t}", "@Override\n\tpublic Rect getHitbox() \n\t{\n\t\treturn _bounds;\n\t}", "public void calculateBoundsAABB() {\n\t\tsuper.minY = 0;\n\t\tradius = 0;\n\t\tmaxY = 0;\n\t\tminX = 999999;\n\t\tmaxX = -999999;\n\t\tmaxZ = -99999;\n\t\tminZ = 99999;\n\t\tfor (int j = 0; j < vertexCount; j++) {\n\t\t\tint x = vertexX[j];\n\t\t\tint y = vertexY[j];\n\t\t\tint z = vertexZ[j];\n\t\t\tif (x < minX) {\n\t\t\t\tminX = x;\n\t\t\t}\n\t\t\tif (x > maxX) {\n\t\t\t\tmaxX = x;\n\t\t\t}\n\t\t\tif (z < minZ) {\n\t\t\t\tminZ = z;\n\t\t\t}\n\t\t\tif (z > maxZ) {\n\t\t\t\tmaxZ = z;\n\t\t\t}\n\t\t\tif (-y > super.minY) {\n\t\t\t\tsuper.minY = -y;\n\t\t\t}\n\t\t\tif (y > maxY) {\n\t\t\t\tmaxY = y;\n\t\t\t}\n\t\t\tint radiusSqr = (x * x) + (z * z);\n\t\t\tif (radiusSqr > radius) {\n\t\t\t\tradius = radiusSqr;\n\t\t\t}\n\t\t}\n\t\tradius = (int) Math.sqrt(radius);\n\t\tminDepth = (int) Math.sqrt((radius * radius) + (super.minY * super.minY));\n\t\tmaxDepth = minDepth + (int) Math.sqrt((radius * radius) + (maxY * maxY));\n\t}", "public Bounds get() {\n\treturn bounds;\n }", "public Map<Integer, Geometry> getBoundary() throws SQLException {\n return retrieveExpected(createNativeBoundaryStatement(), GEOMETRY);\n }", "public Rectangle get_bounds() {\n return new Rectangle(x,y, width-3, height-3);\n }", "@Override\r\n\tpublic Rectangle getRect() {\n\t\treturn null;\r\n\t}", "public Rectangle getBounds() {\n return super.getBounds();\n }", "private int[] getBounds(Node node) {\n String[] boundsAttr = (((Element) node).getAttribute(\"bounds\")).replace(\"[\",\"\").split(\"[^0-9]\");\n int[] bounds = new int[boundsAttr.length];\n for (int i = 0; i < boundsAttr.length; i++) {\n bounds[i] = Integer.parseInt(boundsAttr[i]);\n }\n return bounds;\n }", "@Override\n \tpublic Rectangle2D GetBoundingBox() {\n\t\treturn null;\n \t}", "public RMRect getBounds() { return new RMRect(getX(), getY(), getWidth(), getHeight()); }", "List<PathRectangle> getCollisionRectangles();", "public Rectangle bounds()\n\t{\n\t\treturn (new Rectangle(x, y, 10, 10));\n\t}", "public RMRect getBoundsInside() { return new RMRect(0, 0, getWidth(), getHeight()); }", "public Rectangle getBounds()\n {\n return new Rectangle ((int)x,(int)y,32,32);\n }", "public int[] getSelectionBounds() {\r\n if(selectionBounds == null){\r\n return new int[]{};\r\n }\r\n return selectionBounds;\r\n }", "public RMRect bounds() { return new RMRect(x(), y(), width(), height()); }", "public Rect getBound() {\n return new Rect((int) (x - radius), (int) (y - radius), (int) (x + radius), (int) (y + radius));\n }", "public double[] getRealBounds(RealVar r) {\n if (empty) {\n throw new UnsupportedOperationException(\"Empty solution. No solution found\");\n }\n return realmap.get(r);\n }", "private float[] getBounds(TileCoolantPipe tile) {\n float[] bounds = new float[6];\n boolean[] connected = tile.getConnectedSides();\n float hDiameter = cableDiameter / 2.0F;\n for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {\n float width = 0.5F;\n if (!connected[dir.ordinal()]) {//(sides & dir.flag) != dir.flag) {\n width = hDiameter;\n }\n if (dir.ordinal() % 2 == 0) {\n width *= -1;\n }\n bounds[dir.ordinal()] = 0.5F + width;\n }\n return bounds;\n }", "protected Rectangle determineBounds() {\n return getNetTransform().createTransformedShape( _bounds ).getBounds();\n }", "@Override\n public Rectangle getBounds() {\n return new Rectangle(this.bounds);\n }", "public ReferencedEnvelope getBounds(){\n if(bounds==null){\n // Create Null envelope\n this.bounds = new ReferencedEnvelope(getCRS());\n // First try to find the BBOX definition in the gisNode directly\n try{\n if(gisNode.hasProperty(INeoConstants.PROPERTY_BBOX_NAME)){\n double[] bbox = (double[])gisNode.getProperty(INeoConstants.PROPERTY_BBOX_NAME);\n this.bounds = new ReferencedEnvelope(bbox[0],bbox[1],bbox[2],bbox[3],crs);\n }else{\n System.err.println(\"No BBox defined in the GeoNeo object\");\n }\n }catch(Exception bbox_e){\n System.err.println(\"Failed to interpret BBOX: \"+bbox_e.getMessage());\n bbox_e.printStackTrace(System.err);\n }\n // Secondly, if bounds is still empty, try find all feature geometries and calculate bounds\n try{\n if(this.bounds.isNull()){\n // Try to create envelope from any data referenced by the gisNode\n for(GeoNode node:getGeoNodes()){\n //TODO: support high dimensions\n this.bounds.expandToInclude(node.getCoords()[0], node.getCoords()[1]);\n }\n }\n }catch(Exception bbox_e){\n System.err.println(\"Failed to interpret BBOX: \"+bbox_e.getMessage());\n bbox_e.printStackTrace(System.err);\n }\n }\n return bounds;\n }", "@Override\r\n\tpublic Rectangle getBound() {\n\t\treturn new Rectangle((int)x, (int)y, (int)width, (int)height);\r\n\t}", "public double Area() {\n return OCCwrapJavaJNI.ShapeAnalysis_FreeBoundData_Area(swigCPtr, this);\n }", "public Bounds getLatLonBounds(BoundsObject bounds) {\n\t\treturn null;\n\t}", "public List<Access> getTypeBounds() {\n return getTypeBoundList();\n }", "public Rectangle getBounds() {\n return new Rectangle(x, y, 32, 32);\n }", "public CollisionArea_SingleCirc getOptimalCollisionArea();", "public final int[][] getPrimitiveMatrix() {\r\n return primitiveMatrix;\r\n }", "@Override\n public COSBase getCOSObject()\n {\n return rectArray;\n }", "public Rectangle getBounds() {\n\t\t\treturn new Rectangle(x_pos, y_pos, getIconWidth(), getIconHeight());\n\t\t}", "public int[] getRawVertices() {\n long cPtr = RecastJNI.rcContour_rverts_get(swigCPtr, this);\n if (cPtr == 0) {\n return null;\n }\n return Converter.convertToInts(cPtr, getNumberOfRawVertices() * 4);\n }", "@Override\n public Rectangle getBounds() {\n return new Rectangle(x,y,64,64);\n }", "public CCAABoundingRectangle boundingRect(){\n\t\treturn _myBoundingRectangle;\n\t}", "@Override\n\tpublic Rectangle getBounds() {\n\t\treturn new Rectangle(screen_x, screen_y, pinWidth, pinWidth);\n\t}", "public Rectangle getBounds() {\n return new Rectangle(getMinX(), getMinY(), getWidth(), getHeight());\n }", "public Rectangle getBounds() {\n\t\treturn new Rectangle(getX(),getY(),width, width);\n\t}", "public Rectangle getBoundingBox() {\n\t\treturn getBounds();\n\t}", "public Rectangle getBounds() {\n\t\tif (img == null)\n\t\t\treturn new Rectangle();\n\t\treturn new Rectangle(new Dimension(img.getWidth(), img.getHeight()));\n\t}", "@Override\n\tpublic List<IRange> getRangeList() {\n\t\treturn null;\n\t}", "final int getNumberOfBoundedBoundSymbols() {\n if (this.boundedBoundSymbols == null) return 0;\n\n int num = 0;\n for (int i = 0; i < this.boundedBoundSymbols.length; i++) {\n if (this.tupleOrs[i]) {\n num++;\n }\n else {\n num += this.boundedBoundSymbols[i].length;\n }\n }\n return num;\n }", "public Rectangle getBounds() {\r\n\t\treturn new Rectangle((int) (x * scalingX), (int) (y * scalingY), (int) rocketWidth, (int) rocketHeight);\r\n\t}", "public Position[] getBoundary() {\n\t\treturn boundary.clone();\n\t}", "public Rectangle getBounds() {\n\t\tRectangle Box = new Rectangle(x, y, 48, 48);\n\t\treturn Box;\n\t}", "public Rectangle getClipBounds()\r\n\t{\r\n\t\treturn _g2.getClipBounds();\r\n\t}", "public Rectangle getBounds() {\n\t\treturn new Rectangle((int) xPos, (int) yPos, (int) width, (int) height);\n\t}", "public List<Access> getTypeBoundsNoTransform() {\n return getTypeBoundListNoTransform();\n }", "public Rectangle getBounds() {\r\n return new Rectangle(x, y, 55, 51);\r\n }", "public Rectangle getBounds() {\n return new Rectangle(x, y, DIAMETER, DIAMETER); // returns a rectangle with its dimensions\r\n }", "public sRectangle getSRectangleBound()\n {\n return form.getSRectangleBound();\n }", "public NodeUnion<? extends DeclaredTypeListNode> getUnionForBounds();", "@Override\n\tpublic Polygon getCollisionShape() {\n\t\treturn null;\n\t}", "public Rectangle getBounds(){\r\n return new Rectangle(x, y, w, w);\r\n }", "public void computeStoredBounds()\n {\n computeSRectangleBound();\n computeCircleBound();\n }", "@Override\n\tpublic List<IRange> getSectionRanges() {\n\t\treturn null;\n\t}", "public Rectangle getBound(){\n \tint x = (int)location.getX();\n \tint y = (int)location.getY();\n \t\n \tif(isExploded == false)\n \t\treturn new Rectangle(x, y, image.getWidth(null), image.getHeight(null));\n \telse\n \t\treturn new Rectangle(x,y, 1,1);\n }", "public int getBound();", "public Bounds getBounds() {\n\t\treturn boss.getBoundsInParent();\n\t}", "public Shape getAreaColision();" ]
[ "0.6106499", "0.59640217", "0.5693991", "0.56693375", "0.5667383", "0.56238246", "0.5610793", "0.5578929", "0.55092597", "0.5413268", "0.5412256", "0.5401711", "0.537545", "0.53737485", "0.5370916", "0.5350002", "0.5333197", "0.53296804", "0.53231734", "0.5318467", "0.5318467", "0.53132683", "0.53132683", "0.53132683", "0.5306198", "0.52865535", "0.5280611", "0.5278631", "0.52602047", "0.5250368", "0.5186213", "0.5176395", "0.5163313", "0.5128161", "0.5127789", "0.51181406", "0.5115369", "0.5095503", "0.50686085", "0.5061286", "0.50266945", "0.502326", "0.50168306", "0.49960983", "0.49937066", "0.49863136", "0.4984314", "0.49826658", "0.4977972", "0.49752122", "0.49703613", "0.49699408", "0.49698073", "0.49679017", "0.4960083", "0.4958096", "0.4957135", "0.49508065", "0.49494693", "0.49418455", "0.49332097", "0.49265483", "0.49165747", "0.49091515", "0.4908918", "0.48949188", "0.48919618", "0.4879646", "0.4863302", "0.48616362", "0.4849552", "0.4846741", "0.48450124", "0.48420697", "0.48254046", "0.48213124", "0.48058522", "0.480448", "0.47857365", "0.47825724", "0.4775849", "0.47692093", "0.47682172", "0.47654182", "0.4741441", "0.4736509", "0.4726202", "0.46967554", "0.4684186", "0.4683956", "0.466812", "0.4663065", "0.46592578", "0.46560916", "0.46542886", "0.4650147", "0.46455878", "0.46379253", "0.46370077", "0.46329403" ]
0.6874601
0
Returns true of there are Exports on specified NodeInst.
public boolean hasExports(ImmutableNodeInst originalNode) { int startIndex = searchExportByOriginalPort(originalNode.nodeId, 0); if (startIndex >= exportIndexByOriginalPort.length) return false; ImmutableExport e = exportIndexByOriginalPort[startIndex]; return e.originalNodeId == originalNode.nodeId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasExports() {\n return !exportedNamespacesToSymbols.isEmpty();\n }", "boolean isNoExport();", "public boolean isExport() {\n return export;\n }", "public boolean canExport(Grid grid) {\n return true;\n }", "private boolean peekExportDeclaration() {\n return peek(TokenType.EXPORT);\n }", "public static native boolean isExported(int pin) throws RuntimeException;", "boolean hasImported();", "boolean hasUsage();", "public static boolean isExportError() {\n return (brainFilePath==null || brainFilePath == \"\");\n }", "boolean isAllInDownloadedArea();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isExportLock();", "boolean hasUses();", "public boolean pinUseCount(ImmutableNodeInst pin)\n {\n int numConnections = getNumConnections(pin);\n if (numConnections > 2) return false;\n if (hasExports(pin)) return true;\n if (numConnections == 0) return false;\n return true;\n }", "public Boolean supportExportData() {\n return this.supportExportData;\n }", "@Import(\"isMembers\")\n\tboolean isMembers();", "public boolean hasVisibleItems();", "private static boolean isExternal( HtmlBrowser.Factory brow ) {\n FileObject fo = FileUtil.getConfigFile (\"Services/Browsers\"); // NOI18N\n\n DataFolder folder = DataFolder.findFolder (fo);\n DataObject [] dobjs = folder.getChildren ();\n for (int i = 0; i < dobjs.length; i++) {\n Object o = null;\n\n try {\n if (Boolean.TRUE.equals (dobjs[i].getPrimaryFile ().getAttribute (\"hidden\")))\n continue;\n if (!Boolean.TRUE.equals (dobjs[i].getPrimaryFile ().getAttribute (\"internal\")) )\n continue;\n InstanceCookie cookie = (InstanceCookie) dobjs[i].getCookie (InstanceCookie.class);\n\n if (cookie == null)\n continue;\n o = cookie.instanceCreate ();\n if (o != null && o.equals (brow)) {\n return false;\n }\n }\n // exceptions are thrown if module is uninstalled\n catch (java.io.IOException ex) {\n Logger.getLogger (IDESettings.class.getName ()).log (Level.WARNING, null, ex);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger (IDESettings.class.getName ()).log (Level.WARNING, null, ex);\n }\n }\n return false;\n }", "@Override\n\tpublic boolean getExportEnabled(String ref) {\n\t\treturn false;\n\t}", "boolean isInDownloadedArea();", "protected boolean Exists()\n\t{\n\t\tif (identity<1) return false;\n\t\tNodeReference nodeReference = getNodeReference();\n\t\treturn (nodeReference.exists() || nodeReference.hasSubnodes());\n\t}", "boolean isValid() {\n\t\tif (this.nodeImpl != null) {\n\t\t\t\n\t\t\tfor (AbstractImplementationArtifact ia : this.nodeImpl.getImplementationArtifacts()) {\n\t\t\t\tboolean matched = false;\n\t\t\t\tfor (AbstractImplementationArtifact handledIa : this.ias) {\n\t\t\t\t\tif (ia.equals(handledIa)) {\n\t\t\t\t\t\tmatched = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!matched) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t} else {\n\t\t\t\n\t\t\tfor (AbstractImplementationArtifact ia : this.relationImpl.getImplementationArtifacts()) {\n\t\t\t\tboolean matched = false;\n\t\t\t\tfor (AbstractImplementationArtifact handledIa : this.ias) {\n\t\t\t\t\tif (ia.equals(handledIa)) {\n\t\t\t\t\t\tmatched = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!matched) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t}", "boolean hasIcon();", "boolean hasIcon();", "boolean hasPokers();", "boolean hasPokers();", "public boolean hasPort() {\n return !ports.isEmpty();\n }", "public static boolean databaseExportEnabled() {\n\t\tif ((xml == null) || (databaseExportMode == null)) return false;\n\t\treturn !databaseExportMode.equals(\"disabled\");\n\t}", "boolean isVisited();", "boolean isVisited();", "boolean hasAsset();", "boolean hasExtensionFeedItem();", "private boolean hasIndexLink()\r\n \t{\r\n \t\treturn xPathQuery(XPath.INDEX_LINK.query).size() > 0;\r\n \t}", "public boolean isDeployed(){\n return !places.isEmpty();\n }", "boolean hasDownloadRequest();", "boolean hasHasDeployedAirbag();", "public boolean hasPort() {\n\tLogWriter.logMessage(LogWriter.TRACE_DEBUG,\"hasPort()\");\n Via via=(Via)sipHeader;\n return via.hasPort();\n }", "@Override\n public boolean hasNext() {\n return numeroDiNodiAncoraVisitabili>0;\n }", "public boolean isAvailable(){\n\t\ttry{\n\t\t\tgetPrimingsInternal(\"Test\", \"ATGATGATGATGATGATGATG\");\n\t\t}\n\t\tcatch(IOException e){\n\t\t\treturn false;\n\t\t}\n\t\tcatch(InterruptedException e){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "boolean hasPage();", "boolean hasPage();", "boolean hasDownloadResponse();", "public boolean isInvisible ( ) {\n\t\treturn extract ( handle -> handle.isInvisible ( ) );\n\t}", "public boolean hasEntries(){\n\t\treturn ! errorList.isEmpty();\n\t}", "boolean hasOpenedInventory(Player player);", "boolean hasFeedItem();", "public int getNumExports(int originalNodeId) {\n int startIndex = searchExportByOriginalPort(originalNodeId, 0);\n int j = startIndex;\n for (; j < exportIndexByOriginalPort.length; j++) {\n ImmutableExport e = exportIndexByOriginalPort[j];\n if (e.originalNodeId != originalNodeId) break;\n }\n return j - startIndex;\n }", "public boolean isMetaDataAvailable()\n\t{\n\t\tboolean allLoaded = true;\n\t\ttry \n\t\t{\n\t\t\t// we need to ask the session since our fileinfocache will hide the exception\n\t\t\tSwfInfo[] swfs = m_session.getSwfs();\n\t\t\tfor(int i=0; i<swfs.length; i++)\n\t\t\t{\n\t\t\t\t// check if our processing is finished.\n\t\t\t\tSwfInfo swf = swfs[i];\n\t\t\t\tif (swf != null && !swf.isProcessingComplete())\n\t\t\t\t{\n\t\t\t\t\tallLoaded = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(NoResponseException nre)\n\t\t{\n\t\t\t// ok we still need to wait for player to read the swd in\n\t\t\tallLoaded = false;\n\t\t}\n\n\t\t// count the number of times we checked and it wasn't there\n\t\tif (!allLoaded)\n\t\t{\n\t\t\tint count = propertyGet(METADATA_NOT_AVAILABLE);\n\t\t\tcount++;\n\t\t\tpropertyPut(METADATA_NOT_AVAILABLE, count);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// success so we reset our attempt counter\n\t\t\tpropertyPut(METADATA_ATTEMPTS, METADATA_RETRIES);\n\t\t}\n\t\treturn allLoaded;\n\t}", "public Boolean isExist() {\n\t\tif(pfDir.exists())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public Boolean isTeamMember(final Artifact artifact);", "boolean hasPageNo();", "boolean hasPageNo();", "boolean hasFeed();", "boolean hasFeed();", "public final boolean hasDeponents() {\r\n synchronized (f_seaLock) {\r\n return !f_deponents.isEmpty();\r\n }\r\n }", "boolean hasContents();", "boolean hasContents();", "boolean hasProduces();", "public boolean hasBeenExpanded(Object inNode)\n\t{\n\t\tObject parent = inNode;\n\t\twhile( parent != null)\n\t\t{\n\t\t\tString path = toUrl(inNode);\n\t\t\tif( getExpandedNodes().contains(path) )\n\t\t\t{\n\t\t\t\tparent = getWebTree().getModel().getParent(parent);\n\t\t\t\t//If we get to the root and it is selected still then we are ok!\n\t\t\t\tif( parent == null)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean isUsed();", "boolean isUsed();", "@Override\n public boolean isVisible(){\n \n try\t{\n new WebDriverWait(driver, 1)\n .until((Function<? super WebDriver, ? extends Object>) ExpectedConditions.visibilityOfElementLocated(locator));\n \n return true;\n }\n catch (NoSuchElementException ex){\n return false;\n }\n catch (TimeoutException ex){\n return false;\n }\n \n }", "public boolean supportsServeModulesWithoutPublish();", "boolean hasSer();", "public boolean isSetImport()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(IMPORT$0) != 0;\n }\n }", "public boolean isReserved() {\n return target.searchLink(ParentLinkName.ENTERPRISE) != null;\n }", "boolean hasPakringFree();", "boolean hasPakringFree();", "boolean hasExists();", "boolean hasPokemonDisplay();", "boolean hasChildren();", "@Override\n\tpublic boolean isExists(PokemonAbility entity) {\n\t\treturn false;\n\t}", "boolean hasInodeFile();", "@Test\n\tpublic void testIsVisible() {\n\t\tip = new ImagePlus();\n\t\tassertFalse(ip.isVisible());\n\t}", "boolean hasHasNodeID();", "public boolean hasFinished(int neighbour){\n\t//System.out.println(\"ATTENTION\");\n\treturn false;\n }", "public boolean isDashboardPagePresent() {\r\n\t\treturn isElementPresent(dashboardPage, SHORTWAIT);\r\n\t}", "public boolean isImported();", "boolean hasHost();", "boolean hasHost();", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "boolean hasExternalAttributionModel();", "boolean hasFeedItemSet();", "boolean isPresent(ExamPackage examPackage);", "boolean hasProject();", "boolean hasFeedItemTarget();", "public static boolean hasModule() {\n\t\ttry {\n\t\t\tPackageManager packageManager = AppMain.getContext().getPackageManager();\n\t\t\tIntent intent = new Intent(\"android.settings.USAGE_ACCESS_SETTINGS\");\n\t\t\tList<ResolveInfo> list = packageManager.queryIntentActivities(intent,\n\t\t\t\tPackageManager.MATCH_DEFAULT_ONLY);\n\t\t\treturn list.size() > 0;\n\t\t} catch (RuntimeException e) {\n\t\t\t// 在某个三星的设备上出现过安全异常\n\t\t\t// 在某个ZTE的设备上出现过RuntimeException\n\t\t\treturn false;\n\t\t}\n\t}", "boolean hasDestination();", "boolean hasDestination();", "boolean isExplosivesUsed();", "public boolean hasInfos(){\n return infos != null;\n }", "boolean hasInstance();", "public boolean hasBeenVisited() {\n\t\treturn visited; // Replace with your code\n\t}", "boolean hasRegistry();", "public boolean exist() {\n\t\treturn false;\n\t}", "boolean hasCount();", "@Override\r\n public Boolean shippedPortionExists(final File file) throws IOException, SAXException, ParserConfigurationException, TransformerException, XPathExpressionException {\r\n final XPathXmlParser parser = new XPathXmlParser();\r\n final NodeList nodes = parser.getNodes(parser.parseXmlFile(file, false, false), shipmentPortionPath);\r\n return (nodes != null && nodes.getLength() > 0);\r\n }", "boolean hasElement();" ]
[ "0.6978599", "0.62273896", "0.5661884", "0.55540985", "0.5525934", "0.5438852", "0.540202", "0.5376906", "0.5362205", "0.528502", "0.52737045", "0.5196464", "0.51825887", "0.51822835", "0.51746297", "0.51415807", "0.5089617", "0.50865406", "0.50677955", "0.5058984", "0.5031226", "0.502888", "0.502888", "0.5000602", "0.5000602", "0.49943256", "0.4962472", "0.49537975", "0.49537975", "0.49510965", "0.49492186", "0.4926282", "0.4925908", "0.491321", "0.4912343", "0.49005434", "0.48957607", "0.48899788", "0.4884458", "0.4884458", "0.48817775", "0.48747846", "0.4869807", "0.4864715", "0.48629567", "0.4856108", "0.48560873", "0.4855107", "0.48467374", "0.48390192", "0.48390192", "0.4835597", "0.4835597", "0.48314434", "0.48164856", "0.48164856", "0.4815604", "0.48085508", "0.48036894", "0.48036894", "0.48021033", "0.4798888", "0.47970814", "0.47934306", "0.47933787", "0.47925857", "0.47925857", "0.4781761", "0.47785664", "0.47662982", "0.47661388", "0.4759857", "0.47585467", "0.47568", "0.47558478", "0.47518194", "0.47461122", "0.47360873", "0.47360873", "0.47356713", "0.47356713", "0.47356713", "0.47356713", "0.47355264", "0.47321716", "0.4729414", "0.47256845", "0.4722326", "0.47211483", "0.47095808", "0.47095808", "0.47093743", "0.4708634", "0.47079706", "0.4706753", "0.47054887", "0.47035718", "0.46991265", "0.46981052", "0.46940207" ]
0.67835003
1
Method to return the number of Exports on specified NodeInst.
public int getNumExports(int originalNodeId) { int startIndex = searchExportByOriginalPort(originalNodeId, 0); int j = startIndex; for (; j < exportIndexByOriginalPort.length; j++) { ImmutableExport e = exportIndexByOriginalPort[j]; if (e.originalNodeId != originalNodeId) break; } return j - startIndex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumVisits() {\n return this.numVisits;\n }", "@Exported\n public int getNumberOfOfflineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOffline()) {\n count++;\n }\n }\n return count;\n }", "int getSeenInfoCount();", "public int getVisits() {\n return visits;\n }", "public int getTotalVisited(){\n return this.getSea().countVisited();\n }", "public Integer getVisitCount() {\n return visitCount;\n }", "public Integer getVisitCount() {\n return visitCount;\n }", "int getInfoCount();", "int getInfoCount();", "int getInfoCount();", "int getStatsCount();", "int getStatsCount();", "int getStatsCount();", "int getInstalledModuleVersionsCount();", "int getSnInfoCount();", "int getSnInfoCount();", "int getSnInfoCount();", "public int getDownloadedPcs()\n\t{\n\t\treturn existing.cardinality();\n\t}", "public int getNumberOfEntries();", "int getExperimentsCount();", "int getVulnerabilityReportsCount();", "@Accessor(qualifier = \"itemsExported\", type = Accessor.Type.GETTER)\n\tpublic Integer getItemsExported()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(ITEMSEXPORTED);\n\t}", "public int getNumberShips();", "public int getNumberOfEntries() ;", "int getStatMetadataCount();", "int getOutputsCount();", "int getOutputsCount();", "int getOutputsCount();", "int getOutputsCount();", "int getOutputsCount();", "int getNodeStatusListCount();", "int getVersionsCount();", "public int getSeenInfoCount() {\n return instance.getSeenInfoCount();\n }", "int getDisksCount();", "int getFHPackagesCount();", "public int getActiveDownloads() {\r\n return downloadControllers.size();\r\n }", "int findAllCount() ;", "int getSheetCount();", "public int getNumberOfSpaceActivitiesForUpgrade(Identity spaceIdentity);", "int getInstrumentCount();", "int getActionsCount();", "int getActionsCount();", "private int visitedNetworksCount() {\n final HashSet<String> visitedNetworksSet = new HashSet<>(mVisitedNetworks);\n return visitedNetworksSet.size();\n }", "void numberOfOpenMapInformation(int number, int pIndex);", "public int getNumberOfActivitesOnActivityFeedForUpgrade(Identity ownerIdentity);", "private int countStorageEntities() {\n final AtomicInteger count = new AtomicInteger(0);\n storage().exportData(e -> {\n if (e.getEntityType() != EntityType.Manifest) {\n log.debug(\"Counting from export: {}\", e);\n count.incrementAndGet();\n }\n return null;\n });\n int res = count.get();\n // Count data that is not exported\n res += storage().getRoleMappings().size();\n return res;\n }", "@Exported\n public int getNumberOfOnlineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOnline()) {\n count++;\n }\n }\n return count;\n }", "int getEntryCount();", "int getSeasonShareCount();", "int getNodeCount();", "int getNodeCount();", "int getReservePokemonCount();", "public int getNumEntries() {\n return numEntries;\n }", "int getWifisCount();", "public boolean hasExports(ImmutableNodeInst originalNode) {\n int startIndex = searchExportByOriginalPort(originalNode.nodeId, 0);\n if (startIndex >= exportIndexByOriginalPort.length) return false;\n ImmutableExport e = exportIndexByOriginalPort[startIndex];\n return e.originalNodeId == originalNode.nodeId;\n }", "public int getCount() {\n\t\treturn OReportOne.size();\n\t}", "public int getPortletCount()\r\n {\r\n return _portletList.size();\r\n }", "public StatusPage countHistoryEntries ( ) throws InterruptedException {\n wait.until ( ExpectedConditions.elementToBeClickable ( uiHistory ) );\n wait.until ( ExpectedConditions.visibilityOf ( uiHistory ) );\n Thread.sleep ( 7000 );\n uiHistory.click ();\n count2 = getSizeHistoryEntries ();\n System.out.println ( count2 );\n return new StatusPage ( this.driver );\n\n }", "public int getModuleArtifactsForDiffCount(BuildParams buildParams, String offset, String limit) {\n ResultSet rs = null;\n try {\n Object[] diffParams = getArtifactDiffCountParam(buildParams);\n String buildQuery = getArtifactDiffCount(buildParams);\n rs = jdbcHelper.executeSelect(buildQuery, diffParams);\n if (rs.next()) {\n return rs.getInt(1);\n }\n } catch (SQLException e) {\n log.error(e.toString());\n } finally {\n DbUtils.close(rs);\n }\n return 0;\n }", "public int getOutPortCount() {\n\t\treturn rightPortCount;\n\t}", "public int getNumExits() {\n return mySize.getNumExits();\n }", "public int count() {\n return this.visitors.size();\n }", "public static int getPageHits() {\r\n return _count;\r\n }", "int getMonstersCount();", "int getMonstersCount();", "public int numberOfEntries();", "int sizeOfGssExportedNameArray();", "public int numberOfOpenSites() {\n \treturn num;\r\n }", "int getNumSources();", "int getContentsCount();", "private void getNodesCount(HttpServletRequest request, HttpServletResponse response) throws IOException {\n int countNodes = SimApi.getNodesCount();\n response.getWriter().write(Integer.toString(countNodes));\n }", "int getAoisCount();", "int getNumItems();", "public int numItemInList() {\n return nextindex - startIndex;\n }", "int nodeCount();", "public int getOutputPortOpenCount(int portNumber) { throw new RuntimeException(\"Stub!\"); }", "public int size() {\n return this.exploreList.size();\n }", "public int getNumEntries ()\n\t{\n\t\treturn entries.size ();\n\t}", "public Integer getPageCount();", "private static int getNumberSimple(NodeInfo node) {\n \n int fingerprint = node.getFingerprint();\n NodeTest same;\n \n if (fingerprint == -1) {\n same = NodeKindTest.makeNodeKindTest(node.getNodeKind());\n } else {\n same = new NameTest(node);\n }\n \n AxisIterator preceding = node.iterateAxis(Axis.PRECEDING_SIBLING, same);\n \n int i = 1;\n while (preceding.next() != null) {\n i++;\n }\n \n return i;\n }", "public int getTotalSPEntries() {\n\t\tList<SalePurchase> list = new ArrayList<>(salePurchaseEntries.values());\n\t\treturn list.size();\n\t}", "int getInCount();", "public int getCount() {\n return cp.getmImageIds(gridType).length;\n\n }", "public long numPostingEntries();", "public int getPortCount() throws SdpParseException {\n\t\treturn getNports();\n\t}", "public Integer getDayVisitCount() {\n return dayVisitCount;\n }", "org.apache.xmlbeans.XmlInteger xgetNumberOfInstallments();", "int getAcksCount();", "int getAcksCount();", "int getLinksCount();", "public int getCount() {\n\t\treturn Dispatch.get(object, \"Count\").getInt();\n\t}", "int getJarCount();", "int getNodesCount();", "int getNodesCount();", "@Override\n\tpublic int countIndex() {\n\t\treturn logoMapper.selectCountLogo()+headbannerMapper.selecCountHB()+succefulMapper.selecCountSucc()+solutionMapper.selecCountSolu();\n\t}", "@java.lang.Override\n public int getOutputsCount() {\n return instance.getOutputsCount();\n }", "public int getCount() \r\n\t{\r\n\t\tSystem.out.print(\"The number of book in the Array is \");\r\n\t\treturn numItems;\r\n\t\t\r\n\t}", "public abstract void countLaunchingActivities(int num);", "public int getCount() {\n return definition.getInteger(COUNT, 1);\n }", "int getDeliveriesCount();" ]
[ "0.5859007", "0.5376692", "0.53682137", "0.5350829", "0.52975374", "0.5247955", "0.5247955", "0.52352947", "0.52352947", "0.52352947", "0.52288425", "0.52288425", "0.52288425", "0.5213374", "0.51849073", "0.51849073", "0.51849073", "0.5174261", "0.5165307", "0.51498234", "0.5120798", "0.5108026", "0.51008576", "0.50939715", "0.5090062", "0.5087315", "0.5087315", "0.5087315", "0.5087315", "0.5087315", "0.50871736", "0.50681704", "0.5066879", "0.5066791", "0.5059773", "0.50564826", "0.5049683", "0.5049278", "0.50491256", "0.50477296", "0.50422543", "0.50422543", "0.5040886", "0.5030554", "0.5028986", "0.5000704", "0.49988365", "0.4997497", "0.4995599", "0.49920624", "0.49920624", "0.4986382", "0.49862248", "0.49853107", "0.4984102", "0.49802458", "0.49777985", "0.49761075", "0.49756965", "0.49700567", "0.49674442", "0.49670658", "0.4965755", "0.49639714", "0.49639714", "0.49576062", "0.4956035", "0.49545932", "0.49472487", "0.49379677", "0.49176583", "0.49150917", "0.491402", "0.4905429", "0.4901049", "0.48931357", "0.48931235", "0.48875663", "0.48871028", "0.48743436", "0.48739845", "0.48689646", "0.48686495", "0.4865363", "0.48611522", "0.48553526", "0.48548636", "0.4849328", "0.4849328", "0.48485768", "0.4848568", "0.484802", "0.4846695", "0.4846695", "0.48447576", "0.4842374", "0.48407936", "0.4839318", "0.48378938", "0.48333174" ]
0.6472967
0
Method to return an Iterator over all ImmutableExports on specified NodeInst.
public Iterator<ImmutableExport> getExports(int originalNodeId) { int startIndex = searchExportByOriginalPort(originalNodeId, 0); int j = startIndex; for (; j < exportIndexByOriginalPort.length; j++) { ImmutableExport e = exportIndexByOriginalPort[j]; if (e.originalNodeId != originalNodeId) break; } return ArrayIterator.iterator(exportIndexByOriginalPort, startIndex, j); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Collection<IExport> getOcilExports(IScapContext ctx) throws OcilException {\r\n \tMap<String, List<String>> qMap = new HashMap<String, List<String>>();\r\n \tMap<String, Variables> vMap = new HashMap<String, Variables>();\r\n \tfor (RuleType rule : ctx.getSelectedRules()) {\r\n \t if (rule.isSetCheck()) {\r\n \t\tfor (CheckType check : rule.getCheck()) {\r\n \t\t addExports(check, ctx, qMap, vMap);\r\n \t\t}\r\n \t } else if (rule.isSetComplexCheck()) {\r\n \t\taddExports(rule.getComplexCheck(), ctx, qMap, vMap);\r\n \t }\r\n \t}\r\n \r\n \t//\r\n \t// Export variables and OCIL XML for each HREF in the context.\r\n \t//\r\n \tCollection<IExport> results = new ArrayList<IExport>();\r\n \tfor (Map.Entry<String, List<String>> entry : qMap.entrySet()) {\r\n \t String href = entry.getKey();\r\n \t try {\r\n \t\tIChecklist checklist = ctx.getOcil(href);\r\n \t\tIVariables vars = vMap.get(href);\r\n \t\tresults.add(new OcilExport(href, checklist, entry.getValue(), vars));\r\n \t } catch (NoSuchElementException e) {\r\n \t\tthrow new OcilException(e);\r\n \t }\r\n \t}\r\n \treturn results;\r\n }", "public OpIterator iterator() {\n // some code goes here\n // throw new\n // UnsupportedOperationException(\"please implement me for lab2\");\n return new InterAggrIterator();\n }", "public boolean hasExports(ImmutableNodeInst originalNode) {\n int startIndex = searchExportByOriginalPort(originalNode.nodeId, 0);\n if (startIndex >= exportIndexByOriginalPort.length) return false;\n ImmutableExport e = exportIndexByOriginalPort[startIndex];\n return e.originalNodeId == originalNode.nodeId;\n }", "public Iterator<I> getReservables(){\n IterI iter = new IterI();\n return iter;\n }", "public UnmodifiableIterator<Entry<K, V>> iterator() {\n return mo8403b().iterator();\n }", "@JsonProperty(\"exports\")\n public List<ExportBase> getExports() {\n return exports;\n }", "@Override\n public Set<ModuleReference> findAll() {\n while (hasNextEntry()) {\n scanNextEntry();\n }\n return cachedModules.values().stream().collect(Collectors.toSet());\n }", "@Override\n public Iterator<Node<E>> iterator() {\n return new ArrayList<Node<E>>(graphNodes.values()).iterator();\n }", "public Iterator<? extends ICodeBase> appCodeBaseIterator();", "public final Iterator<CodeFragmentList> getDefinitionIterator()\n {\n IteratorList iterList = new IteratorList();\n\n Model.addDefinitionIterators(iterList, getTopLevelInitializerIterator());\n\n Iterator iter = statefulEventInitializers.iterator();\n while (iter.hasNext())\n {\n iterList.add(((Initializer)iter.next()).getDefinitionsIterator());\n }\n \n iterList.add(root.getSubDefinitionsIterator());\n \n if (getVersion() >= 4)\n \titerList.add(statesModel.getSubDefinitionIterators());\n\n return iterList.toIterator();\n }", "@Override\n public Stream<ImList<String>> export() {\n return map.entrySet().stream().flatMap(me -> {\n final ImList<String> key = me.getKey().export();\n return me.getValue().stream().map(cal -> key.append(cal.export()));\n });\n }", "public Set getExports(Resource referenced) {\n \n \t\tMap exportsMap = getExportsMap(referenced);\n \n \t\tif (exportsMap != null) {\n \t\t\treturn Collections.unmodifiableSet(exportsMap.keySet());\n \t\t} else {\n \t\t\treturn Collections.EMPTY_SET;\n \t\t}\n \t}", "public UnmodifiableIterator<K> iterator() {\n return mo8403b().iterator();\n }", "@Override public java.util.Iterator<Function> iterator() {return new JavaIterator(begin(), end()); }", "public Iterator<LayoutNode> nodeIterator() {\n\treturn nodeList.iterator();\n }", "public Iterator iterator() {\n\n return new EnumerationIterator(elements.keys());\n }", "public Iterator<MaterialType> iterator() {\n\t\treload();\n\t\treturn new IteratorImpl(); \n\t}", "public Iterator iterator()\r\n {\r\n if (!cache.initialized()) \r\n throw new IllegalStateException(Cache.NOT_INITIALIZED);\r\n\r\n try\r\n {\r\n return new CompositeIterator(new Iterator[] { \r\n spaceMgr.makeComponentSpaceIterator(),\r\n spaceMgr.makeHistorySpaceIterator() });\r\n }\r\n catch (RuntimeException e)\r\n {\r\n e.printStackTrace();\r\n throw e;\r\n }\r\n }", "public Iterator<T> iterator() {\r\n return byGenerations();\r\n }", "public ASTNodeIterator iterator() {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = name;\n return I;\n }", "public Iterator<E> elementIterator() {\n return new EnumMultiset<E>.Itr<E>() {\n /* access modifiers changed from: package-private */\n public E output(int i) {\n return EnumMultiset.this.enumConstants[i];\n }\n };\n }", "IteratorExp createIteratorExp();", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllLicensee_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), LICENSEE);\r\n\t}", "@Override\n public Iterator<T> iterator() {\n return new IteratorTree(this.root, this.modCount);\n }", "private static Stream<?> all(Iterator<Object> i) {\n requireNonNull(i);\n final Iterable<Object> it = () -> i;\n return StreamSupport.stream(it.spliterator(), false);\n }", "public Iterable<MapElement> elements() {\n return new MapIterator() {\n\n @Override\n public MapElement next() {\n return findNext(true);\n }\n \n };\n }", "private Iterator getEntries(){\r\n\t\tSet entries = items.entrySet();\r\n\t\treturn entries.iterator();\r\n\t}", "public Iterator<ArchiveEntry> getEnumerator ()\n\t{\n\t\treturn entries.values ().iterator ();\n\t}", "public Iterator iterator()\r\n {\r\n return new IteratorImpl( this, home() );\r\n }", "Map<String, FileModule> getSymbolMap() {\n Map<String, FileModule> out = new LinkedHashMap<>();\n for (FileModule module : fileToModule.values()) {\n for (String symbol : module.importedNamespacesToSymbols.keySet()) {\n out.put(symbol, module);\n }\n }\n return out;\n }", "public Iterable<IAtom> atoms() {\n return new Iterable<IAtom>() {\n \tpublic Iterator<IAtom> iterator() {\n \t\treturn new AtomsIterator();\n \t}\n };\n }", "Iterable<CtElement> asIterable();", "public Iterator<? extends ICodeBase> auxCodeBaseIterator();", "<C, PM> IteratorExp<C, PM> createIteratorExp();", "public ASTNodeIterator iterator()\n {\n ASTNodeIterator I = new ASTNodeIterator(1);\n I.children[0] = expression;\n return I;\n }", "Iterator<Entry<String, Var>> getIterator() {\n\t\treturn iter;\n\t}", "@Debug.Renderer(text = \"getClass().getName() + \\\":\\\" + getDebugName()\")\[email protected]\[email protected]\npublic interface IndexableFilesIterator {\n\n /**\n * Presentable name that can be shown in logs and used for debugging purposes.\n */\n @NonNls\n String getDebugName();\n\n /**\n * Presentable text shown in progress indicator during indexing of files of this provider.\n */\n @NlsContexts.ProgressText\n String getIndexingProgressText();\n\n /**\n * Presentable text shown in progress indicator during traversing of files of this provider.\n */\n @NlsContexts.ProgressText\n String getRootsScanningProgressText();\n\n /**\n * Iterates through all files and directories corresponding to this provider.\n * <br />\n * The {@param visitedFileSet} is used to store positive {@link VirtualFileWithId#getId()} of Virtual Files,\n * the implementation is free to skip other {@link VirtualFile} implementations and\n * non-positive {@link VirtualFileWithId#getId()}.\n * The {@param visitedFileSet} is used to implement filtering to skip already visited files by looking to [visitedFileSet].\n * <br />\n * The {@param fileIterator} should be invoked on every new file (with respect to {@oaram visitedFileSet},\n * should the {@link ContentIterator#processFile(VirtualFile)} returns false, the processing should be\n * stopped and the {@code false} should be returned from the method.\n *\n * @return `false` if [fileIterator] has stopped iteration by returning `false`, `true` otherwise.\n */\n boolean iterateFiles(@NotNull Project project,\n @NotNull ContentIterator fileIterator,\n @NotNull ConcurrentBitSet visitedFileSet);\n}", "Iterator<IntFloatEntry> iterator();", "public InstructionIterator getInstructions(Address addr, boolean forward);", "boolean hasExports() {\n return !exportedNamespacesToSymbols.isEmpty();\n }", "public Iterator getPortTypes() {\r\n\t\treturn portTypes == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(portTypes.values());\r\n\t}", "public Iterator<Activity> getActivitiesIterator(){\n\t\treturn activities.iterator();\n\t}", "Iterable<? extends XomNode> elements();", "public DTMIterator asNodeIterator() {\n/* 231 */ return new RTFIterator(this.m_dtmRoot, this.m_DTMXRTreeFrag.getXPathContext().getDTMManager());\n/* */ }", "public ListIterator<T> getAllByColumnsIterator() {\n\t\tAllByColumnsIterator it = new AllByColumnsIterator();\n\t\treturn it;\n\t}", "public synchronized Iterator<E> iterator()\n {\n return iteratorUpAll();\n }", "public Iterator<Type> iterator();", "@Override\n\tpublic Iterator<Statement> iterator() {\n\t\treturn iterator(null, null, null);\n\t}", "public Iterator<IPessoa> getAtores();", "public Iterator nodeIterator() { return nodes.keySet().iterator(); }", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllComposer_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), COMPOSER);\r\n\t}", "public static Iterator <Gate> iterator() {\n return allGates.iterator();\n }", "private Map getExportsMap(Resource resource) {\n \t\treturn (Map) exports.get(resource);\n \t}", "public Iterable<M> iterateAll();", "public static Iterable<Node> iterableOf(@Nonnull final NamedNodeMap namedNodeMap) {\n\t\treturn () -> new NamedNodeMapIterator(namedNodeMap);\n\t}", "public FunctionIterator getExternalFunctions();", "public Iterator getIterator() {\n return myElements.iterator();\n }", "public Iterator<Item> iterator(){\n return new Iterator<Item>(); //Iterator interface implementation instance(has all Iterator methods)\n }", "public Iterator<E> iterator(){\r\n return new IteratorHelper();\r\n }", "Iterable<String> getModuleNames();", "public ImmutableMap<String, Object> getExportedGlobals() {\n ImmutableMap.Builder<String, Object> result = new ImmutableMap.Builder<>();\n for (Map.Entry<String, Object> entry : globals.entrySet()) {\n if (exportedGlobals.contains(entry.getKey())) {\n result.put(entry);\n }\n }\n return result.build();\n }", "void doExportProcess(Iterator it, DestFileWriter writer) {\n\t\tString express = (String) it.next();\n\t\tString[] key_value = this.parser.parseExpress(express);\n\t\tif(key_value!=null)\n\t\t{\n\t\t\tContextManager context = ContextManager.getContext();\n\t\t\tcontext.addDefineGlobalValue(key_value[0], key_value[1]);\n\t\t}\n\t}", "@Override\n @ApiStatus.Experimental\n public final @NotNull Iterator<@Nullable T> iterator() {\n List<T> result = cachedExtensions;\n return result == null ? createIterator() : result.iterator();\n }", "public IterI(){\n }", "public Iterator getPorts() throws ServiceException {\n\t\treturn null;\n\t}", "Iterator actionListeners();", "public ReadOnlyIterator<Statement> getAllStatements();", "@Override\n public Iterator<T> iterator() {\n return new UsedNodesIterator<>(this);\n }", "public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}", "public Iterator<Node> getNodeIter() {\n\t\treturn nodes.iterator();\n\t}", "Iterable<T> getFunctions();", "public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllLicensee_asNode(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.getAll_asNode(model, instanceResource, LICENSEE);\r\n\t}", "public Iterable<Key> iterator() {\n Queue<Key> queue = new LinkedList<>();\n inorder(root, queue);\n return queue;\n }", "public Iterator<Entry> iterator() {\n return new ArrayIterator<Entry>(fEntries);\n }", "public static java.util.Enumeration enumerate() {\n return _memberTable.elements();\n }", "public ImmutableList<ActionInput> getOutputs() {\n return outputs;\n }", "public XmlSerializableModuleList() {\n modules = new ArrayList<>();\n }", "public DoublyLinkedListIterator<T> dllIterator() {\n return new DLLIterator();\n }", "public Iterator<T> iterator() {\n\t\treturn new ReferentIterator();\n\t}", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllInterpretedBy_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), INTERPRETEDBY);\r\n\t}", "public Iterator<E> iterator();", "public Iterator<E> iterator();", "public Iterator<E> iterator();", "public /*@ non_null @*/ JMLIterator<E> iterator() {\n return new JMLEnumerationToIterator<E>(elements());\n }", "public Iterator<ElementType> iterator(){\n return new InnerIterator();\n }", "public Iterator ids () {\n\t\topen();\n\t\treturn new Iterator () {\n\t\t\tLong id = new Long(-blockSize), nextId;\n\t\t\tboolean removeable = false;\n\n\t\t\tpublic boolean hasNext () {\n\t\t\t\ttry {\n\t\t\t\t\tfor (removeable = false; !isUsed(nextId = new Long(id.longValue()+blockSize)); id = nextId)\n\t\t\t\t\t\tif (nextId.longValue()+blockSize>container.length())\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tcatch (IOException ie) {\n\t\t\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic Object next () throws NoSuchElementException {\n\t\t\t\tif (!hasNext())\n\t\t\t\t\tthrow new NoSuchElementException();\n\t\t\t\tremoveable = true;\n\t\t\t\treturn id = nextId;\n\t\t\t}\n\n\t\t\tpublic void remove () throws IllegalStateException {\n\t\t\t\tif (!removeable)\n\t\t\t\t\tthrow new IllegalStateException();\n\t\t\t\tBlockFileContainer.this.remove(id);\n\t\t\t\tremoveable = false;\n\t\t\t}\n\t\t};\n\t}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 511,\n FQN=\"llvm::Module::getIFuncList\", NM=\"_ZN4llvm6Module12getIFuncListEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZN4llvm6Module12getIFuncListEv\")\n //</editor-fold>\n public SymbolTableList<GlobalIFunc, Module> /*&*/ getIFuncList() {\n return IFuncList;\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 509,\n FQN=\"llvm::Module::getIFuncList\", NM=\"_ZNK4llvm6Module12getIFuncListEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module12getIFuncListEv\")\n //</editor-fold>\n public /*const*/ SymbolTableList<GlobalIFunc, Module> /*&*/ getIFuncList$Const() /*const*/ {\n return IFuncList;\n }", "@VisibleForTesting\n public Iterator<Entry<ClientRequest, CacheEntry>> iterator() {\n return map.entrySet().iterator();\n }", "public Iterator<Integer> neighbors(int i)\n {\n return adjList[i].iterator();\n }", "public Iterator<Sheet> iterator() {\n\t\treturn null;\n\t}", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllEncodedBy_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), ENCODEDBY);\r\n\t}", "public Iterator <item_t> iterator () {\n return new itor ();\n }", "@Test\n @TraitRequirement(StoreTrait.VISIBILITY)\n public void shouldHaveConsistentIteratorWithVisibilityAndNoAggregation() throws Exception {\n final Graph noAggregationGraph = createGraphVisibilityNoAggregation();\n\n final Entity testEntity = new Entity(TestGroups.ENTITY, \"A\");\n\n noAggregationGraph.execute(new AddElements.Builder()\n .input(testEntity)\n .build(), getUser());\n\n // When\n final Iterable<? extends Element> elementsIterator = noAggregationGraph.execute(new GetElements.Builder()\n .input(new EntitySeed(\"A\"))\n .view(new View.Builder()\n .entity(TestGroups.ENTITY)\n .build())\n .build(), getUser());\n\n final Entity expectedEntity = testEntity;\n expectedEntity.putProperty(TestTypes.VISIBILITY, \"\");\n\n // Then\n // Create a new iterator that should have 1 result, A\n final Iterator<? extends Element> firstIt = elementsIterator.iterator();\n assertThat(firstIt.hasNext()).isTrue();\n assertThat(firstIt.next()).isEqualTo(expectedEntity);\n // Check that a new iterator still has a result and the first GetElements did not change any data\n final Iterator<? extends Element> secondIt = elementsIterator.iterator();\n assertThat(secondIt.hasNext()).isTrue();\n assertThat(secondIt.next()).isEqualTo(expectedEntity);\n }", "@Override\n public Iterator<T> impNiveles(){\n return (super.impNiveles());\n }", "public Iterator iterator() {\n\t\treturn new IteratorLinkedList<T>(cabeza);\r\n\t}", "public Iterator<Multiset.Entry<E>> entryIterator() {\n return new EnumMultiset<E>.Itr<Multiset.Entry<E>>() {\n /* access modifiers changed from: package-private */\n public Multiset.Entry<E> output(final int i) {\n return new Multisets.AbstractEntry<E>() {\n public E getElement() {\n return EnumMultiset.this.enumConstants[i];\n }\n\n public int getCount() {\n return EnumMultiset.this.counts[i];\n }\n };\n }\n };\n }", "public Iterator<V> iterator()\n {\n return new Iterator<V>()\n {\n public boolean hasNext()\n {\n // STUB\n return false;\n } // hasNext()\n\n public V next()\n {\n // STUB\n return null;\n } // next()\n\n public void remove()\n throws UnsupportedOperationException\n {\n throw new UnsupportedOperationException();\n } // remove()\n }; // new Iterator<V>\n }", "public Iterator<Item> iterator() {\n return new AIterator();\n }", "public Iterator iterator()\n {\n return new HashSetIterator();\n }" ]
[ "0.5279234", "0.52001435", "0.5139005", "0.50596637", "0.5051516", "0.5044035", "0.49290922", "0.49261805", "0.49109972", "0.48953116", "0.4884042", "0.4869719", "0.4868857", "0.4824509", "0.4812233", "0.48099697", "0.4789008", "0.47830722", "0.47729093", "0.474356", "0.4743028", "0.47417626", "0.47408715", "0.47256118", "0.4719212", "0.47102535", "0.4707447", "0.46870798", "0.46795636", "0.46585798", "0.4642983", "0.46326584", "0.46107337", "0.45809543", "0.45712513", "0.45548874", "0.4549535", "0.4544872", "0.4536745", "0.45341522", "0.45326984", "0.453266", "0.45111984", "0.45095572", "0.45057577", "0.45038247", "0.4501087", "0.4500227", "0.44999012", "0.44989637", "0.44983876", "0.4487717", "0.44819728", "0.4478383", "0.44728333", "0.44682854", "0.44486278", "0.44448578", "0.44362485", "0.4435237", "0.44311643", "0.4426567", "0.44203937", "0.4419346", "0.44137627", "0.4410006", "0.43960938", "0.43952143", "0.43933842", "0.43913582", "0.4391229", "0.43901518", "0.4383699", "0.4383355", "0.43821654", "0.43788603", "0.43694657", "0.43477282", "0.43471918", "0.43470958", "0.43402973", "0.43402973", "0.43402973", "0.43402466", "0.43350253", "0.43346378", "0.43287086", "0.43225223", "0.43161893", "0.43148226", "0.4311663", "0.43116277", "0.43111512", "0.4311143", "0.43097466", "0.43070877", "0.4307005", "0.43067312", "0.43060404", "0.43026438" ]
0.71114933
0
Method to determine whether the display of specified pin NodeInst should be supressed. In Schematics technologies, pins are not displayed if there are 1 or 2 connections, but are shown for 0 or 3 or more connections (called "Steiner points").
public boolean pinUseCount(ImmutableNodeInst pin) { int numConnections = getNumConnections(pin); if (numConnections > 2) return false; if (hasExports(pin)) return true; if (numConnections == 0) return false; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean needPIN() {\n return datafacade.getInt(\"pin\")!=-1;\n }", "boolean isHiddenNeuron();", "private boolean pptIsAvailable() {\n try {\n pinpoint = new pinpointInterface(true);\n } catch (NoConnectionException ex) {\n JOptionPane.showMessageDialog(RACApp.getApplication().getMainFrame(),\n \"No PIN Points were found.\\nPlease make sure it is plugged in and turned on.\",\n \"PIN POINT NOT FOUND\",\n JOptionPane.ERROR_MESSAGE);\n return false;\n } catch (Exception ex) {\n return false;\n }\n return true;\n }", "public boolean hasNi(int nodeKey) {\n return this.neighborEdges.get(nodeKey) != null ? true : false;\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n int inPin = Integer.parseInt(txtPin.getText());\n\n //Compares the input value with the set pin\n if(inPin == 6942){\n txtPin.setText(\"Pin Accepted\");\n txtPin.enable(false);\n btnPrint.setVisible(true);\n } else {\n txtPin.setText(\"\");\n JOptionPane.showMessageDialog(JOptionPane.getRootFrame(),\n \"Wrong pin number\",\n \"Wrong pin\",\n JOptionPane.WARNING_MESSAGE);\n }\n }", "public abstract boolean sjekkPIN(int pin);", "boolean isDisplay();", "boolean isDisplay();", "public boolean visible_SensConfig_NxtBtn() {\r\n\t\treturn IsElementVisibleStatus(SensorConfiguration_Btn);\r\n\t}", "void diplayNeighborPoints() {\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tif (point[i].position.dist(P) < 10) {\n\t\t\t\tmyParent.pushStyle();\n\t\t\t\tmyParent.fill(255, 255, 0);\n\t\t\t\tmyParent.text(i, point[i].x + 10, point[i].y + 5); // draw\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// selected\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// point\n\t\t\t\tmyParent.text(\"left neighbor\", point[neighbor(i)[0]].x, point[neighbor(i)[0]].y);\n\t\t\t\tmyParent.text(\"right neighbor\", point[neighbor(i)[1]].x, point[neighbor(i)[1]].y);\n\t\t\t\tmyParent.text(\"opposite\", point[neighbor(i)[2]].x, point[neighbor(i)[2]].y);\n\t\t\t\t// neighbor(int sourcePointId)\n\t\t\t\tmyParent.noFill();\n\t\t\t\tmyParent.popStyle();\n\t\t\t}\n\t\t}\n\n\t\tif (state == State.SCALE_PORPORTIONALLY_POINT || state == State.SCALE_FREE_POINT)\n\t\t\tdisplayLineBetweenCurrentAndOppositePoints();\n\t}", "@java.lang.Override\n public boolean hasNetwork() {\n return stepInfoCase_ == 17;\n }", "@java.lang.Override\n public boolean hasNetwork() {\n return stepInfoCase_ == 17;\n }", "public boolean verifyPin(int pinAttempt) {\r\n if (pinAttempt == pin) {\r\n return true;\r\n } else {\r\n System.out.println(\"Invalid Pin Entry\");\r\n return false;\r\n }\r\n }", "@java.lang.Override\n public boolean hasPokemonDisplay() {\n return pokemonDisplay_ != null;\n }", "boolean hasPokemonDisplay();", "public boolean hasNeighbours() {\n\t\tif (this.eltZero != null || this.eltOne != null || this.eltTwo != null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean isPinned();", "boolean hasNi(int node) {\n return this.neighbors.containsKey(node);\n }", "public boolean isConnectedPort() {\n for (Tile t : getTile().getSurroundingTiles(1)) {\n if (!t.isLand() && t.isHighSeasConnected()) return true;\n }\n return false;\n }", "private boolean shouldHideInCorner(GameInfo intel) {\n return intel.getNumPlayers() > 2;\n }", "public boolean okToDisplay() {\n return this.mDisplayId == 0 ? !this.mWmService.mDisplayFrozen && this.mWmService.mDisplayEnabled && this.mWmService.mPolicy.isScreenOn() : this.mDisplayInfo.state == 2;\n }", "public boolean checkNaturals() {\n return getSize() == 2 && handValue() == 21;\n }", "private boolean isDisplay(JPiereIADTabpanel tabPanel)\n {\n String logic = tabPanel.getDisplayLogic();\n if (logic != null && logic.length() > 0)\n {\n boolean display = Evaluator.evaluateLogic(tabPanel, logic);\n if (!display)\n {\n log.info(\"Not displayed - \" + logic);\n return false;\n }\n }\n return true;\n }", "public boolean isDisplayed_click_Digital_coupons_button(){\r\n\t\tif(click_Digital_coupons_button.isDisplayed()) { return true; } else { return false;} \r\n\t}", "private static void pins(final int pin, final String name) {\n assertEquals(pin, server.context.datas.pins(name));\n }", "public boolean provideGraphInfo() { return node_size == NodeSize.GRAPHINFO; }", "public static native int isPinSupported(int pin) throws RuntimeException;", "private boolean matchesPin(String pin) {\n String pin2 = getParentPin();\n return pin.equals(pin2);\n }", "public boolean isShowPathInfo(Object inNode)\n\t{\n\t\n\t\tObject container = inNode;\n\t\tif( getWebTree().getModel().isLeaf(container) )\n\t\t{\n\t\t\tcontainer = getWebTree().getModel().getParent(container);\n\t\t}\n\t\tif( hasBeenExpanded(container))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t//See if we are below the cut off. If we are below or equal then show the node (return true)\n\t\tif( fieldLastCutoffNode != null)\n\t\t{\n\t\t\tObject parent = inNode;\n\t\t\twhile( parent != null)\n\t\t\t{\n\t\t\t\tif( parent == fieldLastCutoffNode)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tparent = getWebTree().getModel().getParent(parent);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true; //Show it since it is not expanded\n\t}", "@Override\n public boolean showTips() {\n return mesoCfgXML.getTipsOption();\n }", "public boolean isUntrustedVirtualDisplay() {\n return this.mDisplay.getType() == 5 && this.mDisplay.getOwnerUid() != 1000;\n }", "public boolean accept(Packet pin) {\n if (pin instanceof IQ) {\n System.out.println(\"packet: \" + pin.toXML());\n IQ iq = (IQ) pin;\n if (iq.getType().equals(IQ.Type.SET)) {\n System.out.println(\"packet\");\n if (iq instanceof Jingle) {\n Jingle jin = (Jingle) pin;\n if (jin.getAction().equals(JingleActionEnum.SESSION_INITIATE)) {\n System.out.println(\"Session initiation packet accepted... \");\n return true;\n }\n }\n }\n }\n return false;\n }", "boolean hasBssid();", "boolean hasCustomInterest();", "public boolean hasPokemonDisplay() {\n return pokemonDisplayBuilder_ != null || pokemonDisplay_ != null;\n }", "boolean hasSsn();", "public boolean validatePin( String pin );", "boolean isInfoEnabled();", "boolean hasXconnect(ConnectPoint cp);", "public boolean sps() {\n\t\tupdateFrontUnknown();\n\t\tboolean successful = false;\n\t\tfor (int i = 0; i < frontUnknown.size(); i++) {\n\t\t\tint x = frontUnknown.get(i)[0];\n\t\t\tint y = frontUnknown.get(i)[1];\n\t\t\tArrayList<int[]> knownNeighbors = findAdjacentSafe(frontUnknown.get(i));\n\t\t\tfor (int[] j: knownNeighbors) {\n\t\t\t\t//all clear neighbours\n\t\t\t\tif (answerMap[j[0]][j[1]] == findAdjacentMark(j).size()) {\n\t\t\t\t\tprobe(x, y);\n\t\t\t\t\tsuccessful = true;\n\t\t\t\t\tSystem.out.println(\"SPS: probe[\" + x + \",\" + y + \"]\");\n\t\t\t\t\tspsCount++;\n\t\t\t\t\tshowMap();\n\t\t\t\t\ti--;\n\t\t\t\t\tupdateFrontUnknown();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//all marked neighbours\n\t\t\t\t\tif (answerMap[j[0]][j[1]] == findAdjacentRisk(j).size()) {\n\t\t\t\t\t\tmark(x, y);\n\t\t\t\t\t\tsuccessful = true;\n\t\t\t\t\t\tSystem.out.println(\"SPS: probe[\" + x + \",\" + y + \"]\");\n\t\t\t\t\t\tspsCount++;\n\t\t\t\t\t\tshowMap();\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tupdateFrontUnknown();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn successful;\n\t}", "@java.lang.Override\n public boolean hasDisplay() {\n return display_ != null;\n }", "@Override\n public int getPinState(){\n return 0;\n }", "boolean hasIcon();", "boolean hasIcon();", "public static void displayInfo(boolean displayInfo, Integer bBit, Integer n, ArrayList<Integer> nodes) {\r\n\t\tif (displayInfo) {\r\n\t\t\tif (nodes == null) {\r\n\t\t\t\tSystem.out.println(\"B-Bit = \" + bBit); \r\n\t\t\t\tSystem.out.println(\"Number of nodes = \" + n + \"\\n\");\r\n\t\t\t} else {\r\n \tSystem.out.println(\"Nodes created: \" + nodes);\r\n \tSystem.out.println(\"Size = \" + nodes.size() + \"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private boolean visible() {\r\n return NOT(GO() && CATS(Cc,Cn,Co,Cs,Zl,Zp)) && POINT();\r\n }", "boolean hasLiquidityIndicator();", "private boolean isAtStation(){\n\n if (this.selectedTrain.getGPS().getCurrBlock().getStationName() != null){return true; }\n else { return false; }\n }", "void visualize(TableLookupNetwork network, String title, int networkId) {\n\t\t// if (labelNetworks[networkId] != null && unlabelNetworks[networkId -\n\t\t// 1] != null) {\n\t\t// System.out.println(\"contains:\" + unlabelNetworks[networkId -\n\t\t// 1].contains(labelNetworks[networkId]));\n\t\t// }\n\t}", "private boolean isScanResultShowing() {\n return getFragmentManager().findFragmentById(R.id.fragment_container) instanceof ScanResultFragment;\n }", "boolean isInputNeuron();", "public boolean isInRange(Point testPt){\n\t\tfor(int i = 0; i < display.size();i++){\n\t\t\tif(testPt.x >= display.get(i).x && testPt.y >= display.get(i).y && testPt.x <= (display.get(i).x + display.get(i).width()) && testPt.y <= (display.get(i).y + display.get(i).height())){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isInfoEnabled();", "public void showPinToast(boolean enable) {\n \n }", "public boolean isNodePresent(int nd) {\n if ((nd >= (int) nodeVector.size() || (nodeVector.get(nd).getIndex() == invalid_node_index))) {\n return false;\n } else {\n return true;\n }\n }", "public boolean isDisplayed() {\n return graphConfig.isDisplayed();\n }", "public boolean isInvisible ( ) {\n\t\treturn extract ( handle -> handle.isInvisible ( ) );\n\t}", "public boolean isNotNullSupportsTipAdjust() {\n return genClient.cacheValueIsNotNull(CacheKey.supportsTipAdjust);\n }", "public boolean isGivingInformation();", "private boolean isInTwoPaneMode() {\n\t\t\n Log.i(TAG, \"DailySelfieMainActivity.isInTwoPaneMode entered\");\n\n\t\treturn findViewById(R.id.selfie_list) != null;\n\t}", "@Override\n public void printExistFigure() {\n if (!isRealFigure()) {\n System.out.println(\"Triangular prism is not exist\");\n } else {\n System.out.println(\"Triangular prism is exist\");\n }\n }", "public boolean containsNode(VisualNode node) {\r\n\r\n\t\tProbNode probNode = node.getProbNode();\r\n\r\n\t\treturn rectangleSelection.contains(probNode.getNode().getCoordinateX(), \r\n\t\t\t\tprobNode.getNode().getCoordinateY());\r\n\r\n\t}", "public boolean isTargetVisible() {\n return getDouble(\"tv\") == 1;\n }", "public abstract boolean isInCallingProcedure(SDGNode n);", "@Override\n\tpublic boolean getPinged() {\n\t\treturn true;\n\t}", "@Override\r\n\t\t\tpublic boolean isVisible() {\n\t\t\t\treturn (candidateId != 0);\r\n\t\t\t}", "@Override\n public boolean isIcon(){\n return super.isIcon() || speciallyIconified;\n }", "protected final boolean isShowing() {\n synchronized (getPeerTreeLock()) {\n if (isVisible()) {\n final LWContainerPeer<?, ?> container = getContainerPeer();\n return (container == null) || container.isShowing();\n }\n }\n return false;\n }", "boolean hasStartingInfo();", "boolean hasNeighbor(String descrip) {\n return this.neighbors.containsKey(descrip);\n }", "public boolean hasDisplay() {\n return displayBuilder_ != null || display_ != null;\n }", "public boolean select() {\n\n // The applet declines to be selected\n // if the pin is blocked.\n if ( pin.getTriesRemaining() == 0 )\n return false;\n\n return true;\n\n }", "boolean connected(String descrip) {\n if (this.hasNeighbor(descrip)) {\n if (descrip.equals(\"right\")) {\n return this.neighbors.get(\"right\").left && this.right;\n }\n else if (descrip.equals(\"up\")) {\n return this.neighbors.get(\"up\").down && this.up;\n }\n else if (descrip.equals(\"down\")) {\n return this.neighbors.get(\"down\").up && this.down;\n }\n else if (descrip.equals(\"left\")) {\n return this.neighbors.get(\"left\").right && this.left;\n }\n else {\n return false;\n }\n }\n else {\n return false;\n }\n }", "boolean hasHasNodeSettings();", "public void setShowNodes(Boolean value) {\n showNodes = value;\n }", "boolean hasCoordInfo();", "boolean hasSsid();", "boolean hasBlockNumber();", "boolean hasBlockNumber();", "@Override\r\n\tpublic boolean ShowBalance(int customerid, int pin)\r\n\t\t\tthrows CustomerException {\n\t\treturn true;\r\n\t}", "boolean isCanSeeFriendlyInvisibles();", "boolean isBiasNeuron();", "public boolean isSetShowNarration()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(SHOWNARRATION$18) != null;\n }\n }", "@Override\r\n\tpublic boolean isNodeValid() {\n\t\treturn (SKILLS.HITPOINTS.getActualLevel() >= 25\r\n\t\t\t\t&& SKILLS.THIEVING.getActualLevel() >= 28\r\n\t\t\t\t&& Inventory.getCount(\"Coins\") >= 30 && (Location.karamjaFirstStepCheck.atLocation(Player.getPosition()) ||Location.karamjaBoatLandTile.equals(Player.getPosition()) ));\r\n\t}", "public boolean phonedisplayed() throws Exception{\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(phone);\r\n\t\t\t\tflag = element.isDisplayed();\r\n\t\t\t\tAssert.assertTrue(flag, \"Phone Number is not dispalyed and enabled\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Phone Number NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn flag;\r\n\t\t}", "public boolean isHidden() {\n\tLogWriter.logMessage(LogWriter.TRACE_DEBUG,\"isHidden()\");\n Via via=(Via)sipHeader;\n return via.isHidden();\n }", "private boolean connectNAT() {\n\t\tint mapUpdateInterval = BuildConfig.PEER_MAP_UPDATE_INTERVAL;\n\t\tString mapUpdateIntervalString = prefs.getString(context.getString(R.string.pref_map_update_interval_key), String.valueOf(mapUpdateInterval));\n\t\ttry {\n\t\t\tmapUpdateInterval = Integer.valueOf(mapUpdateIntervalString);\n\t\t\tLOG.debug(\"Use configured map update interval of {}s\", mapUpdateInterval);\n\t\t} catch (NumberFormatException e) {\n\t\t\tLOG.warn(\"Cannot parse the invalid map update interval string '{}'. Use default value {}s\", mapUpdateIntervalString, mapUpdateInterval);\n\t\t}\n\n\t\tRelayClientConfig config;\n\t\tswitch (relayMode) {\n\t\t\tcase FULL:\n\t\t\t\t// don't set up any NAT\n\t\t\t\tLOG.warn(\"Don't use relay functionality. Make sure to not be behind a firewall!\");\n\t\t\t\treturn true;\n\t\t\tcase GCM:\n\t\t\t\tconfig = new AndroidRelayClientConfig(registrationId, mapUpdateInterval).manualRelays(boostrapAddresses);\n\t\t\t\tbreak;\n\t\t\tcase TCP:\n\t\t\t\tconfig = new TCPRelayClientConfig().manualRelays(boostrapAddresses).peerMapUpdateInterval(mapUpdateInterval);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tLOG.debug(\"Invalid relay mode {}\", relayMode);\n\t\t\t\treturn false;\n\t\t}\n\t\tLOG.debug(\"Use {} as relay type. Map updateView interval is {}s\", relayMode, mapUpdateInterval);\n\n\t\tPeerNAT peerNat = new PeerBuilderNAT(h2hNode.getPeer().peer()).start();\n\t\tFutureRelayNAT futureRelayNAT = peerNat.startRelay(config, boostrapAddresses.iterator().next()).awaitUninterruptibly();\n\t\tif (futureRelayNAT.isSuccess()) {\n\t\t\tLOG.debug(\"Successfully connected to Relay.\");\n\t\t\tbufferListener = futureRelayNAT.bufferRequestListener();\n\t\t\treturn true;\n\t\t} else {\n\t\t\tLOG.error(\"Cannot connect to Relay. Reason: {}\", futureRelayNAT.failedReason());\n\t\t\treturn false;\n\t\t}\n\t}", "public Boolean getVpnForDisplay() {\n return vpnForDisplay;\n }", "boolean hasNodeCharacteristicId();", "boolean hasNodeCharacteristicId();", "public void setShowDisplaySlotPanel(boolean b) {\r\n\r\n }", "@Override\n public String toString() {\n return \"Pin{\" +\n// \"connections=\" + connections +\n \"type=\" + type +\n '}';\n }", "boolean hasIsCentralNode();", "public boolean isMouseOnSat(int n, int n2) {\n void y;\n void x;\n return x > this.getX() + 2 && x < this.getX() + 2 + this.getWidth() - 4 && y > this.getY() + 29 && y < this.getY() + 40;\n }", "public boolean getShowNarration()\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(SHOWNARRATION$18);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(SHOWNARRATION$18);\n }\n if (target == null)\n {\n return false;\n }\n return target.getBooleanValue();\n }\n }", "boolean isInview();", "public boolean isN(int X, int Y, int x, int y){\n if(X - x < 2 && X - x> -2 && Y - y < 2 && Y - y> -2 && mines[x][y]==1){//tuk proverqvame dali razlikite na koordinatite na dvete sravnqvani kutii sa v definicionntata oblast(-1;1),zashtoto ako sa s razlika v tova dm znachi che se dopirat (shte go obqsnq po dobre irl)\r\n return true;\r\n }\r\n return false;\r\n }", "boolean hasHasNodeID();", "public boolean getHintsEnabled() {\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n return prefs.getBoolean(\"hints_switch\", true);\n }", "public static boolean isPrint(Node n) {\n\n if (n.getNode(0).getName() == \"SelectionExpression\") {\n if (n.getNode(0).getNode(0).getName() == \"PrimaryIdentifier\") {\n if (n.getNode(0).getNode(0).getString(0).equals(\"System\")) {\n return true;\n }\n }\n }\n return false;\n }" ]
[ "0.55261517", "0.54281145", "0.5380783", "0.53595173", "0.53364456", "0.53278255", "0.52071005", "0.52071005", "0.516322", "0.5147615", "0.5144493", "0.5118257", "0.51040375", "0.50860053", "0.50630313", "0.50494504", "0.5031759", "0.50069493", "0.5006054", "0.49805802", "0.49770433", "0.49514803", "0.49447355", "0.492046", "0.49171236", "0.48857868", "0.48702484", "0.486717", "0.486659", "0.4860532", "0.485735", "0.48546088", "0.48530027", "0.48505795", "0.48421064", "0.48379096", "0.48336196", "0.48332053", "0.4829145", "0.4828642", "0.48116073", "0.48100638", "0.47869563", "0.47869563", "0.4779518", "0.47685114", "0.476211", "0.47476906", "0.473432", "0.47191927", "0.47171164", "0.47030887", "0.4699164", "0.4698165", "0.46899655", "0.46809268", "0.46808702", "0.46725348", "0.46719494", "0.46696338", "0.4665634", "0.46647882", "0.46635044", "0.46629128", "0.4662544", "0.46579158", "0.4646086", "0.463875", "0.46294838", "0.4621255", "0.4617192", "0.4612794", "0.46126786", "0.46114895", "0.46093568", "0.4608343", "0.46003392", "0.45966786", "0.45966786", "0.45965725", "0.45961243", "0.45917705", "0.45908117", "0.45848197", "0.45811334", "0.45810607", "0.4579973", "0.45796275", "0.45792222", "0.45792222", "0.45769396", "0.4571363", "0.4566607", "0.45638224", "0.456182", "0.45557654", "0.455467", "0.45521164", "0.45294973", "0.45294634" ]
0.560923
0
Method to return a list of arcs connected to speciefed or all ports of specified ImmutableNodeInst.
public List<ImmutableArcInst> getConnections(BitSet headEnds, ImmutableNodeInst n, PortProtoId portId) { ArrayList<ImmutableArcInst> result = null; if (headEnds != null) headEnds.clear(); int myNodeId = n.nodeId; int chronIndex = 0; if (portId != null) { assert portId.parentId == n.protoId; chronIndex = portId.chronIndex; } int i = searchConnectionByPort(myNodeId, chronIndex); int j = i; for (; j < connections.length; j++) { int con = connections[j]; ImmutableArcInst a = getArcs().get(con >>> 1); boolean end = (con & 1) != 0; int nodeId = end ? a.headNodeId : a.tailNodeId; if (nodeId != myNodeId) break; if (portId != null) { PortProtoId endProtoId = end ? a.headPortId : a.tailPortId; if (endProtoId.getChronIndex() != chronIndex) break; } if (result == null) result = new ArrayList<ImmutableArcInst>(); if (headEnds != null && end) headEnds.set(result.size()); result.add(a); } return result != null ? result : Collections.<ImmutableArcInst>emptyList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Port> getPorts(ISchemaInfo info);", "public ArrayList<AStarNode> getConnections() {\n return connected;\n }", "List<IConnector> getConnectors();", "public Connector[] getConnectors() {\n Enumeration connectorsEnum = elements();\n Connector[] connectorsArray = new Connector[size()];\n for (int i = 0; i < size(); i++) {\n connectorsArray[i] = (Connector) connectorsEnum.nextElement();\n }\n return connectorsArray;\n }", "public List<NavArc> listIncoming() {\r\n List<NavArc> result = new ArrayList<>(incoming);\r\n return result;\r\n }", "Collection<TcpIpConnection> getConnections();", "Collection<TcpIpConnection> getActiveConnections();", "List<CommunicationLink> getAllNodes()\n {\n return new ArrayList<>(allNodes.values());\n }", "Set<Interface> getInterfacesByPort(ConnectPoint port);", "public List<INode> getAllNodes();", "public abstract List<AStarNode> getNeighbours();", "public void connectClusters()\n\t{\n//\t\tfor(int i = 0; i<edges.size();i++)\n//\t\t{\n//\t\t\tEdgeElement edge = edges.get(i);\n//\t\t\tString fromNodeID = edge.fromNodeID;\n//\t\t\tNodeElement fromNode = findSubNode(fromNodeID);\n//\t\t\tString toNodeID = edge.toNodeID;\n//\t\t\tNodeElement toNode = findSubNode(toNodeID); \n//\t\t\t\n//\t\t\tif(fromNode != null && toNode != null)\n//\t\t\t{\n//\t\t\t\tPortInfo oport = new PortInfo(edge, fromNode);\n//\t\t\t\tfromNode.addOutgoingPort(oport);\n//\t\t\t\tedge.addIncomingPort(oport);\n//\t\t\t\tPortInfo iport = new PortInfo(edge, toNode);\n//\t\t\t\ttoNode.addIncomingPort(iport);\n//\t\t\t\tedge.addOutgoingPort(iport);\n//\t\t\t}\n//\t\t}\n\t}", "@Override\n\tpublic synchronized Collection<Arc> getArcs() {\n\t\treturn this.arcs;\n\t}", "public List<arc> getIncomingLinks() {\r\n\t\treturn incoming;\r\n\t}", "java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionsList();", "List<AcHost> all() throws Throwable;", "List <Connector.Type> getConnectors();", "List<Uuid> getActivePeers() throws RemoteException;", "Collection<Node> allNodes();", "public IAtomContainer getConnectedAtomContainer() {\n \n IAtomContainer ac = new AtomContainer();\n if (atoms.size() != 0) {\n ac = atoms.get(0).getBuilder().newInstance(IAtomContainer.class);\n for (IAtom atom : atoms) {\n ac.addAtom(atom);\n }\n }\n \n for (IBond bond : bonds) {\n ac.addBond(bond);\n }\n \n return ac;\n }", "public List<Connection> getConnections(int fromNode) {\r\n\t\tList<Connection> list = new ArrayList<Connection>();\r\n\t\tif (connectionLists.containsKey(fromNode))\r\n\t\t\tlist = connectionLists.get(fromNode);\r\n\t\treturn list;\r\n\t}", "public void list() {\r\n\t\tfor (String key : nodeMap.keySet()) {\r\n\t\t\tNodeRef node = nodeMap.get(key);\r\n\t\t\tSystem.out.println(node.getIp() + \" : \" + node.getPort());\r\n\t\t}\t\t\r\n\t}", "public Set<Vec3i> cisConnections();", "public List<NavArc> listOutgoing() {\r\n List<NavArc> result = new ArrayList<>(outgoing);\r\n return result;\r\n }", "public ArrayList<Connector> getConnectors() {\n\t\treturn this.connectors;\n\t}", "protected abstract Node[] getAllNodes();", "public List<NetworkNode> listNetworkNode();", "public static org.davic.net.Locator[] listTransportStreams()\n {\n // TODO(Todd): This implementation currently assumes a single CABLE\n // transport.\n\n OcapLocator[] locators = null;\n try\n {\n // Get the transport\n TransportExt transport = (TransportExt) SIManager.createInstance().getTransports()[0];\n\n // Get all transport streams on the transport\n javax.tv.service.transport.TransportStream[] streams = transport.getTransportStreams();\n\n // Get the locator for each transport stream\n locators = new OcapLocator[streams.length];\n for (int i = 0; i < streams.length; i++)\n {\n int frequency = ((TransportStreamExt) streams[i]).getFrequency();\n int modFormat = ((TransportStreamExt) streams[i]).getModulationFormat();\n locators[i] = new OcapLocator(frequency, modFormat);\n }\n }\n catch (Exception e)\n {\n SystemEventUtil.logRecoverableError(e);\n }\n\n return locators;\n }", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllConductor_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), CONDUCTOR);\r\n\t}", "private Set<Node> getAllCardNodes() {\n return guiRobot.lookup(CARD_PANE_ID).queryAll();\n }", "public Iterator getPorts() throws ServiceException {\n\t\treturn null;\n\t}", "public DataStructure getPorts() {\r\n\t\treturn ports == null ? EmptyStructures.EMPTY_STRUCTURE : new ArrayList(ports.values());\r\n\t}", "List<CyNode> getNodeList();", "public Collection<Integer> getNeighbours(int i) {\n\t\n\tLinkable lble=(Linkable)Network.node[i].getProtocol(protocolID);\n\tArrayList<Integer> al = new ArrayList<Integer>(lble.degree());\n\tif( Network.node[i].isUp() )\n\t{\t\n\t\tfor(int j=0; j<lble.degree(); ++j)\n\t\t{\n\t\t\tfinal Node n = lble.getNeighbor(j);\n\t\t\t// if accessible, we include it\n\t\t\tif(n.isUp()) al.add(Integer.valueOf(n.getIndex()));\n\t\t}\n\t}\n\treturn Collections.unmodifiableList(al);\n}", "Set<MacAddress> neighbors();", "private void connectToAll() {\n for (AStarNode node : getNodes()) {\n node.resetConnection();\n for (AStarNode connect : getNodes()) {\n if (isValid(node, connect)) {\n node.connect(connect);\n }\n }\n }\n }", "public static int[] commonPortsList(){\n int [] portsArray = {20,21,22,23,25,53,80,139,443,445,1433,1434,3306,3389,8080};\n return portsArray;\n }", "public List<Airport> allAirports() {\n\t\ttry {\n\t\t\tList<Airport> airPosrtList = airPortCache.get(FlightConstants.AIRPORT_KEY);\n\t\t\treturn airPosrtList;\n\t\t} catch (Exception exception) {\n\t\t\tlogger.error(\"Exception occured while searching AirPorts {}\", exception);\n\t\t\tthrow new AirPortSearchException();\n\t\t}\n\t}", "public ReactorResult<Contact> getAllInternetRadioStationOwner_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), INTERNETRADIOSTATIONOWNER, Contact.class);\r\n\t}", "ArrayList<Edge> getAdjacencies();", "public int getNumConnections(ImmutableNodeInst n) {\n int myNodeId = n.nodeId;\n int i = searchConnectionByPort(myNodeId, 0);\n int j = i;\n for (; j < connections.length; j++) {\n int con = connections[j];\n ImmutableArcInst a = getArcs().get(con >>> 1);\n boolean end = (con & 1) != 0;\n int nodeId = end ? a.headNodeId : a.tailNodeId;\n if (nodeId != myNodeId) break;\n }\n return j - i;\n }", "List<IEdge> getAllEdges();", "private Color[] getExternalArcColors()\n {\n return getColorsForState(this.iconPartStates[0]);\n }", "public List<IEdge> getAllEdges();", "public Set<Integer> getActiveNeighbors() {\n HashSet<Integer> retSet = new HashSet<Integer>();\n\n for (AS tAS : this.providers) {\n retSet.add(tAS.getASN());\n }\n for (AS tAS : this.customers) {\n retSet.add(tAS.getASN());\n }\n for (AS tAS : this.peers) {\n retSet.add(tAS.getASN());\n }\n\n return retSet;\n }", "public Connections getConnections();", "@Override\n public List<Address> getInterfaceAddresses() {\n List<Address> output = new ArrayList<>();\n\n Enumeration<NetworkInterface> ifaces;\n try {\n ifaces = NetworkInterface.getNetworkInterfaces();\n } catch (SocketException e) {\n // If we could not retrieve the network interface list, we\n // probably can't bind to any interface addresses either.\n return Collections.emptyList();\n }\n\n for (NetworkInterface iface : Collections.list(ifaces)) {\n // List the addresses associated with each interface.\n Enumeration<InetAddress> addresses = iface.getInetAddresses();\n for (InetAddress address : Collections.list(addresses)) {\n try {\n // Make an address object from each interface address, and\n // add it to the output list.\n output.add(Address.make(\"zmq://\" + address.getHostAddress() + \":\" + port));\n } catch (MalformedAddressException ignored) {\n // Should not be reachable.\n }\n }\n }\n\n return output;\n }", "List<Node> getNodes();", "public ArrayList<InetAddress> getPeers() {\n\t\treturn new ArrayList<InetAddress>(peers.keySet());\n\t}", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode> \n getNodeList();", "@Override\n public Collection<? extends INode> getNodes() {\n\n return new LinkedList<>(Collections.unmodifiableCollection(this.nodeMap\n .values()));\n }", "protected ArrayList<AStarNode> getNodes() {\n return nodes;\n }", "io.netifi.proteus.admin.om.Connection getConnections(int index);", "public ArrayList<Connection> getConnections(){\n\t\treturn manager.getConnectionsWith(this);\n\t}", "public ArrayList<Connection> searchConnectionsByAtom(Atom currentAtom) {\n ArrayList<Connection> currentConnections = new ArrayList<>();\n for (int i = 0; i < connections.size(); i++) {\n if (connections.get(i).containsAtom(currentAtom)){\n currentConnections.add(connections.get(i));\n }\n }\n return currentConnections;\n }", "public Collection<MyNode> getNeighbors(){\r\n return new ArrayList<>(this.neighbors);\r\n }", "public List<ACL> build() {\n List<ACL> result = new ArrayList<>();\n if (world != null) {\n result.add(world);\n }\n if (auth != null) {\n result.add(auth);\n }\n for (Map<String, ACL> m : asList(digests, hosts, ips)) {\n if (m != null) {\n result.addAll(m.values());\n }\n }\n return result;\n }", "java.util.List<io.netifi.proteus.admin.om.Node> \n getNodesList();", "public ModelConnection[] getWiring( ICancellationMonitor monitor ){\n for( ModelConnection connection : getConnections() ){\n if( connection.getTags().contains( ASTModel.IMPLEMENTATION )){\n ModelNode implementation = getDeclarationResolver().resolve( connection, monitor.getProgressMonitor() );\n monitor.checkCancellation();\n if( implementation != null ){\n for( ModelConnection implementationConnection : implementation.getConnections() ){\n if( implementationConnection.getTags().contains( ASTModel.CONNECTIONS )){\n ModelNode connections = getDeclarationResolver().resolve( implementationConnection, monitor.getProgressMonitor() );\n monitor.checkCancellation();\n if( connections != null ){\n List<ModelConnection> result = new ArrayList<ModelConnection>();\n \n for( ModelConnection check : connections.getConnections() ){\n if( check.getTags().contains( Tag.CONNECTION )){\n result.add( check );\n }\n }\n \n return result.toArray( new ModelConnection[ result.size() ] );\n }\n }\n }\n }\n \n return new ModelConnection[]{};\n }\n }\n \n return new ModelConnection[]{};\n }", "List<ArtistActorConnection> getRequestActorConnections(\n String linkedIdentityPublicKey,\n Actors linkedIdentityActorType,\n String actorPublicKey) throws CantGetActorConnectionException;", "private Collection<Node> getCandidates(State state) {\n\t\treturn new ArrayList<Node>(Basic_ILS.graph.getNodes());\n\t}", "public Iterable<Arista> aristas() {\n Cola<Arista> mst = new Cola<Arista>();\n for (int v = 0; v < aristaHacia.length; v++) {\n Arista a = aristaHacia[v];\n if (a != null) {\n mst.entrarACola(a);\n }\n }\n return mst;\n }", "public List<Actor> getActors() {\n System.out.println(\"LENGTH:\"+actors.size());\n return actors;\n }", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllInterpretedBy_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), INTERPRETEDBY);\r\n\t}", "public NavArc[] copyIncoming() {\r\n NavArc[] result = new NavArc[incoming.size()];\r\n int i = 0;\r\n for (NavArc arc : incoming) {\r\n result[i] = arc;\r\n ++i;\r\n }\r\n\r\n return result;\r\n }", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllInternetRadioStationOwner_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), INTERNETRADIOSTATIONOWNER);\r\n\t}", "public List<Node> getNodes();", "ArrayList<Actor> getActors();", "java.util.List<entities.Torrent.NodeId>\n getNodesList();", "Set<Object> getAllCells() {\n Set<Object> ret = new HashSet<Object>();\n ret.addAll(getNodes());\n ret.addAll(getEdges());\n \n // ports\n for( DefaultGraphCell node : getNodes() ) {\n ret.add(node.getChildAt(0));\n }\n \n return ret;\n }", "public Iterable<IAtom> atoms() {\n return new Iterable<IAtom>() {\n \tpublic Iterator<IAtom> iterator() {\n \t\treturn new AtomsIterator();\n \t}\n };\n }", "public ReadOnlyIterator<Relation> getIncomingRelations(XDI3Segment arcXri);", "public List<arc> getOutcomingLinks() {\r\n\t\treturn outcoming;\r\n\t}", "public IAtom[] getConnectedAtoms(IAtom atom) {\n boolean atomIsInBond = false;\n for (IAtom localAtom : atoms) {\n if (localAtom == atom) {\n atomIsInBond = true;\n break;\n }\n }\n if (!atomIsInBond) return null;\n\n List<IAtom> conAtoms = new ArrayList<IAtom>();\n for (IAtom localAtom : atoms) {\n if (localAtom != atom) conAtoms.add(localAtom);\n }\n return conAtoms.toArray(new IAtom[]{}); \n }", "public Point[] getPorts() {\r\n return new Point[] { new Point((int) ports[0].getCenterX(), (int) ports[0].getCenterY()),\r\n new Point((int) ports[1].getCenterX(), (int) ports[1].getCenterY()),\r\n new Point((int) ports[2].getCenterX(), (int) ports[2].getCenterY()),\r\n new Point((int) ports[3].getCenterX(), (int) ports[3].getCenterY()) };\r\n }", "public List<Connection> getConnections() {\n\t\treturn new ArrayList<Connection>(connectionsByUri.values());\n\t}", "@Override\n\tpublic List<Arco> obtenerArcos() {\n\t\treturn arcos;\n\t}", "List<ManagedEndpoint> all();", "public ArrayList<Node> getNeighbors(){\n ArrayList<Node> result = new ArrayList<Node>();\n for(Edge edge: edges){\n result.add(edge.end());\n }\n return result;\n }", "public List neighbors(int vertex) {\n// your code here\n LinkedList<Integer> result = new LinkedList<>();\n LinkedList<Edge> list = adjLists[vertex];\n for (Edge a : list) {\n result.add(a.to());\n }\n//List<Integer> list = new List<Integer>();\n return result;\n }", "org.jacorb.imr.HostInfo[] list_hosts();", "@Override\n\tpublic Iterator<Arco<T>> obtenerArcos() {\n\t\tList arcos = new ArrayList<Arco<T>>();\n\t\tfor (Vertice v: listVertices){//agarro todos los arcos de todos los vertices\n\t\t\tarcos.add(v.getArcos());\n\t\t}\n \t\tIterator<Arco<T>> arcosIT = arcos.iterator();\n\t\treturn new IteradorArco(arcosIT);\n\t}", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Aois> getAoisList() {\n return aois_;\n }", "java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionList();", "Collection<NetworkInterface> getAllNetworkInterfaces();", "@Override\r\n\tpublic List<Aircraft> getAllAircraft() {\r\n\t\treturn airCrafts;\r\n\t}", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllEncodedBy_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), ENCODEDBY);\r\n\t}", "List<Node> nodes();", "@Override\n public abstract Collection<? extends GraphNode<N, E>> getNodes();", "public SortedSet<WServiceChain> getInOutOrTraversingServiceChains () { return n.getAssociatedRoutes(getNet().getIpLayer().getNe()).stream().map(ee->new WServiceChain(ee)).collect(Collectors.toCollection(TreeSet::new)); }", "List<State> adj() {\n\t\t\tList<State> adj = new ArrayList<State>();\n\t\t\tList<Edge> edgeList = edgeMap.get(city);\n\n\t\t\tfor (Edge e : edgeList) {\n\t\t\t\tboolean isPlane = e.cost == 0;\n\t\t\t\tif (ticketUsed == true && isPlane) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tint toCity = e.to;\n\t\t\t\tState s = new State(toCity, isPlane, dist + e.cost);\n\n\t\t\t\tadj.add(s);\n\t\t\t}\n\n\t\t\treturn adj;\n\t\t}", "public abstract Collection<Node> getAllSuccessors();", "public Map<UUID, IExecutorDescriptor> getConnectedExecutors() throws RemoteException;", "public ArrayList<Location> getAirports() {\n return locations.stream().filter(loc -> loc.getClass().getSuperclass().getSimpleName().equals(\"Airport\")).collect(Collectors.toCollection(ArrayList::new));\n }", "public Iterator<IPessoa> getAtores();", "Iterable<Airline> getAirlines();", "private List<Set<V>> findAllComponents(Graph<V, E> g, Set<V> F)\n {\n return new ConnectivityInspector<>(new AsSubgraph<>(g, F)).connectedSets();\n }", "public ArrayList<Location> getPublicAirports() {\n return getAirports().stream().filter(loc -> loc.getClass().getSimpleName().equals(\"PublicAirport\")).collect(Collectors.toCollection(ArrayList::new));\n }", "int[] getEdgesIncidentTo(int... nodes);", "public ReadOnlyIterator<Relation> getRelations(XDI3Segment arcXri);" ]
[ "0.58138746", "0.5647173", "0.5646988", "0.54925686", "0.53744674", "0.5321344", "0.5316164", "0.5308914", "0.52818114", "0.52760535", "0.5263024", "0.52400964", "0.5213639", "0.5191659", "0.51896405", "0.5183049", "0.5182887", "0.51749545", "0.5174787", "0.51138556", "0.50677866", "0.50545424", "0.504019", "0.5029604", "0.5023318", "0.5018836", "0.50135785", "0.499885", "0.49944708", "0.4977243", "0.4976473", "0.49762532", "0.49718195", "0.4970729", "0.4966428", "0.4954528", "0.4929793", "0.4927581", "0.49094236", "0.4898352", "0.4897653", "0.48967326", "0.4889919", "0.48896948", "0.48789102", "0.4852663", "0.48523405", "0.48477218", "0.48453996", "0.48417163", "0.4841651", "0.48394278", "0.48376715", "0.48356736", "0.4832988", "0.48266786", "0.48257205", "0.48222563", "0.4804477", "0.47935134", "0.47885913", "0.47645986", "0.47441068", "0.4742448", "0.47389135", "0.47379506", "0.4737716", "0.47268212", "0.47250447", "0.4724235", "0.47239032", "0.47201467", "0.47152922", "0.4714313", "0.47095516", "0.4703698", "0.4702954", "0.46943784", "0.46940345", "0.46938676", "0.4680498", "0.46787247", "0.46752977", "0.46692953", "0.4652222", "0.46486637", "0.4641238", "0.46408597", "0.46290356", "0.46228886", "0.462184", "0.46208754", "0.46194085", "0.4617613", "0.4615488", "0.46085098", "0.4608446", "0.460405", "0.4597743", "0.4594039" ]
0.6039666
0
Returns true of there are Connections on specified ImmutableNodeInst connected either to specified port or to all ports
public boolean hasConnections(ImmutableNodeInst n, PortProtoId portId) { int i = searchConnectionByPort(n.nodeId, 0); if (i >= connections.length) return false; int con = connections[i]; ImmutableArcInst a = getArcs().get(con >>> 1); boolean end = (con & 1) != 0; int nodeId = end ? a.headNodeId : a.tailNodeId; if (nodeId != n.nodeId) return false; return portId == null || portId == (end ? a.headPortId : a.tailPortId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean getOpenPorts() {\n // Declare variables\n Socket sock;\n InetSocketAddress isa;\n\n // Check if port range is valid\n if(mEndPort-mStartPort < 0 ) {\n return false;\n }\n else if(iStack.size() == 0){\n return false;\n }\n\n // Declare a 2D int array of size of the range of ports\n mPortsStatus = new int[iStack.size()][2];\n\n // Print scanning a continue to print dots as long as the scanning continues\n // so the user knows the program hasn't locked.\n System.out.print(\"\\r\\nScanning\");\n\n for (int i = 0; i < mPortsStatus.length; i++) {\n if(i % 5 == 0) {\n System.out.print(\".\");\n }\n\n // If we can connect to the socket, it's open. Mark that element in the array as\n // true. If there's an exception, it's closed, so mark it false.\n try {\n isa = new InetSocketAddress(mIP, iStack.peek());\n sock = new Socket();\n sock.connect(isa, mTimeout);\n sock.close();\n mPortsStatus[i][0] = iStack.pop();\n mPortsStatus[i][1] = 1;\n } catch (Exception ex) {\n mPortsStatus[i][0] = iStack.pop();\n mPortsStatus[i][1] = 0;\n }\n }\n\n // Everything went okay, so return true.\n return true;\n }", "private boolean initiateConnections(RegistrySendsNodeManifest event)\n\t\t\tthrows UnknownHostException, IOException {\n\t\t// close all getConnections() from previous overlay.\n\t\tfor (Map.Entry<Integer, TCPConnection> entry : this.nodesToSendTo.getConnections()\n\t\t\t\t.entrySet()) {\n\t\t\tTCPConnection connector = entry.getValue();\n\t\t\tconnector.closeSocket();\n\t\t}\n\t\t//Create sockets to peers\n\t\tallNodes = event.getAllNodes();\n\t\tint numConnectionsToMake = event.getRoutingTableSize();\n\t\tnodesToSendTo = new TCPConnectionsCache();\n\t\tfor (int i = 0; i < numConnectionsToMake; i++) {\n\t\t\tString ipAdd = \"\";\n\t\t\tfor (int j = 0; j < event.getIPLen(i); j++) {\n\t\t\t\tint ipPortion = event.getHopIP(i)[j] & 0xFF;\n\t\t\t\tipAdd += ipPortion;\n\t\t\t\tif (j < event.getIPLen(i) - 1)\n\t\t\t\t\tipAdd += \".\";\n\t\t\t}\n\t\t\tSocket hopSocket = new Socket(ipAdd, event.getHopPort(i));\n\t\t\tTCPConnection hop = new TCPConnection(hopSocket, this);\n\t\t\tnodesToSendTo.putConnection(hop, event.getHopID(i));\n\t\t}\n\t\t//Ensure each socket connection was successful\n\t\tboolean connectionsAllGood = true;\n\t\tfor (Map.Entry<Integer, TCPConnection> entry : nodesToSendTo.getConnections()\n\t\t\t\t.entrySet()) {\n\t\t\tTCPConnection value = entry.getValue();\n\t\t\tif (!value.checkSocketStatus())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn connectionsAllGood;\n\t}", "public int getNumConnections(ImmutableNodeInst n) {\n int myNodeId = n.nodeId;\n int i = searchConnectionByPort(myNodeId, 0);\n int j = i;\n for (; j < connections.length; j++) {\n int con = connections[j];\n ImmutableArcInst a = getArcs().get(con >>> 1);\n boolean end = (con & 1) != 0;\n int nodeId = end ? a.headNodeId : a.tailNodeId;\n if (nodeId != myNodeId) break;\n }\n return j - i;\n }", "private boolean checkInList(String ip, int port) {\r\n\t\tif(this.ip.equals(ip) & this.port == port)\r\n\t\t\treturn true;\r\n\t\t\r\n\t\tif(nodes.size()>0) {\r\n\t\t\tSystem.out.println(\"checking if node already exists...\");\r\n\t\t\t\r\n\t\t\tfor (Node node : this.nodes) {\r\n\t\t\t\treturn node.ip.equals(ip) && node.port == port;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean hasPort();", "boolean hasPort();", "public void checkConnections() {\n Boolean updateCanvas = false;\n\n // Find new connections set within a node and creates them\n for (DrawableNode node : nodes) {\n if (node instanceof LogicNode) {\n String src = ((LogicNode) node).getLogic().getLogic();\n\n for (DrawableNode endNode : getNodes()) {\n int nodeConnectionType = NodeConnection.NO_CONNECTION;\n\n // Here we are checked to see if any connections are linked from this LogicNode\n if (src.contains(\"run(\\\"\" + endNode.getContainedText() + \"\\\"\") ||\n src.contains(\"runAndWait(\\\"\" + endNode.getContainedText() + \"\\\"\") ||\n src.contains(\"runAndJoin(\\\"\" + endNode.getContainedText() + \"\\\"\")) {\n nodeConnectionType = NodeConnection.DYNAMIC_CONNECTION;\n } else if (src.contains(\"getNode(\\\"\" + endNode.getContainedText() + \"\\\"\")) {\n nodeConnectionType = NodeConnection.GET_NODE_CONNECTION;\n }\n\n // If we find a possible connection and it doesn't already exist, we create that connection with the correct type\n if (!connectionExists(node, endNode) && nodeConnectionType != -1) {\n NodeConnection newConnection = new NodeConnection(node, endNode, nodeConnectionType);\n connections.add(newConnection);\n updateCanvas = true;\n }\n }\n } else if (node instanceof TestCaseNode) {\n String src = ((TestCaseNode) node).getLogic().getLogic();\n\n for (DrawableNode endNode : getNodes()) {\n int nodeConnectionType = NodeConnection.NO_CONNECTION;\n\n // Here we are checked to see if any connections are linked from this TestCaseNode\n if (src.contains(\"run(\\\"\" + endNode.getContainedText() + \"\\\"\") ||\n src.contains(\"runAndWait(\\\"\" + endNode.getContainedText() + \"\\\"\") ||\n src.contains(\"runAndJoin(\\\"\" + endNode.getContainedText() + \"\\\"\")) {\n nodeConnectionType = NodeConnection.DYNAMIC_CONNECTION;\n } else if (src.contains(\"getNode(\\\"\" + endNode.getContainedText() + \"\\\"\")) {\n nodeConnectionType = NodeConnection.GET_NODE_CONNECTION;\n }\n\n // If we find a possible connection and it doesn't already exist, we create that connection with the correct type\n if (!connectionExists(node, endNode) && nodeConnectionType != -1) {\n NodeConnection newConnection = new NodeConnection(node, endNode, nodeConnectionType);\n connections.add(newConnection);\n updateCanvas = true;\n }\n }\n } else if (node instanceof SwitchNode) {\n List<Switch> aSwitches = ((SwitchNode) node).getSwitches();\n\n for (DrawableNode endNode : getNodes()) {\n Boolean createConnection = false;\n Boolean enabledConnection = false;\n\n for (Switch aSwitch : aSwitches) {\n if ((aSwitch.getTarget().equals(endNode.getContainedText()))) {\n enabledConnection = aSwitch.isEnabled();\n createConnection = true;\n }\n }\n\n if (createConnection && !connectionExists(node, endNode)) {\n Integer connectionType = NodeConnection.DYNAMIC_CONNECTION;\n if (!enabledConnection) {\n connectionType = NodeConnection.DISABLED_CONNECTION;\n }\n\n NodeConnection newConnection = new NodeConnection(node, endNode, connectionType);\n connections.add(newConnection);\n updateCanvas = true;\n }\n }\n } else if (node instanceof TriggerNode) {\n List<Trigger> triggers = ((TriggerNode) node).getTriggers();\n\n for (Trigger trigger : triggers) {\n String watchName = trigger.getWatch();\n\n for (DrawableNode endNode : getNodes()) {\n Boolean createConnection = false;\n\n if (watchName.equals(endNode.getContainedText())) {\n createConnection = true;\n }\n\n // This connection has the start and end the other way around, the target is specified in the trigger but\n // we want it to look like the watched node is connecting to the trigger as that is the order that they are run\n if (createConnection && !connectionExists(endNode, node)) {\n NodeConnection newConnection = new NodeConnection(endNode, node, NodeConnection.TRIGGER_CONNECTION);\n connections.add(newConnection);\n updateCanvas = true;\n }\n }\n }\n }\n\n // Find connection that are set using the Next node input box\n if (node != null && !node.getNextNodeToRun().isEmpty()) {\n for (DrawableNode endNode : getNodes()) {\n if (node.getNextNodeToRun().equals(endNode.getContainedText())) {\n if (!connectionExists(node, endNode)) {\n NodeConnection newConnection = new NodeConnection(node, endNode, NodeConnection.MAIN_CONNECTION);\n connections.add(newConnection);\n updateCanvas = true;\n }\n }\n }\n }\n }\n\n // Checks old connections and removes ones that don't exist\n List<NodeConnection> listToRemove = new ArrayList<>();\n List<NodeConnection> connectionsLoopTemp = new ArrayList<>(); // We make a copy the list here so that we can the original while iterating over this one\n connectionsLoopTemp.addAll(connections);\n for (NodeConnection nodeConnection : connectionsLoopTemp) {\n if (nodeConnection.getConnectionType().equals(NodeConnection.DYNAMIC_CONNECTION)) {\n if (nodeConnection.getConnectionStart() instanceof LogicNode) {\n if (!((LogicNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"run(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((LogicNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"runAndWait(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((LogicNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"runAndJoin(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((LogicNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"getNode(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n }\n }\n } else if (nodeConnection.getConnectionStart() instanceof TestCaseNode) {\n if (!((TestCaseNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"run(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((TestCaseNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"runAndWait(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((TestCaseNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"runAndJoin(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((TestCaseNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"getNode(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n }\n }\n } else if (nodeConnection.getConnectionStart() instanceof SwitchNode) {\n List<Switch> aSwitches = ((SwitchNode) nodeConnection.getConnectionStart()).getSwitches();\n String endContainedText = nodeConnection.getConnectionEnd().getContainedText();\n Integer removeCount = 0;\n for (Switch aSwitch : aSwitches) {\n if ((!aSwitch.getTarget().equals(endContainedText) || !aSwitch.isEnabled())) {\n removeCount++;\n }\n }\n\n if (removeCount.equals(aSwitches.size())) {\n // Create a disabled connection between these two nodes to give appearance of toggling\n NodeConnection newConnection = new NodeConnection(nodeConnection.getConnectionStart(), nodeConnection.getConnectionEnd(), NodeConnection.DISABLED_CONNECTION);\n connections.add(newConnection);\n\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n } else if (nodeConnection.getConnectionType().equals(NodeConnection.TRIGGER_CONNECTION)) {\n if (nodeConnection.getConnectionEnd() instanceof TriggerNode) { // Here the start and end connections are reversed\n List<Trigger> triggers = ((TriggerNode) nodeConnection.getConnectionEnd()).getTriggers();\n String endContainedText = nodeConnection.getConnectionStart().getContainedText();\n Integer removeCount = 0;\n for (Trigger trigger : triggers) {\n if ((!trigger.getWatch().equals(endContainedText))) {\n removeCount++;\n }\n }\n\n if (removeCount.equals(triggers.size())) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n } else if (nodeConnection.getConnectionType().equals(NodeConnection.GET_NODE_CONNECTION)) {\n if (nodeConnection.getConnectionStart() instanceof LogicNode) {\n if (!((LogicNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"getNode(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n } else if (nodeConnection.getConnectionStart() instanceof TestCaseNode) {\n if (!((TestCaseNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"getNode(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n } else if (nodeConnection.getConnectionType().equals(NodeConnection.DISABLED_CONNECTION)) {\n if (nodeConnection.getConnectionStart() instanceof SwitchNode) {\n List<Switch> aSwitches = ((SwitchNode) nodeConnection.getConnectionStart()).getSwitches();\n String endContainedText = nodeConnection.getConnectionEnd().getContainedText();\n Integer removeCount = 0;\n for (Switch aSwitch : aSwitches) {\n if ((!aSwitch.getTarget().equals(endContainedText) || aSwitch.isEnabled())) {\n removeCount++;\n }\n }\n\n if (removeCount.equals(aSwitches.size())) {\n // Create an enabled connection between these two nodes to give appearance of toggling\n NodeConnection newConnection = new NodeConnection(nodeConnection.getConnectionStart(), nodeConnection.getConnectionEnd(), NodeConnection.DYNAMIC_CONNECTION);\n connections.add(newConnection);\n\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n }\n\n if (nodeConnection.getConnectionType().equals(NodeConnection.MAIN_CONNECTION)) {\n if (!nodeConnection.getConnectionStart().getNextNodeToRun().equals(nodeConnection.getConnectionEnd().getContainedText())) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n }\n\n connections.removeAll(listToRemove);\n if (updateCanvas) {\n Controller.getInstance().updateCanvasControllerLater();\n }\n }", "private boolean canConnect() {\n \t\treturn (currentlyConnectingSockets.get() < maxConnectingSockets)\n \t\t\t\t&& (currentlyOpenSockets.get() < maxOpenSockets);\n \t}", "boolean supportsConnects();", "public boolean isOpen(int port)\n {\n try(DatagramSocket connection = new DatagramSocket(port, getInetAddress()))\n {\n addOpenPort(port);\n return true;\n }\n catch(IOException ioe)\n {\n return false;\n }\n }", "public boolean allConnected()\n {\n if(isDestroyed) throw new RuntimeException(\"pvaClientMultiChannel was destroyed\");\n return (numConnected==numChannel) ? true : false;\n }", "public boolean isConnectedPort() {\n for (Tile t : getTile().getSurroundingTiles(1)) {\n if (!t.isLand() && t.isHighSeasConnected()) return true;\n }\n return false;\n }", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean hasPort() {\n return !ports.isEmpty();\n }", "public boolean isConnecting() {\n PublishSubscriber<T> c = state.current;\n return c.connecting && !c.connected && !c.done && !c.isDisposed();\n }", "public boolean isConnectedTo(Airport that)\n\t{\n\t\tif(connections.contains(that)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "Collection<TcpIpConnection> getActiveConnections();", "boolean isConnected() {\n \t\tif (fConnected == null)\n \t\t\treturn false;\n \t\treturn !fConnected.isEmpty();\n \t}", "public boolean validateConnection(CellStorage from, CellStorage to) {\r\n\t\tHashMapConnectedNodes nodeFrom = null;\r\n\t\tHashMapConnectedNodes nodeTo = null;\r\n\t\tif (hshMConnectedNodes.size() == 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tfor (int counter = 0; counter < hshMConnectedNodes.size(); counter++) {\r\n\t\t\tif (hshMConnectedNodes.get(counter).searchNode(from))\r\n\t\t\t\tnodeFrom = hshMConnectedNodes.get(counter);\r\n\t\t\tif (hshMConnectedNodes.get(counter).searchNode(to))\r\n\t\t\t\tnodeTo = hshMConnectedNodes.get(counter);\r\n\t\t}\r\n\t\tif (nodeFrom == null || nodeTo == null)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}", "protected abstract boolean isConnected();", "public static boolean isConnected() {\n return (getCon() != null);\n }", "public boolean isConnected() {\n\t\tif (m == null) return false;\n\t\telse return true;\n\t}", "public boolean connectionAlive() throws RemoteException;", "@Override\n\tpublic boolean isConnected() {\n\t\tif(dwg.getV().size()==0) return true;\n\n\t\tIterator<node_data> temp = dwg.getV().iterator();\n\t\twhile(temp.hasNext()) {\n\t\t\tfor(node_data w : dwg.getV()) {\n\t\t\t\tw.setTag(0);\n\t\t\t}\n\t\t\tnode_data n = temp.next();\n\t\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\t\tn.setTag(1);\n\t\t\tq.add(n);\n\t\t\twhile(!q.isEmpty()) {\n\t\t\t\tnode_data v = q.poll();\n\t\t\t\tCollection<edge_data> arrE = dwg.getE(v.getKey());\n\t\t\t\tfor(edge_data e : arrE) {\n\t\t\t\t\tint keyU = e.getDest();\n\t\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\t\tif(u.getTag() == 0) {\n\t\t\t\t\t\tu.setTag(1);\n\t\t\t\t\t\tq.add(u);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tv.setTag(2);\n\t\t\t}\n\t\t\tCollection<node_data> col = dwg.getV();\n\t\t\tfor(node_data n1 : col) {\n\t\t\t\tif(n1.getTag() != 2) {\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 abstract boolean isConnected(N n1, N n2);", "public boolean Connect() throws IllegalStateException {\r\n\t\t\tString host;\r\n\t\t\tint port;\r\n\t\t\tif ( currHostPort == null ) {\r\n\t\t\t\tthrow new IllegalStateException(\"No iterator element.\");\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\thost = currHostPort.getHost();\r\n\t\t\t\tport = currHostPort.getPort();\r\n\t\t\t\tsocket = new DatagramSocket();\r\n\t\t\t\tinetaddr = InetAddress.getByName(host);\r\n\t\t\t\tsocket.connect(inetaddr, port);\r\n\t\t\t\tsocket.setSoTimeout(connTimeout);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tcatch(Exception e) {\t\t\t\t\t// UnknownHostException / IOException / NullPointerException\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "boolean hasAvailableConnection();", "public boolean isNetworkReachable();", "public boolean isConnected() {\n\t\treturn conn != null;\n\t}", "public static boolean hasConnection() {\n \t\treturn connPool.getConnectionCount() > 0;\n \t}", "private boolean isOnline(String addressport) {\n synchronized (GUITracker.onlinePeer) {\n for (int i = 0; i < GUITracker.onlinePeer.size(); i++) {\n if (GUITracker.onlinePeer.get(i).equals(addressport)) {\n return true;\n }\n }\n }\n return false;\n }", "public boolean hasAvailableConnections(Router current){\n boolean destinationAvailable = false;\n for (Connection c : current.getConnections()){\n //if there is a router that has not been visited\n if (c.getDestination().getVisit() == false){\n destinationAvailable = true;\n }\n }\n return destinationAvailable;\n }", "Collection<TcpIpConnection> getConnections();", "public boolean isConnected() {\n PublishSubscriber<T> c = state.current;\n return c.connected && !c.done && !c.isDisposed();\n }", "@Override\n public boolean isConnected()\n {\n return connected;\n }", "protected boolean hasConnection(int start, int end) {\n\t\tfor (Gene g : genes.values()) {\n\t\t\tif (g.start == start && g.end == end)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static boolean isConnected() { return irc != null && irc.isConnected(); }", "public boolean isContainNode(ServentInfo a){\n\t\tfor(int i = 0;i<serventList.size();i++){\n\t\t\tServentInfo b = serventList.get(i);\n\t\t\tif(b.IP.equals(a.IP) && b.port == a.port){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isConnected() {\n if (this.isEmpty()) return true;\n\n if (this.directed) {\n Deque<Node> toVisit = new LinkedList<>();\n for (Node s : this.nodes.values()) {\n Node current;\n toVisit.addLast(s);\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n if (!allVisited) return false;\n }\n return true;\n }\n else {\n //Perform a DFS from a random start node marking nodes as visited\n Node current;\n Deque<Node> toVisit = new LinkedList<>();\n toVisit.addLast(this.nodes.values().iterator().next());\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n\n return allVisited;\n }\n }", "public static boolean isConnected() {\r\n\t\treturn dfl != null;\r\n\t}", "public static boolean remotePortTaken(String node, int port, int timeout) {\n Socket s = null;\n try {\n s = new Socket();\n s.setReuseAddress(true);\n SocketAddress sa = new InetSocketAddress(node, port);\n s.connect(sa, timeout * 1000);\n } catch (IOException e) {\n if (e.getMessage().equals(\"Connection refused\")) {\n return false;\n }\n if (e instanceof SocketTimeoutException || e instanceof UnknownHostException) {\n throw e;\n }\n } finally {\n if (s != null) {\n if (s.isConnected()) {\n return true;\n } else {\n }\n try {\n s.close();\n } catch (IOException e) {\n }\n }\n\n return false;\n }\n\n }", "public boolean isConnecting() {\n if (mState == STATE_CONNECTING) {\n return true;\n }\n return false;\n }", "@Override\n public boolean isConnected() {\n return connected;\n }", "int getConnectionsCount();", "@Override\n public boolean isConnected() {\n for (node_data n : G.getV()) {\n bfs(n.getKey());\n for (node_data node : G.getV()) {\n if (node.getTag() == 0)\n return false;\n }\n }\n return true;\n }", "public boolean isConnectable(){\n\t\tif((System.currentTimeMillis() - this.lastTry) > retryBackoff){\n\t\t\tthis.lastTry = System.currentTimeMillis();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean hasNext() {\r\n\t\t\tcurrHostPort = null;\r\n\t\t\treturn iterator.hasNext();\r\n\t\t}", "private boolean isReachable(String addr, int openPort) {\n try \n {\n ClienteUDP cliente = new ClienteUDP(addr);\n cliente.enviar(\"hola,df,df\");\n String rpta = cliente.recibir();\n if(rpta.equals(\"hola\"))\n return true;\n }catch(Exception e)\n {\n return false;\n }\n return false;\n }", "public boolean isConnected()\n {\n return connected;\n }", "public boolean tunnelAvailable();", "public int numofConnections() {\n\t\tint numberofconnection = 0;\n\t\tString node;\n\t\tfor (String key : Nodeswithconnect.keySet()) {\n\t\t\tfor (int i = 0; i < Nodeswithconnect.get(key).length; i++) {\n\t\t\t\tnode = Nodeswithconnect.get(key)[i];\n\t\t\t\tif (!node.equals(\"null\")) {\n\t\t\t\t\tnumberofconnection++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn numberofconnection;\n\t}", "public boolean percolates() {\n return uf.connected(source, sink);\n }", "public boolean isConnected(){\n return connected;\n }", "public boolean isActive(){\n return (registeredParticipants.size() == connections().size());\n }", "public boolean isConnected() {\n \t\treturn connected;\n \t}", "public boolean isConnected() {\r\n\treturn connected;\r\n }", "public boolean isConnected() {\n\t\treturn sock != null;\n\t}", "public final boolean isConnected() {\n\t\t// retornamos si existe una conexion\n\t\treturn this.getConnection() != null;\n\t}", "public abstract boolean isConnected(N n1, E e, N n2);", "public boolean isConnected(){\r\n\t\treturn connected;\r\n\t}", "private boolean isValidConnectors() {\n\n\t\tint countBoardCardInConnectors = 0;\n\n\t\tfor (CardModel cardModel : boardModel.getCards()) {\n\t\t\tif (connectors.contains(cardModel)) {\n\t\t\t\tcountBoardCardInConnectors++;\n\t\t\t}\n\t\t}\n\n\t\treturn (countBoardCardInConnectors == 2);\n\t}", "public boolean isConnected() {\r\n return connected;\r\n }", "private boolean isPortInUse(String portId) {\n return false;\n }", "public boolean isConnectedTo(Node<A> n) {\n\t\t\n\t\tif (g == null) return false;\n\t\t\n\t\tif (g.contains(n)){\n\t\t\t\n\t\t\tfor (Object o: g.getEdges()) {\n\t\t\t\t\n\t\t\t\tif (((Edge<?>)o).getFrom().equals(this) && ((Edge<?>)o).getTo().equals(n)) {\n\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\n\t\t}\n\t\treturn false;\n\t}", "boolean canConnect(IAgriIrrigationNode other, Direction from);", "public boolean hasActiveInternetConnection()\n {\n Runtime runtime = Runtime.getRuntime();\n try {\n Process ipProcess = runtime.exec(\"/system/bin/ping -c 1 8.8.8.8\");\n int exitValue = ipProcess.waitFor();\n return (exitValue == 0);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return false;\n }", "protected boolean isConnected() {\n/* 160 */ return this.delegate.isConnected();\n/* */ }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "boolean set_up_connection_to_peers() {\n sockets = new Socket[num_peers];\n int cnt = 0;\n for (int i = 0; i < peer_ip.length; i++) {\n if (peer_id[i] < id) {\n try {\n sockets[i] = new Socket(peer_ip[i], peer_port[i]);\n tcp_out_stream[i] = new ObjectOutputStream(sockets[i].getOutputStream());\n print(\"Peer \" + id + \" successfully connects to \" + peer_id[i]);\n cnt++;\n } catch (IOException e) {\n // TODO Auto-generated catch block\n print(\"Failed to connect to \" + peer_id[i] + \", \" + peer_ip[i] + \":\" + peer_port[i]);\n return false;\n }\n } else {\n sockets[i] = null; //to be connected by later peers.\n }\n }\n print(\"Peer \" + id + \" TCP connection done. Connected to \" + cnt + \" peers\");\n return true;\n }", "private boolean isConnected() {\n try {\n return (conn != null) && conn.isValid(0);\n } catch (SQLException ex) {\n Logger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }", "@Override\r\n public boolean isConnected(V start, V destination) {\r\n return !shortestPath(start, destination).isEmpty();\r\n }", "public boolean[] getIsConnected()\n {\n if(isDestroyed) throw new RuntimeException(\"pvaClientMultiChannel was destroyed\");\n for(int i=0; i<numChannel; ++i) {\n PvaClientChannel pvaClientChannel = pvaClientChannelArray[i];\n if(pvaClientChannel==null) {\n isConnected[i] = false;\n continue;\n }\n Channel channel = pvaClientChannel.getChannel();\n ConnectionState stateNow = channel.getConnectionState();\n isConnected[i] = (stateNow==ConnectionState.CONNECTED) ? true : false;\n }\n return isConnected;\n }", "public boolean IsConnected() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tint counter = 0;\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcounter++;\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn counter == 1;\r\n\t}", "@Override\n public int getNumConnections()\n {\n return connections.size();\n }", "@Test\n\tpublic void testConnectionsExistOnPoolCreation() {\n\t\tAssert.assertTrue(pool.totalConnections() > 0); \n\t}", "public boolean connectionChange()\n {\n if(isDestroyed) throw new RuntimeException(\"pvaClientMultiChannel was destroyed\");\n for(int i=0; i<numChannel; ++i) {\n PvaClientChannel pvaClientChannel = pvaClientChannelArray[i];\n Channel channel = pvaClientChannel.getChannel();\n ConnectionState stateNow = channel.getConnectionState();\n boolean connectedNow = stateNow==ConnectionState.CONNECTED ? true : false;\n if(connectedNow!=isConnected[i]) return true;\n }\n return false;\n }", "public abstract boolean isConnectedInDirection(N n1, N n2);", "public boolean hasPort() {\n\tLogWriter.logMessage(LogWriter.TRACE_DEBUG,\"hasPort()\");\n Via via=(Via)sipHeader;\n return via.hasPort();\n }", "public boolean isConnected() {\n return this.connected;\n }", "public boolean isConnected() {\n return this.connected;\n }", "public boolean pinUseCount(ImmutableNodeInst pin)\n {\n int numConnections = getNumConnections(pin);\n if (numConnections > 2) return false;\n if (hasExports(pin)) return true;\n if (numConnections == 0) return false;\n return true;\n }", "public boolean isConnected() {\n\t\treturn connected;\n\t}", "public boolean isConnected() {\n\t\treturn connected;\n\t}", "Set<Interface> getInterfacesByPort(ConnectPoint port);" ]
[ "0.6387172", "0.63082737", "0.61389595", "0.61165124", "0.61147255", "0.61147255", "0.6104565", "0.6039556", "0.60312754", "0.60041684", "0.59925884", "0.5965306", "0.5913888", "0.5913888", "0.5913888", "0.5913888", "0.5913888", "0.5913888", "0.5913888", "0.5913888", "0.58946544", "0.58946544", "0.58946544", "0.58946544", "0.58946544", "0.58596945", "0.58594686", "0.5850618", "0.58268315", "0.5795731", "0.5770844", "0.5766959", "0.5760575", "0.5743372", "0.5705946", "0.56687057", "0.5664124", "0.564266", "0.5633225", "0.5618198", "0.5608033", "0.55423", "0.5527655", "0.5517458", "0.5515684", "0.5474564", "0.5471055", "0.5456689", "0.54492694", "0.544644", "0.5446362", "0.5444665", "0.5442517", "0.54423183", "0.5430224", "0.5424159", "0.5420199", "0.5406217", "0.5405354", "0.5400413", "0.53986424", "0.53979707", "0.53564554", "0.5353619", "0.53529763", "0.53513193", "0.5350036", "0.5348827", "0.5343617", "0.5341263", "0.5335173", "0.5331843", "0.532881", "0.5324424", "0.5322789", "0.53224385", "0.53223217", "0.5318631", "0.5314202", "0.5314106", "0.5314106", "0.5314106", "0.5314106", "0.5314106", "0.5313944", "0.53064686", "0.5301151", "0.52949774", "0.52775484", "0.5269977", "0.52691525", "0.5268107", "0.52658355", "0.52611244", "0.52577066", "0.52577066", "0.52547127", "0.52532035", "0.52532035", "0.52418983" ]
0.74961776
0
Method to return the number of Connections on specified ImmutableNodeInst.
public int getNumConnections(ImmutableNodeInst n) { int myNodeId = n.nodeId; int i = searchConnectionByPort(myNodeId, 0); int j = i; for (; j < connections.length; j++) { int con = connections[j]; ImmutableArcInst a = getArcs().get(con >>> 1); boolean end = (con & 1) != 0; int nodeId = end ? a.headNodeId : a.tailNodeId; if (nodeId != myNodeId) break; } return j - i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getConnectionsCount();", "public int numofConnections() {\n\t\tint numberofconnection = 0;\n\t\tString node;\n\t\tfor (String key : Nodeswithconnect.keySet()) {\n\t\t\tfor (int i = 0; i < Nodeswithconnect.get(key).length; i++) {\n\t\t\t\tnode = Nodeswithconnect.get(key)[i];\n\t\t\t\tif (!node.equals(\"null\")) {\n\t\t\t\t\tnumberofconnection++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn numberofconnection;\n\t}", "Integer getConnectorCount();", "public int numConnections(){\n return connections.size();\n }", "int getConnectionCount();", "public int getNumberOfActivitiesOfConnections(Identity ownerIdentity);", "public int getNumOfConnections() {\r\n\t\treturn numOfConnections;\r\n\t}", "public int getTotalConnections()\n {\n // return _connections.size();\n return 0;\n }", "int getTotalCreatedConnections();", "public static int getConnectionCount()\r\n {\r\n return count_; \r\n }", "public int getConnectionCount() {\n int i;\n synchronized (this.bindings) {\n i = 0;\n for (IntentBindRecord intentBindRecord : this.bindings) {\n i += intentBindRecord.connections.size();\n }\n }\n return i;\n }", "@Override\r\n\tpublic int getConnectionsCount() {\r\n\t\treturn currentConnections.get();\r\n\t}", "public Object getNumberOfConnectedComponents() {\r\n\t\tConnectivityInspector<Country, DefaultEdge> inspector=new ConnectivityInspector<Country, DefaultEdge>(graph);\r\n\t\treturn inspector.connectedSets().size();\r\n\t}", "public int getNumConnects() {\n\t\treturn numConnects;\n\t}", "int getPeersCount();", "public static long getNumberOfOpenConnections() {\n return openConnections.size();\n }", "int getNodesCount();", "int getNodesCount();", "private int visitedNetworksCount() {\n final HashSet<String> visitedNetworksSet = new HashSet<>(mVisitedNetworks);\n return visitedNetworksSet.size();\n }", "public long getConnectionCount() {\n return connectionCount.getCount();\n }", "@Override\n public int getNumConnections()\n {\n return connections.size();\n }", "public int connectionCount()\n {\n return _connectionCount;\n }", "public int getNumNetworkCopies(){\n synchronized (networkCopiesLock){\n return this.networkCopies.size();\n }\n }", "int getNodeCount();", "int getNodeCount();", "public int getNumberOfActivitiesOfConnectionsForUpgrade(Identity ownerIdentity);", "public int Sizeofnetwork() {\n\t\treturn Nodeswithconnect.size();\n\t}", "int getPeerURLsCount();", "public int getSize() {\n\t\treturn currConnections;\n\t}", "int getPeerCount();", "public static long getConnections() {\n return connections;\n }", "public int size() {\r\n\t\tint size = 0;\r\n\t\tfor (Integer key : connectionLists.keySet()) {\r\n\t\t\tsize += connectionLists.get(key).size();\r\n\t\t}\r\n\t\treturn size;\r\n\t}", "int getLinksCount();", "int nodeCount();", "public static int countNodes() {\n\t\treturn count_nodes;\n\t}", "int getNetworkInterfacesCount();", "public int manyConnections() {\n\t\tint ammound = 0;\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tif(this.get(i).clientAlive) {\n\t\t\t\tammound++;\n\t\t\t}\n\t\t\tSystem.out.println(\"Ist Client Nr. \" + i + \" frei? \" + !this.get(i).isAlive());\n\t\t}\n\t\treturn ammound;\n\t\t\n\t}", "public int getNodeCount() {\n return nodeCount;\n }", "public int nodesCount() {\n return nodes.size();\n }", "private long getChampConnectionCount(Node series) {\n\t\tNode chrom = getSolutionChrom(series);\n\t\tif (chrom != null) {\n\t\t\tNode attribute = chrom.getFirstChild();\n\t\t\twhile (attribute != null) {\n\t\t\t\tif (attribute.getNodeName().equals(CONNECTION_COUNT_TAG)) {\n\t\t\t\t\treturn Util.getLong(attribute);\n\t\t\t\t}\n\t\t\t\tattribute = attribute.getNextSibling();\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public int getNodeCount() {\n return node_.size();\n }", "private int getNumberOfNeighborConnections(Entity node)\r\n\t{\r\n\r\n\t\t// The directed graph is treated as a undirected graph to compute these\r\n\t\t// parameters.\r\n\t\t// UndirectedGraph<String, DefaultEdge> undirectedGraph = new\r\n\t\t// AsUndirectedGraph<String, DefaultEdge>(directedGraph);\r\n\r\n\t\tint numberOfConnections = 0;\r\n\r\n\t\t// get the set of neighbors\r\n\t\tSet<Entity> neighbors = getNeighbors(node);\r\n\r\n\t\tif (neighbors.size() > 0) {\r\n\t\t\t// for each pair of neighbors, test if there is a connection\r\n\t\t\tObject[] nodeArray = neighbors.toArray();\r\n\t\t\t// sort the Array so we can use a simple iteration with two for\r\n\t\t\t// loops to access all pairs\r\n\t\t\tArrays.sort(nodeArray);\r\n\r\n\t\t\tfor (int i = 0; i < neighbors.size(); i++) {\r\n\t\t\t\tEntity outerNode = (Entity) nodeArray[i];\r\n\t\t\t\tfor (int j = i + 1; j < neighbors.size(); j++) {\r\n\t\t\t\t\tEntity innerNode = (Entity) nodeArray[j];\r\n\t\t\t\t\t// in case of a connection increase connection counter\r\n\t\t\t\t\t// order of the nodes doesn't matter for undirected graphs\r\n\r\n\t\t\t\t\t// check if the neighbors are connected:\r\n\t\t\t\t\tif (containsEdge(innerNode, outerNode)\r\n\t\t\t\t\t\t\t|| containsEdge(outerNode, innerNode)) {\r\n\t\t\t\t\t\t// logger.info(\"There is a connection between the neighbors\");\r\n\t\t\t\t\t\tnumberOfConnections++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// logger.info(neighbors.size() + \" - \" + numberOfConnections);\r\n\r\n\t\treturn numberOfConnections;\r\n\t}", "public int countLink() {\n\t\tint count = 0;\n\t\ttry {\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\n\t\t\t\t\t\"SELECT count(*) from links\");\n\t\t stmt.execute();\n\t\t ResultSet rs = stmt.executeQuery();\n\t\t\twhile(rs.next()) {\n\t\t\t\tcount = rs.getInt(1);\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tconnection.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn count;\n\t}", "@Override\n public int nodeCount() {\n return graphNodes.size();\n }", "public int getUseCount() {\n\t\tint useCount=0;\n\t\tsynchronized(connStatus) {\n\t\t\tfor(int i=0; i < currConnections; i++) {\n\t\t\t\tif(connStatus[i] > 0) { // In use\n\t\t\t\t\tuseCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn useCount;\n\t}", "int getChannelStatisticsCount();", "public int countNeighbours() {\n\t\tint count = 0;\n\t\tif (this.hasNeighbour(0))\n\t\t\tcount++;\n\t\tif (this.hasNeighbour(1))\n\t\t\tcount++;\n\t\tif (this.hasNeighbour(2))\n\t\t\tcount++;\n\t\treturn count;\n\t}", "public int getNumOfNodes() {\n\t\treturn getNumOfNodes(this);\n\t}", "public int getConnectedRepositoriesCount() {\r\n\t\t\r\n\t\tint size = 0;\r\n\t\tIterator it = getOpenedRepositories().iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tRepository repository = (Repository) it.next();\r\n\t\t\tif (repository.isConnected()) {\r\n\t\t\t\tsize++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn size;\r\n\t}", "public int nodeCount(){\r\n\t\treturn size;\r\n\t}", "int getNodeStatusListCount();", "public int size() {\n return neurons.size();\n }", "int getTotalNumOfNodes() {\n\t\treturn adjList.size();\n\t}", "int getRefsCount();", "public int getNetworksCount() {\n if (networksBuilder_ == null) {\n return networks_.size();\n } else {\n return networksBuilder_.getCount();\n }\n }", "public int getNumberOfUpdatedOnActivitiesOfConnections(Identity owner, ActivityUpdateFilter filter);", "public int my_node_count();", "public int getNetworksCount() {\n return networks_.size();\n }", "int nbNode() {\n switch (type) {\n\n case EDGE:\n case PATH:\n case EVAL:\n if (edge.getEdgeVariable() == null) {\n return edge.nbNode();\n } else {\n return edge.nbNode() + 1;\n }\n\n case OPT_BIND:\n return size();\n }\n\n return 0;\n }", "int getReplicationCount();", "public int getNumNodes() {\n\t\treturn nodes.size();\n\t}", "public int getNumberOfNewerOnActivitiesOfConnections(Identity ownerIdentity, Long sinceTime);", "public int getNumberOfConnectors() { return numberOfConnectors; }", "int getNrNodes() {\n\t\treturn adjList.size();\n\t}", "public int countNodes() {\r\n \r\n // call the private countNodes method with root\r\n return countNodes(root);\r\n }", "public int getNodesCount() {\n if (nodesBuilder_ == null) {\n return nodes_.size();\n } else {\n return nodesBuilder_.getCount();\n }\n }", "public int countNodes(){\r\n \treturn count(root);\r\n }", "protected int numPeers() {\n\t\treturn peers.size();\n\t}", "public int getChannelCount();", "int NoOfNodes() {\r\n return noOfNodes;\r\n }", "int getNumberOfEdges();", "private int numNodes()\r\n\t{\r\n\t return nodeMap.size();\r\n\t}", "public int getNodeCount() {\n resetAllTouched();\n return recurseNodeCount();\n }", "private void incrConnectionCount() {\n connectionCount.inc();\n }", "public int getNodeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return visited.size();\r\n }", "public int getNodeCount() {\n if (nodeBuilder_ == null) {\n return node_.size();\n } else {\n return nodeBuilder_.getCount();\n }\n }", "public int getCount() {\n\t\treturn channelCountMapper.getCount();\n\t}", "public final int size() {\n return nNodes;\n }", "long getTotalServerSocketsCount();", "@Override\n public int size()\n {\n int numLinks = 0;\n Node currNode = this.head.next; \n while(currNode.next != null)\n {\n numLinks++;\n currNode = currNode.next;\n }\n return numLinks;\n }", "@Override\n public int getNumOpenConnections() {\n return allChannels.size() - 1;\n }", "public int countNodes()\n {\n return countNodes(root);\n }", "public int countNodes()\n {\n return countNodes(root);\n }", "int getEdgeCount();", "public int nodeCount() {\n\treturn nodeList.size();\n }", "public @UInt32 int getChannelCount();", "public int getChannelCount() {\n if (channelBuilder_ == null) {\n return channel_.size();\n } else {\n return channelBuilder_.getCount();\n }\n }", "public int getNumEdges();", "int getIndexEndpointsCount();", "@java.lang.Override\n public int getNodesCount() {\n return nodes_.size();\n }", "int getServerSocketCount();", "int totalNumberOfNodes();", "private int numberOfComponents(ArrayList<Integer>[] adj) {\n\t\t\t\t\n\t\tint n = adj.length;\n\t\tvisited = new boolean[n]; //default is false\n\t\tCCnum = new int[n];\n\t\tDFS(adj);\n\t\t\n\t\treturn cc;\n }", "public int numEdges();", "public int getNumberOfNewerOnActivitiesOfConnections(Identity ownerIdentity, ExoSocialActivity baseActivity);", "int getChannelsCount();", "int getDelegateesCount();", "public int getNumNodesSeenByMessage() {\r\n return numNodesSeenByMessage;\r\n }", "public long getAllContextNodeCount();", "public int nodeCounter() {\n\n\t\tDLNode n = head;\n\t\tint nodeCounter = 0;\n\t\twhile (n != null) {\n\t\t\tn = n.next;\n\t\t\tnodeCounter++;\n\t\t}\n\t\treturn nodeCounter;\n\t}" ]
[ "0.7598872", "0.73881376", "0.7232613", "0.7228431", "0.71980166", "0.7177374", "0.7131094", "0.7002807", "0.6986345", "0.69481", "0.69119954", "0.68952096", "0.68400913", "0.68388945", "0.68246204", "0.68226373", "0.68095696", "0.68095696", "0.67979974", "0.67896754", "0.67790735", "0.6734769", "0.6558383", "0.6555027", "0.6555027", "0.6526521", "0.64934", "0.64844036", "0.64784944", "0.64565533", "0.6419462", "0.6380921", "0.63773996", "0.6351212", "0.63410646", "0.6333452", "0.63124585", "0.6282569", "0.6279135", "0.6276758", "0.6266934", "0.625706", "0.6228459", "0.62265366", "0.6204047", "0.62018794", "0.618601", "0.617595", "0.6155377", "0.6145805", "0.61069214", "0.6105642", "0.60906225", "0.6087005", "0.60809946", "0.60668993", "0.6049678", "0.6048884", "0.6046334", "0.60435134", "0.60319275", "0.60299844", "0.60294574", "0.6028145", "0.6017628", "0.60097855", "0.59995997", "0.5992364", "0.59842384", "0.59783167", "0.5973598", "0.5962004", "0.59615993", "0.5961336", "0.5957203", "0.5950492", "0.5946871", "0.59392995", "0.5921196", "0.5905732", "0.5900667", "0.58998257", "0.58998257", "0.58725154", "0.58699757", "0.58673066", "0.5866056", "0.5865102", "0.58585155", "0.5853883", "0.585028", "0.58473283", "0.5845532", "0.5844386", "0.58419377", "0.5840356", "0.58376896", "0.5836903", "0.58330876", "0.5823447" ]
0.77619976
0
Method to tell whether the specified ImmutableNodeInst is wiped. Wiped ImmutableNodeInsts are erased. Typically, pin ImmutableNodeInsts can be wiped. This means that when an arc connects to the pin, it is no longer drawn. In order for a ImmutableNodeInst to be wiped, its prototype must have the "setArcsWipe" state, and the arcs connected to it must have "setWipable" in their prototype.
public boolean isWiped(ImmutableNodeInst n) { return wiped.get(n.nodeId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isPinned();", "boolean isHiddenNeuron();", "public boolean isSwimming ( ) {\n\t\treturn extract ( handle -> handle.isSwimming ( ) );\n\t}", "public boolean isFrozen ( ) {\n\t\treturn extract ( handle -> handle.isFrozen ( ) );\n\t}", "public boolean canBeSwappedOut();", "public boolean isJustMovedIntoIndustrialKillingWater() {\n return justMovedIntoIndustrialKillingWater;\n }", "boolean isFrozen();", "boolean isFrozen();", "public boolean getIsWilted() {return ((Growable)delegate).isWilted;}", "public boolean isNotAt() {\n return !isAt();\n }", "@Override\r\n public boolean shouldRevive(int i, int j) {\r\n return (!getCell(i, j).isAlive())\r\n && (numberOfNeighborhoodAliveCells(i, j) == 3 || numberOfNeighborhoodAliveCells(i, j) == 6);\r\n }", "boolean isImmutable();", "boolean isMirror();", "public boolean isRiptiding ( ) {\n\t\treturn extract ( handle -> handle.isRiptiding ( ) );\n\t}", "public boolean isNotMoved() {\n return notMoved;\n }", "public boolean isRemitTo() {\n\t\tObject oo = get_Value(\"IsRemitTo\");\n\t\tif (oo != null) {\n\t\t\tif (oo instanceof Boolean)\n\t\t\t\treturn ((Boolean) oo).booleanValue();\n\t\t\treturn \"Y\".equals(oo);\n\t\t}\n\t\treturn false;\n\t}", "public boolean isNeedMirrorSelfie() {\n return true;\n }", "public boolean isReifiable() {\n ASTNode$State state = state();\n try { return false; }\n finally {\n }\n }", "public boolean isUnmodifiable() {\n return isUnmodifiable;\n }", "boolean isManipulated();", "boolean isDrooping();", "public boolean isShift ()\n {\n return isShift;\n }", "public boolean isRedstoneWire() {\n return this.type == Type.REDSTONE_WIRE;\n }", "protected boolean isMovementNoisy() {\n/* 1861 */ return (!this.abilities.flying && (!this.onGround || !isDiscrete()));\n/* */ }", "public boolean getIsIshidden() {\n return ishidden;\n }", "public boolean didILose() {\n return (shipsSunk.size() == NUM_BOATS);\n }", "public boolean isWriteable();", "public boolean isSunk()\n {\n return isSunk;\n }", "@Override\n\tpublic boolean swim() {\n\t\treturn this.canSwim;\n\t}", "public void knockDownWall(Cell nei) {\n if (nei == null) return;\n\n if (nei == neiNorth) {\n setWallNorth(false);\n neiNorth.setWallSouth(false);\n return;\n }\n\n if (nei == neiSouth) {\n setWallSouth(false);\n neiSouth.setWallNorth(false);\n return;\n }\n\n if (nei == neiWest) {\n setWallWest(false);\n neiWest.setWallEast(false);\n return;\n }\n\n if (nei == neiEast) {\n setWallEast(false);\n neiEast.setWallWest(false);\n return;\n }\n\n // Error occurs\n System.err.println(\"Neighbor does not exist\");\n }", "public boolean isShadowCaster(@EntityInstance int i) {\n return nIsShadowCaster(mNativeObject, i);\n }", "public abstract boolean isMarkedForSweep();", "public boolean isWalkable() {\n return type != CellType.WALL && isInBoundaries();\n }", "public boolean isMaybeNotReadOnly() {\n checkNotUnknown();\n return (flags & ATTR_NOTREADONLY) != 0;\n }", "public boolean isWalkable();", "public boolean isReadOnly();", "public boolean isReadOnly();", "public boolean isReadOnly();", "public boolean getHasItMovedYet() {\n return hasItMovedYet;\n }", "public boolean getIsWellformed() {\r\n\t\treturn mIsWellformed;\r\n\t}", "public boolean try_toggle() {\n if (Pneumatics.get_instance().get_solenoids()) {\n return retract();\n }\n return try_extend();\n }", "public boolean canShift() {\n\t\treturn marker < getRhs().length;\n\t}", "public boolean isWatershed(){\n\t\tif(getNeighbourCellBodies().size() > 1){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "boolean readOnly();", "boolean readOnly();", "public boolean isFrozen() {\n\t\treturn isFrozen;\n\t}", "public boolean isWool() {\n return this.type == Type.WOOL;\n }", "boolean isNilExchange();", "public boolean isNoisyDryRunMode();", "public boolean isNotReadOnly() {\n checkNotUnknown();\n return (flags & ATTR_READONLY_ANY) == ATTR_NOTREADONLY;\n }", "public boolean isSwimming() {\n/* 1967 */ return (!this.abilities.flying && !isSpectator() && super.isSwimming());\n/* */ }", "@Override\n public boolean atDestination() {\n return myMovable.atDestination();\n }", "public boolean isEliminated()\n {\n \treturn (boolean)stats.get(eliminatedKey);\n }", "public boolean isShivering();", "private boolean canUndo() {\n return !frozen && !past.isEmpty();\n }", "public boolean isOnSlopedTile() { return onSlopedTile; }", "boolean getIsErasing();", "public final boolean isReadOnly() {\n\t\treturn m_info.isReadOnly();\n\t}", "boolean isNoop();", "public boolean getJustJumped() {\n\t\treturn this.just_jumped;\n\t}", "private boolean shouldRush(GameInfo intel) {\n if (intel.getNumPlayers() > 2) {\n return false;\n }\n\n final GameMap gameMap = intel.getGamemap();\n final Map<Integer, Ship> myShips = gameMap.getMyPlayer().getShips();\n\n // get enemy player ships\n for (Player player : gameMap.getAllPlayers()) {\n if (player.getId() != gameMap.getMyPlayerId()) {\n for (Ship ship : player.getShips().values()) {\n for (Ship myShip : myShips.values()) {\n if (myShip.getDistanceTo(ship) < RUSH_MAX_DISTANCE) {\n return true;\n }\n }\n }\n }\n }\n\n return false;\n }", "public boolean isFips() {\n return isFips;\n }", "public boolean isWatching() {\n return isPubKeyOnly();\n }", "boolean hasIsErasing();", "public boolean isSetSwCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SWCELL$20) != 0;\n }\n }", "public boolean isWaterAnimal() {\n return false;\n }", "public boolean isClearingMines();", "public boolean isMoving() {\n\t\treturn state.getDirection() != Direction.STATIONARY;\n\t}", "public boolean isDrooping() {\n return false;\n }", "boolean isHollow();", "public Boolean getIswialon() {\r\n return iswialon;\r\n }", "public boolean canMirror() {\n\t\tif (mirrorTime == true) {\n\t\t\tmirrorTime = false;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isShadowReceiver(@EntityInstance int i) {\n return nIsShadowReceiver(mNativeObject, i);\n }", "public boolean isInWater ( ) {\n\t\t// TODO: backwards compatibility required\n\t\treturn invokeSafe ( \"isInWater\" );\n\t}", "public boolean isRevealed(int tile) {\r\n return (tiles[tile] & 2) != 0;\r\n }", "public boolean isSunk() {\n\t\tfor (Coordinate coordinate : shipPositions) {\n\t\t\tif (!coordinate.getIsHit()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isSunk(){\n if(places.isEmpty()){\n //ship cant be sunk if empty\n return false;\n }\n\n //Checks each place in list for hit\n for(Place place : places){\n if(!place.isHit()){\n return false;\n }\n }\n return true;\n }", "public boolean isUnmapped(){\n\t\treturn testBitwiseFlag(4);\n\t}", "public boolean isMaybeReadOnly() {\n checkNotUnknown();\n return (flags & ATTR_READONLY) != 0;\n }", "public boolean isShipTo() {\n\t\tObject oo = get_Value(\"IsShipTo\");\n\t\tif (oo != null) {\n\t\t\tif (oo instanceof Boolean)\n\t\t\t\treturn ((Boolean) oo).booleanValue();\n\t\t\treturn \"Y\".equals(oo);\n\t\t}\n\t\treturn false;\n\t}", "public boolean notAlive() {\r\n\r\n if (LOG.isLoggable(Level.FINEST)) {\r\n LOG.finest(\"notAlive ( ) called \");\r\n }\r\n\r\n return !alive();\r\n }", "public abstract boolean hasWon(int row, int col);", "public boolean isMovable() {\r\n return movable;\r\n }", "public boolean isHere(){ return this.piece.isAffected();}", "public boolean isRemotable() {\n return remotable;\n }", "public abstract boolean isReadOnly();", "public boolean isKicked() throws RemoteException {\r\n return kicked;\r\n }", "public native boolean isMoveable() /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\treturn jso.moveable;\n }-*/;", "public Boolean isWifiEnabled() {\n return (mask / 2) % 2 == 1;\n }", "public boolean isShredded() {\n\t\treturn isShredded;\n\t}", "boolean isReadOnly();", "boolean isReadOnly();", "public boolean percolates() {\n return UF.isConnected(0, getSize() * getSize() + 1);\n }", "public boolean compatIsInitialStickyBroadcast(Intent it) {\n if(ConnectivityManager.CONNECTIVITY_ACTION.equals(it.getAction())) {\n if(!hasStartedWifi) {\n hasStartedWifi = true;\n return true;\n }\n }\n return false;\n }", "public boolean isDrooping() {\n return ((((this.leftTheta % 360) + 360) % 360) > 180)\n || ((((this.rightTheta % 360) + 360) % 360) > 180) \n || this.left.isDrooping()\n || this.right.isDrooping(); \n }", "public boolean notJumping() {\n\t\treturn jumping = false;\n\t}", "public boolean isHidden();", "public Integer getIsDeteled() {\n return isDeteled;\n }", "public boolean isWalkable() {\n return walkable;\n }", "@WorkflowAction(loggable = false)\n public boolean isModified()\n throws WorkflowException, MappingException, RepositoryException, RemoteException;" ]
[ "0.51096743", "0.4917783", "0.48913243", "0.48647872", "0.48309812", "0.48307928", "0.4811124", "0.4811124", "0.47432196", "0.47173622", "0.4702422", "0.46850935", "0.46836805", "0.46659946", "0.46437153", "0.4623367", "0.46109888", "0.45945865", "0.44918784", "0.44761062", "0.4436921", "0.4429358", "0.44235486", "0.4422311", "0.4383276", "0.43773216", "0.43723112", "0.4366068", "0.43570903", "0.4357003", "0.43540847", "0.43408135", "0.43314916", "0.4326022", "0.4322986", "0.43226975", "0.43226975", "0.43226975", "0.4315848", "0.43051332", "0.42847902", "0.42834064", "0.4281218", "0.42735356", "0.42735356", "0.42668527", "0.42627642", "0.42614928", "0.42419675", "0.42333367", "0.42242885", "0.42175123", "0.42166314", "0.42097956", "0.42079648", "0.42078274", "0.42028323", "0.420104", "0.419649", "0.4188309", "0.41857803", "0.41856074", "0.41702768", "0.41692618", "0.41621017", "0.415723", "0.41545877", "0.41517138", "0.4149844", "0.41471893", "0.41410163", "0.41409752", "0.4139026", "0.4135353", "0.41292566", "0.4128656", "0.41284522", "0.41272673", "0.41233376", "0.4110641", "0.41096312", "0.41030893", "0.41028085", "0.4100911", "0.41001254", "0.4096955", "0.40965763", "0.40954942", "0.40934646", "0.4092771", "0.40893775", "0.40893775", "0.4087313", "0.40867507", "0.40843338", "0.40819493", "0.4077226", "0.40735835", "0.4069833", "0.40681887" ]
0.77518755
0
Khoi tao contructor de mapping 'driver' cua tang Test Case vs 'driver' cua tang Page Object thong qua mappingDriver
public LoginPageObject(WebDriver mappingDriver) { driver = mappingDriver; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SearchPageObject(WebDriver driver) {\n this.driver = driver;\n }", "public PageObject(WebDriver driver) {\n this.driver = driver;\n PageFactory.initElements(driver, this);\n }", "public Page(WebDriver driver) {\n this.driver = driver;\n }", "public Page(WebDriver driver) {\r\n\t\tthis.driver = driver;\r\n\t}", "public Page(WebDriver webDriver) {\n this.webDriver = webDriver;\n\t}", "public PolicyBinderPage(WebDriver driver) {\r\n this.driver = driver;\r\n PageFactory.initElements(driver, this);\r\n policybinderpageDTO = new PolicyBinderPageDTO(TestCaseDetails.testDataDictionary);\r\n }", "public IntentPizzaAccountPageObject(WebDriver driver){\n\t\t\tPageFactory.initElements(driver, this);\n\t}", "public LoginPage(){\n PageFactory.initElements(driver, this); //all vars in this class will be init with this driver\n }", "public MyAccountPageObject(WebDriver driver) {\n this.driver = driver;\n PageFactory.initElements(driver, this);\n wait = new WebDriverWait(driver, 20);\n }", "public Page() {\n PageFactory.initElements(getDriver(), this); //snippet to use for @FindBy\n }", "public PageAdapter() {\n this.mapper = new MapperImpl();\n }", "public SearchProvidaPage(WebDriver driver) {\n\t\tsuper(driver);\n\n\t}", "public BasePage(WebDriver driver) {\n this.driver = driver;\n }", "public LocatorSearchResultPage(WebDriver driver){\n this.driver = driver;\n /*\n * web element representatives on a page\n */\n gameLocator = new By.ByLinkText(\"https://cmscdn.staticcache.org/assets/image/0009/800739/UKDESIGN-1216_214x214-MayfairRoulette-SquareTiles.jpg\");\n moreButtonLocator = new By.ByClassName(\"sc-ifAKCX ixOsdk\");\n playNowButtonLocator = new By.ByClassName(\"signinButton\");\n loginFormLocator = new By.ByClassName(\"login-component__wrapper\");\n }", "public RegisterPage(WebDriver driver){ this.driver = driver; }", "public BasePage(WebDriver driver) {\r\n\t\tsuper(driver);\r\n\t}", "public HomePage(WebDriver driver) {\n\t\tthis.driver=driver;\n\t\teleutil=new ElementUtil(this.driver); \n\t}", "public AmazonHomePageFactory(WebDriver driver){\n\t\t\n\t\tPageFactory.initElements(driver, this);\n \n elementControl=new CommonElements();\n \n \n dropdownControl=new DropdownControl();\n \n \n\t}", "public FaceLoginPage(WebDriver driver){ // ===> Bu bir constructor\n\n this.driver = driver;\n // **** PageFactory.initElements() **** ==> page objelerini(Web element) baslatmak icin kullanilir\n PageFactory.initElements(driver, this);\n\n }", "public ExcursionPage( WebDriver driver ) {\r\n\t\r\n\t\tsuper( driver );\r\n\t}", "public LoginPage(WebDriver driver) {\r\n this.driver=driver;\r\n\t\tPageFactory.initElements(driver, this);\r\n\t}", "public LoginPage(WebDriver _driver) {\n driver = _driver;\n }", "public AmazonLandingPage(WebDriver driver) {\n\t\tthis.driver = driver;\n\t}", "public LoginPage(WebDriver driver){\n super(driver);\n PageFactory.initElements(driver, this);\n }", "public LoginPage(WebDriver driver) {\n\t this.driver = driver;\n\t }", "public TeacherPage(WebDriver driver) {\n super(driver);\n }", "public PaymentPage(WebDriver driver) {\n\t\tsuper(driver);\n\t}", "void createDriver(Driver driver);", "public BaseJourney() {\n this.driver = DriverWrapper.getDriver();\n this.initElements();\n // load properties here\n this.isIOS = driver instanceof IOSDriver;\n this.isAndroid = driver instanceof AndroidDriver;\n }", "public Page(WebDriver webDriver) {\n\t\tthis.webDriver = webDriver;\n wait = new WebDriverWait(webDriver, 10);\n\t}", "@Override\n protected void init(PageDto page, HttpServletRequest request, HttpServletResponse response, Model model) {\n\n }", "public AmazonHomePage(WebDriver driver) {\n\t\tsuper(driver);\n\t}", "public MainPage(WebDriver driver) {\n super(driver);\n }", "public BasePage(WebDriver driver)\n\t{\n\t\tpageDriver= driver;\n\t\tPageFactory.initElements(new AjaxElementLocatorFactory(driver, 25), this);\n\t}", "public TshirtsPage(WebDriver driver) {\n\t\t\tthis.driver = driver;\n\t\t}", "public Zip_Code(WebDriver driver){\n super();\n PageFactory.initElements(driver,this);\n //local page logger gets set to abstract class logger when you use it in\n //page object\n this.logger = super.logger;\n\n }", "public ListCategoryPage(WebDriver driver)\n {\n this.driver = driver;\n }", "public BuscadorPage(WebDriver pDriver) {\r\n\t\tthis.aDriver = pDriver;\r\n\t\t//this.aDriver.manage().window().maximize();\r\n\t\taccessURL();\r\n\t}", "public HomePage (WebDriver driver1)\r\n\t\t\t{\r\n\t\t\t\tPageFactory.initElements(driver1, this);\r\n\t\t\t}", "public CampoObligatorio(WebDriver driver) {\n\n this.driver = driver;\n }", "public GenericMethods(WebDriver driver) {\n\t\tthis.driver = driver;\n\t}", "public ReviewTLPage(WebDriver driver) {\r\n\t\tsuper(driver);\r\n\t}", "public TreinamentoPage() {\r\n\t\tPageFactory.initElements(TestRule.getDriver(), this);\r\n\t}", "public DashBoardPageFactory(WebDriver driver) {\n\n\t\tdriver=DriverManager.getDriver();\n\t\tPageFactory.initElements(driver, this);\n\t}", "public Page(final WebDriver webDriver) {\n\t\tthis.webDriver = webDriver;\n\t}", "public LoginPage()\n{\n\tPageFactory.initElements(driver, this);\n}", "public Homepage(WebDriver driver) {\n\t\tthis.driver=driver;\n\t}", "public WikipediaPageModel(WebDriver driver) {\r\n\t\tthis.driver = driver;\r\n\t\tPageFactory.initElements(driver, this);\r\n\t}", "protected SearchPO(AppiumDriver driver) {\n super(driver);\n }", "public void initializeDriver() {\n }", "public ReviewBookingPage(WebDriver driver){\n\t\t\tthis.driver = driver;\n\t\t\telementUtil = new ElementUtil(this.driver);\n\t\t}", "public DashboardModule(WebDriver driver) {\n\t\tPageFactory.initElements(driver, this);\n\t}", "public void setDriver(String driver) {\r\n this.driver = driver;\r\n }", "SearchResultsPage(WebDriver webDriver) {\n this.webDriver = webDriver;\n PageFactory.initElements(webDriver, this);\n }", "public SpotifyPageOne( WebDriver driver )\n {\n this.driver = driver;\n PageFactory.initElements( driver, this );\n }", "public HomePage(){\r\n\tPageFactory.initElements(driver, this);\t\r\n\t}", "PageService(UpodDao upodDao) {}", "public LandingPage(WebDriver driver) {\r\n\t\tthis.driver = driver;\r\n\t\tPageFactory.initElements(driver, this);\r\n\t}", "public BasePageObject() {\n this.driver = BrowserManager.getInstance().getDriver();\n this.wait = BrowserManager.getInstance().getWait();\n PageFactory.initElements(driver, this);\n }", "public DriverForCreateBuilder() {\r\n driverForCreate = new DriverForCreate();\r\n }", "public HomePage(WebDriver driver) {\n\t\tthis.driver = driver;\n\t\tPageFactory.initElements(driver, this); //now all Page Factory elements will have access to the driver, \n\t\t\t\t\t\t\t\t\t\t\t\t//which is need to get a hold of all the elements. w/o it, tests will fail. \n\t\t\t\t\t\t\t\t\t\t\t\t//\"this\" is referring to the Class HomePage\n\t}", "public ELogin(WebDriver driver)\r\n{\r\n\tthis.driver =driver;\r\n\t//System.out.println(\"Elogin as been instantiated\");\r\n}", "public ContactsPage(WebDriver driver){\n\t\tthis.driver=driver;\n\t\telementAction=new ElementActions(this.driver);\n\t}", "public ProfilePage(WebDriver driver) {\n super(driver);\n PageFactory.initElements(driver, this);\n }", "@Repository\npublic interface DriverMapper {\n\n List<Driver> searchalldriverinfo();\n\n Driver selectdriverbystaffid(String staff_ID);\n\n void insertDriverInfo(Driver driver);\n\n List<Driver> selectdriverbyID(Driver driver);\n\n void updatedriverbystaff_ID(Driver driver);\n\n void deldriver(String staff_ID);\n\n int delalldriver(String ID);\n\n List<Driver> selectdriverbyIDcard(Driver driver);\n\n List<Driver> selectdriverbyIDcardandname(Driver driver);\n\n List<Driver> selectdriverbyIDcardandnameandID(Driver driver);\n\n List<Driver> selectdriverbyname(Driver driver);\n\n List<Driver> selectdriverbyIDandIDcard(Driver driver);\n\n List<Driver> selectdriverbyIDandname(Driver driver);\n\n}", "public ArticlePage(WebDriver driver) {\n\t\tthis.driver = driver;\n\t\twait = new WebDriverWait(this.driver, Properties.LONG_WAIT);\n\t\tjse = (JavascriptExecutor) driver;\n\t\tPageFactory.initElements(driver, this);\n\n\t}", "public HomePage_POF(AndroidDriver<?> driver) {\n\t\tsuper(driver);\n\n\t}", "public AddCustomerPage(WebDriver driver) {\n\t\tthis.driver = driver;\n\t}", "public Driver(JSONObject userData) {\n super(userData, Persona.driver);\n }", "public PageUtil() {\n\n\t}", "public RegistrationRutPage(WebDriver driver) {\n super(driver);\n PageFactory.initElements(driver, this);\n }", "public BasePage(WebDriver pDriver) {\n PageFactory.initElements(pDriver, this);\n pDriver.manage().window().maximize();\n this.eventDriver = new EventFiringWebDriver(pDriver);\n this.eventHandler = new EventHandler();\n this.eventDriver.register(eventHandler);\n //driver = pDriver;\n }", "public Common(WebDriver driver) {\n\t\tthis.driver = driver;\n\n\t}", "public PGShowHomePage(AppiumDriver driver) throws MalformedURLException {\r\n\t\tthis.driver = driver;\r\n\t\tlstTestData = db.getTestDataObject(\"Select * from PGShowHomePage\", \"Input\");\r\n\t\tlstObject = db.getTestDataObject(\"Select * from PGShowHomePage\", \"ObjectRepository\");\r\n\t}", "protected void init(WebDriver driver) {\n }", "public loginPage(WebDriver driver) {\n this.driver = driver;\n }", "public QAPracticeFormTestNG(WebDriver driver) {\n this.driver = driver;\n this.wait = new WebDriverWait(driver,30);\n PageFactory.initElements(driver,this);\n }", "public AddContactPage(WebDriver driver) {\n\t\tthis.driver = driver;\n\t\t\n\t}", "public Payment(WebDriver driver)\n\t{\n\t\tPageFactory.initElements(driver, this);\n\t}", "public VerifyPhonePage(WebDriver driver)\n\t{\n\t\tsuper(driver);\n\t\tthis.driver= driver;\n\t\tsoftAssert = new SoftAssert();\n\t\tPageFactory.initElements(new AppiumFieldDecorator(this.driver, Duration.ofSeconds(30)),this); \n\t}", "@Test\n public void test01(){\n //Kodumuzu tamamen dinamik yapmak icin 3 dataya ihtiyacım var\n //1-locate ===> Bunları Page Class'ından obje üreterek alabilirim\n //2-Test datalari ====> Bunlar icin obje olusturmama gerek yok,\n\n //ConfigReader Class'ında hersey static oldugu icin\n //sadece Class ismi ile herseye ulabailirim\n\n driver.get(ConfigReader.getProperty(\"kr_url\"));\n\n KoalaResortLoginPage koalaResortLoginPage = new KoalaResortLoginPage(driver);\n koalaResortLoginPage.ilkLoginLink.click();\n koalaResortLoginPage.kullaniciAdi.sendKeys(ConfigReader.getProperty(\"kr_valid_username\"));\n koalaResortLoginPage.passwordTextBox.sendKeys(ConfigReader.getProperty(\"kr_valid_password\"));\n koalaResortLoginPage.loginButonu.click();\n }", "public HomePage(){\n PageFactory.initElements(driver, this);\n }", "public Step_3_Address(WebDriver driver) {\n this.addressPage=driver;\n }", "public SearchResultsPage(WebDriver page) {\n super(page);\n }", "private Driver(){\n }", "private Driver() {\n\n }", "public interface SpiderResultUrlsPoMapper extends feihua.jdbc.api.dao.CrudDao<SpiderResultUrlsPo, String> {\n}", "public Loginpage (WebDriver driver) {\n\t\tthis.driver = driver;\n\t\t\n\t\t elementutil = new ElementUtil(driver);\n\t\tthis.driver = driver;\n\t}", "public LoginPOJO() {\n\n\t\tPageFactory.initElements(driver, this);\t\n\t}", "public HomePage(WebDriver driver) {\n\t\tthis.driver= driver;\n\t\t\n\t\t//Initializing the webelements for this class\n\t\tPageFactory.initElements(driver, this);\n\t\t\n\t}", "public interface DemandSearchMapper {\n /**\n * 微信搜索\n */\n @Select(\"select count(1) from demands where demandcode like #{content} and isdelete=0 and releasestatus=1 and checkstatus='审核通过' \")\n int getWapSearchDemandCount(@Param(\"content\")String content);\n\n @Select(\"<script>\" +\n \" select * from demands where demandcode like #{content} and isdelete=0 and releasestatus=1 and checkstatus='审核通过' \" +\n \" order by id desc \" +\n \" <choose><when test='anchor==null or anchor==\\\"\\\"'>limit #{pageQuery.pagesize} offset #{pageQuery.indexNum}</when><otherwise>limit ${pageQuery.rowNum} offset 0</otherwise></choose>\" +\n \"</script>\")\n List<Demand> getWapSearchDemandList(@Param(\"content\")String content,\n @Param(\"pageQuery\") PageQueryParam param,\n @Param(\"anchor\") String scrtop);\n\n public default PageQueryParam getWapSearchDemandTotalList(String content, PageQueryParam param, String scrtop) {\n content = Where.$like$(content);\n int totalCount = getWapSearchDemandCount(content);\n List<Demand> demandList = getWapSearchDemandList(content, param, scrtop);\n int totalPage = totalCount / param.getPagesize();\n totalPage = totalCount % param.getPagesize() == 0 ? totalPage : totalPage + 1;\n param.setTotalCount(totalCount);\n param.setTotalPage(totalPage);\n param.setList(demandList);\n //如果有锚点,加载完数据,告诉前台当前是第几页\n if (org.apache.commons.lang3.StringUtils.isNotBlank(scrtop)) {\n param.setPage(param.getIndexNum() / param.getPagesize());\n }\n return param;\n }\n\n}", "public void ustaw(){\n\t driver.initialize(this);\n\t driver.edit(new DodajSerwisDTO());\n\t }", "public Banner(WebDriver driver) {\r\n\t\tsuper(driver);\r\n\t}", "public LoginPage(WebDriver driver) {\n\t\t\tthis.driver = driver;\n\t\t}", "@DisplayName(\"GET /drivers.json and save result to pojo\")\n @Test\n public void testDrivers(){\n JsonPath jp = get(\"/drivers.json\").jsonPath() ;\n Driver d1 = jp.getObject(\"MRData.DriverTable.Drivers[0]\", Driver.class) ;\n System.out.println(\"d1 = \" + d1);\n\n // Get all drivers as List<Driver>\n List<Driver> allDriver = jp.getList(\"MRData.DriverTable.Drivers\" , Driver.class) ;\n System.out.println(\"allDriver = \" + allDriver);\n\n // Print the name of all American drivers in this list\n for (Driver driver : allDriver) {\n if(driver.getNationality().equals(\"American\")){\n System.out.println(\"driver.getGivenName() = \" + driver.getGivenName());\n }\n }\n\n\n\n\n }", "@Before\r\n\tpublic final void setDriver() {\n\t\tdriver = new Wizard();\r\n\t}", "Driver getDriver();", "public Nexus_HomeLocators(WebDriver driver){\n this.driver = driver;\n }", "public HospitalsPage(DriverType driverType) {\n\n switch (driverType) {\n case ANDROID:\n appiumDriver = DeviceDriver.getAndroidDriver();\n break;\n case IOS:\n appiumDriver = DeviceDriver.getIosDriver();\n break;\n case ANDROID_SAMSUNG_S105G:\n appiumDriver = DeviceDriver.getSamsungS105GDriver();\n break;\n case ANDROID_GOOGLE_PXL4:\n appiumDriver = DeviceDriver.getPixel4ADriver();\n break;\n }\n }", "@Before(\"@Processo\")\n\tpublic void setUp() {\n\t\tSystem.setProperty(\"webdriver.ie.driver\", \"C:/SeleniumDriver/IEDriverServer.exe\");\n\t\t// Instancia o Driver Explorer\n\t\tdriver = new InternetExplorerDriver();\n\t\t// Maximiza a tela\n\t\tdriver.manage().window().maximize();\n\t\t// Abre o Ambiente DEVR2\n\t\tif (ambiente.equals(\"DEVR2\")) {\n\t\t\tdriver.get(\"http://172.20.152.47/mapfrecap//Coreon.Acesso/frmLogin.aspx\"); // DEVR2\n\t\t\t// Abre o ambiente SUS\n\t\t} else if (ambiente.equals(\"SUS\")) {\n\t\t\tdriver.get(\"http://10.206.28.128/mapfrecap/\");\n\t\t}\n\t\t// Retorna o titulo da Pagina\n\t\tSystem.out.println(driver.getTitle());\n\t\t// driver.quit();\n\t\tdriver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);\n\t}" ]
[ "0.6663328", "0.6606033", "0.658254", "0.6526439", "0.65153515", "0.65123725", "0.6430994", "0.64202946", "0.63915426", "0.63698566", "0.6354216", "0.635414", "0.6320802", "0.63128173", "0.6292587", "0.62015057", "0.61892045", "0.6168743", "0.61508316", "0.60677", "0.60626847", "0.6062076", "0.6054231", "0.60451204", "0.6021605", "0.6014235", "0.600762", "0.59866154", "0.59853137", "0.5974328", "0.5969271", "0.59678864", "0.5958738", "0.5958722", "0.5947268", "0.59440106", "0.59303564", "0.5927727", "0.5922896", "0.5912845", "0.59054327", "0.5903185", "0.5887083", "0.5879715", "0.5869236", "0.5867454", "0.5864447", "0.58588666", "0.5856457", "0.58399963", "0.58337474", "0.5832541", "0.5830973", "0.582001", "0.58164775", "0.5812575", "0.5805979", "0.58059406", "0.5797986", "0.5769208", "0.576471", "0.57541007", "0.57470435", "0.57449317", "0.5744399", "0.5741932", "0.5740463", "0.57373405", "0.5734298", "0.5729269", "0.5727047", "0.57127273", "0.57122946", "0.56942785", "0.5683697", "0.56676155", "0.56617594", "0.56600916", "0.5658528", "0.56549776", "0.56436074", "0.5628204", "0.5608302", "0.5601811", "0.5601493", "0.55993754", "0.5596402", "0.559071", "0.55840033", "0.55758375", "0.55690736", "0.5555247", "0.55389434", "0.55388653", "0.55253756", "0.5519502", "0.5516792", "0.5497843", "0.5497747", "0.5490015" ]
0.73815924
0
A simple service method.
public String sayHello() { return "hello"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void service() {\n\t}", "Service newService();", "public void doService() {\n }", "private static interface Service {}", "public interface Service {\n // Service-specific methods go here\n }", "@Override\r\n\t\t\tpublic String doService(String param) {\n\t\t\t\treturn null;\r\n\t\t\t}", "public interface HelloService {\n\n String greet (String userName);\n\n}", "private Service() {}", "void service() {\n System.out.println(\"Doing some work\");\n }", "public interface HelloService {\n\n String sayHello(String name);\n\n}", "public interface DemoService {\n\n String sayHello(String name);\n}", "public interface DemoService {\n String sayHello(String name);\n}", "public interface HelloService {\n\n String sayHello(String name);\n}", "public interface HelloService {\n\n String hello(String userName);\n}", "public interface HelloService {\n String hello(String name);\n}", "public interface Service {\n\n}", "public interface Service {\n\n}", "public interface DemoService {\n String echo(String src);\n}", "public Service(){\n\t\t\n\t}", "public interface DemoService {\n\n String query(String name, String age);\n}", "public interface HelloService {\n\n void sayHello(String name);\n}", "public interface HelloService {\n\n void sayHello(String name);\n}", "public interface HelloService {\n\n public void sayHello(String name);\n}", "@Override\n\tprotected void service(HttpServletRequest arg0, HttpServletResponse arg1)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.service(arg0, arg1);\n\t}", "public interface DubboEchoService {\n\n String echo(String name);\n}", "public interface EchoService {\n String echo(String string);\n}", "public interface IHelloservice {\n public String sayHello(String name);\n}", "java.lang.String getService();", "java.lang.String getService();", "java.lang.String getService();", "public interface HelloService {\n String hello(User user);\n}", "public interface SaludaService{\n public String saluda(String nombre);\n}", "public interface DemoService {\n String sayHello(String name);\n\n public List getUsers();\n}", "public interface MineService {\n}", "public void testSetService() throws Exception {\n }", "go.micro.runtime.RuntimeOuterClass.Service getService();", "go.micro.runtime.RuntimeOuterClass.Service getService();", "go.micro.runtime.RuntimeOuterClass.Service getService();", "Fog_Services createFog_Services();", "public interface TestService {\n void test();\n String testService(String str);\n}", "public interface TestService {\n String test();\n}", "public Object getService(String serviceName);", "Object getService(String serviceName);", "public TestService() {}", "public AddFavouriteService() {\n super(\"AddFavouriteService\");\n }", "public void service_INIT(){\n }", "@Override\n protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.service(req, resp);\n logger.log(Level.INFO, \"service(req, resp) Invoked\");\n }", "public interface Service {\n /**\n * Processes a query, returning result as a string.\n */\n String processQuery(String query);\n }", "public interface TearcherInfoService extends Service<TearcherInfo> {\n\n}", "public interface HelloService {\n HelloEntity sayHello(HelloEntity entity);\n}", "@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.service(req, resp);\r\n\t}", "public static void main(String[] args) {\n DepartmentServiceimpl deptservice=new DepartmentServiceimpl();\n Department deptobj=new Department();\n \n deptobj.setDepartmentNumber(22);\n deptobj.setDepartmentName(\"com\");\n deptobj.setDepatmentLocation(\"pune\");\ndeptservice.createDepartmentService(deptobj);\n\n}", "Service(){\r\n\t\tserviceName =\"x\";\r\n\t\tserviceID = 0;\r\n\t\tserviceFee = 0.0;\r\n\t\tserviceDescrp = \"zztop\";\r\n\t}", "public CallService() {\n super(\"My\");\n }", "public interface GoodStyleService extends Service<GoodStyle> {\n\n}", "public static void main(String[] args) {\n\t\t\r\n\t\tUserService service = new UserService();\r\n\t\tservice.method1();\r\n\r\n\t}", "@Override\n\t\tpublic String buildBasicService() {\n\t\t\treturn bulidService();\n\t\t}", "public interface IService {\n //1.被调用的服务中的方法\n public void BeCalledMethod();\n\n}", "@Override\n\tpublic void service(ServletRequest arg0, ServletResponse arg1) throws ServletException, IOException {\n\t\tservice((HttpServletRequest) arg0, (HttpServletResponse) arg1);\n\t}", "public interface SmartCultureFarmService extends Service<SmartCultureFarm> {\n\n}", "public void saveService();", "@Override\n\tpublic void service(ServletRequest req, ServletResponse res)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}", "@Override\n\tpublic void service(ServletRequest arg0, ServletResponse arg1)\n\t\t\tthrows ServletException, IOException\n\t{\n\t\tsuper.service(arg0, arg1);\n\t\trenewObject(arg0, arg1);\n\t\tout.print(\"do my service\");\n\t}", "public SunshineService(String name) {\n super(\"SunshineService\");\n\n }", "public interface DemoService {\n\n public String print1(String arg1, String arg2);\n\n public String print2(String arg1, String arg2);\n\n}", "public interface NoticeService {\n /**\n * 根据手机号获取用户信息\n * */\n public ServiceResult<Notice> getByMobile(String mobile);\n}", "public interface TestService {\n\n}", "String serviceEndpoint();", "public interface HaService {\n\n String ha();\n}", "@Override\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.service(req, resp);\n\t}", "public interface TestService {\n\n int getInt(int count);\n void print(int count);\n void asyncPrint(int count);\n void testJPA();\n \n String getGreeting();\n}", "public interface ITestService {\n public String test(String name);\n}", "public void setService (String service) {\n\t this.service = service;\n\t}", "public interface TestService {\n void test();\n}", "private void initService() {\r\n\t}", "public static String _service_create() throws Exception{\nreturn \"\";\n}", "public interface PaTaskItemPointViewService extends Service<PaTaskItemPointView> {\n\n}", "public interface AlarmDataEnvService extends Service<AlarmDataEnv> {\n\n}", "public interface ControllcurveService extends Service<Controllcurve> {\n\n}", "public interface StadiumService {\n @POST(\"stadium/\")\n Call<JsonObject> createStadium(@Body Stadium stadium);\n\n @GET(\"stadium/\")\n Call<JsonObject> getAllStadiums();\n\n @GET(\"stadium/{id}\")\n Call<JsonObject> getStadium(@Path(\"id\") String id);\n\n @GET(\"stadium/byname/{name}\")\n Call<JsonObject> getStadiumsByName(@Path(\"name\") String name);\n\n @GET(\"stadium/bylocation/{location}\")\n Call<JsonObject> getStadiumsByLocation(@Path(\"location\") String location);\n}", "private WebServicesFabrica(){}", "ServiceEntity getService();", "public interface TestService {\n}", "void addService(ServiceInfo serviceInfo);", "public interface BookOnAppointmentService extends IService<BookOnAppointment> {\n BookOnAppointment book(ZegnaModel model);\n\n boolean isBooked(Integer memberId);\n\n void logMember(ZegnaModel model);\n}", "public interface SeatService extends Service {\r\n\t/**\r\n\t * gets all seats with their states by film session id\r\n\t * \r\n\t * @param filmSessionId\r\n\t * film session id\r\n\t * @return list of seats with their states\r\n\t */\r\n\tList<Seat> getSeatsWithState(int filmSessionId);\r\n\r\n\t/**\r\n\t * check is seat free\r\n\t * \r\n\t * @param seatId\r\n\t * checking seat id\r\n\t * @param filmSessionId\r\n\t * film session id\r\n\t * @return {@code true} if seat free, {@code false} otherwise\r\n\t */\r\n\tboolean isSeatFree(int seatId, int filmSessionId);\r\n\r\n\t/**\r\n\t * gets seat by id\r\n\t * \r\n\t * @param seatId\r\n\t * seat id\r\n\t * @return found seat\r\n\t */\r\n\tSeat getSeat(int seatId);\r\n\r\n}", "abstract protected void doService(HttpServletRequest request,\r\n\t\t\t\t\t\t\t\t\t HttpServletResponse response) throws ServletException, IOException,ApplicationException;", "public interface UniversityService extends Service {\n\n String SERVICE_NAME = \"university\";\n\n @SuppressWarnings(\"OptionalUsedAsFieldOrParameterType\")\n ServiceCall<NotUsed, PCollection<StudentData>> getStudents(\n Optional<String> firstName,\n Optional<String> middleName,\n Optional<String> lastName,\n Optional<LocalDate> birthday,\n Optional<String> group\n );\n\n ServiceCall<StudentData, StudentData> createStudent();\n\n @Override\n default Descriptor descriptor() {\n return named(SERVICE_NAME).withCalls(\n restCall(Method.GET,\n \"/api/\" + SERVICE_NAME + \"/students?firstName&middleName&lastName&birthday&group\",\n this::getStudents\n ),\n restCall(Method.POST,\n \"/api/\" + SERVICE_NAME + \"/students\",\n this::createStudent\n ))\n .withAutoAcl(true)\n .withPathParamSerializer(LocalDate.class, new LocalDatePathParamSerializer());\n }\n}", "public interface UserService {\n void sayName();\n}", "public interface ServiceIface {\n void service();\n}", "private static void startService() {\n //noinspection deprecation\n setPort(configuration.getPort());\n get(\":version/route/:user\", (request, response) -> {\n try {\n String apiVersion = request.params(\":version\");\n String user = request.params(\":user\");\n String version = request.headers(\"version\"); \n if (!isValidApiVersion(apiVersion)) {\n response.status(400);\n return new RouteResponse(\"Wrong API version\", \"400\", \"\");\n }\n return new RouteResponse(splitter.getGroupForUser(user)); // no overhead measured compared to using string concat or StringBuilder\n } catch (Exception e) {\n logger.error(\"Problem serving the request.\", e);\n response.status(500);\n return new RouteResponse(e.getMessage(), \"500\", \"\");\n }\n }, new JsonTransformer());\n }", "@Service\r\npublic interface UserService {\r\n\r\n int addUser(User user);\r\n}", "public interface Service {\n\t/**\n\t * Method stub to get the service appointment.\n\t *\n\t * @return The service appointment.\n\t */\n\tabstract public Date getServiceAppointment();\n\n\t/**\n\t * Method stub to get the servicing interval.\n\t *\n\t * @return The servicing interval.\n\t */\n\tabstract public int getServiceInterval();\n\n\t/**\n\t * Method stub to set the service appointment.\n\t *\n\t * @param serviceAppointment The service appointment as Date object.\n\t */\n\tabstract public void setServiceAppointment(Date serviceAppointment);\n\n\t/**\n\t * Method stub to set the servicing interval.\n\t *\n\t * @param serviceIntervalDays Servicing interval in days.\n\t */\n\tabstract public void setServiceInterval(int serviceIntervalDays);\n}", "public interface OurService {\n\n static public void provideService(){\n System.out.println(\"OurService Static provideService()\");\n }\n}", "public interface PredictsService extends Service<Predicts> {\n\n}", "public interface ProductService extends Service {\n\n\t/**\n\t * Example: curl http://localhost:9000/api/product/Alice\n\t */\n\tServiceCall<NotUsed, String> product(String id);\n\n\t/**\n\t * Example: curl -H \"Content-Type: application/json\" -X POST -d '{\"message\":\n\t * \"Hi\"}' http://localhost:9000/api/product/Alice\n\t */\n\tServiceCall<Product, NotUsed> create();\n\n\t@Override\n\tdefault Descriptor descriptor() {\n\t\t// @formatter:off\n\t\treturn named(\"product\")\n\t\t\t\t.withCalls(pathCall(\"/api/product/:id\", this::product), pathCall(\"/api/product\", this::create))\n\t\t\t\t.withAutoAcl(true);\n\t\t// @formatter:on\n\t}\n}", "@Test\n public void testGetName() {\n String result = service.getName();\n assertEquals(\"Servis\", result);\n \n }", "@GetMapping(\"/service\")\n\tpublic String showService() {\n\t\treturn \"service\";\n\t}", "@Override\n\tpublic void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {\n PrintWriter out = res.getWriter();\n\t\t\n\t\tout.println(\"Hello World aggaaahhh\");\n\t\tout.println(\"First USe !!!\");\n\t}", "@Override\r\n\tpublic void service(Request request,Response response) {\n\t\tresponse.print(\"lalaa\");\r\n\r\n\t\t\r\n\t}", "public StartedService() {\n super(\"StartedService\");\n }" ]
[ "0.8104889", "0.77395886", "0.7707464", "0.7633129", "0.7247926", "0.71458924", "0.70356244", "0.70109016", "0.69967157", "0.6963439", "0.69564456", "0.69221514", "0.6915184", "0.6913653", "0.6893706", "0.6893555", "0.6893555", "0.6825689", "0.6809933", "0.6800109", "0.6799468", "0.6799468", "0.67392325", "0.6736477", "0.6710974", "0.6689906", "0.66794163", "0.664737", "0.664737", "0.664737", "0.6638236", "0.6638168", "0.66324943", "0.6624157", "0.6602515", "0.6590801", "0.6590801", "0.6590801", "0.6545456", "0.65130574", "0.6511956", "0.64868367", "0.64813364", "0.6472063", "0.64595807", "0.6455501", "0.6449435", "0.6448769", "0.6446807", "0.6444653", "0.6442417", "0.6441826", "0.6438873", "0.6437667", "0.64341646", "0.64202017", "0.64167875", "0.6415915", "0.6409491", "0.640855", "0.6407266", "0.64060503", "0.6401587", "0.6394999", "0.6390353", "0.63769317", "0.6368824", "0.6368525", "0.63456535", "0.63353455", "0.63178945", "0.6313067", "0.63006806", "0.6284648", "0.62842786", "0.62807673", "0.6280117", "0.627527", "0.627278", "0.6261366", "0.6255485", "0.6250584", "0.62445605", "0.6241595", "0.6235323", "0.623132", "0.62288696", "0.6225502", "0.62229794", "0.62225175", "0.6219902", "0.6215369", "0.6210677", "0.6209722", "0.6194233", "0.6193564", "0.6192419", "0.61891174", "0.6188607", "0.6185094", "0.6183295" ]
0.0
-1
Created by Dartlen on 31.12.2017.
public interface Condition { boolean isSatisfied(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@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 public int describeContents() { return 0; }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void nadar() {\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 init() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo38117a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {}", "private void m50366E() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void init() {}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tprotected void getExras() {\n\n\t}", "private void init() {\n\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 jugar() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private Rekenhulp()\n\t{\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override public int describeContents() { return 0; }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void one() {\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 protected void init() {\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\tpublic void init() {\n\t}", "private void strin() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "Petunia() {\r\n\t\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n protected void getExras() {\n }", "public void m23075a() {\n }", "Consumable() {\n\t}", "public void mo6081a() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}" ]
[ "0.5836824", "0.57229733", "0.56198186", "0.5581588", "0.5577702", "0.55331296", "0.5518959", "0.5518959", "0.5491614", "0.541637", "0.54148227", "0.53975284", "0.5384085", "0.53780967", "0.53780967", "0.53780967", "0.53780967", "0.53780967", "0.53688157", "0.53677726", "0.5367017", "0.5363462", "0.53567976", "0.5349409", "0.534672", "0.5342014", "0.5340077", "0.53355116", "0.5332425", "0.532783", "0.5322529", "0.5316375", "0.5314918", "0.5294011", "0.5286433", "0.5286433", "0.5286433", "0.5286433", "0.5286433", "0.5286433", "0.5276861", "0.52742887", "0.5273634", "0.52716935", "0.52686304", "0.52686304", "0.52573276", "0.52443635", "0.52408224", "0.52408224", "0.52408224", "0.5232845", "0.52321", "0.52321", "0.5228269", "0.5218282", "0.52144307", "0.52138984", "0.52113265", "0.52072984", "0.5201412", "0.5201412", "0.5201412", "0.520002", "0.5194102", "0.5194102", "0.5194102", "0.5184402", "0.51830584", "0.51813364", "0.517879", "0.51759636", "0.51751304", "0.5173842", "0.51665884", "0.51665884", "0.51665884", "0.51665884", "0.51665884", "0.51665884", "0.51665884", "0.5164277", "0.5163662", "0.5163662", "0.5142199", "0.5141548", "0.51368815", "0.51368815", "0.51368815", "0.51364803", "0.5135413", "0.5132677", "0.51269895", "0.5121012", "0.51106346", "0.51053554", "0.51011443", "0.5091675", "0.50829554", "0.5081772", "0.5081205" ]
0.0
-1
the host and the port to connect to
public static void main(String[] args) throws Exception { final String hostname; final int port; try { final ParameterTool params = ParameterTool.fromArgs(args); //reads the arguments hostname = params.has("hostname") ? params.get("hostname") : "localhost"; //@ Tushar: here we are providing port as 9000 coz we started the program on 9000(netcat) -> nc -l 9000 port = params.getInt("port"); } catch (Exception e) { System.err.println("No port specified. Please run 'SocketWindowWordCount " + "--hostname <hostname> --port <port>', where hostname (localhost by default) " + "and port is the address of the text server"); System.err.println("To start a simple text server, run 'netcat -l <port>' and " + "type the input text into the command line"); return; } // get the execution environment // @Tushar: providing the context in which the flink program will execute final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); // get input data by connecting to the socket //@Tushar: this is nothing but to // -create Datastream /Datset object //provide a source, here we are creating a socket text stream here DataStream<String> text = env.socketTextStream(hostname, port, "\n"); /*@Tushar: Data Transformations - parsing the data, - group it, window it, and aggregate the counts */ DataStream<WordWithCount> windowCounts = text .flatMap(new FlatMapFunction<String, WordWithCount>() { //@Tushar --> flatMap: Takes one element and produces zero, one, or more elements. A flatmap function that splits sentences to words @Override public void flatMap(String value, Collector<WordWithCount> out) { for (String word : value.split("\\s")) { System.out.println("value of word is :::::::::::::::::::::::" + word); out.collect(new WordWithCount(word, 1L)); } } }) /*@tushar: Logically partitions a stream into disjoint partitions. All records with the same key are assigned to the same partition. Internally, keyBy() is implemented with hash partitioning*/ .keyBy("word") /*Tushar: Window is applicable when u r working on stream and u have to perform some aggregate functions, here we are usng window based on time (not data also known as element) */ .timeWindow(Time.seconds(5)) .reduce(new ReduceFunction<WordWithCount>() { @Override /* @Tushar: A "rolling" reduce on a keyed data stream. * Combines the current element with the last reduced value and emits the new value. */ public WordWithCount reduce(WordWithCount a, WordWithCount b) { return new WordWithCount(a.word, a.count + b.count); } }); // print the results with a single thread, rather than in parallel windowCounts.print().setParallelism(1); /*@Tushar: Invoke the sink * All Flink programs are executed lazily, execute() will invoke the data loading as well as the transformations. */ env.execute("Socket Window WordCount"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ReaderHelper connectNet(final String host, final int port);", "public void newConnection(String hostname, int port) throws Exception;", "public void connect() {\n\t\ttry {\n\t\t\tsocket = new Socket(host, port);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error connecting: \" + e.getMessage());\n\t\t}\n\t}", "public Client(String h, int p) {\n\t\thost = h;\n\t\tport = p;\n\t}", "public abstract void connect() throws UnknownHostException, IOException;", "protected void connect(String host, int port) throws IOException {\n connect(InetAddress.getByName(host), port);\n }", "public ServerConnection()\n {\n //Initializing of the variables used in the constructor\n this.hostAddress = \"http://localhost\";\n this.port = 8882;\n }", "ClientConnection connection();", "public void socketConnect(String ip, int port) throws UnknownHostException, \n IOException{\n System.out.println(\"[Connecting to socket...]\"); \n SSocket.socket= new Socket(ip, port); \n \n System.out.println(\"CORRIENDO EN EL PUERTO:\"+SSocket.socket.getLocalAddress()+\":\"+SSocket.socket.getPort());\n }", "public Socket connect() {\r\n\t\ts = null;\r\n\t\ttry {\r\n\t\t\ts = new Socket(hostName, port);\r\n\t\t\tdos = Utils.deflatedDataOut(s.getOutputStream(), 8);\r\n\t\t} catch (UnknownHostException 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}\r\n\t\treturn s;\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t}", "String host();", "String getHost();", "public static Connection connect(){\n\t\ttry {\n\t\t\tadd = Configure.getADDRESS();\n\t\t\tconn = ConnectionFactory.getConnect(add, Configure.port, \"TCP\");\n\t\t} catch (Exception e) {\n\t\t\tConfigure.logger.error(e.getMessage());\n\t\t\t//System.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\t//System.exit(0);\n\t\t}\n\t\treturn conn;\n\t}", "Client(String host, int port) {\n super(host, port);\n }", "public Socket connect() {\n\t\ttry{\n\t\t connection = new Socket(serverAddress, port);\n\t\t System.out.println(\"Connessione aperta\");\n\t\t}\n\t\tcatch(ConnectException e){\n\t\t System.err.println(\"Server non disponibile!\");\n\t\t}\n\t\tcatch(UnknownHostException e1){\n\t\t System.err.println(\"Errore DNS!\");\n\t\t}\t\t\n\t\tcatch(IOException e2){//\n\t\t System.err.println(e2);\n\t\t e2.printStackTrace();\n\t\t}\n\t\treturn connection;\n }", "default String getHost()\n {\n return getString( \"host\", \"localhost:80\");\n }", "Host getHost();", "protected Socket connectHost() throws KVException {\n try {\n \treturn new Socket(this.server, this.port);\n } catch (UnknownHostException uhe) {\n \tthrow new KVException(ERROR_COULD_NOT_CONNECT);\n } catch (IOException ioe) {\n \tthrow new KVException(ERROR_COULD_NOT_CREATE_SOCKET);\n }\n }", "public void join(String host, int port);", "public String getHost();", "public String getHost();", "public void connect(String host, int port) throws IllegalStateException,\n \t\t\tIOException, JHGDException {\n \t\t// Check if the client is already connected\n \t\tif (connected) {\n \t\t\tthrow new IllegalStateException(\"Client already connected to \"\n \t\t\t\t\t+ host + \" on port \" + port);\n \t\t}\n \n \t\t// Open socket\n \t\topenSocket(host, port);\n \n \t\tString returnMessage = (String) input.readLine();\n \n \t\tif (checkServerResponse(returnMessage) != HGDConsts.SUCCESS) {\n \t\t\tthrow new JHGDException(returnMessage.substring(returnMessage\n \t\t\t\t\t.indexOf('|') + 1));\n \t\t}\n \t\t\n \t\tString protocolVersion = requestProto();\n \t\tif ( !protocolVersion.equalsIgnoreCase(HGDConsts.PROTOCOLVERSION)) {\n \t\t\tthrow new JHGDException(\"Incompatible protocols. Client: \" + HGDConsts.PROTOCOLVERSION + \", Daemon: \" + protocolVersion);\n \t\t}\n \t\t\n \t\t// set the flags\n \t\tthis.connected = true;\n \t\tthis.authenticated = false;\n \t\tthis.host = host;\n \t\tthis.port = port;\n \t\tthis.username = null;\n \t\tthis.password = null;\n \t\t\n \t}", "public void connect();", "public void connect();", "public void connect();", "private void openConnection(String host){\n try {\n this.socket = new Socket(host, PORT);\n this.fromServer = new DataInputStream(socket.getInputStream());\n this.toServer = new DataOutputStream(socket.getOutputStream());\n\n } catch (SecurityException e){\n report(\"Connect is not allowed\");\n } catch (UnknownHostException e) {\n report(\"the ip address is not found.\");\n } catch (IOException e){\n report(\"Can not connect to the server\\\"\"+host+\"\\\"\");\n }\n }", "public static void doConnect() {\r\n\t\tlogger.info(\"Connecting to server......\");\r\n\t\tChannelFuture future = null;\r\n\t\ttry {\r\n\t\t\tfuture = bootstrap.connect(new InetSocketAddress(host, port));\r\n\t\t\tfuture.addListener(channelFutureListener);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t// future.addListener(channelFutureListener);\r\n\t\t\tlogger.warn(\"Closed connection.\");\r\n\t\t}\r\n\r\n\t}", "public void connect() {}", "public SocketChannelTarantoolConnection() {\n\t\tthis(\"localhost\", 33013);\n\t}", "public Client(String hostname, int port) {\n _host_name = hostname;\n _port = port;\n }", "public AbstractClient(String host, int port) {\n // Initialize variables\n this.host = host;\n this.port = port;\n }", "public TCPCanSocket(String host, int port) throws IOException {\n \tthis(new Socket(host,port));\n \tSystem.out.println(\"Opening client socket: \" + host + \" \"+ Integer.toString(port));\n }", "public void connect() {\n\t\ttry {\n\t\t\tconnection = new Socket(ip, serverPort); // 128.39.83.87 // 127.0.0.1\n\t\t\t\n\t\t\toutput = new BufferedWriter(new OutputStreamWriter(\n connection.getOutputStream()));\n\t\t\tinput = new BufferedReader(new InputStreamReader(\n connection.getInputStream()));\n\t\t\t\n\t\t\tif (hostName.equals(Constants.IDGK + Main.userName))\n\t\t\t\tsendText(\"1\" + Main.userName);\n\t\t\telse\n\t\t\t\tsendText(\"2\" + Main.userName);\n\t\t\t\n\t\t} catch (UnknownHostException e) {\n\t\t\tMain.LOGGER.log(Level.SEVERE, \"Error connecting server\", e);\n\t\t} catch (IOException e) {\n\t\t\tMain.LOGGER.log(Level.WARNING, \"Error making output/input\", e);\n\t\t}\n\t}", "java.lang.String getHost();", "java.lang.String getHost();", "public void connect(String host, int port) throws IOException {\n\n\t\tthis.host = host;\n\n\t\t/**\n\t\t * Open my socket to the specified host at the default port.\n\t\t */\n\t\tsocket = new Socket(host, port);\n\n\t\t/**\n\t\t * Create the output stream.\n\t\t */\n\t\tostream = new BufferedOutputStream(socket.getOutputStream());\n\n\t\t/**\n\t\t * Create the input stream.\n\t\t */\n\t\tistream = new BufferedInputStream(socket.getInputStream());\n\t}", "private void establishConnection() throws UnknownHostException, \n \t\t\t\t\t\t\t\t\t\t IOException {\n \t socket = new Socket(serverIP, serverPort);\n }", "public String getHost() { return host; }", "private void connect(){\n // Averiguem quina direccio IP hem d'utilitzar\n InetAddress iAddress;\n try {\n iAddress = InetAddress.getLocalHost();\n String IP = iAddress.getHostAddress();\n\n //Socket sServidor = new Socket(\"172.20.31.90\", 33333);\n sServidor = new Socket (String.valueOf(IP), 33333);\n doStream = new DataOutputStream(sServidor.getOutputStream());\n diStream = new DataInputStream(sServidor.getInputStream());\n } catch (ConnectException c){\n System.err.println(\"Error! El servidor no esta disponible!\");\n System.exit(0);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public int connect (SocketAddress addr)\n throws IOException,IllegalArgumentException\n {\n InetSocketAddress inetSockAddr = (InetSocketAddress) addr;\n int remotePort = inetSockAddr.getPort();\n InetAddress inetAddr = inetSockAddr.getAddress();\n String remoteHost = inetAddr.getHostAddress();\n //System.out.println(\"Debug wrapper: host \" + remoteHost + \" port \" + remotePort);\n return connectNative (remoteHost, remotePort);\n }", "String getConnection();", "String getConnection();", "String getConnection();", "String getConnection();", "default String getHost() {\n return \"localhost\";\n }", "public abstract boolean Connect(String Host, int port) throws TransportLayerException, InvalidNetworkLayerDeviceException, CommunicationException, LowLinkException;", "HostPort hostPort();", "int serverPort ();", "static Wrapper connect(HostPort hostPort) throws IOException {\n\t\t@SuppressWarnings(\"resource\")\n\t\tSocket socket = new Socket(hostPort.host, hostPort.port);\n\t\ttry {\n\t\t\treturn wrap(socket);\n\t\t} catch (RuntimeException | IOException e) {\n\t\t\tsocket.close();\n\t\t\tthrow e;\n\t\t}\n\t}", "public void connect(String ip,int port){\r\n this.ip = ip;\r\n this.port = port;\r\n try {\r\n socket = new Socket(ip,port);\r\n System.out.println(\"Connected with \"+ip+\":\"+port);\r\n ClientListener listener = new ClientListener(socket,this.receivedMessages);\r\n Thread listenerThread = new Thread(listener);\r\n listenerThread.start();\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Creating new connection....\");\r\n }\r\n }", "public WOHTTPConnection(java.lang.String aHost, int portNumber){\n //TODO codavaj!!\n }", "public void init(){\n taskClient.connect(\"127.0.0.1\", 9123);\n }", "public TCPRequest(String host, int port) {\n this.host = host;\n this.port = port;\n try {\n this.clientSock = new Socket(this.host, this.port);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void openSocket(String host, int port) throws IOException {\n \t\t// Debug - attempting connection\n \n \t\tclientSocket = new Socket(InetAddress.getByName(host), port);\n \n \t\toutput = new BufferedWriter(new OutputStreamWriter(\n \t\t\t\tclientSocket.getOutputStream()));\n \t\toutput.flush();\n \n \t\tfileOutput = new BufferedOutputStream(clientSocket.getOutputStream());\n \n \t\tinput = new BufferedReader(new InputStreamReader(\n \t\t\t\tclientSocket.getInputStream()));\n \n \t\t// Debug - done\n \t}", "public void connect() {\n try {\n socket = connectToBackEnd();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "public Reply connect(String connectAddress, int connectPort) throws ThingsException, InterruptedException;", "public String getHost( ) {\n return props.getProperty(HOST, \"localhost\");\n }", "void connect() throws UnknownHostException, IOException {\n\t\tif (isConnected()) {\n\t\t\tdisconnect();\n\t\t}\n\t\t\n\t\tif (!ssl) {\n\t\t\tsock = new Socket();\n\t\t} else {\n\t\t\tsock = SSLSocketFactory.getDefault().createSocket();\n\t\t}\n\t\tsock.connect(new InetSocketAddress(host, port));\n\t\t\n\t\tif (sock != null) {\n\t\t\tsock.setKeepAlive(true);\n\t\t\tinStream = new UByteInputStream(new BufferedInputStream(sock.getInputStream(), sock.getReceiveBufferSize()));\n\t\t\tconnected();\n\t\t}\n\t}", "public static void establishConnection() {\n try {\n PropertiesLoader loader = new PropertiesLoader();\n String sshUser = loader.loadProperty().getProperty(\"sshUser\");\n String sshPassword = loader.loadProperty().getProperty(\"sshPassword\");\n String sshHost = loader.loadProperty().getProperty(\"sshHost\");\n int sshPort = Integer.parseInt(loader.loadProperty().getProperty(\"sshPort\"));\n String remoteHost = loader.loadProperty().getProperty(\"remoteHost\");\n int localPort = Integer.parseInt(loader.loadProperty().getProperty(\"localPort\"));\n int remotePort = Integer.parseInt(loader.loadProperty().getProperty(\"remotePort\"));\n\n String dbUrl = loader.loadProperty().getProperty(\"dbUrl\");\n String dbUser = loader.loadProperty().getProperty(\"dbUser\");\n String dbPassword = loader.loadProperty().getProperty(\"dbPassword\");\n\n DatabaseManager.doSshTunnel(sshUser, sshPassword, sshHost, sshPort, remoteHost, localPort, remotePort);\n connection = DriverManager.getConnection(dbUrl, dbUser, dbPassword);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "public void connect(String hostname, short port) throws CopsPepException {\n Socket socket = null;\n try {\n socket = new Socket(hostname, port);\n connections.put(hostname + port, socket);\n } catch (UnknownHostException uhe) {\n CopsPepException cpe = new CopsPepException(uhe, ERR_PARAMS);\n throw cpe;\n } catch (IOException ioe) {\n CopsPepException cpe = new CopsPepException(ioe, ERR_CONTACT);\n throw cpe;\n } catch (Exception e) {\n CopsPepException cpe = new CopsPepException(e, ERR_INTERNAL);\n throw cpe;\n }\n rt = new RecvThread(socket, cmh, getMsgParser(socket));\n rt.start();\n }", "public void connect(String host) throws IllegalStateException,\n \t\t\tIOException, JHGDException {\n \t\tconnect(host, HGDConsts.DEFAULT_PORT);\n \t}", "public String getConnection();", "public LiteClient(String hostName, int port) {\r\n\t\tsuper();\r\n\t\tthis.hostName = hostName;\r\n\t\tthis.port = port;\r\n\t\tinit();\r\n\t}", "private void connectToServer() {\n\t\ttry {\n\t\t\tsocket = new Socket(InetAddress.getLocalHost(), Server.SERVER_PORT);\n\t\t\tin = new BufferedReader(new InputStreamReader(\n\t\t\tsocket.getInputStream()));\n\t\t\tout = new PrintWriter(socket.getOutputStream());\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"CLIENT: Cannot connect to server\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}", "private synchronized int srvConnect() {\n \n\t\ttry {\n\t\t\t// The address to connect to\n\t\t\tSystem.out.println(TAG + \":Address:\" + getAddress());\n\t\t\tSystem.out.println(TAG + \":Port:\" + String.valueOf(getPort()));\n\t\t\taddr = InetAddress.getByName(getAddress());\n\t\t\t// The address plus the port\n\t\t\tservAddress = new InetSocketAddress(addr, getPort());\n\n\t\t\t// Try to connect\n\t\t\tmysock = new Socket();\n\t\t\t// This socket will block/ try connect for 5s\n\t\t\tmysock.connect(servAddress, 5000);\n\t\t\t// Show me if i was connected successfully\n\t\t\tif (mysock.isConnected()) {\n\t\t\t\tif(out == null){\n\t\t\t\t\tout = new PrintWriter(mysock.getOutputStream(),true);\n\t\t\t\t\tSystem.out.println(TAG + \":New socket and new streamer was created.\");\n\t\t\t\t}\n\t\t\t}\n \n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.out.println(TAG + \":Null Pointer occured.\");\n\t\t\treturn -1;\n\t\t} catch (UnknownHostException e) {\n\t\t\tSystem.out.println(TAG + \":Server does not exist.\");\n\t\t\treturn -1;\n\t\t} catch (IOException e) {\n\t\t\tif (e instanceof SocketException && e.getMessage().contains(\"Permission denied\")) {\n\t\t\t\tSystem.out.println(TAG + \":You don't have internet permission:\" + e);\n\t\t\t} else if(e instanceof ConnectException && e.getMessage().contains(\"Connection refused\")){\n\t\t\t\tSystem.out.println(TAG + \":Connection is refused, the service on the server is probably down:\" + e);\n\t\t\t} else {\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.out.println(TAG + \":Could not connect\");\n\t\t\t}\n\t\t\treturn -1;\n\t\t}\n \n\t\treturn 0;\n\t}", "public int getPort() { return port; }", "TCPClient(String synapseHost, String synapsePort) {\n\n try {\n clientSocket = new Socket(synapseHost, Integer.parseInt(synapsePort));\n if (getLog().isDebugEnabled()) {\n getLog().debug(\"TCP socket connection has been established\");\n }\n\n } catch (IOException e) {\n if (getLog().isDebugEnabled()) {\n getLog().error(\"Error in initializing the socket\", e);\n }\n getLog().error(\"Error in initializing the socket - Connection refused\");\n getLog().error(\"Please check unit testing server has been started or not\");\n }\n }", "public SocketClient(String hostName, Integer port) {\n\t\tthis.hostName = hostName;\n\t\tthis.port = port;\t\t\n\t\t\n\t\tsocket = new Socket();\n\t\t\n\t\tresponseHandlers = new HashMap<ResponseType, ResponseHandler>();\n\t\taddResponseHandlers();\n\t\t\n\t\tsetPwdByOS();\t\n\t}", "public Connection(String host, int port) throws UnknownHostException, IOException {\n socket = new Socket(host, port);\n }", "public String getHost() {\r\n return host;\r\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "@Override\n public boolean connect() {\n\n if (!isConnected) {\n try {\n\n Socket socket = new Socket(hostName, portNumber);\n out = new PrintWriter(socket.getOutputStream(), true);\n in = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n isConnected = true;\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n return isConnected;\n }", "public int getPort()\n {\n return port;\n }", "public String host() {\n return host;\n }", "java.lang.String getRemoteHost();", "public void connectToExternalServer()\n\t{\n\t\tbuildConnectionString(\"10.228.6.204\", \"\", \"ctec\", \"student\");\n\t\tsetupConnection();\n\t\t// createDatabase(\"Kyler\");\n\t}", "private static SocketChannel openConnection(int port)\n {\n SocketChannel socketChannel;\n InetSocketAddress address = new InetSocketAddress(Utils.ADDRESS, port);\n try\n {\n socketChannel = SocketChannel.open();\n socketChannel.connect(address);\n\n //aspetto che termini la connessione\n while (!socketChannel.finishConnect())\n {continue;}\n }\n catch(IOException ioe)\n {\n System.err.println(\"Error in opening socket\");\n ioe.printStackTrace();\n return null;\n }\n\n return socketChannel;\n }", "public void initiateConnection() {\n\t\tif (Settings.getRemoteHostname() != null) {\n\t\t\ttry {\n\t\t\t\toutgoingConnection(new Socket(Settings.getRemoteHostname(), Settings.getRemotePort()));\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.error(\"failed to make connection to \" + Settings.getRemoteHostname() + \":\"\n\t\t\t\t\t\t+ Settings.getRemotePort() + \" :\" + e);\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t}", "public TCPCanSocket(String host) throws IOException\n \t{\n \t\tthis(new Socket(host, DEFAULT_PORT));\n \t\tSystem.out.println( \"open client socket\" );\n \t}", "private void connect()\r\n\t{\r\n\t\tString remoteHostName = txtComputerName.getText();\r\n\t\tint remoteHostPort = Integer.parseInt(txtPort.getText());\r\n\t\tif (remoteHostName == null || remoteHostName.equals(\"\"))\r\n\t\t{\r\n\t\t\twriteLine(\"Enter a Computer Name\", 0);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (remoteHostPort <= 0)\r\n\t\t\t{\r\n\t\t\t\twriteLine(\"Enter a Port\", 0);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// we can now connect\r\n\t\t\t\t// set our cursor to notify the user that they might need to\r\n\t\t\t\t// wait\r\n\t\t\t\twriteLine(\"Connecting to: \" + remoteHostName + \" : \"\r\n\t\t\t\t\t\t+ remoteHostPort, 0);\r\n\t\t\t\tthis.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\r\n\t\t\t\t// lets try to connect to the remote server\r\n\r\n\t\t\t\ttheSocket = new CommSocket(remoteHostName, remoteHostPort);\r\n\r\n\t\t\t\tif (theSocket.connect())\r\n\t\t\t\t{\r\n\t\t\t\t\twriteLine(\r\n\t\t\t\t\t\t\t\"We are successfuly connected to: \"\r\n\t\t\t\t\t\t\t\t\t+ theSocket.getRemoteHostIP(), 0);\r\n\t\t\t\t\twriteLine(\"On Port: \" + theSocket.getRemoteHostPort(), 0);\r\n\t\t\t\t\trunning = true;\r\n\t\t\t\t\t// socketListener();\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\twriteLine(\"We failed to connect!\", 0);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.setCursor(Cursor\r\n\t\t\t\t\t\t.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "String getHost()\n {\n return host;\n }", "public String getHost(){\n\t\treturn this.host;\n\t}", "protected void connect(final String ip, final int port)\n {\n executor.execute(new Runnable()\n {\n\n @Override\n public void run()\n {\n // TODO Auto-generated method stub\n if (nsServer == null)\n {\n Log.e((nsServer==null)+\"\");\n connectNS(ip, port);\n }\n else\n {\n Log.e(nsServer.toString());\n connectNS(nsServer.getIp(), nsServer.getPort());\n }\n }\n });\n }", "public void connecting() {\n\n }", "private static FTPClient connect(String host, \n\t\t\t\t int port,\n\t\t\t\t String username, \n\t\t\t\t String password) throws IOException {\n\tFTPClient client = new FTPClient();\n\tclient.connect(host, port);\n\tclient.login(username, password);\n\n\tif(!FTPReply.isPositiveCompletion(client.getReplyCode())) {\n\t client.disconnect();\n\t throw new IOException(\"Connection Refused\");\n\t}\n\n\treturn client;\n }", "public Channel connect() {\n\t\tChannelFuture channel = bootstrap.connect(new InetSocketAddress(host, port));\n\n\t\t// wait for the connection to establish\n\t\tchannel.awaitUninterruptibly();\n\n\t\tif (channel.isDone() && channel.isSuccess()) {\n\t\t\treturn channel.getChannel();\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Not able to establish connection to server\");\n\t\t}\n\t}", "public InetAddress getHost();", "private boolean connect(String host, int port){\n\t\t/* Connect to server */\n\t\tDebug.log(\"Player\", \"Connecting on host ...\");\n\n\t\t/* Get the Registry! */\n\t\ttry{\n\t\t\tRegistry reg = LocateRegistry.getRegistry(host, port);\n\t\t\tserver = (ServerInterface)reg.lookup(\"Server\");\n\n\t\t\t/* Reflect in GUI */\n\t\t\tgui.showConnectionProgress();\n\n\t\t\tDebug.log(\"Player\", \"Connected!\");\n\n\t\t\treturn true;\n\t\t}catch(AccessException e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.err.println(\"Player could not access server registry \" + e.toString());\n\t\t}catch(RemoteException e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.err.println(\"Player could not find the RMI register on the server\" + e.toString());\n\t\t}catch(NotBoundException e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.err.println(\"Player could not bind to the provided RMI address \" + e.toString());\n\t\t}\n\n\t\treturn false;\n\t}", "public DictionaryConnection(String host, int port) throws DictConnectionException {\n \n String fromServer ;\n\n try {\n // create socket and initialize streams\n socket = new Socket(host , port) ;\n output = new PrintWriter(socket.getOutputStream(), true) ;\n input = new BufferedReader(new InputStreamReader(socket.getInputStream())) ;\n\n if (((fromServer = input.readLine()) != null) &&\n (fromServer.substring(0, 3).equals(\"220\"))){\n //out.println(\"Server: \" + fromServer);\n }\n else {\n throw new DictConnectionException(\"Wrong Status Code\");\n }\n } catch (UnknownHostException e) { //exception handling if server doesn't exist or respond\n throw new DictConnectionException(e);\n } catch (IOException e) {\n throw new DictConnectionException(e) ;\n }\n }", "String getIntegHost();", "public void connect(String ipAdress, int port) {\n try {\n //Opening socket and making sure you can send data\n socket = new Socket(ipAdress, port);\n OutputStream outputStream = socket.getOutputStream();\n this.printStream = new PrintStream(outputStream);\n Log.i(TAG, \"done connecting\");\n } catch (UnknownHostException e) {\n // TODO Auto-generated catch block\n toast.setText(e.toString());\n toast.show();\n Log.i(TAG, e.toString());\n } catch (IOException e) {\n // TODO Auto-generated catch block\n toast.setText(e.toString());\n toast.show();\n Log.i(TAG, e.toString());\n }\n }", "Connection createConnection();", "public Socket connectSocket(Socket sock, String host, int port, InetAddress localAddress, int localPort, HttpParams params)\n/* */ throws IOException\n/* */ {\n/* 105 */ if (host == null) {\n/* 106 */ throw new IllegalArgumentException(\"Target host may not be null.\");\n/* */ }\n/* 108 */ if (params == null) {\n/* 109 */ throw new IllegalArgumentException(\"Parameters may not be null.\");\n/* */ }\n/* */ \n/* 112 */ if (sock == null) {\n/* 113 */ sock = createSocket();\n/* */ }\n/* 115 */ if ((localAddress != null) || (localPort > 0))\n/* */ {\n/* */ \n/* 118 */ if (localPort < 0) {\n/* 119 */ localPort = 0;\n/* */ }\n/* 121 */ InetSocketAddress isa = new InetSocketAddress(localAddress, localPort);\n/* */ \n/* 123 */ sock.bind(isa);\n/* */ }\n/* */ \n/* 126 */ int timeout = HttpConnectionParams.getConnectionTimeout(params);\n/* */ \n/* 128 */ InetAddress[] inetadrs = InetAddress.getAllByName(host);\n/* 129 */ List<InetAddress> addresses = new ArrayList(inetadrs.length);\n/* 130 */ addresses.addAll(Arrays.asList(inetadrs));\n/* 131 */ Collections.shuffle(addresses);\n/* */ \n/* 133 */ IOException lastEx = null;\n/* 134 */ for (InetAddress remoteAddress : addresses) {\n/* */ try {\n/* 136 */ sock.connect(new InetSocketAddress(remoteAddress, port), timeout);\n/* */ }\n/* */ catch (SocketTimeoutException ex) {\n/* 139 */ throw new ConnectTimeoutException(\"Connect to \" + remoteAddress + \" timed out\");\n/* */ }\n/* */ catch (IOException ex) {\n/* 142 */ sock = new Socket();\n/* */ \n/* 144 */ lastEx = ex;\n/* */ }\n/* */ }\n/* 147 */ if (lastEx != null) {\n/* 148 */ throw lastEx;\n/* */ }\n/* 150 */ return sock;\n/* */ }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public void connect(String host, int port) {\n\t\t\n\t\ttry {\n\t\t\tconnection = new Socket(host, port);\n\t\t\tdis = new DataInputStream(connection.getInputStream()); // get data from sever\n\t\t\tdos = new DataOutputStream(connection.getOutputStream()); // get data to server\n\t\t\t\t\t\t\n\t\t\tJDialog.setDefaultLookAndFeelDecorated(true);\n\t\t Object[] selectionValues = { \"Chess\", \"Mill\"};\n\t\t String initialSelection = \"Chess\";\n\t\t selection = JOptionPane.showInputDialog(null, \"Select a Game\",\n\t\t \"Select a game\", JOptionPane.QUESTION_MESSAGE, null, selectionValues, initialSelection);\n\n\t\t setupStates();\t\t\n\t\t\tthis.start();\n\t\t\t\n\t\t} catch (IOException ieo) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Server is not running\", \"Connection Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}", "public String getHost() {\n \t\treturn host;\n \t}", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }" ]
[ "0.75442475", "0.7324502", "0.69915074", "0.68805635", "0.68383074", "0.68312174", "0.680285", "0.66660035", "0.66541153", "0.6650362", "0.6645727", "0.66390425", "0.6634232", "0.6595718", "0.6579921", "0.6578314", "0.65706354", "0.6569653", "0.65629226", "0.6529826", "0.6529826", "0.6522856", "0.6511007", "0.6511007", "0.6511007", "0.6510208", "0.65011877", "0.6496905", "0.64901555", "0.64643365", "0.64547396", "0.64457047", "0.64423287", "0.6427416", "0.6427416", "0.6419641", "0.64154583", "0.64038306", "0.63938737", "0.63741267", "0.6356253", "0.6356253", "0.6356253", "0.6356253", "0.63542676", "0.634734", "0.6343913", "0.633294", "0.63228613", "0.6319142", "0.63055176", "0.6284489", "0.6282792", "0.62631637", "0.6262573", "0.62508243", "0.62435746", "0.6238979", "0.62376976", "0.6233657", "0.61932784", "0.61877584", "0.6178324", "0.6175907", "0.6170527", "0.6169478", "0.6166025", "0.616426", "0.6155715", "0.6150902", "0.614596", "0.614596", "0.61416614", "0.61413234", "0.6130842", "0.61258626", "0.61222595", "0.6121968", "0.61128426", "0.61057794", "0.61044973", "0.6103181", "0.6093514", "0.60896975", "0.6085411", "0.60831434", "0.6081014", "0.6079855", "0.607573", "0.60753405", "0.6074581", "0.6074131", "0.6072761", "0.6072419", "0.60713094", "0.60713094", "0.60696566", "0.60685444", "0.6064036", "0.6064036", "0.6064036" ]
0.0
-1
TODO Autogenerated method stub
@Override public void showItems(JZMatchBean bean, LinearLayout parent_layout) { }
{ "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
Diese Methode wird beim Start des Portlets aufgerufen Initialisiert das Portlet.
@Override public void init() { super.init(); setTheme("xtreemfs"); initLayout(); initTable(); initFileDetails(); initButtons(); initFilteringControls(); initUploadState(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void init() throws PortletException{\r\n\t\tsuper.init();\r\n\t}", "public PortletContainer() {\n }", "public Portlets() \r\n {\r\n super();\r\n _portletList = new Vector();\r\n }", "public void start(int port);", "StartPort createStartPort();", "public PortletContext() {\n }", "protected void start() {\n }", "public void start(String portArgument) {\n if (!Strings.isNullOrEmpty(portArgument)) {\n port(parsePort(portArgument));\n }\n mapExceptions();\n initAccountEndpoints();\n initUserEndpoints();\n initManagementEndpoints();\n }", "public void start()\n {\n }", "public void start() {\n\n\t}", "@Override\n\tpublic void start() {\n\n\t}", "private void start() {\n\n\t}", "public void start() {\n }", "@Override\n\tpublic void start() {\n\t}", "@Override\n\tpublic void start() {\n\t}", "public void startup(){}", "@Override\n public void startup() {\n }", "@Override\r\n public void start() {\r\n }", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override public void start() {\n }", "public void start() {\n\t\t\n\t}", "public void start() {\n\t\t\n\t}", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\r\n\tpublic void start() {\n\t\t\r\n\t}", "public void start() {}", "public void start() {}", "public void start() {\n\n }", "@Override\n public void start() { }", "public start() {\n\t\tsuper();\n\t}", "public void start(){\n }", "@Override\n public void start() {}", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "private void init(String ip, int port, String name) {\n this.settings = new Settings(ip, port, name);\n this.network = new Network(this);\n this.clientGUI = new ClientGUI(this);\n //\n new Thread(network::start).start();\n }", "public void startup() {\n\t\tstart();\n }", "public void start() {\n System.out.println(\"server started\");\n mTerminalNetwork.listen(mTerminalConfig.port);\n }", "@Override\n public void start() {\n }", "public void start()\n {}", "@Override\n @SuppressWarnings(\"CallToPrintStackTrace\")\n public void simpleInitApp() {\n \n\n try {\n System.out.println(\"Using port \" + port);\n // create the server by opening a port\n server = Network.createServer(port);\n server.start(); // start the server, so it starts using the port\n } catch (IOException ex) {\n ex.printStackTrace();\n destroy();\n this.stop();\n }\n System.out.println(\"Server started\");\n // create a separat thread for sending \"heartbeats\" every now and then\n new Thread(new NetWrite()).start();\n server.addMessageListener(new ServerListener(), ChangeVelocityMessage.class);\n // add a listener that reacts on incoming network packets\n \n }", "public SDARTS (int port, String lspName) throws Exception {\r\n System.out.println (\"Creating front end and initializing back ends\");\r\n System.out.println (\"--------------------------------------------\");\r\n init (port, lspName, new FrontEndLSP());\r\n }", "public FormPortlet( )\n {\n }", "@Override\r\n\tpublic void initial() {\n\t\ttry {\r\n\t\t\tserverSocket = new ServerSocket(port);\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\t// System.out.println(\"LocalProxy run on \" + port);\r\n\t}", "public JasperPortlet( )\n {\n setPortletTypeId( JasperPortletHome.getInstance( ).getPortletTypeId( ) );\n }", "public void start() {\n _serverRegisterProcessor = new ServerRegisterProcessor();\n _serverRegisterProcessor.start();\n }", "@Override\r\n\tpublic void start() {\n\t\tsuper.start();\r\n\t\t\r\n\t}", "public RackPortletServlet() {\n }", "public void start(){\n\t\tsuper.start();\n\t}", "void start() {\n }", "protected void start() {\n if (!this.init || this.started) {\n \tthrow new RuntimeException(\"start() should not be called by hand: to create a new component, use newComponent().\");\n }\n }", "public void start()\n/* 354: */ {\n/* 355:434 */ onStartup();\n/* 356: */ }", "public void startNetwork(int port);", "public void init() {\r\n\t\tGetRunningProgramsGR request = new GetRunningProgramsGR(\r\n\t\t\t\tRunningServicesListViewAdapter.this.runningServicesActivity.getApplicationContext());\r\n\t\trequest.setServerName(RunningServicesListViewAdapter.this.serverName);\r\n\t\tnew GuiRequestHandler(RunningServicesListViewAdapter.this.runningServicesActivity,\r\n\t\t\t\tRunningServicesListViewAdapter.this, true).execute(request);\r\n\t}", "public void start() {\r\n\t\tdiscoverTopology();\r\n\t\tsetUpTimer();\r\n\t}", "public void testSetPort() {\n }", "@Override\n protected void startUp() {\n }", "public void start(int port) {\r\n Thread thread = new Thread(this);\r\n this.port = port;\r\n thread.start();\r\n }", "protected void start() {\n if (!this.init || this.started) {\n \tthrow new RuntimeException(\"start() should not be called by hand: to create a new component, use newComponent().\");\n }\n }", "protected void start() {\n if (!this.init || this.started) {\n \tthrow new RuntimeException(\"start() should not be called by hand: to create a new component, use newComponent().\");\n }\n }", "@Override\n public void startEndpoint() throws IOException, InstantiationException {\n setRunning(true);\n \n rampUpProcessorTask();\n registerComponents();\n\n startPipelines();\n startListener();\n }", "private void initialize() {\n this.setLayout(new CardLayout());\n this.setName(Constant.messages.getString(\"ports.options.title\"));\n this.add(getPanelPortScan(), getPanelPortScan().getName());\n }", "public void init (PortletConfig config) throws PortletException\n {\n this.config = config;\n this.init();\n }", "protected void start() {\r\n if (!this.init || this.started) {\r\n \tthrow new RuntimeException(\"start() should not be called by hand: to create a new component, use newComponent().\");\r\n }\r\n }", "public void Start(){\n Registry registry = null;\n try{\n for(int i=0;i<nsize;i++){\n registry= LocateRegistry.getRegistry(this.ports[i]);\n PRMI stub = (PRMI) registry.lookup(\"DCMP\");\n System.out.println(\"env calls Init to man \"+i);\n stub.InitHandler(new Request(this.id, -1, 'e'));\n D++;\n }\n\n } catch(Exception e){\n return;\n }\n return;\n }", "public Server() {\n initComponents();\n\n btnStart.setEnabled(true);\n btnStop.setEnabled(false);\n }", "public InitService() {\n super(\"InitService\");\n }", "public void startServer() {\n URLClassLoader loader = createClasspath(opts);\n X_Process.runInClassloader(loader, appServer\n .map(DevAppServer::doStartServer, getAppName() + \"Server\", getPort())\n .ignoreOut1().unsafe());\n }", "public void start() {\n\t\tSystem.out.println(\"BMW start method\");\n\t}", "private void initService() {\r\n\t}", "public void start()\r\n\t{\n\tSystem.out.println(\"normal start method\");\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 }", "private Lights(int port)\n\t{\n super(port);\n System.out.println(this.getClass().getName() + \": Started Constructing\");\n System.out.println(this.getClass().getName() + \": Finished Constructing\");\n }", "@Override\r\n\tpublic void startup() {\n\t\tif(!initialized)\r\n\t\t\tinitOperation();\r\n\t\tregisterMBean();\r\n\t}", "@Override\n public synchronized void start() {\n init();\n }", "public void starting();", "public void init()\n {\n _appContext = SubAppContext.createOMM(System.out);\n _serviceName = CommandLine.variable(\"serviceName\");\n initGUI();\n }", "@Override public void startUp(FloodlightModuleContext context) {\n restApi.addRestletRoutable(this);\n\n }", "private void startServer() {\n\t\ttry {\n//\t\t\tserver = new Server();\n//\t\t\tserver.start();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: add message in UI for user\n\t\t}\n\t}", "public LoadBalancer(int port) throws IOException {\n super(port);\n tabServerssout = new Vector();\n tabServerssin = new Vector();\n //On se connecte aux serveurs\n addServers(8010,8013);\n }", "@Override\n\tpublic void start() throws Exception {\n\t\t\n\t}", "private void startPortManager() throws GrpcException {\n\t\t/* start PortManager */\t\t\n\t\ttry {\n\t\t\tinformationManager.lockInformationManager();\n\t\t\t\n\t\t\tProperties localHostInfo =\n\t\t\t\t(Properties) informationManager.getLocalMachineInfo();\n\t\t\t\n\t\t\t/* PortManager without SSL */\n\t\t\tint port = Integer.parseInt((String) localHostInfo.get(\n\t\t\t\tNgInformationManager.KEY_CLIENT_LISTEN_PORT_RAW));\n\t\t\tportManagerNoSecure = new PortManager(this, false, port);\n\n\t\t\t/* PortManager with authonly is not implemented. */\n\n\t\t\t/* PortManager with GSI */\n\t\t\tport = Integer.parseInt((String) localHostInfo.get(\n\t\t\t\t\tNgInformationManager.KEY_CLIENT_LISTEN_PORT_GSI));\t\n\t\t\tportManagerGSI = new PortManager(this, PortManager.CRYPT_GSI, port);\n\n\t\t\t/* PortManager with SSL */\n\t\t\tport = Integer.parseInt((String) localHostInfo.get(\n\t\t\t\t\tNgInformationManager.KEY_CLIENT_LISTEN_PORT_SSL));\t\n\t\t\tportManagerSSL = new PortManager(this, PortManager.CRYPT_SSL, port);\n\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new NgInitializeGrpcClientException(e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new NgIOException(e);\n\t\t} finally {\n\t\t\tinformationManager.unlockInformationManager();\n\t\t}\n\t}", "public Punching() {\n initComponents();\n }", "@Override\r\n\tpublic void start() {\n\t\tthis.controller.start();\r\n\t}", "@Override\n protected void Start() {\n }", "public Server() {\n initComponents();\n }", "public Server() {\n initComponents();\n }", "public void sendeSpielStarten();", "@Override\n\tpublic void start() {\n\t\tSystem.out.println(\"TESLA has been started\");\n\t}", "protected void start() throws IOException {\r\n\t\tif (smscListener == null) {\r\n\t\t\tSystem.out.print(\"Enter port number> \");\r\n\t\t\tint port = Integer.parseInt(keyboard.readLine());\r\n\t\t\tSystem.out.print(\"Starting listener... \");\r\n\t\t\tsmscListener = new SMSCListenerImpl(port, true);\r\n\t\t\tprocessors = new PDUProcessorGroup();\r\n\t\t\tmessageStore = new ShortMessageStore();\r\n\t\t\tdeliveryInfoSender = new DeliveryInfoSender();\r\n\t\t\tdeliveryInfoSender.start();\r\n\t\t\tusers = new Table(usersFileName);\r\n\t\t\tfactory = new SimulatorPDUProcessorFactory(processors, messageStore, deliveryInfoSender, users);\r\n\t\t\tfactory.setDisplayInfo(displayInfo);\r\n\t\t\tsmscListener.setPDUProcessorFactory(factory);\r\n\t\t\tsmscListener.start();\r\n\t\t\tSystem.out.println(\"started.\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Listener is already running.\");\r\n\t\t}\r\n\t}", "public void initialize() {\n\n getStartUp();\n }", "public void run(){\n\n\t\tServerSocket socketEcoute;\n\t\ttry {\n\t\t\tsocketEcoute = new ServerSocket();\n\t\t\tsocketEcoute.bind(new InetSocketAddress(this.defaultPort));\n\t\t\tSystem.out.println(\"Port manager started on : \"+this.defaultPort);\n\t\t\twhile(true){\n\t\t\t\tSocket socketConnexion = socketEcoute.accept();\n\t\t\t\tSystem.out.println(\"Someone is connected on PortManager\");\n\t\t\t\t\n\t\t\t\tnew PortManagerThread(socketConnexion,this.ctrl).start();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public InternalInformationPortController() {\r\n\t\t\r\n\t}" ]
[ "0.7198272", "0.7096832", "0.6961099", "0.68145937", "0.6665758", "0.66068333", "0.65836036", "0.65298146", "0.6520917", "0.65201646", "0.65114737", "0.6509011", "0.6487018", "0.6440214", "0.6440214", "0.64341456", "0.6431874", "0.6429213", "0.6425971", "0.6425971", "0.6425971", "0.6425971", "0.6407233", "0.6406772", "0.6406772", "0.63995874", "0.63995874", "0.63995874", "0.63995874", "0.63995874", "0.63995874", "0.63995874", "0.6390514", "0.637951", "0.637951", "0.6370297", "0.63510007", "0.63383275", "0.6329767", "0.63246775", "0.6323961", "0.6323961", "0.6323961", "0.6309728", "0.6306636", "0.629969", "0.6290831", "0.6288938", "0.6266338", "0.62133104", "0.62117356", "0.62115735", "0.61903036", "0.618035", "0.6165318", "0.61630094", "0.61343825", "0.6132589", "0.61203516", "0.60942197", "0.6081813", "0.6077988", "0.60610574", "0.6059693", "0.6057177", "0.6055544", "0.60543525", "0.60543525", "0.6042438", "0.6033128", "0.6032867", "0.6027879", "0.60174125", "0.5988718", "0.59881467", "0.5985613", "0.59843993", "0.59834534", "0.5976694", "0.5968998", "0.59441334", "0.59420425", "0.5941072", "0.59324646", "0.5929971", "0.59223795", "0.5909835", "0.5906667", "0.5902454", "0.5896539", "0.5885834", "0.5884311", "0.5881285", "0.58781683", "0.58781683", "0.58709496", "0.5867272", "0.58652294", "0.5863333", "0.5862706", "0.58544797" ]
0.0
-1
Tabelle mit Dateilisting initialisieren
public void initTable() { this.table.setSelectable(true); this.table.setImmediate(true); this.table.setWidth("100%"); this.table.addListener(this); this.table.setDropHandler(this); this.table.addActionHandler(this); this.table.setDragMode(TableDragMode.ROW); this.table.setSizeFull(); this.table.setColumnCollapsingAllowed(true); // table.setColumnReorderingAllowed(true); // BReiten definieren this.table.setColumnExpandRatio(LABEL_ICON, 1); this.table.setColumnExpandRatio(LABEL_DATEINAME, 3); this.table.setColumnExpandRatio(LABEL_DATUM, 2); this.table.setColumnExpandRatio(LABEL_GROESSE, 1); this.table.setColumnExpandRatio(LABEL_ACCESS_MODES, 1); this.table.setColumnHeader(LABEL_ICON, ""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private FundList() {\n initFields();\n }", "public Jahresrangliste() {\r\n\t\tLaeufe = new ArrayList<Lauf>();\r\n\t\tRennfahrer = new ArrayList<Fahrer>();\r\n\t}", "private void initDate(){\n\n owa = findViewById(R.id.OWA);\n sda = findViewById(R.id.SWA);\n fida = findViewById(R.id.FIDA);\n fda = findViewById(R.id.FDA);\n trda = findViewById(R.id.TRDA);\n tda = findViewById(R.id.TDA);\n hier = findViewById(R.id.HIER);\n\n dateList.add(hier);\n dateList.add(tda);\n dateList.add(trda);\n dateList.add(fda);\n dateList.add(fida);\n dateList.add(sda);\n dateList.add(owa);\n\n }", "public void initialize() {\n\t\tanzPakete = Integer.parseInt(textFieldAnzPakete.getText());\r\n\r\n\t\t// Tabelle erzeugen\r\n\t\tsetupTabelle();\r\n\t}", "public listaAlumnos()\r\n\t{\r\n\t\tinicio = fin = null; \r\n\t}", "@PostConstruct\r\n public void init() {\n this.tab = false;\r\n this.tabNumber = 0;\r\n\r\n weekdaysItem = new ArrayList<>();\r\n\r\n for (WeekDay wd : WeekDay.values()) {\r\n weekdaysItem.add(new SelectItem(wd, wd.name()));\r\n }\r\n }", "private void init() {\n try {\n renderer = new TableNameRenderer(tableHome);\n if (listId != null) {\n model = new DefaultComboBoxModel(listId);\n }\n else {\n Object[] idList = renderer.getTableIdList(step, extraTableRef);\n model = new DefaultComboBoxModel(idList);\n }\n setRenderer(renderer);\n setModel(model);\n }\n catch (PersistenceException ex) {\n ex.printStackTrace();\n }\n }", "public ListaDependente() {\n initComponents();\n carregarTabela();\n }", "private void initList() {\n\n }", "@Override\n\tpublic void init() {\n\t\tsuper.init();\n\t\tadult = new MeritTableAdult();\n\t\tchildren = new MeritTableChildren();\n\t}", "private void initDatas(){\r\n \t\r\n \tjTable1.setModel(ViewUtil.transferBeanList2DefaultTableModel(discountService.getAllDiscountInfo(),\"Discount\"));\r\n }", "public WeatherNewListData() {\n\t}", "public TablaInmueble() {\n initComponents();\n this.setLocationRelativeTo(null);\n inmd = new InmuebleData();\n this.cargarTabla();\n \n }", "public BDD() {\n\t\tlisteTables = new ArrayList<Table>();\n\t}", "public void initTable();", "private void _init() throws Exception {\n if (this.getListaDelCommunication() != null) {\n this.getObjectListDataProvider().setList(this.getListaDelCommunication());\n }\n\n if (this.getListaDelCommunication2() != null) {\n this.getObjectListDataProvider2().setList(this.getListaDelCommunication2());\n }\n\n dateTimeConverter1.setTimeZone(null);\n dateTimeConverter1.setPattern(\"dd/MM/yy\");\n dateTimeConverter1.setDateStyle(\"full\");\n }", "public ListingData() {\r\n\t\tsuper();\r\n\t}", "private void initData() {\n\t\tcomboBoxInit();\n\t\tinitList();\n\t}", "@Override\n\tpublic void initDate() {\n\n\t}", "void initTable();", "public Listas_simplemente_enlazada(){\r\n inicio=null; // este constructor me va servir para apuntar el elemento\r\n fin=null;\r\n }", "public Lista(){\n inicio=null;\n fin=null;\n }", "@Override\r\n public void initialize (URL location, ResourceBundle resources) {\n\r\n tableView.setItems(komponenter_list);\r\n\r\n\r\n }", "private void initLsitData() {\n\t\tlist = new ArrayList<View>();\n\n\t\tlist.add(new NewsMenupagerItem(Mactivity,TY).initView());\n\t\tlist.add(new NewsMenupagerItem(Mactivity,YL).initView());\n\t\tlist.add(new NewsMenupagerItem(Mactivity,QW).initView());\n\t\tlist.add(new NewsMenupagerItem(Mactivity,MV).initView());\n\n\n\t}", "@Override\n\tpublic void initialize(URL location, ResourceBundle resources) {\n\t\trefrescarLista();\n\n\t\tTableColumn<DocumentoDTO, Long> columna1 = new TableColumn<DocumentoDTO, Long>(\"Nº Documento\");\n\t\tTableColumn<DocumentoDTO, String> columna2 = new TableColumn<DocumentoDTO, String>(\"Tipo Documento\");\n\t\tTableColumn<DocumentoDTO, String> columna3 = new TableColumn<DocumentoDTO, String>(\"Concepto\");\n\t\tTableColumn<DocumentoDTO, LocalDate> columna4 = new TableColumn<DocumentoDTO, LocalDate>(\"Fecha\");\n\t\tTableColumn<DocumentoDTO, String> columna5 = new TableColumn<DocumentoDTO, String>(\"Responsable\");\n\t\tTableColumn<DocumentoDTO, Float> columna6 = new TableColumn<DocumentoDTO, Float>(\"Total\");\n\n\t\tcolumna1.setCellValueFactory(new PropertyValueFactory<>(\"numDocumento\"));\n\t\tcolumna2.setCellValueFactory(new PropertyValueFactory<>(\"tipoDocumento\"));\n\t\tcolumna3.setCellValueFactory(new PropertyValueFactory<>(\"concepto\"));\n\t\tcolumna4.setCellValueFactory(new PropertyValueFactory<>(\"fecha\"));\n\t\tcolumna5.setCellValueFactory(new PropertyValueFactory<>(\"responsable\"));\n\t\tcolumna6.setCellValueFactory(new PropertyValueFactory<>(\"valorTotal\"));\n\n\t\ttabla.setItems(documentosDTO);\n\t\ttabla.getColumns().addAll(columna1,columna2,columna3,columna4,columna5,columna6);\n\n\t}", "private void preencheTable(){\n\t\t\n\t\tlistaArquivos.setItemCount(0);\n\t\t\n\t\tfor(File f : arquivos){\n\t\t\tTableItem it = new TableItem(listaArquivos, SWT.NONE);\n\t\t\tit.setText(0, f.getName());\n\t\t\tit.setText(1, formataDouble(f.length()));\n\t\t\tit.setText(2, formataData(f.lastModified()));\n\t\t}\n\t\t\n\t}", "public void preencherTabela(){\n imagemEnunciado.setImage(imageDefault);\n pergunta.setImagemEnunciado(caminho);\n imagemResposta.setImage(imageDefault);\n pergunta.setImagemResposta(caminho);\n ///////////////////////////////\n perguntas = dao.read();\n if(perguntas != null){\n perguntasFormatadas = FXCollections.observableList(perguntas);\n\n tablePerguntas.setItems(perguntasFormatadas);\n }\n \n }", "public JsfVenda() {\r\n litem = new ArrayList();\r\n }", "private void loadLists() {\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n this.d = new getAlumnosData(false);\n }", "private void inicializarTablero() {\r\n\t\t\r\n\t\tfor(int i = 0; i < filas; i++) {\r\n\t\t\tfor(int j = 0; j < columnas; j++) {\r\n\t\t\t\tsuperficie[i][j] = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t\tfecha = new Date();\r\n\t\t\r\n\t\tlistaBancos = new ArrayList<SelectItem>();\r\n\t\tlistaRegiones = new ArrayList<SelectItem>();\r\n\t\tlistaCiudades = new ArrayList<SelectItem>();\r\n\t\tlistaComunas = new ArrayList<SelectItem>();\r\n\t\t\r\n\t\tfor(EmpresaDTO empresa : configJProcessService.selectEmpresasByOrganizacion(1))\r\n\t\t\tlistaBancos.add(new SelectItem(empresa.getId(), empresa.getNombre()));\r\n\t}", "private void initializeTable()\n {\n mTable = new ListView(mData);\n mTable.setPrefSize(200, 250);\n mTable.setEditable(false);\n }", "private void init() {\n this.listaObjetos = new ArrayList();\n this.root = null;\n this.objeto = new Tblobjeto();\n this.pagina = new Tblpagina();\n this.selectedObj = null;\n this.menus = null;\n this.subMenus = null;\n this.acciones = null;\n this.nodes = new ArrayList<TreeNode>();\n this.selectedObjeto = null;\n this.selectedTipo = null;\n this.renderPaginaForm = null;\n this.renderGrupoForm = null;\n this.selectedGrupo = null;\n this.populateTreeTable();\n }", "private void preencherTabela() {\n\t\tList<Cidade> listCidade;\n\t\tCidadeDAO cidadeDAO;\n\t\tObservableList<Cidade> oListCidade;\n\n\t\t// Determina os atributos que irão preencher as colunas\n\t\tcolCidade.setCellValueFactory(new PropertyValueFactory<>(\"nomeCidades\"));\n\t\tcolEstado.setCellValueFactory(new PropertyValueFactory<>(\"nomeEstado\"));\n\t\tcolSigla.setCellValueFactory(new PropertyValueFactory<>(\"siglaEstado\"));\n\t\tcolCodigoCidade.setCellValueFactory(new PropertyValueFactory<>(\"idCidade\"));\n\t\tcolIdEstado.setCellValueFactory(new PropertyValueFactory<>(\"idEstado\"));\n\n\t\t// Instancia a lista de cidades e a DAO\n\t\tlistCidade = new ArrayList<Cidade>();\n\t\tcidadeDAO = new CidadeDAO();\n\n\t\t// Chama o metodo para selecionar todas as cidades e atribuir a lista\n\t\tlistCidade = cidadeDAO.selecionar();\n\n\t\t// Converte a lista de cidades em observablearray\n\t\toListCidade = FXCollections.observableArrayList(listCidade);\n\n\t\t// Adiciona a lista na tabela\n\t\ttblCidades.setItems(oListCidade);\n\t}", "public ListSemental() {\n }", "private void initReferences() {\n trails = new ArrayList<>();\n keys = new ArrayList<>();\n trailAdapter = new TrailAdapter(this, R.layout.trail_row_layout, trails);\n floatingActionButton = (FloatingActionButton) findViewById(R.id.fab);\n trailListView = (ListView) findViewById(R.id.trail_list);\n trailEmptyText = (TextView) findViewById(R.id.empty_value);\n trailListView.setEmptyView(trailEmptyText);\n trailListView.setAdapter(trailAdapter);\n }", "public ListaEncadeada() {\n\n this.ini = null;\n\n }", "@BeforeEach\n\tvoid init() {\n\t\tthis.repo.deleteAll();\n\t\tthis.testLists = new TDLists(listTitle, listSubtitle);\n\t\tthis.testListsWithId = this.repo.save(this.testLists);\n\t\tthis.tdListsDTO = this.mapToDTO(testListsWithId);\n\t\tthis.id = this.testListsWithId.getId();\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "public DataMahasiswa() {\n initComponents();\n load_table();\n }", "private void inicializaListView(){\n }", "public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }", "@Override\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\t\t\n\t\t\n\t\tFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\tString regDate = formatter.format(date);\n\t\tpaymentDate.setText(regDate);\n\t\ttry {\n\t\t\tvendorData = custDAO.fillVendor();\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\tvendorType.setItems(vendorData);\n\t\t\n\t}", "private void initList(LocalDate cal) {\n\t\tdays.add(\"Mo\");\n\t\tdays.add(\"Tu\");\n\t\tdays.add(\"We\");\n\t\tdays.add(\"Th\");\n\t\tdays.add(\"Fr\");\n\t\tdays.add(\"Sa\");\n\t\tdays.add(\"Su\");\n\t}", "public static void init() {\n\t\tList<Object> objects = FileManager.readObjectFromFile(\"student.dat\");\n\t\tfor (Object o : objects)\n\t\t\tStudentList.add((Student) o);\n\t}", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "@Override\r\n\tpublic void initialize(URL arg0, ResourceBundle arg1) {\n\t\ttbColumnNome.setCellValueFactory(new PropertyValueFactory<>(\"nome\"));\r\n\t\ttbColumnCPF.setCellValueFactory(new PropertyValueFactory<>(\"cpf\"));\r\n\t\ttbColumnIdade.setCellValueFactory(new PropertyValueFactory<>(\"idade\"));\r\n\t\ttbColumnTipoSanguineo.setCellValueFactory(new PropertyValueFactory<>(\"tipoSanguineo\"));\r\n\t\ttbColumnSexo.setCellValueFactory(new PropertyValueFactory<>(\"sexo\"));\r\n\t\ttbColumnStatusPessoa.setCellValueFactory(new PropertyValueFactory<>(\"statusDaPessoa\"));\r\n\t\ttbColumnLogin.setCellValueFactory(new PropertyValueFactory<>(\"login\"));\r\n\t\ttbColumnSenha.setCellValueFactory(new PropertyValueFactory<>(\"senha\"));\r\n\t\ttbColumnStatusDeUsuario.setCellValueFactory(new PropertyValueFactory<>(\"statusDeUsuario\"));\r\n\t\ttbColumnNumeroDeRegistro.setCellValueFactory(new PropertyValueFactory<>(\"numeroderegistro\"));\r\n\t\tEnfermeiroDAO eDAO = new EnfermeiroDAO();\r\n\t\tList<Enfermeiro> enfermeiro = eDAO.select();\r\n\t\tObservableList<Enfermeiro> obsm = FXCollections.observableArrayList(enfermeiro);\r\n\t\tlistaEnfermeiro.setItems(obsm);\r\n\t}", "@Override\n public void init() {\n super.init();\n\n setTheme(\"xtreemfs\");\n\n initLayout();\n initTable();\n initFileDetails();\n initButtons();\n initFilteringControls();\n initUploadState();\n }", "public Main() {\n initComponents();\n modelSach = (DefaultTableModel) jTable1.getModel();\n modelBanDoc = (DefaultTableModel) jTable3.getModel();\n listS = IOFile.readFile(fileSach);\n listBD = IOFile.readFile(fileBanDoc);\n initTableSach();\n initMaSach();\n initTableBD();\n initMaBD();\n }", "public ArreiList() {\n koko = 0;\n }", "protected abstract void initialiseTable();", "@PostConstruct\n\tprivate void init() {\n\t\tEntrada entr = new Entrada(\n\t\t\t\tnew Persona(\"Manuel\",\"Jimenex\",\"52422\",\"100000\",\"Cra 340\"),\n\t\t\t\t(new PreFactura(1l,new Date())), itemsService.lista());\n\t\t\n\t\tlistaEntrada.add(entr);\n\t}", "public TabelaDoces() {\n initComponents();\n }", "public AllTablesListTag() { }", "public void einlesenUndInitialisieren() {\n\t\t\n\t\t// Willkommenstext\n\t\tSystem.out.println(\"Willkommen zur Caesar-Kodierung!\\nMoechten Sie einen Text chiffrieren oder dechiffrieren?\");\n\t\tboolean chiffrieren = getModus();\n\t\t\n\t\t// Schluessel-Eingabe\n\t\tif(chiffrieren) {\n\t\t\tSystem.out.println(\"Bitte geben sie jetzt den Schluessel ein, der zum Chiffrieren verwendet werden soll. Entscheiden Sie sich\\ndabei fuer eine Ganzzahl zwischen 1 und 25.\\nMoechten sie einen zufaelligen Schluessel, geben sie bitte '88' ein.\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Wenn sie den fuer die Dechiffrierung benoetigten Schluessel kennen, geben sie ihn jetzt bitte ein. Sollten\\nSie ihn nicht kennen, geben sie bitte die '88' ein.\");\n\t\t}\n\t\tbyte schluessel = getSchluessel();\n\t\t\n\t\t// Als naechstes die Datei-Namen\n\t\tboolean erfolgreichEingelesen = false;\n\t\tdo {\n\t\t\n\t\t\tString[] namen = getDateiNamen();\n\t\t\tString eingabeDatei = namen[0];\n\t\t\tString ausgabeDatei = namen[1];\n\t\t\n\t\t\t// Nun haben wir alles und leiten die Initialisierung ein\n\t\t\n\t\t\tthis.streamKoordinierung = new StreamKoordinierung(chiffrieren, schluessel, eingabeDatei, ausgabeDatei );\n\t\t\terfolgreichEingelesen = this.streamKoordinierung.liesStarttextAusDatei();\n\t\t\tif(!erfolgreichEingelesen) {\n\t\t\t\tSystem.out.println(\"\\n\\nBeim Lesen der Datei trat ein Fehler auf, bitte geben sie erneut die DateiNamen an!\\n\");\n\t\t\t}\n\t\t}\n\t\twhile(!erfolgreichEingelesen);\n\t\t\n\t\tSystem.out.println(\"\\nDie Eingabe lief erfolgreich ab, wir beginnen nun mit der De-/Chiffrierung.\");\n\t}", "public static void init()\n\t{\n\t\t\n\t\tu.creerGalaxie(\"VoieLactee\", \"spirale\", 0);\n\t\tu.creerEtoile(\"Soleil\", 0, 'F', u.getGalaxie(\"VoieLactee\")); //1\n\t\tu.creerObjetFroid(\"Terre\", 150000 , 13000 , 365 , u.getObjet(1)); //2\n\n\t\tu.creerObjetFroid(\"Lune\", 200 , 5000 , 30 , u.getObjet(2)); //3\n\n\t\tu.creerObjetFroid(\"Mars\", 200000 , 11000 , 750 , u.getObjet(1)); //4\n\n\t\tu.creerObjetFroid(\"Phobos\", 150 , 500 , 40 , u.getObjet(4)); //5\n\n\t\tu.creerObjetFroid(\"Pluton\", 1200000 , 4000 , 900 , u.getObjet(1)); //6\n\n\t\tu.creerEtoile(\"Sirius\", 2, 'B', u.getGalaxie(\"VoieLactee\")); //7\n\n\t\tu.creerObjetFroid(\"BIG-1\", 1000 , 50000 , 333 , u.getObjet(7)); //8\n\n\t\tu.creerGalaxie(\"M31\", \"lenticulaire\", 900000);\n\t\tu.creerEtoile(\"XS67\", 8, 'F', u.getGalaxie(\"M31\")); //9\n\t\tu.creerObjetFroid(\"XP88\", 160000 , 40000 , 400 , u.getObjet(9)); //10\n\t}", "public OrderPickListTbl () {\n\t\tsuper();\n\t}", "private void fillTableNameToList(String dsName) {\n if (dsName.length() > 0) {\n utils = new DataMetaUtils(AppConfig.getDSConfig(dsName));\n final List<String> tableNameList = utils.getTableNameList();\n lstSrcTableName.setModel(new StringListModel(tableNameList));\n } else {\n this.lstSrcTableName.setModel(new StringListModel());\n }\n\n }", "private void initializeData() {\n ListaOfertas.removeAll(ListaOfertas);\n for(Articulo listaJuegos: ArticuloRepository.getListArticulo()){\n if(listaJuegos.getOferta().contains(\"S\")){\n listaJuegos.setValorDescuento(String.valueOf(listaJuegos.getPrecioArticulo()-(listaJuegos.getPrecioArticulo()*listaJuegos.getPorcentajeDescuento()/100)));\n ListaOfertas.add(listaJuegos);\n }\n\n }\n }", "@Override\n\tpublic void initialize(URL location, ResourceBundle resources) {\n\t\tcolName.setCellValueFactory(new PropertyValueFactory<>(\"PlayerName\"));\n\t\tcolDate.setCellValueFactory(new PropertyValueFactory<>(\"PlayerDate\"));\n\t\tcolLevel.setCellValueFactory(new PropertyValueFactory<>(\"PlayerLevel\"));\n\t\ttableview.setItems(observableList);\n\n\t}", "@Override\n public void initialize(URL arg0, ResourceBundle arg1) {\n sportifs = Main.facade.obtenirListeSportif();\n if (sportifs == null) {\n sportifs = new ArrayList<String>();\n }\n\n ObservableList<String> items = FXCollections.observableArrayList();\n items.addAll(sportifs);\n listSportif.setItems(items);\n\n // remplir la liste des questionnaires\n questionnaire = Main.facade.consulterLesQuestionnaire();\n if (questionnaire == null) {\n questionnaire = new ArrayList<String>();\n }\n\n ObservableList<String> items2 = FXCollections.observableArrayList();\n items2.addAll(questionnaire);\n listQuestionnaire.setItems(items2);\n\n date.valueProperty().addListener((ov, oldValue, newValue) -> {\n selectionDate();\n });\n }", "private void initData() {\n\t}", "@Override\n\tpublic void initialize(URL location, ResourceBundle resources) {\n\tCarregarTabelas();\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n Label headerLabel = (Label) SessionProvider.getGlobalSessionsMap()\n .get(\"header_form_persiapan\");\n headerLabel.setText(\"FORM ATUR NOMOR & TANGGAL SURAT PEMINJAMAN\");\n headerLabel.setLayoutX(120);\n nomorBerkasService = ServiceFactory.getNomorBerkasService();\n addFromFXML();\n populateData();\n associateDataWithColumn();\n AturNomorTanggalSuratPeminjamanTable.setItems(dataCollection);\n }", "public void init(){\n\t\tEmployee first = new Employee(\"Diego\", \"Gerente\", \"[email protected]\");\n\t\tHighSchool toAdd = new HighSchool(\"Santiago Apostol\", \"4656465\", \"cra 33a #44-56\", \"3145689879\", 30, 5000, \"Jose\", new Date(1, 3, 2001), 3, \"Servicios educativos\", \"451616\", 15, \"Piedrahita\", 45, 1200, 500);\n\t\ttoAdd.addEmployee(first);\n\t\tProduct pilot = new Product(\"jet\", \"A00358994\", 1.5, 5000);\n\t\tFood firstFood = new Food(\"Colombina\", \"454161\", \"cra 18\", \"454611313\", 565, 60000, \"Alberto\", new Date(1, 8, 2015), 6, \"Manufactura\", 4);\n\t\tfirstFood.addProduct(pilot);\n\t\ttheHolding = new Holding(\"Hertz\", \"15545\", \"cra 39a #30a-55\", \"3147886693\", 80, 500000, \"Daniel\", new Date(1, 2, 2015), 5);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\ttheHolding.addSubordinate(firstFood);\n\t}", "public Lista() {\r\n }", "public void init() {\n\t\t\tfor(int i=0; i<DBDef.getINSTANCE().getListeRelDef().size(); i++) {\n\t\t\t\tDBDef.getINSTANCE().getListeRelDef().get(i);\n\t\t\t\tHeapFile hp = new HeapFile(DBDef.getINSTANCE().getListeRelDef().get(i));\n\t\t\t\tthis.heapFiles.add(hp);\n\t\t\t}\n\t\t}", "public Datenauswahl() {\n initComponents();\n }", "public DateList() {\n DateNode ln = new DateNode(null);\n first = ln;\n last = ln;\n }", "public void initData() {\n nameDetailOrder.setText(\"-\");\n tourDetailOrder.setText(\"-\");\n packDetailOrder.setText(\"-\");\n statusDetailOrder.setText(\"-\");\n }", "public ListaPracownikow() {\n generujPracownikow();\n //dodajPracownika();\n }", "public ListaEncadeada() {\n first = null;\n }", "private void initDate() {\n\t\t\n mlistview.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tChemicals chemicals=mDatas.get(arg2);\n\t\t\t\t\tif(chemicals!=null)\n\t\t\t\t\t{\n\t\t\t\t\t\tBundle bundle = new Bundle(); \n\t\t\t\t\t\tbundle.putSerializable(\"Chemicals\", chemicals); \n\t\t\t\t\t\tIntent intent=new Intent(ChemicalsDirectoryActivity.this, ChemicalsDatilShowActivity.class);\n\t\t\t \t\tintent.putExtras(bundle);\n\t\t\t \t\tstartActivity(intent);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n \n mlistview.setIClickLoadListListener(new IClickLoadListListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onLoad(Handler handler) {\n\t\t\t\tSqlOperate<Chemicals> opetaterChemicals=new SqlOperate<Chemicals>(ChemicalsDirectoryActivity.this, Chemicals.class);\n\t\t\t\tfinal List<Chemicals> data=opetaterChemicals.SelectOffsetEntitysBySqlCondition(mSqlStr, pangSize, pageCount);\n\t\t\t\tpageCount++;\n\t\t opetaterChemicals.close();\n\t\t\t\t\n\t\t\t\tif(data!=null&&data.size()>0)\n\t\t {\n\t\t\t\t\thandler.post(new Runnable() {\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tmDatas.addAll(data);\n\t\t\t\t\t\t\tmAdapter.notifyDataSetChanged();\n\t\t\t\t\t\t\tif(data.size()<pangSize)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tmlistview.hindLoadView(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t }\n\t\t else\n\t\t {\n\t\t \tmlistview.hindLoadView(true);\n\t\t }\n\t\t\t}\n\t\t});\n\t}", "public Saida() {\n initComponents();\n defaults();\n preencherTabela();\n \n }", "private void initializeLists() {\n this.sensorsPm10 = new ArrayList<>();\n this.sensorsTempHumid = new ArrayList<>();\n }", "void init() {\n txtMaKM.setText(random().toUpperCase());\n dccThoiHan.setDateFormatString(\"dd/MM/yyyy\");\n dccThoiHan.setDate(new Date());\n checkHSD();\n load();\n }", "private static void initDataTypeList()\n\t{\n\t\tfor(String numberType : DATA_TYPE_ARRAY)\n\t\t{\n\t\t\tdataTypeList.add(numberType);\n\t\t}\n\t\tlogger.info(\" --|*|-- All Data types are initialized! --|*|--\");\n\t}", "@Override\n public void initialize(URL arg0, ResourceBundle arg1) {\n \t\n \tsetColumnProperties();\n \tstatus.getItems().setAll(StatusPedido.values());\n \tcbfornecedores.getItems().setAll(forncedorService.findAll());\n \t\n \tsuper.initialize(arg0, arg1);\n }", "private void initDefaultTableModel() {\n defaultTableModel = new DefaultTableModel();\n defaultTableModel.addColumn(LocaleBundle.getResourceBundle().getString(\"name\"));\n defaultTableModel.addColumn(LocaleBundle.getResourceBundle().getString(\"sex\"));\n defaultTableModel.addColumn(LocaleBundle.getResourceBundle().getString(\"age\"));\n defaultTableModel.addColumn(LocaleBundle.getResourceBundle().getString(\"position\"));\n defaultTableModel.addColumn(LocaleBundle.getResourceBundle().getString(\"address\"));\n defaultTableModel.addColumn(LocaleBundle.getResourceBundle().getString(\"phone\"));\n defaultTableModel.addColumn(LocaleBundle.getResourceBundle().getString(\"email\"));\n defaultTableModel.addColumn(\"Tên tài khoản\");\n }", "public ModelltypImpl(String dateiname) {\r\n\t\tdatentypen.add(new DatentypImpl(\"Text\", \"String\", \"VARCHAR($laenge)\")); // erster Typ ist stets DefaultTyp\r\n\t\tdatentypen.add(new DatentypImpl(\"Integer\", \"int\", \"INT\"));\r\n\t\tdatentypen.add(new DatentypImpl(\"Boolean\", \"INT(1)\"));\r\n\t\tdatentypen.add(new DatentypImpl(\"Betrag\", \"double\", \"DECIMAL\"));\r\n\t\tdatentypen.add(new DatentypImpl(\"Double\", \"double\", \"DECIMAL\"));\r\n\t\tdatentypen.add(new DatentypImpl(\"Datum+Zeit\", \"java.util.Date\", \"DATETIME\"));\r\n\t\tdatentypen.add(new DatentypImpl(\"Datum\", \"java.sql.Date\", \"DATE\"));\r\n\t\tdatentypen.add(new DatentypImpl(\"Zeit\", \"java.util.Time\", \"TIME\"));\r\n\t\tdatentypen.add(new DatentypImpl(\"Long\", \"INT\"));\r\n\t\tdatentypen.add(new DatentypImpl(\"Text lang\", \"String\", \"CLOB\"));\r\n\t\tdatentypen.add(new DatentypImpl(\"char\", \"CHAR(1)\"));\r\n\t\tdatentypen.add(new DatentypImpl(\"Id\", \"String\", \"VARCHAR(16 BYTE)\"));\r\n\t}", "public DLList() {\r\n init();\r\n }", "private synchronized void init(){\n _2_zum_vorbereiten.addAll(spielzeilenRepo.find_B_ZurVorbereitung());\n _3_vorbereitet.addAll(spielzeilenRepo.find_C_Vorbereitet());\n _4_spielend.addAll(spielzeilenRepo.find_D_Spielend());\n }", "private void initData() {\n }", "public FormBukuTamu() {\n initComponents();\n this.controllers= new ControllersOfBukuTamu();\n this.controllers.inijectTable((DefaultTableModel)tabelBukuTamu.getModel());\n refreshTable();\n setTableRowSorter(tabelBukuTamu, txtDate);\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n fillTable();\n // TODO\n }", "@Override\r\n\tprotected void init() {\r\n\t\tList<Configuracao> configs = servico.listarTodos();\r\n\t\tif (!configs.isEmpty()) {\r\n\t\t\tentidade = configs.get(0);\t// deve haver apenas um registro\r\n\t\t} else {\r\n\t\t\tcreateConfiguracao();\r\n\t\t}\r\n\t\t\r\n carregarTemas();\r\n\t}", "public FpLista() {\r\n\t\t\r\n\t}", "private void initShowData() {\n /*\n 测试数据\n */\n todayClass.add(new ClassBean(\"操作系统\",\"思源208\",\"邢薇薇\",\"10:00-12:00\"));\n todayClass.add(new ClassBean(\"数据库\",\"逸夫708\",\"王方石\",\"14:00-16:00\"));\n\n nowClass.add(new ClassBean(\"移动应用开发\",\"逸夫513\",\"曾立刚\",\"10:00-12:00\"));\n\n\n\n// if(showList!=null) {\n// showList.clear();\n//// showList.addAll(DBManager.getInstance().getInfoList());\n// }\n }", "public Vista() {\n initComponents();\n modelo = new DefaultTableModel();\n listamascota = new ArrayList<>();\n\n }", "public Tabuada() {\n initComponents();\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n this.compteDao = new CompteDao();\n this.compte = compteDao.findAll().get(2);\n labNumCompte.setText(compte.getNumero());\n labSolde.setText(String.valueOf(compte.getSolde()));\n \n this.ts = new services.Transaction();\n this.colDate.setCellValueFactory(new PropertyValueFactory<>(\"date\")); \n this.colMnt.setCellValueFactory(new PropertyValueFactory<>(\"montant\")); \n Obltransactions = FXCollections.observableArrayList(ts.getTransactionsByCompte(this.compte));\n this.tableTransaction.setItems(Obltransactions);\n\n }", "public StuList() {\r\n\t\t// todo\r\n\t}", "public MaschinenVerwaltung() {\r\n setMaschinenListe();\r\n setEinKopfMaschinenListe();\r\n setZweiBisAchtKopfMaschine();\r\n setZehnUndMehrKopfMaschine();\r\n }", "@Override\n\tpublic void initData() {\n\n\n\n\t}", "public void setUp() {\n rec = new Record[5];\n rec[3] = new Record((short) 9, (short) 9);\n test1 = new LList();\n }", "private void initDataset(){\n dataSet.add(\"Karin\");\n dataSet.add(\"Ingrid\");\n dataSet.add(\"Helga\");\n dataSet.add(\"Renate\");\n dataSet.add(\"Elke\");\n dataSet.add(\"Ursula\");\n dataSet.add(\"Erika\");\n dataSet.add(\"Christa\");\n dataSet.add(\"Gisela\");\n dataSet.add(\"Monika\");\n\n addDataSet.add(\"Anna\");\n addDataSet.add(\"Sofia\");\n addDataSet.add(\"Emilia\");\n addDataSet.add(\"Emma\");\n addDataSet.add(\"Neele\");\n addDataSet.add(\"Franziska\");\n addDataSet.add(\"Heike\");\n addDataSet.add(\"Katrin\");\n addDataSet.add(\"Katharina\");\n addDataSet.add(\"Liselotte\");\n }", "@Override\n public void initialize(URL url, ResourceBundle resourceBundle) {\n\n //configure the TableView to get data from the DB!\n getTableData();\n MSAppointmentsTableView.setItems(allAppointments);\n\n\n\n\n\n\n\n }", "public ListaEtiquetas() {\n this.listaEtiquetas = new ArrayList<>();\n }", "private intFrmArticulos() {\r\n initComponents();\r\n lista2 = p.listarArticulos2();\r\n artList.addAll(lista2);\r\n ArticulosTableFormat tblArt = new ArticulosTableFormat();\r\n EventTableModel<Articulos> artTableModel = new EventTableModel(artList, tblArt);\r\n jTable1.setModel(artTableModel);\r\n \r\n\r\n }" ]
[ "0.64068425", "0.63786507", "0.63720804", "0.6344174", "0.62747324", "0.62660986", "0.6219399", "0.6198776", "0.6187131", "0.6170776", "0.61674815", "0.61621207", "0.6140257", "0.6138281", "0.61223996", "0.610526", "0.60689104", "0.60608906", "0.60574", "0.6044023", "0.6042946", "0.60403484", "0.6036871", "0.60245085", "0.6023736", "0.6023515", "0.6018904", "0.6018825", "0.6011823", "0.59993935", "0.59733397", "0.59712774", "0.5936333", "0.59355104", "0.5928734", "0.59226453", "0.59179664", "0.59113216", "0.59007496", "0.588941", "0.5868739", "0.5868135", "0.58670175", "0.58604085", "0.5859484", "0.58545524", "0.5852113", "0.58518004", "0.58491784", "0.5839174", "0.583705", "0.5825911", "0.58253866", "0.58238715", "0.58184195", "0.5817262", "0.58115584", "0.58114684", "0.5806524", "0.5796758", "0.57869977", "0.578472", "0.5782709", "0.57800686", "0.57799214", "0.5774733", "0.57742137", "0.5769205", "0.5767853", "0.5766008", "0.5760483", "0.5759197", "0.5757893", "0.5753689", "0.57529396", "0.5751534", "0.5748186", "0.57463664", "0.5743729", "0.5742088", "0.5740097", "0.57336754", "0.5732418", "0.5728862", "0.57272553", "0.5723411", "0.5718437", "0.5718007", "0.5710896", "0.5709311", "0.57079357", "0.5707388", "0.5706694", "0.5705919", "0.5705656", "0.57032955", "0.5698327", "0.5693768", "0.56933945", "0.5691785" ]
0.5915643
37
this method gets called several times during the update
public void updateProgress(long readBytes, long contentLength) { Xtreemfs_portletApplication.this.subwindow.pi.setValue(new Float(readBytes / (float) contentLength)); Xtreemfs_portletApplication.this.subwindow.textualProgress.setValue(+ readBytes/1024 + " out of " + contentLength/1024 + "KiB uploaded."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\n\t\tpublic void update() {\n\n\t\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\n public void update() {\n \n }", "public void willbeUpdated() {\n\t\t\n\t}", "@Override\r\n\tpublic void update() {\r\n\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\tsuper.update();\r\n\t}", "protected void onUpdate() {\r\n\r\n\t}", "@Override\r\n\tpublic void onCustomUpdate() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\r\n\t}", "@Override\r\n\tpublic void update() {\n\r\n\t}", "@Override\r\n\tpublic void update() {\n\r\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "@Override\r\n public void onUpdate() {\n super.onUpdate();\r\n }", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update() {}", "@Override\n public void update() {\n }", "@Override\n public void update()\n {\n\n }", "@Override\n public void update() {\n }", "@Override\n public void update() {\n\n }", "@Override\n\tpublic void update() { }", "@Override\n\tpublic void preUpdate() {\n\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic boolean update() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean update() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean update() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic void uniqueUpdate() {\n\r\n\t}", "@Override\n\tpublic void update() {\n\t}", "@Override\n\tpublic void update() {\n\t}", "@Override\n\tpublic void update() {\n\t}", "@Override\n\tpublic int update() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void onUpdate() {\n\t\t\n\t}", "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void update() {\n\t\t\tSystem.out.println(\"새로운 수정\");\n\t\t}", "private void updateResorce() {\n }", "public void update() {\n\t\t\n\t}", "public void update()\n\t{\n\t\tsuper.update();\n\t}", "public void update() {\r\n\t\t\r\n\t}", "@Override\n public boolean canUpdate() { return false; }", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "@Override\n protected void onDataChanged() {\n }", "@Override\r\n\tpublic int update() throws Exception {\n\t\treturn 0;\r\n\t}", "@Override\n public void update() {\n updateBuffs();\n }", "public void update(){\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void Update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void Update() {\n\t\t\r\n\t}", "@PreUpdate\n\tprotected void onUpdate() {\n\t\tupdated = new Date();\n\t\trcaCase.updated = updated;\n\t}", "public void update() {}", "@Override\r\n\tpublic String update() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String update() {\n\t\treturn null;\r\n\t}", "@Override\n\t\t\tprotected void updateEnabled() {\n\t\t\t}", "public void update(){}", "public void update(){}", "protected void aktualisieren() {\r\n\r\n\t}", "@Override\n protected void updateProperties() {\n }", "@Override\r\n\t\t\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\t\t\tcheckID();\r\n\t\t\t\t\t}", "@Override\n\tprotected void doUpdate(Session session) {\n\n\t}", "public void update() {\n \t\tissueHandler.checkAllIssues();\n \t\tlastUpdate = System.currentTimeMillis();\n \t}", "@Override\n\tpublic void update(float deltaTime) {\n\t\t\n\t}", "@Override\n\tpublic void update(float deltaTime) {\n\t}", "protected void refresh() {\n\t}", "@Override\n public void refresh() {\n }", "@Override\n\tpublic boolean updateStatus() {\n\t\treturn false;\n\t}", "@Override\n public void update() {\n this.blnDoUpdate.set(true);\n }", "@Override\r\n\tpublic boolean update(Moteur obj) {\n\t\treturn false;\r\n\t}", "@Override\r\n public final void update() {\r\n\r\n logger.entering(this.getClass().getName(), \"update\");\r\n\r\n setFilterMap();\r\n\r\n logger.exiting(this.getClass().getName(), \"update\");\r\n\r\n }", "public void updateData() {}", "public void requestUpdate(){\n shouldUpdate = true;\n }", "@Override\r\n\tpublic void MemberUpdate() {\n\r\n\t}", "public void update() {\n }", "@Override\n\tpublic void updatePosition() {\n\t\t\n\t}", "@Override\n public boolean update(Revue objet) {\n return false;\n }", "private void updateDB() {\n }", "@Override\n public void onDataChanged() {\n\n }" ]
[ "0.7435005", "0.74157524", "0.74157524", "0.73705685", "0.73705685", "0.73705685", "0.7237872", "0.7237872", "0.7237872", "0.7237872", "0.7237872", "0.7221968", "0.7183868", "0.7148037", "0.7120781", "0.7115957", "0.7100344", "0.70919746", "0.69993544", "0.69993544", "0.6998934", "0.6998934", "0.6998934", "0.6998934", "0.6998934", "0.6998934", "0.6985756", "0.6985756", "0.6979878", "0.6977938", "0.6977938", "0.69680995", "0.69658387", "0.69600564", "0.6942691", "0.69419026", "0.6909586", "0.6904448", "0.6904448", "0.6904448", "0.6904448", "0.6904448", "0.6904448", "0.6904448", "0.6904448", "0.6904448", "0.6904448", "0.68898535", "0.68898535", "0.68898535", "0.6878938", "0.6875093", "0.6875093", "0.6875093", "0.6864176", "0.6843478", "0.6834126", "0.66637856", "0.66253746", "0.6519657", "0.65089744", "0.6486367", "0.6477398", "0.6456284", "0.6456284", "0.6456284", "0.6456284", "0.6445277", "0.64247364", "0.6419184", "0.6400739", "0.63627523", "0.63627523", "0.63158005", "0.62799764", "0.626964", "0.626964", "0.6257172", "0.6248559", "0.6248559", "0.6246957", "0.62413174", "0.62332106", "0.62319547", "0.6209733", "0.62008595", "0.61969405", "0.6182805", "0.6179474", "0.6169269", "0.61678946", "0.61585456", "0.6156423", "0.61496896", "0.6130085", "0.61259377", "0.6124431", "0.61218524", "0.61200297", "0.61188805", "0.6118774" ]
0.0
-1
Liefert die Datei als Stream zur Weiterverarbeitung
private StreamSource getFileSource(final File requestedFile) { StreamSource fileSource = new StreamSource() { private static final long serialVersionUID = 3275933556191707490L; public InputStream getStream() { try { return new org.xtreemfs.portlet.util.BufferedFileInputStream(requestedFile); } catch (IOException e) { showNotification("Error", e.getMessage(), Notification.TYPE_ERROR_MESSAGE, e); } return null; } }; return fileSource; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void openStream ()\n {\n stream = Util.stream (entry, \"Holder.java\");\n }", "default void refreshStream() {}", "public InputStream getStream();", "@Override\n public InputStream openStream() throws IOException\n {\n return new FileInputStream(temp);\n }", "public long getStream();", "public String getStream(){\n return this.stream;\n }", "protected abstract OutputStream getStream() throws IOException;", "InputStream openStream() throws IOException;", "private void openStreams() {\n\t\ttry {\n\t\t\t// mostramos un log\n\t\t\tthis.getLogger().debug(\"Opening streams..\");\n\t\t\t// abrimos el stream de salida\n\t\t\tthis.setOutputStream(new ObjectOutputStream(this.getConnection().getOutputStream()));\n\t\t\t// abrimos el stream de entrada\n\t\t\tthis.setInputStream(new ObjectInputStream(this.getConnection().getInputStream()));\n\t\t} catch (final IOException e) {}\n\t}", "public void streamData(String pathToFile) throws IOException;", "@Override void initializeStream(ZonedDateTime dateTime) throws IOException {\n\t\tDriverStation ds = DriverStation.getInstance();\n\t\tString filename = String.join(\"_\", ds.getMatchType().toString()+Integer.toString(ds.getMatchNumber()), root, dateTime.format(DateTimeFormatter.ofPattern(\"uu_MM_dd_HH_mm_ss\"))) + \".\" + ext;\n\t\tSet<OpenOption> opts = new HashSet<>();\n\t\topts.add(StandardOpenOption.CREATE);\n\t\topts.add(StandardOpenOption.TRUNCATE_EXISTING);\n\t\ttry {\n\t\t\tstream = new FileOutputStream(folder.resolve(filename).toString());\n\t\t\tchannel = stream.getChannel();\n\t\t} catch (IOException e) {\n\t\t\tchannel = null;\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tprotected void setData(DataStream dataStream) throws IOException {\n\t\t\n\t}", "boolean getStream();", "protected void closeStream ()\n {\n stream.close ();\n }", "@Override\n\tpublic void read(InStream inStream) {\n\t}", "InputStream getDataStream();", "private InputStream openContentStream() {\n\t\tString contents =\n\t\t\t\"This is the initial file contents for *.opera file that should be word-sorted in the Preview page of the multi-page editor\";\n\t\treturn new ByteArrayInputStream(contents.getBytes());\n\t}", "public void openForWriting(String datei) throws IOException {\n \n oos = new ObjectOutputStream(new FileOutputStream(datei));\n \n }", "protected abstract InputStream getStream(String resource);", "@Override\n public IIOMetadata getStreamData() {\n return super.streamData;\n }", "public abstract InputStream mo131998b();", "private InputStream openContentStream() {\n\t\t// ok, where do we dump our layers to?\n\t\tfinal ByteArrayOutputStream bos = new ByteArrayOutputStream();\n\n\t\t// hmm, now actually output the layers\n\t\tDebriefEclipseXMLReaderWriter.exportThis(_myNewLayers, bos);\n\n\t\t// and return our OS as an IS\n\t\treturn new ByteArrayInputStream(bos.toByteArray());\n\t}", "private void setInputStream(final ObjectInputStream stream) {\n\t\t// almacenamos el stream de entrada\n\t\tthis.inputStream = stream;\n\t}", "public void xmlInputStream() {\n inputStream = context.getResources().openRawResource(R.raw.flowers_xml);\n //stringInputStream = convertInputStreamToString(inputStream);\n //System.out.println(\"------------ InputStream ------------\\n\" + stringInputStream);\n //------------------------------------------------------------------------------------------\n }", "public abstract InputStream getInputStream();", "public abstract InputStream getInputStream();", "public Stream getStream(Streamable type){\n return Stream.builder().add(type).build() ;\n }", "public ExecutableReader(ExecutableStream stream) throws Exception {\n\t\texStr = stream;\n\t\tread(stream);\n\t}", "public abstract InputStream openStream(String str);", "@Override\n protected void writeStreamHeader() throws IOException {\n // metodo honek ez du ezer egiten\n }", "public String getStreamContent() {\n return streamContent;\n }", "private void grabarArchivo() {\n\t\tPrintWriter salida;\n\t\ttry {\n\t\t\tsalida = new PrintWriter(new FileWriter(super.salida));\n\t\t\tsalida.println(this.aDevolver);\n\t\t\tsalida.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "DataStreamApi getDataStreamApi();", "private void fechaBuffer() {\n\t\tif (buffer != null){\n\t\t\ttry {\n\t\t\t\tbuffer.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"[ERRO] Erro ao fechar stream do arquivo csv.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "DataStreams createDataStreams();", "protected abstract InputStream getInStreamImpl(String filename) throws IOException;", "public boolean getStream() {\n return stream_;\n }", "void init() throws IOException {\n\t\tif (this.type==FILE){\n\t\t\tstream.init(new FileInputStream(name));\n\t\t}\n\t\telse{\n\t\t\tURL url = new URL(name);\n\t\t\tstream.init((url.openStream()));\n\t\t}\n\t}", "protected final InputStream getStream() { return _inputSource; }", "URL getStreamURL() throws IOException;", "public boolean getStream() {\n return stream_;\n }", "@NotNull\n RecordId writeStream(@NotNull InputStream stream) throws IOException;", "public InputStreamHolder (InputStream the_stream) {\n\t\t\tstream = the_stream;\n\t\t\tis_closed = false;\n\t\t}", "private IntStream createStream() {\n DataInputStream dataInputStream = null;\n try {\n dataInputStream = new DataInputStream(new BufferedInputStream(new FileInputStream(fileName)));\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found\");\n }\n DataInputStream finalDin = dataInputStream;\n return IntStream.generate(() -> {\n try {\n assert finalDin != null;\n return finalDin.readInt();\n } catch (IOException e) {\n System.out.println(\"Stream problem\");\n }\n return 0;\n })\n .limit(20);\n }", "public ZipLineStream() {\n\t\tarchType = ArchiveTypes.ZIP.name();\n\t}", "@Override\r\n public Object getBufferedFileInputStream(String name) {\n return null; \r\n }", "@Override\n\t\tprotected void readStreamHeader() throws IOException {\n\t\t}", "public void closeStream() {\n output.close();\n input.close();\n }", "public InputStream getInputStream() throws IOException {\n/* 521 */ return Minecraft.getMinecraft().getResourceManager().getResource(p_148612_0_).getInputStream();\n/* */ }", "public interface SimpleFile {// extends IFile { \n /**\n * Open the file\n * @param path path to the file\n * @param readOnly if file is readonly\n * @param noFlush whther synchronous flush is needed\n */\n void open(String path, boolean readOnly, boolean noFlush)throws IOException;\n \n /**\n * Delete file\n * @param path path to the file\n */\n void delete(String path);\n \n boolean isOpened();\n String readString()throws IOException;\n void truncate(int nSize)throws IOException;\n InputStream getInputStream()throws IOException;\n OutputStream getOutStream();\n OutputStream getOutStreamEx(long pos)throws IOException; \n long length();\n \n /**\n * \n * @param path\n * @return\n */\n String getDirPath(String path) throws IOException;\n\n /**\n * @param fromClass\n * @param path\n * @return\n */\n public abstract InputStream getResourceAsStream(Class fromClass, String path);\n \n public abstract void renameOverwrite(String oldName, String newName);\n \n public abstract void copyJarFileToMemory(String strFileName, InputStream jarStream)throws IOException;\n \n void write(long pos, byte[] buf)throws IOException;\n\n /**\n * Read data from the file\n * @param pos offset in the file\n * @param buf array to receive readen data (size is always equal to database page size)\n * @return number of bytes actually readen\n */\n int read(long pos, byte[] buf)throws IOException;\n\n /**\n * Flush all fiels changes to the disk\n */\n void sync()throws IOException;\n\n /**\n * Close file\n */\n void close()throws IOException;\n\n /**\n * Length of the file\n */\n //long length();\n \n}", "protected void transform()\n\t{\n\t\tFileSummary summary = getFileSummary();\n\t\tFileCloser.close(summary.getFile());\n\n\t\tsuper.transform();\n\t}", "private String determineStream() {\r\n\t\tif (stream == null) {\r\n\t\t\tCcLsstream lsstream = new CcLsstream();\r\n\t\t\tlsstream.setProject(getProject());\r\n\t\t\tlsstream.setFormat(FMT_EXTENED_NAME);\r\n\t\t\tlsstream.setViewTag(determineViewTag());\r\n\t\t\tlsstream.execute();\r\n\t\t\tstream = lsstream.getCommandOutput();\r\n\t\t\tlog(\"Using derived stream [\" + stream + \"]\", Project.MSG_VERBOSE);\r\n\t\t}\r\n\t\treturn stream;\r\n\t}", "public MemoryCacheSeekableStream(InputStream src) {\n/* 75 */ this.src = src;\n/* */ }", "OutputStream createStream(String location);", "public void downloadFile(ObjectInputStream inputStream) {\r\n\t \tFileEvent fileEvent = null;\r\n\t \ttry {\r\n\t \tfileEvent = (FileEvent) inputStream.readObject();\r\n\t if (fileEvent.getStatus().equalsIgnoreCase(\"Error\")) {\r\n\t System.out.println(\"Error occurred ..So exiting\");\r\n\t System.exit(0);\r\n\t }\r\n\t String outputFile = fileEvent.getDestinationDirectory() + fileEvent.getFilename();\r\n\t if (!new File(fileEvent.getDestinationDirectory()).exists()) {\r\n\t new File(fileEvent.getDestinationDirectory()).mkdirs();\r\n\t }\r\n\t File dstFile = new File(outputFile);\r\n\t FileOutputStream fileOutputStream = new FileOutputStream(dstFile);\r\n\t fileOutputStream.write(fileEvent.getFileData());\r\n\t fileOutputStream.flush();\r\n\t fileOutputStream.close();\r\n\t System.out.println(\"Output file : \" + outputFile + \" is successfully saved \");\r\n\t Thread.sleep(3000);\r\n\t System.exit(0);\r\n\t \r\n\t } catch (ClassCastException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tList<String> serverFiles = (List<String>) fileEvent;\r\n\t\t\t\tSystem.out.println(serverFiles);\r\n\t\t\t} catch (IOException e) {\r\n\t e.printStackTrace();\r\n\t } catch (ClassNotFoundException e) {\r\n\t e.printStackTrace();\r\n\t } catch (InterruptedException e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t }", "public final InputStream returnStream()\n\t{\n\t\treturn stream;\n\t}", "void getFile(String path, OutputStream stream) throws NotFoundException, IOException;", "private ObjectInputStream getInputStream() {\n\t\t// retornamos el stream de entrada\n\t\treturn this.inputStream;\n\t}", "public void opened();", "public void setInputStream(DataInputStream x) throws IOException {\n\t\tin = x;\n\t\tin.readFully(scratch, 0, 32);\n\t\tversion = scratch[0];\n\t\tyear = scratch[1] + 1900;\n\t\tmonth = scratch[2];\n\t\tday = scratch[3];\n\t\tnumRecords = ShapefileBundle.bytesToIntLE(scratch, 4);\n\t\tnumHeaderBytes = ShapefileBundle.bytesToUShortLE(scratch, 8);\n\t\tnumRecordBytes = ShapefileBundle.bytesToUShortLE(scratch, 10);\n\t\tincomplete = scratch[14];\n\t\tencrypted = scratch[15];\n\t\tmdx = scratch[28];\n\t\tlanguage = scratch[29];\n\t\tint readPartTwoLen = 31;\n\t\tif ((version & 0x07) == 4) {\n\t\t\tin.readFully(scratch, 0, 32);\n\t\t\tdriverName = new String(scratch, 0, 32);\n\t\t\tin.skipBytes(4);\n\t\t\treadPartTwoLen = 47;\n\t\t} else {\n\t\t\tassert((version & 0x07) == 3);\n\t\t}\n\t\tscratch[0] = in.readByte();\n\t\tint startpos = 0;\n\t\twhile (scratch[0] != (byte)0x0d) {\n\t\t\tin.readFully(scratch, 1, readPartTwoLen);\n\t\t\tDBaseFieldDescriptor nh = new DBaseFieldDescriptor(scratch, 0, 1+readPartTwoLen);\n\t\t\tnh.startpos = startpos;\n\t\t\tstartpos += nh.length;\n\t\t\tfields.add(nh);\n\t\t\tscratch[0] = in.readByte();\n\t\t}\n\t\trecordLength = startpos;\n\t\tscratch = new byte[recordLength];\n\t}", "public InputStream getInputStream();", "public InputStream getInputStream();", "static void inicializarentrada(){\n try {\n archivo_entrada= new FileInputStream(\"src/serializacion/salida.txt\");\n } catch (FileNotFoundException ex) {\n System.out.println(\"Error al abrir el archivo\");\n }\n \n try {\n lector= new ObjectInputStream(archivo_entrada);\n } catch (IOException ex) {\n System.out.println(\"Error al acceder al archivo\");\n }\n }", "void saveFrom(String key, InputStream stream);", "private void saveToSd(InputStream stream) {\n\t\tString fileName = \"exchange_rates.xml\";\n\n\t\tFile sdCard = android.os.Environment.getExternalStorageDirectory(); \n\t\tFile dir = new File (sdCard.getAbsolutePath() + \"/Android/data/com.douchedata.exchange/files/\");\n\t\tFile file = new File(dir, fileName);\n\t\t\n\t\ttry {\n\t\t\tif ((file.exists() != false))\n\t\t\t\tfile.createNewFile();\n\t\t\t\n\t\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\t\t\n\t\t\tbyte[] buffer = new byte[1024];\n\t\t\t\n\t\t\tint len = 0;\n\t\t\twhile ((len = stream.read(buffer)) > 0) {\n\t\t\t\tfos.write(buffer, 0, len);\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "int writeTo(byte[] iStream, int pos, ORecordVersion version);", "private void readObject(final ObjectInputStream stream) throws IOException, ClassNotFoundException {\n stream.defaultReadObject();\n answerMarks_.clear();\n }", "@NotNull InputStream openInputStream() throws IOException;", "public InputStream getStream() {\n\t\treturn new ByteArrayInputStream(os.toByteArray());\n\t}", "synchronized protected void rewind() {\n\t\ttry {\n\t\t\tais.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new CCSoundException(\"JSPCMAudioRecordingStream::rewind - Error closing the stream before reload\", e);\n\t\t}\n\t\tais = CCSoundIO.getAudioInputStream(meta.fileName());\n\t}", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "private String readStream(InputStream is) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(is),1000);\n for (String line = r.readLine(); line != null; line =r.readLine()){\n sb.append(line);\n }\n is.close();\n return sb.toString();\n }", "public ResourceInputStream(InputStream in) {\n\t\t\tthis(in, System.currentTimeMillis());\n\t\t}", "OutputStream getOutputStream() throws IOException;", "OutputStream getOutputStream();", "Stream<In> getInputStream();", "public ResourceInputStream(InputStream in, long lastModified) {\n\t\t\tsuper(in);\n\t\t\tthis.lastModified = lastModified;\n\t\t}", "public interface IStreamFactory{\n Closeable getStream(Query q);\n }", "protected final void closeStream(SrvSession sess, TreeConnection tree, NetworkFile stream)\n throws IOException {\n\n // Debug\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"DB closeStream() file=\" + stream.getFullName() + \", stream=\" + stream.getStreamName() +\n \", fid/stid=\" + stream.getFileId() + \"/\" + stream.getStreamId());\n \n // Access the JDBC context\n\n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n\n // Close the file\n\n dbCtx.getFileLoader().closeFile(sess, stream);\n\n // Access the JDBC file\n \n DBNetworkFile jdbcFile = null;\n \n if ( stream instanceof DBNetworkFile) {\n \n // Access the JDBC file\n \n jdbcFile = (DBNetworkFile) stream;\n\n // Decrement the open file count\n \n FileState fstate = jdbcFile.getFileState();\n\n // Check if the file state is valid, if not then check the main file state cache\n\n if ( fstate == null) {\n \n // Check the main file state cache\n \n fstate = getFileState(stream.getFullName(), dbCtx, false);\n }\n else {\n \n // Decrement the open file count for this file\n \n fstate.decrementOpenCount();\n }\n\n // Check if we have a valid file state\n \n if ( fstate != null) {\n \n // Update the cached file size\n \n FileInfo finfo = (FileInfo) fstate.findAttribute(FileState.FileInformation);\n if ( finfo != null && stream.getWriteCount() > 0) {\n \n // Update the file size\n \n finfo.setSize(jdbcFile.getFileSize());\n \n // Update the modified date/time\n \n finfo.setModifyDateTime(jdbcFile.getModifyDate());\n\n // DEBUG\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\" Stream size=\" + jdbcFile.getFileSize() + \", modifyDate=\" + jdbcFile.getModifyDate());\n }\n }\n }\n else\n Debug.println(\"closeFile() Not DBNetworkFile file=\" + stream);\n \n // Check if the stream was opened for write access, if so then update the stream size\n \n if ( stream.getGrantedAccess() != NetworkFile.READONLY && stream.isDirectory() == false &&\n stream.getWriteCount() > 0) {\n \n // DEBUG\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\" Update stream size=\" + stream.getFileSize());\n \n // Get the current date/time\n \n long modifiedTime = 0L;\n if ( stream.hasModifyDate())\n modifiedTime = stream.getModifyDate();\n else\n modifiedTime = System.currentTimeMillis();\n\n // Check if the modified time is earlier than the file creation date/time\n \n if ( stream.hasCreationDate() && modifiedTime < stream.getCreationDate()) {\n \n // Use the creation date/time for the modified date/time\n \n modifiedTime = stream.getCreationDate();\n \n // DEBUG\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"Close stream using creation date/time for modified date/time\");\n }\n \n // Update the in-memory stream information\n \n FileState parent = getFileState(stream.getFullName(), dbCtx, false);\n StreamInfo sInfo = null;\n \n if ( parent != null) {\n \n // Check if the stream list has been loaded\n \n StreamInfoList streamList = loadStreamList(parent, null, dbCtx, false);\n if ( streamList != null) {\n \n // Find the stream information\n \n sInfo = streamList.findStream(stream.getStreamName());\n if ( sInfo != null) {\n \n // Update the stream size\n \n sInfo.setSize(stream.getFileSize());\n \n // DEBUG\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"Updated stream file size\");\n }\n }\n }\n\n // Update the file details for the file stream in the database\n \n try {\n\n // Check if the file strea, details are valid\n \n if ( sInfo == null) {\n \n // Create the stream information\n \n sInfo = new StreamInfo();\n \n sInfo.setSize(stream.getFileSize());\n sInfo.setStreamId(stream.getStreamId());\n }\n \n // Set the modify date/time for the stream\n \n sInfo.setModifyDateTime(System.currentTimeMillis());\n\n // Update the stream details\n \n dbCtx.getDBInterface().setStreamInformation(stream.getDirectoryId(), stream.getFileId(), stream.getStreamId(), sInfo);\n }\n catch (DBException ex) {\n }\n }\n }", "SparseStream openFile(String path, FileMode mode, FileAccess access) throws IOException;", "public StorableInput(InputStream stream) {\n Reader r = new BufferedReader(new InputStreamReader(stream));\n fTokenizer = new StreamTokenizer(r);\n fMap = new Vector();\n }", "public OutputStream getStream()\r\n {\r\n return mStream;\r\n }", "DataBaseReadStream createNewStream(Cursor beginCursor) throws SQLException;", "default Stream<Token<?>> stream() {\n return stream(true);\n }", "SparseStream openFile(String path, FileMode mode) throws IOException;", "private Stream<File> getFileStreamFromView() {\n // Copy the values out of the UI and into a temp list, so that the UI\n // can be updated without stomping on the grabbed values.\n final List<DirectoryListItem> items = new ArrayList<>(gridView.getItems());\n\n return items.stream().map(DirectoryListItem::getFile);\n }", "private void setOutputStream(final ObjectOutputStream stream) throws IOException {\n\t\t// almacenamos el stream de salida\n\t\tthis.outputStream = stream;\n\t\t// limpiamos el stream\n\t\tthis.getOutputStream().flush();\n\t}", "public ClassFile(DataInput stream)\n throws IOException\n {\n load(stream);\n }", "@NonNull\n\t\tBuilder addStream(@NonNull InputStream stream);", "public ExecutableStream getStream() {\n\t\treturn exStr;\n\t}", "private void open()\n {\n try\n {\n // Found how to append to a file here \n //http://stackoverflow.com/questions/1625234/how-to-append-text-to-an-existing-file-in-java\n r = new PrintWriter( new BufferedWriter(new FileWriter(filePath, true)));\n }\n catch( IOException e )\n {\n r = null;\n UI.println(\"An error occored when operning stream to the log file.\\n This game wont be logged\");\n Trace.println(e);\n }\n }", "default Stream<T> fullStream() {\n return Stream.empty();\n }", "@Test\r\n\tpublic void testCompressing() throws ClassNotFoundException,\r\n\t\t\tInstantiationException, IllegalAccessException {\n\r\n\t\tAbstractStream abstractStream = Factory\r\n\t\t\t\t.getStream(\"by.bsu.decorator.bean.FileStream\");\r\n\t\tCompressingStream stream = (CompressingStream) Factory\r\n\t\t\t\t.getStream(\"by.bsu.decorator.bean.CompressingStream\");\r\n\t\tstream.setAbstractStream(abstractStream);\r\n\t\tString str = stream.handleBufferFull();\r\n\r\n\t\tbyte[] b = new byte[10];\r\n\t\tfor (int i = 0; i < 10; i++)\r\n\t\t\tb[i] = (byte) i;\r\n\t\tstream.putByte(b);\r\n\t\tSystem.out.println(str);\r\n\t\tassertEquals(\"Compressing Stream. File Stream. \", str);\r\n\t}", "boolean saveDocumentStream(String path, InputStream documentStream, List <String> moduleList);", "public void Link (Stream rkStream, Stream.Link pkLink)\r\n {\r\n super.Link(rkStream,pkLink);\r\n }", "private void serializeBeforeOpen() {\r\n sr.save(this.path);\r\n }", "void read(StreamOption streamOpt);", "public final void setStream(InputStream newStream)\n\t{\n\t\tthis.dataValue = null;\n _blobValue = null;\n\t\tthis.stream = newStream;\n\t\tstreamValueLength = -1;\n\t}", "@Override\n\tpublic void open() throws IOException {\n\t\t\n\t}" ]
[ "0.7041749", "0.6377359", "0.6101395", "0.6086114", "0.60353106", "0.59561306", "0.5947163", "0.5920993", "0.5906887", "0.5831259", "0.58232594", "0.5815241", "0.5803719", "0.57830286", "0.57457054", "0.5743575", "0.57385695", "0.57362825", "0.57057756", "0.5672943", "0.56527007", "0.56515795", "0.5650542", "0.5629983", "0.5609268", "0.5609268", "0.5592563", "0.55846584", "0.55652076", "0.5565177", "0.55648845", "0.5564711", "0.5561828", "0.5553586", "0.5500045", "0.54649377", "0.5454887", "0.5454388", "0.5432235", "0.5421423", "0.541631", "0.54069096", "0.539827", "0.5366557", "0.5365985", "0.5363222", "0.5357846", "0.5354136", "0.5349784", "0.5346412", "0.5342666", "0.5341121", "0.533821", "0.5336303", "0.53268", "0.53034645", "0.5295047", "0.5292366", "0.5287604", "0.5284932", "0.5277949", "0.5277949", "0.5271655", "0.52666426", "0.52599865", "0.5259897", "0.52569973", "0.5256708", "0.52553207", "0.52471983", "0.5241258", "0.5241258", "0.5241258", "0.52403104", "0.5239401", "0.52240103", "0.5213009", "0.52045643", "0.5200323", "0.5193011", "0.51892287", "0.51867557", "0.51867205", "0.51860124", "0.5185005", "0.5178189", "0.5168982", "0.51630133", "0.5161864", "0.5153056", "0.5152638", "0.51500523", "0.51454145", "0.5144585", "0.5127824", "0.5118904", "0.51152134", "0.51130223", "0.5112113", "0.51114094", "0.5109922" ]
0.0
-1
Packt ein Verzeichnis als ZIP und liefert es als Stream zur Weiterverarbeitung.
private StreamSource getZipSource(final File requestedDirectory) { StreamSource zippedDirSource = new StreamSource() { private static final long serialVersionUID = 7060525220398731933L; public InputStream getStream() { // Pipe bauen, um Steam als Download umzulenken final CircularByteBuffer cbb = new CircularByteBuffer(1024); new Thread( new Runnable(){ public void run(){ ZipOutputStream zos = new ZipOutputStream(cbb.getOutputStream()); Utils.zipDir(getVolume(), requestedDirectory.getPath(), zos); try { if (zos != null) { zos.flush(); zos.close(); } } catch (IOException e) { e.printStackTrace(); } } } ).start(); return cbb.getInputStream(); } }; return zippedDirSource; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void createZipArchiv(String xmlStream, String path, String name) {\r\n\t\ttry {\r\n\t\t\tFile file = new File(path, name + \".xml\");\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t}\r\n\t\t\t//XMLStream in Datei schreiben\r\n\t\t\tPrintWriter writer = new PrintWriter(file);\r\n\t\t\twriter.write(xmlStream);\r\n\t\t\twriter.close();\r\n\t\t\t\r\n\t\t\t//Commando für die Shell um ein Tgz zu erstellen.\r\n\t\t\tString[] str = new String[] {\r\n\t\t\t\t\t\"/bin/bash\",\r\n\t\t\t\t\t\"-c\",\r\n\t\t\t\t\t\"tar cfvz \" + path + \"/\" + name + \".tgz -C \" + path + \" \" + name\r\n\t\t\t\t\t\t\t+ \".xml -C \" + path + \" \" + name + \".pdf\" };\r\n\r\n\t\t\t//Shell Aufruf\r\n\t\t\tProcess p = Runtime.getRuntime().exec(str);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tint timeout = 10;\r\n\t\t\twhile (!new File(path + name + \".tgz\").exists() && timeout != 0) {\r\n\t\t\t\t//warten bis Datei erstellt wurde oder 10 sec vergangen sind\r\n\t\t\t\ttry {\r\n\t\t\t\t\ttimeout--;\r\n\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t} catch (InterruptedException 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}\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}", "private ZipCompressor(){}", "public void tozip() {\r\n\t\t//session.setAttribute(Constant.USER_SESSION_KEY, null);\r\n\t\tList<Netlog> result = null;\r\n\t\tInteger total = null;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t\tresult = (List<Netlog>)netlogDao.findNetlogByPage(1,10000);\r\n\t\t\t\ttotal= result.size();\r\n\t\t\t\t//total= netlogDao.findNetlogCount();\r\n\t\t\t\r\n\t\t} catch (SQLException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tNetlogs netlogs = new Netlogs(result);\r\n\t\tString path = this.getClass().getClassLoader().getResource(\"\").getPath();\r\n\t\tSystem.out.println(path);\r\n\t\tpath = path.replace(\"WEB-INF/classes/\", \"\");\r\n\t\tString path1 = path + \"netlog/\";\r\n\t\tLong time = System.currentTimeMillis()/1000;\r\n\t\tXml2Java.beanToXML(netlogs,path1+\"145-330000-\"+time.toString()+\"-00001-WA-SOURCE_NETLOG_0001-0.xml\");\r\n\r\n\t\tZipUtil.ZipMultiFile(path1, path+\"145-353030334-330300-330300-netlog-00001.zip\");\r\n\t}", "private static void deploy(SQLiteDatabase sqlLiteDb, InputStream dbStream) throws IOException {\n ZipInputStream zis = new ZipInputStream(new BufferedInputStream(dbStream));\n ZipEntry entry = null;\n while ((entry = zis.getNextEntry()) != null) {\n Log.i(TAG, \"deploying zip entry: \" + entry);\n InputStreamReader dbReader = new InputStreamReader(zis);\n deploy(sqlLiteDb, dbReader);\n }\n }", "private static void extractFile(ZipInputStream inStreamZip, FSDataOutputStream destDirectory) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(destDirectory);\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = inStreamZip.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "private void compress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tZipOutputStream rfoFile = new ZipOutputStream(new FileOutputStream(path + fileName)); \n\t\t\tFile dirToZip = new File(rfoDir); \n\t\t\tString[] fileList = dirToZip.list(); \n\t\t\tbyte[] buffer = new byte[4096]; \n\t\t\tint bytesIn = 0; \n\n\t\t\tfor(int i=0; i<fileList.length; i++) \n\t\t\t{ \n\t\t\t\tFile f = new File(dirToZip, fileList[i]); \n\t\t\t\tFileInputStream fis = new FileInputStream(f); \n\t\t\t\tString zEntry = f.getPath();\n\t\t\t\t//System.out.println(\"\\n\" + zEntry);\n\t\t\t\tint start = zEntry.indexOf(uniqueName);\n\t\t\t\tzEntry = zEntry.substring(start + uniqueName.length() + 1, zEntry.length());\n\t\t\t\t//System.out.println(tempDir);\n\t\t\t\t//System.out.println(zEntry + \"\\n\");\n\t\t\t\tZipEntry entry = new ZipEntry(zEntry); \n\t\t\t\trfoFile.putNextEntry(entry); \n\t\t\t\twhile((bytesIn = fis.read(buffer)) != -1) \n\t\t\t\t\trfoFile.write(buffer, 0, bytesIn); \n\t\t\t\tfis.close();\n\t\t\t}\n\t\t\trfoFile.close();\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.compress(): \" + e);\n\t\t}\n\t}", "public ZipLineStream() {\n\t\tarchType = ArchiveTypes.ZIP.name();\n\t}", "public OutputStream getOutputStream(String lumpName) {\n\t\t\t\t\tendEntry();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Get the next entry\r\n\t\t\t\t\tZipEntry dir = new ZipEntry(\"ohrrpgce/games/\" + newRPGName + \"/\" + lumpName);\r\n\t\t\t\t\t//System.out.println(\"Entry opened: \" + dir.getName());\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\ttempJar.putNextEntry(dir);\r\n\t\t\t\t\t} catch (IOException ex) {\r\n\t\t\t\t\t\tSystem.out.println(\"Error adding entry for \" + lumpName + \" : \" + ex.toString());\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn tempJar;\r\n\t\t\t\t}", "private void addToZipStream(Path file, ZipOutputStream zipStream, String dirName)\r\n throws Exception {\r\n String inputFileName = file.toFile().getPath();\r\n try (FileInputStream inputStream = new FileInputStream(inputFileName)) {\r\n\r\n // create a new ZipEntry, which is basically another file\r\n // within the archive. We omit the path from the filename\r\n Path directory = Paths.get(dirName);\r\n ZipEntry entry = new ZipEntry(directory.relativize(file).toString());\r\n\r\n zipStream.putNextEntry(entry);\r\n\r\n // Now we copy the existing file into the zip archive. To do\r\n // this we write into the zip stream, the call to putNextEntry\r\n // above prepared the stream, we now write the bytes for this\r\n // entry. For another source such as an in memory array, you'd\r\n // just change where you read the information from.\r\n byte[] readBuffer = new byte[2048];\r\n int amountRead;\r\n int written = 0;\r\n\r\n while ((amountRead = inputStream.read(readBuffer)) > 0) {\r\n zipStream.write(readBuffer, 0, amountRead);\r\n written += amountRead;\r\n }\r\n } catch (IOException e) {\r\n throw new Exception(\"Unable to process \" + inputFileName, e);\r\n }\r\n }", "public void newZipEntry(ZipEntry zipEntry, InputStream inputStream);", "public int serialize (IDataOutput stream ,boolean includeAdler32 ,boolean centralDir =false ,int centralDirOffset =0){\r\n\t\t\tif(stream == null) { return 0; }\r\n\t\t\tif(centralDir) {\r\n\t\t\t\t// Write central directory file header signature\r\n\t\t\t\tstream.writeUnsignedInt(FZip.SIG_CENTRAL_FILE_HEADER);\r\n\t\t\t\t// Write \"version made by\" host (usually 0) and number (always 2.0)\r\n\t\t\t\tstream.writeShort((_versionHost << 8) | 0x14);\r\n\t\t\t} else {\r\n\t\t\t\t// Write local file header signature\r\n\t\t\t\tstream.writeUnsignedInt(FZip.SIG_LOCAL_FILE_HEADER);\r\n\t\t\t}\r\n\t\t\t// Write \"version needed to extract\" host (usually 0) and number (always 2.0)\r\n\t\t\tstream.writeShort((_versionHost << 8) | 0x14);\r\n\t\t\t// Write the general purpose flag\r\n\t\t\t// - no encryption\r\n\t\t\t// - normal deflate\r\n\t\t\t// - no data descriptors\r\n\t\t\t// - no compressed patched data\r\n\t\t\t// - unicode as specified in _filenameEncoding\r\n\t\t\tstream.writeShort((_filenameEncoding == \"utf-8\") ? 0x0800 : 0);\r\n\t\t\t// Write compression method (always deflate)\r\n\t\t\tstream.writeShort(isCompressed ? COMPRESSION_DEFLATED : COMPRESSION_NONE);\r\n\t\t\t// Write date\r\n\t\t\tDate d =(_date != null) ? _date : new Date();\r\n\t\t\tint msdosTime =uint(d.getSeconds ())| (uint(d.getMinutes()) << 5) | (uint(d.getHours()) << 11);\r\n\t\t\tint msdosDate =uint(d.getDate ())| (uint(d.getMonth() + 1) << 5) | (uint(d.getFullYear() - 1980) << 9);\r\n\t\t\tstream.writeShort(msdosTime);\r\n\t\t\tstream.writeShort(msdosDate);\r\n\t\t\t// Write CRC32\r\n\t\t\tstream.writeUnsignedInt(_crc32);\r\n\t\t\t// Write compressed size\r\n\t\t\tstream.writeUnsignedInt(_sizeCompressed);\r\n\t\t\t// Write uncompressed size\r\n\t\t\tstream.writeUnsignedInt(_sizeUncompressed);\r\n\t\t\t// Prep filename\r\n\t\t\tByteArray ba =new ByteArray ();\r\n\t\t\tba.endian = Endian.LITTLE_ENDIAN;\r\n\t\t\tif (_filenameEncoding == \"utf-8\") {\r\n\t\t\t\tba.writeUTFBytes(_filename);\r\n\t\t\t} else {\r\n\t\t\t\tba.writeMultiByte(_filename, _filenameEncoding);\r\n\t\t\t}\r\n\t\t\tint filenameSize =ba.position ;\r\n\t\t\t// Prep extra fields\r\n\t\t\tfor(int i0 = 0; i0 < _extraFields .size(); i0++)\r\n\t\t\t{\r\n\t\t\t\t\theaderId = _extraFields .get(i0);\r\n\t\t\t\tif(extraBytes != null) {\r\n\t\t\t\t\tba.writeShort(uint(headerId));\r\n\t\t\t\t\tba.writeShort(uint(extraBytes.length()));\r\n\t\t\t\t\tba.writeBytes(extraBytes);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (includeAdler32) {\r\n\t\t\t\tif (!_hasAdler32) {\r\n\t\t\t\t\tboolean compressed =isCompressed ;\r\n\t\t\t\t\tif (compressed) { uncompress(); }\r\n\t\t\t\t\t_adler32 = ChecksumUtil.Adler32(_content, 0, _content.length());\r\n\t\t\t\t\t_hasAdler32 = true;\r\n\t\t\t\t\tif (compressed) { compress(); }\r\n\t\t\t\t}\r\n\t\t\t\tba.writeShort(0xdada);\r\n\t\t\t\tba.writeShort(4);\r\n\t\t\t\tba.writeUnsignedInt(_adler32);\r\n\t\t\t}\r\n\t\t\tint extrafieldsSize =ba.position -filenameSize ;\r\n\t\t\t// Prep comment (currently unused)\r\n\t\t\tif(centralDir && _comment.length > 0) {\r\n\t\t\t\tif (_filenameEncoding == \"utf-8\") {\r\n\t\t\t\t\tba.writeUTFBytes(_comment);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tba.writeMultiByte(_comment, _filenameEncoding);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tint commentSize =ba.position -filenameSize -extrafieldsSize ;\r\n\t\t\t// Write filename and extra field sizes\r\n\t\t\tstream.writeShort(filenameSize);\r\n\t\t\tstream.writeShort(extrafieldsSize);\r\n\t\t\tif(centralDir) {\r\n\t\t\t\t// Write comment size\r\n\t\t\t\tstream.writeShort(commentSize);\r\n\t\t\t\t// Write disk number start (always 0)\r\n\t\t\t\tstream.writeShort(0);\r\n\t\t\t\t// Write file attributes (always 0)\r\n\t\t\t\tstream.writeShort(0);\r\n\t\t\t\tstream.writeUnsignedInt(0);\r\n\t\t\t\t// Write relative offset of local header\r\n\t\t\t\tstream.writeUnsignedInt(centralDirOffset);\r\n\t\t\t}\r\n\t\t\t// Write filename, extra field and comment\r\n\t\t\tif(filenameSize + extrafieldsSize + commentSize > 0) {\r\n\t\t\t\tstream.writeBytes(ba);\r\n\t\t\t}\r\n\t\t\t// Write file\r\n\t\t\tint fileSize =0;\r\n\t\t\tif(!centralDir && _content.length > 0) {\r\n\t\t\t\tif(isCompressed) {\r\n\t\t\t\t\tif(HAS_UNCOMPRESS || HAS_INFLATE) {\r\n\t\t\t\t\t\tfileSize = _content.length;\r\n\t\t\t\t\t\tstream.writeBytes(_content, 0, fileSize);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfileSize = _content.length - 6;\r\n\t\t\t\t\t\tstream.writeBytes(_content, 2, fileSize);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfileSize = _content.length;\r\n\t\t\t\t\tstream.writeBytes(_content, 0, fileSize);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tint size =30+filenameSize +extrafieldsSize +commentSize +fileSize ;\r\n\t\t\tif(centralDir) {\r\n\t\t\t\tsize += 16;\r\n\t\t\t}\r\n\t\t\treturn size;\r\n\t\t}", "@Test\r\n\tpublic void testCompressing() throws ClassNotFoundException,\r\n\t\t\tInstantiationException, IllegalAccessException {\n\r\n\t\tAbstractStream abstractStream = Factory\r\n\t\t\t\t.getStream(\"by.bsu.decorator.bean.FileStream\");\r\n\t\tCompressingStream stream = (CompressingStream) Factory\r\n\t\t\t\t.getStream(\"by.bsu.decorator.bean.CompressingStream\");\r\n\t\tstream.setAbstractStream(abstractStream);\r\n\t\tString str = stream.handleBufferFull();\r\n\r\n\t\tbyte[] b = new byte[10];\r\n\t\tfor (int i = 0; i < 10; i++)\r\n\t\t\tb[i] = (byte) i;\r\n\t\tstream.putByte(b);\r\n\t\tSystem.out.println(str);\r\n\t\tassertEquals(\"Compressing Stream. File Stream. \", str);\r\n\t}", "@Override\r\n public void pack() {\r\n super.pack();\r\n JkFileTree.of(this.classDir()).exclude(\"**/*.jar\").zip().to(packer().jarFile(\"lean\"));\r\n distrib();\r\n }", "public void zip() {\n\t\tif (zipFile != null) {\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\ttry (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile))) {\n\t\t\t\tzos.setLevel(ZipOutputStream.STORED);\n\t\t\t\tbyte[] buffer = new byte[4096];\n\t\t\t\tFiles.list(Paths.get(tool_builddir))\n\t\t\t\t\t\t.forEach(x -> {\n\t\t\t\t\t\t\tFile f = x.toFile();\n\t\t\t\t\t\t\tif (f.isFile() && !f.getName().contains(\".\")) {\n\t\t\t\t\t\t\t\ttry (FileInputStream fis = new FileInputStream(f)) {\n\t\t\t\t\t\t\t\t\tZipEntry zipEntry = new ZipEntry(f.getName());\n\t\t\t\t\t\t\t\t\tzos.putNextEntry(zipEntry);\n\t\t\t\t\t\t\t\t\tint count;\n\t\t\t\t\t\t\t\t\twhile ((count = fis.read(buffer)) >= 0) {\n\t\t\t\t\t\t\t\t\t\tzos.write(buffer, 0, count);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tzos.closeEntry();\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\tout.println(\"Zipped to '\" + zipFile + \"' - \" + Duration.ofMillis(System.currentTimeMillis() - start));\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t}", "private void addToOutputStream(ZipOutputStream output, InputStream input, ZipEntry ze) throws IOException{\n try {\n output.putNextEntry(ze); \n } catch (ZipException zipEx) {\n //This entry already exists. So, go with the first one.\n input.close();\n return;\n }\n int numBytes = -1;\n while((numBytes = input.read(buffer)) > 0){\n output.write(buffer, 0, numBytes);\n }\n output.closeEntry();\n input.close();\n }", "private void unCompress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tint bytesIn;\n\t\t\tZipFile rfoFile = new ZipFile(path + fileName);\n\t\t\tEnumeration<? extends ZipEntry> allFiles = rfoFile.entries();\n\t\t\twhile(allFiles.hasMoreElements())\n\t\t\t{\n\t\t\t\tZipEntry ze = (ZipEntry)allFiles.nextElement();\n\t\t\t\tInputStream is = rfoFile.getInputStream(ze);\n\t\t\t\tString fName = processSeparators(ze.getName());\n\t\t\t\tFile element = new File(tempDir + fName);\n\t\t\t\torg.reprap.Main.ftd.add(element);\n\t\t\t\tFileOutputStream os = new FileOutputStream(element);\n\t\t\t\twhile((bytesIn = is.read(buffer)) != -1) \n\t\t\t\t\tos.write(buffer, 0, bytesIn);\n\t\t\t\tos.close();\n\t\t\t}\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.unCompress(): \" + e);\n\t\t}\n\t}", "private static void zipFolder(ZipOutputStream out, File folder) throws IOException {\n\n final int BUFFER = 2048;\n\n File[] fileList = folder.listFiles();\n BufferedInputStream origin;\n\n for (File file : fileList) {\n if (file.isDirectory()) {\n zipFolder(out, file);\n } else {\n byte data[] = new byte[BUFFER];\n\n String unmodifiedFilePath = file.getPath();\n FileInputStream fi = new FileInputStream(unmodifiedFilePath);\n\n origin = new BufferedInputStream(fi, BUFFER);\n ZipEntry entry = new ZipEntry(file.getName());\n\n out.putNextEntry(entry);\n\n int count;\n while ((count = origin.read(data, 0, BUFFER)) != -1) {\n out.write(data, 0, count);\n }\n\n out.closeEntry();\n origin.close();\n }\n }\n\n // Finish the zip stream and close it\n out.finish();\n out.close();\n }", "public boolean ZipFile(String sSourceFilePath, String sDestinationZipFilePath, boolean bReplaceExisting) {\n byte[] buffer = new byte[30720];\n FileInputStream fin = null;\n FileOutputStream fout = null;\n ZipOutputStream zout = null;\n int length;\n String sZipEntryFileName = \"\";\n File objFile = null;\n try {\n //check for source file\n if (sSourceFilePath.trim().equalsIgnoreCase(\"\")) {\n throw new Exception(\"Invalid Source File : \" + sSourceFilePath);\n }\n objFile = new File(sSourceFilePath);\n if (!objFile.exists()) {\n throw new Exception(\"Source file not found : \" + sSourceFilePath);\n }\n\n //check for destination Zip file\n if (sDestinationZipFilePath.trim().equalsIgnoreCase(\"\") || sDestinationZipFilePath == null) {\n String stmp_Path = objFile.getAbsolutePath();\n String stmp_Name = objFile.getName();\n if (stmp_Name.contains(\".\")) { //check for removing extension\n int indx = 0;\n try {\n indx = stmp_Name.indexOf(\".\", stmp_Name.length() - 5);\n } catch (Exception e) {\n indx = 0;\n }\n if (indx <= 0) {\n indx = stmp_Name.length();\n }\n\n stmp_Name = stmp_Name.substring(0, indx);\n stmp_Name = stmp_Name + \".zip\";\n }\n sDestinationZipFilePath = stmp_Path + File.separator + stmp_Name;\n }\n\n objFile = new File(sDestinationZipFilePath);\n if (objFile.exists()) {\n if (bReplaceExisting) {\n objFile.delete();\n } else {\n throw new Exception(\"Destination ZipFile Already exists : \" + sDestinationZipFilePath);\n }\n }\n\n //Zipping File\n sZipEntryFileName = sSourceFilePath.substring(sSourceFilePath.lastIndexOf(\"\\\\\") + 1);\n fout = new FileOutputStream(sDestinationZipFilePath);\n zout = new ZipOutputStream(fout);\n fin = new FileInputStream(sSourceFilePath);\n zout.putNextEntry(new ZipEntry(sZipEntryFileName));\n while ((length = fin.read(buffer)) > 0) {\n zout.write(buffer, 0, length);\n }\n\n return true;\n\n } catch (Exception exp) {\n println(\"Src = \" + sSourceFilePath + \" : Dest = \" + sDestinationZipFilePath + \" : \" + exp.toString());\n return false;\n } finally {\n try {\n fin.close();\n } catch (Exception exp) {\n }\n try {\n zout.closeEntry();\n } catch (Exception exp) {\n }\n try {\n zout.close();\n } catch (Exception exp) {\n }\n }\n }", "public void unZip(String apkFile) throws Exception \r\n\t{\r\n\t\tLog.p(tag, apkFile);\r\n\t\tFile file = new File(apkFile);\r\n\t\r\n\t\t/*\r\n\t\t * Create the Base Directory, whose name should be same as Zip file name.\r\n\t\t * All decompressed contents will be placed under this folder.\r\n\t\t */\r\n\t\tString apkFileName = file.getName();\r\n\t\t\r\n\t\tif(apkFileName.indexOf('.') != -1)\r\n\t\t\tapkFileName = apkFileName.substring(0, apkFileName.indexOf('.'));\r\n\t\t\r\n\t\tLog.d(tag, \"Folder name: \"+ apkFileName);\r\n\t\t\r\n\t\tFile extractFolder = new File((file.getParent() == null ? \"\" : file.getParent() + File.separator) + apkFileName);\r\n\t\tif(!extractFolder.exists())\r\n\t\t\textractFolder.mkdir();\r\n\t\t\r\n\t\t/*\r\n\t\t * Read zip entries.\r\n\t\t */\r\n\t\tFileInputStream fin = new FileInputStream(apkFile);\r\n\t\tZipInputStream zin = new ZipInputStream(new BufferedInputStream(fin));\r\n\t\t\r\n\t\t/*\r\n\t\t * Zip InputStream shifts its index to every Zip entry when getNextEntry() is called.\r\n\t\t * If this method returns null, Zip InputStream reaches EOF.\r\n\t\t */\r\n\t\tZipEntry ze = null;\r\n\t\tBufferedOutputStream dest;\r\n\t\t\r\n\t\twhile((ze = zin.getNextEntry()) != null)\r\n\t\t{\r\n\t\t\tLog.d(tag, \"Zip entry: \" + ze.getName() + \" Size: \"+ ze.getSize());\r\n\t\t\t/*\r\n\t\t\t * Create decompressed file for each Zip entry. A Zip entry can be a file or directory.\r\n\t\t\t * ASSUMPTION: APK Zip entry uses Unix style File seperator- \"/\"\r\n\t\t\t * \r\n\t\t\t * 1. Create the prefix Zip Entry folder, if it is not yet available\r\n\t\t\t * 2. Create the individual Zip Entry file.\r\n\t\t\t */\r\n\t\t\tString zeName = ze.getName();\r\n\t\t\tString zeFolder = zeName;\r\n\t\t\t\r\n\t\t\tif(ze.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tzeName = null; // Don't create Zip Entry file\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(zeName.indexOf(\"/\") == -1) // Zip entry uses \"/\"\r\n\t\t\t\t\tzeFolder = null; // It is File. don't create Zip entry Folder\r\n\t\t\t\telse {\r\n\t\t\t\t\tzeFolder = zeName.substring(0, zeName.lastIndexOf(\"/\"));\r\n\t\t\t\t\tzeName = zeName.substring( zeName.lastIndexOf(\"/\") + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tLog.d(tag, \"zeFolder: \"+ zeFolder +\" zeName: \"+ zeName);\r\n\t\t\t\r\n\t\t\t// Create Zip Entry Folder\r\n\t\t\tFile zeFile = extractFolder;\r\n\t\t\tif(zeFolder != null)\r\n\t\t\t{\r\n\t\t\t\tzeFile = new File(extractFolder.getPath() + File.separator + zeFolder);\r\n\t\t\t\tif(!zeFile.exists())\r\n\t\t\t\t\tzeFile.mkdirs();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Create Zip Entry File\r\n\t\t\tif(zeName == null)\r\n\t\t\t\tcontinue;\r\n\t\t\t\r\n\t\t\t// Keep track of XML files, they are in Android Binary XML format\r\n\t\t\tif(zeName.endsWith(\".xml\"))\r\n\t\t\t\txmlFiles.add(zeFile.getPath() + File.separator + zeName);\r\n\t\t\t\r\n\t\t\t// Keep track of the Dex/ODex file. Need to convert to Jar\r\n\t\t\tif(zeName.endsWith(\".dex\") || zeName.endsWith(\".odex\"))\r\n\t\t\t\tdexFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Keep track of Resources.arsc file- resources.arsc\r\n\t\t\tif(zeName.endsWith(\".arsc\"))\r\n\t\t\t\tresFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Write Zip entry File to the disk\r\n\t\t\tint count;\r\n\t\t\tbyte data[] = new byte[BUFFER];\r\n\t\t\t\r\n\t\t\tFileOutputStream fos = new FileOutputStream(zeFile.getPath() + File.separator + zeName);\r\n\t\t\tdest = new BufferedOutputStream(fos, BUFFER);\r\n\r\n\t\t\twhile ((count = zin.read(data, 0, BUFFER)) != -1) \r\n\t\t\t{\r\n\t\t\t\tdest.write(data, 0, count);\r\n\t\t\t}\r\n\t\t\tdest.flush();\r\n\t\t\tdest.close();\r\n\t\t}\r\n\r\n\t\t// Close Zip InputStream\r\n\t\tzin.close();\r\n\t\tfin.close();\r\n\t}", "public static void zip(File src, OutputStream os) throws IOException {\n\t\tzip(src, os, Charset.defaultCharset().name(), true);\n\t}", "public void doPack() {\n }", "public void doPack() {\n }", "public void doPack() {\n }", "public void doPack() {\n }", "public void doPack() {\n }", "public void doPack() {\n }", "private void createZipEntry(ZipOutputStream out, String fileName, byte[] content) throws IOException\n\t{\n\t\tZipEntry entry = new ZipEntry(fileName);\n\t\tentry.setMethod(ZipEntry.DEFLATED);\n\t\tout.putNextEntry(entry);\n\t\tout.write(content);\n\t}", "public InputStream getStream() {\n final CircularByteBuffer cbb = new CircularByteBuffer(1024);\n new Thread(\n new Runnable(){\n public void run(){\n ZipOutputStream zos = new ZipOutputStream(cbb.getOutputStream());\n Utils.zipDir(getVolume(), requestedDirectory.getPath(), zos);\n\n try {\n if (zos != null) {\n zos.flush();\n zos.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n ).start();\n\n return cbb.getInputStream();\n }", "public interface IZipStrategy {\n\n void zip();\n}", "private void addFilesToZip(List<File> files,String outputPath) throws IOException \r\n\t{\r\n\t\t// create a zip output stream\r\n\t\tString zipFileName = outputPath + File.separator + Constants.name + zipIndex + Constants.zipExtension;\r\n\t\tOutputStreamWithLength chunkedFile = new OutputStreamWithLength(zipFileName);\r\n\t\tzipOutputStream = new ZipOutputStream(chunkedFile);\r\n\t\tdouble totalBytesRead = 0L;\r\n\t\tint count = 10; \r\n\t\tfor(File file:files)\r\n\t\t{\r\n\t\t\t// reset the file index\r\n\t\t\tfileIndex = 0;\r\n\t\t\tString zipEntryPath = file.getAbsolutePath().substring(basePath.length() + 0);\r\n\t\t\t\r\n\t\t\tif(file.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tZipEntry entry =new ZipEntry(zipEntryPath+\"/\");\r\n\t\t\t\tzipOutputStream.putNextEntry(entry);\r\n\t\t\t\tzipOutputStream.closeEntry();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tzipEntryPath = zipEntryPath + Constants.fragmentLabel + fileIndex++;\r\n\t\t\t}\t\t\t\r\n\r\n\t\t\t// add the current file to the zip\r\n\t\t\tZipEntry entry =new ZipEntry(zipEntryPath);\r\n\t\t\tzipOutputStream.putNextEntry(entry);\r\n\r\n\t\t\tbyte[] buffer = new byte[1024]; \t \r\n\r\n\t\t\tFileInputStream inputFileStream = new FileInputStream(file);\r\n\t\t\tint len; \r\n\t\t\twhile ((len = inputFileStream.read(buffer)) > 0) \r\n\t\t\t{ \r\n\t\t\t\tif((chunkedFile.getCurrentWriteLength() + len ) > maxSplitSize){\r\n\t\t\t\t\t// close current zip output stream\r\n\t\t\t\t\tzipOutputStream.closeEntry();\r\n\t\t\t\t\tzipOutputStream.finish();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// reset the write length\r\n\t\t\t\t\tchunkedFile.setCurrentWriteLength(0);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// create new zip output stream\r\n\t\t\t\t\tzipIndex += 1;\r\n\t\t\t\t\tzipFileName = outputPath+ File.separator + Constants.name + zipIndex + Constants.zipExtension;\r\n\t\t\t\t\tchunkedFile = new OutputStreamWithLength(zipFileName);\r\n\t\t\t\t\tzipOutputStream = new ZipOutputStream(chunkedFile);\r\n\r\n\t\t\t\t\t// add the current file to write remaining bytes\r\n\t\t\t\t\tzipEntryPath = file.getAbsolutePath().substring(basePath.length() + 0);\r\n\t\t\t\t\tzipEntryPath = zipEntryPath + Constants.fragmentLabel + fileIndex++;\r\n\t\t\t\t\tentry = new ZipEntry(zipEntryPath);\r\n\t\t\t\t\tzipOutputStream.putNextEntry(entry);\r\n\r\n\t\t\t\t\t// write the bytes to the zip output stream\r\n\t\t\t\t\tzipOutputStream.write(buffer, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// write the bytes to the zip output stream\r\n\t\t\t\t\tzipOutputStream.write(buffer, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//Show progress\r\n\t\t\t\ttotalBytesRead += len;\r\n\t\t\t\tdouble progress = totalBytesRead / totalBytes;\r\n\t\t\t\tif (progress*100 > 10)\r\n\t\t\t\t{\r\n\t\t\t\t\ttotalBytesRead = 0L;\r\n\t\t\t\t\tcount += 10;\r\n\t\t\t\t\tSystem.out.println(\"Finished \" + count +\"%\");\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\t\t\r\n\t\t\tinputFileStream.close();\r\n\t\t}\r\n\r\n\t\tzipOutputStream.closeEntry();\r\n\t\tzipOutputStream.finish();\r\n\t}", "protected static void zipDir(File zipDir, ZipOutputStream zos, String archiveSourceDir)\n throws IOException {\n String[] dirList = zipDir.list();\n byte[] readBuffer = new byte[40960];\n int bytesIn;\n //loop through dirList, and zip the files\n if (dirList != null) {\n for (String aDirList : dirList) {\n File f = new File(zipDir, aDirList);\n //place the zip entry in the ZipOutputStream object\n zos.putNextEntry(new ZipEntry(getZipEntryPath(f, archiveSourceDir)));\n if (f.isDirectory()) {\n //if the File object is a directory, call this\n //function again to add its content recursively\n zipDir(f, zos, archiveSourceDir);\n //loop again\n continue;\n }\n //if we reached here, the File object f was not a directory\n //create a FileInputStream on top of f\n try (FileInputStream fis = new FileInputStream(f)) {\n //now write the content of the file to the ZipOutputStream\n while ((bytesIn = fis.read(readBuffer)) != -1) {\n zos.write(readBuffer, 0, bytesIn);\n }\n }\n }\n }\n }", "public File getZip() {\r\n try {\r\n close(); // if the file is currently open close it\r\n Log.d(LOG_TAG, \"getZip()\");\r\n File zipFile = new File(mBaseFileName + \".zip\");\r\n zipFile.delete();\r\n ZipOutputStream zipStream = new ZipOutputStream(new FileOutputStream(zipFile));\r\n for (int i = 0; i < mNumSegments; i++) {\r\n File chunk = new File(getFileNameForIndex(i));\r\n if (chunk.exists()) {\r\n FileInputStream fis = new FileInputStream(chunk);\r\n writeToZipFile(zipStream, fis, chunk.getName());\r\n }\r\n }\r\n zipStream.close();\r\n return zipFile;\r\n } catch (Exception e) {\r\n Log.e(LOG_TAG, \"Failed to create zip file\", e);\r\n }\r\n\r\n return null;\r\n }", "public StreamUnzipper(InputStream zipStream, File destDir)\n {\n if (zipStream == null)\n throw new IllegalArgumentException(\"zip stream cannot be null\");\n this.zis = new ZipInputStream(zipStream);\n this.destDir = destDir;\n }", "public void marshal(uka.transport.MarshalStream _stream)\n throws java.io.IOException\n {\n _stream.reserve(_SIZE);\n byte[] _buffer = _stream.getBuffer();\n int _pos = _stream.getPosition();\n marshalPrimitives(_buffer, _pos);\n _stream.deliver(_SIZE);\n marshalReferences(_stream);\n }", "private void unzipDownloadedFile(String zipFile) throws ZipException, IOException{\n\t int BUFFER = 2048;\n\t \n\t // get zip file\n\t File file = new File(zipFile);\n\t ZipFile zip = new ZipFile(file);\n\t \n\t // unzip to directory of the same name\n\t // When sip is a directory, this gets two folders\n\t //String newPath = zipFile.substring(0, zipFile.length() - 4);\n\t //new File(newPath).mkdir();\n\t \n\t // unzip to parent directory of the zip file\n\t // This is assuming zip if of a directory\n\t String newPath = file.getParent();\n\t \n\t // Process each entry\n\t Enumeration<? extends ZipEntry> zipFileEntries = zip.entries();\n\t while (zipFileEntries.hasMoreElements())\n\t {\n\t // grab a zip file entry\n\t ZipEntry entry = (ZipEntry) zipFileEntries.nextElement();\n\t String currentEntry = entry.getName();\n\t File destFile = new File(newPath, currentEntry);\n\t File destinationParent = destFile.getParentFile();\n\n\t // create the parent directory structure if needed\n\t destinationParent.mkdirs();\n\n\t if (!entry.isDirectory())\n\t {\n\t BufferedInputStream is = new BufferedInputStream(zip.getInputStream(entry));\n\t int currentByte;\n\t // establish buffer for writing file\n\t byte data[] = new byte[BUFFER];\n\n\t // write the current file to disk\n\t FileOutputStream fos = new FileOutputStream(destFile);\n\t BufferedOutputStream dest = new BufferedOutputStream(fos,\n\t BUFFER);\n\n\t // read and write until last byte is encountered\n\t while ((currentByte = is.read(data, 0, BUFFER)) != -1) {\n\t dest.write(data, 0, currentByte);\n\t }\n\t dest.flush();\n\t dest.close();\n\t is.close();\n\t }\n\n\t if (currentEntry.endsWith(\".zip\"))\n\t {\n\t // found a zip file, try to open\n\t \tunzipDownloadedFile(destFile.getAbsolutePath());\n\t }\n\t }\n\t zip.close();\n\t}", "public static void zip(final String name, final InputStream inputStream, final int pipeSize, ByteChunkListener byteChunkListener) throws IOException {\r\n\t\t// inputStream -> GZIPOutputStream -> Chunkifier -> chunks of Byte to listener\r\n\t\tfinal PipedInputStream readFromPipe = new PipedInputStream(pipeSize);\r\n\t\tfinal PipedOutputStream writeCompressedIntoPipe = new PipedOutputStream(readFromPipe); // Make sure it's connected now\r\n\t\t\r\n\t\t// Start thread that reads from input and pass it to compressor\r\n\t\tThread thread = new Thread(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tbyte[] buf = new byte[pipeSize];\r\n\t\t\t\ttry {\r\n\t\t\t\t\tZipOutputStream compressor = new ZipOutputStream(writeCompressedIntoPipe);\r\n\t\t\t\t\tcompressor.putNextEntry(new ZipEntry(name));\r\n\t\t\t\t\tfor(int len = inputStream.read(buf); len != -1; len = inputStream.read(buf)) compressor.write(buf, 0, len);\r\n\t\t\t\t\tcompressor.closeEntry();\r\n\t\t\t\t\tcompressor.finish();\r\n\t\t\t\t\tcompressor.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tthrow new RuntimeException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tthread.start();\r\n\t\t\r\n\t\t// Read on pipe end compressed data\r\n\t\tChunkifier.read(readFromPipe, pipeSize, byteChunkListener);\r\n\t\t\r\n\t\t// Cleanup\r\n\t\twhile(thread.isAlive()) try {\r\n\t\t\tthread.join();\r\n\t\t} catch (InterruptedException e) {}\r\n\t\twriteCompressedIntoPipe.close();\r\n\t\treadFromPipe.close();\r\n\t}", "public static ByteArrayOutputStream readZipEntry(ZipInputStream zis)\n \t\t\tthrows IOException {\n \t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n \t\tbyte[] buffer = new byte[BUFFER_SIZE];\n \t\tint size;\n \t\twhile ((size = zis.read(buffer, 0, buffer.length)) != -1) {\n \t\t\tout.write(buffer, 0, size);\n \t\t}\n \t\treturn out;\n \t}", "public void zipFiles() {\r\n byte[] buffer = new byte[1024];\r\n try {\r\n\r\n // On rare occasions, there will be a semi colon in the title name,\r\n // ruining everything while zipping the file.\r\n if (title.contains(\":\") || title.contains(\".\")) {\r\n String temp = \"\";\r\n for (int i = 0; i < title.length(); i++) {\r\n \r\n if (title.charAt(i) == ':' || title.charAt(i) == '.') {\r\n \r\n } else {\r\n temp += title.charAt(i);\r\n }\r\n }\r\n title = temp;\r\n }\r\n System.out.println(\"File name: \" + title);\r\n \r\n FileOutputStream fos = new FileOutputStream(savePath + \"\\\\\" + title + \".zip\");\r\n ZipOutputStream zos = new ZipOutputStream(fos);\r\n \r\n for (String fileName : fileNames) {\r\n \r\n System.out.println(\"zipping file: \" + fileName);\r\n \r\n fileName = savePath + \"\\\\\" + fileName;\r\n File srcFile = new File(fileName);\r\n FileInputStream fis;\r\n if (srcFile.exists()) {\r\n fis = new FileInputStream(srcFile);\r\n \r\n zos.putNextEntry(new ZipEntry(srcFile.getName()));\r\n int length;\r\n while ((length = fis.read(buffer)) > 0) {\r\n zos.write(buffer, 0, length);\r\n }\r\n zos.closeEntry();\r\n fis.close();\r\n \r\n boolean success = (new File(fileName)).delete();\r\n }\r\n }\r\n zos.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"File not found!\");\r\n } catch (IOException ex) {\r\n }\r\n }", "private void zipDirectoryToOutputStream(File dirToZip, OutputStream outStream)\n throws IOException {\n if (!dirToZip.isDirectory()) {\n throw new IOException(\"zip directory does not exist\");\n }\n Log.v(TAG, \"zipping directory \" + dirToZip.getAbsolutePath());\n\n File[] listFiles = dirToZip.listFiles();\n try (ZipOutputStream zipStream = new ZipOutputStream(new BufferedOutputStream(outStream))) {\n for (File file : listFiles) {\n if (file.isDirectory()) {\n continue;\n }\n String filename = file.getName();\n // only for the zipped output file, we add individual entries to zip file.\n if (filename.equals(OUTPUT_ZIP_FILE) || filename.equals(EXTRA_OUTPUT_ZIP_FILE)) {\n ZipUtils.extractZippedFileToZipStream(file, zipStream);\n } else {\n ZipUtils.addFileToZipStream(file, zipStream);\n }\n }\n } finally {\n outStream.close();\n }\n // Zipping successful, now cleanup the temp dir.\n FileUtils.deleteDirectory(dirToZip);\n }", "public GZIPOutputStream addGzipStream(String id) throws IOException {\n\t\tGZIPOutputStream gzos = new GZIPOutputStream(outputStream);\n\t\trks.add(id);\n\t\trvs.add(gzos);\n\t\treturn gzos;\n\t}", "public static void packToZip(String sourceDirPath, String zipFilePath) throws IOException {\n Path p;\n p = Files.createFile(Paths.get(zipFilePath));\n try (ZipOutputStream zs = new ZipOutputStream(Files.newOutputStream(p))) {\n Path pp = Paths.get(sourceDirPath);\n Files.walk(pp)\n .filter(path -> !Files.isDirectory(path))\n .forEach(path -> {\n if (!path.toString().endsWith(\".zip\")) {\n ZipEntry zipEntry = new ZipEntry(pp.relativize(path).toString());\n try {\n zs.putNextEntry(zipEntry);\n Files.copy(path, zs);\n zs.closeEntry();\n } catch (IOException e) {\n System.err.println(e);\n }\n }\n });\n }\n }", "public void convertToZip(String input, String output) throws ZipException {\n\t\tZipFile zip = new ZipFile(output); \n\t ZipParameters parameters = new ZipParameters();\n parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);\n parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL); \n\t zip.addFolder(input, parameters);\n\t}", "public static boolean unzipFiles(String folder, InputStream is) {\n /**\n * List of files we want to zip, folder is parent of app preferences folder\n * Shared prefs has all Avare data except tracks\n * TODO : Tracks\n */\n\n /**\n * Zip to output stream (could be File or Drive)\n */\n try {\n ZipInputStream zis = new ZipInputStream(is);\n\n ZipEntry ze = zis.getNextEntry();\n\n while(ze != null) {\n String fileName = ze.getName();\n File newFile = new File(folder + File.separator + fileName);\n\n //create all non existent folders\n new File(newFile.getParent()).mkdirs();\n\n FileOutputStream fos = new FileOutputStream(newFile);\n\n int len;\n byte[] bytes = new byte[4096];\n while ((len = zis.read(bytes)) > 0) {\n fos.write(bytes, 0, len);\n }\n\n fos.close();\n ze = zis.getNextEntry();\n }\n\n zis.closeEntry();\n zis.close();\n\n } catch (Exception e) {\n return false;\n }\n return true;\n }", "protected void initZipOutputStream(ZipOutputStream zOut)\n throws IOException, BuildException\n {\n // add deployment descriptor first\n if (deploymentDescriptor != null) {\n zipDir(new File(deploymentDescriptor.getParent()), zOut, \n \"WEB-INF/\");\n super.zipFile(deploymentDescriptor, zOut, \"WEB-INF/web.xml\");\n } else {\n throw new BuildException(\"webxml attribute is required\", location);\n }\n\n addFiles(libFileSets, zOut, \"WEB-INF/lib/\");\n addFiles(classesFileSets, zOut, \"WEB-INF/classes/\");\n addFiles(webInfFileSets, zOut, \"WEB-INF/\");\n addPrefixedFiles(locFileSets, zOut);\n\n super.initZipOutputStream(zOut);\n }", "void onUnzipCompleted(String output);", "@Override\n public File compress() throws Exception\n {\n File dest = File.createTempFile(\"TMP\",\".tar.gz\");\n FileOutputStream fos = new FileOutputStream( dest );\n BufferedOutputStream bos = new BufferedOutputStream(fos);\n TarOutputStream out = new TarOutputStream(bos);\n tarFolder( null, folder.getAbsolutePath(), out );\n out.close();\n return dest;\n }", "public static void zip(File destFile, File[] files) throws IOException {\n BufferedInputStream origin = null;\n FileOutputStream dest = new FileOutputStream(destFile);\n ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(dest));\n out.setMethod(ZipOutputStream.DEFLATED);\n byte[] data = new byte[BUFFER_SIZE];\n for (int i = 0; i < files.length; i++) {\n if (log.isDebugEnabled()) {\n log.debug(\"Adding: \" + files[i].getName());\n }\n if (files[i].isDirectory()) {\n if (log.isDebugEnabled()) {\n log.debug(\"Skipping directory: \" + files[i]);\n }\n continue;\n }\n FileInputStream fi = new FileInputStream(files[i]);\n origin = new BufferedInputStream(fi, BUFFER_SIZE);\n ZipEntry entry = new ZipEntry(files[i].getName());\n out.putNextEntry(entry);\n int count;\n while ((count = origin.read(data, 0, BUFFER_SIZE)) != -1) {\n out.write(data, 0, count);\n }\n origin.close();\n }\n out.flush();\n out.close();\n }", "public ZipBuilder save() throws IOException {\n\t\t\tZipUtil.addToZip(zos, bytes, path, comment);\n\t\t\treturn ZipBuilder.this;\n\t\t}", "private void compressArchive() throws Exception {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"Compressing archive: \" + path);\n\t\t}\n\n\t\tFileOutputStream fout = new FileOutputStream(path + \".gz\");\n\t\tGZIPOutputStream gout = new GZIPOutputStream(fout);\n\t\tFileInputStream fin = new FileInputStream(path);\n\t\tbyte[] buf = new byte[blockSize];\n\t\tint len;\n\t\twhile ((len = fin.read(buf)) > 0) {\n\t\t\tgout.write(buf, 0, len);\n\t\t}\n\t\tfin.close();\n\n\t\t// flush and close gzip file\n\t\tgout.finish();\n\t\tgout.close();\n\n\t\t// unlink original archive\n\t\tFile file = new File(path);\n\t\tfile.delete();\n\t}", "private static void writeFile(ZipInputStream zipIn, String filePath) throws IOException {\n\n String parent = filePath.replace(filePath.substring(filePath.lastIndexOf('/')), \"\");\n createParents(parent);\n\n BufferedOutputStream bos = null;\n\n try {\n bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n\n } catch (IOException e) {\n System.err.println(e.getMessage());\n Errors.setUnzipperError(true);\n\n } finally {\n if (bos != null) {\n bos.close();\n }\n }\n }", "public static boolean UnzipFile(ZipFile zf, String filepathinzip, File fileinfiledir) {\r\n BufferedOutputStream Output_fos = null;\r\n BufferedInputStream bufbr = null;\r\n try {\r\n ZipEntry ze = zf.getEntry(filepathinzip);\r\n if (ze != null) {\r\n BufferedOutputStream Output_fos2 = new BufferedOutputStream(new FileOutputStream(fileinfiledir));\r\n try {\r\n byte[] buf = new byte[65536];\r\n BufferedInputStream bufbr2 = new BufferedInputStream(zf.getInputStream(ze));\r\n while (true) {\r\n try {\r\n int readlen = bufbr2.read(buf);\r\n if (readlen < 0) {\r\n break;\r\n }\r\n Output_fos2.write(buf, 0, readlen);\r\n } catch (Exception e) {\r\n e = e;\r\n bufbr = bufbr2;\r\n Output_fos = Output_fos2;\r\n } catch (Throwable th) {\r\n th = th;\r\n bufbr = bufbr2;\r\n Output_fos = Output_fos2;\r\n if (Output_fos != null) {\r\n try {\r\n Output_fos.close();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e2) {\r\n e2.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e3) {\r\n e3.printStackTrace();\r\n if (bufbr == null) {\r\n return false;\r\n }\r\n try {\r\n bufbr.close();\r\n return false;\r\n } catch (IOException e4) {\r\n e4.printStackTrace();\r\n return false;\r\n }\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e5) {\r\n e5.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n throw th;\r\n }\r\n }\r\n if (Output_fos2 != null) {\r\n try {\r\n Output_fos2.close();\r\n if (bufbr2 != null) {\r\n try {\r\n bufbr2.close();\r\n } catch (IOException e6) {\r\n e6.printStackTrace();\r\n BufferedInputStream bufferedInputStream = bufbr2;\r\n BufferedOutputStream bufferedOutputStream = Output_fos2;\r\n return false;\r\n }\r\n }\r\n } catch (IOException e7) {\r\n e7.printStackTrace();\r\n if (bufbr2 != null) {\r\n try {\r\n bufbr2.close();\r\n } catch (IOException e8) {\r\n e8.printStackTrace();\r\n BufferedInputStream bufferedInputStream2 = bufbr2;\r\n BufferedOutputStream bufferedOutputStream2 = Output_fos2;\r\n return false;\r\n }\r\n }\r\n BufferedInputStream bufferedInputStream3 = bufbr2;\r\n BufferedOutputStream bufferedOutputStream3 = Output_fos2;\r\n return false;\r\n } finally {\r\n if (bufbr2 != null) {\r\n try {\r\n bufbr2.close();\r\n } catch (IOException e9) {\r\n e9.printStackTrace();\r\n BufferedInputStream bufferedInputStream4 = bufbr2;\r\n BufferedOutputStream bufferedOutputStream4 = Output_fos2;\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n BufferedInputStream bufferedInputStream5 = bufbr2;\r\n BufferedOutputStream bufferedOutputStream5 = Output_fos2;\r\n return true;\r\n } catch (Exception e10) {\r\n e = e10;\r\n Output_fos = Output_fos2;\r\n try {\r\n e.printStackTrace();\r\n if (Output_fos == null) {\r\n return false;\r\n }\r\n try {\r\n Output_fos.close();\r\n if (bufbr == null) {\r\n return false;\r\n }\r\n try {\r\n bufbr.close();\r\n return false;\r\n } catch (IOException e11) {\r\n e11.printStackTrace();\r\n return false;\r\n }\r\n } catch (IOException e12) {\r\n e12.printStackTrace();\r\n if (bufbr == null) {\r\n return false;\r\n }\r\n try {\r\n bufbr.close();\r\n return false;\r\n } catch (IOException e13) {\r\n e13.printStackTrace();\r\n return false;\r\n }\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e14) {\r\n e14.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n } catch (Throwable th2) {\r\n th = th2;\r\n if (Output_fos != null) {\r\n }\r\n throw th;\r\n }\r\n } catch (Throwable th3) {\r\n th = th3;\r\n Output_fos = Output_fos2;\r\n if (Output_fos != null) {\r\n }\r\n throw th;\r\n }\r\n } else if (Output_fos == null) {\r\n return false;\r\n } else {\r\n try {\r\n Output_fos.close();\r\n if (bufbr == null) {\r\n return false;\r\n }\r\n try {\r\n bufbr.close();\r\n return false;\r\n } catch (IOException e15) {\r\n e15.printStackTrace();\r\n return false;\r\n }\r\n } catch (IOException e16) {\r\n e16.printStackTrace();\r\n if (bufbr == null) {\r\n return false;\r\n }\r\n try {\r\n bufbr.close();\r\n return false;\r\n } catch (IOException e17) {\r\n e17.printStackTrace();\r\n return false;\r\n }\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e18) {\r\n e18.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n } catch (Exception e19) {\r\n e = e19;\r\n }\r\n }", "public static boolean zipFiles(String folder, OutputStream os) {\n\n String look1 = folder + File.separator + SHARED_FOLDER;\n List<File> fileList = new ArrayList<File>();\n getAllFiles(new File(look1), fileList);\n\n\n /**\n * Zip to output stream (could be File or Drive)\n */\n try {\n ZipOutputStream zos = new ZipOutputStream(os);\n\n for (File file : fileList) {\n if (!file.isDirectory()) { // we only zip files, not directories\n\n // put files starting from app's top level folder\n FileInputStream fis = new FileInputStream(file);\n String filetoSave = SHARED_FOLDER + File.separator + file.getName();\n ZipEntry zipEntry = new ZipEntry(filetoSave);\n zos.putNextEntry(zipEntry);\n\n byte[] bytes = new byte[4096];\n int length;\n while ((length = fis.read(bytes)) >= 0) {\n zos.write(bytes, 0, length);\n }\n\n zos.closeEntry();\n fis.close();\n }\n }\n zos.close();\n } catch (Exception e) {\n return false;\n }\n return true;\n }", "public static boolean generateZipFile(ArrayList<String> sourcesFilenames, String destinationDir, String zipFilename){\n byte[] buf = new byte[1024]; \r\n\r\n try \r\n {\r\n // VER SI HAY QUE CREAR EL ROOT PATH\r\n boolean result = (new File(destinationDir)).mkdirs();\r\n\r\n String zipFullFilename = destinationDir + \"/\" + zipFilename;\r\n\r\n System.out.println(result);\r\n\r\n // Create the ZIP file \r\n ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipFullFilename)); \r\n \r\n // Compress the files \r\n for (String filename: sourcesFilenames) { \r\n FileInputStream in = new FileInputStream(filename); \r\n // Add ZIP entry to output stream. \r\n File file = new File(filename); //\"Users/you/image.jpg\"\r\n out.putNextEntry(new ZipEntry(file.getName())); //\"image.jpg\" \r\n // Transfer bytes from the file to the ZIP file \r\n int len; \r\n while ((len = in.read(buf)) > 0) { \r\n out.write(buf, 0, len); \r\n } \r\n // Complete the entry \r\n out.closeEntry(); \r\n in.close(); \r\n } // Complete the ZIP file \r\n out.close();\r\n\r\n return true;\r\n } \r\n catch (Exception e) \r\n { \r\n System.out.println(e);\r\n return false;\r\n } \r\n }", "public static void makeZip(String fileName)\r\n throws IOException, FileNotFoundException\r\n {\r\n File file = new File(fileName);\r\n zos = new ZipOutputStream(new FileOutputStream(file + \".zip\"));\r\n //Call recursion.\r\n\r\n\r\nrecurseFiles(file);\r\n //We are done adding entries to the zip archive,\r\n\r\n\r\n//so close the Zip output stream.\r\n\r\n\r\nzos.close();\r\n }", "public static void unzip(Context context, InputStream zipFile) {\n try (BufferedInputStream bis = new BufferedInputStream(zipFile)) {\n try (ZipInputStream zis = new ZipInputStream(bis)) {\n ZipEntry ze;\n int count;\n byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];\n while ((ze = zis.getNextEntry()) != null) {\n try (FileOutputStream fout = context.openFileOutput(ze.getName(), Context.MODE_PRIVATE)) {\n while ((count = zis.read(buffer)) != -1)\n fout.write(buffer, 0, count);\n }\n }\n }\n } catch (IOException | NullPointerException ex) {\n Log.v(MainActivity.TAG, \"Zip not opened.\\n\"+ex.getMessage());\n }\n }", "public static void PackageArchive(File directoryName, File fileName) throws IOException\r\n {\r\n final String ARCHIVE_XML = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-16\\\"?>\\n<archive major_version=\\\"0\\\" minor_version=\\\"1\\\" />\";\r\n\r\n TarArchiveWriter archive = new TarArchiveWriter(new GZIPOutputStream(new FileOutputStream(fileName)));\r\n\r\n // Create the archive.xml file\r\n archive.writeFile(\"archive.xml\", ARCHIVE_XML);\r\n\r\n // Add the assets\r\n File dir = new File(directoryName, ArchiveConstants.ASSETS_PATH);\r\n String[] files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.ASSETS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the objects\r\n dir = new File(directoryName, ArchiveConstants.OBJECTS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.OBJECTS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the terrain(s)\r\n dir = new File(directoryName, ArchiveConstants.TERRAINS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.TERRAINS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the parcels(s)\r\n dir = new File(directoryName, ArchiveConstants.LANDDATA_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.LANDDATA_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n // Add the setting(s)\r\n dir = new File(directoryName, ArchiveConstants.SETTINGS_PATH);\r\n files = dir.list();\r\n for (String file : files)\r\n archive.writeFile(ArchiveConstants.SETTINGS_PATH + FilenameUtils.getName(file), FileUtils.readFileToByteArray(new File(dir, file)));\r\n\r\n archive.close();\r\n }", "private void nocompressedUnPack()throws UnpackException,ZipEndException{\n skipByte();\n //get the len\n long LEN = 0x00;\n byte byte0 = getByte();\n byte byte1 = getByte();\n byte byte2 = getByte();\n byte byte3 = getByte();\n LEN |= byte1;\n LEN |= (byte0 << 8);\n LEN &= 0X0000ffff;\n// LEN |= (byte2<<24);\n// LEN |= (byte3<<16);\n int l = 0;\n try{\n for (long num = 0; num < LEN ; num ++){\n outputStoredByte(getByte());\n }\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "public static void zip(BasicShell shell, File archive, List<File> filesToZip) {\n\t\ttry {\n\t\t\tshell.printOut(\"Creating archive '\" + archive.getPath() + \"'.\");\n\t\t\tfinal BufferedOutputStream archiveStream = new BufferedOutputStream(new FileOutputStream(archive));\n\t\t\tZipOutputStream zipStream = new ZipOutputStream(archiveStream);\n\t\t\tzipStream.setLevel(7);\n\t\t\t\n\t\t\tString pwd = shell.pwd().getPath();\n\t\t\tfor ( File file : filesToZip) {\n\t\t\t\tString name = file.getPath();\n\t\t\t\tif (name.equals(pwd)) continue;\n\t\t\t\t\n\t\t\t\tif ( name.startsWith(pwd) ) {\n\t\t\t\t\tname = name.substring(pwd.length()+1);\n\t\t\t\t}\n\t\t\t\tZipEntry entry = new ZipEntry(name);\n\t\t\t\tzipStream.putNextEntry(entry);\n\t\t\t\tif ( file.isFile() ) {\n\t\t\t\t\tBufferedInputStream fileStream = new BufferedInputStream(new FileInputStream(file));\n\t\t\t\t\tbyte[] buffer = new byte[2048];\n\t\t\t\t\tint count = fileStream.read(buffer);\n\t\t\t\t\twhile ( count > -1 ) {\n\t\t\t\t\t\tzipStream.write(buffer, 0, count);\n\t\t\t\t\t\tcount = fileStream.read(buffer);\n\t\t\t\t\t}\n\t\t\t\t\tfileStream.close();\n\t\t\t\t}\n\t\t\t\tshell.printOut(\"File '\" + entry.getName() + \"' added.\");\n\t\t\t}\n\t\t\tzipStream.close();\n\t\t} catch (Exception e) {\n\t\t\tshell.getErrorHandler().handleError(Diagnostic.ERROR, e.getClass().getSimpleName() + \": \"+ e.getMessage());\n\t\t}\n\t}", "public void unzip(File f) throws Exception {\r\n String destDir = workplace + \"/temp/\";\r\n File tmp = new File(destDir);\r\n if(!tmp.exists())tmp.mkdir();\r\n byte b[] = new byte [1024];\r\n int length;\r\n \r\n ZipFile zipFile;\r\n zipFile = new ZipFile(f);\r\n Enumeration enumeration = zipFile.entries();\r\n ZipEntry zipEntry = null ;\r\n OutputStream outputStream = null;\r\n InputStream inputStream = null;\r\n while (enumeration.hasMoreElements()) {\r\n zipEntry = (ZipEntry) enumeration.nextElement();\r\n File loadFile = new File(destDir + zipEntry.getName());\r\n if (zipEntry.isDirectory()) {\r\n // 这段都可以不要,因为每次都貌似从最底层开始遍历的\r\n loadFile.mkdirs();\r\n }else{\r\n if (!loadFile.getParentFile().exists())\r\n loadFile.getParentFile().mkdirs();\r\n outputStream = new FileOutputStream(loadFile);\r\n inputStream = zipFile.getInputStream(zipEntry);\r\n while ((length = inputStream.read(b)) > 0)\r\n outputStream.write(b, 0, length);\r\n }\r\n }\r\n outputStream.flush();\r\n outputStream.close();\r\n inputStream.close();\r\n }", "@Override\n public void run() {\n txt_Nombre.setVisible(false);\n //ocultamos el boton Enviar\n btnaceptar.setVisible(false);\n //ocultamos boton Eliminar archivo\n btnEliminarArchivo.setVisible(false);\n //Ocultamos boton Seleccionar archivo\n btnselecionar.setVisible(false);\n //preparamos la salida de datos del Zip\n ZipOutputStream zout;\n //preparamos la salida de datos para el archivo\n BufferedOutputStream bos;\n try {\n //creamos el archivo y lo guardamos \n ruta=nombreZip+\".zip\";\n //creamos el flujo de salida hacia el archivo Zip\n bos = new BufferedOutputStream(new FileOutputStream(ruta));\n zout = new ZipOutputStream(bos);\n int i=0;\n //Hacemos visibles todos los componentes de las barras de progreso\n lblGeneral.setVisible(true);\n barraGeneral.setVisible(true);\n barra.setVisible(true);\n barra.setStringPainted(true);\n //ponemosd de color verde la barra\n barraGeneral.setForeground(Color.GREEN);\n //habilitamos el String del porcentaje\n barraGeneral.setStringPainted(true);\n //ponemos el valor Maximo de la barra\n barraGeneral.setMaximum((int)(pesoTotal/100));\n //ponemos el valor Minimo\n barraGeneral.setMinimum(0);\n //variable para el progreso de la barra General\n long leidoTotal=0;\n lbInfo.setHorizontalAlignment(JLabel.LEFT);\n for (String documento : documentos) {\n //creamos una nueva entrada/ducumento para el Zip\n ZipEntry ze = new ZipEntry(nombres.get(i));\n //agregamos la entrada al Zip\n zout.putNextEntry(ze);\n //obtenemos el archivo \n File arch=new File(documentos.get(i));\n //Indicamos cual archivo se esta comprimiendo\n lbInfo.setText(\"comprimiendo: \"+arch.getName());\n //obtenemos el tamaño del archivo\n long tamañoArch=arch.length();\n //ponemos el valor maximo de a la barra individual\n barra.setMaximum((int)(tamañoArch/100));\n //ponemos el valor minimo\n barra.setMinimum(0);\n //cambiamos el color de la barra\n barra.setForeground(Color.GREEN);\n barra.setValue(0);\n //creamos el Stream de entrada del archivo\n BufferedInputStream bis=new BufferedInputStream(new FileInputStream(documentos.get(i)));\n //tamaño de buffer para lectura del archivo\n byte[] info=new byte[4096];\n //variable para el progreso de la barra individual\n long leido=0;\n //Ciclo para lectura del archivo\n while(leido<tamañoArch)\n {\n //Verifica que se puedan leer otros 4KB \n if((leido+4096)<tamañoArch)\n {\n //leemos 4KB del Archivo\n bis.read(info);\n //agregamos los 4KB a las variables de progreso\n leido+=4096;\n leidoTotal+=4096;\n }\n else\n {\n //si no se puede leer 4KB lee el resto del archivo\n int resto=(int)(tamañoArch-leido);\n //damos el tamaño al arreglo\n info=new byte[resto];\n //leemos el resto del archivo\n bis.read(info);\n //agregamos el resto del a las variables de progreso\n leido+=resto;\n leidoTotal+=resto;\n }\n //escribimos en el archivo Zip\n zout.write(info);\n //ponemos el valor en la barra individual\n barra.setValue((int)(leido/100));\n //ponemos el valor en la barra general\n barraGeneral.setValue((int)(leidoTotal/100));\n }\n //cerramos la escritura a la entradadel Zip\n zout.closeEntry();\n //aumentamos el valor del contador\n i++;\n }\n //cerramos la escritura al archivo Zip\n zout.close();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(EnviarArchivo.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(EnviarArchivo.class.getName()).log(Level.SEVERE, null, ex);\n } \n //verificamos que tipo de envio se selecciono\n if(rbtnSimultaneo.isSelected())\n {\n //orden para archivos simultaneos y envios individuales\n orden.enviarArchivoSimultaneo(ruta,ip);\n }\n else\n {\n //orden para envio Secuencial\n orden.envioArchivoSecuencial(ruta);\n }\n //llamamos el metodo cerrar para cerrar la ventana\n cerrar();\n }", "private void addToZip(File directoryToZip, File file, ZipOutputStream zos) throws IOException {\r\n final int BUFFER_SIZE = 1024;\r\n FileInputStream fis = new FileInputStream(file);\r\n // we want the zipEntry's path to be a relative path that is relative\r\n // to the directory being zipped, so chop off the rest of the path\r\n String zipFilePath = file.getCanonicalPath().substring(\r\n (directoryToZip.getCanonicalPath().length() - directoryToZip.getName().length()),\r\n file.getCanonicalPath().length());\r\n ZipEntry zipEntry = new ZipEntry(zipFilePath);\r\n zos.putNextEntry(zipEntry);\r\n byte[] bytes = new byte[BUFFER_SIZE];\r\n int length;\r\n while ((length = fis.read(bytes)) >= 0) {\r\n zos.write(bytes, 0, length);\r\n }\r\n zos.closeEntry();\r\n fis.close();\r\n }", "public File getZipFile() {\n return distZip;\n }", "public static void main(String[] args) throws IOException {\n\t\tFile targetFile = new File(\"D:\\\\program\\\\360cse\\\\360Chrome\\\\test.zip\");\n\t\tFile sourceFiles = new File(\"D:\\\\temple\\\\sysMenu-add.html\");\n\t\tboolean flag = compressZip(false, targetFile, sourceFiles);\n\t\tSystem.out.println(flag);\n\t}", "public static void generateZip(File file) {\r\n\t\t\r\n\t\tFile zipfile=new File(file.toString().replaceAll(\".xlsx\",\".zip\" ));\r\n\t\tFileOutputStream fos=null;\r\n\t\tZipOutputStream zos=null;\r\n\t\tFileInputStream fin=null;\r\n\t\tZipEntry ze=null; \r\n\t\t\t\r\n\t\tif(!zipfile.exists()){\r\n\t\t\ttry {\r\n\t\t\t\tzipfile.createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//create ZipOutputStream to write to the zipfile\r\n fos=new FileOutputStream(zipfile);\r\n\t\t\t zos=new ZipOutputStream(fos);\r\n\t\t\t \r\n\t\t//add a new Zip Entry to the ZipOutPutStream \r\n\t\t\t ze=new ZipEntry(file.getName());\r\n\t\t\t zos.putNextEntry(ze);\r\n\t\t\t \r\n\t\t//read the file and write to the ZipOutPutStream\t \r\n\t\t\t fin=new FileInputStream(file);\r\n\t\t\t int i;\r\n\t\t\t \r\n\t\t\t while((i=fin.read())!=-1){\r\n\t\t\t\t zos.write(i);\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t \r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\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}finally{\r\n\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tif(zos!=null && fos!=null && fin!=null){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t //close the zip entry to write to to zip file\r\n\t\t\t\t\t\tzos.closeEntry();\r\n\t\t\t\t\t//close Resources.\t\r\n\t\t\t\t\t\tzos.close();\r\n\t\t\t\t\t\tfos.close();\r\n\t\t\t\t\t\tfin.close();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\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}\r\n\t\t\t}\r\n\t\t}", "@Test\n public void testDERIVATIVE_COMPRESS_CRC() throws IOException {\n// ZipMeVariables.getSINGLETON().setCRC___(true);\n// ZipMeVariables.getSINGLETON().setCOMPRESS___(true);\n// ZipMeVariables.getSINGLETON().setDERIVATIVE_COMPRESS_CRC___(true);\n\t Configuration.CRC=true;\n\t Configuration.COMPRESS=true;\n\t Configuration.DERIVATIVE_COMPRESS_CRC=true;\n if(Configuration.CRC && Configuration.COMPRESS && Configuration.DERIVATIVE_COMPRESS_CRC) { \n ZipOutputStream zout = new ZipOutputStream(new FileOutputStream(new File(\n homeDir + \"/files/src.zip\")));\n zout.crc.update(1);\n ZipEntry ze = new ZipEntry(\"C://\");\n zout.putNextEntry(ze);\n zout.hook41();\n assertTrue(zout.crc.crc == 0);\n\n zout.write(new byte[32], 0, 31);\n assertTrue(zout.size == 31);\n zout.closeEntry();\n assertTrue(ze.getCrc() == zout.crc.crc);\n }\n }", "public static ZipOutputStream zipFolder(final Path baseFolder, final OutputStream out) throws IOException {\n\t\tfinal ZipOutputStream zio = new ZipOutputStream(out);\n\t\tzipFile(baseFolder, null, zio, Files.isDirectory(baseFolder), null);\n\t\treturn zio;\n\t}", "public void setUnzippedFile(byte[] aBytes) throws IOException {\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n GZIPOutputStream gos = new GZIPOutputStream(baos);\r\n BufferedOutputStream bos = new BufferedOutputStream(gos);\r\n ByteArrayInputStream bais = new ByteArrayInputStream(aBytes);\r\n BufferedInputStream bis = new BufferedInputStream(bais);\r\n int read = -1;\r\n while ((read = bis.read()) != -1) {\r\n bos.write(read);\r\n }\r\n bos.flush();\r\n baos.flush();\r\n gos.finish();\r\n super.setFile(baos.toByteArray());\r\n bis.close();\r\n bos.close();\r\n gos.close();\r\n bais.close();\r\n baos.close();\r\n }", "protected void getFile(ZipEntry e) throws IOException {\n String zipName = e.getName();\n switch (mode) {\n case EXTRACT:\n if (zipName.startsWith(\"/\")) {\n if (!warnedMkDir)\n System.out.println(\"Ignoring absolute paths\");\n warnedMkDir = true;\n zipName = zipName.substring(1);\n }\n // if a directory, just return. We mkdir for every file,\n // since some widely-used Zip creators don't put out\n // any directory entries, or put them in the wrong place.\n if (zipName.endsWith(\"/\")) {\n return;\n }\n // Else must be a file; open the file for output\n // Get the directory part.\n int ix = zipName.lastIndexOf('/');\n if (ix > 0) {\n //String dirName = zipName.substring(0, ix);\n String fileName = zipName.substring(ix + 1, zipName.length());\n zipName = fileName;\n\n }\n String targetFile = this.unzipFileTargetLocation;\n File file = new File(targetFile);\n if (!file.exists())\n file.createNewFile();\n FileOutputStream os = null;\n InputStream is = null;\n try {\n os = new FileOutputStream(targetFile);\n is = zippy.getInputStream(e);\n int n = 0;\n while ((n = is.read(b)) > 0)\n os.write(b, 0, n);\n\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n if (os != null) {\n try {\n os.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n }\n break;\n case LIST:\n // Not extracting, just list\n if (e.isDirectory()) {\n System.out.println(\"Directory \" + zipName);\n } else {\n System.out.println(\"File \" + zipName);\n }\n break;\n default:\n throw new IllegalStateException(\"mode value (\" + mode + \") bad\");\n }\n }", "public static void unzip(InputStream is, String outdir) throws IOException {\r\n\r\n\t\tbyte[] buffer = new byte[buffSize];\r\n\r\n\t\tjava.util.zip.ZipInputStream zis = new java.util.zip.ZipInputStream(new BufferedInputStream(is));\r\n\r\n\t\tjava.util.zip.ZipEntry entry;\r\n\r\n\t\ttry {\r\n\t\t\twhile ((entry = zis.getNextEntry()) != null) {\r\n\r\n\t\t\t\tFile of = new File(outdir + File.separator + entry.getName());\r\n\r\n\t\t\t\tif (entry.isDirectory()) {\r\n\t\t\t\t\tof.mkdirs();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tFile xx = new File(of.getParent());\r\n\t\t\t\t\tif (!xx.exists()) {\r\n\t\t\t\t\t\tStack<String> todo = new Stack<String>();\r\n\t\t\t\t\t\tdo {\r\n\t\t\t\t\t\t\ttodo.push(xx.getAbsolutePath());\r\n\t\t\t\t\t\t\txx = new File(xx.getParent());\r\n\t\t\t\t\t\t} while (!xx.exists());\r\n\t\t\t\t\t\twhile (todo.size() > 0) {\r\n\t\t\t\t\t\t\txx = new File(todo.pop());\r\n\t\t\t\t\t\t\tif (!xx.exists()) {\r\n\t\t\t\t\t\t\t\txx.mkdirs();\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\r\n\t\t\t\tBufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(of), buffer.length);\r\n\r\n\t\t\t\tcpio(new BufferedInputStream(zis), bos, \"unzip:\" + entry.getName());\r\n\r\n\t\t\t\tbos.flush();\r\n\t\t\t\tbos.close();\r\n\t\t\t}\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t// problem with chars in entry name likely\r\n\t\t}\r\n\t\tzis.close();\r\n\r\n\t}", "private static void createZipOrXmlFile(Document createdDocument) {\n if(attachmentList.size() > 0){\n File zipFile = new File(OUTPUT_ZIP_PATH);\n ZipOutputStream zipOutputStream = null;\n String fileName;\n byte[] decoded;\n\n try {\n zipOutputStream = new ZipOutputStream(new FileOutputStream(zipFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n for (Attachment attachment : attachmentList) {\n try {\n //create a new zip entry\n //add the zip entry and write the decoded data\n assert zipOutputStream != null;\n fileName = attachment.filename;\n decoded = attachment.data;\n ZipEntry imageOutputStream = new ZipEntry(ImportUtils.PHOTO_FILE_PATH + fileName);\n zipOutputStream.putNextEntry(imageOutputStream);\n zipOutputStream.write(decoded);\n\n } catch (IllegalArgumentException | IOException e) {\n e.printStackTrace();\n }\n }\n //add the xml after the attachments have been added\n ZipEntry xmlOutputStream = new ZipEntry(ImportUtils.GENERATED_XML_FILENAME);\n try {\n zipOutputStream.putNextEntry(xmlOutputStream);\n zipOutputStream.write(Entry.toBytes(createdDocument));\n //closing the stream\n //! not closing the stream can result in malformed zip files\n zipOutputStream.finish();\n zipOutputStream.flush();\n zipOutputStream.closeEntry();\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n }else{\n //if no attachments found\n // add the xml file only\n OutputFormat format = OutputFormat.createPrettyPrint();\n try {\n OutputStream outputStream = new FileOutputStream(OUTPUT_XML_PATH);\n XMLWriter writer = new XMLWriter(outputStream, format);\n writer.write(createdDocument);\n } catch (IOException e ) {\n e.printStackTrace();\n }\n }\n }", "protected File createZipArchive(File directoryToZip, String modpackName, String workspace) throws Exception {\n zipName = LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd-HH-mm-ss\")) + \"--\" + modpackName + \".zip\";\n uploadStatus = \"Creating Zipfile from Directory\";\n File zipFile = new File(workspace + \"\\\\\" + zipName);\n try {\n ProgressBarLogic progressBarLogic = new ProgressBarLogic(directoryToZip);\n ZipUtil.pack(directoryToZip, zipFile, name -> {\n uploadStatus = \"Adding file: \" + name + \" to the zip\";\n progressBarLogic.progressPercentage = 0;\n progressBarLogic.progress.add(name);\n progressBarLogic.calculateProgress(progressBarLogic.progress);\n notifyObserver();\n return name;\n });\n } catch (ZipException e) {\n throw e;\n } catch (Exception e) {\n System.out.println(e);\n }\n return zipFile;\n }", "@Override\n public byte[] compress(byte[] bytes) throws IOException\n {\n try (BinaryIO io = new BinaryIO())\n {\n io.write32Bits(LZW_TAG);\n\n LZWDictionary dict = new LZWDictionary();\n int bitsize = 9, index = -1, newIndex;\n\n for (byte b : bytes)\n {\n newIndex = dict.get(index, b);\n\n if (newIndex > 0)\n index = newIndex;\n else\n {\n io.writeBits(index, bitsize);\n bitsize = dict.put(index, b);\n index = dict.get(-1, b);\n }\n if (dict.isFull())\n dict.reset();\n }\n io\n .writeBits(index, bitsize)\n .write32Bits(0); // EoF marker\n\n return io.getBytesOut();\n }\n }", "public static void extractAndSaveFile(ZipInputStream zip,\n \t\t\tFileOutputStream destinationFile) throws IOException {\n \t\tByteArrayOutputStream out = readZipEntry(zip);\n \t\tdestinationFile.write(out.toByteArray());\n \t\tout.close();\n \t\tdestinationFile.close();\n \t}", "@Override\n\tpublic void flatten( DataOutputStream stream ) throws IOException\n\t{\n\t\tsuper.flatten( stream );\n\t}", "private boolean expandZippedApplication(InputStream stream, ApplicationDescription desc)\n throws IOException {\n boolean isSelfContained = false;\n ZipInputStream zis = new ZipInputStream(stream);\n ZipEntry entry;\n File appDir = new File(appsDir, desc.name());\n if (!FilePathValidator.validateFile(appDir, appsDir)) {\n throw new ApplicationException(\"Application attempting to create files outside the apps directory\");\n }\n while ((entry = zis.getNextEntry()) != null) {\n if (!entry.isDirectory()) {\n byte[] data = ByteStreams.toByteArray(zis);\n zis.closeEntry();\n if (FilePathValidator.validateZipEntry(entry, appDir)) {\n File file = new File(appDir, entry.getName());\n if (isTopLevel(file)) {\n createParentDirs(file);\n write(data, file);\n } else {\n isSelfContained = true;\n }\n } else {\n throw new ApplicationException(\"Application Zip archive is attempting to leave application root\");\n }\n }\n }\n zis.close();\n return isSelfContained;\n }", "private static void zipSubFolder(ZipOutputStream out, File folder,\n\t\t\tint basePathLength) throws IOException {\n\n\t\tFile[] fileList = folder.listFiles();\n\t\tBufferedInputStream origin = null;\n\t\tfor (File file : fileList) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tzipSubFolder(out, file, basePathLength);\n\t\t\t} else {\n\t\t\t\tbyte data[] = new byte[BUFFER_SIZE];\n\t\t\t\tString unmodifiedFilePath = file.getPath();\n\t\t\t\tString relativePath = unmodifiedFilePath\n\t\t\t\t\t\t.substring(basePathLength);\n\t\t\t\tLog.i(\"ZIP SUBFOLDER\", \"Relative Path : \" + relativePath);\n\t\t\t\tFileInputStream fi = new FileInputStream(unmodifiedFilePath);\n\t\t\t\torigin = new BufferedInputStream(fi, BUFFER_SIZE);\n\t\t\t\tZipEntry entry = new ZipEntry(relativePath);\n\t\t\t\tout.putNextEntry(entry);\n\t\t\t\tint count;\n\t\t\t\twhile ((count = origin.read(data, 0, BUFFER_SIZE)) != -1) {\n\t\t\t\t\tout.write(data, 0, count);\n\t\t\t\t}\n\t\t\t\torigin.close();\n\t\t\t}\n\t\t}\n\t}", "public void extractPackage(String zipPath, String destPath) throws IOException {\n File destDir = new File(destPath);\n if(!destDir.exists()) {\n destDir.mkdir();\n }\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream((zipPath)));\n ZipEntry entry = zipIn.getNextEntry();\n while(entry != null) {\n String filePath = destPath+File.separator+entry.getName();\n //filePath = filePath.replaceAll(\" \",\"_\");\n if(!entry.isDirectory()) {\n Log.i(\"extract\",\"Package Name: \"+entry.getName());\n Log.i(\"extract\",filePath);\n String[] temp = entry.getName().split(\"\\\\.\");\n if(validExtension(temp[temp.length-1].toLowerCase())) {\n extractFile(zipIn,filePath);\n }\n //extractFile(zipIn,filePath);\n } else {\n File dir = new File(filePath);\n dir.mkdirs();\n }\n zipIn.closeEntry();;\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }", "private void downloadZippedDirectory(String selectedFolder) {\n if (selectedFolder != null) {\n File file = getFile(selectedFolder);\n StreamSource zipSource = getZipSource(file);\n getMainWindow().open(new VaadinFileDownloadResource(zipSource, selectedFolder+\".zip\", 0, getMainWindow().getApplication()), \"_self\");\n }\n }", "public void toUnzip(String zipFile, String targetDir) {\n\n\t\tMessage message = new Message();\n\t\tmessage.what = SUCCESS;\n\n\t\tint SIZE = 4096; // buffer size: 4KB\n\t\tString strEntry; // each zip entry name\n\t\ttry {\n\t\t\tBufferedOutputStream dest = null; // buffer output stream\n\t\t\tFileInputStream fis = new FileInputStream(zipFile);\n\t\t\tZipInputStream zis = new ZipInputStream(\n\t\t\t\t\tnew BufferedInputStream(fis));\n\t\t\tZipEntry entry; // each zip entry\n\t\t\twhile ((entry = zis.getNextEntry()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tint count;\n\t\t\t\t\tbyte data[] = new byte[SIZE];\n\t\t\t\t\tstrEntry = entry.getName();\n\n\t\t\t\t\tFile entryFile = new File(targetDir + strEntry);\n\t\t\t\t\tFile entryDir = new File(entryFile.getParent());\n\t\t\t\t\tif (!entryDir.exists()) {\n\t\t\t\t\t\tentryDir.mkdirs();\n\t\t\t\t\t}\n\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(entryFile);\n\t\t\t\t\tdest = new BufferedOutputStream(fos, SIZE);\n\t\t\t\t\twhile ((count = zis.read(data, 0, SIZE)) != -1) {\n\t\t\t\t\t\tdest.write(data, 0, count);\n\n\t\t\t\t\t\tMessage msg = Message.obtain();\n\t\t\t\t\t\tmsg.what = PROGRESS;\n\t\t\t\t\t\tmsg.obj = count;\n\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t}\n\t\t\t\t\tdest.flush();\n\t\t\t\t\tdest.close();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tmessage.what = ERROR;\n\t\t\t\t\tmessage.obj = ex.getMessage();\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tzis.close();\n\t\t\tFile fileszipe = new File(zipFile);\n\t\t\tfileszipe.delete();\n\t\t} catch (Exception cwj) {\n\t\t\tmessage.what = ERROR;\n\t\t\tmessage.obj = cwj.getMessage();\n\t\t\tcwj.printStackTrace();\n\t\t}\n\t\thandler.sendMessage(message);\n\t}", "void makeZip(String zipFilePath, String srcFilePaths[],\n\t\t\tMessageDisplay msgDisplay) {\n\t\t...\n\t\tfor (int i = 0; i < srcFilePaths.length; i++) {\n\t\t\tmsgDisplay.showMessage(\"Zipping \"+srcFilePaths[i]);\n\t\t\t//add the file srcFilePaths[i] into the zip file.\n\t\t\t...\n\t\t}\n\t}", "private static void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "private static void unzip(EmailTypes collection) {\n File dir = new File(destDir);\n // create output directory if it doesn't exist\n if(!dir.exists()) {\n dir.mkdirs();\n }\n FileInputStream fis;\n //buffer for read and write data to file\n byte[] buffer = new byte[1024];\n try {\n fis = new FileInputStream(sourceFiles.get(collection).getPath());\n ZipInputStream is = new ZipInputStream(fis);\n ZipEntry zipEntry = is.getNextEntry();\n System.out.println(\"Unzipping set: \" + collection.getCollection() + \".\");\n while(zipEntry != null){\n String fileName = zipEntry.getName();\n File newFile = new File(unpackedFiles.get(collection) + File.separator + fileName);\n new File(newFile.getParent()).mkdirs();\n FileOutputStream fos = new FileOutputStream(newFile);\n int len;\n while ((len = is.read(buffer)) > 0) {\n fos.write(buffer, 0, len);\n }\n fos.close();\n is.closeEntry();\n zipEntry = is.getNextEntry();\n }\n is.closeEntry();\n is.close();\n fis.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void createTar() {\n File tgzFile = new File(\".\" + File.separator + Arguments.JRE_DEFAULT_NAME);\n File tgzMd5File = new File(tgzFile.getPath() + \".md5\");\n if (tgzFile.exists()) {\n tgzFile.delete();\n m_logger.debug(\"Removed the old tgz file\");\n }\n if (tgzMd5File.exists()) {\n tgzMd5File.delete();\n m_logger.debug(\"Removed the old md5 file\");\n }\n\n try {\n m_logger.debug(\"Starting zip\");\n tgzFile.createNewFile();\n TarArchiveOutputStream tgzStream = new TarArchiveOutputStream(new GZIPOutputStream(\n new BufferedOutputStream(new FileOutputStream(tgzFile))));\n addFileToTarGz(tgzStream, m_jreLocation, \"\");\n tgzStream.finish();\n tgzStream.close();\n m_logger.debug(\"Finished zip, starting md5 hash\");\n\n Platform.runLater(() -> fileLabel.setText(\"Generating md5 hash\"));\n String md5Hash = MainApp.hashFile(tgzFile);\n OutputStream md5Out = new BufferedOutputStream(new FileOutputStream(tgzMd5File));\n md5Out.write(md5Hash.getBytes());\n md5Out.flush();\n md5Out.close();\n m_logger.debug(\"Finished md5 hash, hash is \" + md5Hash);\n final boolean interrupted = Thread.interrupted();\n\n // Show the connect roboRio screen\n Platform.runLater(() -> {\n if (!interrupted) {\n m_args.setArgument(Arguments.Argument.JRE_TAR, tgzFile.getAbsolutePath());\n moveNext(Arguments.Controller.CONNECT_ROBORIO_CONTROLLER);\n }\n });\n } catch (IOException | NoSuchAlgorithmException e) {\n m_logger.error(\"Could not create the tar gz file. Do we have write permissions to the current working directory?\", e);\n showErrorScreen(e);\n }\n }", "private void writeArchive(Content content) throws Exception {\n\t\tString path = open();\n\t\tTranslateContent translate = new TranslateContent(content, path);\n\t\ttranslate.writeArchive();\n\n\t\t// compress archive file if +C used\n\t\tif (content.isCompressed()) {\n\t\t\tcompressArchive();\n\t\t}\n\t}", "OutputStream createStream(String location);", "private static FileSystem openZip(Path zipPath) throws IOException, URISyntaxException{\n\t Map<String, String> providerProps = new HashMap<>();\r\n\t\tproviderProps.put(\"create\", \"true\");\r\n\t\t\r\n\t\t// Um ZipFiles zu erstellen benötigt man URIs, deswegen werden sie hier erstellt\r\n\t\tURI zipUri = new URI(\"jar:file\", zipPath.toUri().getPath(), null);\r\n\t\tFileSystem zipFs = FileSystems.newFileSystem(zipUri, providerProps); // Statische Methode wird hier angewendet\r\n\t\t\r\n\t\treturn zipFs;\r\n\t}", "private void addFile( ZipOutputStream output, File file, String prefix, boolean compress) throws IOException {\n //Make sure file exists\n long checksum = 0;\n if ( ! file .exists() ) {\n return ;\n }\n ZipEntry entry = new ZipEntry( getEntryName( file, prefix ) );\n entry .setTime( file .lastModified() );\n entry .setSize( file .length() );\n if (! compress){\n entry.setCrc(calcChecksum(file));\n }\n FileInputStream input = new FileInputStream( file );\n addToOutputStream(output, input, entry);\n }", "public interface CompressionService {\n public static final String ARCHIVE_EXTENSION = \"zip\";\n /**\n * Compresses given directory into zip file\n *\n * @param directory the content to compress\n * @param size default archive size\n *\n * @return zipped archive/s\n */\n List<File> compress(File directory, int size);\n}", "private byte[] readBinaryZipEntry(ZipInputStream zis)\r\n\t\tthrows IOException\r\n\t{\r\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\r\n\t\tint read;\r\n\t\tbyte[] buffer = new byte[1024];\r\n\r\n\t\twhile ((read = zis.read(buffer, 0, buffer.length)) != -1)\r\n\t\t\tbos.write(buffer, 0, read);\r\n\r\n\t\treturn bos.toByteArray();\r\n\t}", "private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "private void tarFolder( String parent, String path, TarOutputStream out ) \n throws IOException \n {\n BufferedInputStream origin = null;\n File f = new File( path );\n String files[] = f.list();\n if (files == null) \n {\n files = new String[1];\n files[0] = f.getName();\n }\n parent = ( ( parent == null ) ? ( f.isFile() ) ? \"\" \n : f.getName() + \"/\" : parent + f.getName() + \"/\" );\n for (int i = 0; i < files.length; i++) \n {\n File fe = f;\n byte data[] = new byte[BUFFER];\n \n if (f.isDirectory()) {\n fe = new File( f, files[i] );\n }\n \n if (fe.isDirectory()) {\n String[] fl = fe.list();\n if (fl != null && fl.length != 0)\n tarFolder( parent, fe.getPath(), out );\n else \n {\n TarEntry entry = new TarEntry( fe, parent + files[i] + \"/\" );\n out.putNextEntry( entry );\n }\n continue;\n }\n FileInputStream fi = new FileInputStream( fe );\n origin = new BufferedInputStream( fi );\n TarEntry entry = new TarEntry( fe, parent + files[i] );\n out.putNextEntry( entry );\n int count;\n //int bc=0;\n while ( (count=origin.read(data)) != -1 ) \n {\n out.write( data, 0, count );\n //bc+=count;\n }\n //System.out.println(\"Wrote \"+bc+\" bytes from \"+files[i]+\" to out\");\n out.flush();\n origin.close();\n }\n }", "void importDivision(Connection con, ZipFile zip) throws Exception;", "protected void zipFile(File file, ZipOutputStream zOut, String vPath)\n throws IOException\n {\n if (!vPath.equalsIgnoreCase(\"WEB-INF/web.xml\")) {\n super.zipFile(file, zOut, vPath);\n } else {\n log(\"Warning: selected \"+archiveType+\" files include a WEB-INF/web.xml which will be ignored \" +\n \"(please use webxml attribute to \"+archiveType+\" task)\", Project.MSG_WARN);\n }\n }", "public void zip(String directoryInZip, \n String filePath) throws Exception\n {\n File thisFile = new File(filePath);\n\n if (thisFile.exists()) {\n\n try {\n FileInputStream fi = new FileInputStream(thisFile);\n\n origin = new BufferedInputStream(fi, BUFFER);\n\n ZipEntry entry = new ZipEntry(directoryInZip + File.separator\n + thisFile.getName());\n out.putNextEntry(entry);\n\n int count;\n while ((count = origin.read(data, 0, BUFFER)) != -1) {\n out.write(data, 0, count);\n }\n origin.close();\n\n } catch (FileNotFoundException e) {\n logger.error(\"File \" + filePath + \" not found !!\", e);\n } catch (IOException e) {\n logger.error(\"Could not write to Zip File \", e);\n throw new Exception(\"Could not write to Zip File \", e);\n }\n\n } else {\n // Log message if file does not exist\n logger.info(\"File \" + thisFile.getName()\n + \" does not exist on file system\");\n\n } \t\t\n }", "public void copyDataBase() throws IOException {\n InputStream assetInput = context.getAssets().open(ZIP_DB_NAME);\r\n Log.i(LOG_TAG, \"opened zip_db\");\r\n ZipInputStream zipIn = new ZipInputStream(assetInput);\r\n\r\n ZipEntry entry = zipIn.getNextEntry();\r\n\r\n entry.getName();\r\n\r\n // path to the just created empty database\r\n String DBFileName = DB_PATH + DB_NAME;\r\n\r\n OutputStream DBOutput = new FileOutputStream(DBFileName);\r\n\r\n byte[] buffer = new byte[1024];\r\n\r\n int length;\r\n\r\n while ((length = zipIn.read(buffer)) > 0) {\r\n DBOutput.write(buffer, 0, length);\r\n Log.i(LOG_TAG, \"zipread\" + length);\r\n }\r\n Log.i(LOG_TAG, \"read end\");\r\n // close the streams\r\n DBOutput.flush();\r\n DBOutput.close();\r\n\r\n zipIn.close();\r\n assetInput.close();\r\n }", "@Override\r\n\tpublic byte[] streamUnZipper(byte[] sampleBytes) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\", null, Level.ERROR, null);\r\n\r\n\t}", "public static void m97139a(File file, ZipOutputStream zipOutputStream, String str) throws IOException {\n if (file.exists()) {\n if (file.isDirectory()) {\n String name = file.getName();\n if (!name.endsWith(File.separator)) {\n name = name + File.separator;\n }\n if (!TextUtils.isEmpty(str)) {\n name = str + name;\n }\n File[] listFiles = file.listFiles();\n if (listFiles == null || listFiles.length <= 0) {\n zipOutputStream.putNextEntry(new ZipEntry(name));\n zipOutputStream.closeEntry();\n return;\n }\n for (File file2 : listFiles) {\n m97139a(file2, zipOutputStream, name);\n }\n return;\n }\n zipOutputStream.putNextEntry(new ZipEntry(TextUtils.isEmpty(str) ? file.getName() : str + file.getName()));\n FileInputStream fileInputStream = new FileInputStream(file);\n byte[] bArr = new byte[4096];\n while (true) {\n int read = fileInputStream.read(bArr);\n if (read != -1) {\n zipOutputStream.write(bArr, 0, read);\n } else {\n zipOutputStream.flush();\n fileInputStream.close();\n zipOutputStream.closeEntry();\n return;\n }\n }\n } else {\n return;\n }\n throw th;\n }", "@Override\n void pack() {\n }", "public static void createFileToZip(BufferedImage image, String path, int name,ZipOutputStream zipOS) throws FileNotFoundException, IOException {\n //Create the jpeg image\n File f = new File(path+Integer.toString(name)+\".jpg\");\n //Create the inputstream\n FileInputStream fis = new FileInputStream(f);\n //Create a zipentry for the file we are gonna include to the zip\n ZipEntry zipEntry = new ZipEntry(path+Integer.toString(name)+\".jpg\");\n //Store the image into the zip as an array of bytes\n zipOS.putNextEntry(zipEntry);\n byte[] bytes = new byte[1024];\n int length;\n while ((length = fis.read(bytes)) >= 0) {\n zipOS.write(bytes, 0, length);\n }\n zipOS.closeEntry();\n fis.close();\n }" ]
[ "0.6323671", "0.6035866", "0.60247934", "0.59616494", "0.5936781", "0.59099334", "0.58462167", "0.5801726", "0.5752098", "0.5730325", "0.5720923", "0.5717383", "0.566638", "0.5592621", "0.55805135", "0.5578604", "0.5558645", "0.5555896", "0.55483574", "0.5491832", "0.5469115", "0.5469115", "0.5469115", "0.5469115", "0.5469115", "0.5469115", "0.5419232", "0.5405873", "0.53711486", "0.5370573", "0.53244287", "0.53041106", "0.52968645", "0.52950007", "0.52868456", "0.52804184", "0.5272383", "0.5238817", "0.5238588", "0.52254784", "0.5215042", "0.5213368", "0.52125746", "0.51997894", "0.51960045", "0.51779413", "0.5171833", "0.51666486", "0.5150763", "0.51454115", "0.5137311", "0.5121209", "0.51195645", "0.509402", "0.5082456", "0.5072899", "0.50550526", "0.50525784", "0.50506127", "0.50430316", "0.5040496", "0.5035421", "0.5009096", "0.50064427", "0.50004625", "0.49966055", "0.4991568", "0.49860808", "0.49762183", "0.49550498", "0.49497357", "0.494629", "0.4943177", "0.49381837", "0.49167067", "0.49144033", "0.4910215", "0.4908905", "0.49083105", "0.49051583", "0.49037006", "0.48895293", "0.4886168", "0.48851216", "0.4884604", "0.48838475", "0.48803255", "0.4874292", "0.48709795", "0.4865239", "0.4865239", "0.48603266", "0.48550454", "0.48436955", "0.48396033", "0.48335823", "0.48274717", "0.48060092", "0.48042616", "0.47964972" ]
0.5166906
47
Pipe bauen, um Steam als Download umzulenken
public InputStream getStream() { final CircularByteBuffer cbb = new CircularByteBuffer(1024); new Thread( new Runnable(){ public void run(){ ZipOutputStream zos = new ZipOutputStream(cbb.getOutputStream()); Utils.zipDir(getVolume(), requestedDirectory.getPath(), zos); try { if (zos != null) { zos.flush(); zos.close(); } } catch (IOException e) { e.printStackTrace(); } } } ).start(); return cbb.getInputStream(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface FileDownloader {\n boolean setInputSteam(String sourceUrl);\n void downloadFileFromStream();\n String getFileName();\n\n}", "List<Transfer> requestDownloads(Leecher leecher);", "@Override\n protected Void call() {\n if(download_queue.isEmpty()) return null;\n \n //Proceed to create a file with a list of addresses\n Writer writer = null;\n String file_dir = Configuration.root_dir + \"Download_list.txt\";\n try{\n writer = new BufferedWriter(\n new OutputStreamWriter(\n new FileOutputStream(\n file_dir), \"utf-8\"));\n String server_root = Configuration.getInstance().getSina_server_root();\n //Traverse through the download list and write each download address to file\n String content = \"\";\n for(int i = 0; i < download_queue.size(); i++){\n SoundTrack track = download_queue.get(i);\n String address = server_root + track.getLocalFileName();\n content += address;\n if(i < (download_queue.size() - 1)){\n content += \"\\n\";\n }\n }\n //Write to file\n writer.write(content);\n \n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (FileNotFoundException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } finally{\n try {\n if(writer != null)\n writer.close();\n } catch (IOException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n \n //Run wget command to download the listed files\n String command = \"wget\";\n command += \" -P \" + Configuration.root_dir + \"SoundTracks/\";\n command += \" -i list\";\n try {\n Process p = Runtime.getRuntime().exec(command);\n p.waitFor();\n } catch (IOException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InterruptedException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return null;\n }", "Mono<PieceEvent> downloadBlock(Link link, RequestMessage requestMessage);", "public void download() {\n }", "public void download() {\n \n try {\n \n downloading = true;\n \n input = link.openStream(); \n output = new FileOutputStream(localFile);\n \n while ((bytes = input.read()) != -1) { // as long as there are bytes they will be copied to the local machine // enquanto houver bytes eles serao copiados para maquina local\n\n output.write(bytes);\n\n System.out.println(\"Tamanho: \" + sizeInMegaBytes(localFile) + \" MB\");\n\n }\n \n downloading = false;\n JOptionPane.showMessageDialog(null, \"Download do arquivo: \"+ localFile.getName() +\" Finalizado\");\n \n } catch (FileNotFoundException ex) {\n Logger.getLogger(Downloader.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(Downloader.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@SuppressLint(\"NewApi\")\r\n\tprivate void downloadFile() {\n\t\tLog.d(TAG, \"In fuction downloadFile()\");\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yy\");\r\n \tCalendar cal = Calendar.getInstance();\r\n \tString programmaNameUnderscore = mName.replace(\" \", \"_\");\r\n \tprogrammaNameUnderscore = programmaNameUnderscore.replace(\",\",\"\");\r\n \tString fileName = programmaNameUnderscore + \"_\" + dateFormat.format(cal.getTime())+\".mp3\";\r\n \t\r\n \t\r\n\t\tRequest request = new Request(Uri.parse(mDownloadUrl));\r\n\t\trequest.setDescription(mName);\r\n \t// in order for this if to run, you must use the android 3.2 to compile your app\r\n \tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\r\n \t request.allowScanningByMediaScanner();\r\n \t request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);\r\n \t}\r\n \trequest.setDestinationInExternalPublicDir(Environment.DIRECTORY_MUSIC, getString(R.string.download_subdir_test) + File.separator + fileName);\r\n\t}", "@Override\r\n\tpublic void download() {\n\t\t\r\n\t}", "@Override public java.lang.CharSequence download(java.lang.String appId, java.lang.String url, long duration, java.lang.String folder) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.lang.CharSequence _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeString(appId);\n_data.writeString(url);\n_data.writeLong(duration);\n_data.writeString(folder);\nmRemote.transact(Stub.TRANSACTION_download, _data, _reply, 0);\n_reply.readException();\nif ((0!=_reply.readInt())) {\n_result = android.text.TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(_reply);\n}\nelse {\n_result = null;\n}\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}", "public static void main (String [] args){\n\n Server server = interfacebeans.JServer.getInstance().getServer();\n server = new Server(\"bayes.wustl.edu\");\n server.setPort(80);\n\n // load.DownloadSampleFiles.execute(server);\n\n int total = 500;\n int cur = 300;\n double percent = 1.00*cur/total*100;\n String msg = String.format(\n \"Downloaded %.1f%s of %d bytes\", percent,\"%\" ,total);\n\n System.out.println(msg);\n }", "public interface DownlodApi {\n\n\n @Streaming\n @GET(\"http://121.29.10.1/f3.market.xiaomi.com/download/AppStore/0ff0604fd770f481927d1edfad35675a3568ba656/com.tencent.mobileqq.apk\")\n Observable<ResponseBody> downloadQQ();\n}", "public static void main(String[] args) throws IOException {\n\n downloadFileRequest();\n }", "void mo54428b(DownloadTask downloadTask);", "public abstract Pipe deliver( Pipe sink );", "public void downloadFile(final Context context, final String fileKey, String pageFileKey, String fileType, final DownloadListener downloadListener) {\n\n final String pathName = Config.getPathName(context) + fileType + getFIleNameFromFileKEy(fileKey);\n final String pagePathName = Config.getPathName(context) + PAGES_FILE + getFIleNameFromFileKEy(pageFileKey);\n\n final long totalBytes = 0;\n TransferObserver downloadObserver = transferUtility.download(\n Config.BUCKET_NAME,\n fileKey,\n new File(pathName));\n\n\n // Attach a listener to the observer to get state update and progress notifications\n downloadObserver.setTransferListener(new TransferListener() {\n\n @Override\n public void onStateChanged(int id, TransferState state) {\n if (TransferState.COMPLETED == state) {\n\n downloadListener.onDownloadFinish(id, state.name(), pathName, pagePathName);\n }\n }\n\n @Override\n public void onProgressChanged(int id, long bytesCurrent,long bytesTotal) {\n\n\n if (bytesTotal == 0){\n\n bitesCorrent = bytesCurrent;\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n\n URL url = null;\n try {\n url = new URL(S3_JABRUTOUCH + fileKey);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n URLConnection conection = null;\n try {\n conection = url.openConnection();\n } catch (IOException e) {\n e.printStackTrace();\n }\n // getting file length\n int lengthOfFile = conection.getContentLength();\n\n float percentDonef = ((float) bitesCorrent / (float) lengthOfFile) * 100;\n final int percentDone = (int) percentDonef;\n\n new Handler(Looper.getMainLooper()).post(new Runnable() {\n @Override\n public void run() {\n downloadListener.onProgressChanged(percentDone);\n }\n });\n }\n });\n thread.start();\n\n }else {\n\n\n float percentDonef = ((float) bytesCurrent / (float) bytesTotal) * 100;\n int percentDone = (int) percentDonef;\n\n downloadListener.onProgressChanged(percentDone);\n }\n\n\n }\n\n @Override\n public void onError(int id, Exception ex) {\n\n Toast.makeText(context, \"Error downloading file \" + fileKey, Toast.LENGTH_LONG).show();\n downloadListener.onDownloadError();\n\n }\n\n });\n\n // If you prefer to poll for the data, instead of attaching a\n // listener, check for the state and progress in the observer.\n if (TransferState.COMPLETED == downloadObserver.getState()) {\n // Handle a completed upload.\n\n\n }\n\n\n }", "public void downloadStarted();", "void mo54417a(DownloadChunk downloadChunk);", "private void getBinaryFileFromPeer(Host h, String nombre, ObjectOutputStream out) {\n\n log.info(\"Starting thread to download binary from peer in \" + h.getIp() + \":\" + h.getPort() );\n ClientDownloadThread c = new ClientDownloadThread(h,nombre,this.sharedFolder);\n c.start();\n try {\n c.join();\n\n Consulta c2 = new Consulta();\n c2.setFileName(c.getFileName());\n c2.setMethod(ADD_FILE);\n\n log.info(\"Updating server w new file downloaded\");\n\n out.writeObject(c2);\n\n log.info(\"Update sucessfuly\");\n\n } catch (InterruptedException | IOException e) {\n log.info(\"Error while joining download thread\",e);\n }\n\n\n }", "@Override\n public void onClick(View view) {\n getOps().downloadVideo();\n }", "public interface BlockDownloader {\n\n /**\n * send the request and check that we received the correct block.\n */\n Mono<PieceEvent> downloadBlock(Link link, RequestMessage requestMessage);\n}", "public interface DownLoadService {\n\n @Streaming\n @GET\n Observable<ResponseBody> downloadFilm(@Url String url);\n\n}", "private void startDownload(){\n final DownloadCurrent downloadCurrent = new DownloadCurrent(this);\n downloadCurrent.execute(UpdateTalesData.sData_HTTP);\n sProgDialDownload.setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n downloadCurrent.cancel(true);\n }\n });\n\n }", "@Override\n public boolean isDownloadable() {\n return true;\n }", "protected void download() {\r\n\t\tsetState(DOWNLOADING);\r\n\t\t\r\n\t\tThread t = new Thread(this);\r\n\t\tt.start();\r\n\t}", "public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception {\r\n ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>();\r\n String parameter = param.toString();\r\n br.setFollowRedirects(false);\r\n br.setCookiesExclusive(true);\r\n br.getPage(parameter);\r\n if (br.containsHTML(\"The page you were looking for doesn\\\\'t exist\\\\.\")) {\r\n logger.warning(\"Invalid URL: \" + parameter);\r\n return decryptedLinks;\r\n }\r\n // for stable compliance (getHost() will only return domain.tld and not subdomain(s).domain.tld)\r\n String host = new Regex(br.getURL(), \"(https?://.*?deviantart\\\\.com)/\").getMatch(0);\r\n\r\n // only non /art/ requires packagename\r\n if (parameter.contains(\"/gallery/\") || parameter.contains(\"/favourites/\")) {\r\n // find and set username\r\n String username = br.getRegex(\"<h1>\\\\*<a class=\\\"u\\\" href=\\\"\" + host + \"\\\">(.*?)</a></h1>\").getMatch(0);\r\n // find and set page type\r\n String pagetype = \"\";\r\n if (parameter.contains(\"/favourites/\")) pagetype = \"Favourites\";\r\n if (parameter.contains(\"/gallery/\")) pagetype = \"Gallery\";\r\n // find and set pagename\r\n String pagename = br.getRegex(\"<span class=\\\"folder\\\\-title\\\">(.*?)</span>\").getMatch(0);\r\n // set packagename\r\n String fpName = \"\";\r\n if ((username != null) && (pagetype != null) && (pagename != null)) fpName = username + \" - \" + pagetype + \" - \" + pagename;\r\n else if ((username != null) && (pagename != null)) fpName = username + \" - \" + pagename;\r\n else if ((username != null) && (pagetype != null)) fpName = username + \" - \" + pagetype;\r\n else if ((pagetype != null) && (pagename != null)) fpName = pagetype + \" - \" + pagename;\r\n \r\n // now we find and crawl! \r\n parsePage(decryptedLinks, host, parameter);\r\n\r\n if (fpName != null) {\r\n FilePackage fp = FilePackage.getInstance();\r\n fp.setName(fpName);\r\n fp.addLinks(decryptedLinks);\r\n }\r\n }\r\n // art links just grab final link\r\n else if (parameter.contains(\"/art/\")) {\r\n parseArtPage(decryptedLinks, parameter);\r\n }\r\n return decryptedLinks;\r\n }", "String download(String path) throws IOException;", "void mo54418a(DownloadTask downloadTask);", "public void establishChannel(String Download)\r\n {\r\n try\r\n {\r\n int lines=0;\r\n while(true)\r\n {\r\n lines=getLines(path,Download);\r\n if(lines == 0)\r\n {\r\n //nothing to copy\r\n System.out.println(\"Nothing to copy will try in 5 secs\");\r\n Thread.sleep(5000);\r\n }\r\n else\r\n\t {\r\n String command1=\"tail -\"+lines+\" \"+path;\r\n System.out.println(\"Setting command: \"+command1); \r\n settingCommand(command1,Download);\r\n Thread.sleep(1000);\r\n }\r\n }\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(e);\r\n }\r\n }", "public void downloadFile(ObjectInputStream inputStream) {\r\n\t \tFileEvent fileEvent = null;\r\n\t \ttry {\r\n\t \tfileEvent = (FileEvent) inputStream.readObject();\r\n\t if (fileEvent.getStatus().equalsIgnoreCase(\"Error\")) {\r\n\t System.out.println(\"Error occurred ..So exiting\");\r\n\t System.exit(0);\r\n\t }\r\n\t String outputFile = fileEvent.getDestinationDirectory() + fileEvent.getFilename();\r\n\t if (!new File(fileEvent.getDestinationDirectory()).exists()) {\r\n\t new File(fileEvent.getDestinationDirectory()).mkdirs();\r\n\t }\r\n\t File dstFile = new File(outputFile);\r\n\t FileOutputStream fileOutputStream = new FileOutputStream(dstFile);\r\n\t fileOutputStream.write(fileEvent.getFileData());\r\n\t fileOutputStream.flush();\r\n\t fileOutputStream.close();\r\n\t System.out.println(\"Output file : \" + outputFile + \" is successfully saved \");\r\n\t Thread.sleep(3000);\r\n\t System.exit(0);\r\n\t \r\n\t } catch (ClassCastException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tList<String> serverFiles = (List<String>) fileEvent;\r\n\t\t\t\tSystem.out.println(serverFiles);\r\n\t\t\t} catch (IOException e) {\r\n\t e.printStackTrace();\r\n\t } catch (ClassNotFoundException e) {\r\n\t e.printStackTrace();\r\n\t } catch (InterruptedException e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t }", "@Test\n public void shouldDownloadAllUrls() throws Exception {\n //given\n Flowable<URL> urls = Urls.all();\n\n\n/* final Flowable<String> htmls2 = urls\n .flatMap(url -> UrlDownloader.download(url)\n .subscribeOn(Schedulers.io())); //ojo al subscribeon\n\n\n Flowable<Pair<String, String>> gel = urls.map(s -> {\n final String[] html = {\"\"};\n final String[] gelote = new String[1];\n\n UrlDownloader.download(s).subscribe(value -> {\n gelote[0] = value;\n });\n String result = gelote[0];\n return Pair.of(s.toURI().toString(), gelote[0]);\n });\n\n //\n Flowable<String> htmls =\n urls.flatMap(url -> UrlDownloader.download(url).subscribeOn(Schedulers.io()));\n\n Flowable<Pair<URL, Flowable<String>>> broken = urls.map(url -> Pair.of(url, UrlDownloader.download(url)));\n\n urls.flatMap(url -> {\n final Flowable<String> html = UrlDownloader.download(url);\n Flowable<Pair<URL,String>> var =html.map(htmlstr->Pair.of(url,htmlstr));\n return var;\n });\n\n */\n Flowable<Pair<URI, String>> pairs = urls.flatMap(url -> UrlDownloader.download(url)\n .subscribeOn(Schedulers.io())\n .map(htmlstr -> Pair.of(toUri(url), htmlstr)));\n\n\n //no confundir toMap con map\n //Maybe: 0..1 values\n //Single 1 value\n //Completable 0 values\n //Flowable 0...infinity\n //single es un stream que solo tiene un valor\n Single<Map<URI, String>> var = pairs.toMap((Pair<URI, String> pair) -> pair.getLeft(), (Pair<URI, String> pair) -> pair.getRight());\n Map<URI, String> bodies2 = var.blockingGet();\n Map<URI, String> bodies = pairs.toMap(Pair::getLeft, Pair::getRight).blockingGet();\n TimeUnit.SECONDS.sleep(20);\n\n //when\n //WARNING: URL key in HashMap is a bad idea here\n\n //No mutar el mapa del suscribe , en vez de eso, use toMap()\n //con confundir con el operador map()\n //blocking*\n\n\n /*Map<URI, String> bodies = new HashMap<>();*/\n\n/*\n gel.toMap(s.getLeft());\n gel.subscribe(System.out::println);\n*/\n\n //then\n assertThat(bodies).hasSize(996);\n assertThat(bodies).containsEntry(new URI(\"http://www.twitter.com\"), \"<html>www.twitter.com</html>\");\n assertThat(bodies).containsEntry(new URI(\"http://www.aol.com\"), \"<html>www.aol.com</html>\");\n assertThat(bodies).containsEntry(new URI(\"http://www.mozilla.org\"), \"<html>www.mozilla.org</html>\");\n }", "private void startDownload() {\n Uri uri = Uri.parse( data.getStringExtra(PARAM_URL) );\n dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);\n DownloadManager.Request request = new DownloadManager.Request( uri );\n request.setAllowedNetworkTypes( DownloadManager.Request.NETWORK_MOBILE | DownloadManager.Request.NETWORK_WIFI)\n //移动网络情况下是否允许漫游。\n .setAllowedOverRoaming(false)\n .setTitle(\"更新\") // 用于信息查看\n .setDescription(\"下载apk\"); // 用于信息查看\n //利用此属性下载后使用响应程序打开下载文件\n //request.setMimeType(\"application/vnd.android.package-archive\");\n request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, new Date().getTime()+\".apatch\");\n enqueue = dm.enqueue(request);\n }", "private void startMovieDownload() {\n String sortOrder = AppPrefs.getInstance(this).getLastSortOrder();\n if (null == sortOrder) {\n sortOrder = SortBy.getDefaultSortOrder();\n }\n downloadData(sortOrder);\n }", "private void download()\n {\n if(mDownloadConnection!=null && mDownloadConnection.mBinder!=null)\n {\n if (mDownloadConnection.mBinder.download(\"file1\"))\n {\n mTvFilename.setText(\"file1\");\n }\n }\n }", "@Streaming\n @GET\n Call<ResponseBody> downloadFileWithDynamicUrlSync(@Url String fileUrl);", "@Override\n\tpublic void pipeOutput() {\n\n\t}", "public void run()\n {\n try\n {\n // Load the manifest file\n File manifest = new File(UploaderMain.getManifestName());\n if (!manifest.exists())\n {\n ErrorPrinter.printError(ErrorCode.fileNotFound, \"manifest does not exist\");\n System.exit(0);\n }\n\n // Read names of files from manifest\n Map<String, File> files = new HashMap<String, File>();\n BufferedReader manifestReader = new BufferedReader(new FileReader(manifest));\n String line;\n long totalLength = 0;\n while ((line = manifestReader.readLine()) != null)\n {\n if (line.startsWith(\"//\") || line.trim().isEmpty()) continue; // ignore comments\n StringTokenizer token = new StringTokenizer(line, \"@\");\n String destinationName = token.nextToken();\n String localName = token.nextToken();\n File f = new File(localName);\n if (!f.exists())\n {\n \tErrorPrinter.printError(ErrorCode.fileNotFound, \"file \" + localName + \" not found\");\n \tcontinue;\n }\n totalLength += f.length();\n files.put(destinationName, f);\n }\n manifestReader.close();\n\n dOut.writeInt(files.size());\n dOut.writeLong(totalLength);\n\n for (String s : files.keySet())\n {\n File f = files.get(s);\n \n try\n {\n // Send the name and length of the file\n dOut.writeUTF(s);\n dOut.writeLong(f.length());\n\n // Send the file over the network\n FileInputStream reader = new FileInputStream(f);\n byte[] buffer = new byte[BUFFER_SIZE];\n int numRead;\n long numSent = 0;\n while (numSent < f.length())\n {\n numRead = reader.read(buffer);\n dOut.write(buffer, 0, numRead);\n numSent += numRead;\n }\n\n reader.close();\n }\n catch (Exception e)\n {\n System.out.println(\"Error sending file \" + f.getName());\n }\n }\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "public IIcon pipeTexture(ForgeDirection dir, boolean blocked)\r\n/* 29: */ {\r\n/* 30:28 */ return BlockTransferPipe.pipes_oneway;\r\n/* 31: */ }", "@Test\n public void downloadTest() throws ApiException {\n Integer devid = null;\n String path = null;\n File response = api.download(devid, path);\n\n // TODO: test validations\n }", "@Override\n public void onClick(View view) {\n String url = \"https://khoapham.vn/download/vietnamoi.mp3\";\n MediaPlayer mediaPlayer = new MediaPlayer();\n mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n\n try {\n mediaPlayer.setDataSource(url);\n mediaPlayer.prepareAsync();\n mProgressBar.setVisibility(View.VISIBLE);\n mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n @Override\n public void onPrepared(MediaPlayer mediaPlayer) {\n mProgressBar.setVisibility(View.GONE);\n mediaPlayer.start();\n }\n });\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "void downloadingFile(String path);", "@Override\n public void downloadBlockChain() {\n startBlockChainDownload(fastcoinWalletDownloadListener);\n }", "public static void main(String[] args) {\n\n try {\n System.out.println((FtpUtil.storeFile(\"http://v2.ifaceshow.com/a/2012/1102/0955/\", new InputStream[] { new FileInputStream(\"d:/pic/123.jpg\")}, \"video\", \"a64cbbe_13b377221fe51\",new String[]{\"0\"}, \"jpg\"))[0]);\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "private int DownloadFile(URL url) {\n try {\n //---simulate taking some time to download a file---\n thread.sleep(5000);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return 100;\n }", "public void download() {\r\n\t\t\ttThread = new Thread(this);\r\n\t\t\ttThread.start();\r\n\t\t}", "static void downloadFile(String [] addresses, String filename, int downloadType) {\n\t\ttry {\n\t\t\tHttpURLConnection con = null;\n\t\t\t// For each address in addresses, deconstruct the string and try to connect\n\t\t\tfor(String address: addresses) {\n\t\t\t\t// Uses the character } to separate the URL from the username - split it\n\t\t\t\tString[] stringDeconstruction = address.split(\"}\");\n\t\t\t\t// The address part is before the } and the username is after\n\t\t\t\tString addressPart = stringDeconstruction[0];\n\t\t\t\tString usernamePart = stringDeconstruction[1];\n\t\t\t\t// Now, try to make a URL object that is a combination of the address, the filename, and username\n\t\t\t\ttry {\n\t\t\t\t\t// Create the URL object and set the con to the casted HttpURLConnection\n\t\t\t\t\tURL url = new URL(addressPart + \"/\" + filename + \"}\" + usernamePart);\n\t\t\t\t\tcon = (HttpURLConnection)url.openConnection();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// If unable to connect, keep looping\n\t\t\t\tcatch(ConnectException e) {\n\t\t\t\t\tcon = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If unable to make any connections, return to the calling function after informing the user\n\t\t\tif(con == null) {\n\t\t\t\tSystem.out.println(\"Unable to connect to a user peer to download.\");\n\t\t\t\tSystem.out.println(\"The user may have gone offline or stopped sharing the file.\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Create a new byteStream in order to transfer files of all types\n\t\t\tByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\t\t\t// Set a buffer based on a reasonable size\n\t\t\tbyte[] buffer = new byte[4096];\n\n\t\t\t// Set up an InputStream for the connection to prepare for the file's contents\n\t\t\tInputStream incoming = con.getInputStream();\n\n\t\t\t// Write the bytes of the file through the byteStream\n\t\t\twhile(true) {\n\t\t\t\tint i = incoming.read(buffer);\n\t\t\t\tif( i < 0 ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbyteStream.write(buffer,0,i);\n\t\t\t}\n\t\t\tincoming.close();\n\n\t\t\t// If the download type was 1, assemble the byteStream.toByteArray which should create the original file\n\t\t\t// Then save it to the user's directory under \"shared\" and inform the user of the status\n\t\t\tif(downloadType == 1) {\n\t\t\t\tPath sharedPath = Paths.get(\"users/\"+username+\"/shared/\" + filename);\n\t\t\t\tFiles.write(sharedPath, byteStream.toByteArray());\n\t\t\t\tserver.clearSharedFiles(username);\n server.clearNotSharedFiles(username);\n\t\t\t\tserver.registerFiles(username);\n\t\t\t\tSystem.out.println(\"The file has been downloaded and is now also being shared!\");\n\t\t\t}\n\n\t\t\t// If the download type was 2, assemble the byteStream.toByteArray which should create the original file\n\t\t\t// Then save it to the user's directory under \"not-shared\" and inform the user of the status\n\t\t\telse{\n\t\t\t\tPath notSharedPath = Paths.get(\"users/\"+username+\"/not-shared/\" + filename);\n\t\t\t\tFiles.write(notSharedPath, byteStream.toByteArray());\n\t\t\t\tserver.clearNotSharedFiles(username);\n server.clearSharedFiles(username);\n\t\t\t\tserver.registerFiles(username);\n\t\t\t\tSystem.out.println(\"The file has been downloaded and is not being shared!\");\n\t\t\t}\n\t\t}\n\t\t// Otherwise, we hit some sort of error. Print to the user and the function will terminate\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Error! : \" + e.getMessage());\n\t\t}\n\t}", "private void requestLiveStreaming() throws IOException {\n\n String targetCamCode = dis.readUTF();\n\n Cam targetCam = CamRegister.findRegisteredCam(targetCamCode);\n\n try {\n DataOutputStream targetDos = new DataOutputStream(targetCam.getCamSocket().getOutputStream());\n\n targetDos.writeInt(LIVE_STREAMING_COMMAND);\n targetDos.writeUTF(camClient.getCamCode());\n targetDos.flush();\n\n dos.writeInt(SUCCESS_CODE);\n dos.flush();\n\n } catch (Exception e) {\n e.printStackTrace();\n dos.writeInt(NOT_FOUND_CODE);\n dos.flush();\n }\n }", "public void DownloadFiles(String url, String deskripsi, String judul) {\n String urlWeb = url;\n\n DownloadManager.Request request = new DownloadManager.Request(Uri.parse(urlWeb.replace(\"https://\", \"http://\")));\n request.setDescription(deskripsi);\n request.setTitle(judul);\n request.allowScanningByMediaScanner();\n request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);\n\n String namaFile = deskripsi + \"_\" + judul + \".mp3\";\n request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, namaFile);\n\n DownloadManager manager = (DownloadManager) getActivity().getSystemService(Context.DOWNLOAD_SERVICE);\n manager.enqueue(request);\n }", "@Override\n public void run() {\n downloadFile(Const.MONITOR_SERVER_ADDRESS, downFilePath);\n }", "public void onDownloadSuccess(String fileInfo);", "private static void readSteamAPI() throws IOException {\n URL oracle = new URL(\"http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key=407CEDDFFC32EE02E865328245752A79&steamid=76561198129178478&include_appinfo=true&format=xml\");\n BufferedReader in = new BufferedReader(new InputStreamReader(oracle.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null){\n if (inputLine.contains(\"<name>\")) {\n String name;\n name = inputLine.replaceAll(\"<name>\", \"\");\n name = name.replaceAll(\"</name>\", \"\");\n if (name.contains(\"&apos;\"))\n name = name.replaceAll(\"&apos;\", \"'\");\n System.out.println(name.trim());\n }\n if (inputLine.contains(\"<playtime_forever>\")) {\n String playtime;\n playtime = inputLine.replaceAll(\"<playtime_forever>\", \"\");\n playtime = playtime.replaceAll(\"</playtime_forever>\", \"\");\n if (playtime.contains(\"&apos;\"))\n playtime = playtime.replaceAll(\"&apos;\", \"'\");\n System.out.println(playtime.trim());\n }\n }\n in.close();\n }", "@Override\n\t\t\t\t\t\tpublic void finish() {\n\t\t\t\t\t\t\tSystem.out.println(\"下载成功\");\n\t\t\t\t\t\t}", "public void downloadSomeEpisodes(ArrayList<Episode> episodesToDownload) throws NoWifiException{\n if (Utils.isDataOn(context)) {\n Intent downloadIntent = new Intent(context, DownloadService.class);\n downloadIntent.setAction(DOWNLOAD_PROVIDED_EPISODES);\n downloadIntent.putParcelableArrayListExtra(DOWNLOAD_EPISODES, episodesToDownload);\n context.startService(downloadIntent);\n } else {\n throw new NoWifiException();\n }\n }", "public java.lang.CharSequence download(java.lang.String appId, java.lang.String url, long duration, java.lang.String folder) throws android.os.RemoteException;", "public static void main(String[] args) throws IOException {\n InputStream mp3 = new FileInputStream(args[0]);\n\n List<byte[]> blocks = new ArrayList<byte[]>();\n SoundStreamHead head = MP3Helper.streamingBlocks(mp3, 30, blocks);\n\n Movie movie = new Movie();\n movie.setFrameRate(30);\n\n Frame f = movie.appendFrame();\n f.setSoundHeader(head);\n\n for (Iterator<byte[]> i = blocks.iterator(); i.hasNext();) {\n byte[] data = i.next();\n f.setSoundData(data);\n f = movie.appendFrame();\n }\n\n movie.write(args[1]);\n }", "public interface DownloadData {\n public void download();\n public String getFileLocation();\n}", "private void DownloadFile(String url){\n ContentManager contentManager = ContentManager.getInstance();\n String fileName = contentManager.getCurrentPlayingSongTitle().trim();\n fileName = TextUtil.removeAccent(fileName);\n fileName += url.substring(url.length()-4, url.length());\n final FileDownloadWorker fileDownloadWorker = new FileDownloadWorker(getContext(), true, this);\n fileDownloadWorker\n .setDialogMessage(getContext().getString(R.string.wait_downloading))\n .setHorizontalProgressbar()\n .setDialogCancelCallback(getContext().getString(R.string.hide), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n fileDownloadWorker.showNotificationProgress();\n }\n });\n fileDownloadWorker.execute(url, fileName);\n }", "void downloadSavi(File file, int id) throws IOException, SQLException;", "public void downloadFile() {\n String path = images.get(viewPager.getCurrentItem()).getFilePath();\n String uRl = \"https://image.tmdb.org/t/p/w500\" + path;\n String name = path.substring(1, 5);\n File direct = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + \"/Cinemato\");\n if (!direct.exists()) {\n direct.mkdirs();\n }\n DownloadManager mgr = (DownloadManager) Objects.requireNonNull(getContext())\n .getSystemService(Context.DOWNLOAD_SERVICE);\n Uri downloadUri = Uri.parse(uRl);\n DownloadManager.Request request = new DownloadManager.Request(\n downloadUri);\n request.setAllowedNetworkTypes(\n DownloadManager.Request.NETWORK_WIFI\n | DownloadManager.Request.NETWORK_MOBILE)\n .setAllowedOverRoaming(false).setTitle(name)\n .setDescription(\"Saved images from Cinemato\")\n .setDestinationInExternalPublicDir(Environment.DIRECTORY_PICTURES + \"/Cinemato\", name + \".jpg\");\n assert mgr != null;\n mgr.enqueue(request);\n // Open Download Manager to view File progress\n Toast.makeText(getContext(), \"Downloading...\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(DownloadManager.ACTION_VIEW_DOWNLOADS));\n }", "void mo54427b(DownloadInfo downloadInfo);", "public static void main(String[] args) throws IOException {\n HttpPageExtractor httpPageExtractor = new HttpPageExtractor();\n Page page = httpPageExtractor.extractPage(\"http://www.obrazki.org/upload/ob_0_33793200_1306404375.JPEG\");\n // new BufferedWriter(new FileWriter(new File(\"C:\\\\Users\\\\Jaras\\\\Desktop\\\\Temporary\\\\obrazek.jpeg\")))\n //Files.write(Paths.get(\"C:\\\\Users\\\\Jaras\\\\Desktop\\\\Temporary\\\\obraze.png\"), page.getBody().getBytes());\n try (InputStream in = URI.create(\"https://demotywatory.pl/uploads/201008/1282322197_by_MACTEP_600.jpg\").toURL().openStream()) {\n Files.copy(in, Paths.get(\"C:\\\\Users\\\\Jaras\\\\Desktop\\\\Temporary\\\\obrazek1.png\"));\n }\n }", "private static void download(File gamedir, String manifest_url, boolean onlyForced, String... forceChecks) {\n try {\n /* old manifest file, doesn't need to be effectively present, checked later */\n File old_manifest_file = new File(gamedir, \"manifest.json\");\n\n /* old (on disk), current (on github), new (will replace old on disk) */\n JsonObject old_manifest = old_manifest_file.exists() ? new JsonParser().parse(new FileReader(old_manifest_file)).getAsJsonObject() : null;\n JsonObject current_manifest = getJsonObject(manifest_url);\n JsonObject new_manifest = new JsonObject();\n\n /* hashes & files arrays from the online json */\n JsonArray current_hashes = current_manifest.get(\"hashes\").getAsJsonArray();\n JsonArray files = new JsonArray();\n\n /* Collects the folders that have something wrong and need update, speeds up time (not looking for every file every time) */\n List<String> toUpdate = getFoldersToUpdate(current_manifest, old_manifest, current_hashes, gamedir);\n\n /* Starts to build the new manifest */\n new_manifest.add(\"hashes\", current_hashes);\n\n log();\n\n /* Looping the files to meet something that needs update */\n current_manifest.get(\"files\").getAsJsonArray().forEach(jsonElement -> {\n JsonObject obj = jsonElement.getAsJsonObject();\n\n /* Removing a folder that is not needed (and maybe harmful for the download/load process) */\n String path = obj.get(\"path\").getAsString().replaceAll(\"forgiacraft2/\", \"\");\n\n /* Getting only the first folder that corresponds to \"mods\", \"config\" or \"forge\" */\n String folder = path.split(\"/\")[0];\n\n if ((onlyForced && Arrays.asList(forceChecks).contains(folder)) || (!onlyForced && toUpdate.contains(folder))) {\n long size = obj.get(\"size\").getAsLong();\n String hash = obj.get(\"hash\").getAsString();\n\n File file = new File(gamedir, path);\n\n /* Initializes forge file since found in the manifest */\n if (obj.get(\"path\").getAsString().contains(\"/forge/\")) {\n forgeFile = file;\n }\n\n if (needsUpdate(file, old_manifest_file, old_manifest, obj, size, hash)) {\n performDownload(path, obj.get(\"download_url\").getAsString(), file);\n }\n\n try {\n //adds to the manifest the json object of the correspondent file downloaded\n files.add(obj);\n\n //removes and rewrites the files JsonArray\n if (new_manifest.get(\"files\") != null) {\n new_manifest.remove(\"files\");\n }\n\n new_manifest.add(\"files\", files);\n\n /* Prints the new manifest to file (performed every file downloaded) */\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n FileUtils.printFile(old_manifest_file, gson.toJson(new_manifest));\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n\n });\n } catch (Exception ex) {\n log(gamedir.getAbsolutePath());\n\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n ex.printStackTrace(pw);\n log(sw.toString());\n ex.printStackTrace();\n }\n }", "protected VideoStream grabResumableVideo(String aUrl, boolean aSupport) {\n\t\tif (aUrl == null) {\n\t\t\tthrow new IllegalArgumentException(\"URL cannot be null\");\n\t\t}\n\t\tif (LOG.isInfoEnabled()) {\n\t\t\tLOG.info(\"Going to download: \" + aUrl);\n\t\t}\n\t\t//\n //GetMethod get = new GetMethod(aUrl);\n\t\tGetMethod get = new GetMethod(\n\t\t\"http://www.youtube.com/get_video?t=vjVQa1PpcFOpSbdtYDqOPeZjv_20w-9jvfd8ZV3PEME=&asv=3&noflv=1&fmt=34&video_id=UY1qYI3oY-0&el=detailpage\"\n\t\t\t\t);\n\t\t\n try {\n \t\tif (!isVideoExists(get)) {\n \t\t\tthrow new DownloadInterruptedException(\"Prolem while getting the video: You entered the wrong URL. \");\n \t\t}\n \t\tInputStream is = get.getResponseBodyAsStream();\n \t\tif (LOG.isDebugEnabled()) {\n \t\t\tLOG.debug(\"URL exists, continue parse response to get the real URL\");\n \t\t\tLOG.debug(\"Start to parse response body\");\n \t\t}\n\t\t\tlong st = System.currentTimeMillis();\n\t\t\tString reqParam[] = parseResponseBody(is);\n\t\t\t//System.out.println(\"takes time : \" + (System.currentTimeMillis() - st) + \"ms.\");\n\t\t\tif (LOG.isDebugEnabled()) {\n\t\t\t\tLOG.debug(\"End parse reposnse body. Takes :\" + (System.currentTimeMillis() - st) + \"ms.\");\n\t\t\t}\n\t\t\tif (reqParam == null) {\n\t\t\t\tthrow new DownloadInterruptedException(\"Prolem while getting the video: \" +\n\t\t\t\t\t\t\"Cannot find required field in afrer reponse. It's not a valid Youtube video URL\");\n\t\t\t}\n\t\t\t\n\t\t\tget.releaseConnection();\n\t\t\t\n\t\t\t//Process the real url here\n\t\t\t//Mmm.. do we need l parameter?\n\t\t\tString newURL = DOWNLOAD_URL_PREFIX + reqParam[0] + \"&t=\" + reqParam[2];\n\t\t\tget = new GetMethod(newURL);\n\t\t\t\n\t\t\t//Example: (rfc2616. Section 14.16)\n\t\t\t//get.addRequestHeader(\"Content-Range\", \"bytes 47104-102400\");\n\t\t\tget.setFollowRedirects(true);\n\t\t\tst = System.currentTimeMillis();\n\t\t\tint responseCode = mHttpClient.executeMethod(get); \n\t\t\t//System.out.println(\"real URL takes time : \" + (System.currentTimeMillis() - st) + \"ms.\");\n\t\t\t//System.out.println(\"--> : \" + get.getResponseContentLength());\n\t\t\tif (HttpURLConnection.HTTP_OK == responseCode) {\n\t\t\t\t//VideoStream vStream = new VideoStream(new HttpStream(get), get.getResponseBodyAsStream()); \n\t\t\t\tVideoStream vStream = \n\t\t\t\t\tnew ControllableBWStream(new HttpStream(get),\n\t\t\t\t\t\t\t\t\t\t\tget.getResponseBodyAsStream(),\n\t\t\t\t\t\t\t\t\t\t\tthis); \n\t\t\t\tvStream.getInformer().addListeners(mListeners);\n\t\t\t\tvStream.setContentLength(get.getResponseContentLength());\n\t\t\t\treturn vStream;\n\t\t\t}else {\n\t\t\t\tthrow new DownloadInterruptedException(\"Prolem while getting the video: Cannot get the real Youtube video URL. \"+ newURL);\n\t\t\t}\n\t\t} catch (HttpException e) {\n\t\t\tthrow new DownloadInterruptedException(\"Problem while getting the video. Message: \" +\n\t\t\t\t\te.getMessage(),e);\n\t\t} catch (IOException ioe) {\n\t\t\tthrow new DownloadInterruptedException(\"Problem while getting the video due to IOException. Message: \" +\n\t\t\t\t\tioe.getMessage(),ioe);\n\t\t} \n\t}", "@SuppressLint(\"NewApi\")\n\t\tpublic S<T> download(String url){\n\t\t \n\t\t// declare the dialog as a member field of your activity\n\t\t\t String fileName = url.substring( url.lastIndexOf('/')+1, url.length() );\n\n\t\t\t \n\t\t \n\t\t //if(!service){\n\t\t\t // instantiate it within the onCreate method\n\t\t\t mProgressDialog = new ProgressDialog(activity);\n\t\t\t mProgressDialog.setMessage(\"Downloading ...\");\n\t\t\t mProgressDialog.setIndeterminate(true);\n\t\t\t mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n\t\t\t mProgressDialog.setCancelable(true);\n\t\t\t \n\t\t\t mProgressDialog.show(); \n\t\t\t Intent intent = new Intent(activity, DownloadService.class);\n\t\t\t intent.putExtra(\"url\", url);\n\t\t\t intent.putExtra(\"filename\", fileName);\n\t\t\t intent.putExtra(\"receiver\", new DownloadReceiver(new Handler()));\n\t\t\t activity.startService(intent);\n\t\t\t \n\t\t return this;\n\t }", "public String getSourceDownloadUrl();", "public void getitem(Writer bwout, File item) throws Exception {\n \tFileAuthInfo i = (FileAuthInfo) item.getAuthInfo();\n HttpResponse response = client.get(new URI(config.itemurl()+\"/\"+i.itemID+\"/\"+i.fileName+\"?token=\"+i.authToken));\n this.read_http_entity(response.getEntity(), bwout);\n }", "@Override\n protected void startDownload(ArrayList<Uri> urls) {\n // Start the Gallery Activity with the Uri(s) passed in.\n // TODO - you fill in here.\n startActivity(GalleryActivity.makeStartIntent(this, urls));\n\t\t\n }", "entities.Torrent.DownloadResponse getDownloadResponse();", "private void sendIntent(Download download) {\n }", "void mo54426b(int i, List<DownloadChunk> list);", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tint position = (Integer) v.getTag();\n\t\t\t\tGameInfoitem item = list.get(position);\n\t\t\t\tint status = item.download_state;\n\t\t\t\tswitch (status) {\n\t\t\t\tcase DownloadManager.STATUS_NORMAL:\n\t\t\t\t\tstartDownload(item.url);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DownloadManager.STATUS_FAILED:\n\t\t\t\t\tmDownloadManager.restartDownload(item.id);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DownloadManager.STATUS_PAUSED:\n\t\t\t\t\tmDownloadManager.resumeDownload(item.id);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DownloadManager.STATUS_PENDING:\n\t\t\t\tcase DownloadManager.STATUS_RUNNING:\n\t\t\t\t\tmDownloadManager.pauseDownload(item.id);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DownloadManager.STATUS_SUCCESSFUL:\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\tnotifyDataSetChanged();\n\t\t\t}", "@Test\n public void rawAsset() throws Exception {\n try (\n final MkContainer container = new MkGrizzlyContainer().next(\n new MkAnswer.Simple(HttpURLConnection.HTTP_OK, \"\")\n ).start(this.resource.port());\n ) {\n final RtReleaseAsset asset = new RtReleaseAsset(\n new ApacheRequest(container.home()),\n release(),\n 4\n );\n final InputStream stream = asset.raw();\n final MkQuery query = container.take();\n MatcherAssert.assertThat(\n query.method(), Matchers.equalTo(Request.GET)\n );\n MatcherAssert.assertThat(\n IOUtils.toString(stream, StandardCharsets.UTF_8),\n Matchers.notNullValue()\n );\n container.stop();\n }\n }", "protected abstract File download(Exception previousException) throws Exception;", "public static void main(String[] args) throws Exception {\n List<String> files = Lists.newArrayList(\n \"https://s3.amazonaws.com/nutriscopedata/ndbid-mfgorfoodgroup.tsv\",\n \"https://s3.amazonaws.com/nutriscopedata/ndbid-name.tsv\");\n\n OkHttpClient client = new OkHttpClient();\n\n Request request;\n Response response;\n for (String file: files) {\n request = new Request.Builder()\n .url(file)\n .build();\n\n response = client.newCall(request).execute();\n\n OutputStream out = new FileOutputStream(outputPath + getFilename(file));\n InputStream in = response.body().byteStream();\n\n try {\n ByteStreams.copy(in, out);\n\n }\n finally {\n response.close();\n out.flush();\n\n }\n }\n }", "public interface DownloadListener {\n void onStart(String url,String savePath);\n void onProgress(String url, String savePath,long progress,long max);\n void onComplete(String url,String savePath);\n void onCancel(String url,String savePath);\n void onFail(String url,String savePath);\n\n // boolean isCanceled(String url,String savePath);\n String generalFileName(String url);\n long getMax(String url,String savePath);\n long getAvailable(String url,String savePath);\n}", "public String a(Context var1_1, URL var2_2, String var3_3, a var4_4) {\n block39 : {\n block41 : {\n block44 : {\n block43 : {\n block46 : {\n block45 : {\n block38 : {\n var5_5 = new StringBuilder();\n var5_5.append(\"Downloading video from \");\n var5_5.append((Object)var2_2);\n g.a(\"StartAppWall.ProgressiveVideoManager\", 3, var5_5.toString());\n this.c = var2_2.toString();\n this.a = true;\n var8_6 = com.startapp.android.publish.adsCommon.b.a().H().l();\n var21_7 = h.a(var1_1, var3_3);\n var22_8 = new File(var21_7);\n var23_9 = var22_8.exists();\n if (!var23_9) break block38;\n try {\n this.c = null;\n null.close();\n null.close();\n null.close();\n return var21_7;\n }\n catch (Exception v0) {}\n return var21_7;\n }\n var24_10 = var2_2.openConnection();\n var24_10.connect();\n var25_11 = var24_10.getContentLength();\n var12_12 = var24_10.getInputStream();\n var13_13 = new DataInputStream(var12_12);\n try {\n var26_14 = new byte[4096];\n var27_15 = new StringBuilder();\n var27_15.append(var3_3);\n var27_15.append(\".temp\");\n var11_16 = var27_15.toString();\n var30_17 = new StringBuilder();\n var30_17.append(var21_7);\n var30_17.append(\".temp\");\n var33_18 = var30_17.toString();\n var10_19 = var1_1.openFileOutput(var11_16, 0);\n var34_20 = 0;\n var35_21 = false;\n var36_22 = 0;\n }\n catch (Throwable var15_39) {\n var10_19 = null;\n break block44;\n }\nlbl45: // 2 sources:\n do {\n block40 : {\n var37_23 = var13_13.read(var26_14);\n if (var37_23 <= 0) break block39;\n var38_24 = var21_7;\n if (!this.a) break block40;\n var10_19.write(var26_14, 0, var37_23);\n var43_25 = var34_20 + var37_23;\n var44_26 = var22_8;\n var45_27 = var43_25;\n Double.isNaN((double)var45_27);\n var48_28 = var45_27 * 100.0;\n var50_29 = var26_14;\n var51_30 = var25_11;\n Double.isNaN((double)var51_30);\n var54_31 = (int)(var48_28 / var51_30);\n if (var54_31 >= var8_6) {\n if (!var35_21 && var4_4 != null) {\n this.a(var4_4, var33_18);\n var35_21 = true;\n }\n if (var54_31 >= var36_22 + 1) {\n this.a(var54_31);\n var36_22 = var54_31;\n }\n }\n break block41;\n }\nlbl73: // 2 sources:\n do {\n block42 : {\n var39_32 = var22_8;\n if (this.a || var37_23 <= 0) break block42;\n g.a(\"StartAppWall.ProgressiveVideoManager\", 3, \"Video downloading disabled\");\n new File(h.a(var1_1, var11_16)).delete();\n try {\n this.c = null;\n var12_12.close();\n var13_13.close();\n var10_19.close();\n return \"downloadInterrupted\";\n }\n catch (Exception v1) {}\n return \"downloadInterrupted\";\n }\n this.a(var1_1, new File(h.a(var1_1, var11_16)), var39_32);\n try {\n this.c = null;\n var12_12.close();\n var13_13.close();\n var10_19.close();\n return var38_24;\n }\n catch (Exception v2) {}\n return var38_24;\n catch (Exception var9_33) {\n break block43;\n }\n break;\n } while (true);\n break;\n } while (true);\n {\n catch (Exception var9_34) {\n var10_19 = null;\n break block43;\n }\n }\n {\n catch (Exception var9_35) {\n var10_19 = null;\n var11_16 = null;\n break block43;\n }\n }\n catch (Throwable var15_40) {\n break block45;\n }\n catch (Exception var9_36) {\n var10_19 = null;\n var11_16 = null;\n break block46;\n }\n catch (Throwable var15_41) {\n var12_12 = null;\n }\n }\n var10_19 = null;\n var13_13 = null;\n break block44;\n catch (Exception var9_37) {\n var10_19 = null;\n var11_16 = null;\n var12_12 = null;\n }\n }\n var13_13 = null;\n }\n var14_44 = new StringBuilder();\n var14_44.append(\"Error downloading video from \");\n var14_44.append((Object)var2_2);\n g.a(\"StartAppWall.ProgressiveVideoManager\", 6, var14_44.toString(), (Throwable)var9_38);\n new File(h.a(var1_1, var11_16)).delete();\n try {\n this.c = null;\n var12_12.close();\n var13_13.close();\n var10_19.close();\n return null;\n }\n catch (Exception v3) {}\n return null;\n catch (Throwable var15_43) {\n // empty catch block\n }\n }\n try {\n this.c = null;\n var12_12.close();\n var13_13.close();\n var10_19.close();\n throw var15_42;\n }\n catch (Exception v4) {}\n throw var15_42;\n }\n var22_8 = var44_26;\n var21_7 = var38_24;\n var26_14 = var50_29;\n var34_20 = var43_25;\n ** while (true)\n }\n var38_24 = var21_7;\n ** while (true)\n }\n\n public void a(c.c c2) {\n this.b = c2;\n }\n\n public void a(String string) {\n if (string != null && string.equals((Object)this.c)) {\n this.a = false;\n }\n }\n\n public boolean b(String string) {\n return string != null && string.endsWith(\".temp\");\n }\n\n public void c(String string) {\n if (this.b(string)) {\n new File(string).delete();\n }\n }\n\n public static interface a {\n public void a(String var1);\n }\n\n private static class b {\n private static final c a = new c();\n }\n\n}", "public void editDownload(final ContentDatum contentDatum,\n final Action1<UserVideoDownloadStatus> resultAction1, boolean add) {\n downloadContentDatumAfterPermissionGranted = null;\n downloadResultActionAfterPermissionGranted = null;\n\n //Send Firebase Analytics when user is subscribed and user is Logged In\n sendFirebaseLoginSubscribeSuccess();\n\n if (!hasWriteExternalStoragePermission()) {\n requestDownloadQualityScreen = false;\n askForPermissionToDownloadToExternalStorage(true,\n contentDatum,\n resultAction1);\n } else if (!isMemorySpaceAvailable()) {\n showDialog(DialogType.DOWNLOAD_FAILED, currentActivity.getString(R.string.app_cms_download_failed_error_message), false, null, null);\n //Log.w(TAG, currentActivity.getString(R.string.app_cms_download_failed_error_message));\n } else {\n if (downloadQueueThread != null) {\n DownloadQueueItem downloadQueueItem = new DownloadQueueItem();\n downloadQueueItem.contentDatum = contentDatum;\n downloadQueueItem.resultAction1 = resultAction1;\n downloadQueueItem.isDownloadedFromOther = isVideoDownloadedByOtherUser(contentDatum.getGist().getId());\n downloadQueueThread.addToQueue(downloadQueueItem);\n if (!downloadQueueThread.running()) {\n downloadQueueThread.start();\n }\n }\n\n String downloadURL;\n long file_size = 0L;\n try {\n downloadURL = getDownloadURL(contentDatum);\n URL url = new URL(downloadURL);\n URLConnection urlConnection = url.openConnection();\n urlConnection.connect();\n //file_size =urlConnection.getContentLength(); // some of the video url length value go over the max limit of int for 720p rendition\n file_size = Long.parseLong(urlConnection.getHeaderField(\"content-length\"));\n file_size = ((file_size / 1000) / 1000);\n\n } catch (Exception e) {\n //Log.e(TAG, \"Error trying to download: \" + e.getMessage());\n }\n if (isVideoDownloadedByOtherUser(contentDatum.getGist().getId())) {\n createLocalCopyForUser(contentDatum, resultAction1);\n } else if (getMegabytesAvailable() > file_size) {\n try {\n startDownload(contentDatum,\n resultAction1);\n// startNextDownload = false;\n } catch (Exception e) {\n\n }\n } else {\n currentActivity.runOnUiThread(() -> showDialog(DialogType.DOWNLOAD_FAILED, currentActivity.getString(R.string.app_cms_download_failed_error_message), false, null, null));\n }\n }\n }", "void downloadModis(File file, ModisProduct product, int id) throws IOException, SQLException;", "private void downloadQuranImages(boolean force){\n // if any broadcasts were received, then we are already downloading\n // so unless we know what we are doing (via force), don't ask the\n // service to restart the download\n if (mDownloadReceiver != null &&\n mDownloadReceiver.didReceieveBroadcast() && !force){ return; }\n if (mIsPaused){ return; }\n\n QuranScreenInfo qsi = QuranScreenInfo.getInstance();\n \n String url;\n if (mNeedPortraitImages && !mNeedLandscapeImages){\n // phone (and tablet when upgrading on some devices, ex n10)\n url = QuranFileUtils.getZipFileUrl();\n }\n else if (mNeedLandscapeImages && !mNeedPortraitImages){\n // tablet (when upgrading from pre-tablet on some devices, ex n7).\n url = QuranFileUtils.getZipFileUrl(qsi.getTabletWidthParam());\n }\n else {\n // new tablet installation - if both image sets are the same\n // size, then just get the correct one only\n if (qsi.getTabletWidthParam().equals(qsi.getWidthParam())){\n url = QuranFileUtils.getZipFileUrl();\n }\n else {\n // otherwise download one zip with both image sets\n String widthParam = qsi.getWidthParam() +\n qsi.getTabletWidthParam();\n url = QuranFileUtils.getZipFileUrl(widthParam);\n }\n }\n\n // if we have a patch url, just use that\n if (!TextUtils.isEmpty(mPatchUrl)){\n url = mPatchUrl;\n }\n\n String destination = QuranFileUtils.getQuranBaseDirectory(\n QuranDataActivity.this);\n \n // start service\n Intent intent = ServiceIntentHelper.getDownloadIntent(this, url,\n destination, getString(R.string.app_name), PAGES_DOWNLOAD_KEY,\n QuranDownloadService.DOWNLOAD_TYPE_PAGES);\n \n if (!force){\n // handle race condition in which we missed the error preference and\n // the broadcast - if so, just rebroadcast errors so we handle them\n intent.putExtra(QuranDownloadService.EXTRA_REPEAT_LAST_ERROR, true);\n }\n\n startService(intent);\n }", "public void start() {\n\n String pathFile = mainMenu.menuTakePathFile();\n int countThreads = mainMenu.menuCountThreads();\n int downloadSpeed = mainMenu.menuDownloadSpeed();\n String folderForDownload = mainMenu.menuPathDownload();\n\n List<String> urls = null;\n try {\n urls = bootPreparation.parsingFileForUrls(pathFile);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n List<String> fileNames = bootPreparation.parsingListUrlsForNames(urls);\n\n multiThreadedDownloader.startDownloading(countThreads, urls.size(), urls, fileNames, downloadSpeed, folderForDownload);\n\n }", "private void updateDownloadUrls() {\n VideoData videoData = VideoHelper.getFullData(getContentResolver(), mVideoId);\n if (!videoData.isOnAir()) {\n if (ZypeConfiguration.isDownloadsEnabled(this)\n && (ZypeConfiguration.isDownloadsForGuestsEnabled(this) || SettingsProvider.getInstance().isLoggedIn())) {\n getDownloadUrls(mVideoId);\n }\n }\n }", "void download(SearchResult result, String downloadPath);", "public void runMultiWebcam()\n\t{\n\t\tString pipeline=\"gst-launch-1.0 -v v4l2src device=\"+webcamSource+\" ! 'video/x-raw,width=640,height=480' ! x264enc pass=qual quantizer=20 tune=zerolatency ! rtph264pay ! multiudpsink clients=\"+client.getInetAddress().getHostAddress()+\":\"+port1+\",\"+client.getInetAddress().getHostAddress()+\":\"+port2;\n\n\t\tString[] args1 = new String[] {\"/bin/bash\", \"-c\", pipeline+\">src/output.txt\"};\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tProcess proc = new ProcessBuilder(args1).start();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tThread.sleep(2000);\n\t\t} catch (InterruptedException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n normalDownload(finalBitmap,input.getText()+\"\");\n }", "URL getStreamURL() throws IOException;", "private void downloadContent(){\n try {\n URL yahoo = new URL( \"http://api.letsleapahead.com/LeapAheadMultiFreindzy/index.php?action=getLang&langCode=EN&langId=1&appId=6\");\n BufferedReader in = new BufferedReader(\n new InputStreamReader(yahoo.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null)\n Log.e(\"TAG\" , inputLine);\n in.close();\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }", "public CompletionStage<Result> download()\n {\n IRequestValidator requestValidator=new CertDownloadRequestValidator();\n return handleRequest(request(),requestValidator, JsonKeys.CERT_DOWNLOAD);\n }", "@Override\n public void run() {\n downloadInfo.state = STATE_DOWNLOADING;\n notifyStateChange(downloadInfo);\n\n //6.specific download, two kinds of education\n // re-download and resume downloads\n Request request;\n File file = new File(downloadInfo.path);\n if (!file.exists() || file.length() != downloadInfo.currentLength) {\n //file is not exists, or file size in downloadInfo saved inconsistent\n //the file is invalid\n file.delete();\n downloadInfo.currentLength = 0;\n\n //need to re-download\n String url = String.format(Url.APP_DOWNLOAD, downloadInfo.downloadUrl);\n request = new Request.Builder().url(url).build();\n } else {\n //need to resume download\n String url = String.format(Url.APP_BREAK_DOWNLOAD, downloadInfo.downloadUrl, downloadInfo.currentLength);\n request = new Request.Builder().url(url).build();\n }\n\n Response response = null;\n InputStream is = null;\n FileOutputStream fos = null;\n\n try {\n response = okHttpClient.newCall(request).execute();\n is = response.body().byteStream();\n\n if (response != null && is != null) {\n fos = new FileOutputStream(file, true);\n\n byte[] buffer = new byte[1024 * 8];\n int len = -1;\n while ((len = is.read(buffer)) != -1 && downloadInfo.state == STATE_DOWNLOADING) {\n fos.write(buffer, 0, len);\n fos.flush();\n\n downloadInfo.currentLength = downloadInfo.currentLength + len;\n notifyProgressChange(downloadInfo);\n }\n } else {\n //the server return an error\n downloadInfo.state = STATE_ERROR;\n downloadInfo.currentLength = 0;\n file.delete();\n notifyStateChange(downloadInfo);\n }\n\n\n } catch (IOException e) {\n e.printStackTrace();\n\n downloadInfo.state = STATE_ERROR;\n downloadInfo.currentLength = 0;\n file.delete();\n notifyStateChange(downloadInfo);\n } finally {\n try {\n fos.close();\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //handle the case did not come here,there are has three situation\n //1.download finish 2.download error 3.download pause\n if (file.length() == downloadInfo.currentLength && downloadInfo.state == STATE_DOWNLOADING) {\n //说明下载完成\n downloadInfo.state = STATE_FINISH;\n notifyStateChange(downloadInfo);\n } else if (downloadInfo.state == STATE_PAUSE) {\n notifyStateChange(downloadInfo);\n } else {\n downloadInfo.state = STATE_ERROR;\n downloadInfo.currentLength = 0;\n file.delete();\n notifyStateChange(downloadInfo);\n }\n\n //requires runnable is removed from the current from downloadTaskMap at the end of the task\n downloadTaskMap.remove(downloadInfo.id);\n }", "@Override\n public void onClick(View view) {\n switch (view.getId()) {\n case R.id.downloadPdf:\n if (isConnectingToInternet()){\n Toast.makeText(getApplicationContext(), \"it's me\", Toast.LENGTH_SHORT).show();\n new DownloadTask(MainActivity.this, downloadPdf, Utils.downloadPdfUrl);\n }\n else\n Toast.makeText(MainActivity.this, \"Oops!! There is no internet connection. Please enable internet connection and try again.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.downloadDoc:\n if(isStoragePermissionGranted()){\n\n }\n if (isConnectingToInternet())\n new DownloadTask(MainActivity.this, downloadDoc, Utils.downloadDocUrl);\n else\n Toast.makeText(MainActivity.this, \"Oops!! There is no internet connection. Please enable internet connection and try again.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.downloadZip:\n if (isConnectingToInternet())\n new DownloadTask(MainActivity.this, downloadZip, Utils.downloadZipUrl);\n else\n Toast.makeText(MainActivity.this, \"Oops!! There is no internet connection. Please enable internet connection and try again.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.downloadVideo:\n if (isConnectingToInternet())\n new DownloadTask(MainActivity.this, downloadVideo, Utils.downloadVideoUrl);\n else\n Toast.makeText(MainActivity.this, \"Oops!! There is no internet connection. Please enable internet connection and try again.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.downloadMp3:\n if (isConnectingToInternet())\n new DownloadTask(MainActivity.this, downloadMp3, Utils.downloadMp3Url);\n else\n Toast.makeText(MainActivity.this, \"Oops!! There is no internet connection. Please enable internet connection and try again.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.openDownloadedFolder:\n openDownloadedFolder();\n break;\n case R.id.go_to_downlaod:\n Intent i = new Intent(MainActivity.this, DownloadActivity.class);\n startActivity(i);\n break;\n\n }\n }", "public void grabVideo(String aUrl, String aFileName) {\n\t\tVideoStream vs = null;\n\t\ttry {\n\t\t\tFile f = new File(aFileName);\n\t\t\tFileOutputStream fos = \n\t\t\t\tnew FileOutputStream(f,(f.exists() && isDownloadResumable()));\n\t\t\tvs = grabResumableVideo(aUrl,true);\n\t\t\tif (vs == null) {\n\t\t\t\tthrow new DownloadInterruptedException(\"Problem while getting the video due to VideoStream is null\"); \n\t\t\t}\n\t\t\t//More than 4Kbps make buffer to 4k\n\t\t\tint sz = getCurrentLimit() > 4 ? (2*BUFFER_SIZE) : BUFFER_SIZE;\n\t\t\tbyte buff[] = new byte[sz];\n\t\t\tint read;\n\t\t\twhile((read = vs.read(buff)) >= 0){\n\t\t\t\tfos.write(buff, 0, read);\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// File not found? :p\n\t\t\te.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tthrow new DownloadInterruptedException(\"Problem while getting the video due to IOException. Message: \" +\n\t\t\t\t\tioe.getMessage(),ioe);\n\t\t} finally {\n\t\t\tif (vs != null) {\n\t\t\t\tvs.close();\n\t\t\t}\n\t\t}\n\t}", "void mo54414a(int i, List<DownloadChunk> list);", "@Override\n public void prepare() {\n //Caching as file resource.\n File file = this.getResource().file;\n logger.info(\"Preparing {} streams for file: {}\", this.getTransferType(), file.getName());\n\n if (this.getTransferType() == ResourceTransferType.OUTBOUND) {\n //Sending\n try {\n buffer = new byte[BUFFER_SIZE];\n sent = 0;\n inputChannel = new FileInputStream(file).getChannel();\n inputBuffer = inputChannel.map(FileChannel.MapMode.READ_ONLY, 0, inputChannel.size());\n } catch (FileNotFoundException e) { //File doesn't exist.\n //Calling a transfer error.\n callError(e);\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else {\n //Receiving\n //Checking if file already exists.\n written = 0;\n saved = 0;\n if (getResource().isLocal()) {\n getResource().calcNetworkId();\n if (getResource().getNetworkID().equals(getTunnel().getDestination())) {\n //The file is already stored locally.\n getTunnel().sendMessage(new ResourceTransferControlMessage(this.getTransferId(), -2));\n this.close();\n return;\n }\n }\n\n //Creating or replacing the file.\n buffer = new byte[BUFFER_SIZE * 16];\n if (file.exists()) {\n file.delete();\n }\n try { //Creating new file.\n file.createNewFile();\n outputStream = new FileOutputStream(file);\n } catch (IOException e) {\n //Calling a transfer error.\n callError(e);\n return;\n }\n\n //Requesting the first chunk.\n getTunnel().sendMessage(new ResourceTransferControlMessage(this.getTransferId(), 0));\n }\n }", "private void receive() throws IOException {\n byte[] lengthBuffer = new byte[4];\n dataInput.readFully(lengthBuffer);\n int length = Utilities.getIntFromByte(lengthBuffer, 0);\n pipedOutputStream.write(Utilities.getBytes(length));\n\n //now read the data indicated by length and write it to buffer\n byte[] buffer = new byte[length];\n dataInput.readFully(buffer);\n pipedOutputStream.write(buffer);\n pipedOutputStream.flush();\n clientBlocker();\n }", "@GET\n @Path(\"{filename}\")\n @Produces(MediaType.APPLICATION_OCTET_STREAM)\n public Response show(@PathParam(\"filename\") String filename) {\n ArrayList<String> serversClone = new ArrayList<>();\n this.cm.getServers().forEach(server -> {\n serversClone.add(server);\n });\n while (!serversClone.isEmpty()) {\n String selectedServer = this.cm.getServer();\n serversClone.remove(selectedServer);\n try{\n String endpoint = \"http://\" + selectedServer\n + \"/WebService/webresources/files\";\n URL url = new URL(endpoint + \"/\" + filename);\n String methodType = \"GET\";\n HttpURLConnection urlConnection = (HttpURLConnection) \n url.openConnection();\n urlConnection.setRequestMethod(methodType);\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\n \"Content-type\", MediaType.APPLICATION_OCTET_STREAM\n );\n urlConnection.setRequestProperty(\n \"Accept\", MediaType.APPLICATION_OCTET_STREAM\n );\n int httpResponseCode = urlConnection.getResponseCode();\n if (httpResponseCode == HttpURLConnection.HTTP_OK) {\n return Response.ok(urlConnection.getInputStream()).build();\n } else {\n if (serversClone.isEmpty()) {\n return Response\n .status(httpResponseCode).build();\n }\n }\n } catch (IOException e) {\n System.err.println(e);\n return Response.serverError().build();\n }\n }\n return Response.status(HttpURLConnection.HTTP_UNAVAILABLE).build();\n }", "@Override\r\n protected void onPreExecute() {\r\n super.onPreExecute();\r\n System.out.println(\"Starting download\");\r\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (mDownloadedFileID == -1)\n return;\n Toast.makeText(getApplicationContext(), getString(R.string.atom_ui_tip_download_success), //To notify the Client that the file is being downloaded\n Toast.LENGTH_LONG).show();\n QunarWebActvity.this.finish();\n }", "MovilizerRequest prepareDownloadRequest(Long systemId, String password, Integer numResponses,\n MovilizerRequest request);", "public static void vu0DownloadData(int index, byte[] data) { }", "public void DownloadFromUrl(Context ctx) {\n\t\ttry {\r\n\t\t\tURL url = new URL(link);\r\n\t\t\tString root = Environment.getExternalStorageDirectory().toString();\r\n\t\t\tif (type.contentEquals(\"image\")) {\r\n\t\t\t\tFile myDir = new File(root + Constants.APP_FOLDER_IMG);\r\n\t\t\t\tmyDir.mkdirs();\r\n\t\t\t\tString fname = name;\r\n\t\t\t\tFile file = new File(myDir, fname);\r\n\t\t\t\tif (file.exists())\r\n\t\t\t\t\tfile.delete();\r\n\t\t\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\t\tLog.d(\"ImageManager\", \"download begining\");\r\n\t\t\t\tString url1 = url.toString().replaceAll(\" \", \"%20\");\r\n\t\t\t\turl = new URL(url1);\r\n\t\t\t\tLog.d(\"ImageManager\", \"download url:\" + url);\r\n\t\t\t\tLog.d(\"ImageManager\", \"downloaded file name:\");\r\n\t\t\t\t/* Open a connection to that URL. */\r\n\t\t\t\tURLConnection ucon = url.openConnection();\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Define InputStreams to read from the URLConnection.\r\n\t\t\t\t */\r\n\t\t\t\tInputStream is = ucon.getInputStream();\r\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(is);\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Read bytes to the Buffer until there is nothing more to\r\n\t\t\t\t * read(-1).\r\n\t\t\t\t */\r\n\t\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(50);\r\n\t\t\t\tint current = 0;\r\n\t\t\t\twhile ((current = bis.read()) != -1) {\r\n\t\t\t\t\tbaf.append((byte) current);\r\n\t\t\t\t\tif (cancel)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Convert the Bytes read to a String. */\r\n\t\t\t\tif (!cancel) {\r\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\t\t\t\t\tfos.write(baf.toByteArray());\r\n\t\t\t\t\tfos.close();\r\n\t\t\t\t\tLog.d(\"ImageManager\",\r\n\t\t\t\t\t\t\t\"download ready in\"\r\n\t\t\t\t\t\t\t\t\t+ ((System.currentTimeMillis() - startTime) / 1000)\r\n\t\t\t\t\t\t\t\t\t+ \" sec\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\telse if (type.contentEquals(\"award\")) {\r\n\t\t\t\t\r\n\t\t\t\tLog.e(\"download\",\" award here\");\r\n\t\t\t\t//TODO download files here\r\n\t\t\t\t Log.e(\"name\",name);\r\n\t\t\t\t Log.e(\"link\",link);\r\n\t\t\t\r\n\t\t\t\tFile file = new File(name);\r\n\t\t\t\tif (file.exists())\r\n\t\t\t\t\tfile.delete();\r\n\t\t\t\tURLConnection ucon = url.openConnection();\r\n\t\t\t\tInputStream is = ucon.getInputStream();\r\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(\r\n\t\t\t\t\t\tis);\r\n\t\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(50);\r\n\t\t\t\tint current = 0;\r\n\t\t\t\twhile ((current = bis.read()) != -1) {\r\n\t\t\t\t\tif(cancel) break;\r\n\t\t\t\t\tbaf.append((byte) current);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\t\t\t\tfos.write(baf.toByteArray());\r\n\t\t\t\tfos.close();\r\n\t\t\t\tif(cancel) file.delete();\r\n\r\n\t\t\t}\r\n\t\t\telse if (type.contentEquals(\"video\")) {\r\n\r\n\t\t\t\tFile myDir = new File(root + Constants.APP_FOLDER_VIDEO);\r\n\t\t\t\tmyDir.mkdirs();\r\n\t\t\t\tString fname = name;\r\n\t\t\t\t// Log.v(\"fname\",fname);\r\n\t\t\t\tFile file = new File(myDir, fname);\r\n\t\t\t\tif (file.exists())\r\n\t\t\t\t\tfile.delete();\r\n\t\t\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\t\tString url1 = url.toString().replaceAll(\" \", \"%20\");\r\n\t\t\t\turl = new URL(url1);\r\n\t\t\t\tLog.d(\"ImageManager\", \"download begining\");\r\n\t\t\t\tLog.d(\"ImageManager\", \"download url:\" + url);\r\n\t\t\t\tLog.d(\"ImageManager\", \"downloaded file name:\");\r\n\t\t\t\t/* Open a connection to that URL. */\r\n\t\t\t\tURLConnection ucon = url.openConnection();\r\n\t\t\t\t/*\r\n\t\t\t\t * Define InputStreams to read from the URLConnection.\r\n\t\t\t\t */\r\n\t\t\t\tInputStream is = ucon.getInputStream();\r\n\t\t\t\t// bookmarkstart\r\n\t\t\t\t/*\r\n\t\t\t\t * Read bytes to the Buffer until there is nothing more to\r\n\t\t\t\t * read(-1) and write on the fly in the file.\r\n\t\t\t\t */\r\n\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\t\t\t\tfinal int BUFFER_SIZE = 25 * 1024;\r\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(is,\r\n\t\t\t\t\t\tBUFFER_SIZE);\r\n\t\t\t\tbyte[] baf = new byte[BUFFER_SIZE];\r\n\t\t\t\tint actual = 0;\r\n\t\t\t\twhile (actual != -1) {\r\n\t\t\t\t\tfos.write(baf, 0, actual);\r\n\t\t\t\t\tactual = bis.read(baf, 0, BUFFER_SIZE);\r\n\t\t\t\t\tif (cancel) {\r\n\t\t\t\t\t\tfile.delete();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfos.close();\r\n\r\n\t\t\t\t// bookmarkend\r\n\t\t\t\tLog.d(\"ImageManager\",\r\n\t\t\t\t\t\t\"download ready in\"\r\n\t\t\t\t\t\t\t\t+ ((System.currentTimeMillis() - startTime) / 1000)\r\n\t\t\t\t\t\t\t\t+ \" sec\");\r\n\r\n\t\t\t\tString link = root + Constants.APP_FOLDER_IMG + name;\r\n\r\n\t\t\t}\r\n\t\t\telse if (type.contentEquals(\"audio\")) {\r\n\t\t\t\tLog.v(\"training\", \"in audio\");\r\n\r\n\t\t\t\tFile myDir = new File(Environment.getExternalStorageDirectory()\r\n\t\t\t\t\t\t.getAbsolutePath() + Constants.APP_FOLDER_AUDIO);\r\n\t\t\t\tmyDir.mkdirs();\r\n\t\t\t\tString fname = name;\r\n\r\n\t\t\t\tFile file = new File(myDir, fname);\r\n\t\t\t\tif (file.exists())\r\n\t\t\t\t\tfile.delete();\r\n\r\n\t\t\t\t// long startTime = System.currentTimeMillis();\r\n\t\t\t\tString url1 = url.toString().replaceAll(\" \", \"%20\");\r\n\t\t\t\turl = new URL(url1);\r\n\r\n\t\t\t\tURLConnection ucon = url.openConnection();\r\n\r\n\t\t\t\tInputStream is = ucon.getInputStream();\r\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(is);\r\n\r\n\t\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(50);\r\n\t\t\t\tint current = 0;\r\n\t\t\t\twhile ((current = bis.read()) != -1) {\r\n\t\t\t\t\tbaf.append((byte) current);\r\n\t\t\t\t\tif (cancel)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Convert the Bytes read to a String. */\r\n\t\t\t\tif (!cancel) {\r\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\t\t\t\t\tfos.write(baf.toByteArray());\r\n\t\t\t\t\tfos.close();\r\n\t\t\t\t}\r\n\r\n\t\t\t}// end of audio\r\n\t\t\telse{\r\n\t\t\t\ttry {\r\n\t\t\t\t\turl = new URL(link);\r\n\t\t\t\t\troot = Environment\r\n\t\t\t\t\t\t\t.getExternalStorageDirectory()\r\n\t\t\t\t\t\t\t.toString();\r\n\t\t\t\t\tLog.v(\"type is \", type.toString());\r\n\r\n\t\t\t\t\tString foldername = \"\";\r\n\t\t\t\t\tif (type.contentEquals(\"pdf\"))\r\n\t\t\t\t\t\tfoldername = activity.getString(R.string.pdf);\r\n\t\t\t\t\telse if (type.contentEquals(\"ppt\"))\r\n\t\t\t\t\t\tfoldername = activity.getString(R.string.ppt);\r\n\t\t\t\t\telse if (type.contentEquals(\"doc\"))\r\n\t\t\t\t\t\tfoldername = activity.getString(R.string.doc);\r\n\t\t\t\t\telse if (type.contentEquals(\"xls\"))\r\n\t\t\t\t\t\tfoldername = activity.getString(R.string.xls);\r\n\t\t\t\t\telse if (type.contentEquals(\"video\"))\r\n\t\t\t\t\t\tfoldername = \"mobcast_videos\";\r\n\t\t\t\t\telse if (type.contentEquals(\"audio\"))\r\n\t\t\t\t\t\tfoldername = \"mobcast_audio\";\r\n\r\n\t\t\t\t\tFile myDir = new File(root + Constants.APP_FOLDER\r\n\t\t\t\t\t\t\t+ foldername);\r\n\r\n\t\t\t\t\tString fname = ename;\r\n\r\n\t\t\t\t\tmyDir.mkdirs();\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\tFile file = new File(myDir, fname);\r\n\t\t\t\t\tif (file.exists())\r\n\t\t\t\t\t\tfile.delete();\r\n\t\t\t\t\tURLConnection ucon = url.openConnection();\r\n\t\t\t\t\tInputStream is = ucon.getInputStream();\r\n\t\t\t\t\tBufferedInputStream bis = new BufferedInputStream(\r\n\t\t\t\t\t\t\tis);\r\n\t\t\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(50);\r\n\t\t\t\t\tint current = 0;\r\n\t\t\t\t\twhile ((current = bis.read()) != -1) {\r\n\t\t\t\t\t\tbaf.append((byte) current);\r\n\t\t\t\t\t\tif(cancel) break;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\r\n\t\t\t\t\t\t\tfile);\r\n\t\t\t\t\tfos.write(baf.toByteArray());\r\n\t\t\t\t\tfos.close();\r\n\t\t\t\t\t\tif(cancel) file.delete();\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\tLog.d(\"ImageManager\", \"Error: \" + e);\r\n\t\t}\r\n\r\n\t}", "@Test\n public void contextLoads() {\n StringBuffer url = new StringBuffer(\"http://172.17.14.68:8081/nexus/content/groups/public/io/reactivex/rxjava2/rxandroid/2.0.1/rxandroid-2.0.1-sources.jar\");\n int position = url.indexOf(BASE_URL) + BASE_URL.length();\n url.delete(0, position);\n\n InputStream in = null;\n OutputStream out = null;\n int downloadRet = 0;\n try {\n String filePath = BASE_PATH + url.toString();\n File repoFile = new File(filePath);\n if (!repoFile.exists()) {\n downloadRet = urlComponent.downloadFromURL(url.toString(), filePath);\n }\n if (downloadRet == SC_OK) {\n in = new FileInputStream(repoFile);\n int len = 0;\n byte[] buffer = new byte[1024];\n// out = response.getOutputStream();\n while ((len = in.read(buffer)) > 0) {\n out.write(buffer, 0, len);\n }\n } else {\n // download failed\n logComponent.e(\"download failed:\" + url);\n }\n } catch (Exception e) {\n logComponent.e(\"index :\" + url + \" failed:\" + e.getMessage());\n } finally {\n if (downloadRet != SC_OK) {\n try {\n// response.sendError(downloadRet, \"download file error!\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n StreamUtils.closeOutputStream(out);\n StreamUtils.closeInputStream(in);\n }\n }", "@Override\n public void onClick(View v) {\n \tIntent in = new Intent(getApplicationContext(), DownloadFile.class);\n in.putExtra(\"url\", url_get_file);\n startActivityForResult(in, 100);\n }", "public void downloadProgress(long downloaded, long total, long bytesPerSecond, long secondsLeft);" ]
[ "0.5790897", "0.57125324", "0.5698376", "0.5670838", "0.55456203", "0.54065144", "0.53687817", "0.536023", "0.53228086", "0.53202134", "0.5311175", "0.528039", "0.5275499", "0.5202823", "0.5177051", "0.51628053", "0.51499224", "0.5142163", "0.5114001", "0.5087467", "0.50827205", "0.5066547", "0.50561315", "0.50420266", "0.50177693", "0.5009139", "0.49997315", "0.4995954", "0.49790308", "0.49776667", "0.4975809", "0.49756745", "0.49694875", "0.49644423", "0.49629474", "0.4958696", "0.4952218", "0.49341956", "0.49299818", "0.491552", "0.4913052", "0.49113262", "0.48988163", "0.4889359", "0.48854262", "0.48843563", "0.48831943", "0.4882925", "0.48785588", "0.48713368", "0.48641497", "0.48620272", "0.48595282", "0.48477226", "0.48453748", "0.48400545", "0.48396504", "0.48300138", "0.48288405", "0.4826965", "0.48263517", "0.48125958", "0.48118326", "0.48066846", "0.48019886", "0.47922128", "0.47916266", "0.47869945", "0.4776392", "0.47563788", "0.4755813", "0.47484314", "0.47466797", "0.47412494", "0.4738921", "0.4738512", "0.47357336", "0.47302103", "0.4724033", "0.47235656", "0.47196674", "0.47170293", "0.47165078", "0.4715367", "0.47140372", "0.47039804", "0.46991315", "0.46985918", "0.46890992", "0.46846226", "0.46771663", "0.46762657", "0.467572", "0.46745163", "0.4664022", "0.4660049", "0.4659404", "0.46574375", "0.4656012", "0.46559286", "0.4650517" ]
0.0
-1
Liefert die Datei mit dem Namen 'fileName' aus dem aktuellen Verzeichnis.
private File getFile(String fileName) { String path = ""; if (fileName.equals(PREV_DIRECTORY)) { if (getCurrentDir().lastIndexOf("/") >= 0) { path = getCurrentDir().substring(0, getCurrentDir().lastIndexOf("/")); if (fileName.length() > PREV_DIRECTORY.length()) { path += fileName.substring(2, fileName.length()); } } else { path += fileName.substring(2, fileName.length()); } } else if (fileName.equals(CURRENT_DIRECTORY)) { path = getCurrentDir(); } else { path = getCurrentDir()+"/"+fileName; } // Datei laden return getFile(path, getCredentials()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFileName(String fileName) {\n this.fileName = fileName;\n }", "public void setFileName(String fileName) {\r\n this.fileName = fileName;\r\n }", "public void setFileName(String fileName) {\n this.fileName = fileName;\n }", "public void setFileName(String fileName) {\n this.fileName = fileName;\n }", "public void setFileName(String fileName) {\n this.fileName = fileName;\n }", "public void setFileName(String fileName) {\n this.fileName = fileName;\n }", "public void setFileName(String fileName) {\n this.fileName = fileName;\n }", "public void setFileName(String fileName) {\r\n\t\tthis.fileName = fileName;\r\n\t}", "public void setFileName(String fileName) {\r\n\t\tthis.fileName = fileName;\r\n\t}", "public void setFileName(String fileName)\n\t{\n\t\tthis.fileName = fileName;\n\t}", "public void setFileName(String fileName)\r\n\t{\r\n\t\tm_fileName = fileName;\r\n\t}", "@Override\n protected String getFileName() {\n return path;\n }", "public void setFileName(String fileName) {\n\t\tthis.fileName = fileName;\n\t}", "public void setFileName(String fileName) {\n\t\tthis.fileName = fileName;\n\t}", "public void setFileName(final String fileName) {\r\n this.fileName = fileName;\r\n }", "public void SetFileName(String fileName) {\r\n\tthis.fileName = fileName;\r\n }", "public void setFileName(String fileName)\r\n {\r\n sFileName = fileName;\r\n }", "public FileName(String fn) {\n setFile(fn);\n }", "File(String fileName)\n {\n this.fileNameToFilterBy = fileName;\n }", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "public String getFileName()\r\n/* 11: */ {\r\n/* 12:45 */ return this.fileName;\r\n/* 13: */ }", "private File getFile(String fileName) {\n\t\tClassLoader classLoader = getClass().getClassLoader();\n\t\tFile file = new File(classLoader.getResource(fileName).getFile());\n\t\treturn file;\n\t}", "protected String getFileName() {\n\t\treturn fileName;\n\t}", "public void setFileName(String fileName)\r\n/* 16: */ {\r\n/* 17:49 */ this.fileName = fileName;\r\n/* 18: */ }", "public void setFileName(final String fileName) {\n\t\tthis.fileName = fileName;\n\t}", "public void setFile(String fileName)\n {\n }", "public String getFileName()\r\n {\r\n return fileName;\r\n }", "public String getFileName();", "public String getFileName();", "public String getFileName() {\n return fileName;\n }", "public String getFileName(){\n\t\treturn _fileName;\n\t}", "public void setFilename(String fileNameIn) {\n\t\tfileName = fileNameIn;\n\t}", "@Override\n\tprotected String getFileName() {\n\t\treturn null;\n\t}", "public String getFileName(){\n\t\treturn fileName;\n\t}", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "void getFileName(File file) throws IOException {\n this.file=file;\n }", "public final String getFileName()\r\n {\r\n return _fileName;\r\n }", "public String getFileName() \n {\n return fileName;\n }", "public String GetFileName() {\r\n\treturn fileName;\r\n }", "public String fileName() {\n return this.fileName;\n }", "public String fileName() {\n return this.fileName;\n }", "public void setFileDate(Date fileDate)\r\n {\r\n dFileDate = fileDate;\r\n }", "public String getFileName()\n\t{\n\t\treturn fileName;\n\t}", "public String getFileName()\n\t{\n\t\treturn fileName;\n\t}", "void setFileName( String fileName );", "public String getFileName ();", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "public void setFileName(String nomeFile) {\n\t\tthis.fileName = nomeFile;\n\t}", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "@Override\n\tpublic String getFileName() {\n\t\treturn null;\n\t}", "public void setFileName(String name)\n\t{\n\t\tfileName = name;\n\t}", "public final void setFileName(final String fileName) {\n this.fileName = fileName;\n }", "public String getFileName() {\n/* 43:43 */ return this.fileName;\n/* 44: */ }", "public void setFileName(String fileName) {\n/* 39:39 */ this.fileName = fileName;\n/* 40: */ }", "private void setFileName(final String fileName) {\n\t\t// almacenamos el nombre del fichero\n\t\tthis.fileName = fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n return this.fileName;\n }", "public String getFileName() {\n return this.fileName;\n }", "public void setFilename(String fn) {\n\t\tfilename = fn;\n\t}", "private String getFileName() {\n\t\t// retornamos el nombre del fichero\n\t\treturn this.fileName;\n\t}", "public abstract String getFileName();", "@Override\n protected String getFileName() {\n return null;\n }", "@Override\n protected String getFileName() {\n return null;\n }", "@Override\n protected String getFileName() {\n return null;\n }", "public String getFilename();", "public String fileName () {\n\t\treturn fileName;\n\t}", "java.lang.String getFilename();", "java.lang.String getFilename();", "public String filename (){\r\n\t\t\treturn _filename;\r\n\t\t}", "void openFile(String fileName){\n\t\ttry {\n\t\t\tout = new BufferedWriter(new FileWriter(fileName));\n\t\t\tString dateTime = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\").format(new Date()); \n\t\t\t//out.write(\"Início dos testes \" + dateTime + \"\\n\" );\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}" ]
[ "0.6475379", "0.6437958", "0.6403888", "0.6403888", "0.6403888", "0.6403888", "0.6403888", "0.63756764", "0.63756764", "0.6353476", "0.6322771", "0.6317287", "0.6315836", "0.6315836", "0.61417043", "0.61386824", "0.6121568", "0.6117894", "0.61163694", "0.6116044", "0.6116044", "0.6116044", "0.6116044", "0.6116044", "0.6116044", "0.6116044", "0.6116044", "0.6116044", "0.6106818", "0.61060727", "0.6102256", "0.60801226", "0.60792506", "0.6075725", "0.6074096", "0.606703", "0.606703", "0.6062515", "0.60383385", "0.60317945", "0.6028663", "0.6027964", "0.6024655", "0.6024655", "0.6024655", "0.600452", "0.59965676", "0.59809667", "0.5979698", "0.5975623", "0.5975623", "0.5974411", "0.5971766", "0.5971766", "0.5967859", "0.5966242", "0.59562707", "0.59562707", "0.59562707", "0.59562707", "0.59562707", "0.5953381", "0.59497", "0.59497", "0.59497", "0.59497", "0.59497", "0.59497", "0.59497", "0.59497", "0.59497", "0.59497", "0.5934113", "0.5934113", "0.5934113", "0.5933719", "0.5926729", "0.5925059", "0.59220725", "0.5915573", "0.5900172", "0.58968365", "0.58968365", "0.58968365", "0.58968365", "0.58968365", "0.5893625", "0.5893625", "0.58844215", "0.58748555", "0.5872485", "0.58555126", "0.58555126", "0.58555126", "0.58496296", "0.584207", "0.58176434", "0.58176434", "0.5784949", "0.5777674" ]
0.6054098
38
Laden des Inhalts des aktuellen XtreemFSVerzeichnisses
private void loadXtreemFSData() { IndexedContainer xtreemFSData = createFields(); // Die IDs werden zum Verschieben von Dateien gebraucht. VaadinXtreemFSSession.setDirectoryIds(new ArrayList<Object>()); if (getVolume() != null) { try { int i = 1; // Alle Elemente einfügen String currentDir = getCurrentDir(); for (DirectoryEntry e : listEntries(currentDir)) { // .. im Home-Dir ausblenden if (getHomeDir() == null || getHomeDir() != null && (currentDir != null && !currentDir.equals(mergePaths(getHomeDir(), ""))) || !e.getName().equals("..")) { createItems(xtreemFSData, e.getName(), XtreemFSConnect.isDirectory(e), e.getStbuf(), i++); } } } catch (IOException e) { if (e.getMessage().contains("access denied")) { showNotification("Error", "You don't have the rights to access '"+getCurrentDir()+"'.", Notification.TYPE_ERROR_MESSAGE, e); } else { showNotification("Error", e.toString(), Notification.TYPE_ERROR_MESSAGE, e); } } } this.table.setContainerDataSource(xtreemFSData); this.autocompleteFilter.setContainerDataSource(xtreemFSData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void getListOfAllFileVarianta2() {\n\t\tPath pathToSrc = Paths.get(\"D:\\\\TorrentsMd\");\r\n\t\ttry {\r\n\t\t\t//cu method references\r\n//\t\t\tFiles.walk(pathToSrc)\r\n//\t\t\t\t.map(Path::toFile)\r\n//\t\t\t\t.filter(File::isFile)\r\n//\t\t\t\t.map(File::getName)\r\n//\t\t\t\t.sorted()\r\n//\t\t\t\t.forEach(System.out::println);\r\n\t\t\t\r\n\t\t\t//cu lambda, dar dpdv semantic sunt identice\r\n\t\t\tFiles.walk(pathToSrc)\r\n\t\t\t\t .map(path -> path.toFile()) //trasnform fiecare Path din stream intr-un File\r\n\t\t\t\t .filter(file -> file.isFile()) //filtrez doar fisierele\r\n\t\t\t\t .map(file -> file.getName())//transform fiecare File din stream intr-un String, care e numele sau\r\n\t\t\t\t .sorted()\r\n\t\t\t\t .forEach(file -> System.out.println(file));\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "List<File> getSystemDescriptionFiles();", "@android.annotation.SuppressLint({\"NewApi\"})\n private void listRoots() {\n /*\n r23 = this;\n r21 = 0;\n r0 = r21;\n r1 = r23;\n r1.currentDir = r0;\n r0 = r23;\n r0 = r0.items;\n r21 = r0;\n r21.clear();\n r17 = new java.util.HashSet;\n r17.<init>();\n r21 = android.os.Environment.getExternalStorageDirectory();\n r5 = r21.getPath();\n r12 = android.os.Environment.isExternalStorageRemovable();\n r6 = android.os.Environment.getExternalStorageState();\n r21 = \"mounted\";\n r0 = r21;\n r21 = r6.equals(r0);\n if (r21 != 0) goto L_0x003c;\n L_0x0031:\n r21 = \"mounted_ro\";\n r0 = r21;\n r21 = r6.equals(r0);\n if (r21 == 0) goto L_0x0084;\n L_0x003c:\n r8 = new org.telegram.ui.DocumentSelectActivity$ListItem;\n r21 = 0;\n r0 = r23;\n r1 = r21;\n r8.<init>();\n r21 = android.os.Environment.isExternalStorageRemovable();\n if (r21 == 0) goto L_0x02ae;\n L_0x004d:\n r21 = \"SdCard\";\n r22 = 2131494825; // 0x7f0c07a9 float:1.861317E38 double:1.0530983673E-314;\n r21 = org.telegram.messenger.LocaleController.getString(r21, r22);\n r0 = r21;\n r8.title = r0;\n r21 = 2131165433; // 0x7f0700f9 float:1.7945083E38 double:1.052935626E-314;\n r0 = r21;\n r8.icon = r0;\n L_0x0062:\n r0 = r23;\n r21 = r0.getRootSubtitle(r5);\n r0 = r21;\n r8.subtitle = r0;\n r21 = android.os.Environment.getExternalStorageDirectory();\n r0 = r21;\n r8.file = r0;\n r0 = r23;\n r0 = r0.items;\n r21 = r0;\n r0 = r21;\n r0.add(r8);\n r0 = r17;\n r0.add(r5);\n L_0x0084:\n r3 = 0;\n r4 = new java.io.BufferedReader;\t Catch:{ Exception -> 0x0302 }\n r21 = new java.io.FileReader;\t Catch:{ Exception -> 0x0302 }\n r22 = \"/proc/mounts\";\n r21.<init>(r22);\t Catch:{ Exception -> 0x0302 }\n r0 = r21;\n r4.<init>(r0);\t Catch:{ Exception -> 0x0302 }\n L_0x0094:\n r14 = r4.readLine();\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r14 == 0) goto L_0x02dd;\n L_0x009a:\n r21 = \"vfat\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x00b0;\n L_0x00a5:\n r21 = \"/mnt\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 == 0) goto L_0x0094;\n L_0x00b0:\n r21 = org.telegram.messenger.BuildVars.LOGS_ENABLED;\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 == 0) goto L_0x00b7;\n L_0x00b4:\n org.telegram.messenger.FileLog.d(r14);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n L_0x00b7:\n r19 = new java.util.StringTokenizer;\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r21 = \" \";\n r0 = r19;\n r1 = r21;\n r0.<init>(r14, r1);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r20 = r19.nextToken();\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r16 = r19.nextToken();\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r0 = r17;\n r1 = r16;\n r21 = r0.contains(r1);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x0094;\n L_0x00d5:\n r21 = \"/dev/block/vold\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 == 0) goto L_0x0094;\n L_0x00e0:\n r21 = \"/mnt/secure\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x0094;\n L_0x00eb:\n r21 = \"/mnt/asec\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x0094;\n L_0x00f6:\n r21 = \"/mnt/obb\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x0094;\n L_0x0101:\n r21 = \"/dev/mapper\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x0094;\n L_0x010c:\n r21 = \"tmpfs\";\n r0 = r21;\n r21 = r14.contains(r0);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x0094;\n L_0x0117:\n r21 = new java.io.File;\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r0 = r21;\n r1 = r16;\n r0.<init>(r1);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r21 = r21.isDirectory();\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 != 0) goto L_0x0163;\n L_0x0126:\n r21 = 47;\n r0 = r16;\n r1 = r21;\n r11 = r0.lastIndexOf(r1);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r21 = -1;\n r0 = r21;\n if (r11 == r0) goto L_0x0163;\n L_0x0136:\n r21 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r21.<init>();\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r22 = \"/storage/\";\n r21 = r21.append(r22);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r22 = r11 + 1;\n r0 = r16;\n r1 = r22;\n r22 = r0.substring(r1);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r21 = r21.append(r22);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r15 = r21.toString();\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r21 = new java.io.File;\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r0 = r21;\n r0.<init>(r15);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r21 = r21.isDirectory();\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n if (r21 == 0) goto L_0x0163;\n L_0x0161:\n r16 = r15;\n L_0x0163:\n r0 = r17;\n r1 = r16;\n r0.add(r1);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n r13 = new org.telegram.ui.DocumentSelectActivity$ListItem;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r21 = 0;\n r0 = r23;\n r1 = r21;\n r13.<init>();\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r21 = r16.toLowerCase();\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r22 = \"sd\";\n r21 = r21.contains(r22);\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n if (r21 == 0) goto L_0x02c5;\n L_0x0182:\n r21 = \"SdCard\";\n r22 = 2131494825; // 0x7f0c07a9 float:1.861317E38 double:1.0530983673E-314;\n r21 = org.telegram.messenger.LocaleController.getString(r21, r22);\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r0 = r21;\n r13.title = r0;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n L_0x0190:\n r21 = 2131165433; // 0x7f0700f9 float:1.7945083E38 double:1.052935626E-314;\n r0 = r21;\n r13.icon = r0;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r0 = r23;\n r1 = r16;\n r21 = r0.getRootSubtitle(r1);\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r0 = r21;\n r13.subtitle = r0;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r21 = new java.io.File;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r0 = r21;\n r1 = r16;\n r0.<init>(r1);\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r0 = r21;\n r13.file = r0;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r0 = r23;\n r0 = r0.items;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r21 = r0;\n r0 = r21;\n r0.add(r13);\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n goto L_0x0094;\n L_0x01bd:\n r7 = move-exception;\n org.telegram.messenger.FileLog.e(r7);\t Catch:{ Exception -> 0x01c3, all -> 0x02d5 }\n goto L_0x0094;\n L_0x01c3:\n r7 = move-exception;\n r3 = r4;\n L_0x01c5:\n org.telegram.messenger.FileLog.e(r7);\t Catch:{ all -> 0x0300 }\n if (r3 == 0) goto L_0x01cd;\n L_0x01ca:\n r3.close();\t Catch:{ Exception -> 0x02ec }\n L_0x01cd:\n r9 = new org.telegram.ui.DocumentSelectActivity$ListItem;\n r21 = 0;\n r0 = r23;\n r1 = r21;\n r9.<init>();\n r21 = \"/\";\n r0 = r21;\n r9.title = r0;\n r21 = \"SystemRoot\";\n r22 = 2131495071; // 0x7f0c089f float:1.8613668E38 double:1.053098489E-314;\n r21 = org.telegram.messenger.LocaleController.getString(r21, r22);\n r0 = r21;\n r9.subtitle = r0;\n r21 = 2131165426; // 0x7f0700f2 float:1.7945069E38 double:1.0529356226E-314;\n r0 = r21;\n r9.icon = r0;\n r21 = new java.io.File;\n r22 = \"/\";\n r21.<init>(r22);\n r0 = r21;\n r9.file = r0;\n r0 = r23;\n r0 = r0.items;\n r21 = r0;\n r0 = r21;\n r0.add(r9);\n r18 = new java.io.File;\t Catch:{ Exception -> 0x02f7 }\n r21 = android.os.Environment.getExternalStorageDirectory();\t Catch:{ Exception -> 0x02f7 }\n r22 = \"Telegram\";\n r0 = r18;\n r1 = r21;\n r2 = r22;\n r0.<init>(r1, r2);\t Catch:{ Exception -> 0x02f7 }\n r21 = r18.exists();\t Catch:{ Exception -> 0x02f7 }\n if (r21 == 0) goto L_0x0254;\n L_0x0223:\n r10 = new org.telegram.ui.DocumentSelectActivity$ListItem;\t Catch:{ Exception -> 0x02f7 }\n r21 = 0;\n r0 = r23;\n r1 = r21;\n r10.<init>();\t Catch:{ Exception -> 0x02f7 }\n r21 = \"Telegram\";\n r0 = r21;\n r10.title = r0;\t Catch:{ Exception -> 0x02fd }\n r21 = r18.toString();\t Catch:{ Exception -> 0x02fd }\n r0 = r21;\n r10.subtitle = r0;\t Catch:{ Exception -> 0x02fd }\n r21 = 2131165426; // 0x7f0700f2 float:1.7945069E38 double:1.0529356226E-314;\n r0 = r21;\n r10.icon = r0;\t Catch:{ Exception -> 0x02fd }\n r0 = r18;\n r10.file = r0;\t Catch:{ Exception -> 0x02fd }\n r0 = r23;\n r0 = r0.items;\t Catch:{ Exception -> 0x02fd }\n r21 = r0;\n r0 = r21;\n r0.add(r10);\t Catch:{ Exception -> 0x02fd }\n r9 = r10;\n L_0x0254:\n r9 = new org.telegram.ui.DocumentSelectActivity$ListItem;\n r21 = 0;\n r0 = r23;\n r1 = r21;\n r9.<init>();\n r21 = \"Gallery\";\n r22 = 2131493847; // 0x7f0c03d7 float:1.8611186E38 double:1.053097884E-314;\n r21 = org.telegram.messenger.LocaleController.getString(r21, r22);\n r0 = r21;\n r9.title = r0;\n r21 = \"GalleryInfo\";\n r22 = 2131493848; // 0x7f0c03d8 float:1.8611188E38 double:1.0530978846E-314;\n r21 = org.telegram.messenger.LocaleController.getString(r21, r22);\n r0 = r21;\n r9.subtitle = r0;\n r21 = 2131165529; // 0x7f070159 float:1.7945278E38 double:1.0529356735E-314;\n r0 = r21;\n r9.icon = r0;\n r21 = 0;\n r0 = r21;\n r9.file = r0;\n r0 = r23;\n r0 = r0.items;\n r21 = r0;\n r0 = r21;\n r0.add(r9);\n r0 = r23;\n r0 = r0.listView;\n r21 = r0;\n org.telegram.messenger.AndroidUtilities.clearDrawableAnimation(r21);\n r21 = 1;\n r0 = r21;\n r1 = r23;\n r1.scrolling = r0;\n r0 = r23;\n r0 = r0.listAdapter;\n r21 = r0;\n r21.notifyDataSetChanged();\n return;\n L_0x02ae:\n r21 = \"InternalStorage\";\n r22 = 2131493929; // 0x7f0c0429 float:1.8611352E38 double:1.0530979246E-314;\n r21 = org.telegram.messenger.LocaleController.getString(r21, r22);\n r0 = r21;\n r8.title = r0;\n r21 = 2131165528; // 0x7f070158 float:1.7945276E38 double:1.052935673E-314;\n r0 = r21;\n r8.icon = r0;\n goto L_0x0062;\n L_0x02c5:\n r21 = \"ExternalStorage\";\n r22 = 2131493730; // 0x7f0c0362 float:1.8610948E38 double:1.0530978263E-314;\n r21 = org.telegram.messenger.LocaleController.getString(r21, r22);\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n r0 = r21;\n r13.title = r0;\t Catch:{ Exception -> 0x01bd, all -> 0x02d5 }\n goto L_0x0190;\n L_0x02d5:\n r21 = move-exception;\n r3 = r4;\n L_0x02d7:\n if (r3 == 0) goto L_0x02dc;\n L_0x02d9:\n r3.close();\t Catch:{ Exception -> 0x02f2 }\n L_0x02dc:\n throw r21;\n L_0x02dd:\n if (r4 == 0) goto L_0x0305;\n L_0x02df:\n r4.close();\t Catch:{ Exception -> 0x02e5 }\n r3 = r4;\n goto L_0x01cd;\n L_0x02e5:\n r7 = move-exception;\n org.telegram.messenger.FileLog.e(r7);\n r3 = r4;\n goto L_0x01cd;\n L_0x02ec:\n r7 = move-exception;\n org.telegram.messenger.FileLog.e(r7);\n goto L_0x01cd;\n L_0x02f2:\n r7 = move-exception;\n org.telegram.messenger.FileLog.e(r7);\n goto L_0x02dc;\n L_0x02f7:\n r7 = move-exception;\n L_0x02f8:\n org.telegram.messenger.FileLog.e(r7);\n goto L_0x0254;\n L_0x02fd:\n r7 = move-exception;\n r9 = r10;\n goto L_0x02f8;\n L_0x0300:\n r21 = move-exception;\n goto L_0x02d7;\n L_0x0302:\n r7 = move-exception;\n goto L_0x01c5;\n L_0x0305:\n r3 = r4;\n goto L_0x01cd;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.telegram.ui.DocumentSelectActivity.listRoots():void\");\n }", "public List<LsFileEntry> lsFiles() \n \tthrows CorruptObjectException, IOException {\n \t\tMap<String, LsFileEntry> cachedEntries = new TreeMap<String, LsFileEntry>(); \n \t\t\n \t\t//first read all the files which are the Index\n \t\tfinal DirCache cache = DirCache.read(db);\n \t\tfor (int i = 0; i < cache.getEntryCount(); i++) {\n \t\t\tfinal DirCacheEntry ent = cache.getEntry(i);\n \t\t\t\n \t\t\t//X TODO this is surely not enough ;)\n \t\t\tLsFileStatus fs = LsFileStatus.CACHED;\n \t\t\tLsFileEntry fileEntry = new LsFileEntry(ent.getPathString(), fs, ent.getObjectId());\n \t\t\tcachedEntries.put(ent.getPathString(), fileEntry);\n \t\t}\n \n \t\t// now read all the files on the disk\n \t\tSet<String> filesOnDisk = new TreeSet<String>(); \n \t\tFile workDir = db.getWorkDir();\n \t\taddFiles(filesOnDisk, \"\", workDir);\n \t\t\n \t\t// and now compare them. since both are already sorted because we used TreeMap and TreeSort\n \t\t// we can simply crawl over them end compare them. kind of a merge sort though...\n \t\tArrayList<LsFileEntry> fileEntries = new ArrayList<LsFileEntry>();\n \n \t\tIterator<String> cacheIt = cachedEntries.keySet().iterator();\n \t\tIterator<String> fileIt = filesOnDisk.iterator();\n \t\t\n \t\tString cachedPath = null;\n \t\tString fsPath = null;\n \t\twhile (cacheIt.hasNext() || fileIt.hasNext()) {\n \t\t\t\n \t\t\tif (cachedPath == null && cacheIt.hasNext()) {\n \t\t\t\tcachedPath = cacheIt.next();\n \t\t\t}\n \t\t\t\n \t\t\tif (fsPath == null && fileIt.hasNext()) {\n \t\t\t\tfsPath = fileIt.next();\n \t\t\t}\n \t\t\t\n \t\t\tif (cachedPath != null && cachedPath.equals(fsPath)) {\n \t\t\t\t// oh found in both systems\n \t\t\t\tfileEntries.add(cachedEntries.get(cachedPath));\n \t\t\t\tcachedPath = null;\n \t\t\t\tfsPath = null;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tif (cachedPath != null && !fileEntries.contains(cachedPath)) {\n \t\t\t\tfileEntries.add(new LsFileEntry(cachedPath, LsFileStatus.REMOVED, null));\n \t\t\t\tcachedPath = null;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tif (fsPath != null && !cachedEntries.keySet().contains(fsPath)) {\n \t\t\t\tfileEntries.add(new LsFileEntry(fsPath, LsFileStatus.OTHER, null));\n \t\t\t\tfsPath = null;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tcachedPath = null;\n \t\t\tfsPath = null;\n \t\t\t\n \t\t}\n \t\t\n \t\treturn fileEntries;\n \t}", "java.lang.String getFileLoc();", "public void KvtTartListFrissit( String sKonyvtar)\r\n {\n File cAktKvt = null ;\r\n Object aKvtTartalma[] = null ;\r\n\r\n//System.out.println( \"JFileValasztDlg.KvtTartListFrissit( \" + sKonyvtar + \")\") ;\r\n\r\n// cAktKvt = new File( \".\") ;\r\n// cAktKvt = new File( \"/home/tamas/java/Polar/hrmfiles\") ;\r\n cAktKvt = new File( sKonyvtar) ;\r\n\r\n//System.out.println( \"JFileValasztDlg.KvtTartListFrissit cAktKvt = new File() utan\") ;\r\n\r\n // Az aktualis konyvtar teljes utvonalanak beirasa\r\n// Itt nyeli le a vegerol a \\-t vagy /-t :\r\n// m_jKonyvtarTxtFld.setText( cAktKvt.getAbsolutePath()) ; // getAbsolutePath()\r\n m_jKonyvtarTxtFld.setText( sKonyvtar) ;\r\n\r\n//System.out.println( \"JFileValasztDlg.KvtTartListFrissit m_jKonyvtarTxtFld.setText( cAktKvt.getAbsolutePath()) utan\") ;\r\n if ( cAktKvt != null && cAktKvt.isDirectory() == true )\r\n {\r\n aKvtTartalma = HRMFileSzuro( cAktKvt) ;\r\n//System.out.println( \"JFileValasztDlg.KvtTartListFrissit() : HRMFileSzuro() utan\") ;\r\n\r\n if ( aKvtTartalma != null )\r\n {\r\n/*\r\nfor ( int i=0 ; i < aKvtTartalma.length ; i++ )\r\n{\r\nSystem.out.println( \"JFileValasztDlg.KvtTartListFrissit() : cKvtrkFileok[\" + i + \"]=\" + aKvtTartalma[i].toString()) ;\r\n}\r\n*/\r\n m_jKvtTartList.setListData( aKvtTartalma) ;\r\n//System.out.println( \"JFileValasztDlg.KvtTartListFrissit() : .setListData() utan\") ;\r\n\r\n // Itt mar valoszinu, hogy a ListBox a konyvtar file-jait tartalmazza +++\r\n SetAktKonyvtar( sKonyvtar) ;\r\n\r\n m_jKvtTartList.setSelectedIndex( 0) ;\r\n \r\n//System.out.println( \"JFileValasztDlg.KvtTartListFrissit() : SetAktKonyvtar() utan\") ;\r\n//System.out.println( \"JFileValasztDlg.KvtTartListFrissit() : setListData\") ;\r\n/*\r\n for ( nIdx = 0 ; nIdx < aKvtTartalma.length ; nIdx++ )\r\n {\r\n m_jKvtTartList.setListData( aKvtTartalma) ;\r\n }\r\n*/\r\n }\r\n }\r\n }", "public static ArrayList B() {\n int n10;\n ArrayList<String[]> arrayList = new ArrayList<String[]>();\n Object object = Environment.getRootDirectory().getAbsoluteFile();\n ((StringBuilder)((Object)arrayList)).append(object);\n object = File.separator;\n ((StringBuilder)((Object)arrayList)).append((String)object);\n Object object2 = \"etc\";\n ((StringBuilder)((Object)arrayList)).append((String)object2);\n ((StringBuilder)((Object)arrayList)).append((String)object);\n object = \"vold.fstab\";\n ((StringBuilder)((Object)arrayList)).append((String)object);\n arrayList = ((StringBuilder)((Object)arrayList)).toString();\n Object object3 = new File((String)((Object)arrayList));\n arrayList = new ArrayList<String[]>();\n boolean bl2 = ((File)object3).exists();\n if (!bl2) {\n return arrayList;\n }\n object = new ArrayList();\n try {\n object.clear();\n Object object4 = new FileReader((File)object3);\n object2 = new BufferedReader((Reader)object4);\n while ((object3 = ((BufferedReader)object2).readLine()) != null) {\n object4 = \"dev_mount\";\n n10 = ((String)object3).startsWith((String)object4);\n if (n10 == 0) continue;\n object.add(object3);\n }\n ((BufferedReader)object2).close();\n object.trimToSize();\n }\n catch (IOException iOException) {}\n object3 = object.iterator();\n while (bl2 = object3.hasNext()) {\n int n11;\n object = (String)object3.next();\n if (object == null || (object = object.split((String)(object2 = \" \"))) == null || (n11 = ((String[])object).length) < (n10 = 4) || (object = object[n11 = 2]) == null || (n11 = (int)(((File)(object2 = new File((String)object))).exists() ? 1 : 0)) == 0) continue;\n arrayList.add((String[])object);\n }\n return arrayList;\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 }", "VirtualDirectory getRootContents();", "private String[] nlstHelper(String args) {\n // Construct the name of the directory to list.\n String filename = currDirectory;\n if (args != null) {\n filename = filename + fileSeparator + args;\n }\n\n // Now get a File object, and see if the name we got exists and is a\n // directory.\n File f = new File(filename);\n\n if (f.exists() && f.isDirectory()) {\n return f.list();\n } else if (f.exists() && f.isFile()) {\n String[] allFiles = new String[1];\n allFiles[0] = f.getName();\n return allFiles;\n } else {\n return null;\n }\n }", "static void walkTheDir(){ \n\t try (Stream<Path> paths = Files.walk(Paths.get(\"/ownfiles/tullverketCert/source\"))) {\n\t \t paths\n\t \t .filter(Files::isRegularFile)\n\t \t //.forEach(System.out::println);\n\t \t .forEach( e ->{\n\t \t \t\tSystem.out.println(e);\n\t \t \t\tSystem.out.println(e.getParent());\n\t \t \t\t\n\t \t \t});\n\t \t \n \t}catch (Exception e) { \n\t System.out.println(\"Exception: \" + e); \n\t } \n\t }", "java.util.List<entities.Torrent.FileInfo>\n getFilesList();", "java.util.List<entities.Torrent.FileInfo>\n getFileInfoList();", "private void update() {\r\n \tthis.pathTextView.setText(this.currentPath);\r\n \tthis.fileListAdapter.clear();\r\n \tthis.fileListAdapter.add(\"[\"+getResources().getString(R.string.go_home)+\"]\");\r\n \tif (!this.currentPath.equals(\"/\"))\r\n \t\tthis.fileListAdapter.add(\"..\");\r\n \t\r\n \tFile files[] = new File(this.currentPath).listFiles(this.fileFilter);\r\n\r\n \tif (files != null) {\r\n\t \ttry {\r\n\t\t \tArrays.sort(files, new Comparator<File>() {\r\n\t\t \t\tpublic int compare(File f1, File f2) {\r\n\t\t \t\t\tif (f1 == null) throw new RuntimeException(\"f1 is null inside sort\");\r\n\t\t \t\t\tif (f2 == null) throw new RuntimeException(\"f2 is null inside sort\");\r\n\t\t \t\t\ttry {\r\n\t\t \t\t\t\tif (dirsFirst && f1.isDirectory() != f2.isDirectory()) {\r\n\t\t \t\t\t\t\tif (f1.isDirectory())\r\n\t\t \t\t\t\t\t\treturn -1;\r\n\t\t \t\t\t\t\telse\r\n\t\t \t\t\t\t\t\treturn 1;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\treturn f1.getName().toLowerCase().compareTo(f2.getName().toLowerCase());\r\n\t\t \t\t\t} catch (NullPointerException e) {\r\n\t\t \t\t\t\tthrow new RuntimeException(\"failed to compare \" + f1 + \" and \" + f2, e);\r\n\t\t \t\t\t}\r\n\t\t\t\t\t}\r\n\t\t \t});\r\n\t \t} catch (NullPointerException e) {\r\n\t \t\tthrow new RuntimeException(\"failed to sort file list \" + files + \" for path \" + this.currentPath, e);\r\n\t \t}\r\n\t \t\r\n\t \tfor(int i = 0; i < files.length; ++i) this.fileListAdapter.add(files[i].getName());\r\n \t}\r\n \t\r\n \tif (isHome(currentPath)) {\r\n \t\trecent = new Recent(this);\r\n \t\t\r\n \tfor (int i = 0; i < recent.size(); i++) {\r\n \t\tthis.fileListAdapter.insert(\"\"+(i+1)+\": \"+(new File(recent.get(i))).getName(), \r\n \t\t\t\tRECENT_START+i);\r\n \t}\r\n \t}\r\n \telse {\r\n \t\trecent = null;\r\n \t}\r\n \t\r\n \tthis.filesListView.setSelection(0);\r\n }", "public Vector getTypedFiles() {\r\n\treturn getTypedFilesForDirectory(getCurrentDirectory());\r\n }", "public synchronized int load()\n {\n int cb = (maxFiles * maxChars * SysLib.CBCHAR) + \n (maxFiles * SysLib.CBINT);\n byte b[] = new byte[cb];\n files.clear();\n int fileNameOffset = maxFiles * SysLib.CBINT;\n int offset = 0;\n\n // Read the entire potential directory listing\n if (inode.read(0, b) < 0)\n {\n return -1;\n }\n\n for (int i = 0; i < maxFiles; i++)\n {\n // Read the file name length\n int strLen = SysLib.bytes2int(b, offset);\n offset += SysLib.CBINT;\n\n // Read the file name, if one is stored\n if (strLen > 0)\n {\n byte strBytes[] = new byte[strLen * SysLib.CBCHAR];\n\n System.arraycopy(b, fileNameOffset, strBytes, 0,\n strBytes.length);\n\n files.add(new String(strBytes));\n\n fileNameOffset += strLen;\n }\n // Add a zero-length placeholder for this listing\n else\n {\n files.add(new String(\"\"));\n }\n }\n\n return 0;\n }", "public void initial_list_sync(){\n \tFile file = new File(sync_directory_conf);\n \tif(file.exists()){\n \t\tArrayList<String> sync_directory_list = new ArrayList<String>();\n sync_directory_list = read_from_file.readFromFile(sync_directory_conf);\n text_sync_directory_path.setText(sync_directory_list.get(0));\n \t}else{\n \t\treturn;\n \t}\n \t\t\n }", "public static void main(String[] args) {\n\t\tFile f = new File(\"src/com/briup/java_day19/ch11/FileTest.txt\");// \"src/com/briup/\"(win and linux)\r\n\t\t\r\n\t\tSystem.out.println(f);\r\n\t\tSystem.out.println(f.exists());\r\n\t\tif(!f.exists()){\r\n\t\t\ttry {\r\n\t\t\t\tf.createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(f.canWrite());\r\n\t\tSystem.out.println(f.canExecute());\r\n\t\tSystem.out.println(f.canRead());\r\n\t\tSystem.out.println(f.getAbsolutePath());//override toString\r\n\t\tSystem.out.println(f.getAbsoluteFile());\r\n\t\tSystem.out.println(f.getName());\r\n\t\tSystem.out.println(f.getParent());\r\n\t\tSystem.out.println(f.getParentFile());\r\n\t\tSystem.out.println(f.isDirectory());\r\n\t\tSystem.out.println(f.isFile());\r\n\t\tSystem.out.println(f.length());//how many byte\r\n\t\t\r\n\t\tSystem.out.println(\"=================\");\r\n\t\tString[] str = f.getParentFile().list();\r\n\t\tSystem.out.println(Arrays.toString(str));\r\n\t\tfor(String s:str){\r\n\t\t\tSystem.out.println(s);\r\n\t\t}\r\n\t\tSystem.out.println(\"=================\");\r\n\t\tFile pf = f.getParentFile();\r\n\t\tString[] str2 = pf.list(new FilenameFilter() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic boolean accept(File dir, String name) {\r\n\t\t\t\t//文件名以txt结尾的\r\n//\t\t\t\treturn name.endsWith(\"java\");\r\n//\t\t\t\treturn name.contains(\"Byte\");\r\n\t\t\t\treturn name.startsWith(\"Byte\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tfor(String s:str2){\r\n\t\t\tSystem.out.println(s);\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public void run() {\n String whichFiles = \"'\" + languageFolder.getId() + \"' in parents and \" + NOT_TRASHED + \" and \" + FOLDER + \" and \" + NOT_SPREADSHEET;\n List<File> files = getContents(whichFiles);\n \n prune(localLanguageFolder, files);\n processFolders(files, localLanguageFolder);\n }", "public abstract String getFileLocation();", "public List<String> stringy() {\n\t\t\tList<String> temp = new ArrayList<>();\n\t\t\t// add all the file names\n\t\t\ttemp.addAll(getFileNames());\n\t\t\t// add all the directories [indicated by a \"-\"]\n\t\t\tfor (DirectoryObjects t : subdirectories) {\n\t\t\t\ttemp.add(t.name);\n\t\t\t}\n\n\t\t\treturn temp;\n\t\t}", "public 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}", "public static void main(String[] args) {\n\t\tchar separatorChar = System.getProperty(\"file.separator\").charAt(0);\r\n\t\tSystem.out.println(\"Pfadtrenner: \" + separatorChar);\r\n\t\t\r\n\t\t// windows Pfad:\r\n\t\tString pfad1 = \"D:\\\\Daten\\\\Musik\\\\Falco – Rock Me Amadeus.mp\";\r\n\t\tString pfadNeu = pfad1;\r\n\t\t// unter Linux -> \"/D/Daten/Musik/Falco - Rock Me Amadeus.mp\";\r\n\t\t\r\n\t\t// 1. Teilaufgabe: suche nach Laufwerksbezeichnung \"D:\"\r\n\t\tif (pfad1.length() >= 2) {\r\n\t\t\tchar zeichen1 = pfad1.charAt(0);\r\n\t\t\tchar zeichen2 = pfad1.charAt(1);\r\n\t\t\t\r\n\t\t\t// Muster: Buchstabe (gross oder klein) + \":\"\r\n\t\t\tchar zeichen1Klein = Character.toLowerCase(zeichen1); // 1. Zeichen in Kleinbuchstabe wandeln\r\n\t\t\tif (('a' <= zeichen1Klein && zeichen1Klein <= 'z')\r\n\t\t\t\t\t&& zeichen2 == ':') {\r\n\t\t\t\tSystem.out.println(\"Laufwerk: \" + zeichen1);\r\n\t\t\t\tif (!isWindows()) {\r\n\t\t\t\t\t// unter Linux\r\n\t\t\t\t\t// D: \\Daten\\Musik\\Falco – Rock Me Amadeus.mp\r\n\t\t\t\t\t// 1. String: D:\r\n\t\t\t\t\t// 2. String: \\Daten\\Musik\\Falco – Rock Me Amadeus.mp\r\n\t\t\t\t\t// Ergebnis: /D + \\Daten\\Musik\\Falco – Rock Me Amadeus.mp\r\n\t\t\t\t\tpfadNeu = \"/\" + zeichen1 + pfad1.substring(2); // alles ab 2. Index (ab 3. Zeichen)\r\n\t\t\t\t\tSystem.out.println(pfadNeu);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// 2. Teilaufgabe: Pfadtrenner korrigieren - pfadneu soll die \"richtigen\" Pfadtrenner enthalten\r\n\t\tString pfadErgebnis = \"\";\r\n\t\tfor (int i = 0; i < pfadNeu.length(); ++i) {\r\n\t\t\tchar zeichen = pfadNeu.charAt(i);\r\n\t\t\t\r\n\t\t\tif (isWindows()) {\r\n\t\t\t\tif (zeichen == '/') {\r\n\t\t\t\t\tpfadErgebnis += '\\\\';\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpfadErgebnis += zeichen;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t// Linux/Mac\r\n\t\t\t\tif (zeichen == '\\\\') {\r\n\t\t\t\t\tpfadErgebnis += '/';\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpfadErgebnis += zeichen;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(pfadErgebnis);\r\n\t\t\r\n\t\t/* weitere Methoden:\r\n\t\t * - s.indexOf(str): sucht in s nach str, liefert Position von str oder -1\r\n\t\t * - s.lastIndexOf(str): sucht in s nach str (von rechts nach links), liefert Position von str oder -1\r\n\t\t * - s.trim: entfernt Leerzeichen vorne und hinten \r\n\t\t * - s.replace(char1, char2): ersetzt alle Zeichen char1 durch char2\r\n\t\t */\r\n\t\t// 3. Teilaufgabe: Dateierweiterung (Extension) ermitteln\r\n\t\tint letzterPunktPosition = pfadErgebnis.lastIndexOf(\".\");\r\n\t\tif (letzterPunktPosition == -1) {\r\n\t\t\tSystem.out.println(\"keine Extension vorhanden!\");\r\n\t\t} else {\r\n\t\t\tSystem.out.printf(\"Name ohne Extension: %s, Extension: %s%n\",\r\n\t\t\t\t\tpfadErgebnis.substring(0, letzterPunktPosition), pfadErgebnis.substring(letzterPunktPosition+1));\t\t\t\r\n\t\t}\r\n\t}", "public void KivKvtbaValt()\r\n {\r\n// int nIdx = 0 ;\r\n// int nExtLen = 0 ;\r\n// int nKiterjPoz = 0 ;\r\n File cAktKvt = null ;\r\n Object aKivElemek[] ;\r\n \r\n// boolean bRC = false ;\r\n//System.out.println( \"JFileValasztDlg::KivKvtbaValt()\") ;\r\n\r\n try\r\n {\r\n aKivElemek = m_jKvtTartList.getSelectedValues() ;\r\n\r\n // Ha netan tobb lenne kivalasztva (bas single selection lett beallitva) ...\r\n if ( aKivElemek.length > 0 )\r\n {\r\n cAktKvt = new File( m_sAktKonyvtar /*GetAktKonyvtar()*/ + System.getProperty( IKonstansok.sFileSeparator) + aKivElemek[0].toString()) ;\r\n \r\n if ( cAktKvt != null && cAktKvt.isDirectory() == true )\r\n {\r\n KvtTartListFrissit( cAktKvt.getCanonicalPath()) ;\r\n// KonyvtarTartKiir( cAktKvt) ; ez csak pont a listaablakot nem frissiti !\r\n \r\n // A felso edit kontorlba valo beiras hianyzik !\r\n// E:\\TAMAS\\PROG\\JAVA\\ecl_wrkspc\\CPolar\\2003 v. E:\\TAMAS\\PROG\r\n//System.out.println( \"JFileValasztDlg::KivKvtbaValt() cAktKvt.getCanonicalPath() : \" + cAktKvt.getCanonicalPath()) ;\r\n// E:\\TAMAS\\PROG\\JAVA\\ecl_wrkspc\\CPolar\\.\\2003 v. E:\\TAMAS\\PROG\\JAVA\\..\r\n//System.out.println( \"JFileValasztDlg::KivKvtbaValt() cAktKvt.getAbsolutePath() : \" + cAktKvt.getAbsolutePath()) ; \r\n//m_jKonyvtarTxtFld.setText( cAktKvt.getCanonicalPath()) ; ??? <-> KvtTartListFrissit()\r\n }\r\n }\r\n }\r\n catch( IOException cIOException)\r\n {\r\n//System.out.println( \"JFileValasztDlg::KivKvtbaValt() : cIOException\") ;\r\n ExceptionTrace( (Exception) cIOException) ;\r\n }\r\n catch( SecurityException cSecurityException)\r\n {\r\n//System.out.println( \"JFileValasztDlg::KivKvtbaValt() : SecurityException\") ;\r\n ExceptionTrace( (Exception) cSecurityException) ;\r\n }\r\n catch( NullPointerException cNullPointerException)\r\n {\r\n//System.out.println( \"JFileValasztDlg::KivKvtbaValt() : NullPointerException\") ;\r\n ExceptionTrace( (Exception) cNullPointerException) ;\r\n } \r\n }", "private static ArrayList<File> getLocalRootHiveXmlDirectories(\n Context ctx,\n NwdDb db) {\n\n HiveRoot localRoot = UtilsHive.getLocalHiveRoot(ctx, db);\n\n return getFoldersForHiveRoot(localRoot, true, false);\n }", "public java.lang.String[] getNewFiles(){\r\n return localNewFiles;\r\n }", "public void testListerFichiersString()\n\t{\n\t\t// Lister les fichiers d'extension .gz du serveur marine.edu.ups-tlse.fr\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t\tSystem.out.println(\"---- Lister les fichiers .gz sur ftp.cict.fr ----\");\n\t\t\tftp.seConnecter(\"ftp.cict.fr\");\n\t\t\tVector listFic = new Vector(ftp.listerFichiers(\"gz\"));\n\t\t\tSystem.out.println(\"Liste des fichiers .gz du serveur : \");\n\t\t\tfor (int i = 0; i < listFic.size(); i++)\n\t\t\t\tSystem.out.println(listFic.get(i));\n\t\t\tSystem.out.println(\"Fin du listing des .gz\");\n\t\t\tassertTrue(true);\n\t\t\tSystem.out.println(\"---- OK ----\");\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t}\n\t\tcatch (ConnexionException e)\n\t\t{\n\t\t\tSystem.err.println(\"---- ECHEC ---- Probleme de connexion\");\n\t\t\tassertTrue(false);\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t}\n\t\tcatch (ListerFichiersException e1)\n\t\t{\n\t\t\tSystem.err.println(\"---- ECHEC ---- Probleme de listing de fichiers\");\n\t\t\tassertTrue(false);\n\t\t\tSystem.out.println(\"----------------------------------------------\");\n\t\t}\n\t}", "public void llenarListaArchivos(int op) {\n String[] archivosPermitidos = {\".HA\", \".HE\"};\n if (op == 1) {\n archivos_directorio.removeAllItems();\n } else {\n archivos_directorio2.removeAllItems();\n }\n File directorio = new File(\"./\");\n File[] archivos = null;\n if (directorio.exists()) {\n archivos = directorio.listFiles();\n }\n int i;\n\n for (i = 0; i < archivos.length; i++) {\n if (op == 1 && (\"\" + archivos[i]).contains(\".txt\")) {\n archivos_directorio.addItem(\"\" + archivos[i]);\n } else {\n int j;\n for (j = 0; j < archivosPermitidos.length; j++) {\n if ((\"\" + archivos[i]).contains(archivosPermitidos[j])) {\n archivos_directorio2.addItem(\"\" + archivos[i]);\n break;\n }\n }\n }\n }\n\n }", "private void setPathToRootOfPostVersionLists() {\n if (postBlockTypeToInvestigate == PostBlockTypeToInvestigate.Text) {\n pathToSelectedRootOfPostVersionLists = Paths.get(\"testdata\", \"files to investigate\", \"text\");\n } else if (postBlockTypeToInvestigate == PostBlockTypeToInvestigate.Code) {\n pathToSelectedRootOfPostVersionLists = Paths.get(\"testdata\", \"files to investigate\", \"code\");\n }\n }", "entities.Torrent.FileInfo getFiles(int index);", "@Override\n public String getFilenameXPathKey() {\n return ebsco_filename;\n }", "public Vector listerFichiers() throws ListerFichiersException\n\t{\n\t\treturn listerFichiers(\"\");\n\t}", "public String getBasename()\n {\n // Default implementation: getBasename of path \n return _nodeVRL.getBasename(); \n }", "public void searchAllFiles() {\n\t\t/**\n\t\t * Realizamos un pequeño algoritmo de recorrido de árboles en preorden para listar todos los\n\t\t * ebooks con un coste de 2n+1 donde n es el número de nodos.\n\t\t */\n\t\tArrayList<Entry> booksEntry = null;\n\t\ttry {\n\t\t\tString auxPath;\n\t\t\tbooksEntry = new ArrayList<DropboxAPI.Entry>();\n\t\t\tLinkedList<Entry> fifo = new LinkedList<DropboxAPI.Entry>();\n\t\t\tEntry nodo = _mApi.metadata(\"/\", 0, null, true, null);\n\t\t\tfifo.addAll(nodo.contents);\n\t\t\twhile (!fifo.isEmpty()) {\n\t\t\t\tSystem.out.println(fifo);\n\t\t\t\tnodo = fifo.getFirst();\n\t\t\t\tfifo.removeFirst();\n\t\t\t\tauxPath = nodo.path;\n\t\t\t\tif (nodo.isDir) {\n\t\t\t\t\tfifo.addAll(_mApi.metadata(auxPath, 0, null, true, null).contents);\n\t\t\t\t} else {\n\t\t\t\t\tif (isEbook(nodo))\n\t\t\t\t\t\tbooksEntry.add(nodo);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"parar\");\n\t\t} catch (DropboxUnlinkedException e) {\n\t\t\t// The AuthSession wasn't properly authenticated or user unlinked.\n\t\t} catch (DropboxPartialFileException e) {\n\t\t\t// We canceled the operation\n\t\t\t_mErrorMsg = \"Download canceled\";\n\t\t} catch (DropboxServerException e) {\n\t\t\t// Server-side exception. These are examples of what could happen,\n\t\t\t// but we don't do anything special with them here.\n\t\t\tif (e.error == DropboxServerException._304_NOT_MODIFIED) {\n\t\t\t\t// won't happen since we don't pass in revision with metadata\n\t\t\t} else if (e.error == DropboxServerException._401_UNAUTHORIZED) {\n\t\t\t\t// Unauthorized, so we should unlink them. You may want to\n\t\t\t\t// automatically log the user out in this case.\n\t\t\t} else if (e.error == DropboxServerException._403_FORBIDDEN) {\n\t\t\t\t// Not allowed to access this\n\t\t\t} else if (e.error == DropboxServerException._404_NOT_FOUND) {\n\t\t\t\t// path not found (or if it was the thumbnail, can't be\n\t\t\t\t// thumbnailed)\n\t\t\t} else if (e.error == DropboxServerException._406_NOT_ACCEPTABLE) {\n\t\t\t\t// too many entries to return\n\t\t\t} else if (e.error == DropboxServerException._415_UNSUPPORTED_MEDIA) {\n\t\t\t\t// can't be thumbnailed\n\t\t\t} else if (e.error == DropboxServerException._507_INSUFFICIENT_STORAGE) {\n\t\t\t\t// user is over quota\n\t\t\t} else {\n\t\t\t\t// Something else\n\t\t\t}\n\t\t\t// This gets the Dropbox error, translated into the user's language\n\t\t\t_mErrorMsg = e.body.userError;\n\t\t\tif (_mErrorMsg == null) {\n\t\t\t\t_mErrorMsg = e.body.error;\n\t\t\t}\n\t\t} catch (DropboxIOException e) {\n\t\t\t// Happens all the time, probably want to retry automatically.\n\t\t\t_mErrorMsg = \"Network error. Try again.\";\n\t\t} catch (DropboxParseException e) {\n\t\t\t// Probably due to Dropbox server restarting, should retry\n\t\t\t_mErrorMsg = \"Dropbox error. Try again.\";\n\t\t} catch (DropboxException e) {\n\t\t\t// Unknown error\n\t\t\t_mErrorMsg = \"Unknown error. Try again.\";\n\t\t}\n\t\t_booksListEntry = booksEntry;\n\t\tcreateListBooks();\n\t}", "public java.lang.String[] getDeletedFiles(){\r\n return localDeletedFiles;\r\n }", "public folderize() {\n }", "public final List<File> mo14817d() {\n ArrayList arrayList = new ArrayList();\n try {\n if (mo14820g().exists()) {\n if (mo14820g().listFiles() != null) {\n for (File file : mo14820g().listFiles()) {\n if (!file.getCanonicalPath().equals(mo14819f().getCanonicalPath())) {\n arrayList.add(file);\n }\n }\n return arrayList;\n }\n }\n return arrayList;\n } catch (IOException e) {\n f6563c.mo14884b(6, \"Could not process directory while scanning installed packs. %s\", new Object[]{e});\n }\n }", "void doShowFiles()\n\t{\n\t\ttry\n\t\t{\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tIterator itr = m_fileInfo.getAllFiles();\n\n\t\t\twhile(itr.hasNext())\n\t\t\t{\n\t\t\t\tSourceFile m = (SourceFile) ((Map.Entry)itr.next()).getValue();\n\n\t\t\t\tString name = m.getName();\n\t\t\t\tint id = m.getId();\n\t\t\t\tString path = m.getFullPath();\n\n\t\t\t\tsb.append(id);\n\t\t\t\tsb.append(' ');\n\t\t\t\tsb.append(path);\n\t\t\t\tsb.append(\", \"); //$NON-NLS-1$\n\t\t\t\tsb.append(name);\n\t\t\t\tsb.append(m_newline);\n\t\t\t}\n\t\t\tout( sb.toString() );\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noSourceFilesFound\")); //$NON-NLS-1$\n\t\t}\n\t}", "entities.Torrent.FileInfo getFileInfo();", "entities.Torrent.FileInfo getFileInfo();", "public List<String> getAllNotComputedFilesPath() throws TBException {\r\n\t\treturn getNotComputedFilesPath(new File(rootTBFolder).getAbsolutePath());\r\n\t\t\r\n\t}", "java.lang.String getFileNames(int index);", "java.lang.String getFileNames(int index);", "fileInfo(){\n\t\tsymbol = new node[MAXLINECOUNT + 2];\n\t\tother = null; // allocated later!\n\t}", "@Override\n public Collection<AbstractFile> visit(FileSystem fs) {\n \n SleuthkitCase sc = Case.getCurrentCase().getSleuthkitCase();\n \n StringBuilder queryB = new StringBuilder();\n queryB.append(\"SELECT * FROM tsk_files WHERE (fs_obj_id = \").append(fs.getId());\n queryB.append(\") AND (size > 0)\");\n queryB.append(\" AND ( (meta_type = \").append(TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_REG.getMetaType());\n queryB.append(\") OR (meta_type = \").append(TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_DIR.getMetaType());\n queryB.append( \"AND (name != '.') AND (name != '..')\");\n queryB.append(\") )\");\n if (getUnallocatedFiles == false) {\n queryB.append( \"AND (type = \");\n queryB.append(TskData.TSK_DB_FILES_TYPE_ENUM.FS.getFileType());\n queryB.append(\")\");\n }\n \n try {\n final String query = queryB.toString();\n logger.log(Level.INFO, \"Executing query: \" + query);\n ResultSet rs = sc.runQuery(query);\n List<AbstractFile> contents = sc.resultSetToAbstractFiles(rs);\n Statement s = rs.getStatement();\n rs.close();\n if (s != null) {\n s.close();\n }\n return contents;\n } catch (SQLException ex) {\n logger.log(Level.WARNING, \"Couldn't get all files in FileSystem\", ex);\n return Collections.emptySet();\n }\n }", "public FileSystemManager getVFS();", "@Override\n\tprotected HashSet<String> getAllChangedFileName(){\n\t\treturn null;\n\t}", "protected ArrayList<String> getCheckedFiles()\n {\n SparseBooleanArray items = fileList.getCheckedItemPositions();\n ArrayList<String> files = new ArrayList<String>();\n \n for (int i = 0; i < items.size(); i++)\n {\n if (items.valueAt(i))\n {\n files\n .add(fileList.getItemAtPosition(items.keyAt(i)).toString());\n }\n }\n \n return files;\n }", "private List<String> processDirectory(Path path) {\n\t\treturn null;\r\n\t}", "public Vector<String> LecturaFitxer()\r\n\t{\r\n\t\tVector<String> filas= new Vector<String>();\r\n\t\tif (this.ftxt.GetFile().exists())\r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tBufferedReader br=this.ftxt.ObrirFitxerLectura();\r\n\t\t\t\twhile (br.ready())\r\n\t\t\t\t{\r\n\t\t\t\t\tfilas.add(br.readLine());\r\n\t\t\t\t}\r\n\t\t\t\tthis.ftxt.TancarFitxerDeLectura(br);\r\n\t\t\t}\r\n\t\t\tcatch (IOException e)\r\n\t\t\t{\r\n\t\t\t\tGestorDiscConstants.PS(GestorDiscConstants.ERROR_IO);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn filas;\r\n\t}", "Path getMainCatalogueFilePath();", "private void getDetailsOfFiles(){\n\t\tString path = tfile.getAbsolutePath();\n\t\t\n\t\ttype = path.substring(path.lastIndexOf('.')+1);\n\t\t\n\t\tif(path.contains(\"/\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"/\")+1);\n\t\t}else if(path.contains(\"\\\\\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"\\\\\")+1);\n\t\t}\n\t}", "List<String> getFileSystemEntries(String path) throws IOException;", "private void updateFoldersText() {\n // #2002: Hide\n numberOfFoldersLine.setValue(0);\n sizeOfFoldersLine.setValue(0);\n }", "public void afficherFile() {\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Voici la File (tete a gauche, queue a droite): \");\r\n\t\tSystem.out.println(\"----------------------------------------------\");\r\n\r\n\t\tif (this.estVide() == true) {\r\n\r\n\t\t\tSystem.out.println();\r\n\t\t} else {\r\n\r\n\t\t\tCellule<T> ref = this.tete;\r\n\r\n\t\t\tfor (int i = 1; i <= this.getLongueurFile(); i++) {\r\n\r\n\t\t\t\tSystem.out.print(ref.getValeur() + \" \");\r\n\r\n\t\t\t\tif (ref.getSuivant() != null) {\r\n\r\n\t\t\t\t\tref = ref.getSuivant();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println();\r\n\t}", "public abstract List<LocalFile> getAllFiles();", "private static String files()\n\t{\n\t\tString path = dirpath + \"\\\\Server\\\\\";\n\t\tFile folder = new File(path);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tString msg1 = \"\";\n\n\t\tfor (int i = 0; i < listOfFiles.length; i++)\n\t\t{\n\t\t\tif (listOfFiles[i].isFile())\n\t\t\t{\n\t\t\t\tmsg1 = msg1 + \"&\" + listOfFiles[i].getName();\n\t\t\t}\n\t\t}\n\t\tmsg1 = msg1 + \"#\" + path + \"\\\\\";\n\t\treturn msg1;\n\t}", "@objid (\"116a5759-3df1-4c8b-bd9e-e521507f07e6\")\r\n public String searchFile() {\r\n String nomFichier = this.dialog.open();\r\n if ((nomFichier != null) && (nomFichier.length() != 0)) {\r\n this.currentFile = new File(nomFichier);\r\n this.text.setText(nomFichier);\r\n }\r\n return this.text.getText();\r\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 }", "public String getSubtitlesFileListPath() {\r\n\t\tif(isExistSubtitlesFileList())\r\n\t\t\treturn ArrayUtils.toStringComma(getSubtitlesFileList());\r\n\t\treturn \"\";\r\n\t}", "public void displayDirectoryList() {\r\n //-----------------------------------\r\n String appDirecotry = APP_INSTANCE.getAppDirectory();\r\n\r\n //-----------------------------------\r\n\r\n System.out.println(\"/// FILE LIST OF DIRECTORY: \"+appDirecotry);\r\n System.out.println(\"/// ------------------ START OF DIRECTORY FILES LIST -------------------\");\r\n\r\n //-----------------------------------\r\n getCurrentDirectoryFiles(appDirecotry).forEach(listItemFile-> {\r\n intProperty = (intProperty +1 );\r\n System.out.println(\"/// [\"+intProperty+\"] \"+listItemFile.getName());\r\n });\r\n\r\n //-----------------------------------\r\n System.out.println(\"/// ------------------- END OF DIRECTORY FILES LIST --------------------\");\r\n }", "@Test\n\tpublic void test(){\n\t\tFile srcFile = new File(\"E:\\\\Workspaces\\\\MyPro\\\\ssh\\\\WebRoot\\\\products\\\\2\\\\男鞋\");\n//\t\tSystem.out.println(ss);\n\t\tthis.getAllJavaFilePaths(srcFile);\n\t}", "public static void main(String[] args) {\n File directoryPath = new File(\"C:\\\\Users\\\\jarek\\\\Downloads\");\n //List of all files and directories\n String[] contents = directoryPath.list();\n\n Pattern p= Pattern.compile(\"zip$\");\n Matcher m;\n Vector<String> lis = new Vector<>();\n for(int i = 0; i< Objects.requireNonNull(contents).length; i++){\n m=p.matcher(contents[i]);\n if(m.find()) lis.addElement(contents[i]);\n }\n System.out.println(\"List of files and directories in the specified directory:\");\n for (String content : contents) {\n System.out.println(content);\n }\n }", "public void seleccionarFichero(){\n JFileChooser fileChooser = new JFileChooser();\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"xml\", \"xml\");\n fileChooser.setFileFilter(filter);\n fileChooser.setCurrentDirectory(new java.io.File(\"./ficheros\"));\n int seleccion = fileChooser.showOpenDialog(vista_principal);\n if (seleccion == JFileChooser.APPROVE_OPTION){\n fichero = fileChooser.getSelectedFile();\n vista_principal.getTxtfield_nombre_fichero().\n setText(fichero.getName().substring(0, fichero.getName().length()-4));\n }\n }", "public void printFileNames() {\n DirectoryResource dr = new DirectoryResource();\n for (File f : dr.selectedFiles()) {\n System.out.println(f);\n }\n }", "static void viewFiles()\r\n\t {\n\t\t File directoryPath = new File(\"D:\\\\java_project\");\r\n\t File filesList[] = directoryPath.listFiles();\r\n System.out.println(\"List of files and directories in the specified directory:\");\r\n\t for(File file : filesList) \r\n\t {\r\n\t System.out.println(\"File name: \"+file.getName());\r\n\t System.out.println(\"File path: \"+file.getAbsolutePath());\r\n\t System.out.println(\"Size :\"+file.getTotalSpace());\r\n\t System.out.println(\"last time file is modified :\"+new Date(file.lastModified()));\r\n System.out.println(\" \");\r\n\t }\r\n }", "@Override\n protected String getFileSeparator() { return \"/\"; }", "entities.Torrent.FileInfo getFileInfo(int index);", "@FXML\n private void displayFilesFromDisc() {\n ReadOnlyObjectProperty<String> userModel = activeUsers.getSelectionModel().selectedItemProperty();\n String user = userModel.getValue();\n if (user == null) {\n return;\n }\n ObservableList<String> files = observableArrayList();\n files.addAll(Tools.GetAllFilesInDirectory(basePath + activeDisc + \"\\\\\" + user + \"\\\\\"));\n userFiles.setItems(files);\n System.out.println(basePath + activeDisc + \"\\\\\" + user + \"\\\\\");\n }", "public String getSzmainfilename() {\n return szmainfilename;\n }", "protected void loadExtensions()\n {\n // Load local extension from repository\n\n if (this.rootFolder.exists()) {\n FilenameFilter descriptorFilter = new FilenameFilter()\n {\n public boolean accept(File dir, String name)\n {\n return name.endsWith(\".xed\");\n }\n };\n\n for (File child : this.rootFolder.listFiles(descriptorFilter)) {\n if (!child.isDirectory()) {\n try {\n LocalExtension localExtension = loadDescriptor(child);\n\n repository.addLocalExtension(localExtension);\n } catch (Exception e) {\n LOGGER.warn(\"Failed to load extension from file [\" + child + \"] in local repository\", e);\n }\n }\n }\n } else {\n this.rootFolder.mkdirs();\n }\n }", "private ArrayList<String> stagedButDiffInCWD() {\n ArrayList<String> result = new ArrayList<>();\n List<String> addingStage = Utils.plainFilenamesIn(INDEX);\n for (String file: addingStage) {\n File fileCWD = new File(Main.CWD, file);\n File stagedFile = new File(INDEX, file);\n if (!fileCWD.exists()) {\n String message = file + \" (deleted)\";\n result.add(message);\n } else {\n String contentOne = Utils.readContentsAsString(fileCWD);\n String contentTwo = Utils.readContentsAsString(stagedFile);\n if (!contentOne.equals(contentTwo)) {\n String message = file + \" (modified)\";\n result.add(message);\n }\n }\n }\n return result;\n }", "@Test\r\n public void testGetChangedFileList() throws IOException {\n helper.exportRevChangedFiles(PJ_ROOT, 1, LOCAL_ROOT);\r\n helper.exportRevChangedFiles(PJ_ROOT, 4, LOCAL_ROOT);\r\n //helper.exportRevChangedFiles(PJ_ROOT, -1, LOCAL_ROOT);\r\n //helper.exportRevChangedFiles(9, 9, true);\r\n }", "private void getDriveContents() {\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n // get only the folders in the root directory of drive account\n List<File> files = getContents(TOP_LEVEL + \" and \" + NOT_TRASHED + \" and \" + FOLDER + \" and \" + NOT_SPREADSHEET);\n \n prune(targetDir, files);\n processLanguages(files);\n }\n });\n t.start();\n }", "@Override\n public void findFiles_hdfs_native() throws Exception {\n assumeTrue( !isWindows() );\n super.findFiles_hdfs_native();\n }", "public int getXDir() {\r\n\t\treturn xDir;\r\n\t}", "private DefaultListModel<String> loadFileNames(){\r\n\t\tthis.fileNamesListModel.clear();\r\n\t\tfor(FileModel model : FileData.getAllFileModels()) {\r\n\t\t\tthis.fileNamesListModel.addElement(model.getName());\r\n\t\t}\r\n\t\treturn this.fileNamesListModel;\r\n\t}", "@Override\n public void run() {\n List<File> files = getContents(TOP_LEVEL + \" and \" + NOT_TRASHED + \" and \" + FOLDER + \" and \" + NOT_SPREADSHEET);\n \n prune(targetDir, files);\n processLanguages(files);\n }", "synchronized List<File> getRoots() {\n\t\t\treturn new ArrayList<>(roots);\n\t\t}", "protected abstract String childFolderPath();", "public interface FileSystem {\n\n /**\n * Add the specified file system entry (file or directory) to this file system\n *\n * @param entry - the FileSystemEntry to add\n */\n public void add(FileSystemEntry entry);\n\n /**\n * Return the List of FileSystemEntry objects for the files in the specified directory path. If the\n * path does not refer to a valid directory, then an empty List is returned.\n *\n * @param path - the path of the directory whose contents should be returned\n * @return the List of FileSystemEntry objects for all files in the specified directory may be empty\n */\n public List listFiles(String path);\n\n /**\n * Return the List of filenames in the specified directory path. The returned filenames do not\n * include a path. If the path does not refer to a valid directory, then an empty List is\n * returned.\n *\n * @param path - the path of the directory whose contents should be returned\n * @return the List of filenames (not including paths) for all files in the specified directory\n * may be empty\n * @throws AssertionError - if path is null\n */\n public List listNames(String path);\n\n /**\n * Delete the file or directory specified by the path. Return true if the file is successfully\n * deleted, false otherwise. If the path refers to a directory, it must be empty. Return false\n * if the path does not refer to a valid file or directory or if it is a non-empty directory.\n *\n * @param path - the path of the file or directory to delete\n * @return true if the file or directory is successfully deleted\n * @throws AssertionError - if path is null\n */\n public boolean delete(String path);\n\n /**\n * Rename the file or directory. Specify the FROM path and the TO path. Throw an exception if the FROM path or\n * the parent directory of the TO path do not exist; or if the rename fails for another reason.\n *\n * @param fromPath - the source (old) path + filename\n * @param toPath - the target (new) path + filename\n * @throws AssertionError - if fromPath or toPath is null\n * @throws FileSystemException - if the rename fails.\n */\n public void rename(String fromPath, String toPath);\n\n /**\n * Return the formatted directory listing entry for the file represented by the specified FileSystemEntry\n *\n * @param fileSystemEntry - the FileSystemEntry representing the file or directory entry to be formatted\n * @return the the formatted directory listing entry\n */\n public String formatDirectoryListing(FileSystemEntry fileSystemEntry);\n\n //-------------------------------------------------------------------------\n // Path-related Methods\n //-------------------------------------------------------------------------\n\n /**\n * Return true if there exists a file or directory at the specified path\n *\n * @param path - the path\n * @return true if the file/directory exists\n * @throws AssertionError - if path is null\n */\n public boolean exists(String path);\n\n /**\n * Return true if the specified path designates an existing directory, false otherwise\n *\n * @param path - the path\n * @return true if path is a directory, false otherwise\n * @throws AssertionError - if path is null\n */\n public boolean isDirectory(String path);\n\n /**\n * Return true if the specified path designates an existing file, false otherwise\n *\n * @param path - the path\n * @return true if path is a file, false otherwise\n * @throws AssertionError - if path is null\n */\n public boolean isFile(String path);\n\n /**\n * Return true if the specified path designates an absolute file path. What\n * constitutes an absolute path is dependent on the file system implementation.\n *\n * @param path - the path\n * @return true if path is absolute, false otherwise\n * @throws AssertionError - if path is null\n */\n public boolean isAbsolute(String path);\n\n /**\n * Build a path from the two path components. Concatenate path1 and path2. Insert the file system-dependent\n * separator character in between if necessary (i.e., if both are non-empty and path1 does not already\n * end with a separator character AND path2 does not begin with one).\n *\n * @param path1 - the first path component may be null or empty\n * @param path2 - the second path component may be null or empty\n * @return the path resulting from concatenating path1 to path2\n */\n public String path(String path1, String path2);\n\n /**\n * Returns the FileSystemEntry object representing the file system entry at the specified path, or null\n * if the path does not specify an existing file or directory within this file system.\n *\n * @param path - the path of the file or directory within this file system\n * @return the FileSystemEntry containing the information for the file or directory, or else null\n */\n public FileSystemEntry getEntry(String path);\n\n /**\n * Return the parent path of the specified path. If <code>path</code> specifies a filename,\n * then this method returns the path of the directory containing that file. If <code>path</code>\n * specifies a directory, the this method returns its parent directory. If <code>path</code> is\n * empty or does not have a parent component, then return an empty string.\n * <p/>\n * All path separators in the returned path are converted to the system-dependent separator character.\n *\n * @param path - the path\n * @return the parent of the specified path, or null if <code>path</code> has no parent\n * @throws AssertionError - if path is null\n */\n public String getParent(String path);\n\n}", "@Override\n public boolean isDir() { return true; }", "@DISPID(34)\r\n\t// = 0x22. The runtime will prefer the VTID if present\r\n\t@VTID(39)\r\n\tjava.lang.String path();", "private void updateListView() {\n fileList.getItems().setAll(files.readList());\n //System.out.println(System.currentTimeMillis() - start + \" мс\");\n }", "public String getFileNamingDetails();", "private void refreshList() {\n setTitle(this.path.get(this.path.size() - 1));\n\n // Read all files sorted into the values-array\n values.clear();\n File dir = new File(this.path.get(this.path.size() - 1));\n if (!dir.canRead()) {\n setTitle(getTitle() + \" (inaccessible)\");\n }\n String[] list = dir.list();\n if (list != null) {\n for (String file : list) {\n if (!file.startsWith(\".\")) {\n values.add(file);\n }\n }\n }\n Collections.sort(values);\n }", "public void lesArkivFraFil(String filnavn) throws Exception {\n\t\tScanner fil = new Scanner(new File(filnavn));\n\n\t\t/*\n\t\t * Leser filen som en tilstandsmaskin med følgende gyldige tilstander:\n\t\t * \n\t\t * State 0: Leser navn, har ikke passert første bindestrek\n\t\t * State 1: Leser ett navn i forkant av DVD-liste\n\t\t * State 2: Leser DVD-titler\n\t\t * State 3: Har lest lånt DVD-tittel. Neste linje inneholder låner.\n\t\t */\n\t\t\n\t\tint state = 0;\n\n\t\tPerson eier = null;\n\t\tString laantTittel = null;\n\t\t\n\t\twhile (fil.hasNextLine()) {\n\t\t\tString linje = fil.nextLine();\n\n\t\t\tswitch (state) {\n\t\t\tcase 0:\n\t\t\t\t// Skilletegn indikerer at opplisting av personer som skal registreres er ferdig. State endres til 1.\n\t\t\t\tif (\"-\".equals(linje)) {\n\t\t\t\t\tstate = 1;\n\t\t\t\t} else {\n\t\t\t\t\tlagNyPerson(linje);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\tcase 1:\n\t\t\t\t// Henter opp eier slik at vi for de neste linjene kan legge DVD-er på denne eieren.\n\t\t\t\teier = navneliste.get(linje);\n\t\t\t\t\n\t\t\t\t// Flytter umiddelbart til state 2\n\t\t\t\tstate = 2;\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t/* \n\t\t\t\t * Skilletegn indikerer at opplisting av eide/utlaante DVD-er for en person er ferdig.\n\t\t\t\t * Flytter til state 1 slik at programmet er klart for ny person.\n\t\t\t\t */\n\t\t\t\tif (\"-\".equals(linje)) {\n\t\t\t\t\tstate = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString tittel = linje;\n\t\t\t\t\n\t\t\t\t// Stjerne indikerer at DVD-en er utlaant.\n\t\t\t\tif (tittel.startsWith(\"*\")) {\n\t\t\t\t\t// Fjerner stjernen fra tittelen.\n\t\t\t\t\ttittel = tittel.substring(1);\n\t\t\t\t\tlaantTittel = tittel;\n\t\t\t\t\t\n\t\t\t\t\t// Flytter til state 3 for å kunne registrere hvem som laaner DVD-en\n\t\t\t\t\tstate = 3;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Uansett om DVD-en er kun eiet, eller baade eiet og utlaant, skal DVD-en legges til personen.\n\t\t\t\teier.leggTilDVD(tittel);\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\tcase 3:\n\t\t\t\t// Registrere laanet\n\t\t\t\tlaan(linje, eier.getNavn(), laantTittel);\n\t\t\t\t\n\t\t\t\t// Returnerer til state 2 for å kunne registrere nye titler på personen\n\t\t\t\tstate = 2;\n\t\t\t\tlaantTittel = null;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tfil.close();\n\t}", "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}", "abstract protected String getWrapperFileNameBase();", "public synchronized Hashtable getFileList(String wc) throws IOException {\r\n Hashtable ht = new Hashtable();\r\n String pattern = translatePattern(wc);\r\n\tout.rlsWrite(\"lrc_get_pfn_wc\"); // RPC call name\r\n\tout.rlsWrite(pattern); // LFN being looked for\r\n\tout.rlsWrite(\"0\"); // offset\r\n\tout.rlsWrite(\"0\"); // max results\r\n \r\n\tint res = (int)in.rlsReadLong();\r\n if (res == 12) {\r\n // If we get \"LFN does not exist\", return empty hashtable rather than\r\n // throwing an exception\r\n in.rlsRead();\r\n return ht;\r\n }\r\n\r\n\tif (res != 0) {\r\n in.rlsRead();\r\n\t throw new IOException(\"Error getting file locations for \" + wc +\r\n\t\t\t\t \" from RLS: \" + errorCodeToString(res));\r\n\t}\r\n\r\n String lfn = in.rlsRead();\r\n if (lfn.length() == 0) {\r\n // empty result set\r\n return ht;\r\n }\r\n String pfn = in.rlsRead();\r\n\r\n String oldlfn = lfn;\r\n \r\n Vector v = new Vector();\r\n\r\n v.add(pfn);\r\n\r\n // loop over lfn/pfn pairs returned\r\n while (pfn.length() > 0) {\r\n\r\n if (!oldlfn.equals(lfn)) {\r\n ht.put(oldlfn, v);\r\n v = new Vector();\r\n }\r\n v.add(pfn);\r\n\r\n oldlfn = lfn;\r\n lfn = in.rlsRead();\r\n if (lfn.length() == 0) {\r\n ht.put(oldlfn, v);\r\n return ht;\r\n }\r\n pfn = in.rlsRead();\r\n }\r\n\r\n ht.put(oldlfn, v);\r\n\r\n return ht;\r\n }", "@Override\n\tprotected void rethinkSearchStrings() {\n\t\tsearchStrings = new String[world.getNumItemBases()];\n\t\tint i = 0;\n\t\tfor (Map.Entry<String, ItemBase> entry : world.getItemBaseMap().entrySet()) {\n\t\t\tsearchStrings[i] = entry.getValue().getFilePath();\n\t\t\ti++;\n\t\t}\n\t}", "static List<Path> getStoreFiles(FileSystem fs, Path regionDir) throws IOException {\n List<Path> regionHFiles = new ArrayList<Path>();\n PathFilter dirFilter = new FSUtils.DirFilter(fs);\n FileStatus[] familyDirs = fs.listStatus(regionDir, dirFilter);\n for (FileStatus dir : familyDirs) {\n FileStatus[] files = fs.listStatus(dir.getPath());\n for (FileStatus file : files) {\n if (!file.isDirectory() && (!file.getPath().toString()\n .contains(HConstants.HREGION_OLDLOGDIR_NAME)) && (!file.getPath().toString()\n .contains(HConstants.RECOVERED_EDITS_DIR))) {\n regionHFiles.add(file.getPath());\n }\n }\n }\n return regionHFiles;\n }", "public java.util.List<entities.Torrent.FileInfo> getFileInfoList() {\n if (fileInfoBuilder_ == null) {\n return java.util.Collections.unmodifiableList(fileInfo_);\n } else {\n return fileInfoBuilder_.getMessageList();\n }\n }", "public boolean isDir() { return _entry==null; }", "public abstract List<String> getFiles( );", "java.util.List<com.google.devtools.kythe.proto.Analysis.FileInfo> \n getEntryList();", "public void getFiles()\n\t{\n\t\tif(fileList.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"There is no file or file not found\");\n\t\t}\n\t\tfor(int i = 0; i < fileList.size(); i++)\n\t\t{\n\t\t\tSystem.out.println(\"File is at: \" + fileList.get(i));\n\t\t}\n\t}", "private void saveExternalFilesList() {\n List<String> extFiles = new ArrayList<>();\n journalFiles.forEach(file -> {\n if (!file.isBuiltInListProperty().get()) {\n file.getAbsolutePath().ifPresent(path -> extFiles.add(path.toAbsolutePath().toString()));\n }\n });\n abbreviationsPreferences.setExternalJournalLists(extFiles);\n }", "FileObject getBaseFolder();", "private static void showFiles(File f) {\n\t\n}" ]
[ "0.58303034", "0.55938745", "0.5531319", "0.5453461", "0.54481965", "0.5381681", "0.53646845", "0.5325024", "0.529618", "0.5257775", "0.525299", "0.5227034", "0.5223768", "0.5214715", "0.5211143", "0.5207958", "0.5181605", "0.5177682", "0.51712126", "0.51587635", "0.5155693", "0.51553947", "0.515212", "0.51404315", "0.50876427", "0.5082646", "0.5081373", "0.5076641", "0.50696355", "0.5066149", "0.50550234", "0.5047657", "0.5030493", "0.50284374", "0.5028258", "0.5022577", "0.50206536", "0.5019729", "0.5016933", "0.5016933", "0.5006702", "0.5000775", "0.5000775", "0.4998925", "0.49924722", "0.4980683", "0.49790302", "0.49774054", "0.49756983", "0.49734557", "0.49671713", "0.49636975", "0.49594295", "0.4958839", "0.49382523", "0.49375963", "0.4936271", "0.49302557", "0.4923649", "0.4919178", "0.49189186", "0.49154407", "0.4900836", "0.49004138", "0.4896227", "0.4895801", "0.48867044", "0.4885517", "0.4882434", "0.48750904", "0.4874126", "0.48735225", "0.4867341", "0.48638076", "0.48628262", "0.48541334", "0.4853767", "0.48460162", "0.4845185", "0.48449817", "0.48401055", "0.48358598", "0.4833635", "0.48293006", "0.48244324", "0.48201677", "0.48148447", "0.48145217", "0.4810389", "0.48095056", "0.4808353", "0.48071414", "0.4806565", "0.48025122", "0.47990596", "0.47969517", "0.4795169", "0.47946352", "0.479344", "0.4791326" ]
0.6004824
0
Hochladen einer Datei nach XtreemFS
private OutputStream uploadFile(String filename) { try { // Output stream to write to File file = getFile(getCurrentDir() + "/" + filename, getCredentials()); return new BufferedFileOutputStream(file); } catch (IOException e) { showNotification("Error", e.toString(), Notification.TYPE_ERROR_MESSAGE, e); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "org.apache.xmlbeans.XmlString xgetFoundingDate();", "org.apache.xmlbeans.XmlDateTime xgetLastrun();", "public static String getUltimaFiesta() {\n Map<String, DiaFiestaMeta> diasFiestas;\n Iterator<String> itDiasFiestasMeta;\n SimpleDateFormat formatoDelTexto ;\n Map<String, Date> mapFiestaDia = new HashMap<>(); // \"uidFiesta:tituloDiaFiestaFormateado\"\n HashSet<Fiestas> fiestas;\n Date fechaMasReciente;\n String uidFiestaMasReciente;\n Iterator<String> itmapFiestaDia;\n\n Date date = new Date();\n formatoDelTexto = new SimpleDateFormat(\"dd MMMM yyyy\",new Locale(\"es\",\"ES\"));\n String strDate =formatoDelTexto.format(date);\n uidFiestaMasReciente =\"\";\n try {\n fechaMasReciente = formatoDelTexto.parse(\"15 Junio 1980\");\n } catch (ParseException e) {\n fechaMasReciente = new Date();\n e.printStackTrace();\n }\n fiestas = (HashSet) baseDatos.get(Tablas.Fiestas.name());\n for (Fiestas fiesta : fiestas){\n diasFiestas = fiesta.getDiasFiestas();\n itDiasFiestasMeta = diasFiestas.keySet().iterator();\n while (itDiasFiestasMeta.hasNext()){\n String keyDia = itDiasFiestasMeta.next();\n DiaFiestaMeta diaFiestaMeta = diasFiestas.get(keyDia);\n mapFiestaDia.put(fiesta.getUidFiestas(), formatearDia(diaFiestaMeta.getTituloDiaFiesta(), fiesta.getUidFiestas()));\n }\n }\n\n itmapFiestaDia = mapFiestaDia.keySet().iterator();\n while (itmapFiestaDia.hasNext()) {\n String key = itmapFiestaDia.next();\n Date fechaI = mapFiestaDia.get(key);\n if (fechaI.after(fechaMasReciente)) {\n uidFiestaMasReciente = key;\n fechaMasReciente = fechaI;\n }\n }\n return uidFiestaMasReciente;\n }", "java.lang.String getFoundingDate();", "org.apache.xmlbeans.XmlString xgetDate();", "org.apache.xmlbeans.XmlDateTime xgetNextrun();", "public Date getFileDate()\r\n {\r\n return dFileDate;\r\n }", "void xsetFoundingDate(org.apache.xmlbeans.XmlString foundingDate);", "public void test_fn_current_date_19() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-19.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-19.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_current_date_13() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-13.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-13.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void liesDaten(String datei) throws IOException {\n pm.openForReading(datei);\n Artikel einArtikel;\n do {\n einArtikel = pm.ladeArtikel();\n if (einArtikel != null) {\n try {\n einfuegen(einArtikel);\n } catch (ArtikelExistiertBereitsException e1) {}\n }\n } while (einArtikel != null);\n pm.close();\n }", "public abstract java.lang.String getFecha_inicio();", "public void test_fn_current_date_16() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-16.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-16.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_current_date_17() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-17.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-17.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_current_date_9() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-9.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-9.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "private String getFileOftheDay() throws IOException {\n Calendar calendar = Calendar.getInstance();\n int day = calendar.get(Calendar.DAY_OF_WEEK);\n if (Calendar.SUNDAY == day) {\n day = Calendar.SATURDAY;\n } else if (Calendar.MONDAY <= day && Calendar.SATURDAY >= day) {\n day -= 1;\n }\n return (pathFiles + \"h_\" + day + \"_\" + getCustomerCode() + \".xml\");\n }", "abstract protected Map<DataDate, ArrayList<String>> ListDatesFilesFTP();", "public void schreibeDaten() throws IOException{\r\n\t\tav.schreibeDaten(dateipfad + \"ARTIKEL.txt\"); \r\n\t\tkv.schreibeDaten(dateipfad + \"KUNDEN.txt\");\r\n\t\tmv.schreibeDaten(dateipfad + \"MITARBEITER.txt\");\r\n\t\tev.schreibeDaten(dateipfad + \"EREIGNISSE.txt\");\r\n\t}", "public void test_fn_current_date_3() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-3.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-3.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n Date expectedDate = new Date();\n DateFormat expectedFormat = new SimpleDateFormat(\"MM\");\n \n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", Integer.valueOf(expectedFormat.format(expectedDate)).toString(), actual);\n \n }", "public void test_fn_current_date_21() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-21.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-21.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n \t fail(\"Returned:\" + actual);\n \n } catch (StaticError ex) {\n actual = ex.code();\n \t fail(\"Returned:\" + actual);\n \n } catch (DynamicError ex) {\n actual = ex.code();\n \t fail(\"Returned:\" + actual);\n \n }\n \n }", "public void test_fn_current_date_14() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-14.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-14.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_current_date_18() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-18.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-18.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_current_date_4() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-4.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-4.txt\";\n String expectedResult = getExpectedResult(resultFile);\n Calendar cal = null;\n \n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n\t cal = dc.current_date_time();\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n assertEquals(\"XPath Result Error \" + xqFile + \":\", Integer.toString(cal.get(Calendar.DAY_OF_MONTH)), actual);\n \n \n }", "public void test_fn_current_date_7() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-7.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-7.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertNotNull(actual);\n //assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_current_date_11() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-11.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-11.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n \t fail(\"Returned:\" + actual);\n \n } catch (StaticError ex) {\n actual = ex.code();\n \t fail(\"Returned:\" + actual);\n \n } catch (DynamicError ex) {\n actual = ex.code();\n \t fail(\"Returned:\" + actual);\n \n } \n \n }", "public void schreibeDaten(String datei) throws IOException {\n pm.openForWriting(datei);\n\n if (!artikelBestand.isEmpty()) {\n Iterator iter = artikelBestand.iterator();\n while (iter.hasNext()) {\n Artikel a = (Artikel) iter.next();\n pm.speichereArtikel(a);\n }\n }\n pm.close();\n }", "public void test_fn_current_date_6() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-6.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-6.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertNotNull(actual);\n //assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "XMLGregorianCalendar getSystemEntryDate();", "public void test_fn_current_date_20() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-20.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-20.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_fn_current_date_12() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-12.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-12.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "@Override\n\tpublic java.util.Date getLastSavePoint() {\n\t\treturn _keHoachKiemDemNuoc.getLastSavePoint();\n\t}", "public void test_fn_current_date_2() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-2.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-2.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertTrue(\"XPath Result Error \" + xqFile + \":\", actual.compareTo(expectedResult) >= 0);\n \n \n }", "public void test_fn_current_date_8() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-8.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/\";\n String expectedResult = \"XPST0017\";\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n }", "public void test_fn_current_date_15() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-15.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-15.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "void xsetLastrun(org.apache.xmlbeans.XmlDateTime lastrun);", "public void test_fn_current_date_10() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-10.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-10.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n \t fail(\"Returned:\" + actual);\n } catch (StaticError ex) {\n actual = ex.code();\n \t fail(\"Returned:\" + actual);\n } catch (DynamicError ex) {\n actual = ex.code();\n \t fail(\"Returned:\" + actual);\n } \n \n }", "public void test_fn_current_date_1() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-1.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-1.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertTrue(\"XPath Result Error \" + xqFile + \":\", actual.compareTo(expectedResult) >= 0);\n \n \n }", "public void test_fn_current_date_5() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-5.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/ContextFunc/ContextCurrentDateFunc/fn-current-date-5.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void datei (String datei) {\n\t\tthis.datei = datei;\n\t\tzwischenspeicher.clear();\n\t}", "public synchronized void schreibeDaten(String datei) throws IOException {\n\t\t// PersistenzManager fuer Schreibvorgaenge oeffnen\n\t\tpm.openForWriting(datei);\n\n\t\tif (!artikelBestand.isEmpty()) {\n\t\t\tIterator<Artikel> iter = artikelBestand.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tpm.speichereArtikel(iter.next());\t\t\t\t\n\t\t\t}\n\t\t}\t\t\t\n\t\t\n\t\t// Persistenz-Schnittstelle wieder schließen\n\t\tpm.close();\n\t}", "public void enviarConviteExame(LocalDate dataExame) {\n }", "public static void main(String[] args) {\n Date date = new Date();\n System.out.println(date);\n System.out.println(getLocalDate(date));\n System.out.println(getDateFrom(date, -1));\n System.out.println(getDateFrom(date, 1));\n }", "abstract protected Map<DataDate, ArrayList<String>> ListDatesFilesHTTP();", "public long getDate()\r\n/* 204: */ {\r\n/* 205:309 */ return getFirstDate(\"Date\");\r\n/* 206: */ }", "@Override\n\t\tpublic long getDateHeader(String name) {\n\t\t\treturn 0;\n\t\t}", "public void liesDaten(String datei) throws IOException {\n\t\t// PersistenzManager fuer Lesevorgaenge oeffnen\n\t\tpm.openForReading(datei);\n\n\t\tArtikel einArtikel;\n\t\tdo {\n\t\t\t// Artikel-Objekt einlesen\n\t\t\teinArtikel = pm.ladeArtikel();\n\t\t\tif (einArtikel != null) {\n\t\t\t\t// Artikel in die Liste einfuegen\n\t\t\t\ttry {\n\t\t\t\t\teinfuegen(einArtikel);\n\t\t\t\t} catch (ArtikelExistiertBereitsException e) {\n\t\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t} while (einArtikel != null);\n\n\t\t// Persistenz-Schnittstelle wieder schließen\n\t\tpm.close();\n\t}", "private String[] getDateiNamen() {\n\t\tString[] dateiNamen = new String[2];\n\t\t\n\n\t\t// Nun also Dateinamen fuer Ein- und Ausgabedatei\n\t\tString eingabe = new String(\"\");\n\t\tString eingabeDatei = new String(\"\");\n\t\tString ausgabeDatei = new String(\"\");\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tboolean wiederhole3;\n\t\t\n\t\tdo {\n\t\t\twiederhole3 = true;\n\t\t\teingabe = \"\";\t\n\t\t\tSystem.out.println(\"Weiter geht's mit den Dateinamen. Bitte geben sie innerhalb einer Eingabe zuerst den der Eingabedatei,\\ndanach den der Ausgabedatei an und trennen sie die Beiden mittels '%'!\\nFaellt Ihnen kein Name ein, werden Standart-Namen (Input := startDatei.txt; Output := endDatei.txt) verwendet.\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\teingabe = br.readLine().trim();\n\t\t\t\tif(eingabe.equals(\"\")) {\n\t\t\t\t\teingabe = \"startDatei.txt%endDatei.txt\";\n\t\t\t\t}\n\t\t\t\telse if(!eingabe.contains(\"%\")) {\n\t\t\t\t\tSystem.out.println(\"Da in ihrer Eingabe kein Trenn-Operator vorhanden war, benutzen wir die Eingabe als Start-Dateinamen.\");\n\t\t\t\t\teingabe = new String(eingabe + \"%\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcatch(IOException ioex) {\n\t\t\t\tSystem.out.println(\"Konnte die Eingabe nicht lesen! Bitte versuchen sie es erneut!\");\n\t\t\t\teingabe = \"startDatei.txt%endDatei.txt\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(eingabeDatei);\n\t\t\tSystem.out.println(ausgabeDatei);\n\t\t\t// Fallunterscheidung der Dateinamen\n\t\t\t\n\t\t\t\n\t\t\tString[] getrennteNamen = eingabe.split(\"%\");\n\t\t\tif(getrennteNamen.length == 1) {\n\t\t\t\teingabeDatei = eingabe.split(\"%\")[0];\n\t\t\t\tausgabeDatei = \"endDatei.txt\";\n\t\t\t}\n\t\t\telse if(getrennteNamen.length == 2) {\n\t\t\t\teingabeDatei = eingabe.split(\"%\")[0];\n\t\t\t\tif(eingabeDatei.equals(\"\")) {\n\t\t\t\t\teingabeDatei = \"startDatei\";\n\t\t\t\t}\n\t\t\t\tausgabeDatei = eingabe.split(\"%\")[1];\n\t\t\t}\n\t\t\telse if(getrennteNamen.length > 2) {\n\t\t\t\tSystem.out.println(\"Mehr als zwei Namen sind nicht zulaessig, es werden Standard-Namen verwendet.\");\n\t\t\t\teingabeDatei = \"startDatei.txt\";\n\t\t\t\tausgabeDatei = \"endDatei.txt\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Es wird versucht auf die Datei 'startDatei.txt' zuzugreifen.\");\n\t\t\t\teingabeDatei = \"startDatei.txt\";\n\t\t\t\tausgabeDatei = \"endDatei.txt\";\n\t\t\t}\n\t\t\t\t\n\t\t\twiederhole3 = false;\n\t\t}\n\t\twhile(wiederhole3);\n\t\t\n\t\tdateiNamen[0] = eingabeDatei;\n\t\tdateiNamen[1] = ausgabeDatei;\n\t\t\n\t\treturn dateiNamen;\n\t}", "public static IndexLocalDate recoverIndexFromDisk(String fileRootPath, String keyWord){\n String fileName = fileRootPath + \"/boolean_index/local_dates/\" + keyWord;\n return (IndexLocalDate) DiskIOHandler.readObjectFromFile(fileName);\n }", "public Timestamp getDateDoc();", "public Timestamp getDateDoc();", "public Timestamp getDateDoc();", "private static String fechaMod(File imagen) {\n\t\tlong tiempo = imagen.lastModified();\n\t\tDate d = new Date(tiempo);\n\t\tCalendar c = new GregorianCalendar();\n\t\tc.setTime(d);\n\t\tString dia = Integer.toString(c.get(Calendar.DATE));\n\t\tString mes = Integer.toString(c.get(Calendar.MONTH));\n\t\tString anyo = Integer.toString(c.get(Calendar.YEAR));\n\t\tString hora = Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\tString minuto = Integer.toString(c.get(Calendar.MINUTE));\n\t\tString segundo = Integer.toString(c.get(Calendar.SECOND));\n\t\treturn hora+\":\"+minuto+\":\"+segundo+\" - \"+ dia+\"/\"+mes+\"/\"+\n\t\tanyo;\n\t}", "public void setFileDate(Date fileDate)\r\n {\r\n dFileDate = fileDate;\r\n }", "Date getWorkfileLastChangedDate();", "void xsetDate(org.apache.xmlbeans.XmlString date);", "String getDate();", "String getDate();", "public Date getGioBatDau();", "java.lang.String getDate();", "public Timestamp getDateTrx();", "public Timestamp getDateTrx();", "public int trimestre(LocalDate d);", "public java.util.Date getDate(){\n return localDate;\n }", "public abstract java.lang.String getFecha_termino();", "@Override\n public final Date getDocumentDate() {\n return this.manufacture.getItsDate();\n }", "private void affichageDateFin() {\r\n\t\tif (dateFinComptage!=null){\r\n\t\t\tSystem.out.println(\"Le comptage est clos depuis le \"+ DateUtils.format(dateFinComptage));\r\n\t\t\tif (nbElements==0){\r\n\t\t\t\tSystem.out.println(\"Le comptage est clos mais n'a pas d'éléments. Le comptage est en anomalie.\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Le comptage est clos et est OK.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Le compte est actif.\");\r\n\t\t}\r\n\t}", "protected Date findFirstGenDate(GenCtx ctx)\n\t{\n\t\treturn EX.assertn(ctx.get(Date.class));\n\t}", "void unsetFoundingDate();", "Date getDate();", "Date getDate();", "Date getDate();", "boolean isSetFoundingDate();", "public org.apache.xmlbeans.XmlString xgetDateOpen()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(DATEOPEN$2, 0);\n return target;\n }\n }", "DateFormat getSourceDateFormat();", "public Timestamp getHC_WorkStartDate2();", "@Override\n\tpublic void initDate() {\n\n\t}", "@Override\n public void date_()\n {\n }", "java.lang.String getField1980();", "long getDate();", "Date getDataIns();", "public void GetFileDates (long in_start_date, long in_end_date) {\n\n\n\n\n}", "void get_timestamp (int reversed)\n{\n BytePtr str = new BytePtr(20);\n int i;\n\n if (timestamp != 0) return;\n str.at(19, (byte)0);\n if (reversed != 0)\n for (i=19; i-- != 0; ) str.at(i, (byte)CTOJ.fgetc(ifp));\n else\n CTOJ.fread (str, 19, 1, ifp);\n\n int year = ( str.at(0) - '0')*1000 + (str.at(1) - '0')*100 + (str.at(2) - '0' )*10 + str.at(3) - '0';\n int mon = (str.at(5) - '0')*10 + str.at(6)-'0';\n int day = (str.at(8) - '0')*10 + str.at(9)-'0';\n int hour = (str.at(11) - '0')*10 + str.at(12)-'0';\n int min = (str.at(14) - '0')*10 + str.at(15)-'0';\n int sec = (str.at(17) - '0')*10 + str.at(18)-'0';\n \n Calendar cal = new GregorianCalendar();\n cal.set(year,mon-1,day,hour,min,sec);\n timestamp = cal.getTimeInMillis();\n}", "public getForecast() {\n\t\t\n\t\t\n\t\tString finalePrevisioni; //stringa dove metteremo le previsioni\n\t\t\n\t\tFileReader f= null;\n try {\n f =new FileReader(\"Previsioni.txt\");\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n /*\n * quello che facciamo è vedere se la data nel nostro file cosrripsonde alla data di oggi\n */\n \n\n BufferedReader b;\n b=new BufferedReader(f);\n \n String MeteoCorrente = \"\";\n String line = \"\";\n \n try {\n while((line = b.readLine())!=null) {\n MeteoCorrente += line;\n if (MeteoCorrente.length()==19) break;\n // ci basta leggere questi caratteri per scoprire la data\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n \n \n try {\n\t\t\tb.close();\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n \n\t\t\n\t\t\n\t\tString dataFile = MeteoCorrente.substring(9,19);\n\t\t\n\t\t//data di oggi\n \n\t\tDateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\"); \n\t\tLocalDateTime now = LocalDateTime.now(); \n\t\t\n\t\tString dataOggi = (String) dtf.format(now);\n\t\t\n\t\t//se le date sono diverse\n\t\t\n\t\tif (!(dataFile.equals(dataOggi))) {\n\t\t\n\t\t//si aggiorna il file di appoggio così da avere i dati sul meteo aggiornati\t\n\t\t// essendo nello stesso package posso invocare il metodo senza dover importare la classe visto che sia\n\t\t//la classe che il metodo sono public\n\t updateWeeklyForecast.update();\n\t\t\t\n\t\tString parte1 = MeteoCorrente.substring(0,9);\n\t\t//si aggiorna la data\n\t\tString parte2 = dataOggi;\n\t\t//le nuove previsoni vengono aggiunte per prime così che ci aiuti nel prelevare i dati più aggiornati\n\t\t//nei metodi successivi\n\t\tString parte3 = MeteoCorrente.substring(19,35);\n\t\t\t\n \n \n\t\tString meteo2 = MeteoCorrente.substring(35);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tFileReader fi= null;\n try {\n fi =new FileReader(\"appoggio.txt\");\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n //appoggio\n\n BufferedReader a;\n a=new BufferedReader(fi);\n \n String meteo = \"\";\n String lin = \"\";\n \n try {\n while((lin = a.readLine())!=null) {\n meteo += lin;\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n \n \n //essendo sotto forma di array rimuoviamo le parentesi quadre\n \n String meteo3 = meteo.substring(1, meteo.length()-1);\n \n File file = new File(\"Previsioni.txt\");\n\t\t\n\t\t FileWriter fileWriter = null;\n\t\t try {\n\t\t fileWriter = new FileWriter(file);\n\t\t } catch (IOException e) {\n\t\t \n\t\t e.printStackTrace();\n\t\t }\n\t\t \n\t\t BufferedWriter bufferedWriter = null;\n\t\t bufferedWriter=new BufferedWriter(fileWriter);\n\t\t \n\t\t //uniamo le varie stringhe così da formare un JSONObject\n\t\t //(a virgola ha questo scopo, infatti noi abbiamo già aggiunto i dati e questo ci aiuta)\n\t\t //(se invece il file fosse vuoto la virgola ci avrebbe creato dei problemi nelle varie codifiche)\n\t\t \n\t\t finalePrevisioni = parte1 + parte2 + parte3 + meteo3 + \", \" + meteo2;\n\t\t \n\t\t \n\t\t try {\n\t\t \tbufferedWriter.write(finalePrevisioni);\n\t\t \t\n\t\t } catch (IOException e) {\n\t\t // TODO Auto-generated catch block\n\t\t e.printStackTrace();\n\t\t }\n\t\t try\n\t\t {\n\t\t if ( bufferedWriter != null)\n\t\t bufferedWriter.close( );\n\t\t }\n\t\t catch ( IOException e) {e.printStackTrace();}\n\t\ttry {\n\t\t\tfileWriter.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n \n\t\n\t\t}\n\t\telse{ // caso in cui il file è già agiornato\n\t\t\t\n\t\t\t\n\t try {\n\t f =new FileReader(\"Previsioni.txt\");\n\t } catch (FileNotFoundException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t }\n\n\t \n\n\n\t BufferedReader c;\n\t c=new BufferedReader(f);\n\t \n\t MeteoCorrente = \"\";\n\t line = \"\";\n\t \n\t \n\t try {\n\t while((line = c.readLine())!=null) {\n\t MeteoCorrente += line;\n\t \n\t }\n\t } catch (IOException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t }\n\t finalePrevisioni = MeteoCorrente;\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//prendiamo ora il JSONObject di Previsioni e preleviamo il JSONArry con le previsioni\n\t\t\n\t\tJSONParser parser = new JSONParser();\n\t\tObject obj = null;\n\t\ttry {\n\t\t\tobj = parser.parse(finalePrevisioni);\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tJSONObject jsonObject = (JSONObject) obj;\n\t\t\n\t\tthis.previsioni =(JSONArray) jsonObject.get(\"previsioni\");\n\t\t\n\n\t}", "@Override\r\n\tpublic long getEntryDateTime() {\n\t\treturn 0;\r\n\t}", "@Test\n public void testGetDailyListingFromFileSystemInvalidDate() {\n ListingFileHelper instance = new ListingFileHelper();\n\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n GregorianCalendar calendar = new GregorianCalendar(2009, 0, 1);\n List<Listing> result = instance.getDailyListingFromFileSystem(new Date(calendar.getTimeInMillis()));\n \n assertTrue(result.isEmpty());\n }", "double kalkuliereZeit();", "public static String getBaseDate() {\n\t\tif (xml == null) return null;\n\t\treturn basedate;\n\t}", "@Override\n public List<String> getListOfDates() throws FlooringMasteryPersistenceException {\n \n List<String> listOfDates = new ArrayList<>();\n String dateToLoad = \"\"; \n String fileDirectory = System.getProperty(\"user.dir\"); // get the directory of where java was ran (this project's folder)\n \n File folder = new File(fileDirectory); // turn the directory string into a file\n File[] listOfFiles = folder.listFiles(); // get the list of files in the directory\n \n \n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n \n String nameOfFile = listOfFiles[i].getName(); // get the name of the file\n String numbersOnly = nameOfFile.replaceAll(\"[\\\\D]\", \"\"); // replace all non-number characters with whitespace\n\n if(numbersOnly.equals(\"\")){ // if there were no numbers in the file name (ex. pom.xml), do nothing\n \n }else{\n int dateOfFile = Integer.parseInt(numbersOnly); // get the numbers part of the file name\n int lengthOfdate = String.valueOf(dateOfFile).length(); // get the length of the int by converting it to a String and using .length\n if(lengthOfdate < numbersOnly.length()){ // if the leading 0 got chopped off when parsing\n dateToLoad = \"0\"+ dateOfFile; // add it back\n }else{\n dateToLoad = Integer.toString(dateOfFile); // otherwise if there were no leading 0s, set to the String version of dateOfFile, NOT dateToLoad, as that will have the previous date\n }\n listOfDates.add(dateToLoad);\n }\n \n }\n \n }\n \n return listOfDates;\n\n }", "public HISDate(Date date) {\r\n DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, Locale.GERMAN);\r\n Calendar cal = df.getCalendar();\r\n cal.setTime(date);\r\n this.year = cal.get(Calendar.YEAR);\r\n //logger.debug(\"year = \" + year);\r\n this.month = cal.get(Calendar.MONTH) + 1;\r\n //logger.debug(\"month = \" + month);\r\n this.day = cal.get(Calendar.DAY_OF_MONTH);\r\n //logger.debug(\"day = \" + day);\r\n this.weekday = cal.get(Calendar.DAY_OF_WEEK);\r\n this.weekOfYear = cal.get(Calendar.WEEK_OF_YEAR);\r\n this.weekOfMonth = cal.get(Calendar.WEEK_OF_MONTH);\r\n }", "void xsetNextrun(org.apache.xmlbeans.XmlDateTime nextrun);", "org.apache.xmlbeans.XmlDateTime xgetSearchWindowStart();", "private String datafil(boolean ny)\n\t{\n\t\tFile mappen = new File(\"data\");\n\t\tlong timestamp = 0;\n\n\t\tif (ny || !mappen.exists())\n\t\t{\n\t\t\ttimestamp = new Date().getTime();\n\n\t\t\tif (!mappen.exists())\n\t\t\t\tmappen.mkdir();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (String s : mappen.list())\n\t\t\t{\n\t\t\t\t// for hver fil i mappen\n\t\t\t\t// sjekk at filnavnet\n\t\t\t\t// begynner paa \"register_\"\n\t\t\t\t// slutter paa \".dta\"\n\t\t\t\t// og inneholder en long-verdi imellom\n\t\t\t\tif (s.length() > 14 &&\n\t\t\t\t\t\ts.substring(0, 9).equals(\"register_\") &&\n\t\t\t\t\t\ts.substring(s.length() - 4).equals(\".dta\") &&\n\t\t\t\t\t\terLong(s.substring(9, s.length() - 4)))\n\t\t\t\t{\n\t\t\t\t\tlong j = Long.parseLong(s.substring(9, s.length() - 4));\n\n\t\t\t\t\tif (j > timestamp)\n\t\t\t\t\t\ttimestamp = j;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (timestamp == 0)\n\t\t\t\ttimestamp = new Date().getTime();\n\t\t}\n\n\t\treturn \"data\" + File.separator + \"register_\" + timestamp + \".dta\";\n\t}", "public Date getPubDate();", "public void FermerAgd() {\n //on essaye d'ouvrir un fichier dans lequel enregistrer le contenu de l'agenda\n try {\n Formatter agd_a_enreg = new Formatter(\"C:\\\\Projet_Agenda_ING3\\\\saved_agendas\");\n\n for (RdV el : this.getAgenda()) {\n //on enregistre 1 rdv par ligne\n //faire gaffe aux formats : %..\n agd_a_enreg.format(\"%s/%s/%s de %s a %s : %s , %s\\n\",\n el.getDate().getDayOfMonth(), el.getDate().getMonthValue(),\n el.getDate().getYear(), el.getHdebut(),\n el.getHfin(), el.getLibelle(), el.getRappel());\n //on supprime le rdv de l'arraylist d'agenda \n this.suppressionRdV(el);\n }\n //on ferme le fichier en ecriture\n agd_a_enreg.close();\n //on met l'attribut agenda à null une fois qu'il est \"vidé\"\n this.agd = null;\n } //en cas de probleme dans l'ouverture du fichier on affiche une erreur\n catch (Exception e) {\n System.out.print(\"Erreur d'ouverture du fichier en ecriture\\n\");\n }\n\n }", "private void loadXtreemFSData() {\n IndexedContainer xtreemFSData = createFields();\n\n // Die IDs werden zum Verschieben von Dateien gebraucht.\n VaadinXtreemFSSession.setDirectoryIds(new ArrayList<Object>());\n\n if (getVolume() != null) {\n try {\n int i = 1;\n\n // Alle Elemente einfügen\n String currentDir = getCurrentDir();\n for (DirectoryEntry e : listEntries(currentDir)) {\n // .. im Home-Dir ausblenden\n if (getHomeDir() == null\n || getHomeDir() != null\n && (currentDir != null && !currentDir.equals(mergePaths(getHomeDir(), \"\")))\n || !e.getName().equals(\"..\")) {\n createItems(xtreemFSData, e.getName(), XtreemFSConnect.isDirectory(e), e.getStbuf(), i++);\n }\n }\n\n } catch (IOException e) {\n if (e.getMessage().contains(\"access denied\")) {\n showNotification(\"Error\", \"You don't have the rights to access '\"+getCurrentDir()+\"'.\", Notification.TYPE_ERROR_MESSAGE, e);\n }\n else {\n showNotification(\"Error\", e.toString(), Notification.TYPE_ERROR_MESSAGE, e);\n }\n }\n }\n\n this.table.setContainerDataSource(xtreemFSData);\n this.autocompleteFilter.setContainerDataSource(xtreemFSData);\n }", "@Override\n\tpublic java.util.Date getNgayXuatBan() {\n\t\treturn _keHoachKiemDemNuoc.getNgayXuatBan();\n\t}", "public void setInstdte(Date instdte) {\r\n this.instdte = instdte;\r\n }", "public Date getMlTdef1() {\n return mlTdef1;\n }", "public String getFileFormattedDate() {\n return this.date.format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd\"));\n }", "public void schreibeFreizeitbaederInTxtDatei()\r\n\t\t throws IOException{\r\n\t\t\t WriterCreator writerCreator = new ConcreteTxtWriterCreator();\r\n\t\t\t WriterProduct writerProduct = writerCreator.factoryMethod();\r\n\t\t\t //Praktikum 4\r\n \t\t\tthis.getFreizeitbaeder().forEach((fzb) -> {\r\n \t\t\t\ttry {\r\n \t\t\t\t\twriterProduct.fuegeInDateiHinzu(fzb);\r\n \t\t\t\t} catch (IOException e) {\r\n \t\t\t\t\t\r\n \t\t\t\t}\r\n \t\t\t});\r\n \t\t\twriterProduct.schliesseDatei();\t\t \r\n }", "public int getFECHAFORMALIZ() {\n return fechaformaliz;\n }" ]
[ "0.6254189", "0.60019267", "0.5914707", "0.5804776", "0.5655562", "0.56402725", "0.5614629", "0.5558512", "0.5525723", "0.5489473", "0.5487319", "0.5484395", "0.5477006", "0.54742795", "0.5468655", "0.5468104", "0.5467255", "0.5465597", "0.5457741", "0.5452305", "0.5450533", "0.5445831", "0.54437286", "0.54332817", "0.5432184", "0.54191154", "0.5409693", "0.5409264", "0.5407793", "0.53995997", "0.53953874", "0.539013", "0.5381942", "0.5379679", "0.53766483", "0.5373341", "0.5371333", "0.53436875", "0.5316907", "0.53073573", "0.53039646", "0.5296172", "0.52944106", "0.529238", "0.5268668", "0.5235868", "0.52281445", "0.52171314", "0.521525", "0.521525", "0.521525", "0.5213029", "0.52102643", "0.5204959", "0.51890963", "0.5186807", "0.5186807", "0.5180656", "0.51795554", "0.5170623", "0.5170623", "0.5155551", "0.5139238", "0.51362544", "0.5115635", "0.5103408", "0.5085461", "0.508473", "0.5083544", "0.5083544", "0.5083544", "0.5074955", "0.50721425", "0.5069085", "0.50472903", "0.504684", "0.50355303", "0.50168246", "0.50164765", "0.49848568", "0.49822813", "0.49784595", "0.49769294", "0.49672562", "0.49623904", "0.49595913", "0.49443012", "0.49360234", "0.49310467", "0.4930427", "0.49297336", "0.4925725", "0.49200183", "0.49174878", "0.48972207", "0.48900828", "0.48855862", "0.48705763", "0.48652115", "0.48614478", "0.48588258" ]
0.0
-1
Aktion nach Upload. Die Datei wird auf ReadOnly gesetzt und die Tabelle wird aktuallisiert.
private void uploadFileFinished(SucceededEvent event) { try { // String fileName = event.getFilename(); // File f = getFile(fileName); // f.setReadOnly(READONLY_REPLICATION_MODE); } catch (Exception e) { Logging.logMessage(Logging.LEVEL_WARN, this,"%s, %s, %s", "Readonly Exception", "Can't set file " + event.getFilename() + " to ReadOnly.", e); } // Update der Liste durchführen loadXtreemFSData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UploadedFile() {\n date = new Date();\n }", "private void setReadOnlyMode() {\n// mFileTitleEditText.setEnabled(false);\n// mDocContentEditText.setEnabled(false);\n mOpenFileId = null;\n }", "@Override\r\n\tpublic boolean isSaveAsAllowed() {\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean isSaveAsAllowed() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isSaveAsAllowed() {\n\t\treturn false;\n\t}", "public void setFileDate(Date fileDate)\r\n {\r\n dFileDate = fileDate;\r\n }", "@Override\n\tpublic boolean isReadOnly() {\n\t\treturn false;\n\t}", "@Override\n\tpublic void setReadOnly(boolean readonly) {\n\t\t\n\t}", "@Override\n\tpublic void setReadOnly(boolean readOnly) {\n\t}", "@Override\n public int getUploaded() {\n return 0;\n }", "private void setFile() {\n\t}", "public void makeReadOnly()\n {\n m_readOnly = true;\n }", "public void makeReadOnly()\n {\n m_readOnly = true;\n }", "public boolean isSaveAsAllowed() {\n\t\treturn true;\n\t}", "public int update(FFileInputDO FFileInput) throws DataAccessException;", "protected boolean isReadOnly()\n {\n return true;\n }", "public Date getFileDate()\r\n {\r\n return dFileDate;\r\n }", "public void setHiddenOrReadOnly() {\n if(getField_type().toLowerCase().matches(\"view|vfunction\")) {\n if(!getType().toLowerCase().matches(\"hidden\")){\n setSaveRequired(\"read\");\n }\n }\n }", "public boolean isReadOnly() {\n\t\treturn false;\n\t}", "@PreAuthorize(\"hasPermission(#fileUpload, 'write') or hasRole('ROLE_ADMIN')\")\n\tpublic void updateFullyFileUpload(FileUpload fileUpload) throws AppException;", "@Override\n public void setReadOnly(boolean readonly) {\n // do nothing\n }", "public void setReadOnly(boolean isReadOnly);", "int uploadTrmm(File file, DataDate date, DataDate updated) throws IOException, SQLException;", "int uploadEto(File file, DataDate date, DataDate updated) throws IOException, SQLException;", "public EditFile() {\r\n\t\tsuper();\r\n\t}", "@Override\r\n\tpublic void updateFileData(FileMetaDataEntity userInfo) {\n\t\t\r\n\t}", "@Override\n\tpublic int getFileStatus() {\n\t\treturn 0;\n\t}", "@Override\n public void setSaveFile(File file)\n {\n \n }", "int uploadModis(File file, ModisProduct product, DataDate date, DataDate updated, int horz, int vert) throws IOException, SQLException;", "@Override\n\tpublic void doSaveAs() {\n\n\t}", "public void setReadWriteOnMyLatestView()\n {\n \t m_acl = \tm_acl | (1<<2);\n }", "@Override\n public void setFile(File f) {\n \n }", "@Override\n\tpublic void doSaveAs() {\n\t}", "public void fileUploadListener(FileUploadEvent e) {\n \r\n this.file = e.getFile();\r\n System.out.println(\"Uploaded File Name Is: \" + file.getFileName());\r\n this.anexo.setEndereco(this.uploadFile(file));\r\n Calendar c = Calendar.getInstance();\r\n Date data = c.getTime();\r\n SimpleDateFormat f = new SimpleDateFormat(\"ddMMyyyyHHss\"); \r\n this.anexo.setNome(f.format(data) + file.getFileName() );\r\n this.anexo.setTipo(file.getContentType());\r\n this.anexos.add(anexo);\r\n anexo = new Anexo();\r\n\r\n file = new DefaultUploadedFile();\r\n\r\n // Print out the information of the file\r\n //System.out.println(\"Uploaded File Name Is :: \" + file.getFileName() + \" :: Uploaded File Size :: \" + file.getSize());\r\n }", "public void setReadOnly(Boolean readOnly) {\n this.readOnly = readOnly;\n }", "private void serializeBeforeOpen() {\r\n sr.save(this.path);\r\n }", "@Model\r\n\tprotected void setModificationTime() {\r\n modificationTime = new Date();\r\n }", "public void attributSave() {\n\r\n\t\tstatusFeldSave();\r\n\t}", "public void doReadOnlyMode(boolean b) {\r\n txtb_ckdUniv.setReadonly(b);\r\n txtb_cnamaUniv.setReadonly(b);\r\n txtb_alamatUniv.setReadonly(b);\r\n txtb_cstatus.setReadonly(b);\r\n list_status.setDisabled(b);\r\n cmb_status.setDisabled(b);\r\n }", "public void setReadOnly(boolean readOnly) {\n this.readOnly = readOnly;\n }", "public void setReadOnly(boolean readOnly) {\n this.readOnly = readOnly;\n }", "public void setIsFileLocked(boolean isFileLocked) {\n this.isFileLocked = isFileLocked;\n }", "static void setNotEdit(){isEditing=false;}", "private void serialize() {\r\n if (newFile) {\r\n this.newFile = this.serializeAs();\r\n } else if (!newFile && !path.equals(\"\")) {\r\n sr.save(this.path);\r\n }\r\n }", "public void editOperation() {\n\t\t\r\n\t}", "public void setAktiivisuus()\r\n\t{\r\n\t\tonAktiivinen = false;\r\n\t}", "@Override\n\tpublic void setFileStatus(int FileStatus) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void uploading(String path, String key) {\n\t\t\t\tsynchronized(this){\n //更新界面\n int row = fileKeys.indexOf(key);\n resultTable.setValueAt(\"uploading\", row, 2);\n\t\t\t\t}\n\t\t\t}", "public boolean getIsFileTransfer() {\n return mIsFileTransfer;\n }", "int uploadEvi(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;", "private void updateView(File selectedFile) {\n\n if (selectedFile != null && selectedFile != currentFile) {\n currentFile = selectedFile;\n setFileDetails(currentFile);\n previewFile(currentFile);\n }\n\n if (currentFile.isDirectory()) {\n view.getFileOperations().disableFileOperations();\n } else {\n enableFileOperations();\n }\n }", "public void uploadTemp(FileUploadEvent event) {\n setFileImage(event.getFile());\n getSelected().setUrlImage(event.getFile().getFileName());\n RequestContext.getCurrentInstance().update(\"image\");\n\n }", "@Override\r\n\t\tpublic void setReadOnly(boolean readOnly) throws SQLException {\n\t\t\t\r\n\t\t}", "@Override\n public void onClick(View v) {\n SharedPreferences.Editor prefsEditor = settingsPreferences.edit();\n if (settingsPreferences.getBoolean(TAG_ASCAN_MODIFIED_FILES, false)) {\n prefsEditor.putBoolean(TAG_ASCAN_MODIFIED_FILES, false);\n cbModFiles.setImageResource(R.drawable.check2);\n } else {\n prefsEditor.putBoolean(TAG_ASCAN_MODIFIED_FILES, true);\n cbModFiles.setImageResource(R.drawable.check0);\n }\n prefsEditor.commit();\n }", "public void setProtected()\n {\n ensureLoaded();\n m_flags.setProtected();\n setModified(true);\n }", "@XmlElement\n public boolean isIsFileLocked() {\n return this.isFileLocked;\n }", "private void uploadFromDataStorage() {\n }", "@java.lang.Override\n public boolean getIsUploadEnabled() {\n return isUploadEnabled_;\n }", "private void atualizarBotoes() {\r\n\t\tbtIncluir.setDisable(cliente.getId() != null);\r\n\t\tbtAlterar.setDisable(cliente.getId() == null);\r\n\t\tbtExcluir.setDisable(cliente.getId() == null);\r\n\t}", "public UploadMode getMode() {\n return mode;\n }", "private void updateDatFile() {\n\t\tIOService<?> ioManager = new IOService<Entity>();\n\t\ttry {\n\t\t\tioManager.writeToFile(FileDataWrapper.productMap.values(), new Product());\n\t\t\tioManager = null;\n\t\t} catch (Exception ex) {\n\t\t\tDisplayUtil.displayValidationError(buttonPanel, StoreConstants.ERROR + \" saving new product\");\n\t\t\tioManager = null;\n\t\t}\n\t}", "private void updateFile() {\n try {\n this.taskStorage.save(this.taskList);\n this.aliasStorage.save(this.parser);\n } catch (IOException e) {\n System.out.println(\"Master i am unable to save the file!\");\n }\n }", "public final boolean isReadOnly() {\n\t\treturn m_info.isReadOnly();\n\t}", "public void setFile(File file);", "public boolean getReadOnly() {\n return readOnly;\n }", "Object getUptodatefile();", "public void setReadLatestOfTable()\n {\n \t m_acl = \tm_acl | (1<<5);\n }", "public boolean isReadOnly();", "public boolean isReadOnly();", "public boolean isReadOnly();", "public void setModifiedDate(Date modifiedDate);", "public void setModifiedDate(Date modifiedDate);", "public void setModifiedDate(Date modifiedDate);", "public boolean isReadOnly() {\r\n\t\treturn readOnly;\r\n\t}", "private static native JavaScriptObject nativeUpdateFileProperties(JavaScriptObject file,\n int fileStatus) /*-{\n file.modificationdate = file.lastModifiedDate;\n file.filestatus = fileStatus;\n return file;\n }-*/;", "public boolean isReadOnly() {\n return readOnly;\n }", "public void makeReadOnly();", "public boolean isReadOnly() {\r\n return this.readOnly;\r\n }", "public boolean isReadOnly() {\n return this.getUpdateCount() == 0;\n }", "public boolean isReadOnly() {\n return type == TransactionType.READ_ONLY;\n }", "@Override\r\n public void beforeCommit(boolean readOnly) {\n }", "@java.lang.Override\n public boolean getIsUploadEnabled() {\n return isUploadEnabled_;\n }", "public abstract boolean isReadOnly();", "public void setFieldReadAccess() {\n\n\t\tif (!AccessManager.canReadSmsPredefiniDescription())\n\t\t\ttypeFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadSmsPredefiniDescription())\n\t\t\tobjetFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadSmsPredefiniDescription())\n\t\t\tmessageFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.isAdmin())\n\t\t\tdeletedEntityBoxFilterBox.setVisible(false);\n\t}", "protected void updateStatus() {\n super.updateStatus();\n if (!getHaveData()) {\n if (getAllowMultiple()) {\n setStatus(\"Select one or more files\");\n } else {\n setStatus(\"Select a file\");\n }\n }\n }", "public handleFileUpload() {\r\n\t\tsuper();\r\n\t}", "public Date getFileupdate() {\n return fileupdate;\n }", "public void uploadObject() {\n\n\t}", "public void setMode(UploadMode mode) {\n this.mode = mode;\n }", "@Override\n public void setFileTransferEnable(int reason) throws RemoteException {\n Logger.v(TAG, \"setFileTransferEnable() reason = \" + reason);\n }", "private void enableFileOperations() {\n view.getFileOperations().getOpenFile()\n .setEnabled(desktop.isSupported(Desktop.Action.OPEN));\n view.getFileOperations().getEditFile()\n .setEnabled(desktop.isSupported(Desktop.Action.EDIT));\n view.getFileOperations().getPrintFile()\n .setEnabled(desktop.isSupported(Desktop.Action.PRINT));\n }", "public void setFieldReadAccess() {\n\n\t\tif (!AccessManager.canReadPersonnelIdentification())\n\t\t\tpersonnel_nomFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadCentreDiagTraitDescription())\n\t\t\tcdt_nomFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadCandidatureFormationRegionApprobation())\n\t\t\tapprouveeRegionFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadCandidatureFormationGtcApprobation())\n\t\t\tapprouveeGTCFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadDistrictSanteDescription())\n\t\t\tdistrictsante_nomFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.isAdmin())\n\t\t\tdeletedEntityBoxFilterBox.setVisible(false);\n\t}", "public FileUpload getFileUpload() {\r\n return fileUpload;\r\n }", "@Override\n public String getUploadStatus() {\n return uploadStatus;\n }", "void setBinaryFileAttribute(boolean flag);", "@Override\n\tpublic boolean getCanSeek()\n\t{\n\t\treturn false;\n\t}", "private void initAccess() {\n\t\tif (!Users.doesCurrentUserHaveAccess(Users.ACCESS_CLASS_BEGINNING_DATA_ENTRY) &&\n\t\t\t\t!this.getParentEditor().getNewRecord() &&\n\t\t\t\t!referenceNewPatron) {\n\t\t\treadOnly = true;\n\t\t\tsetFormToReadOnly();\n\t\t\t//research purpose\n\t\t\taddResearchPurpose.setEnabled(false);\n\t\t\tremoveResearchPurpose.setEnabled(false);\n\t\t\t//subject buttons\n\t\t\taddSubject.setEnabled(false);\n\t\t\tremoveSubject.setEnabled(false);\n\t\t\t//name buttons\n\t\t\taddName.setEnabled(false);\n\t\t\tremoveName.setEnabled(false);\n\t\t\teditNameRelationshipButton.setEnabled(false);\n // resource button\n addResourceButton.setEnabled(false);\n removeResourceButton.setEnabled(false);\n\t\t}\n\t}", "@Override\r\n\tprotected void editarObjeto() throws ClassNotFoundException {\n\t\tif (tbJustificaciones.getSelectedRow() != -1\r\n\t\t\t\t&& tbJustificaciones.getValueAt(tbJustificaciones.getSelectedRow(), 0) != null) {\r\n\t\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (MODIFICANDO)\");\r\n\t\t\tthis.opcion = 2;\r\n\t\t\tactivarFormulario();\r\n\t\t\tcargarDatosModificar();\r\n\t\t\ttxtCedula.setEnabled(false);\r\n\t\t\tlimpiarTabla();\r\n\t\t\tthis.panelBotones.habilitar();\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(null, GlobalUtil.MSG_ITEM_NO_SELECCIONADO, \"ATENCION\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t}", "public void setFileupdate(Date fileupdate) {\n this.fileupdate = fileupdate;\n }", "public abstract void setActionOnSaveEnabled(boolean enabled);" ]
[ "0.60839695", "0.5914487", "0.591219", "0.58473253", "0.58320796", "0.57066673", "0.57033956", "0.5665612", "0.5643011", "0.5612388", "0.55796975", "0.5565551", "0.5565551", "0.5544405", "0.5504947", "0.54729044", "0.547184", "0.54350996", "0.5352334", "0.53431964", "0.5342525", "0.53256214", "0.5324762", "0.53098434", "0.5306665", "0.5305111", "0.5298913", "0.5293416", "0.5293393", "0.5291116", "0.5290754", "0.5262929", "0.52342975", "0.52226424", "0.5214017", "0.51967746", "0.5192477", "0.5189272", "0.5189269", "0.5178713", "0.5178713", "0.51752734", "0.51721406", "0.51720375", "0.5171649", "0.5169783", "0.51691365", "0.51654935", "0.5164118", "0.51555777", "0.51537895", "0.51535815", "0.51519495", "0.5150338", "0.51304996", "0.51139957", "0.5113893", "0.5113413", "0.51052564", "0.5100145", "0.5099852", "0.50979406", "0.50948656", "0.5093184", "0.5091862", "0.508797", "0.5087624", "0.50844634", "0.50844634", "0.50844634", "0.507771", "0.507771", "0.507771", "0.507499", "0.5072393", "0.50714236", "0.5070614", "0.5064636", "0.50587004", "0.5056347", "0.5049633", "0.50493103", "0.50457054", "0.5043537", "0.50429153", "0.50391716", "0.5037783", "0.50302696", "0.5028659", "0.5018928", "0.50167584", "0.50155014", "0.50143266", "0.5011308", "0.50006866", "0.4999705", "0.49970564", "0.49940944", "0.49933153", "0.49910706" ]
0.67092943
0
Herunterladen eines Verzeichnisses als ZIPDatei
private void downloadZippedDirectory(String selectedFolder) { if (selectedFolder != null) { File file = getFile(selectedFolder); StreamSource zipSource = getZipSource(file); getMainWindow().open(new VaadinFileDownloadResource(zipSource, selectedFolder+".zip", 0, getMainWindow().getApplication()), "_self"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract String getUpDateZip();", "@AutoEscape\n\tpublic String getZip();", "public String getZip() {\r\n return zip;\r\n }", "public String getZip() {\r\n return zip;\r\n }", "@Override\n\tpublic String getZip() {\n\t\treturn this.zip;\n\t}", "public String getZip() {\r\n\t\treturn zip;\r\n\t}", "public void tozip() {\r\n\t\t//session.setAttribute(Constant.USER_SESSION_KEY, null);\r\n\t\tList<Netlog> result = null;\r\n\t\tInteger total = null;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t\tresult = (List<Netlog>)netlogDao.findNetlogByPage(1,10000);\r\n\t\t\t\ttotal= result.size();\r\n\t\t\t\t//total= netlogDao.findNetlogCount();\r\n\t\t\t\r\n\t\t} catch (SQLException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tNetlogs netlogs = new Netlogs(result);\r\n\t\tString path = this.getClass().getClassLoader().getResource(\"\").getPath();\r\n\t\tSystem.out.println(path);\r\n\t\tpath = path.replace(\"WEB-INF/classes/\", \"\");\r\n\t\tString path1 = path + \"netlog/\";\r\n\t\tLong time = System.currentTimeMillis()/1000;\r\n\t\tXml2Java.beanToXML(netlogs,path1+\"145-330000-\"+time.toString()+\"-00001-WA-SOURCE_NETLOG_0001-0.xml\");\r\n\r\n\t\tZipUtil.ZipMultiFile(path1, path+\"145-353030334-330300-330300-netlog-00001.zip\");\r\n\t}", "@Override\n\tpublic int Address2Zip(int String) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long getZip() {\n\t\treturn _candidate.getZip();\n\t}", "public void unZip(String apkFile) throws Exception \r\n\t{\r\n\t\tLog.p(tag, apkFile);\r\n\t\tFile file = new File(apkFile);\r\n\t\r\n\t\t/*\r\n\t\t * Create the Base Directory, whose name should be same as Zip file name.\r\n\t\t * All decompressed contents will be placed under this folder.\r\n\t\t */\r\n\t\tString apkFileName = file.getName();\r\n\t\t\r\n\t\tif(apkFileName.indexOf('.') != -1)\r\n\t\t\tapkFileName = apkFileName.substring(0, apkFileName.indexOf('.'));\r\n\t\t\r\n\t\tLog.d(tag, \"Folder name: \"+ apkFileName);\r\n\t\t\r\n\t\tFile extractFolder = new File((file.getParent() == null ? \"\" : file.getParent() + File.separator) + apkFileName);\r\n\t\tif(!extractFolder.exists())\r\n\t\t\textractFolder.mkdir();\r\n\t\t\r\n\t\t/*\r\n\t\t * Read zip entries.\r\n\t\t */\r\n\t\tFileInputStream fin = new FileInputStream(apkFile);\r\n\t\tZipInputStream zin = new ZipInputStream(new BufferedInputStream(fin));\r\n\t\t\r\n\t\t/*\r\n\t\t * Zip InputStream shifts its index to every Zip entry when getNextEntry() is called.\r\n\t\t * If this method returns null, Zip InputStream reaches EOF.\r\n\t\t */\r\n\t\tZipEntry ze = null;\r\n\t\tBufferedOutputStream dest;\r\n\t\t\r\n\t\twhile((ze = zin.getNextEntry()) != null)\r\n\t\t{\r\n\t\t\tLog.d(tag, \"Zip entry: \" + ze.getName() + \" Size: \"+ ze.getSize());\r\n\t\t\t/*\r\n\t\t\t * Create decompressed file for each Zip entry. A Zip entry can be a file or directory.\r\n\t\t\t * ASSUMPTION: APK Zip entry uses Unix style File seperator- \"/\"\r\n\t\t\t * \r\n\t\t\t * 1. Create the prefix Zip Entry folder, if it is not yet available\r\n\t\t\t * 2. Create the individual Zip Entry file.\r\n\t\t\t */\r\n\t\t\tString zeName = ze.getName();\r\n\t\t\tString zeFolder = zeName;\r\n\t\t\t\r\n\t\t\tif(ze.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tzeName = null; // Don't create Zip Entry file\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(zeName.indexOf(\"/\") == -1) // Zip entry uses \"/\"\r\n\t\t\t\t\tzeFolder = null; // It is File. don't create Zip entry Folder\r\n\t\t\t\telse {\r\n\t\t\t\t\tzeFolder = zeName.substring(0, zeName.lastIndexOf(\"/\"));\r\n\t\t\t\t\tzeName = zeName.substring( zeName.lastIndexOf(\"/\") + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tLog.d(tag, \"zeFolder: \"+ zeFolder +\" zeName: \"+ zeName);\r\n\t\t\t\r\n\t\t\t// Create Zip Entry Folder\r\n\t\t\tFile zeFile = extractFolder;\r\n\t\t\tif(zeFolder != null)\r\n\t\t\t{\r\n\t\t\t\tzeFile = new File(extractFolder.getPath() + File.separator + zeFolder);\r\n\t\t\t\tif(!zeFile.exists())\r\n\t\t\t\t\tzeFile.mkdirs();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Create Zip Entry File\r\n\t\t\tif(zeName == null)\r\n\t\t\t\tcontinue;\r\n\t\t\t\r\n\t\t\t// Keep track of XML files, they are in Android Binary XML format\r\n\t\t\tif(zeName.endsWith(\".xml\"))\r\n\t\t\t\txmlFiles.add(zeFile.getPath() + File.separator + zeName);\r\n\t\t\t\r\n\t\t\t// Keep track of the Dex/ODex file. Need to convert to Jar\r\n\t\t\tif(zeName.endsWith(\".dex\") || zeName.endsWith(\".odex\"))\r\n\t\t\t\tdexFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Keep track of Resources.arsc file- resources.arsc\r\n\t\t\tif(zeName.endsWith(\".arsc\"))\r\n\t\t\t\tresFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Write Zip entry File to the disk\r\n\t\t\tint count;\r\n\t\t\tbyte data[] = new byte[BUFFER];\r\n\t\t\t\r\n\t\t\tFileOutputStream fos = new FileOutputStream(zeFile.getPath() + File.separator + zeName);\r\n\t\t\tdest = new BufferedOutputStream(fos, BUFFER);\r\n\r\n\t\t\twhile ((count = zin.read(data, 0, BUFFER)) != -1) \r\n\t\t\t{\r\n\t\t\t\tdest.write(data, 0, count);\r\n\t\t\t}\r\n\t\t\tdest.flush();\r\n\t\t\tdest.close();\r\n\t\t}\r\n\r\n\t\t// Close Zip InputStream\r\n\t\tzin.close();\r\n\t\tfin.close();\r\n\t}", "public void setZip(String s) {\r\n\t\tzip = s;\t\r\n\t}", "public File getZipFile() {\n return distZip;\n }", "public int getZip() {\n return this.zip;\n }", "public int getZip() {\n return zip;\n }", "public String getZip()\n\t{\n\t\treturn zipCode;\n\t}", "public void setZip(String zip);", "public File getZipLocation ()\n\t{\n\t\treturn zipFileLocation;\n\t}", "public int getZip() {\r\n\t\treturn zip;\r\n\t}", "public String getZIP()\r\n\t{\r\n\t\treturn zip.getModelObjectAsString();\r\n\t}", "private void compress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tZipOutputStream rfoFile = new ZipOutputStream(new FileOutputStream(path + fileName)); \n\t\t\tFile dirToZip = new File(rfoDir); \n\t\t\tString[] fileList = dirToZip.list(); \n\t\t\tbyte[] buffer = new byte[4096]; \n\t\t\tint bytesIn = 0; \n\n\t\t\tfor(int i=0; i<fileList.length; i++) \n\t\t\t{ \n\t\t\t\tFile f = new File(dirToZip, fileList[i]); \n\t\t\t\tFileInputStream fis = new FileInputStream(f); \n\t\t\t\tString zEntry = f.getPath();\n\t\t\t\t//System.out.println(\"\\n\" + zEntry);\n\t\t\t\tint start = zEntry.indexOf(uniqueName);\n\t\t\t\tzEntry = zEntry.substring(start + uniqueName.length() + 1, zEntry.length());\n\t\t\t\t//System.out.println(tempDir);\n\t\t\t\t//System.out.println(zEntry + \"\\n\");\n\t\t\t\tZipEntry entry = new ZipEntry(zEntry); \n\t\t\t\trfoFile.putNextEntry(entry); \n\t\t\t\twhile((bytesIn = fis.read(buffer)) != -1) \n\t\t\t\t\trfoFile.write(buffer, 0, bytesIn); \n\t\t\t\tfis.close();\n\t\t\t}\n\t\t\trfoFile.close();\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.compress(): \" + e);\n\t\t}\n\t}", "public void zipFiles() {\r\n byte[] buffer = new byte[1024];\r\n try {\r\n\r\n // On rare occasions, there will be a semi colon in the title name,\r\n // ruining everything while zipping the file.\r\n if (title.contains(\":\") || title.contains(\".\")) {\r\n String temp = \"\";\r\n for (int i = 0; i < title.length(); i++) {\r\n \r\n if (title.charAt(i) == ':' || title.charAt(i) == '.') {\r\n \r\n } else {\r\n temp += title.charAt(i);\r\n }\r\n }\r\n title = temp;\r\n }\r\n System.out.println(\"File name: \" + title);\r\n \r\n FileOutputStream fos = new FileOutputStream(savePath + \"\\\\\" + title + \".zip\");\r\n ZipOutputStream zos = new ZipOutputStream(fos);\r\n \r\n for (String fileName : fileNames) {\r\n \r\n System.out.println(\"zipping file: \" + fileName);\r\n \r\n fileName = savePath + \"\\\\\" + fileName;\r\n File srcFile = new File(fileName);\r\n FileInputStream fis;\r\n if (srcFile.exists()) {\r\n fis = new FileInputStream(srcFile);\r\n \r\n zos.putNextEntry(new ZipEntry(srcFile.getName()));\r\n int length;\r\n while ((length = fis.read(buffer)) > 0) {\r\n zos.write(buffer, 0, length);\r\n }\r\n zos.closeEntry();\r\n fis.close();\r\n \r\n boolean success = (new File(fileName)).delete();\r\n }\r\n }\r\n zos.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"File not found!\");\r\n } catch (IOException ex) {\r\n }\r\n }", "public void extractPackage(String zipPath, String destPath) throws IOException {\n File destDir = new File(destPath);\n if(!destDir.exists()) {\n destDir.mkdir();\n }\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream((zipPath)));\n ZipEntry entry = zipIn.getNextEntry();\n while(entry != null) {\n String filePath = destPath+File.separator+entry.getName();\n //filePath = filePath.replaceAll(\" \",\"_\");\n if(!entry.isDirectory()) {\n Log.i(\"extract\",\"Package Name: \"+entry.getName());\n Log.i(\"extract\",filePath);\n String[] temp = entry.getName().split(\"\\\\.\");\n if(validExtension(temp[temp.length-1].toLowerCase())) {\n extractFile(zipIn,filePath);\n }\n //extractFile(zipIn,filePath);\n } else {\n File dir = new File(filePath);\n dir.mkdirs();\n }\n zipIn.closeEntry();;\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }", "void onUnzipCompleted(String output);", "public int getZip() {\n\t\treturn zip;\n\t}", "private ZipCompressor(){}", "private void unCompress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tint bytesIn;\n\t\t\tZipFile rfoFile = new ZipFile(path + fileName);\n\t\t\tEnumeration<? extends ZipEntry> allFiles = rfoFile.entries();\n\t\t\twhile(allFiles.hasMoreElements())\n\t\t\t{\n\t\t\t\tZipEntry ze = (ZipEntry)allFiles.nextElement();\n\t\t\t\tInputStream is = rfoFile.getInputStream(ze);\n\t\t\t\tString fName = processSeparators(ze.getName());\n\t\t\t\tFile element = new File(tempDir + fName);\n\t\t\t\torg.reprap.Main.ftd.add(element);\n\t\t\t\tFileOutputStream os = new FileOutputStream(element);\n\t\t\t\twhile((bytesIn = is.read(buffer)) != -1) \n\t\t\t\t\tos.write(buffer, 0, bytesIn);\n\t\t\t\tos.close();\n\t\t\t}\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.unCompress(): \" + e);\n\t\t}\n\t}", "public ZipLineStream() {\n\t\tarchType = ArchiveTypes.ZIP.name();\n\t}", "public abstract String getZipCode();", "@Test\r\n public void testUnzipArchive() throws Exception {\r\n\r\n\r\n (new ZipUtils(\"Cp866\")).unzipArchive(\r\n \"src/test/resources/archive/testfile.zip\",\r\n \"target/test-classes/import/archive\"\r\n );\r\n\r\n File [] files = (new File(\"target/test-classes/import/archive\")).listFiles();\r\n\r\n boolean found = false;\r\n \r\n for (File file : files) {\r\n if (file.getAbsolutePath().contains(\"Привет, я файло.txt\")) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n assertTrue(found);\r\n\r\n\r\n }", "protected void zipFile(File file, ZipOutputStream zOut, String vPath)\n throws IOException\n {\n if (!vPath.equalsIgnoreCase(\"WEB-INF/web.xml\")) {\n super.zipFile(file, zOut, vPath);\n } else {\n log(\"Warning: selected \"+archiveType+\" files include a WEB-INF/web.xml which will be ignored \" +\n \"(please use webxml attribute to \"+archiveType+\" task)\", Project.MSG_WARN);\n }\n }", "public static void main(String[] args) {\n File directoryPath = new File(\"C:\\\\Users\\\\jarek\\\\Downloads\");\n //List of all files and directories\n String[] contents = directoryPath.list();\n\n Pattern p= Pattern.compile(\"zip$\");\n Matcher m;\n Vector<String> lis = new Vector<>();\n for(int i = 0; i< Objects.requireNonNull(contents).length; i++){\n m=p.matcher(contents[i]);\n if(m.find()) lis.addElement(contents[i]);\n }\n System.out.println(\"List of files and directories in the specified directory:\");\n for (String content : contents) {\n System.out.println(content);\n }\n }", "public void zip() {\n\t\tif (zipFile != null) {\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\ttry (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile))) {\n\t\t\t\tzos.setLevel(ZipOutputStream.STORED);\n\t\t\t\tbyte[] buffer = new byte[4096];\n\t\t\t\tFiles.list(Paths.get(tool_builddir))\n\t\t\t\t\t\t.forEach(x -> {\n\t\t\t\t\t\t\tFile f = x.toFile();\n\t\t\t\t\t\t\tif (f.isFile() && !f.getName().contains(\".\")) {\n\t\t\t\t\t\t\t\ttry (FileInputStream fis = new FileInputStream(f)) {\n\t\t\t\t\t\t\t\t\tZipEntry zipEntry = new ZipEntry(f.getName());\n\t\t\t\t\t\t\t\t\tzos.putNextEntry(zipEntry);\n\t\t\t\t\t\t\t\t\tint count;\n\t\t\t\t\t\t\t\t\twhile ((count = fis.read(buffer)) >= 0) {\n\t\t\t\t\t\t\t\t\t\tzos.write(buffer, 0, count);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tzos.closeEntry();\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\tout.println(\"Zipped to '\" + zipFile + \"' - \" + Duration.ofMillis(System.currentTimeMillis() - start));\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t}", "public void setZip(int zip) {\r\n\t\tthis.zip = zip;\r\n\t}", "public void scanZipFile() {\r\n\t\tnew SwingWorker<Void, String>() {\r\n\t\t\tprotected Void doInBackground() throws Exception {\r\n\t\t\t\tZipInputStream zin = new ZipInputStream(new FileInputStream(\r\n\t\t\t\t\t\tzipname));\r\n\t\t\t\tZipEntry entry;\r\n\t\t\t\twhile ((entry = zin.getNextEntry()) != null) {\r\n\t\t\t\t\tpublish(entry.getName());\r\n\t\t\t\t\tzin.closeEntry();\r\n\t\t\t\t}\r\n\t\t\t\tzin.close();\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tprotected void process(List<String> names) {\r\n\t\t\t\tfor (String name : names)\r\n\t\t\t\t\tfileCombo.addItem(name);\r\n\r\n\t\t\t}\r\n\t\t}.execute();\r\n\t}", "private void unzipDownloadedFile(String zipFile) throws ZipException, IOException{\n\t int BUFFER = 2048;\n\t \n\t // get zip file\n\t File file = new File(zipFile);\n\t ZipFile zip = new ZipFile(file);\n\t \n\t // unzip to directory of the same name\n\t // When sip is a directory, this gets two folders\n\t //String newPath = zipFile.substring(0, zipFile.length() - 4);\n\t //new File(newPath).mkdir();\n\t \n\t // unzip to parent directory of the zip file\n\t // This is assuming zip if of a directory\n\t String newPath = file.getParent();\n\t \n\t // Process each entry\n\t Enumeration<? extends ZipEntry> zipFileEntries = zip.entries();\n\t while (zipFileEntries.hasMoreElements())\n\t {\n\t // grab a zip file entry\n\t ZipEntry entry = (ZipEntry) zipFileEntries.nextElement();\n\t String currentEntry = entry.getName();\n\t File destFile = new File(newPath, currentEntry);\n\t File destinationParent = destFile.getParentFile();\n\n\t // create the parent directory structure if needed\n\t destinationParent.mkdirs();\n\n\t if (!entry.isDirectory())\n\t {\n\t BufferedInputStream is = new BufferedInputStream(zip.getInputStream(entry));\n\t int currentByte;\n\t // establish buffer for writing file\n\t byte data[] = new byte[BUFFER];\n\n\t // write the current file to disk\n\t FileOutputStream fos = new FileOutputStream(destFile);\n\t BufferedOutputStream dest = new BufferedOutputStream(fos,\n\t BUFFER);\n\n\t // read and write until last byte is encountered\n\t while ((currentByte = is.read(data, 0, BUFFER)) != -1) {\n\t dest.write(data, 0, currentByte);\n\t }\n\t dest.flush();\n\t dest.close();\n\t is.close();\n\t }\n\n\t if (currentEntry.endsWith(\".zip\"))\n\t {\n\t // found a zip file, try to open\n\t \tunzipDownloadedFile(destFile.getAbsolutePath());\n\t }\n\t }\n\t zip.close();\n\t}", "public boolean ZipFile(String sSourceFilePath, String sDestinationZipFilePath, boolean bReplaceExisting) {\n byte[] buffer = new byte[30720];\n FileInputStream fin = null;\n FileOutputStream fout = null;\n ZipOutputStream zout = null;\n int length;\n String sZipEntryFileName = \"\";\n File objFile = null;\n try {\n //check for source file\n if (sSourceFilePath.trim().equalsIgnoreCase(\"\")) {\n throw new Exception(\"Invalid Source File : \" + sSourceFilePath);\n }\n objFile = new File(sSourceFilePath);\n if (!objFile.exists()) {\n throw new Exception(\"Source file not found : \" + sSourceFilePath);\n }\n\n //check for destination Zip file\n if (sDestinationZipFilePath.trim().equalsIgnoreCase(\"\") || sDestinationZipFilePath == null) {\n String stmp_Path = objFile.getAbsolutePath();\n String stmp_Name = objFile.getName();\n if (stmp_Name.contains(\".\")) { //check for removing extension\n int indx = 0;\n try {\n indx = stmp_Name.indexOf(\".\", stmp_Name.length() - 5);\n } catch (Exception e) {\n indx = 0;\n }\n if (indx <= 0) {\n indx = stmp_Name.length();\n }\n\n stmp_Name = stmp_Name.substring(0, indx);\n stmp_Name = stmp_Name + \".zip\";\n }\n sDestinationZipFilePath = stmp_Path + File.separator + stmp_Name;\n }\n\n objFile = new File(sDestinationZipFilePath);\n if (objFile.exists()) {\n if (bReplaceExisting) {\n objFile.delete();\n } else {\n throw new Exception(\"Destination ZipFile Already exists : \" + sDestinationZipFilePath);\n }\n }\n\n //Zipping File\n sZipEntryFileName = sSourceFilePath.substring(sSourceFilePath.lastIndexOf(\"\\\\\") + 1);\n fout = new FileOutputStream(sDestinationZipFilePath);\n zout = new ZipOutputStream(fout);\n fin = new FileInputStream(sSourceFilePath);\n zout.putNextEntry(new ZipEntry(sZipEntryFileName));\n while ((length = fin.read(buffer)) > 0) {\n zout.write(buffer, 0, length);\n }\n\n return true;\n\n } catch (Exception exp) {\n println(\"Src = \" + sSourceFilePath + \" : Dest = \" + sDestinationZipFilePath + \" : \" + exp.toString());\n return false;\n } finally {\n try {\n fin.close();\n } catch (Exception exp) {\n }\n try {\n zout.closeEntry();\n } catch (Exception exp) {\n }\n try {\n zout.close();\n } catch (Exception exp) {\n }\n }\n }", "public void ImportNaimoZipFileByUser(){\n File mPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n final Manager_FileDialog managerFileDialog = new Manager_FileDialog(this, mPath, \".zip\");\n managerFileDialog.addFileListener(new Manager_FileDialog.FileSelectedListener() {\n public void fileSelected(File file) {\n managerFileDialog.removeFileListener(this);\n //ImportNaimoZipFile(file.getPath());\n new ImportNaimoZipFile(WordListActivity.this,file.getPath()).execute();\n }\n });\n managerFileDialog.showDialog();\n }", "public void setZip(int value) {\n this.zip = value;\n }", "@Override\n public String toString() {\n return \"ZipFile '\" + getName() + \"'\";\n }", "public ZipDatabase() throws IOException {\r\n int line = 0;\r\n InputStream is = this.getClass().getResourceAsStream(\"zip.txt\");\r\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n String input;\r\n // parses entries of the form:\r\n // 03064,NH,NASHUA\r\n try {\r\n while ((input = br.readLine()) != null) {\r\n line++;\r\n StringTokenizer st = new StringTokenizer(input, \",\");\r\n if (st.countTokens() == 3) {\r\n String zip = st.nextToken();\r\n String state = st.nextToken();\r\n String city = st.nextToken();\r\n city = fixupCase(city);\r\n zipDB.put(zip, new ZipInfo(zip, city, state));\r\n } else {\r\n throw new IOException(\"Bad zip format, line \" + line);\r\n }\r\n }\r\n } finally {\r\n br.close();\r\n }\r\n }", "public String getSupZip() {\n return supZip;\n }", "private void zipActionListener( View v ) {\n SharedPreferences sp = Objects.requireNonNull( this.getContext() ).getSharedPreferences( Weather_Preference, 0 );\n SharedPreferences.Editor e = sp.edit();\n home.stopGPS();\n String inputZip = mZipView.getText().toString();\n if ( !inputZip.isEmpty() ) {\n if ( inputZip.length() > 4 ) {\n try {\n Integer.parseInt( inputZip );\n e.putString( ZIP_KEY, mZipView.getText().toString() );\n Toast.makeText( home, \"Zip Code Applied\\n\" + inputZip, Toast.LENGTH_SHORT ).show();\n\n } catch ( Exception except ) {\n Log.e( \"LOCATION INPUT INVALID\", \"[Settings Fragment]\" + String.valueOf( except ) );\n mZipView.setError( \"Invalid Postal Code!\" );\n }\n } else {\n mZipView.setError( \"Zip code must be 5 or more digits\" );\n }\n } else {\n mZipView.setError( \"Enter a Zip Code\" );\n }\n e.apply();\n }", "private String dumpZipEntry(ZipEntry ze) {\r\n StringBuffer sb = new StringBuffer();\r\n if (ze.isDirectory()) {\r\n sb.append(\"d \");\r\n } else {\r\n sb.append(\"f \");\r\n }\r\n if (ze.getMethod() == ZipEntry.STORED) {\r\n sb.append(\"stored \");\r\n } else {\r\n sb.append(\"defalted \");\r\n }\r\n sb.append(ze.getName());\r\n sb.append(\"\\t\");\r\n sb.append(\"\");\r\n sb.append(ze.getSize());\r\n if (ze.getMethod() == ZipEntry.DEFLATED) {\r\n sb.append(\"/\");\r\n sb.append(ze.getCompressedSize());\r\n }\r\n String str = sb.toString();\r\n sb = null;\r\n\r\n return (str);\r\n }", "protected void getFile(ZipEntry e) throws IOException {\n String zipName = e.getName();\n switch (mode) {\n case EXTRACT:\n if (zipName.startsWith(\"/\")) {\n if (!warnedMkDir)\n System.out.println(\"Ignoring absolute paths\");\n warnedMkDir = true;\n zipName = zipName.substring(1);\n }\n // if a directory, just return. We mkdir for every file,\n // since some widely-used Zip creators don't put out\n // any directory entries, or put them in the wrong place.\n if (zipName.endsWith(\"/\")) {\n return;\n }\n // Else must be a file; open the file for output\n // Get the directory part.\n int ix = zipName.lastIndexOf('/');\n if (ix > 0) {\n //String dirName = zipName.substring(0, ix);\n String fileName = zipName.substring(ix + 1, zipName.length());\n zipName = fileName;\n\n }\n String targetFile = this.unzipFileTargetLocation;\n File file = new File(targetFile);\n if (!file.exists())\n file.createNewFile();\n FileOutputStream os = null;\n InputStream is = null;\n try {\n os = new FileOutputStream(targetFile);\n is = zippy.getInputStream(e);\n int n = 0;\n while ((n = is.read(b)) > 0)\n os.write(b, 0, n);\n\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n if (os != null) {\n try {\n os.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n }\n break;\n case LIST:\n // Not extracting, just list\n if (e.isDirectory()) {\n System.out.println(\"Directory \" + zipName);\n } else {\n System.out.println(\"File \" + zipName);\n }\n break;\n default:\n throw new IllegalStateException(\"mode value (\" + mode + \") bad\");\n }\n }", "private ZipCodes() {}", "public File getZip() {\r\n try {\r\n close(); // if the file is currently open close it\r\n Log.d(LOG_TAG, \"getZip()\");\r\n File zipFile = new File(mBaseFileName + \".zip\");\r\n zipFile.delete();\r\n ZipOutputStream zipStream = new ZipOutputStream(new FileOutputStream(zipFile));\r\n for (int i = 0; i < mNumSegments; i++) {\r\n File chunk = new File(getFileNameForIndex(i));\r\n if (chunk.exists()) {\r\n FileInputStream fis = new FileInputStream(chunk);\r\n writeToZipFile(zipStream, fis, chunk.getName());\r\n }\r\n }\r\n zipStream.close();\r\n return zipFile;\r\n } catch (Exception e) {\r\n Log.e(LOG_TAG, \"Failed to create zip file\", e);\r\n }\r\n\r\n return null;\r\n }", "public boolean accept(ZipEntry entry)\n {\n if (super.accept(entry))\n {\n String sName = entry.getName();\n return m_sFile.equals(sName.substring(sName.lastIndexOf('/') + 1));\n }\n\n return false;\n }", "public String getZipId() {\n return zipId;\n }", "public FilesArchived(File rootDir, String zip) {\n this.root = rootDir;\n this.compression = (\"zstd\".equals(zip)) ? Compression.ZSTD : Compression.GZIP;\n rescan();\n Thread thread = new Thread(this::run);\n thread.setDaemon(true);\n thread.setName(\"FilesArchived-maintainer\");\n thread.start();\n }", "void makeZip(String zipFilePath, String srcFilePaths[], ZipMainFrame f) {\n ...\n for (int i = 0; i < srcFilePaths.length; i++) {\n f.setStatusBarText(\"Zipping \"+srcFilePaths[i]);\n //add the file srcFilePaths[i] into the zip file.\n ...\n }\n }", "public static int Comparetxtinzip(ZipFile apkzf, String filepathinzip, File fileinfiledir) {\r\n String tmpzipstr;\r\n BufferedInputStream checkfbr;\r\n int result;\r\n BufferedInputStream checkzbr = null;\r\n BufferedInputStream checkfbr2 = null;\r\n ZipEntry cookie_entry = apkzf.getEntry(filepathinzip);\r\n if (cookie_entry == null) {\r\n try {\r\n Log.i(TAG, \"no this file in zip\");\r\n if (checkzbr != null) {\r\n try {\r\n checkzbr.close();\r\n if (checkfbr2 != null) {\r\n try {\r\n checkfbr2.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n return ERROR_EXCEPTION;\r\n }\r\n }\r\n } catch (IOException e2) {\r\n e2.printStackTrace();\r\n if (checkfbr2 != null) {\r\n try {\r\n checkfbr2.close();\r\n } catch (IOException e3) {\r\n e3.printStackTrace();\r\n return ERROR_EXCEPTION;\r\n }\r\n }\r\n return ERROR_EXCEPTION;\r\n } finally {\r\n if (checkfbr2 != null) {\r\n try {\r\n checkfbr2.close();\r\n } catch (IOException e4) {\r\n e4.printStackTrace();\r\n return ERROR_EXCEPTION;\r\n }\r\n }\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND_INZIP;\r\n } catch (Exception e5) {\r\n e = e5;\r\n try {\r\n e.printStackTrace();\r\n if (checkzbr != null) {\r\n try {\r\n checkzbr.close();\r\n if (checkfbr2 != null) {\r\n try {\r\n checkfbr2.close();\r\n } catch (IOException e6) {\r\n e6.printStackTrace();\r\n return ERROR_EXCEPTION;\r\n }\r\n }\r\n } catch (IOException e7) {\r\n e7.printStackTrace();\r\n if (checkfbr2 != null) {\r\n try {\r\n checkfbr2.close();\r\n } catch (IOException e8) {\r\n e8.printStackTrace();\r\n return ERROR_EXCEPTION;\r\n }\r\n }\r\n return ERROR_EXCEPTION;\r\n } finally {\r\n if (checkfbr2 != null) {\r\n try {\r\n checkfbr2.close();\r\n } catch (IOException e9) {\r\n e9.printStackTrace();\r\n return ERROR_EXCEPTION;\r\n }\r\n }\r\n }\r\n }\r\n return ERROR_EXCEPTION;\r\n } catch (Throwable th) {\r\n th = th;\r\n if (checkzbr != null) {\r\n try {\r\n checkzbr.close();\r\n if (checkfbr2 != null) {\r\n try {\r\n checkfbr2.close();\r\n } catch (IOException e10) {\r\n e10.printStackTrace();\r\n return ERROR_EXCEPTION;\r\n }\r\n }\r\n } catch (IOException e11) {\r\n e11.printStackTrace();\r\n if (checkfbr2 != null) {\r\n try {\r\n checkfbr2.close();\r\n } catch (IOException e12) {\r\n e12.printStackTrace();\r\n return ERROR_EXCEPTION;\r\n }\r\n }\r\n return ERROR_EXCEPTION;\r\n } finally {\r\n if (checkfbr2 != null) {\r\n try {\r\n checkfbr2.close();\r\n } catch (IOException e13) {\r\n e13.printStackTrace();\r\n return ERROR_EXCEPTION;\r\n }\r\n }\r\n }\r\n }\r\n throw th;\r\n }\r\n }\r\n } else {\r\n byte[] checkzipbuf = new byte[1024];\r\n byte[] checkfilebuf = new byte[1024];\r\n BufferedInputStream checkzbr2 = new BufferedInputStream(apkzf.getInputStream(cookie_entry));\r\n try {\r\n tmpzipstr = new String(checkzipbuf).substring(0, checkzbr2.read(checkzipbuf));\r\n checkfbr = new BufferedInputStream(new FileInputStream(fileinfiledir));\r\n } catch (Exception e14) {\r\n e = e14;\r\n checkzbr = checkzbr2;\r\n e.printStackTrace();\r\n if (checkzbr != null) {\r\n }\r\n return ERROR_EXCEPTION;\r\n } catch (Throwable th2) {\r\n th = th2;\r\n checkzbr = checkzbr2;\r\n if (checkzbr != null) {\r\n }\r\n throw th;\r\n }\r\n try {\r\n if (new String(checkfilebuf).substring(0, checkfbr.read(checkfilebuf)).equals(tmpzipstr)) {\r\n result = 1;\r\n } else {\r\n result = 0;\r\n }\r\n if (checkzbr2 != null) {\r\n try {\r\n checkzbr2.close();\r\n if (checkfbr != null) {\r\n try {\r\n checkfbr.close();\r\n } catch (IOException e15) {\r\n e15.printStackTrace();\r\n BufferedInputStream bufferedInputStream = checkfbr;\r\n BufferedInputStream bufferedInputStream2 = checkzbr2;\r\n return ERROR_EXCEPTION;\r\n }\r\n }\r\n } catch (IOException e16) {\r\n e16.printStackTrace();\r\n if (checkfbr != null) {\r\n try {\r\n checkfbr.close();\r\n } catch (IOException e17) {\r\n e17.printStackTrace();\r\n BufferedInputStream bufferedInputStream3 = checkfbr;\r\n BufferedInputStream bufferedInputStream4 = checkzbr2;\r\n return ERROR_EXCEPTION;\r\n }\r\n }\r\n BufferedInputStream bufferedInputStream5 = checkfbr;\r\n BufferedInputStream bufferedInputStream6 = checkzbr2;\r\n return ERROR_EXCEPTION;\r\n } finally {\r\n if (checkfbr != null) {\r\n try {\r\n checkfbr.close();\r\n } catch (IOException e18) {\r\n e18.printStackTrace();\r\n BufferedInputStream bufferedInputStream7 = checkfbr;\r\n BufferedInputStream bufferedInputStream8 = checkzbr2;\r\n return ERROR_EXCEPTION;\r\n }\r\n }\r\n }\r\n }\r\n BufferedInputStream bufferedInputStream9 = checkfbr;\r\n BufferedInputStream bufferedInputStream10 = checkzbr2;\r\n return result;\r\n } catch (Exception e19) {\r\n e = e19;\r\n checkfbr2 = checkfbr;\r\n checkzbr = checkzbr2;\r\n } catch (Throwable th3) {\r\n th = th3;\r\n checkfbr2 = checkfbr;\r\n checkzbr = checkzbr2;\r\n if (checkzbr != null) {\r\n }\r\n throw th;\r\n }\r\n }\r\n }", "public static void main(String[] args) throws IOException {\n\t\tFile targetFile = new File(\"D:\\\\program\\\\360cse\\\\360Chrome\\\\test.zip\");\n\t\tFile sourceFiles = new File(\"D:\\\\temple\\\\sysMenu-add.html\");\n\t\tboolean flag = compressZip(false, targetFile, sourceFiles);\n\t\tSystem.out.println(flag);\n\t}", "public String searchByZipUI() {\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++++\");\n console.promptForPrintPrompt(\" + PLEASE ENTER ZIPCODE TO SEARCH BY +\");\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++++\");\n console.promptForString(\"\");\n String zip = console.promptForString(\" ZIPCODE: \");\n return zip;\n }", "private boolean extractSettingsZip(File fSettingsZip, String destDir, int index)\n {\n boolean result = false;\n try\n {\n //m_logWriter.write(\"Unzipping to destination: \"+destDir+\"\\n\");\n //m_logWriter.flush();\n \tboolean backFavFile = false;\n \tFile dest = new File(destDir);\n \tif (dest.exists()) {\n \t\tString userPath = destDir + \"/userdata/\";\n \t\tFile userFile = new File(userPath);\n \t\tString favDir = userPath + Update.FavouriteFile;\n \t\tFile favFile = new File(favDir);\n \t\tif (userFile.exists() && favFile.exists()) {\n \t\t\tCopyFile(userPath, Update.FavouriteFile, Update.pathSD);\n \t\t\tbackFavFile = true;\n \t\t}\n \t\t\n \t\tDeleteDir(destDir);\n \t}\n \telse\n \t\tdest.mkdirs();\n \t\n publishProgress(PROGRESS_EXTRACT, (int)(0.5 * index));\n // open the zip\n ZipFile zip = new ZipFile(fSettingsZip);\n int count=0;\n int zipSize = zip.size();\n Enumeration<? extends ZipEntry> entries = zip.entries();\n //while(entries.hasMoreElements())\n while (true)\n {\n if (isCancelled()) {\n \tresult = false;\n \tm_ErrorCode = 4;\n break;\n }\n\n if (m_DownloadStop)\n \tcontinue;\n \n if (!entries.hasMoreElements())\n \tbreak;\n \n // todo: update progress\n ZipEntry ze = (ZipEntry)entries.nextElement();\n count++;\n String entryName = ze.getName();\n String destFullpath = destDir+\"/\"+entryName;\n //m_logWriter.write(\"Extracting: \"+destFullpath+\"\\n\");\n File fDestPath = new File(destFullpath);\n if (ze.isDirectory())\n {\n fDestPath.mkdirs();\n publishProgress(PROGRESS_EXTRACT, (int)(0.5 * (index + count*100/zipSize)));\n continue;\n }\n fDestPath.getParentFile().mkdirs();\n\n // write file\n try {\n InputStream is = zip.getInputStream(ze);\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(destFullpath));\n int n=0;\n byte buf[] = new byte[4096];\n while((n = is.read(buf, 0, 4096)) > -1)\n {\n bos.write(buf, 0, n);\n }\n // close\n is.close();\n bos.close();\n } catch(IOException ioe) {\n \tm_ErrorCode = 5;\n //m_logWriter.write(\"Could not write, error: \"+ioe.toString());\n }\n\n // update progress\n //publishProgress(PROGRESS_EXTRACT, (count*100/zipSize));\n }\n\n // close zip and bail\n zip.close();\n //m_logWriter.write(\"Successfully extracted: \"+fSettingsZip.getName()+\"\\n\");\n //m_logWriter.flush();\n if (backFavFile) {\n \t\tString userPath = destDir + \"/userdata/\";\n \t\tFile userFile = new File(userPath);\n \t\tif (!userFile.exists())\n \t\t\tuserFile.mkdirs();\n \t\t\n \t\tFile inputFile = new File(Update.pathSD + Update.FavouriteFile);\n \t\tif (inputFile.exists())\n \t\t\tCopyFile(Update.pathSD, Update.FavouriteFile, userPath);\n }\n \n result = !isCancelled();\n }\n catch(Exception e)\n {\n //Log.e(\"SettingsDownloader\", \"Error: \"+e.toString());\n result = false;\n m_ErrorCode = 6;\n }\n\n return result;\n }", "public String zipScan(String input) throws IOException {\n\t\tString strLine;\n\t\tString zipAndName = \"\";\n\t\twhile((strLine = brZip.readLine()) != null) {\n\t\t\tString zipCode = strLine.split(\" \", 2)[0];\n\n\t\t\tif(input.contains(zipCode) && zipCode.length() > 3)\n\t\t\t\tzipAndName = strLine;\n\t\t}\n\t\treturn zipAndName;\n\t}", "public String getZipNumber() {\n return zipNumber;\n }", "public String getReceiverZip() {\n return receiverZip;\n }", "private static boolean loadFromZip(android.content.Context r8, java.io.File r9, java.io.File r10, java.lang.String r11) {\n /*\n r3 = 0;\n r0 = 1;\n r1 = 0;\n r4 = r9.listFiles();\t Catch:{ Exception -> 0x0013 }\n r5 = r4.length;\t Catch:{ Exception -> 0x0013 }\n r2 = r1;\n L_0x0009:\n if (r2 >= r5) goto L_0x0017;\n L_0x000b:\n r6 = r4[r2];\t Catch:{ Exception -> 0x0013 }\n r6.delete();\t Catch:{ Exception -> 0x0013 }\n r2 = r2 + 1;\n goto L_0x0009;\n L_0x0013:\n r2 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r2);\n L_0x0017:\n r4 = new java.util.zip.ZipFile;\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r2 = r8.getApplicationInfo();\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r2 = r2.sourceDir;\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r4.<init>(r2);\t Catch:{ Exception -> 0x0106, all -> 0x00ff }\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2.<init>();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"lib/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.append(r11);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"libtmessages.27.so\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.toString();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r4.getEntry(r2);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n if (r2 != 0) goto L_0x0084;\n L_0x004a:\n r0 = new java.lang.Exception;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2.<init>();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"Unable to find file in apk:lib/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.append(r11);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"/\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r5 = \"tmessages.27\";\n r2 = r2.append(r5);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = r2.toString();\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r0.<init>(r2);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n throw r0;\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n L_0x0072:\n r0 = move-exception;\n r2 = r3;\n r3 = r4;\n L_0x0075:\n org.telegram.messenger.FileLog.m13728e(r0);\t Catch:{ all -> 0x0102 }\n if (r2 == 0) goto L_0x007d;\n L_0x007a:\n r2.close();\t Catch:{ Exception -> 0x00eb }\n L_0x007d:\n if (r3 == 0) goto L_0x0082;\n L_0x007f:\n r3.close();\t Catch:{ Exception -> 0x00f0 }\n L_0x0082:\n r0 = r1;\n L_0x0083:\n return r0;\n L_0x0084:\n r3 = r4.getInputStream(r2);\t Catch:{ Exception -> 0x0072, all -> 0x00da }\n r2 = new java.io.FileOutputStream;\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2.<init>(r10);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r5 = 4096; // 0x1000 float:5.74E-42 double:2.0237E-320;\n r5 = new byte[r5];\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n L_0x0091:\n r6 = r3.read(r5);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n if (r6 <= 0) goto L_0x00a3;\n L_0x0097:\n java.lang.Thread.yield();\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r7 = 0;\n r2.write(r5, r7, r6);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n goto L_0x0091;\n L_0x009f:\n r0 = move-exception;\n r2 = r3;\n r3 = r4;\n goto L_0x0075;\n L_0x00a3:\n r2.close();\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = 1;\n r5 = 0;\n r10.setReadable(r2, r5);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = 1;\n r5 = 0;\n r10.setExecutable(r2, r5);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = 1;\n r10.setWritable(r2);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n r2 = r10.getAbsolutePath();\t Catch:{ Error -> 0x00d5 }\n java.lang.System.load(r2);\t Catch:{ Error -> 0x00d5 }\n r2 = net.hockeyapp.android.C2367a.f7955a;\t Catch:{ Error -> 0x00d5 }\n r5 = org.telegram.messenger.BuildVars.DEBUG_VERSION;\t Catch:{ Error -> 0x00d5 }\n init(r2, r5);\t Catch:{ Error -> 0x00d5 }\n r2 = 1;\n nativeLoaded = r2;\t Catch:{ Error -> 0x00d5 }\n L_0x00c5:\n if (r3 == 0) goto L_0x00ca;\n L_0x00c7:\n r3.close();\t Catch:{ Exception -> 0x00e6 }\n L_0x00ca:\n if (r4 == 0) goto L_0x0083;\n L_0x00cc:\n r4.close();\t Catch:{ Exception -> 0x00d0 }\n goto L_0x0083;\n L_0x00d0:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x0083;\n L_0x00d5:\n r2 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r2);\t Catch:{ Exception -> 0x009f, all -> 0x00da }\n goto L_0x00c5;\n L_0x00da:\n r0 = move-exception;\n L_0x00db:\n if (r3 == 0) goto L_0x00e0;\n L_0x00dd:\n r3.close();\t Catch:{ Exception -> 0x00f5 }\n L_0x00e0:\n if (r4 == 0) goto L_0x00e5;\n L_0x00e2:\n r4.close();\t Catch:{ Exception -> 0x00fa }\n L_0x00e5:\n throw r0;\n L_0x00e6:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x00ca;\n L_0x00eb:\n r0 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r0);\n goto L_0x007d;\n L_0x00f0:\n r0 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r0);\n goto L_0x0082;\n L_0x00f5:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x00e0;\n L_0x00fa:\n r1 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r1);\n goto L_0x00e5;\n L_0x00ff:\n r0 = move-exception;\n r4 = r3;\n goto L_0x00db;\n L_0x0102:\n r0 = move-exception;\n r4 = r3;\n r3 = r2;\n goto L_0x00db;\n L_0x0106:\n r0 = move-exception;\n r2 = r3;\n goto L_0x0075;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.telegram.messenger.NativeLoader.loadFromZip(android.content.Context, java.io.File, java.io.File, java.lang.String):boolean\");\n }", "public String getZipCode()\r\n {\r\n\treturn zipCode;\r\n }", "private void processZipEntries(List<ZipEntry> contents, String prefix, int depth) throws SAXException {\r\n if (depth > 0) {\r\n // Get the zip-entries at this level.\r\n ArrayList<Map.Entry<String, ZipEntry>> level = new ArrayList<Map.Entry<String, ZipEntry>>();\r\n for (ZipEntry entry : contents) {\r\n String name = entry.getName();\r\n if (name.length() > prefix.length() && name.startsWith(prefix)) { // Entry is below this level.\r\n name = name.substring(prefix.length());\r\n // Names of files and directories at this level contain no '/' or '/' at the end.\r\n if ((name.indexOf('/') + 1) % name.length() == 0) {\r\n level.add(new AbstractMap.SimpleImmutableEntry<String, ZipEntry>(name, entry));\r\n }\r\n }\r\n }\r\n // Do sorting of the level, if required.\r\n if (sort.equals(\"name\")) {\r\n Collections.sort(level, new Comparator<Map.Entry<String, ZipEntry>>() {\r\n public int compare(Map.Entry<String, ZipEntry> o1, Map.Entry<String, ZipEntry> o2) {\r\n return reverse ? o2.getKey().compareTo(o1.getKey())\r\n : o1.getKey().compareTo(o2.getKey());\r\n }\r\n });\r\n } else if (sort.equals(\"size\")) {\r\n Collections.sort(level, new Comparator<Map.Entry<String, ZipEntry>>() {\r\n public int compare(Map.Entry<String, ZipEntry> o1, Map.Entry<String, ZipEntry> o2) {\r\n return reverse ? Long.compare(o2.getValue().getSize(), o1.getValue().getSize())\r\n : Long.compare(o1.getValue().getSize(), o2.getValue().getSize());\r\n }\r\n });\r\n } else if (sort.equals(\"lastmodified\")) {\r\n Collections.sort(level, new Comparator<Map.Entry<String, ZipEntry>>() {\r\n public int compare(Map.Entry<String, ZipEntry> o1, Map.Entry<String, ZipEntry> o2) {\r\n return reverse ? Long.compare(o2.getValue().getTime(), o1.getValue().getTime())\r\n : Long.compare(o1.getValue().getTime(), o2.getValue().getTime()) ;\r\n }\r\n });\r\n }\r\n // Output nodes in this level.\r\n for (Map.Entry<String, ZipEntry> entry : level) {\r\n if (isIncluded(entry.getKey()) && !isExcluded(entry.getKey())) {\r\n if (entry.getValue().isDirectory()) {\r\n startNode(DIR_NODE_NAME, entry);\r\n processZipEntries(contents, entry.getValue().getName(), depth - 1);\r\n endNode(DIR_NODE_NAME);\r\n } else {\r\n startNode(FILE_NODE_NAME, entry);\r\n endNode(FILE_NODE_NAME);\r\n }\r\n }\r\n }\r\n }\r\n }", "public static void readZip(String zipPath, boolean sort) throws IOException {\n // Load zip and its entries\n ZipFile zip = new ZipFile(new File(zipPath));\n Enumeration<? extends ZipEntry> entries = zip.entries();\n // Read every entry and load it to the HashMap\n while(entries.hasMoreElements()) {\n ZipEntry zipEntry = entries.nextElement();\n InputStream entryStream = zip.getInputStream(zipEntry);\n //Used only for the decoding mode\n //Compressed file that contains the Coded Data\n if(\"codedData.gz\".equals(zipEntry.getName())){\n FileInputStream in = new FileInputStream(\"codedData.gz\");\n GZIPInputStream gis = new GZIPInputStream(in);\n ObjectInputStream ois = new ObjectInputStream(gis);\n try {\n dataList = (ArrayList<CodedData>) (ois.readObject());\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ProjectePractiques.class.getName()).log(Level.SEVERE, null, ex);\n }\n }else{\n BufferedImage image = ImageIO.read(entryStream);\n imageNames.add(zipEntry.getName()); \n imageDict.put(zipEntry.getName(), image);\n }\n }\n zip.close();\n // Sort the image names list\n if(sort){\n Collections.sort(imageNames, (String f1, String f2) -> f1.compareTo(f2)); \n }\n }", "void makeZip(String zipFilePath, String srcFilePaths[],\n\t\t\tMessageDisplay msgDisplay) {\n\t\t...\n\t\tfor (int i = 0; i < srcFilePaths.length; i++) {\n\t\t\tmsgDisplay.showMessage(\"Zipping \"+srcFilePaths[i]);\n\t\t\t//add the file srcFilePaths[i] into the zip file.\n\t\t\t...\n\t\t}\n\t}", "private static void processZip(File zip_name, final Histogram class_use, final Histogram method_use) {\n ZipFile zip_file;\n try {\n zip_file = new ZipFile(zip_name);\n } catch (Exception e) {\n throw new IllegalStateException(\"while reading archive '\"+zip_name+\"': \"+e);\n }\n final Enumeration< ? extends ZipEntry> en = zip_file.entries();\n while (en.hasMoreElements()) {\n final ZipEntry e = en.nextElement();\n final String e_name = e.getName();\n if (e.isDirectory()) continue;\n if (e_name.endsWith(\".class\")){\n try {\n final InputStream object_stream=zip_file.getInputStream(e);\n MethodCallEnumerator.analyzeClass(object_stream,class_use,method_use);\n object_stream.close();\n } catch (Exception ex) {\n throw new IllegalStateException(\"while processing: \"+ ex);\n }\n } \n }\n try {\n zip_file.close();\n } catch (Exception e) {\n throw new IllegalStateException(\"while reading archive: \" + e);\n }\n }", "public void loadZipFile(final String name) {\r\n\t\tfileCombo.setEnabled(false);\r\n\t\tfileText.setText(\"\");\r\n\t\tnew SwingWorker<Void, Void>() {\r\n\t\t\tprotected Void doInBackground() throws Exception {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tZipInputStream zin = new ZipInputStream(\r\n\t\t\t\t\t\t\tnew FileInputStream(zipname));\r\n\t\t\t\t\tZipEntry entry;\r\n\r\n\t\t\t\t\t// find entry with matching name in archive\r\n\t\t\t\t\twhile ((entry = zin.getNextEntry()) != null) {\r\n\t\t\t\t\t\tif (entry.getName().equals(name)) {\r\n\t\t\t\t\t\t\t// read entry into text area\r\n\t\t\t\t\t\t\tScanner in = new Scanner(zin);\r\n\t\t\t\t\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\t\t\t\t\tfileText.append(in.nextLine());\r\n\t\t\t\t\t\t\t\tfileText.append(\"\\n\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tzin.closeEntry();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tzin.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tprotected void done() {\r\n\t\t\t\tfileCombo.setEnabled(true);\r\n\t\t\t}\r\n\t\t}.execute();\r\n\t}", "public void readZip(File f) {\r\n try {\r\n unzip(f);\r\n File file = new File(workplace + \"/temp/USQ_IMAGE\");\r\n File old = new File(workplace + \"/old\");\r\n if(!old.exists())old.mkdir();\r\n if(old.exists()&&old.isFile())old.mkdir();\r\n File files[] = file.listFiles();\r\n for(int i=0 ; i<files.length ; i++){\r\n readFile(files[i]);\r\n }\r\n //new session\r\n createSes(f);\r\n } catch (Exception ex) {\r\n JOptionPane.showMessageDialog(null, \"read zip file failed.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n ex.printStackTrace();\r\n }\r\n }", "private String compactaOrdem(File ordem, String[] arquivosCaixa) throws IOException\n\t{\n\t\t/* Define referencias aos streams de arquivos a serem utilizados */\n\t\t/* Buffer a ser utilizado para leitura dos arquivos de caixa */\n\t\tBufferedInputStream buffOrigem \t= null;\n\t\t/* Esta referencia e do arquivo final (zip) do processo */\n\t\tFileOutputStream \tarqDestino \t= new FileOutputStream(getNomeArquivoCompactado(ordem));\n\t\tZipOutputStream \tarqSaida \t= new ZipOutputStream (new BufferedOutputStream(arqDestino));\n\n\t\t/* Define o buffer de dados com o tamanho sendo definido no\n\t\t * arquivo de configuracao\n\t\t */\n\t\tint sizeBuffer = Integer.parseInt(getPropriedade(\"ordemVoucher.tamanhoBufferArquivos\"));\n\t\tbyte data[] = new byte[sizeBuffer];\n\n\t\tString extArqCriptografado = getPropriedade(\"ordemVoucher.extensaoArquivoCriptografado\");\n\t\t\n\t\t/* Faz a varredura dos arquivos de caixa que serao utilizados\n\t\t * para a compactacao. Lembrando que o nome e o mesmo do arquivo da\n\t\t * ordem com a extensao pgp devido ao utilitario de criptografia\n\t\t */\n\t\tSystem.out.println(\"Iniciando compactacao para o arquivo:\"+getNomeArquivoCompactado(ordem));\n\t\tfor (int i=0; i<arquivosCaixa.length; i++) \n\t\t{\n\t\t\tString nomArqOrigem\t\t\t= arquivosCaixa[i] + extArqCriptografado;\n\t\t\tSystem.out.println(\"Incluindo arquivo de ordem \"+nomArqOrigem+\" no arquivo compactado...\");\n\n\t\t\tFile arquivoOrigem\t\t\t= new File(nomArqOrigem);\n\t\t\tFileInputStream fileInput \t= new FileInputStream(arquivoOrigem);\n\t\t \tbuffOrigem \t\t\t\t\t= new BufferedInputStream(fileInput, sizeBuffer);\n\t\t \tZipEntry entry \t\t\t\t= new ZipEntry(arquivoOrigem.getName());\n\t\t \tarqSaida.putNextEntry(entry);\n\t\t \tint count;\n\t\t\twhile((count = buffOrigem.read(data, 0, sizeBuffer)) != -1) \n\t\t\t arqSaida.write(data, 0, count);\n\t\t\t \n\t\t buffOrigem.close();\n\t\t}\n\t\tarqSaida.close();\n\t\tSystem.out.println(\"Termino da compactacao do arquivo.\");\t\n\t\treturn getNomeArquivoCompactado(ordem); \n\t}", "void importDivision(Connection con, ZipFile zip) throws Exception;", "public void setZip(String zip) {\r\n this.zip = zip == null ? null : zip.trim();\r\n }", "public static void generateZip(File file) {\r\n\t\t\r\n\t\tFile zipfile=new File(file.toString().replaceAll(\".xlsx\",\".zip\" ));\r\n\t\tFileOutputStream fos=null;\r\n\t\tZipOutputStream zos=null;\r\n\t\tFileInputStream fin=null;\r\n\t\tZipEntry ze=null; \r\n\t\t\t\r\n\t\tif(!zipfile.exists()){\r\n\t\t\ttry {\r\n\t\t\t\tzipfile.createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//create ZipOutputStream to write to the zipfile\r\n fos=new FileOutputStream(zipfile);\r\n\t\t\t zos=new ZipOutputStream(fos);\r\n\t\t\t \r\n\t\t//add a new Zip Entry to the ZipOutPutStream \r\n\t\t\t ze=new ZipEntry(file.getName());\r\n\t\t\t zos.putNextEntry(ze);\r\n\t\t\t \r\n\t\t//read the file and write to the ZipOutPutStream\t \r\n\t\t\t fin=new FileInputStream(file);\r\n\t\t\t int i;\r\n\t\t\t \r\n\t\t\t while((i=fin.read())!=-1){\r\n\t\t\t\t zos.write(i);\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t \r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\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}finally{\r\n\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tif(zos!=null && fos!=null && fin!=null){\r\n\t\t\t\t\ttry {\r\n\t\t\t\t //close the zip entry to write to to zip file\r\n\t\t\t\t\t\tzos.closeEntry();\r\n\t\t\t\t\t//close Resources.\t\r\n\t\t\t\t\t\tzos.close();\r\n\t\t\t\t\t\tfos.close();\r\n\t\t\t\t\t\tfin.close();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\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}\r\n\t\t\t}\r\n\t\t}", "private static void createZipArchiv(String xmlStream, String path, String name) {\r\n\t\ttry {\r\n\t\t\tFile file = new File(path, name + \".xml\");\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t}\r\n\t\t\t//XMLStream in Datei schreiben\r\n\t\t\tPrintWriter writer = new PrintWriter(file);\r\n\t\t\twriter.write(xmlStream);\r\n\t\t\twriter.close();\r\n\t\t\t\r\n\t\t\t//Commando für die Shell um ein Tgz zu erstellen.\r\n\t\t\tString[] str = new String[] {\r\n\t\t\t\t\t\"/bin/bash\",\r\n\t\t\t\t\t\"-c\",\r\n\t\t\t\t\t\"tar cfvz \" + path + \"/\" + name + \".tgz -C \" + path + \" \" + name\r\n\t\t\t\t\t\t\t+ \".xml -C \" + path + \" \" + name + \".pdf\" };\r\n\r\n\t\t\t//Shell Aufruf\r\n\t\t\tProcess p = Runtime.getRuntime().exec(str);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tint timeout = 10;\r\n\t\t\twhile (!new File(path + name + \".tgz\").exists() && timeout != 0) {\r\n\t\t\t\t//warten bis Datei erstellt wurde oder 10 sec vergangen sind\r\n\t\t\t\ttry {\r\n\t\t\t\t\ttimeout--;\r\n\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t} catch (InterruptedException 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}\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}", "private static java.io.File c(java.lang.String r8, java.lang.String r9) {\n /*\n r0 = 0;\n r1 = 0;\n r2 = new java.io.File;\t Catch:{ Exception -> 0x00e8, all -> 0x00e4 }\n r2.<init>(r8);\t Catch:{ Exception -> 0x00e8, all -> 0x00e4 }\n r8 = r2.exists();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n if (r8 != 0) goto L_0x001d;\n L_0x000d:\n r8 = \"DecryptUtils\";\n r9 = \"unZipSingleFile file don't exist\";\n r3 = new java.lang.Object[r0];\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n com.taobao.sophix.e.d.e(r8, r9, r3);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n com.taobao.sophix.e.b.a(r1);\n r2.delete();\n return r1;\n L_0x001d:\n r8 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8.<init>();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8.append(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9 = java.io.File.separator;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8.append(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9 = \"unzip\";\n r8.append(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r8 = r8.toString();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9 = new java.io.File;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9.<init>(r8);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n com.taobao.sophix.e.b.a(r9);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r3 = r9.exists();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n if (r3 != 0) goto L_0x0044;\n L_0x0041:\n r9.mkdirs();\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n L_0x0044:\n r9 = new java.util.zip.ZipInputStream;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r3 = new java.io.FileInputStream;\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r3.<init>(r2);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n r9.<init>(r3);\t Catch:{ Exception -> 0x00e1, all -> 0x00de }\n L_0x004e:\n r3 = r9.getNextEntry();\t Catch:{ Exception -> 0x00dc }\n if (r3 == 0) goto L_0x00f4;\n L_0x0054:\n r4 = r3.getName();\t Catch:{ Exception -> 0x00dc }\n r3 = r3.isDirectory();\t Catch:{ Exception -> 0x00dc }\n if (r3 == 0) goto L_0x0085;\n L_0x005e:\n r3 = r4.length();\t Catch:{ Exception -> 0x00dc }\n r3 = r3 + -1;\n r3 = r4.substring(r0, r3);\t Catch:{ Exception -> 0x00dc }\n r4 = new java.io.File;\t Catch:{ Exception -> 0x00dc }\n r5 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x00dc }\n r5.<init>();\t Catch:{ Exception -> 0x00dc }\n r5.append(r8);\t Catch:{ Exception -> 0x00dc }\n r6 = java.io.File.separator;\t Catch:{ Exception -> 0x00dc }\n r5.append(r6);\t Catch:{ Exception -> 0x00dc }\n r5.append(r3);\t Catch:{ Exception -> 0x00dc }\n r3 = r5.toString();\t Catch:{ Exception -> 0x00dc }\n r4.<init>(r3);\t Catch:{ Exception -> 0x00dc }\n r4.mkdirs();\t Catch:{ Exception -> 0x00dc }\n goto L_0x004e;\n L_0x0085:\n r3 = new java.io.File;\t Catch:{ Exception -> 0x00dc }\n r5 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x00dc }\n r5.<init>();\t Catch:{ Exception -> 0x00dc }\n r5.append(r8);\t Catch:{ Exception -> 0x00dc }\n r6 = java.io.File.separator;\t Catch:{ Exception -> 0x00dc }\n r5.append(r6);\t Catch:{ Exception -> 0x00dc }\n r5.append(r4);\t Catch:{ Exception -> 0x00dc }\n r4 = r5.toString();\t Catch:{ Exception -> 0x00dc }\n r3.<init>(r4);\t Catch:{ Exception -> 0x00dc }\n r3.createNewFile();\t Catch:{ Exception -> 0x00dc }\n r4 = new java.io.FileOutputStream;\t Catch:{ Exception -> 0x00c7, all -> 0x00c4 }\n r4.<init>(r3);\t Catch:{ Exception -> 0x00c7, all -> 0x00c4 }\n r5 = 1024; // 0x400 float:1.435E-42 double:5.06E-321;\n r5 = new byte[r5];\t Catch:{ Exception -> 0x00c2 }\n L_0x00aa:\n r6 = r9.read(r5);\t Catch:{ Exception -> 0x00c2 }\n r7 = -1;\n if (r6 == r7) goto L_0x00b8;\n L_0x00b1:\n r4.write(r5, r0, r6);\t Catch:{ Exception -> 0x00c2 }\n r4.flush();\t Catch:{ Exception -> 0x00c2 }\n goto L_0x00aa;\n L_0x00b8:\n com.taobao.sophix.e.b.a(r4);\t Catch:{ Exception -> 0x00dc }\n com.taobao.sophix.e.b.a(r9);\n r2.delete();\n return r3;\n L_0x00c2:\n r3 = move-exception;\n goto L_0x00c9;\n L_0x00c4:\n r8 = move-exception;\n r4 = r1;\n goto L_0x00d8;\n L_0x00c7:\n r3 = move-exception;\n r4 = r1;\n L_0x00c9:\n r5 = \"DecryptUtils\";\n r6 = \"unZipSingleFile unZip hotfix patch file error\";\n r7 = new java.lang.Object[r0];\t Catch:{ all -> 0x00d7 }\n com.taobao.sophix.e.d.a(r5, r6, r3, r7);\t Catch:{ all -> 0x00d7 }\n com.taobao.sophix.e.b.a(r4);\t Catch:{ Exception -> 0x00dc }\n goto L_0x004e;\n L_0x00d7:\n r8 = move-exception;\n L_0x00d8:\n com.taobao.sophix.e.b.a(r4);\t Catch:{ Exception -> 0x00dc }\n throw r8;\t Catch:{ Exception -> 0x00dc }\n L_0x00dc:\n r8 = move-exception;\n goto L_0x00eb;\n L_0x00de:\n r8 = move-exception;\n r9 = r1;\n goto L_0x00fc;\n L_0x00e1:\n r8 = move-exception;\n r9 = r1;\n goto L_0x00eb;\n L_0x00e4:\n r8 = move-exception;\n r9 = r1;\n r2 = r9;\n goto L_0x00fc;\n L_0x00e8:\n r8 = move-exception;\n r9 = r1;\n r2 = r9;\n L_0x00eb:\n r3 = \"DecryptUtils\";\n r4 = \"unZipSingleFile unZip hotfix patch file error\";\n r0 = new java.lang.Object[r0];\t Catch:{ all -> 0x00fb }\n com.taobao.sophix.e.d.a(r3, r4, r8, r0);\t Catch:{ all -> 0x00fb }\n L_0x00f4:\n com.taobao.sophix.e.b.a(r9);\n r2.delete();\n return r1;\n L_0x00fb:\n r8 = move-exception;\n L_0x00fc:\n com.taobao.sophix.e.b.a(r9);\n r2.delete();\n throw r8;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.sophix.e.a.c(java.lang.String, java.lang.String):java.io.File\");\n }", "public String getSrcZip() {\r\n return (String) getAttributeInternal(SRCZIP);\r\n }", "@Override\r\n\tpublic boolean isZip(String remoteFilePath) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\", null, Level.ERROR, null);\r\n\r\n\t}", "public String getZipCode() {\n return zipCode;\n }", "@Override\r\n\tpublic void zipFile(ZipFileDetails zipFileDetails) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\", null, Level.ERROR, null);\r\n\r\n\t}", "private static void extractFile(ZipInputStream inStreamZip, FSDataOutputStream destDirectory) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(destDirectory);\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = inStreamZip.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "public String getZipCode() {\n return zipCode;\n }", "public String getZipCode() {\n return zipCode;\n }", "public String getZipCode() {\n return zipCode;\n }", "private ZipEntry parseCentralDirectoryEntry() throws IOException {\n // Positions the archive at the \"compressed size\" and read the value.\n skipBytes(ZipConstants.CENSIZ - ZipConstants.CENVEM);\n long compressSize = getInt();\n\n // Positions the archive at the \"filename length\" and read the value.\n skipBytes(ZipConstants.CENNAM - ZipConstants.CENLEN);\n int fileNameLen = getShort();\n\n // Reads the extra field length and the comment length.\n int extraLen = getShort();\n int commentLen = getShort();\n\n // Positions the archive at the \"local file header offset\" and read the value.\n skipBytes(ZipConstants.CENOFF - ZipConstants.CENDSK);\n long localHeaderOffset = getInt();\n\n // Reads the file name.\n byte[] fileNameBuf = new byte[fileNameLen];\n archive.read(ByteBuffer.wrap(fileNameBuf));\n String fileName = new String(fileNameBuf, Charset.forName(\"UTF-8\"));\n\n // Skips the extra field and the comment.\n skipBytes(extraLen + commentLen);\n\n ZipEntry entry = new ZipEntry();\n entry.setSize(compressSize);\n entry.setLocalHeaderOffset(localHeaderOffset);\n entry.setName(fileName);\n\n return entry;\n }", "public String getArchiver();", "private String generateZipEntry(String file) {\n return file.substring(srcFolder.length() + 1, file.length());\n }", "public void jieya() {\n\t\tlong startTime=System.currentTimeMillis();\n\t\ttry {\n\t\t\tZipInputStream Zin=new ZipInputStream(new FileInputStream(\n\t\t\t\t\tf1.getText()));//输入源zip路径\n\t\t\tBufferedInputStream Bin=new BufferedInputStream(Zin);\n\t\t\tString Parent=\"D:\\\\XM\\\\解压\"; //输出路径(文件夹目录)\n\t\t\tFile Fout=null;\n\t\t\tZipEntry entry;\n\t\t\ttry {\n\t\t\t\twhile((entry = Zin.getNextEntry())!=null && !entry.isDirectory()){\n\t\t\t\t\tFout=new File(Parent,entry.getName());\n\t\t\t\t\tif(!Fout.exists()){\n\t\t\t\t\t\t(new File(Fout.getParent())).mkdirs();\n\t\t\t\t\t}\n\t\t\t\t\tFileOutputStream out=new FileOutputStream(Fout);\n\t\t\t\t\tBufferedOutputStream Bout=new BufferedOutputStream(out);\n\t\t\t\t\tint b;\n\t\t\t\t\twhile((b=Bin.read())!=-1){\n\t\t\t\t\t\tBout.write(b);\n\t\t\t\t\t}\n\t\t\t\t\tBout.close();\n\t\t\t\t\tout.close();\n\t\t\t\t\tJOptionPane.showMessageDialog(null,Fout+\"解压成功\");\t\n\t\t\t\t}\n\t\t\t\tBin.close();\n\t\t\t\tZin.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tlong endTime=System.currentTimeMillis();\n\t}", "public boolean intZip() {\n return intZip;\n }", "protected static void zipDir(File zipDir, ZipOutputStream zos, String archiveSourceDir)\n throws IOException {\n String[] dirList = zipDir.list();\n byte[] readBuffer = new byte[40960];\n int bytesIn;\n //loop through dirList, and zip the files\n if (dirList != null) {\n for (String aDirList : dirList) {\n File f = new File(zipDir, aDirList);\n //place the zip entry in the ZipOutputStream object\n zos.putNextEntry(new ZipEntry(getZipEntryPath(f, archiveSourceDir)));\n if (f.isDirectory()) {\n //if the File object is a directory, call this\n //function again to add its content recursively\n zipDir(f, zos, archiveSourceDir);\n //loop again\n continue;\n }\n //if we reached here, the File object f was not a directory\n //create a FileInputStream on top of f\n try (FileInputStream fis = new FileInputStream(f)) {\n //now write the content of the file to the ZipOutputStream\n while ((bytesIn = fis.read(readBuffer)) != -1) {\n zos.write(readBuffer, 0, bytesIn);\n }\n }\n }\n }\n }", "@Override\n public void run() {\n txt_Nombre.setVisible(false);\n //ocultamos el boton Enviar\n btnaceptar.setVisible(false);\n //ocultamos boton Eliminar archivo\n btnEliminarArchivo.setVisible(false);\n //Ocultamos boton Seleccionar archivo\n btnselecionar.setVisible(false);\n //preparamos la salida de datos del Zip\n ZipOutputStream zout;\n //preparamos la salida de datos para el archivo\n BufferedOutputStream bos;\n try {\n //creamos el archivo y lo guardamos \n ruta=nombreZip+\".zip\";\n //creamos el flujo de salida hacia el archivo Zip\n bos = new BufferedOutputStream(new FileOutputStream(ruta));\n zout = new ZipOutputStream(bos);\n int i=0;\n //Hacemos visibles todos los componentes de las barras de progreso\n lblGeneral.setVisible(true);\n barraGeneral.setVisible(true);\n barra.setVisible(true);\n barra.setStringPainted(true);\n //ponemosd de color verde la barra\n barraGeneral.setForeground(Color.GREEN);\n //habilitamos el String del porcentaje\n barraGeneral.setStringPainted(true);\n //ponemos el valor Maximo de la barra\n barraGeneral.setMaximum((int)(pesoTotal/100));\n //ponemos el valor Minimo\n barraGeneral.setMinimum(0);\n //variable para el progreso de la barra General\n long leidoTotal=0;\n lbInfo.setHorizontalAlignment(JLabel.LEFT);\n for (String documento : documentos) {\n //creamos una nueva entrada/ducumento para el Zip\n ZipEntry ze = new ZipEntry(nombres.get(i));\n //agregamos la entrada al Zip\n zout.putNextEntry(ze);\n //obtenemos el archivo \n File arch=new File(documentos.get(i));\n //Indicamos cual archivo se esta comprimiendo\n lbInfo.setText(\"comprimiendo: \"+arch.getName());\n //obtenemos el tamaño del archivo\n long tamañoArch=arch.length();\n //ponemos el valor maximo de a la barra individual\n barra.setMaximum((int)(tamañoArch/100));\n //ponemos el valor minimo\n barra.setMinimum(0);\n //cambiamos el color de la barra\n barra.setForeground(Color.GREEN);\n barra.setValue(0);\n //creamos el Stream de entrada del archivo\n BufferedInputStream bis=new BufferedInputStream(new FileInputStream(documentos.get(i)));\n //tamaño de buffer para lectura del archivo\n byte[] info=new byte[4096];\n //variable para el progreso de la barra individual\n long leido=0;\n //Ciclo para lectura del archivo\n while(leido<tamañoArch)\n {\n //Verifica que se puedan leer otros 4KB \n if((leido+4096)<tamañoArch)\n {\n //leemos 4KB del Archivo\n bis.read(info);\n //agregamos los 4KB a las variables de progreso\n leido+=4096;\n leidoTotal+=4096;\n }\n else\n {\n //si no se puede leer 4KB lee el resto del archivo\n int resto=(int)(tamañoArch-leido);\n //damos el tamaño al arreglo\n info=new byte[resto];\n //leemos el resto del archivo\n bis.read(info);\n //agregamos el resto del a las variables de progreso\n leido+=resto;\n leidoTotal+=resto;\n }\n //escribimos en el archivo Zip\n zout.write(info);\n //ponemos el valor en la barra individual\n barra.setValue((int)(leido/100));\n //ponemos el valor en la barra general\n barraGeneral.setValue((int)(leidoTotal/100));\n }\n //cerramos la escritura a la entradadel Zip\n zout.closeEntry();\n //aumentamos el valor del contador\n i++;\n }\n //cerramos la escritura al archivo Zip\n zout.close();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(EnviarArchivo.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(EnviarArchivo.class.getName()).log(Level.SEVERE, null, ex);\n } \n //verificamos que tipo de envio se selecciono\n if(rbtnSimultaneo.isSelected())\n {\n //orden para archivos simultaneos y envios individuales\n orden.enviarArchivoSimultaneo(ruta,ip);\n }\n else\n {\n //orden para envio Secuencial\n orden.envioArchivoSecuencial(ruta);\n }\n //llamamos el metodo cerrar para cerrar la ventana\n cerrar();\n }", "public void convertToZip(String input, String output) throws ZipException {\n\t\tZipFile zip = new ZipFile(output); \n\t ZipParameters parameters = new ZipParameters();\n parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);\n parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL); \n\t zip.addFolder(input, parameters);\n\t}", "public void toUnzip(String zipFile, String targetDir) {\n\n\t\tMessage message = new Message();\n\t\tmessage.what = SUCCESS;\n\n\t\tint SIZE = 4096; // buffer size: 4KB\n\t\tString strEntry; // each zip entry name\n\t\ttry {\n\t\t\tBufferedOutputStream dest = null; // buffer output stream\n\t\t\tFileInputStream fis = new FileInputStream(zipFile);\n\t\t\tZipInputStream zis = new ZipInputStream(\n\t\t\t\t\tnew BufferedInputStream(fis));\n\t\t\tZipEntry entry; // each zip entry\n\t\t\twhile ((entry = zis.getNextEntry()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tint count;\n\t\t\t\t\tbyte data[] = new byte[SIZE];\n\t\t\t\t\tstrEntry = entry.getName();\n\n\t\t\t\t\tFile entryFile = new File(targetDir + strEntry);\n\t\t\t\t\tFile entryDir = new File(entryFile.getParent());\n\t\t\t\t\tif (!entryDir.exists()) {\n\t\t\t\t\t\tentryDir.mkdirs();\n\t\t\t\t\t}\n\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(entryFile);\n\t\t\t\t\tdest = new BufferedOutputStream(fos, SIZE);\n\t\t\t\t\twhile ((count = zis.read(data, 0, SIZE)) != -1) {\n\t\t\t\t\t\tdest.write(data, 0, count);\n\n\t\t\t\t\t\tMessage msg = Message.obtain();\n\t\t\t\t\t\tmsg.what = PROGRESS;\n\t\t\t\t\t\tmsg.obj = count;\n\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t}\n\t\t\t\t\tdest.flush();\n\t\t\t\t\tdest.close();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tmessage.what = ERROR;\n\t\t\t\t\tmessage.obj = ex.getMessage();\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tzis.close();\n\t\t\tFile fileszipe = new File(zipFile);\n\t\t\tfileszipe.delete();\n\t\t} catch (Exception cwj) {\n\t\t\tmessage.what = ERROR;\n\t\t\tmessage.obj = cwj.getMessage();\n\t\t\tcwj.printStackTrace();\n\t\t}\n\t\thandler.sendMessage(message);\n\t}", "boolean hasHasZipCode();", "public static int convertZipToZone(int zip) {\n\t\t// HINT: This always return 0 but that's not right.\n\t\t// Fix it so that it returns the correct zone based on the zip.\n\t\t// You don't need a helper function for this.\n\t\treturn 0;\n\t}", "private static void extract (Path zipPath, Path destination)\n\t\tthrows IOException\n\t{\n\t\tif (Files.isDirectory (zipPath))\n\t\t{\n\t\t\ttry (DirectoryStream<Path> directoryStream = Files\n\t\t\t\t.newDirectoryStream (zipPath);)\n\t\t\t{\n\t\t\t\tfor (Path file : directoryStream)\n\t\t\t\t{\n\t\t\t\t\textract (file, destination);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPath fileOutZip = destination\n\t\t\t\t.resolve (\"./\" + zipPath.normalize ().toString ()).normalize ();\n\t\t\tFiles.createDirectories (fileOutZip.getParent ());\n\t\t\tFiles.copy (zipPath, fileOutZip, Utils.COPY_OPTION);\n\t\t}\n\t}", "public void respaldo() {\n if (seleccionados != null && seleccionados.length > 0) {\n ZipOutputStream salidaZip; //Donde va a quedar el archivo zip\n\n File file = new File(FacesContext.getCurrentInstance()\n .getExternalContext()\n .getRealPath(\"/temporales/\") + archivoRespaldo + \".zip\");\n\n try {\n salidaZip\n = new ZipOutputStream(new FileOutputStream(file));\n ZipEntry entradaZip;\n\n for (String s : seleccionados) {\n if (s.contains(\"Paises\")) {\n\n entradaZip = new ZipEntry(\"paises.json\");\n salidaZip.putNextEntry(entradaZip);\n byte data[]\n = PaisGestion.generaJson().getBytes();\n salidaZip.write(data, 0, data.length);\n salidaZip.closeEntry();\n }\n }\n salidaZip.close();\n\n // Descargar el archivo zip\n //Se carga el zip en un arreglo de bytes...\n byte[] zip = Files.readAllBytes(file.toPath());\n\n //Generar la página de respuesta...\n HttpServletResponse respuesta\n = (HttpServletResponse) FacesContext\n .getCurrentInstance()\n .getExternalContext()\n .getResponse();\n\n ServletOutputStream salida\n = respuesta.getOutputStream();\n\n //Defino los encabezados de la página de respuesta\n respuesta.setContentType(\"application/zip\");\n respuesta.setHeader(\"Content-Disposition\",\n \"attachement; filename=\" + archivoRespaldo + \".zip\");\n\n salida.write(zip);\n salida.flush();\n\n //Todo listo\n FacesContext.getCurrentInstance().responseComplete();\n file.delete();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(RespaldoController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(RespaldoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n\n }", "public java.lang.String getZipCode() {\n return zipCode;\n }", "public void unzip(File f) throws Exception {\r\n String destDir = workplace + \"/temp/\";\r\n File tmp = new File(destDir);\r\n if(!tmp.exists())tmp.mkdir();\r\n byte b[] = new byte [1024];\r\n int length;\r\n \r\n ZipFile zipFile;\r\n zipFile = new ZipFile(f);\r\n Enumeration enumeration = zipFile.entries();\r\n ZipEntry zipEntry = null ;\r\n OutputStream outputStream = null;\r\n InputStream inputStream = null;\r\n while (enumeration.hasMoreElements()) {\r\n zipEntry = (ZipEntry) enumeration.nextElement();\r\n File loadFile = new File(destDir + zipEntry.getName());\r\n if (zipEntry.isDirectory()) {\r\n // 这段都可以不要,因为每次都貌似从最底层开始遍历的\r\n loadFile.mkdirs();\r\n }else{\r\n if (!loadFile.getParentFile().exists())\r\n loadFile.getParentFile().mkdirs();\r\n outputStream = new FileOutputStream(loadFile);\r\n inputStream = zipFile.getInputStream(zipEntry);\r\n while ((length = inputStream.read(b)) > 0)\r\n outputStream.write(b, 0, length);\r\n }\r\n }\r\n outputStream.flush();\r\n outputStream.close();\r\n inputStream.close();\r\n }", "private byte[] readBinaryZipEntry(ZipInputStream zis)\r\n\t\tthrows IOException\r\n\t{\r\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\r\n\t\tint read;\r\n\t\tbyte[] buffer = new byte[1024];\r\n\r\n\t\twhile ((read = zis.read(buffer, 0, buffer.length)) != -1)\r\n\t\t\tbos.write(buffer, 0, read);\r\n\r\n\t\treturn bos.toByteArray();\r\n\t}", "public void setZipcode(String newZip) {\n this.zipCode = newZip;\n }", "public String getZipcode() {\n return zipCode;\n }", "public String getZip_code()\n {\n \treturn zip_code;\n }", "public static void m97139a(File file, ZipOutputStream zipOutputStream, String str) throws IOException {\n if (file.exists()) {\n if (file.isDirectory()) {\n String name = file.getName();\n if (!name.endsWith(File.separator)) {\n name = name + File.separator;\n }\n if (!TextUtils.isEmpty(str)) {\n name = str + name;\n }\n File[] listFiles = file.listFiles();\n if (listFiles == null || listFiles.length <= 0) {\n zipOutputStream.putNextEntry(new ZipEntry(name));\n zipOutputStream.closeEntry();\n return;\n }\n for (File file2 : listFiles) {\n m97139a(file2, zipOutputStream, name);\n }\n return;\n }\n zipOutputStream.putNextEntry(new ZipEntry(TextUtils.isEmpty(str) ? file.getName() : str + file.getName()));\n FileInputStream fileInputStream = new FileInputStream(file);\n byte[] bArr = new byte[4096];\n while (true) {\n int read = fileInputStream.read(bArr);\n if (read != -1) {\n zipOutputStream.write(bArr, 0, read);\n } else {\n zipOutputStream.flush();\n fileInputStream.close();\n zipOutputStream.closeEntry();\n return;\n }\n }\n } else {\n return;\n }\n throw th;\n }", "public void setSrcZip(String value) {\r\n setAttributeInternal(SRCZIP, value);\r\n }", "public List<String> getListOfZipFiles()\n {\n \treturn fileList;\n }" ]
[ "0.70088637", "0.64633083", "0.6314968", "0.6314968", "0.6273657", "0.6237212", "0.6019596", "0.5861185", "0.58517057", "0.58334637", "0.58103484", "0.5799573", "0.5797663", "0.57915896", "0.5779746", "0.5776924", "0.5766762", "0.5754575", "0.5752473", "0.5682919", "0.5645132", "0.56425303", "0.56425166", "0.5636939", "0.56127036", "0.56104255", "0.55662906", "0.5557898", "0.55331475", "0.5532523", "0.5528301", "0.55075467", "0.5491282", "0.54789156", "0.5471839", "0.5455669", "0.5435762", "0.5429944", "0.5420167", "0.5388665", "0.5369292", "0.5362238", "0.534028", "0.533795", "0.53262025", "0.5301888", "0.52735794", "0.5270095", "0.5269469", "0.52639", "0.52539563", "0.52452374", "0.5239327", "0.5230156", "0.5223955", "0.521963", "0.52188677", "0.5217609", "0.5214953", "0.52017295", "0.5194827", "0.518589", "0.51782286", "0.5167444", "0.5165175", "0.516517", "0.5151766", "0.514994", "0.514658", "0.5137448", "0.5120906", "0.51176876", "0.51173955", "0.5116712", "0.5115487", "0.5112942", "0.50920993", "0.50920993", "0.50920993", "0.50903684", "0.5076091", "0.5067236", "0.5058702", "0.5057979", "0.5057253", "0.50563955", "0.5044838", "0.5037357", "0.50248665", "0.5022866", "0.5018632", "0.5012881", "0.5006406", "0.49985954", "0.49977297", "0.4990228", "0.4989389", "0.49885353", "0.49869612", "0.49860397", "0.49841636" ]
0.0
-1
Dialog zum Anlegen eines Verzeichnisses und Operationen in XtreemFS.
private void createNewDirectory() { getMainWindow().addWindow( new TextInputDialog( "Create Directory", "Create Directory", "New Folder", new TextInputDialog.Callback() { public void onDialogResult(boolean happy, String newDirectory) { if ( happy && isValidFile(newDirectory)) { try { // Verzeichnis anlegen File newDir = getFile(newDirectory); if (!newDir.exists()) { newDir.mkdir(0755); } // Prüfen, ob das Verzeichnis angelegt wurde if (newDir.exists()) { loadXtreemFSData(); showNotification("Success", "Directory " + newDirectory + " created.", Notification.TYPE_TRAY_NOTIFICATION, null); } else { showNotification("Error", "Directory " + newDirectory + " could not be created.", Notification.TYPE_WARNING_MESSAGE, null); } } catch (IOException e) { showNotification("Error", e.toString(), Notification.TYPE_ERROR_MESSAGE, e); } } } })); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showFileManagerDialog();", "private void showVMDialog(int msgStatus) {\n switch (msgStatus) {\n case MSG_VM_EXCEPTION:\n showDialog(VM_RESPONSE_ERROR);\n break;\n case MSG_VM_NOCHANGE:\n showDialog(VM_NOCHANGE_ERROR);\n break;\n case MSG_VM_OK:\n showDialog(VOICEMAIL_DIALOG_CONFIRM);\n break;\n case MSG_OK:\n default:\n // This should never happen.\n }\n }", "public void verVerConvocatorias()\r\n\t{\r\n\t\tactualizarFinalizacionConvocatorias();\r\n\t\tverconvocatorias = new VerConvocatorias(this);\r\n\t\tverconvocatorias.setVisible(true);\r\n\t}", "private void openContext() {\n\t\tJFileChooser fileChooser = new JFileChooser(LMPreferences\n\t\t\t\t.getLastDirectory());\n\n\t\t// Propriétés du fileChooser\n\t\tfileChooser.setApproveButtonText(GUIMessages\n\t\t\t\t.getString(\"GUI.openButton\")); //$NON-NLS-1$\n\t\tfileChooser.setDialogTitle(GUIMessages.getString(\"GUI.openAContext\")); //$NON-NLS-1$\n\t\tfileChooser.setAcceptAllFileFilterUsed(true);\n\t\tfileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\n\n\t\t// Gere les extensions compatibles (cex, lmv, lmn, lmb)\n\t\tExampleFileFilter filterCex = new ExampleFileFilter(\n\t\t\t\t\"cex\", GUIMessages.getString(\"GUI.conceptExplorerBinaryFormat\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tfileChooser.addChoosableFileFilter(filterCex);\n\t\tExampleFileFilter filterGaliciaBinSLF = new ExampleFileFilter(\n\t\t\t\t\"slf\", GUIMessages.getString(\"GUI.galiciaSLFBinaryFormat\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tfileChooser.addChoosableFileFilter(filterGaliciaBinSLF);\n\t\tExampleFileFilter filterGaliciaBin = new ExampleFileFilter(\n\t\t\t\t\"bin.xml\", GUIMessages.getString(\"GUI.galiciaXMLBinaryFormat\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tfileChooser.addChoosableFileFilter(filterGaliciaBin);\n\t\tExampleFileFilter filterValued = new ExampleFileFilter(\n\t\t\t\t\"lmv\", GUIMessages.getString(\"GUI.LatticeMinerValuedFormat\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tfileChooser.addChoosableFileFilter(filterValued);\n\t\tExampleFileFilter filterNested = new ExampleFileFilter(\n\t\t\t\t\"lmn\", GUIMessages.getString(\"GUI.LatticeMinerNestedFormat\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tfileChooser.addChoosableFileFilter(filterNested);\n\t\tExampleFileFilter filterBinary = new ExampleFileFilter(\n\t\t\t\t\"lmb\", GUIMessages.getString(\"GUI.LatticeMinerBinaryFormat\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tfileChooser.addChoosableFileFilter(filterBinary);\n\t\tExampleFileFilter filterLM = new ExampleFileFilter(new String[] {\n\t\t\t\t\"lmb\", \"lmn\", \"lmv\" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n\t\t\t\tGUIMessages.getString(\"GUI.LatticeMinerFormats\")); //$NON-NLS-1$\n\t\tfileChooser.addChoosableFileFilter(filterLM);\n\n\t\t// La boite de dialogue\n\t\tint returnVal = fileChooser.showOpenDialog(this);\n\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile contextFile = fileChooser.getSelectedFile();\n\t\t\topenContextFile(contextFile);\n\n\t\t\t// Sauvegarde le path utilisé\n\t\t\tLMPreferences.setLastDirectory(fileChooser.getCurrentDirectory()\n\t\t\t\t\t.getAbsolutePath());\n\t\t}\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 void verVerDescripcion()\r\n\t{\r\n\t\tverdescripcion = new VerDescripcion(this);\r\n\t\tverdescripcion.setVisible(true);\r\n\t}", "private void dialogChanged() {\n\t\tString fileName = getFileName();\n\t\tString dirStr = getPathStr();\n\n\t\tif (dirStr.length() == 0) {\n\t\t\tupdateStatus(\"Directory must be specified\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (fileName == null || fileName.length() == 0) {\n\t\t\tupdateStatus(\"File name must be specified\");\n\t\t\treturn;\n\t\t}\n\t\tif (fileName.replace('\\\\', '/').indexOf('/', 1) > 0) {\n\t\t\tupdateStatus(\"File name must be valid\");\n\t\t\treturn;\n\t\t}\n\t\tupdateStatus(null);\n\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}", "public void onClick(DialogInterface dialog,int id) {\n\t\t\t\t\t\t\t\t\tgetContext().fileList();\n\t\t\t\t\t\t\t\t}", "private void handleXMLBrowse(Shell parent) {\n\t\tFileDialog fileDialog = new FileDialog(parent);\n\t\tfileDialog.setFilterExtensions(new String[] { WSASCreationUIMessages.FILE_XML });\n\t\tString fileName = fileDialog.open();\n\t\tif (fileName != null) {\n\t\t\tservicesXMLPath.setText(fileName);\n\t\t\tmodel.setPathToServicesXML( servicesXMLPath.getText() );\n\t\t}\n\t}", "private void initContextMenu() throws Exception {\n\t\t\n\t\tMenuManager menuManager = new MenuManager();\n\t\tMenu menu = menuManager.createContextMenu(wrapedViewer.getTree());\n\t\twrapedViewer.getTree().setMenu(menu);\n\t\t\n\t\t//--RDF and RDFS columns\n\t\tResultViewerColumnInfo labelColumnInfo = new ResultViewerColumnInfo(\"rdfs:label\", RDFS.LABEL);\n\t\tSetColumnVisibleAction showLabelAction = new SetColumnVisibleAction(labelColumnInfo, this);\n\t\tcontextMenuActions.put(labelColumnInfo.getColumnType(), showLabelAction);\n\t\tmenuManager.add(showLabelAction);\n\t\t//ResultViewerColumnInfo typeColumnInfo = new ResultViewerColumnInfo(\"rdf:type\", RDF.TYPE);\n\t\t//SetColumnVisibleAction showTypeAction = new SetColumnVisibleAction(typeColumnInfo, this);\n\t\t//contextMenuActions.put(typeColumnInfo.getColumnType(), showTypeAction);\n\t\t//menuManager.add(showTypeAction);\n\t\t\n\t\t//--Peer column\n\t\tResultViewerColumnInfo peerColumnInfo = new ResultViewerColumnInfo(\"oyster:peer\", Constants.POMVURI+Constants.ontologyOMVLocation);\n\t\tSetColumnVisibleAction showPeerAction = new SetColumnVisibleAction(peerColumnInfo, this);\n\t\tcontextMenuActions.put(peerColumnInfo.getColumnType(), showPeerAction);\n\t\tmenuManager.add(showPeerAction);\n\t\tmenuManager.add(new Separator());\n\t\t\n\t\t\n\t\tOntology resourceTypeOntology = mOyster2.getTypeOntology();\n\t\tOWLClass ontologyClass = KAON2Manager.factory().owlClass(Constants.OMV+Constants.DefaultTypeOntologyRoot);\n\t\ttry{\n\t\t\t/*KAON2 BUG, DOES NOT SUPPORT OWL DL\n\t * SHOULD BE DELETED WHEN IT DOES\n\t */\n\t\t\t\n\t\t\tResultViewerColumnInfo nameColumnInfo = new ResultViewerColumnInfo(MainWindow.whichName(Constants.omvCondition+Constants.name), Constants.OMVURI+Constants.name);\n\t\t\tSetColumnVisibleAction showNameAction = new SetColumnVisibleAction(nameColumnInfo, this);\n\t\t\tcontextMenuActions.put(nameColumnInfo.getColumnType(), showNameAction);\n\t\t\tmenuManager.add(showNameAction);\n\t\t\tResultViewerColumnInfo acronymColumnInfo = new ResultViewerColumnInfo(MainWindow.whichName(Constants.omvCondition+Constants.acronym), Constants.OMVURI+Constants.acronym);\n\t\t\tSetColumnVisibleAction showAcronymAction = new SetColumnVisibleAction(acronymColumnInfo, this);\n\t\t\tcontextMenuActions.put(acronymColumnInfo.getColumnType(), showAcronymAction);\n\t\t\tmenuManager.add(showAcronymAction);\n\t\t\tResultViewerColumnInfo descriptionColumnInfo = new ResultViewerColumnInfo(MainWindow.whichName(Constants.omvCondition+Constants.description), Constants.OMVURI+Constants.description);\n\t\t\tSetColumnVisibleAction showDescriptionAction = new SetColumnVisibleAction(descriptionColumnInfo, this);\n\t\t\tcontextMenuActions.put(descriptionColumnInfo.getColumnType(), showDescriptionAction);\n\t\t\tmenuManager.add(showDescriptionAction);\n\t\t\tResultViewerColumnInfo documentationColumnInfo = new ResultViewerColumnInfo(MainWindow.whichName(Constants.omvCondition+Constants.documentation), Constants.OMVURI+Constants.documentation);\n\t\t\tSetColumnVisibleAction showDocumentationAction = new SetColumnVisibleAction(documentationColumnInfo, this);\n\t\t\tcontextMenuActions.put(documentationColumnInfo.getColumnType(), showDocumentationAction);\n\t\t\tmenuManager.add(showDocumentationAction);\n\t\t\tResultViewerColumnInfo uriColumnInfo = new ResultViewerColumnInfo(MainWindow.whichName(Constants.omvCondition+Constants.URI), Constants.OMVURI+Constants.URI);\n\t\t\tSetColumnVisibleAction showURIAction = new SetColumnVisibleAction(uriColumnInfo, this);\n\t\t\tcontextMenuActions.put(uriColumnInfo.getColumnType(), showURIAction);\n\t\t\tmenuManager.add(showURIAction);\n\t\t\t\n\t\t\t/* UNTIL HERE */\n\t\t\t\n\t\t\tSet<DataProperty> dataProperties=ontologyClass.getDataPropertiesFrom(resourceTypeOntology);\n\t\t\tfor (DataProperty dataProperty : dataProperties){\n\t\t\t\tSetColumnVisibleAction action = new SetColumnVisibleAction(new ResultViewerColumnInfo(MainWindow.whichName(Constants.omvCondition+Namespaces.guessLocalName(dataProperty.getURI())), dataProperty.getURI()), this);\n\t\t\t\tcontextMenuActions.put(dataProperty.getURI(), action);\n\t\t\t\tmenuManager.add(action);\n\t\t\t}\n\t Set<ObjectProperty> objectProperties=ontologyClass.getObjectPropertiesFrom(resourceTypeOntology);\n\t for (ObjectProperty objectProperty : objectProperties){\n\t \tSetColumnVisibleAction action = new SetColumnVisibleAction(new ResultViewerColumnInfo(MainWindow.whichName(Constants.omvCondition+Namespaces.guessLocalName(objectProperty.getURI())), objectProperty.getURI()), this);\n\t\t\t\tcontextMenuActions.put(objectProperty.getURI(), action);\n\t\t\t\tmenuManager.add(action);\n\t }\n\t \n\t\t}\n\t catch (KAON2Exception e) {\n\t \tSystem.err.println(e + \" in contextinit()\");\n\t }\n\t\t\n\t}", "private void showAudioFilebrowserDialog() {\n\t\tFragmentTransaction ft = getFragmentManager().beginTransaction();\n\t\tFilebrowserDialogFragment fbdf = new FilebrowserDialogFragment();\n\t\tfbdf.show(ft, \"dialog\");\n\t}", "@Override\n\tprotected Control createDialogArea(Composite parent) {\n\t\tsetMessage(\"\\u9009\\u62E9\\u9879\\u76EE\\u8D44\\u6E90\\u6587\\u4EF6\\u5939\");\n\t\tsetTitle(\"\\u7533\\u62A5\\u9879\\u76EE\\u6587\\u4EF6\\u5939\\u9009\\u62E9\\u5BF9\\u8BDD\\u6846\");\n\t\tComposite area = (Composite) super.createDialogArea(parent);\n\t\tComposite container = new Composite(area, SWT.NONE);\n\t\tcontainer.setLayout(new GridLayout(4, false));\n\t\tcontainer.setLayoutData(new GridData(GridData.FILL_BOTH));\n\t\t\n\t\tLabel label = new Label(container, SWT.NONE);\n\t\tlabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tlabel.setText(\"\\u9879\\u76EE\\u8D44\\u6E90\\u6587\\u4EF6\\u5939\\uFF1A\");\n\t\t\n\t\tpathText = new Text(container, SWT.BORDER);\n\t\tpathText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));\n\t\t\n\t\tButton importBtn = new Button(container, SWT.NONE);\n\t\timportBtn.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tString dirPath = new DirectoryDialog(getShell(),SWT.OPEN).open();\n\t\t\t\tif (dirPath!=null) {\n\t\t\t\t\tpathText.setText(dirPath);\n\t\t\t\t\t\n//\t\t\t\t\tcheckboxTreeViewer.setInput(Paths.get(dirPath));\n\t\t\t\t\tcheckboxTreeViewer.setInput(Paths.get(dirPath).toFile());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tGridData gd_importBtn = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);\n\t\tgd_importBtn.widthHint = 61;\n\t\timportBtn.setLayoutData(gd_importBtn);\n\t\timportBtn.setText(\"\\u5BFC\\u5165\");\n\t\t\n\t\tcheckboxTreeViewer = new CheckboxTreeViewer(container, SWT.BORDER);\n\t\ttree = checkboxTreeViewer.getTree();\n\t\ttree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));\n\t\tcheckboxTreeViewer.setContentProvider(new FileTreeContentProvider());\n\t\tcheckboxTreeViewer.setLabelProvider(new FileTreeLabelProvider());\n\t\t\n\t\t//监听状态,如果选择一个树节点,则其所有子节点将被选中\n\t\tcheckboxTreeViewer.addCheckStateListener(new ICheckStateListener() {\n\t\t\t@Override\n\t\t\tpublic void checkStateChanged(CheckStateChangedEvent event) {\n\t\t\t\tif (event.getChecked()) {\n\t\t\t\t\t//check all its children\n\t\t\t\t\tcheckboxTreeViewer.setSubtreeChecked(event.getElement(), true);\n\t\t\t\t}else\n\t\t\t\t\tcheckboxTreeViewer.setSubtreeChecked(event.getElement(), false);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tComposite composite = new Composite(container, SWT.NONE);\n\t\tcomposite.setLayout(new GridLayout(1, false));\n\t\tcomposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));\n\t\t\n\t\tButton selAllBtn = new Button(composite, SWT.NONE);\n\t\tselAllBtn.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tcheckboxTreeViewer.setAllChecked(true);\n\t\t\t}\n\t\t});\n\t\tselAllBtn.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tselAllBtn.setText(\"\\u5168\\u90E8\\u9009\\u4E2D\");\n\t\t\n\t\tButton deSelAllBtn = new Button(composite, SWT.NONE);\n\t\tdeSelAllBtn.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tcheckboxTreeViewer.setAllChecked(false);\n\t\t\t}\n\t\t});\n\t\tdeSelAllBtn.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tdeSelAllBtn.setText(\"\\u5168\\u90E8\\u4E0D\\u9009\");\n\t\t\n\t\tButton refreshBtn = new Button(composite, SWT.NONE);\n\t\trefreshBtn.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\trefreshBtn.setText(\"\\u5237\\u65B0\");\n\t\t\n\t\tLabel label_4 = new Label(container, SWT.NONE);\n\t\tlabel_4.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\n\t\tlabel_4.setText(\"\\u9879\\u76EE\\u6240\\u5C5E\\u5E74\\u5EA6:\");\n\t\t\n\t\tyearText = new Text(container, SWT.BORDER);\n\t\tyearText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\t\tyearText.setEnabled(false);\n\t\t\n\t\tmdfBtn = new Button(container, SWT.CHECK);\n\t\tmdfBtn.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));\n\t\tmdfBtn.setText(\"\\u4FEE\\u6539\");\n\t\t\n\t\tLabel label_1 = new Label(container, SWT.NONE);\n\t\tlabel_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\n\t\tlabel_1.setText(\"\\u9879\\u76EE\\u72B6\\u6001\\uFF1A\");\n\t\t\n\t\tstatusCombo = new Combo(container, SWT.NONE);\n\t\tstatusCombo.setItems(new String[] {\"\\u5F85\\u7533\\u62A5\", \"\\u7533\\u62A5\\u4E2D\", \"\\u5DF2\\u7533\\u62A5\", \"\\u5DF2\\u7ED3\\u9898\"});\n\t\tstatusCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));\n\t\tstatusCombo.select(0);\n\t\t\n\t\tLabel label_2 = new Label(container, SWT.NONE);\n\t\tlabel_2.setText(\"\\u9879\\u76EE\\u7533\\u8BF7\\u622A\\u6B62\\u65F6\\u95F4:\");\n\t\t\n\t\tdeadlineCombo = new CalendarCombo(container, SWT.NONE);\n\t\tGridData gd_deadlineCombo = new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1);\n\t\tgd_deadlineCombo.widthHint = 122;\n\t\tdeadlineCombo.setLayoutData(gd_deadlineCombo);\n\t\t\n\t\tremindBtn = new Button(container, SWT.NONE);\n\t\tremindBtn.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tnew ReminderDialog(getShell()).open();\n\t\t\t}\n\t\t});\n\t\tremindBtn.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tremindBtn.setText(\"\\u81EA\\u52A8\\u63D0\\u9192\");\n\t\t\n\t\tLabel label_3 = new Label(container, SWT.NONE);\n\t\tlabel_3.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\n\t\tlabel_3.setText(\"\\u63D0\\u4EA4\\u8054\\u7CFB\\u4EBA:\");\n\t\t\n\t\tcontactorText = new Text(container, SWT.BORDER);\n\t\tcontactorText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));\n\t\t\n\t\tButton selCnBtn = new Button(container, SWT.NONE);\n\t\tselCnBtn.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tContactorListDialog contactorListDialog =new ContactorListDialog(getShell());\n\t\t\t\tif(contactorListDialog.open()== IDialogConstants.OK_ID)\n\t\t\t\t\tcontactors = contactorListDialog.getContactors();\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tfor (int i = 0; i < contactors.length; i++) {\n\t\t\t\t\tContactor contactor = contactors[i];\n\t\t\t\t\tsb.append(contactor.toString());\n\t\t\t\t\tsb.append(\",\");\n\t\t\t\t}\n\t\t\t\tcontactorText.setText(sb.deleteCharAt(sb.length()-1).toString());\n\t\t\t}\n\t\t});\n\t\tselCnBtn.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tselCnBtn.setText(\"\\u9009\\u62E9\\u8054\\u7CFB\\u4EBA\");\n\t\t\n\t\tButton copyToBtn = new Button(container, SWT.CHECK);\n\t\tcopyToBtn.setSelection(true);\n\t\tcopyToBtn.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 3, 1));\n\t\tcopyToBtn.setText(\"\\u62F7\\u8D1D\\u9879\\u76EE\\u5230\\u9879\\u76EE\\u7A7A\\u95F4\\u4E2D\");\n\t\tnew Label(container, SWT.NONE);\n\n\t\t\n\t\tif (rp==null) {\n\t\t\trp = new ResearchProject();\n\t\t}\n\t\tfillFields(rp);\n\t\t\n\t\treturn area;\n\t}", "@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\t\t\tFolderVisibility vis = (FolderVisibility) jcd1.getSelectedItem();\n\t\t\t\t\t\tClientConnection.cambiaVisibilita(rif_Sezione, vis);\n\t\t\t\t\t\tdiag2.dispose();\n\t\t\t\t\t\tfrmAsd.dispose();\n\t\t\t\t\t\tMain();\n\n\t\t\t\t\t}", "private void handleBrowse() {\n\t\tDirectoryDialog dirDial = new DirectoryDialog(this.getShell());\n\t\tdirText.setText(dirDial.open());\n\t}", "private void abrirFichero() {\r\n\t\tJFileChooser abrir = new JFileChooser();\r\n\t\tFileNameExtensionFilter filtro = new FileNameExtensionFilter(\"obj\",\"obj\");\r\n\t\tabrir.setFileFilter(filtro);\r\n\t\tif(abrir.showOpenDialog(abrir) == JFileChooser.APPROVE_OPTION){\r\n\t\t\ttry {\r\n\t\t\t\tGestion.liga = (Liga) Gestion.abrir(abrir.getSelectedFile());\r\n\t\t\t\tGestion.setAbierto(true);\r\n\t\t\t\tGestion.setFichero(abrir.getSelectedFile());\r\n\t\t\t\tGestion.setModificado(false);\r\n\t\t\t\tfrmLigaDeFtbol.setTitle(Gestion.getFichero().getName());\r\n\t\t\t} catch (ClassNotFoundException | IOException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No se ha podido abrir el fichero\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public interface DialogKonstanten {\n\n String HANDBOOK_TITLE = \"Bedienungsanleitung\";\n String HANDBOOK_HEADER = \"Tastenbelegung und Menüpunkte\";\n String HANDBOOK_TEXT = \"Ein Objekt kann über den Menüpunkt \\\"File -> Load File\\\" geladen werden.\\nZu Bewegung des Objektes wird die Maus verwendet.\\nRMB + Maus: Bewegen\\nLMB + Maus: Rotieren\\nEine Verbindung zu einem anderen Programm wir über den Menüpunkt Network aufgebaut. Der Server wird gestartet indem keine IP eingegeben wird und eine Verbindung zu einem Server wird erreicht indem die jeweilige IP-Adresse in das erste Textfeld eigegeben wird.\";\n\n}", "private void promptOpenIndexFile()\n {\n JPanel message = new JPanel(new GridLayout(3, 1));\n JLabel messageLabel = new JLabel(\"Enter the location of the index .db file\");\n JPanel defaultWrapper = new JPanel(new FlowLayout(FlowLayout.LEFT));\n JPanel inputWrapper = new JPanel();\n JButton fileOpenButton = new JButton(\"Find\");\n JLabel defaultLabel = new JLabel(\"Make this the default index? \");\n JCheckBox makeDefault = new JCheckBox(); \n JTextField fileField = new JTextField();\n fileField.setPreferredSize(new Dimension(200, 25));\n \n \n defaultWrapper.add(defaultLabel);\n defaultWrapper.add(makeDefault);\n inputWrapper.add(fileField);\n inputWrapper.add(fileOpenButton);\n message.add(defaultWrapper);\n message.add(messageLabel);\n message.add(inputWrapper);\n \n fileOpenButton.addActionListener((ActionEvent e) -> \n {\n JFileChooser jfc = new JFileChooser();\n int fileOpt = jfc.showOpenDialog(null);\n \n if(fileOpt == JFileChooser.APPROVE_OPTION)\n fileField.setText(jfc.getSelectedFile().getPath());\n });\n \n int option = JOptionPane.showConfirmDialog(null, message, \"Open index file\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);\n if(option != JOptionPane.CANCEL_OPTION)\n {\n String fileName = fileField.getText();\n spider.setIndexer(Indexer.createIndexer(fileName));\n searchEngine.setIndexer(spider.getIndexer());\n \n if(makeDefault.isSelected())\n {\n spider.getConfig().setDatabaseFile(fileName);\n spider.updateConfig();\n }\n }\n }", "private void createResultFilePart() {\n\t\t//------------------------------------------------\n\t\t// Result File Label\n\t\t//------------------------------------------------\n\t\tLabel resultFileLabel = new Label(generalSettingsGroup, SWT.NONE);\n\t\tresultFileLabel.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false, 1, 1));\n\t\tresultFileLabel.setText(\"Result File:\");\n\t\t\n\t\tresultFileDeco = new ControlDecoration(resultFileLabel, SWT.LEFT | SWT.TOP);\n\t\tresultFileDeco.setImage(SWTResourceManager.getImage(GeneralSettingsGroup.class, \"/org/eclipse/jface/fieldassist/images/info_ovr.gif\"));\n\t\tresultFileDeco.setDescriptionText(\"Choose a file to store the compare results.\");\n\t\t\n\t\t//------------------------------------------------\n\t\t// \"Choose...\" Button\n\t\t//------------------------------------------------\n\t\tButton fileChooserButton = new Button(generalSettingsGroup, SWT.NONE);\n\t\tfileChooserButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));\n\t\tfileChooserButton.setText(\"Choose...\");\n\t\t\n\t\tfileChooserButton.addSelectionListener(\n\t\t\t\tnew SelectionAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\t\tFileDialog fileDialog = new FileDialog(getShell());\n\t\t\t\t\t\tString filePath = fileDialog.open();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(filePath != null){\n\t\t\t\t\t\t\tsetSelectedFile(filePath);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\t//------------------------------------------------\n\t\t// FilePath Field\n\t\t//------------------------------------------------\n\t\tresultFilepathField = new Text(generalSettingsGroup, SWT.BORDER);\n\t\tresultFilepathField.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));\n\t\t\n\t\tNotNullStringValidator filepathValidator = new NotNullStringValidator(resultFileLabel, SWT.BOTTOM | SWT.LEFT) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic String getStringToValidate() {\n\t\t\t\treturn resultFilepathField.getText();\n\t\t\t}\n\t\t};\n\t\t\n\t\tresultFilepathField.addModifyListener(filepathValidator);\n\t\t\n\t\tfilepathValidator.setTag(\"ALWAYS\");\n\t\tCSVComparatorGUI.getValidatorEngine().addValidator(filepathValidator);\n\t\t\n\t\t//------------------------------------------------\n\t\t// Create file writeable Validator\n\t\t//------------------------------------------------\n\n\t\tFileCanWriteValidator filepathWritableValidator = new FileCanWriteValidator(null, SWT.BOTTOM | SWT.LEFT) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic String getStringToValidate() {\n\t\t\t\treturn resultFilepathField.getText();\n\t\t\t}\n\t\t};\n\t\t\n\t\tfilepathWritableValidator.setTag(\"PRECHECK\");\n\t\tCSVComparatorGUI.getValidatorEngine().addValidator(filepathWritableValidator);\n\t}", "public void seleccionarFichero(){\n JFileChooser fileChooser = new JFileChooser();\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"xml\", \"xml\");\n fileChooser.setFileFilter(filter);\n fileChooser.setCurrentDirectory(new java.io.File(\"./ficheros\"));\n int seleccion = fileChooser.showOpenDialog(vista_principal);\n if (seleccion == JFileChooser.APPROVE_OPTION){\n fichero = fileChooser.getSelectedFile();\n vista_principal.getTxtfield_nombre_fichero().\n setText(fichero.getName().substring(0, fichero.getName().length()-4));\n }\n }", "private void dialogEcritureFichier(File file) {\n\t\tJOptionPane.showMessageDialog(null, \"le fichier \" + file.getName() +\" a été écrit\", \"Info\", JOptionPane.INFORMATION_MESSAGE);\n\t}", "@Override\n\tpublic void valueChanged(TreeSelectionEvent e) {\n\n\t\tTreePath path = e.getPath();\n\t\t/**\n\t\t * provera sta je selektovano ako nije Project, ikona za new diag je\n\t\t * iskljucena\n\t\t */\n\t\tif (path.getLastPathComponent() instanceof Diagram\n\t\t\t\t|| path.getLastPathComponent() instanceof Workspace) {\n\t\t\tMainFrame.getInstance().getActionManager().getFileNewDiagAction()\n\t\t\t\t\t.setEnabled(false);\n\n\t\t} else {\n\t\t\tMainFrame.getInstance().getActionManager().getFileNewDiagAction()\n\t\t\t\t\t.setEnabled(true);\n\n\t\t}\n\n\t\t/**\n\t\t * prolazak kroz kolekciju dijagrama i provera koji diag ce doci u fokus\n\t\t */\n\t\tfor (int i = 0; i < path.getPathCount(); i++) {\n\t\t\tif (path.getPathComponent(i) instanceof Diagram) {\n\t\t\t\tdiag = (Diagram) path.getPathComponent(i);\n\t\t\t\tString dname = diag.getName();\n\n\t\t\t\tJInternalFrame[] allframes = MainFrame.getInstance()\n\t\t\t\t\t\t.getDesktop().getAllFrames();\n\n\t\t\t\tfor (int j = 0; j < allframes.length; j++) {\n\t\t\t\t\tif (dname == allframes[j].getName()) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tallframes[j].setSelected(true);\n\t\t\t\t\t\t\tallframes[j].setVisible(true);\n\t\t\t\t\t\t} catch (PropertyVetoException e1) {\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private static void printFileOperationMenu() {\n System.out.println(\"-------------------------------------\");\n System.out.println(\"File operation menu\");\n System.out.println(\"1. Retrieve file names from directory\");\n System.out.println(\"2. Add a file.\");\n System.out.println(\"3. Delete a file.\");\n System.out.println(\"4. Search a file.\");\n System.out.println(\"5. Change directory.\");\n System.out.println(\"6. Exit to main menu.\");\n\n }", "public ReorganizeDialog() { }", "private DataExplorer() {\r\n\t\tsuper(GDE.shell, SWT.NONE);\r\n\t\tthis.threadId = Thread.currentThread().getId();\r\n\r\n\t\tthis.extensionFilterMap.put(GDE.FILE_ENDING_OSD, Messages.getString(MessageIds.GDE_MSGT0139));\r\n\t\tthis.extensionFilterMap.put(GDE.FILE_ENDING_LOV, Messages.getString(MessageIds.GDE_MSGT0140));\r\n\t\tthis.extensionFilterMap.put(GDE.FILE_ENDING_CSV, Messages.getString(MessageIds.GDE_MSGT0141));\r\n\t\tthis.extensionFilterMap.put(GDE.FILE_ENDING_XML, Messages.getString(MessageIds.GDE_MSGT0142));\r\n\t\tthis.extensionFilterMap.put(GDE.FILE_ENDING_PNG, Messages.getString(MessageIds.GDE_MSGT0213));\r\n\t\tthis.extensionFilterMap.put(GDE.FILE_ENDING_GIF, Messages.getString(MessageIds.GDE_MSGT0214));\r\n\t\tthis.extensionFilterMap.put(GDE.FILE_ENDING_JPG, Messages.getString(MessageIds.GDE_MSGT0215));\r\n\t\tthis.extensionFilterMap.put(GDE.FILE_ENDING_KMZ, Messages.getString(MessageIds.GDE_MSGT0222));\r\n\t\tthis.extensionFilterMap.put(GDE.FILE_ENDING_GPX, Messages.getString(MessageIds.GDE_MSGT0677));\r\n\t\tthis.extensionFilterMap.put(GDE.FILE_ENDING_STAR, Messages.getString(GDE.IS_WINDOWS ? MessageIds.GDE_MSGT0216 : MessageIds.GDE_MSGT0676));\r\n\t\tthis.extensionFilterMap.put(GDE.FILE_ENDING_INI, Messages.getString(MessageIds.GDE_MSGT0368));\r\n\t\tthis.extensionFilterMap.put(GDE.FILE_ENDING_LOG, Messages.getString(MessageIds.GDE_MSGT0672));\r\n\t\tthis.extensionFilterMap.put(GDE.FILE_ENDING_JML, Messages.getString(MessageIds.GDE_MSGT0673));\r\n\t}", "public void KivKvtbaValt()\r\n {\r\n// int nIdx = 0 ;\r\n// int nExtLen = 0 ;\r\n// int nKiterjPoz = 0 ;\r\n File cAktKvt = null ;\r\n Object aKivElemek[] ;\r\n \r\n// boolean bRC = false ;\r\n//System.out.println( \"JFileValasztDlg::KivKvtbaValt()\") ;\r\n\r\n try\r\n {\r\n aKivElemek = m_jKvtTartList.getSelectedValues() ;\r\n\r\n // Ha netan tobb lenne kivalasztva (bas single selection lett beallitva) ...\r\n if ( aKivElemek.length > 0 )\r\n {\r\n cAktKvt = new File( m_sAktKonyvtar /*GetAktKonyvtar()*/ + System.getProperty( IKonstansok.sFileSeparator) + aKivElemek[0].toString()) ;\r\n \r\n if ( cAktKvt != null && cAktKvt.isDirectory() == true )\r\n {\r\n KvtTartListFrissit( cAktKvt.getCanonicalPath()) ;\r\n// KonyvtarTartKiir( cAktKvt) ; ez csak pont a listaablakot nem frissiti !\r\n \r\n // A felso edit kontorlba valo beiras hianyzik !\r\n// E:\\TAMAS\\PROG\\JAVA\\ecl_wrkspc\\CPolar\\2003 v. E:\\TAMAS\\PROG\r\n//System.out.println( \"JFileValasztDlg::KivKvtbaValt() cAktKvt.getCanonicalPath() : \" + cAktKvt.getCanonicalPath()) ;\r\n// E:\\TAMAS\\PROG\\JAVA\\ecl_wrkspc\\CPolar\\.\\2003 v. E:\\TAMAS\\PROG\\JAVA\\..\r\n//System.out.println( \"JFileValasztDlg::KivKvtbaValt() cAktKvt.getAbsolutePath() : \" + cAktKvt.getAbsolutePath()) ; \r\n//m_jKonyvtarTxtFld.setText( cAktKvt.getCanonicalPath()) ; ??? <-> KvtTartListFrissit()\r\n }\r\n }\r\n }\r\n catch( IOException cIOException)\r\n {\r\n//System.out.println( \"JFileValasztDlg::KivKvtbaValt() : cIOException\") ;\r\n ExceptionTrace( (Exception) cIOException) ;\r\n }\r\n catch( SecurityException cSecurityException)\r\n {\r\n//System.out.println( \"JFileValasztDlg::KivKvtbaValt() : SecurityException\") ;\r\n ExceptionTrace( (Exception) cSecurityException) ;\r\n }\r\n catch( NullPointerException cNullPointerException)\r\n {\r\n//System.out.println( \"JFileValasztDlg::KivKvtbaValt() : NullPointerException\") ;\r\n ExceptionTrace( (Exception) cNullPointerException) ;\r\n } \r\n }", "public void openFileDialog() {\n\tswitch(buttonAction) {\n\t case SELECT_FILES:\n openFileDialog(fileUpload, true);\n break;\n\t case SELECT_FILE:\n default:\n openFileDialog(fileUpload, false);\n break;\n\t}\n }", "private void showOpenFileDialog() {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"*/*\");\n // We accept PDF files and images (for image documents).\n intent.putExtra(Intent.EXTRA_MIME_TYPES, new String[] {\"application/pdf\", \"image/*\"});\n\n // Set of the intent for result, so we can retrieve the Uri of the selected document.\n startActivityForResult(intent, REQUEST_OPEN_DOCUMENT);\n }", "DialogResult show();", "public void actionPerformed(ActionEvent e) {\n\n\t\t// open new dialog\n\t\tImportNetworkDialog fd = new ImportNetworkDialog(Cytoscape.getDesktop(), true);\n\t\tfd.pack();\n\t\tfd.setLocationRelativeTo(Cytoscape.getDesktop());\n\t\tfd.setVisible(true);\n\n\t\tif (fd.getStatus() == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tFile file = fd.getFile();\n\t\tboolean vsSwitch = fd.getVSFlag();\n\n\t\tif (file != null) \n\t\t\tloadFile(file,vsSwitch);\n\t}", "private void dialogChanged() {\n\t\tIResource ecoreFile = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(getEcoreProjectName() + \"/\" + getEcoreFilePath()));\n\t\tString fileName = getFileName();\n\t\tString diagramId = getDiagramId();\n\n\t\tif (getEcoreFilePath().length() == 0) {\n\t\t\tupdateStatus(\"Ecore file must be specified. Please select an .ecore file in the workspace when launching this wizard.\");\n\t\t\treturn;\n\t\t}\n\t\tif (!(ecoreFile instanceof IFile && ((IFile) ecoreFile).getFileExtension().equals(\"ecore\"))) {\n\t\t\tupdateStatus(\"Ecore file must have .ecore extension\");\n\t\t\treturn;\n\t\t}\n\n\t\t//\t\tIResource ecoreFile = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(page.getEcoreProjectName() + \"/\" + page.getEcoreFilePath()));\n\t\tResourceSet rs = new ResourceSetImpl();\n\n\t\tURI modelLocation = URI.createFileURI(ecoreFile.getLocation().toString());\n\t\tResource resource = rs.getResource(modelLocation, true);\n\t\tePackage = (EPackage) resource.getContents().get(0);\n\n\t\tint rootSel = rootCombo.getSelectionIndex();\n\t\tList<String> list = new ArrayList<>();\n\t\tfor (EClassifier eClassifier : ePackage.getEClassifiers()) {\n\t\t\tif(eClassifier instanceof EClass && !((EClass) eClassifier).isAbstract())\n\t\t\t\tlist.add(eClassifier.getName());\n\t\t}\n\t\trootCombo.setItems(list.toArray(new String[list.size()]));\n\t\tif(list.size() == 0) {\n\t\t\tupdateStatus(\"Ecore model must contain at least one class\");\n\t\t\treturn;\n\t\t}\n\t\telse if(rootSel != -1) {\n\t\t\trootCombo.select(rootSel);\n\t\t}\n\t\telse {\n\t\t\trootCombo.select(0);\n\t\t}\n\n\t\tif(getProjectName().isEmpty()) {\n\t\t\tupdateStatus(\"Project name must be defined.\");\n\t\t\treturn;\n\t\t}\n\t\telse if(ResourcesPlugin.getWorkspace().getRoot().getProject(getProjectName()).exists()) {\n\t\t\tupdateStatus(\"A project exists in the workspace with the specified name.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (fileName.length() == 0) {\n\t\t\tupdateStatus(\"File name must be specified\");\n\t\t\treturn;\n\t\t}\n\t\tif (fileName.replace('\\\\', '/').indexOf('/', 1) > 0) {\n\t\t\tupdateStatus(\"File name must be valid\");\n\t\t\treturn;\n\t\t}\n\t\tint dotLoc = fileName.lastIndexOf('.');\n\t\tif (dotLoc != -1) {\n\t\t\tString ext = fileName.substring(dotLoc + 1);\n\t\t\tif (!ext.equals(\"xdia\")) {\n\t\t\t\tupdateStatus(\"File extension of Xdiagram specification must be \\\"xdia\\\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tupdateStatus(\"File extension of Xdiagram specification must be \\\"xdia\\\"\");\n\t\t\treturn;\n\t\t}\n\n\t\tif(!diagramId.matches(\"[a-zA-Z]+\")) {\n\t\t\tupdateStatus(\"Diagram id must be an identifier composed only of letter characters\");\n\t\t\treturn;\n\t\t}\n\n\t\tupdateStatus(null);\n\t}", "public void DFSInfo(ActionEvent actionEvent)\n {\n try {\n Desktop.getDesktop().browse(new URL(\"https://en.wikipedia.org/wiki/Depth-first_search\").toURI());\n } catch (IOException e) {\n e.printStackTrace();\n } catch (URISyntaxException e)\n {\n e.printStackTrace();\n }\n }", "void generar_dialog_preguntas();", "public void verVerResultado(String tiporesultado, String convoseleccionada)\r\n\t{\r\n\t\tverresultado = new VerResultado(this, tiporesultado, convoseleccionada);\r\n\t\tverresultado.setVisible(true);\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tTreePath[] paths = tree.getSelectionPaths();\n\t\t\t\tcurrentFile = new File(paths+\"\");\n\t\t\t\tint result = JOptionPane.showConfirmDialog(null, \"Bạn muốn xóa file này\",\"Xóa File\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\tif(result==JOptionPane.OK_OPTION)\n\t\t\t\t{\n\t\t\t\t\tcurrentFile.delete();\n\t\t\t\t}\n\t\t\t}", "public void verDatosEntidad(String entidad)\r\n\t{\r\n\t\tif(entidad.equalsIgnoreCase(\"Rol\"))\r\n\t\t{\r\n\t\t\tverdatosroles = new VerDatosRoles(this);\r\n\t\t\tverdatosroles.setVisible(true);\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Prueba\"))\r\n\t\t{\r\n\t\t\tverdatospruebas = new VerDatosPruebas(this);\r\n\t\t\tverdatospruebas.setVisible(true);\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Pregunta\"))\r\n\t\t{\r\n\t\t\tverdatospreguntas = new VerDatosPreguntas(this);\r\n\t\t\tverdatospreguntas.setVisible(true);\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Escala\"))\r\n\t\t{\r\n\t\t\tverdatosescalas = new VerDatosEscalas(this);\r\n\t\t\tverdatosescalas.setVisible(true);\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Competencia\"))\r\n\t\t{\r\n\t\t\tverdatoscompeten = new VerDatosCompetencias(this);\r\n\t\t\tverdatoscompeten.setVisible(true);\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Regla\"))\r\n\t\t{\r\n\t\t\tverSelecionarReglaConocimiento(\"Ver\");\r\n\t\t}\r\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\n\t\t final JFileChooser sorceXmFileChooser;\t\t\n\t\t \n\t if (e.getSource() instanceof JButton) \n\t {\t \t \n\t // The user want choose a source XML file\n\t if (e.getActionCommand().equals(\"Find\")) \n\t {\n\t \t sorceXmFileChooser = new JFileChooser();\n\t \t sorceXmFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\n\t \t sorceXmFileChooser.setDialogTitle(\"Choose xml file source\");\n\t \t sorceXmFileChooser.setFileFilter(new CustomFileFilter());\n\t \n\t int value = sorceXmFileChooser.showOpenDialog(this);\n\t \n\t // Return value if approved (ie yes, ok) is chosen.\n\t if (value==JFileChooser.APPROVE_OPTION)\n\t {\n\t \t File f = sorceXmFileChooser.getSelectedFile();\n\t \t \n\t \t pathSourceXMLfile = f.getAbsolutePath(); \t \n\t \t sourceXMLfileTextField.setText(pathSourceXMLfile); \n\t \t \n\t \t try {\n\t\t\t\t\t\tthis.loadOrRefreshXml(f,true);\n\t\t\t\t\t } catch (Exception e1) {\t\n\t\t\t\t\t\t messageLabel.setText(e1.getMessage());\t\t\t\t\t\t\n\t\t\t\t\t } \n\t }\t \n\t }\n\t \n\t // Edit the chosen input XML file\n\t if(e.getActionCommand().equals(\"Edit XML\"))\n\t {\n\t \t InputFileEditorGui editor = new InputFileEditorGui(this.sourceXMLfileTextField.getText());\n\t }\n\t \n\t // Refresh the XML showed in the text area after his editing with internal (or external) editor -----\n\t if(e.getActionCommand().equals(\"Refresh XML\"))\n\t {\t \t \n\t \t File f = new File(this.sourceXMLfileTextField.getText()); \n\t \t try {\n\t\t\t\t\tthis.loadOrRefreshXml(f,false);\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\tmessageLabel.setText(e1.getMessage());\n\t\t\t\t}\t \n\t } \n\t \n\t // Close the application\n\t if (e.getActionCommand().equals(\"Close\"))\n\t {\t \t \n\t \t\tif (mainFrame.isDisplayable()) { \n\t \t\t mainFrame.dispose();\n\t }\n \t }\n\t \n\t // Expand all the tree nodes\n\t if (e.getActionCommand().equals(\"Expand All\"))\n\t {\t \t \n\t \tint row = xmlJTree.getRowCount() - 1;\n\t \twhile (row >= 0) {\n\t \t xmlJTree.expandRow(row);\t \t \n\t \t row--;\n\t \t}\t\n \t } \n\n\t // Compact all the tree nodes\n\t\t\t if (e.getActionCommand().equals(\"Compact All\"))\n\t\t\t {\t\t\t\t\n\t\t\t\tint row = xmlJTree.getRowCount() - 1;\t \t\n\t \twhile (row >= 2) {\n\t \t xmlJTree.collapseRow(row);\t \t \n\t \t row--;\n\t \t}\t\t\t\t\n\t\t\t }\t \n\t } \t\n\t}", "public void onOpenFile() {\n\t\t\n\t\t//if things are dirty, ask if they're sure they want to do this\n\t\tif(FormDesignerController.getIsDirty())\n\t\t{\n\t\t\t//if the use says no, then bounce\n\t\t\tif(!Window.confirm(LocaleText.get(\"newFormConfirm\")))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tOpenFromFileDialog dlg = OpenFromFileDialog.getInstnace(controller);\n\t\tdlg.center();\n\t\t\n\t}", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(DialogUsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(DialogUsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(DialogUsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(DialogUsuarioView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the dialog */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n DialogUsuarioView dialog = new DialogUsuarioView(new javax.swing.JFrame(), true);\n dialog.addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent e) {\n System.exit(0);\n }\n });\n dialog.setVisible(true);\n } catch (DAOException ex) {\n Logger.getLogger(DialogUsuarioView.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n });\n }", "protected ERMinerNodeDialog() {\nsuper();\n \n addDialogComponent(new DialogComponentColumnNameSelection(ERMinerNodeModel.createSeqColumnModel(),\n\t\t\t\t\t\t\"Column containing the sequences: \", 0, true, StringValue.class));\n addDialogComponent(new DialogComponentNumber(ERMinerNodeModel.createMinSupModel(), \"Choose minSup\", 0.05));\n addDialogComponent(new DialogComponentNumber(ERMinerNodeModel.createMinConfModel(), \"Choose minConf\", 0.05));\n }", "public void iniciarVentanaVisualizarCochesTaller(String nickname) {\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetBounds(100, 100, 807, 434);\n\t\tsetLocationRelativeTo(null);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tsetJMenuBar(menuBar);\n\t\t\n\t\tJMenu mnNewMenu = new JMenu(\"Filtros\");\n\t\tmnNewMenu.setForeground(Color.BLUE);\n\t\tmnNewMenu.setFont(new Font(\"Dialog\", Font.BOLD, 12));\n\t\tmenuBar.add(mnNewMenu);\n\t\t\n\t\tJMenuItem mntmNewMenuItem = new JMenuItem(\"Matricula \");\n\t\tmntmNewMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tString matricula = JOptionPane.showInputDialog(\"Introduzca la matricula del vehiculo que desea:\");\n\t\t\t\tcargarTablaFiltro(table_1, 0, matricula);\n\t\t\t}\n\t\t});\n\t\tmntmNewMenuItem.setForeground(Color.BLUE);\n\t\tmntmNewMenuItem.setFont(new Font(\"Segoe UI\", Font.BOLD, 12));\n\t\tmnNewMenu.add(mntmNewMenuItem);\n\t\t\n\t\tJMenuItem mntmNewMenuItem_1 = new JMenuItem(\"Estado del Vehiculo\");\n\t\tmntmNewMenuItem_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString estado = JOptionPane.showInputDialog(\"Introduzca el estado del vehiculo que desea (Sin empezar -> 0; En Proceso -> 1; Terminado -> 2):\");\n\t\t\t\tcargarTablaFiltro(table_1, 3, estado);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJMenuItem mntmNewMenuItem_2 = new JMenuItem(\"Mecanico\");\n\t\tmntmNewMenuItem_2.setFont(new Font(\"Dialog\", Font.BOLD, 12));\n\t\tmntmNewMenuItem_2.setForeground(Color.BLUE);\n\t\tmntmNewMenuItem_2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString mecanico = JOptionPane.showInputDialog(\"Introduzca el mecanico que desea:\");\n\t\t\t\tcargarTablaFiltro(table_1, 1, mecanico);\n\t\t\t}\n\t\t});\n\t\tmnNewMenu.add(mntmNewMenuItem_2);\n\t\t\n\t\tJMenuItem mntmNewMenuItem_3 = new JMenuItem(\"Coste Maximo\");\n\t\tmntmNewMenuItem_3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString costeMaximo = JOptionPane.showInputDialog(\"Introduzca el coste maximo que desea (Entero):\");\n\t\t\t\tcargarTablaFiltro(table_1, 2, costeMaximo);\n\t\t\t}\n\t\t});\n\t\tmntmNewMenuItem_3.setFont(new Font(\"Dialog\", Font.BOLD, 12));\n\t\tmntmNewMenuItem_3.setForeground(Color.BLUE);\n\t\tmnNewMenu.add(mntmNewMenuItem_3);\n\t\tmntmNewMenuItem_1.setForeground(Color.BLUE);\n\t\tmntmNewMenuItem_1.setFont(new Font(\"Segoe UI\", Font.BOLD, 12));\n\t\tmnNewMenu.add(mntmNewMenuItem_1);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\t\tcontentPane.setLayout(null);\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\tscrollPane.setBounds(16, 18, 765, 294);\n\t\tcontentPane.add(scrollPane);\n\t\t\n\t\ttable_1 = new JTable();\n\t\tscrollPane.setViewportView(table_1);\n\t\t\n\t\tJButton btnCargar = new JButton(\"Cargar\");\n\t\tbtnCargar.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcargarTabla(table_1);\n\t\t\t}\n\t\t});\n\t\tbtnCargar.setBounds(377, 323, 117, 29);\n\t\tcontentPane.add(btnCargar);\n\t\t\n\t\tJButton btnRegresar = new JButton(\"Regresar\");\n\t\tbtnRegresar.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tVentanaMenuMecanico vmm = new VentanaMenuMecanico(mecanicoController, nickname);\n\t\t\t\tvmm.setVisible(true);\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\t\tbtnRegresar.setBounds(250, 323, 117, 29);\n\t\tcontentPane.add(btnRegresar);\n\t\t\n\t\tJButton btnEliminar = new JButton(\"Eliminar\");\n\t\tbtnEliminar.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint resp = JOptionPane.showConfirmDialog(contentPane, \"¿Esta seguro de que quiere eliminarlo?\");\n\t\t\t\tswitch (resp) {\n\t\t\t\tcase 0:\n\t\t\t\t\tint fila = table_1.getSelectedRow();\n\t\t\t\t\tString estado = (String) table_1.getModel().getValueAt(fila, 6);\n\t\t\t\t\tif (estado.equals(\"Terminado\")) {\n\t\t\t\t\t\teliminarCocheTaller((String) table_1.getModel().getValueAt(fila, 0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(contentPane, \"El coche no se ha finalizado.\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tJOptionPane.showMessageDialog(contentPane, \"No se eliminara.\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tJOptionPane.showMessageDialog(contentPane, \"No se eliminara.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\t\n\t\t\t}\n\t\t});\n\t\tbtnEliminar.setBounds(664, 323, 117, 29);\n\t\tcontentPane.add(btnEliminar);\n\t\t\n\t\tJButton btnNewButton_1 = new JButton(\"Cambiar Estado\");\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tint fila = table_1.getSelectedRow();\n\t\t\t\tString matricula = (String) table_1.getModel().getValueAt(fila, 0);\n\t\t\t\tcambiarEstado(matricula);\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setBounds(504, 323, 150, 29);\n\t\tcontentPane.add(btnNewButton_1);\n\t\t\n\t\t\n\t}", "public int openFileChooser(){\n int returnVal = fileChooser.showOpenDialog(getCanvas()); //Parent component as parameter - affects position of dialog\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"ZIP & OSM & BIN\", \"osm\", \"zip\", \"bin\",\"OSM\",\"ZIP\",\"BIN\"); //The allowed files in the filechooser\n fileChooser.setFileFilter(filter); //sets the above filter\n return returnVal;\n }", "protected void openGenerateSchemaDialog() {\n hide();\n FileOutputStream fileOutput = null;\n try {\n Class<?> loadClass =\n Class.forName(getConnectorOperationLoadClasses(cmbConnectorOperation.getText()));\n Constructor<?> cons = loadClass.getConstructor(Shell.class);\n Object object = cons.newInstance(getParentShell());\n Method method = object.getClass().getMethod(\"getResponse\", new Class<?>[0]);\n ((Dialog) object).create();\n ((Window) object).getShell().setText(SELECT_GENERATE_DYNAMIC_SCHEMA);\n ((Window) object).open();\n\n if (((Window) object).getReturnCode() == Window.OK) {\n dynamicSchemaObject = (String) method.invoke(object);\n file = new File(rootWorkspaceLocation);\n fileOutput = new FileOutputStream(file);\n\n if (!file.exists()) {\n file.createNewFile();\n file.getAbsolutePath();\n }\n byte[] contentInBytes = dynamicSchemaObject.getBytes();\n fileOutput.write(contentInBytes);\n fileOutput.flush();\n }\n } catch (IOException e) {\n log.error(\"Error occurred while reading selected response file\", e);\n } catch (ClassNotFoundException e) {\n MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),\n \"ClassNotFoundException\",\n \"Miss the feature installation of Dynamic Schema Creation for the Operation. \\n\" +\n \"Install the feature and add the plugin via MANIFEST.MF -> dependency tab -> Add -> plugin for dynamic schema generation for connector\");\n } catch (NoSuchMethodException e) {\n MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),\n \"NoSuchMethodException\",\n \"Miss the operation to getting the response to create the dynamic operation\");\n } catch (SecurityException e) {\n MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),\n \"SecurityException\", \"Error thrown by the Security Manager.\");\n } catch (IllegalAccessException e) {\n MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),\n \"IllegalAccessException\", \"Error while creating an Instance.\");\n } catch (IllegalArgumentException e) {\n MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),\n \"IllegalArgumentException\",\n \"Error in the calling of invoke() method in the generic part of Dynamic Schema Creation.\");\n } catch (InvocationTargetException e) {\n MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),\n \"InvocationTargetException\",\n \"Error in the invoked method to generate the dynamic Schema.\");\n } catch (InstantiationException e) {\n MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),\n \"InstantiationException\",\n \"Error in the constructor in Dynamic Schema Creation Class for the Operation.\");\n } finally {\n try {\n if (fileOutput != null) {\n fileOutput.close();\n }\n } catch (IOException e) {\n log.error(\"Error occurred while closing OutputStream: \", e);\n }\n show();\n }\n }", "private void add() {\n \tfinal DBBrowserTree dbBrowserTree = new DBBrowserTree(type, false);\n \tdbBrowserTree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);\n dbBrowserTree.addMouseListener(new MouseAdapter() {\n public void mousePressed(MouseEvent e) {\n job(e, true);\n }\n\n public void mouseReleased(MouseEvent e) {\n job(e, false);\n }\n\n private void job(MouseEvent e, boolean pressed) {\n \tTreePath[] paths = dbBrowserTree.getSelectionPaths();\n if (paths == null) {\n return;\n }\n dbBrowserTree.setSelectionPaths(paths);\t\t\t\t\n }\n });\n JScrollPane scroll = new JScrollPane(dbBrowserTree);\n scroll.setPreferredSize(scrTreeDim);\n \n JPanel panel = new JPanel();\n panel.add(scroll);\n \n JDialog dialog = new BaseDialog(panel, I18NSupport.getString(\"wizard.publish.entities.select\"), true) {\n \t protected boolean ok() {\n \t\t TreePath[] paths = dbBrowserTree.getSelectionPaths();\n if (paths == null) {\n return false;\n } \n \t\t\t\tfor (TreePath selPath : paths) {\t\t\t\t\t\n \t\t\t\t\tfinal DBBrowserNode selectedNode = (DBBrowserNode) selPath.getLastPathComponent();\t \t\t\t\t\t\n \t\t\t\t\tif (!selectedNode.getDBObject().isFolder()) {\n \t\t\t\t\t\tString path = selectedNode.getDBObject().getAbsolutePath();\n \t\t\t\t\t\tif (!listModel.contains(path)) {\n \t\t\t\t\t\t // convert xml if needed before add to list\n\t\t\t\t\t\t\tif (selectedNode.getDBObject().getType() == DBObject.REPORTS) {\n\t\t\t\t\t\t\t\tbyte result = ConverterUtil.convertIfNeeded(path);\n\t\t\t\t\t\t\t\tif (result != ConverterUtil.TYPE_CONVERSION_EXCEPTION) {\n\t\t\t\t\t\t\t\t\tlistModel.addElement(path);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tlistModel.addElement(path);\n\t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\t\n \t\t\t\t\t} \t\t\t\t\t\n \t\t\t\t}\n \t return true;\n \t }\n };\n \tdialog.setBackground(Color.WHITE); \t\n dialog.pack(); \n Show.centrateComponent(Globals.getMainFrame(), dialog);\n dialog.setVisible(true); \t\n }", "public Abrir() {\r\n\t\tsetDialogTitle(\"Abrir Archivo de DDC-Net\");\r\n\t\tsetFileFilter(new FileFilter() {\r\n\t\t\tpublic boolean accept(File f) {\r\n\t\t\t\tif(f.toString().endsWith(\".ddc\")){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tif(f.isDirectory()){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tpublic String getDescription() {\r\n\t\t\t\treturn \"DDC-Net archivos\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tsetMultiSelectionEnabled(false);\r\n\t\teleccion = showOpenDialog(this);\r\n\t\t\r\n\t\tif(eleccion == JFileChooser.APPROVE_OPTION){\r\n\t\t\ttry {\r\n\t\t\t\tKOMLDeserializer open = new KOMLDeserializer(getSelectedFile().getAbsolutePath(), false);\r\n\t\t\t\tMarcoDeGraficacion.vistas.abrirVista(open.readObject());\r\n\t\t\t\topen.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@FXML \r\n private void handleIrDescargas() {\r\n \tmain.mostrarVistaDescargarArchivos();\r\n }", "@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tNF.visibility = (FolderVisibility) jcd.getSelectedItem();\n\t\t\t\t\t\tNF.parent = rif_Sezione;\n\t\t\t\t\t\tNF.sonFolders = null;\n\t\t\t\t\t\tNF.document = null;\n\t\t\t\t\t\tdiag.dispose();\n\t\t\t\t\t\tfrmAsd.dispose();\n\t\t\t\t\t\tClientConnection.creaSezione(NF, indicecorso);\n\t\t\t\t\t\tCourseFile.Main();\n\n\t\t\t\t\t}", "public SelectionDialog(HarmonyModel harmonyModel, Integer mode)\r\n\t{\r\n\t\tsuper((mode==SELECT ? \"Select\" : \"Remove\") + \" Links\");\r\n\t\tthis.harmonyModel = harmonyModel;\r\n\t\tthis.mode = mode;\r\n\t\t\r\n\t\t// Initialize the type filter\r\n\t\ttypeFilter = new OptionPane(\"Type\",new String[]{\"All\",\"User\",\"System\"});\r\n\t\ttypeFilter.setBorder(new EmptyBorder(0,20,0,0));\r\n\t\ttypeFilter.setSelectedButton(\"All\");\r\n\t\t\r\n\t\t// Initialize the focus filter\r\n\t\tfocusFilter = new OptionPane(\"Focus\",new String[]{\"All\",\"Focused\",\"Unfocused\"});\r\n\t\tfocusFilter.setBorder(new EmptyBorder(0,13,0,0));\r\n\t\tfocusFilter.setSelectedButton(mode==SELECT ? \"Focused\" : \"All\");\r\n\t\tfocusFilter.setEnabled(mode==DELETE);\r\n\r\n\t\t// Initialize the visibility filter\r\n\t\tvisibilityFilter = new OptionPane(\"Visibility\",new String[]{\"All\",\"Visible\",\"Hidden\"});\t\t\r\n\t\tvisibilityFilter.setSelectedButton(mode==SELECT ? \"Visible\" : \"All\");\r\n\t\tvisibilityFilter.setEnabled(mode==DELETE);\r\n\t\t\r\n\t\t// Create the info pane\r\n\t\tJPanel infoPane = new JPanel();\r\n\t\tinfoPane.setBorder(new CompoundBorder(new EmptyBorder(5,5,0,5),new CompoundBorder(new LineBorder(Color.gray),new EmptyBorder(5,5,5,5))));\r\n\t\tinfoPane.setLayout(new GridLayout(3,1));\r\n\t\tinfoPane.add(typeFilter);\r\n\t\tinfoPane.add(focusFilter);\r\n\t\tinfoPane.add(visibilityFilter);\r\n\t\t\r\n\t\t// Generate the main dialog pane\r\n\t\tJPanel pane = new JPanel();\r\n\t\tpane.setBorder(BorderFactory.createLineBorder(Color.black));\r\n\t\tpane.setLayout(new BorderLayout());\r\n\t\tpane.add(infoPane,BorderLayout.CENTER);\r\n\t\tpane.add(new ButtonPane(),BorderLayout.SOUTH);\r\n\t\t\r\n\t\t// Initialize the dialog parameters\r\n\t\tsetContentPane(pane);\r\n\t\tsetSize(200,250);\r\n\t\tpack();\r\n\t\tsetVisible(true);\r\n\t}", "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "private void showDeleteDialog() {\r\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n View view = View.inflate(this, R.layout.delete_alert_dialog, null);\r\n builder.setView(view);\r\n TextView okBtn = (TextView) view.findViewById(R.id.alert_yes_button);\r\n TextView cancelBtn = (TextView) view.findViewById(R.id.alert_no_button);\r\n final AlertDialog deleteDialog = builder.create();\r\n deleteDialog.show();\r\n okBtn.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n // method to delete file after click on OK button\r\n deleteFile();\r\n deleteDialog.dismiss();\r\n }\r\n });\r\n cancelBtn.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n deleteDialog.dismiss();\r\n }\r\n });\r\n }", "public void verificaJogo(){\n\t\t\t\tif(jogo.verificaPerdeu()) {\n\t \t\tJOptionPane dialogo = new JOptionPane();\n\t \t\t\n\t \t\tint opcao = dialogo.showConfirmDialog(this, \"Voce Perdeu!!\\nDeseja jogar novamente?\", \"mensagem\", JOptionPane.YES_NO_OPTION);\n\t \t\t\n\t \t\tif(opcao == JOptionPane.YES_OPTION) {\n\t \t\t\tMatriz novamente = new Matriz();\n\t \t\t}\n\t \t\tsetVisible(false);\n\t \t\tdispose();\n\t \t}\n\t\t\t\t\n\t\t\t\tif(jogo.verificaGanhou()) {\n\t\t\t\t\tJOptionPane dialogo = new JOptionPane();\n\t \t\t\n\t \t\tint opcao = dialogo.showConfirmDialog(this, \"Voce GANHOOOOO!!\\nDeseja jogar novamente?\", \"mensagem\", JOptionPane.YES_NO_OPTION);\n\t \t\t\n\t \t\tif(opcao == JOptionPane.YES_OPTION) {\n\t \t\t\tMatriz novamente = new Matriz();\n\t \t\t}\n\t \t\tsetVisible(false);\n\t \t\tdispose();\n\t \t}\n\t\t\t\t\n\t\t\t}", "@FXML private void handleExaminar() {\r\n \tDirectoryChooser dc = new DirectoryChooser();\r\n \tdc.setTitle(\"Examinar archivos\");\r\n \t\r\n \t\r\n \tFile dir = dc.showDialog(null); \r\n \t\r\n \tif(dir != null) {\r\n \t\tpath = dir.getAbsolutePath().replace('\\\\', '/');\r\n \t\ttext_examinar.setText(path);\r\n \t}\r\n \t\r\n \tlista_usuarios.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);\r\n \tlista_usuarios.setMouseTransparent( false );\r\n \tlista_usuarios.setFocusTraversable( true );\r\n }", "public void actionPerformed(ActionEvent event) {\n\t\tString menuName = event.getActionCommand();\n\t\t//If the Menu option = search then search for the specific box object\n\t\tif (menuName.equals(\"Search\")) {\n\t\t\tif(Project3.sorted_boxes == null) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please choose a file first\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tString input = JOptionPane.showInputDialog(null, \"Please input the dimensions of the box with the following format: x,y,z\");\n\t\t\t//StringTokenizer to break up the input string to get each individual parameter for the Box object.\n\t\t\tStringTokenizer tokens = new StringTokenizer(input, \",\");\n\t\t\tif (tokens.countTokens() != 3) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter 3 dimensions of the box in order to search.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tint length, width, height;\n\t\t\ttry {\n\t\t\t\t//change the numbers in the string into integers to be used.\n\t\t\t\tlength = Integer.parseInt(tokens.nextToken());\n\t\t\t\twidth = Integer.parseInt(tokens.nextToken());\n\t\t\t\theight = Integer.parseInt(tokens.nextToken());\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter 3 valid dimensions of the box.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif (length < 1 || width < 1 || height < 1) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The dimensions of the box cannot be less than 1.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t//Find the volume of the searched box\n\t\t\tint volume = length * width * height;\n\t\t\t//Create a new JFrame in order to display the result.\n\t\t\tJFrame result = new JFrame();\n\t\t\tresult.setTitle(\"Boxes that are able to fit with the common volume of: \" + volume);\n\t\t\tresult.setSize(400, 400);\n\t\t\tresult.setLocation(800, 200);\n\t\t\tTextArea resultArea = new TextArea();\n\t\t\tresult.getContentPane().add(resultArea);\n\t\t\t\n\t\t\t//Show to results found that are greater than the box searched.\n\t\t\tBoxNode rNode = Project3.sorted_boxes.first.next;\n\t\t\twhile (rNode != null) {\n\t\t\t\tif (rNode.data.volume() >= volume) {\n\t\t\t\t\tresultArea.append(rNode.data.toString() + \"\\n\");\n\t\t\t\t}\n\t\t\t\trNode = rNode.next;\n\t\t\t}\n\t\t\tresult.setVisible(true);\n\t\t}\n\t}", "public JFrame createGUI() {\n\n TreeSelectionListener treeSelectionListener = tse -> {\n DefaultMutableTreeNode node =\n (DefaultMutableTreeNode)tse.getPath().getLastPathComponent();\n showDirectory(node);\n updateView((File)node.getUserObject());\n };\n\n view.getTree().addTreeSelectionListener(treeSelectionListener);\n view.getTree().setCellRenderer(new FileTreeCellRenderer());\n\n listSelectionListener = (event) -> {\n try {\n updateView(getSelectedFile());\n } catch (Exception e) {\n handleException(ERROR_SELECT_FILE, e);\n }\n };\n\n view.getTable().getSelectionModel()\n .addListSelectionListener(listSelectionListener);\n\n initFileOperationsAction();\n\n return view.getFrame();\n }", "public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tif (e.getActionCommand().equals(\"Explorer\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tOpenWithDefaultViewer.open(GestionRepertoire.RecupRepTravail());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}", "@Override\n\t\t\t\tpublic void notifyOnItemClickIsFile(File f)\n\t\t\t\t{\n\t\t\t\t\tProgressDialog pd= ProgressDialog.show(context,null, \"正在导入中...\",true,false);\n\t\t\t\t\tString importFilePath=f.getPath();\n\t\t\t\t\tboolean isImport=new RegularManager(context).importXMLRegularByPullParser(importFilePath);\n\t\t\t\t\tif(isImport){\n\t\t\t\t\t\tif(regularImportNotify!=null){\n\t\t\t\t\t\t\tregularImportNotify.notifyImportSuccess();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfilesBrowser.obtainShowDialog().hide();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(regularImportNotify!=null){\n\t\t\t\t\t\t\tregularImportNotify.notifyImportFailed();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t pd.dismiss();\n\t\t\t\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(538, 450);\n\t\tshell.setText(\"SWT Application\");\n\n\t\tfinal DateTime dateTime = new DateTime(shell, SWT.BORDER | SWT.CALENDAR);\n\t\tdateTime.setBounds(10, 10, 514, 290);\n\n\t\tfinal DateTime dateTime_1 = new DateTime(shell, SWT.BORDER | SWT.TIME);\n\t\tdateTime_1.setBounds(10, 306, 135, 29);\n\t\tvideoPath = new Text(shell, SWT.BORDER);\n\t\tvideoPath.setBounds(220, 306, 207, 27);\n\n\t\tButton btnBrowseVideo = new Button(shell, SWT.NONE);\n\t\tbtnBrowseVideo.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tFileDialog fileDialog = new FileDialog(shell, SWT.MULTI);\n\t\t\t\tString fileFilterPath = \"\";\n\t\t\t\tfileDialog.setFilterPath(fileFilterPath);\n\t\t\t\tfileDialog.setFilterExtensions(new String[] { \"*.*\" });\n\t\t\t\tfileDialog.setFilterNames(new String[] { \"Any\" });\n\t\t\t\tString firstFile = fileDialog.open();\n\t\t\t\tif (firstFile != null) {\n\t\t\t\t\tvideoPath.setText(firstFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnBrowseVideo.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t}\n\t\t});\n\t\tbtnBrowseVideo.setBounds(433, 306, 91, 29);\n\t\tbtnBrowseVideo.setText(\"browse\");\n\t\ttorrentPath = new Text(shell, SWT.BORDER);\n\t\ttorrentPath.setBounds(220, 341, 207, 27);\n\t\tButton btnBrowseTorrent = new Button(shell, SWT.NONE);\n\t\tbtnBrowseTorrent.setText(\"browse\");\n\t\tbtnBrowseTorrent.setBounds(433, 339, 91, 29);\n\t\tbtnBrowseTorrent.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tFileDialog fileDialog = new FileDialog(shell, SWT.MULTI);\n\t\t\t\tString fileFilterPath = \"\";\n\t\t\t\tfileDialog.setFilterPath(fileFilterPath);\n\t\t\t\tfileDialog.setFilterExtensions(new String[] { \"*.*\" });\n\t\t\t\tfileDialog.setFilterNames(new String[] { \"Any\" });\n\t\t\t\tString firstFile = fileDialog.open();\n\t\t\t\tif (firstFile != null) {\n\t\t\t\t\ttorrentPath.setText(firstFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tButton btnGenerateTorrent = new Button(shell, SWT.NONE);\n\t\tbtnGenerateTorrent.setBounds(10, 374, 516, 29);\n\t\tbtnGenerateTorrent.setText(\"Generate Torrent\");\n\n\t\tvideoLength = new Text(shell, SWT.BORDER);\n\t\tvideoLength.setBounds(10, 341, 135, 27);\n\t\t\n\t\tLabel lblNewLabel = new Label(shell, SWT.RIGHT);\n\t\tlblNewLabel.setAlignment(SWT.LEFT);\n\t\tlblNewLabel.setBounds(157, 315, 48, 18);\n\t\tlblNewLabel.setText(\"Video\");\n\t\t\n\t\tLabel lblTorrent = new Label(shell, SWT.RIGHT);\n\t\tlblTorrent.setText(\"Torrent\");\n\t\tlblTorrent.setBounds(157, 341, 48, 18);\n\t\tbtnGenerateTorrent.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tFile video = new File(videoPath.getText());\n\t\t\t\ttry {\n\t\t\t\t\tif (video.exists() && torrentPath.getText() != \"\") {\n\t\t\t\t\t\tMap parameters = new HashMap();\n\t\t\t\t\t\tparameters.put(\"start\", dateTime.getYear() + \"/\" + (dateTime.getMonth()+1) + \"/\" + dateTime.getDay() + \"-\" + dateTime_1.getHours() + \":\" + dateTime_1.getMinutes() + \":\" + dateTime_1.getSeconds());\n\t\t\t\t\t\tparameters.put(\"target\", torrentPath.getText());\n\t\t\t\t\t\tparameters.put(\"length\", videoLength.getText());\n\t\t\t\t\t\tSystem.out.println(\"start generating \"+parameters.get(\"length\"));\n\t\t\t\t\t\tnew MakeTorrent(videoPath.getText(), new URL(\"https://jomican.csie.org/~jimmy/tracker/announce.php\"), parameters);\n\t\t\t\t\t\tSystem.out.println(\"end generating\");\n\t\t\t\t\t\tFile var = new File(\"var.js\");\n\t\t\t\t\t\tPrintStream stream=new PrintStream(new FileOutputStream(var,false));\n\t\t\t\t\t\tstream.println(\"start_time = \"+(new SimpleDateFormat(\"yyyy/MM/dd-HH:mm:ss\").parse(dateTime.getYear() + \"/\" + (dateTime.getMonth()+1) + \"/\" + dateTime.getDay() + \"-\" + dateTime_1.getHours() + \":\" + dateTime_1.getMinutes() + \":\" + dateTime_1.getSeconds()).getTime() / 1000)+\";\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"jizz\");\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t}", "public void actionPerformed(ActionEvent e) {\n \tJFileChooser jfc = new JFileChooser();\n int retValue = jfc.showOpenDialog(KrokiMockupToolApp.getInstance().getKrokiMockupToolFrame());\n if (retValue == JFileChooser.APPROVE_OPTION) {\n File file = jfc.getSelectedFile();\n System.out.println(\"opening from file: \" + file.getAbsolutePath());\n Workspace workspace = null;\n try {\n workspace = (Workspace) SaveUtil.loadXStream(file);\n //KrokiMockupToolApp.getInstance().getWorkspace().addBussinesSubsystem(bussinesSubsystem);\n KrokiMockupToolApp.getInstance().setWorkspace(workspace);\n KrokiMockupToolApp.getInstance().getKrokiMockupToolFrame().getTree().updateUI();\n } catch (Exception ex) {\n \tex.printStackTrace();\n JOptionPane.showMessageDialog(KrokiMockupToolApp.getInstance().getKrokiMockupToolFrame(), \"Opening failed.\");\n }\n\n } else {\n System.out.println(\"opening canceled: \");\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tSystem.err.println(\"action\");\n\t\t\t\tFTPSiteDialog dialog = new FTPSiteDialog(FTP_Client_Frame.this);\n\t\t\t\tdialog.setVisible(true);\n\t\t\t}", "public void openFile(ActionEvent e) {\r\n JFileChooser chooser = new JFileChooser();\r\n\r\n int returnVal = chooser.showOpenDialog(null);\r\n if (returnVal == JFileChooser.APPROVE_OPTION) {\r\n this.is_alg_started = false;\r\n this.is_already_renumbered = false;\r\n if (e.getActionCommand().equals(\"nodelist\")) {\r\n this.nodefileText.setText(chooser.getSelectedFile().getAbsolutePath());\r\n }\r\n if (e.getActionCommand().equals(\"edgelist\")) {\r\n this.edgeFileText.setText(chooser.getSelectedFile().getAbsolutePath());\r\n }\r\n }\r\n }", "public void ShowSaveDialog(){\n\t\t//JFrame tempFrame = new JFrame();\n\t\tFileDialog fileDialog = new FileDialog(new JFrame(), WindowTitle, FileDialog.SAVE);\n\t\tfileDialog.addNotify();\n\t\t\n\t\tfileDialog.setFile(\"*.xls\");\n\t\tfileDialog.setVisible(true);\n\t\t\n\t\tFileName=fileDialog.getFile();\n\t\tFileDirectory=fileDialog.getDirectory();\n\t}", "private int dialogEcrasmentFichier(File file) {\n\t\tString message = \"Voulez-vous ecraser le fichier \" + file.getName() +\" ?\";\n\t\tString message2 = \"Confirmation de la suppression\";\n\t\tint option = JOptionPane.showConfirmDialog(null, message, message2, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\t\treturn option;\n\t}", "public void showDialog(String modename, int hu,int idd, int pos)\n {\n final int h=hu;\n final int i=idd;\n final int posi=pos;\n final Dialog dialog = new Dialog(DeleteModesActivity.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_warning_delete);\n TextView txtname=(TextView) dialog.findViewById(R.id.lbl_warning_del_device);\n txtname.setText(getResources().getString(R.string.label_warning_delete_device)+\" \"+modename+\"?\");\n Button dialogButton = (Button) dialog.findViewById(R.id.btnDel);\n dialogButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n deleteMode(h,i,posi);\n dialog.dismiss();\n }\n });\n\n dialogButton = (Button) dialog.findViewById(R.id.btnCancelDel);\n dialogButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n dialog.show();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\r\n\t\t\t\tfm = FileManager.getInstance();\r\n\r\n\t\t\t\tfolder = fm.fileFolderPrompt(getmainWindowFrame());\r\n\r\n\t\t\t\tfiles = fm.getFiles();\r\n\r\n\t\t\t\tboolean hamFound = false;\r\n\t\t\t\tboolean spamFound = false;\r\n\t\t\t\tboolean rulesFound = false;\r\n\r\n\t\t\t\tint hami = 0;\r\n\t\t\t\tint spami = 0;\r\n\t\t\t\tint rulesi = 0;\r\n\r\n\t\t\t\tint count = 0;\r\n\r\n\t\t\t\tfor (File f : files) {\r\n\t\t\t\t\tif (f.getName().contains(\"ham\")) {\r\n\t\t\t\t\t\thamFound = true;\r\n\t\t\t\t\t\thami = count;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (f.getName().contains(\"spam\")) {\r\n\t\t\t\t\t\tspamFound = true;\r\n\t\t\t\t\t\tspami = count;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (f.getName().contains(\"rules\")) {\r\n\t\t\t\t\t\trulesFound = true;\r\n\t\t\t\t\t\trulesi = count;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t\tif (rulesFound) {\r\n\t\t\t\t\trulesFileEncountered.setSelected(true);\r\n\t\t\t\t\trulesFilePathTextField.setText(files[rulesi].getPath());\r\n\t\t\t\t}\r\n\t\t\t\tif (spamFound) {\r\n\t\t\t\t\tspamFileEncountered.setSelected(true);\r\n\t\t\t\t\tspamFilePathTextField.setText(files[spami].getPath());\r\n\t\t\t\t}\r\n\t\t\t\tif (hamFound) {\r\n\t\t\t\t\thamFileEncountered.setSelected(true);\r\n\t\t\t\t\thamFilePathTextField.setText(files[hami].getPath());\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\tpublic void acomodaVista() {\n\n\t}", "@Override\n\tpublic void dialogar() {\n\t\tSystem.out.println(\"Ofrece un Discurso \");\n\t\t\n\t}", "@Override\n public void actionPerformed(AnActionEvent event) {\n\n Project project = event.getData(PlatformDataKeys.PROJECT);\n\n DataContext dataContext = event.getDataContext();\n VirtualFile file = DataKeys.VIRTUAL_FILE.getData(dataContext);\n if(file != null){\n //获取选中的文件\n file = DataKeys.VIRTUAL_FILE.getData(dataContext);\n if(file == null){\n Messages.showErrorDialog(\"未选中文件\",\"error\");\n return;\n }\n }\n Module module = StringUtil.getModule(event.getProject(),dataContext,file.getPath());\n ExportDialog exportDialog = new ExportDialog(project,module,file);\n exportDialog.setTitle(\"Export Files\");\n exportDialog.show();\n }", "public void openDialogCreateVisual(){\n DataHeader[] tabHeader = dataset.getListDataHeaderDouble(true);\n TypeVisualization[] tabVis = getListTypeVisualization(tabHeader.length);\n DataHeader[] tabHeaderLabel = dataset.getListDataHeaderDouble(false);\n CreateDataVisualDialog dialog = new CreateDataVisualDialog(this, tabVis, tabHeader, tabHeaderLabel);\n dialog.setVisible(true);\n }", "@Override\n\t\t\t\tpublic void notifyOnRightButtonClick(Button b)\n\t\t\t\t{\n\t\t\t\t\tfilesBrowser.obtainShowDialog().hide();\n\t\t\t\t}", "public static void downloadedFileDialog(final File file, final Context context){\n NotifyDialog dialog = NotifyDialog.startConfirm(context, context.getString(R.string.file_downloaded), context.getString(R.string.open_file));\n dialog.setButtonsText(context.getString(R.string.NO_CAPITAL), context.getString(R.string.YES_CAPITAL));\n dialog.setTwoButtonListener(new NotifyDialog.TwoButtonDialogListener() {\n @Override\n public void onOkClicked(NotifyDialog dialog) {\n Uri uri = Uri.fromFile(file);\n Intent intent = new Intent(Intent.ACTION_VIEW);\n\n if (uri.toString().contains(\".doc\") || uri.toString().contains(\".docx\")) {\n // Word document\n intent.setDataAndType(uri, \"application/msword\");\n } else if (uri.toString().contains(\".pdf\")) {\n // PDF file\n intent.setDataAndType(uri, \"application/pdf\");\n } else if (uri.toString().contains(\".ppt\") || uri.toString().contains(\".pptx\")) {\n // Powerpoint file\n intent.setDataAndType(uri, \"application/vnd.ms-powerpoint\");\n } else if (uri.toString().contains(\".xls\") || uri.toString().contains(\".xlsx\")) {\n // Excel file\n intent.setDataAndType(uri, \"application/vnd.ms-excel\");\n } else if (uri.toString().contains(\".zip\")) {\n // ZIP audio file\n intent.setDataAndType(uri, \"application/zip\");\n } else if (uri.toString().contains(\".rar\")) {\n // ZIP audio file\n intent.setDataAndType(uri, \"application/x-rar-compressed\");\n } else if (uri.toString().contains(\".gz\")) {\n // ZIP audio file\n intent.setDataAndType(uri, \"application/gzip\");\n } else if (uri.toString().contains(\".rtf\")) {\n // RTF file\n intent.setDataAndType(uri, \"application/rtf\");\n } else if (uri.toString().contains(\".wav\") || uri.toString().contains(\".mp3\")) {\n // WAV audio file\n intent.setDataAndType(uri, \"audio/x-wav\");\n } else if (uri.toString().contains(\".gif\")) {\n // GIF file\n intent.setDataAndType(uri, \"image/gif\");\n } else if (uri.toString().contains(\".jpg\") || uri.toString().contains(\".jpeg\") || uri.toString().contains(\".png\")) {\n // JPG file\n intent.setDataAndType(uri, \"image/jpeg\");\n } else if (uri.toString().contains(\".txt\")) {\n // Text file\n intent.setDataAndType(uri, \"text/plain\");\n } else if (uri.toString().contains(\".3gp\") || uri.toString().contains(\".mpg\") || uri.toString().contains(\".mpeg\") || uri.toString().contains(\".mpe\")\n || uri.toString().contains(\".mp4\") || uri.toString().contains(\".avi\")) {\n // Video files\n intent.setDataAndType(uri, \"video/*\");\n } else {\n // if you want you can also define the intent type for\n // any\n // other file\n\n // additionally use else clause below, to manage other\n // unknown extensions\n // in this case, Android will show all applications\n // installed on the device\n // so you can choose which application to use\n intent.setDataAndType(uri, \"*/*\");\n }\n\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n context.startActivity(intent);\n\n dialog.dismiss();\n }\n\n @Override\n public void onCancelClicked(NotifyDialog dialog) {\n dialog.dismiss();\n }\n });\n }", "@Override\n public Object execute(TransitionSystem ts, Unifier un, Term[] args) throws Exception {\n ts.getAg().getLogger().info(\"executing internal action '<PCK>.warningDialog'\");\n String text=args[0].toString();\n Dialog d=new Dialog(text);\n d.setVisible(true);\n // everything ok, so returns true\n return true;\n }", "private void esegui() {\n /* variabili e costanti locali di lavoro */\n OperazioneMonitorabile operazione;\n\n try { // prova ad eseguire il codice\n\n /**\n * Lancia l'operazione di analisi dei dati in un thread asincrono\n * al termine il thread aggiorna i dati del dialogo\n */\n operazione = new OpAnalisi(this.getProgressBar());\n operazione.avvia();\n\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n }", "public void testFilesView() {\n FilesTabOperator filesTabOper = FilesTabOperator.invoke();\n // needed for slower machines\n JemmyProperties.setCurrentTimeout(\"JTreeOperator.WaitNextNodeTimeout\", 30000); // NOI18N\n Node sourcePackagesNode = new Node(filesTabOper.getProjectNode(SAMPLE_PROJECT_NAME), \"src\"); // NOI18N\n Node sample1Node = new Node(sourcePackagesNode, SAMPLE1_PACKAGE_NAME); // NOI18N\n Node sampleClass1Node = new Node(sample1Node, SAMPLE1_FILE_NAME);\n // It is possible to test also pop-up menu actions as in testProjectsView, but\n // it is redundant IMO\n }", "public void doButtonEinfuegen() {\n\t\tDialogSelectionDjinn dsd = new DialogSelectionDjinn((Frame) this.owner, \"Auswahl Tabellenspalte\",\n\t\t\t\tnew DefaultListViewComponentFactory((allts ? this.tabelle.getDiagramm().getFieldCache()\n\t\t\t\t\t\t: new Vector<Object>(Arrays.asList(this.tabelle.getColumns())))));\n\t\tif (dsd.isSelected()) {\n\t\t\tVector v = dsd.getSelection();\n\t\t\tVector values = new Vector();\n\t\t\tfor (int i = 0, len = v.size(); i < len; i++) {\n\t\t\t\tif (this.getType() == 0) {\n\t\t\t\t\tvalues.addElement(v.elementAt(i));\n\t\t\t\t} else if ((this.getType() == 1) || (this.getType() == 2)) {\n\t\t\t\t\tvalues.addElement(new ToStringContainer((TabellenspaltenModel) v.elementAt(i), this.tabelle));\n\t\t\t\t} else if (this.getType() == 3) {\n\t\t\t\t\tvalues.addElement(Archimedes.Factory.createOrderMember((TabellenspaltenModel) v.elementAt(i)));\n\t\t\t\t} else if (this.getType() == 4) {\n\t\t\t\t\tvalues.addElement(Archimedes.Factory.createSelectionMember((TabellenspaltenModel) v.elementAt(i)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 0, len = values.size(); i < len; i++) {\n\t\t\t\tboolean found = false;\n\t\t\t\tfor (int j = 0, lenj = this.tabellenspalten.size(); j < lenj; j++) {\n\t\t\t\t\tif (this.getType() == 0) {\n\t\t\t\t\t\tTabellenspaltenModel tsm = (TabellenspaltenModel) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (values.elementAt(i) == tsm) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ((this.getType() == 1) || (this.getType() == 2)) {\n\t\t\t\t\t\tToStringContainer tsc = (ToStringContainer) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (((ToStringContainer) values.elementAt(i)).getTabellenspalte() == tsc) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (this.getType() == 3) {\n\t\t\t\t\t\tOrderMemberModel omm = (OrderMemberModel) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (((OrderMemberModel) values.elementAt(i)).getOrderColumn() == omm) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (this.getType() == 4) {\n\t\t\t\t\t\tSelectionMemberModel smm = (SelectionMemberModel) this.tabellenspalten.get(j);\n\t\t\t\t\t\tif (((SelectionMemberModel) values.elementAt(i)).getColumn() == smm) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!found) {\n\t\t\t\t\tif (this.anzeige.getSelectedRow() >= 0) {\n\t\t\t\t\t\tthis.tabellenspalten.add(this.anzeige.getSelectedRow(), values.get(i));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.tabellenspalten.add(values.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.doRepaint();\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_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 }", "public FiltroGirosDialog() {\n \n }", "public void openOrderBalanceDialog() {\n\t\torderBalanceDialogBox = new DialogBox(true);\n\t\torderBalanceDialogBox.setGlassEnabled(true);\n\t\torderBalanceDialogBox.setText(\"Rentabilidad Pedido\");\n\t\torderBalanceDialogBox.setSize(\"250px\", \"150px\");\n\n\t\tVerticalPanel vp = new VerticalPanel();\n\t\tvp.setSize(\"250px\", \"150px\");\n\t\torderBalanceDialogBox.setWidget(vp);\n\n\t\tFlowPanel orderPanel = new FlowPanel();\n\t\torderPanel.setWidth(\"250px\");\n\n\t\t// Obten info del filtro forzado\n\t\tBmFilter forceFilter = getUiParams().getUiProgramParams(getBmObject().getProgramCode()).getForceFilter();\n\n\t\tUiRequisitionOrderView uiRequisitionOrderView = new UiRequisitionOrderView(getUiParams(), orderPanel, forceFilter.getValue());\n\t\tuiRequisitionOrderView.show();\t\t\t\t\t\n\n\t\tHorizontalPanel buttonPanel = new HorizontalPanel();\n\t\tbuttonPanel.add(orderBalanceCloseDialogButton);\n\n\t\tvp.add(orderPanel);\n\t\tvp.add(buttonPanel);\n\n\t\torderBalanceDialogBox.center();\n\t\torderBalanceDialogBox.show();\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n filename = getArguments().getString(\"filename\");\n username = getArguments().getString(\"username\");\n workingDIR = getArguments().getString(\"workingDIR\");\n builder.setTitle(R.string.copy_move_file_select_options_title)\n .setItems(R.array.file__move_copy_dialog_options, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n onSelect(which);\n }\n });\n return builder.create();\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString command=e.getActionCommand();\r\n\t\tif(command.equals(\"cancel\")){\r\n\t\t\tthis.setVisible(false);\r\n\t\t}else if(command.equals(\"add\")){\r\n\t\t\tString newFolderName=JOptionPane.showInputDialog(bmarkSimpleTree,\"请输入新文件夹名字:\",\"\"+System.currentTimeMillis());\r\n//\t\t\tSystem.out.println(\"newFolderName=\"+newFolderName);\r\n\t\t\tif(null==newFolderName||\"\".equals(newFolderName)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tint lastId=new LikeLynneUtils().getMaxId();\r\n\t\t\tif(lastId<0){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tLikeLynne parentNode=(LikeLynne) bmarkSimpleTree.getCurrentTreeNode().getUserObject();\r\n\t\t\tLikeLynne newFolder=new LikeLynne();\r\n\t\t\tnewFolder.setId((lastId+1));\r\n\t\t\tnewFolder.setParent(parentNode.getId());\r\n\t\t\tnewFolder.setTitle(newFolderName);\r\n\t\t\tnewFolder.setType(2);\r\n\t\t\tnewFolder.setChildren(new ArrayList<>());\r\n\t\t\tnewFolder.setDateAdded(System.currentTimeMillis());\r\n\t\t\tint resultCode=LikeLynneApi.getInstance().addLikeLynne(newFolder);\r\n\t\t\tif(resultCode==200){\r\n\t\t\t\taddNewLikeLynne(parentFrame.llynne, newFolder);\r\n\t\t\t\tbmarkSimpleTree.initTree(parentFrame.llynne,false);\r\n\t\t\t\tparentFrame.llynne=parentFrame.llynne;\r\n\t\t\t\tparentFrame.initBmarkWindow(parentFrame.llynne);\r\n\t\t\t\tparentFrame.addBmarkWindow.initComboFolders();\r\n\t\t\t}\r\n\t\t}else if(command.equals(\"save\")){\r\n\t\t\tString name=nameTxt.getText();\r\n\t\t\tif(\"\".equals(name)){\r\n\t\t\t\tJOptionPane.showMessageDialog(bmarkSimpleTree,\"请输入书签名字\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tString url=urlTxt.getText();\r\n\t\t\tif(\"\".equals(url)){\r\n\t\t\t\tJOptionPane.showMessageDialog(AddBmarkOrFolderUI.this,\"请输入书签链接\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif(!Utils.isUrlFormat(url)){\r\n\t\t\t\tJOptionPane.showMessageDialog(bmarkSimpleTree,\"请输入有效书签链接\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n//\t\t\tJOptionPane.showMessageDialog(null,\"url=\"+url);\r\n\t\t\tint lastId=new LikeLynneUtils().getMaxId();\r\n\t\t\tif(lastId<0){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tLikeLynne parentNode=(LikeLynne) bmarkSimpleTree.getCurrentTreeNode().getUserObject();\r\n\t\t\tLikeLynne newLikeLynne=new LikeLynne();\r\n\t\t\tnewLikeLynne.setId((lastId+1));\r\n\t\t\tnewLikeLynne.setParent(parentNode.getId());\r\n\t\t\tnewLikeLynne.setTitle(name);\r\n\t\t\tnewLikeLynne.setUrl(url);\r\n\t\t\tnewLikeLynne.setType(1);\r\n\t\t\tnewLikeLynne.setDateAdded(System.currentTimeMillis());\r\n\t\t\tint resultCode=LikeLynneApi.getInstance().addLikeLynne(newLikeLynne);\r\n\t\t\tif(resultCode==200){\r\n\t\t\t\taddNewLikeLynne(parentFrame.llynne,newLikeLynne);\r\n\t\t\t\tthis.setVisible(false);\r\n\t\t\t\tparentFrame.llynne=parentFrame.llynne;\r\n\t\t\t\tparentFrame.initBmarkWindow(parentFrame.llynne);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void showUnsavedChangesDialog() {\n //create the builder\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n //add message and button functionality\n builder.setMessage(\"Discard your changes and quit?\")\n .setPositiveButton(\"Discard\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //make the sdiscard boolean false and go to back pressed to follow normal hierarchical back\n unsavedChanges = false;\n //continue with back button\n onBackPressed();\n }\n })\n .setNegativeButton(\"Keep Editing\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //close the dialog\n dialog.dismiss();\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\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 }", "private void gaVerder()\n {\n /**\n * Dialog tonen waarbij de gebruiker de keuze krijgt om al dan niet nog een spelbord te maken.\n */\n Alert keuze = new Alert(Alert.AlertType.CONFIRMATION);\n keuze.setTitle(ResourceHandling.getInstance().getString(\"Configureer.gaverder\"));\n keuze.setHeaderText(ResourceHandling.getInstance().getString(\"Knop.verder\"));\n\n ButtonType btnNieuw = new ButtonType(ResourceHandling.getInstance().getString(\"Spelbord.nieuw\"));\n ButtonType btnCancel = new ButtonType(ResourceHandling.getInstance().getString(\"Annuleer.knop\"));\n\n keuze.getButtonTypes().setAll(btnCancel, btnNieuw);\n Optional<ButtonType> result = keuze.showAndWait();\n\n if (result.get() == btnNieuw)\n {\n LoaderSchermen.getInstance().load(\"Sokoban\", new GaVerderSchermController(dc), 488, 213, this);\n } else\n {\n LoaderSchermen.getInstance().load(\"Sokoban\", new KiesConfigureerSchermController(dc), 300, 300, this);\n }\n }", "public static void processOneFileSelecction()\n {\n int answer = JSoundsMainWindowViewController.jfcOneFile.showOpenDialog(JSoundsMainWindowViewController.jSoundsMainWindow);\n \n if (answer == JFileChooser.APPROVE_OPTION)\n {\n File actualDirectory = JSoundsMainWindowViewController.jfcOneFile.getCurrentDirectory();\n String directory = actualDirectory.getAbsolutePath() + \"/\" + JSoundsMainWindowViewController.jfcOneFile.getSelectedFile().getName();\n UtilFunctions.listOneFile(JSoundsMainWindowViewController.jfcOneFile.getSelectedFile());\n JSoundsMainWindowViewController.orderBy(true, false, false); \n }\n }", "public void showDialogWindow(Stage primaryStage, VBox vbox, String title, Button done) {\n // Create layout\n BorderPane layout = new BorderPane();\n layout.setCenter(vbox);\n\n // Show Modal Dialog Window\n Scene inputScene = new Scene(layout, 350, 250);\n final Stage userInputs = new Stage();\n userInputs.initModality(Modality.APPLICATION_MODAL);\n userInputs.initOwner(primaryStage);\n userInputs.setScene(inputScene);\n userInputs.setTitle(title);\n userInputs.show();\n\n // Add functionality to upload button\n done.setOnAction(e -> userInputs.close());\n }", "private void fixFileOption() {\n\t\t\n\t\tnewFileOption.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew CreateFileFrame(main, true , controller);\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\topenFileOption.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJFileChooser fileSelector = new JFileChooser();\n\t\t\t\tFileNameExtensionFilter fileFilter = new FileNameExtensionFilter(\"ASM , IN, OUT\", \"asm\", \"in\",\"out\");\n\t\t\t\tfileSelector.setFileFilter(fileFilter);\n\t\t\t\t\n\t\t\t\tint option = fileSelector.showOpenDialog(openFileOption);\n\t\t\t\t\n\t\t\t\tif(option == JFileChooser.APPROVE_OPTION){\n\t\t\t\t\tString path = fileSelector.getSelectedFile().getPath();\n\t\t\t\t\tString extension = path.substring(path.lastIndexOf('.') + 1);\n\t\t\t\t\t\n\t\t\t\t\tif (extension.equalsIgnoreCase(\"in\")) {\n\t\t\t\t\t\tcontroller.changeIn(path);\n\t\t\t\t\t}\n\t\t\t\t\telse if (extension.equalsIgnoreCase(\"out\")) {\n\t\t\t\t\t\tcontroller.changeOut(path);\n\t\t\t\t\t}\n\t\t\t\t\telse if (extension.equalsIgnoreCase(\"asm\")) {\n\t\t\t\t\t\tcontroller.changeProgram(path);\n\t\t\t\t\t}\n\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\texitOption.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){\n\t\t\t\toptionExit();\n\t\t\t}\n\t\t});\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tJFileChooser fileChooser = new JFileChooser();\n\n\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"Arquivos rdp\", \"rdp\");\n\n\t\t\tfileChooser.setFileFilter(filter);\n\n\t\t\tint returnVal = fileChooser.showOpenDialog(MainWindow.this);\n\n\t\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\n\t\t\t\tfileChooser.getSelectedFile(); // retorna um File\n\n\t\t\t\ttry {\n\t\t\t\t\tScanner input = new Scanner(fileChooser.getSelectedFile());\n\n\t\t\t\t\tString placesTmp = input.nextLine();\n\t\t\t\t\tString transitionsTmp = input.nextLine();\n\t\t\t\t\tArrayList<String> edgesTmp = new ArrayList<>();\n\t\t\t\t\twhile (input.hasNext()) {\n\t\t\t\t\t\tedgesTmp.add(input.nextLine());\n\t\t\t\t\t}\n\t\t\t\t\tinput.close();\n\n\t\t\t\t\tString placesStr[] = placesTmp.trim().split(\";\");\n\t\t\t\t\tString transitionsStr[] = transitionsTmp.trim().split(\";\");\n\t\t\t\t\tString edgesStr[][] = new String[edgesTmp.size()][3];\n\n\t\t\t\t\tfor (int i = 0; i < edgesTmp.size(); i++) {\n\t\t\t\t\t\tedgesStr[i] = edgesTmp.get(i).trim().split(\"-\");\n\t\t\t\t\t}\n\n\t\t\t\t\tArrayList<Place> places = new ArrayList<>();\n\n\t\t\t\t\tfor (String placeStr : placesStr) {\n\t\t\t\t\t\tString place[] = placeStr.split(\",\");\n\t\t\t\t\t\tplaces.add(new Place(place[0], Integer.parseInt(place[1])));\n\t\t\t\t\t}\n\n\t\t\t\t\tArrayList<Transition> transitions = new ArrayList<>();\n\t\t\t\t\tMap<String, ArrayList<Edge>> edges = new HashMap<>();\n\n\t\t\t\t\tfor (String transitionStr : transitionsStr) {\n\t\t\t\t\t\ttransitions.add(new Transition(transitionStr, false));\n\t\t\t\t\t\tedges.put(transitionStr, new ArrayList<Edge>());\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (int i = 0; i < edgesStr.length; i++) {\n\n\t\t\t\t\t\tState origin = null;\n\t\t\t\t\t\tState destiny = null;\n\n\t\t\t\t\t\t// Verifica se o hashmap tem o label da origem como\n\t\t\t\t\t\t// chave\n\t\t\t\t\t\tif (edges.containsKey(edgesStr[i][0])) {\n\t\t\t\t\t\t\t// origem e uma transicao\n\t\t\t\t\t\t\tfor (Transition transition : transitions) {\n\t\t\t\t\t\t\t\tif (transition.getLabel().equals(edgesStr[i][0])) {\n\t\t\t\t\t\t\t\t\torigin = transition;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfor (Place place : places) {\n\t\t\t\t\t\t\t\tif (place.getLabel().equals(edgesStr[i][2])) {\n\t\t\t\t\t\t\t\t\tdestiny = place;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// origem e um lugar\n\t\t\t\t\t\t\tfor (Place place : places) {\n\t\t\t\t\t\t\t\tif (place.getLabel().equals(edgesStr[i][0])) {\n\t\t\t\t\t\t\t\t\torigin = place;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfor (Transition transition : transitions) {\n\t\t\t\t\t\t\t\tif (transition.getLabel().equals(edgesStr[i][2])) {\n\t\t\t\t\t\t\t\t\tdestiny = transition;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tEdge edge = new Edge(origin, destiny, Integer.parseInt(edgesStr[i][1]));\n\n\t\t\t\t\t\tif (origin instanceof Transition) {\n\t\t\t\t\t\t\tedges.get(origin.getLabel()).add(edge);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tedges.get(destiny.getLabel()).add(edge);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tPetriNetwork petriNetwork = new PetriNetwork(places, transitions, edges);\n\n\t\t\t\t\taddTab(petriNetwork, fileChooser.getSelectedFile().getName());\n\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tJOptionPane.showMessageDialog(MainWindow.this, \"Erro ao abrir o arquivo!\", \"Erro\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public abstract DialogBox showProgressBox(String message);", "public void execute() throws CommandLineModuleExecutionException\n {\n try\n { \n MRMDialog mrmDialog = new MRMDialog(file,meanPrecursorDiscoveryMzTolerance,meanDaughterMzTolerance,SICtolerance,peakStrategyClass,traceAllFragments,syncLH,minPeakCutoff,minAreaCutoff);\n if(getBooleanArgumentValue(\"SELECTED_ION_MONITORING\"))\n {\n mrmDialog.topGraphLabel.setText(\"SIM Intensities\");\n mrmDialog._sim = true;\n }\n //mrmDialog.setModalityType(Dialog.ModalityType.DOCUMENT_MODAL);\n mrmDialog.setVisible(true);\n \n mrmDialog.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n// Thread.currentThread().yield();\n\n Thread.currentThread().join();\n }\n catch (Exception e)\n {\n throw new CommandLineModuleExecutionException(e);\n }\n }", "public static void main(String[] args) {\n try { UIManager.setLookAndFeel(new NimbusLookAndFeel()); } catch (UnsupportedLookAndFeelException e) { }\n JFrame.setDefaultLookAndFeelDecorated(true);\n JDialog.setDefaultLookAndFeelDecorated(true);\n\n // Show basic info dialog boxes\n Svetovid.gui.showMessage(null, \"This is a message text.\");\n Svetovid.gui.showInformation(null, \"This is a message text that\\nspans multiple lines.\");\n Svetovid.gui.showWarning(null, \"This is a warning message text!\");\n Svetovid.gui.showError(null, \"This is an error message text.\");\n\n // Show basic question dialogs\n String answer1 = Svetovid.gui.askQuestion(null, \"This is a message that asks a question\\nwith a free-form textual answer.\");\n Svetovid.gui.showMessage(null, \"You answered:\\n'\" + answer1 + \"'\");\n Object answer2 = Svetovid.gui.askQuestion(null, \"This is a message that asks the user\\nto select one of predetermined answers.\", new String[]{\"Option 1\", \"Option 2\", \"Option 3\"}, \"Option 2\");\n Svetovid.gui.showMessage(null, \"You answered:\\n'\" + answer2 + \"'\");\n boolean answer3 = Svetovid.gui.askConfirmation(null, \"This is a message that asks the user\\nto answer with 'yes' or 'no'.\");\n if (answer3) {\n Svetovid.gui.showMessage(null, \"You answered:\\n'yes'\");\n } else {\n Svetovid.gui.showMessage(null, \"You answered:\\n'no'\");\n }\n Boolean answer4 = Svetovid.gui.askConfirmationWithCancel(null, \"This is a message that asks the user\\nto answer with 'yes' or 'no'\\nand allows him to cancel the question.\");\n if (answer4 == null) {\n Svetovid.gui.showMessage(null, \"You clicked\\n'cancel'\");\n } else if (answer3) {\n Svetovid.gui.showMessage(null, \"You answered:\\n'yes'\");\n } else {\n Svetovid.gui.showMessage(null, \"You answered:\\n'no'\");\n }\n\n // Show basic login and password dialogs\n Svetovid.gui.askLogin(null, \"Please login using your user name and passowrd.\");\n Svetovid.gui.askLogin(null, \"This dialog asks for login details for the user 'john'.\", \"john\");\n Svetovid.gui.askPassword(null, \"This dialog asks only for password.\");\n\n // Demonstrate exception reporting\n try {\n method1();\n } catch (Exception e) {\n e.printStackTrace();\n Svetovid.gui.showError(null, \"An intentional error occured and this is the description of the error.\\nThis dialog will close itself after 20 seconds.\\nFor more information click 'details'.\", e, 20000);\n }\n\n }", "private void vereenvoudigAction() {\n foutLabel.setText(\"\");\n int teller = Integer.parseInt(tellerVeld.getText());\n int noemer = Integer.parseInt(noemerVeld.getText());\n if (noemer <= 0) {\n foutLabel.setText(\"Noemer moet positief zijn\");\n }\n else if (teller < 0) {\n foutLabel.setText(\"Teller mag niet negatief zijn\");\n }\n else {\n Breuk breuk = new Breuk(teller, noemer); \n if (breuk != null) {\n breuk.vereenvoudig();\n tellerVeld.setText(breuk.getTeller() + \"\");\n noemerVeld.setText(breuk.getNoemer() + \"\");\n }\n }\n }", "public void verVerAnalisisResultados(String convocator)\r\n\t{\r\n\t\tveranalisisresultados = new VerAnalisisResultados(this, convocator);\r\n\t\tveranalisisresultados.setVisible(true);\r\n\t}", "private void handleBrowse() {\n\t\tContainerSelectionDialog dialog = new ContainerSelectionDialog(\n\t\t\t\tgetShell(), ResourcesPlugin.getWorkspace().getRoot(), false,\n\t\t\t\t\"Select new file container\");\n\t\tif (dialog.open() == ContainerSelectionDialog.OK) {\n\t\t\tObject[] result = dialog.getResult();\n\t\t\tif (result.length == 1) {\n\t\t\t\tcontainerSourceText.setText(((Path) result[0]).toString());\n\t\t\t}\n\t\t}\n\t}", "public void onClick(DialogInterface dialog,int id) {\n if(!(userInput.getText()+\"\").isEmpty()){\n createDirectories.isFileRenamed(fileName,(userInput.getText()+\"\"),\"Recordings\",selectedCurrentEvent);\n }\n mEditor.putBoolean(showNamePromptKey,!showToggle.isChecked());\n mEditor.apply();\n }", "void doViewSwf()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (hasMoreTokens())\n\t\t\t{\n\t\t\t\tString swfName = nextToken();\n\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\targs.put(\"swf\", swfName); //$NON-NLS-1$\n\t\t\t\tif (m_fileInfo.setSwfFilter(swfName))\n\t\t\t\t{\n\t\t\t\t\tout(getLocalizationManager().getLocalizedTextString(\"commandsLimitedToSpecifiedSwf\", args)); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"notValidSwf\", args)); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm_fileInfo.setSwfFilter(null);\n\t\t\t\tout(getLocalizationManager().getLocalizedTextString(\"commandsApplyToAllSwfs\")); //$NON-NLS-1$\n\t\t\t}\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noActiveSession\")); //$NON-NLS-1$\n\t\t}\n\t}", "@Jpf.Action(forwards = { @Jpf.Forward(name = \"success\", path = \"vacantes.jsp\") })\n\tpublic Forward verVacantes() throws Exception{\n\t\tForward forward = new Forward(\"success\");\n\t\tforward.addActionOutput(\"usuario\", getCurrentUser());\n\t\tif(getRequest().isUserInRole(\"RH\")){\n\t\t\tforward.addActionOutput(\"userRH\", true);\n\t\t}\n\t\tCollection<Vacante> vacantes = UcmUtil.getVacantes(getRequest());\n\t\tgetRequest().setAttribute(\"vacantes\", vacantes);\n\t\t\n\t\treturn forward;\n\t}", "private void createTreeContextMenu(TreeViewer viewer){\r\n\t\tif(viewer == null)return;\r\n\t\tif(viewer.getTree().isDisposed())return;\r\n\t\tfinal Action edit = new Action() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\t\t\t\r\n\t\t\t\tsuper.run();\r\n\t\t\t\tITreeSelection selection = (ITreeSelection)viewer.getSelection();\r\n\t\t\t\tboolean stripped = false;\r\n\t\t\t\tif (!selection.isEmpty()) {\r\n\t\t\t\t\tObject object = selection.getFirstElement();\r\n\t\t\t\t\tif (object instanceof Equation) {\r\n\t\t\t\t\t\tEquation equation = (Equation) object;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(equation.getIsModifiable()){\r\n\t\t\t\t\t\tString prefix = \"\";\r\n\t\t\t\t\t\tObject obj = selection.getPaths()[0].getParentPath().getLastSegment();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (obj instanceof Brique) {\r\n\t\t\t\t\t\t\tBrique brique = (Brique)obj;\r\n\t\t\t\t\t\t\tprefix = brique.getNomBrique();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tString oldContent = equation.getContenuEqn();\r\n\t\t\t\t\t\tif(obj == null ){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//manually search for the brique object\r\n\t\t\t\t\t\t\tlong tracking = equation.getReferenceBrique();\r\n\t\t\t\t\t\t\tList< Brique> briques = mwt.getCompositionBriques().getBrique();\r\n\t\t\t\t\t\t\tfor (Brique brique : briques) {\r\n\t\t\t\t\t\t\t\tif(brique.getBriqueId() == tracking){\r\n\t\t\t\t\t\t\t\t\tprefix = brique.getNomBrique();\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}\r\n\t\t\t\t\t\t\t\r\n\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//modify equation statement\r\n\t\t\t\t\t\t\tif(!prefix.isEmpty()){\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tstripped = RenameContents.stripPrefix(prefix, equation);\r\n\t\t\t\t\t\t\t\t} catch (MainApplicationException e) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\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\tAddNewEquation newEquation = new AddNewEquation(viewer.getTree().getShell(), SWT.NONE, equation, true);\r\n\t\t\t\t\t\tObject result = newEquation.open();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(result == null){\r\n\t\t\t\t\t\t\tequation.setContenuEqn(oldContent);\r\n\t\t\t\t\t\t return;}\t\r\n\t\t\t\t\t\tif(result.equals(Boolean.TRUE)){\r\n\t\t\t\t\t\t\tif (stripped) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tRenameContents.renameEquationParameters(prefix, equation);\r\n\t\t\t\t\t\t\t\tnew VerificationSyntaxeEquation(equation.getContenuEqn());\r\n\t\t\t\t\t\t\t} catch (MainApplicationException e) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tequation.setContenuEqn(oldContent);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\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\treplaceMatchingParameters();\r\n\t\t\t\t\t\trefreshParameterValues(getWritableListEquations());\r\n\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tviewer.getTree().addMenuDetectListener(menu->{\r\n\t\t\tMenuManager menuManager = new MenuManager();\r\n\t\t\tmenuManager.setRemoveAllWhenShown(true);\r\n\t\t\tmenuManager.addMenuListener(listener->{\r\n\t\t\t\tIStructuredSelection selection = (IStructuredSelection)viewer.getSelection();\r\n\t\t\t\tif (!selection.isEmpty()) {\r\n\t\t\t\t\tObject object = selection.getFirstElement();\r\n\t\t\t\t\tif (object instanceof Equation) {\r\n\t\t\t\t\t\tEquation equation = (Equation) object;\r\n\t\t\t\t\t\tif(equation.getIsModifiable()){\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tedit.setText(\"Modifier \\t Ctrl+Maj+E\");\r\n\t\t\t\t\t\t\tedit.setAccelerator(SWT.CTRL | SWT.SHIFT | 'E' );\r\n\t\t\t\t\t\t\tmenuManager.add(edit);\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});\r\n\t\t\tviewer.getTree().setMenu(menuManager.createContextMenu(viewer.getTree()));\r\n\t\t});\r\n\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n String src;\n JFileChooser fileChooser = new JFileChooser();\n fileChooser.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\n int result = fileChooser.showOpenDialog(getParent());\n if (result == JFileChooser.APPROVE_OPTION) {\n File selectedFile = fileChooser.getSelectedFile();\n textSalida.append(\"\\nAutómata seleccionado \" + selectedFile.getAbsolutePath() );\n automa = null;\n automataready = false;\n compilar.setEnabled(false);\n try {\n src = selectedFile.getAbsolutePath();\n automa = new AFDVault(src);\n automataready = automa.allready();\n if (automataready){\n compilar.setEnabled(true);\n textSalida.append(\"\\nAutomata cargado\");\n //automa.PrintAFD();\n }else{\n compilar.setEnabled(false);\n textSalida.append(\"\\nAutomata no cargado verifique el archivo\");\n }\n }catch (IOException|ParserException ex){\n textSalida.append(ex.getMessage()+\"\\n\");\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnBrowse = new javax.swing.JButton();\n txtSourceFile = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n btnOpen = new javax.swing.JButton();\n btnCancel = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n btnBrowse.setText(org.openide.util.NbBundle.getMessage(OpenMonitorInstanceDialog.class, \"OpenMonitorInstanceDialog.btnBrowse.text\")); // NOI18N\n btnBrowse.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBrowseActionPerformed(evt);\n }\n });\n\n txtSourceFile.setEditable(false);\n txtSourceFile.setText(org.openide.util.NbBundle.getMessage(OpenMonitorInstanceDialog.class, \"OpenMonitorInstanceDialog.txtSourceFile.text\")); // NOI18N\n\n jLabel2.setText(org.openide.util.NbBundle.getMessage(OpenMonitorInstanceDialog.class, \"OpenMonitorInstanceDialog.jLabel2.text\")); // NOI18N\n\n btnOpen.setText(org.openide.util.NbBundle.getMessage(OpenMonitorInstanceDialog.class, \"OpenMonitorInstanceDialog.btnOpen.text\")); // NOI18N\n btnOpen.setEnabled(false);\n btnOpen.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnOpenActionPerformed(evt);\n }\n });\n\n btnCancel.setText(org.openide.util.NbBundle.getMessage(OpenMonitorInstanceDialog.class, \"OpenMonitorInstanceDialog.btnCancel.text\")); // NOI18N\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelActionPerformed(evt);\n }\n });\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .addContainerGap(298, Short.MAX_VALUE)\n .add(btnOpen)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(btnCancel)\n .addContainerGap())\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(jLabel2)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(txtSourceFile, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(btnBrowse)\n .add(12, 12, 12)))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap(72, Short.MAX_VALUE)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(btnCancel)\n .add(btnOpen))\n .add(15, 15, 15))\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel2)\n .add(txtSourceFile, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(btnBrowse))\n .addContainerGap(80, Short.MAX_VALUE)))\n );\n\n pack();\n }", "public void showDialog()\n {\n textInputDialog = new TextInputDialog();\n textInputDialog.setTitle(\"Choose File\");\n Pane pane = new Pane();\n pane.setPrefSize(350, 130);\n\n filePath = new TextField();\n filePath.setPrefSize(250, 20);\n filePath.setPromptText(\"Path File :\");\n filePath.setLayoutX(20);\n filePath.setLayoutY(50);\n\n\n JFXButton Browse = new JFXButton(\"Browse\");\n Browse.setStyle(\" -fx-background-color :#ffffff\");\n Browse.setLayoutX(280);\n Browse.setLayoutY(50);\n\n Browse.setButtonType(JFXButton.ButtonType.RAISED);\n\n pane.getChildren().addAll(filePath, Browse);\n textInputDialog.setHeaderText(null);\n textInputDialog.getDialogPane().setContent(pane);\n Browse.setOnMouseClicked(event ->\n {\n FileChooser fileChooser = new FileChooser();\n file = fileChooser.showOpenDialog(rootAnchorPane.getScene().getWindow());\n filePath.setText(file.getAbsolutePath());\n });\n }", "private AssignFSADialog() {\r\n super(Hub.getMainWindow(), Hub.string(\"TD_assignFSATitle\"));\r\n addWindowListener(new WindowAdapter() {\r\n @Override\r\n public void windowClosing(WindowEvent e) {\r\n onEscapeEvent();\r\n }\r\n });\r\n this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\r\n this.setMinimumSize(new Dimension(300, 10));\r\n\r\n Box mainBox = Box.createHorizontalBox();\r\n mainBox.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));\r\n Box newBox = Box.createVerticalBox();\r\n newBox.add(new JLabel(\" \"));\r\n newBox.add(new JButton(new NewFSAAction()));\r\n mainBox.add(newBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n openModelsCombo = new JComboBox();\r\n openModelsCombo.setRenderer(new JLabelListRenderer());\r\n Box modelsBox = Box.createVerticalBox();\r\n Box titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_openModels\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n modelsBox.add(titleBox);\r\n modelsBox.add(openModelsCombo);\r\n mainBox.add(modelsBox);\r\n\r\n mainBox.add(Box.createRigidArea(new Dimension(5, 0)));\r\n\r\n templatesCombo = new JComboBox();\r\n templatesCombo.setRenderer(new JLabelListRenderer());\r\n Box templatesBox = Box.createVerticalBox();\r\n titleBox = Box.createHorizontalBox();\r\n titleBox.add(new JLabel(Hub.string(\"TD_templates\")));\r\n titleBox.add(Box.createHorizontalGlue());\r\n templatesBox.add(titleBox);\r\n templatesBox.add(templatesCombo);\r\n mainBox.add(templatesBox);\r\n\r\n getContentPane().add(mainBox);\r\n\r\n }", "private void dialogChanged() {\n\t\tIResource container = ResourcesPlugin.getWorkspace().getRoot()\n\t\t\t\t.findMember(new Path(getContainerName().get(\"ProjectPath\")));\n\n\t\tif(!containerSourceText.getText().isEmpty() && !containerTargetText.getText().isEmpty())\n\t\t{\n\t\t\tokButton.setEnabled(true);\n\t\t}\n\n\t\tif (getContainerName().get(\"ProjectPath\").length() == 0) {\n\t\t\tupdateStatus(\"File container must be specified\");\n\t\t\treturn;\n\t\t}\n\t\tif (container == null\n\t\t\t\t|| (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {\n\t\t\tupdateStatus(\"File container must exist\");\n\t\t\treturn;\n\t\t}\n\t\tif (!container.isAccessible()) {\n\t\t\tupdateStatus(\"Project must be writable\");\n\t\t\treturn;\n\t\t}\n\t\tupdateStatus(null);\n\t}" ]
[ "0.6582604", "0.5878382", "0.57809615", "0.5772198", "0.569543", "0.5677036", "0.5634019", "0.55736154", "0.55396956", "0.55237484", "0.5483734", "0.54207414", "0.5392133", "0.5380858", "0.53657687", "0.5332252", "0.5305", "0.53012305", "0.5284085", "0.52721685", "0.5269401", "0.5246669", "0.52373695", "0.5221265", "0.5219916", "0.5209333", "0.52082264", "0.52065593", "0.5204245", "0.5188322", "0.5182403", "0.5174079", "0.51623017", "0.5162145", "0.5155311", "0.51521826", "0.5136279", "0.5133989", "0.5125049", "0.5120323", "0.5117853", "0.5114342", "0.5112068", "0.5111079", "0.511051", "0.51068246", "0.510602", "0.5100381", "0.50872016", "0.50858545", "0.5084161", "0.5064677", "0.506001", "0.5059779", "0.5057855", "0.5043302", "0.5040572", "0.5039983", "0.5037695", "0.5030985", "0.50280726", "0.50270116", "0.5024004", "0.5023326", "0.5019495", "0.5018524", "0.50174963", "0.5010768", "0.5003745", "0.49993488", "0.49981728", "0.4988831", "0.49876243", "0.49845985", "0.4981117", "0.49785274", "0.4977124", "0.49719912", "0.49719873", "0.49704188", "0.49666208", "0.49662408", "0.4965435", "0.4965063", "0.49627241", "0.49591404", "0.49540317", "0.4947403", "0.4942163", "0.49371183", "0.49370196", "0.49165827", "0.49144098", "0.4909328", "0.49080902", "0.49068847", "0.49060458", "0.4903187", "0.49021098", "0.4899981", "0.48968312" ]
0.0
-1
Creacion de una entrada de Points Translation
public static boolean createPointForEvent(int eventType, int points) { PointsTranslation pointsTranslation = new PointsTranslation(); pointsTranslation.eventTypeId = eventType; pointsTranslation.points = points; pointsTranslation.createdAt = GlobalDate.getCurrentDate(); pointsTranslation.lastModified = pointsTranslation.createdAt; Model.pointsTranslation().insert(pointsTranslation); OpsLog.onNew(pointsTranslation); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }", "private void transformPoints() {\r\n\r\n\t\t// angle between x-axis and the line between start and goal\r\n//\t\tthis.angle = inverse_tan (slope)\r\n\t\tthis.angle = (int) Math.toDegrees(Math.atan2(goal.getY()-robot.getY(), goal.getX()-robot.getX()));\r\n\r\n\t\t// deviation of start point's x-axis from (0,0)\r\n\t\tthis.deviation = this.robot;\r\n\r\n\t\tthis.robot = new Robot(GA_PathPlanning.Transform(robot, -deviation.x, -deviation.y));\r\n\t\tthis.robot = new Robot(Rotate(robot, -angle));\r\n\t\t \r\n\t\tthis.goal = GA_PathPlanning.Transform(goal, -deviation.x, -deviation.y);\r\n\t\tthis.goal = GA_PathPlanning.Rotate(goal, -angle);\r\n\t\t\r\n\t\tfor(int i=0;i<obstacles.length;i++)\r\n\t\t{\r\n\t\t\tthis.obstacles[i]= new Obstacle(GA_PathPlanning.Transform(obstacles[i], -deviation.x, -deviation.y));\r\n\t\t\tthis.obstacles[i]= new Obstacle(GA_PathPlanning.Rotate(obstacles[i], -angle));\r\n\t\t}\r\n\t\t// make start point as (0,0)\r\n\t\t// transform xy-axis to axis of the straight line between start and goal\r\n\t\t\r\n\t\t\r\n\t}", "Vaisseau_positionner createVaisseau_positionner();", "@FXML\n public void translation(){\n double x = Double.parseDouble(translation_x.getText());\n double y = Double.parseDouble(translation_y.getText());\n double z = Double.parseDouble(translation_z.getText());\n\n double[] A = t1.getTetraeder()[0].getPoint();\n double[] B = t1.getTetraeder()[1].getPoint();\n double[] C = t1.getTetraeder()[2].getPoint();\n double[] D = t1.getTetraeder()[3].getPoint();\n\n t1.getTetraeder()[0].setPoint(A[0]+x,A[1]+y,A[2]+z);\n t1.getTetraeder()[1].setPoint(B[0]+x,B[1]+y,B[2]+z);\n t1.getTetraeder()[2].setPoint(C[0]+x,C[1]+y,C[2]+z);\n t1.getTetraeder()[3].setPoint(D[0]+x,D[1]+y,D[2]+z);\n\n redraw();\n }", "@Override\r\n\t\tpublic void translate(Point3D vec) {\r\n\t\t\t// TODO Auto-generated method stub \r\n\t\t\tMyCoords mc= new MyCoords();\r\n\t\t\tPoint3D p=new Point3D(vec);\r\n\t\t\tPoint3D newPoint=mc.add(p, vec);\r\n\t\t\tthis.point=newPoint;\r\n\t\t}", "static Posn translate ( Posn p, double dx, double dy ) {\n\t// return .... ;\n\t// Take stock\n\t// return ... p ... dx ... dy ; // <- We know this from Posn p\n\t// return new Posn ( ... p.x ... p.y ... dx ... dy ); // <- We know this from Posn translate\n\t// return new Posn ( ... p.x ... p.y ... dx ... dy, ... p.x ... p.y ... dx ... dy );\t\n\treturn new Posn ( p.x + dx, p.y + dy );\t\n }", "private String getPoints(){\n\t\tString pu = \" punts.\";\n\t\tif(points == 1){\n\t\t\tpu = \" punt.\";\n\t\t}\n\t\treturn \"Puntuació de \" + points + pu;\n\t}", "Point createPoint();", "public VisuCoordinateTranslator() {\r\n limitedDirections = new HashMap<String, Integer>();\r\n limitedCoordinates = new HashMap<String, Shape>();\r\n limitedGroundCoordinates = new HashMap<String, Float[]>();\r\n Float c[] = {22f, 2f, 8.5f, -1.7f, 0f};\r\n limitedDirections.put(\"Status_GWP01\", 0);\r\n ArrayList a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n StraightShape ss = new StraightShape(a);\r\n limitedCoordinates.put(\"0.1.0\", ss);\r\n\r\n\r\n c = new Float[]{-0.97f, 0.88f, 0f, -0.1f, 1f};\r\n limitedDirections.put(\"Status_ETKa1\", 1);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"1.1.0\", ss);\r\n\r\n limitedDirections.put(\"Status_ETKa2\", 1);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa1\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa2\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n\r\n\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n ArrayList<ArrayList<Float>> arrayOval = new ArrayList<ArrayList<Float>>();\r\n c = new Float[]{6.3f, -2f, 7.3f, -14.38f, 0f};//straight_1\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, -4.8f, 7.3f, -14.38f, 0f};//straight_2\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.072f, 0.0695f, 2.826f, -5.424f, -17.2f, 7.3f, 1f};//circular_3\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-4.8f, -2f, 7.3f, -19.715f, 0f};//straight_4\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, 6.3f, 7.3f, -19.715f, 0f};//straight_5\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.038f, 0.1032f, 2.833f, 6.567f, -17.2f, 7.3f, 1f};//circular_6\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.1302f, 0.0114f, 2.8202f, -2.0298f, -17.2f, 7.3f, 1f};//circular_7\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n \r\n c = new Float[]{0.41f, 0.48f, 0.6f, 0.67f, 0.78f, 0.92f};//partitions\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n\r\n OvalShape os = new OvalShape(arrayOval);\r\n\r\n for (int i = 2; i < 11; i++) {\r\n for (int j = 0; j < 3; j++) {\r\n limitedCoordinates.put(\"1.\" + i + \".\" + j, os);\r\n limitedCoordinates.put(\"2.\" + i + \".\" + j, ss);\r\n }\r\n }\r\n\r\n \r\n \r\n c = new Float[]{2.0785f, -1.8972f};\r\n limitedGroundCoordinates.put(\"0.1.0\", c);\r\n c = new Float[]{-6.3859f,-0.4682f};\r\n limitedGroundCoordinates.put(\"1.1.0\", c);\r\n }", "private void updateTranslated() {\r\n\r\n\tfloat[] dp = new float[3];\r\n\tTools3d.subtract(p, _p, dp);\r\n\r\n\tfor (int i = 0; i < npoints * 3; i+= 3) {\r\n\t // translate by adding the amount local origin has moved by\r\n\t ps[i] += dp[0];\r\n\t ps[i + 1] += dp[1];\r\n\t ps[i + 2] += dp[2];\r\n\t}\r\n\t\r\n\t// reset bounding box and clear dirty flag\r\n\tbox.setBB();\r\n\tdirtyT = false;\r\n\r\n\t// finally\r\n\t_p[0] = p[0];\r\n\t_p[1] = p[1];\r\n\t_p[2] = p[2];\r\n }", "public static Points createEntity() {\n Points points = new Points()\n .date(DEFAULT_DATE)\n .exercise(DEFAULT_EXERCISE)\n .meals(DEFAULT_MEALS)\n .alcohol(DEFAULT_ALCOHOL)\n .notes(DEFAULT_NOTES);\n return points;\n }", "Position_abscisse createPosition_abscisse();", "private void createTransformPoints(Rectangle bnds, GraphicObject curr) {\n double degreesAngle, radiansAngle;\n Rectangle novo = bnds;\n\n this.transformPoints = new VirtualGroup();\n\n degreesAngle = curr.getRotation();\n\n /** If the object is rotated, we need to rotate i back to the angle 0 in order to get valid boundaries. Tatami doesn't rotates the object's bounds, instead it gives wrong bounds so we need to perform this operation and rotate the bounds on our side. */\n if(degreesAngle != 0.0) {\n curr.uRotate((float) (degreesAngle * -1.0));\n novo = curr.getBounds();\n }\n radiansAngle = (degreesAngle * (2.0*Math.PI))/360.0;\n \n addTransformPoint(novo.getCenterX(), novo.getY()+novo.getHeight()+(novo.getHeight()/4), 0, curr, radiansAngle);\n addTransformPoint(novo.getX(), novo.getY(), 1, curr, radiansAngle);\n addTransformPoint(novo.getCenterX(), novo.getY(), 2, curr, radiansAngle);\n addTransformPoint(novo.getX() + novo.getWidth(), novo.getY(), 3, curr, radiansAngle);\n addTransformPoint(novo.getX(), novo.getCenterY(), 4, curr, radiansAngle);\n addTransformPoint(novo.getX() + novo.getWidth(), novo.getCenterY(), 5, curr, radiansAngle);\n addTransformPoint(novo.getX(), novo.getY() + novo.getHeight(), 6, curr, radiansAngle);\n addTransformPoint(novo.getCenterX(), novo.getY() + novo.getHeight(), 7, curr, radiansAngle);\n addTransformPoint(novo.getX() + novo.getWidth(), novo.getY() + novo.getHeight(), 8, curr, radiansAngle);\n\n /** This creates the line between the rotation point and the object */\n Line aux2 = new Line((int)(this.transformPointers[Action.SOUTH].getX()+2), (int)(this.transformPointers[Action.SOUTH].getY()+2), (int)(this.transformPointers[Action.ROTATE].getX()), (int)(this.transformPointers[Action.ROTATE].getY()));\n aux2.setStroke( Color.GRAY, 1);\n this.transformPoints.add(aux2);\n\n this.canvas.add(this.transformPoints, 0, 0);\n\n this.transformPointers[Action.SOUTH].moveToFront();\n this.transformPointers[Action.ROTATE].moveToFront();\n\n if(degreesAngle != 0.0) {\n curr.uRotate((float)degreesAngle);\n }\n }", "public Point2D translatePoint( Figure f, Point2D p, Point2D dir);", "Punto(){\r\n x=0;\r\n y=0;\r\n }", "Position_changerAbscisse createPosition_changerAbscisse();", "private Point transform(Point pt1) {\n Point pt2 = new Point(0,0) ;\n pt2.x = pos.x + new Double(pt1.x*Math.cos(heading)+pt1.y*Math.sin(heading)).intValue() ;\n pt2.y = pos.y + new Double(-pt1.x*Math.sin(heading)+pt1.y*Math.cos(heading)).intValue() ;\n return pt2 ;\n }", "public PointData translate(PointData data) {\n return data;\n }", "static PointDouble translate(PointDouble p, Vec v) {\n return new PointDouble(p.x + v.x , p.y + v.y);\n }", "abstract void translate(double x, double y, double z);", "public Translation() {\n\n this(0, 0, 0);\n }", "public void sauvegarderPointPartie (){\n\t\t\n\t\tint menage = (Integer) pointPartieEnCours.get(THEMES.MENAGE);\n\t\tint maths = (Integer) pointPartieEnCours.get(THEMES.MATHS);\n\t\tint francais = (Integer) pointPartieEnCours.get(THEMES.FRANCAIS);\n\t\t\n\t\tmenage += (Integer) level.get(THEMES.MENAGE);\n\t\tmaths += (Integer) level.get(THEMES.MATHS);\n\t\tfrancais += (Integer) level.get(THEMES.FRANCAIS);\n\t\t\n\t\tlevel.remove(THEMES.MENAGE); \n\t\tlevel.remove(THEMES.MATHS); \n\t\tlevel.remove(THEMES.FRANCAIS); \n\t\t\n\t\t\n\t\tlevel.put(THEMES.MENAGE ,menage); \n\t\tlevel.put(THEMES.MATHS ,maths); \n\t\tlevel.put(THEMES.FRANCAIS ,francais); \n\t\t\n\t}", "SintagmaPreposicional createSintagmaPreposicional();", "Position_ordonnee createPosition_ordonnee();", "public void PerspektivischeProjektion(){\n /**\n * Abrufen der Koordinaten aus den einzelnen\n * Point Objekten des Objekts Tetraeder.\n */\n double[] A = t1.getTetraeder()[0].getPoint();\n double[] B = t1.getTetraeder()[1].getPoint();\n double[] C = t1.getTetraeder()[2].getPoint();\n double[] D = t1.getTetraeder()[3].getPoint();\n\n /*\n * Aufrufen der Methode sortieren\n */\n double[][] sP = cls_berechnen.sortieren(A, B, C, D);\n\n A = sP[0];\n B = sP[1];\n C = sP[2];\n D = sP[3];\n\n /*Wenn alle z Koordinaten gleich sind, ist es kein Tetraeder. */\n if (A[2] == D[2]) {\n System.out.println(\"kein Tetraeder\");\n return;\n }\n\n //Entfernung vom 'Center of projection' zur 'Projectoin plane'\n double d=5;\n\n /*\n * Transformiert x|y|z Koordinaten in x|y Koordinaten\n * mithilfer der perspektivischen Projektion\n */\n\n A[0]=A[0]/((A[2]+d)/d);\n A[1]=A[1]/((A[2]+d)/d);\n B[0]=B[0]/((B[2]+d)/d);\n B[1]=B[1]/((B[2]+d)/d);\n C[0]=C[0]/((C[2]+d)/d);\n C[1]=C[1]/((C[2]+d)/d);\n D[0]=D[0]/((D[2]+d)/d);\n D[1]=D[1]/((D[2]+d)/d);\n\n\n double ax, ay, bx, by, cx, cy, dx, dy;\n ax=A[0];\n ay=A[1];\n bx=B[0];\n by=B[1];\n cx=C[0];\n cy=C[1];\n dx=D[0];\n dy=D[1];\n\n tetraederzeichnen(ax, ay, bx, by, cx, cy, dx, dy);\n }", "public ArrayList<Point> getTranslates(int frame) {\n\t\tArrayList<Point> destination = new ArrayList<Point>();\n\n\t\t// dont draw if doesnt exist at that frame.\n\t\tif (frame > endTime || frame < startTime)\n\t\t\treturn destination;\n\n\t\tfor (Point p : points) {\n\t\t\tPoint dest = null;\n\n\t\t\tfloat f[] = new float[9];\n\t\t\tatList.get(frame - startTime).getValues(f);\n\n\t\t\tdest = new Point();\n\t\t\tdest.x = (int) (p.x + f[2]);\n\t\t\tdest.y = (int) (p.y + f[5]);\n\t\t\tdestination.add(dest);\n\t\t}\n\t\treturn destination;\n\t}", "@Test\r\n\tpublic void testPointToString0() {\r\n\t\tPonto a1 = new Ponto(1.0, 2.5);\r\n\t\tAssert.assertEquals(\"(1.00, 2.50)\", a1.toString());\r\n\r\n\t\tPonto a2 = new Ponto(-2.4, 4.1);\r\n\t\tAssert.assertEquals(\"(-2.40, 4.10)\", a2.toString());\r\n\r\n\t\tPonto a3 = new Ponto(9.3, -1.9);\r\n\t\tAssert.assertEquals(\"(9.30, -1.90)\", a3.toString());\r\n\t}", "public String getPoints();", "private static List<Point> genererPointsAlea(int nbPoints) {\n /*List<Point> points = new ArrayList<>();\n Random rand = new Random(0);\n for(int i=0; i<nbPoints; i++) {\n Point p = new Point(rand.nextDouble(), rand.nextDouble());\n points.add(p);\n }\n return points;*/\n return null;\n }", "public Point translate(int x, int y) {\n return new Point(\n this.x + x,\n this.y + y\n );\n }", "public void translation(Double xMovement,Double yMovement) {\n GPoint tempPoint1=new GPoint((point1.getFirst()+xMovement),\n (point1.getSecond()+yMovement));\n GPoint tempPoint2=new GPoint((point2.getFirst()+xMovement),\n (point2.getSecond()+yMovement));\n point1=tempPoint1;\n point2=tempPoint2;\n }", "public ArrayList<Point> getTranslates(int frame) {\n\t\tArrayList<Point> destination = new ArrayList<Point>();\n\n\t\t// dont draw if doesnt exist at that frame.\n\t\tif (frame > endTime || frame < startTime)\n\t\t\treturn destination;\n\n\t\tfor (Point p : points) {\n\t\t\tPoint dest = null;\n\t\t\tdest = new Point();\n\t\t\tatList.get(frame - startTime).transform(p, dest);\n\t\t\tdestination.add(dest);\n\t\t}\n\t\treturn destination;\n\t}", "Vaisseau_occupeLaPosition createVaisseau_occupeLaPosition();", "public void translate(int x, int y);", "public void translate(Point p){\n a.translate(p);\n b.translate(p);\n c.translate(p);\n }", "private void rotateTransformPoints(double angle) {\n int i;\n for(i=1; i<9;i++) {\n GeoVector vec = new GeoVector(this.transformPointers[i].getX(), this.transformPointers[i].getY(), this.aux_obj.getCenterX(), this.aux_obj.getCenterY());\n vec.rotate(((angle*-1.0) * (2.0*Math.PI))/360);\n vec.addPoint(this.aux_obj.getCenterX(), this.aux_obj.getCenterY());\n this.transformPointers[i].translate( (int)(vec.getX() - this.transformPointers[i].getX()), (int)(vec.getY() - this.transformPointers[i].getY()));\n }\n\n }", "private void updatePointsPosition() {\n\t\tfor (DataFromPointInfo dataFromPointInfo : fromPoints) {\n\t\t\tDataFromPoint fromPoint = dataFromPointInfo.fromPoint;\n\t\t\tfromPoint.setX((int) (getX() + this.getBounds().getWidth()\n\t\t\t\t\t+ HORIZONTAL_OFFSET));\n\t\t\tfromPoint.setY((int) (getY() + this.getRowHeight() / 2\n\t\t\t\t\t+ this.getRowHeight() * dataFromPointInfo.yShift));\n\t\t}\n\t\tfor (DataToPointInfo dataToPointInfo : toPoints) {\n\t\t\tDataToPoint toPoint = dataToPointInfo.toPoint;\n\t\t\ttoPoint.setX((int) (getX() - HORIZONTAL_OFFSET));\n\t\t\ttoPoint.setY((int) (getY() + this.getRowHeight() / 2\n\t\t\t\t\t+ this.getRowHeight() * dataToPointInfo.yShift));\n\t\t}\n\t}", "public static Transform newTranslation(float tx, float ty, float tz){\n return new Transform(new float[][]{{1.0f, 0.0f, 0.0f, tx},\n {0.0f, 1.0f, 0.0f, ty},\n {0.0f, 0.0f, 1.0f, tz},\n {0.0f, 0.0f, 0.0f, 1.0f}\n });\n }", "public TrazoLibre(Point2D punto) {\n this.linea = new ArrayList();\n this.linea.add(punto);\n }", "public void setPoints(String points);", "public Point translate(int dX, int dY) {\n\t\tint translatedX = x + dX;\n\t\tint translatedY = y + dY;\n\t\treturn new Point(translatedX, translatedY);\n\t}", "public static String process() {\n\n\t\tSet<Point> myPoint;\n\t\tSet<Point> oppPoint;\n\t\t\n\t\tint oppenentID = (myID == 0? 1: 0);\n\t\t\n\t\tif (map.containsKey(myID)) {\n\t\t\tmyPoint = map.get(myID);\n\t\t}else\n\t\t{\n\t\t\tmyPoint = new TreeSet<Point>();\n\t\t}\n\t\tif (map.containsKey(oppenentID)) {\n\t\t\toppPoint = map.get(oppenentID);\n\t\t}else\n\t\t{\n\t\t\toppPoint = new TreeSet<Point>();\n\t\t}\n\t\t\n\t\tPoint decdesion = strategy.choosePoint(myPoint, oppPoint, 1000, 1000);\n\t\tmyPoint.add(decdesion);\n\t\tmap.put(myID, myPoint);\n\t\t\n\t\treturn decdesion.x + \" \" + decdesion.y;\n\t\t\n\t}", "private static List<Point> createConvergingDataset() {\r\n List<Point> data = new ArrayList<Point>();\r\n add(data, 1, 400);\r\n add(data, 5, 700);\r\n add(data, 10, 900);\r\n add(data, 15, 1000);\r\n add(data, 20, 1050);\r\n add(data, 25, 1060);\r\n add(data, 30, 1062);\r\n return data;\r\n }", "public synchronized void transform() {\n Iterator<String> it = entity_to_wxy.keySet().iterator();\n while (it.hasNext()) {\n String entity = it.next();\n double wx = entity_to_wxy.get(entity).getX(),\n wy = entity_to_wxy.get(entity).getY();\n int sx, sy;\n entity_to_sxy.put(entity, (sx = wxToSx(wx)) + BundlesDT.DELIM + (sy = wyToSy(wy)));\n entity_to_sx.put(entity, sx); entity_to_sy.put(entity, sy);\n }\n transform_id++;\n }", "public Ponto(int x, int y){\n this.x = x;\n this.y = y;\n }", "public MyPoint1 (double x, double y) {}", "public final Shape translate(Vector fromPoint, Vector toPoint) {\n\t\treturn transform(new Translation(fromPoint, toPoint));\n\t}", "public void translate(float x, float y);", "public void tetraederzeichnen(double ax,double ay,double bx,double by,double cx,double cy,double dx,double dy){\n double[][] arr_koordinaten_2d ={{ax,ay},{bx,by},{cx,cy},{dx,dy}};\n /**\n * Aufruf der Methode gestricheltodernicht\n *\n * Überprüft, welche Strecken von Punkt D sichtbar sind oder nicht.\n */\n\n boolean[] strichelnodernicht = cls_berechnen.gestricheltodernicht(arr_koordinaten_2d);\n\n /**Skaliert die Koordinaten zum Pixelformat mit Koordinatenursprung\n * ca in der Mitte der Zeichenfläche*/\n int sw=9; //skalierungswert\n ax= (sw+ax)*50;\n ay=(sw-ay)*50;\n bx= (sw+bx)*50;\n by=(sw-by)*50;\n cx= (sw+cx)*50;\n cy=(sw-cy)*50;\n dx= (sw+dx)*50;\n dy=(sw-dy)*50;\n\n /**\n * Erstellt Linienobjekte für die Kanten des Tetraeder Objekts...\n */\n Line line1 = new Line();\n Line line2 = new Line();\n Line line3 = new Line();\n Line line4 = new Line();\n Line line5 = new Line();\n Line line6 = new Line();\n\n /**\n * ... weißt ihnen die Koordinaten zu...\n */\n line1.setStartX(ax);\n line1.setStartY(ay);\n line1.setEndX(bx);\n line1.setEndY(by);\n\n line2.setStartX(ax);\n line2.setStartY(ay);\n line2.setEndX(cx);\n line2.setEndY(cy);\n\n line3.setStartX(bx);\n line3.setStartY(by);\n line3.setEndX(cx);\n line3.setEndY(cy);\n \n line4.setStartX(dx);\n line4.setStartY(dy);\n line4.setEndX(ax);\n line4.setEndY(ay);\n\n line5.setStartX(dx);\n line5.setStartY(dy);\n line5.setEndX(bx);\n line5.setEndY(by);\n\n line6.setStartX(dx);\n line6.setStartY(dy);\n line6.setEndX(cx);\n line6.setEndY(cy);\n \n if(!strichelnodernicht[0]){\n line4.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[1]){\n line5.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[2]){\n line6.getStrokeDashArray().addAll(5d,5d);}\n\n /**\n * ... und fügt die Linien Objekte der Zeichenfläche hinzu\n */\n canvaspane.getChildren().add(line1);\n canvaspane.getChildren().add(line2);\n canvaspane.getChildren().add(line3);\n canvaspane.getChildren().add(line4);\n canvaspane.getChildren().add(line5);\n canvaspane.getChildren().add(line6);\n\n //zeichnet den Koordinatenursprung neu\n canvaspane.getChildren().add(l1);\n canvaspane.getChildren().add(l2);\n }", "void newRoutePoint(RoutePointDTO routePointDTO, RouteDTO routeDTO, List<RoutePointDTO> points);", "public static native GPolyline create(JavaScriptObject points)/*-{\r\n\t\treturn new $wnd.GPolyline(points);\r\n\t}-*/;", "void drawMyPoint(double x, double y, MapContent map, String nombre) { \n// SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();\n// builder.setName(\"MyFeatureType\");\n// builder.setCRS( DefaultGeographicCRS.WGS84 ); // set crs \n// builder.add(\"location\", Point.class); // add geometry\n//\n// // build the type\n// SimpleFeatureType TYPE = builder.buildFeatureType();\n//\n// // create features using the type defined\n// SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(TYPE);\n// org.locationtech.jts.geom.GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();\n// org.locationtech.jts.geom.Point point = geometryFactory.createPoint(new Coordinate(x, y));\n// //\n// \n// //\n// featureBuilder.add(point);\n// SimpleFeature feature = featureBuilder.buildFeature(\"FeaturePoint\");\n// DefaultFeatureCollection featureCollection = new DefaultFeatureCollection(\"internal\", TYPE);\n// featureCollection.add(feature); // Add feature 1, 2, 3, etc\n//\n// Style style = SLD.createPointStyle(\"Star\", Color.BLUE, Color.BLUE, 0.3f, 200);\n// Layer layer = new FeatureLayer(featureCollection, style);\n// layer.setTitle(\"NewPointLayer\");\n// map.addLayer(layer);\n// //mapFrame.getMapPane().repaint();// MapPane.repaint();\n//}\n\tSimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();\n builder.setName(\"MyFeatureType\"); // \n builder.setCRS( DefaultGeographicCRS.WGS84 ); // set crs // Definimos las caracteristicas de tipo del punto q vamos a crear\n builder.add(\"location\", Point.class); // add geometry //\n org.locationtech.jts.geom.GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(); //objeto q usaremos para crear el punto\n Coordinate coord = new Coordinate( x,y ); //creamos la coordenada con los puntos pasados como parametros\n org.locationtech.jts.geom.Point point = geometryFactory.createPoint(coord); // Creamos el punto geometrico\n\nSimpleFeatureType pointtype = null; //definimos el typo de punto que necesitamos apra agregarlo a la capa del mapa\n try {\n pointtype = DataUtilities.createType(\"POINT\", \"geom:Point,name:String\");\n } catch (SchemaException ex) {\n Logger.getLogger(SelectionLab.class.getName()).log(Level.SEVERE, null, ex);\n }\nSimpleFeatureBuilder featureBuilderPoints = new SimpleFeatureBuilder(pointtype); //creamos el constructor de lo que agregaremos\nDefaultFeatureCollection collectionPoints = new DefaultFeatureCollection(\"internal\", pointtype); //creamos el contenedor donde pondremos lo que agregaremos\n//PointString Point=builder.createPointString(Point);\n//LineString Point = builder.createLineString(Point);\nfeatureBuilderPoints.add(point); //agregamos el punto en el constructor\nSimpleFeature featureLine = featureBuilderPoints.buildFeature(null); \n((DefaultFeatureCollection)collectionPoints).add(featureLine); \nStyle PointStyle = SLD.createPointStyle(\"circle\", Color.RED, Color.RED,(float) 0.5,(float) 10); //definimos el estilo del punto (icono, color contorno, color, opacidad y tamaño)\n//Obserervacion: el dibujo del punto siempre se mantiene del mismo tamaño por mas que se use el zoom\nmap.addLayer(new FeatureLayer(collectionPoints, PointStyle)); //agregamos el punto a la capa\n\nguardarCoordenadas(nombre,x,y);\n}", "public EuclideanTrajectoryPointMessage()\n {\n }", "public void addPoints(List<Point2D> points);", "public ColinearTrioV2(Point[] thePoints) {\n\t\t myPoints = thePoints;\n\t\t myPairs = new ArrayList<PointPair>();\n\t\t map = new HashMap<>(thePoints.length);\n\t\t SIZE_OF_ORIGINAL_LIST = thePoints.length; // just a pointer to the original list.\n\t\t start();\n\t}", "private Point toInnerPoint(Point punto){\r\n \treturn punto.add(-coord.X(), -coord.Y());\r\n// return new Point(punto.getRow() - coord.getRow(), punto.getCol() - coord.getCol());\r\n }", "public final Shape getTranslated(Vector fromPoint, Vector toPoint) {\n\t\treturn getCopy().translate(fromPoint, toPoint);\n\t}", "void turnToPoint(float x, float y) {\n _rotVector.set(x - _x, y - _y, 0);\n _rotVector.setMag(1);\n }", "private void drawWaypoints() {\r\n\t\tint x1 = (width - SIZE_X) / 2;\r\n\t\tint y1 = (height - SIZE_Y) / 2;\r\n\r\n\t\tfloat scissorFactor = (float) _resolutionResolver.getScaleFactor() / 2.0f;\r\n\r\n\t\tint glLeft = (int) ((x1 + 10) * 2.0f * scissorFactor);\r\n\t\tint glWidth = (int) ((SIZE_X - (10 + 25)) * 2.0f * scissorFactor);\r\n\t\tint gluBottom = (int) ((this.height - y1 - SIZE_Y) * 2.0f * scissorFactor);\r\n\t\tint glHeight = (int) ((SIZE_Y) * 2.0f * scissorFactor);\r\n\r\n\t\tGL11.glEnable(GL11.GL_SCISSOR_TEST);\r\n\t\tGL11.glScissor(glLeft, gluBottom, glWidth, glHeight);\r\n\r\n\t\tGL11.glPushMatrix();\r\n\t\tGL11.glScalef(_textScale, _textScale, _textScale);\r\n\r\n\t\t_startCell = getStartCell();\r\n\t\t_cellStartX = (int) (((float) x1 + (float) 13) / _textScale);\r\n\t\t_cellStartY = (int) (((float) y1 + (float) 22) / _textScale);\r\n\r\n\t\tint x2 = _cellStartX;\r\n\t\tint y2 = _cellStartY + (int) ((float) 0 * (float) CELL_SIZE_Y / _textScale);\r\n\r\n\t\tImmutableList<UltraTeleportWaypoint> list = UltraTeleportWaypoint.getWaypoints();\r\n\t\tfor (int i = 0; i < 2; ++i) {\r\n \t\tfor (int j = 0; j < list.size() && j < MAX_CELL_COUNT; ++j) {\r\n\r\n \t\t\tint x = _cellStartX;\r\n \t\t\tint y = _cellStartY + (int) ((float) j * (float) CELL_SIZE_Y / _textScale);\r\n\r\n \t\t\tdouble posX = list.get(j + _startCell).getPos().getX();\r\n \t\t\tdouble posY = list.get(j + _startCell).getPos().getY();\r\n \t\t\tdouble posZ = list.get(j + _startCell).getPos().getZ();\r\n\r\n \t\t\tString strX = String.format(\"x: %4.1f\", posX);\r\n \t\t\tString strY = String.format(\"y: %4.1f\", posY);\r\n \t\t\tString strZ = String.format(\"z: %4.1f\", posZ);\r\n \t\t\tString text = strX + \" \" + strY + \" \" + strZ;\r\n\r\n \t\t\tif (i == 0) {\r\n \t\t\t this.fontRendererObj.drawStringWithShadow(text, x + 18, y, list.get(j).getColor());\r\n\r\n \t\t\t boolean selected = j + _startCell < _selectedList.size() ? _selectedList.get(j + _startCell) : false;\r\n\r\n \t\t\t GL11.glPushMatrix();\r\n GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);\r\n \t\t\t this.mc.renderEngine.bindTexture(selected ? BUTTON_ON_RESOURCE : BUTTON_OFF_RESOURCE);\r\n \t\t\t HubbyUtils.drawTexturedRectHelper(0, x + CELL_SIZE_X + 18, y - 3, 16, 16, 0, 0, 256, 256);\r\n \t\t\t GL11.glPopMatrix();\r\n \t\t\t}\r\n \t\t\telse if (i == 1) {\r\n \t\t\t\tBlockPos pos = new BlockPos((int)posX, (int)posY - 1, (int)posZ);\r\n \t\t\t Block block = Minecraft.getMinecraft().theWorld.getBlockState(pos).getBlock();\r\n \t\t\tif (block != null) {\r\n \t\t\t Item itemToRender = Item.getItemFromBlock(block);\r\n \t\t\t itemToRender = itemToRender != null ? itemToRender : Item.getItemFromBlock((Block)Block.blockRegistry.getObjectById(3));\r\n \t\t\t ItemStack is = new ItemStack(itemToRender, 1, 0);\r\n \t\t\t _itemRender.renderItemAndEffectIntoGUI(is, x - 1, y - 3);\r\n \t _itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, is, x - 1, y - 3, \"\"); // TODO: is the last param correct?\r\n \t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t}\r\n\r\n\t\tGL11.glPopMatrix();\r\n\t\tGL11.glDisable(GL11.GL_SCISSOR_TEST);\r\n\t}", "public void makePoint(String x, String y) {\n List<String> decX = putDecimal(x);\n List<String> decY = putDecimal(y);\n\n //for every string value x check if its valid, if it is, find a valid y coordinate\n for (String dx : decX) {\n if (isValid(dx)) {\n for (String dy : decY) {\n if (isValid(dy)) {\n coordinates.add(\"(\" + dx + \", \" + dy + \")\");\n }\n }\n }\n }\n }", "@Override\n public void affiche(){\n System.out.println(\"Loup : \\n points de vie : \"+this.ptVie+\"\\n pourcentage d'attaque : \"+this.pourcentageAtt+\n \"\\n dégâts d'attaque : \"+this.degAtt+\"\\n pourcentage de parade :\"+this.pourcentagePar+\n \"\\n position : \"+this.pos.toString());\n\n }", "public Point transform(double x, double y, double z) {\n\t\t\n\t\n\t\tdouble uIso = (x * xToU) + (y * yToU) + (z * zToU);\n\t\tdouble vIso = (x * xToV) + (y * yToV) + (z * zToV);\n\t\t\n\t\tint uDraw = xOffset + (int)(scale * uIso);\n\t\tint vDraw = yOffset + (int)(scale * vIso);\n\t\t\n\t\treturn new Point(uDraw, vDraw);\n\t}", "public Joueur(int id, int pa)\r\n/* */ {\r\n/* 34 */ this.id_joueur = id;\r\n/* 35 */ this.points_action = pa;\r\n/* */ }", "public Vector3f getPoint(float t) {\r\n\t\tVector3f point = new Vector3f();\r\n\t\tpoint.scaleAdd(t, mDirection, mOrigin);\r\n\t\treturn point;\r\n\t}", "Position createPosition();", "public Titik(){\r\n this.x = 0;\r\n this.y = 0;\r\n }", "SpaceInvaderTest_test_unNouveauVaisseauEstCorrectementPositionneDansEspaceJeu createSpaceInvaderTest_test_unNouveauVaisseauEstCorrectementPositionneDansEspaceJeu();", "private Point translatePoint(Point start, double angle, double distance) {\n\t\tif (distance==0)\n\t\t\treturn start;\n\t\tangle = angle*0.0174532778; //Convert to radians = pi/180\n\t\tPoint p = new Point(start.x+distance*Math.sin(angle), start.y-distance*Math.cos(angle) );\n\t\treturn p;\n\t}", "public String getCoordsForLP() {\n String x = coords[0] < 0 ? \"neg\" + Math.abs(coords[0]) :\n Integer.toString(Math.abs(coords[0]));\n String y = coords[1] < 0 ? \"neg\" + Math.abs(coords[1]) :\n Integer.toString(Math.abs(coords[1]));\n return x + \"_\" + y;\n }", "public TrazoLibre(Point2D punto, Atributo atributo) {\n this.linea = new ArrayList();\n this.linea.add(punto);\n }", "Points(String filepath){\n readPointsFile(filepath); //dengan file points.txt\n }", "void addTextureCoordinate(Vector t);", "public List<Point> generatePointList(){\r\n\t\t//Can move up to 3 squares horizontally or vertically, but cannot move diagonally.\r\n List<Point> pointList = new ArrayList<>();\r\n int pointCount = 0;\r\n int px = (int)getCoordinate().getX();\r\n int py = (int)getCoordinate().getY();\r\n\r\n for (int i=px-3;i<=px+3;i++){\r\n for(int j=py-3;j<=py+3;j++){\r\n if((i>=0) && (i<9) && (j>=0) && (j<9) && ((i!=px)||(j!=py))){\r\n if ((i==px)||(j==py)){\r\n pointList.add(pointCount, new Point(i,j));\r\n pointCount+=1;\r\n } \r\n }\r\n }\r\n }\r\n return pointList;\r\n }", "public static vtkPoints createPoints(float[] points)\n\t{\n\t\tvtkPoints vtkPoints = new vtkPoints();\n\t\tvtkFloatArray d = new vtkFloatArray();\n\t\td.SetJavaArray(points);\n\t\td.SetNumberOfComponents(3);\n\t\tvtkPoints.SetData(d);\n\t\tdelete(d);\n\t\treturn vtkPoints;\n\t}", "public VariablePoint2(){\n super(0, 0);\n x = 0;\n y = 0;\n }", "private void readPoints(List<Element> pointElements, Model model)\n throws ObjectExistsException {\n // Add the points.\n for (int i = 0; i < pointElements.size(); i++) {\n Element curPointElement = pointElements.get(i);\n String attrVal;\n Integer pointID;\n try {\n pointID = Integer.valueOf(curPointElement.getAttributeValue(\"id\"));\n }\n catch (NumberFormatException e) {\n pointID = null;\n }\n Point curPoint = model.createPoint(pointID);\n TCSObjectReference<Point> pointRef = curPoint.getReference();\n String pointName = curPointElement.getAttributeValue(\"name\");\n if (pointName == null || pointName.isEmpty()) {\n pointName = \"PointName\" + i + \"Unknown\";\n }\n model.getObjectPool().renameObject(pointRef, pointName);\n Triple position = new Triple();\n attrVal = curPointElement.getAttributeValue(\"xPosition\");\n if (attrVal != null) {\n position.setX(Long.parseLong(attrVal));\n }\n attrVal = curPointElement.getAttributeValue(\"yPosition\");\n if (attrVal != null) {\n position.setY(Long.parseLong(attrVal));\n }\n attrVal = curPointElement.getAttributeValue(\"zPosition\");\n if (attrVal != null) {\n position.setZ(Long.parseLong(attrVal));\n }\n model.setPointPosition(pointRef, position);\n attrVal = curPointElement.getAttributeValue(\"vehicleOrientationAngle\");\n if (attrVal != null) {\n model.setPointVehicleOrientationAngle(pointRef,\n Double.parseDouble(attrVal));\n }\n Point.Type pType\n = Point.Type.valueOf(curPointElement.getAttributeValue(\"type\"));\n model.setPointType(pointRef, pType);\n List<Element> pointProps = curPointElement.getChildren(\"property\");\n for (int j = 0; j < pointProps.size(); j++) {\n Element curPointPropElement = pointProps.get(j);\n String propName = curPointPropElement.getAttributeValue(\"name\");\n if (propName == null || propName.isEmpty()) {\n propName = \"Property\" + j + \"Unknown\";\n }\n String propValue = curPointPropElement.getAttributeValue(\"value\");\n if (propValue == null || propValue.isEmpty()) {\n propValue = \"Value\" + j + \"Unknown\";\n }\n model.getObjectPool().setObjectProperty(pointRef, propName,\n propValue);\n }\n }\n }", "Point(int x_, int y_){\n x = x_;\n y = y_;\n }", "@Override\t\t\t\n\tpublic final myPointf transformPoint(myPointf A, int transformIDX, float t) {\treturn trans[transformIDX].transformPoint(A, t);}", "@Test\n public void testTransect() throws GeoTessException {\n\n double dist = Math.toRadians(60);\n double azimuth = Math.toRadians(10);\n double[] vertex1 = posLinear.getModel().getGrid().getVertex(1);\n\n //System.out.println(GeoTessUtils.getLatLonString(vertex1)); System.out.println();\n\n double[] start = GeoTessUtils.move(vertex1, dist / 2., Math.PI + azimuth);\n double[] end = GeoTessUtils.move(vertex1, dist / 2., azimuth);\n\n // build the transect data structures and populate the point positions.\n int npoints = 51;\n GreatCircle gc = new GreatCircle(start, end);\n ArrayList<double[]> points = gc.getPoints(npoints, false);\n points.set(npoints / 2, vertex1);\n\n double[] distance = new double[npoints];\n double[] valuesLinear = new double[npoints];\n double[] valuesNN = new double[npoints];\n\n for (int i = 0; i < npoints; ++i) {\n distance[i] = GeoTessUtils.angleDegrees(vertex1, points.get(i));\n if (i < npoints / 2) {\n distance[i] *= -1.;\n }\n valuesLinear[i] = 1. / posLinear.set(4, points.get(i), 1e4).getValue(0);\n }\n\n int nloops = 1; // 100000;\n posNN.set(4, points.get(0), 1e4);\n\n long timer = System.currentTimeMillis();\n for (int n = 0; n < nloops; ++n) {\n for (int i = 0; i < npoints; ++i) {\n valuesNN[i] = 1. / posNN.set(4, points.get(i), 1e4).getValue(0);\n }\n }\n timer = System.currentTimeMillis() - timer;\n //System.out.println(\"cpuTime = \"+timer);\n\n//\t\tfor (int i=0; i<npoints; ++i) System.out.printf(\"%12.6f %12.6f %12.6f%n\", \n//\t\t\t\t//GeoTessUtils.getLatLonString(points.get(i)),\n//\t\t\t\tdistance[i], valuesLinear[i], valuesNN[i]);\n//\t\t\n//\t\tfor (int i=0; i<npoints; ++i) System.out.printf(\"%1.6f, \", distance[i]);\n//\t\tSystem.out.println();\n//\t\tfor (int i=0; i<npoints; ++i) System.out.printf(\"%1.6f, \", valuesLinear[i]);\n//\t\tSystem.out.println();\n//\t\tfor (int i=0; i<npoints; ++i) System.out.printf(\"%1.6f, \", valuesNN[i]);\n//\t\tSystem.out.println();\n\n double[] expDistance = new double[]{-30.000000, -28.800000,\n -27.600000, -26.400000, -25.200000, -24.000000, -22.800000,\n -21.600000, -20.400000, -19.200000, -18.000000, -16.800000,\n -15.600000, -14.400000, -13.200000, -12.000000, -10.800000,\n -9.600000, -8.400000, -7.200000, -6.000000, -4.800000,\n -3.600000, -2.400000, -1.200000, 0.000001, 1.200000, 2.400000,\n 3.600000, 4.800000, 6.000000, 7.200000, 8.400000, 9.600000,\n 10.800000, 12.000000, 13.200000, 14.400000, 15.600000,\n 16.800000, 18.000000, 19.200000, 20.400000, 21.600000,\n 22.800000, 24.000000, 25.200000, 26.400000, 27.600000,\n 28.800000, 30.000000};\n double[] expLinear = new double[]{8.040000, 8.040000, 8.040000,\n 8.040000, 8.040000, 8.040000, 8.040000, 8.040000, 8.040000,\n 8.040000, 8.040000, 8.040000, 8.040000, 8.040000, 8.040000,\n 8.040000, 8.040000, 8.054137, 8.071930, 8.089795, 8.107838,\n 8.126071, 8.144387, 8.162803, 8.181334, 8.200000, 8.168896,\n 8.138100, 8.107579, 8.077304, 8.047246, 8.018002, 8.002167,\n 8.002729, 8.005888, 8.009046, 8.012206, 8.016119, 8.035189,\n 8.054353, 8.078359, 8.105569, 8.132947, 8.160519, 8.143446,\n 8.120925, 8.098519, 8.083079, 8.078281, 8.073490, 8.089623};\n double[] expNN = new double[]{8.040000, 8.040000, 8.040000, 8.040000,\n 8.040000, 8.040000, 8.040000, 8.040000, 8.040000, 8.040000,\n 8.040000, 8.040000, 8.040000, 8.040000, 8.040000, 8.041202,\n 8.048167, 8.058878, 8.072557, 8.089860, 8.107915, 8.126098,\n 8.143861, 8.161247, 8.179631, 8.200000, 8.162554, 8.129212,\n 8.099322, 8.072501, 8.048067, 8.023506, 8.006961, 8.004099,\n 8.005888, 8.010183, 8.016907, 8.026038, 8.038366, 8.056879,\n 8.080395, 8.104321, 8.120821, 8.128538, 8.127940, 8.118928,\n 8.103649, 8.089243, 8.080988, 8.085650, 8.097606};\n\n for (int i = 0; i < npoints; ++i) {\n assertEquals(expDistance[i], distance[i], 1e-6);\n }\n\n for (int i = 0; i < npoints; ++i) {\n assertEquals(expLinear[i], valuesLinear[i], 1e-6);\n }\n\n for (int i = 0; i < npoints; ++i) {\n assertEquals(expNN[i], valuesNN[i], 1e-6);\n }\n }", "public Exo2_Editeurpolylignes() {\n valeur_maximum = 5;\n initComponents();\n Tools.windowsInit(this);\n Tools.setIcone(\"./src/Icones/Icone_Lines.bmp\", this);\n this.setTitle(\"Editeur de poly-Lignes\");\n etat = Etat.Init;\n //rien\n initNombrePoints();\n\n }", "Viewpoint createViewpoint();", "public static Transform newTranslation(Vec3 tr){\n return newTranslation(tr.x, tr.y, tr.z);\n }", "Coordinate createCoordinate();", "public Torretta1(int danno, int x, int y, ArrayList<Proiettile> proiettili) {\r\n super();\r\n velocitàAttacco = 5000;\r\n attacco = danno;\r\n this.proiettili = proiettili;\r\n this.x = x * 40;\r\n this.y = y * 40 - 40;\r\n range = new Ellipse2D.Double();\r\n range.setFrame(this.x - 40, this.y - 40, 119, 119);\r\n temposparo = 200;\r\n finestrasparo = 0;\r\n costoAcquisto = 10;\r\n tipo='a';\r\n }", "private void definePoints(){\n defineLinePoints(x1, y1, x2, y2);\n defineLinePoints(x1,y1, x3, y3);\n defineLinePoints(x2,y2, x3, y3);\n }", "public void setPoints(int points) {\n this.points = points;\n }", "public void initSpawnPoints() {\n this.spawnPointList = new ArrayList<Node>();\n \n //Player spawn point location (5,0,47) In Ready Room\n this.addSpawnPoint(5.5f,0,47.5f,90, true);\n //Mob spawn point location (16,0,47) In Zone 2\n this.addSpawnPoint(16.5f, 0, 47.5f, 270, false); \n //Mob spawn point location (21,0,43)\n this.addSpawnPoint(21.5f, 0, 43.5f, 0,false);\n \n //Mob spawners in Zone 3\n this.addSpawnPoint(17.5f, 0, 37.5f, 90, false);\n this.addSpawnPoint(29.5f, 0, 37.5f, 90, false);\n this.addSpawnPoint(17.5f, 0, 29.5f, 270, false);\n \n //Mob spawners in Zone 4\n this.addSpawnPoint(12.5f, 0, 29.5f, 90, false);\n this.addSpawnPoint(6.5f, 0, 20.5f, 0, false);\n \n //Mob spawners in Zone 5\n this.addSpawnPoint(9.5f, 0, 6.5f, 0, false);\n this.addSpawnPoint(17.5f, 0, 6.5f, 0, false);\n this.addSpawnPoint(24.5f, 0, 8.5f, 270, false);\n this.addSpawnPoint(24.5f, 0, 11.5f, 270, false);\n this.addSpawnPoint(24.5f, 0, 14.5f, 270, false);\n }", "public void aggiornaPropulsori(){\n xPropulsore1=new int[]{xCord[0],xCord[0]};\n yPropulsore1=new int[]{yCord[0],yCord[0]+15}; \n xPropulsore2=new int[]{xCord[2],xCord[2]}; \n yPropulsore2=new int[]{yCord[2],yCord[2]+15};\n \n }", "public abstract List<Point2D> getInterpolatedPoints();", "@FXML\r\n private void addPointsEn() {\r\n if (diffPoint > 0) {\r\n int f1 = Integer.parseInt(engineering.getText());\r\n int f2 = f1 + 1;\r\n engineering.setText(String.valueOf(f2));\r\n diffPoint--;\r\n point.setText(\"You have \" + diffPoint + \" points\");\r\n }\r\n }", "public static GeoPoint transformPyLonlat(String points){\n\t\tString getUrl = MAP_URL+\"&latlon=\"+points;\n\t//\t//System.out.println(getUrl);\n\t\ttry {\n\t\t\tString resultjson = HttpUtil.sendGet(getUrl);\n\t\t if(resultjson==null||resultjson.equals(\"\")){\n\t\t \treturn null;\n\t\t }\n\t\t \n\t\t\tJSONObject jsonobj = JSONObject.parseObject(resultjson).getJSONObject(\"result\");\n\t\t\tJSONObject jsonmessage = JSONObject.parseObject(jsonobj.toString()).getJSONObject(\"pois\");\n\t\t\tJSONObject item =JSONObject.parseObject(jsonmessage.toString()).getJSONObject(\"item\");\n\t\t\tfloat lon = item.getFloatValue(\"lon\");\n\t\t\tfloat lan = item.getFloatValue(\"lat\");\n\t\t\treturn new GeoPoint(lan,lon);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public CoordenadasDTO asignarCoordenadas(){\n logger.debug(\"MensajeService::asignarCoordenadas()\");\n CoordenadasDTO coordenadas = new CoordenadasDTO();\n try {\n if(listaNave != null && !listaNave.isEmpty()){\n double posicion [][] = new double [listaNave.size()][];\n double distances[] = obtenerDistancias(listaNave);\n for(int i = 0; i<listaNave.size(); i++){\n switch (listaNave.get(i).getName()){\n case \"kenobi\":\n posicion[i] = posiciones[0];\n break;\n\n case \"skywalker\":\n posicion[i] = posiciones[1];\n break;\n\n case \"solo\":\n posicion[i] = posiciones[2];\n break;\n }\n }\n NonLinearLeastSquaresSolver trilateracion = new NonLinearLeastSquaresSolver(new TrilaterationFunction(posicion, distances), new LevenbergMarquardtOptimizer());\n LeastSquaresOptimizer.Optimum optimum = trilateracion.solve();\n double centroid[] = optimum.getPoint().toArray();\n coordenadas.setY(centroid[1]);\n coordenadas.setX(centroid[0]);\n }\n } catch (Exception e){\n\n }\n return coordenadas;\n }", "private Map<String, Integer> getPuntuation(List<Point> points, Trial trial){\n\t\t//Resultados de la prueba sin dividir por categorias\n\t\tList<Result> results = trial.getResults();\n\t\t//ordenar los resultados de la prueba por segundos\n\t\tresults.sort((a,b) -> a.getSeconds() < b.getSeconds() ? -1 : a.getSeconds() == b.getSeconds() ? 0 : 1);\n\t\t\n\t\treturn setPuntuation(points, results);\n\t}", "public PointSET() {\n points = new SET<Point2D>();\n }", "@Override\r\n\tprotected AffineTransform getPointTransformation() {\n\t\treturn null;\r\n\t}", "@Override\n public int getPoints(){\n\n }", "@Override\n public CoordenadasDTO asignarCoordenadasNave(List<NaveDTO> naveDTOS){\n logger.debug(\"MensajeService::asignarCoordenadasNave()\");\n CoordenadasDTO posiciones = new CoordenadasDTO();\n double posicion [][] = new double [][] {{-500.00 , 200.00}, {100.00, -100.00}, {500.00, 100.00}};\n double distances[] = obtenerDistancias(naveDTOS);\n try {\n NonLinearLeastSquaresSolver trilateracion = new NonLinearLeastSquaresSolver(new TrilaterationFunction(posicion, distances), new LevenbergMarquardtOptimizer());\n LeastSquaresOptimizer.Optimum optimum = trilateracion.solve();\n double centroid[] = optimum.getPoint().toArray();\n posiciones.setY(centroid[1]);\n posiciones.setX(centroid[0]);\n\n } catch (Exception e){\n }\n return posiciones;\n }", "@Override\n public void translate(double x, double y, double z) {\n GL11.glTranslated(x, y, z);\n }", "private void addPoint(View view) {\n\n if( null == imgNode1 || null == imgNode2)\n {\n\n Toast.makeText(MainActivity.this, \"Scan the references\", Toast.LENGTH_SHORT).show();\n return;\n\n }\n\n Toast.makeText(MainActivity.this, \"Added point\", Toast.LENGTH_SHORT).show();\n\n\n\n Node n1 = new Node();\n n1.setRenderable(model);\n\n\n n1.setWorldPosition(new Vector3(0,0,0));\n arSceneView.getScene().addChild(n1);\n\n Description p = new Description();\n p.setNode(n1);\n //The position of the new point is the difference between point reference and marker position. This helps to update the position whether the origin marker is changed\n p.setPos(Vector3.subtract(mov2imgNode,imgNode1.getWorldPosition()));\n listElements.add(p);\n if(listElements.size()>1) {\n Description last = listElements.get(listElements.size()-1);\n Vector3 ori = imgNode1.getWorldPosition();\n Description penultimate = listElements.get(listElements.size()-2);\n last.setBefore_pos(penultimate.getPos());\n last.setDistance(distanceTwoPoints(Vector3.add(ori, last.getPos()), Vector3.add(ori, penultimate.getPos())));\n last.setDir(directionTwoPoints(Vector3.add(ori, penultimate.getPos()), Vector3.add(ori, last.getPos())));\n drawLine(Vector3.add(ori, penultimate.getPos()), Vector3.add(ori, last.getPos()), last.getNode());\n ViewRenderable.builder().setSizer(new DpToMetersViewSizer(this.labelsSize))\n .setView(arSceneView.getContext(), R.layout.controls)\n .build()\n .thenAccept(viewRenderable -> addNodeToScene( last.getNode(),viewRenderable,last.getDistance()))\n .exceptionally(throwable -> {\n Toast.makeText(arSceneView.getContext(), \"Error:\" + throwable.getMessage(), Toast.LENGTH_LONG).show();\n return null;\n }\n\n );\n }\n }", "private void defineLinePoints(int x1, int y1,int x2,int y2){\n Line line1 = new Line(x1, y1, x2, y2);\n for(int i = 0; i < line1.points.size(); i++){\n super.points.add(line1.points.get(i));\n }\n }" ]
[ "0.6462968", "0.6332243", "0.6309131", "0.6165951", "0.6132393", "0.61318505", "0.610002", "0.5967395", "0.59541655", "0.593472", "0.59307015", "0.5819674", "0.5798564", "0.5795094", "0.57531804", "0.57340384", "0.5681981", "0.5669415", "0.5656776", "0.56555957", "0.5654861", "0.56411475", "0.5614185", "0.5609268", "0.5603911", "0.5595788", "0.5594089", "0.5574753", "0.55719787", "0.5490631", "0.5483558", "0.54829395", "0.5428114", "0.5421071", "0.5419945", "0.54179573", "0.5402832", "0.53983146", "0.53539413", "0.5349858", "0.53406024", "0.533445", "0.53068", "0.53067094", "0.5305422", "0.5298929", "0.52970517", "0.52954984", "0.5294925", "0.5290331", "0.52871174", "0.5284116", "0.5278975", "0.52763206", "0.5275483", "0.5267682", "0.5266564", "0.5266533", "0.52638215", "0.5262555", "0.526118", "0.5256482", "0.5255327", "0.52465534", "0.5236452", "0.5236424", "0.5226431", "0.52258044", "0.5222893", "0.5213837", "0.51815814", "0.51808167", "0.5179428", "0.51773125", "0.5166184", "0.5156602", "0.5153172", "0.51469177", "0.51426846", "0.51404434", "0.5137607", "0.5137371", "0.5135963", "0.5135909", "0.5134322", "0.51310575", "0.5127562", "0.51259285", "0.51241666", "0.51114845", "0.5108911", "0.5105614", "0.50975287", "0.5096427", "0.5096034", "0.5095748", "0.5094055", "0.5083633", "0.5082027", "0.5080128" ]
0.6132584
4
Edicion de una entrada de Points Translation
public static boolean editPointForEvent(ObjectId pointsTranslationId, int points) { Model.pointsTranslation().update(pointsTranslationId).with("{$set: {points: #, lastModified: #}}", points, GlobalDate.getCurrentDate()); OpsLog.onChange(OpsLog.ActingOn.POINTS_TRANSLATION, ImmutableMap.of( "pointsTranslationId", pointsTranslationId, "points", points)); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sauvegarderPointPartie (){\n\t\t\n\t\tint menage = (Integer) pointPartieEnCours.get(THEMES.MENAGE);\n\t\tint maths = (Integer) pointPartieEnCours.get(THEMES.MATHS);\n\t\tint francais = (Integer) pointPartieEnCours.get(THEMES.FRANCAIS);\n\t\t\n\t\tmenage += (Integer) level.get(THEMES.MENAGE);\n\t\tmaths += (Integer) level.get(THEMES.MATHS);\n\t\tfrancais += (Integer) level.get(THEMES.FRANCAIS);\n\t\t\n\t\tlevel.remove(THEMES.MENAGE); \n\t\tlevel.remove(THEMES.MATHS); \n\t\tlevel.remove(THEMES.FRANCAIS); \n\t\t\n\t\t\n\t\tlevel.put(THEMES.MENAGE ,menage); \n\t\tlevel.put(THEMES.MATHS ,maths); \n\t\tlevel.put(THEMES.FRANCAIS ,francais); \n\t\t\n\t}", "@Override\r\n\t\tpublic void translate(Point3D vec) {\r\n\t\t\t// TODO Auto-generated method stub \r\n\t\t\tMyCoords mc= new MyCoords();\r\n\t\t\tPoint3D p=new Point3D(vec);\r\n\t\t\tPoint3D newPoint=mc.add(p, vec);\r\n\t\t\tthis.point=newPoint;\r\n\t\t}", "@FXML\n public void translation(){\n double x = Double.parseDouble(translation_x.getText());\n double y = Double.parseDouble(translation_y.getText());\n double z = Double.parseDouble(translation_z.getText());\n\n double[] A = t1.getTetraeder()[0].getPoint();\n double[] B = t1.getTetraeder()[1].getPoint();\n double[] C = t1.getTetraeder()[2].getPoint();\n double[] D = t1.getTetraeder()[3].getPoint();\n\n t1.getTetraeder()[0].setPoint(A[0]+x,A[1]+y,A[2]+z);\n t1.getTetraeder()[1].setPoint(B[0]+x,B[1]+y,B[2]+z);\n t1.getTetraeder()[2].setPoint(C[0]+x,C[1]+y,C[2]+z);\n t1.getTetraeder()[3].setPoint(D[0]+x,D[1]+y,D[2]+z);\n\n redraw();\n }", "private void updateTranslated() {\r\n\r\n\tfloat[] dp = new float[3];\r\n\tTools3d.subtract(p, _p, dp);\r\n\r\n\tfor (int i = 0; i < npoints * 3; i+= 3) {\r\n\t // translate by adding the amount local origin has moved by\r\n\t ps[i] += dp[0];\r\n\t ps[i + 1] += dp[1];\r\n\t ps[i + 2] += dp[2];\r\n\t}\r\n\t\r\n\t// reset bounding box and clear dirty flag\r\n\tbox.setBB();\r\n\tdirtyT = false;\r\n\r\n\t// finally\r\n\t_p[0] = p[0];\r\n\t_p[1] = p[1];\r\n\t_p[2] = p[2];\r\n }", "Vaisseau_positionner createVaisseau_positionner();", "private void transformPoints() {\r\n\r\n\t\t// angle between x-axis and the line between start and goal\r\n//\t\tthis.angle = inverse_tan (slope)\r\n\t\tthis.angle = (int) Math.toDegrees(Math.atan2(goal.getY()-robot.getY(), goal.getX()-robot.getX()));\r\n\r\n\t\t// deviation of start point's x-axis from (0,0)\r\n\t\tthis.deviation = this.robot;\r\n\r\n\t\tthis.robot = new Robot(GA_PathPlanning.Transform(robot, -deviation.x, -deviation.y));\r\n\t\tthis.robot = new Robot(Rotate(robot, -angle));\r\n\t\t \r\n\t\tthis.goal = GA_PathPlanning.Transform(goal, -deviation.x, -deviation.y);\r\n\t\tthis.goal = GA_PathPlanning.Rotate(goal, -angle);\r\n\t\t\r\n\t\tfor(int i=0;i<obstacles.length;i++)\r\n\t\t{\r\n\t\t\tthis.obstacles[i]= new Obstacle(GA_PathPlanning.Transform(obstacles[i], -deviation.x, -deviation.y));\r\n\t\t\tthis.obstacles[i]= new Obstacle(GA_PathPlanning.Rotate(obstacles[i], -angle));\r\n\t\t}\r\n\t\t// make start point as (0,0)\r\n\t\t// transform xy-axis to axis of the straight line between start and goal\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void affiche(){\n System.out.println(\"Loup : \\n points de vie : \"+this.ptVie+\"\\n pourcentage d'attaque : \"+this.pourcentageAtt+\n \"\\n dégâts d'attaque : \"+this.degAtt+\"\\n pourcentage de parade :\"+this.pourcentagePar+\n \"\\n position : \"+this.pos.toString());\n\n }", "private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }", "private String getPoints(){\n\t\tString pu = \" punts.\";\n\t\tif(points == 1){\n\t\t\tpu = \" punt.\";\n\t\t}\n\t\treturn \"Puntuació de \" + points + pu;\n\t}", "@FXML\r\n private void addPointsEn() {\r\n if (diffPoint > 0) {\r\n int f1 = Integer.parseInt(engineering.getText());\r\n int f2 = f1 + 1;\r\n engineering.setText(String.valueOf(f2));\r\n diffPoint--;\r\n point.setText(\"You have \" + diffPoint + \" points\");\r\n }\r\n }", "@FXML\r\n private void deduPointsEn() {\r\n int f1 = Integer.parseInt(engineering.getText());\r\n if (f1 > 0) {\r\n int f2 = f1 - 1;\r\n engineering.setText(String.valueOf(f2));\r\n diffPoint++;\r\n point.setText(\"You have \" + diffPoint + \" points\");\r\n }\r\n }", "public Point2D translatePoint( Figure f, Point2D p, Point2D dir);", "public void translate(Point p){\n a.translate(p);\n b.translate(p);\n c.translate(p);\n }", "public void PerspektivischeProjektion(){\n /**\n * Abrufen der Koordinaten aus den einzelnen\n * Point Objekten des Objekts Tetraeder.\n */\n double[] A = t1.getTetraeder()[0].getPoint();\n double[] B = t1.getTetraeder()[1].getPoint();\n double[] C = t1.getTetraeder()[2].getPoint();\n double[] D = t1.getTetraeder()[3].getPoint();\n\n /*\n * Aufrufen der Methode sortieren\n */\n double[][] sP = cls_berechnen.sortieren(A, B, C, D);\n\n A = sP[0];\n B = sP[1];\n C = sP[2];\n D = sP[3];\n\n /*Wenn alle z Koordinaten gleich sind, ist es kein Tetraeder. */\n if (A[2] == D[2]) {\n System.out.println(\"kein Tetraeder\");\n return;\n }\n\n //Entfernung vom 'Center of projection' zur 'Projectoin plane'\n double d=5;\n\n /*\n * Transformiert x|y|z Koordinaten in x|y Koordinaten\n * mithilfer der perspektivischen Projektion\n */\n\n A[0]=A[0]/((A[2]+d)/d);\n A[1]=A[1]/((A[2]+d)/d);\n B[0]=B[0]/((B[2]+d)/d);\n B[1]=B[1]/((B[2]+d)/d);\n C[0]=C[0]/((C[2]+d)/d);\n C[1]=C[1]/((C[2]+d)/d);\n D[0]=D[0]/((D[2]+d)/d);\n D[1]=D[1]/((D[2]+d)/d);\n\n\n double ax, ay, bx, by, cx, cy, dx, dy;\n ax=A[0];\n ay=A[1];\n bx=B[0];\n by=B[1];\n cx=C[0];\n cy=C[1];\n dx=D[0];\n dy=D[1];\n\n tetraederzeichnen(ax, ay, bx, by, cx, cy, dx, dy);\n }", "public PointData translate(PointData data) {\n return data;\n }", "public void setPoints(String points);", "public static boolean createPointForEvent(int eventType, int points) {\n PointsTranslation pointsTranslation = new PointsTranslation();\n pointsTranslation.eventTypeId = eventType;\n pointsTranslation.points = points;\n pointsTranslation.createdAt = GlobalDate.getCurrentDate();\n pointsTranslation.lastModified = pointsTranslation.createdAt;\n Model.pointsTranslation().insert(pointsTranslation);\n\n OpsLog.onNew(pointsTranslation);\n return true;\n }", "Position_changerAbscisse createPosition_changerAbscisse();", "static Posn translate ( Posn p, double dx, double dy ) {\n\t// return .... ;\n\t// Take stock\n\t// return ... p ... dx ... dy ; // <- We know this from Posn p\n\t// return new Posn ( ... p.x ... p.y ... dx ... dy ); // <- We know this from Posn translate\n\t// return new Posn ( ... p.x ... p.y ... dx ... dy, ... p.x ... p.y ... dx ... dy );\t\n\treturn new Posn ( p.x + dx, p.y + dy );\t\n }", "@FXML\r\n private void addPointsIn() {\r\n if (diffPoint > 0) {\r\n int f1 = Integer.parseInt(intelligence.getText());\r\n int f2 = f1 + 1;\r\n intelligence.setText(String.valueOf(f2));\r\n diffPoint--;\r\n point.setText(\"You have \" + diffPoint + \" points\");\r\n }\r\n }", "public void translate(int x, int y);", "@Override\n protected void onConvertTransfer(Persona_tiene_Existencia values, DataSetEvent e) throws SQLException, UnsupportedOperationException\n {\n if (e.getDML() == insertProcedure)\n {\n e.setInt(1, values.getIdPersona());//\"vid_persona\"\n e.setInt(2, values.getEntrada());//\"ventrada\"\n e.setInt(3, values.getIdUbicacion());//\"vid_ubicacion\"\n e.setFloat(4, values.getExistencia());//\"vexistencia\"\n }\n\n else if (e.getDML() == updateProcedure)\n {\n e.setInt(1, values.getLinea_Viejo());//\"vlinea_old\"\n e.setInt(2, values.getIdPersona_Viejo());//\"vid_persona_old\"\n e.setInt(3, values.getIdPersona());//\"vid_persona_new\"\n e.setInt(4, values.getEntrada());//\"ventrada\"\n e.setInt(5, values.getIdUbicacion());//\"vid_ubicacion\"\n e.setFloat(6, values.getExistencia());//\"vexistencia\"\n }\n }", "abstract void translate(double x, double y, double z);", "@FXML\r\n private void addPointsCh() {\r\n if (diffPoint > 0) {\r\n int f1 = Integer.parseInt(charistma.getText());\r\n int f2 = f1 + 1;\r\n charistma.setText(String.valueOf(f2));\r\n diffPoint--;\r\n point.setText(\"You have \" + diffPoint + \" points\");\r\n }\r\n }", "Position_ordonnee createPosition_ordonnee();", "public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}", "public Exo2_Editeurpolylignes() {\n valeur_maximum = 5;\n initComponents();\n Tools.windowsInit(this);\n Tools.setIcone(\"./src/Icones/Icone_Lines.bmp\", this);\n this.setTitle(\"Editeur de poly-Lignes\");\n etat = Etat.Init;\n //rien\n initNombrePoints();\n\n }", "public VisuCoordinateTranslator() {\r\n limitedDirections = new HashMap<String, Integer>();\r\n limitedCoordinates = new HashMap<String, Shape>();\r\n limitedGroundCoordinates = new HashMap<String, Float[]>();\r\n Float c[] = {22f, 2f, 8.5f, -1.7f, 0f};\r\n limitedDirections.put(\"Status_GWP01\", 0);\r\n ArrayList a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n StraightShape ss = new StraightShape(a);\r\n limitedCoordinates.put(\"0.1.0\", ss);\r\n\r\n\r\n c = new Float[]{-0.97f, 0.88f, 0f, -0.1f, 1f};\r\n limitedDirections.put(\"Status_ETKa1\", 1);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"1.1.0\", ss);\r\n\r\n limitedDirections.put(\"Status_ETKa2\", 1);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa1\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa2\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n\r\n\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n ArrayList<ArrayList<Float>> arrayOval = new ArrayList<ArrayList<Float>>();\r\n c = new Float[]{6.3f, -2f, 7.3f, -14.38f, 0f};//straight_1\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, -4.8f, 7.3f, -14.38f, 0f};//straight_2\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.072f, 0.0695f, 2.826f, -5.424f, -17.2f, 7.3f, 1f};//circular_3\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-4.8f, -2f, 7.3f, -19.715f, 0f};//straight_4\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, 6.3f, 7.3f, -19.715f, 0f};//straight_5\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.038f, 0.1032f, 2.833f, 6.567f, -17.2f, 7.3f, 1f};//circular_6\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.1302f, 0.0114f, 2.8202f, -2.0298f, -17.2f, 7.3f, 1f};//circular_7\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n \r\n c = new Float[]{0.41f, 0.48f, 0.6f, 0.67f, 0.78f, 0.92f};//partitions\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n\r\n OvalShape os = new OvalShape(arrayOval);\r\n\r\n for (int i = 2; i < 11; i++) {\r\n for (int j = 0; j < 3; j++) {\r\n limitedCoordinates.put(\"1.\" + i + \".\" + j, os);\r\n limitedCoordinates.put(\"2.\" + i + \".\" + j, ss);\r\n }\r\n }\r\n\r\n \r\n \r\n c = new Float[]{2.0785f, -1.8972f};\r\n limitedGroundCoordinates.put(\"0.1.0\", c);\r\n c = new Float[]{-6.3859f,-0.4682f};\r\n limitedGroundCoordinates.put(\"1.1.0\", c);\r\n }", "public Joueur(int id, int pa)\r\n/* */ {\r\n/* 34 */ this.id_joueur = id;\r\n/* 35 */ this.points_action = pa;\r\n/* */ }", "public void translate(int x, int y)\r\n\t{\r\n\t\t// g.translate(x,y);\r\n\t\t// System.err.println(\"not translate int x: \" + x + \" y:\" + y );\r\n\t}", "@Override\n public void translate(double x, double y, double z) {\n GL11.glTranslated(x, y, z);\n }", "static PointDouble translate(PointDouble p, Vec v) {\n return new PointDouble(p.x + v.x , p.y + v.y);\n }", "private void addUserPoint() {\n\n String userRefEmail = edtEmailPengguna.getText().toString().replace('.', '_');\n final int poin = Integer.parseInt(tvPoinTransaksi.getText().toString());\n\n final DatabaseReference userDataRef = FirebaseDatabase.getInstance().getReference().child(\"Users\").child(userRefEmail);\n userDataRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n String userCurrentPoint = Objects.requireNonNull(dataSnapshot.child(\"point\").getValue()).toString();\n\n int finalPoint = Integer.parseInt(userCurrentPoint) + poin;\n userDataRef.child(\"point\").setValue(finalPoint);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n });\n }", "public void translation(Double xMovement,Double yMovement) {\n GPoint tempPoint1=new GPoint((point1.getFirst()+xMovement),\n (point1.getSecond()+yMovement));\n GPoint tempPoint2=new GPoint((point2.getFirst()+xMovement),\n (point2.getSecond()+yMovement));\n point1=tempPoint1;\n point2=tempPoint2;\n }", "public void translate(float x, float y);", "public String getPoints();", "public void skalierung(){\n double scale = Double.parseDouble(skalierung_textfield.getText());\n scale = scale/100;\n\n double[] A = t1.getTetraeder()[0].getPoint();\n double[] B = t1.getTetraeder()[1].getPoint();\n double[] C = t1.getTetraeder()[2].getPoint();\n double[] D = t1.getTetraeder()[3].getPoint();\n\n t1.getTetraeder()[0].setPoint(A[0]*scale,A[1]*scale,A[2]*scale);\n t1.getTetraeder()[1].setPoint(B[0]*scale,B[1]*scale,B[2]*scale);\n t1.getTetraeder()[2].setPoint(C[0]*scale,C[1]*scale,C[2]*scale);\n t1.getTetraeder()[3].setPoint(D[0]*scale,D[1]*scale,D[2]*scale);\n\n redraw();\n }", "private Point transform(Point pt1) {\n Point pt2 = new Point(0,0) ;\n pt2.x = pos.x + new Double(pt1.x*Math.cos(heading)+pt1.y*Math.sin(heading)).intValue() ;\n pt2.y = pos.y + new Double(-pt1.x*Math.sin(heading)+pt1.y*Math.cos(heading)).intValue() ;\n return pt2 ;\n }", "private void rotateTransformPoints(double angle) {\n int i;\n for(i=1; i<9;i++) {\n GeoVector vec = new GeoVector(this.transformPointers[i].getX(), this.transformPointers[i].getY(), this.aux_obj.getCenterX(), this.aux_obj.getCenterY());\n vec.rotate(((angle*-1.0) * (2.0*Math.PI))/360);\n vec.addPoint(this.aux_obj.getCenterX(), this.aux_obj.getCenterY());\n this.transformPointers[i].translate( (int)(vec.getX() - this.transformPointers[i].getX()), (int)(vec.getY() - this.transformPointers[i].getY()));\n }\n\n }", "void turnToPoint(float x, float y) {\n _rotVector.set(x - _x, y - _y, 0);\n _rotVector.setMag(1);\n }", "Position_abscisse createPosition_abscisse();", "@FXML\r\n private void addPoints() {\r\n if (diffPoint > 0) {\r\n int f1 = Integer.parseInt(strength.getText());\r\n int f2 = f1 + 1;\r\n strength.setText(String.valueOf(f2));\r\n diffPoint--;\r\n point.setText(\"You have \" + diffPoint + \" points\");\r\n }\r\n }", "public void setPosicion(){\n ejeX = 0;\n ejeY = 0;\n }", "private void onConverti()\n\t{\n\n\t\tif ( !input.isCorretto() ) {\n\t\t new AlertDialog.Builder(this)\n\t\t\t .setMessage(getString(R.string.msg_coordinata_non_congruente))\n\t\t\t .setTitle(getString(R.string.app_name))\n\t\t\t .setPositiveButton(getString(R.string.ok), null)\n\t\t\t .show();\n\t\t return;\n\t\t}\n\n\n\t\t// Proietto a Gauss Roma\t\t\n\t\tRisultatoConversione risultato = new RisultatoConversione();\n\t\t\n\t\tPunto3D orig = input.getPunto();\n\t\trisultato.lat = orig.y;\n\t\trisultato.longi = orig.x;\n\t\trisultato.descrizione_punto = editLatLongDescrizione.getText().toString();\n\t\t\n\t\ttry {\n\t\t\tConversioniUtils utils = new ConversioniUtils(this, risultato);\n\t\t\tutils.conversioneInLatLongED50();\n\t\t\tutils.conversioneInGauss();\n\t\t\tutils.conversioneInCassini();\n\t\t\tutils.conversioneInUTM();\n\t\t\tutils.conversioneInMGRS();\n\t\t\tutils.conversioneInWebMercator();\n\t\t} catch(Exception e) {\n\t\t\tnew AlertDialog.Builder(this)\n\t\t\t\t.setMessage(getString(R.string.msg_coordinata_non_congruente))\n\t\t\t\t.setTitle(getString(R.string.app_name))\n\t\t\t\t.setPositiveButton(getString(R.string.ok), null)\n\t\t\t\t.show();\t\t\n\t\t\treturn;\n\t\t}\n\n\t\t// Tipo di conversione\n\t\trisultato.tipo_ingresso = \"Da Latitudine e Longitudine \";\n\t\tif (coordinataDaGps)\n\t\t{\n\t\t\trisultato.tipo_ingresso += \"(GPS)\";\n\t\t}\n\t\trisultato.initPropertiesFromContext(this);\n\t\t\n\t\t// Faccio vedere il risultato\n\t\tIntent passaggioRisultato = new Intent(this, RisultatoConversioneActivity.class);\n\t\tpassaggioRisultato.putExtra(ActivityGlobals.RISULTATO_CONVERSIONE, risultato);\n\t\tstartActivity(passaggioRisultato);\n\t}", "@Test\r\n\tpublic void testPointToString0() {\r\n\t\tPonto a1 = new Ponto(1.0, 2.5);\r\n\t\tAssert.assertEquals(\"(1.00, 2.50)\", a1.toString());\r\n\r\n\t\tPonto a2 = new Ponto(-2.4, 4.1);\r\n\t\tAssert.assertEquals(\"(-2.40, 4.10)\", a2.toString());\r\n\r\n\t\tPonto a3 = new Ponto(9.3, -1.9);\r\n\t\tAssert.assertEquals(\"(9.30, -1.90)\", a3.toString());\r\n\t}", "private void updatePointsPosition() {\n\t\tfor (DataFromPointInfo dataFromPointInfo : fromPoints) {\n\t\t\tDataFromPoint fromPoint = dataFromPointInfo.fromPoint;\n\t\t\tfromPoint.setX((int) (getX() + this.getBounds().getWidth()\n\t\t\t\t\t+ HORIZONTAL_OFFSET));\n\t\t\tfromPoint.setY((int) (getY() + this.getRowHeight() / 2\n\t\t\t\t\t+ this.getRowHeight() * dataFromPointInfo.yShift));\n\t\t}\n\t\tfor (DataToPointInfo dataToPointInfo : toPoints) {\n\t\t\tDataToPoint toPoint = dataToPointInfo.toPoint;\n\t\t\ttoPoint.setX((int) (getX() - HORIZONTAL_OFFSET));\n\t\t\ttoPoint.setY((int) (getY() + this.getRowHeight() / 2\n\t\t\t\t\t+ this.getRowHeight() * dataToPointInfo.yShift));\n\t\t}\n\t}", "public void mou(){\n\n this.setY(getY() + getVelocitatY());\n this.setX(getX() + getVelocitatX());\n\n }", "void drawMyPoint(double x, double y, MapContent map, String nombre) { \n// SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();\n// builder.setName(\"MyFeatureType\");\n// builder.setCRS( DefaultGeographicCRS.WGS84 ); // set crs \n// builder.add(\"location\", Point.class); // add geometry\n//\n// // build the type\n// SimpleFeatureType TYPE = builder.buildFeatureType();\n//\n// // create features using the type defined\n// SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(TYPE);\n// org.locationtech.jts.geom.GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();\n// org.locationtech.jts.geom.Point point = geometryFactory.createPoint(new Coordinate(x, y));\n// //\n// \n// //\n// featureBuilder.add(point);\n// SimpleFeature feature = featureBuilder.buildFeature(\"FeaturePoint\");\n// DefaultFeatureCollection featureCollection = new DefaultFeatureCollection(\"internal\", TYPE);\n// featureCollection.add(feature); // Add feature 1, 2, 3, etc\n//\n// Style style = SLD.createPointStyle(\"Star\", Color.BLUE, Color.BLUE, 0.3f, 200);\n// Layer layer = new FeatureLayer(featureCollection, style);\n// layer.setTitle(\"NewPointLayer\");\n// map.addLayer(layer);\n// //mapFrame.getMapPane().repaint();// MapPane.repaint();\n//}\n\tSimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();\n builder.setName(\"MyFeatureType\"); // \n builder.setCRS( DefaultGeographicCRS.WGS84 ); // set crs // Definimos las caracteristicas de tipo del punto q vamos a crear\n builder.add(\"location\", Point.class); // add geometry //\n org.locationtech.jts.geom.GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(); //objeto q usaremos para crear el punto\n Coordinate coord = new Coordinate( x,y ); //creamos la coordenada con los puntos pasados como parametros\n org.locationtech.jts.geom.Point point = geometryFactory.createPoint(coord); // Creamos el punto geometrico\n\nSimpleFeatureType pointtype = null; //definimos el typo de punto que necesitamos apra agregarlo a la capa del mapa\n try {\n pointtype = DataUtilities.createType(\"POINT\", \"geom:Point,name:String\");\n } catch (SchemaException ex) {\n Logger.getLogger(SelectionLab.class.getName()).log(Level.SEVERE, null, ex);\n }\nSimpleFeatureBuilder featureBuilderPoints = new SimpleFeatureBuilder(pointtype); //creamos el constructor de lo que agregaremos\nDefaultFeatureCollection collectionPoints = new DefaultFeatureCollection(\"internal\", pointtype); //creamos el contenedor donde pondremos lo que agregaremos\n//PointString Point=builder.createPointString(Point);\n//LineString Point = builder.createLineString(Point);\nfeatureBuilderPoints.add(point); //agregamos el punto en el constructor\nSimpleFeature featureLine = featureBuilderPoints.buildFeature(null); \n((DefaultFeatureCollection)collectionPoints).add(featureLine); \nStyle PointStyle = SLD.createPointStyle(\"circle\", Color.RED, Color.RED,(float) 0.5,(float) 10); //definimos el estilo del punto (icono, color contorno, color, opacidad y tamaño)\n//Obserervacion: el dibujo del punto siempre se mantiene del mismo tamaño por mas que se use el zoom\nmap.addLayer(new FeatureLayer(collectionPoints, PointStyle)); //agregamos el punto a la capa\n\nguardarCoordenadas(nombre,x,y);\n}", "Punto(){\r\n x=0;\r\n y=0;\r\n }", "@Override\n public void onClick(View v) {\n AlertDialog.Builder builder = new AlertDialog.Builder(mParent);\n builder.setTitle(mTitle);\n\n LayoutInflater inflater = mParent.getLayoutInflater();\n View dialogueView = inflater.inflate(R.layout.dialogue_point_edit, null);\n\n final EditText editX = (EditText) dialogueView.findViewById(R.id.edit_point_x);\n final EditText editY = (EditText) dialogueView.findViewById(R.id.edit_point_y);\n final EditText editZ = (EditText) dialogueView.findViewById(R.id.edit_point_z);\n\n builder.setView(dialogueView);\n builder.setPositiveButton(R.string.dialogue_button_save, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n float x = (editX.getText().toString().length() == 0) ? 0 : Float.valueOf(editX.getText().toString());\n float y = (editY.getText().toString().length() == 0) ? 0 : Float.valueOf(editY.getText().toString());\n float z = (editZ.getText().toString().length() == 0) ? 0 : Float.valueOf(editZ.getText().toString());\n mPoint = new Float3(x, y, z);\n mListener.notifyPointChanged(mPoint);\n }\n });\n builder.setNegativeButton(R.string.dialogue_button_cancel, null);\n\n // Get the AlertDialog, initialise values and show it.\n AlertDialog dialogue = builder.create();\n\n editX.setText(String.valueOf(mPoint.getX()));\n editY.setText(String.valueOf(mPoint.getY()));\n editZ.setText(String.valueOf(mPoint.getZ()));\n dialogue.show();\n }", "public static String process() {\n\n\t\tSet<Point> myPoint;\n\t\tSet<Point> oppPoint;\n\t\t\n\t\tint oppenentID = (myID == 0? 1: 0);\n\t\t\n\t\tif (map.containsKey(myID)) {\n\t\t\tmyPoint = map.get(myID);\n\t\t}else\n\t\t{\n\t\t\tmyPoint = new TreeSet<Point>();\n\t\t}\n\t\tif (map.containsKey(oppenentID)) {\n\t\t\toppPoint = map.get(oppenentID);\n\t\t}else\n\t\t{\n\t\t\toppPoint = new TreeSet<Point>();\n\t\t}\n\t\t\n\t\tPoint decdesion = strategy.choosePoint(myPoint, oppPoint, 1000, 1000);\n\t\tmyPoint.add(decdesion);\n\t\tmap.put(myID, myPoint);\n\t\t\n\t\treturn decdesion.x + \" \" + decdesion.y;\n\t\t\n\t}", "public void set_point ( String id,String longitud,String latitud, String id_cliente){\n this.id = id;\n this.longitud=longitud;\n this.latitud=latitud;\n this.id_cliente = id_cliente;\n Calendar c = Calendar.getInstance();\n SimpleDateFormat df = new SimpleDateFormat(\"yyyyMMdd HH:mm\");\n fecha= df.format(c.getTime()).toString();\n new define_ubicacion_cliente().execute();\n }", "public void translate( double[] d ) {\n setValid( false );\n position.translate( d );\n }", "public void saveGeominas(Geominas entity) throws Exception;", "@Override\t\t\t\n\tpublic final myPointf transformPoint(myPointf A, int transformIDX, float t) {\treturn trans[transformIDX].transformPoint(A, t);}", "public void setPoints(int points) {\n this.points = points;\n }", "public void actualiza(){\r\n //pregunto si se presiono una tecla de dirección\r\n if(bTecla) {\r\n int iX = basPrincipal.getX();\r\n int iY = basPrincipal.getY();\r\n if(iDir == 1) {\r\n iY -= getHeight() / iMAXALTO;\r\n }\r\n if(iDir == 2) {\r\n iX += getWidth() / iMAXANCHO;\r\n }\r\n if(iDir == 3) {\r\n iY += getHeight() / iMAXALTO;\r\n }\r\n if(iDir == 4) {\r\n iX -= getWidth() / iMAXANCHO;\r\n }\r\n //limpio la bandera\r\n bTecla = false;\r\n \r\n //asigno posiciones en caso de no salirme\r\n if(iX >= 0 && iY >= 0 && iX + basPrincipal.getAncho() <= getWidth()\r\n && iY + basPrincipal.getAlto() <= getHeight()) {\r\n basPrincipal.setX(iX);\r\n basPrincipal.setY(iY);\r\n } \r\n }\r\n \r\n //Muevo los chimpys\r\n for(Base basChimpy : lklChimpys) {\r\n basChimpy.setX(basChimpy.getX() - iAceleracion);\r\n }\r\n \r\n //Muevo los diddys\r\n for(Base basDiddy : lklDiddys) {\r\n basDiddy.setX(basDiddy.getX() + iAceleracion);\r\n }\r\n\r\n }", "private void actualizarEnConsola() {\n\t\tfor(int i=0; i<elementos.size();i++){\n\t\t\tElemento e = elementos.get(i);\n\t\t\tSystem.out.println(e.getClass().getName()+\"- Posicion: , X: \"+e.getPosicion().getX()+\", Y: \"+ e.getPosicion().getY());\n\t\t}\n\t\t\n\t}", "public void darCoordenadasIniciales() \r\n\t{\t\r\n\t\tint coordenadasX = 0;\r\n\t\tint coordenadasY = 1;\r\n\t\tint orientacion = 2;\r\n\t\t\r\n\t\tfor (int x = 0; x<palabras.size();x++) \r\n\t\t{\r\n\t\t\tpalabras.get(x).get(0).setX(Integer.parseInt(manejadorArchivos.getPalabras().get(coordenadasX)));\r\n\t\t\tpalabras.get(x).get(0).setY(Integer.parseInt(manejadorArchivos.getPalabras().get(coordenadasY)));\r\n\t\t\tpalabras.get(x).get(0).setOrientacion(manejadorArchivos.getPalabras().get(orientacion));\r\n\t\t\t\r\n\t\t\t coordenadasX = coordenadasX +4;\r\n\t\t\t coordenadasY = coordenadasY + 4;\r\n\t\t\t orientacion = orientacion + 4;\r\n\t\t}\r\n\t}", "public void updateGeominas(Geominas entity) throws Exception;", "public Point translate(int x, int y) {\n return new Point(\n this.x + x,\n this.y + y\n );\n }", "public Coordinate getCoordenadasActuales() ;", "private void updateTranslationfromCenterAnchor(Pose pose, int teapotId) {\n float poseX = pose.tx();\n float poseZ = pose.tz();\n\n float anchorPoseX = globalCenterPose.tx();\n float anchorPoseZ = globalCenterPose.tz();\n\n float[] translate = new float[3];\n\n if (poseX > anchorPoseX) {\n translate[0] = poseX - anchorPoseX;\n } else {\n translate[0] = -(anchorPoseX - poseX);\n }\n\n if (poseZ > anchorPoseZ) {\n translate[2] = poseZ - anchorPoseZ;\n } else {\n translate[2] = -(anchorPoseZ - poseZ);\n }\n\n teapotTranslations[teapotId] = translate;\n }", "public void addPoint(int points){\n\t\tthis.fidelityCard.point += points;\t\t\n\t}", "@Override\r\n public void givePlayerPoints(int player, int plValuePosition, int points) {\r\n // Incrememnt player values by the points passed in\r\n this.players.get(player).\r\n changePlayerValueNumeric(plValuePosition, points);\r\n }", "public void calculEtatSuccesseur() { \r\n\t\tboolean haut = false,\r\n\t\t\t\tbas = false,\r\n\t\t\t\tgauche = false,\r\n\t\t\t\tdroite = false,\r\n\t\t\t\thautGauche = false,\r\n\t\t\t\tbasGauche = false,\r\n\t\t\t\thautDroit = false,\r\n\t\t\t\tbasDroit = false;\r\n\t\t\r\n\t\tString blanc = \" B \";\r\n\t\tString noir = \" N \";\r\n\t\tfor(Point p : this.jetonAdverse()) {\r\n\t\t\tString [][]plateau;\r\n\t\t\tplateau= copieEtat();\r\n\t\t\tint x = (int) p.getX();\r\n\t\t\tint y = (int) p.getY();\r\n\t\t\tif(this.joueurActuel.getCouleur() == \"noir\") { //dans le cas ou le joueur pose un pion noir\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\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) { //on regarde uniquement le centre du plateaau \r\n\t\t\t\t\t//on reinitialise x,y et plateau a chaque étape\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tdroite = getDroite(x,y,blanc);\r\n\t\t\t\t\thaut = getHaut(x, y, blanc);\r\n\t\t\t\t\tbas = getBas(x, y, blanc);\r\n\t\t\t\t\tgauche = getGauche(x, y, blanc);\r\n\t\t\t\t\thautDroit = getDiagHautdroite(x, y, blanc);\r\n\t\t\t\t\thautGauche = getDiagHautGauche(x, y, blanc);\r\n\t\t\t\t\tbasDroit = getDiagBasDroite(x, y, blanc);\r\n\t\t\t\t\tbasGauche = getDiagBasGauche(x, y, blanc);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y-1]==noir) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(droite) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//1\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==noir) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(bas) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==noir) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(gauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(haut) {\r\n\t\t\t\t\t\t\t//System.out.println(\"regarde en dessous\");\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==noir) {\r\n\t\t\t\t\t\tif(hautGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(basGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\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}//6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit : OK!\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(hautDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\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}//7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==noir) {\r\n\t\t\t\t\t\tif(basDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t//System.out.println(\"ajouté!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {//si le joueur actuel a les pions blanc\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x][y-1]==blanc) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(getDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\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\t}//1.1\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==blanc) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getBas(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2.2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==blanc) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getGauche(x, y, noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3.3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == blanc) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getHaut(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4.4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5.5\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//6.6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautdroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7.7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8.8\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public TrazoLibre(Point2D punto, Atributo atributo) {\n this.linea = new ArrayList();\n this.linea.add(punto);\n }", "public void atualizar() {\n System.out.println(\"Metodo atualizar chamado!\");\n setR1(0);\n setR2(0);\n setR3(0);\n setN(0);\n\n //context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Atualizado!\", \"\"));\n }", "public synchronized void transform() {\n Iterator<String> it = entity_to_wxy.keySet().iterator();\n while (it.hasNext()) {\n String entity = it.next();\n double wx = entity_to_wxy.get(entity).getX(),\n wy = entity_to_wxy.get(entity).getY();\n int sx, sy;\n entity_to_sxy.put(entity, (sx = wxToSx(wx)) + BundlesDT.DELIM + (sy = wyToSy(wy)));\n entity_to_sx.put(entity, sx); entity_to_sy.put(entity, sy);\n }\n transform_id++;\n }", "public void situerClick() {\n\n\tSystem.out.println(\"Allez-y, cliquez donc.\") ;\n\t\n\tif (dessin.waitClick()) {\n\t float lon = dessin.getClickLon() ;\n\t float lat = dessin.getClickLat() ;\n\t \n\t System.out.println(\"Clic aux coordonnees lon = \" + lon + \" lat = \" + lat) ;\n\n\t // On cherche le noeud le plus proche. O(n)\n\t float minDist = Float.MAX_VALUE ;\n\t Noeud noeud = null ;\n\t \n\t for(Map.Entry<Integer, Noeud> entry : noeuds.entrySet())\t{\r\n\t \tNoeud n = entry.getValue();\r\n\t \tfloat londiff = n.getLongitude() - lon;\r\n\t \tfloat latdiff = n.getLatitude() - lat;\r\n\t \tfloat dist = londiff*londiff + latdiff*latdiff ;\r\n\t \tif(dist < minDist)\t{\r\n\t \t\tnoeud = n;\r\n\t \t\tminDist = dist;\r\n\t \t}\r\n\t }\n\n\t System.out.println(\"Noeud le plus proche : \" + noeud) ;\n\t System.out.println() ;\n\t dessin.setColor(java.awt.Color.red) ;\n\t dessin.drawPoint(noeud.getLongitude(), noeud.getLatitude(), 5) ;\n\t}\n }", "public void translate(float theX, float theY) {\n\t}", "public TrazoLibre(Point2D punto) {\n this.linea = new ArrayList();\n this.linea.add(punto);\n }", "public void setPoints(Integer points) {\r\n this.points = points;\r\n }", "public void aktualisiere(PhysicalObject po){\n\t\tthis.po=po;\n\t\tKipper kipperObj= (Kipper) po;\t\t\n\t\tx = kipperObj.getX();\n\t\ty = kipperObj.getY();\n\t\tbreite=kipperObj.getBreite();\n\t\tlaenge=kipperObj.getLaenge();\n\t\twinkel=kipperObj.getWinkel();\n\t\tlkwfahrt=kipperObj.isFahrt();\t\t\n\t\tif (kipperObj.getMaterialListe().size() == 1) {\n\t\t\tmatRatio=kipperObj.getMaterialListe().get(0).getVolumen()/kipperObj.getMaxVolumen();\t\n\t\t\tif(matRatio > 1)\n\t\t\t\tmatRatio=1;\n\t\t}\t\t\n\t}", "public void darCoordenadas() {\r\n\t\t\r\n\t\tfor(int x = 0; x<palabras.size(); x++) {\r\n\t\t\t\r\n\t\t\tif (palabras.get(x).get(0).getOrientacion().equals(\"V\")) {\r\n\t\t\t\tint coordenadaX = palabras.get(x).get(0).getX();\r\n\t\t\t\tint coordenadaY = palabras.get(x).get(0).getY();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 1; y < palabras.get(x).size(); y++) \r\n\t\t\t\t{\r\n\t\t\t\t\tcoordenadaY++;\r\n\t\t\t\t\tpalabras.get(x).get(y).setX(coordenadaX);\r\n\t\t\t\t\tpalabras.get(x).get(y).setY(coordenadaY);\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\t\r\n\t\t\tif (palabras.get(x).get(0).getOrientacion().equals(\"H\") ) {\r\n\t\t\t\t\r\n\t\t\t\tint coordenadaX = palabras.get(x).get(0).getX();\r\n\t\t\t\tint coordenadaY = palabras.get(x).get(0).getY();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 1; y < palabras.get(x).size(); y++) \r\n\t\t\t\t{\r\n\t\t\t\t\tcoordenadaX++;\r\n\t\t\t\t\tpalabras.get(x).get(y).setX(coordenadaX);\r\n\t\t\t\t\tpalabras.get(x).get(y).setY(coordenadaY);\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}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tTranslater translater = new Translater();\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tString data = dataText.getText();\n\t\t\t\t\tString presentes = presentesText.getText();\n\t\t\t\t\tString ausentes = ausentesText.getText();\n\t\t\t\t\tString ausentesJusti = ausentesJustiText.getText();\n\t\t\t\t\tString atrasos = atrasosText.getText();\n\t\t\t\t\tString atrasosJusti = atrasosJustiText.getText();\n\t\t\t\t\tString presidente = presidenteText.getText();\n\t\t\t\t\tString ateiro = ateiroText.getText();\n\t\t\t\t\tString ata = ataMesmo.getText();\n\t\t\t\t\t\n\t\t\t\t\ttranslater.traduzir(data, presentes, ausentes, ausentesJusti, atrasos, atrasosJusti, presidente, ateiro, ata);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public Point translate(int dX, int dY) {\n\t\tint translatedX = x + dX;\n\t\tint translatedY = y + dY;\n\t\treturn new Point(translatedX, translatedY);\n\t}", "public void limpaPontos() {\n\t\tthis.pontos = new ArrayList<Point>();\n\t}", "@FXML\r\n private void addPointsAG() {\r\n if (diffPoint > 0) {\r\n int f1 = Integer.parseInt(agility.getText());\r\n int f2 = f1 + 1;\r\n agility.setText(String.valueOf(f2));\r\n diffPoint--;\r\n point.setText(\"You have \" + diffPoint + \" points\");\r\n }\r\n }", "public void elementosMapa() {\n\t\t\n\t\tHeroes heroe = (Heroes) ven.getHeroe();\n\t\t\n\t\tif(heroe.getPosX() >= 250 && heroe.getPosX() <= 302 && heroe.getPosY() >= 208 && heroe.getPosY() <= 255 && pregunta1 == false) {\n\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Cuántas transformaciones sufre Freezer?\" + \"\\n\" + \"a) 4\" + \"\\n\" + \"b) 5\" + \"\\n\" + \"c) 2\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"a\")) {\n\t\t\t\t\n\t\t\t\tpregunta1 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, acabas de ganar una nueva esfera :D\");\n\t\t\t\tven.modificarEsfera(2);\n\t\t\t\tven.actualizarInfo();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"a\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(281); \n\t\t\t\theroe.setPosY(311);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 1148 && heroe.getPosX() <= 1202 && heroe.getPosY() >= 33 && heroe.getPosY() <= 84 && pregunta2 == false) {\n\t\t\t\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién logró liberar la espada Z?\" + \"\\n\" + \"a) Goten\" + \"\\n\" + \"b) Goku\" + \"\\n\" + \"c) Gohan\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"c\")) {\n\t\t\t\t\n\t\t\t\tpregunta2 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, acabas de ganar una nueva esfera\");\n\t\t\t\tven.modificarEsfera(4);\n\t\t\t\tven.actualizarInfo();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"a\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(1280);\n\t\t\t\theroe.setPosY(119);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 50 && heroe.getPosX() <= 103 && heroe.getPosY() >= 558 && heroe.getPosY() <= 607 && pregunta3 == false) {\n\t\t\t\n\t\t\t\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién es hijo de Paragus?\" + \"\\n\" + \"a) Bardock\" + \"\\n\" + \"b) Broly\" + \"\\n\" + \"c) Freezer\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tpregunta3 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, acabas de ganar una nueva esfera :D\");\n\t\t\t\tven.modificarEsfera(6);\n\t\t\t\tven.actualizarInfo();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"b\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(135);\n\t\t\t\theroe.setPosY(593);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\telse if(heroe.getPosX() >= 70 && heroe.getPosX() <= 130 && heroe.getPosY() >= 1 && heroe.getPosY() <= 55 && pregunta4 == false) {\n\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién se convirtío primero en SSJ2?\" + \"\\n\" + \"a) Goku\" + \"\\n\" + \"b) Trunks\" + \"\\n\" + \"c) Gohan\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"c\")) {\n\t\t\t\t\n\t\t\t\tpregunta4 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, has aumentado el poder de tus ataques :D\");\n\t\t\t\theroe.setAtaque1(20);\n\t\t\t\theroe.setAtaque2(20);\n\t\t\t\theroe.setAtaque3(20);\n\t\t\t\theroe.setAtaqueEspecial(20);\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"c\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(208); \n\t\t\t\theroe.setPosY(47);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\n\t\telse if(heroe.getPosX() >= 585 && heroe.getPosX() <= 640 && heroe.getPosY() >= 258 && heroe.getPosY() <= 310 && pregunta5 == false) {\n\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién mantuvo su cola hasta la muerte?\" + \"\\n\" + \"a) Vegeta\" + \"\\n\" + \"b) Bardock\" + \"\\n\" + \"c) Gohan\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\n\t\t\t\tpregunta5 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, has aumentado el poder de tus ataques :D\");\n\t\t\t\theroe.setAtaque1(20);\n\t\t\t\theroe.setAtaque2(20);\n\t\t\t\theroe.setAtaque3(20);\n\t\t\t\theroe.setAtaqueEspecial(20);\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"b\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(577); \n\t\t\t\theroe.setPosY(356);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 396 && heroe.getPosX() <= 444 && heroe.getPosY() >= 230 && heroe.getPosY()<= 300 && Broly == false) {\n\t\t\t\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Broly\");\n\t\t\tvillanoActual = \"Broly\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Broly: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla3.jpg\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(414);\n\t\t\t\theroe.setPosY(352);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(414);\n\t\t\t\theroe.setPosY(352);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 1235 && heroe.getPosX() <= 1295 && heroe.getPosY() >= 290 && heroe.getPosY() <= 360 && Freezer == false) {\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Freezer\");\n\t\t\tvillanoActual = \"Freezer\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Freezer: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla2.png\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(1279);\n\t\t\t\theroe.setPosY(229);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(1279);\n\t\t\t\theroe.setPosY(229);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 1015 && heroe.getPosX() <= 1067 && heroe.getPosY() >= 7 && heroe.getPosY() <= 57 && MajinB == false) {\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Majin boo\");\n\t\t\tvillanoActual = \"Majin boo\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Majin boo: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla4.jpg\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(1020);\n\t\t\t\theroe.setPosY(106);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(1020);\n\t\t\t\theroe.setPosY(106);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}else if(heroe.getPosX() >= 222 && heroe.getPosX() <= 294 && heroe.getPosY() >= 480 && heroe.getPosY() <= 560 && Cell == false) {\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Cell\");\n\t\t\tvillanoActual = \"Cell\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Cell: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla.jpg\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(364);\n\t\t\t\theroe.setPosY(583);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(364);\n\t\t\t\theroe.setPosY(583);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}else if(heroe.getPosX() >= 900 && heroe.getPosX() <= 988 && heroe.getPosY() >= 314 && heroe.getPosY() <= 421) {\n\t\t\t\n\t\t\theroe.setPosX(956);\n\t\t\theroe.setPosY(484);\n\t\t\t\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Qué deseas hacer \" + ven.getNombreUsuario() + \"?\" + \"\\n\" + \"a) Guardar puntaje\" + \"\\n\" + \"b) Ver información de los personajes\" + \"\\n\" + \"c) Ver puntajes\");\n\t\t\tif(respuesta.equalsIgnoreCase(\"a\")) {\n\t\t\t\t\n\t\t\t\tven.guardarPuntaje();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else if(respuesta.equalsIgnoreCase(\"c\")){\n\t\t\t\tven.cargarPuntajes();\n\t\t\t\tven.visualizarPuntajes();\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\n\t\t\t\tString per = JOptionPane.showInputDialog(this, \"¿De qué personaje deseas ver la información \" + ven.getNombreUsuario() + \"\\n\" + \"a) Goku\" + \"\\n\" + \"b) Roshi\" + \"\\n\" + \"c) Vegeta\" + \"\\n\" + \"d) Freezer\" + \"\\n\" + \"e) Cell\" + \"\\n\" + \"f) Majin boo\" + \"\\n\" + \"g) Broly\");\n\t\t\t\t\n\t\t\t\tif(per.equalsIgnoreCase(\"a\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Goku\");\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Roshi\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"c\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Vegeta\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"d\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Freezer\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"e\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Cell\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"f\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Majin boo\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"g\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Broly\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\ttry {\n\t\t\t\t\tthrow new CaracterEquivocadoException();\n\t\t\t\t} catch (CaracterEquivocadoException 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\n\t\t\t\n\t\t}\n\t\t\n\t}", "public Torretta1(int danno, int x, int y, ArrayList<Proiettile> proiettili) {\r\n super();\r\n velocitàAttacco = 5000;\r\n attacco = danno;\r\n this.proiettili = proiettili;\r\n this.x = x * 40;\r\n this.y = y * 40 - 40;\r\n range = new Ellipse2D.Double();\r\n range.setFrame(this.x - 40, this.y - 40, 119, 119);\r\n temposparo = 200;\r\n finestrasparo = 0;\r\n costoAcquisto = 10;\r\n tipo='a';\r\n }", "RealLocalizable getPosition();", "@Override\n public void onDirectionSuccess(List<Points> point) {\n for (Points points:point){\n PolylineOptions polyLineOptions = new PolylineOptions().geodesic(true).color(Color.BLUE\n ).width(15);\n for (int i = 0; i < points.points.size(); i++)\n polyLineOptions.add(points.points.get(i));\n\n polylinePaths.add(mMap.addPolyline(polyLineOptions));\n\n }\n\n }", "@Override\r\n public void act() \r\n {\n int posx = this.getX();\r\n int posy = this.getY();\r\n //calculamos las nuevas coordenadas\r\n int nuevox = posx + incx;\r\n int nuevoy = posy + incy;\r\n \r\n //accedemos al mundo para conocer su tamaño\r\n World mundo = this.getWorld();\r\n if(nuevox > mundo.getWidth())//rebota lado derecho\r\n {\r\n incx = -incx;\r\n }\r\n if(nuevoy > mundo.getHeight())//rebota en la parte de abajo\r\n {\r\n incy = -incy;\r\n }\r\n \r\n if(nuevoy < 0)//rebota arriba\r\n {\r\n incy = -incy;\r\n }\r\n if(nuevox < 0)//rebota izquierda\r\n {\r\n incx = -incx;\r\n }\r\n //cambiamos de posicion a la pelota\r\n this.setLocation(nuevox,nuevoy);\r\n }", "private static boolean poserTapis(){\n\t\tSystem.out.println(\"Choisisser une premiere case pour poser la premiere partie du tapis\");\n\t\tint premiereCaseTapis = console.obtenirDirection();\n\t\tint direction = premiereCaseTapis;\n\t\tint posXTapis = 0, posYTapis = 0;\n\n\t\t//Pose du premier carre de tapis\n\t\ttry{\n\t\t\tif(premiereCaseTapis == 1){\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()-2][jeu.getAssam().getYPion()-1].setCouleurTapis(tour);\n\t\t\t\tposXTapis = jeu.getAssam().getXPion()-2;\n\t\t\t\tposYTapis = jeu.getAssam().getYPion()-1;\n\t\t\t}\n\n\t\t\telse if(premiereCaseTapis == 2){\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()][jeu.getAssam().getYPion()-1].setCouleurTapis(tour);\n\t\t\t\tposXTapis = jeu.getAssam().getXPion();\n\t\t\t\tposYTapis = jeu.getAssam().getYPion()-1;\n\t\t\t}\n\n\t\t\telse if(premiereCaseTapis == 3){\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()-1][jeu.getAssam().getYPion()-2].setCouleurTapis(tour);\n\t\t\t\tposYTapis = jeu.getAssam().getYPion()-2;\n\t\t\t\tposXTapis = jeu.getAssam().getXPion()-1;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()-1][jeu.getAssam().getYPion()].setCouleurTapis(tour);\n\t\t\t\tposYTapis = jeu.getAssam().getYPion();\n\t\t\t\tposXTapis = jeu.getAssam().getXPion()-1;\n\t\t\t}\n\n\t\t} catch (ArrayIndexOutOfBoundsException e){\n\t\t\tconsole.afficherImpossiblePoserTapis();\n\t\t\treturn false;\n\t\t}\n\n\n\n\n\t\tconsole.afficherJeu();\n\t\tSystem.out.println(\"Choisissez la deuxieme case\");\n\n\t\t//Pose du second petit carre de tapis\n\t\twhile(true){\n\t\t\tint d = console.obtenirDirection();\n\t\t\t//pour ne pas faire de demi tour ou erreur de d\n\t\t\tif(direction == 1 && d == 2 || direction == 2 && d == 1 || direction == 3 && d == 4 || direction == 4 && d == 3 || d<1 || d>4){\n\t\t\t\tconsole.afficherImpossibleChoisirDirection();\n\t\t\t} else {\n\t\t\t\ttry{\n\t\t\t\t\tif(d == 1){\n\t\t\t\t\t\tjeu.cases[posXTapis-1][posYTapis].setCouleurTapis(tour);\n\t\t\t\t\t}\n\n\t\t\t\t\telse if(d == 2){\n\t\t\t\t\t\tjeu.cases[posXTapis+1][posYTapis].setCouleurTapis(tour);\n\t\t\t\t\t}\n\n\t\t\t\t\telse if(d == 3){\n\t\t\t\t\t\tjeu.cases[posXTapis][posYTapis-1].setCouleurTapis(tour);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tjeu.cases[posXTapis][posYTapis+1].setCouleurTapis(tour);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tconsole.afficherImpossiblePoserTapis();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\tjeu.getJoueurs()[tour-1].useTapis();\n\t\treturn true;\n\n\n\t}", "public void addPoint() {\n points += 1;\n }", "void addTextureCoordinate(Vector t);", "void setTranslation(int objIndex,Vector3f trans){\n look[objIndex].setTranslation(trans);\n usedTrans.set(objIndex);\n }", "public static Points createEntity() {\n Points points = new Points()\n .date(DEFAULT_DATE)\n .exercise(DEFAULT_EXERCISE)\n .meals(DEFAULT_MEALS)\n .alcohol(DEFAULT_ALCOHOL)\n .notes(DEFAULT_NOTES);\n return points;\n }", "public void tetraederzeichnen(double ax,double ay,double bx,double by,double cx,double cy,double dx,double dy){\n double[][] arr_koordinaten_2d ={{ax,ay},{bx,by},{cx,cy},{dx,dy}};\n /**\n * Aufruf der Methode gestricheltodernicht\n *\n * Überprüft, welche Strecken von Punkt D sichtbar sind oder nicht.\n */\n\n boolean[] strichelnodernicht = cls_berechnen.gestricheltodernicht(arr_koordinaten_2d);\n\n /**Skaliert die Koordinaten zum Pixelformat mit Koordinatenursprung\n * ca in der Mitte der Zeichenfläche*/\n int sw=9; //skalierungswert\n ax= (sw+ax)*50;\n ay=(sw-ay)*50;\n bx= (sw+bx)*50;\n by=(sw-by)*50;\n cx= (sw+cx)*50;\n cy=(sw-cy)*50;\n dx= (sw+dx)*50;\n dy=(sw-dy)*50;\n\n /**\n * Erstellt Linienobjekte für die Kanten des Tetraeder Objekts...\n */\n Line line1 = new Line();\n Line line2 = new Line();\n Line line3 = new Line();\n Line line4 = new Line();\n Line line5 = new Line();\n Line line6 = new Line();\n\n /**\n * ... weißt ihnen die Koordinaten zu...\n */\n line1.setStartX(ax);\n line1.setStartY(ay);\n line1.setEndX(bx);\n line1.setEndY(by);\n\n line2.setStartX(ax);\n line2.setStartY(ay);\n line2.setEndX(cx);\n line2.setEndY(cy);\n\n line3.setStartX(bx);\n line3.setStartY(by);\n line3.setEndX(cx);\n line3.setEndY(cy);\n \n line4.setStartX(dx);\n line4.setStartY(dy);\n line4.setEndX(ax);\n line4.setEndY(ay);\n\n line5.setStartX(dx);\n line5.setStartY(dy);\n line5.setEndX(bx);\n line5.setEndY(by);\n\n line6.setStartX(dx);\n line6.setStartY(dy);\n line6.setEndX(cx);\n line6.setEndY(cy);\n \n if(!strichelnodernicht[0]){\n line4.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[1]){\n line5.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[2]){\n line6.getStrokeDashArray().addAll(5d,5d);}\n\n /**\n * ... und fügt die Linien Objekte der Zeichenfläche hinzu\n */\n canvaspane.getChildren().add(line1);\n canvaspane.getChildren().add(line2);\n canvaspane.getChildren().add(line3);\n canvaspane.getChildren().add(line4);\n canvaspane.getChildren().add(line5);\n canvaspane.getChildren().add(line6);\n\n //zeichnet den Koordinatenursprung neu\n canvaspane.getChildren().add(l1);\n canvaspane.getChildren().add(l2);\n }", "private void addPoint(View view) {\n\n if( null == imgNode1 || null == imgNode2)\n {\n\n Toast.makeText(MainActivity.this, \"Scan the references\", Toast.LENGTH_SHORT).show();\n return;\n\n }\n\n Toast.makeText(MainActivity.this, \"Added point\", Toast.LENGTH_SHORT).show();\n\n\n\n Node n1 = new Node();\n n1.setRenderable(model);\n\n\n n1.setWorldPosition(new Vector3(0,0,0));\n arSceneView.getScene().addChild(n1);\n\n Description p = new Description();\n p.setNode(n1);\n //The position of the new point is the difference between point reference and marker position. This helps to update the position whether the origin marker is changed\n p.setPos(Vector3.subtract(mov2imgNode,imgNode1.getWorldPosition()));\n listElements.add(p);\n if(listElements.size()>1) {\n Description last = listElements.get(listElements.size()-1);\n Vector3 ori = imgNode1.getWorldPosition();\n Description penultimate = listElements.get(listElements.size()-2);\n last.setBefore_pos(penultimate.getPos());\n last.setDistance(distanceTwoPoints(Vector3.add(ori, last.getPos()), Vector3.add(ori, penultimate.getPos())));\n last.setDir(directionTwoPoints(Vector3.add(ori, penultimate.getPos()), Vector3.add(ori, last.getPos())));\n drawLine(Vector3.add(ori, penultimate.getPos()), Vector3.add(ori, last.getPos()), last.getNode());\n ViewRenderable.builder().setSizer(new DpToMetersViewSizer(this.labelsSize))\n .setView(arSceneView.getContext(), R.layout.controls)\n .build()\n .thenAccept(viewRenderable -> addNodeToScene( last.getNode(),viewRenderable,last.getDistance()))\n .exceptionally(throwable -> {\n Toast.makeText(arSceneView.getContext(), \"Error:\" + throwable.getMessage(), Toast.LENGTH_LONG).show();\n return null;\n }\n\n );\n }\n }", "public CoordenadasDTO asignarCoordenadas(){\n logger.debug(\"MensajeService::asignarCoordenadas()\");\n CoordenadasDTO coordenadas = new CoordenadasDTO();\n try {\n if(listaNave != null && !listaNave.isEmpty()){\n double posicion [][] = new double [listaNave.size()][];\n double distances[] = obtenerDistancias(listaNave);\n for(int i = 0; i<listaNave.size(); i++){\n switch (listaNave.get(i).getName()){\n case \"kenobi\":\n posicion[i] = posiciones[0];\n break;\n\n case \"skywalker\":\n posicion[i] = posiciones[1];\n break;\n\n case \"solo\":\n posicion[i] = posiciones[2];\n break;\n }\n }\n NonLinearLeastSquaresSolver trilateracion = new NonLinearLeastSquaresSolver(new TrilaterationFunction(posicion, distances), new LevenbergMarquardtOptimizer());\n LeastSquaresOptimizer.Optimum optimum = trilateracion.solve();\n double centroid[] = optimum.getPoint().toArray();\n coordenadas.setY(centroid[1]);\n coordenadas.setX(centroid[0]);\n }\n } catch (Exception e){\n\n }\n return coordenadas;\n }", "Vaisseau_occupeLaPosition createVaisseau_occupeLaPosition();", "public void givePlayerPoints(int pointsToAdd) {\n this.points = this.points + pointsToAdd;\n }", "public void setP1Van() {\n p1Points.setText(\"Ad\");\n }", "public void movimiento(Point inicio,Point llegada, String color, int nomFicha){\n \n /*if(this.tablero[inicio.x][inicio.y]==0){\n JOptionPane.showMessageDialog(null, \"no hay nada en esa posición\");\n }*/\n \n this.tablero[inicio.x][inicio.y]=0;\n this.tablero[llegada.x][llegada.y]=nomFicha;\n if (color==\"blanco\"){\n this.posiBlancas[inicio.x][inicio.y]=0;\n this.posiBlancas[llegada.x][llegada.y]=nomFicha;\n this.posiNegras[llegada.x][llegada.y]=0;\n }else{\n this.posiNegras[inicio.x][inicio.y]=0;\n this.posiNegras[llegada.x][llegada.y]=nomFicha;\n this.posiBlancas[llegada.x][llegada.y]=0;\n }\n\n }", "public void setPoints(int points)\n\t{\n\t\tthis.points = points;\n\t}", "void updateStepCoordiantes(){\n if(xIncreasing) {\n lat = lat + STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat + STEP_LENGTH*yCompMotion*degToMRatio;\n }\n else{\n lat = lat - STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat - STEP_LENGTH*yCompMotion*degToMRatio;\n }\n if(yIncreasing) {\n lon = lon + STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon + STEP_LENGTH*xCompMotion*degToMRatio;\n }\n else{\n lon = lon - STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon - STEP_LENGTH*xCompMotion*degToMRatio;\n }\n }", "public void ajouterPoints(String s, Alphabet al) {\n\n\t\tint points_rapportes = 0;\n\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\tchar caractere = s.charAt(i);\n\t\t\tString cast_caractere = caractere + \"\";\n\t\t\tint valeur_caractere = al.getAlphabet().get(cast_caractere);\n\t\t\tpoints_rapportes += valeur_caractere;\n\t\t}\n\n\t\tint points_actuels = this.getPoints();\n\t\tthis.setPoints(points_actuels + points_rapportes);\n\t}", "public void addPoints(List<Point2D> points);" ]
[ "0.6351686", "0.6309013", "0.62257403", "0.6054044", "0.6012565", "0.59984237", "0.59927607", "0.59630007", "0.59552574", "0.5913813", "0.58059084", "0.5793192", "0.5720852", "0.5704597", "0.5635449", "0.56276464", "0.5626223", "0.5575867", "0.5556145", "0.5538216", "0.55350655", "0.5515016", "0.55006075", "0.54963", "0.54902226", "0.5490084", "0.5485093", "0.54823184", "0.5466112", "0.5441928", "0.5438895", "0.54354775", "0.5433034", "0.5424737", "0.54082185", "0.54072416", "0.538758", "0.5376856", "0.5371485", "0.53694934", "0.5357132", "0.5356761", "0.5348349", "0.5344626", "0.53410655", "0.5336782", "0.5318941", "0.53186876", "0.53177506", "0.53101873", "0.53047174", "0.52882016", "0.5269285", "0.52418816", "0.523706", "0.52343863", "0.5229387", "0.52279496", "0.52235264", "0.52188414", "0.52146214", "0.52055395", "0.5201521", "0.5193965", "0.5193265", "0.5193189", "0.5190048", "0.51866865", "0.5183523", "0.51807773", "0.51780736", "0.5175661", "0.517171", "0.5167853", "0.5165776", "0.51657426", "0.51654", "0.51634234", "0.51597416", "0.5156381", "0.5154369", "0.5148129", "0.5142367", "0.5140513", "0.5138682", "0.51374304", "0.51361656", "0.5135566", "0.5129772", "0.5122576", "0.51170367", "0.5115461", "0.5115391", "0.5111807", "0.51100826", "0.5104939", "0.51046294", "0.5101354", "0.50992316", "0.5098473" ]
0.5870891
10
========================================================================= GETTERS & SETTERS =========================================================================
public int getHttpCode() { return httpCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "String setValue();", "@Override\n public void get() {}", "protected abstract Set method_1559();", "public int\t\tget() { return value; }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "@Override\n String get();", "public int getSet() {\n return set;\n }", "public Object get()\n {\n return m_internalValue;\n }", "private void assignment() {\n\n\t\t\t}", "public void setdat()\n {\n }", "public String get();", "public String setter() {\n\t\treturn prefix(\"set\");\n\t}", "public void get() {\n }", "public void setAge(int age) { this.age = age; }", "public Object getValue() { return _value; }", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "@Override\n public Object getValue()\n {\n return value;\n }", "public String get()\n {\n return this.string;\n }", "public V get() {\n return value;\n }", "public abstract String get();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public Object getValue() { return this.value; }", "public String get() {\n return value;\n\t}", "public Object getValue(){\n \treturn this.value;\n }", "public int get () { return rating; }", "public int value() { \n return this.value; \n }", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "public Object getValue()\n {\n\treturn value;\n }", "public String getValue() {\n/* 99 */ return this.value;\n/* */ }", "@Override\r\n\tpublic String get() {\n\t\treturn null;\r\n\t}", "public Value getSetValue() {\n\t\treturn set_value_;\n\t}", "protected Object doGetValue() {\n\t\treturn value;\n\t}", "public String get() {\n return this.value;\n }", "public final Object get() {\n return getValue();\n }", "public void setX(int x) { this.x=x; }", "@Test\r\n\tpublic void testGettersSetters()\r\n\t{\r\n\t\tPerson p = new Person(42);\r\n\t\tp.setDisplayName(\"Fred\");\r\n\t\tassertEquals(\"Fred\", p.getFullname());\r\n\t\tp.setPassword(\"hunter2\");\r\n\t\tassertEquals(\"hunter2\", p.getPassword());\r\n\t\tassertEquals(42, p.getID());\r\n\t}", "public void setValue(Object value) { this.value = value; }", "public int getValue() {\n/* 450 */ return this.value;\n/* */ }", "@Override\n public int getValue() {\n return super.getValue();\n }", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "public String get()\n {\n return val;\n }", "public void set() {\r\n\t\tage = 19;\r\n\t\tname = \"ΎΛ·»\";\r\n\t\theight = 161;\r\n\t\tsetWeight(50);\r\n\t\tSystem.out.println(getWeight());\r\n\t}", "@Override\n\tpublic String get() {\n\t\treturn null;\n\t}", "public Value makeSetter() {\n Value r = new Value(this);\n r.setters = object_labels;\n r.object_labels = null;\n return canonicalize(r);\n }", "public int getAge() {return age;}", "public int getlife(){\r\n return life;\r\n}", "boolean getSet();", "public Object getNewValue()\n {\n return newValue;\n }", "@Override\n\tpublic void set() {\n\t\tSystem.out.println(\"A==========set\");\n\t}", "public Value getValue(){\n return this.value;\n }", "public int getValue() \n {\n return value;\n }", "@Test\n public void testSongGettersSetters() {\n Integer id = 4;\n String title=\"title\",uri = \"uri\";\n\n Song song = new Song();\n song.setId(id);\n song.setTitle(title);\n song.setUri(uri);\n\n assertEquals(\"Problem with id\",id, song.getId());\n assertEquals(\"Problem with title\",title, song.getTitle());\n assertEquals(\"Problem with uri\",uri, song.getUri());\n }", "@Override\n\tpublic void initValue() {\n\t\t\n\t}", "public int getAge(){\n return age;\n }", "protected void setValue(T value) {\r\n this.value = value;\r\n }", "@Before(order=0)\n\tpublic void getProperty() {\n\t\tconfigReader = new ConfigReaders();\n\t\tprop = configReader.init_prop();\n\t\t\n\t}", "public int getValue(){\n return this.value;\n }", "String get();", "String get();", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "public S getValue() { return value; }", "@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}", "public void set(String name, Object value) {\n }", "int getBlue(){\n\n return this.blue;\n }", "@Override\n public int get()\n { \n return this.pr;\n }", "V getValue() {\n return value;\n }", "void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}", "private void setData() {\n\n }", "public byte[] get(){\n return this.value;\n }", "@Test\n public void setAndGetTest() {\n GameEntity t2 = new GameEntity(new Rectangle(10.0, 10.0));\n\n //Set and getting temp node\n t2.getView().setTranslateX(5.0);\n t2.getView().setTranslateY(5.0);\n Circle temp = new Circle(4);\n t2.setView(temp);\n assertEquals(\"Expected view to be changed\", temp, t2.getView());\n\n //Testing the alive and dead of the object\n t2.setAlive(false);\n assertEquals(\"Expected the object state to be set to dead.\", false, t2.isAlive());\n assertEquals(\"Expected the reverse of object state to be set to alive.\", true, t2.isDead());\n }", "@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }", "public int value(){\n return this.value;\n }", "@Test\r\n\tpublic void gettersSettersTest() {\r\n\t\tItem item = new Item();\r\n\t\titem.setCount(NUMBER);\r\n\t\tassertEquals(item.getCount(), NUMBER);\r\n\t\titem.setDescription(\"word\");\r\n\t\tassertEquals(item.getDescription(), \"word\");\r\n\t\titem.setId(NUMBER);\r\n\t\tassertEquals(item.getId(), NUMBER);\r\n\t\titem.setName(\"word\");\r\n\t\tassertEquals(item.getName(), \"word\");\r\n\t\titem.setPicture(\"picture\");\r\n\t\tassertEquals(item.getPicture(), \"picture\");\r\n\t\titem.setPrice(FLOATNUMBER);\r\n\t\tassertEquals(item.getPrice(), FLOATNUMBER, 0);\r\n\t\titem.setType(\"word\");\r\n\t\tassertEquals(item.getType(), \"word\");\r\n\t\titem.setSellerId(NUMBER);\r\n\t\tassertEquals(item.getSellerId(), NUMBER);\r\n\t\titem.setDeleted(false);\r\n\t\tassertEquals(item.isDeleted(), false);\r\n\t\titem.setDeleted(true);\r\n\t\tassertEquals(item.isDeleted(), true);\t\t\r\n\t}", "public int getValue(){\n return value;\n }", "String getValue() {\n return mValue;\n }", "@Override\n\tprotected void setValueOnUi() {\n\n\t}", "@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "public String getSetter() {\n return \"set\" + getCapName();\n }", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "@Override\n public String getValue() {\n return value;\n }", "public int getAge()\r\n {\r\n return age;\r\n }", "@Override\n\tpublic void set(T e) {\n\t\t\n\t}", "public int value() \n {\n return value;\n }", "protected void storeCurrentValues() {\n }", "public void setRes(){\r\n \r\n }", "public Book getBook() \t\t{ return this.myBook; }", "@Test\n public void setterTest() {\n stack.setResource(10, ResourceType.SHIELDS);\n stack.setResource(20, ResourceType.SERVANTS);\n stack.setResource(30, ResourceType.COINS);\n stack.setResource(40, ResourceType.STONES);\n\n assertEquals(10, stack.getResource(ResourceType.SHIELDS));\n assertEquals(20, stack.getResource(ResourceType.SERVANTS));\n assertEquals(30, stack.getResource(ResourceType.COINS));\n assertEquals(40, stack.getResource(ResourceType.STONES));\n }", "@Test\n public void testGetSets() {\n ref.setKey(\"test23\");\n assertEquals(\"test23\", ref.getKey());\n ref.setAuthor(\"test23\");\n assertEquals(\"test23\", ref.getAuthor());\n ref.setEditor(\"test23\");\n assertEquals(\"test23\", ref.getEditor());\n ref.setTitle(\"test23\");\n assertEquals(\"test23\", ref.getTitle());\n ref.setBooktitle(\"test23\");\n assertEquals(\"test23\", ref.getBooktitle());\n ref.setYear(\"1839\");\n assertEquals(\"1839\", ref.getYear());\n ref.setPublisher(\"Otava\");\n assertEquals(\"Otava\", ref.getPublisher());\n ref.setJournal(\"test23\");\n assertEquals(\"test23\", ref.getJournal());\n ref.setVolume(\"3\");\n assertEquals(\"3\", ref.getVolume());\n ref.setNumber(\"123\");\n assertEquals(\"123\", ref.getNumber());\n ref.setSeries(\"test23\");\n assertEquals(\"test23\", ref.getSeries());\n ref.setEdition(\"3rd\");\n assertEquals(\"3rd\", ref.getEdition());\n ref.setPages(\"12-35\");\n assertEquals(\"12-35\", ref.getPages());\n ref.setMonth(\"May\");\n assertEquals(\"May\", ref.getMonth());\n ref.setNote(\"test23\");\n assertEquals(\"test23\", ref.getNote());\n }", "public void setValue(T value) {\n/* 89 */ this.value = value;\n/* */ }", "public abstract void setValue(T value);", "private ReadProperty()\r\n {\r\n\r\n }", "protected V getValue() {\n return this.value;\n }", "public void setAge(int age);", "public void setValue(S s) { value = s; }", "@Test\n\tpublic void get_test()\n\t{\n\t\tb.set(1,2,'x');\n\t\tassertEquals(b.get(1,2),'x');\n\t}", "@Override\n\t\t\tpublic String getValue() {\n\t\t\t\treturn value;\n\t\t\t}" ]
[ "0.657703", "0.6449824", "0.64442474", "0.64404577", "0.62172633", "0.6183475", "0.6168504", "0.6168504", "0.61240995", "0.60714406", "0.60444874", "0.59874547", "0.5973332", "0.59726346", "0.5954604", "0.5950236", "0.59339654", "0.59257454", "0.587815", "0.5858975", "0.58482105", "0.58470345", "0.5844784", "0.58338356", "0.5830814", "0.5828341", "0.58170426", "0.58129597", "0.58118373", "0.5811598", "0.57923913", "0.5787067", "0.5763217", "0.5741179", "0.5734573", "0.5721144", "0.5713736", "0.57073295", "0.5704932", "0.5702172", "0.5701899", "0.5700889", "0.56971496", "0.5693512", "0.5692977", "0.5691228", "0.5686866", "0.5675562", "0.56699514", "0.5666085", "0.566393", "0.5656523", "0.565204", "0.56443423", "0.56424046", "0.56359994", "0.5625478", "0.5614801", "0.5614692", "0.5612187", "0.56104785", "0.56104785", "0.5609976", "0.5609976", "0.56022006", "0.5600121", "0.559732", "0.55945706", "0.55901915", "0.55897164", "0.5585408", "0.5582746", "0.5578727", "0.55710584", "0.5566423", "0.5563143", "0.5557818", "0.55524516", "0.55520844", "0.5550623", "0.55468446", "0.5544257", "0.55392206", "0.55379343", "0.5535083", "0.55313975", "0.55313647", "0.55305064", "0.5526739", "0.5525142", "0.55250853", "0.5519098", "0.5513591", "0.55115855", "0.5510771", "0.55047816", "0.5496636", "0.5495103", "0.54933584", "0.5490922", "0.54886585" ]
0.0
-1
Since motors are initialized in this class, they can be cleaned and closed in this class when exiting the arbitrator, clean and close are made for the CloseAndExit class
public static void cleanMotor(RMIRegulatedMotor motor) throws RemoteException { System.out.println("Cleanup: Closing Motors"); closeMotor(motor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearMotors() {\n\t\tmotors.clear();\n\t}", "public void closeArms() {\n\t\tleftArmMotor.setSpeed(100);\n\t\trightArmMotor.setSpeed(100);\n\t\t\n\t\trightArmMotor.rotate(80, true);\n\t\tleftArmMotor.rotate(80, false);\n\t}", "public void stopMotors() {\n\t\tRobotMap.frontLeft.set(0);\n\t\tRobotMap.backLeft.set(0);\n\t\tRobotMap.frontRight.set(0);\n\t\tRobotMap.backRight.set(0);\n\t}", "public MotorController() {\n\t\tresetTachometers();\n\t}", "public void stopMotors(){\n\t\tsynchStop(MMXCOMMAND_BRAKE);\n\t}", "@Override\n protected void end() {\n sClimber.setMotorSpeed(0);\n sIntake.StopWrist();\n sElevator.StopMotors();\n RobotMap.WristMotor.config_kD(0, Constants.kElevatorDGain);\n RobotMap.WristMotor.config_kP(0, Constants.kElevatorPGain);\n RobotMap.WristMotor.config_kI(0, Constants.kElevatorIGain);\n }", "@Override\n public void finish() {\n ((MotorController)master).stopMotor();\n }", "public void robotDestroy() {\n }", "public void mo475j() {\r\n try {\r\n this.f1761e = null;\r\n this.f1762f = null;\r\n this.f1763g = null;\r\n } catch (Throwable th) {\r\n az.m3143a(th, \"ArcDelegateImp\", \"destroy\");\r\n th.printStackTrace();\r\n Log.d(\"destroy erro\", \"ArcDelegateImp destroy\");\r\n }\r\n }", "public void release(){\n\t\tthis.motor.forward();\n\t}", "private void cleaningBallot() {\n\t\tturnLeft();\n\t\tmove();\n\t\tgrabStrayBeepers();\n\t\tturnAround();\n\t\tmove();\n\t\tmove();\n\t\tgrabStrayBeepers();\n\t}", "public CurrentRobotState() {\r\n currentPos = new RobotCoordinates();\r\n motorState = new Motor();\r\n reInitialize();\r\n }", "protected void end() {\n \tRobot.chassisSubsystem.setShootingMotors(0);\n }", "public void finalize() {\n\n if (mBtManager != null) {\n //mBtManager.stop();\n mBtManager.setHandler(null);\n }\n mBtManager = null;\n mContext = null;\n mConnectionInfo = null;\n }", "public void stop() {\n climberMotors.stopMotor();\n }", "public void completeStop(){\n motorFrontLeft.setPower(0);\n motorFrontRight.setPower(0);\n motorBackLeft.setPower(0);\n motorBackRight.setPower(0);\n }", "public void teleopInit() {\n armTask.stop();\n driveTask.stop();\n armTask2.stop();\n getRobotDrive().stop();\n driveState = TELEOP;\n armState = TELEOP;\n\n }", "@Override\n\tpublic void cleanUp() {\n\t\tofferingStrategy = null;\n\t\tacceptConditions = null;\n\t\topponentModel = null;\n\t\tnegotiationSession = null;\n\t\tutilitySpace = null;\n\t\tdagent = null;\n\t}", "@Override\n public void end(boolean interrupted) {\n conveyor.setConveyorMotors(0, 0, 0, 0);\n }", "public static void stopAllMotors() {\r\n\t\tleftMotorReg.stop(true);\r\n\t\trightMotorReg.stop(true);\r\n\t\tarmMotor1Reg.stop(true);\r\n\t\tarmMotor2Reg.stop(true);\r\n\t}", "@Override\n public void init() {\n robot = new MecanumBotHardware(true,true,true,true);\n robot.init(hardwareMap);\n int deg180=845;\n // Create the state machine and configure states.\n smDrive = new StateMachine(this, 16);\n smDrive.addStartState(new WaitState(\"wait\",0.1,\"MainDriveTeleop\"));\n smDrive.addState(new GigabyteTeleopDriveState(\"MainDriveTeleop\", robot));\n smDrive.addState(new SpinPose(\"90DegSpin\",(int)(deg180*0.5),robot,0.1f));\n smDrive.addState(new SpinPose(\"180DegSpin\",deg180,robot,0.1f));\n smDrive.addState(new SpinPose(\"270DegSpin\",(int)(deg180*1.5),robot,0.1f));\n\n smArm = new StateMachine(this, 16);\n smArm.addStartState(new WaitState(\"wait\",0.1,\"MainArmTeleop\"));\n smArm.addState(new GigabyteTeleopArmState(\"MainArmTeleop\", robot));\n smArm.addState(new ShoulderPose(\"Pose1\", robot,0, \"MainArmTeleop\"));//0.12\n smArm.addState(new ShoulderPose(\"Pose2\", robot,1079, \"MainArmTeleop\"));//0.05\n smArm.addState(new ShoulderPose(\"Pose3\", robot,2602, \"MainArmTeleop\"));//-0.17\n smArm.addState(new ShoulderPose(\"Pose4\", robot,3698, \"MainArmTeleop\" ));//-0.35\n // Init the state machine\n smDrive.init();\n smArm.init();\n }", "@Override\n protected void end() {\n armPID_SetZero.disable();\n armPID_SetZero.armMotor.set(0);\n }", "public Motor() {\n reInitialize();\n }", "@Override\n public final void stopMotor() {\n stop();\n }", "public OI(){\n\t\t\n\t//\tc6.whenPressed(new dumpFlapOpen());\n\t\t//c8.whenPressed(new dumpFlapClose()); \n//\t\tl7.whenPressed(new dumpFlapOpen());\n//\n//\t\tx3.whileHeld(new hopperCoil());\n//\t\tx1.whileHeld(new hopperUnCoil());\n//\t\tx2.whileHeld(new climber());\n//\t\tx0.whenPressed(new climberReset());\n//\t\tx8.toggleWhenPressed(new cameraOneInit());\n//\t\tx9.toggleWhenPressed(new cameraTwoInit());\n//\n//\t\tr1.toggleWhenPressed(new driveBaseSwitchDirections());\n\t\t//l1.toggleWhenPressed(new visionSwitchCameras());\n\t\t\n\t\t/* logitech controller */\n\t\tc6.whenPressed(new dumpFlapOpen());\n\t\tc8.whenPressed(new dumpFlapClose()); \n\t\tl7.whenPressed(new dumpFlapOpen());\n\n\t\tc4.whileHeld(new hopperCoil());\n\t\tc3.whileHeld(new hopperUnCoil());\n\t\tc1.whileHeld(new climber());\n\t\tc2.whenPressed(new climberReset());\n\t\tc11.toggleWhenPressed(new cameraOneInit());\n\t\tc12.toggleWhenPressed(new cameraTwoInit());\n\n\t\tr1.toggleWhenPressed(new driveBaseSwitchDirections());\n\t\tl1.toggleWhenPressed(new visionSwitchCameras());\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/* TRASH CONTROLS */\n\t\t//l7.whenPressed(new resetClimberBoolean());\n\t\t//r1.whenPressed(new visionSwitchCameras());\n//\t\tl1.whenPressed(new visionSwitchCameras());\n\t\t//r1.whenActive(new visionSwitchCameras());\n//\t\tc9.whenPressed(new intakeFlapOpen());\n//\t\tc10.whenPressed(new intakeFlapClose()); \n\t\t\n//\t\tc5.whenPressed(new pushGearOut());\n//\t\tc7.whenPressed(new pushGearIn()); \n\t\t\n//\t\tc5.whenActive(new pushGearOut());\n//\t\tc7.whenActive(new pushGearIn()); \n//\t\tc5.toggleWhenPressed(new pushGearOut());\n//\tc7.toggleWhenPressed(new pushGearIn()); \n//\n//\t\tc5.whileHeld(new pushGearOut());\n//\t\tc7.whileHeld(new pushGearIn()); \n\t}", "public void init() {\n delayingTimer = new ElapsedTime();\n\n // Define and Initialize Motors and Servos: //\n tailMover = hwMap.dcMotor.get(\"tail_lift\");\n grabberServo = hwMap.servo.get(\"grabber_servo\");\n openGrabber();\n\n // Set Motor and Servo Directions: //\n tailMover.setDirection(DcMotorSimple.Direction.FORWARD);\n\n tailMover.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n tailMover.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n int prevEncoder = tailMover.getCurrentPosition();\n tailMover.setPower(-0.15);\n mainHW.opMode.sleep (300);\n Log.d(\"catbot\", String.format(\"tail lift power %.2f current position %2d prev %2d\", tailMover.getPower(), tailMover.getCurrentPosition(),prevEncoder));\n runtime.reset();\n while((Math.abs(prevEncoder - tailMover.getCurrentPosition()) > 10)&& (runtime.seconds()<3.0)){\n prevEncoder = tailMover.getCurrentPosition();\n mainHW.opMode.sleep(300);\n Log.d(\"catbot\", String.format(\"tail lift power %.2f current position %2d prev %2d\", tailMover.getPower(), tailMover.getCurrentPosition(),prevEncoder));\n }\n tailMover.setPower(0.0);\n // Set Motor and Servo Modes: //\n tailMover.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n tailMover.setTargetPosition(0);\n tailMover.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n closeGrabber();\n }", "public void stop(){\n started = false;\n for (DcMotor motor :this.motors) {\n motor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor.setPower(0);\n }\n this.reset();\n }", "protected void end() {\n \tRobotMap.feedMotor1.set(0);\n \tRobotMap.shootAgitator.set(0);\n }", "private void stopMotors() {\n pidDrive.disable();\n pidRotate.disable();\n robot.rightDrive.setPower(0);\n robot.leftDrive.setPower(0);\n }", "public void close(){\n \tisClosed = true;\n \tClawAct.set(true);\n\t\tRobot.oi.armRumble(RUMBLE_DURATION);\n }", "protected AutonomousMode() {\n driveMotions = new Vector();\n auxMotions = new Vector();\n }", "protected void end() {\n \tRobot.conveyor.stop();\n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tLogsUtil.d(TAG, \"onDestroy\");\r\n//\t\tbagop.close();\r\n\t\tif (OLEDOperation.enable) {\r\n\t\t\tOLEDOperation.getInstance().close();\r\n\t\t}\r\n\t\t\r\n\t\tmStep = COVER_OVER;\r\n\t\tRFIDOperation.getInstance().closeRf();\r\n\t\tmBagOp = null;\r\n\t\tif(null != mUHFOp){\r\n\t\t\tLogsUtil.d(TAG, \"--close--uhf---\");\r\n\t\t\tmUHFOp.close();\r\n\t\t}\r\n\t\tmUHFOp = null;\r\n\t\tmHandler.removeCallbacksAndMessages(null);\r\n\t\tmHandler = null;\r\n\t\tsuper.onDestroy();\r\n\t}", "public OI() {\n\n pilotLS.whenPressed(new ShiftGear(Gear.HIGH));\n pilotLS.whenReleased(new ShiftGear(Gear.OFF));\n pilotRS.whenPressed(new ShiftGear(Gear.LOW));\n pilotRS.whenPressed(new ShiftGear(Gear.OFF));\n\n pilotRTrig.whileActive(new CenterBay());\n\n pilotA.whenPressed(new TrackPipeline(Pipeline.OFF));\n pilotB.whenPressed(new FlipLimelight());\n //pilotY.whenPressed(new FollowPath(Path.TO_PERPENDICULAR, false));\n pilotY.whenPressed(new PlayTrajectory(\"Test\"));\n\n pilotDpadNorth.whileHeld(new ManualClimb(1.0));\n pilotDpadSouth.whileHeld(new ManualClimb(-1.0));\n\n pilotDpadEast.whileHeld(new ClimbSequence());\n pilotDpadWest.whenPressed(new PassThrough());\n\n pilotBack.whenPressed(new KillAll());\n copilotBack.whenPressed(new KillAll());\n\n copilotA.whileHeld(new SpinIntake(1.0));\n copilotA.whenReleased(new SpinIntake(0));\n copilotB.whileHeld(new SpinIntake(-1.0));\n copilotB.whenReleased(new SpinIntake(0));\n\n copilotY.whenPressed(new FireHatch(Value.kForward));\n copilotY.whenReleased(new FireHatch(Value.kOff));\n copilotX.whenPressed(new FireHatch(Value.kReverse));\n copilotX.whenReleased(new FireHatch(Value.kOff));\n\n copilotLb.whileHeld(new WristEndGame());\n copilotLb.whenReleased(new SpinIntake(0));\n\n rbGround.whenPressed(new ToHeight(Height.HOME));\n rbHatchLow.whenPressed(new ToHeight(Height.HATCH_LOW));\n rbHatchMid.whenPressed(new ToHeight(Height.HATCH_MID));\n rbHatchHigh.whenPressed(new ToHeight(Height.HATCH_HIGH));\n rbCargoLow.whenPressed(new ToHeight(Height.CARGO_LOW));\n rbCargoMid.whenPressed(new ToHeight(Height.CARGO_MID));\n rbCargoHigh.whenPressed(new ToHeight(Height.CARGO_HIGH));\n\n copilotDpadNorth.whenPressed(new ToHeight(Height.CARGO_LOAD));\n copilotDpadSouth.whenPressed(new ToHeight(Height.CARGO_FLOOR));\n copilotDpadEast.whenPressed(new ToHeight(Height.CARGO_SHIP));\n copilotDpadWest.whenPressed(new ToHeight(Height.HATCH_LOW));\n\n }", "protected void end() {\n\t\tRobot.conveyor.Stop();\n\t}", "protected void initialize() {\n \tRobot.conveyor.stop();\n }", "public void cleanUp() {\n\t\tfor (int i = 0; i < 24; i++) {\r\n\t\t\tPlayerAssistant.itemOnInterface(c, 26099, i, -1, -1);\r\n\t\t}\r\n\t\tc.getPA().sendNewString(\"0\", 26013);\r\n\t}", "protected void end() {\n \t//Robot.motor.disable();\n \tRobot.motor.disable();\n }", "protected void end() {\n \n \tRobotMap.motorLeftOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \tRobotMap.motorLeftTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \t\n \tRobotMap.motorRightOne.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \tRobotMap.motorRightTwo.set(com.ctre.phoenix.motorcontrol.ControlMode.PercentOutput, 0);\n \t\n }", "private Grabber() {\n\t\tmotor = new CANTalon(Constants.grabberTalonMotorChannel);\n\t}", "void driveStop() {\n flMotor.setPower(0);\n frMotor.setPower(0);\n blMotor.setPower(0);\n brMotor.setPower(0);\n }", "private void MotorInit()\n {\n intake_up.configFactoryDefault();\n intake_down.configFactoryDefault();\n intake_up.configOpenloopRamp(Constants.kMotorRampRate);\n intake_down.configOpenloopRamp(Constants.kMotorRampRate);\n intake_up.setInverted(PortReversed.intake_up_reversed.value);\n intake_down.setInverted(PortReversed.intake_down_reversed.value);\n intake_up.setNeutralMode(NeutralMode.Brake);\n intake_down.setNeutralMode(NeutralMode.Brake);\n }", "public void arm_kill() {\n arm_analog(0);\n }", "public static synchronized void idleAllLiftMotors() {\r\n\t\t\tsynchronized(armStage1.motorLock) {\r\n//\t\t\t\tsynchronized(armStage2.motorLock) {\r\n\t\t\t\t\tarmStage1.motorObj.set(ControlMode.PercentOutput, 0.0);\r\n//\t\t\t\t\tarmStage1.auxMotorObj.set(ControlMode.PercentOutput, 0.0);\r\n//\t\t\t\t\tarmStage2.motorObj.set(ControlMode.PercentOutput, 0.0);\r\n\t\t\t\t\tarmStage1.operatingMode = OperatingModesE.IDLE;\r\n//\t\t\t\t\tarmStage2.operatingMode = OperatingModesE.IDLE;\r\n//\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public void destroy() {\n this.alive = false;\n }", "protected void end() {\r\n motorWithEncoder.disable();\r\n }", "void atras(){\n\t\tMotorA.stop();\n\t\tMotorB.setSpeed(700);\n\t\tMotorC.setSpeed(700);\n\t\t\n\t\tMotorB.backward();\n\t\tMotorC.backward();\n\t}", "public void setMotorBehaviors(){\n motors = new ArrayList<>();\n motors.add(rf);\n motors.add(rb);\n motors.add(lf);\n motors.add(lb);\n\n //reset motor encoders\n rf.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rb.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lf.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lb.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n relic_extension.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n //Set motor behaviors\n rf.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rf.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rb.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rb.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lf.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n lf.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lb.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n lb.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rf.setDirection(DcMotorSimple.Direction.REVERSE);\n rb.setDirection(DcMotorSimple.Direction.REVERSE);\n relic_extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n relic_extension.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n relic_extension.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n lift.setDirection(DcMotorSimple.Direction.REVERSE);\n\n //Set servo behaviors\n leftWheel2.setDirection(DcMotorSimple.Direction.REVERSE);\n rightWheel1.setDirection(DcMotorSimple.Direction.REVERSE);\n\n }", "public void destroy(){\n runner.destroy();\n }", "@Override\r\n\tprotected void destroyLogic() {\n\r\n\t}", "public void stopRobot(){\n LAM.setPower(0);\n RAM.setPower(0);\n ILM.setPower(0);\n IRM.setPower(0);\n BLM.setPower(0);\n BRM.setPower(0);\n FLM.setPower(0);\n FRM.setPower(0);\n }", "@Override\n public void teleopInit() {\n if (autonomousCommand != null) \n {\n autonomousCommand.cancel();\n }\n\n new ArcadeDrive().start();\n\n new BackElevatorControl().start();\n\n new IntakeControl().start();\n\n new FrontElevatorManual().start();\n\n new ElevatorAutomatic().start();\n }", "@Override\n\tprotected void end()\n\t{\n\t\tRobotMap.joshsPID.disable();\n\t\tRobotMap.TestingMotor.set(0.0);\n\t}", "@Override public void close() {\n\t\tthis.timer.cancel();\n\t\tthis.motionStream.removeListener(this);\n\t}", "private void cleanup(ActorRef tromboneHCD, ActorRef... a) {\n TestProbe monitor = new TestProbe(system);\n for(ActorRef actorRef : a) {\n monitor.watch(actorRef);\n system.stop(actorRef);\n monitor.expectTerminated(actorRef, timeout.duration());\n }\n\n monitor.watch(tromboneHCD);\n tromboneHCD.tell(HaltComponent, self());\n monitor.expectTerminated(tromboneHCD, timeout.duration());\n }", "protected void end() {\r\n // stop motor, reset position on the dumper, enable closed loop\r\n }", "private RightMotor() {\n\t\t// Instantiate left motor class\n\t\tmotor = new Talon(RobotMap.M_RIGHT);\n\t\tencoder = new Encoder(RobotMap.M_RIGHT_ENCODER_CW, RobotMap.M_RIGHT_ENCODER_CCW);\n\t}", "public OI() {\n\t\tgearShifter.whenActive(new SetShifterLowGear());\n\t\tgearShifter.whenInactive(new SetShifterHighGear());\n\n\t\t// ballIntakeForward.whenPressed(new BallIntakeSetForward());\n\t\t// ballIntakeReverse.whenPressed(new BallIntakeSetReverse());\n\t\t// ballIntakeStop.whenActive(new BallIntakeSetStop());\n\t\t//\n\t\t// feederForward.whenPressed(new FeederSetForward());\n\t\t// feederReverse.whenPressed(new FeederSetReverse());\n\t\t// feederStop.whenActive(new FeederSetStop());\n\t\t// //\n\t\t// flywheelForward.whenPressed(new FlywheelSetForward());\n\t\t// flywheelReverse.whenPressed(new FlywheelSetReverse());\n\t\t// flywheelStop.whenActive(new FlywheelSetStop());\n\t\t//\n\t\t// gearIntakeReverse.whileHeld(new IntakeInDown());\n\t\t// gearIntakeForward.whileHeld(new IntakeOutDown());\n\t\t// gearIntakeJoystickReverse.whileHeld(new IntakeInDown());\n\t\t// gearIntakeJoystickForward.whileHeld(new IntakeOutDown());\n\t\t// gearIntakeReverse.whenReleased(new IntakeInDownTimer());\n\t\t// gearIntakeForward.whenReleased(new IntakeOutDownTimer());\n\t\t// gearIntakeForward.whenReleased(new GearIntakeSetUp());\n\t\t// gearIntakeReverse.whenPressed(new GearIntakeSetReverse());\n\t\t// gearIntakeStop.whenActive(new GearIntakeSetStop());\n\t\t// gearIntakePosistionSwitch.whenPressed(new GearIntakeSetUp());\n\t\t// gearIntakePosistionSwitch.whenReleased(new GearIntakeSetDown());\n\t\t//\n\t\t// climber.whenPressed(new ClimberSetUp());\n\t\t// climber.whenReleased(new ClimberSetStop());\n\t\t//\n\t\t// otherShooter.whenPressed(new OtherShooterShoot());\n\t\t// otherShooter.whenReleased(new OtherShooterReset());\n\t}", "@Override\r\n public void init() {\r\n // Define and Initialize Motors\r\nFL = hardwareMap.get(DcMotor.class, \"Front Left\");\r\n FR = hardwareMap.get(DcMotor.class, \"Front Right\");\r\n BL = hardwareMap.get(DcMotor.class, \"Back Left\");\r\n BR = hardwareMap.get(DcMotor.class, \"Back Right\");\r\n\r\n\r\nFL.setDirection(DcMotor.Direction.FORWARD);\r\n FR.setDirection(DcMotor.Direction.REVERSE);\r\n BL.setDirection(DcMotor.Direction.FORWARD);\r\n BR.setDirection(DcMotor.Direction.REVERSE);\r\n // Set all motors to zero power\r\n FL.setPower(0);\r\n FR.setPower(0);\r\n BL.setPower(0);\r\n BR.setPower(0); }", "private void reset () {\n this.logic = null;\n this.lastPulse = 0;\n this.pulseDelta = 0;\n }", "public void reset() {\n // stop motors\n Motor.A.stop();\t\n Motor.A.setPower(0);\t\n Motor.B.stop();\n Motor.B.setPower(0);\t\n Motor.C.stop();\n Motor.C.setPower(0);\t\n // passivate sensors\n Sensor.S1.passivate();\n Sensor.S2.passivate();\n Sensor.S3.passivate();\n for(int i=0;i<fSensorState.length;i++)\n fSensorState[i] = false;\n }", "protected void initialize() {\n finished = false;\n Robot.shooter.Spin();//Spin up wheels\n Timer.delay(3);\n Robot.shooter.TriggerExtend();//Reset Trigger\n Timer.delay(.2);\n Robot.shooter.FeederExtend();//Drop Frisbee\n Timer.delay(1.5);\n Robot.shooter.TriggerRetract();//Fire frisbee\n Timer.delay(.2);\n Robot.shooter.FeederRetract();//Reset Feeder\n Timer.delay(.4);\n \n Robot.shooter.TriggerExtend();//Reset Trigger\n Timer.delay(.2);\n Robot.shooter.FeederExtend();//Drop Frisbee\n Timer.delay(1.5);\n Robot.shooter.TriggerRetract();//Fire frisbee\n Timer.delay(.2);\n Robot.shooter.FeederRetract();//Reset Feeder\n Timer.delay(.4);\n \n Robot.shooter.TriggerExtend();//Reset Trigger\n Timer.delay(.2);\n Robot.shooter.FeederExtend();//Drop Frisbee\n Timer.delay(1.5);\n Robot.shooter.TriggerRetract();//Fire frisbee\n Timer.delay(.2);\n Robot.shooter.FeederRetract();//Reset Feeder\n Timer.delay(.4);\n //Robot.shooter.Stop();\n Robot.shooter.TriggerExtend();//Reset Trigger\n \n Robot.driveTrain.DriveBack();//Drives backwards from pyramid\n Timer.delay(1.5);\n Robot.driveTrain.TurnAround();//Turns Bob around\n Timer.delay(1);\n Robot.driveTrain.Stop();//Stops Bob\n \n Robot.pneumatics.CompressorOn();//Turns compressor on\n }", "public void onDestroy () {\n\t\tmVibrator = null;\n\t}", "private void initializeElevatorMotor()\n {\n Rectangle base = new Rectangle(shaftWidth*.3, location, shaftWidth*.4, floorHeight*.8);\n Rectangle latch = new Rectangle(shaftWidth*.45, location-5, shaftWidth*.1, floorHeight*.2);\n\n elevator = Shape.union(base, latch);\n elevator.setFill(Color.valueOf(\"#C0C0C0\"));\n\n elevatorTranslate = 0;\n elevatorOffset = 0;\n elevatorSpeed = 20;\n\n motorTimeline = new Timeline(new KeyFrame(Duration.millis(elevatorSpeed), e -> {\n if(location+elevatorOffset <= shaftHeight-60 && location+elevatorOffset >= 10) {\n if(location <= destination && location >= destination-10)\n {\n// System.out.println(location + \" OF \" + (destination) + \" / \" + (destination-10) + \" \" + (10 - destination/floorHeight));\n// System.out.println(\"EARLY STOP\");\n motorTimeline.pause();\n }\n\n elevatorTranslate += elevatorOffset;\n location += elevatorOffset;\n\n elevator.setTranslateY(elevatorTranslate);\n frame.setTranslateY(elevatorTranslate);\n leftDoor.setTranslateY(elevatorTranslate);\n rightDoor.setTranslateY(elevatorTranslate);\n }\n else motorTimeline.pause();\n }));\n motorTimeline.setCycleCount(Animation.INDEFINITE);\n }", "public void tearDown(){\n\t\tremoveAnswer();\n\t\tif(nextButton != null){\n\t\t\tnextButton.removeObserver(this);\n\t\t\tnextButton = null;\n\t\t}\n\t\t\n\t\tsubmitBtn.removeObserver(this);\n\t\thomeBtn.removeObserver(this);\n\t\tmainWindow.getContainer().remove(answerBoxContainer);\n\t\tmainWindow.getContainer().remove(questionCounter);\n\t\tmainWindow.getContainer().remove(questionBox);\n\t\tmainWindow.getContainer().remove(submitBtn);\n\t\tmainWindow.getContainer().remove(homeBtn);\n\t\t\n\t\tquestionText = null;\n\t\tequationText = null;\n\t\tanswerBox = null;\n\t\t\n\t\tanswerBoxContainer = null;\n\t\tquestionCounter = null;\n\t\tquestionBox = null;\n\t\tsubmitBtn = null;\n\t\thomeBtn = null;\n\t}", "protected void end() {\n \tdrivemotors.stop();\n }", "public ClimbSubsystem(){\n\t\t\n\t\tclimbMotorA = new CANTalon(RobotMap.CLIMB_MOTOR_A_ID);\n\t\tclimbMotorB = new CANTalon(RobotMap.CLIMB_MOTOR_B_ID);\n\t\t\n\t\tlogger = new ThreadLogger( new LoggerClient(), \"climb.txt\");\n\t}", "public static void destroy() {\n handler = null;\n initialized = false;\n }", "public void destroy() {\n destroyIn(0);\n }", "public void teleopInit() {\n autonomousCommand.cancel();\n }", "protected void finalize() throws Throwable {\n\t\tcleanup();\n\n\t\t//kill the scsynth\n\t\t_scsynthLauncher.killScsynth();\n\t\t\n\t\t// free the UDP port from JavaOSC\n\t\tif (_receiver != null)\n\t\t\t_receiver.close();\n\n\t}", "@Override\n public void stopMachine() {\n cleanOrExplode();\n\n for (GT_MetaTileEntity_Hatch_OutputData data : eOutputData) {\n data.q = null;\n }\n\n mOutputItems = null;\n mOutputFluids = null;\n mEfficiency = 0;\n mEfficiencyIncrease = 0;\n mProgresstime = 0;\n mMaxProgresstime = 0;\n eAvailableData = 0;\n hatchesStatusUpdate_EM();\n getBaseMetaTileEntity().disableWorking();\n }", "@Override\n protected void initialize() {\n arm.getElbow().enableCoastMode();\n arm.getElbow().stop();\n arm.getWrist().enableCoastMode();\n arm.getWrist().stop();\n arm.getExtension().enableCoastMode();\n arm.getExtension().stop();\n }", "protected void end() {\n \tRobot.m_elevator.disable();\n \tRobot.m_elevator.free();\n }", "@Override\n protected void end() {\n Robot.climber.frontStop();\n Robot.climber.rearStop();\n Robot.isAutonomous = false;\n }", "public void initMob() {\n this.lLegGeom.setName(\"Mob/\" + this.id + \"/lLeg\");\n this.rLegGeom.setName(\"Mob/\" + this.id + \"/rLeg\");\n this.bodyGeom.setName(\"Mob/\" + this.id + \"/Body\");\n this.lArmGeom.setName(\"Mob/\" + this.id + \"/lArm\");\n this.rArmGeom.setName(\"Mob/\" + this.id + \"/rArm\");\n this.headGeom.setName(\"Mob/\" + this.id + \"/Head\");\n this.weaponGeom.setName(\"Mob/\" + this.id + \"/Weapon\"); \n \n this.armMat.setColor(\"Color\",ColorRGBA.Black);\n this.legMat.setColor(\"Color\",ColorRGBA.Black);\n this.bodyMat.setColor(\"Color\",ColorRGBA.Black);\n \n //Refactor boss ActorControl into MobControl with MonkeyBrains\n CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(2.5f,4.5f,1);\n this.mobControl = new CharacterControl(capsuleShape, 3f);//Step size is set in last argument\n this.mobControl.setJumpSpeed(20);\n this.mobControl.setFallSpeed(45);\n this.mobControl.setGravity(50);\n \n }", "@Override\n protected void end() {\n Robot.toteLifterSubsystem.setEjectorState(EjectorState.STOPPED, 0.0);\n }", "private void finishBuilding() {\n buildTarget = null;\n buildStep = 0;\n buildInstructions = null;\n buildLocation = null;\n buildHeight = null;\n\n knowledge.myState = RobotState.IDLE;\n }", "protected void end() {\r\n Robot.feeder.retractArm();\r\n Robot.feeder.setFeederIntakeSpeed(0);\r\n Robot.chassis.driveMecanumNormalized(0, 0, 0);\r\n Robot.shooter.setShootingMotors(0, 0);\r\n }", "protected void finishLogic() throws Exception {//activity\n this.worldActivity = CombatActivity.forName(moduleConfig.getString(\"Activity\"));\n loginSession = new LoginSession(moduleConfig, worldActivity);\n library = new XteaLibrary();\n ItemDefinition.init(revision);\n //gamedialogues.start\n Runtime.getRuntime().addShutdownHook(new WorldShutdownHook());\n protocol = Protocol.applyPatch(revision);\n //revisionMap = Protocol.handleProtocolLoad(revision, multiRevisional, new File(Module.getFile(\"available_revisions.inf\")));\n combat = new Combat(this.worldActivity);\n }", "public void cleanup()\n {\n \tsuper.cleanup();\n _channelHandler.cleanup();\n }", "@Override\n\tpublic void onExit() {\n\t\tlabelHelp = null;\n\t\tlayer_force = null;\n\t\tmSoundBtn = null;\n\t\tboxMessage = null;\n\n\t\tSystem.gc();\n\t\tsuper.onExit();\n\t}", "public ConfigureRobot()\n {\n Scheduler.getInstance().removeAll(); //remove all running commands\n addSequential(new BrakeOpen(),2);\n addSequential(new WaitCommand(1));\n addSequential(new LiftToBottom(),3);\n }", "public void robotInit() \n {\n RobotMap.init();\n\n driveTrain = new DriveTrain();\n gripper = new Gripper();\n verticalLift = new VerticalLift();\n\n // OI must be constructed after subsystems. If the OI creates Commands \n //(which it very likely will), subsystems are not guaranteed to be \n // constructed yet. Thus, their requires() statements may grab null \n // pointers. Bad news. Don't move it.\n\n oi = new OI();\n\n autonomousChooser = new SendableChooser();\n autonomousChooser.addDefault( \"Auto: Do Nothing\" , new DoNothing () );\n autonomousChooser.addObject ( \"Auto: Drive To Auto Zone\" , new DriveToAutoZone () );\n autonomousChooser.addObject ( \"Auto: Drive To Auto Zone (Bump)\" , new DriveToAutoZoneBump () );\n //autonomousChooser.addObject ( \"Auto: Get One (Long)\" , new GetOneLong () );\n //autonomousChooser.addObject ( \"Auto: Get One (Short)\" , new GetOneShort () );\n //autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Bump)\" , new GetOneRecycleBin () );\n autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Side)\" , new GetRecycleBinSide () );\n //autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Backwards)\" , new GetOneRecycleBinBackwards () );\n //autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Backwards, Bump)\", new GetOneRecycleBinBackwardsBump() );\n //autonomousChooser.addObject ( \"Auto: Get Two (Short)\" , new GetTwoShort () );\n //autonomousChooser.addObject ( \"Auto: Get Two Short (Special)\" , new GetTwoShortSpecial () );\n //autonomousChooser.addObject ( \"Auto: Get Two (Long, From left)\" , new TwoLongFromLeft () );\n //autonomousChooser.addObject ( \"Auto: Get Two (Long, From right)\" , new TwoLongFromRight () );\n autonomousChooser.addObject ( \"Auto: Get One Tote and Recycle Bin\" , new OneRecycleBinAndTote () );\n autonomousChooser.addObject ( \"Auto: Get One Tote and Recycle Bin (Bump)\" , new OneRecycleBinAndToteBump () );\n SmartDashboard.putData( \"Autonomous\", autonomousChooser );\n\n // instantiate the command used for the autonomous period\n //autonomousCommand = new RunAutonomousCommand();\n\n m_USBVCommand = new UpdateSBValuesCommand();\n m_USBVCommand.start();\n \n frame = NIVision.imaqCreateImage(NIVision.ImageType.IMAGE_RGB, 0);\n /*\n // the camera name (ex \"cam0\") can be found through the roborio web interface\n session = NIVision.IMAQdxOpenCamera(\"cam1\",\n NIVision.IMAQdxCameraControlMode.CameraControlModeController);\n NIVision.IMAQdxConfigureGrab(session);\n \n NIVision.IMAQdxStartAcquisition(session);\n */\n /*\n camServer = CameraServer.getInstance();//.startAutomaticCapture(\"cam1\");\n camServer.setQuality(30);\n \n cam = new USBCamera(\"cam1\");\n cam.openCamera();\n cam.setFPS(60);\n \n cam.setSize(320, 240);\n cam.updateSettings();\n */\n }", "protected void end() {\n\t\tLiquidCrystal lcd = RobotMap.lcd;\n\t\tlcd.clear();\n\n\t\tRobotMap.chassisfrontLeft.set(0);\n\t\tRobotMap.chassisfrontRight.set(0);\n\t\tRobotMap.chassisrearLeft.set(0);\n\t\tRobotMap.chassisrearRight.set(0);\n\t\t\n\t\tRobotMap.climberclimbMotor.set(0);\n\t\tRobotMap.floorfloorLift.set(0);\n\t\tRobotMap.acquisitionacquisitionMotor.set(0);\n\n\n\t}", "public void stop() {\n\t\tif (getMainMotor() != null) {\n\t\t\tgetMainMotor().stop(0);\n\t\t}\n\t}", "protected abstract void ceaseHelper();", "@Override\n\tpublic void robotInit() {\n\t\tdrive = new Drive();\n\t\tintake = new Intake();\n\t\tshooter = new Shooter();\n\t\taimShooter = new AimShooter();\n\t\tvision = new Vision();\n\t\tintakeRoller = new IntakeRoller();\n\t\taManipulators = new AManipulators();\n\t\tshooterLock = new ShooterLock();\n\n\t\t// autochooser\n\t\t// autoChooser = new SendableChooser();\n\n\t\toi = new OI();\n\t\t// instantiate the command used for the autonomous period\n\t\tlowGearCommand = new LowGear();\n\n\t\t// auto chooser commands\n\t\t// autoChooser.addDefault(\"FarLeftAuto\", new FarLeftAuto());\n\t\t// autoChooser.addObject(\"MidLeftAuto\", new MidLeftAuto());\n\t\t// autoChooser.addObject(\"MidAuto\", new MidAuto());\n\t\t// autoChooser.addObject(\"MidRightAuto\", new MidRightAuto());\n\t\t// autoChooser.addObject(\"FarRightAuto\", new FarRightAuto());\n\t\t// autoChooser.addObject(\"Uber Auto\", new UberAuto());\n\t\t// autoChooser.addObject(\"Paper Weight\", new PaperWeightAuto());\n\t\t//\n\t\t// SmartDashboard.putData(\"Autonomous\", autoChooser);\n\n\t\t// autonomousCommand = (Command) autoChooser.getSelected();\n\t\tautonomousCommand = new FarLeftAuto();\n\t\t// autonomousCommand = new MidAuto();\n\t\t// CameraServer.getInstance().startAutomaticCapture(\"cam3\");\n\t\t// autonomousCommand = new FarLeftAuto\n\n\t\tpovUpTrigger.whenActive(new MoveActuatorsUp());\n\t\tpovDownTrigger.whenActive(new MoveActuatorsDown());\n\t}", "public void cleanup() {\n sendBuffer(baos);\n shutdown();\n }", "public void teleopInit() {\n\t\tautonomousCommand.cancel();\r\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 void openArms() {\n\t\tleftArmMotor.setSpeed(100);\n\t\trightArmMotor.setSpeed(100);\n\t\t\n\t\trightArmMotor.rotate(-80, true);\n\t\tleftArmMotor.rotate(-80, false);\n\t}", "@Override\n\tpublic void close() {\n\t\tframe = null;\n\t\tclassic = null;\n\t\trace = null;\n\t\tbuild = null;\n\t\tbt_classic = null;\n\t\tbt_race = null;\n\t\tbt_build = null;\n\t\tGameView.VIEW.removeDialog();\n\t}", "public void killMusic() {\n\t\t// Stop the sources\n\t\talSourceStop(musicSourceIndex);\n\t\talSourceStop(reverseSourceIndex);\n\t\talSourceStop(flangeSourceIndex);\n\t\talSourceStop(revFlangeSourceIndex);\n\t\talSourceStop(wahSourceIndex);\n\t\talSourceStop(revWahSourceIndex);\n\t\talSourceStop(wahFlangeSourceIndex);\n\t\talSourceStop(revWahFlangeSourceIndex);\n\t\talSourceStop(distortSourceIndex);\n\t\talSourceStop(revDistortSourceIndex);\n\t\talSourceStop(distortFlangeSourceIndex);\n\t\talSourceStop(revDistortFlangeSourceIndex);\n\t\talSourceStop(wahDistortSourceIndex);\n\t\talSourceStop(revWahDistortSourceIndex);\n\t\talSourceStop(wahDistortFlangeSourceIndex);\n\t\talSourceStop(revWahDistortFlangeSourceIndex);\n\t\t// Delete the sources\n\t\talDeleteSources(musicSourceIndex);\n\t\talDeleteSources(reverseSourceIndex);\n\t\talDeleteSources(flangeSourceIndex);\n\t\talDeleteSources(revFlangeSourceIndex);\n\t\talDeleteSources(wahSourceIndex);\n\t\talDeleteSources(revWahSourceIndex);\n\t\talDeleteSources(wahFlangeSourceIndex);\n\t\talDeleteSources(revWahFlangeSourceIndex);\n\t\talDeleteSources(distortSourceIndex);\n\t\talDeleteSources(revDistortSourceIndex);\n\t\talDeleteSources(distortFlangeSourceIndex);\n\t\talDeleteSources(revDistortFlangeSourceIndex);\n\t\talDeleteSources(wahDistortSourceIndex);\n\t\talDeleteSources(revWahDistortSourceIndex);\n\t\talDeleteSources(wahDistortFlangeSourceIndex);\n\t\talDeleteSources(revWahDistortFlangeSourceIndex);\n\t\t// Delete the buffers\n\t\talDeleteBuffers(musicBufferIndex);\n\t\talDeleteBuffers(reverseBufferIndex);\n\t\talDeleteBuffers(wahBufferIndex);\n\t\talDeleteBuffers(revWahBufferIndex);\n\t\talDeleteBuffers(distortBufferIndex);\n\t\talDeleteBuffers(revDistortBufferIndex);\n\t\talDeleteBuffers(wahDistortBufferIndex);\n\t\talDeleteBuffers(revWahDistortBufferIndex);\n\t}", "public void clear() {\n this.atoms.clear();\n this.bonds.clear();\n this.finished = false;\n }", "protected ImgProcessor() {\n\t\talbert = new Midi();\n\t\tharmon1 = new Midi();\n\t\tharmon2 = new Midi();\n\t\tharmon3 = new Midi();\n\t}", "@Override\n public void runOpMode(){\n motors[0][0] = hardwareMap.dcMotor.get(\"frontLeft\");\n motors[0][1] = hardwareMap.dcMotor.get(\"frontRight\");\n motors[1][0] = hardwareMap.dcMotor.get(\"backLeft\");\n motors[1][1] = hardwareMap.dcMotor.get(\"backRight\");\n // The motors on the left side of the robot need to be in reverse mode\n for(DcMotor[] motor : motors){\n motor[0].setDirection(DcMotor.Direction.REVERSE);\n }\n // Being explicit never hurt anyone, right?\n for(DcMotor[] motor : motors){\n motor[1].setDirection(DcMotor.Direction.FORWARD);\n }\n\n waitForStart();\n\n //Kill ten seconds\n runtime.reset();\n while(runtime.seconds()<10); runtime.reset();\n\n while(runtime.milliseconds()<700){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(100);\n // Set right motor power\n motor[1].setPower(100);\n }\n }\n\n while(runtime.milliseconds()<200){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(-100);\n // Set right motor power\n motor[1].setPower(-100);\n }\n }\n\n runtime.reset();\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(0);\n // Set right motor power\n motor[1].setPower(0);\n }\n }", "protected void cleanUpAndExit() {\n Enumeration<Sender> senderEnum = getSenders().elements();\n\n while (senderEnum.hasMoreElements()) {\n Sender nextSender = senderEnum.nextElement();\n try {\n nextSender.close();\n } catch (IOException e) {\n // TODO: better error output here?\n e.printStackTrace();\n }\n }\n\n System.exit(0);\n }", "@Override\n\tprotected void autonomousInit()\n\t{\n\t\tarmTurnMotor.resetSpeedControl();\n\t\tclawArm.resetTargets();\n\t}", "public void action() {\r\n\t\tsuppressed = false;\r\n\t\tMotor.B.stop();\r\n\t\tMotor.C.stop();\r\n\t\tDelay.msDelay(1000);\r\n\t\tMotor.B.setSpeed(180);\r\n\t\tMotor.C.setSpeed(180);\r\n\t\tMotor.B.forward();\r\n\t\tMotor.C.forward();\r\n\t\tif((light.getLightValue()>46 && light.getLightValue()<49) || (light.getLightValue()>27 && light.getLightValue()<31)){\r\n\t\t\tMotor.B.stop();\r\n\t\t\tMotor.C.stop();\r\n\t\t\tDelay.msDelay(500);\r\n\t\t\tMotor.B.forward();\r\n\t\t\tMotor.C.forward();\r\n\t\t\tif(light.getLightValue()>44 && light.getLightValue()<45){//home base\r\n\t\t\t\tMotor.B.stop();\r\n\t\t\t\tMotor.C.stop();\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile(!suppressed){\r\n\t\t\tThread.yield();\r\n\t\t}\r\n\t}" ]
[ "0.6207299", "0.6190132", "0.61417246", "0.6063176", "0.6020285", "0.59731", "0.59531283", "0.5898723", "0.58918154", "0.58884513", "0.5873103", "0.5854486", "0.58499485", "0.5847334", "0.5846992", "0.58205867", "0.58139694", "0.57968825", "0.5795501", "0.5781672", "0.57717574", "0.5762965", "0.5762671", "0.5752377", "0.5741984", "0.5729788", "0.57139754", "0.5711055", "0.5691551", "0.56862944", "0.5673189", "0.5672153", "0.5656612", "0.56561726", "0.5644995", "0.5644637", "0.5617794", "0.56175905", "0.55895793", "0.55698854", "0.5567487", "0.5542239", "0.55399364", "0.55301726", "0.55218863", "0.55191416", "0.5517463", "0.55167", "0.55163854", "0.55127704", "0.550014", "0.54832834", "0.54828066", "0.54700774", "0.54665893", "0.5462958", "0.5460472", "0.54585016", "0.54578394", "0.5448302", "0.54387915", "0.54320836", "0.5426025", "0.5422154", "0.54120463", "0.5409763", "0.54094666", "0.54087573", "0.54075223", "0.5386332", "0.53807503", "0.53802365", "0.53785247", "0.5378493", "0.5376618", "0.53708655", "0.5369316", "0.5365938", "0.53652745", "0.5360608", "0.5356598", "0.53527176", "0.535157", "0.53460413", "0.534371", "0.534136", "0.53398037", "0.5339633", "0.5334793", "0.5332512", "0.5322016", "0.5321632", "0.53189915", "0.5317952", "0.5317732", "0.53173333", "0.5315498", "0.5309173", "0.53072596", "0.53045845" ]
0.5691735
28
Log.i("MV", "_openDevice_"); loger.addRecordToLog("_openDevice_ inicio");
public void openDevice() { new Thread() { @Override public void run() { //loger.addRecordToLog("_openDevice_ inicio run"); //openDeviceEnEjecucion = Boolean.TRUE; showProgressDialog(getString(R.string.mns_titulo), getString(R.string.preparing_device)); int error; if ((error = mHuellaScanner.powerOn()) != FingerprintScanner.RESULT_OK) { //showErrorDialog(getString(R.string.fingerprint_device_power_on_failed), getFingerprintErrorString(error)); //loger.addRecordToLog("fingerprint_device_power_on_failed : " + error); } else { //loger.addRecordToLog("mScanner.powerOn() success : " + error); } Log.i("MV", "before mScanner.open()"); //error = mScanner.open(); //Log.i("MV", "after mScanner.open() : " + error); //logger.addRecordToLog("after mScanner.open() : " + error); if ((error = mHuellaScanner.open()) != FingerprintScanner.RESULT_OK) { Log.i("MV", "mScanner.open() error"); Log.i("MV", "MSG_UPDATE_SN"); Log.i("MV", "MSG_UPDATE_FW_VERSION"); //loger.addRecordToLog("mScanner.open() error"); //loger.addRecordToLog("MSG_UPDATE_SN"); //loger.addRecordToLog("MSG_UPDATE_FW_VERSION"); } else { Result res = mHuellaScanner.getSN(); res = mHuellaScanner.getFirmwareVersion(); //loger.addRecordToLog("MSG_UPDATE_FW_VERSION : " + (String) res.data); /*mHandler.sendMessage(mHandler.obtainMessage(MSG_UPDATE_SN, getString(R.string.fps_sn, (String) res.data))); mHandler.sendMessage(mHandler.obtainMessage(MSG_UPDATE_FW_VERSION, getString(R.string.fps_fw, (String) res.data))); showInfoToast(getString(R.string.fingerprint_device_open_success)); enableControl(true);*/ } if ((error = Bione.initialize(UnicaCompraActivity.this, Constantes.FP_DB_PATH)) == Bione.RESULT_OK) { //loger.addRecordToLog("algorithm_initialization_success"); } else { //loger.addRecordToLog("algorithm_initialization_failed"); } dismissProgressDialog(); //openDeviceEnEjecucion = Boolean.FALSE; //loger.addRecordToLog("_openDevice_ fin run"); } }.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void logDeviceInfo() {\n logDeviceLevel();\n }", "private void logDeviceInfo() {\n logDeviceLevel();\n }", "public void enableSDKLog() {\r\n\t\tString path = null;\r\n\t\tpath = Environment.getExternalStorageDirectory().toString() + \"/IcatchWifiCamera_SDK_Log\";\r\n\t\tEnvironment.getExternalStorageDirectory();\r\n\t\tICatchWificamLog.getInstance().setFileLogPath(path);\r\n\t\tLog.d(\"AppStart\", \"path: \" + path);\r\n\t\tif (path != null) {\r\n\t\t\tFile file = new File(path);\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tfile.mkdirs();\r\n\t\t\t}\r\n\t\t}\r\n\t\tICatchWificamLog.getInstance().setSystemLogOutput(true);\r\n\t\tICatchWificamLog.getInstance().setFileLogOutput(true);\r\n\t\tICatchWificamLog.getInstance().setRtpLog(true);\r\n\t\tICatchWificamLog.getInstance().setPtpLog(true);\r\n\t\tICatchWificamLog.getInstance().setRtpLogLevel(ICatchLogLevel.ICH_LOG_LEVEL_INFO);\r\n\t\tICatchWificamLog.getInstance().setPtpLogLevel(ICatchLogLevel.ICH_LOG_LEVEL_INFO);\r\n\t}", "LogRecorder getLogRecorder();", "LogRecorder getLogRecorder();", "public void openLog(View view) {\n Initialization.setDebuggable(MainActivity.this, true);\n }", "public void logSensorData () {\n\t}", "public void logData(){\n }", "private void logData(VinDevices data,String operation)\n\t\t{\n\t\t\tif (this.debug == true)\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\tSystem.out.print(\"\\n >>>>>>>>>>>>>>> Operation:\" + operation+\"<<<<<<<<<<<<<<<<<<<\");\n\t\t\t\tSystem.out.print(\"\\n --- Begin Debug Hibernate data class ----\");\n\t\t\t\tSystem.out.print(\"\\n id_device :\"+ data.getIdDevice());\n\t\t\t\tSystem.out.print(\"\\n name :\"+ data.getName());\n\t\t\t\tSystem.out.print(\"\\n comment :\"+ data.getComment());\n\t\t\t\tSystem.out.print(\"\\n --- End Debug Hibernate data class ----\");\n\t\t\t\tSystem.out.print(\"\\n >>>>>>>>>>>>>>>>>>>><<<<>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\\n\\n\");\n\t\t\t\t*/\n\t\t\t}\n\t\t}", "public void recordLog(){\r\n\t\tthis.finishLog(resourceFiles.getString(\"PathHepparIITestDirectory\") + \"/\" + TEST_FILE_NAME); \r\n\t}", "public static void log(Context context, AttackRecord record) {\n\t\tIntent intent = new Intent(context, Logger.class);\n\t\tintent.setAction(ACTION_LOG_ATTACK);\n\t\tintent.putExtra(EXTRA_RECORD, (Parcelable)record);\n\t\tcontext.startService(intent);\n\t}", "private void logToFile() {\n }", "private void logDeviceSettingTabField() {\n\n\t\tDeviceSettingsController.logVendorID(vendorId);\n\t\tDeviceSettingsController.logProductID(productId);\n\t\tDeviceSettingsController.logManufacture(manufacture);\n\t\tDeviceSettingsController.logProductString(productString);\n\t\tDeviceSettingsController.logSerialNumber(serialNumber);\n\t\tDeviceSettingsController.logFifoClockFrequency(fifoClockFrequency);\n\t\tDeviceSettingsController.logFPGAI2CSlaveAddress(i2cSlaveAddress);\n\t\tDeviceSettingsController.logDeviceSettingFirmware(deviceSttingFirmWare);\n\t\tDeviceSettingsController.logDeviceSettingI2CFrequency(deviceSttingI2CFrequency);\n\t}", "abstract void initiateLog();", "@Override\n public void logs() {\n \n }", "public void record(){\n\t}", "private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }", "private void doIt() {\n\t\tlogger.debug(\"hellow this is the first time I use Logback\");\n\t\t\n\t}", "private static void log_d( String msg ) {\n\t if (D) Log.d( TAG, TAG_SUB + \" \" + msg );\n}", "public void log(View view) {\n Log.i(TAG, \"LOGGING FOR \" + X + \", \" + Y);\n logButton.setText(R.string.logging_message);\n logButton.setEnabled(false);\n progressBar.setVisibility(View.VISIBLE);\n\n numLogs = 0;\n // Stops scanning after a pre-defined scan period.\n mHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n numLogs++;\n if (numLogs < NUM_LOGS){\n log();\n mHandler.postDelayed(this, SCAN_PERIOD);\n } else {\n mScanning = false;\n scanBLEDevice(false);\n logButton.setText(R.string.start_log_message);\n logButton.setEnabled(true);\n progressBar.setVisibility(View.INVISIBLE);\n }\n }\n }, SCAN_PERIOD);\n\n mScanning = true;\n scanBLEDevice(true);\n\n }", "void log();", "private void log_d( String msg ) {\n\t if (D) Log.d( TAG, TAG_SUB + \" \" + msg );\n}", "void libusb_set_debug(Context ctx, int level);", "private void debugLog(String msg)\n {\n m_log.log(\"[\" + m_appName + \"] :\" + msg);\n }", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "@Override\n public void log()\n {\n }", "public void logDeviceEnterpriseInfo() {\n Callback<OwnedState> callback = (result) -> {\n recordManagementHistograms(result);\n };\n\n getDeviceEnterpriseInfo(callback);\n }", "abstract protected void _log(TrackingActivity activity) throws Exception;", "public static void log(Context context, NetworkRecord record) {\n\t\tIntent intent = new Intent(context, Logger.class);\n\t\tintent.setAction(ACTION_LOG_NETWORK);\n\t\tintent.putExtra(EXTRA_RECORD, (Parcelable)record);\n\t\tcontext.startService(intent);\n\t}", "public LogScrap() {\n\t\tconsumer = bin->Conveyor.LOG.debug(\"{}\",bin);\n\t}", "private void Log(String action) {\r\n\t}", "public void logLocation(View view) {\n writeGPSDataToDB(locationHandler.getLatitude(), locationHandler.getLongitude(), locationHandler.getAltitude());\n databaseHandler.setValueInExpInfo(((TextView) findViewById(R.id.accelerate_indicator_rec)).getText().toString(), \"receiver_orientation\", experimentNumber);\n accelerometerHandler.close();\n Toast.makeText(this, \"receivers GPS data logged\", Toast.LENGTH_SHORT).show();\n gpsLogged = true;\n }", "private void printMsg(String msg) {\n Log.i(\"memorycat_log_tag\",msg);\n }", "protected void log(Object msg) {\n\t\n\t\tSystem.out.println(\"MusicDataAccessor: \" + msg);\n\t}", "public void setLogObject(Log logObject_) {\n\t\tlogObject = logObject_;\n\t\tlog( \"deviceId \" + deviceId, Log.Level.Information );\n\t\tlog( \"location \" + location, Log.Level.Information );\n\t}", "void log() {\n\t\tm_drivetrain.log();\n\t\tm_forklift.log();\n\t}", "private void startRecording() {\n\n }", "public String get_log(){\n }", "@Override\n protected void log(String tag, String msg) {\n Log.i(tag, \"[you can use your custom logger here \\\"]\" + msg);\n }", "@Trace\n//\t@LogMethod\n\tprivate void loadNext() {\n\t\tToast.makeText(MainActivity.this, \"Test\", Toast.LENGTH_SHORT).show();\n\t}", "private void insertRecord(String userName){\n\t\tLog.v(TAG, \"1\");\n\t\tLog.i(TAG, \"2\");\n\t\tLog.d(TAG, \"\");\n\t\tLog.w(\"Data printing.....\", \"3\");\n\t\tLog.e(\"Data printing.....\", \"\");\n\t}", "public static void log(Context context, MessageRecord record) {\n\t\tIntent intent = new Intent(context, Logger.class);\n\t\tintent.setAction(ACTION_LOG_MESSAGE);\n\t\tintent.putExtra(EXTRA_RECORD, (Parcelable)record);\n\t\tcontext.startService(intent);\n\t}", "@Override\n public void phoneCalling() {\n Log.e(\"test_TTS\", \"phoneCalling\");\n }", "@Override\n public void phoneCalling() {\n Log.e(\"test_TTS\", \"phoneCalling\");\n }", "private void startLoggerService() {\r\n\r\n\t\t// ---use the LocationManager class to obtain GPS locations---\r\n\t\tlm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\r\n\r\n\t\tlocationListener = new MyLocationListener();\r\n\r\n\t\tdevNaam = android.os.Build.MODEL;\r\n\t\tdevNaam = devNaam.replaceAll(\" \", \"\");\r\n\t\t\r\n\t\tnew dbSchrijf(\"project78\", \"sommelsdijk\", extern).execute(\"table\", devNaam);\r\n\r\n\t\tlm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000,\r\n\t\t\t\tminDistanceMeters, locationListener);\r\n\r\n\t\tToast.makeText(getBaseContext(),\r\n\t\t\t\t\"Service gemaakt met interval : \\n\" + minTimeMillis,\r\n\t\t\t\tToast.LENGTH_LONG).show();\r\n\r\n\t}", "private void onRecord(boolean start) {\r\n Log.w(TAG, \"Inside on record\");\r\n if (start) {\r\n startRecording();\r\n } else {\r\n stopRecording();\r\n }\r\n }", "private void MyCallLogTest() {\n\n if (INIT) {\n call_Remote.startRemote(callNum, calledModle,\"116.7425\", \"35.8867\", \"北京市西城区研究院605\");\n } else {\n call_Remote = new CallLogRemote();\n call_Remote.init(mContext, new CallLogRemote.CallListener() {\n @Override\n public void endCall(final long testime, CellInfoBean bean) {\n MyLog.log(\"testime:\" + testime);\n cellInfoBean = bean;\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n ContentResolver crcr = getContentResolver();\n CallUtil.getCallHistoryList(mContext, crcr);\n long callTime = CallUtil.getCallTime();\n if (callTime > 0) {\n //呼叫成功\n cellInfoBean.setCallSuccess(\"是\");\n long tt = (testime - callTime * 1000);\n cellInfoBean.setTestTimeLong(tt-phoneDelay + \"\");\n MyLog.log(\"tt:::\"+tt+\"-----tt-phoneDelay::\"+(tt-phoneDelay));\n } else {\n //呼叫失败\n cellInfoBean.setCallSuccess(\"否\");\n cellInfoBean.setTestTimeLong(\"0\");\n }\n cellInfoBean.setCallTimeLong(callTime+\"\");\n textMessage.setText(cellInfoBean.toString());\n CSVUtil.outputLog(call_Remote.getCsvPath() + call_Remote.getCsvName() + \".detail.csv\", cellInfoBean.toStringToText());\n }\n });\n }\n });\n INIT = true;\n call_Remote.startRemote(callNum,calledModle, \"116.7425\", \"35.8867\", \"北京市西城区研究院605\");\n }\n }", "void onStartRecord();", "private void infoLog(String msg) {\n Log.i(\"ActivityTransitions\", TAG + \" --> \" + msg);\n }", "void printLog(String str)\n { printLog(str,Log.LEVEL_HIGH);\n }", "@Override\n public void onClick(View view) {\n if (socket != null && Bluetooth.isStillConnected()) {\n try {\n arduino_logging = !arduino_logging;\n OutputStream outStream = socket.getOutputStream();\n Commands.sendCommand(outStream, \"logfile\", \"\");\n\n if(arduino_logging)\n Snackbar.make(view, \"Logging sensor data, press again to stop logging\",\n Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n else Snackbar.make(view, \"Stopped logging sensor data, press again to start logging\" +\n \" to a new file\",\n Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n } catch (IOException e) {\n Log.d(\"IOException\", \"Exception sending logfile\");\n }\n }\n else{\n Snackbar.make(view, \"Not connected\",\n Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }\n }", "private void logika_rozpocznij(){\n\t}", "private void printLog(String str)\n { printLog(str,Log.LEVEL_HIGH);\n }", "public void logDebug(String str) {\n }", "@Override\n public void onRecordingStart(String recordingId) {\n String log = \"[SRS][SA] Recording Started! isRecording=\" +\n skylinkConnection.isRecording() + \".\";\n Toast.makeText(parentActivity, log, Toast.LENGTH_LONG).show();\n Log.d(TAG, log);\n }", "public void customLogger() {\n KOOM.getInstance().setLogger(new KLog.KLogger() {\n @Override\n public void i(String TAG, String msg) {\n //get the log of info level\n }\n\n @Override\n public void d(String TAG, String msg) {\n //get the log of debug level\n }\n\n @Override\n public void e(String TAG, String msg) {\n //get the log of error level\n }\n });\n }", "private void log() {\n\t\t\n//\t\tif (trx_loggin_on){\n\t\t\n\t\tif ( transLogModelThreadLocal.get().isTransLoggingOn() ) {\n\t\t\t\n\t\t\tTransLogModel translog = transLogModelThreadLocal.get();\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\ttransactionLogger.info(\"\"); // don't really need a msg here\n\t\t\t\n\t\t\t// TODO MDC maybe conflic with existing MDC using in the project\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\t\n\t\t\ttranslog.getAttributesOnce().clear();\n\t\t}\n\t\t\n\t}", "public void logDebug()\n\t{\n\t\tLogHandler handlerList[];\n\t\tLogHandler handler = null;\n\n\t\tSystem.out.println(\"Logger = \"+logger);\n\t\tSystem.out.println(\"Logger log level is: \"+logger.getLogLevel());\n\t\tSystem.out.println(\"Logger log filter is: \"+logger.getFilter());\n\t\thandlerList = logger.getHandlers();\n\t\tfor(int i = 0; i < handlerList.length; i++)\n\t\t{\n\t\t\thandler = handlerList[i];\n\t\t\tSystem.out.println(\"Logger handler \"+i+\" is:\"+handler+\" and called \"+handler.getName());\n\t\t\tSystem.out.println(\"Logger handler \"+i+\" has filter:\"+handler.getFilter());\n\t\t\tSystem.out.println(\"Logger handler \"+i+\" has log level:\"+handler.getLogLevel());\n\t\t}\n\t}", "@Override\n public void onAdOpened() {\n Log.i(\"Ads\", \"xxx Banner onAdOpened\");\n }", "public void setVadRecorder(){\n }", "@Override\n public void onAdOpened() {\n Log.i(\"Ads\", \"xxx WelcomeAd onAdOpened\");\n }", "private void addLog(String log) {\n LogHelper.addIdentificationLog(log);\n }", "private void insertEventRecord(Device device, \n long fixtime, int statusCode, Geozone geozone,\n GeoPoint geoPoint, \n long gpioInput,\n double speedKPH, double heading, \n double altitude,\n double odomKM)\n {\n\n /* create event */\n EventData evdb = createEventRecord(device, fixtime, statusCode, geoPoint, gpioInput, speedKPH, heading, altitude, odomKM);\n\n /* insert event */\n // this will display an error if it was unable to store the event\n Print.logInfo(\"Event : [0x\" + StringTools.toHexString(statusCode,16) + \"] \" + StatusCodes.GetDescription(statusCode,null));\n if (device != null) {\n device.insertEventData(evdb); \n }\n this.eventTotalCount++;\n\n }", "private void tolog(String toLog) {\n Context context = cordova.getActivity();\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, toLog, duration);\n toast.show();\n }", "@Override\n public void onAdOpened() {\n Log.i(\"Ads\", \"onAdOpened\");\n }", "private void logUser() {\n }", "private Log() {\r\n\t}", "public void doLog() {\n SelfInvokeTestService self = (SelfInvokeTestService)context.getBean(\"selfInvokeTestService\");\n self.selfLog();\n //selfLog();\n }", "public void logDebugData() {\n SmartDashboard.putNumber(\"Ele Pos\", getPosition());\n SmartDashboard.putBoolean(\"Ele Switch\", bottomSwitchValue());\n SmartDashboard.putNumber(\"Ele Current\", getCurrent());\n SmartDashboard.putNumber(\"Ele Out %\", elevatorSpark.getAppliedOutput());\n }", "public static void log(String toLog)\n {\n System.out.println(\"Log: \" + toLog);\n SmartDashboard.putString(\"Log\", toLog);\n }", "void printLog(String str, int level)\n { if (log!=null) log.println(\"CommandLineUA: \"+str, UserAgent.LOG_OFFSET+level);\n }", "private static void log(String msg) {\n Log.d(LOG_TAG, msg);\n }", "@Override\n public void onAdOpened() {\n Log.i(\"Ads\", \"onAdOpened\");\n }", "@Override\n public void onAdOpened() {\n Log.i(\"Ads\", \"onAdOpened\");\n }", "private void LogRecognitionStart() {\n String recoSource;\n if (this.getUseMicrophone()) {\n recoSource = \"microphone\";\n } else if (this.getMode() == SpeechRecognitionMode.ShortPhrase) {\n recoSource = \"short wav file\";\n } else {\n recoSource = \"long wav file\";\n }\n\n this.WriteLine(\"\\n--- Start speech recognition using \" + recoSource + \" with \" + this.getMode() + \" mode in \" + this.getDefaultLocale() + \" language ----\\n\\n\");\n }", "@Override\n public void onClick(View view) {\n insertLogEntry();\n\n Toast toast = Toast.makeText(getActivity(), \"Sighting logged\", Toast.LENGTH_SHORT);\n toast.show();\n\n // go to the log book activity\n Intent intent = new Intent(getActivity(), LogBookActivity.class);\n startActivity(intent);\n }", "public void showrecord(View v) {\n\t // Do something in response to button\n\t\tIntent intent = new Intent(this, SelectLevel2.class);\n\t startActivity(intent);\n\t\tLog.d(\"record\",\"clicked\");\n\t}", "private void logIt(String msg) {\n\tSystem.out.println(\"PLATINUM-SYNC-LOG: \" + msg);\n}", "@Override\n public void onCreate() {\n super.onCreate();\n x.Ext.init(this);\n x.Ext.setDebug(BuildConfig.DEBUG); // output debug log or not\n }", "private void log(String s) {\n Rlog.i(TAG, s);\n }", "private static void LOG(String msg) {\n if ( DEBUG ) {\n Log.d(TAG, msg);\n }\n }", "public void recordInProductHelpMenuItemClicked() {\n RecordUserAction.record(\"Android.ChromeHome.IPHMenuItemClicked\");\n }", "private void initLog() {\n _logsList = (ListView) findViewById(R.id.lv_log);\n setupLogger();\n }", "private void printLog(String str, int level)\n { if (log!=null) log.println(\"AudioApp: \"+str, LoopbackMediaApp.LOG_OFFSET+level);\n if (level<=Log.LEVEL_HIGH) System.out.println(\"AudioApp: \"+str);\n }", "protected void recordPatientVisit() {\r\n\r\n\t\t// obtain unique android id for the device\r\n\t\tString android_device_id = Secure.getString(getApplicationContext().getContentResolver(),\r\n Secure.ANDROID_ID); \r\n\t\t\r\n\t\t// add the patient record to the DB\r\n\t\tgetSupportingLifeService().createPatientAssessment(getPatientAssessment(), android_device_id);\r\n\t}", "public void onLogFPS() {\n }", "protected Log getLog()\n/* */ {\n/* 59 */ return log;\n/* */ }", "private void log(String s) {\n RlogEx.i(TAG, s);\n }", "@Override\n\tpublic void publish(LogRecord record) {\n\tSystem.err.println(formatter.format(record));\n\tLogInfo info = new LogInfo(record.getTime(), \n\t\t\t\t record.getSource()+\":\"+record.getLevel(), \n\t\t\t\t formatter.format(record));\n\ttry {\n\t Telemetry.getInstance().publish(\"LOG\", info);\n\t} catch (Exception e) {\n\t System.err.println(\"Telemetry log error...\");\n\t e.printStackTrace();\n\t}\n }", "@Override\n public void logSmartDashboard() {\n SmartDashboard.putString(\"CargoIntake RollerState\", direction.toString());\n \n // Smart dashboard cargo loaded and photoelectric value\n SmartDashboard.putBoolean(\"CargoIntake IsCargoDetected\", isCargoDetected());\n SmartDashboard.putBoolean(\"CargoIntake IgnorePhotoelectric\",ignorePhotoelectric);\n }", "@Override\n\tprotected void onHandleIntent(Intent intent) {\n\t\tif (intent != null) {\n\t\t\tfinal String action = intent.getAction();\n\t\t\tif (ACTION_LOG_MESSAGE.equals(action)) {\n\t\t\t\tfinal MessageRecord record = intent.getParcelableExtra(EXTRA_RECORD);\n\t\t\t\thandleActionLog(record);\n\t\t\t}else if(ACTION_LOG_ATTACK.equals(action)){\n\t\t\t\tfinal AttackRecord record = intent.getParcelableExtra(EXTRA_RECORD);\n\t\t\t\thandleActionLog(record);\n\t\t\t}else if(ACTION_LOG_NETWORK.equals(action)){\n\t\t\t\tfinal NetworkRecord record = intent.getParcelableExtra(EXTRA_RECORD);\n\t\t\t\thandleActionLog(record);\n\t\t\t}else if(ACTION_LOG_PORTSCAN.equals(action)){\n\t\t\t\tfinal AttackRecord attackRecord = intent.getParcelableExtra(EXTRA_RECORD);\n\t\t\t\tfinal NetworkRecord networkRecord = intent.getParcelableExtra(EXTRA_RECORD2);\n\t\t\t\tattackRecord.setRecord(networkRecord);\n\n\t\t\t\tMessageRecord messageRecord = new MessageRecord(true);\n\t\t\t\tmessageRecord.setAttack_id(attackRecord.getAttack_id());\n\t\t\t\tmessageRecord.setRecord(attackRecord);\n\t\t\t\t//messageRecord.setId(0);\n\t\t\t\tmessageRecord.setPacket(\"\");\n\t\t\t\tmessageRecord.setTimestamp(intent.getLongExtra(EXTRA_TIMESTAMP, 0));\n\t\t\t\tmessageRecord.setType(MessageRecord.TYPE.RECEIVE);\n\t\t\t\thandleActionLog(attackRecord);\n\t\t\t\thandleActionLog(networkRecord);\n\t\t\t\thandleActionLog(messageRecord);\n\t\t\t} else if(ACTION_LOG_MULTISTAGE.equals(action)) {\n\t\t\t\tfinal AttackRecord attackRecord = intent.getParcelableExtra(EXTRA_RECORD);\n\t\t\t\tfinal NetworkRecord networkRecord = intent.getParcelableExtra(EXTRA_RECORD2);\n\t\t\t\tfinal MessageRecord msgRecord = intent.getParcelableExtra(EXTRA_RECORD3);\n\t\t\t\tmsgRecord.setRecord(attackRecord);\n\t\t\t\tattackRecord.setRecord(networkRecord);\n\n\t\t\t\thandleActionLog(attackRecord);\n\t\t\t\thandleActionLog(networkRecord);\n\t\t\t\thandleActionLog(msgRecord);\n\n\t\t\t}\n\t\t}\n\t}", "public static void log5(String TAG, String MSG) {\n }", "public void logCommunalDeck()\n\t{\n\t\t\tlog += String.format(\"%nCOMMUNAL DECK UPDATED%nCOMMUNAL DECK NOW EMPTY\");\n\t\t\tlineBreak();\n\t}", "@Override\n public void onLoging() {\n }", "protected void initLogger() {\n initLogger(\"DEBUG\");\n }", "public static final void debug(@org.jetbrains.annotations.NotNull org.jetbrains.anko.AnkoLogger r2, @org.jetbrains.annotations.NotNull kotlin.jvm.functions.Function0<? extends java.lang.Object> r3) {\n /*\n r1 = \"$receiver\";\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r2, r1);\n r1 = \"message\";\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r3, r1);\n r0 = r2.getLoggerTag();\n r1 = 3;\n r1 = android.util.Log.isLoggable(r0, r1);\n if (r1 == 0) goto L_0x0026;\n L_0x0017:\n r1 = r3.invoke();\n if (r1 == 0) goto L_0x0027;\n L_0x001d:\n r1 = r1.toString();\n if (r1 == 0) goto L_0x0027;\n L_0x0023:\n android.util.Log.d(r0, r1);\n L_0x0026:\n return;\n L_0x0027:\n r1 = \"null\";\n goto L_0x0023;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.jetbrains.anko.Logging.debug(org.jetbrains.anko.AnkoLogger, kotlin.jvm.functions.Function0):void\");\n }", "public void debug() {\n\n }", "@FXML\n\tprivate void logSerialNumberIncrement() {\n\t\tcheckFieldEditOrNot = true;\n\t\tSX3Manager.getInstance().addLog(\"Serial Number Increment : \" + serialNumberIncrement.getValue() + \".<br>\");\n\t\tlogDetails1.getEngine().setUserStyleSheetLocation(\"data:,body{font: 12px Arial;}\");\n\n\t}" ]
[ "0.7106142", "0.7106142", "0.6576046", "0.6413774", "0.6413774", "0.63041055", "0.6213357", "0.61986154", "0.6060427", "0.6019595", "0.60006183", "0.5991407", "0.59619445", "0.5956516", "0.5948287", "0.5942062", "0.59363383", "0.5935428", "0.59168905", "0.5915263", "0.58803356", "0.5874811", "0.5869072", "0.5864846", "0.58622646", "0.58622646", "0.58622646", "0.58607477", "0.5815677", "0.58065027", "0.5788279", "0.57870656", "0.5779568", "0.57762325", "0.57735133", "0.5756319", "0.57392377", "0.5724201", "0.5691928", "0.56879157", "0.56807053", "0.5650994", "0.5650898", "0.5646198", "0.56296647", "0.56296647", "0.5608704", "0.5597001", "0.5594638", "0.55905795", "0.5576315", "0.5565823", "0.5547921", "0.5536942", "0.5535185", "0.55302876", "0.5514926", "0.5501239", "0.54930896", "0.54876775", "0.54850614", "0.5478865", "0.5477367", "0.546655", "0.54600227", "0.54496706", "0.5448082", "0.54341984", "0.5429821", "0.5421992", "0.54098004", "0.5405109", "0.53996885", "0.5393275", "0.53927696", "0.53927696", "0.53897387", "0.5389143", "0.53840417", "0.53765976", "0.5373359", "0.53713226", "0.5368449", "0.53635806", "0.5359786", "0.53580433", "0.5356632", "0.5352173", "0.5345339", "0.53386873", "0.53375506", "0.5329844", "0.53285366", "0.53270507", "0.5294391", "0.5292754", "0.52875245", "0.52774936", "0.5277201", "0.5273289" ]
0.5351569
88
loger.addRecordToLog("_openDevice_ inicio run"); openDeviceEnEjecucion = Boolean.TRUE;
@Override public void run() { showProgressDialog(getString(R.string.mns_titulo), getString(R.string.preparing_device)); int error; if ((error = mHuellaScanner.powerOn()) != FingerprintScanner.RESULT_OK) { //showErrorDialog(getString(R.string.fingerprint_device_power_on_failed), getFingerprintErrorString(error)); //loger.addRecordToLog("fingerprint_device_power_on_failed : " + error); } else { //loger.addRecordToLog("mScanner.powerOn() success : " + error); } Log.i("MV", "before mScanner.open()"); //error = mScanner.open(); //Log.i("MV", "after mScanner.open() : " + error); //logger.addRecordToLog("after mScanner.open() : " + error); if ((error = mHuellaScanner.open()) != FingerprintScanner.RESULT_OK) { Log.i("MV", "mScanner.open() error"); Log.i("MV", "MSG_UPDATE_SN"); Log.i("MV", "MSG_UPDATE_FW_VERSION"); //loger.addRecordToLog("mScanner.open() error"); //loger.addRecordToLog("MSG_UPDATE_SN"); //loger.addRecordToLog("MSG_UPDATE_FW_VERSION"); } else { Result res = mHuellaScanner.getSN(); res = mHuellaScanner.getFirmwareVersion(); //loger.addRecordToLog("MSG_UPDATE_FW_VERSION : " + (String) res.data); /*mHandler.sendMessage(mHandler.obtainMessage(MSG_UPDATE_SN, getString(R.string.fps_sn, (String) res.data))); mHandler.sendMessage(mHandler.obtainMessage(MSG_UPDATE_FW_VERSION, getString(R.string.fps_fw, (String) res.data))); showInfoToast(getString(R.string.fingerprint_device_open_success)); enableControl(true);*/ } if ((error = Bione.initialize(UnicaCompraActivity.this, Constantes.FP_DB_PATH)) == Bione.RESULT_OK) { //loger.addRecordToLog("algorithm_initialization_success"); } else { //loger.addRecordToLog("algorithm_initialization_failed"); } dismissProgressDialog(); //openDeviceEnEjecucion = Boolean.FALSE; //loger.addRecordToLog("_openDevice_ fin run"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void logDeviceInfo() {\n logDeviceLevel();\n }", "private void logDeviceInfo() {\n logDeviceLevel();\n }", "private void startRecording() {\n\n }", "public void enableSDKLog() {\r\n\t\tString path = null;\r\n\t\tpath = Environment.getExternalStorageDirectory().toString() + \"/IcatchWifiCamera_SDK_Log\";\r\n\t\tEnvironment.getExternalStorageDirectory();\r\n\t\tICatchWificamLog.getInstance().setFileLogPath(path);\r\n\t\tLog.d(\"AppStart\", \"path: \" + path);\r\n\t\tif (path != null) {\r\n\t\t\tFile file = new File(path);\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tfile.mkdirs();\r\n\t\t\t}\r\n\t\t}\r\n\t\tICatchWificamLog.getInstance().setSystemLogOutput(true);\r\n\t\tICatchWificamLog.getInstance().setFileLogOutput(true);\r\n\t\tICatchWificamLog.getInstance().setRtpLog(true);\r\n\t\tICatchWificamLog.getInstance().setPtpLog(true);\r\n\t\tICatchWificamLog.getInstance().setRtpLogLevel(ICatchLogLevel.ICH_LOG_LEVEL_INFO);\r\n\t\tICatchWificamLog.getInstance().setPtpLogLevel(ICatchLogLevel.ICH_LOG_LEVEL_INFO);\r\n\t}", "public void record(){\n\t}", "public void setVadRecorder(){\n }", "@FXML\n\tpublic void logRemoteWakeup() {\n\t\tcheckFieldEditOrNot = true;\n\t\tif (enableRemoteWakeup.isSelected()) {\n\t\t\tSX3Manager.getInstance().addLog(\"Enable Remote Wakeup : Enable.<br>\");\n\t\t} else {\n\t\t\tSX3Manager.getInstance().addLog(\"Enable Remote Wakeup : Disable.<br>\");\n\t\t}\n\t}", "LogRecorder getLogRecorder();", "LogRecorder getLogRecorder();", "public void logSensorData () {\n\t}", "void onStartRecord();", "private void logData(VinDevices data,String operation)\n\t\t{\n\t\t\tif (this.debug == true)\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\tSystem.out.print(\"\\n >>>>>>>>>>>>>>> Operation:\" + operation+\"<<<<<<<<<<<<<<<<<<<\");\n\t\t\t\tSystem.out.print(\"\\n --- Begin Debug Hibernate data class ----\");\n\t\t\t\tSystem.out.print(\"\\n id_device :\"+ data.getIdDevice());\n\t\t\t\tSystem.out.print(\"\\n name :\"+ data.getName());\n\t\t\t\tSystem.out.print(\"\\n comment :\"+ data.getComment());\n\t\t\t\tSystem.out.print(\"\\n --- End Debug Hibernate data class ----\");\n\t\t\t\tSystem.out.print(\"\\n >>>>>>>>>>>>>>>>>>>><<<<>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\\n\\n\");\n\t\t\t\t*/\n\t\t\t}\n\t\t}", "public boolean logging() {\n\treturn logging;\n }", "private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }", "private void onRecord(boolean start) {\r\n Log.w(TAG, \"Inside on record\");\r\n if (start) {\r\n startRecording();\r\n } else {\r\n stopRecording();\r\n }\r\n }", "public int cameraOn() {\r\n System.out.println(\"hw- ligarCamera\");\r\n return serialPort.enviaDados(\"!111O*\");//camera ON \r\n }", "abstract void initiateLog();", "private void doIt() {\n\t\tlogger.debug(\"hellow this is the first time I use Logback\");\n\t\t\n\t}", "public void recordLog(){\r\n\t\tthis.finishLog(resourceFiles.getString(\"PathHepparIITestDirectory\") + \"/\" + TEST_FILE_NAME); \r\n\t}", "@Override\n public void logSmartDashboard() {\n SmartDashboard.putString(\"CargoIntake RollerState\", direction.toString());\n \n // Smart dashboard cargo loaded and photoelectric value\n SmartDashboard.putBoolean(\"CargoIntake IsCargoDetected\", isCargoDetected());\n SmartDashboard.putBoolean(\"CargoIntake IgnorePhotoelectric\",ignorePhotoelectric);\n }", "public void logData(){\n }", "public void initDevice() {\r\n\t\t\r\n\t}", "@Override\n public void onClick(View view) {\n if (socket != null && Bluetooth.isStillConnected()) {\n try {\n arduino_logging = !arduino_logging;\n OutputStream outStream = socket.getOutputStream();\n Commands.sendCommand(outStream, \"logfile\", \"\");\n\n if(arduino_logging)\n Snackbar.make(view, \"Logging sensor data, press again to stop logging\",\n Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n else Snackbar.make(view, \"Stopped logging sensor data, press again to start logging\" +\n \" to a new file\",\n Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n } catch (IOException e) {\n Log.d(\"IOException\", \"Exception sending logfile\");\n }\n }\n else{\n Snackbar.make(view, \"Not connected\",\n Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }\n }", "void libusb_set_debug(Context ctx, int level);", "boolean k2h_set_bumup_debug_signal_user1();", "public void setLog(boolean log)\n {\n this.log = log;\n }", "private void logDeviceSettingTabField() {\n\n\t\tDeviceSettingsController.logVendorID(vendorId);\n\t\tDeviceSettingsController.logProductID(productId);\n\t\tDeviceSettingsController.logManufacture(manufacture);\n\t\tDeviceSettingsController.logProductString(productString);\n\t\tDeviceSettingsController.logSerialNumber(serialNumber);\n\t\tDeviceSettingsController.logFifoClockFrequency(fifoClockFrequency);\n\t\tDeviceSettingsController.logFPGAI2CSlaveAddress(i2cSlaveAddress);\n\t\tDeviceSettingsController.logDeviceSettingFirmware(deviceSttingFirmWare);\n\t\tDeviceSettingsController.logDeviceSettingI2CFrequency(deviceSttingI2CFrequency);\n\t}", "public void openLog(View view) {\n Initialization.setDebuggable(MainActivity.this, true);\n }", "private void logToFile() {\n }", "@Override\n public void onRecordingStart(String recordingId) {\n String log = \"[SRS][SA] Recording Started! isRecording=\" +\n skylinkConnection.isRecording() + \".\";\n Toast.makeText(parentActivity, log, Toast.LENGTH_LONG).show();\n Log.d(TAG, log);\n }", "private void LogRecognitionStart() {\n String recoSource;\n if (this.getUseMicrophone()) {\n recoSource = \"microphone\";\n } else if (this.getMode() == SpeechRecognitionMode.ShortPhrase) {\n recoSource = \"short wav file\";\n } else {\n recoSource = \"long wav file\";\n }\n\n this.WriteLine(\"\\n--- Start speech recognition using \" + recoSource + \" with \" + this.getMode() + \" mode in \" + this.getDefaultLocale() + \" language ----\\n\\n\");\n }", "@Override\n public void OnMosSdkStop(boolean flag) {\n MyLog.log(\"stop??????\" + flag);\n\n }", "@Override\n\tpublic void teleopInit() {\n\t\tbeenEnabled = true;\n\t\tif(!socket){\n\t\t\tlogger.startSocket(); socket = true;\n\t\t}\n\t}", "public static void traceOn() {\r\n\t\ttraceOn = true;\r\n\t}", "public void onStart() {\n super.onStart();\n C0938a.m5006c(\"SR/SoundRecorder\", \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~onStart\");\n f5379a = true;\n }", "@Override\n public void triggerProbe(DeviceId deviceId) {\n }", "@Override\n public void logs() {\n \n }", "public void SetCallRecording(boolean option){\n FunctionLogger logger=new FunctionLogger(\"SetCallRecording\",this,myLogger);\n logger.args(option);\n PlayRingbackFlag=option;\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n public void recordClick(View v) {\n // check if permissions are already granted\n if (ContextCompat.checkSelfPermission( this, Manifest.permission.ACCESS_FINE_LOCATION ) != PackageManager.PERMISSION_GRANTED )\n {\n ActivityCompat.requestPermissions(\n this,\n new String [] { Manifest.permission.ACCESS_FINE_LOCATION },\n FINE_LOCATION_PERMISSION_CODE\n );\n }\n\n // check if permissions are already granted\n if (checkPermissionFromDevice(RECORD_AUDIO_PERMISSION_CODE)) {\n //openConfirmDialog();\n }\n // if permissions aren't granted, request them\n else {\n requestPermissions(RECORD_AUDIO_PERMISSION_CODE);\n }\n\n // check if permissions are already granted\n if (ContextCompat.checkSelfPermission( this, Manifest.permission.ACCESS_FINE_LOCATION ) != PackageManager.PERMISSION_GRANTED )\n {\n ActivityCompat.requestPermissions(\n this,\n new String [] { Manifest.permission.ACCESS_FINE_LOCATION },\n FINE_LOCATION_PERMISSION_CODE\n );\n }\n\n if(!isRecording) {\n if(cb_imu.isChecked() || cb_audio.isChecked() || cb_ambient.isChecked() || cb_gps.isChecked() || cb_timeDrift.isChecked()) {\n\n //startService\n bt_Record.setText(\"Stop Recording\");\n //bt_Record.setText(dateFormatted);\n bt_Record.setBackgroundColor(Color.RED);\n cb_imu.setEnabled(false);\n cb_ambient.setEnabled(false);\n cb_audio.setEnabled(false);\n cb_gps.setEnabled(false);\n cb_timeDrift.setEnabled(false);\n pb_Record.setVisibility(View.VISIBLE);\n tv_recordUpdate.setVisibility(View.VISIBLE);\n isRecording = true;\n Intent intent = new Intent(MainActivity.this, SensorRecordService.class);\n intent.putExtra(\"cb_ambient\", cb_ambient.isChecked());\n intent.putExtra(\"cb_imu\", cb_imu.isChecked());\n intent.putExtra(\"cb_audio\", cb_audio.isChecked());\n intent.putExtra(\"cb_gps\", cb_gps.isChecked());\n intent.putExtra( \"cb_timeDrift\", cb_timeDrift.isChecked());\n startService(intent);\n\n }\n }else\n {\n bt_Record.setText(\"Start Recording\");\n bt_Record.setBackgroundColor(Color.GREEN);\n isRecording = false;\n\n pb_Record.setVisibility(View.INVISIBLE);\n tv_recordUpdate.setVisibility(View.INVISIBLE);\n cb_imu.setEnabled(true);\n cb_ambient.setEnabled(true);\n cb_audio.setEnabled(true);\n cb_gps.setEnabled(true);\n cb_timeDrift.setEnabled(true);\n Intent intent = new Intent(MainActivity.this, SensorRecordService.class);\n stopService(intent);\n }\n\n\n\n\n }", "public void openUsbDevice() {\n tryGetUsbPermission();\n }", "public void startNewEvent() {\n // JCudaDriver.cuEventRecord(cUevent,stream);\n }", "public void log(boolean log) {\n this.log = log;\n }", "private void logUser() {\n }", "public void onAudioEvent(boolean recording) {\n if (!recording) {\n m_micClient.endMicAndRecognition();\n// Button startButton = (Button) findViewById(R.id.button1);\n// startButton.setEnabled(true);\n }\n\n// EditText myEditText = (EditText) findViewById(R.id.editText1);\n// myEditText.append(\"********* Microphone status: \" + recording + \" *********\\n\");\n }", "private void m6589F() {\n C1413m.f5712j = 1;\n this.f5402V = new Intent(this, RecordService.class);\n this.f5402V.putExtra(\"record_activity_type\", 101);\n this.f5403W = new C1291e(this, (C1296Ua) null);\n C0938a.m5002a(\"SR/SoundRecorder\", \"<initService> isAppForeground: \");\n try {\n if (Build.VERSION.SDK_INT >= 28) {\n startForegroundService(this.f5402V);\n } else {\n startService(this.f5402V);\n }\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"initService\" + e);\n }\n bindService(this.f5402V, this.f5403W, 1);\n this.f5429m = true;\n m6600Q();\n m6599P();\n }", "@FXML\n\tpublic void logAutoGenerateSerialNo() {\n\t\tcheckFieldEditOrNot = true;\n\t\tif (autoGenerateSerialNumber.isSelected()) {\n\t\t\tSX3Manager.getInstance().addLog(\"Auto-Generate Serial Number : Enable.<br>\");\n\t\t\tserialNumber.setDisable(true);\n\t\t\tserialNumber.setText(\"\");\n\t\t\tserialNumber.setStyle(\"\");\n\t\t\tserialNumberIncrement.setDisable(true);\n\t\t\tserialNumberIncrement.setValue(String.valueOf(0));\n\t\t} else {\n\t\t\tSX3Manager.getInstance().addLog(\"Auto-Generate Serial Number : Disable.<br>\");\n\t\t\tserialNumber.setDisable(false);\n\t\t\tserialNumberIncrement.setDisable(false);\n\t\t}\n\t}", "public void logDeviceEnterpriseInfo() {\n Callback<OwnedState> callback = (result) -> {\n recordManagementHistograms(result);\n };\n\n getDeviceEnterpriseInfo(callback);\n }", "@Override\n public void testPeriodic() {\n //Diagnostics.writeString(\"State\", \"TEST\");\n }", "void log() {\n\t\tm_drivetrain.log();\n\t\tm_forklift.log();\n\t}", "private void logika_rozpocznij(){\n\t}", "private void startLoggerService() {\r\n\r\n\t\t// ---use the LocationManager class to obtain GPS locations---\r\n\t\tlm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\r\n\r\n\t\tlocationListener = new MyLocationListener();\r\n\r\n\t\tdevNaam = android.os.Build.MODEL;\r\n\t\tdevNaam = devNaam.replaceAll(\" \", \"\");\r\n\t\t\r\n\t\tnew dbSchrijf(\"project78\", \"sommelsdijk\", extern).execute(\"table\", devNaam);\r\n\r\n\t\tlm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000,\r\n\t\t\t\tminDistanceMeters, locationListener);\r\n\r\n\t\tToast.makeText(getBaseContext(),\r\n\t\t\t\t\"Service gemaakt met interval : \\n\" + minTimeMillis,\r\n\t\t\t\tToast.LENGTH_LONG).show();\r\n\r\n\t}", "public void onAudioEvent(boolean recording) {\n /*this.WriteLine(\"--- Microphone status change received by onAudioEvent() ---\");\n this.WriteLine(\"********* Microphone status: \" + recording + \" *********\");\n if (recording) {\n this.WriteLine(\"Please start speaking.\");\n }\n\n WriteLine();*/\n if (!recording) {\n this.micClient.endMicAndRecognition();\n this._startButton.setEnabled(true);\n }\n }", "@Override\n\tpublic void onDeviceLoginSuccess(FunDevice funDevice) {\n\n\t}", "public LogScrap() {\n\t\tconsumer = bin->Conveyor.LOG.debug(\"{}\",bin);\n\t}", "public native void nativeStartRecord();", "public void openDevice() {\n\n new Thread() {\n\n @Override\n public void run() {\n //loger.addRecordToLog(\"_openDevice_ inicio run\");\n\n //openDeviceEnEjecucion = Boolean.TRUE;\n\n showProgressDialog(getString(R.string.mns_titulo), getString(R.string.preparing_device));\n\n int error;\n if ((error = mHuellaScanner.powerOn()) != FingerprintScanner.RESULT_OK) {\n //showErrorDialog(getString(R.string.fingerprint_device_power_on_failed), getFingerprintErrorString(error));\n //loger.addRecordToLog(\"fingerprint_device_power_on_failed : \" + error);\n } else {\n //loger.addRecordToLog(\"mScanner.powerOn() success : \" + error);\n }\n\n Log.i(\"MV\", \"before mScanner.open()\");\n //error = mScanner.open();\n //Log.i(\"MV\", \"after mScanner.open() : \" + error);\n //logger.addRecordToLog(\"after mScanner.open() : \" + error);\n if ((error = mHuellaScanner.open()) != FingerprintScanner.RESULT_OK) {\n Log.i(\"MV\", \"mScanner.open() error\");\n Log.i(\"MV\", \"MSG_UPDATE_SN\");\n Log.i(\"MV\", \"MSG_UPDATE_FW_VERSION\");\n\n //loger.addRecordToLog(\"mScanner.open() error\");\n //loger.addRecordToLog(\"MSG_UPDATE_SN\");\n //loger.addRecordToLog(\"MSG_UPDATE_FW_VERSION\");\n\n } else {\n\n Result res = mHuellaScanner.getSN();\n res = mHuellaScanner.getFirmwareVersion();\n //loger.addRecordToLog(\"MSG_UPDATE_FW_VERSION : \" + (String) res.data);\n\n /*mHandler.sendMessage(mHandler.obtainMessage(MSG_UPDATE_SN, getString(R.string.fps_sn, (String) res.data)));\n mHandler.sendMessage(mHandler.obtainMessage(MSG_UPDATE_FW_VERSION, getString(R.string.fps_fw, (String) res.data)));\n showInfoToast(getString(R.string.fingerprint_device_open_success));\n enableControl(true);*/\n }\n\n if ((error = Bione.initialize(UnicaCompraActivity.this, Constantes.FP_DB_PATH)) == Bione.RESULT_OK) {\n //loger.addRecordToLog(\"algorithm_initialization_success\");\n } else {\n //loger.addRecordToLog(\"algorithm_initialization_failed\");\n }\n\n dismissProgressDialog();\n\n //openDeviceEnEjecucion = Boolean.FALSE;\n //loger.addRecordToLog(\"_openDevice_ fin run\");\n }\n }.start();\n\n }", "public boolean open(int device)\n {\n \n boolean retVal = open_1(nativeObj, device);\n \n return retVal;\n }", "public void setLog(boolean log) {\n this.log = log;\n }", "public void mo5972i() {\n int i = this.f5435p;\n if (i == 2) {\n this.f5396P.sendEmptyMessage(1);\n try {\n if (C1413m.m6844f()) {\n this.f5392L.setRecordState(true);\n } else if (m6595L()) {\n this.f5391K.setRecordState(true);\n } else {\n this.f5392L.setRecordState(true);\n }\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"onResume() RecordView or RecognizeVoiceView error:\");\n }\n } else if (i == 4) {\n try {\n if (C1413m.m6844f()) {\n this.f5392L.setRecordState(false);\n } else if (m6595L()) {\n this.f5391K.setRecordState(false);\n } else {\n this.f5392L.setRecordState(false);\n }\n } catch (Exception unused2) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"onResume() RecordView or RecognizeVoiceView error:\");\n }\n }\n }", "private void insertEventRecord(Device device, \n long fixtime, int statusCode, Geozone geozone,\n GeoPoint geoPoint, \n long gpioInput,\n double speedKPH, double heading, \n double altitude,\n double odomKM)\n {\n\n /* create event */\n EventData evdb = createEventRecord(device, fixtime, statusCode, geoPoint, gpioInput, speedKPH, heading, altitude, odomKM);\n\n /* insert event */\n // this will display an error if it was unable to store the event\n Print.logInfo(\"Event : [0x\" + StringTools.toHexString(statusCode,16) + \"] \" + StatusCodes.GetDescription(statusCode,null));\n if (device != null) {\n device.insertEventData(evdb); \n }\n this.eventTotalCount++;\n\n }", "void log();", "public void setLogging(boolean logging){\n this.logging=logging;\n }", "public void run() {\n\t\t\t\t\t\tcmd.killProcess(deviceId, \"logcat\");\n\t\t\t\t\t}", "public void run() {\n\t\t\t\t\t\tcmd.killProcess(deviceId, \"logcat\");\n\t\t\t\t\t}", "public void onRecord(boolean start) {\n if (start) {\n startRecording();\n } else {\n stopRecording();\n }\n }", "public void log(View view) {\n Log.i(TAG, \"LOGGING FOR \" + X + \", \" + Y);\n logButton.setText(R.string.logging_message);\n logButton.setEnabled(false);\n progressBar.setVisibility(View.VISIBLE);\n\n numLogs = 0;\n // Stops scanning after a pre-defined scan period.\n mHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n numLogs++;\n if (numLogs < NUM_LOGS){\n log();\n mHandler.postDelayed(this, SCAN_PERIOD);\n } else {\n mScanning = false;\n scanBLEDevice(false);\n logButton.setText(R.string.start_log_message);\n logButton.setEnabled(true);\n progressBar.setVisibility(View.INVISIBLE);\n }\n }\n }, SCAN_PERIOD);\n\n mScanning = true;\n scanBLEDevice(true);\n\n }", "public void setFirstLaunchCalled() {\n this.f51 = true;\n }", "void onCaptureStart();", "private void startRecording() {\n Date now = new Date(System.currentTimeMillis());\n fileName = \"AccelerometerData_\" + sdf.format(now) + \"_sampling_\" + listenerSampling + \"microsec.csv\";\n String directory = Environment.getExternalStorageDirectory() + \"/_Parka/AccelerometerCsvFile\";\n\n csvWriter.createFile(fileName,directory);\n startTime = csvWriter.getStartTime();\n\n String headFileStr = \"Millisec\" + \",\" + \"TimeStamp\" + \",\"\n + \"Acce X\" + \",\" + \"Acce Y\" + \",\" + \"Acce Z\" + \",\"\n + \"Stop engine\"+\",\\n\";\n csvWriter.writeHeadFile(headFileStr);\n\n registerListener();\n Toast.makeText(this, \"START RECORDING | \"\n + \"file name = \" + fileName, Toast.LENGTH_SHORT).show();\n }", "private void MyCallLogTest() {\n\n if (INIT) {\n call_Remote.startRemote(callNum, calledModle,\"116.7425\", \"35.8867\", \"北京市西城区研究院605\");\n } else {\n call_Remote = new CallLogRemote();\n call_Remote.init(mContext, new CallLogRemote.CallListener() {\n @Override\n public void endCall(final long testime, CellInfoBean bean) {\n MyLog.log(\"testime:\" + testime);\n cellInfoBean = bean;\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n ContentResolver crcr = getContentResolver();\n CallUtil.getCallHistoryList(mContext, crcr);\n long callTime = CallUtil.getCallTime();\n if (callTime > 0) {\n //呼叫成功\n cellInfoBean.setCallSuccess(\"是\");\n long tt = (testime - callTime * 1000);\n cellInfoBean.setTestTimeLong(tt-phoneDelay + \"\");\n MyLog.log(\"tt:::\"+tt+\"-----tt-phoneDelay::\"+(tt-phoneDelay));\n } else {\n //呼叫失败\n cellInfoBean.setCallSuccess(\"否\");\n cellInfoBean.setTestTimeLong(\"0\");\n }\n cellInfoBean.setCallTimeLong(callTime+\"\");\n textMessage.setText(cellInfoBean.toString());\n CSVUtil.outputLog(call_Remote.getCsvPath() + call_Remote.getCsvName() + \".detail.csv\", cellInfoBean.toStringToText());\n }\n });\n }\n });\n INIT = true;\n call_Remote.startRemote(callNum,calledModle, \"116.7425\", \"35.8867\", \"北京市西城区研究院605\");\n }\n }", "@FXML\n\tprivate void logSerialNumberIncrement() {\n\t\tcheckFieldEditOrNot = true;\n\t\tSX3Manager.getInstance().addLog(\"Serial Number Increment : \" + serialNumberIncrement.getValue() + \".<br>\");\n\t\tlogDetails1.getEngine().setUserStyleSheetLocation(\"data:,body{font: 12px Arial;}\");\n\n\t}", "private static native boolean open_1(long nativeObj, int device);", "@Override\n public void openEvent(){\n rl.lock();\n try{\n log.printFirst();\n System.out.println(\"B : Opening the event...\");\n //change broker state\n// MyThreadBroker broker = (MyThreadBroker) Thread.currentThread();\n// broker.broker_states = MyThreadBroker.Broker_States.OPENING_THE_EVENT;\n //change log\n log.changeLog();\n log.setBrokerState(MyThreadBroker.Broker_States.OPENING_THE_EVENT); \n log.changeLog();\n }finally{\n rl.unlock();\n }\n }", "@FXML\n public void startCapture(ActionEvent event) throws IOException, PcapNativeException, NotOpenException {\n \tex = Executors.newScheduledThreadPool(3);\n \tallThreads = Executors.newFixedThreadPool(6);\n handle = DeviceListController.getPcapNetworkInterface().openLive(65535, PromiscuousMode.PROMISCUOUS, 50);\n \n //set to capture network in\n handle.setDirection(PcapDirection.IN);\n\n //start capture thread\n Capture cap = new Capture(handle);\n allThreads.execute(cap);\n \n //turn on defragmenter\n Runnable defrag = new Defragmenter();\n ex.scheduleAtFixedRate(defrag, 0, 1000, TimeUnit.MILLISECONDS);\n\n //detection engine\n DetectionHandler detectionHandler = new DetectionHandler();\n allThreads.execute(detectionHandler); \n \n //start db handler - has to be started last\n DatabaseHandler dbHandler = new DatabaseHandler();\n allThreads.execute(dbHandler);\n\n editRuleFileButton.setDisable(true);\n editRuleFilePath.setDisable(true);\n startButton.setDisable(true);\n stopButton.setDisable(false);\n }", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void setLogObject(Log logObject_) {\n\t\tlogObject = logObject_;\n\t\tlog( \"deviceId \" + deviceId, Log.Level.Information );\n\t\tlog( \"location \" + location, Log.Level.Information );\n\t}", "public void inicializarCaptura() {\n try {\n fingerprintSDK = new MatchingContext(); \n //Inicializa la captura de huella digital.\n GrFingerJava.initializeCapture(this); \n objpantprincipal.writeLog(\"**SDK de huella dactilar inicializado con éxito**\");\n } catch (Exception e) {\n //Si ocurre un error se cierra la aplicación.\n //If any error ocurred while initializing GrFinger,\n //writes the error to log\n Toolkit.getDefaultToolkit().beep();\n objpantprincipal.writeLog(e.getMessage());\n //System.exit(1);\n }\n }", "public static boolean debugOn()\r\n {\r\n on = true;\r\n System.out.println(\"Debug Mode On\");\r\n return on;\r\n }", "public void enableCtxRecording();", "public void onEnable(VirtualDevice device, Capability capability) {\n switch (capability) {\n case CAMERA:\n // Camera enabled successfully\n addLog(\"open camera success\");\n // Set the camera enable status to true\n cameraOpend.put(device.getDeviceId(), true);\n break;\n case DISPLAY:\n // The display is successfully enabled. Set the display enable status to true.\n addLog(\"open display success\");\n displayOpend.put(device.getDeviceId(), true);\n break;\n case MIC:\n // mic enabled successfully, set mic enabled status to true\n addLog(\"open mic success\");\n micOpend.put(device.getDeviceId(), true);\n break;\n case SPEAKER:\n // speaker enabled successfully, set speaker enabled status to true\n addLog(\"open speaker success\");\n speakerOpend.put(device.getDeviceId(), true);\n break;\n }\n }", "public void debug() {\n\n }", "public void enableLogging();", "void startRecording() {\n synchronized (serviceConnection) {\n startNewTrackRequested = true;\n serviceConnection.startAndBind();\n \n // Binding was already requested before, it either already happened\n // (in which case running the callback manually triggers the actual recording start)\n // or it will happen in the future\n // (in which case running the callback now will have no effect).\n serviceBindCallback.run();\n }\n }", "@Override\n public void log()\n {\n }", "public static void init()\n {\n debugger = new Debugger(\"log\");\n info = true;\n }", "private void m6615a(Bundle bundle) {\n C0938a.m5006c(\"SR/SoundRecorder\", \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~onCreate\");\n setVolumeControlStream(3);\n this.f5405Y = (AudioManager) getSystemService(\"audio\");\n this.f5406Z = (KeyguardManager) getSystemService(KeyguardManager.class);\n this.f5389I = getApplicationContext();\n this.f5429m = false;\n getWindow().clearFlags(67108864);\n if (bundle != null) {\n this.f5435p = bundle.getInt(\"save_state\");\n }\n if (Build.VERSION.SDK_INT >= 26) {\n this.f5432na = (Vibrator) getSystemService(\"vibrator\");\n }\n this.f5442sa = getIntent();\n }", "public void startVideoRecording() {\n this.mActivity.getCameraAppUI().switchShutterSlidingAbility(false);\n if (this.mCameraState == 1) {\n setCameraState(2);\n Tag tag = TAG;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"startVideoRecording: \");\n stringBuilder.append(Thread.currentThread());\n Log.i(tag, stringBuilder.toString());\n ToastUtil.showToast(this.mActivity, this.mActivity.getString(R.string.video_recording_start_toast), 0);\n this.mAppController.onVideoRecordingStarted();\n if (this.mModeSelectionLockToken == null) {\n this.mModeSelectionLockToken = this.mAppController.lockModuleSelection();\n }\n this.mUI.showVideoRecordingHints(false);\n this.mUI.cancelAnimations();\n this.mUI.setSwipingEnabled(false);\n this.mUI.showFocusUI(false);\n this.mAppController.getCameraAppUI().hideRotateButton();\n this.mAppController.getButtonManager().hideEffectsContainerWrapper();\n final long updateStorageSpaceTime = System.currentTimeMillis();\n this.mActivity.updateStorageSpaceAndHint(new OnStorageUpdateDoneListener() {\n public void onStorageUpdateDone(long bytes) {\n Tag access$100 = VideoModule.TAG;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"updateStorageSpaceAndHint cost time :\");\n stringBuilder.append(System.currentTimeMillis() - updateStorageSpaceTime);\n stringBuilder.append(\"ms.\");\n Log.d(access$100, stringBuilder.toString());\n if (VideoModule.this.mCameraState != 2) {\n VideoModule.this.pendingRecordFailed();\n return;\n }\n if (bytes <= Storage.LOW_STORAGE_THRESHOLD_BYTES) {\n Log.w(VideoModule.TAG, \"Storage issue, ignore the start request\");\n VideoModule.this.pendingRecordFailed();\n } else if (VideoModule.this.mCameraDevice == null) {\n Log.v(VideoModule.TAG, \"in storage callback after camera closed\");\n VideoModule.this.pendingRecordFailed();\n } else if (VideoModule.this.mPaused) {\n Log.v(VideoModule.TAG, \"in storage callback after module paused\");\n VideoModule.this.pendingRecordFailed();\n } else if (VideoModule.this.mMediaRecorderRecording) {\n Log.v(VideoModule.TAG, \"in storage callback after recording started\");\n } else if (VideoModule.this.isSupported(VideoModule.this.mProfile.videoFrameWidth, VideoModule.this.mProfile.videoFrameHeight)) {\n VideoModule.this.mCurrentVideoUri = null;\n VideoModule.this.mCameraDevice.enableShutterSound(false);\n if (VideoModule.this.mNeedGLRender && VideoModule.this.isSupportEffects()) {\n VideoModule.this.playVideoSound();\n VideoModule.this.initGlRecorder();\n VideoModule.this.pauseAudioPlayback();\n VideoModule.this.mActivity.getCameraAppUI().startVideoRecorder();\n } else {\n VideoModule.this.initializeRecorder();\n if (VideoModule.this.mMediaRecorder == null) {\n Log.e(VideoModule.TAG, \"Fail to initialize media recorder\");\n VideoModule.this.pendingRecordFailed();\n return;\n }\n VideoModule.this.pauseAudioPlayback();\n try {\n long mediarecorderStart = System.currentTimeMillis();\n VideoModule.this.mMediaRecorder.start();\n access$100 = VideoModule.TAG;\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"mMediaRecorder.start() cost time : \");\n stringBuilder2.append(System.currentTimeMillis() - mediarecorderStart);\n Log.d(access$100, stringBuilder2.toString());\n VideoModule.this.playVideoSound();\n VideoModule.this.mCameraDevice.refreshSettings();\n VideoModule.this.mCameraSettings = VideoModule.this.mCameraDevice.getSettings();\n VideoModule.this.setFocusParameters();\n } catch (RuntimeException e) {\n Log.e(VideoModule.TAG, \"Could not start media recorder. \", e);\n VideoModule.this.releaseMediaRecorder();\n VideoModule.this.mCameraDevice.lock();\n VideoModule.this.releaseAudioFocus();\n if (VideoModule.this.mModeSelectionLockToken != null) {\n VideoModule.this.mAppController.unlockModuleSelection(VideoModule.this.mModeSelectionLockToken);\n }\n VideoModule.this.setCameraState(1);\n if (VideoModule.this.shouldHoldRecorderForSecond()) {\n VideoModule.this.mAppController.setShutterEnabled(true);\n }\n VideoModule.this.mAppController.getCameraAppUI().showModeOptions();\n if (VideoModule.this.updateModeSwitchUIinModule()) {\n VideoModule.this.mAppController.getCameraAppUI().setModeSwitchUIVisibility(true);\n }\n if (VideoModule.this.isNeedStartRecordingOnSwitching()) {\n VideoModule.this.mAppController.onVideoRecordingStop();\n }\n ToastUtil.showToast(VideoModule.this.mActivity.getApplicationContext(), (int) R.string.video_record_start_failed, 0);\n return;\n }\n }\n VideoModule.this.mAppController.getCameraAppUI().setSwipeEnabled(false);\n VideoModule.this.setCameraState(3);\n VideoModule.this.tryLockFocus();\n VideoModule.this.mMediaRecorderRecording = true;\n VideoModule.this.mActivity.lockOrientation();\n VideoModule.this.mRecordingStartTime = SystemClock.uptimeMillis() + 600;\n VideoModule.this.mAppController.getCameraAppUI().getCameraGLSurfaceView().setAngle(VideoModule.this.mOrientation);\n VideoModule.this.mAppController.getCameraAppUI().hideModeOptions();\n if (VideoModule.this.updateModeSwitchUIinModule()) {\n VideoModule.this.mAppController.getCameraAppUI().setModeSwitchUIVisibility(false);\n }\n if (VideoModule.this.isVideoShutterAnimationEnssential()) {\n VideoModule.this.mAppController.getCameraAppUI().animateBottomBarToVideoStop(R.drawable.ic_stop);\n }\n if (VideoModule.this.isNeedStartRecordingOnSwitching()) {\n VideoModule.this.mAppController.getCameraAppUI().showVideoCaptureButton(true);\n }\n if (VideoModule.this.mAppController.getCameraAppUI().getCurrentModeIndex() == VideoModule.this.mActivity.getResources().getInteger(R.integer.camera_mode_video)) {\n VideoModule.this.mAppController.getCameraAppUI().showVideoPauseButton(false);\n }\n VideoModule.this.mUI.showRecordingUI(true);\n if (VideoModule.this.mAppController.getCameraAppUI().getCameraGLSurfaceView().getVisibility() == 0) {\n VideoModule.this.mUI.hideCapButton();\n }\n VideoModule.this.showBoomKeyTip();\n VideoModule.this.updateRecordingTime();\n access$100 = VideoModule.TAG;\n StringBuilder stringBuilder3 = new StringBuilder();\n stringBuilder3.append(\"startVideoRecording cost time 1 : \");\n stringBuilder3.append(System.currentTimeMillis() - VideoModule.this.mShutterButtonClickTime);\n Log.d(access$100, stringBuilder3.toString());\n if (VideoModule.this.isSendMsgEnableShutterButton()) {\n VideoModule.this.mHandler.sendEmptyMessageDelayed(6, VideoModule.MIN_VIDEO_RECODER_DURATION);\n }\n VideoModule.this.mActivity.enableKeepScreenOn(true);\n VideoModule.this.mActivity.startInnerStorageChecking(new OnInnerStorageLowListener() {\n public void onInnerStorageLow(long bytes) {\n VideoModule.this.mActivity.stopInnerStorageChecking();\n if (VideoModule.this.mCameraState == 3) {\n VideoModule.this.showQuitDialog(R.string.quit_dialog_title_storage_low, R.string.quit_dialog_msg, VideoModule.this.saveAndQuit);\n }\n }\n });\n VideoModule.this.mActivity.startBatteryInfoChecking(new OnBatteryLowListener() {\n public void onBatteryLow(int level) {\n VideoModule.this.mActivity.stopBatteryInfoChecking();\n if (VideoModule.this.mCameraState == 3) {\n VideoModule.this.showQuitDialog(R.string.quit_dialog_title_battery_low, R.string.quit_dialog_msg, VideoModule.this.saveAndQuit);\n }\n }\n });\n } else {\n Log.e(VideoModule.TAG, \"Unsupported parameters\");\n VideoModule.this.pendingRecordFailed();\n }\n }\n });\n }\n }", "public void LogHardAta() { // (simple turn-on to log NotFirm diagnostics)\r\n int info;\r\n if (GotFirmVersion == 0){\r\n info = GetFirmwareRev();\r\n }\r\n if (GotFirmVersion > 18 * 0x10000) { // >: HardAta is installed..\r\n ShowLogging = true;\r\n Send3bytes(Arduino.REPORT_INFO, 8, 7); // = 0xFA (250)\r\n if (SpeakEasy){\r\n System.out.println(\" (F%%F/LogHardAta)\");\r\n }\r\n } else{\r\n System.out.println(\" (F%%F/Can'tLog,NoHard)\");\r\n }\r\n }", "public void onClickStart(View view) {\n\n HashMap<String, UsbDevice> usbDevices = usbManager.getDeviceList();\n if (!usbDevices.isEmpty()) {\n boolean keep = true;\n for (Map.Entry<String, UsbDevice> entry : usbDevices.entrySet()) {\n device = entry.getValue();\n int deviceVID = device.getVendorId();\n if (deviceVID == 0x2341)//Arduino Vendor ID\n {\n PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);\n usbManager.requestPermission(device, pi);\n keep = false;\n } else {\n connection = null;\n device = null;\n }\n\n if (!keep)\n break;\n }\n }\n\n\n }", "public void flashlightSwitch()\n {\n usingFlashlight = !usingFlashlight;\n }", "void fixLoggingControls(){\n if((hardware==null || (hardware!=null && !hardware.isOpen())) && playMode!=playMode.PLAYBACK ){ // we can log from live input or from playing file (e.g. after refiltering it)\n loggingButton.setEnabled(false);\n loggingMenuItem.setEnabled(false);\n return;\n }else{\n loggingButton.setEnabled(true);\n loggingMenuItem.setEnabled(true);\n }\n if(!loggingEnabled && playMode==PlayMode.PLAYBACK){\n loggingButton.setText(\"Start Re-logging\");\n loggingMenuItem.setText(\"Start Re-logging\");\n }else if(loggingEnabled){\n loggingButton.setText(\"Stop logging\");\n loggingButton.setSelected(true);\n loggingMenuItem.setText(\"Stop logging data\");\n }else{\n loggingButton.setText(\"Start logging\");\n loggingButton.setSelected(false);\n loggingMenuItem.setText(\"Start logging data\");\n }\n }", "public static boolean log() {\n\t\tif ((xml == null) || (log == null)) return false;\n\t\treturn log.equals(\"yes\");\n\t}", "public TrackCircuit()\n {\n \tfailureMode = 0; //set to Normal Operation\n trackOccupancy = false;\n }", "public void start() {\n\t\tSystem.out.println(\"开启系统1\");\r\n\t}", "private void start() {\n\n\t}", "int insertSelective(TpDevicePlay record);", "public void open() {\n\t}", "public void MAJInformation(Intent intent){\n\n XBee64BitAddress rAddress=hexStringToXBeeAddress(intent.getStringExtra(\"address\"));\n int indexTab=getindexFromXbeeAddress(rAddress);\n String rCMD=intent.getStringExtra(\"cmd\"); // cmd : PING || AUTH || START || STOP\n int status=intent.getIntExtra(\"status\",-1); // status de la borne\n int rExtStatus=intent.getIntExtra(\"ext_status\",-1); // ext status : DOOR OPENED || BOOT || ...\n int rError=intent.getIntExtra(\"error_status\",-1);\n int rSessionID=intent.getIntExtra(\"sessionID\",-1);\n int proto=intent.getIntExtra(\"proto\",-1);\n String rTag=intent.getStringExtra(\"tag\");\n Date time = new Date();\n time.setTime(intent.getLongExtra(\"time\", -1));\n\n\n Status rStatus=mCPStatus[indexTab];\n\n G2EvseCMD cmd=G2EvseCMD.valueOf(rCMD);\n\n if(cmd.equals(G2EvseCMD.PING)){\n rStatus.setInformationPing(G2EvseStatus.fromCode(status),rError,rExtStatus);\n rStatus.setSession(rSessionID, rTag, proto, time);//time in start session\n\n\n\n }else if(cmd.equals(G2EvseCMD.AUTH)){\n rStatus.setAuth(true);\n rStatus.setAuthInProgress( rTag );\n\n }else if(cmd.equals(G2EvseCMD.START)){\n rStatus.setSession(rSessionID, rTag, proto, time);\n\n }else if(cmd.equals(G2EvseCMD.STOP)){\n rStatus.setSession(rSessionID, rTag, proto, time);\n }\n }", "public void setLogging(boolean logging);" ]
[ "0.6395703", "0.6395703", "0.61891866", "0.61018455", "0.5851056", "0.581408", "0.5788961", "0.5767729", "0.5767729", "0.5764752", "0.57545567", "0.5687258", "0.5675918", "0.5672429", "0.5659051", "0.5652185", "0.564531", "0.56403214", "0.5626824", "0.56042284", "0.55666035", "0.55638844", "0.5557945", "0.55302817", "0.5512859", "0.55099505", "0.550176", "0.5498288", "0.5496815", "0.5489228", "0.54688156", "0.54679084", "0.54528254", "0.5451373", "0.5435534", "0.54326564", "0.5428383", "0.54261315", "0.54124177", "0.54056966", "0.5401054", "0.53941214", "0.5372347", "0.5371081", "0.5370741", "0.5368959", "0.5351342", "0.5350518", "0.5340865", "0.5339263", "0.5327268", "0.5325214", "0.5296816", "0.5293304", "0.5283693", "0.52836835", "0.5275889", "0.52755666", "0.5273296", "0.5266141", "0.52656096", "0.5256928", "0.5244508", "0.5244508", "0.524408", "0.52387154", "0.52377224", "0.5233575", "0.52331835", "0.5230499", "0.5228213", "0.5219989", "0.5219768", "0.5215486", "0.521245", "0.521245", "0.521245", "0.5207193", "0.5203818", "0.51900005", "0.5183206", "0.5165493", "0.51608247", "0.51606894", "0.5157721", "0.5148757", "0.51485777", "0.5141356", "0.5134306", "0.5132338", "0.5126984", "0.5126152", "0.51237845", "0.51142144", "0.51115984", "0.5106773", "0.51006824", "0.50892836", "0.508829", "0.50880224", "0.5086548" ]
0.0
-1
loger.addRecordToLog("updateFingerprintImage : " + fi);
private void updateFingerprintImage(FingerprintImage fi) { try { byte[] fpBmp = null; Bitmap bitmap; if (fi == null || (fpBmp = fi.convert2Bmp()) == null || (bitmap = BitmapFactory.decodeByteArray(fpBmp, 0, fpBmp.length)) == null) { //loger.addRecordToLog("updateFingerprintImage sin huella "); bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.sinhuella); } mHandler.sendMessage(mHandler.obtainMessage(MSG_UPDATE_IMAGE, bitmap)); } catch (Exception e) { //loger.addRecordToLog("Exception updateFingerprintImage : " + e.getMessage()); //mFingerprintImage.setImageResource( R.drawable.errornuevahuella ); //e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onFingerprintEntered();", "public void recordFingerprint(MavenBuild build) throws IOException {\n FingerprintMap map = Hudson.getInstance().getFingerprintMap();\n map.getOrCreate(build,fileName,md5sum);\n }", "void storeLogMessage(String log)\n {\n logImage += log + \"\\n\";\n System.out.println(logImage);\n printFile(\"Log.txt\");\n }", "void persistFingerprint(String user, SongMetadata smd, Fingerprint fp) throws SQLException;", "public void onLogFPS() {\n }", "public void setFingerprint(String fingerprint) {\n this.fingerprint = fingerprint;\n }", "private void logToFile() {\n }", "public void recordLog(){\r\n\t\tthis.finishLog(resourceFiles.getString(\"PathHepparIITestDirectory\") + \"/\" + TEST_FILE_NAME); \r\n\t}", "@AfterMethod\n\tpublic void reportUpdate(ITestResult result) throws IOException{\n\t if(ITestResult.FAILURE==result.getStatus()){\n\t \n\t String temp=result.getMethod().getMethodName()+\".png\";\n\t captureScreenshot(driver,temp); \n\t\t //logger.fail(\"Screenshot is below:\" + logger.addScreenCaptureFromPath(System.getProperty(\"user.dir\")+\"/screenshots/\"+temp));\n\t\t\n\t \n\t }\n\t}", "@Then(\"Universal Image Record should be created and should be displayed in the listing\")\n\t\tpublic void ff() throws FileNotFoundException, IOException, InterruptedException {\n\t\t}", "private void handleFingerprintAuthenticated(int i, boolean z) {\n Trace.beginSection(\"KeyGuardUpdateMonitor#handlerFingerPrintAuthenticated\");\n try {\n if (isFingerprintDisabled(i)) {\n Log.d(\"KeyguardUpdateMonitor\", \"Fingerprint disabled by DPM for authUserId: \" + i);\n return;\n }\n onFingerprintAuthenticated(i, z);\n setFingerprintRunningState(0);\n Trace.endSection();\n } finally {\n setFingerprintRunningState(0);\n }\n }", "abstract protected void _log(Snapshot snapshot) throws Exception;", "public void logScreen(String imageName) {\n this.logScreen(imageName, imageName, thumbHeight, thumbWidth);\n }", "private void logDatabaseMessage(String methodName, int status, String message, BufferedImage image) {\r\n\t\tint idImg = -1;\r\n\t\ttry {\r\n\t\t\tconnect();\r\n\t\t\t\r\n\t\t\tif (image != null)\r\n\t\t\t\tidImg = insertImageIntoDatabase(image);\r\n\t\t\t\r\n\t\t\tPreparedStatement pStat = dbConnection\r\n\t\t\t\t\t.prepareStatement(\"insert into steps (id_test, id_run, id_status, title, details, time, id_img) VALUES (?, ?, ?, ?, ?, now(), ?)\");\r\n\t\t\tpStat.setInt(1, Conf.getTestId());\r\n\t\t\tpStat.setInt(2, Conf.getRunId());\r\n\t\t\tpStat.setInt(3, status);\r\n\t\t\tpStat.setString(4, methodName);\r\n\t\t\tpStat.setString(5, message);\r\n\r\n\t\t\tif (idImg == -1) {\r\n\t\t\t\tpStat.setNull(6, Types.INTEGER);\r\n\t\t\t} else {\r\n\t\t\t\tpStat.setInt(6, idImg);\r\n\t\t\t}\r\n\r\n\t\t\tpStat.execute();\r\n\t\t\tpStat.close();\r\n\t\t\t\r\n\t\t\tupdateTestEnd();\r\n\t\t\t\r\n\t\t} catch (SQLException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t}", "private void handleFingerprintHelp(int i, String str) {\n Assert.isMainThread();\n for (int i2 = 0; i2 < this.mCallbacks.size(); i2++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i2).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onBiometricHelp(i, str, BiometricSourceType.FINGERPRINT);\n }\n }\n }", "void updateProfilePhoto(int userId, String filename);", "private void recordLocationData() \r\n\t{\r\n\t\tif(loadedImage!=null)\r\n\t\t{\r\n\t\t\tString image = BitMapToString(loadedImage);\r\n\t\t\tStringBuffer stringBuffer = new StringBuffer();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < image.length(); i++) \r\n\t\t\t{\r\n\t\t\t\tif (image.charAt(i) != '\\n' && image.charAt(i) != '\\r') \r\n\t\t\t\t{\r\n\t\t\t\t\tstringBuffer.append(image.charAt(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinalimage = stringBuffer.toString();\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfinalimage = \"dummystring\";\r\n\t\t\tfinaloutput=xLocation+\"\\n\"+yLocation+\"\\n\"+locationTitle+\"\\n\"+description+\"\\n\"+finalimage+\"\\n\";\r\n\t\t\t\r\n\t\t\tcreateLocationObject();\r\n\t\t\twritetoFile(finaloutput);\r\n\t\t\t\r\n\t\t\tdatasource.addLocation(getxLocation(), getyLocation(), locationTitle, description, finalimage); \r\n\t\t\tLog.v(\"CHECK again: \", getxLocation()+\"\\n\"+getyLocation());\r\n\t\t}\r\n\t\t\r\n\t\tLog.v(\"ADD finaloutput: \", finaloutput);\r\n\t}", "public String getFingerprint() {\n return fingerprint;\n }", "public void logSensorData () {\n\t}", "public void logImageVerificationResult(ImageVerificationResult result, String imageName) {\n this.logImageVerificationResult(result, imageName, thumbHeight, thumbWidth);\n }", "private void StartSyncCapture() {\n\n new Thread(new Runnable() {\n\n @Override\n public void run() {\n SetTextOnUIThread(\"\");\n isCaptureRunning = true;\n try {\n FingerData fingerData = new FingerData();//predefined class to get result data\n\n //Method to capture finger print with in time out session\n int ret = mfs100.AutoCapture(fingerData, timeout,false);\n Log.e(\"StartSyncCapture.RET\", \"\"+ret);\n if (ret != 0) {\n SetTextOnUIThread(mfs100.GetErrorMsg(ret));\n } else {\n lastCapFingerData = fingerData;\n final Bitmap bitmap = BitmapFactory.decodeByteArray(fingerData.FingerImage(), 0,\n fingerData.FingerImage().length);\n activity.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n //set bitmap image to the image view\n imgFinger.setImageBitmap(bitmap);\n }\n });\n\n SetTextOnUIThread(\"Capture Success\");\n String log = \"\\nQuality: \" + fingerData.Quality()\n + \"\\nNFIQ: \" + fingerData.Nfiq()\n + \"\\nWSQ Compress Ratio: \"\n + fingerData.WSQCompressRatio()\n + \"\\nImage Dimensions (inch): \"\n + fingerData.InWidth() + \"\\\" X \"\n + fingerData.InHeight() + \"\\\"\"\n + \"\\nImage Area (inch): \" + fingerData.InArea()\n + \"\\\"\" + \"\\nResolution (dpi/ppi): \"\n + fingerData.Resolution() + \"\\nGray Scale: \"\n + fingerData.GrayScale() + \"\\nBits Per Pixal: \"\n + fingerData.Bpp() + \"\\nWSQ Info: \"\n + fingerData.WSQInfo();\n SetLogOnUIThread(log);\n\n SetData2(fingerData);\n\n }\n } catch (Exception ex) {\n SetTextOnUIThread(ex.toString());\n } finally {\n isCaptureRunning = false;\n }\n }\n }).start();\n }", "private static void logInfo(Request req, Path tempFile) throws IOException, ServletException {\n System.out.println(\"Uploaded file '\" + getFileName(req.raw().getPart(\"uploaded_file\")) + \"' saved as '\" + tempFile.toAbsolutePath() + \"'\");\n }", "public void dumpLog(String filename){\n }", "int insertSelective(H5AppDownloadLog record);", "public interface FingerprintCallback {\n void onAuthenticated();\n void onError(int msgId);\n}", "private void handleFingerprintAcquired(int i) {\n Assert.isMainThread();\n if (i == 0) {\n for (int i2 = 0; i2 < this.mCallbacks.size(); i2++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i2).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onBiometricAcquired(BiometricSourceType.FINGERPRINT);\n }\n }\n }\n }", "LogRecorder getLogRecorder();", "LogRecorder getLogRecorder();", "public String getFingerprint() {\n return fingerprint;\n }", "public String getFingerprint() {\n return fingerprint;\n }", "public String getFingerprint() {\n return fingerprint;\n }", "public interface FPStatusListener {\n void fpAuthSuccess();\n\n /**\n * If there is any problem in authenticate using fingerprint scanner.\n * it'll be called\n * Like if you exceed more number of attempts.\n * @param error error message from the fingerprint auth.\n */\n void fpAuthFailed(@Nullable String error);\n}", "IFileLogger log();", "public void record(){\n\t}", "public void onPictureTaken(byte[] arg0, Camera arg1) {\n \t String pname = \"/sdcard/\"+System.currentTimeMillis()+\".jpg\";\n\t FileOutputStream outStream = null;\n\t try {\n\t\t outStream = new FileOutputStream(pname);\n\t\t outStream.write(arg0);\n\t\t outStream.close(); \n\t \n\t\t Calendar calendar = Calendar.getInstance();\n\t \tjava.util.Date now = calendar.getTime();\n\t \tjava.util.Date today = new java.util.Date();\n\t\t\tjava.sql.Timestamp ti = new java.sql.Timestamp(now.getTime());\n\t\t\t// storing photo on SD Card and link in database...\n\t\t\t\n\t Toast.makeText(AddContact.this,\n\t \"Image \"+pname+\" saved \",\n\t Toast.LENGTH_LONG).show();\n\t Bitmap bm = BitmapFactory.decodeFile(pname);\n\t img2.setImageBitmap(bm);\n\t // data.Insert(name,strmn,strln,strmno,mshome,mswork,msother,mscust, streid,eswork,esother,mscust,pname,strtag,0);\n\t } catch (FileNotFoundException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t } catch (IOException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t }\n\n\t camera.startPreview();\n }", "LogRecord saveLog(LogRecord logRecord);", "public void setFingerprintTemplate(javax.activation.DataHandler param){\n localFingerprintTemplateTracker = true;\n \n this.localFingerprintTemplate=param;\n \n\n }", "public String getFingerprint() {\n return fingerprint;\n }", "public void inicializarCaptura() {\n try {\n fingerprintSDK = new MatchingContext(); \n //Inicializa la captura de huella digital.\n GrFingerJava.initializeCapture(this); \n objpantprincipal.writeLog(\"**SDK de huella dactilar inicializado con éxito**\");\n } catch (Exception e) {\n //Si ocurre un error se cierra la aplicación.\n //If any error ocurred while initializing GrFinger,\n //writes the error to log\n Toolkit.getDefaultToolkit().beep();\n objpantprincipal.writeLog(e.getMessage());\n //System.exit(1);\n }\n }", "public void updateUserInfo(View view){\n findViewById(R.id.loadingPanel).setVisibility(View.VISIBLE);\n\n FirebaseStorage storage = FirebaseStorage.getInstance();\n StorageReference storageRef = storage.getReferenceFromUrl(\"gs://unifriends-d63b5.appspot.com\");\n // Create a reference to \"mountains.jpg\"\n\n StorageReference mountainsRef = storageRef.child(\"usersImage/\" + FirebaseAuth.getInstance().getUid() + \".jpg\");\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bitmap.compress(CompressFormat.JPEG, 100, baos);\n byte[] data = baos.toByteArray();\n\n UploadTask uploadTask = mountainsRef.putBytes(data);\n uploadTask.addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n findViewById(R.id.loadingPanel).setVisibility(View.GONE);\n\n // Handle unsuccessful uploads\n }\n }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n // taskSnapshot.getMetadata() contains file metadata such as size, content-type, and download URL.\n// Uri downloadUrl = taskSnapshot.getUploadSessionUri();\n Log.d(TAG, \"Image upload done\");\n\n Intent intent = new Intent(Signup2.this, Signup3.class);\n intent.putExtra(\"facialID\", facialID.toString());\n /* pass the facial id to the next activity*/\n findViewById(R.id.loadingPanel).setVisibility(View.GONE);\n startActivity(intent);\n }\n });\n }", "int updateByPrimaryKey(HotspotLog record);", "int updateByExample(@Param(\"record\") H5AppDownloadLog record, @Param(\"example\") H5AppDownloadLogExample example);", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast\n .makeText(RecordingService.this,\n \"File uploaded!!\",\n Toast.LENGTH_SHORT)\n .show();\n }", "Fingerprint findFingerprintByUserAndMetadata(String user, SongMetadata smd) throws SQLException;", "void logShot(UUID shooter, UUID projectile);", "private void handleFingerprintError(int i, String str) {\n int i2;\n Assert.isMainThread();\n if (i == 5 && this.mHandler.hasCallbacks(this.mCancelNotReceived)) {\n this.mHandler.removeCallbacks(this.mCancelNotReceived);\n }\n if (i == 5 && this.mFingerprintRunningState == 3) {\n setFingerprintRunningState(0);\n updateFingerprintListeningState();\n } else {\n setFingerprintRunningState(0);\n this.mFingerprintCancelSignal = null;\n }\n if (i == 1 && (i2 = this.mHardwareFingerprintUnavailableRetryCount) < 10) {\n this.mHardwareFingerprintUnavailableRetryCount = i2 + 1;\n this.mHandler.removeCallbacks(this.mRetryFingerprintAuthentication);\n this.mHandler.postDelayed(this.mRetryFingerprintAuthentication, 500);\n }\n if (i == 9) {\n this.mLockPatternUtils.requireStrongAuth(8, getCurrentUser());\n }\n if (i == 7 || i == 9) {\n this.mFingerprintLockedOut = true;\n }\n for (int i3 = 0; i3 < this.mCallbacks.size(); i3++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i3).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onBiometricError(i, str, BiometricSourceType.FINGERPRINT);\n }\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(DetailsForm.this, \"Image Uploaded Successfully\", Toast.LENGTH_LONG).show();\n }", "int insert(PicInfo record);", "public void uploadLogCollection();", "public void storePhoto(int receiptId, FileArguments args);", "@Override\n public void run() {\n\n showProgressDialog(getString(R.string.mns_titulo), getString(R.string.preparing_device));\n\n int error;\n if ((error = mHuellaScanner.powerOn()) != FingerprintScanner.RESULT_OK) {\n //showErrorDialog(getString(R.string.fingerprint_device_power_on_failed), getFingerprintErrorString(error));\n //loger.addRecordToLog(\"fingerprint_device_power_on_failed : \" + error);\n } else {\n //loger.addRecordToLog(\"mScanner.powerOn() success : \" + error);\n }\n\n Log.i(\"MV\", \"before mScanner.open()\");\n //error = mScanner.open();\n //Log.i(\"MV\", \"after mScanner.open() : \" + error);\n //logger.addRecordToLog(\"after mScanner.open() : \" + error);\n if ((error = mHuellaScanner.open()) != FingerprintScanner.RESULT_OK) {\n Log.i(\"MV\", \"mScanner.open() error\");\n Log.i(\"MV\", \"MSG_UPDATE_SN\");\n Log.i(\"MV\", \"MSG_UPDATE_FW_VERSION\");\n\n //loger.addRecordToLog(\"mScanner.open() error\");\n //loger.addRecordToLog(\"MSG_UPDATE_SN\");\n //loger.addRecordToLog(\"MSG_UPDATE_FW_VERSION\");\n\n } else {\n\n Result res = mHuellaScanner.getSN();\n res = mHuellaScanner.getFirmwareVersion();\n //loger.addRecordToLog(\"MSG_UPDATE_FW_VERSION : \" + (String) res.data);\n\n /*mHandler.sendMessage(mHandler.obtainMessage(MSG_UPDATE_SN, getString(R.string.fps_sn, (String) res.data)));\n mHandler.sendMessage(mHandler.obtainMessage(MSG_UPDATE_FW_VERSION, getString(R.string.fps_fw, (String) res.data)));\n showInfoToast(getString(R.string.fingerprint_device_open_success));\n enableControl(true);*/\n }\n\n if ((error = Bione.initialize(UnicaCompraActivity.this, Constantes.FP_DB_PATH)) == Bione.RESULT_OK) {\n //loger.addRecordToLog(\"algorithm_initialization_success\");\n } else {\n //loger.addRecordToLog(\"algorithm_initialization_failed\");\n }\n\n dismissProgressDialog();\n\n //openDeviceEnEjecucion = Boolean.FALSE;\n //loger.addRecordToLog(\"_openDevice_ fin run\");\n }", "private void logLocalMessage(String methodName, int status, String message, BufferedImage image) {\r\n\t\t// Save image into file\r\n\t\tif (image != null) {\r\n\t\t\tString absoluteImagePath = null;\r\n\t\t\t\r\n\t\t\t// kiedy wywolujemy bezposrednio z eclipsa\r\n\t\t\tif (!System.getProperty(\"user.dir\").contains(\"results\")) {\r\n\t\t\t\tnew File(System.getProperty(\"user.dir\") + \"/results/temp/img/\").mkdirs();\r\n\t\t\t\tabsoluteImagePath = System.getProperty(\"user.dir\") + \"/results/temp/img/\" + System.currentTimeMillis() + \".\" + IMG_FORMAT;\r\n\t\t\t} else {\t\t\t\r\n\t\t\t\tnew File(System.getProperty(\"user.dir\") + \"/img/\").mkdirs();\r\n\t\t\t\tabsoluteImagePath = System.getProperty(\"user.dir\") + \"/img/\" + System.currentTimeMillis() + \".\" + IMG_FORMAT;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tFile outputFile = new File(absoluteImagePath);\r\n\t\t\t\tImageIO.write(image, IMG_FORMAT, outputFile);\r\n\t\t\t\tSystem.out.println(\"*HTML*<img src=\\\"\" + absoluteImagePath + \"\\\">\");\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\t\t\t\r\n\t\t}\t\t\r\n\r\n\t\tswitch (status) {\r\n\t\tcase PASSED:\r\n\t\t\tSystem.out.println(\"|PASS|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\tcase FAILED:\r\n\t\t\tSystem.err.println(\"|FAIL|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\tcase WARNING:\r\n\t\t\tSystem.out.println(\"|WARN|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"|INFO|\" + currentDate() + \"|\" + methodName + \" \" + message);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(getApplicationContext(),\"Image uploaded\",Toast.LENGTH_SHORT).show();\n }", "public void logData(){\n }", "abstract protected void _log(TrackingActivity activity) throws Exception;", "private void logDeviceInfo() {\n logDeviceLevel();\n }", "private void logDeviceInfo() {\n logDeviceLevel();\n }", "void mo60904b(AvatarImageWithVerify avatarImageWithVerify);", "@Override\n public void onSuccess (UploadTask.TaskSnapshot taskSnapshot){\n Toast.makeText(IncomeActivity.this, \"Image uploaded successfully\",\n Toast.LENGTH_SHORT).show();\n }", "void updateFaithTrack(String username, LightFaithTrack faithTrack);", "private void logCurrentSensorEntriesBatch() {\n\t\tentriesRecorded++;\n\n\t\tint targetBatchSize = Constants.MS_FREQUENCY_FOR_CAMERA_CAPTURE / Constants.MS_INS_SAMPLING_FREQUENCY;\n\n\t\tArrayList<SensorEntry> toProcess = new ArrayList<SensorEntry>(this.sensorEntryBatch.subList(0, targetBatchSize));\n\t\tthis.sensorEntryBatch = new ArrayList<SensorEntry>(this.sensorEntryBatch.subList(targetBatchSize,\n\t\t\t\ttargetBatchSize));\n\n\t\tthis.writeBatchToFile(toProcess);\n\t}", "public void log(ScreeningResult message) {\n if (message == null) {\n throw new NullPointerException(\"message should not be null.\");\n }\n\n Connection conn = null;\n PreparedStatement stmt = null;\n\n try {\n conn = DbHelper.getConnection();\n\n if (this.request instanceof SubmissionScreeningRequest) {\n stmt = conn.prepareStatement(\"UPDATE submission SET passed_auto_screening = ? WHERE submission_v_id = ?\");\n } else if (request instanceof SpecificationScreeningRequest){\n stmt = conn.prepareStatement(\"UPDATE specification SET passed_auto_screening = ? WHERE specification_id = ?\");\n }\n\n stmt.setBoolean(1, message.isSuccess());\n stmt.setLong(2, this.request.getArtifactId());\n\n if (!executeUpdate(stmt, maxRetries, retrySleepTime)) {\n throw new DatabaseException(\"Log result failed after \" + maxRetries + \" retries.\");\n }\n } catch (SQLException sqle) {\n throw new DatabaseException(\"Log result fails.\", sqle);\n } finally {\n DbHelper.dispose(conn, stmt, null);\n }\n }", "public void takePicture() {\n LightMeter lightMeter = new LightMeter(film.getSpeed());\n shutter.setSeconds(lightMeter.getRecommendedSpeed());\n aperture.setSize(lightMeter.getRecommendedAperture());\n shutter.trigger();\n }", "public void addRpiPhoto(String rpiId, String time, String name, byte[] photo) throws SQLException, IOException;", "private void writeLog(){\n\t\tStringBuilder str = new StringBuilder();\r\n\t\tstr.append(System.currentTimeMillis() + \", \");\r\n\t\tstr.append(fileInfo.getCreator() + \", \");\r\n\t\tstr.append(fileInfo.getFileName() + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(networkSize + \", \");\r\n\t\tstr.append(fileInfo.getN1() + \", \");\r\n\t\tstr.append(fileInfo.getK1() + \", \");\r\n\t\tstr.append(fileInfo.getN2() + \", \");\r\n\t\tstr.append(fileInfo.getK2() + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT)+ \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.encryStart, logger.encryStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \"\\n\");\r\n\t\t\r\n\t\tString tmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getKeyStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\r\n\t\t\r\n\t\ttmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getFileStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.FILE_CREATION, str.toString());\t\t\r\n\t\t\r\n\t\t// Topology Discovery\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"TopologyDisc, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.topStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT ) + \", \");\r\n\t\tstr.append(\"\\n\");\t\t\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\r\n\t\t\r\n\t\t// Optimization\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"Optimization, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.optStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(\"\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t\t\r\n\t\t\r\n\t\t// File Distribution\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"FileDistribution, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(logger.distStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \", \");\r\n\t\tstr.append(\"\\n\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t}", "@VisibleForTesting\n public void onFingerprintAuthenticated(int i, boolean z) {\n Assert.isMainThread();\n Trace.beginSection(\"KeyGuardUpdateMonitor#onFingerPrintAuthenticated\");\n this.mUserFingerprintAuthenticated.put(i, new BiometricAuthenticated(true, z));\n if (getUserCanSkipBouncer(i)) {\n this.mTrustManager.unlockedByBiometricForUser(i, BiometricSourceType.FINGERPRINT);\n }\n this.mFingerprintCancelSignal = null;\n for (int i2 = 0; i2 < this.mCallbacks.size(); i2++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i2).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onBiometricAuthenticated(i, BiometricSourceType.FINGERPRINT, z);\n }\n }\n Handler handler = this.mHandler;\n handler.sendMessageDelayed(handler.obtainMessage(336), 500);\n reportSuccessfulBiometricUnlock(z, i);\n Trace.endSection();\n }", "int insert(HotspotLog record);", "@Override\n public void onPictureTaken(byte[] data, Camera camera) {\n\n //Retrieve taken photo contents\n File pictureFile = cameraRecorder.getOutputMediaFile(MEDIA_TYPE_IMAGE);\n\n //If there is no file (taking the picture failed), take no action and display a warning message\n if (pictureFile == null) {\n Log.d(\"Tag\", \"Error creating media file, check storage permissions\");\n return;\n }\n\n //If a file does exist, begin the activity preparations for saving to NFC\n else {\n\n //Fade out camera components\n camera_linear.startAnimation(fadeout);\n captureButton.startAnimation(fadeout);\n captureButton.setVisibility(View.GONE);\n preview.setVisibility(View.GONE);\n camera_linear.setVisibility(View.GONE);\n\n //Write photo data to file\n try {\n FileOutputStream fos = new FileOutputStream(pictureFile);\n fos.write(data);\n fos.close();\n //Save copies of the picture in Tag and Cover directories under the current story UUID\n cameraRecorder.copyFile(pictureFile, cameraRecorder.getTagFile());\n cameraRecorder.copyFile(pictureFile, cameraRecorder.getCoverFile());\n } catch (FileNotFoundException e) {\n Log.d(\"Tag\", \"File not found: \" + e.getMessage());\n } catch (IOException e) {\n Log.d(\"Tag\", \"Error accessing file: \" + e.getMessage());\n }\n\n //Reset camera for further use\n resetCamera();\n //Mark new story as ready to be saved with audio and picture complete\n newStoryReady = true;\n //Begin the automatic timer for saving to the archive\n idleStoryCountdown();\n slideOutViewAnimation(cameraButton);\n slideInViewAnimation(archive);\n //Run a commentary instruction asking user to scan to a tag\n commentaryInstruction.onPlay(Uri.parse(\"android.resource://\" + getPackageName() + \"/\" + R.raw.attachnfc), false, null, \"RecordStory\");\n\n //If network connected, attempt to save story to the cloud\n if (authenticated) {\n //Generate a new unique identifier\n UUID objectUUID = UUID.randomUUID();\n //Create new SaveToCloud object, which handles saving the object to the cloud.\n SaveToCloud saveToCloud = new SaveToCloud(story_directory, objectUUID);\n saveToCloud.CloudSaveNewObject();\n\n }\n }\n }", "private void setCameraFlashModeIcon(android.widget.ImageView r5, java.lang.String r6) {\n /*\n r4 = this;\n r0 = r6.hashCode();\n r1 = 3551; // 0xddf float:4.976E-42 double:1.7544E-320;\n r2 = 2;\n r3 = 1;\n if (r0 == r1) goto L_0x0029;\n L_0x000a:\n r1 = 109935; // 0x1ad6f float:1.54052E-40 double:5.4315E-319;\n if (r0 == r1) goto L_0x001f;\n L_0x000f:\n r1 = 3005871; // 0x2dddaf float:4.212122E-39 double:1.4850976E-317;\n if (r0 == r1) goto L_0x0015;\n L_0x0014:\n goto L_0x0033;\n L_0x0015:\n r0 = \"auto\";\n r6 = r6.equals(r0);\n if (r6 == 0) goto L_0x0033;\n L_0x001d:\n r6 = 2;\n goto L_0x0034;\n L_0x001f:\n r0 = \"off\";\n r6 = r6.equals(r0);\n if (r6 == 0) goto L_0x0033;\n L_0x0027:\n r6 = 0;\n goto L_0x0034;\n L_0x0029:\n r0 = \"on\";\n r6 = r6.equals(r0);\n if (r6 == 0) goto L_0x0033;\n L_0x0031:\n r6 = 1;\n goto L_0x0034;\n L_0x0033:\n r6 = -1;\n L_0x0034:\n if (r6 == 0) goto L_0x0061;\n L_0x0036:\n if (r6 == r3) goto L_0x004e;\n L_0x0038:\n if (r6 == r2) goto L_0x003b;\n L_0x003a:\n goto L_0x0073;\n L_0x003b:\n r6 = 2131165380; // 0x7f0700c4 float:1.7944975E38 double:1.0529356E-314;\n r5.setImageResource(r6);\n r6 = 2131558417; // 0x7f0d0011 float:1.874215E38 double:1.053129786E-314;\n r0 = \"AccDescrCameraFlashAuto\";\n r6 = org.telegram.messenger.LocaleController.getString(r0, r6);\n r5.setContentDescription(r6);\n goto L_0x0073;\n L_0x004e:\n r6 = 2131165382; // 0x7f0700c6 float:1.794498E38 double:1.052935601E-314;\n r5.setImageResource(r6);\n r6 = 2131558419; // 0x7f0d0013 float:1.8742153E38 double:1.053129787E-314;\n r0 = \"AccDescrCameraFlashOn\";\n r6 = org.telegram.messenger.LocaleController.getString(r0, r6);\n r5.setContentDescription(r6);\n goto L_0x0073;\n L_0x0061:\n r6 = 2131165381; // 0x7f0700c5 float:1.7944978E38 double:1.0529356004E-314;\n r5.setImageResource(r6);\n r6 = 2131558418; // 0x7f0d0012 float:1.8742151E38 double:1.0531297864E-314;\n r0 = \"AccDescrCameraFlashOff\";\n r6 = org.telegram.messenger.LocaleController.getString(r0, r6);\n r5.setContentDescription(r6);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.telegram.p004ui.Components.ChatAttachAlert.setCameraFlashModeIcon(android.widget.ImageView, java.lang.String):void\");\n }", "int insert(SysPic record);", "public void saveImage(){\n new Thread() {\n public void run() {\n String image_url = stuffRoomInfo.getStuffLink();\n Log.i(\"OGT\", \"image_url:in showImage \" + image_url);\n getOGTag(image_url);\n // Display a png image from the specified file\n ImageUrlSendServer();\n }\n }.start();\n }", "int updateByPrimaryKeySelective(H5AppDownloadLog record);", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Log.d(TAG, \"Image upload done\");\n\n Intent intent = new Intent(Signup2.this, Signup3.class);\n intent.putExtra(\"facialID\", facialID.toString());\n /* pass the facial id to the next activity*/\n findViewById(R.id.loadingPanel).setVisibility(View.GONE);\n startActivity(intent);\n }", "public void saveFinalPhoto(byte[] jpegData, NamedEntity name, ExifInterface exif, CameraProxy camera, Map<String, Object> externalInfo) {\n byte[] bArr = jpegData;\n NamedEntity namedEntity = name;\n ExifInterface exifInterface = exif;\n int orientation = Exif.getOrientation(exif);\n float zoomValue = 1.0f;\n if (PhotoModule.this.mCameraCapabilities.supports(Feature.ZOOM)) {\n zoomValue = PhotoModule.this.mCameraSettings.getCurrentZoomRatio();\n }\n float zoomValue2 = zoomValue;\n boolean hdrOn = SceneMode.HDR == PhotoModule.this.mSceneMode;\n String flashSetting = PhotoModule.this.mActivity.getSettingsManager().getString(PhotoModule.this.mAppController.getCameraScope(), Keys.KEY_FLASH_MODE);\n boolean gridLinesOn = Keys.areGridLinesOn(PhotoModule.this.mActivity.getSettingsManager());\n UsageStatistics instance = UsageStatistics.instance();\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(namedEntity.title);\n stringBuilder.append(Storage.JPEG_POSTFIX);\n instance.photoCaptureDoneEvent(10000, stringBuilder.toString(), exifInterface, camera.getCharacteristics().isFacingFront(), hdrOn, zoomValue2, flashSetting, gridLinesOn, Float.valueOf((float) PhotoModule.this.mTimerDuration), PhotoModule.this.mShutterTouchCoordinate, Boolean.valueOf(PhotoModule.this.mVolumeButtonClickedFlag));\n PhotoModule.this.mShutterTouchCoordinate = null;\n PhotoModule.this.mVolumeButtonClickedFlag = false;\n int orientation2;\n if (PhotoModule.this.mIsImageCaptureIntent) {\n orientation2 = orientation;\n PhotoModule.this.mJpegImageData = bArr;\n PhotoModule.this.mUI.disableZoom();\n if (PhotoModule.this.mQuickCapture) {\n PhotoModule.this.onCaptureDone();\n } else {\n Log.v(PhotoModule.TAG, \"showing UI\");\n PhotoModule.this.mUI.showCapturedImageForReview(bArr, orientation2, false);\n PhotoModule.this.mIsInIntentReviewUI = true;\n }\n } else {\n int width;\n int height;\n int width2;\n int DEPTH_H;\n Integer exifWidth = exifInterface.getTagIntValue(ExifInterface.TAG_PIXEL_X_DIMENSION);\n Integer exifHeight = exifInterface.getTagIntValue(ExifInterface.TAG_PIXEL_Y_DIMENSION);\n if (!PhotoModule.this.mShouldResizeTo16x9 || exifWidth == null || exifHeight == null) {\n Size s = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n if ((PhotoModule.this.mJpegRotation + orientation) % MediaProviderUtils.ROTATION_180 == 0) {\n width = s.width();\n height = s.height();\n } else {\n width2 = s.height();\n height = s.width();\n width = width2;\n }\n } else {\n width = exifWidth.intValue();\n height = exifHeight.intValue();\n }\n String title = namedEntity == null ? null : namedEntity.title;\n if (PhotoModule.this.mDebugUri != null) {\n PhotoModule.this.saveToDebugUri(bArr);\n if (title != null) {\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(PhotoModule.DEBUG_IMAGE_PREFIX);\n stringBuilder2.append(title);\n title = stringBuilder2.toString();\n }\n }\n if (title == null) {\n Log.e(PhotoModule.TAG, \"Unbalanced name/data pair\");\n orientation2 = orientation;\n } else {\n StringBuilder stringBuilder3;\n if (namedEntity.date == -1) {\n namedEntity.date = PhotoModule.this.mCaptureStartTime;\n }\n if (PhotoModule.this.mHeading >= 0) {\n ExifTag directionRefTag = exifInterface.buildTag(ExifInterface.TAG_GPS_IMG_DIRECTION_REF, \"M\");\n ExifTag directionTag = exifInterface.buildTag(ExifInterface.TAG_GPS_IMG_DIRECTION, new Rational((long) PhotoModule.this.mHeading, 1));\n exifInterface.setTag(directionRefTag);\n exifInterface.setTag(directionTag);\n }\n if (externalInfo != null) {\n exifInterface.setTag(exifInterface.buildTag(ExifInterface.TAG_USER_COMMENT, CameraUtil.serializeToJson(externalInfo)));\n }\n if (PhotoModule.this.mCameraSettings.isMotionOn()) {\n stringBuilder3 = new StringBuilder();\n stringBuilder3.append(\"MV\");\n stringBuilder3.append(title);\n title = stringBuilder3.toString();\n }\n String title2 = title;\n Integer num;\n if (PhotoModule.this.isDepthEnabled()) {\n ArrayList<byte[]> bokehBytes = MpoInterface.generateXmpFromMpo(jpegData);\n if (bokehBytes != null) {\n Tag access$500 = PhotoModule.TAG;\n stringBuilder3 = new StringBuilder();\n stringBuilder3.append(\"bokehBytes.size()\");\n stringBuilder3.append(bokehBytes.size());\n Log.d(access$500, stringBuilder3.toString());\n }\n if (bokehBytes == null || bokehBytes.size() <= 2) {\n Log.v(PhotoModule.TAG, \"save addImage\");\n orientation2 = orientation;\n PhotoModule.this.getServices().getMediaSaver().addImage(bArr, title2, namedEntity.date, this.mLocation, width, height, orientation, exifInterface, PhotoModule.this.mOnMediaSavedListener, PhotoModule.this.mContentResolver);\n } else {\n int DEPTH_W;\n GImage gImage = new GImage((byte[]) bokehBytes.get(1), \"image/jpeg\");\n Size photoSize = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n int photoWidth = photoSize.width();\n width2 = photoSize.height();\n if (((float) photoWidth) / ((float) width2) == 1.3333334f) {\n DEPTH_W = 896;\n DEPTH_H = DepthUtil.DEPTH_HEIGHT_4_3;\n Log.d(PhotoModule.TAG, \"set width x height to 4:3 size by default\");\n } else if (((float) photoWidth) / ((float) width2) == 1.7777778f) {\n DEPTH_W = 896;\n DEPTH_H = DepthUtil.DEPTH_HEIGHT_16_9;\n Log.d(PhotoModule.TAG, \"set width x height to 16:9 size\");\n } else {\n DEPTH_W = 1000;\n DEPTH_H = 500;\n Log.d(PhotoModule.TAG, \"set width x height to 18:9 size\");\n }\n DepthMap depthMap = new DepthMap(DEPTH_W, DEPTH_H, MediaProviderUtils.ROTATION_180);\n depthMap.buffer = (byte[]) bokehBytes.get(bokehBytes.size() - 1);\n Tag access$5002 = PhotoModule.TAG;\n StringBuilder stringBuilder4 = new StringBuilder();\n stringBuilder4.append(\"depthMap.buffer = \");\n stringBuilder4.append(depthMap.buffer.length);\n Log.v(access$5002, stringBuilder4.toString());\n GDepth gDepth = GDepth.createGDepth(depthMap);\n float depthNear = ((Float) PhotoModule.this.mPreviewResult.get(DepthUtil.bokeh_gdepth_near)).floatValue();\n float depthFar = ((Float) PhotoModule.this.mPreviewResult.get(DepthUtil.bokeh_gdepth_far)).floatValue();\n byte depthFormat = ((Byte) PhotoModule.this.mPreviewResult.get(DepthUtil.bokeh_gdepth_format)).byteValue();\n gDepth.setNear(depthNear);\n gDepth.setFar(depthFar);\n gDepth.setFormat(depthFormat);\n Tag access$5003 = PhotoModule.TAG;\n StringBuilder stringBuilder5 = new StringBuilder();\n stringBuilder5.append(\"westalgo depth_near: \");\n stringBuilder5.append(depthNear);\n stringBuilder5.append(\"depth_far: \");\n stringBuilder5.append(depthFar);\n stringBuilder5.append(\"depth_format:\");\n stringBuilder5.append(depthFormat);\n Log.d(access$5003, stringBuilder5.toString());\n Log.v(PhotoModule.TAG, \"save addXmpImage\");\n exif.addMakeAndModelTag();\n PhotoModule.this.getServices().getMediaSaver().addXmpImage((byte[]) bokehBytes.get(0), gImage, gDepth, title2, namedEntity.date, null, width, height, orientation, exifInterface, XmpUtil.GDEPTH_TYPE, PhotoModule.this.mOnMediaSavedListener, PhotoModule.this.mContentResolver, \"jpeg\");\n Integer num2 = exifHeight;\n num = exifWidth;\n orientation2 = orientation;\n }\n } else {\n num = exifWidth;\n orientation2 = orientation;\n PhotoModule.this.getServices().getMediaSaver().addImage(bArr, title2, namedEntity.date, this.mLocation, width, height, orientation2, exif, PhotoModule.this.mOnMediaSavedListener, PhotoModule.this.mContentResolver);\n }\n }\n DEPTH_H = orientation2;\n }\n PhotoModule.this.getServices().getRemoteShutterListener().onPictureTaken(bArr);\n PhotoModule.this.mActivity.updateStorageSpaceAndHint(null);\n }", "@Override\n public void logs() {\n \n }", "int updateByPrimaryKeySelective(HotspotLog record);", "void mo60902a(AvatarImageWithVerify avatarImageWithVerify);", "protected void writeLog() {\r\n\r\n // get the current date/time\r\n DateFormat df1 = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);\r\n\r\n // write to the history area\r\n if (Preferences.is(Preferences.PREF_LOG) && completed) {\r\n\r\n if (destImage != null) {\r\n\r\n if (srcImage != null) {\r\n destImage.getHistoryArea().setText(srcImage.getHistoryArea().getText());\r\n }\r\n\r\n if (historyString != null) {\r\n destImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n } else if (srcImage != null) {\r\n\r\n if (historyString != null) {\r\n srcImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n }\r\n }\r\n }", "private void report(int status, String message, BufferedImage image) {\r\n\t\t// update test status\r\n\t\tConf.setTestStatus(status);\r\n\t\t\r\n\t\t// get method name\r\n\t\tStackTraceElement[] thread = Thread.currentThread().getStackTrace();\r\n\t\tString methodName = thread[3].getMethodName();\r\n\t\t\r\n\t\t// report message\r\n\t\tif (Conf.isDbLog()) \r\n\t\t\tlogDatabaseMessage(methodName, status, message, image);\r\n\t\t\r\n\t\tif (Conf.isRobotLog()) \r\n\t\t\tlogLocalMessage(methodName, status, message, image);\r\n\t}", "public void log(Request request, Reply reply, int nbytes, long duration) {\n Client client = request.getClient();\n long date = reply.getDate();\n String user = (String) request.getState(AuthFilter.STATE_AUTHUSER);\n URL urlst = (URL) request.getState(Request.ORIG_URL_STATE);\n String requrl;\n if (urlst == null) {\n URL u = request.getURL();\n if (u == null) {\n requrl = noUrl;\n } else {\n requrl = u.toExternalForm();\n }\n } else {\n requrl = urlst.toExternalForm();\n }\n StringBuffer sb = new StringBuffer(512);\n String logs;\n int status = reply.getStatus();\n if ((status > 999) || (status < 0)) {\n status = 999;\n }\n synchronized (sb) {\n byte ib[] = client.getInetAddress().getAddress();\n if (ib.length == 4) {\n boolean doit;\n edu.hkust.clap.monitor.Monitor.loopBegin(349);\nfor (int i = 0; i < 4; i++) { \nedu.hkust.clap.monitor.Monitor.loopInc(349);\n{\n doit = false;\n int b = ib[i];\n if (b < 0) {\n b += 256;\n }\n if (b > 99) {\n sb.append((char) ('0' + (b / 100)));\n b = b % 100;\n doit = true;\n }\n if (doit || (b > 9)) {\n sb.append((char) ('0' + (b / 10)));\n b = b % 10;\n }\n sb.append((char) ('0' + b));\n if (i < 3) {\n sb.append('.');\n }\n }} \nedu.hkust.clap.monitor.Monitor.loopEnd(349);\n\n } else {\n sb.append(client.getInetAddress().getHostAddress());\n }\n sb.append(\" - \");\n if (user == null) {\n sb.append(\"- [\");\n } else {\n sb.append(user);\n sb.append(\" [\");\n }\n dateCache(date, sb);\n sb.append(\"] \\\"\");\n sb.append(request.getMethod());\n sb.append(' ');\n sb.append(requrl);\n sb.append(' ');\n sb.append(request.getVersion());\n sb.append(\"\\\" \");\n sb.append((char) ('0' + status / 100));\n status = status % 100;\n sb.append((char) ('0' + status / 10));\n status = status % 10;\n sb.append((char) ('0' + status));\n sb.append(' ');\n if (nbytes < 0) {\n sb.append('-');\n } else {\n sb.append(nbytes);\n }\n if (request.getReferer() == null) {\n if (request.getUserAgent() == null) {\n sb.append(\" \\\"-\\\" \\\"-\\\"\");\n } else {\n sb.append(\" \\\"-\\\" \\\"\");\n sb.append(request.getUserAgent());\n sb.append('\\\"');\n }\n } else {\n if (request.getUserAgent() == null) {\n sb.append(\" \\\"\");\n sb.append(request.getReferer());\n sb.append(\"\\\" \\\"-\\\"\");\n } else {\n sb.append(\" \\\"\");\n sb.append(request.getReferer());\n sb.append(\"\\\" \\\"\");\n sb.append(request.getUserAgent());\n sb.append('\\\"');\n }\n }\n sb.append('\\n');\n logs = sb.toString();\n }\n logmsg(logs);\n }", "public void run() {\n\t\t\n sleep(1000);\n recordLocation();\n //writeImage(k);\n\n while (!Thread.currentThread().isInterrupted()) {\n\t\t \t\t if(recordImage){\n\t\t\t\t \t\t//Record INS Readings and create image\n\t\t\t\t \t\tsetWaypoint(); \n\t\t\t\t \t\t//wipe(); \n \t\t \t\trecordSensors();\n\t\t\t\t\t\t\trecordSensors2();\n\t\t\t\t\t\t\trecordVictims();\n\t\t\t\t\t\t\trecordWaypoints();\n \t\t \t\twriteImage();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n sleep(1000);\n }\n }", "public void saveJfiPayLog(JfiPayLog jfiPayLog);", "private void startRecording() {\n\n }", "public void add_to_log(String s){\n }", "@Override\n\tpublic void event(PictureEvent e) {\n\t\ttry {\n\t\t\tif (null != fname) {\n\t\t\t\tImageIO.write(e.getImage(), \"jpg\", new File(fname));\n\t\t\t}\n\t\t} catch (Exception ex) { SewerSender.println(ex.toString()); }\n\t}", "public void camera(){\n System.out.println(\"I am taking pictures...\");\r\n }", "public void logImageVerificationResult(ImageVerificationResult result, String imageName, int thumbHeight, int thumbWidth) {\n try {\n ImageUtils.saveImageVerificationResult(result, imageName, this.settings);\n String message = String.format(\"%s does NOT look OK. Diff percents: %.2f%%. Waiting ...\", imageName, result.diffPercent);\n LOGGER_BASE.info(message);\n\n String logTemplatePath = templatePath + File.separator + \"imageVerification.template\";\n File logTemplateFile = new File(logTemplatePath);\n String logMessage;\n\n if (!logTemplateFile.exists()) {\n logMessage = this.readResource(\"/templates/imageVerification.template\");\n } else {\n logMessage = readFile(logTemplatePath);\n }\n\n logMessage = logMessage\n .replace(\"IMAGE_NAME\", imageName)\n .replace(\"ACTUAL_IMAGE_URL\", \"../screenshots/\" + imageName + result.actualSuffix + \".png\")\n .replace(\"DIFF_IMAGE_URL\", \"../screenshots/\" + imageName + result.diffSuffix + \".png\")\n .replace(\"EXPECTED_IMAGE_URL\", \"../screenshots/\" + imageName + result.expectedSuffix + \".png\")\n .replace(\"THUMB_WIDTH\", String.valueOf(thumbWidth))\n .replace(\"THUMB_HEIGHT\", String.valueOf(thumbHeight));\n\n this.template(logMessage);\n } catch (Exception e) {\n this.error(\"Failed to log current screen.\");\n }\n }", "void setupFileLogging();", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(AddingPlace.this,\"image uploaded successfully\",Toast.LENGTH_LONG).show();\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Task<Uri> uriTask = taskSnapshot.getStorage().getDownloadUrl();\n while (!uriTask.isSuccessful());\n Uri downloadImageUri = uriTask.getResult();\n if (uriTask.isSuccessful())\n {\n //save info with image\n HashMap<String, Object> hashMap = new HashMap<>();\n\n hashMap.put(\"uid\",\"\"+uid_user);\n hashMap.put(\"name\",\"\"+nameSt);\n hashMap.put(\"phone\",\"91\"+phoneSt);\n hashMap.put(\"mail\",\"\"+mailSt);\n hashMap.put(\"profileImage\", \"\"+downloadImageUri);\n hashMap.put(\"timestamp\", \"\" + timpstamp);\n mRef.child(uid_user).setValue(hashMap)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n progressDialog.dismiss();\n Toast.makeText(AddUserActivity.this, \"add user sucessfully\", Toast.LENGTH_SHORT).show();\n goToHomePage();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n progressDialog.dismiss();\n Toast.makeText(AddUserActivity.this, \"\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }\n }", "public static void LogIt(String action, File entity) {\n\t\t\r\n\t}", "public void displayImageToConsole();", "String updateMyAvatar(String pictureFilePath);", "@Override\n protected void onProgressUpdate(ImageRecord... imageRecords) {\n for(ImageRecord imageRecord : imageRecords) {\n mAdapter.addImageRecord(imageRecord);\n Log.d(\"-------\", \"adding record \" + ++cnt);\n }\n }", "private void logUser() {\n }", "void onPictureTaken(byte[] data, Camera camera);", "void log();", "public void screenShot() {\n\n\t}", "public void extract() {\n \n try {\n //Extrae la plantilla de la imagen. \n template = fingerprintSDK.extract(fingerprint);\n \n //Notifies it has been extracted and the quality of the extraction\n //write template quality to log\n switch (template.getQuality()){\n case Template.HIGH_QUALITY: \n objpantprincipal.pintaraltacalidad();\n break;\n case Template.MEDIUM_QUALITY: \n objpantprincipal.pintarmedianacalidad();\n break;\n case Template.LOW_QUALITY: \n objpantprincipal.pintarbajacalidad();\n break;\n }\n //Muestra la plantilla en la imagen\n objpantprincipal.showImage(GrFingerJava.getBiometricImage(template,fingerprint));\n objpantprincipal.writeLog(\"Minucias extraidas con éxito\");\n } catch (GrFingerJavaException e) {\n //write error to log\n Toolkit.getDefaultToolkit().beep();\n objpantprincipal.writeLog(\"Error, no se pudieron extraer las minucias, vuelva a intentarlo\");\n }\n \n }", "@Override\n public void onPictureTaken(byte[] data, Camera camera) {\n\n }" ]
[ "0.6105804", "0.60916096", "0.60759026", "0.58872676", "0.5879937", "0.5730423", "0.56231654", "0.55838805", "0.5515361", "0.54955214", "0.54315513", "0.54265094", "0.5420566", "0.54196346", "0.5396053", "0.5367548", "0.5349293", "0.53228146", "0.53106827", "0.5310464", "0.5309225", "0.5306925", "0.52906406", "0.52833647", "0.52636856", "0.52624005", "0.5259177", "0.5259177", "0.52248275", "0.52248275", "0.52248275", "0.5211544", "0.51571673", "0.51543427", "0.5151417", "0.51474005", "0.51448786", "0.5141618", "0.5135596", "0.51168394", "0.51159763", "0.5112854", "0.5111397", "0.51027775", "0.5102745", "0.5102081", "0.50984085", "0.5097297", "0.5096901", "0.50835854", "0.5081884", "0.5070679", "0.5066728", "0.50659716", "0.50643736", "0.5035576", "0.5035576", "0.50347096", "0.503449", "0.5031238", "0.5028538", "0.5024589", "0.50232476", "0.5018573", "0.5016728", "0.50150585", "0.5000701", "0.4997629", "0.49925", "0.49920112", "0.49901566", "0.49849147", "0.49844334", "0.49831647", "0.49666247", "0.49581587", "0.49564576", "0.4946934", "0.49449563", "0.49354094", "0.4932738", "0.4931848", "0.4928528", "0.49255514", "0.49219543", "0.49202773", "0.491974", "0.491484", "0.48968002", "0.48952118", "0.48898882", "0.48891753", "0.48840475", "0.4880499", "0.48797965", "0.48700798", "0.48689145", "0.4865197", "0.48524356", "0.4845535" ]
0.64986277
0
loger.addRecordToLog("UnicaCompraActivity.actualizarDatosComprador : " + idUsuarioAratek); logger.addRecordToLog("idUsuarioAratek : " + idUsuarioAratek); logger.addRecordToLog("valorCompra : " + this.mValorCompra.getText().toString());
public void actualizarDatosComprador(Integer idUsuarioAratek) { ServicioBDD servicioBDD = new ServicioBDD(this); servicioBDD.abrirBD(); EmpleadoVO empleadoVO = servicioBDD.obtenerNombreUsuario( idUsuarioAratek.toString() ); servicioBDD.cerrarBD(); if( empleadoVO==null ){ StringBuilder mensaje = new StringBuilder(); mensaje.append("No se encuentra registrado el usuario con id aratek: ") .append( idUsuarioAratek ); AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage( mensaje.toString() ); builder.setTitle(R.string.mns_titulo) .setPositiveButton(R.string.mns_ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { //Intent intent = new Intent(context, MenuActivity.class); //startActivity(intent); //finish(); return; } }) .setCancelable(false) .show(); }else{ mCedulaIdentidad.setText( empleadoVO.getNumeroDocumento() ); mNombrePersona.setText( empleadoVO.getNombresCompletos() ); } //logger.addRecordToLog("observaciones : " + observaciones); /*Intent intent = new Intent(this, ConfirmarCompraActivity.class); Bundle bundle = new Bundle(); bundle.putString(Constantes.NUMERO_CEDULA , empleadoVO.getNumeroDocumento()); bundle.putString(Constantes.VALOR_COMPRA, this.valorCompra); bundle.putString(Constantes.OBSERVACIONES, observaciones); bundle.putInt(Constantes.ID_USUARIO_ARATEK, idUsuarioAratek); bundle.putString(Constantes.NOMBRE_USUARIO, empleadoVO.getNombresCompletos()); intent.putExtras(bundle); startActivity(intent); //finish();*/ //aqui /*AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage("XXXYYYYY confirma la compra por xxxx !!!?"); builder.setTitle(R.string.mns_titulo) .setPositiveButton(R.string.mns_ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { //Intent intent = new Intent(context, MenuActivity.class); //startActivity(intent); //finish(); confirmarCompra(); Toast.makeText(UnicaCompraActivity.this, "Compra confirmada" , Toast.LENGTH_LONG).show(); } }) .setNegativeButton(R.string.mns_cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { //Intent intent = new Intent(context, MenuActivity.class); //startActivity(intent); //finish(); cancelarCompra(); Toast.makeText(UnicaCompraActivity.this, "Compra confirmada" , Toast.LENGTH_LONG).show(); } }) .setCancelable(false) .show(); */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveLog() {\n TextInputLayout dateInput = (TextInputLayout) findViewById(R.id.input_date);\n TextInputLayout timeInput = (TextInputLayout) findViewById(R.id.input_time);\n TextInputLayout fromSiteInput = (TextInputLayout) findViewById(R.id.input_from_site);\n TextInputLayout toSiteInput = (TextInputLayout) findViewById(R.id.input_to_site);\n TextInputLayout reasonInput = (TextInputLayout) findViewById(R.id.input_reason);\n TextInputLayout odometerStartInput = (TextInputLayout) findViewById(R.id.input_odometer_start);\n TextInputLayout odometerEndInput = (TextInputLayout) findViewById(R.id.input_odometer_end);\n\n EditText entryDate = (EditText) findViewById(R.id.date);\n EditText entryTime = (EditText) findViewById(R.id.time);\n RadioGroup entryTimeOfDay = (RadioGroup) findViewById(R.id.time_of_day);\n AutoCompleteTextView entryFromSite = (AutoCompleteTextView) findViewById(R.id.from_site);\n AutoCompleteTextView entryToSite = (AutoCompleteTextView) findViewById(R.id.to_site);\n EditText entryPurpose = (EditText) findViewById(R.id.reason);\n EditText entryOdometerStart = (EditText) findViewById(R.id.odometer_start);\n EditText entryOdometerEnd = (EditText) findViewById(R.id.odometer_end);\n\n String date = entryDate.getText().toString();\n String time = entryTime.getText().toString();\n String timeOfDay = EMPTY;\n int selectedRadioButtonId = entryTimeOfDay.getCheckedRadioButtonId();\n if (selectedRadioButtonId > 0) {\n RadioButton selectedRadioButton = (RadioButton) findViewById(selectedRadioButtonId);\n timeOfDay = selectedRadioButton.getText().toString();\n }\n String fromSite = entryFromSite.getText().toString();\n String toSite = entryToSite.getText().toString();\n String purpose = entryPurpose.getText().toString();\n String odometerStart = entryOdometerStart.getText().toString();\n String odometerEnd = entryOdometerEnd.getText().toString();\n\n Resources res = getResources();\n \n if (date.isEmpty()) {\n dateInput.setError(res.getString(R.string.error_date));\n return;\n } else {\n dateInput.setError(EMPTY);\n }\n if (time.isEmpty()) {\n timeInput.setError(res.getString(R.string.error_time));\n return;\n } else {\n timeInput.setError(EMPTY);\n }\n if (timeOfDay.isEmpty()) {\n timeInput.setError(res.getString(R.string.error_time_of_day));\n return;\n } else {\n timeInput.setError(EMPTY);\n }\n if (fromSite.isEmpty()) {\n fromSiteInput.setError(res.getString(R.string.error_from_site));\n return;\n } else {\n fromSiteInput.setError(EMPTY);\n }\n if (toSite.isEmpty()) {\n toSiteInput.setError(res.getString(R.string.error_to_site));\n return;\n } else {\n toSiteInput.setError(EMPTY);\n }\n if (purpose.isEmpty()) {\n reasonInput.setError(res.getString(R.string.error_purpose));\n return;\n } else {\n reasonInput.setError(EMPTY);\n }\n if (odometerStart.isEmpty()) {\n odometerStartInput.setError(res.getString(R.string.error_odometer_start));\n return;\n } else {\n odometerStartInput.setError(EMPTY);\n }\n if (odometerEnd.isEmpty()) {\n odometerEndInput.setError(res.getString(R.string.error_odometer_end));\n return;\n } else {\n odometerEndInput.setError(EMPTY);\n }\n\n int odometerStartInt = Integer.parseInt(odometerStart);\n int odometerEndInt = Integer.parseInt(odometerEnd);\n int miles = odometerEndInt - odometerStartInt;\n\n if (miles == 0 || miles < 0) {\n Context context = getApplicationContext();\n CharSequence text = res.getString(R.string.error_miles1) + \" \" +\n miles + \". \" + res.getString(R.string.error_miles2);\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n return;\n }\n\n String id = UUID.randomUUID().toString();\n RealmConfiguration realmConfig = new RealmConfiguration.Builder(getApplicationContext()).build();\n Realm.setDefaultConfiguration(realmConfig);\n Realm realm = Realm.getDefaultInstance();\n realm.beginTransaction();\n TravelLog log = new TravelLog();\n log.setId(id);\n log.setDate(date);\n log.setTime(time);\n log.setTime_of_day(timeOfDay);\n log.setReason(purpose);\n log.setFrom_site_name(fromSite);\n log.setTo_site_name(toSite);\n log.setOdometer_start(odometerStartInt);\n log.setOdometer_end(odometerEndInt);\n log.setMiles(miles);\n realm.copyToRealmOrUpdate(log);\n realm.commitTransaction();\n realm.close();\n\n Context context = getApplicationContext();\n CharSequence text = res.getString(R.string.record_saved);\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n\n finish();\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 }", "private void init(){\n \tgl = new GeradorLog(getTAG_LOG(),getTIPO_LOG());\n // cria os devidos parametros da tela\n campoResposta = (EditText) findViewById(R.id.campoResposta);\n msg_usr = (TextView) findViewById(R.id.resposta);\n }", "@Override\n public void onClick(View v) {\n\n String nombre=cajanombre.getText().toString();\n String descripcion=descripcionActividad.getText().toString();\n int numeroPersonas = Integer.parseInt(cajaNumerodePersonas.getText().toString());\n\n //String datoResultado=cajaResultado.getText().toString();\n if (numeroPersonas >=2) {\n paquete = numeroPersonas * 50000;\n cajaResultado.setText(\"Valor paquete turistico es:$\" + paquete);\n }\n else {\n paquete = 70000;\n cajaResultado.setText(\"Valor paquete turistico es:$\" + paquete);\n\n }\n\n //Armo los datos de la colección\n reservacion.put(\"nombre\",nombre);\n reservacion.put(\"numeroPersonas\",numeroPersonas);\n reservacion.put(\"valorReserva\",paquete);\n reservacion.put(\"descripcion\",descripcion);\n\n\n registrarPaquete();\n\n\n\n\n }", "public void pindah_ke_log(View v)\n {\n Intent dashboard = new Intent(DashboardUser.this,BuyerTransactionActivity.class) ;\n dashboard.putExtra(\"param1\",value1);\n dashboard.putExtra(\"param2\",value2);\n dashboard.putExtra(\"param3\",value3);\n dashboard.putExtra(\"param4\",value4);\n dashboard.putExtra(\"param5\",value5);\n// SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n// SharedPreferences.Editor editor = sharedPreferences.edit();\n// editor.putString(TEXT, value1);\n// editor.putString(SWITCH, value2);\n// editor.apply();\n startActivityForResult(dashboard, 100);\n }", "public void Salvar(logModel logModel){\n\n ContentValues contentValues = new ContentValues();\n /*MONTANDO OS PARAMETROS PARA SEREM SALVOS*/\n contentValues.put(\"log_evento\", logModel.getEvento());\n contentValues.put(\"log_date\", logModel.getDate());\n\n /*EXECUTANDO INSERT DE UM NOVO REGISTRO*/\n databaseUtil.GetConexaoDataBase().insert(\"tb_log\",null,contentValues);\n\n }", "protected void saveDatos() {\r\n\r\n myNombre = (TextView) findViewById(R.id.spinNombre);\r\n myPrecio = (TextView) findViewById(R.id.spinPrecio);\r\n myMarca = (TextView) findViewById(R.id.spinMarca);\r\n myId_juego = (TextView) findViewById(R.id.spinID);\r\n\r\n String id = myId_juego.getText().toString();\r\n String precio = myPrecio.getText().toString();\r\n String marca = myMarca.getText().toString();\r\n String nombre = myNombre.getText().toString();\r\n\r\n try {\r\n MainActivity.myDbHelper.open();\r\n MainActivity.myDbHelper.insertJuegos(nombre, precio, marca, id);\r\n MainActivity.myDbHelper.close();\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void 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 }", "public void logrec()\r\n {\n Object[] row = new Object[4];\r\n\r\n if(true){\r\n row[0] = date;\r\n row[1] = un;\r\n row[2] = tn;\r\n // add row to the model\r\n\r\n\r\n model.addRow(row);}\r\n\r\n\r\n }", "public void logLocation(View view) {\n writeGPSDataToDB(locationHandler.getLatitude(), locationHandler.getLongitude(), locationHandler.getAltitude());\n databaseHandler.setValueInExpInfo(((TextView) findViewById(R.id.accelerate_indicator_rec)).getText().toString(), \"receiver_orientation\", experimentNumber);\n accelerometerHandler.close();\n Toast.makeText(this, \"receivers GPS data logged\", Toast.LENGTH_SHORT).show();\n gpsLogged = true;\n }", "public void logData(){\n }", "@OnClick(R.id.buttonSalvarN)\n public void salvar() {\n if (fernaoPai == null)\n fernaoPai = new Gaivotas();\n if (!TextUtils.isEmpty(NomeNovo.getText()))\n fernaoPai.setNomeAtual(NomeNovo.getText().toString());\n //inseri a linha abaixo\n PergaminhoNovo.setFilters(new InputFilter[]{new InputFilterMinMax(\"1\", \"10\")});\n\n // aqui implantei o codigo do Cesar , era assim o antigo\n//if (!TextUtils.isEmpty(PergaminhoNovo.getText()))\n//fernaoPai.setPergaminhoAtual(PergaminhoNovo.getText().toString())\n\n if (!TextUtils.isEmpty(PergaminhoNovo.getText()))\n //PergaminhoNovo.setFilters(new InputFilter[]{new InputFilterMinMax(\"1\", \"10\")});\n fernaoPai.setPergaminhoAtual(PergaminhoNovo.getText().toString());\n// terminei aqui\n if (!TextUtils.isEmpty(DataNovo.getText()))\n fernaoPai.setDataAtual(DataNovo.getText().toString());\n\n if (!TextUtils.isEmpty(InicioNovo.getText()))\n fernaoPai.setInicio(InicioNovo.getText().toString());\n\n //Sprinkles vai salvar o usuario editado como esta\n fernaoPai.save();\n /* Aqui, a ideia é fazer com que esse intent seja fechada e enviar um extra para\n * a activity que tem a lista de usuário dizendo que o usuário foi salvo com sucesso! */\n Intent i = new Intent(config.this, Principal.class);\n Toast.makeText(config.this, \"Cadastro Feito no BD!\", Toast.LENGTH_SHORT).show();\n startActivity(i);\n finish();\n }", "public void salvarCadastro(){\n String nome_user = nome.getText().toString();\n String escola_user = escola.getText().toString();\n String senha_user = senha.getText().toString();\n String email_user = email.getText().toString();\n double mAprovativa = Double.valueOf(mA.getText().toString());\n double mPessoal = Double.valueOf(mP.getText().toString());\n\n\n\n //preencher os atributos\n aluno.setNome(nome_user);\n aluno.setEscola(escola_user);\n aluno.setSenha(senha_user);\n aluno.setEmail(email_user);\n aluno.setMediaEscola(mAprovativa);\n aluno.setMediaPessoal(mPessoal);\n\n\n\n //salvar ou atualizar\n alunoBox.put(aluno);\n\n Toast toastCadastrado = Toast.makeText(getApplicationContext(),\"Aluno cadastrado\",Toast.LENGTH_LONG);\n toastCadastrado.show();\n //encerra\n finish();\n\n }", "@Override\n\t\t\t\tpublic void onEntrada(Object entrada, View view) {\n\t\t\t\t\tif (entrada != null) \n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tTextView TxtDNI1 = (TextView) view.findViewById(R.id.textViewDNI);\n\t\t\t\t\t\tTxtDNI1.setText(((Lista_entrada_ControlAcceso) entrada).get_IdFuncionario()); \n\n\t\t\t\t\t\tTextView TxtPlaca1 = (TextView) view.findViewById(R.id.textView_Placa);\n\t\t\t\t\t\tTxtPlaca1.setText(((Lista_entrada_ControlAcceso) entrada).get_Patente()); \n\t\t\t\t\t\t\n\t\t\t\t\t\tTextView TxtCod1 = (TextView) view.findViewById(R.id.textView_Cod); \n\t\t\t\t\t\tTxtCod1.setText(((Lista_entrada_ControlAcceso) entrada).get_CodError());\n\t\t\t\t\t\t\n\t\t\t\t\t\tTextView TxtFecha1= (TextView) view.findViewById(R.id.textView_Fecha); \n\t\t\t\t\t\tTxtFecha1.setText(((Lista_entrada_ControlAcceso) entrada).get_Fecha());\n\t\t\t\t\t\t\n\t\t\t\t\t\tTextView TxtHora1 = (TextView) view.findViewById(R.id.textView_Nivel); \n\t\t\t\t\t\tTxtHora1.setText(((Lista_entrada_ControlAcceso) entrada).get_Hora());\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Toast.makeText(mContext,cadenaNueva, Toast.LENGTH_LONG).show();\n\n\t\t\t\t\t}\n\t\t\t\t}", "public void execute(){\n editText = findViewById(R.id.editText);\n nom = editText.getText().toString();\n\n if(nom.length() != 0 ) {\n SharedPreferences sharedPref = getSharedPreferences(\"DATA\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n login_email = sharedPref.getString(\"email\", \"NULL\").replace(\".\", \"%\");\n\n //Sauvegarde en ligne\n mDatabase = FirebaseDatabase.getInstance().getReference();\n String nbr_max = sharedPref.getString(\"nombre_voiture\", \"null\");\n Integer nbr_max_i = Integer.parseInt(nbr_max);\n nbr_max_i++;\n mDatabase.child(\"Users\").child(login_email).child(\"Trajets\").child(\"Id\").child(\"Voiture\").child(\"nbr\").setValue(nbr_max_i);\n mDatabase.child(\"Users\").child(login_email).child(\"Trajets\").child(\"Id\").child(\"Voiture\").child(nbr_max_i.toString()).setValue(nom);\n\n //Sauvegarde en local\n editor.putString(\"nombre_voiture\", nbr_max_i.toString());\n editor.putString(\"voiture_numero_\" + nbr_max_i.toString(), nom);\n editor.commit();\n\n Toast.makeText(getApplicationContext(), \"Voiture ajoutée\", Toast.LENGTH_SHORT).show();\n\n Intent intent = new Intent(getApplicationContext(), Volant.class);\n startActivity(intent);\n overridePendingTransition(R.anim.fade_in_fast, R.anim.fade_out_fast);\n }\n\n }", "private void insertRecord(String userName){\n\t\tLog.v(TAG, \"1\");\n\t\tLog.i(TAG, \"2\");\n\t\tLog.d(TAG, \"\");\n\t\tLog.w(\"Data printing.....\", \"3\");\n\t\tLog.e(\"Data printing.....\", \"\");\n\t}", "@Override\n public void onClick(View v) {\n if(edTxtNoControl.getText().toString().equals(\"\") || edTxtNombre.getText().toString().equals(\"\") || edTxtApellido.getText().toString().equals(\"\")\n ||edTxtPassword.getText().toString().equals(\"\")){\n //Agregamos una notificación Toast para inficar que faltan campos por llenar\n Toast.makeText(getApplicationContext(), \"Faltan campos por llenar\", Toast.LENGTH_SHORT).show();\n }else{\n /*Mediante la instancia creada anteriormente llamamos al metodo \"agregarUsuario()\"\n y dentro de este colocamos los objetos de tipo EditText que se encargan de\n obtener los datos que se coloquen en el formulario de registro.*/\n objDB.agregarUsuario(edTxtNoControl.getText().toString(), edTxtNombre.getText().toString(),\n edTxtApellido.getText().toString(), edTxtPassword.getText().toString());\n //Agregamos una notificación Toast para ver si los datos fueron agregados correctamente.\n Toast.makeText(getApplicationContext(), \"Se agregó correctamente\", Toast.LENGTH_SHORT).show();\n //Finalizamos la actividad\n finish();\n }\n\n //Vaciamos los EditText del formulario\n edTxtNoControl.setText(\"\");\n edTxtNombre.setText(\"\");\n edTxtApellido.setText(\"\");\n edTxtPassword.setText(\"\");\n }", "public void enviarMensaje(View v) {\n if (edt_titulo.getText().toString().equals(\"\") == false && edt_mensaje.getText().toString().equals(\"\") == false) {\n String query = \"INSERT INTO Mensaje(Titulo,Contenido,Fecha,OrigenID,DestinatarioID) VALUES ('\" + edt_titulo.getText().toString() + \"','\" + edt_mensaje.getText().toString() + \"',\" + global.devolverFechaActual() + \",\" + global.getUSuario() + \",\" + listaID.get(sp_meds.getSelectedItemPosition()) + \")\";\n db.execSQL(query);\n Toast.makeText(this, \"Mensaje enviado.\", Toast.LENGTH_SHORT).show();\n finish();\n } else {\n Toast.makeText(this, \"Se deben rellenar tanto el título como el mensaje.\", Toast.LENGTH_SHORT).show();\n }\n }", "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 }", "@Override\n public void run() {\n try {\n int pj = Integer.parseInt(SalasJuego.PARTIDAS_JUGADAS);\n pj = pj + 1;\n Log.i(\"II/FullScreen_Juego>\", \" Partidas Jugadas aumenta a = \" + pj);\n\n //Pasamos los datos a la Base de Datos\n\n databaseReference.child(user.getUid()).child(\"money\").setValue(df.format(dineroUsuario)); //Referencia>Hijo> money:dinero\n databaseReference.child(user.getUid()).child(\"partidasJugadas\").setValue(pj);\n Log.i(\"II/FullScreen_Juego>\", \" SUMAMOS A MI DINERO: \" + visorMoneyP1.getText().toString().trim());\n\n } catch (NumberFormatException n) {\n Log.i(\"II/FullScreen_Juego>\", \"Error NumberFormatException 1\" + n);\n\n\n }\n\n }", "private void btnExecutarLabirinto(){\n log.setText(\"Log de erros\");\n botao[2].setEnabled(false);\n try{\n lab.encontrarAdj();\n lab.andadinha();\n info.setText(\" \");\n visor.setText(lab.toString());\n\n Pilha<Coordenada> caminho = lab.getCaminho();\n Pilha<Coordenada> inverso = new Pilha<Coordenada>();\n while(!caminho.isVazia())\n {\n inverso.guardeUmItem(caminho.recupereUmItem());\n caminho.removaUmItem();\n }\n\n log.setText(\"Caminho percorrido: \");\n while(!inverso.isVazia())\n {\n log.setText(log.getText() + inverso.recupereUmItem().toString() + \" \");\n inverso.removaUmItem();\n }\n }\n catch(Exception erro1){\n log.setText(erro1.getMessage());\n }\n\t\t}", "public void cambioEstadAvaluo() {\r\n try {\r\n if (\"\".equals(mBRadicacion.Radi.getObservacionAvaluo()) || \"\".equals(mBRadicacion.Radi.getEstadoAvaluo())) {\r\n mbTodero.setMens(\"Falta informacion por Llenar\");\r\n mbTodero.warn();\r\n } else {\r\n mBRadicacion.Radi.CambioEstRad(mBsesion.codigoMiSesion());\r\n mbTodero.setMens(\"La informacion ha sido guardada correctamente\");\r\n mbTodero.info();\r\n mbTodero.resetTable(\"FRMSeguimiento:SeguimientoTable\");\r\n RequestContext.getCurrentInstance().execute(\"PF('DlgEstAvaluo').hide()\");\r\n ListSeguimiento = Seg.ConsulSeguimAvaluos(mBsesion.codigoMiSesion());//VARIABLES DE SESION\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".cambioEstadAvaluo()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n }", "@Override\n public void onClick(View v) {\n String nom=editNom.getText().toString();\n String descripcio=editDesripcio.getText().toString();\n String estat=txtEstat.getText().toString();\n try{\n //fa la conexio a la base de dades amb els parametres que fica l'usuari per generar una ruta+\n if(!(nom.equals(\"\") && descripcio.equals(\"\") && estat.equals(\"\"))){\n String[] parametres={nom,descripcio, String.valueOf(usuari.getID()),rutaSTR,estatSTR};\n new PostGenerarRuta(context,progressBar).execute(parametres);\n }else {\n Toast.makeText(getApplicationContext(),\"Les dades no son valides\",Toast.LENGTH_SHORT).show();\n }\n }catch (Exception ex) {\n Toast.makeText(context, ex.getMessage(), Toast.LENGTH_SHORT).show();\n Log.i(\"errorPost\", ex.getMessage());\n }\n }", "public void actualizar_registro() {\n try {\n iC.nombre = fecha;\n\n String [] data = txtidReg.getText().toString().split(\":\");\n Long id = Long.parseLong(data[1].trim());\n\n int conteo1 = Integer.parseInt(cap_1.getText().toString());\n int conteo2 = Integer.parseInt(cap_2.getText().toString());\n int conteoT = Integer.parseInt(cap_ct.getText().toString());\n\n conteoTab cl = iC.oneId(id);\n\n conteoTab c = new conteoTab();\n\n c.setFecha(cl.getFecha());\n c.setEstado(cl.getEstado());\n c.setIdConteo(cl.getIdConteo());\n c.setIdSiembra(cl.getIdSiembra());\n c.setCama(cl.getCama());\n c.setIdBloque(cl.getIdBloque());\n c.setBloque(cl.getBloque());\n c.setIdVariedad(cl.getIdVariedad());\n c.setVariedad(cl.getVariedad());\n c.setCuadro(cl.getCuadro());\n c.setConteo1(conteo1);\n c.setConteo4(conteo2);\n c.setTotal(conteoT);\n c.setPlantas(cl.getPlantas());\n c.setArea(cl.getArea());\n c.setCuadros(cl.getCuadros());\n c.setIdUsuario(cl.getIdUsuario());\n if(cl.getEstado().equals(\"0\")) {\n iC.update(id, c);\n }else{\n Toast.makeText(this, \"El registro no se puede actualizar por que ya ha sido enviado\", Toast.LENGTH_LONG).show();\n }\n\n Intent i = new Intent(this,ActivityDetalles.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(i);\n }catch (Exception ex){\n Toast.makeText(this, \"exception al actualizar el registro \\n \\n\"+ex.toString(), Toast.LENGTH_SHORT).show();\n }\n }", "public 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 carregaInformacoes() {\n Pessoa pessoa = (Pessoa) getIntent().getExtras().getSerializable(\"pessoa\");\n edtNome.setText(pessoa.getNome());\n edtEmail.setText(pessoa.getEmail());\n edtTelefone.setText(pessoa.getTelefone());\n edtIdade.setText(pessoa.getIdade());\n edtCPF.setText(pessoa.getCpf());\n }", "public void getDadosDosCampos2() {\n EditText campoModeloCelular = findViewById(R.id.CampoModeloCelular);\n RadioButton campoNumeroChip1 = findViewById(R.id.radioButtonNumChip1);\n RadioButton campoNumeroChip2 = findViewById(R.id.radioButtonNumChip2);\n EditText numeroDoChip1 = findViewById(R.id.EditTextNumChip1);\n EditText numeroDoChip2 = findViewById(R.id.EditTextNumChip2);\n EditText campoIMEI1 = findViewById(R.id.campoIMEI1);\n EditText campoIMEI2 = findViewById(R.id.campoIMEI2);\n\n //instanciando o celular\n Celular novoCelular = new Celular();\n\n novoCelular.setModelo(campoModeloCelular.getText().toString());\n novoCelular.setChip1(campoNumeroChip1.getText().toString());\n novoCelular.setChip2(campoNumeroChip2.getText().toString());\n novoCelular.setImei1(campoIMEI1.getText().toString());\n novoCelular.setImei2(campoIMEI2.getText().toString());\n\n CelularDAO daoC = new CelularDAO();\n\n CelularDAO.Cel_cadastrado = novoCelular;\n\n UsuarioDAO.user_cadastrado.setCelularP(novoCelular);\n\n UsuarioDAO.dao.inserir(UsuarioDAO.user_cadastrado);\n\n\n\n }", "private void save() {\n if (String.valueOf(tgl_pengobatanField.getText()).equals(null)\n || String.valueOf(waktu_pengobatanField.getText()).equals(null) ) {\n Toast.makeText(getApplicationContext(),\n \"Ada Yang Belum Terisi\", Toast.LENGTH_SHORT).show();\n } else {\n SQLite.insert(nama_pasien2,\n nama_dokter2,\n tgl_pengobatanField.getText().toString().trim(),\n waktu_pengobatanField.getText().toString(),\n keluhan_pasienField.getText().toString().trim(),\n hasil_diagnosaField.getText().toString().trim(),\n biayaField.getText().toString().trim());\n blank();\n finish();\n }\n }", "public Log() {\n cadenas = new Vector<String>();\n }", "@FXML\n\tprivate void logSerialNumberIncrement() {\n\t\tcheckFieldEditOrNot = true;\n\t\tSX3Manager.getInstance().addLog(\"Serial Number Increment : \" + serialNumberIncrement.getValue() + \".<br>\");\n\t\tlogDetails1.getEngine().setUserStyleSheetLocation(\"data:,body{font: 12px Arial;}\");\n\n\t}", "private ContentValues registro(){\n ContentValues fila = new ContentValues();\n fila.put(\"codigo\", getIntent().getStringExtra(\"codigo\"));\n fila.put(\"nombre\", nombre.getText().toString());\n fila.put(\"raza\", raza.getSelectedItem().toString());\n fila.put(\"clase\", clase.getSelectedItem().toString());\n fila.put(\"nv\", nv.getText().toString());\n fila.put(\"exp\", exp.getText().toString());\n fila.put(\"PG\", pg.getText().toString());\n fila.put(\"PGmax\", pgMax.getText().toString());\n fila.put(\"CA\", ca.getText().toString());\n fila.put(\"VEL\", vel.getText().toString());\n fila.put(\"FUE\", stats.get(0).getText().toString());\n fila.put(\"DES\", stats.get(1).getText().toString());\n fila.put(\"CON\", stats.get(2).getText().toString());\n fila.put(\"INT\", stats.get(3).getText().toString());\n fila.put(\"SAB\", stats.get(4).getText().toString());\n fila.put(\"CAR\", stats.get(5).getText().toString());\n fila.put(\"salvBonus\", salvBonus.getText().toString());\n fila.put(\"FUEsalv\", String.valueOf(salvacion.get(0).isChecked()));\n fila.put(\"DESsalv\", String.valueOf(salvacion.get(1).isChecked()));\n fila.put(\"CONsalv\", String.valueOf(salvacion.get(2).isChecked()));\n fila.put(\"INTsalv\", String.valueOf(salvacion.get(3).isChecked()));\n fila.put(\"SABsalv\", String.valueOf(salvacion.get(4).isChecked()));\n fila.put(\"CARsalv\", String.valueOf(salvacion.get(5).isChecked()));\n fila.put(\"habBonus\", habBonus.getText().toString());\n fila.put(\"acrobacias\", String.valueOf(habilidades.get(0).isChecked()));\n fila.put(\"arcanos\", String.valueOf(habilidades.get(1).isChecked()));\n fila.put(\"atletismo\", String.valueOf(habilidades.get(2).isChecked()));\n fila.put(\"engañar\", String.valueOf(habilidades.get(3).isChecked()));\n fila.put(\"historia\", String.valueOf(habilidades.get(4).isChecked()));\n fila.put(\"interpretacion\", String.valueOf(habilidades.get(5).isChecked()));\n fila.put(\"intimidar\", String.valueOf(habilidades.get(6).isChecked()));\n fila.put(\"investigacion\", String.valueOf(habilidades.get(7).isChecked()));\n fila.put(\"juegoDeManos\", String.valueOf(habilidades.get(8).isChecked()));\n fila.put(\"medicina\", String.valueOf(habilidades.get(9).isChecked()));\n fila.put(\"naturaleza\", String.valueOf(habilidades.get(10).isChecked()));\n fila.put(\"percepcion\", String.valueOf(habilidades.get(11).isChecked()));\n fila.put(\"perspicacia\", String.valueOf(habilidades.get(12).isChecked()));\n fila.put(\"persuasion\", String.valueOf(habilidades.get(13).isChecked()));\n fila.put(\"religion\", String.valueOf(habilidades.get(14).isChecked()));\n fila.put(\"sigilo\", String.valueOf(habilidades.get(15).isChecked()));\n fila.put(\"supervivencia\", String.valueOf(habilidades.get(16).isChecked()));\n fila.put(\"tratoConAnimales\", String.valueOf(habilidades.get(17).isChecked()));\n return fila;\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 public void onClick(View view) {\n insertLogEntry();\n\n Toast toast = Toast.makeText(getActivity(), \"Sighting logged\", Toast.LENGTH_SHORT);\n toast.show();\n\n // go to the log book activity\n Intent intent = new Intent(getActivity(), LogBookActivity.class);\n startActivity(intent);\n }", "LogRecorder getLogRecorder();", "LogRecorder getLogRecorder();", "private void log() {\n\t\t\n//\t\tif (trx_loggin_on){\n\t\t\n\t\tif ( transLogModelThreadLocal.get().isTransLoggingOn() ) {\n\t\t\t\n\t\t\tTransLogModel translog = transLogModelThreadLocal.get();\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\ttransactionLogger.info(\"\"); // don't really need a msg here\n\t\t\t\n\t\t\t// TODO MDC maybe conflic with existing MDC using in the project\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\t\n\t\t\ttranslog.getAttributesOnce().clear();\n\t\t}\n\t\t\n\t}", "private void loguearUsuario() {\n\n final FirebaseAuth auth = FirebaseAuth.getInstance();\n FirebaseUser user = auth.getCurrentUser();\n // consigue el usuario\n final String email = editTextEmail.getText().toString().trim();\n String password = editTextPassword.getText().toString().trim();\n\n\n if (TextUtils.isEmpty(email)) {\n Toast.makeText(this, \"Se debe ingresar un email\", Toast.LENGTH_LONG).show();\n return;\n }\n if (TextUtils.isEmpty(password)) {\n Toast.makeText(this, \"Falta ingresar la contraseña\", Toast.LENGTH_LONG).show();\n return;\n }\n\n progressDialog.setMessage(\"Realizando consulta en linea...\");\n progressDialog.show();\n\n firebaseAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n // la misma funcion que en el caso anterior pero para poder ingresar\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) { //el oncomplete es para tener la comprobacion sea del campo del login o el singup\n\n if (task.isSuccessful()) {\n // si el usuario se encontraba creado entonces la tarea es exitosa\n\n int pos = email.indexOf(\"@\");\n userstring = email.substring(0, pos); //consigue el nombre del usuario\n Toast.makeText(Login.this, \"Bienvenido: \" + editTextEmail.getText(), Toast.LENGTH_LONG).show(); // consigue el email que habia sido asignado a la variable TextEmail\n Intent intencion = new Intent(getApplication(), UserView.class); // nueva actividad\n intencion.putExtra(\"user\", email); // le pasa como dato al usuario ingresado a la proxima actividad\n startActivity(intencion); //hay que hacer el get del usuario en la parte principal\n // userapasar = user;\n loged = true;\n\n } else {\n loged = false;\n\n if (task.getException() instanceof FirebaseAuthUserCollisionException) {//si se presenta una colisiÛn\n\n Toast.makeText(Login.this, \"Procesando\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(Login.this, \"\", Toast.LENGTH_LONG).show();\n }\n }\n progressDialog.dismiss();\n }\n });\n }", "@Override\n protected void onActivityResult(int peticion, int codigo, @Nullable Intent puntuacion) {\n if (peticion != 1 || codigo != RESULT_OK) return;\n\n int resultado = puntuacion.getIntExtra(\"PUNTUACION\", 0);\n\n if (resultado > record) {\n record = resultado;\n // lo mostramos en el textview\n TextView caja = (TextView) findViewById(R.id.record);\n caja.setText(\"Record: \" + resultado);\n // guardamos el record\n guardaRecord();\n }\n String puntuacionPartida = \"Tu puntuacion es \" + resultado;\n Toast miToast = Toast.makeText(this, puntuacionPartida, Toast.LENGTH_SHORT);\n miToast.setGravity(Gravity.CENTER, 0, 0);\n miToast.show();\n\n super.onActivityResult(peticion, codigo, puntuacion);\n }", "@Override\n public void onClick(View v) {\n String nom =\"\";\n String prenom = \"\";\n String mail = \"\";\n String tel = \"\";\n String mdp = \"\";\n String confMdp = \"\";\n\n // Recuperation des données saisies\n try {\n nom = nomInscription.getText().toString();\n prenom = prenomInscription.getText().toString();\n mail = mailInscription.getText().toString();\n tel = telInscription.getText().toString();\n mdp = mdpInscription.getText().toString();\n confMdp = mdpConfirmation.getText().toString();\n\n Utilisateur connexionUtilisateurs = new Utilisateur(nom,prenom,mail,tel,mdp);\n controle.setConnexionUtilisateurs(connexionUtilisateurs);\n }catch (Exception e){\n Log.d(\"Recup\", \"****************** Erreur reuperation donnees inscription\\n****\" + e);\n }\n\n // Controle des données saisie\n if((nom.equals(\"\"))||(prenom.equals(\"\"))||(mail.equals(\"\"))||(tel.equals(\"\"))||(mdp.equals(\"\"))||(confMdp.equals(\"\"))){\n Toast.makeText(InscriptionActivity.this,\"Saisie incorrect\",Toast.LENGTH_SHORT).show();\n }else if (!(mdp.equals(confMdp))){\n Toast.makeText(InscriptionActivity.this,\"mots de passe incorrect\",Toast.LENGTH_SHORT).show();\n }else if (tel.length() != 10){\n Toast.makeText(InscriptionActivity.this,\"Numéro de téléphone incorrect\",Toast.LENGTH_SHORT).show();\n }else if (!isValiEmail(mail)){\n Toast.makeText(InscriptionActivity.this,\"Format de l'adresse mail incorrect\",Toast.LENGTH_SHORT).show();\n }else {\n // si la saisie est correcte, envoie les informations à la base de données pour l'inscription\n afficheResult(nom,prenom,mail,tel,mdp);\n Utilisateur user = new Utilisateur(nom,prenom,mail,tel,mdp);\n AccesDistant accesDistant = new AccesDistant();\n Log.d(\"envoi inscript\",\"*************\" + user.inscriptionConvertToJSONArray());\n accesDistant.envoi(\"inscription\", user.inscriptionConvertToJSONArray());\n\n // Bouton pour aller vers la page home\n Intent intent = new Intent(InscriptionActivity.this,HomeActivity.class);\n startActivity(intent);\n }\n\n }", "public void clickFunction(View view){\n Toast.makeText(MainActivity.this, \"Hi there!\", Toast.LENGTH_LONG).show();\n\n // here we've created a variable \"myTextField\" of type \"EditText\" which collect the data from the ID i.e \"myTextField\" and convert the view ID into EditText type and stores into the variable.\n EditText myTextField = (EditText) findViewById(R.id.myTextField);\n\n // here the Log.i function is used to show the info to the logcat terminal which required two fields i.e Tag & the data to show (here the data is taken from the myTextField variable created above.\n Log.i(\"Info\",myTextField.getText().toString());\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n // TODO Auto-generated method stub\n if ((requestCode == request_code) && (resultCode == RESULT_OK)) {\n\n // Toast.makeText(this, intent.getStringExtra(\"resultado\"), Toast.LENGTH_LONG).show();\n inEquipo.setText(intent.getStringExtra(\"resultado\"));\n }\n }", "private void presionoBotonIngresarDato(View v){\n ViewHolder viewHolder = (ViewHolder) v.getTag();\n if(viewHolder==null)\n Log.i(\"Tag: \", \"Es null\");\n else {\n if(\"\".equals(viewHolder.dato.getText().toString())) {\n Log.i(\"Tag: \",\"Está vacío\");\n Toast.makeText(contexto, \"Ingrese un dato\", Toast.LENGTH_LONG).show();\n }\n else{\n String medicion = viewHolder.medicion.getText().toString();\n\n //Se quitan las tíldes para evitar problemas en las tablas\n if (medicion.equals(\"Líquidos\")) {\n medicion = \"Liquidos\";\n }\n if (medicion.equals(\"Número de glóbulos rojos\")) {\n medicion = \"Numero globulos rojos\";\n }\n if (medicion.equals(\"Número de reticulocitos\")) {\n medicion = \"Numero de reticulocitos\";\n }\n if (medicion.equals(\"Número Plaquetas\")) {\n medicion = \"Numero Plaquetas\";\n }\n if (medicion.equals(\"Número Hemoglobina\")) {\n medicion = \"Numero Hemoglobina\";\n }\n if (medicion.equals(\"Número Hematocrito\")) {\n medicion = \"Numero Hematocrito\";\n }\n\n double valor = Double.parseDouble(viewHolder.dato.getText().toString());\n\n Log.i(\"Tag: \", medicion);//obtener el editText del ViewHolder\n Log.i(\"Tag: \", valor + \"\");//obtener el editText del ViewHolder\n Log.i(\"Tag: \", Funciones.getFechaString());//obtener el editText del ViewHolder\n\n Paciente.getInstance().insertarYpostFisiologicos(Funciones.getFechaString(), medicion, valor);\n\n Toast.makeText(contexto, \"Se ingresó el Dato\", Toast.LENGTH_LONG).show();\n viewHolder.dato.setText(\"\");\n viewHolder.dato.clearFocus();\n\n //fisiologicos.remove(viewHolder.fisiologico);\n //notifyDataSetChanged();\n }\n\n }\n }", "public void insertEstudio(){\n //Creamos el conector de bases de datos\n AdmiSQLiteOpenHelper admin = new AdmiSQLiteOpenHelper(this, \"administracion\", null, 1 );\n // Abre la base de datos en modo lectura y escritura\n SQLiteDatabase BasesDeDatos = admin.getWritableDatabase();\n\n //Metodo apra almacenar fecha en SQLite\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String date = sdf.format(new Date());\n\n ContentValues registro = new ContentValues(); // Instanciamos el objeto contenedor de valores.\n registro.put(\"fecha\", date); // Aqui asociamos los atributos de la tabla con los valores de los campos (Recuerda el campo de la tabla debe ser igual aqui)\n registro.put(\"co_actividad\", \"1\"); // Aqui asociamos los atributos de la tabla con los valores de los campos (Recuerda el campo de la tabla debe ser igual aqui)\n\n //Conectamos con la base datos insertamos.\n BasesDeDatos.insert(\"t_estudios\", null, registro);\n BasesDeDatos.close();\n\n }", "public String get_log(){\n }", "public void printToLogs(View view) {\n TextView firstItemToLog = (TextView) findViewById(R.id.menu_item_1);\n String firstLog = firstItemToLog.getText().toString();\n Log.i(\"Log Item 1\", firstLog);\n\n\n // Finds the second text from the TextView and prints the text to the logs\n TextView secondItemToLog = (TextView) findViewById(R.id.menu_item_2);\n String secondLog = secondItemToLog.getText().toString();\n Log.i(\"Log Item 2\", secondLog);\n\n // Finds the third text from the TextView and prints the text to the logs\n TextView thirdItemToLog = (TextView) findViewById(R.id.menu_item_3);\n String thirdLog = thirdItemToLog.getText().toString();\n Log.i(\"Log Item 3\", thirdLog);\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(requestCode == 78 && resultCode == RESULT_OK ){\n\n user = data.getExtras().getString(\"usuarioP\");\n pass = data.getExtras().getString(\"contraseñaP\");\n correo = data.getExtras().getString(\"correoP\");\n\n // tTemporal2.setText(\"vengo de perfil\" + user + \"\\n\" + pass);\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }", "@Override\n public void passed() {\n Log.d(\"elomelo\",\"saved\");\n }", "private void btnGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarActionPerformed\n Boolean exito = true;\n try{\n exito = metodobd.Guardar(\n jTexRegistroMedico.getText().trim(),\n jTextCUI.getText().trim(), \n texprimernombre.getText().trim(), \n textsegundoNombre.getText().trim(), \n textprimerapellido.getText().trim(), \n textsegundoapellido.getText().trim(), \n textapellidocasada.getText().trim(), \n jcomboxgenero.getSelectedItem().toString().trim(), \n TextFecNac.getText().trim(), \n TextDireccion.getText().trim(), \n TextTelefono.getText().trim(), \n TextCorreo.getText().trim(), \n jcomboxferido.getSelectedItem().toString().trim(), \n textlugarreferido.getText().trim(), \n textobservacion.getText().trim(), \n textNomFam.getText().trim(),\n texttelfam.getText().trim(),\n textrelfam.getText().trim()\n );\n if (!exito){\n \n JOptionPane.showMessageDialog(null, \"Datos Agregados con Exito:\",\n \"Exito en la operacion\", JOptionPane.INFORMATION_MESSAGE); \n \n jTexRegistroMedico.setText(metodobd.getRegistroActual());\n \n }else {\n JOptionPane.showMessageDialog(null, \"Error al Agregar Datos\"\n , \"Error en la operación\", JOptionPane.ERROR_MESSAGE);\n }\n }catch (Exception e){\n JOptionPane.showMessageDialog(null, \"Exception Guardar: \"\n + e.getMessage(), \"Error en la operación\", JOptionPane.ERROR_MESSAGE);\n }\n \n \n \n \n \n\n \n \n }", "public DoppleSaveCSV(AppCompatActivity ac)\n {\n this.mainActivity = ac;\n mEditText = this.mainActivity.findViewById(R.id.edit_text);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main2);\n\n Bundle parametros = getIntent().getExtras(); \t\t\t// accede a todos los extras utilizados y declarados en el Intent\n String usuario = parametros.getString(\"sesion_usuario\"); //obtengo el usuario, queda guardado en session_usuario\n\n TextView saludo_usuario = (TextView) findViewById(R.id.saludo_usuario); //obteng el control del textview para poder editarlo por codigo\n String formaSaludo = \"Bievenido \"+usuario; //creo un string porque no puedo concatenar directamente en TextView\n saludo_usuario.setText(formaSaludo); // Muestro por pantalla\n\n Button btnMarcar = (Button) findViewById(R.id.btnMarcar); //instancion btnMarcar declarado en el xml para poder utilizarlo por codigo\n ncelular = (EditText) findViewById(R.id.ncelular);\n\n btnMarcar.setOnClickListener(new View.OnClickListener(){ //Si btnMarcar es precionado\n @Override\n public void onClick(View v) {\n marcarLlamada(v); //llama al metodo marcarLlamada\n }\n });\n\n Button btnFinalizar = (Button) findViewById(R.id.btnFinalizar);\n btnFinalizar.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v) {\n finalizaractividad(v);\n }\n });\n\n }", "private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }", "public void log(View view) {\n Log.i(TAG, \"LOGGING FOR \" + X + \", \" + Y);\n logButton.setText(R.string.logging_message);\n logButton.setEnabled(false);\n progressBar.setVisibility(View.VISIBLE);\n\n numLogs = 0;\n // Stops scanning after a pre-defined scan period.\n mHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n numLogs++;\n if (numLogs < NUM_LOGS){\n log();\n mHandler.postDelayed(this, SCAN_PERIOD);\n } else {\n mScanning = false;\n scanBLEDevice(false);\n logButton.setText(R.string.start_log_message);\n logButton.setEnabled(true);\n progressBar.setVisibility(View.INVISIBLE);\n }\n }\n }, SCAN_PERIOD);\n\n mScanning = true;\n scanBLEDevice(true);\n\n }", "private void acciones() {\n b1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n if (editText1.getText().toString().length() == 0 && editText2.getText().toString().length() == 0) {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.mensaje), Toast.LENGTH_SHORT).show();\n } else if (editText1.getText().toString().length() == 0) {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.mensaje1), Toast.LENGTH_SHORT).show();\n\n } else if (editText2.getText().toString().length() == 0) {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.mensaje2), Toast.LENGTH_SHORT).show();\n\n } else {\n int num1 = Integer.parseInt(editText1.getText().toString());\n int num2 = Integer.parseInt(editText2.getText().toString());\n int sum = (num1 + num2);\n String suma = Integer.toString(sum);\n Toast.makeText(getApplicationContext(), suma, Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void addEntranceLog(String logType) {\n if(ticketTrans == null || checkedItems.size() == 0) return;\n\n Entrance entrance = new Entrance(EntranceStep2Activity.this);\n\n Log.d(EntranceStep2Activity.class.toString(), logType);\n\n try {\n entrance.add(encryptRefNo, checkedItems, logType);\n } catch (Exception e) {\n String reason = e.getMessage();\n Toast.makeText(getApplicationContext(), reason, Toast.LENGTH_SHORT).show();\n } finally {\n loading.dismiss();\n }\n }", "public void guardarCambios(View v){\n\n ArrayList<ENListaCompra> miL = DespenBD.getListasVisibles();\n ENListaCompra lCompra = miL.get(miL.size()-posicion-1);\n\n System.out.println(\"Posician: \"+posicion);\n System.out.println(\"Nombre: \"+lCompra.getNombre());\n\n DespenBD.editarLista(lCompra.getNombre(),lCompra.getFecha(),etNombre.getText().toString(), etFecha.getText().toString());\n //lCompra.setNombre();\n\n /* for (ENListaCompra lc: miL) {\n //misListas.add(0, new MisListas(\"\"+lc.getNombre(),\"\"+lc.getFecha()));\n System.out.println(\"imprime: \" + lc.getNombre());\n }*/\n\n Intent i = new Intent(this, ListasCompra.class );\n //i.putExtra(\"nombre\", \"\" + etNombre.getText());\n //i.putExtra(\"accion\", \"editar\");\n startActivity(i);\n\n finish();\n\n }", "public void recuperandoDadosUsuarioescolhido(){\n Bundle bundle = getIntent().getExtras();\n if (bundle != null){\n if (bundle.containsKey(\"usuarioSelecionado\")){\n dadosDoUsuario = (Usuario) bundle.getSerializable(\"usuarioSelecionado\");\n }\n }\n\n // Configurando Toolbar\n\n toolbar.setTitle(dadosDoUsuario.getNome());\n setSupportActionBar(toolbar);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n // Configurando Imagem\n if (dadosDoUsuario.getFoto() != null){\n if (!dadosDoUsuario.getFoto().isEmpty()){\n Uri url = Uri.parse(dadosDoUsuario.getFoto());\n Glide.with(getApplicationContext()).load(url).into(civFotoPerfil);\n }\n }\n\n // Configurando Seguidores Postagens e Seguindo\n\n //stPublicacao = String.valueOf(dadosDoUsuario.getPublicacoes());\n stSeguidores = String.valueOf(dadosDoUsuario.getSeguidores());\n stSeguindo = String.valueOf(dadosDoUsuario.getSeguindo());\n\n tvSeguindo.setText(stSeguindo);\n tvSeguidores.setText(stSeguidores);\n //tvPublicacao.setText(stPublicacao);\n\n // Configurando Referencia postagens Usuario Escolhido\n postagensUsuarioRef = ConfiguracaoFirebase.getFirebaseDatabase()\n .child(\"postagens\")\n .child(dadosDoUsuario.getId());\n\n // Inicializa o Universal Image Loader\n inicializarImageLoader();\n // Recupera as Postagens do nosso Banco de Dados\n carregarFotosPostagem();\n }", "public void onClickRecordarContra(View view){\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n // 2. Chain together various setter methods to set the dialog characteristics\n builder.setMessage(R.string.dialog_message);\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n Toast.makeText(LogeoActivity.this, \"Correo enviado! Mira tu bandeja de entrada\", Toast.LENGTH_SHORT).show();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n // 3. Get the AlertDialog from create()\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "public void entraTexto(String miTab) {\n //instancia la base de datos de firebase\n DatabaseReference dbEnviar = FirebaseDatabase.getInstance().getReference().child(miTab);\n //crea una lista con datos del usuario y el mensaje introducido\n Map<String, String> envio = new HashMap<>();\n\n\n //selecciona una de las 3 cajas de entrada (una por pestaña) segun la pestaña y pone el valor\n //en el array\n switch (miTab) {\n case \"Sugerencia\":\n envio.put(\"Correo\", correo);\n envio.put(\"Nombre\", b.getString(\"nombre\"));\n envio.put(\"Mensaje\", inChat.getText().toString());\n //vacia la caja de entrada de arrayTexto\n inChat.setText(\"\");\n break;\n case \"Incidencia\":\n envio.put(\"Correo\", correo);\n envio.put(\"Descripcion\", inDescripcion.getText().toString());\n envio.put(\"Equipo\", inEquipo.getText().toString());\n envio.put(\"Fecha\", txtFecha.getText().toString());\n envio.put(\"Titulo\", inTitulo.getText().toString());\n break;\n case \"Consulta\":\n envio.put(\"Correo\", correo);\n envio.put(\"Nombre\", b.getString(\"nombre\"));\n envio.put(\"Mensaje\", inChat3.getText().toString());\n //vacia la caja de entrada de arrayTexto\n inChat3.setText(\"\");\n break;\n default:\n break;\n }\n\n //sube el arrayTexto entrado a firebase, al nodo del usuario\n // dbMensajes.child(txtEmail.getText().toString()).push().setValue(inChat.getText().toString());\n dbEnviar.push().setValue(envio);\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 AddDataRecordtoDB(View view) {\n\n //get the running distance from textview\n TextView TV_distance = (TextView)findViewById(R.id.data_length);\n Double runningDistance = Double.parseDouble(TV_distance.getText().toString());\n System.out.println(\"distance is :\"+runningDistance);\n\n //get the calories from textview\n TextView TV_calories = (TextView)findViewById(R.id.data_calories);\n Double runningCalories = Double.parseDouble(TV_calories.getText().toString());\n System.out.println(\"calorie is :\"+runningCalories);\n\n // new an running \"entity\"\n Runningdata NewRunningdata = new Runningdata();\n NewRunningdata.setDistance(runningDistance);\n NewRunningdata.setCalorie(runningCalories);\n NewRunningdata.setStarttime(startTime);\n\n // using \"dao\" to manipulate database\n runningdao.insert(NewRunningdata);\n System.out.println(\"I did insertion\");\n }", "private void registrarVehiculo(String placa, String tipo, String color, String numdoc) {\n miVehiculo = new Vehiculo(placa,tipo,color, numdoc);\n\n showProgressDialog();\n\n //empresavehiculo\n //1. actualizar el reference, empresavehiculo\n //2. mDatabase.child(\"ruc\").child(\"placa\").setValue\n\n mDatabase.child(placa).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n //\n setmDatabase(getDatabase().getReference(\"empresasvehiculos\"));\n //\n mDatabase.child(GestorDatabase.getInstance(getApplicationContext()).obtenerValorUsuario(\"ruc\")).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n }", "private void logika_rozpocznij(){\n\t}", "private void guardaRecord() {\n // Guardamos el record\n SharedPreferences datos = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor miEditor = datos.edit();\n miEditor.putInt(\"RECORD\", record);\n miEditor.apply();\n }", "public void storeGlucose(){\n String HBA1C = hba1c.getText().toString();\n String date = glucose_date.getText().toString();\n String medication = String.valueOf(medication_spinner.getSelectedItem());\n UserData userdata = new UserData(\"rjgalleg\", date, glucose_number, tag, medication, HBA1C);\n Log.i(\"Authorize\", \"date: \"+date +\", medication: \"+medication+\", HBA1C: \"+HBA1C+\", glucose number: \"+glucose_number +\"tag: \"+tag);\n ServerRequests serverRequests = new ServerRequests(this);\n serverRequests.storeUserGlucoseInBackground(userdata, new GetUserCallback() {\n @Override\n public void done(User returnedUser) {\n startActivity(new Intent(GlucoseActivity.this, GlucoseActivity.class));\n }\n });\n\n\n }", "private void getValues(){\n username = etUsername.getText().toString();\n password = etPassword.getText().toString();\n }", "void saveLog(LogInfo logText);", "public void buscarPabellon(String idPabellon)\n {\n TxtPabellon=(TextView)findViewById(R.id.txt_pabellon);\n database.getReference(Constants.FIREBASE_LOCATION_PABELLON).child(idPabellon).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Pabellon pabellon = dataSnapshot.getValue(Pabellon.class);\n latPabellon=pabellon.getLatitud();\n longPabellon=pabellon.getLongitud();\n nombrePabellon=pabellon.getNombre();\n TxtPabellon.setText(nombrePabellon);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.w(\"getUser:onCancelled\", databaseError.toException());\n }\n });\n }", "public void insertEstadisticas(String IdPregunta, Integer validacicion, String co_nivel, String co_categoria){\n //Creamos el conector de bases de datos\n AdmiSQLiteOpenHelper admin = new AdmiSQLiteOpenHelper(this, \"administracion\", null, 1 );\n // Abre la base de datos en modo lectura y escritura\n SQLiteDatabase BasesDeDatos = admin.getWritableDatabase();\n\n ContentValues registro = new ContentValues(); // Instanciamos el objeto contenedor de valores.\n registro.put(\"co_estudios\", consultarEstudioUltimaId() );\n registro.put(\"co_pregunta\", IdPregunta);\n registro.put(\"co_nivel\", co_nivel);\n registro.put(\"co_categoria\", co_categoria);\n registro.put(\"validacion\", validacicion);\n\n System.out.println( \" ------------- Insert RESPUESTA ------------------\");\n System.out.println( \" IdEstudio \" + validacicion );\n\n\n //Conectamos con la base datos insertamos.\n BasesDeDatos.insert(\"t_estadisticas\", null, registro);\n BasesDeDatos.close();\n\n }", "public void insertar2(String nombre, String apellido, String mail, String celular, String comuna,String profesor,String alumno,String clave) {\n db.execSQL(\"insert into \" + TABLE_NAME + \" values (null,'\" + nombre + \"','\" + apellido + \"','\" + mail + \"','\" + celular + \"','\" + comuna + \"',\" + profesor + \",0,0,0,0,\" + alumno + \",'\" + clave + \"')\");\n }", "private void saveFilterData(){\n String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\n\n databaseBleed = FirebaseDatabase.getInstance().getReference().child(\"bleeds\").child(uid);\n\n String bleedLocation = txtLocation.getText().toString();\n String bleedCause = txtCause.getText().toString();\n String bleedSeverity = txtSeverity.getText().toString();\n\n Intent Filterintent = new Intent(getActivity(), ViewAllBleeds.class);\n\n Filterintent.putExtra(\"BLEED_LOCATION\", bleedLocation);\n Filterintent.putExtra(\"BLEED_CAUSE\", bleedCause);\n Filterintent.putExtra(\"BLEED_SEVERITY\", bleedSeverity);\n startActivity(Filterintent);\n\n }", "LogRecord saveLog(LogRecord logRecord);", "@Override\n public void onClick(View v) {\n AlertDialog.Builder alert = new AlertDialog.Builder(ComentarioActivity.this);\n alert.setTitle(MobileServiceCustom.USUARIO_LOGUEADO.nombre); //Set Alert dialog title here\n alert.setMessage(\"Ingrese su comentario\"); //Message here\n\n // Set an EditText view to get user input\n final EditText input = new EditText(ComentarioActivity.this);\n alert.setView(input);\n\n alert.setPositiveButton(\"Agregar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int whichButton) {\n //You will get as string input data in this variable.\n // here we convert the input to a string and show in a toast.\n String srt = input.getEditableText().toString();\n\n if (srt.isEmpty()) {\n Snackbar.make(mRecyclerView, \"Debe ingresar datos en el comentario\", Snackbar.LENGTH_SHORT).show(); // Don’t forget to show!\n } else {\n\n agregarComentario(new Comentario(\"\", srt, MobileServiceCustom.USUARIO_LOGUEADO.id, MyTime.getFecha(), MyTime.getHora(), ID_NOTICIA));\n }\n\n } // End of onClick(DialogInterface dialog, int whichButton)\n }); //End of alert.setPositiveButton\n alert.setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int whichButton) {\n // Canceled.\n dialog.cancel();\n }\n }); //End of alert.setNegativeButton\n AlertDialog alertDialog = alert.create();\n alertDialog.show();\n /* Alert Dialog Code End*/\n\n }", "public void loguj (View view){\n\n android.content.Intent myIntent = new android.content.Intent(view.getContext(), Logowanie.class);\n startActivity(myIntent);\n\n }", "private void RetrieveEditTextData() {\n\n strFirstName = etFirstName.getText().toString();\n strMiddleName = etMiddleName.getText().toString();\n strLastName = etLastName.getText().toString();\n strEmployId = etEmployId.getText().toString();\n strDesignation = etDesignation.getText().toString();\n strCompName = etCompName.getText().toString();\n strCategory = etCategory.getText().toString();\n strDOB = etDOB.getText().toString();\n\n }", "@Override\n public void log()\n {\n }", "@Override\n public void onClick(View v) {\n etProducto.setError(null);\n etCantidad.setError(null);\n etDescripcion.setError(null);\n String producto = etProducto.getText().toString(),\n CantidadComoCadena = etCantidad.getText().toString(),\n descripcion = etDescripcion.getText().toString();\n if (\"\".equals(producto)) {\n etProducto.setError(\"Escribe el producto a comprar\");\n etProducto.requestFocus();\n return;\n }\n if (\"\".equals(CantidadComoCadena)) {\n etCantidad.setError(\"Escribe la cantidad de la venta\");\n etCantidad.requestFocus();\n return;\n }\n if (\"\".equals(descripcion)) {\n etDescripcion.setError(\"Escribe la descripción de la venta\");\n etDescripcion.requestFocus();\n return;\n }\n\n // Ver si es un entero\n int cantidad;\n try {\n cantidad = Integer.parseInt(etCantidad.getText().toString());\n } catch (NumberFormatException e) {\n etCantidad.setError(\"Escribe la cantidad\");\n etCantidad.requestFocus();\n return;\n }\n // Ya pasó la validación\n Venta nuevaVenta = new Venta(producto,cantidad,descripcion);\n long id = ventasController.nuevaVenta(nuevaVenta);\n if (id == -1) {\n // De alguna manera ocurrió un error\n Toast.makeText(AgregarMascotaActivity.this, \"Error al guardar. Intenta de nuevo\", Toast.LENGTH_SHORT).show();\n } else {\n // Terminar\n finish();\n }\n }", "private void readAndSAVE(String operation){\n boolean vaidation_status = true;\n\n new_notice_id = edtxt_new_notice_id.getText().toString();\n if (TextUtils.isEmpty(new_notice_id)){\n edtxt_new_notice_id.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_new_notice_id.setError(null);\n }\n\n new_notice_title = edtxt_new_notice_title.getText().toString();\n if (TextUtils.isEmpty(new_notice_title)){\n edtxt_new_notice_title.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_new_notice_title.setError(null);\n }\n\n new_notice_date = edtxt_new_notice_date.getText().toString();\n if (TextUtils.isEmpty(new_notice_date)){\n edtxt_new_notice_date.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_new_notice_date.setError(null);\n }\n\n //---department,approved_by,announced_by\n department = edtxt_new_notice_department.getText().toString();\n if (TextUtils.isEmpty(department)){\n edtxt_new_notice_department.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_new_notice_department.setError(null);\n }\n\n approved_by = edtxt_new_notice_approved_by.getText().toString();\n if (TextUtils.isEmpty(approved_by)){\n edtxt_new_notice_approved_by.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_new_notice_approved_by.setError(null);\n }\n\n announced_by = edtxt_new_notice_announced_by.getText().toString();\n if (TextUtils.isEmpty(announced_by)){\n edtxt_new_notice_announced_by.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_new_notice_announced_by.setError(null);\n }\n\n //--\n\n\n\n new_notice_details = edtxt_new_notice_details.getText().toString();\n if(new_notice_details.isEmpty()){\n vaidation_status = false;\n edtxt_new_notice_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 NoticeDetails addNewNotice = new NoticeDetails();\n\n addNewNotice.setNotice_ID(new_notice_id);\n addNewNotice.setNotice_titles(new_notice_title);\n addNewNotice.setNotice_date(new_notice_date);\n addNewNotice.setNotice_details(new_notice_details);\n addNewNotice.setNotice_department(department);\n addNewNotice.setNotice_approved_by(approved_by);\n addNewNotice.setNotice_announced_by(announced_by);\n addNewNotice.setAttachmentsFilesName(textView_new_notice_vlu.getText().toString());\n\n addNewNotice.setNotice_user_type(StartUpActivity.userDetails.getType());\n addNewNotice.setNotice_user_state(StartUpActivity.userDetails.getState());\n addNewNotice.setNotice_user_district(StartUpActivity.userDetails.getDistt());\n\n addNewNotice.setUser_firebase_ID(StartUpActivity.userDetails.getSchool_firbaseDataID());\n\n showProgressDialog();\n\n if(mAuth.getCurrentUser()!=null)\n {\n //CHECK IF new achivments has been added or update process.\n if(operation.equals(\"CREATE_NEW\")) {\n\n // Get new push key\n new_notice_key = mDatabase.child(\"Global\").child(StartUpActivity.userDetails.getState()).child(\"Notice_Board\").push().getKey();\n addNewNotice.setNotice_firbase_ID(new_notice_key);\n\n } else {\n addNewNotice.setNotice_firbase_ID(new_notice_key);\n }\n\n // save the user at Global under user UID\n mDatabase.child(\"Global\").child(StartUpActivity.userDetails.getState()).child(\"Notice_Board\").child(new_notice_key).setValue(addNewNotice, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n\n hideProgressDialog();\n\n new_notice_created = true;\n\n if(databaseError==null)\n {\n Toast.makeText(AddNewNoticeActivity.this, \"Your Details has been saved !!\",\n Toast.LENGTH_SHORT).show();\n\n btn_add_new_notice.setText(\"EXIT\");\n\n\n }\n }\n });\n }\n\n\n\n }\n }", "public void setarText() {\n txdata2 = (TextView) findViewById(R.id.txdata2);\n txdata1 = (TextView) findViewById(R.id.txdata3);\n txCpf = (TextView) findViewById(R.id.cpf1);\n txRenda = (TextView) findViewById(R.id.renda1);\n txCpf.setText(cpf3);\n txRenda.setText(renda.toString());\n txdata1.setText(data);\n txdata2.setText(data2);\n\n\n }", "@Override\n public void onClick(View v)\n {\n contacto.setNombre(txtEditarNombre.getText().toString());\n contacto.setTelefono(Integer.parseInt(txtEditarTelefono.getText().toString()));\n\n Activity1.agenda.actualizarContacto(Integer.parseInt(intento.getSerializableExtra(\"Posicion\").toString()),contacto);\n mensaje(R.string.GuardadoCorrectamente);\n\n setResult(RESULT_OK,intento); //le decimos al activity que nos llamó que to-do está OK\n finish(); //cerramos esta activity\n\n }", "public void registrarClasificacion() {\n Clasificacion clasifi;\n Estado estado;\n // clasifi = data.getClasificaList().get(numClasif);\n // estado = data.getEstadoList().get(numEstado);\n\n /*Toast.makeText(this, \"REG-\" + numClasif,\n Toast.LENGTH_SHORT).show();\n System.out.println(\"REG-\" + numEstado);*/\n\n\n AdmSQLiteOpenHelper admin = new AdmSQLiteOpenHelper(this.context);\n\n try {\n admin.createDataBase();\n //admin.openDataBase();\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n // \"lesvena3\", null, 1)\n //AdminSQLiteOpenHelper admin = new AdminSQLiteOpenHelper(this,\n // \"lesvena3\", null, 1);\n SQLiteDatabase bd = admin.getWritableDatabase();\n /* String cod = et3_comun.getText().toString();\n String descri = et4_cientifico.getText().toString();\n String pre = et7_descripcion.getText().toString();\n String est = et8_estado.getText().toString();*/\n\n // Estado estado = new Estado();\n //Clasificacion clasifica = new Clasificacion();\n/* estado.setEstado(est);\n clasifica.setNombre_comun(cod);\n clasifica.setNombre_cientifico(descri);\n clasifica.setDescripcion(pre);\n data.setEstado(estado);\n data.setClasifica(clasifica);\n */\n\n ContentValues registro = new ContentValues();\n //registro.put(\"id\", 2);\n registro.put(\"nombre_comun\", \"FLOR\");\n registro.put(\"nombre_cientifico\", \"silvestre\");\n registro.put(\"descripcion\", \"AMARI\");\n bd.insert(\"clasificacion\", null, registro);\n bd.close();\n /* et3_comun.setText(\"\");\n et4_cientifico.setText(\"\");\n et7_descripcion.setText(\"\");\n et8_estado.setText(\"\");*/\n Toast.makeText(this.context, \"Se cargaron los datos de Clasificacion\",\n Toast.LENGTH_SHORT).show();\n/*\n Intent k = new Intent(this, Summary.class);\n startActivity(k);\n */\n }", "@Override\n public void onCancelled(DatabaseError error) {\n btnAddres.setText(\"fail\");\n\n }", "@Override\n public void onCancelled(DatabaseError error) {\n btnAddres.setText(\"fail\");\n\n }", "@Override\n public void onCancelled(DatabaseError error) {\n btnAddres.setText(\"fail\");\n\n }", "@Override\n public void onCancelled(DatabaseError error) {\n btnAddres.setText(\"fail\");\n\n }", "public void receberValores() {\n Bundle b = getIntent().getExtras();\n if (b != null) {\n cpf3 = b.getString(\"valor2\");\n renda = b.getDouble(\"valor3\");\n data = b.getString(\"valor4\");\n data2 = b.getString(\"valor5\");\n }\n }", "@Override\npublic String toString() {// PARA MOSTRAR LOS DATOS DE ESTA CLASE\n// TODO Auto-generated method stub\nreturn MuestraCualquiera();\n}", "private void logUser() {\n }", "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 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 }", "public String insertAlum(Alumno alumno) //lo necesitaba\n {\n String regInsertado = \"Alumno: \";\n\n\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"CARNET\",alumno.getCarnet());\n contentValues.put(\"IDESCUELA\", alumno.getIdEscuela());\n contentValues.put(\"NOMESTUDIANTE\", alumno.getNombre());\n long contador = db.insert(\"ESTUDIANTE\",null,contentValues);\n db.close();\n\n if(contador > 0){\n regInsertado = regInsertado + contador;\n }else{\n regInsertado = \"Ya existe el alumno.\" + alumno.getCarnet();\n }\n return regInsertado;\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n Button button = (Button) findViewById((R.id.Bbli));\n Button buttPlus = (Button) findViewById(R.id.Bplus);\n Button buttRaz = (Button) findViewById(R.id.Braz);\n final EditText nbOne = (EditText)findViewById(R.id.nbOne);\n final EditText nbTwo = (EditText) findViewById(R.id.nbTwo);\n final EditText resul = (EditText) findViewById(R.id.resultat);\n button.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View view) {\n //To change body of implemented methods use File | Settings | File Templates.\n Toast msg = Toast.makeText(NicogetActivity.this, \"Je confirme !\", Toast.LENGTH_LONG);\n msg.setGravity(Gravity.CENTER, msg.getXOffset()/2, msg.getYOffset()/2);\n msg.show();\n }\n });\n\n buttPlus.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View view) {\n try {\n int nbOneInt = Integer.parseInt(nbOne.getText().toString());\n int nbTwoInt = Integer.parseInt(nbTwo.getText().toString());\n int resulInt = Integer.parseInt(resul.getText().toString());\n resulInt = resulInt + (nbOneInt+nbTwoInt);\n resul.setText(String.valueOf(resulInt));\n } catch (Exception err) {\n Toast msg = Toast.makeText(NicogetActivity.this, err.getMessage(), Toast.LENGTH_LONG);\n msg.setGravity(Gravity.CENTER, msg.getXOffset()/2, msg.getYOffset()/2);\n msg.show();\n }\n }\n });\n\n buttRaz.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View view) {\n resul.setText(\"0\");\n }\n });\n }", "private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }", "public void metodoBotaoFinalizarCadastro() {\n\n\n nomeCadastro = campoCadastroNome.getText().toString();\n emailCadastro = campoCadastroEmail.getText().toString();\n senhaCadastro = campoCadastroSenha.getText().toString();\n\n\n if (!nomeCadastro.isEmpty()) {\n\n if (!emailCadastro.isEmpty()) {\n\n if (!senhaCadastro.isEmpty()) {\n\n Usuarios classeUsuarios = new Usuarios();\n\n classeUsuarios.setNome(nomeCadastro);\n classeUsuarios.setEmail(emailCadastro);\n classeUsuarios.setSenha(senhaCadastro);\n classeUsuarios.setTipo(pegarTipoUsuarioSwitch());\n\n //Chamando metodo pra salvar o usuario\n metodoSalvarUsuarioFirebase(classeUsuarios);\n\n\n } else {\n\n Toast.makeText(CadastroUsuario.this, \"Por favor insira uma senha válida\", Toast.LENGTH_LONG).show();\n }\n\n } else {\n Toast.makeText(CadastroUsuario.this, \"Por favor preencha o email\", Toast.LENGTH_LONG).show();\n }\n\n } else {\n Toast.makeText(CadastroUsuario.this, \"Por favor preencha o campo nome\", Toast.LENGTH_LONG).show();\n }\n\n\n\n }", "public void AgregarVenta() {\r\n if (vista.jTcodigodebarras.equals(\"\")) {//C.P.M si el componete esta vacio es que no a insertado algun codigo a buscar\r\n JOptionPane.showMessageDialog(null, \"No has ingresado un codigo de barras\");//C.P.M se lo notificamos a el usuario\r\n } else {//C.P.M de lo contrario es que inserto algo y ay que buscarlo\r\n try {\r\n modelo.setCodigobarras(vista.jTcodigodebarras.getText());//C.P.M le mandamos el codigo a buscar a el modelo\r\n rs = modelo.Buscarcodigobarras();//C.P.M cachamos el resultado de la consulta\r\n if (rs.next() == true) {//C.P.M preguntamos si trai datos si es asi \r\n String nombre = rs.getString(\"nombre_producto\");//C.P.M obtenemos el nombre de el resultado\r\n float precio = Float.parseFloat(rs.getString(\"precio\"));//C.P.M obtenemos el precio\r\n String precioformato = format.format(precio);//C.P.M le damos el formato adecuado esta variable la utilizamos para enviarla a la vista\r\n float totalPro = Float.parseFloat(precioformato);//C.P.M cambiamos a flotante ya el precio con el formato adecuado\r\n String cant = JOptionPane.showInputDialog(null, \"Cantidad: \");//C.P.M preguntamos la cantidad del prducto\r\n float cantidad = Float.parseFloat(cant);//C.P.M convertimos a flotante la cantidad\r\n totalPro = totalPro * cantidad;//C.P.M obtenemos el total de ese producto multiplicando al cantidad por el precio\r\n total = Float.parseFloat(vista.jTtotal.getText());//C.P.M obtenemos el total de la venta \r\n total = totalPro + total;//C.P.M le sumamos el total del producto ingresado al total ya de la venta\r\n String totalaenviar = format.format(total);//C.P.M le damos el formato adecuado para enviar el nuevo total\r\n vista.jTtotal.setText(totalaenviar);//C.P.M le enviamos el nuevo total a la vista\r\n DefaultTableModel temp = (DefaultTableModel) vista.Tlista.getModel();//C.P.M obtenemos el modelo de la tabla\r\n Object[] fila = new Object[3];//C.P.M creamos un areglo con el tamano de la nota\r\n fila[0] = cant;//C.P.M le agregamos la cantidad \r\n fila[1] = nombre;//C.P.M le agregamos el nombre\r\n fila[2] = precioformato;//C.P.M y el precio con el formato\r\n temp.addRow(fila);//C.P.M lo agregamos a la tabla como una nueva fila\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"No existe un artículo con dicho código\");\r\n }\r\n vista.jTcodigodebarras.setText(\"\");//C.P.M limpiamos el codigo de barras y le colocamos el foco\r\n vista.jTcodigodebarras.requestFocus();//C.P.M le colocamos el foco\r\n } catch (SQLException ex) {//C.P.M si ocurre un error le notificamos a el usuario\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al consultar el codigo de barras\");\r\n }\r\n }\r\n }", "@Override\n public void onClick(View v) {\n queryMain = svBusqueda.getQuery();\n Toast.makeText(getApplicationContext(),\"ejecutando consulta \"+queryMain,Toast.LENGTH_LONG).show();\n consultarDb();\n }", "private void obtener(){\n Bundle bundle = getIntent().getExtras();\n id = bundle.getString(\"id\");\n nombre = bundle.getString(\"nombre\");\n apellido = bundle.getString(\"apellido\");\n telefono = bundle.getInt(\"telefono\");\n //seteo de datos\n editTextN.setText(nombre);\n editTextA.setText(apellido);\n editTextT.setText(String.valueOf(telefono));\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_main);\n\n usuarioLogado = UsuarioFirebase.getDadosUsuarioLogado();\n storageRef = ConfiguracaoFirebase.getFirebaseStorage();\n identificadorUsuario = UsuarioFirebase.getIdUsuario();\n\n\n final FirebaseUser usuarioPerfil = UsuarioFirebase.getUsuarioAtual();\n\n\n\n /*String nombre = user.getDisplayName();\n String correo = user.getEmail();\n String correotoedit = user.getEmail(); */\n\n TextView textView = (TextView)findViewById(R.id.textView7);\n textView.setText(\"Nombre: \" +usuarioPerfil.getDisplayName().toUpperCase());\n\n TextView textView2 = (TextView)findViewById(R.id.textView8);\n String matrico;\n String matri = usuarioPerfil.getEmail();\n matrico = matri.substring(1,11);\n textView2.setText(\"Matricula: \"+ matrico);\n\n TextView textView3 = (TextView)findViewById(R.id.textView9);\n textView3.setText(\"Correo Institucional: \"+ usuarioPerfil.getEmail());\n\n\n\n //Configurar Toolbar\n Toolbar toolbar = findViewById(R.id.toolbarPrincipal);\n toolbar.setTitle(\"Mundo UAT\");\n toolbar.setTitleTextColor(getResources().getColor(R.color.colorPrimaryDark));\n setSupportActionBar(toolbar);\n\n //Configurar objetos\n\n //Configurar botton navigation\n\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState){\n super.onCreate(savedInstanceState);\n setContentView(R.layout.vista_form_enviar_spei);\n causa_devolucionid = (EditText) findViewById(R.id.causa_devolucionid);\n clave_p_b = (EditText) findViewById(R.id.clave_p_b);\n clave_p_o = (EditText) findViewById(R.id.clave_p_o);\n clave_rastreo = (EditText) findViewById(R.id.clave_rastreo);\n clave_tc_b = (EditText) findViewById(R.id.clave_tc_b);\n clave_tc_o = (EditText) findViewById(R.id.clave_tc_o);\n clave_tipo_operacion = (EditText) findViewById(R.id.clave_tipo_operacion);\n comision = (EditText) findViewById(R.id.comision);\n concepto = (EditText) findViewById(R.id.concepto);\n entrada = (EditText) findViewById(R.id.entrada);\n estado_pago_speiid = (EditText) findViewById(R.id.estado_pago_speiid);\n fecha_hora = (EditText) findViewById(R.id.fecha_hora);\n folio = (EditText) findViewById(R.id.folio);\n folio_instruccion = (EditText) findViewById(R.id.folio_instruccion);\n iva_pago = (EditText) findViewById(R.id.iva_pago);\n monto_pago = (EditText) findViewById(R.id.monto_pago);\n nombreb = (EditText) findViewById(R.id.nombreb);\n nombre_estado = (EditText) findViewById(R.id.nombre_estado);\n nombreo = (EditText) findViewById(R.id.nombreo);\n Numero_cuenta_b = (EditText) findViewById(R.id.Numero_cuenta_b);\n Numero_cuenta_o = (EditText) findViewById(R.id.Numero_cuenta_o);\n pagos_speiid = (EditText) findViewById(R.id.pagos_speiid);\n polizaid = (EditText) findViewById(R.id.polizaid);\n prioridad = (EditText) findViewById(R.id.prioridad);\n recobranza = (EditText) findViewById(R.id.recobranza);\n rfnumerica = (EditText) findViewById(R.id.rfnumerica);\n rfc_curp_b = (EditText) findViewById(R.id.rfc_curp_b);\n rfc_curp_o = (EditText) findViewById(R.id.rfc_curp_o);\n tipo_pagoid = (EditText) findViewById(R.id.tipo_pagoid);\n topologia = (EditText) findViewById(R.id.topologia);\n cvoperacion = (EditText) findViewById(R.id.cvoperacion);\n btn_enviar = (Button) findViewById(R.id.btn_enviar);\n result = (TextView) findViewById(R.id.result);\n\n Bundle extras = getIntent().getExtras();\n\n String c_dev = extras.getString(\"causa_devolucionid \");\n String cv_pb = extras.getString(\"clave_p_b\");\n String cv_po = extras.getString(\"clave_p_o\");\n String cv_ra = extras.getString(\"clave_rastreo\");\n String cv_tb = extras.getString(\"clave_tc_b\");\n String cv_to = extras.getString(\"clave_tc_o\");\n String cv_ti = extras.getString(\"clave_tipo_operacion\");\n String comi = extras.getString(\"comision\");\n String conc = extras.getString(\"concepto_pago\");\n String entr = extras.getString(\"entrada\");\n String est_p = extras.getString(\"estado_pago_speiid \");\n String fcha = extras.getString(\"fecha_pago\");\n String foli = extras.getString(\"folio\");\n String fo_in = extras.getString(\"folio_instruccion\");\n String iva_p = extras.getString(\"iva_pago\");\n String mont = extras.getString(\"monto_pago\");\n String nom_b = extras.getString(\"nombre_b\");\n String nom_e = extras.getString(\"nombre_estado\");\n String nom_o = extras.getString(\"nombre_o\");\n String cuenta_b = extras.getString(\"numero_cuenta_b\");\n String cuenta_o = extras.getString(\"numero_cuenta_o\");\n String id_pa = extras.getString(\"pagos_speiid\");\n String rfc_b = extras.getString(\"rfc_curp_b\");\n String rfc_o = extras.getString(\"rfc_curp_o\");\n String tpago = extras.getString(\"tipo_pagoid\");\n String topo = extras.getString(\"topologia\");\n String ref_n = extras.getString(\"ref_numerica\");\n String re_co = extras.getString(\"ref_cobranza1\");\n\n causa_devolucionid.setText(c_dev);\n clave_p_b.setText(cv_pb);\n clave_p_o.setText(cv_po);\n clave_rastreo.setText(cv_ra);\n clave_tc_b.setText(cv_tb);\n clave_tc_o.setText(cv_to);\n clave_tipo_operacion.setText(cv_ti);\n comision.setText(comi);\n concepto.setText(conc);\n entrada.setText(entr);\n estado_pago_speiid.setText(est_p);\n fecha_hora.setText(fcha);\n folio.setText(foli);\n folio_instruccion.setText(fo_in);\n iva_pago.setText(iva_p);\n monto_pago.setText(mont);\n nombreb.setText(nom_b);\n nombre_estado.setText(nom_e);\n nombreo.setText(nom_o);\n Numero_cuenta_b.setText(cuenta_b);\n Numero_cuenta_o.setText(cuenta_o);\n pagos_speiid.setText(id_pa);\n rfc_curp_b.setText(rfc_b);\n rfc_curp_o.setText(rfc_o);\n tipo_pagoid.setText(tpago);\n topologia.setText(topo);\n rfnumerica.setText(ref_n);\n recobranza.setText(re_co);\n\n\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n\n btn_enviar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n //LayoutInflater inflater = getLayoutInflater();\n //View dialoglayout = inflater.inflate(R.layout.popup_enviar_spei, null);\n\n AlertDialog.Builder builder = new AlertDialog.Builder(FormEnviarSpei.this);\n builder.setMessage(\"Estas a punto de enviar el pago ¿Desea continuar?\")\n .setTitle(\"Alerta\")\n .setCancelable(true)\n .setNegativeButton(\"Cancelar\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n\n }\n })\n .setPositiveButton(\"Continuar\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n String c_dev = causa_devolucionid.getText().toString();\n String cv_pb = clave_p_b.getText().toString();\n String cv_po = clave_p_o.getText().toString();\n String cv_ra = clave_rastreo.getText().toString();\n String cv_tb = clave_tc_b.getText().toString();\n String cv_to = clave_tc_o.getText().toString();\n String cv_ti = clave_tipo_operacion.getText().toString();\n String comi = comision.getText().toString();\n String conc = concepto.getText().toString();\n String entr = entrada.getText().toString();\n String est_p = estado_pago_speiid.getText().toString();\n String fcha = fecha_hora.getText().toString();\n String foli = folio.getText().toString();\n String fo_in = folio_instruccion.getText().toString();\n String iva_p = iva_pago.getText().toString();\n String mont = monto_pago.getText().toString();\n String nom_b = nombreb.getText().toString();\n String nom_e = nombre_estado.getText().toString();\n String nom_o = nombreo.getText().toString();\n String cuen_b = Numero_cuenta_b.getText().toString();\n String cuen_o = Numero_cuenta_o.getText().toString();\n String id_pa = pagos_speiid.getText().toString();\n String rfc_b = rfc_curp_b.getText().toString();\n String rfc_o = rfc_curp_o.getText().toString();\n String tpago = tipo_pagoid.getText().toString();\n String topo = topologia.getText().toString();\n String ref_n = rfnumerica.getText().toString();\n String re_co = recobranza.getText().toString();\n String cv_op = cvoperacion.getText().toString();\n\n if (cv_op.isEmpty()){\n cvoperacion.setError(\"Campo vacio\");\n cvoperacion.requestFocus();\n }else {\n\n Conexion(c_dev, cv_pb, cv_po, cv_ra, cv_tb, cv_to, cv_ti, comi, conc, entr,\n est_p, fcha, foli, fo_in, iva_p, mont, nom_b, nom_e, nom_o, cuen_b,\n cuen_o, id_pa, rfc_b, rfc_o, tpago, topo, cv_op, ref_n, re_co);\n }\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n\n }\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 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}" ]
[ "0.63487554", "0.6106972", "0.607603", "0.600398", "0.59983855", "0.59501344", "0.5940629", "0.5834063", "0.5822977", "0.58095396", "0.579281", "0.574699", "0.5734002", "0.5717644", "0.5698651", "0.5673293", "0.567037", "0.56536525", "0.5641747", "0.5632097", "0.5629877", "0.56111705", "0.5599873", "0.5580489", "0.55745345", "0.5570737", "0.55684817", "0.5568116", "0.55654913", "0.5562473", "0.5551932", "0.55177605", "0.5516599", "0.5512216", "0.5512216", "0.55090564", "0.55084676", "0.55001736", "0.5488941", "0.54880697", "0.54866415", "0.5484539", "0.5474744", "0.5458762", "0.5449549", "0.5432602", "0.5427672", "0.5425763", "0.5420597", "0.5420393", "0.5411412", "0.540712", "0.5398265", "0.53966546", "0.53941965", "0.5393826", "0.5393019", "0.53924865", "0.5390744", "0.53562593", "0.53440756", "0.5336689", "0.5336046", "0.5335433", "0.5328583", "0.5326784", "0.5322127", "0.5311243", "0.5308196", "0.5293226", "0.5293176", "0.5291877", "0.52769744", "0.52690595", "0.5265521", "0.526249", "0.52574456", "0.5253575", "0.5252672", "0.5236022", "0.5229947", "0.5229947", "0.5229947", "0.5229947", "0.5228594", "0.5228493", "0.52239406", "0.52225536", "0.52225137", "0.5219188", "0.52155685", "0.52119666", "0.5210147", "0.52077943", "0.52064675", "0.5205184", "0.5204658", "0.5203877", "0.51994973", "0.5194361" ]
0.58190936
9
Intent intent = new Intent(context, MenuActivity.class); startActivity(intent); finish();
public void onClick(DialogInterface dialog, int id) { return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void iniciaTelaMenu(View view){\n Intent tela = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(tela);\n finish();\n }", "private void backToMenu()\n {\n Intent i = new Intent(this, HomeScreen.class);\n startActivity(i);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.item1:\n finish();\n break;\n }\n return true;\n }", "@Override\r\n public void onClick(View v) {\n startActivity(new Intent(TwoPlayer.this, MainMenu.class));\r\n finish();\r\n }", "public void onClick(View v) {\n finish();\n Intent i=new Intent(getApplicationContext(), MainActivity.class);\n startActivity(i);\n\n }", "private void SendToMain(){\n Intent intent=new Intent(getApplicationContext(),Category.class);\n startActivity(intent);\n\n //by using this keyword every thing in this page is finished\n finish();\n\n }", "@Override\n public void onClick(View view){\n startActivity(new Intent(homePage.this, MainActivity.class));\n finish();\n\n }", "private void homemenu() \n\n{\nstartActivity (new Intent(getApplicationContext(), Home.class));\n\n\t\n}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n switch (item.getItemId()) {\n\n case R.id.action_logout:\n Intent intent = new Intent(MainActivity.this, LoginActivity.class);\n startActivity(intent);\n finish();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n\n\n }", "public void goBack(){\n startActivity(new Intent(this, MainMenu.class));\n }", "public void returnToMainMenu(View view){\n Intent main_menu_intent = new Intent(this, MainActivity.class);\r\n startActivity(main_menu_intent);\r\n }", "@Override\n\t public void onFinish(){\n\t \tIntent nextScreen = new Intent(getApplicationContext(), Main_Menu_2.class);\n\t\t\t // TODO Auto-generated method stub\n\t\t startActivity(nextScreen);\n\t }", "public void goHome(Context context) \n{\n final Intent intent = new Intent(context, HomeActivity.class);\n intent.setFlags (Intent.FLAG_ACTIVITY_CLEAR_TOP);\n context.startActivity (intent);\n}", "public void exitActivity() {\n\n finish();\n\n }", "private void goToNavActivity() {\n Intent i = new Intent(MainActivity.this, NavActivity.class);\n startActivity(i);\n finish();\n }", "public void onClick(View view) {\n Intent detailActIntent = new Intent(view.getContext(), MainActivity.class);\n finish();\n startActivity(detailActIntent);\n\n\n }", "@Override\n public void onClick(View v) {\n finish();\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n startActivity(finishIntent);\n }", "@Override\r\n public void onClick(View v) {\n \t Intent intent = new Intent(MenuPrincipal.this, PantallaJugadores.class);\r\n \t finish();\r\n startActivity(intent);\r\n //startActivityForResult(intent, 11);\r\n\r\n }", "@Override\n public void onClick(View arg0) {\n Intent login = new Intent(getApplicationContext(), LoginActivity.class);\n login.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(login);\n finish();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n finish();\n Intent Intentintent = new Intent();\n Bundle b=new Bundle();\n Intentintent.putExtras(b);\n Intentintent.setClass(getApplicationContext(), test_page.class);\n startActivity(Intentintent);\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "private void goMainActivity() {\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n finish();\n }", "@Override\n public void onFinish(){\n Intent intent = new Intent(getBaseContext(), CodakActivity.class);\n startActivity(intent);\n }", "public void finishActivity(){\n this.finish ();\n }", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tIntent intent=new Intent(getContext(),MainActivity.class);\n\t\t\t\t\t\tgetContext().startActivity(intent);\n\t\t\t\t\t\t((Activity)getContext()).finish();\n\t\t\t\t\t}", "private void goLogin(){\n Intent intent = new Intent(Menu.this, MainActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view, int position) {\n\n\n Intent intent;\n switch (position) {\n\n case 0:\n intent = new Intent(getActivity(), AboutPage.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n getActivity().startActivity(intent);\n break;\n case 1:\n intent = new Intent(getActivity(), Help.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n getActivity().startActivity(intent);\n break;\n\n }\n\n\n\n\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n Intent myIntent = new Intent(getApplicationContext(), TodaysClassActivity.class);\n startActivityForResult(myIntent, 0);\n return true;\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "private void HomePage(){\n Intent intent = new Intent();\n intent.setClass(FaultActivity.this, MainActivity.class);\n startActivity(intent);\n FaultActivity.this.finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = getIntent();\n finish();\n startActivity(intent);\n }", "public void backtoMain()\n {\n Intent i=new Intent(this,MainActivity.class);\n startActivity(i);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.mnuMain:\n startActivity(new Intent(getApplicationContext(), MainMenuActivity.class));\n return true;\n case R.id.mnuExit:\n finish();\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(getApplicationContext(), LoginActivity.class);\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(i);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, SettingsActivity.class);\n startActivity(intent);\n finish();\n }", "private void goToMenu() {\n Intent intentProfile = new Intent(PregonesActivosActivity.this, MenuInicial.class);\n PregonesActivosActivity.this.startActivity(intentProfile);\n }", "@Override\n public void run() {\n Intent i = new Intent(getBaseContext(), HomeActivity.class);\n startActivity(i);\n\n finish();\n }", "@Override\n public void onFinishButtonPressed() {\n Intent intent = new Intent(getApplicationContext(), HomeActivity.class);\n startActivity(intent);\n }", "static void endGame(Context context)\n {\n Intent endGame = new Intent(context,MainActivity.class);\n endGame.putExtra(GAME_FINISHED,true);\n context.startActivity(endGame);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home: \n \t Intent homeIntent = new Intent(this, MenuActivity.class);\n homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(homeIntent); \n break; \n case R.id.action_cancel:\n Intent homeIntent2 = new Intent(this, MenuActivity.class);\n homeIntent2.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(homeIntent2); \n \t break;\n default:\n return super.onOptionsItemSelected(item);\n }\n return true;\n }", "@Override\n public void onClick(View v) {\n final Intent i = new Intent(Resultat.this, MenuPrincipal.class);\n startActivity(i);\n }", "@Override\n public void onClick(View v) {\n context.finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Intent intent = getIntent();\n finish();\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n\n finish();\n\n\n }", "public void OnGotoMyRecipes(View View)\n {\n \t\t Intent intent = new Intent(View.getContext(), MyRecipes.class);\n \t\t intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n \t\t EditRecipeActivity.this.finish();\n }", "@Override \n public void onClick(DialogInterface dialog, int which) {\n Intent intent = new Intent(MyActivity.this,denglu_Activity.class);\n startActivity(intent);\n finish();\n \n }", "@Override\n public void doLogout() {\n\n\n Intent intent = new Intent(RestaurantMainActivity.this, WelcomeActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View v)\n {\n\n Intent intent = new Intent (getApplicationContext(), Leaderboard.class);\n startActivity(intent);\n finish();\n }", "public void exit() {\n Intent intent = new Intent(this, MainActivity.class);\n this.startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n finish();//close the activity\n\n }", "@Override\n public void onClick(View v) {\n finish();\n }", "@Override\r\n public void onClick(View v) {\n \t finish();\r\n\r\n }", "private void returnToMain() {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "public void volver(View view){\n Intent i = new Intent(this,MainActivity.class);\n startActivity(i);\n finish();\n }", "public void UpdateUI(){\n startActivity(new Intent(this,MainActivity.class));\n finish();\n }", "@Override\n\tpublic void onClick(View arg0) {\n\t\tIntent intent2 = new Intent(getApplicationContext(), MainActivity.class);\n\t\tintent2.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\tstartActivity(intent2);\n\t\tthis.finish();\n\t\tIntent intent = new Intent(Intent.ACTION_MAIN);\n\t\tintent.addCategory(Intent.CATEGORY_HOME);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tstartActivity(intent);\n\t\t\n\t\t//Intent intent2 = new Intent(getApplicationContext(), MainActivity.class);\n\t\t//intent2.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t//startActivity(intent2);t2);\n\t}", "@Override\n\tpublic void goToMainMenu() {\n\t\tfinish();\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t Intent mainIntent = new Intent().setClass(\n\t getActivity(), MainActivity.class);\n\t startActivity(mainIntent);\n\n\t getActivity().finish();\n\t\t\t}", "@Override\n public void onClick(View v){\n Intent intent = new Intent(MainMenu.this, basketballMenu.class);\n startActivity(intent);\n }", "@Override\n public void run() {\n\n Intent home = new Intent(MainActivity.this, HomeActivity.class);\n\n startActivity(home);\n finish();\n }", "public void navigateToHome() {\n Intent intent = new Intent(this, MainMenu.class);\n startActivity(intent);\n finish();\n }", "private void mystartActivity(Class c){\n Intent intent = new Intent(this,c);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case R.id.home:\r\n startActivity(new Intent(this, welcomeActivity.class));\r\n return true;\r\n case R.id.out:\r\n signOut();\r\n Toast.makeText(getApplicationContext(), \"You have signed out!\", Toast.LENGTH_SHORT).show();\r\n startActivity(new Intent(this, LoginActivity.class));\r\n return true;\r\n case R.id.back:\r\n //startActivity(new Intent(this, MainActivity.class));\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tIntent intent = new Intent(getApplicationContext(), MenuActivity.class);\n\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t\t\tstartActivity(intent);\n\n\t\t\t}", "private void goToMain(){\n Intent intent = new Intent(getBaseContext(), MainActivity.class);\n startActivity(intent);\n }", "protected void finalizar()\n {\n \tfinish();\n \tIntent i = new Intent(this, PantallaSeleccion.class);\n\t \tstartActivity(i);\n }", "@Override\n public void onClick(View v) {\n\n finish();\n }", "@Override\n public void onClick(View v) {\n finish();\n //startActivity(i);\n }", "@Override\n public void run() {\n Intent mainIntent = new Intent(AzadUniversity.this, FirstMenu.class);\n AzadUniversity.this.startActivity(mainIntent);\n AzadUniversity.this.finish();\n }", "@Override\n public void onClick(View v)\n {\n finish();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n switch (id){\n case R.id.menu_parking:\n\n Intent In = new Intent(Secure.this,ParkingActivity.class);\n startActivity(In);\n finish();\n break;\n\n case R.id.menu_shuttle:\n Intent inti = new Intent(Secure.this,Shuttle.class);\n startActivity(inti);\n finish();\n break;\n case R.id.menu_wallet:\n Intent u =new Intent(Secure.this,Wallet.class);\n startActivity(u);\n finish();\n break;\n case R.id.menu_payment:\n Intent a = new Intent(Secure.this,Secure.class);\n startActivity(a);\n finish();\n break;\n case R.id.menu_contact:\n Intent b = new Intent(Secure.this,Contact.class);\n startActivity(b);\n finish();\n break;\n case R.id.menu_logout:\n editor.clear();\n editor.commit();\n Intent i = new Intent(Secure.this,LoinActivity.class);\n startActivity(i);\n finish();\n break;\n\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void finish() {\n\t \n\t super.onDestroy();\n\t MainActivity.nowcontext=MainActivity.context;\n\t super.finish();\n\t \n\t //关闭窗体动画显示 \n\t this.overridePendingTransition(R.anim.activity_open_right,R.anim.activity_close_right); \n\t}", "public void goToMainMenu(View v){\n startActivity(new Intent(MainActivity.this, frontClass.class));\n }", "@Override\n public void onClick(View v) {\n Intent HomeScreen = new Intent(v.getContext(), MainActivity.class);\n startActivity(HomeScreen);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case R.id.home:\r\n startActivity(new Intent(this, welcomeActivity.class));\r\n return true;\r\n case R.id.out:\r\n signOut();\r\n Toast.makeText(getApplicationContext(), \"You have signed out!\", Toast.LENGTH_SHORT).show();\r\n startActivity(new Intent(this, LoginActivity.class));\r\n return true;\r\n case R.id.back:\r\n //startActivity(new Intent(this, welcomeActivity.class));\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "private void onEndGame() {\n Intent intent1 = new Intent(this, MainActivity.class);\n startActivity(intent1);\n finish();\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setClass(DonationActivity.this, NewsActivity.class);\n startActivity(intent);\n finish();\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent ( Desiderativas.this, Modulo_5.class );\n startActivity ( intent );\n\n // finaslizar la actividad\n finish ();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n int id = item.getItemId();\n\n if (id == R.id.homebutton) {\n\n Intent intent = new Intent(StoreListContractsActivity.this, MainActivity.class );\n\n startActivity(intent); finish();\n\n // return true;\n }\n\n\n\n if (id == R.id.logoutbutton){\n startActivity(new Intent(this,Login.class));\n }\n\n if (id == R.id.backbutton){\n startActivity(new Intent(this,MainActivity.class));\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void run() {\n\n Intent starthome = new Intent(SplashScreenActivity.this, WelcomeActivity.class);\n starthome.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(starthome);\n\n finish();\n }", "public void onClick(View v) {\n\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_HOME);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n\n //android.os.Process.killProcess(android.os.Process.myPid());\n //System.exit(1);\n\n //finish();\n }", "@Override\n public void onClick(View v) {\n finish();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n //select back button\n finish();\n Intent intent2 = new Intent(this, MainActivity.class);\n intent2.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n this.startActivity(intent2);\n overridePendingTransition(0, 0); // 액티비티 전환 애니메이션 제거\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "public void gameOver(){\n Intent intent = new Intent(getContext(), GameOver.class); //set intent to game over activity\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_CLEAR_TASK);\n getContext().startActivity(intent); //goes to game over activity\n }", "@Override\n public void onClick(View v){\n finish();\n }", "@Override\n public void onClick(View view) {\n startActivity(new Intent(StartActivity.this, MainActivity.class));\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setClass(DonationActivity.this, DonationProjectActivity.class);\n startActivity(intent);\n //finish();\n }", "@Override\n public void onClick(View v) {\n finish();\n }", "@Override\r\n public void onClick(View v) {\n Intent i = new Intent(LoginActivty.this, SignupActivity.class);\r\n startActivity(i);\r\n finish();\r\n\r\n\r\n }", "@Override\n public void onBackPressed(){\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\r\n\t\tbundle = new Bundle();\r\n\r\n\t\tbundle.putString(\"menu\",getApplicationContext().toString());\r\n\t\tswitch (item.getItemId())\r\n\t\t{\r\n\t\t\tcase R.id.action_cart: {\r\n\t\t\t\tintent= new Intent(this, MyCart.class);\r\n\t\t\t\tbundle.putString(\"next_page\",\"MyCart.class\");\r\n\t\t\t\tintent.putExtras(bundle);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tcase R.id.action_notification: {\r\n\t\t\t\tintent= new Intent(this, Notification.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\t\tcase R.id.action_login: {\r\n\r\n\t\t\t\tintent= new Intent(this, login.class);\r\n\t\t\t\tintent.putExtras(bundle);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\tcase R.id.myplan: {\r\n\t\t\t\tintent= new Intent(this, MyPlan.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\r\n\t\t\t\tcase android.R.id.home:\t{\r\n\t\t\t\t\tNavUtils.navigateUpFromSameTask(this);\r\n\t\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tdefault: return super.onOptionsItemSelected(item);\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\t}", "@Override\n public void run() {\n Intent i = new Intent(ActivitySplash.this, ActivityIntro.class);\n startActivity(i);\n\n // close this activity\n finish();\n }", "@Override\n public void run() {\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(intent);\n finish();\n }", "@Override\n public void onClick(View v)\n {\n finish();\n }", "@Override\n public void onClick(View v)\n {\n finish();\n }", "@Override\n public void onClick(View v) {\n finish();\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n //exit the app\n enter.activityList.add(this);\n\n setContentView(R.layout.activity_save);\n bt1 = (Button) findViewById(R.id.save_bt1);\n bt1.setOnClickListener(new Button.OnClickListener() {\n public void onClick(View v) {\n // TODO Auto-generated method stub\n\n Intent intent = new Intent();\n intent.setClass(save_succeed.this, after_beautify.class);\n // 转向添加页面\n startActivity(intent);\n //finish()???\n }\n });\n\n bt2 = (Button) findViewById(R.id.save_bt2);\n bt2.setOnClickListener(new Button.OnClickListener() {\n public void onClick(View v) {\n // TODO Auto-generated method stub\n\n Intent intent = new Intent();\n intent.setClass(save_succeed.this, enter.class);\n // 转向添加页面\n startActivity(intent);\n //finish()???\n }\n });\n\n }", "@Override\n public void onClick(View v) {\n finish();\n }", "public void onClickAbout (View v)\n{\n startActivity (new Intent(getApplicationContext(), AboutActivity.class));\n}" ]
[ "0.7934722", "0.7560077", "0.75060683", "0.7498109", "0.7447177", "0.7409902", "0.73993444", "0.738012", "0.7327465", "0.7312754", "0.7311021", "0.7296439", "0.72918594", "0.72895426", "0.72842866", "0.72823554", "0.7267848", "0.725806", "0.72440773", "0.7216965", "0.71663207", "0.71656775", "0.7145118", "0.7138077", "0.7126169", "0.7103598", "0.70940775", "0.70917535", "0.7064804", "0.7039637", "0.70098865", "0.70057815", "0.69904524", "0.6989416", "0.6987551", "0.6984116", "0.69810563", "0.6959836", "0.6956904", "0.69568443", "0.694154", "0.693296", "0.6931971", "0.69295734", "0.69267917", "0.69260186", "0.69254035", "0.691701", "0.69147336", "0.6913523", "0.6906733", "0.6902701", "0.6901306", "0.68970823", "0.6891929", "0.68906695", "0.68900234", "0.68858856", "0.68836284", "0.6871602", "0.68681544", "0.6864539", "0.68626994", "0.685246", "0.68522745", "0.68346924", "0.68256515", "0.6815476", "0.681544", "0.6813844", "0.680733", "0.68055534", "0.680473", "0.67997915", "0.6799461", "0.6781646", "0.6775457", "0.67746866", "0.6773655", "0.676094", "0.6760796", "0.675502", "0.6754812", "0.67523134", "0.67476815", "0.67455107", "0.6741181", "0.6733902", "0.67314047", "0.6730884", "0.6729333", "0.6724598", "0.67243916", "0.6719394", "0.67182416", "0.67170596", "0.67170596", "0.67169297", "0.6716713", "0.6715289", "0.67147624" ]
0.0
-1
Students' answers to the questions
public static void main(String[] args) { char[][] answers = { {'A', 'B', 'A', 'C', 'C', 'D', 'E', 'E', 'A', 'D'}, {'D', 'B', 'A', 'B', 'C', 'A', 'E', 'E', 'A', 'D'}, {'E', 'D', 'D', 'A', 'C', 'B', 'E', 'E', 'A', 'D'}, {'C', 'B', 'A', 'E', 'D', 'C', 'E', 'E', 'A', 'D'}, {'A', 'B', 'D', 'C', 'C', 'D', 'E', 'E', 'A', 'D'}, {'B', 'B', 'E', 'C', 'C', 'D', 'E', 'E', 'A', 'D'}, {'B', 'B', 'A', 'C', 'C', 'D', 'E', 'E', 'A', 'D'}, {'E', 'B', 'E', 'C', 'C', 'D', 'E', 'E', 'A', 'D'}}; // Key to the questions char[] keys = {'D', 'B', 'D', 'C', 'C', 'D', 'A', 'E', 'A', 'D'}; int[][] students = new int[answers.length][2]; // Grade all answers for (int i = 0; i < answers.length; i++) { // Grade one student int correctCount = 0; for (int j = 0; j < answers[i].length; j++) { if (answers[i][j] == keys[j]) correctCount++; } students[i][0] = i; students[i][1] = correctCount; } sortMatrix(students); for (int[] student : students) { System.out.println("Student " + student[0] + "'s correct count is " + student[1]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Integer> getStudentAnswer() {\r\n return this.studentAnswer;\r\n }", "public ArrayList<StudentAnswer> getAnswers() {\n TeacherDBCommands tdbc = new TeacherDBCommands(ctx);\n QuestionDBCommands qdbc = new QuestionDBCommands(ctx);\n\n ArrayList<StudentAnswer> answers = null;\n try {\n answers = tdbc.getStudentAnswers(this.studentId, this.quizId);\n } catch (SQLException e) {\n log.log(Level.SEVERE, e.getMessage(), e);\n }\n tdbc.closeConnection();\n\n if(answers != null){\n\n for (int i = 0; i < answers.size(); i++) {\n try {\n answers.get(i).setQuestion(qdbc.getQuestionById(answers.get(i).getQuizTestModuleQuestionId()));\n } catch (SQLException e) {\n log.log(Level.SEVERE, e.getMessage(), e);\n break;\n }\n }\n }\n qdbc.closeConnection();\n return answers;\n }", "public void quiz() {\n\t\t\t\t\tcorrectans = 0;\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint M = 0;\n\t\t\t\t\tj = readDifficulty();\n\t\t\t\t\tM = readProblemType();\n\t\t\t\t\t//ask the student to solve 10 different problems, as determined by the problem type\n\t\t\t for(int i = 0; i < 10; i++ ) {\n\t\t\t \t//contain two numbers sampled from a uniform random distribution with bounds determined by the problem difficulty\n\t\t\t \tint x = rand.nextInt(j); \n\t\t\t\t int y = rand.nextInt(j);\n\t\t\t\t int O = askquestion(j, M,x,y);\n\t\t\t\t if(M == 4) {\n\t\t\t\t \t float floatans = readdivision();\n\t\t\t\t \tk = divisionsol(floatans, x, y);\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t int userin = readResponse();\n\t\t\t k = isnanswercorrect(O , userin);\n\t\t\t }\n\t\t\t if(k == 1) {\n\t\t\t \t correctans++;\n\t\t\t }\n\t\t\t }\n\t\t\t int L = 0;\n\t\t\t L = displayCompletionMessage(correctans);\n\t\t\t if ( L == 1) {\n\t\t\t \tquiz();\n\t\t\t }\n\t\t\t else {\n\t\t\t \treturn;\n\t\t\t }\n\t\t\t \n\t\t\t\t}", "private void countAnswers(){\n\t\tfor(Student student: students){\n\t\t\tif(isCorrectAnswer(student.getAnswers())){\n\t\t\t\tcorrectAnswers+=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\twrongAnswers+=1;\n\t\t\t}\n\t\t}\n\t}", "private void printAnswerResults(){\n\t\tSystem.out.print(\"\\nCorrect Answer Set: \" + q.getCorrectAnswers().toString());\n\t\tSystem.out.print(\"\\nCorrect Answers: \"+correctAnswers+\n\t\t\t\t\t\t \"\\nWrong Answers: \"+wrongAnswers);\n\t}", "public void showCorrectAnswers() {\n holders.forEach(QuizViewHolder::showCorrectAnswer);\n }", "public void answerQuestion(){\n for (int i = 0; i < questionList.size(); i++){\r\n if (questionList.get(i).question.startsWith(\"How\")){\r\n howQuestions.add(new Question(questionList.get(i).id, questionList.get(i).question, questionList.get(i).answer));\r\n }\r\n }\r\n\r\n // Print All When Questions\r\n System.out.println(\"How Questions\");\r\n for (int i = 0; i < howQuestions.size(); i++){\r\n System.out.println(howQuestions.get(i).question);\r\n }\r\n\r\n //==== Question Entities ====\r\n // Split All When Question to only questions that have the entities\r\n if (!howQuestions.isEmpty()){\r\n if (!questionEntities.isEmpty()){\r\n for (int c = 0; c < questionEntities.size(); c++){\r\n for (int i = 0; i < howQuestions.size(); i++){\r\n if (howQuestions.get(i).question.contains(questionEntities.get(c))){\r\n answers.add(new Question(howQuestions.get(i).id, howQuestions.get(i).question, howQuestions.get(i).answer));\r\n }\r\n }\r\n }\r\n }\r\n else{\r\n if (!questionTags.isEmpty()){\r\n for (int c = 0; c < questionTags.size(); c++){\r\n for (int i = 0; i < howQuestions.size(); i++){\r\n if (howQuestions.get(i).question.contains(questionTags.get(c))){\r\n answers.add(new Question(howQuestions.get(i).id, howQuestions.get(i).question, howQuestions.get(i).answer));\r\n }\r\n }\r\n }\r\n }\r\n else{\r\n System.out.println(\"There no answer for your question !\");\r\n System.exit(0);\r\n }\r\n }\r\n }\r\n\r\n // Print All Entities Questions\r\n System.out.println(\"Questions of 'How' that have entities and tags :\");\r\n for (int i = 0; i < answers.size(); i++){\r\n for (int j = 1; j < answers.size(); j++){\r\n if (answers.get(i).id == answers.get(j).id){\r\n answers.remove(j);\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < answers.size(); i++){\r\n System.out.println(answers.get(i).question);\r\n }\r\n\r\n\r\n //==== Question Tags ====\r\n for (int i = 0; i < questionTags.size(); i++){\r\n for (int k = 0; k < answers.size(); k++){\r\n if (answers.get(k).question.contains(questionTags.get(i))){\r\n continue;\r\n }\r\n else{\r\n answers.remove(k);\r\n }\r\n }\r\n }\r\n }", "public void showQuestion()\n\t{\n\t\tSystem.out.println(ans);\n\t\tfor(int k = 0; k<numAns; k++)\n\t\t{\n\t\t\tSystem.out.println(k+\". \"+answers[k]);\n\t\t}\n\t}", "public String[] getAnswers()\n\t{\n\t\treturn answers;\t\n\t}", "@Override\r\n public ArrayList<String> getAnswers() {\r\n return this.answers;\r\n }", "public void submitAnswers(View view){\n\n //Find the correct answers for questions 1 & 2 and check if they have been selected\n CheckBox firstCheckBox = (CheckBox)findViewById(R.id.checkbox1);\n boolean firstCheckBoxIsChecked = firstCheckBox.isChecked();\n\n CheckBox secondCheckBox = (CheckBox)findViewById(R.id.checkbox2);\n boolean secondCheckBoxIsChecked = secondCheckBox.isChecked();\n\n CheckBox thirdCheckBox = (CheckBox)findViewById(R.id.checkbox3);\n boolean thirdCheckBoxIsChecked = thirdCheckBox.isChecked();\n\n CheckBox fourthCheckBox = (CheckBox)findViewById(R.id.checkbox4);\n boolean fourthCheckBoxIsChecked = fourthCheckBox.isChecked();\n\n //Find the EditText field, find out what has been typed in the field and convert it into a string\n EditText questionFourAnswer = (EditText)findViewById(R.id.question_four_field);\n String questionFourAnswered = questionFourAnswer.getText().toString().toLowerCase();\n\n //Find the RadioGroup for Question2 and find out which radioButton has been selected\n RadioGroup radioGroupQuestion2 = (RadioGroup) findViewById(R.id.radio_group_q2);\n int selectedIdQ2 = radioGroupQuestion2.getCheckedRadioButtonId();\n\n //Find the RadioGroup for Question3 and find out which radioButton has been selected\n RadioGroup radioGroupQuestion3= (RadioGroup) findViewById(R.id.radio_group_q3);\n int selectedIdQ3 = radioGroupQuestion3.getCheckedRadioButtonId();\n\n //Calculate points, create a message to display users' score and display it as a toast message\n int points = calculatePoints(firstCheckBoxIsChecked, secondCheckBoxIsChecked, questionFourAnswered, selectedIdQ2, selectedIdQ3, thirdCheckBoxIsChecked, fourthCheckBoxIsChecked);\n String pointsMessage = createQuizSummary(points);\n Toast.makeText(getApplicationContext(), pointsMessage, Toast.LENGTH_SHORT).show();\n }", "public void submitAnswers(View view) {\n\n int points = 0;\n\n //Question 1\n RadioButton radioButton_q1 = findViewById (R.id.optionB_q1);\n boolean firstQuestionCorrect = radioButton_q1.isChecked ();\n if (firstQuestionCorrect) {\n points += 1;\n }\n //Question 2\n RadioButton radioButton_q2 = findViewById (R.id.optionC_q2);\n boolean secondQuestionCorrect = radioButton_q2.isChecked ();\n if (secondQuestionCorrect) {\n points += 1;\n }\n\n //Question 3 - in order to get a point in Question 3, three particular boxes has to be checked\n CheckBox checkAns1_q3 = findViewById (R.id.checkbox1_q3);\n boolean thirdQuestionAnswer1 = checkAns1_q3.isChecked ();\n CheckBox checkAns2_q3 = findViewById (R.id.checkbox2_q3);\n boolean thirdQuestionAnswer2 = checkAns2_q3.isChecked ();\n CheckBox checkAns3_q3 = findViewById (R.id.checkbox3_q3);\n boolean thirdQuestionAnswer3 = checkAns3_q3.isChecked ();\n CheckBox checkAns4_q3 = findViewById (R.id.checkbox4_q3);\n boolean thirdQuestionAnswer4 = checkAns4_q3.isChecked ();\n CheckBox checkAns5_q3 = findViewById (R.id.checkbox5_q3);\n boolean thirdQuestionAnswer5 = checkAns5_q3.isChecked ();\n CheckBox checkAns6_q3 = findViewById (R.id.checkbox6_q3);\n boolean thirdQuestionAnswer6 = checkAns6_q3.isChecked ();\n CheckBox checkAns7_q3 = findViewById (R.id.checkbox7_q3);\n boolean thirdQuestionAnswer7 = checkAns7_q3.isChecked ();\n if (thirdQuestionAnswer2 && thirdQuestionAnswer3 && thirdQuestionAnswer6 && !thirdQuestionAnswer1 && !thirdQuestionAnswer4 && !thirdQuestionAnswer5 && !thirdQuestionAnswer7) {\n points = points + 1;\n }\n\n //Question 4\n RadioButton radioButton_q4 = findViewById (R.id.optionC_q4);\n boolean forthQuestionCorrect = radioButton_q4.isChecked ();\n if (forthQuestionCorrect) {\n points += 1;\n }\n\n //Question 5\n EditText fifthAnswer = findViewById (R.id.q5_answer);\n String fifthAnswerText = fifthAnswer.getText ().toString ();\n if (fifthAnswerText.equals (\"\")) {\n Toast.makeText (getApplicationContext (), getString (R.string.noFifthAnswer), Toast.LENGTH_LONG).show ();\n return;\n } else if ((fifthAnswerText.equalsIgnoreCase (getString (R.string.pacific))) || (fifthAnswerText.equalsIgnoreCase (getString (R.string.pacificOcean)))) {\n points += 1;\n }\n\n //Question 6\n RadioButton radioButton_q6 = findViewById (R.id.optionA_q6);\n boolean sixthQuestionCorrect = radioButton_q6.isChecked ();\n if (sixthQuestionCorrect) {\n points += 1;\n }\n\n //Showing the result to the user\n displayScore (points);\n }", "public void saveQuestion(){\n\n\t\tint numAnswers = testGenerator.getNumAnswers(questionNo);\n\t\tString setAnswerBox = Integer.toString(numAnswers);\n\n\t\ttestGenerator.setQuestionText(questionNo, ques.getText());\n\t\ttestGenerator.setAnswerText(questionNo, 1, ans1.getText());\n\t\ttestGenerator.setAnswerText(questionNo, 2, ans2.getText());\n\n\t\ttestGenerator.setIsAnswerCorrect(questionNo, 1, answer1.isSelected());\n\t\ttestGenerator.setIsAnswerCorrect(questionNo, 2, answer2.isSelected());\n\n\t\tif((setAnswerBox.equals(\"3\")) || setAnswerBox.equals(\"4\")) {\n\t\t\ttestGenerator.setAnswerText(questionNo, 3, ans3.getText()); \t\n\t\t\ttestGenerator.setIsAnswerCorrect(questionNo, 3, answer3.isSelected());\n\t\t}\n\n\t\tif(setAnswerBox.equals(\"4\")) {\n\t\t\ttestGenerator.setAnswerText(questionNo, 4, ans4.getText()); \t\n\t\t\ttestGenerator.setIsAnswerCorrect(questionNo, 4, answer4.isSelected());\n\t\t}\n\t}", "public void checkAnswers(View v) {\n int correct = 0;\n\n //Question 1 answer\n RadioButton a1 = (RadioButton) findViewById(R.id.q1_a2);\n\n if (a1.isChecked()) {\n correct++;\n } else {\n TextView q1 = (TextView) findViewById(R.id.question_1);\n q1.setTextColor(Color.RED);\n }\n\n //Question 2 answer\n RadioButton a2 = (RadioButton) findViewById(R.id.q2_a2);\n\n if (a2.isChecked()) {\n correct++;\n } else {\n TextView q2 = (TextView) findViewById(R.id.question_2);\n q2.setTextColor(Color.RED);\n }\n\n //Question 3\n CheckBox a3_1 = (CheckBox) findViewById(R.id.q3_a1);\n CheckBox a3_2 = (CheckBox) findViewById(R.id.q3_a2);\n CheckBox a3_3 = (CheckBox) findViewById(R.id.q3_a3);\n\n if (a3_1.isChecked() && a3_2.isChecked() && a3_3.isChecked()) {\n correct++;\n } else {\n TextView q3 = (TextView) findViewById(R.id.question_3);\n q3.setTextColor(Color.RED);\n }\n\n //Question 4\n EditText a4 = (EditText) findViewById(R.id.q4_a);\n\n if (a4.getText().toString().equalsIgnoreCase(getResources().getString(R.string.q4_a))) {\n correct++;\n } else {\n TextView q4 = (TextView) findViewById(R.id.question_4);\n q4.setTextColor(Color.RED);\n }\n\n //Question 5\n RadioButton a5 = (RadioButton) findViewById(R.id.q5_a3);\n\n if (a5.isChecked()) {\n correct++;\n } else {\n TextView q5 = (TextView) findViewById(R.id.question_5);\n q5.setTextColor(Color.RED);\n }\n\n //Question 6\n RadioButton a6 = (RadioButton) findViewById(R.id.q6_a1);\n\n if (a6.isChecked()) {\n correct++;\n } else {\n TextView q6 = (TextView) findViewById(R.id.question_6);\n q6.setTextColor(Color.RED);\n }\n\n //Question 7\n EditText a7 = (EditText) findViewById(R.id.q7_a);\n\n if (a7.getText().toString().equalsIgnoreCase(getResources().getString(R.string.q7_a))) {\n correct++;\n } else {\n TextView q7 = (TextView) findViewById(R.id.question_7);\n q7.setTextColor(Color.RED);\n }\n\n //Question 8\n RadioButton a8 = (RadioButton) findViewById(R.id.q8_a1);\n\n if (a8.isChecked()) {\n correct++;\n } else {\n TextView q8 = (TextView) findViewById(R.id.question_8);\n q8.setTextColor(Color.RED);\n }\n\n //Toast\n Context context = getApplicationContext();\n CharSequence text = \"Score: \" + correct + \"/8\";\n int duration = Toast.LENGTH_SHORT;\n Toast.makeText(context, text, duration).show();\n }", "public static void takeTest(Question [] questions) {\n int score = 0;\n Scanner keyboardInput = new Scanner(System.in);\n for(int i = 0; i < questions.length; i++){\n System.out.println(questions[i].prompt);\n String answer = keyboardInput.nextLine();\n if(answer.equals(questions[i].answer)) {\n score++;\n }\n\n }\n System.out.println(\"Voce conseguiu \" + score + \"/\" + questions.length + \"pontos\");\n\n }", "java.lang.String getCorrectAnswer();", "public void submitAnswers(View view) {\n\n // Question one\n // Get String given in the first EditText field and turn it into lower case\n EditText firstAnswerField = (EditText) findViewById(R.id.answer_one);\n Editable firstAnswerEditable = firstAnswerField.getText();\n String firstAnswer = firstAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the first EditText field is correct and if it is, add one\n // point\n if (firstAnswer.contains(\"baltic\")) {\n points++;\n }\n\n // Question two\n // Get String given in the second EditText field and turn it into lower case\n EditText secondAnswerField = (EditText) findViewById(R.id.answer_two);\n Editable secondAnswerEditable = secondAnswerField.getText();\n String secondAnswer = secondAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the second EditText field is correct and if it is, add one\n // point\n if (secondAnswer.contains(\"basketball\")) {\n points++;\n }\n\n // Question three\n // Check if the correct answer is given\n RadioButton thirdQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_3_radio_button_3);\n boolean isThirdQuestionCorrectAnswer = thirdQuestionCorrectAnswer.isChecked();\n // If the correct answer is given, add one point\n if (isThirdQuestionCorrectAnswer) {\n points++;\n }\n\n // Question four\n // Check if the correct answer is given\n RadioButton fourthQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_4_radio_button_2);\n boolean isFourthQuestionCorrectAnswer = fourthQuestionCorrectAnswer.isChecked();\n\n // If the correct answer is given, add one point\n if (isFourthQuestionCorrectAnswer) {\n points++;\n }\n\n // Question five\n // Find check boxes\n CheckBox fifthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_5_check_box_1);\n\n CheckBox fifthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_5_check_box_2);\n\n CheckBox fifthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_5_check_box_3);\n\n CheckBox fifthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_5_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n\n if (fifthQuestionCheckBoxThree.isChecked() && fifthQuestionCheckBoxFour.isChecked()\n && !fifthQuestionCheckBoxOne.isChecked() && !fifthQuestionCheckBoxTwo.isChecked()){\n points++;\n }\n\n // Question six\n // Find check boxes\n CheckBox sixthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_6_check_box_1);\n\n CheckBox sixthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_6_check_box_2);\n\n CheckBox sixthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_6_check_box_3);\n\n CheckBox sixthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_6_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n if (sixthQuestionCheckBoxOne.isChecked() && sixthQuestionCheckBoxTwo.isChecked()\n && sixthQuestionCheckBoxFour.isChecked() && !sixthQuestionCheckBoxThree.isChecked()){\n points++;\n }\n\n // If the user answers all questions correctly, show toast message with congratulations\n if (points == 6){\n Toast.makeText(this, \"Congratulations! You have earned 6 points.\" +\n \"\\n\" + \"It is the maximum number of points in this quiz.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // If the user does not answer all questions correctly, show users's points, total points\n // possible and advise to check answers\n else {\n Toast.makeText(this, \"Your points: \" + points + \"\\n\" + \"Total points possible: 6\" +\n \"\\n\" + \"Check your answers or spelling again.\", Toast.LENGTH_SHORT).show();\n }\n\n // Reset points to 0\n points = 0;\n }", "public IAnswer[] getAnswers();", "public int getAnswers() {\n return answers;\n }", "public void answer(Properties answers) {\n/* 56 */ setAnswer(answers);\n/* 57 */ QuestionParser.parseManageAllianceQuestion(this);\n/* */ }", "public void setSingleChoices() {\r\n Random randomGenerator = new Random();\r\n int singleAnswer = randomGenerator.nextInt(4);\r\n studentAnswer.add(singleAnswer); }", "public static Object[] question4(Student student1, Student student2)\r\n {\r\n \r\n int student1HighestGrade = 0;\r\n double student1total = 0;\r\n double student2total = 0;\r\n int student2HighestGrade = 0; \r\n double student1AverageGrade = 0;\r\n double student2AverageGrade = 0; \r\n Student bestAverageGradeStudent = student1;\r\n Student bestHighGradeStudent = student2; \r\n \r\n // Your code goes Here:\r\n for(int i = 0; i < 8; i++)\r\n {\r\n if(student1HighestGrade < student1.getExamScore(i))\r\n {\r\n \r\n student1HighestGrade = student1.getExamScore(i);\r\n }\r\n \r\n if(student2HighestGrade < student2.getExamScore(i))\r\n {\r\n student2HighestGrade = student2.getExamScore(i);\r\n }\r\n \r\n }\r\n if (bestHighGradeStudent == student2)\r\n {\r\n bestHighGradeStudent = student2;\r\n }\r\n else \r\n {\r\n bestAverageGradeStudent = student1;\r\n }\r\n \r\n \r\n \r\n \r\n for(int c = 0;c < 8; c++)\r\n {\r\n student1total += student1.getExamScore(c);\r\n }\r\n student1AverageGrade = student1total/8;\r\n \r\n for(int d = 0; d < 8; d++)\r\n {\r\n student2total += student2.getExamScore(d);\r\n }\r\n student2AverageGrade = student2total/8;\r\n \r\n \r\n \r\n \r\n // Necessary for Unit Test \r\n return new Object[] {student1HighestGrade, student2HighestGrade, student1AverageGrade, student2AverageGrade, bestHighGradeStudent, bestAverageGradeStudent}; \r\n }", "public static void sitExam(int stuId) {\n ExamService examService = new ExamServiceImpl();\n Scanner sc = new Scanner(System.in);\n\n int testId;\n while (true) {\n System.out.print(\"Please input the test ID: \");\n try {\n String input = sc.nextLine().trim();\n if (input.length() == 6) {\n testId = Integer.parseInt(input);\n break;\n }\n } catch (NumberFormatException ignored) {\n }\n System.out.println(\"The id should be 6 digits!\");\n }\n\n List<Question> allQuestion = examService.sitExam(stuId, testId);\n LoggerUtil.addLog(\"[Student \" + stuId + \"] take exam \" + testId);\n\n for (Question q : allQuestion) {\n if (isTimeUp(testId) == true) {\n System.out.println(\"Exam ended, please wait us upload your answer...\");\n AutoJudgeService autoJudgeService = new AutoJudgeServiceImpl();\n autoJudgeService.judgeAnExam(testId);\n break;\n }\n System.out.printf(\"QNo:%d Type:%s, Complsory:%s Score:%d \\n\", q.getqNo(), q.getType(), q.getCompulsory(),\n q.getScore());\n System.out.println(\"****************************************\");\n System.out.println(q.getqDescri());\n System.out.println(\"****************************************\");\n\n String answer;\n while (true) {\n System.out.printf(\"Input your answer(in one line): \");\n answer = sc.nextLine();\n\n boolean nextQustion = false;\n while (true) {\n System.out.println(\"Next question?(Y/N)\");\n String op = sc.nextLine().trim().toUpperCase();\n if (op.equals(\"Y\"))\n nextQustion = true;\n else if (!op.equals(\"N\"))\n continue;\n break;\n }\n if (nextQustion) {\n break;\n }\n }\n examService.answerAnQuestion(q, stuId, answer);\n }\n\n while (true) {\n System.out.println(\"You have answered all question, submit now?(Y/N)\");\n String op = sc.nextLine().trim().toUpperCase();\n if (op.equals(\"Y\")) {\n AutoJudgeService autoJudgeService = new AutoJudgeServiceImpl();\n autoJudgeService.judgeAnExam(testId);\n break;\n }\n }\n }", "public String checkNewQuestions() {\n\t\tint numAnswers = testGenerator.getNumAnswers(questionNo);\n\t\tString question = \"\";\n\n\t\tquestion += testGenerator.getQuestionText(questionNo);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 1);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 2);\n\n\t\tif(numAnswers >= 3) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 3);\n\t\t} \n\t\tif(numAnswers == 4) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 4);\n\t\t}\n\t\treturn question;\n\t}", "public static void displayQuestions() {\n System.out.println(\"1. Is your character male?\");\n System.out.println(\"2. Is your character female?\");\n System.out.println(\"3. Does your character have brown hair?\");\n System.out.println(\"4. Does your character have red hair?\");\n System.out.println(\"5. Does your character have blonde hair?\");\n System.out.println(\"6. Does your character have green eyes?\");\n System.out.println(\"7. Does your character have blue eyes?\");\n System.out.println(\"8. Does your character have brown eyes?\");\n System.out.println(\"9. Is your character wearing a green shirt?\");\n System.out.println(\"10. Is your character wearing a blue shirt?\");\n System.out.println(\"11. Is your character wearing a red shirt?\");\n }", "private void getCorrectAnswers() {\n\t\tfor(int i = 0; i < numberAmt; i++) {\n\t\t\tif(randomNumbers.get(i).equals(answers.get(i)))\n\t\t\t\tcorrectAnswers++;\n\t\t}\n\t}", "public java.util.List<java.lang.CharSequence> getAnswers() {\n return Answers;\n }", "public String printOutQuestion()\n\t{\n\t\tRandom rand = new Random();\n\t\tString[] answers = new String[4];\n\t\tString returnString;\n\t\tanswers[0] = answer;\n\t\tanswers[1] = falseAnswers[0];\n\t\tanswers[2] = falseAnswers[1];\n\t\tanswers[3] = falseAnswers[2];\n\t\tString firstAns = \"\", secondAns = \"\", thirdAns = \"\", fourthAns = \"\";\n\t\t\n\t\twhile(firstAns == secondAns || firstAns == thirdAns || firstAns == fourthAns || secondAns == thirdAns || secondAns == fourthAns || thirdAns == fourthAns)\n\t\t{\n\t\t\tfirstAns = answers[rand.nextInt(4)];\n\t\t//\tSystem.out.println(firstAns); Used for debugging\n\t\t\tsecondAns = answers[rand.nextInt(4)];\n\t\t//\tSystem.out.println(secondAns); Used for debugging\n\t\t\tthirdAns = answers[rand.nextInt(4)];\n\t\t//\tSystem.out.println(thirdAns); Used for debugging\n\t\t\tfourthAns = answers[rand.nextInt(4)];\n\t\t//\tSystem.out.println(fourthAns); Used for debugging\n\t\t}\n\t\t\n\t\tanswerA = firstAns;\n\t\tanswerB = secondAns;\n\t\tanswerC = thirdAns;\n\t\tanswerD = fourthAns;\n\t\t//System.out.println(questionString + \"Answer A: \" + firstAns + \"Answer B: \" + secondAns + \"Answer C: \" + thirdAns + \"Answer D: \" + fourthAns); Used for debugging\n\t\treturnString = questionString + \"?\"; \n\t\tSystem.out.println(\"Actual Answer is: \" + answer);\n\t\treturn returnString;\n\t}", "private void validateQuiz() {\n int score = 0;\n String answer1 = answerOne.getText().toString();\n int answer2 = answerTwo.getCheckedRadioButtonId();\n boolean answer3 = answerThreeOptionA.isChecked() && answerThreeOptionD.isChecked() && !answerThreeOptionB.isChecked() && !answerThreeOptionC.isChecked();\n String answer4 = answerFour.getText().toString();\n int answer5 = answerFive.getCheckedRadioButtonId();\n boolean answer6 = answerSixOptionA.isChecked() && answerSixOptionB.isChecked() && answerSixOptionD.isChecked() && !answerSixOptionC.isChecked();\n if (answer1.equalsIgnoreCase(getString(R.string.answerOne))) {\n score++;\n }\n if (answer2 == answerTwoOptionA.getId()) {\n score++;\n }\n if (answer3) {\n score++;\n }\n if (answer4.equalsIgnoreCase(getString(R.string.answerFour))) {\n score++;\n }\n if (answer5 == answerFiveOptionD.getId()) {\n score++;\n }\n if (answer6) {\n score++;\n }\n String result = getString(R.string.result, score, questionList.size());\n Toast.makeText(this, result, Toast.LENGTH_SHORT).show();\n }", "public MultipleAnswerQuestion(String question ,boolean isSingleAnswered)\r\n {\r\n super(question,isSingleAnswered);\r\n this.answers = new ArrayList<>(); //Initializing the HashSet\r\n }", "private void setFAQs () {\n\n QuestionDataModel question1 = new QuestionDataModel(\n \"What is Psychiatry?\", \"Psychiatry deals with more extreme mental disorders such as Schizophrenia, where a chemical imbalance plays into an individual’s mental disorder. Issues coming from the “inside” to “out”\\n\");\n QuestionDataModel question2 = new QuestionDataModel(\n \"What Treatments Do Psychiatrists Use?\", \"Psychiatrists use a variety of treatments – including various forms of psychotherapy, medications, psychosocial interventions, and other treatments (such as electroconvulsive therapy or ECT), depending on the needs of each patient.\");\n QuestionDataModel question3 = new QuestionDataModel(\n \"What is the difference between psychiatrists and psychologists?\", \"A psychiatrist is a medical doctor (completed medical school and residency) with special training in psychiatry. A psychologist usually has an advanced degree, most commonly in clinical psychology, and often has extensive training in research or clinical practice.\");\n QuestionDataModel question4 = new QuestionDataModel(\n \"What is Psychology ?\", \"Psychology is the scientific study of the mind and behavior, according to the American Psychological Association. Psychology is a multifaceted discipline and includes many sub-fields of study such areas as human development, sports, health, clinical, social behavior, and cognitive processes.\");\n QuestionDataModel question5 = new QuestionDataModel(\n \"What is psychologists goal?\", \"Those with issues coming from the “outside” “in” (i.e. lost job and partner so feeling depressed) are better suited with psychologists, they offer guiding you into alternative and healthier perspectives in tackling daily life during ‘talk therapy’\");\n QuestionDataModel question6 = new QuestionDataModel(\n \"What is the difference between psychiatrists and psychologists?\", \"Psychiatrists can prescribe and psychologists cannot, they may be able to build a report and suggest medications to a psychiatrist but it is the psychiatrist that has the final say.\");\n QuestionDataModel question7 = new QuestionDataModel(\n \"What is a behavioural therapist?\", \"A behavioural therapist such as an ABA (“Applied Behavioural Analysis”) therapist or an occupational therapist focuses not on the psychological but rather the behavioural aspects of an issue. In a sense, it can be considered a “band-aid” fix, however, it has consistently shown to be an extremely effective method in turning maladaptive behaviours with adaptive behaviours.\");\n QuestionDataModel question8 = new QuestionDataModel(\n \"Why behavioral therapy?\", \"Cognitive-behavioral therapy is used to treat a wide range of issues. It's often the preferred type of psychotherapy because it can quickly help you identify and cope with specific challenges. It generally requires fewer sessions than other types of therapy and is done in a structured way.\");\n QuestionDataModel question9 = new QuestionDataModel(\n \"Is behavioral therapy beneficial?\", \"Psychiatrists can prescribe and psychologists cannot, they may be able to build a report and suggest medications to a psychiatrist but it is the psychiatrist that has the final say.\");\n QuestionDataModel question10 = new QuestionDataModel(\n \"What is alternative therapy?\", \"Complementary and alternative therapies typically take a holistic approach to your physical and mental health.\");\n QuestionDataModel question11 = new QuestionDataModel(\n \"Can they treat mental health problems?\", \"Complementary and alternative therapies can be used as a treatment for both physical and mental health problems. The particular problems that they can help will depend on the specific therapy that you are interested in, but many can help to reduce feelings of depression and anxiety. Some people also find they can help with sleep problems, relaxation, and feelings of stress.\");\n QuestionDataModel question12 = new QuestionDataModel(\n \"What else should I consider before starting therapy?\", \"Only you can decide whether a type of treatment feels right for you, But it might help you to think about: What do I want to get out of it? Could this therapy be adapted to meet my needs?\");\n\n ArrayList<QuestionDataModel> faqs1 = new ArrayList<>();\n ArrayList<QuestionDataModel> faqs2 = new ArrayList<>();\n ArrayList<QuestionDataModel> faqs3 = new ArrayList<>();\n ArrayList<QuestionDataModel> faqs4 = new ArrayList<>();\n faqs1.add(question1);\n faqs1.add(question2);\n faqs1.add(question3);\n faqs2.add(question4);\n faqs2.add(question5);\n faqs2.add(question6);\n faqs3.add(question7);\n faqs3.add(question8);\n faqs3.add(question9);\n faqs4.add(question10);\n faqs4.add(question11);\n faqs4.add(question12);\n\n\n CategoryDataModel category1 = new CategoryDataModel(R.drawable.psychaitry,\n \"Psychiatry\",\n \"Psychiatry is the medical specialty devoted to the diagnosis, prevention, and treatment of mental disorders.\",\n R.drawable.psychiatry_q);\n\n CategoryDataModel category2 = new CategoryDataModel(R.drawable.psychology,\n \"Psychology\",\n \"Psychology is the science of behavior and mind which includes the study of conscious and unconscious phenomena.\",\n R.drawable.psychology_q);\n\n CategoryDataModel category3 = new CategoryDataModel(R.drawable.behavioral_therapy,\n \"Behavioral Therapy\",\n \"Behavior therapy is a broad term referring to clinical psychotherapy that uses techniques derived from behaviorism\",\n R.drawable.behaviour_therapy_q);\n CategoryDataModel category4 = new CategoryDataModel(R.drawable.alternative_healing,\n \"Alternative Therapy\",\n \"Complementary and alternative therapies typically take a holistic approach to your physical and mental health.\",\n R.drawable.alternative_therapy_q);\n\n String FAQ1 = \"What is Psychiatry?\";\n String FAQ2 = \"What is Psychology?\";\n String FAQ3 = \"What is Behavioral Therapy?\";\n String FAQ4 = \"What is Alternative Therapy?\";\n String FAQ5 = \"Report a problem\";\n\n FAQsDataModel FAQsDataModel1 = new FAQsDataModel(FAQ1, category1,faqs1);\n FAQsDataModel FAQsDataModel2 = new FAQsDataModel(FAQ2, category2,faqs2);\n FAQsDataModel FAQsDataModel3 = new FAQsDataModel(FAQ3, category3,faqs3);\n FAQsDataModel FAQsDataModel4 = new FAQsDataModel(FAQ4, category4,faqs4);\n FAQsDataModel FAQsDataModel5 = new FAQsDataModel(FAQ5, category4,faqs4);\n\n\n\n if (mFAQs.isEmpty()) {\n\n mFAQs.add(FAQsDataModel1);\n mFAQs.add(FAQsDataModel2);\n mFAQs.add(FAQsDataModel3);\n mFAQs.add(FAQsDataModel4);\n mFAQs.add(FAQsDataModel5);\n\n\n }\n }", "public void submitAnswers(View view) {\n\n //Initializing the correct answers in RadioGroups\n questionOneAnswerThree = findViewById(R.id.questionOneAnswerThreeButton);\n questionTwoAnswerFour = findViewById(R.id.questionTwoAnswerFourButton);\n questionThreeAnswerOne = findViewById(R.id.questionThreeAnswerOneButton);\n questionFourAnswerTwo = findViewById(R.id.questionFourAnswerTwoButton);\n questionFiveAnswerFour = findViewById(R.id.questionFiveAnswerFourButton);\n questionSixAnswerTwo = findViewById(R.id.questionSixAnswerTwoButton);\n questionSevenAnswerOne = findViewById(R.id.questionSevenAnswerOneButton);\n\n //Calculating score questions 1-7\n if (questionOneAnswerThree.isChecked()) {\n score++;\n }\n\n if (questionTwoAnswerFour.isChecked()) {\n score++;\n }\n\n if (questionThreeAnswerOne.isChecked()) {\n score++;\n }\n\n if (questionFourAnswerTwo.isChecked()) {\n score++;\n }\n\n if (questionFiveAnswerFour.isChecked()) {\n score++;\n }\n\n if (questionSixAnswerTwo.isChecked()) {\n score++;\n }\n\n if (questionSevenAnswerOne.isChecked()) {\n score++;\n }\n\n // +1 for correct answer\n if (questionEightAnswer.getText().toString().equals(\"1999\")) {\n score++;\n }\n\n //Calculating score if 3 correct answers are checked and 1 incorrect answer is unchecked\n if (questionNineAnswerOne.isChecked() && questionNineAnswerTwo.isChecked() && !questionNineAnswerThree.isChecked() && questionNineAnswerFour.isChecked()) {\n score++;\n }\n\n if (!questionTenAnswerOne.isChecked() && questionTenAnswerTwo.isChecked() && questionTenAnswerThree.isChecked() && questionTenAnswerFour.isChecked()) {\n score++;\n }\n\n //Toast message with score\n Toast.makeText(this, \"Your score: \" + score + \" out of 10 correct!\", Toast.LENGTH_LONG).show();\n\n score = 0;\n }", "@Test\n public void testGetAnswersByQuestion(){\n Survey survey = createSurvey();\n Question question = createQuestion(survey);\n Answer answer = createAnswer(question);\n\n long testQuestionId = question.getId();\n List<Answer> testAnswers = answerDAO.getAnswersByQuestion(testQuestionId);\n // hiç cevap gelebiliyor mu kontrol, en az 1 cevap yukarda verdik çünkü.\n Assert.assertTrue(testAnswers != null && testAnswers.size() >= 1);\n }", "public java.util.List<java.lang.CharSequence> getAnswers() {\n return Answers;\n }", "public void showQuestion() {\n\n // Variable to store the total questions in out question Array\n int totalQuestions = questions.length;\n\n // Variables to refer to textview in XML to show total number of questions\n TextView questionTotalTextView = findViewById(R.id.question_number_text_view);\n\n // Variables to refer to textview in XML to show question\n TextView questionTextView = findViewById(R.id.question_text_view);\n\n //Variable to refer to textview in XML to show score\n TextView scoreTextView = findViewById(R.id.score_text_view);\n\n // Initialize buttons to refer to answer button in XML\n answer1Button = (Button) findViewById(R.id.answer1_button);\n answer2Button = (Button) findViewById(R.id.answer2_button);\n answer3Button = (Button) findViewById(R.id.answer3_button);\n answer4Button = (Button) findViewById(R.id.answer4_button);\n\n // Condtion to check if the current question number on screen is less then total number of questions\n if (currentQuestionNumber < (totalQuestions)) {\n\n // Set the current question number and total number of questions on screen\n questionTotalTextView.setText(String.valueOf(currentQuestionNumber + 1) + \"/\" + String.valueOf(totalQuestions));\n\n // Set the current question on question textview in XML\n questionTextView.setText(questions[currentQuestionNumber]);\n\n // Set the score in score textview in XML\n\n scoreTextView.setText(String.valueOf(\"Score:\" + score));\n\n // Set the answers for the current question to answer buttons in XML\n answer1Button.setText(answers[currentQuestionNumber][0]);\n answer2Button.setText(answers[currentQuestionNumber][1]);\n answer3Button.setText(answers[currentQuestionNumber][2]);\n answer4Button.setText(answers[currentQuestionNumber][3]);\n\n\n } else {\n // If the last uestion has been answered i.e current question is equal to total questions then mark the quiz complete\n quizComplete = true;\n }\n\n // Check if the quiz is completed and show the summary to the user\n if (quizComplete) {\n\n totalIncorrectAnswers = totalQuestions - (totalCorrectAnswers + totalNotAttemptedAnswers);\n callAlertDialog(totalQuestions);\n\n }\n\n }", "public void setQuestion(){\n\n\n triggerReport(); //Check if max questions are displayed, if yes then show report\n\n MyDatabase db = new MyDatabase(QuizCorner.this);\n Cursor words = db.getQuizQuestion();\n TextView question_text = (TextView) findViewById(R.id.question_text);\n RadioButton rb;\n resetOptions();\n disableCheck();\n enableRadioButtons();\n hideAnswer();\n words.moveToFirst();\n word = words.getString(words.getColumnIndex(\"word\"));\n correct_answer = words.getString(words.getColumnIndex(\"meaning\"));\n question_text.setText(word + \" means:\");\n for (int i = 0; i < 4; i++){\n answers[i] = words.getString(words.getColumnIndex(\"meaning\"));\n words.moveToNext();\n }\n answers = randomizeArray(answers);\n for (int i = 0; i < 4; i++){\n rb = (RadioButton) findViewById(options[i]);\n rb.setText(answers[i]);\n }\n question_displayed_count++;\n }", "private void fillQuestionsTable() {\n Question q1 = new Question(\"Who is NOT a Master on the Jedi council?\", \"Anakin Skywalker\", \"Obi Wan Kenobi\", \"Mace Windu\", \"Yoda\", 1);\n Question q2 = new Question(\"Who was Anakin Skywalker's padawan?\", \"Kit Fisto\", \"Ashoka Tano\", \"Barris Ofee\", \"Jacen Solo\",2);\n Question q3 = new Question(\"What Separatist leader liked to make find additions to his collection?\", \"Pong Krell\", \"Count Dooku\", \"General Grevious\", \"Darth Bane\", 3);\n Question q4 = new Question(\"Choose the correct Response:\\n Hello There!\", \"General Kenobi!\", \"You are a bold one!\", \"You never should have come here!\", \"You turned her against me!\", 1);\n Question q5 = new Question(\"What ancient combat technique did Master Obi Wan Kenobi use to his advantage throughout the Clone Wars?\", \"Kendo arts\", \"The High ground\", \"Lightsaber Form VIII\", \"Force healing\", 2);\n Question q6 = new Question(\"What was the only surviving member of Domino squad?\", \"Fives\", \"Heavy\", \"Echo\", \"Jesse\", 3);\n Question q7 = new Question(\"What Jedi brutally murdered children as a part of his descent to become a Sith?\", \"Quinlan Vos\", \"Plo Koon\", \"Kit Fisto\", \"Anakin Skywalker\", 4);\n Question q8 = new Question(\"What Sith was the first to reveal himself to the Jedi after a millenia and was subsquently cut in half shortly after?\", \"Darth Plagieus\", \"Darth Maul\", \"Darth Bane\", \"Darth Cadeus\", 2);\n Question q9 = new Question(\"What 4 armed creature operates a diner on the upper levels of Coruscant?\", \"Dexter Jettster\", \"Cad Bane\", \"Aurua Sing\", \"Dorme Amidala\", 1);\n Question q10 = new Question(\"What ruler fell in love with an underage boy and subsequently married him once he became a Jedi?\", \"Aurua Sing\", \"Duttchess Satine\", \"Mara Jade\", \"Padme Amidala\", 4);\n\n // adds them to the list\n addQuestion(q1);\n addQuestion(q2);\n addQuestion(q3);\n addQuestion(q4);\n addQuestion(q5);\n addQuestion(q6);\n addQuestion(q7);\n addQuestion(q8);\n addQuestion(q9);\n addQuestion(q10);\n }", "private void addQuestion() {\n Question q = new Question(\n \"¿Quien propuso la prueba del camino básico ?\", \"Tom McCabe\", \"Tom Robert\", \"Tom Charlie\", \"Tom McCabe\");\n this.addQuestion(q);\n\n\n Question q1 = new Question(\"¿Qué es una prueba de Caja negra y que errores desean encontrar en las categorías?\", \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\", \"esta basada en la funcionalidad de los módulos del programa\", \" determina la funcionalidad del sistema\", \" determina la funcionalidad del sistema\");\n this.addQuestion(q1);\n Question q2 = new Question(\"¿Qué es la complejidad ciclomática es una métrica de calidad software?\", \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\", \"esta basada en la funcionalidad de los módulos del programa\", \"basada en el cálculo del número\", \"basada en el cálculo del número\");\n this.addQuestion(q2);\n //preguntas del quiz II\n Question q3=new Question(\"Las pruebas de caja blanca buscan revisar los caminos, condiciones, \" +\n \"particiones de control y datos, de las funciones o módulos del sistema; \" +\n \"para lo cual el grupo de diseño de pruebas debe:\",\n \"Conformar un grupo de personas para que use el sistema nuevo\",\n \"Ejecutar sistema nuevo con los datos usados en el sistema actual\",\n \"Generar registro de datos que ejecute al menos una vez cada instrucción\",\n \"Generar registro de datos que ejecute al menos una vez cada instrucción\");\n this.addQuestion(q3);\n Question q4=new Question(\"¿Las pruebas unitarias son llamadas?\",\n \"Pruebas del camino\", \"Pruebas modulares\",\n \"Pruebas de complejidad\", \"Pruebas modulares\");\n this.addQuestion(q4);\n Question q5=new Question(\"¿Qué es una prueba de camino básico?\",\n \"Hace una cobertura de declaraciones del código\",\n \"Permite determinar si un modulo esta listo\",\n \"Técnica de pueba de caja blanca\",\n \"Técnica de pueba de caja blanca\" );\n this.addQuestion(q5);\n Question q6=new Question(\"Prueba de camino es propuesta:\", \"Tom McCabe\", \"McCall \", \"Pressman\",\n \"Tom McCabe\");\n this.addQuestion(q6);\n Question q7=new Question(\"¿Qué es complejidad ciclomatica?\",\"Grafo de flujo\",\"Programming\",\n \"Metrica\",\"Metrica\");\n this.addQuestion(q7);\n //preguntas del quiz III\n Question q8 = new Question(\n \"¿Se le llama prueba de regresión?\", \"Se tienen que hacer nuevas pruebas donde se han probado antes\",\n \"Manten informes detallados de las pruebas\", \"Selección de los usuarios que van a realizar las pruebas\",\n \"Se tienen que hacer nuevas pruebas donde se han probado antes\");\n this.addQuestion(q8);\n Question q9 = new Question(\"¿Cómo se realizan las pruebas de regresión?\",\n \"Selección de los usuarios que van a realizar las pruebas\",\n \"Se tienen que hacer nuevas pruebas donde se han probado antes\", \"A través de herramientas de automatización de pruebas\", \"A través de herramientas de automatización de pruebas\");\n this.addQuestion(q9);\n Question q10 = new Question(\"¿Cuándo ya hay falta de tiempo para ejecutar casos de prueba ya ejecutadas se dejan?\",\n \"En primer plano\", \"En segundo plano\", \"En tercer plano\", \"En segundo plano\");\n this.addQuestion(q10);\n //preguntas del quiz IV\n Question q11 = new Question(\n \"¿En qué se enfocan las pruebas funcionales?\",\n \"Enfocarse en los requisitos funcionales\", \"Enfocarse en los requisitos no funcionales\",\n \"Verificar la apropiada aceptación de datos\", \"Enfocarse en los requisitos funcionales\");\n this.addQuestion(q11);\n Question q12 = new Question(\"Las metas de estas pruebas son:\", \"Verificar la apropiada aceptación de datos\",\n \"Verificar el procesamiento\", \"Verificar la apropiada aceptación de datos, procedimiento y recuperación\",\n \"Verificar la apropiada aceptación de datos, procedimiento y recuperación\");\n this.addQuestion(q12);\n Question q13 = new Question(\"¿En qué estan basadas este tipo de pruebas?\",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Esta basada en la funcionalidad de los módulos del programa\",\n \"Técnicas de cajas negra\", \"Técnicas de cajas negra\");\n this.addQuestion(q13);\n //preguntas del quiz V\n Question q14 = new Question(\n \"¿Cúal es el objetivo de esta técnica?\", \"Identificar errores introducidos por la combinación de programas probados unitariamente\",\n \"Decide qué acciones tomar cuando se descubren problemas\",\n \"Verificar que las interfaces entre las componentes de software funcionan correctamente\",\n \"Identificar errores introducidos por la combinación de programas probados unitariamente\");\n this.addQuestion(q14);\n Question q15 = new Question(\"¿Cúal es la descripción de la Prueba?\",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Esta basada en la funcionalidad de los módulos del programa\",\n \"Describe cómo verificar que las interfaces entre las componentes de software funcionan correctamente\",\n \"Describe cómo verificar que las interfaces entre las componentes de software funcionan correctamente\");\n this.addQuestion(q15);\n Question q16 = new Question(\"Por cada caso de prueba ejecutado:\",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Esta basada en la funcionalidad de los módulos del programa\",\n \"Comparar el resultado esperado con el resultado obtenido\", \"Comparar el resultado esperado con el resultado obtenido\");\n this.addQuestion(q16);\n //preguntas del quiz VI\n Question q17 = new Question(\n \"Este tipo de pruebas sirven para garantizar que la calidad del código es realmente óptima:\",\n \"Pruebas Unitarias\", \"Pruebas de Calidad de Código\",\n \"Pruebas de Regresión\", \"Pruebas de Calidad de Código\");\n this.addQuestion(q17);\n Question q18 = new Question(\"Pruebas de Calidad de código sirven para: \",\n \"Hace una cobertura de declaraciones del código, ramas, caminos y condiciones\",\n \"Verificar que las especificaciones de diseño sean alcanzadas\",\n \"Garantizar la probabilidad de tener errores o bugs en la codificación\", \"Garantizar la probabilidad de tener errores o bugs en la codificación\");\n this.addQuestion(q18);\n Question q19 = new Question(\"Este análisis nos indica el porcentaje que nuestro código desarrollado ha sido probado por las pruebas unitarias\",\n \"Cobertura\", \"Focalización\", \"Regresión\", \"Cobertura\");\n this.addQuestion(q19);\n\n Question q20 = new Question( \"¿Qué significa V(G)?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos\", \"Número de Regiones\");\n this.addQuestion(q20);\n\n Question q21 = new Question( \"¿Qué significa A?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos\", \"Número de Aristas\");\n this.addQuestion(q21);\n\n Question q22 = new Question( \"¿Qué significa N?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos\", \"Número de Nodos\");\n this.addQuestion(q22);\n\n Question q23 = new Question( \"¿Qué significa P?\",\n \"Número de Regiones\", \"Número de Aristas\", \"Número de Nodos Predicado\", \"Número de Nodos Predicado\");\n this.addQuestion(q23);\n Question q24 = new Question( \"De cuantás formas se puede calcular la complejidad ciclomatica V(G):\",\n \"3\", \"1\", \"2\", \"3\");\n this.addQuestion(q24);\n\n // END\n }", "@Override\n public String ask(String question) {\n return answers[position++];\n }", "public void setQuestions() {\n\t\tString question1 = str1 + _QwdQuestionFst;\n\t\tSpannableString sb1 = new SpannableString(question1);\n\t\tsb1.setSpan(new ForegroundColorSpan(Color.BLACK), str1.length() ,\n\t\t\t\tsb1.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE);\n\t\t_FPTV_Question_1.setText(sb1);\n\n\t\tString question2 = str2 + _QwdQuestionSec;\n\t\tSpannableString sb2 = new SpannableString(question2);\n\t\tsb2.setSpan(new ForegroundColorSpan(Color.BLACK), str2.length() ,\n\t\t\t\tsb2.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE);\n\t\t_FPTV_Question_2.setText(sb2);\n\t}", "public List<Integer> getCorrectAnswers() {\n return correctAnswers;\n }", "double scoreAnswer(Question question, Answer answer);", "public static void main(){\n \n \n String question = \"There are 10 types of people in this world, those who understand binary and those who don't.\";\n String answer = \"true\";\n \n Question tfQuest = new Question (question, answer);\n tfQuest.getAnswer();\n \n }", "int getWrongAnswers();", "public void setAnswers(int answers) {\n this.answers = answers;\n }", "public void checkAnswer(){\n int selectedRadioButtonId = radioTermGroup.getCheckedRadioButtonId();\n\n // find the radiobutton by returned id\n RadioButton radioSelected = findViewById(selectedRadioButtonId);\n\n String term = radioSelected.getText().toString();\n String definition = tvDefinition.getText().toString();\n\n if (Objects.equals(termsAndDefinitionsHashMap.get(term), definition)) {\n correctAnswers += 1;\n Toast.makeText(ActivityQuiz.this, \"Correct\", Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(ActivityQuiz.this, \"Incorrect\", Toast.LENGTH_SHORT).show();\n }\n\n tvCorrectAnswer.setText(String.format(\"%s\", correctAnswers));\n }", "public void checkAnswers(View view){\n int result = 0;\n\n if (checkRadioButtonAnswer(R.id.first_answer, R.id.first_answer3)){\n result = result + 1;\n }\n\n if (checkTextViewAnswer(R.id.second_answer, \"lions\")){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.third_answer, R.id.third_answer1)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.fourth_answer, R.id.fourth_answer3)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.fifth_answer, R.id.fifth_answer3)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.sixth_answer, R.id.sixth_answer2)){\n result = result + 1;\n }\n\n if (checkCheckBoxAnswer(R.id.seventh_answer1, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer2, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer3, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer4, false)){\n result = result + 1;\n }\n\n /**\n * A toast message is shown which represents the scored points out of the total 7.\n */\n Toast.makeText(this, \"Result: \" + Integer.toString(result) + \"/7\", Toast.LENGTH_SHORT).show();\n }", "public int getAnsweredQuestions(int index){\n\t\treturn _answeredQuestions[index];\n\n\t}", "private void evaluateQuestions() {\n RadioGroup groupTwo = findViewById(R.id.radioGroupQ2);\n int groupTwoId = groupTwo.getCheckedRadioButtonId();\n\n // Get the ID of radio group 6 to ascertain if a radio button has been ticked\n RadioGroup groupSix = findViewById(R.id.radioGroupQ6);\n int groupSixId = groupSix.getCheckedRadioButtonId();\n\n // Get the ID of radio group 7 to ascertain if a radio button has been ticked\n RadioGroup groupSeven = findViewById(R.id.radioGroupQ7);\n int groupSevenId = groupSeven.getCheckedRadioButtonId();\n\n // Taking in the vale of any question that has been checked in question 3 and storing it\n CheckBox question3Option1 = findViewById(R.id.question_three_option1);\n boolean stateOfQuestion3_option1 = question3Option1.isChecked();\n CheckBox question3Option2 = findViewById(R.id.question_three_option2);\n boolean stateOfQuestion3Option2 = question3Option2.isChecked();\n CheckBox question3Option3 = findViewById(R.id.question_three_option3);\n boolean stateOfQuestion3Option3 = question3Option3.isChecked();\n CheckBox question3Option4 = findViewById(R.id.question_three_option4);\n boolean stateOfQuestion3Option4 = question3Option4.isChecked();\n\n // Taking in the value of any question that has been checked in question 4 and storing it\n CheckBox question4Option1 = findViewById(R.id.question_four_option1);\n boolean stateOfQuestion4Option1 = question4Option1.isChecked();\n CheckBox question4Option2 = findViewById(R.id.question_four_option2);\n boolean stateOfQuestion4Option2 = question4Option2.isChecked();\n CheckBox question4Option3 = findViewById(R.id.question_four_option3);\n boolean stateOfQuestion4Option3 = question4Option3.isChecked();\n CheckBox question4Option4 = findViewById(R.id.question_four_option4);\n boolean stateOfQuestion4Option4 = question4Option4.isChecked();\n\n // Taking in the vale of any question that has been checked in question 8 and storing it\n CheckBox question8Option1 = findViewById(R.id.question_eight_option1);\n boolean stateOfQuestion8Option1 = question8Option1.isChecked();\n CheckBox question8Option2 = findViewById(R.id.question_eight_option2);\n boolean stateOfQuestion8Option2 = question8Option2.isChecked();\n CheckBox question8Option3 = findViewById(R.id.question_eight_option3);\n boolean stateOfQuestion8Option3 = question8Option3.isChecked();\n CheckBox question8Option4 = findViewById(R.id.question_eight_option4);\n boolean stateOfQuestion8Option4 = question8Option4.isChecked();\n\n // Getting all EditText fields\n\n EditText questText1 = findViewById(R.id.question_one_field);\n String question1 = questText1.getText().toString();\n\n\n EditText questText5 = findViewById(R.id.question_five_field);\n String question5 = questText5.getText().toString();\n\n EditText questText9 = findViewById(R.id.question_nine_field);\n String question9 = questText9.getText().toString();\n\n // Variable parameters for calculateRadiobutton method\n\n RadioButton quest2_opt3 = findViewById(R.id.question_two_option3);\n boolean question2_option3 = quest2_opt3.isChecked();\n\n RadioButton quest6_opt1 = findViewById(R.id.question_six_option2);\n boolean question6_option2= quest6_opt1.isChecked();\n\n RadioButton quest7_opt1 = findViewById(R.id.question_seven_option1);\n boolean question7_option1 = quest7_opt1.isChecked();\n\n // Store all checked parameter to ascertain that at least one option was ticked in\n // question 3\n boolean question3 = stateOfQuestion3_option1 || stateOfQuestion3Option2 ||\n stateOfQuestion3Option3 || stateOfQuestion3Option4;\n\n\n // Store all checked parameter to ascertain that at least one option was ticked in\n // question 4\n boolean question4 = stateOfQuestion4Option1 || stateOfQuestion4Option2 || stateOfQuestion4Option3 ||\n stateOfQuestion4Option4;\n\n\n // Store all checked parameter to ascertain that at least one option was ticked in\n // question 8\n boolean question8 = stateOfQuestion8Option1 || stateOfQuestion8Option2 ||\n stateOfQuestion8Option3 || stateOfQuestion8Option4;\n\n // if no radio button has been checked in radio group 2 after submit button has been clicked\n if ( groupTwoId == -1) {\n Toast.makeText(this, \"Please pick an answer in question 2\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no radio button has been clicked in radio group 6 after submit button has been clicked\n else if (groupSixId == -1) {\n Toast.makeText(this, \"Please pick an answer to question 6\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no radio button has been clicked in radio group 7 after submit button has been clicked\n else if (groupSevenId == -1) {\n Toast.makeText(this, \"Please pick an answer to question 7\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no checkbox was clicked in question 3 after submit button has been clicked\n else if (!question3) {\n Toast.makeText(this, \"Please select an answer to question 3\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no checkbox was clicked in question 4 after submit button has been clicked\n else if (!question4) {\n Toast.makeText(this, \"Please select an answer to question 4\",\n Toast.LENGTH_SHORT).show();\n\n }\n\n // if no checkbox was clicked in question 8 after submit button has been clicked\n else if (!question8) {\n Toast.makeText(this, \"Please select an answer to question 8\",\n Toast.LENGTH_SHORT).show();\n }\n\n // check if the questions has been answered without hitting the reset button\n else if (checkSubmit > 0) {\n Toast.makeText(this, \"Press the reset button\",\n Toast.LENGTH_SHORT).show();\n } else {\n //Add one to checkSubmit variable to avoid the score from being recalculated and added to\n // the previous score if the submit button was pressed more than once.\n checkSubmit += 1;\n\n // calculate all checkboxes by calling calculateCheckboxes method\n calculateScoreForCheckBoxes( stateOfQuestion3_option1, stateOfQuestion3Option3,stateOfQuestion3Option4,\n stateOfQuestion4Option1, stateOfQuestion4Option2, stateOfQuestion4Option4,\n stateOfQuestion8Option1, stateOfQuestion8Option3);\n\n // calculate all radio buttons by calling calculateRadioButtons method\n calculateScoreForRadioButtons(question2_option3, question6_option2, question7_option1);\n\n // calculate all Text inputs by calling editTextAnswers method\n calculateScoreForEditTextAnswers(question1,question5, question9);\n\n displayScore(score);\n\n String grade;\n\n if (score < 10) {\n grade = \"Meh...\";\n } else if (score >=10 && score <=14) {\n grade = \"Average\";\n } else if ((score >= 15) && (19 >= score)) {\n grade = \"Impressive!\";\n } else {\n grade = \"Excellent!\";\n }\n\n // Display a toast message to show total score\n Toast.makeText(this, grade + \" your score is \" + score + \"\",\n Toast.LENGTH_SHORT).show();\n }\n }", "public List<Answer> getAnswers(Question question) throws Exception {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n List<Answer> answers = dbb.getAnswers(question);\n dbb.commit();\n dbb.closeConnection();\n return answers;\n }", "public void submitAnswer(String question, ArrayList<Integer> choices) {\r\n Question currentQuestion = new Question(question, choices);\r\n\r\n // 6 options, multiple answers\r\n if (currentQuestion.getSize() == 6) {\r\n setMultChoices();\r\n System.out.println(studentID + \" : \" + studentAnswer);\r\n }\r\n // 4 options, only accept single answer\r\n else if (currentQuestion.getSize() == 4){\r\n setSingleChoices();\r\n System.out.println(studentID + \" : \" + studentAnswer);\r\n }\r\n // 2 options, either true or false answer\r\n else {\r\n setTFChoices();\r\n System.out.println(studentID + \" : \" + studentAnswer);\r\n }\r\n\r\n // jump to changeAnswers to check if student wants to change answer\r\n changeAnswers(question, choices);\r\n }", "private boolean isCorrectAnswer(ArrayList<Character> studentAnswers){\n\t\tArrayList<Character> correctAnswers = q.getCorrectAnswers();\n\t\tif(correctAnswers.size() != studentAnswers.size()){\n\t\t\treturn false;\n\t\t}\n\t\tfor(Character c: studentAnswers){\n\t\t\tif(!correctAnswers.contains(c)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public Set<Answer> getAnswers() {\n // TODO implement here\n return null;\n }", "@Override\n\t@Transactional\n\tpublic List<String> getRightAnswers(Question question) {\n\t\tList<String> answers = new ArrayList<String>();\n\t\tList<Option> options = question.getQuestion().getOptions();\n\t\tfor (Option option : options) {\n\t\t\tif (option.getIsCorrect()) {\n\t\t\t\tanswers.add(option.getValue());\n\t\t\t}\n\n\t\t}\n\t\treturn options.isEmpty() ? null : answers;\n\t}", "@FXML\n\tprivate void answerQuestion() {\n\t\tint correctAnsID = 0;\n\t\ttry {\n\t\t\tswitch (((RadioButton) answerGroup.getSelectedToggle()).getId()) {\n\t\t\tcase \"ans1Check\":\n\t\t\t\tcorrectAnsID = 1;\n\t\t\t\tbreak;\n\t\t\tcase \"ans2Check\":\n\t\t\t\tcorrectAnsID = 2;\n\t\t\t\tbreak;\n\t\t\tcase \"ans3Check\":\n\t\t\t\tcorrectAnsID = 3;\n\t\t\t\tbreak;\n\t\t\tcase \"ans4Check\":\n\t\t\t\tcorrectAnsID = 4;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\terrorLabel.setVisible(true);\n\t\t}\n\n\t\t// nothing is selected\n\t\tif (correctAnsID == 0) { \n\t\t\terrorLabel.setVisible(true);\n\t\t\t// correct answer\n\t\t} else if (question.getCorrect_ans() == correctAnsID) {\n\t\t\tcontrol.setScore(control.getScore() + question.getScore());\n\t\t\thandleAlertAndWindow(AlertType.INFORMATION, \"Congrats! :D\",\n\t\t\t\t\t\"You received \" + question.getScore() + \" points\");\n\t\t\t// wrong answer\n\t\t} else {\n\t\t\tcontrol.setScore(control.getScore() + question.getPenalty());\n\n\t\t\thandleAlertAndWindow(AlertType.ERROR, \"Uh oh! :(\",\n\t\t\t\t\t\"You lost \" + question.getPenalty() + \" points\");\n\t\t}\n\n\t\t// reset the eaten question\n\t\tViewLogic.playGameController.getControl().setQuestionEaten(null);\n\t}", "private String getUserAnswer() {\n CheckBox checkBox1 = (CheckBox) findViewById(R.id.checkbox_1);\n CheckBox checkBox2 = (CheckBox) findViewById(R.id.checkbox_2);\n CheckBox checkBox3 = (CheckBox) findViewById(R.id.checkbox_3);\n CheckBox checkBox4 = (CheckBox) findViewById(R.id.checkbox_4);\n EditText inputText = (EditText) findViewById(R.id.input_text);\n RadioButton radioButtonA = (RadioButton) findViewById(R.id.radio_button_A);\n RadioButton radioButtonB = (RadioButton) findViewById(R.id.radio_button_B);\n RadioButton radioButtonC = (RadioButton) findViewById(R.id.radio_Button_C);\n RadioButton radioButtonD = (RadioButton) findViewById(R.id.radio_Button_D);\n\n if (radioButtonA.isChecked())\n userAnswer[currentQueNum - 1] = radioButtonA.getText().toString();\n else if (radioButtonB.isChecked())\n userAnswer[currentQueNum - 1] = radioButtonB.getText().toString();\n else if (radioButtonC.isChecked())\n userAnswer[currentQueNum - 1] = radioButtonC.getText().toString();\n else if (radioButtonD.isChecked())\n userAnswer[currentQueNum - 1] = radioButtonD.getText().toString();\n\n //the below block of code can be modify if needed that, to record the state of checkbox\n //and compare with set down cases\n //but in this situation this is the only condition that a correct answer is chosen\n else if (checkBox1.isChecked() && checkBox2.isChecked() && checkBox3.isChecked() && !checkBox4.isChecked()) {\n userAnswer[currentQueNum - 1] = checkBox1.getText().toString() + \",\" + checkBox2.getText().toString() + \",\" + checkBox3.getText().toString();\n\n } else if (inputText.getText().toString().trim().length() != 0) {\n userAnswer[currentQueNum - 1] = inputText.getText().toString();\n inputText.setText(\"\");// this will set the text field back to empty for subsequent use\n } else\n userAnswer[currentQueNum - 1] = \"skipped\";//the string when user skipped question\n return userAnswer[currentQueNum - 1];\n }", "public void setTFChoices() {\r\n Random randomGenerator = new Random();\r\n int trueFalseAnswer = randomGenerator.nextInt(2);\r\n studentAnswer.add(trueFalseAnswer);\r\n }", "public void askQuestions() {\r\n overallRoot = askQuestionsHelper(overallRoot);\r\n }", "public void printQuestions()\r\n\t{\r\n\t\tfor(int i = 0; i < questions.size(); i++)\r\n\t\t{\r\n\t\t\tString q = questions.get(i).toString();\r\n\t\t\tSystem.out.println( (i+1) + \". \" + q);\r\n\t\t}\r\n\t}", "private void setAnswers()\n {\n StringBuilder answers = new StringBuilder(256);\n String[] correctAnswers = getResources().getStringArray(R.array.correct_answers);\n TextView answer_view = (TextView) findViewById(R.id.answers);\n for(int i = 0 ; i < correctAnswers.length; i++)\n {\n answers.append(correctAnswers[i]);\n }\n answer_view.setText(answers.toString());\n }", "private void checkAnswer()\r\n\t{\r\n\t\t//Submission to the model and getting 'true' if correct and 'false' otherwise\r\n\t\tboolean response = quizModel.isCorrect(group.getSelection().getActionCommand());\r\n\t\t\r\n\t\t//Updating score label based on result\r\n\t\tif (response == true)\r\n\t\t{\r\n\t\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"<br>Correct answer!\" + \"</div></html>\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"<br>Incorrect answer!\" + \"</div></html>\");\r\n\t\t}\r\n\t}", "public void verifyAnswer() {\n\t\tint i=0;\n\t\tSystem.out.println(\"in verify answer function\");\n\t\tSystem.out.println(\"Number of Answers: \"+ansCount);\n\t\tSystem.out.println(\"User ans: \"+userEquation);\n\t\tif (ansCount==0)\n\t\t\tlb2.setText(\"There is no solution for this set\");\n\t\telse{\n\t\t\tint c=0;\n\t\t\t\n\t\t\twhile(c<ansCount) {\n\t\t\t\tif (solutions[i].equals(userEquation)) {\n\t\t\t\t\tSystem.out.println(\"Ans was Correct\");\n\t\t\t\t\tfinal long duration = System.nanoTime() - startTime;\n\t\t\t\t\tseconds = TimeUnit.NANOSECONDS.toSeconds(duration);\n\t\t\t\t\tlb2.setText(\"Congradulations! You took \"+seconds+\" seconds to find an answer.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t\tc++;\n\t\t\t\tSystem.out.println(\"C: \"+c);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Ans was not Correct\");\n\t}\n\t}", "public String getAnswer(){\n return this.answer;\n }", "public List<Answer> answersOfQuestion(Question question){\n\t\treturn this.aRepo.findAllByQuestion(question);\n\t}", "public abstract String promptSelectionFromAnswers(final String question, final List<String> answers) throws JVMIOException;", "public void printQuestions() {\n\t\tif (this.questions.size() == 0) {\n\t\t\tSystem.out.println(\"Sorry. There are no questions in this quiz.\");\n\t\t} else {\n\t\t\tfor (Question q : this.questions) {\n\t\t\t\tSystem.out.println(q.getText());\n\t\t\t}\n\t\t}\n\t}", "@Test\n void studentMCQTotalAnsweredTest(){\n Student student = new Student(\"Lim\");\n\n int expectedResult = 10; // Input for testing\n student.setNumQuestionAns(expectedResult); // Set Total Number Question(s) Answered\n System.out.println(\"Test Case #2\");\n System.out.println(\"\\tExpected Result: \" + expectedResult); // print expected result\n int actualResult = student.getNumQuestionAns(); // Actual Result\n System.out.println(\"\\tActual Result: \" + actualResult); // Print actual result\n assertEquals(expectedResult, actualResult); // Compare the expected result (True) & Actual Result\n }", "public List<Integer> getCorrectAnswers() {\n\t\treturn correctAnswers;\n\t}", "public void setQuestion(){\n txt_question.setText(arrayList.get(quesAttempted).getQuestion());\n txt_optionA.setText(arrayList.get(quesAttempted).getOptionA());\n txt_optionB.setText(arrayList.get(quesAttempted).getOptionB());\n txt_optionC.setText(arrayList.get(quesAttempted).getOptionC());\n txt_optionD.setText(arrayList.get(quesAttempted).getOptionD());\n txt_que_count.setText(\"Que: \"+(quesAttempted+1)+\"/\"+totalQues);\n txt_score.setText(\"Score: \"+setScore);\n }", "@Override\n public void onClick(View view) {\n\n //Getting the answer to question 4 radio button 1\n boolean isRadioButton1Q4 = radioButton1Q4.isChecked();\n\n //Calculate Question 4 score\n int resultQ4 = calculateResultQ4(isRadioButton1Q4);\n\n //Calculate the quiz score\n int result = resultQ1 + resultQ2 + resultQ3 + resultQ4;\n\n //Display the quiz result in the Toast message\n Toast.makeText(Question4Activity.this, \"Congrats! Your score is \" + result + \". Thank you for taking the quiz!\", Toast.LENGTH_LONG).show();\n }", "private int getScoreMultiple(MMObjectNode questionNode, MMObjectNode givenAnswer) {\n Vector givenAnswers = givenAnswer.getRelatedNodes(\"mcanswers\");\n Vector goodAnswers = questionNode.getRelatedNodes(\"mcanswers\");\n\n // First check if all the given answers are correct\n for (int i=0; i<givenAnswers.size(); i++) {\n if (((MMObjectNode)givenAnswers.get(i)).getIntValue(\"correct\") != 1) {\n return 0;\n }\n }\n\n // Secondly check if all the correct answers are given\n for (int i=0; i<goodAnswers.size(); i++) {\n if (((MMObjectNode)goodAnswers.get(i)).getIntValue(\"correct\") == 1) {\n if (!givenAnswers.contains(goodAnswers.get(i))) {\n return 0;\n }\n }\n }\n\n // ALl tests succeeded: answer is correct\n return 1;\n }", "@Override\n public void addResponses() {\n for(answerChoice a: this.userAnswers) {\n this.addResponseHelper(a.getAnswerText());\n //this.savedResponses. //add(a.getAnswerText());\n //try {\n\n //} catch(Exception e) {\n // e.printStackTrace();\n\n //}\n\n }\n }", "boolean hasCorrectAnswer();", "public List<MultQuestion> multChoiceQuestions(int qid);", "public void checkAllAnswers(View view) {\n finalScore = 0;\n\n boolean answerQuestion1 = false;\n boolean check1Quest1 = checkSingleCheckBox(R.id.jupiter_checkbox_view);\n boolean check2Quest1 = checkSingleCheckBox(R.id.mars_checkbox_view);\n boolean check3Quest1 = checkSingleCheckBox(R.id.earth_checkbox_view);\n boolean check4Quest1 = checkSingleCheckBox(R.id.venus_checkbox_view);\n\n if (!check1Quest1 && !check2Quest1 && !check3Quest1 && check4Quest1) {\n finalScore = scoreCounter(finalScore);\n answerQuestion1 = true;\n }\n\n boolean answerQuestion2 = false;\n boolean check1Quest2 = checkSingleCheckBox(R.id.nasa_checkbox_view);\n boolean check2Quest2 = checkSingleCheckBox(R.id.spacex_checkbox_view);\n boolean check3Quest2 = checkSingleCheckBox(R.id.nvidia_checkbox_view);\n boolean check4Quest2 = checkSingleCheckBox(R.id.astrotech_checkbox_view);\n\n if (check1Quest2 && check2Quest2 && !check3Quest2 && check4Quest2) {\n finalScore = scoreCounter(finalScore);\n answerQuestion2 = true;\n }\n\n boolean answerQuestion3 = false;\n boolean check1Quest3 = checkSingleCheckBox(R.id.moon_checkbox_view);\n boolean check2Quest3 = checkSingleCheckBox(R.id.sun_checkbox_view);\n boolean check3Quest3 = checkSingleCheckBox(R.id.comet_checkbox_view);\n boolean check4Quest3 = checkSingleCheckBox(R.id.asteroid_checkbox_view);\n\n if (check1Quest3 && !check2Quest3 && !check3Quest3 && !check4Quest3) {\n finalScore = scoreCounter(finalScore);\n answerQuestion3 = true;\n }\n\n boolean answerQuestion4 = false;\n boolean check1Quest4 = checkSingleCheckBox(R.id.yes_checkbox_view);\n boolean check2Quest4 = checkSingleCheckBox(R.id.no_checkbox_view);\n\n if (check1Quest4 && !check2Quest4) {\n finalScore = scoreCounter(finalScore);\n answerQuestion4 = true;\n }\n\n String question1Summary = createQuestionSummary(answerQuestion1, 1, getResources().getString(R.string.venus));\n String question2Summary = createQuestionSummary(answerQuestion2, 2, getResources().getString(R.string.nasa_spacex_astrotech));\n String question3Summary = createQuestionSummary(answerQuestion3, 3, getResources().getString(R.string.moon));\n String question4Summary = createQuestionSummary(answerQuestion4, 4, getResources().getString(R.string.yes));\n\n String quizSummary = createQuizSummary(finalScore);\n\n displayQuestionSummary(question1Summary, answerQuestion1, R.id.question1_summary);\n displayQuestionSummary(question2Summary, answerQuestion2, R.id.question2_summary);\n displayQuestionSummary(question3Summary, answerQuestion3, R.id.question3_summary);\n displayQuestionSummary(question4Summary, answerQuestion4, R.id.question4_summary);\n displayQuizSummary(quizSummary);\n\n }", "private void updateQuestion(){\n mchoice1.setChecked(false);\n mchoice2.setChecked(false);\n mchoice3.setChecked(false);\n mchoice4.setChecked(false);\n\n if (mQuestonNumber < mQuizLibrary.getLength()){\n //menset setiap textview dan radiobutton untuk diubah jadi pertanyaan\n sQuestion.setText(mQuizLibrary.getQuestion(mQuestonNumber));\n //mengatur opsi sesuai pada optional A\n mchoice1.setText(mQuizLibrary.getChoice(mQuestonNumber, 1)); //Pilihan Ganda ke 1\n //mengatur opsi sesuai pada optional B\n mchoice2.setText(mQuizLibrary.getChoice(mQuestonNumber, 2)); //Pilihan Ganda ke 2\n //mengatur opsi sesuai pada optional C\n mchoice3.setText(mQuizLibrary.getChoice(mQuestonNumber, 3)); //Pilihan Ganda ke 3\n //mengatur opsi sesuai pada optional D\n mchoice4.setText(mQuizLibrary.getChoice(mQuestonNumber, 4)); //Pilihan Ganda ke 4\n\n manswer = mQuizLibrary.getCorrect(mQuestonNumber);\n //untuk mengkoreksi jawaban yang ada di class QuizBank sesuai nomor urut\n mQuestonNumber++; //update pertanyaan\n }else{\n Toast.makeText(Quiz.this, \"ini pertanyaan terakhir\", Toast.LENGTH_LONG).show();\n Intent i = new Intent (Quiz.this, HighestScore.class);\n i.putExtra(\"score\", mScore); //UNTUK MENGIRIM NILAI KE activity melalui intent\n startActivity(i);\n }\n }", "public void onClick(View view) {\n quesCounter++;\n if (quesCounter < 4) {\n //returning a feedback saying \"correct answer\" if the user has chosen the correct answer and\n //\"incorrect answer\" otherwise\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n\n } else {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n }\n //incrementing quesNumber to move to the next question\n quesNumber++;\n questionTextView.setText(question[quesNumber].getQuesStatement());\n } else {\n if (question[quesNumber].isAnsTrue()) {\n Toast.makeText(TopicQuiz.this, \"Incorrect Answer\", Toast.LENGTH_SHORT).show();\n\n\n } else {\n Toast.makeText(TopicQuiz.this, \"Correct Answer\", Toast.LENGTH_SHORT).show();\n rightQuesCounter++;\n }\n\n //Checking to see if the rightQuesCounter worked or not\n Log.d(TAG, \"You have got \" + rightQuesCounter + \" questions right!\");\n\n //Having an intent to move to the Result screen while passing the rightQuesCounter to get the result\n Intent intent = new Intent(TopicQuiz.this, Result.class);\n intent.putExtra(\"rightQuesCounter\", rightQuesCounter);\n intent.putExtra(\"language\",topic);\n\n\n startActivity(intent);\n }\n }", "@Test\n void studentMCQTotalAnsweredCorrectlyTest(){\n Student student = new Student(\"Lim\");\n\n int expectedResult = 8; // Input for testing\n student.setNumCorrectAns(expectedResult); // Set Total Number Question(s) Answered Correctly\n System.out.println(\"Test Case #3\");\n System.out.println(\"\\tExpected Result: \" + expectedResult); // print expected result\n int actualResult = student.getNumCorrectAns(); // Actual Result\n System.out.println(\"\\tActual Result: \" + actualResult); // Print actual result\n assertEquals(expectedResult, actualResult); // Compare the expected result (True) & Actual Result\n }", "public void question() {\n\t\tlead.answer(this);\n\t}", "private void checkMultipleChoice(){\n \t\t\t\n \t\t\t// this is the answer string containing all the checked answers\n \t\t\tString answer = \"\";\n \t\t\t\t\n \t\t\tif(checkboxLayout.getChildCount()>=1){\n \t\t\t\n \t\t\t\t// iterate through the child check box elements of the linear view\n \t\t\t\tfor (int i = 0; i < checkboxLayout.getChildCount();i++){\n \t\t\t\t\t\n \t\t\t\t\tCheckBox choiceCheckbox = (CheckBox) checkboxLayout.getChildAt(i);\n \t\t\t\t\t\n \t\t\t\t\t// if that check box is checked, its answer will be stored\n \t\t\t\t\tif (choiceCheckbox.isChecked()){\n \t\t\t\t\t\t\n \t\t\t\t\t\tString choiceNum = choiceCheckbox.getTag().toString();\n \t\t\t\t\t\tString choiceText = choiceCheckbox.getText().toString();\n \t\t\t\t\t\t\n \t\t\t\t\t\t// append the answer to the answer text string\n \t\t\t\t\t\tif (i == checkboxLayout.getChildCount()-1)answer = answer + choiceNum +\".\" + choiceText;\n \t\t\t\t\t\telse{ answer = answer + choiceNum +\".\"+ choiceText + \",\"; }\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//setting the response for that survey question\n \t\t\teventbean.setChoiceResponse(answer);\n \t\t\t\n \t\t\t}\n \t\t}", "public void createAnswerStatistics(int sid,int qid);", "@Override\n public void tabulateResult(QaQuiz quiz) {\n List<QaGradebook> gradebooks = gradebookDao.find(quiz); // todo chunking\n for (QaGradebook gradebook : gradebooks) {\n Integer result = 0;\n QaParticipant participant = gradebook.getParticipant();\n List<QaGradebookItem> items = gradebook.getItems();\n for (QaGradebookItem item : items) {\n QaQuestion question = item.getQuestion();\n switch (question.getQuestionType()) {\n case MULTIPLE_CHOICE:\n log.debug(\"answer:\" + question.getAnswerIndex());\n log.debug(\"response:\" + item.getAnswerIndex());\n\n if (null != item.getAnswerIndex() &&\n null != question.getAnswerIndex() && // just in case\n item.getAnswerIndex().equals(question.getAnswerIndex())) {\n result += 1;\n }\n break;\n case BOOLEAN:\n if (null != item.getAnswerIndex() &&\n null != question.getAnswerIndex() && // just in case\n item.getAnswerIndex().equals(question.getAnswerIndex())) {\n result += 1;\n }\n break;\n case SUBJECTIVE:\n participant.setAnswerResponse(item.getAnswerResponse());\n break;\n }\n }\n log.debug(\"result: \" + result);\n participant.setResult(result);\n participantDao.update(participant, Utils.getCurrentUser());\n sessionFactory.getCurrentSession().flush();\n }\n }", "public void answer(Properties answers) {}", "List<Question> getQuestions(String surveyId);", "private void getAllQuestion(){\r\n\r\n if(ques.getText().toString().equals(\"\")||opt1.getText().toString().equals(\"\")||opt2.getText().toString().equals(\"\")||\r\n opt3.getText().toString().equals(\"\")||correct.getText().toString().equals(\"\")){\r\n Toast.makeText(getBaseContext(), \"Please fill all fields\", Toast.LENGTH_LONG).show();\r\n }\r\n else{\r\n\r\n int c = Integer.parseInt((correct.getText().toString()));\r\n if (c > 3) {\r\n Toast.makeText(getBaseContext(), \"Invalid Correct answer\", Toast.LENGTH_LONG).show();\r\n } else {\r\n\r\n setQuestions();\r\n }\r\n finishQuiz();\r\n }\r\n }", "public void setAnsweredQuestions() {\n\t\tFile file = new File(\"data/answered_questions\");\n\t\tif(!file.exists()) {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/answered_questions\");\n\n\t\t\tString answeredQuestions = \"\";\n\t\t\tfor (int i = 0;i<5;i++) {\n\t\t\t\tansweredQuestions = answeredQuestions + \" \" + String.valueOf(_answeredQuestions[i]);\n\t\t\t}\n\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/answered_questions\", answeredQuestions));\n\n\t\t}\n\t\tScanner myReader;\n\t\ttry {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/answered_questions\");\n\t\t\tmyReader = new Scanner(file);\n\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\tString[] splitFileLine = fileLine.trim().split(\" \");\n\t\t\t\tfor (int i=0; i<5; i++) {\n\t\t\t\t\t_answeredQuestions[i] = Integer.parseInt(splitFileLine[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public abstract void scoreAnswer(Question q, Answer answer, JCas jcas);", "public abstract void generateQuestion();", "private void validateQuestion(){\n int checkedRadioButtonId = Question.getCheckedRadioButtonId();\n\n // If the correct question has been chosen, update the score & display a toast message\n if (checkedRadioButtonId == R.id.radio4_question1) {\n score = score + 2;\n }\n }", "private void detectCorrectAnswer() {\n switch (chapterSection) {\n case 5:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"baybayin\")) {\n ansCorrect = true;\n }\n break;\n case 6:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabundukan\")) {\n ansCorrect = true;\n }\n break;\n case 7:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"lungsod\")) {\n ansCorrect = true;\n }\n break;\n case 8:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabukiran\")) {\n ansCorrect = true;\n }\n break;\n }\n }", "private void fetchNewQuestion()\r\n\t{\r\n\t\t//Gets question and answers from model\r\n\t\tString[] question = quizModel.getNewQuestion();\r\n\t\t\r\n\t\t//Allocates answers to a new ArrayList then shuffles them randomly\r\n\t\tArrayList<String> answers = new ArrayList<String>();\r\n\t\tanswers.add(question[1]);\r\n\t\tanswers.add(question[2]);\r\n\t\tanswers.add(question[3]);\r\n\t\tanswers.add(question[4]);\r\n\t\tCollections.shuffle(answers);\r\n\t\t\r\n\t\t//Allocates north label to the question\r\n\t\tnorthLabel.setText(\"<html><div style='text-align: center;'>\" + question[0] + \"</div></html>\");\r\n\t\t\r\n\t\t//Allocates each radio button to a possible answer. Based on strings, so randomly generated questions...\r\n\t\t//...which by chance repeat a correct answer in two slots, either will award the user a point.\r\n\t\toption1.setText(answers.get(0));\r\n\t\toption2.setText(answers.get(1));\r\n\t\toption3.setText(answers.get(2));\r\n\t\toption4.setText(answers.get(3));\r\n\t\toption1.setActionCommand(answers.get(0));\r\n\t\toption2.setActionCommand(answers.get(1));\r\n\t\toption3.setActionCommand(answers.get(2));\r\n\t\toption4.setActionCommand(answers.get(3));\r\n\t\toption1.setSelected(true);\r\n\t\t\r\n\t\t//Update score\r\n\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"</div></html>\");\r\n\t}", "@RequestMapping(value = \"/studentJourney\", method = RequestMethod.POST)\r\n\tpublic ModelAndView studentStartExam(HttpServletRequest request, HttpServletResponse response,\r\n\t\t\t@ModelAttribute(\"studentTestForm\") StudentTestForm studentForm) throws Exception {\n\t\tModelAndView model;\r\n\t\tUser user = (User) request.getSession().getAttribute(\"user\");\r\n\t\tTest test = (Test) request.getSession().getAttribute(\"test\");\r\n\t\tif (test.getFullStackTest() != null && test.getFullStackTest()) {\r\n\t\t\tmodel = new ModelAndView(\"test_fstk\");\r\n\t\t} else {\r\n\t\t\tmodel = new ModelAndView(\"test_cognizant\");\r\n\t\t}\r\n\t\trequest.getSession().setAttribute(\"testStartDate\", new Date());\r\n\t\tList<Section> sections = sectionService.getSectionsForTest(test.getTestName(), test.getCompanyId());\r\n\r\n\t\tint count = 0;\r\n\t\tList<SectionInstanceDto> sectionInstanceDtos = new ArrayList<>();\r\n\t\tint totalQuestions = test.getTotalMarks();\r\n\t\tfor (Section section : sections) {\r\n\t\t\t// from the sections creating an instance of section mapping with test\r\n\t\t\tSectionInstanceDto sectionInstanceDto = new SectionInstanceDto();\r\n\t\t\tsectionInstanceDtos.add(sectionInstanceDto);\r\n\t\t\t// sectionInstanceDto.setCurrent(current);\r\n\t\t\tif (count == 0) {\r\n\t\t\t\tsectionInstanceDto.setCurrent(true);\r\n\r\n\t\t\t\tList<QuestionMapper> questionMappers = questionMapperService.getQuestionsForSection(\r\n\t\t\t\t\t\ttest.getTestName(), section.getSectionName(), user.getCompanyId());\r\n\t\t\t\tCollections.shuffle(questionMappers);\r\n\t\t\t\tList<QuestionMapper> questionMappersActual = questionMappers.subList(0,\r\n\t\t\t\t\t\tsection.getNoOfQuestionsToBeAsked());\r\n\t\t\t\tList<QuestionInstanceDto> questionMapperInstances = new ArrayList<QuestionInstanceDto>();\r\n\t\t\t\tint pos = 0;\r\n\t\t\t\tfor (QuestionMapper questionMapper : questionMappersActual) {\r\n\t\t\t\t\t// creating the instances of question mapper instance entity\r\n\t\t\t\t\t\r\n\t\t\t\t\tQuestionInstanceDto questionInstanceDto = new QuestionInstanceDto();\r\n\t\t\t\t\tpos++;\r\n\t\t\t\t\tquestionInstanceDto.setPosition(pos);\r\n\t\t\t\t\tQuestionMapperInstance questionMapperInstance = null;\r\n\t\t\t\t\tif (section.getPercentQuestionsAsked() == 100) {\r\n\t\t\t\t\t\tquestionMapperInstance = questionMapperInstanceRep\r\n\t\t\t\t\t\t\t\t.findUniqueQuestionMapperInstanceForUser(\r\n\t\t\t\t\t\t\t\t\t\tquestionMapper.getQuestion()\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getQuestionText(),\r\n\t\t\t\t\t\t\t\t\t\ttest.getTestName(),\r\n\t\t\t\t\t\t\t\t\t\tsection.getSectionName(),\r\n\t\t\t\t\t\t\t\t\t\tuser.getEmail(), user.getCompanyId());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (questionMapperInstance == null) {\r\n\t\t\t\t\t\tquestionMapperInstance = new QuestionMapperInstance();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tquestionInstanceDto.setQuestionMapperInstance(questionMapperInstance);\r\n\t\t\t\t\tquestionMapperInstance.setQuestionMapper(questionMapper);\r\n\t\t\t\t\tquestionMapperInstances.add(questionInstanceDto);\r\n\t\t\t\t\tif (questionMapper.getQuestion().getQuestionType() != null && questionMapper.getQuestion()\r\n\t\t\t\t\t\t\t.getQuestionType().getType().equals(QuestionType.CODING.getType())) {\r\n\t\t\t\t\t\tquestionInstanceDto.setCode(questionMapper.getQuestion().getInputCode());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsectionInstanceDto.setFirst(true);\r\n\t\t\t\tsectionInstanceDto.setQuestionInstanceDtos(questionMapperInstances);\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * For only 1 Q and 1 section..adding this\r\n\t\t\t\t */\r\n\t\t\t\tif (sections.size() == 1) {\r\n\t\t\t\t\tif (questionMappersActual.size() == 1) {\r\n\t\t\t\t\t\tsectionInstanceDto.setLast(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * End For only 1 Q and 1 section..adding this\r\n\t\t\t\t */\r\n\r\n\t\t\t\tmodel.addObject(\"currentSection\", sectionInstanceDto);\r\n\t\t\t\tmodel.addObject(\"currentQuestion\", questionMapperInstances.get(0));\r\n\t\t\t\trequest.getSession().setAttribute(\"currentSection\", sectionInstanceDto);\r\n\t\t\t\t/**\r\n\t\t\t\t * Get the fullstack for Q if type is full stack.\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tif (!questionMapperInstances.get(0).getQuestionMapperInstance().getQuestionMapper().getQuestion()\r\n\t\t\t\t\t\t.getFullstack().getStack().equals(FullStackOptions.NONE.getStack())) {\r\n\t\t\t\t\tsetWorkspaceIDEForFullStackQ(request, questionMapperInstances.get(0));\r\n\t\t\t\t}\r\n\t\t\t\t/**\r\n\t\t\t\t * End full stack check\r\n\t\t\t\t */\r\n\t\t\t}\r\n\t\t\tsectionInstanceDto.setNoOfQuestions(section.getNoOfQuestionsToBeAsked());\r\n\t\t\tsectionInstanceDto.setSection(section);\r\n\t\t\tcount++;\r\n\t\t\t// fetch the questions based on the associated sections\r\n\r\n\t\t}\r\n\r\n\t\trequest.getSession().setAttribute(\"sectionInstanceDtos\", sectionInstanceDtos);\r\n\t\tputMiscellaneousInfoInModel(model, request);\r\n\t\tmodel.addObject(\"sectionInstanceDtos\", sectionInstanceDtos);\r\n\t\tmodel.addObject(\"percentage\", \"0\");\r\n\t\tmodel.addObject(\"totalQuestions\", \"\" + totalQuestions);\r\n\t\tmodel.addObject(\"noAnswered\", \"0\");\r\n\t\tmodel.addObject(\"confidenceFlag\", test.getConsiderConfidence());\r\n\t\treturn model;\r\n\t}", "public Long getAnswds() {\r\n return answds;\r\n }", "public void fillQuestionsTable() {\n\n //Hard Questions\n Questions q1 = new Questions(\"The redshift of a distant galaxy is 0·014. According to Hubble’s law, the distance of the galaxy from Earth is? \", \" 9·66 × 10e-12 m\", \" 9·32 × 10e27 m\", \"1·83 × 10e24 m\", \"1·30 × 10e26 m \", 3);\n addQuestion(q1);\n Questions q2 = new Questions(\"A ray of monochromatic light passes from air into water. The wavelength of this light in air is 589 nm. The speed of this light in water is? \", \" 2·56 × 10e2 m/s \", \"4·52 × 10e2 m/s\", \"4·78 × 10e2 m/s\", \"1·52 × 10e2 m/s\", 2);\n addQuestion(q2);\n Questions q3 = new Questions(\"A car is moving at a speed of 2·0 m s−1. The car now accelerates at 4·0 m s−2 until it reaches a speed of 14 m s−1. The distance travelled by the car during this acceleration is\", \"1.5m\", \"18m\", \"24m\", \"25m\", 3);\n addQuestion(q3);\n Questions q4 = new Questions(\"A spacecraft is travelling at 0·10c relative to a star. \\nAn observer on the spacecraft measures the speed of light emitted by the star to be?\", \"0.90c\", \"1.00c\", \"1.01c\", \"0.99c\", 2);\n addQuestion(q4);\n Questions q5 = new Questions(\"Measurements of the expansion rate of the Universe lead to the conclusion that the rate of expansion is increasing. Present theory proposes that this is due to? \", \"Redshift\", \"Dark Matter\", \"Dark Energy\", \"Gravity\", 3);\n addQuestion(q5);\n Questions q6 = new Questions(\"A block of wood slides with a constant velocity down a slope. The slope makes an angle of 30º with the horizontal axis. The mass of the block is 2·0 kg. The magnitude of the force of friction acting on the block is?\" , \"1.0N\", \"2.0N\", \"9.0N\", \"9.8N\", 4);\n addQuestion(q6);\n Questions q7 = new Questions(\"A planet orbits a star at a distance of 3·0 × 10e9 m. The star exerts a gravitational force of 1·6 × 10e27 N on the planet. The mass of the star is 6·0 × 10e30 kg. The mass of the planet is? \", \"2.4 x 10e14 kg\", \"3.6 x 10e25 kg\", \"1.2 x 10e16 kg\", \"1.6 x 10e26 kg\", 2);\n addQuestion(q7);\n Questions q8 = new Questions(\"Radiation of frequency 9·00 × 10e15 Hz is incident on a clean metal surface. The maximum kinetic energy of a photoelectron ejected from this surface is 5·70 × 10e−18 J. The work function of the metal is?\", \"2.67 x 10e-19 J\", \"9.10 x 10e-1 J\", \"1.60 x 10e-18 J\", \"4.80 x 10e-2 J\", 1);\n addQuestion(q8);\n Questions q9 = new Questions(\"The irradiance of light from a point source is 32 W m−2 at a distance of 4·0 m from the source. The irradiance of the light at a distance of 16 m from the source is? \", \"1.0 W m-2\", \"8.0 W m-2\", \"4.0 W m-2\", \"2.0 W m-2\", 4);\n addQuestion(q9);\n Questions q10 = new Questions(\"A person stands on a weighing machine in a lift. When the lift is at rest, the reading on the weighing machine is 700 N. The lift now descends and its speed increases at a constant rate. The reading on the weighing machine...\", \"Is a constant value higher than 700N. \", \"Is a constant value lower than 700N. \", \"Continually increases from 700 N. \", \"Continually decreases from 700 N. \", 2);\n addQuestion(q10);\n\n //Medium Questions\n Questions q11 = new Questions(\"What is Newtons Second Law of Motion?\", \"F = ma\", \"m = Fa\", \"F = a/m\", \"Every action has an equal and opposite reaction\", 1);\n addQuestion(q11);\n Questions q12 = new Questions(\"In s = vt, what does s stand for?\", \"Distance\", \"Speed\", \"Sin\", \"Displacement\", 4);\n addQuestion(q12);\n Questions q13 = new Questions(\"An object reaches terminal velocity when...\", \"Forward force is greater than the frictional force.\", \"All forces acting on that object are equal.\", \"Acceleration starts decreasing.\", \"Acceleration is greater than 0\", 2);\n addQuestion(q13);\n Questions q14 = new Questions(\"An Elastic Collision is where?\", \"There is no loss of Kinetic Energy.\", \"There is a small loss in Kinetic Energy.\", \"There is an increase in Kinetic Energy.\", \"Some Kinetic Energy is transferred to another type.\", 1);\n addQuestion(q14);\n Questions q15 = new Questions(\"The speed of light is?\", \"Different for all observers.\", \"The same for all observers. \", \"The same speed regardless of the medium it is travelling through. \", \"Equal to the speed of sound.\", 2);\n addQuestion(q15);\n Questions q16 = new Questions(\"What is redshift?\", \"Light moving to us, shifting to red. \", \"A dodgy gear change. \", \"Light moving away from us shifting to longer wavelengths.\", \"Another word for dark energy. \", 3);\n addQuestion(q16);\n Questions q17 = new Questions(\"Which law allows us to estimate the age of the universe?\", \"Newtons 3rd Law \", \"The Hubble-Lemaitre Law \", \"Planck's Law \", \"Wien's Law \", 2);\n addQuestion(q17);\n Questions q18 = new Questions(\"The standard model...\", \"Models how time interacts with space. \", \"Describes how entropy works. \", \"Is the 2nd Law of Thermodynamics. \", \"Describes the fundamental particles of the universe and how they interact\", 4);\n addQuestion(q18);\n Questions q19 = new Questions(\"The photoelectric effect gives evidence for?\", \"The wave model of light. \", \"The particle model of light. \", \"The speed of light. \", \"The frequency of light. \", 2);\n addQuestion(q19);\n Questions q20 = new Questions(\"AC is a current which...\", \"Doesn't change direction. \", \"Is often called variable current. \", \"Is sneaky. \", \"Changes direction and instantaneous value with time. \", 4);\n addQuestion(q20);\n\n //Easy Questions\n Questions q21 = new Questions(\"What properties does light display?\", \"Wave\", \"Particle\", \"Both\", \"Neither\", 3);\n addQuestion(q21);\n Questions q22 = new Questions(\"In V = IR, what does V stand for?\", \"Velocity\", \"Voltage\", \"Viscosity\", \"Volume\", 2);\n addQuestion(q22);\n Questions q23 = new Questions(\"The abbreviation rms typically stands for?\", \"Round mean sandwich. \", \"Random manic speed. \", \"Root manic speed. \", \"Root mean squared. \", 4);\n addQuestion(q23);\n Questions q24 = new Questions(\"Path Difference = \", \"= (m/λ) or (m + ½)/λ where m = 0,1,2…\", \"= mλ or (m + ½) λ where m = 0,1,2…\", \"= λ / m or (λ + ½) / m where m = 0,1,2…\", \" = mλ or (m + ½) λ where m = 0.5,1.5,2.5,…\", 2);\n addQuestion(q24);\n Questions q25 = new Questions(\"How many types of quark are there?\", \"6\", \"4 \", \"8\", \"2\", 1);\n addQuestion(q25);\n Questions q26 = new Questions(\"A neutrino is a type of?\", \"Baryon\", \"Gluon\", \"Lepton\", \"Quark\", 3);\n addQuestion(q26);\n Questions q27 = new Questions(\"A moving charge produces:\", \"A weak field\", \"An electric field\", \"A strong field\", \"Another moving charge\", 2);\n addQuestion(q27);\n Questions q28 = new Questions(\"What contains nuclear fusion reactors?\", \"A magnetic field\", \"An electric field\", \"A pool of water\", \"Large amounts of padding\", 1);\n addQuestion(q28);\n Questions q29 = new Questions(\"What is the critical angle of a surface?\", \"The incident angle where the angle of refraction is 45 degrees.\", \"The incident angle where the angle of refraction is 90 degrees.\", \"The incident angle where the angle of refraction is 135 degrees.\", \"The incident angle where the angle of refraction is 180 degrees.\", 2);\n addQuestion(q29);\n Questions q30 = new Questions(\"Which is not a type of Lepton?\", \"Electron\", \"Tau\", \"Gluon\", \"Muon\", 3);\n addQuestion(q30);\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\t\tif (q2.isAnswerCorrect(getattempt.getText())){ //if you get the 2nd question correct\n\t\t\t\t\t\tforq2 = 1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint score = forq1 + forq2; //score is the sum of the individual questions\n\t\t\t\t\tattempt2 = getattempt.getText(); //removes all the own components to make way for the new ones\n\t\t\t\t\tquestionarea.setVisible(false);\n\t\t\t\t\tenter.setVisible(false);\n\t\t\t\t\tgetattempt.setVisible(false);\n\t\t\t\t\tJLabel result = new JLabel(\"RESULT: \" + score + \"/2\"); //the result of your quizz\n\t\t\t\t\tresult.setFont(new Font(\"Serif\", Font.BOLD, 50));\n\t\t\t\t\tresult.setBounds(110,15, 400,50);\n\t\t\t\t\tJTextArea question1 = new JTextArea(q1.question);\n\t\t\t\t\tJTextArea question2 = new JTextArea(q2.question);\n\t\t\t\t\n\t\t\t\t\t//displays the correct answer your answer, and the question\n\t\t\t\t\tJLabel header = new JLabel(\"Question Your Answer Correct Ans.\");\n\t\t\t\t\theader.setFont(new Font(\"Serif\", Font.BOLD, 15));\n\t\t\t\t\theader.setBounds(10, 65,500,50);\n\t\t\t\t\t\n\t\t\t\t\tquestion1.setBounds(10,110, 280,50);\n\t\t\t\t\tquestion1.setLineWrap(true);\n\t\t\t\t\tJTextArea youranswer = new JTextArea (attempt);\n\t\t\t\t\tyouranswer.setBounds(300, 110, 50,30);\n\t\t\t\t\tJTextArea theanswer = new JTextArea(q1.answer);\n\t\t\t\t\ttheanswer.setBounds(410, 110,50,30);\n\t\t\t\t\t\n\t\t\t\t\tquestion2.setBounds(10,160, 280,50);\n\t\t\t\t\tquestion2.setLineWrap(true);\n\t\t\t\t\tJTextArea youranswer2 = new JTextArea (attempt2);\n\t\t\t\t\tyouranswer2.setBounds(300, 160 ,50,30);\n\t\t\t\t\tJTextArea theanswer2 = new JTextArea(q2.answer);\n\t\t\t\t\ttheanswer2.setBounds(410, 160,50,30);\n\t\t\t\t\t//adds everything to the JPanel\n\t\t\t\t\tadd(result);\n\t\t\t\t\tadd(question1);\n\t\t\t\t\tadd(question2);\n\t\t\t\t\tadd(header);\n\t\t\t\t\tadd(youranswer);\n\t\t\t\t\tadd(theanswer);\n\t\t\t\t\tadd(youranswer2);\n\t\t\t\t\tadd(theanswer2);\n\t\t\t\t\t\n\t\t\t\t\tJButton quit = new JButton(\"Exit\"); //the button that allows you to quit\n\t\t\t\t\tquit.setBounds(50,230,65,20);\n\t\t\t\t\tquit.addActionListener(new Quitter());\n\t\t\t\t\tadd(quit);\n\t\t\t\t\tif(type == 0){ //the type - if after u win a level, then you only need 1 right to pass, but if you lost, then u need 2 questins to pass, type == 0 is for loss\n\t\t\t\t\t\tif (score == 2){\n\t\t\t\t\t\t\tJButton retrylevel = new JButton(\"Retry\");\n\t\t\t\t\t\t\tretrylevel.setBounds(350,230,65,20);\n\t\t\t\t\t\t\tretrylevel.addActionListener(new Retry());\n\t\t\t\t\t\t\tadd(retrylevel);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tJButton retrylevel = new JButton(\"New Game\");\n\t\t\t\t\t\t\tretrylevel.setBounds(350,210,100,20);\n\t\t\t\t\t\t\tretrylevel.addActionListener(new Retry());\n\t\t\t\t\t\t\tadd(retrylevel);\t\n\t\t\t\t\t\t\tnumplanes = 1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\thealth = finalhealth;\n\t\t\t\t\t}\n\t\t\t\t\telse if (type == 1){ //if you just cleared a wave of planes, this pops up\n\t\t\t\t\t\tif (score == 2){\n\t\t\t\t\t\t\tJButton retrylevel = new JButton(\"Continue\");\n\t\t\t\t\t\t\tretrylevel.setBounds(330,230,100,20);\n\t\t\t\t\t\t\tretrylevel.addActionListener(new Retry());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfinalhealth++;\n\t\t\t\t\t\t\thealth = finalhealth;\n\t\t\t\t\t\t\tadd(retrylevel);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (score==1){ //lets you pass on but no health bonus\n\t\t\t\t\t\t\tJButton retrylevel = new JButton(\"Continue\");\n\t\t\t\t\t\t\tretrylevel.setBounds(330,230,100,20);\n\t\t\t\t\t\t\tretrylevel.addActionListener(new Retry());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thealth = finalhealth;\n\t\t\t\t\t\t\tadd(retrylevel);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse { //forces you to restart\n\t\t\t\t\t\t\tJButton retrylevel = new JButton(\"Restart Level\");\n\t\t\t\t\t\t\tretrylevel.setBounds(350,210,120,20);\n\t\t\t\t\t\t\tretrylevel.addActionListener(new Retry());\n\t\t\t\t\t\t\tadd(retrylevel);\n\t\t\t\t\t\t\thealth=finalhealth;\n\t\t\t\t\t\t\tnumplanes--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "public void checkScore(View view) {\n //Question Nr. 1 radio button\n RadioButton true1AnswerOne = (RadioButton) findViewById(R.id.q1a1);\n Boolean is1OneTrue = true1AnswerOne.isChecked();\n if (is1OneTrue) {\n\n }\n\n RadioButton true1AnswerTwo = (RadioButton) findViewById(R.id.q1a2);\n Boolean is1TwoTrue = true1AnswerTwo.isChecked();\n if (is1TwoTrue) {\n\n }\n\n RadioButton true1AnswerThree = (RadioButton) findViewById(R.id.q1a3);\n Boolean is1ThreeTrue = true1AnswerThree.isChecked();\n if (is1ThreeTrue) {\n score = score + 2;\n }\n\n RadioButton true1AnswerFour = (RadioButton) findViewById(R.id.q1a4);\n Boolean is1FourTrue = true1AnswerFour.isChecked();\n if (is1FourTrue) {\n score++;\n }\n\n //Question Nr. 2 radio button\n RadioButton true2AnswerOne = (RadioButton) findViewById(R.id.q2a1);\n Boolean is2OneTrue = true2AnswerOne.isChecked();\n if (is2OneTrue) {\n\n }\n\n RadioButton true2AnswerTwo = (RadioButton) findViewById(R.id.q2a2);\n Boolean is2TwoTrue = true2AnswerTwo.isChecked();\n if (is2TwoTrue) {\n\n }\n\n RadioButton true2AnswerThree = (RadioButton) findViewById(R.id.q2a3);\n Boolean is2ThreeTrue = true2AnswerThree.isChecked();\n if (is2ThreeTrue) {\n score++;\n }\n\n RadioButton true2AnswerFour = (RadioButton) findViewById(R.id.q2a4);\n Boolean is2FourTrue = true2AnswerFour.isChecked();\n if (is2FourTrue) {\n score = score + 2;\n }\n\n //Question Nr. 3 radio button\n RadioButton true3AnswerOne = (RadioButton) findViewById(R.id.q3a1);\n Boolean is3OneTrue = true3AnswerOne.isChecked();\n if (is3OneTrue) {\n\n }\n\n RadioButton true3AnswerTwo = (RadioButton) findViewById(R.id.q3a2);\n Boolean is3TwoTrue = true3AnswerTwo.isChecked();\n if (is3TwoTrue) {\n\n }\n\n RadioButton true3AnswerThree = (RadioButton) findViewById(R.id.q3a3);\n Boolean is3ThreeTrue = true3AnswerThree.isChecked();\n if (is3ThreeTrue) {\n score++;\n }\n\n RadioButton true3AnswerFour = (RadioButton) findViewById(R.id.q3a4);\n Boolean is3FourTrue = true3AnswerFour.isChecked();\n if (is3FourTrue) {\n score = score + 2;\n }\n\n //Question Nr. 4 radio button\n RadioButton true4AnswerOne = (RadioButton) findViewById(R.id.q4a1);\n Boolean is4OneTrue = true4AnswerOne.isChecked();\n if (is4OneTrue) {\n\n }\n\n RadioButton true4AnswerTwo = (RadioButton) findViewById(R.id.q4a2);\n Boolean is4TwoTrue = true4AnswerTwo.isChecked();\n if (is4TwoTrue) {\n\n }\n\n RadioButton true4AnswerThree = (RadioButton) findViewById(R.id.q4a3);\n Boolean is4ThreeTrue = true4AnswerThree.isChecked();\n if (is4ThreeTrue) {\n score++;\n }\n\n RadioButton true4AnswerFour = (RadioButton) findViewById(R.id.q4a4);\n Boolean is4FourTrue = true4AnswerFour.isChecked();\n if (is4FourTrue) {\n score = score + 2;\n }\n\n //Question Nr. 5 radio button\n RadioButton true5AnswerOne = (RadioButton) findViewById(R.id.q5a1);\n Boolean is5OneTrue = true5AnswerOne.isChecked();\n if (is5OneTrue) {\n\n }\n\n RadioButton true5AnswerTwo = (RadioButton) findViewById(R.id.q5a2);\n Boolean is5TwoTrue = true5AnswerTwo.isChecked();\n if (is5TwoTrue) {\n score = score + 2;\n }\n\n RadioButton true5AnswerThree = (RadioButton) findViewById(R.id.q5a3);\n Boolean is5ThreeTrue = true5AnswerThree.isChecked();\n if (is5ThreeTrue) {\n score++;\n }\n\n RadioButton true5AnswerFour = (RadioButton) findViewById(R.id.q5a4);\n Boolean is5FourTrue = true5AnswerFour.isChecked();\n if (is5FourTrue) {\n\n }\n\n //Question Nr. 6 radio button\n RadioButton true6AnswerOne = (RadioButton) findViewById(R.id.q6a1);\n Boolean is6OneTrue = true6AnswerOne.isChecked();\n if (is6OneTrue) {\n score = score + 2;\n }\n\n RadioButton true6AnswerTwo = (RadioButton) findViewById(R.id.q6a2);\n Boolean is6TwoTrue = true6AnswerTwo.isChecked();\n if (is6TwoTrue) {\n score++;\n }\n\n RadioButton true6AnswerThree = (RadioButton) findViewById(R.id.q6a3);\n Boolean is6ThreeTrue = true6AnswerThree.isChecked();\n if (is6ThreeTrue) {\n\n }\n\n RadioButton true6AnswerFour = (RadioButton) findViewById(R.id.q6a4);\n Boolean is6FourTrue = true6AnswerFour.isChecked();\n if (is6FourTrue) {\n\n }\n\n //Question Nr. 7 check box\n CheckBox trueAnswerSeven1 = (CheckBox) findViewById(R.id.trueq7a1);\n Boolean isSeven1True = trueAnswerSeven1.isChecked();\n CheckBox trueAnswerSeven2 = (CheckBox) findViewById(R.id.trueq7a2);\n Boolean isSeven2True = trueAnswerSeven2.isChecked();\n CheckBox trueAnswerSeven3 = (CheckBox) findViewById(R.id.trueq7a3);\n Boolean isSeven3True = trueAnswerSeven3.isChecked();\n CheckBox trueAnswerSeven4 = (CheckBox) findViewById(R.id.trueq7a4);\n Boolean isSeven4True = trueAnswerSeven4.isChecked();\n if (isSeven1True) {\n score++;\n }\n\n if (isSeven2True) {\n score++;\n }\n\n if (isSeven3True) {\n score++;\n }\n\n if (isSeven4True) {\n score++;\n }\n\n //Question Nr. 8 edit text\n EditText trueAnswerEight = (EditText) findViewById(R.id.q8a1);\n String isEightTrue = trueAnswerEight.getText().toString();\n if (isEightTrue.equals(\"Love You\")) {\n score++;\n }\n\n //Text of the message after the Check your score button is clicked.\n if (score < 6) {\n Toast.makeText(this, \"You scored \" + score + \" points out of 17. One of you might be caught in so called \\\"Passion trap\\\" (search for it in the internet). You both need to work on your relationships to improve the balance.\", Toast.LENGTH_LONG).show();\n } else if (score < 12) {\n Toast.makeText(this, \"Good! You scored \" + score + \" points out of 17! Your relationship probably needs a bit of work to take it from good to great. Search for \\\"Relationship balance or Passion trap in the internet.\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(this, \"Congratulations! You scored \" + score + \" points out of 17! You seem to have a good and balanced relationship with your partner.\", Toast.LENGTH_LONG).show();\n }\n score = 0;\n }", "private void study(String studyToolId) {\n String[][] questionsAndAnswers = studyToolManager.fetchQuestionsAndAnswers(studyToolId);\n String templateId = studyToolManager.getStudyToolTemplateId(studyToolId);\n TemplateManager.TemplateType templateType = templateManager.getTemplateType(Integer.parseInt(templateId));\n List<Object> timeInfo = templateManager.getTimeInfo(templateId);\n boolean isTimed = (Boolean) timeInfo.get(0);\n boolean isTimedPerQuestion = (Boolean) timeInfo.get(1);\n long timeLimitInMS = 1000 * (Integer) timeInfo.get(2);\n long quizStartTime = System.currentTimeMillis();\n int total_score = questionsAndAnswers.length;\n int curr_score = 0;\n Queue<String[]> questionsToRepeat = new LinkedList<>();\n AnswerChecker answerChecker = studyToolManager.getAnswerChecker(studyToolId);\n for (String[] qa : questionsAndAnswers) {\n long questionStartTime = System.currentTimeMillis();\n studyToolDisplayer.displayAQuestion(qa);\n regularPresenter.getAnswerPrompter(templateType);\n String answer = scanner.nextLine();\n boolean correctness = answerChecker.isCorrectAnswer(answer, qa[1]);\n if (templateType.equals(TemplateManager.TemplateType.FC) && !correctness) {\n // TODO: make this depend on template's configuration\n questionsToRepeat.add(qa);\n }\n long questionTimeElapsed = System.currentTimeMillis() - questionStartTime;\n if (isTimed && isTimedPerQuestion && (questionTimeElapsed >= timeLimitInMS)) {\n regularPresenter.ranOutOfTimeReporter();\n } else {\n curr_score += (correctness ? 1 : 0);\n regularPresenter.correctnessReporter(correctness);\n }\n regularPresenter.pressEnterToShowAnswer();\n scanner.nextLine();\n studyToolDisplayer.displayAnAnswer(qa);\n }\n //FC only, for repeating wrong questions until all is memorized\n while (!questionsToRepeat.isEmpty()) {\n String[] qa = questionsToRepeat.poll();\n studyToolDisplayer.displayAQuestion(qa);\n regularPresenter.getAnswerPrompter(templateType);\n String answer = scanner.nextLine();\n boolean correctness = answerChecker.isCorrectAnswer(answer, qa[1]);\n if (!correctness) {\n questionsToRepeat.add(qa);\n }\n regularPresenter.correctnessReporter(correctness);\n regularPresenter.pressEnterToShowAnswer();\n studyToolDisplayer.displayAnAnswer(qa);\n }\n long quizTimeElapsed = System.currentTimeMillis() - quizStartTime;\n if (isTimed && !isTimedPerQuestion && (quizTimeElapsed >= timeLimitInMS)){\n regularPresenter.ranOutOfTimeReporter();\n }\n else if (templateManager.isTemplateScored(templateId)) {\n String score = curr_score + \"/\" + total_score;\n regularPresenter.studySessionEndedReporter(score);\n }\n }", "public static void main(String[] args){\n int studentId = promptUserForInt(\"Please enter your Student EMPLID (0 - 999999): \");\n double quiz1Percent = promptUserForDouble(\"Please enter your quiz1 percentage score(0.0 - 100.0): \");\n double quiz2Percent = promptUserForDouble(\"Please enter your quiz2 percentage score(0.0 - 100.0): \");\n double quiz3Percent = promptUserForDouble(\"Please enter your quiz3 percentage score(0.0 - 100.0): \");\n int ageInMonths = promptUserForInt(\"Please enter your age in months (0 - 1440): \");\n double tempC = promptUserForDouble(\"Please enter the current temperature in degrees Celsius: \");\n\n // Output results\n System.out.println(\"\\n\");\n System.out.println(\"*** Thank You ***\");\n System.out.println(\"Student EMPLID: \" + studentId);\n System.out.println(\"Quiz 1 Score: \" + quiz1Percent);\n System.out.println(\"Quiz 2 Score: \" + quiz2Percent);\n System.out.println(\"Quiz 3 Score: \" + quiz3Percent);\n System.out.println(\"Average Quiz Score: \" + averageQuizScore(quiz1Percent, quiz2Percent, quiz3Percent));\n System.out.println(\"Age in Months: \" + ageInMonths);\n System.out.println(\"Age in years: \" + convertAgeToYears(ageInMonths));\n System.out.println(\"Temperature in Celsius \" + tempC + \"\\u00b0\");\n System.out.println(\"Temperature in Fahrenheit \" + convertCelcToFahr(tempC) + \"\\u00b0\");\n\n }", "public void calculateFinalPoints() {\n int finalPoints = 0;\n for (final Entry<Question, ExamResultAnswers> entry : submittedAnswers.entrySet()) {\n final Question question = entry.getKey();\n double partialPoint = 0;\n final double pointStep = (double) question.getPoints() / question.getAnswers().size();\n final Iterator<Answer> correctAnswers = question.getAnswers().iterator();\n final Iterator<Answer> studentAnswers = entry.getValue().getAnswers().iterator();\n while (correctAnswers.hasNext() && studentAnswers.hasNext()) {\n final Answer studentAnswer = studentAnswers.next();\n final Answer correctAnswer = correctAnswers.next();\n if (question.getType() == QuestionType.FILL_IN_THE_BLANK) {\n if (studentAnswer.getText().trim().equalsIgnoreCase(correctAnswer.getText().trim())) {\n partialPoint += pointStep;\n } else {\n if (exam.getEvaluationMethod() == WrongAnswerEvaluationMethod.SUBTRACTION) {\n partialPoint -= pointStep;\n }\n }\n } else if (question.getType() == QuestionType.SINGLE_CHOICE) {\n // A single choice brings only points if the ONE correct one is chosen, otherwise always zero points\n if (studentAnswer.isRightAnswer() == correctAnswer.isRightAnswer()\n && correctAnswer.isRightAnswer()) {\n partialPoint += question.getPoints();\n break;\n } else if (studentAnswer.isRightAnswer() && !correctAnswer.isRightAnswer()) {\n partialPoint = 0;\n break;\n }\n } else if (question.getType() == QuestionType.MULTIPLE_CHOICE) {\n if (studentAnswer.isRightAnswer() == correctAnswer.isRightAnswer()) {\n partialPoint += pointStep;\n } else {\n if (exam.getEvaluationMethod() == WrongAnswerEvaluationMethod.SUBTRACTION) {\n partialPoint -= pointStep;\n }\n }\n }\n }\n if (partialPoint < 0) {\n partialPoint = 0;\n }\n finalPoints += (int) Math.round(partialPoint);\n }\n points = finalPoints;\n final int maxPoints = exam.getMaxPoints();\n passed = (finalPoints / (double) maxPoints) * 100 >= exam.getMinPoints();\n }", "private void checkAnswers() {\n\n //fetch the SolutionInts\n String[] solutionTags = currentTask.getSolutionStringArray();\n\n //fetch the userInput\n String[] userSolution = new String[solutionTags.length];\n for (int i = 0; i < solutionTags.length; i++) {\n LinearLayout linearLayout = currentView.findViewWithTag(i);\n userSolution[i] = (String) linearLayout.getChildAt(0).getTag();\n }\n\n Log.i(\"M_ORDER\",\"solutiontags: \"+ Arrays.toString(solutionTags) +\" usertags:\"+ Arrays.toString(userSolution));\n Date ended;\n if (Arrays.equals(solutionTags, userSolution)) {\n ended = Calendar.getInstance().getTime();\n String duration = progressController.calculateDuration(entered, ended);\n progressController.makeaDurationLog(getContext(),Calendar.getInstance().getTime(), \"EXERCISE_ORDER_FRAGMENT_RIGHT\", \"number: \" + currentTask.getTaskNumber() + \" section: \"+currentTask.getSectionNumber()+\" viewtype: \"+currentTask.getExerciseViewType()+\" userInput: \" + Arrays.toString(userSolution),duration);\n mListener.sendAnswerFromExerciseView(true);\n Log.i(\"M_EXERCISE_VIEW_ORDER\", \" send answer: true\");\n } else {\n Log.i(\"ANSWER\", \" was wrong\");\n ended = Calendar.getInstance().getTime();\n String duration = progressController.calculateDuration(entered, ended);\n progressController.makeaDurationLog(getContext(),Calendar.getInstance().getTime(), \"EXERCISE_ORDER_FRAGMENT_WRONG\", \"number: \" + currentTask.getTaskNumber() + \" section: \"+currentTask.getSectionNumber()+\" viewtype: \"+currentTask.getExerciseViewType()+\" userInput: \" + Arrays.toString(userSolution),duration);\n mListener.sendAnswerFromExerciseView(false);\n Log.i(\"M_EXERCISE_VIEW_ORDER\", \" send answer: false\");\n }\n }" ]
[ "0.6820319", "0.67668843", "0.66955215", "0.66727054", "0.65507185", "0.6538062", "0.6512828", "0.6465021", "0.63881063", "0.6353131", "0.6291679", "0.6291255", "0.6282826", "0.62781584", "0.62650937", "0.6258798", "0.624194", "0.624032", "0.6223562", "0.6206105", "0.61925775", "0.61651146", "0.61515987", "0.61439073", "0.6135907", "0.6135021", "0.6116841", "0.6115592", "0.6096554", "0.6087511", "0.6086219", "0.6083787", "0.6081829", "0.60775286", "0.60626376", "0.6060186", "0.6060024", "0.60494834", "0.6040506", "0.6016027", "0.60131663", "0.6011734", "0.6007986", "0.59917074", "0.5969311", "0.5966284", "0.5961002", "0.5959541", "0.59313864", "0.5913253", "0.591214", "0.5903282", "0.58901966", "0.587201", "0.5867681", "0.5862732", "0.5857312", "0.5853402", "0.58512783", "0.5845595", "0.584074", "0.5833853", "0.5831613", "0.58313197", "0.5831291", "0.5827004", "0.5820202", "0.58171976", "0.5816899", "0.57995075", "0.5797572", "0.5792318", "0.57841164", "0.5779172", "0.5778718", "0.5774575", "0.5771559", "0.57670707", "0.5765848", "0.57562655", "0.57534236", "0.5752947", "0.5722477", "0.57221735", "0.5716944", "0.57131916", "0.570245", "0.5700351", "0.5699256", "0.56928724", "0.5691917", "0.56877255", "0.5673584", "0.56722724", "0.56692713", "0.56664294", "0.56610596", "0.5654291", "0.56531024", "0.5651783" ]
0.57468885
82
returns total number of words in the text file
public int getTotalNumberOfWords(File file) throws Exception{ BufferedReader br = new BufferedReader(new FileReader(file)); String line; int count = 0; while((line=br.readLine())!=null){ String[] tokens = line.split(" "); count+=tokens.length; } br.close(); return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int totalWord(File file) throws FileNotFoundException {\r\n Scanner scan = new Scanner(file); // scanner for scanning the file\r\n int count = 0;\r\n while (scan.hasNext()) // scan until end\r\n {\r\n String word = scan.next();\r\n if (isWord(word)) // is the content is a word than increase count by 1\r\n count++;\r\n }\r\n return count;\r\n }", "private static void wordCount(File fileEntry) throws FileNotFoundException {\n\t\tScanner sc = new Scanner(new FileInputStream(fileEntry));\n\t\t int count=0;\n\t\t while(sc.hasNext()){\n\t\t sc.next();\n\t\t count++;\n\t\t }\n\t\tSystem.out.println(\"Number of words: \" + count);\n\t\t\n\t\t\n\t}", "public static int getWordsNumber(String file) throws FileNotFoundException {\n File inputFile = new File(file);\n Scanner input = new Scanner(inputFile);\n\n int words = 0;\n while (input.hasNext()) {\n String value = input.next();\n words++;\n }\n\n input.close();\n\n return words;\n }", "private static int numberOfWordsInFile(SimpleReader fileReader) {\r\n int numberOfWordsInFile = 0;\r\n Set<Character> separators = createSeparators();\r\n /*\r\n * Above: creates the set of characters used to determine what is and is\r\n * not a word\r\n */\r\n /*\r\n * Below: begin to read through the file and count the words\r\n */\r\n while (!fileReader.atEOS()) {\r\n String toRead = fileReader.nextLine();\r\n int position = 0;\r\n\r\n while (position < toRead.length()) {\r\n String nextWordOrSep = nextWordOrSeparator(toRead, position,\r\n separators);\r\n position += nextWordOrSep.length();\r\n if (!separators.contains(nextWordOrSep.charAt(0))\r\n && !nextWordOrSep.equals(\"\")) {\r\n numberOfWordsInFile++;\r\n }\r\n /*\r\n * if the word contains a separator then it's not a word, so\r\n * don't add to the word count.\r\n */\r\n }\r\n\r\n }\r\n return numberOfWordsInFile;\r\n }", "public static String wordCounting(File file)\n {\n return null;\n }", "int totalWords();", "public void countWords(File sourceFile) throws IOException {\n Scanner wordScanner = new Scanner(sourceFile);\n// wordScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n wordScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n addWordToMap(wordScanner);\n wordScanner.close(); // Close underlying file.\n }", "public void countWords(String path) {\n\t\n//\t\tdeclaration and initialization\n\t\tFile file = new File(path);\n\t\tString str = \"\",word = \"\";\n\t\tBufferedReader br;\n\t\tint counter = 1;\n\t\t\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t\t\n//\t\t\tReads the file lines until eof\n\t\t\twhile ((str = br.readLine()) != null) {\n\t\t\t\tword = word.concat(str);\n\t\t\t}\n\t\t\t\n//\t\t\tReplace both comma and dot with whitespace\n\t\t\tword = word.replace(',',' ');\n\t\t\tword = word.replace('.',' ');\n\t\t\t\n//\t\t\tSplit the string using space\n\t\t\tString[] words = word.split(\"\\\\s+\");\n\t\n//\t\t\tCompare the words and if they are same words increase the counter\n\t\t\tfor (int i = 0; i < words.length; i++){\n\t\t\t\tfor(int j = i+1; j < words.length; j++){\n\t\t\t\t\tif(words[i] != null && words[i].equals(words[j]) ){\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\twords[j] = null; //replace the repeated word with null\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n//\t\t\t\tdisplays the count of the words\n\t\t\t\tif(words[i] != null)\n\t\t\t\tSystem.out.println(words[i]+\": \"+counter);\n\t\t\t\tcounter = 1;\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IO Exception\");\n\t\t}\n\t}", "public int getNumWords() {\n return wordMap.get(\"TOTAL_WORDS\").intValue();\n }", "public int getTotalUniqueWords(File file) throws Exception{\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\tString line;\n\t\tSet<String> set = new HashSet<>();\n\t\twhile((line=br.readLine())!=null){\n\t\t\tString[] tokens = line.split(\" \");\n\t\t\tfor(String token : tokens){\n\t\t\t\tif(!set.contains(token)){\n\t\t\t\t\tset.add(token);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tbr.close();\n\t\treturn set.size();\n\t}", "public int getWordCount() {\n return totalWords;\n }", "public int total() {\n\t \treturn totalWords;\n\t }", "public long getNumberOfWords() {\n return numberOfWords;\n }", "private static int[] countWordsInFile(String fileToParse, String[] searchWords) throws FileNotFoundException {\n\n int[] wordCounter = new int[searchWords.length];\n\n FileReader searchFile = new FileReader(fileToParse);\n Scanner sc = new Scanner(searchFile);\n while (sc.hasNext()) {\n String word = sc.next();\n for (int i = 0; i < searchWords.length; i++) {\n if (matchSearchWord(word, searchWords[i]))\n wordCounter[i]++;\n }\n\n }\n sc.close();\n return wordCounter;\n\n }", "public void testCountWordLengths() {\n FileResource fr = new FileResource(\"data/smallHamlet.txt\");\n int[] counts = new int[31];\n countWordLengths(fr, counts);\n }", "public int getWordCount(){\r\n\t\treturn wordCount;\r\n\t}", "public int count(){\r\n\t\tint sum = 0;\r\n for(Integer value: words.values()){\r\n sum += value;\r\n }\r\n return sum;\r\n\t}", "public int getNumWords() {\n // TODO: count the number of distinct words,\n // ie. the number of non-null counter objects.\n int count = 0;\n for (int i = 0; i < counters.length; i++){\n if (counters[i] != null) {\n count++;\n }\n }\n return count;\n }", "public int distinctCount(){\r\n int distinct = 0;\r\n //Loop through each key in words\r\n for(String key: words.keySet()){\r\n //If they appear in the file\r\n if(words.get(key) != 0){\r\n //count it\r\n distinct++;\r\n }\r\n }\r\n return distinct;\r\n\t}", "public static void wordCount(String filename) {\n SparkConf conf = new SparkConf().setMaster(\"local\").setAppName(\"Word count App\");\n\n // create a java version of the spark context from the configuration\n JavaSparkContext sc = new JavaSparkContext(conf);\n\n // load input data, which is a text file read main\n // the repartition breaks up the document into 20 segments for parallelism\n JavaRDD<String> input = sc.textFile( filename ).repartition(20);\n // split input string into words\n JavaRDD<String> words = input.flatMap(s -> Arrays.asList(s.split(\" \")));\n\n // transform the collection of words into pairs (word and 1). We do not use a combiner here\n JavaPairRDD<String, Integer> counts = words\n // lowercase, remove apostrophes, grammar and lowercase\n .map(p -> p.replaceAll(\"(')|(\\\\W)\", \"$1\"))\n .map(r -> r.replaceAll(\"[^a-zA-Z ]\", \"\"))\n .map(q -> q.toLowerCase())\n\n .mapToPair(t -> new Tuple2( t, 1 ) )\n .partitionBy(new HashPartitioner(4))\n // this is reducing that parallelism back to one\n .reduceByKey( (x, y) -> (int)x + (int)y )\n .coalesce(1);\n\n counts.saveAsTextFile(\"src/main/java/resources/output\");\n }", "private void countWords(String text, String ws) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8))));\n String line;\n\n // Get words and respective count\n while (true) {\n try {\n if ((line = reader.readLine()) == null)\n break;\n String[] words = line.split(\"[ ,;:.?!“”(){}\\\\[\\\\]<>']+\");\n for (String word : words) {\n word = word.toLowerCase();\n if (\"\".equals(word)) {\n continue;\n }\n if (lista.containsKey(word)){\n lista.get(word).add(ws);\n }else{\n HashSet<String> temp = new HashSet<>();\n temp.add(ws);\n lista.put(word, temp);\n }\n\n /*if (!countMap.containsKey(word)) {\n countMap.put(word, 1);\n }\n else {\n countMap.put(word, countMap.get(word) + 1);\n }*/\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n // Close reader\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Display words and counts\n /*for (String word : countMap.keySet()) {\n if (word.length() >= 3) { // Shall we ignore small words?\n //System.out.println(word + \"\\t\" + countMap.get(word));\n }\n }*/\n }", "public int getWordCount()\n {\n return m_iWordCount;\n }", "public int getWordLength();", "public static int countWords(String text) throws UIMAException { \n JCas jCas = JCasFactory.createJCas();\n jCas.setDocumentText(text);\n jCas.setDocumentLanguage(\"en\");\n initEngines();\n\n runPipeline(jCas, segmenter); \n \n int cnt = 0; \n for (Token tok : select(jCas, Token.class)) {\n String token = tok.getCoveredText();\n if (token.matches(\"\\\\p{Alpha}*\")) cnt++;\n }\n \n return cnt;\n }", "public int getWordCount() {\n return wordCount;\n }", "public int size(){\n return words.size();\n }", "public int count(String word);", "int getWordCount() {\r\n return entrySet.size();\r\n }", "int size() {\r\n\t\treturn m_words.size();\r\n\t}", "public int getWordCount() {\n\t\treturn 10;\n\t}", "public void count(String dataFile) {\n\t\tScanner fileReader;\n\t\ttry {\n\t\t\tfileReader= new Scanner(new File(dataFile));\n\t\t\twhile(fileReader.hasNextLine()) {\n\t\t\t\tString line= fileReader.nextLine().trim(); \n\t\t\t\tString[] data= line.split(\"[\\\\W]+\");\n\t\t\t\tfor(String word: data) {\n\t\t\t\t\tthis.wordCounter= map.get(word);\n\t\t\t\t\tthis.wordCounter= (this.wordCounter==null)?1: ++this.wordCounter;\n\t\t\t\t\tmap.put(word, this.wordCounter);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfileReader.close();\n\t\t}\n\t\tcatch(FileNotFoundException fnfe) {\n\t\t\tSystem.out.println(\"File\" +dataFile+ \"can not be found.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public int totalWordsTree() {\r\n\t\treturn count;\r\n\t}", "public int getWordSize(){\n\t\treturn word.length;\n\t}", "@Override\r\n\tpublic Long call() throws Exception {\r\n\t\tString line;\r\n\t\tchar [] wordArray;\r\n\t\tint i;\r\n\t\tchar c;\r\n\t\ttry {\r\n\t\t\tline = setOfLines.take();\r\n\t\t\tString[] words = line.replaceAll(\"\\\\s+\", \" \").split(\" \");\r\n\t\t\t\r\n\t\t\tfor(String word : words) {\r\n\t\t\t\twordArray = word.toCharArray();\r\n\t\t\t\tfor(i=0;i<wordArray.length;i++) {\r\n\t\t\t\t\tc = wordArray[i];\r\n\t\t\t\t\tif(countNumbers ? (!((c>64&&c<91)||(c>96 &&c<123)||(c>47&&c<58))) : (!((c>64&&c<91)||(c>96 &&c<123))) ) {\r\n\t\t\t\t\t\tword = word.replace(c+\"\",\"\" );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(word.isEmpty()) continue;\r\n\t\t\t\tsynchronized (this) {\r\n\t\t\t\t\tif(wordCount.containsKey(word)) {\r\n\t\t\t\t\t\twordCount.put(word, (wordCount.get(word)+1));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\twordCount.put(word, 1);\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (InterruptedException e) {\r\n\t\t\tcustomFile.setErrorString(\"An Error occurred while processing this file, word count may not\"\r\n\t\t\t\t\t+\"be accurate\");\r\n\t\t\t\r\n\t\t\tlogger.error(e);\r\n\t\t}\r\n\t\treturn new Long(0);\r\n\t}", "public int getWordCount() {\n\t\treturn list.size();\n\t}", "public int getTotalUniqueWords() {\n return totalUniqueWords;\n }", "private static void wordCountWithMap() throws FileNotFoundException {\n Map<String, Integer> wordCounts = new HashMap<String, Integer>();\n\n Scanner input = new Scanner(new File(fileLocation));\n while (input.hasNext()) {\n String word = input.next();\n if (!wordCounts.containsKey(word)) {\n wordCounts.put(word, 1);\n } else {\n int oldValue = wordCounts.get(word);\n wordCounts.put(word, oldValue + 1);\n }\n }\n\n String term = \"test\";\n System.out.println(term + \" occurs \" + wordCounts.get(term));\n\n // loop over the map\n for (String word : wordCounts.keySet()) {\n int count = wordCounts.get(word);\n if (count >= 500) {\n System.out.println(word + \", \" + count + \" times\");\n }\n }\n\n }", "public int getLength() { return this.words.size(); }", "public int getDocLength(String fileName){\n\t\tfor (Map.Entry<String, IndexedDoc> set : index.entrySet()){\r\n\t\t\tif (fileName == set.getKey()){\r\n\t\t\t\treturn set.getValue().getTotalTerms();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "int countFile(File file) {\n return readFile(file).length;\n }", "private int getTotalLetters(File trainDir) {\r\n\t\tint totalCharacterCount = 0;\r\n\t\tfor(File file : trainDir.listFiles()){\r\n\t\t\ttry{\r\n\t\t\t\t// open file\r\n\t\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\t\t\r\n\t\t\t\twhile(br.ready()){\r\n\t\t\t\t\t// read a character and increment our counter if it is \r\n\t\t\t\t\t// a valid character (a-z, A-Z, ' ')\r\n\t\t\t\t\tchar c = (char) br.read();\r\n\t\t\t\t\tif(String.valueOf(c).matches(\"[A-Za-z ]\")){\r\n\t\t\t\t\t\ttotalCharacterCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(FileNotFoundException e){\r\n\t\t\t\tSystem.err.println(\"Failed to Find File: \" + file.toString());\r\n\t\t\t}\r\n\t\t\tcatch(IOException ioe){\r\n\t\t\t\tSystem.err.println(ioe.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn totalCharacterCount;\r\n\t}", "@Override\r\n public Integer numberOfWords(InputStream ins, boolean isWordModel) throws Exception {\n return null;\r\n }", "public int totalWords(Node root) {\r\n\t\t\r\n\t\tif(root == null) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\t//System.out.println(\"The count for \" + root.getData() + \" is \" + root.getCount());\r\n/////////////////////////////////////////////////////////////////\r\n/// adds the count of the node root to the sum\t\t\t ///\r\n/////////////////////////////////////////////////////////////////\r\n\t\tsum = sum + root.getCount();\r\n\t\t\r\n\t\ttotalWords(root.getlChild());\r\n\t\ttotalWords(root.getrChild());\r\n\t\t\r\n\t\treturn sum;\r\n\t}", "public static int getNumWords( List<String> words ) {\n if ( words != null && ! words.isEmpty() ) \n return words.size();\n else \n return 0;\n }", "public int countWords(String input) {\n if (input == null || input.isEmpty()) {\n return 0;\n }\n String[] words = input.split(\"\\\\s+\");\n return words.length;\n }", "int count(String s) {\r\n\t\tif (m_words.containsKey(s)) {\r\n\t\t\treturn m_words.get(s);\r\n\t\t} else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public int numWords(int length) {\r\n return 0;\r\n }", "public static int getSize(){\n Scanner input;\n \n \n File f = new File(fName);\n \n \n int size = 0;\n \n try{\n input = new Scanner(f);\n input.nextLine();\n \n while(input.hasNextLine()){\n input.nextLine();\n size++;\n \n }\n input.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n return size;\n}", "int computeNumberOfLines(String text);", "public boolean count()\n {\n if(!textReaderWriter.initTextReader(fileName))\n return false;\n\n while(textReaderWriter.hasNextString()) {\n String temp = textReaderWriter.readOneString();\n String[] wordsTable = temp.split(\" \");\n for (int i = 0; i < wordsTable.length; i ++) // go throw words in a 1 line\n {\n for (StringPattern stringPattern : stringPatternList) { // go throw patterns\n if(containsPattern(stringPattern.getPattern(), wordsTable[i]))\n {\n stringPattern.incrementCountWords();\n }\n }\n }\n }\n return true;\n }", "public long getCount(String word) throws FileNotFoundException,IOException{\n\t\tlong count=0;\n\t\tLong cacheCount=counts.get(word);\n\t\tif(cacheCount==null){\n\t\t\tsynchronized(this){\n\t\t\t\ttry(BufferedReader inputFile=new BufferedReader(new FileReader(GlobalResources.FILE_PATH))){\n\t\t\t\t\tString line=inputFile.readLine();\n\t\t\t\t\tStringTokenizer tokenizer=null;\n\t\t\t\t\twhile(line!=null){\n\t\t\t\t\t\ttokenizer=new StringTokenizer(line);\n\t\t\t\t\t\tString token=null;\n\t\t\t\t\t\twhile(tokenizer.hasMoreElements()){\n\t\t\t\t\t\t\ttoken=(String)tokenizer.nextElement();\n\t\t\t\t\t\t\tif(token.equalsIgnoreCase(word))count++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tline=inputFile.readLine();\n\t\t\t\t\t}\n\t\t\t\t}catch(FileNotFoundException fileNotFoundException){\n\t\t\t\t\tSystem.out.println(\"FileNotFoundException in class FileDAO : method : getCount(String) \"+fileNotFoundException.getMessage());\n\t\t\t\t\tthrow fileNotFoundException;\n\t\t\t\t}catch(IOException ioException){\n\t\t\t\t\tSystem.out.println(\"IOException in class FileDAO : method : getCount(String) \"+ioException.getMessage());\n\t\t\t\t\tthrow ioException;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounts.put(word, count);\n\t\t}else{\n\t\t\tcount=cacheCount.longValue();\n\t\t}\n\t\treturn count;\n\t}", "public int getEntryCount() {\n return wordFrequency.size();\n }", "public int getFrequencyOf(String word) {\r\n\t\tint frequency = 0;\r\n\t\tif (readDocument != null) {\r\n\t\t\tfrequency = readDocument.getFrequencyOf(word);\r\n\t\t\tSystem.out.println(\"Frequency: \" + frequency);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t\treturn frequency;\r\n\t}", "protected final static int numWords( final long size ) {\n\t\tif ( ASSERTS ) assert ( size + WORD_MASK ) >>> LOG2_BITS_PER_WORD <= Integer.MAX_VALUE;\n\t\treturn (int)( ( size + WORD_MASK ) >>> LOG2_BITS_PER_WORD );\n\t}", "int maxLength() {\n try (Stream<String> words = Files.lines(dictionary)) {\n return words.mapToInt(String::length).max().orElse(0);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "int getFileCount();", "public static void countWords(String text, HashMap<String, Integer> counts){\n\t\tStringTokenizer st = new StringTokenizer(text);\n\t\tString currWord = null;\n\t\twhile(st.hasMoreTokens()){\n\t\t\tcurrWord = st.nextToken();\n\t\t\tif(counts.containsKey(currWord)){\n\t\t\t\tcounts.put(currWord, counts.get(currWord)+1);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcounts.put(currWord, 1);\n\t\t\t}\n\t\t}\n\t}", "public int getWordsQuantity(){\n\t\treturn counter;\n\t}", "public int countOfKnownWord() {\n\t\tint count = 0;\t\t\n\t\ttry {\n \t\t\tClass.forName(DRIVER);\n \t\t} catch (ClassNotFoundException e1) {\n \t\t\t// TODO Auto-generated catch block\n \t\t\te1.printStackTrace();\n \t\t}\t\t\n\t\ttry ( Connection con = DriverManager.getConnection(URL, USER, PW)) {\n\t\t\tStatement stmt = con.createStatement();\n\t\t\tString sql;\n\t\t\tsql = \"SELECT count(*) countWordLevel from \" + tbl_USER_DIC + \" WHERE \" + Constants.FLD_KNOW + \" = \" + Constants.WORD_KNOWN + \";\";\n\t\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t\twhile (rs.next()) {\n\t\t\t\tcount = rs.getInt(\"countWordLevel\");\n\t\t\t}\n\t\t\t\n\t stmt.close();\n\t con.close();\n\t\t} catch(Exception e) {\n\t\t\tlogger.info(\"fail to open mysql\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn count;\t\n\t}", "public static int countWords(String str) {\r\n return str.split(\" \").length;\r\n }", "private static void ProcessFile(File fileEntry) throws FileNotFoundException {\n \n\t wordCount(fileEntry) ;\n\t\t\n countVowels(fileEntry);\n\t\n\t\t\n}", "public static int countWords(final List<String> tokens) {\n\tint nWords = 0;\n\n\tfor (final String token : tokens) {\n\t if (!StringUtils.isComposedOf(token, ALL_DELIMS)) {\n\t\tnWords++;\n\t }\n\t}\n\n\treturn nWords;\n }", "@Override\n public int getNumberOfWords(int count) {\n return restOfSentence.getNumberOfWords(count + 1);\n }", "public int size() {\n return this.wordNumber;\n }", "private void getWordCounts() {\n Map<String, List<String>> uniqueWordsInClass = new HashMap<>();\n List<String> uniqueWords = new ArrayList<>();\n\n for (ClassificationClass classificationClass : classificationClasses) {\n uniqueWordsInClass.put(classificationClass.getName(), new ArrayList<>());\n }\n\n for (Document document : documents) {\n String[] terms = document.getContent().split(\" \");\n\n for (String term : terms) {\n if (term.isEmpty()) {\n continue;\n }\n if (!uniqueWords.contains(term)) {\n uniqueWords.add(term);\n }\n\n for (ClassificationClass docClass : document.getClassificationClasses()) {\n if (!uniqueWordsInClass.get(docClass.getName()).contains(term)) {\n uniqueWordsInClass.get(docClass.getName()).add(term);\n }\n if (totalWordsInClass.containsKey(docClass.getName())) {\n this.totalWordsInClass.put(docClass.getName(), this.totalWordsInClass.get(docClass.getName()) + document.getFeatures().get(term));\n } else {\n this.totalWordsInClass.put(docClass.getName(), document.getFeatures().get(term));\n }\n }\n }\n }\n\n this.totalUniqueWords = uniqueWords.size();\n }", "private int getSize(File f) {\n int lines = 0;\n try {\n Scanner s = new Scanner(f);\n while (s.hasNextLine()) {\n s.nextLine();\n lines++;\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return lines;\n }", "@Override\n public int getNumberOfWords() {\n return 0;\n }", "public void countWords(String source) {\n Scanner wordScanner = new Scanner(source);\n// wordScanner.useDelimiter(\"[^A-Za-z]+\");\n wordScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n addWordToMap(wordScanner);\n }", "public int getTermFreq(String fileName, Term t){\n\t\tint freq = 0;\r\n\t\tfor (Map.Entry<String, IndexedDoc> set : index.entrySet()){\r\n\t\t\tif (set.getKey()==fileName){\r\n\t\t\t\treturn set.getValue().termCount(t);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn freq;\r\n\t}", "public int getMainNodeWordCount(MainNode node) {\n return node.wordCount;\n }", "public static int countWord(Scanner s, String word){\n\t\t\n\t\tint count = 0;\n\t\t\n\t\twhile(s.hasNext()){\n\t\t\t\n\t\t\t//checks to see if next token equals word if so increment count\n\t\t\tif(s.next().equalsIgnoreCase(word)){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public int numWords(int length) {\r\n int numOfLength = 0;\r\n \r\n //Check amt. of words in this dictionary that are == to length input\r\n \tfor (int word = 0; word < dictionary.size(); word++) {\r\n \tif (dictionary.get(word).length() == length)\r\n \t\tnumOfLength++;\r\n }\r\n \treturn numOfLength;\r\n }", "abstract public int docFreq(Term t) throws IOException;", "public int numWordsCurrent() {\r\n return 0;\r\n }", "int getFileNamesCount();", "int getFileNamesCount();", "public static int getWordlenght() {\r\n\t\treturn lenght;\r\n\t}", "private int numEnglishWords(String str) {\n int numWords = 0;\n String[] strings = str.split(\" \");\n for (String word : strings) {\n if (english.contains(word)) {\n numWords ++;\n }\n }\n return numWords;\n }", "public int countOfUnknownWord() {\n\t\tint count = 0;\t\t\n\t\ttry {\n \t\t\tClass.forName(DRIVER);\n \t\t} catch (ClassNotFoundException e1) {\n \t\t\t// TODO Auto-generated catch block\n \t\t\te1.printStackTrace();\n \t\t}\t\t\n\t\ttry ( Connection con = DriverManager.getConnection(URL, USER, PW)) {\n\t\t\tStatement stmt = con.createStatement();\n\t\t\tString sql;\n\t\t\tsql = \"SELECT count(*) countWordLevel from \" + tbl_USER_DIC + \" WHERE \" + Constants.FLD_KNOW + \" = \" + Constants.WORD_UNKNOWN + \";\";\n\t\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t\twhile (rs.next()) {\n\t\t\t\tcount = rs.getInt(\"countWordLevel\");\n\t\t\t}\n\t\t\t\n\t stmt.close();\n\t con.close();\n\t\t} catch(Exception e) {\n\t\t\tlogger.info(\"fail to open mysql\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn count;\t\n\t}", "public int numWords(int length) {\r\n \tint num = 0;\r\n \tfor (String s : words) {\r\n \t\tif (s.length() == length) {\r\n \t\t\tnum++;\r\n \t\t}\r\n \t}\r\n return num;\r\n }", "public int getSizeWord(){\r\n\t\tint size;\r\n\t\tif (wordSelected != null)\r\n\t\t\tsize = wordSelected.length();\t\t\r\n\t\telse\r\n\t\t\tsize = 0;\r\n\t\t\r\n\t\treturn size;\t\t\r\n\t}", "public int getWordsPerTopic() {\n return topicWords == null ? 0 : topicWords.size();\n }", "public int amountPhrase(boolean split) throws IOException {\n if (StringUtils.isBlank(currentPath)) return 0;\n String sCurrentLine;\n int counter = 0;\n String[] temp_phrase = getSearchPhrase(split);\n while ((sCurrentLine = bufferReader.readLine()) != null) {\n for (String s : temp_phrase) {\n if (StringUtils.containsIgnoreCase(sCurrentLine, s)) {\n counter++;\n break;\n }\n }\n }\n return counter;\n }", "public void countTerm() throws IOException {\n\n long countBody = reader.getSumDocFreq(\"body\");\n long countTitle = reader.getSumDocFreq(\"title\");\n\n System.out.println(\"Body: \" + countBody);\n System.out.println(\"Title: \" + countTitle);\n System.out.println(\"Total count Terms: \" + (countTitle + countBody));\n\n }", "public static int countWords(String word, ArrayList<String> s){\n\t\tint n = 0;\n\t\tfor(String w : s){\n\t\t\tif(w.equals(word)){\n\t\t\t\tn++;\n\t\t\t}\n\t\t}\n\t\treturn n;\n\t}", "public void countWordLengthsWithIsLettermethod(FileResource resource, int[] counts) {\r\n for (String word : resource.words()) {\r\n String trim = word.trim();\r\n int wordSize = trim.length();\r\n char firstChar = trim.charAt(0);\r\n char endChar = trim.charAt(trim.length()-1);\r\n if (!Character.isLetter(firstChar) && !Character.isLetter(endChar)) {\r\n wordSize -= 2;\r\n } else \r\n if (!Character.isLetter(firstChar) || !Character.isLetter(endChar)) {\r\n wordSize -= 1;\r\n }\r\n if(wordSize>=counts.length) {\r\n counts[counts.length-1] += 1; \r\n } else\r\n //right algorithm\r\n if( wordSize> 0 && counts[wordSize] != 0 ) {\r\n counts[wordSize] += 1;\r\n \r\n } else if ( wordSize> 0) {\r\n counts[wordSize] = 1;\r\n }\r\n }\r\n \r\n //test\r\n for(int i : counts) {\r\n System.out.println(i);\r\n }\r\n }", "int countFile(String path) {\n return readFile(path).length;\n }", "@Test\r\n\tpublic void ifWordsAreGivenShouldReturnTheCountOfEachWord() throws FileNotFoundException\r\n\t{\n\t\t\r\n\t\t\r\n\t\tMap<String, Long> words = new HashMap<String, Long>();\r\n\t\t\r\n\t\tList<String> list = new ArrayList<String>(Arrays.asList(\"Hi,\",\"How\",\"are\",\"you.\",\"Hope\",\"you\",\"are\",\"fine.\"));\r\n\t\t\r\n\t\tMap<String, Long> vwords=new HashMap<String, Long>();\r\n\t\t\r\n\t\tvwords.put(\"Hi,\", 1L);\r\n\t\tvwords.put(\"How\", 1L);\r\n\t\tvwords.put(\"are\", 2L);\r\n\t\tvwords.put(\"you.\", 1L);\r\n\t\tvwords.put(\"Hope\", 1L);\r\n\t\tvwords.put(\"you\", 1L);\r\n\t\tvwords.put(\"fine.\", 1L);\r\n\t\t\r\n\t\twords=CountOfWords.CountEachWords(list);\r\n\t\t\r\n\t\tassertThat(vwords, is(words));\r\n\t\t\r\n//\t\tvwords.equals(new File(\"C:\\\\Users\\\\Nimmy\\\\OneDrive\\\\Desktop\\\\Java Program\\\\demo.txt\")); \r\n\t\r\n\r\n\r\n}", "public static int getTermFreq (String dirPath, Set<String> terms) {\r\n\t\tAtomicInteger freq = new AtomicInteger(0);\r\n\t\ttry {\r\n\t\t\tPath currentWorkingPath = Paths.get(dirPath).toAbsolutePath();\r\n\t\t\t// This is our standard \"walk through all .txt files\" code.\r\n\t\t\tFiles.walkFileTree(currentWorkingPath, new SimpleFileVisitor<Path>() {\r\n\r\n\t\t\t\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\r\n\t\t\t\t\t// make sure we only process the current working directory\r\n\t\t\t\t\tif (currentWorkingPath.equals(dir)) {\r\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tpublic FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {\r\n\r\n\t\t\t\t\tif (file.toString().endsWith(\".txt\")) {\r\n\r\n\t\t\t\t\t\tTokenStream tokenStream = null;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\ttokenStream = Utils.getTokenStreams(file.toFile());\r\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\twhile (tokenStream.hasNextToken()) {\r\n\r\n\t\t\t\t\t\t\tString token = Utils.processWord(tokenStream.nextToken().trim(), false);\r\n\t\t\t\t\t\t\tif (terms.contains(token)) {\r\n\t\t\t\t\t\t\t\tfreq.incrementAndGet();\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\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// don't throw exceptions if files are locked/other errors occur\r\n\t\t\t\tpublic FileVisitResult visitFileFailed(Path file, IOException e) {\r\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn freq.get();\r\n\t}", "public void countWord() {\n\t\tiniStorage();\n\t\tWordTokenizer token = new WordTokenizer(\"models/jvnsensegmenter\",\n\t\t\t\t\"data\", true);\n\t\t// String example =\n\t\t// \"Nếu bạn đang tìm kiếm một chiếc điện thoại Android? Đây là, những smartphone đáng để bạn cân nhắc nhất. Thử linh tinh!\";\n\t\t// token.setString(example);\n\t\t// System.out.println(token.getString());\n\n\t\tSet<Map.Entry<String, String>> crawlData = getCrawlData().entrySet();\n\t\tIterator<Map.Entry<String, String>> i = crawlData.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tMap.Entry<String, String> pageContent = i.next();\n\t\t\tSystem.out.println(pageContent.getKey());\n\t\t\tPageData pageData = gson.fromJson(pageContent.getValue(),\n\t\t\t\t\tPageData.class);\n\t\t\ttoken.setString(pageData.getContent().toUpperCase());\n\t\t\tString wordSegment = token.getString();\n\t\t\tString[] listWord = wordSegment.split(\" \");\n\t\t\tfor (String word : listWord) {\n\t\t\t\taddToDictionary(word, 1);\n\t\t\t\tDate date;\n\t\t\t\ttry {\n\t\t\t\t\tdate = simpleDateFormat.parse(pageData.getTime().substring(\n\t\t\t\t\t\t\t0, 10));\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\taddToStatByDay(date, word, 1);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner (System.in);\n System.out.println(\"Please enter a sentence:\");\n String sentence = sc.nextLine();\n System.out.println(numberOfWords(sentence));\n\n\n }", "public void addWordCount(){\r\n\t\twordCount = wordCount + 1;\r\n\t}", "public static void main(String[] args) {\n Scanner input = null;\r\n int allWords = 0;\r\n int threeLetterWords = 0;\r\n try {\r\n input = new Scanner(new File(\"prog512h.dat\"));\r\n } catch (FileNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n \r\n while(input.hasNext()){\r\n if (input.next().length() == 3){\r\n threeLetterWords++;\r\n }\r\n allWords++;\r\n }\r\n System.out.println(\"Three letter words comprised \" + 100*(threeLetterWords+0.0)/allWords + \"% of all words.\");\r\n \r\n }", "public int getNumberOfConcatenatedWords() {\n return concatenatedWords.size();\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tList<String> arrList = new ArrayList<String>();\n\t\tString [] arr;\n\t\tFileInputStream fis= new FileInputStream(\"coverletter.txt\");\n\t\tScanner file = new Scanner(fis);\n\t\t\n\t\twhile(file.hasNextLine()){\n\t\t\tString str = file.next();\n\t\t\t// separate each words from line and add to arraylist\n\t\t\tarr=str.split(\"\\\\s+ \");\n\t\t\t\n\t\t\tCollections.addAll(arrList, arr);\n\t\t\tSystem.out.println(str);\n\t\t}\n\t\tSystem.out.println(arrList.size());\n\t\tSystem.out.println(arrList);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*for(String s: arrList){\n\t\t\tSystem.out.println(s);\n\t\t}*/\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// count the words in the arraylist\n\t\t\n\t\t\n\t\t\n\n\t}", "@Test\n public void countNumberOfCharactersInWords() {\n final long count = 0; //TODO\n\n assertEquals(105, count);\n }", "public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }", "private void countCharactersInFile() {\n\t\ttry (BufferedReader reader = Files.newBufferedReader(sourceFile, CHARSET)) {\n\t\t\tfinal char[] buffer = new char[8192];\n\t\t\tint nb = -1;\n\t\t\twhile (reader.ready()) {\n\t\t\t\tnb = reader.read(buffer);\n\t\t\t\tfor (int i = 0; i < nb; i++) {\n\t\t\t\t\tcharacterCount[buffer[i]]++;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (final IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}", "protected int dictionarySize() {\n int count = 0;\n \n for ( WordList w : this.wordLists ) {\n count += w.size();\n }\n \n return count;\n }", "@Override\n public int size() {\n return wordsArray.length;\n }" ]
[ "0.8033092", "0.7967324", "0.7609377", "0.75623155", "0.7556632", "0.7553493", "0.72258484", "0.7218837", "0.71799976", "0.7152409", "0.7135665", "0.69522667", "0.6861195", "0.6840112", "0.6748651", "0.67246985", "0.6635413", "0.6601774", "0.65876496", "0.6577427", "0.6563077", "0.65544176", "0.6553847", "0.6547543", "0.6543733", "0.654129", "0.6530351", "0.65202504", "0.6507417", "0.65017754", "0.6487095", "0.6482571", "0.6481251", "0.6481207", "0.6477903", "0.6453558", "0.64155936", "0.6399994", "0.6365719", "0.63633233", "0.63515586", "0.63422275", "0.6341626", "0.63308287", "0.6326822", "0.63190144", "0.62938774", "0.62701905", "0.62674975", "0.6257052", "0.6256869", "0.62561125", "0.6224128", "0.62157744", "0.62134594", "0.6202244", "0.6187322", "0.6186568", "0.61798596", "0.6174222", "0.6162272", "0.6155075", "0.6125537", "0.6122901", "0.6120951", "0.61153704", "0.60944587", "0.60719365", "0.60530853", "0.60256714", "0.6020018", "0.60095257", "0.60043484", "0.60028946", "0.5998604", "0.5998604", "0.5988598", "0.59865046", "0.59791154", "0.59762925", "0.5952931", "0.59497255", "0.59459984", "0.59436446", "0.5941269", "0.5940181", "0.5938247", "0.5936213", "0.5934061", "0.59303075", "0.5930256", "0.5920291", "0.59132826", "0.59058386", "0.59014297", "0.588406", "0.5881162", "0.58809716", "0.58771133", "0.58724433" ]
0.81921834
0
returns total unique words in a file
public int getTotalUniqueWords(File file) throws Exception{ BufferedReader br = new BufferedReader(new FileReader(file)); String line; Set<String> set = new HashSet<>(); while((line=br.readLine())!=null){ String[] tokens = line.split(" "); for(String token : tokens){ if(!set.contains(token)){ set.add(token); } } } br.close(); return set.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int distinctCount(){\r\n int distinct = 0;\r\n //Loop through each key in words\r\n for(String key: words.keySet()){\r\n //If they appear in the file\r\n if(words.get(key) != 0){\r\n //count it\r\n distinct++;\r\n }\r\n }\r\n return distinct;\r\n\t}", "public int getTotalUniqueWords() {\n return totalUniqueWords;\n }", "public void countWords(String path) {\n\t\n//\t\tdeclaration and initialization\n\t\tFile file = new File(path);\n\t\tString str = \"\",word = \"\";\n\t\tBufferedReader br;\n\t\tint counter = 1;\n\t\t\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t\t\n//\t\t\tReads the file lines until eof\n\t\t\twhile ((str = br.readLine()) != null) {\n\t\t\t\tword = word.concat(str);\n\t\t\t}\n\t\t\t\n//\t\t\tReplace both comma and dot with whitespace\n\t\t\tword = word.replace(',',' ');\n\t\t\tword = word.replace('.',' ');\n\t\t\t\n//\t\t\tSplit the string using space\n\t\t\tString[] words = word.split(\"\\\\s+\");\n\t\n//\t\t\tCompare the words and if they are same words increase the counter\n\t\t\tfor (int i = 0; i < words.length; i++){\n\t\t\t\tfor(int j = i+1; j < words.length; j++){\n\t\t\t\t\tif(words[i] != null && words[i].equals(words[j]) ){\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\twords[j] = null; //replace the repeated word with null\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n//\t\t\t\tdisplays the count of the words\n\t\t\t\tif(words[i] != null)\n\t\t\t\tSystem.out.println(words[i]+\": \"+counter);\n\t\t\t\tcounter = 1;\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IO Exception\");\n\t\t}\n\t}", "private static void wordCount(File fileEntry) throws FileNotFoundException {\n\t\tScanner sc = new Scanner(new FileInputStream(fileEntry));\n\t\t int count=0;\n\t\t while(sc.hasNext()){\n\t\t sc.next();\n\t\t count++;\n\t\t }\n\t\tSystem.out.println(\"Number of words: \" + count);\n\t\t\n\t\t\n\t}", "public static int totalWord(File file) throws FileNotFoundException {\r\n Scanner scan = new Scanner(file); // scanner for scanning the file\r\n int count = 0;\r\n while (scan.hasNext()) // scan until end\r\n {\r\n String word = scan.next();\r\n if (isWord(word)) // is the content is a word than increase count by 1\r\n count++;\r\n }\r\n return count;\r\n }", "public static String wordCounting(File file)\n {\n return null;\n }", "public static Set<CharInt> getCountSet(Scanner in){\n\t\tSet<CharInt> wordCountSet = new HashSet<CharInt>();\n\t\t\n\t\twhile (in.hasNext()){\n\t\t\tString word = in.next().toLowerCase();\n\t\t\tfor(int i = 0; i < word.length(); i++){\n\t char test = word.charAt(i);\n\t CharInt dummy = new CharInt(test, 0);\n\t \n\t \t\t\tif(wordCountSet.contains(dummy)){ // This char is already existed in the text file\n\t \t\t\t\tint count = 0;\n\t \t\t\t\tfor(CharInt value: wordCountSet){\n\t \t\t\t\t\tif (wordCountSet.contains(dummy)){\n\t \t\t\t\t\t\tcount++;\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t\tCharInt existingValue = new CharInt(test, count);\n\t \t\t\t\twordCountSet.add(existingValue);\n\t \t\t\t} else { // This char isn't in the text file, add it to the Set\n\t \t\t\t\tCharInt newValue = new CharInt(word.charAt(i), 1);\n\t \t\t\t\twordCountSet.add(newValue);\n\t \t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn wordCountSet;\n\t}", "public int getTotalNumberOfWords(File file) throws Exception{\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\tString line;\n\t\tint count = 0;\n\t\twhile((line=br.readLine())!=null){\n\t\t\tString[] tokens = line.split(\" \");\n\t\t\tcount+=tokens.length;\n\t\t}\n\t\tbr.close();\n\t\treturn count;\n\t}", "public static int getWordsNumber(String file) throws FileNotFoundException {\n File inputFile = new File(file);\n Scanner input = new Scanner(inputFile);\n\n int words = 0;\n while (input.hasNext()) {\n String value = input.next();\n words++;\n }\n\n input.close();\n\n return words;\n }", "private void getWordCounts() {\n Map<String, List<String>> uniqueWordsInClass = new HashMap<>();\n List<String> uniqueWords = new ArrayList<>();\n\n for (ClassificationClass classificationClass : classificationClasses) {\n uniqueWordsInClass.put(classificationClass.getName(), new ArrayList<>());\n }\n\n for (Document document : documents) {\n String[] terms = document.getContent().split(\" \");\n\n for (String term : terms) {\n if (term.isEmpty()) {\n continue;\n }\n if (!uniqueWords.contains(term)) {\n uniqueWords.add(term);\n }\n\n for (ClassificationClass docClass : document.getClassificationClasses()) {\n if (!uniqueWordsInClass.get(docClass.getName()).contains(term)) {\n uniqueWordsInClass.get(docClass.getName()).add(term);\n }\n if (totalWordsInClass.containsKey(docClass.getName())) {\n this.totalWordsInClass.put(docClass.getName(), this.totalWordsInClass.get(docClass.getName()) + document.getFeatures().get(term));\n } else {\n this.totalWordsInClass.put(docClass.getName(), document.getFeatures().get(term));\n }\n }\n }\n }\n\n this.totalUniqueWords = uniqueWords.size();\n }", "public static void main(String[] args) {\n\t\tint[] i = new int[100];\n\t\tint unique = 0;\n\t\tfloat ratio = 0;\n\t\tList<String> inputWords = new ArrayList<String>();\n\t\tMap<String,List<String>> wordcount = new HashMap<String,List<String>>();\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"/Users/huziyi/Documents/NLP file/Assignment1/Twitter messages.txt\"));\n\t\t\tString str;\n\t\t\twhile((str = in.readLine())!=null){\n\t\t\t\tstr = str.toLowerCase();\n\t\t\t\t\n\t\t\t\tString[] words = str.split(\"\\\\s+\");\n\t\t\t\t\n\t\t\t//\tSystem.out.println(words);\n\t\t\t//\tSystem.out.println(\"1\");\n\t\t\t\tfor(String word:words){\n\t\t\t\t\t\n\t\t\t//\t\tString word = new String();\n\t\t\t\t\t\n\t\t\t\t\tword = word.replaceAll(\"[^a-zA-Z]\", \"\");\n\t\t\t\t\tinputWords.add(word);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tfor(int k=0;k<inputWords.size()-1;k++){\n\t\t\tString thisWord = inputWords.get(k);\n\t\t\tString nextWord = inputWords.get(k+1);\n\t\t\tif(!wordcount.containsKey(thisWord)){\n\t\t\t\twordcount.put(thisWord, new ArrayList<String>());\n\t\t\t}\n\t\t\twordcount.get(thisWord).add(nextWord);\n\t\t}\n\t\t for(Entry e : wordcount.entrySet()){\n\t// System.out.println(e.getKey());\n\t\tMap<String, Integer>count = new HashMap<String, Integer>();\n List<String>words = (List)e.getValue();\n for(String s : words){\n if(!count.containsKey(s)){\n count.put(s, 1);\n }\n else{\n count.put(s, count.get(s) + 1);\n }\n }\n \t\n // for(Entry e1 : wordcount.entrySet()){\n for(Entry f : count.entrySet()){\n \n // \tint m = 0;\n //\tint[] i = new int[100];\n //\ti[m] = (Integer) f.getValue();\n \tint n = (Integer) f.getValue();\n \tn = (Integer) f.getValue();\n // \tList<String> values = new ArrayList<String>();\n \t\t// values.addAll(count.g());\n \tif(n>=120){\n \tif(!(e.getKey().equals(\"\"))&&!(f.getKey().equals(\"\"))){\n //\t\t int a = (Integer) f.getValue();\n //\t\t Arrays.sort(a);\n System.out.println(e.getKey()+\" \"+f.getKey() + \" : \" + f.getValue());\n \n \t}\n \t}\n //\tm++;\n \t }\n\t\t }\n\t\t \n\t\n\t\t \n\t\t// Arrays.sort(i);\n\t\t //System.out.println(i[0]+i[1]);\n/*\n\t\t ArrayList<String> values = new ArrayList<String>();\n\t\t values.addAll(count.values());\n\n\t\t Collections.sort(values, Collections.reverseOrder());\n\n\t\t int last_i = -1;\n\n\t\t for (Integer i : values.subList(0, 99)) { \n\t\t if (last_i == i) \n\t\t continue;\n\t\t last_i = i;\n\n\n\n\n\t\t for (String s : wordcount.keySet()) { \n\n\t\t if (wordcount.get(s) == i)\n\t\t \n\t\t \tSystem.out.println(s+ \" \" + i);\n\n\t\t }\n\t\t \n\t\t\t}*/\n\t}", "private static void wordCountWithMap() throws FileNotFoundException {\n Map<String, Integer> wordCounts = new HashMap<String, Integer>();\n\n Scanner input = new Scanner(new File(fileLocation));\n while (input.hasNext()) {\n String word = input.next();\n if (!wordCounts.containsKey(word)) {\n wordCounts.put(word, 1);\n } else {\n int oldValue = wordCounts.get(word);\n wordCounts.put(word, oldValue + 1);\n }\n }\n\n String term = \"test\";\n System.out.println(term + \" occurs \" + wordCounts.get(term));\n\n // loop over the map\n for (String word : wordCounts.keySet()) {\n int count = wordCounts.get(word);\n if (count >= 500) {\n System.out.println(word + \", \" + count + \" times\");\n }\n }\n\n }", "public static int uniqueWords (String sent) {\n\n \tint counter = 0;\n \tString[] words = sent.split(\" \");\n \t\n \tif(words.length == 1){\n\t\t\tcounter = 1;\n\t\t\treturn counter;\n\t\t}\n \tfor( int i = 0; i < words.length; i++){\n\n \t\tboolean unique = true;\n \t\tfor(int j = 0; j < words.length; j++ ){\n \t\t\tif(i != j){\n \t\t\t\tif(words[i].equals(words[j])){\n \t\t\t\tunique = false;\n \t\t\t}\n \t\t\t}\n \t\t}\n \t\tif(unique == true){\n\t\t\t\tcounter++;\n\t\t\t}\n \t\t\n \t}\n \treturn counter;\n \n }", "public int countUniqueStrings()\n\t{\n\t\treturn countUniqueStrings(this.root);\n\t}", "private static ArrayList<sri.Pair<String,Integer>> mostFrequentWords(String path) throws IOException {\r\n PriorityQueue<Pair<String, Integer>> listOfWords = new PriorityQueue<>(10,(o1, o2) -> {\r\n return ((int) o2.getSecond() - (int) o1.getSecond());\r\n });\r\n\r\n HashMap<String,Integer> mapOfWords = new HashMap<>();\r\n\r\n BufferedReader br;\r\n String word;\r\n ArrayList outputList = new ArrayList();\r\n\r\n File file = new File(path);\r\n\r\n br = new BufferedReader(new FileReader(file));\r\n\r\n while ( (word = br.readLine()) != null) {\r\n if (mapOfWords.containsKey(word)) {\r\n mapOfWords.put(word, mapOfWords.get(word) + 1);\r\n } else {\r\n mapOfWords.put(word, 1);\r\n }\r\n }\r\n\r\n for (Map.Entry<String,Integer> entry: mapOfWords.entrySet()){\r\n sri.Pair<String,Integer> tuple = new sri.Pair<String,Integer>(entry.getKey(),entry.getValue());\r\n listOfWords.offer(tuple);\r\n }\r\n\r\n for (int i = 0; i < 5; i++){\r\n outputList.add(new sri.Pair<String,Integer>(listOfWords.peek().getFirst(),listOfWords.poll().getSecond()));\r\n }\r\n\r\n return outputList;\r\n\r\n\r\n }", "public void setTotalUniqueWords(int totalUniqueWords) {\n this.totalUniqueWords = totalUniqueWords;\n }", "public int count(){\r\n\t\tint sum = 0;\r\n for(Integer value: words.values()){\r\n sum += value;\r\n }\r\n return sum;\r\n\t}", "private static int numberOfWordsInFile(SimpleReader fileReader) {\r\n int numberOfWordsInFile = 0;\r\n Set<Character> separators = createSeparators();\r\n /*\r\n * Above: creates the set of characters used to determine what is and is\r\n * not a word\r\n */\r\n /*\r\n * Below: begin to read through the file and count the words\r\n */\r\n while (!fileReader.atEOS()) {\r\n String toRead = fileReader.nextLine();\r\n int position = 0;\r\n\r\n while (position < toRead.length()) {\r\n String nextWordOrSep = nextWordOrSeparator(toRead, position,\r\n separators);\r\n position += nextWordOrSep.length();\r\n if (!separators.contains(nextWordOrSep.charAt(0))\r\n && !nextWordOrSep.equals(\"\")) {\r\n numberOfWordsInFile++;\r\n }\r\n /*\r\n * if the word contains a separator then it's not a word, so\r\n * don't add to the word count.\r\n */\r\n }\r\n\r\n }\r\n return numberOfWordsInFile;\r\n }", "public void count(String dataFile) {\n\t\tScanner fileReader;\n\t\ttry {\n\t\t\tfileReader= new Scanner(new File(dataFile));\n\t\t\twhile(fileReader.hasNextLine()) {\n\t\t\t\tString line= fileReader.nextLine().trim(); \n\t\t\t\tString[] data= line.split(\"[\\\\W]+\");\n\t\t\t\tfor(String word: data) {\n\t\t\t\t\tthis.wordCounter= map.get(word);\n\t\t\t\t\tthis.wordCounter= (this.wordCounter==null)?1: ++this.wordCounter;\n\t\t\t\t\tmap.put(word, this.wordCounter);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfileReader.close();\n\t\t}\n\t\tcatch(FileNotFoundException fnfe) {\n\t\t\tSystem.out.println(\"File\" +dataFile+ \"can not be found.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "@Override\r\n\tpublic Long call() throws Exception {\r\n\t\tString line;\r\n\t\tchar [] wordArray;\r\n\t\tint i;\r\n\t\tchar c;\r\n\t\ttry {\r\n\t\t\tline = setOfLines.take();\r\n\t\t\tString[] words = line.replaceAll(\"\\\\s+\", \" \").split(\" \");\r\n\t\t\t\r\n\t\t\tfor(String word : words) {\r\n\t\t\t\twordArray = word.toCharArray();\r\n\t\t\t\tfor(i=0;i<wordArray.length;i++) {\r\n\t\t\t\t\tc = wordArray[i];\r\n\t\t\t\t\tif(countNumbers ? (!((c>64&&c<91)||(c>96 &&c<123)||(c>47&&c<58))) : (!((c>64&&c<91)||(c>96 &&c<123))) ) {\r\n\t\t\t\t\t\tword = word.replace(c+\"\",\"\" );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(word.isEmpty()) continue;\r\n\t\t\t\tsynchronized (this) {\r\n\t\t\t\t\tif(wordCount.containsKey(word)) {\r\n\t\t\t\t\t\twordCount.put(word, (wordCount.get(word)+1));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\twordCount.put(word, 1);\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (InterruptedException e) {\r\n\t\t\tcustomFile.setErrorString(\"An Error occurred while processing this file, word count may not\"\r\n\t\t\t\t\t+\"be accurate\");\r\n\t\t\t\r\n\t\t\tlogger.error(e);\r\n\t\t}\r\n\t\treturn new Long(0);\r\n\t}", "public static void wordCount(String filename) {\n SparkConf conf = new SparkConf().setMaster(\"local\").setAppName(\"Word count App\");\n\n // create a java version of the spark context from the configuration\n JavaSparkContext sc = new JavaSparkContext(conf);\n\n // load input data, which is a text file read main\n // the repartition breaks up the document into 20 segments for parallelism\n JavaRDD<String> input = sc.textFile( filename ).repartition(20);\n // split input string into words\n JavaRDD<String> words = input.flatMap(s -> Arrays.asList(s.split(\" \")));\n\n // transform the collection of words into pairs (word and 1). We do not use a combiner here\n JavaPairRDD<String, Integer> counts = words\n // lowercase, remove apostrophes, grammar and lowercase\n .map(p -> p.replaceAll(\"(')|(\\\\W)\", \"$1\"))\n .map(r -> r.replaceAll(\"[^a-zA-Z ]\", \"\"))\n .map(q -> q.toLowerCase())\n\n .mapToPair(t -> new Tuple2( t, 1 ) )\n .partitionBy(new HashPartitioner(4))\n // this is reducing that parallelism back to one\n .reduceByKey( (x, y) -> (int)x + (int)y )\n .coalesce(1);\n\n counts.saveAsTextFile(\"src/main/java/resources/output\");\n }", "private static int[] countWordsInFile(String fileToParse, String[] searchWords) throws FileNotFoundException {\n\n int[] wordCounter = new int[searchWords.length];\n\n FileReader searchFile = new FileReader(fileToParse);\n Scanner sc = new Scanner(searchFile);\n while (sc.hasNext()) {\n String word = sc.next();\n for (int i = 0; i < searchWords.length; i++) {\n if (matchSearchWord(word, searchWords[i]))\n wordCounter[i]++;\n }\n\n }\n sc.close();\n return wordCounter;\n\n }", "public long getCount(String word) throws FileNotFoundException,IOException{\n\t\tlong count=0;\n\t\tLong cacheCount=counts.get(word);\n\t\tif(cacheCount==null){\n\t\t\tsynchronized(this){\n\t\t\t\ttry(BufferedReader inputFile=new BufferedReader(new FileReader(GlobalResources.FILE_PATH))){\n\t\t\t\t\tString line=inputFile.readLine();\n\t\t\t\t\tStringTokenizer tokenizer=null;\n\t\t\t\t\twhile(line!=null){\n\t\t\t\t\t\ttokenizer=new StringTokenizer(line);\n\t\t\t\t\t\tString token=null;\n\t\t\t\t\t\twhile(tokenizer.hasMoreElements()){\n\t\t\t\t\t\t\ttoken=(String)tokenizer.nextElement();\n\t\t\t\t\t\t\tif(token.equalsIgnoreCase(word))count++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tline=inputFile.readLine();\n\t\t\t\t\t}\n\t\t\t\t}catch(FileNotFoundException fileNotFoundException){\n\t\t\t\t\tSystem.out.println(\"FileNotFoundException in class FileDAO : method : getCount(String) \"+fileNotFoundException.getMessage());\n\t\t\t\t\tthrow fileNotFoundException;\n\t\t\t\t}catch(IOException ioException){\n\t\t\t\t\tSystem.out.println(\"IOException in class FileDAO : method : getCount(String) \"+ioException.getMessage());\n\t\t\t\t\tthrow ioException;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounts.put(word, count);\n\t\t}else{\n\t\t\tcount=cacheCount.longValue();\n\t\t}\n\t\treturn count;\n\t}", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "public static Map<String,Integer> getCounts(ArrayList<String> words) {\r\n HashMap<String, Integer> map = new HashMap<String, Integer>();\r\n ArrayList<String> uniqueWords = new ArrayList<String>();\r\n for(String word: words) {\r\n if(!uniqueWords.contains(word)) {\r\n map.put(word, Collections.frequency(words, word));\r\n uniqueWords.add(word);\r\n }\r\n }\r\n return map;\r\n }", "public void countWords(File sourceFile) throws IOException {\n Scanner wordScanner = new Scanner(sourceFile);\n// wordScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n wordScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n addWordToMap(wordScanner);\n wordScanner.close(); // Close underlying file.\n }", "public void remove(String dataFile) throws IOException\r\n {\r\n //eliminate duplicate words\r\n BufferedReader bufferedReader = new BufferedReader(new FileReader(dataFile));\r\n String line1 = bufferedReader.readLine();\r\n\r\n //loop that eliminates duplicate words using a set of strings\r\n while(line1 != null)\r\n {\r\n String tempWords[] = line1.split(\" \");\r\n for(String words : tempWords)\r\n {\r\n if(!uniqueWords.contains(words)) uniqueWords.add(words);\r\n }\r\n line1 = bufferedReader.readLine();\r\n }\r\n bufferedReader.close();\r\n }", "void remove (String dataFile) {\n\t\tint i;\t\t\n\t\t\n\n\t\ttry {\n//\t\t\tHash set to store strings\n\t\t\t\t\t\t\n//\t\t\tScanner reads objects from file\n\t\t\tScanner fileInput = new Scanner(new File(dataFile));\n\t\t\t\n//\t\t\treads line from file\n\t\t\twhile(fileInput.hasNextLine()) {\n\t\t\t\tString row = fileInput.nextLine();\n\t\t\t\t\n//\t\t\t\tsplits words by the space\n\t\t\t\tString[] word = row.split(\" \");\n\t\t\t\t\n\t\t\t\tfor(i = 0; i < word.length; i++) {\n\t\t\t\t\t\n//\t\t\t\t\tconvert words to lower case\n\t\t\t\t\tString wordSet = word[i].toLowerCase();\n//\t\t\t\t\tadds words to set\n\t\t\t\t\tuniqueWords.add(wordSet);\n\t\t\t\t}\t\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Map<String, Integer> findUnicalWord(ArrayList<Word> text)\n {\n String[] words=new String[text.size()];\n for(int i=0; i<text.size(); i++){\n words[i]=text.get(i).toString();\n }\n HashMap<String, Integer> myWordsCount = new HashMap<>();\n for (String s : words){\n if (myWordsCount.containsKey(s)) myWordsCount.replace(s, myWordsCount.get(s) + 1);\n else myWordsCount.put(s, 1);\n }\n\n Map<String, Integer> newWordsCount = myWordsCount\n .entrySet()\n .stream()\n .sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))\n .collect(\n toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2,\n LinkedHashMap::new));\n\n return newWordsCount;\n\n }", "public static void rawTweetCleaner(File input_filename, File output_filename) throws IOException {\n final Map<String, Integer> unique = new HashMap<>();\n int lineCounter = 0;\n\n try (Writer output = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(output_filename), \"UTF-8\"))) {\n try (BufferedReader br = new BufferedReader(new FileReader(input_filename))) {\n for (String line; (line = br.readLine()) != null; lineCounter++) {\n if (lineCounter % 100000 == 0) {\n if (lineCounter % 10000000 == 0) MapUtils.removeInfrequentItems(unique, 2);\n System.out.print(\"\\r\" + lineCounter);\n }\n if (!shouldInclude(line)) continue;\n\n String filtered = Filters.stringChain(line, filters);\n if (unique.containsKey(filtered)) continue;\n\n MapUtils.incrementMapByValue(unique, filtered, 1);\n output.write(line + \"\\n\");\n }\n }\n }\n }", "int totalWords();", "public ArrayList wordsInNumFiles(int number){\n System.out.println(\"\\nThese words appear \" + number + \" times: \");\n ArrayList<String> words = new ArrayList<String>();\n int countWordsSizeN =0;\n for (String word : hashWords.keySet()){\n int counts = hashWords.get(word).size();\n if(counts == number){//if count of this word is equal to the given number\n words.add(word);//add this word into the words Arrylist\n countWordsSizeN++;//increment the count of words of size n\n System.out.println( \"words are\"+ word ); \n }\n // System.out.println(\"total of words repeated \" + number + \" times: \" + countWordsSizeN + \"words are\"+ word );\n }\n System.out.println(\"total of words repeated \" + number + \" times: \" + countWordsSizeN + \"words are\"+ words );\n return words;\n }", "public List<Integer> populateCountFromFile(File file) throws FileNotFoundException {\n int index;\n List<Integer> wordCount = new ArrayList<>();\n\n //Set the wordCount to zero for all words in vocabularyList.\n wordCount.add(1);\n for (int count = 0; count < vocabularyList.size(); count++) {\n wordCount.add(new Integer(0));\n }\n\n //Read all the words from the file\n List<String> words = readFile(file);\n\n //COMPUTE THE X vector for Perceptron weight displacement calculation\n for (String word : words) {\n\n //ADD THE WORD TO THE VOCABULARY LIST\n if (vocabularyList.contains(word)) {\n index = vocabularyList.indexOf(word);\n wordCount.set(index, wordCount.get(index) + 1);\n }\n }\n return wordCount;\n }", "public static int duplicateCount(String text) {\n String[] textArray = text.toLowerCase().split(\"\");\n List<String> temp = new ArrayList<String>();\n\n // Storing all of the duplicated strings\n for(int i=0; i < textArray.length; i++){\n for(int j=i+1; j < textArray.length; j++){\n if(textArray[i].equals(textArray[j])){\n temp.add(textArray[i]);\n }\n }\n }\n \n // Convert list to array\n String[] itemsArray = new String[temp.size()];\n itemsArray = temp.toArray(itemsArray);\n \n // Removing all the duplicated strings by using hashset\n Set<String> set = new HashSet<String>();\n for(int i = 0; i < itemsArray.length; i++){\n set.add(itemsArray[i]);\n }\n\n // Returning the length \n return set.size();\n }", "private void exercise7() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> result;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n result = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .map(String::toLowerCase)\n .sorted(comparingInt(String::length))\n .collect(toList());\n }\n\n result.forEach(System.out::println);\n }", "public void buildUnigramModel(String fileName) throws IOException {\n\t\t// this function gives frequency of each letter\n\t\tBufferedReader testReader = new BufferedReader(new FileReader(fileName));\n\t\tString line = null;\n\t\tMap<String, Integer> count = new HashMap<>();\n\t\t\n\t\tcount.put(terminal, 0);\n\t\tint totalCount = 1; // there is already terminal char in map, so 1 instead of 0.\n\t\tString cc = null; // to process char c\n\t\twhile ((line = testReader.readLine()) != null) { // unigram doesn't consider the sentences\n\t\t\tfor (char c : line.toCharArray()) {\n\t\t\t\tif (Character.isLetter(c) || c == ' ' || c == ',' || c == '.' || c == '\\'') {\n\t\t\t\t\tif (Character.isLowerCase(c)) {\n\t\t\t\t\t\tc = (char) (c + 'A' - 'a');\n\t\t\t\t\t}\n\t\t\t\t\tcc = String.valueOf(c);\n\t\t\t\t\tif (!count.containsKey(cc)) {\n\t\t\t\t\t\tcount.put(cc, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcount.put(cc, count.get(cc) + 1);\n\t\t\t\t\t}\n\t\t\t\t\ttotalCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcount.put(terminal, count.get(terminal) + 1); // add a '$' to the end of this sentence.\n\t\t}\n\t\tthis.sizeOfUniword = totalCount;\n\t\tuni = new HashMap<>(count);\n\t\tlm.putAll(count);\n//\t\tSystem.out.println(\"File \" + fileName + \"\\'s unigram model is ready.\");\n\t\ttestReader.close();\n\t}", "public static void main(String[] args) throws IOException {\n Path path = Paths.get(\"C:\\\\Users\\\\Pixie Waffle\\\\Desktop\\\\adventofcode2020\\\\adventofcode2020\\\\textfiles\\\\day6.txt\");\n String file = Files.readString(path);\n\n //The sum of the counts\n int yesPerGroup = 0;\n\n //Split the paragraphs into groups\n List<String> groups = Arrays.asList(file.split(\"\\n\\n\"));\n\n //The Hashset does not accept duplicates so we can check each group\n //by adding it to the hashset and clearing after we have counted the\n //unique characters\n Set set = new HashSet<>();\n for (int i = 0; i < groups.size(); i++){\n char[] group = groups.get(i).replace(\"\\n\", \"\").toCharArray();\n for (int j = 0; j < group.length; j++){\n if(set.add(group[j])){\n yesPerGroup++;\n }\n }\n set.clear();\n }\n System.out.println(yesPerGroup);\n }", "public void testCountWordLengths() {\n FileResource fr = new FileResource(\"data/smallHamlet.txt\");\n int[] counts = new int[31];\n countWordLengths(fr, counts);\n }", "int getWordCount() {\r\n return entrySet.size();\r\n }", "public static int getTermFreq (String dirPath, Set<String> terms) {\r\n\t\tAtomicInteger freq = new AtomicInteger(0);\r\n\t\ttry {\r\n\t\t\tPath currentWorkingPath = Paths.get(dirPath).toAbsolutePath();\r\n\t\t\t// This is our standard \"walk through all .txt files\" code.\r\n\t\t\tFiles.walkFileTree(currentWorkingPath, new SimpleFileVisitor<Path>() {\r\n\r\n\t\t\t\tpublic FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\r\n\t\t\t\t\t// make sure we only process the current working directory\r\n\t\t\t\t\tif (currentWorkingPath.equals(dir)) {\r\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tpublic FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {\r\n\r\n\t\t\t\t\tif (file.toString().endsWith(\".txt\")) {\r\n\r\n\t\t\t\t\t\tTokenStream tokenStream = null;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\ttokenStream = Utils.getTokenStreams(file.toFile());\r\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\twhile (tokenStream.hasNextToken()) {\r\n\r\n\t\t\t\t\t\t\tString token = Utils.processWord(tokenStream.nextToken().trim(), false);\r\n\t\t\t\t\t\t\tif (terms.contains(token)) {\r\n\t\t\t\t\t\t\t\tfreq.incrementAndGet();\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\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// don't throw exceptions if files are locked/other errors occur\r\n\t\t\t\tpublic FileVisitResult visitFileFailed(Path file, IOException e) {\r\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn freq.get();\r\n\t}", "public void writeOut(Set<String> uniqueWords) {\r\n Path file = Paths.get(filename + \"_unique_words.txt\");\r\n Charset charset = Charset.forName(\"UTF-8\");\r\n try (BufferedWriter writer = Files.newBufferedWriter(file, charset)) {\r\n for (String s : uniqueWords)\r\n {\r\n writer.write(s);\r\n writer.newLine();\r\n }\r\n } catch (IOException x) {\r\n System.err.format(\"IOException: %s%n\", x);\r\n }\r\n }", "public void write(String uniquewords)\n\t{\n\t\t\n\t\t//we have a scanner function\n\t\tSet<String> writeUserWord = totalOccurence.keySet();\n\t\t\n\t\t//this will begin to run\n\t\ttry\n\t\t{\n\t\t\t//we have a format function\n\t\t\tFormatter printOut = new Formatter(new File(uniquewords));\n\t\t\t\n\t\t\t//we used a enhanced for loop to simplify the code\n\t\t\tfor(String string : writeUserWord)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tprintOut.format(\"%s\\t-- %d%n\", string, totalOccurence.get(string));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//we then need to close out the resources used in the program.\n\t\t\tprintOut.close();\n\t\t\tprintOut.flush(); \n\t\t\t\n\t\t//we have a catch in place for any issues\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\t//system print out if any error occurs\n\t\t\tSystem.out.println(\"Unfourtantly an issue occured with the creation of the file!\");\n\t\t\tSystem.out.println(e);\n\t\t}\t\n\t}", "private void countWords(String text, String ws) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8))));\n String line;\n\n // Get words and respective count\n while (true) {\n try {\n if ((line = reader.readLine()) == null)\n break;\n String[] words = line.split(\"[ ,;:.?!“”(){}\\\\[\\\\]<>']+\");\n for (String word : words) {\n word = word.toLowerCase();\n if (\"\".equals(word)) {\n continue;\n }\n if (lista.containsKey(word)){\n lista.get(word).add(ws);\n }else{\n HashSet<String> temp = new HashSet<>();\n temp.add(ws);\n lista.put(word, temp);\n }\n\n /*if (!countMap.containsKey(word)) {\n countMap.put(word, 1);\n }\n else {\n countMap.put(word, countMap.get(word) + 1);\n }*/\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n // Close reader\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Display words and counts\n /*for (String word : countMap.keySet()) {\n if (word.length() >= 3) { // Shall we ignore small words?\n //System.out.println(word + \"\\t\" + countMap.get(word));\n }\n }*/\n }", "public static int[] scanFile(String fileName){\n File file = new File(fileName);\n int[] freqNums = new int[94];\n //try catch in case the file doesn't exist\n try {\n Scanner scan = new Scanner(file);\n //loop to look at each word in the file\n while (scan.hasNext()) {\n String s = scan.next();\n //loop to look at each character in the word\n for(int i = 0; i < s.length(); i++){\n if((int)s.charAt(i)-32 <= 94)\n freqNums[(int)s.charAt(i)-32] = freqNums[(int)s.charAt(i)-32] + 1;\n }\n //accounts for all the spaces\n freqNums[0] = freqNums[0]+1;\n }\n scan.close();\n //gets rid of the imaginary last space\n freqNums[0] = freqNums[0]-1;\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return freqNums;\n }", "private HashSet<String> buildsetofterms(String filename)\r\n\t{\r\n\t\tString readLine, terms[];\r\n HashSet<String> fileTerms = new HashSet<String>();\r\n try \r\n {\r\n BufferedReader reader = new BufferedReader(new FileReader(filename));\r\n while ((readLine = reader.readLine()) != null)\r\n {\r\n terms = (readLine.toLowerCase().replaceAll(\"[.,:;'\\\"]\", \" \").split(\" +\"));\r\n for (String term : terms)\r\n {\r\n if (term.length() > 2 && !term.equals(\"the\"))\r\n fileTerms.add(term);\r\n }\r\n }\r\n }\r\n catch(IOException e){\r\n e.printStackTrace();\r\n }\r\n return fileTerms;\r\n }", "private static Set<String> readFromFile(String fileName)\n\t{\n\t\tSet<String> words = new HashSet<String> ();\n\t\ttry \n\t\t{\n\t\t\tScanner scanner = new Scanner(new File(fileName));\n\t\t\twhile (scanner.hasNext())\n\t\t\t{\n\t\t\t\tString word = scanner.nextLine();\n\t\t\t\twords.add(word);\n\t\t\t}\n\t\t\tscanner.close();\n\t\t}\n\t\tcatch (FileNotFoundException e)\n\t\t{\n\t\t\treturn words;\n\t\t}\n\t\treturn words;\n\t}", "public static Set<String> getUniqueWords(String input) {\r\n HashSet<String> hSet = new HashSet<String>();\r\n ArrayList<String> words = getWords(input);\r\n for(String word: words) {\r\n if(!hSet.contains(word)) {\r\n hSet.add(word);\r\n }\r\n }\r\n return hSet;\r\n }", "private void addFile(String file){\r\n\t\ttry(\r\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\r\n\t\t){\r\n\t\t\tString html = \"\";\r\n\t\t\tString line = \"\";\r\n\t\t\t// read in html from passed file argument\r\n\t\t\twhile((line=reader.readLine())!=null){\r\n\t\t\t\thtml += line;\r\n\t\t\t}\r\n\t\t\t// retrieve all text content elements from page\r\n\t\t\tElements paragraphs = Jsoup.parse(html).select(\"p\");\r\n\t\t\tString content = \"\";\r\n\t\t\tfor (Element i : paragraphs){\r\n\t\t\t\tcontent += i.text()+\" \";\r\n\t\t\t}\r\n\t\t\t// tokenize and log all unique words\r\n\t\t\tMatcher matcher = pattern.matcher(content);\r\n\t\t\tString[] results = matcher.results().map(MatchResult::group).toArray(String[]::new);\r\n\t\t\tHashMap<String, Integer> count = new HashMap<String, Integer>();\r\n\t\t\tfor (int i = 0;i<results.length;++i){\r\n\t\t\t\tString word = results[i];\r\n\t\t\t\tif (count.get(word) != null){\r\n\t\t\t\t\tcount.put(word, count.get(word)+1);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tcount.put(word, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//create term objects with ids\r\n\t\t\tHashMap<Term, Integer> rCount = new HashMap<Term, Integer>();\r\n\t\t\tint id = 0;\r\n\t\t\tfor (Map.Entry<String, Integer> subset : count.entrySet()){\r\n\t\t\t\trCount.put(new Term(processWord(subset.getKey()),id), subset.getValue());\r\n\t\t\t}\r\n\t\t\t// store data from file\r\n\t\t\tindex.put(file, new IndexedDoc(rCount));\r\n\t\t\treader.close();\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void avarageNum() throws IOException\n\t{\n\t\t// Read data from text file\n\t\tHashMap<String, Integer> wordCountMap = new HashMap<String, Integer>();\n\t \n BufferedReader reader = null;\n \n try\n {\n //Creating BufferedReader object\n \n reader = new BufferedReader(new FileReader(\"NumOUTPUT.txt\"));\n \n //Reading the first line into currentLine\n \n String currentLine = reader.readLine();\n \n while (currentLine != null)\n { \n // Splitting the currentLine into words \n String[] numbers = currentLine.toLowerCase().split(\" \");\n \n // Iterating each word\n for (String word : numbers)\n {\n // If word is already present in wordCountMap, updating its count\n \n if(wordCountMap.containsKey(word))\n { \n wordCountMap.put(word, wordCountMap.get(word) + 1);\n }\n \n // Otherwise inserting the word as key and 1 as its value\n else\n {\n wordCountMap.put(word, 1);\n }\n }\n \n // Reading next line into currentLine \n currentLine = reader.readLine();\n }\n \n // Getting the most repeated word and its occurrence \n String mostRepeatedNum = null;\n \n int count = 0;\n \n Set<java.util.Map.Entry<String, Integer>> entrySet = wordCountMap.entrySet();\n \n for (java.util.Map.Entry<String, Integer> entry : entrySet)\n {\n if(((java.util.Map.Entry<String, Integer>) entry).getValue() > count)\n { \n \t\tmostRepeatedNum = entry.getKey(); \n count = entry.getValue(); \n }\n }\n \n System.out.println(\"The most repeated number is : \" + mostRepeatedNum);\n \n System.out.println(\"Times repeated : \" + count);\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n reader.close(); //Closing the reader\n }\n catch (IOException e) \n {\n e.printStackTrace();\n }\n }\n\t\t\n\t}", "public static void main(String[] args) {\n\tString inputFileName = \"test\";\r\n WordCounter w = new WordCounter(inputFileName);\r\n w.writeOut(w.getCounts(w.getWords(w.readFile())));\r\n w.writeOut(w.getUniqueWords(w.readFile()));\r\n }", "private int uniqueMorseRepresentations(String[] words) {\n HashSet<String> morseWordMap = new HashSet<>();\n for(String word: words){\n String[] chars = word.split(\"\");\n StringBuilder builder = new StringBuilder();\n for(String character: chars){\n builder.append(UniqueMorseCodeRepresentations.morseMap.get(character));\n }\n\n morseWordMap.add(builder.toString());\n }\n\n return morseWordMap.size();\n }", "HashSet<String> readKeywords(String fileName) throws FileNotFoundException {\n\t\tFile txt = new File(fileName);\n\t\tScanner txtReader = new Scanner(txt);\n\t\tArrayList<String> keywords = new ArrayList<String>();\n\t\twhile (txtReader.hasNextLine()) {\n\t\t\tkeywords.add(txtReader.nextLine());\n\t\t}\n\t\ttxtReader.close();\n\t\tHashSet<String> noDuplicates = removeDuplicates(keywords);\n\t\treturn noDuplicates;\n\t}", "public int countDistinct(String s) {\n\t\tTrie root = new Trie();\n\t\tint result = 0;\n for (int i = 0; i < s.length(); i++) {\n \tTrie cur = root;\n \tfor (int j = i; j < s.length(); j++) {\n \t\tint idx = s.charAt(j) - 'a';\n \t\tif (cur.arr[idx] == null) {\n \t\t\tresult++;\n \t\t\tcur.arr[idx] = new Trie();\n \t\t}\n \t\tcur = cur.arr[idx];\n \t}\n }\n return result;\n }", "public TxtReader(String fileName) {\n File inFile;\n Scanner myScanner;\n characters = new char[MAXCHARACTERS];\n storingCharacter = new HashSet<>(); // will be used for vectorizing purposes\n\n // Use try block to catch FileNotFoundException\n try {\n inFile = new File(fileName);\n myScanner = new Scanner(inFile);\n\n while(myScanner.hasNextLine()) {\n String line = myScanner.nextLine(); // read file one line at a time\n String[] tokens = line.split(\"\"); // split the words in each line\n for(int i = 0; i < tokens.length; i++) {\n for(int b = 0; b < tokens[i].length(); b++) {\n characters[currentIndex] = tokens[i].charAt(b);\n numberOfCharacters++;\n currentIndex++;\n }\n }\n uniqueChars = new HashSet<>();\n for(int c = 0; c < numberOfCharacters; c++) {\n if (!uniqueChars.contains(characters[c])) {\n uniqueChars.add(characters[c]);\n }\n }\n characters[currentIndex] = '\\n';\n numberOfCharacters++;\n currentIndex++;\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"File \" + fileName + \" is not found!\");\n }\n\n // Print out the arrays\n System.out.println(\"\\nHere are the list of characters inside the array: \");\n for (int a = 0; a < numberOfCharacters; a++) {\n System.out.print(characters[a] + \",\");\n }\n System.out.println(\"\\n\");\n\n System.out.println(uniqueChars.toString());\n\n System.out.println(\"\\nThere are \" + numberOfCharacters + \" characters in the text file, and \" +\n uniqueChars.size() + \" unique characters. \" );\n }", "private void getHamStatistics() throws IOException{\n System.out.println(\"Getting ham statistics\"); \n File hamFile = new File(HamPath);\n // Find all words from the ham emails\n for(File file: hamFile.listFiles()){\n try { \n BufferedReader b = new BufferedReader(new FileReader(file));\n Scanner scanner = null; \n String line = b.readLine(); \n while(line != null){\n scanner = new Scanner(line);\n while(scanner.hasNext()){\n String next = scanner.next(); \n if(WordCountHam.get(next) != null){\n WordCountHam.put(next, WordCountHam.get(next)+1); \n }\n }\n line = b.readLine(); \n }\n } catch (FileNotFoundException ex) {\n System.err.println(ex.toString());\n }\n }\n }", "public int getNumWords() {\n // TODO: count the number of distinct words,\n // ie. the number of non-null counter objects.\n int count = 0;\n for (int i = 0; i < counters.length; i++){\n if (counters[i] != null) {\n count++;\n }\n }\n return count;\n }", "public static void findDuplicateWords(String inputString)\r\n\t{\r\n\t\t// split the words in words array \r\n\t\tString words[]= inputString.split(\" \");\r\n\t\t\r\n\t\t//Create HashMap for count the words \r\n\t\tHashMap<String, Integer> wordcount = new HashMap<String, Integer>();\r\n\t\t\r\n\t\t// to check each word in given array \r\n\t\t\r\n\t\tfor(String word: words )\r\n\t\t{\r\n\t\t\t//if word is present \r\n\t\t\tif(wordcount.containsKey(word)) {\r\n\t\t\t\twordcount.put(word.toLowerCase(), wordcount.get(word)+1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twordcount.put(word,1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//extracting all the keys of map : wordcount\r\n\t\tSet<String> wordInString = wordcount.keySet();\r\n\t\t\r\n\t\t// iterate the loop through all the wors in wordCount \r\n\t\tfor(String word : wordInString)\r\n\t\t{\r\n\t\t\tif(wordcount.get(word)>1)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(word+ \" : \" + wordcount.get(word));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "int countFile(File file) {\n return readFile(file).length;\n }", "public int count(String word);", "private static void ProcessFile(File fileEntry) throws FileNotFoundException {\n \n\t wordCount(fileEntry) ;\n\t\t\n countVowels(fileEntry);\n\t\n\t\t\n}", "public static void main(String[] args) {\n Scanner input = null;\r\n int allWords = 0;\r\n int threeLetterWords = 0;\r\n try {\r\n input = new Scanner(new File(\"prog512h.dat\"));\r\n } catch (FileNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n \r\n while(input.hasNext()){\r\n if (input.next().length() == 3){\r\n threeLetterWords++;\r\n }\r\n allWords++;\r\n }\r\n System.out.println(\"Three letter words comprised \" + 100*(threeLetterWords+0.0)/allWords + \"% of all words.\");\r\n \r\n }", "public static TreeSet<String> uniqueStems(Path inputFile) throws IOException {\n\t\tTreeSet<String> set = new TreeSet<String>();\n\t\ttry (BufferedReader reader = Files.newBufferedReader(inputFile);) {\n\t\t\tString line = null;\n\t\t\tStemmer stemmer = new SnowballStemmer(DEFAULT);\n\t\t\twhile ((line = reader.readLine())!= null) {\n\t\t\t\tset.addAll(uniqueStems(line, stemmer));\n\t\t\t}\n\t\t}\n\t\treturn set;\n\t}", "private static void countVowels(File fileEntry) throws FileNotFoundException {\n\t\tScanner sc = new Scanner(new FileInputStream(fileEntry));\n\t String fileContent = \"\";\n\t while (sc.hasNext())\n\t {\n\t fileContent += sc.next() + \" \";\n\t }\n\t sc.close();\n\n\t char[] charArr = fileContent.toCharArray();\n\t int counter = 0;\n\t for (char c : charArr)\n\t {\n\t if(c == 'a' || c == 'e' ||c == 'i' ||c == 'o' ||c == 'u')\n\t counter++;\n\t }\n\t System.out.println(\"The file \" + fileEntry.getName() + \" has AEIOU in order \" + counter + \" times\");\n\t}", "int count(String s) {\r\n\t\tif (m_words.containsKey(s)) {\r\n\t\t\treturn m_words.get(s);\r\n\t\t} else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "int getFileNamesCount();", "int getFileNamesCount();", "int getUniqueNumbersCount();", "@Test\r\n\tpublic void ifWordsAreGivenShouldReturnTheCountOfEachWord() throws FileNotFoundException\r\n\t{\n\t\t\r\n\t\t\r\n\t\tMap<String, Long> words = new HashMap<String, Long>();\r\n\t\t\r\n\t\tList<String> list = new ArrayList<String>(Arrays.asList(\"Hi,\",\"How\",\"are\",\"you.\",\"Hope\",\"you\",\"are\",\"fine.\"));\r\n\t\t\r\n\t\tMap<String, Long> vwords=new HashMap<String, Long>();\r\n\t\t\r\n\t\tvwords.put(\"Hi,\", 1L);\r\n\t\tvwords.put(\"How\", 1L);\r\n\t\tvwords.put(\"are\", 2L);\r\n\t\tvwords.put(\"you.\", 1L);\r\n\t\tvwords.put(\"Hope\", 1L);\r\n\t\tvwords.put(\"you\", 1L);\r\n\t\tvwords.put(\"fine.\", 1L);\r\n\t\t\r\n\t\twords=CountOfWords.CountEachWords(list);\r\n\t\t\r\n\t\tassertThat(vwords, is(words));\r\n\t\t\r\n//\t\tvwords.equals(new File(\"C:\\\\Users\\\\Nimmy\\\\OneDrive\\\\Desktop\\\\Java Program\\\\demo.txt\")); \r\n\t\r\n\r\n\r\n}", "int getNumberOfDetectedDuplicates();", "private void createFreqVector(Path file) {\r\n\t\t\tVector vector = new Vector(vocabulary.size());\r\n\t\t\tList<String> lines;\r\n\t\t\ttry {\r\n\t\t\t\tlines = Files.readAllLines(file);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSet<String> words = new HashSet<>();\r\n\t\t\t//create frequency vector of words in single document -> tf(w,d)\r\n\t\t\tfor (String line : lines) {\r\n\t\t\t\tif (line.isEmpty()) continue;\r\n\t\t\t\tString[] values = p.split(line);\r\n\t\t\t\tfor (String value : values) { \r\n\t\t\t\t\tif (value.isEmpty()) continue;\r\n\t\t\t\t\tString lowWord = value.toLowerCase().trim();\r\n\t\t\t\t\t\r\n\t\t\t\t\tInteger[] arr = vocabulary.get(lowWord);\r\n\t\t\t\t\tif (arr == null) continue;\r\n\t\t\t\t\tvector.incrementValueAt(arr[0]);\r\n\t\t\t\t\tif (words.add(lowWord)) {\r\n\t\t\t\t\t\t arr[1] += 1;\t//first time occurrence of this word in document\r\n\t\t\t\t\t\tvocabulary.put(lowWord, arr);\t//increment number of documents for this word\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfreqVectors.put(file, vector);\t\t\r\n\t\t}", "public int size(){\n return words.size();\n }", "static int numCommonWords (int m, int n)\n {\n\tint numCommon = 0;\n\tfor (int j=0; j<M; j++) {\n\t if ((data[j][m] > 0) && (data[j][n] > 0)) {\n\t\tnumCommon ++;\n\t }\n\t}\n\treturn numCommon;\n }", "private void exercise6() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> result;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n result = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .map(String::toLowerCase)\n .sorted()\n .collect(toList());\n }\n\n result.forEach(System.out::println);\n }", "public static void main(String[] args) {\n\n File input = new File(args[0]);\n Bag<String> statistics = new Bag<>();\n\n input.exists();\n\n try (Scanner sc = new Scanner(input)) {\n while (sc.hasNextLine()) {\n statistics.add(sc.nextLine());\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"Unable to access file: \" + args[0]);\n }\n\n System.out.println(\"Word statistics: \" + statistics);\n }", "public boolean count()\n {\n if(!textReaderWriter.initTextReader(fileName))\n return false;\n\n while(textReaderWriter.hasNextString()) {\n String temp = textReaderWriter.readOneString();\n String[] wordsTable = temp.split(\" \");\n for (int i = 0; i < wordsTable.length; i ++) // go throw words in a 1 line\n {\n for (StringPattern stringPattern : stringPatternList) { // go throw patterns\n if(containsPattern(stringPattern.getPattern(), wordsTable[i]))\n {\n stringPattern.incrementCountWords();\n }\n }\n }\n }\n return true;\n }", "public static void main(String[] args) {\n int validPhrases = 0;\n\n // get filepath for the puzzle input\n System.out.print(\"Please provide the filepath of the text document containing the puzzle input: \");\n String filePath = new Scanner(System.in).nextLine();\n\n try {\n // attempt to read each line in the file into a list\n List<String> lines = Files.readAllLines(Paths.get(filePath));\n\n /// PART 1\n for (String line : lines) {\n List<String> usedWords = new ArrayList<>();\n boolean validPassphrase = true;\n\n for (String word : line.split(\" \")) {\n if (usedWords.contains(word)) {\n validPassphrase = false;\n break;\n } else {\n usedWords.add(word);\n }\n }\n\n if (validPassphrase) {\n validPhrases++;\n }\n }\n\n System.out.println(\"The solution to part 1 is: \" + validPhrases);\n validPhrases = 0;\n\n /// PART 2\n for (String line : lines) {\n // this time around each word will be a dictionary mapping every character in the word, to how many\n // times that character is used in the word\n List<Map<Character, Integer>> usedWords = new ArrayList<>();\n boolean validPassphrase = true;\n\n for (String word : line.split(\" \")) {\n Map<Character, Integer> charMap = new HashMap<>();\n for (char c : word.toCharArray()) {\n // if the character has already been used, increment it's value, otherwise add it to the dict\n if (charMap.containsKey(c)) {\n charMap.put(c, charMap.get(c) + 1);\n } else {\n charMap.put(c, 1);\n }\n }\n\n // now we check if the word we're looking at is an anagram of any we've seen before on this line\n for (Map<Character, Integer> usedWord : usedWords) {\n // no need to check characters if the char maps are a different size\n if (usedWord.keySet().size() == charMap.keySet().size()) {\n boolean hasDifferingValues = false;\n for (char c : charMap.keySet()) {\n // we can short circuit checking every single character by breaking as soon as we see\n // any difference between the two words\n if (!usedWord.containsKey(c) || usedWord.get(c) != charMap.get(c)) {\n hasDifferingValues = true;\n break;\n }\n }\n\n if (!hasDifferingValues) {\n validPassphrase = false;\n break;\n }\n }\n }\n\n // we don't need to check the rest of the words if we already know the line is invalid\n if (!validPassphrase)\n break;\n usedWords.add(charMap);\n }\n\n if (validPassphrase) {\n validPhrases++;\n }\n }\n\n System.out.println(\"The solution to part 2 is: \" + validPhrases);\n } catch (Exception ex) {\n System.out.println(\"An error occurred attempting to read your input file.\");\n }\n }", "private double countWordFrequencyScore(Page page, String[] queryWords) {\n double score = 0;\n for (String word : queryWords) {\n int wordId = this.pb.getIdForWord(word);\n for (double pageWordId : page.getWords()) {\n if (wordId == pageWordId) score++;\n }\n }\n\n return score;\n }", "public void count(String problem2)\n\t\t{\n\t\t\t\t\n\t\t\t//this will begin to run\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//we create a scanner for input\n\t\t\t\tScanner readUserFile = new Scanner(new File(problem2));\n\t\t\t\t\n\t\t\t\t//a while function that will run as long as the text has more input\n\t\t\t\twhile(readUserFile.hasNext())\n\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tString nextUserWord = readUserFile.next();\n\t\t\t\t\t\n\t\t\t\t\tif (totalOccurence.containsKey(nextUserWord))\n\t\t\t\t\t\t\n\t\t\t\t\t{\n\t\t\t\t\t\tint occurence = totalOccurence.get(nextUserWord);\n\t\t\t\t\t\ttotalOccurence.put(nextUserWord, occurence + 1);\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse totalOccurence.put(nextUserWord, 1);\n\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t//free up used resources\n\t\t\t\treadUserFile.close();\n\t\t\t\n\t\t\t//we have a catch in place for any issues\t\n\t\t\t}\n\t\t\tcatch(IOException e)\n\t\t\t{\n\t\t\t\t//system print out if any error occurs\n\t\t\t\tSystem.out.println(\"Unfourtantly an issue occured when opening the file!\");\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\t\n\t\t}", "public HotWordsAnalyzer (String hotWordsFileName, String docFileName){\r\n //Setting the filenames to the variables to make them easier to type\r\n doc = docFileName;\r\n hw = hotWordsFileName;\r\n \r\n //If opening of the file fails, an ioException will be thrown\r\n\t\ttry{\r\n hotword = new Scanner(Paths.get(hw));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n try{\r\n \r\n docs = new Scanner(Paths.get(doc));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above opens both files\r\n \r\n //Goes through hotwords file and takes each word and pushes them to \r\n //the map words so they can be used to locate the hotwords in the document\r\n\t\ttry{\r\n while(hotword.hasNext()){\r\n String y;\r\n String x = hotword.next();\r\n y = x.toLowerCase();\r\n //sets hotword as key and 0 for the count of that hotword in the document\r\n words.put(y, 0);\r\n }\r\n }\r\n //The element doesn't exist- file must not be a file\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n //The file may not be readable or corrupt\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above gets words and puts them into the words map\r\n try{\r\n //reads the document and when it finds a hotword it increments the count in words\r\n while(docs.hasNext()){\r\n //gets next word\r\n String x = docs.next();\r\n String y = x.toLowerCase();\r\n //Gets rid of the commas and periods\r\n y = y.replace(\",\", \"\");\r\n y = y.replace(\".\", \"\");\r\n //If the word y is in the hotwords list\r\n if(words.containsKey(y)){\r\n //Adds to words map and increments count\r\n consec.add(y);\r\n int z;\r\n z = words.get(y);\r\n z++;\r\n words.put(y, z);\r\n }\r\n }\r\n }\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n \r\n\t\t\r\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\t\tList<String> arrList = new ArrayList<String>();\n\t\tString [] arr;\n\t\tFileInputStream fis= new FileInputStream(\"coverletter.txt\");\n\t\tScanner file = new Scanner(fis);\n\t\t\n\t\twhile(file.hasNextLine()){\n\t\t\tString str = file.next();\n\t\t\t// separate each words from line and add to arraylist\n\t\t\tarr=str.split(\"\\\\s+ \");\n\t\t\t\n\t\t\tCollections.addAll(arrList, arr);\n\t\t\tSystem.out.println(str);\n\t\t}\n\t\tSystem.out.println(arrList.size());\n\t\tSystem.out.println(arrList);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*for(String s: arrList){\n\t\t\tSystem.out.println(s);\n\t\t}*/\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// count the words in the arraylist\n\t\t\n\t\t\n\t\t\n\n\t}", "private int getTotalLetters(File trainDir) {\r\n\t\tint totalCharacterCount = 0;\r\n\t\tfor(File file : trainDir.listFiles()){\r\n\t\t\ttry{\r\n\t\t\t\t// open file\r\n\t\t\t\tFileReader fr = new FileReader(file);\r\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\t\t\r\n\t\t\t\twhile(br.ready()){\r\n\t\t\t\t\t// read a character and increment our counter if it is \r\n\t\t\t\t\t// a valid character (a-z, A-Z, ' ')\r\n\t\t\t\t\tchar c = (char) br.read();\r\n\t\t\t\t\tif(String.valueOf(c).matches(\"[A-Za-z ]\")){\r\n\t\t\t\t\t\ttotalCharacterCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(FileNotFoundException e){\r\n\t\t\t\tSystem.err.println(\"Failed to Find File: \" + file.toString());\r\n\t\t\t}\r\n\t\t\tcatch(IOException ioe){\r\n\t\t\t\tSystem.err.println(ioe.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn totalCharacterCount;\r\n\t}", "public static void main(String[] args) throws IOException {\n\n\t\tSystem.out.println(\"Please enter the name of the file\");\n\t\tScanner input = new Scanner(System.in);\n\t\tString fileName = input.next();\n\t\tSystem.out.println(\"Would you like to write all words including duplicates? Ente 'yes' for \"\n\t\t\t\t+ \"all words including duplicates. Enter 'no' to write words without duplicates\");\n\t\tString duplicates = input.next();\n\t\t\n\t\tFile file = new File(\"C:\\\\NewWorkspace\\\\Lekcija15\\\\src\\\\Vjezbe\\\\\" + fileName);\n\t\tif(!file.exists()){\n\t\t\tSystem.out.println(\"File name \" + fileName + \" does NOT exist\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tinput.close();\n\t\t\n\t\tSet<String> wordsSingle = new TreeSet<>();\n\t\tList<String> wordsDuplicates = new ArrayList<>();\n\n\t\tScanner read = new Scanner(file);\n\t\tString word;\n\n\t\twhile(read.hasNext()){\n\t\t\tword = read.next();\n\t\t\tif(duplicates.equals(\"yes\"))\n\t\t\t\twordsDuplicates.add(word);\n\t\t\telse\n\t\t\t\twordsSingle.add(word);\n\t\t}\n\t\tread.close();\n\t\t\n\t\tif(duplicates.equals(\"yes\")){\n\t\t\tCollections.sort(wordsDuplicates);\n\t\t\tfor(String words: wordsDuplicates)\n\t\t\t\tSystem.out.println(words);\n\t\t}\n\t\telse{\n\t\t\tfor(String words: wordsSingle)\n\t\t\t\tSystem.out.println(words);\n\t\t}\n\t}", "public int getTermFreq(String fileName, Term t){\n\t\tint freq = 0;\r\n\t\tfor (Map.Entry<String, IndexedDoc> set : index.entrySet()){\r\n\t\t\tif (set.getKey()==fileName){\r\n\t\t\t\treturn set.getValue().termCount(t);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn freq;\r\n\t}", "public static Object[] putWordFileArray(String wordFile) {\r\n\r\n\t\tint[][] documentMatrix = null;\r\n\t\tint distinctFiles = 0;\r\n\r\n\t\tFile file = new File(wordFile);\r\n\t\tBufferedReader reader;\r\n\t\tBoolean skipFirstLine = true;\r\n\t\tBoolean secondLine = true;\r\n\r\n\t\ttry {\r\n\t\t\t// creating a new buffered reader\r\n\t\t\treader = new BufferedReader(new FileReader(file));\r\n\t\t\tString text = null;\r\n\t\t\tString[] lineArray = new String[3];\r\n\r\n\t\t\t// looping till there is a next line in file\r\n\t\t\twhile ((text = reader.readLine()) != null) {\r\n\t\t\t\t// skipping the header line\r\n\t\t\t\tif (skipFirstLine) {\r\n\t\t\t\t\tskipFirstLine = false;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// utilizing information in second row to initialize array\r\n\t\t\t\t// container and get number of total files.\r\n\t\t\t\telse if (secondLine) {\r\n\t\t\t\t\tlineArray = text.split(\" \");\r\n\t\t\t\t\tdocumentMatrix = new int[Integer.parseInt(lineArray[0])][Integer.parseInt(lineArray[1])];\r\n\t\t\t\t\tdistinctFiles = Integer.parseInt(lineArray[0]);\r\n\r\n\t\t\t\t\tsecondLine = false;\r\n\t\t\t\t}\r\n\t\t\t\t// retrieving information from the document.\r\n\t\t\t\telse {\r\n\t\t\t\t\tlineArray = text.split(\" \");\r\n\t\t\t\t\tdocumentMatrix[Integer.parseInt(lineArray[0]) - 1][Integer.parseInt(lineArray[1]) - 1] = Integer\r\n\t\t\t\t\t\t\t.parseInt(lineArray[2]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// adding file not found exception\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// adding catch block emphasised by console\r\n\t\tcatch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn new Object[] { documentMatrix, distinctFiles };\r\n\t}", "public static int numberOfSegs() {\n String sql = \"SELECT COUNT(*) FROM corpus1;\";\n\n int notDistinctCount = 0;\n int distinctCount = 0;\n\n try (Connection conn = DatabaseOperations.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n notDistinctCount = rs.getInt(1);\n } catch (SQLException e) {\n System.out.println(\"count: \" + e.getMessage());\n }\n\n sql = \"SELECT COUNT(DISTINCT id) FROM corpus1;\";\n try (Connection conn = DatabaseOperations.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n distinctCount = rs.getInt(1);\n } catch (SQLException e) {\n System.out.println(\"count: \" + e.getMessage());\n }\n\n if (distinctCount != notDistinctCount) {\n System.out.println(distinctCount + \", \" + notDistinctCount);\n }\n\n return distinctCount;\n }", "public int getFrequencyOf(String word) {\r\n\t\tint frequency = 0;\r\n\t\tif (readDocument != null) {\r\n\t\t\tfrequency = readDocument.getFrequencyOf(word);\r\n\t\t\tSystem.out.println(\"Frequency: \" + frequency);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t\treturn frequency;\r\n\t}", "public String[] topHotWords( int count ){\r\n //If the number put in the arguments is greater than the number of distinct hotwords\r\n //in the document, limit it to distinctCount\r\n if (count > distinctCount()){\r\n count = distinctCount();\r\n }\r\n //Creating the array that will hold all the hotwords in order of number of appearances \r\n String[] topWord = new String[words.size()];\r\n //This is the subset of the array above that will return the amount specified by the count argument\r\n String[] output = new String[count];\r\n //Fills the array with blank strings\r\n Arrays.fill(topWord, \"\");\r\n //Iterator for moving through topWord for assignment\r\n int iterator = 0;\r\n //Loop through every hotword in words and puts those words in topWord\r\n for(String key: words.keySet()){\r\n topWord[iterator] = key;\r\n iterator++;\r\n }\r\n //Sorts the words in topword\r\n for(int i = 0; i < words.size(); i++){\r\n for(int j = words.size()-1; j > 0; j-- ){\r\n \r\n if(count(topWord[j]) > count(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n \r\n }\r\n }\r\n //Does a secondary check to be certain all words are in proper appearance number order\r\n for(int i = words.size()-1; i >0; i--){\r\n if(count(topWord[i]) > count(topWord[i-1])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[i-1];\r\n topWord[i-1] = temp;\r\n }\r\n }\r\n //Orders the words with the same number of appearances by order of appearance in the document\r\n for (int i = 0; i < words.size(); i++){\r\n for(int j = i+1; j < words.size(); j++){\r\n if (count(topWord[i]) == count(topWord[j])){\r\n if (consec.indexOf(topWord[j]) < consec.indexOf(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n }\r\n }\r\n }\r\n //Gets the subset requested for return\r\n for (int i = 0; i < count; i++){\r\n output[i] = topWord[i];\r\n }\r\n return output;\r\n\t}", "public static void findWords(String target) throws FileNotFoundException{\n //reads file through the scanner\n scan = new Scanner(newFile);\n \n //creates new arraylist \n ArrayList<String> list = new ArrayList<String>();\n int count;\n while(scan.hasNextLine()){\n word = scan.nextLine();\n if(contains(target, word)){\n list.add(word.toLowerCase());\n }\n }\n\n int length = target.length();\n\n for(int i = length; i >= 2; i--){\n count = 0;\n System.out.println(i + \" letter words made by unscrambling the letters in \" + target );\n \n //This loop goes through all the strings in the arraylist of words contained\n //in the target word\n for(String a : list){\n //If the length of word in the arraylist is equal to i it prints the \n //word, as long as the line does not go over 40 characters\n if(a.length() == i) {\n if(count > (40 -a.length())){ \n System.out.print(\"\\n\");\n System.out.print(a + \" \");\n count = 0;\n count += (a.length() + 1);\n }\n else{\n System.out.print(a + \" \");\n count += (a.length() + 1);\n }\n }\n\n }\n //decrements length, and continues going through the loop\n length--;\n System.out.println(\"\\n\");\n }\n }", "public int getNumberOfConcatenatedWords() {\n return concatenatedWords.size();\n }", "private static int computeOccurrences(String filename, Map< String, Integer> occurrences) {\n // Since we can't change a local variable inside a lambda expression\n // we can't just do \"int count = 0;\". This is simply not possible inside\n // a lamda. Therefore we create a class counter like we have seen before\n // to store the count for each method call. We then return the int value\n // of this counter.\n Counter counter = new Counter();\n try {\n Files.lines(Paths.get(filename))\n .flatMap(Words::extractWords)\n .map(s -> {\n if (s.startsWith(\"L\")) {\n counter.increment();\n }\n return s.toLowerCase();\n })\n .forEach(s -> {\n synchronized (occurrences) {\n occurrences.merge(s, 1, Integer::sum);\n }\n });\n } catch (IOException e) {\n e.printStackTrace();\n }\n return counter.getValue();\n }", "public void analyze(ArrayList<String> words) throws IOException\n {\n int[] letterOccurences = new int[regularAlphabet.length];\n double[] percentOccurence = new double[letterOccurences.length];\n int numberOfLetters = 0;\n \n //Loops to calculate number of occurences per letter.\n for(int wordCount = 0; wordCount<words.size(); wordCount++)\n {\n for(int letterCount = 0; letterCount<words.get(wordCount).length(); letterCount++)\n {\n for(int alphabetCharacter = 0; alphabetCharacter<regularAlphabet.length; alphabetCharacter++)\n {\n if(regularAlphabet[alphabetCharacter].equalsIgnoreCase(words.get(wordCount).substring(letterCount, letterCount+1)))\n {\n letterOccurences[alphabetCharacter]++;\n numberOfLetters++;\n }\n }\n }\n }\n \n //Loop to calculate percent occurences of letters.\n for(int index = 0; index<percentOccurence.length; index++)\n {\n percentOccurence[index] = (letterOccurences[index]/(double)numberOfLetters)*100;\n }\n \n PrintWriter outFile = new PrintWriter (new File(\"ciphertextfreq.txt\"));\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%6s | %12s | %11s|\",\"Letter\",\"Frequency\",\"Percent\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.printf(\"|%6s | %12s | %11s|\\n\",\"Letter\",\"Frequency\",\"Percent\");\n System.out.println(\"-------------------------------------------\");\n for(int printIndex = 0; printIndex<regularAlphabet.length; printIndex++)\n {\n outFile.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n System.out.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\\n\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n }\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%5s | %10d | %10d%s|\",\"Total\",numberOfLetters,100,\"%\");\n System.out.printf(\"|%5s | %10d | %10d%s|\\n\",\"Total\",numberOfLetters,100,\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.close();\n }", "public int countOfUnknownWord() {\n\t\tint count = 0;\t\t\n\t\ttry {\n \t\t\tClass.forName(DRIVER);\n \t\t} catch (ClassNotFoundException e1) {\n \t\t\t// TODO Auto-generated catch block\n \t\t\te1.printStackTrace();\n \t\t}\t\t\n\t\ttry ( Connection con = DriverManager.getConnection(URL, USER, PW)) {\n\t\t\tStatement stmt = con.createStatement();\n\t\t\tString sql;\n\t\t\tsql = \"SELECT count(*) countWordLevel from \" + tbl_USER_DIC + \" WHERE \" + Constants.FLD_KNOW + \" = \" + Constants.WORD_UNKNOWN + \";\";\n\t\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t\twhile (rs.next()) {\n\t\t\t\tcount = rs.getInt(\"countWordLevel\");\n\t\t\t}\n\t\t\t\n\t stmt.close();\n\t con.close();\n\t\t} catch(Exception e) {\n\t\t\tlogger.info(\"fail to open mysql\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn count;\t\n\t}", "public int getNumWords() {\n return wordMap.get(\"TOTAL_WORDS\").intValue();\n }", "public int count () throws IOException {\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tinit();\n\t\twhile(hasNext()) {\n\t\t\tElement el = nextElement();\n\t\t\tint hash = el.GetHash();\n\t\t\tint pos = locate (list, hash);\n\t\t\tif ((pos == list.size()) || (list.get(pos) != hash)) {\n\t\t\t\tlist.add(pos, hash);\n\t\t\t}\n\t\t\t/*for (i=0; i<list.size() && list.get(i)<hash; i++) {}\n\t\t\t\tif ((i==list.size()) || (list.get(i) != el.GetHash())) {\n\t\t\t\t\tlist.add(i, hash);\n\t\t\t\t}*/\n\t\t}\n\t\treturn list.size();\n\t}", "private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}", "public List<String> getFrequentWords() {\n\t\tif (this.frequentWords == null) {\n\t\t\tSet<String> wordsToReturn = new TreeSet<String>();\n\t\t\tfor (String folder : termFrequencyManager.getTfidfByFolder().keySet()) {\n\t\t\t\tint index = 0;\n\t\t\t\tMap<String, TFIDFSummary> tfidSummaries =\n\t\t\t\t\t\ttermFrequencyManager.getTfidfByFolder().get(folder);\n\t\t\t\tArrayList<TFIDFSummary> tfidfSummariesList = new ArrayList<TFIDFSummary>(tfidSummaries.size());\n\t\t\t\tfor (String term : tfidSummaries.keySet()) {\n\t\t\t\t\ttfidfSummariesList.add(tfidSummaries.get(term));\n\t\t\t\t}\n\t\t\t\tCollections.sort(tfidfSummariesList);\n\n\t\t\t\twhile (index < tfidfSummariesList.size() && index < MAX_NUM_ATTRIBUTES_BY_FOLDER) {\n\t\t\t\t\tTFIDFSummary ts = tfidfSummariesList.get(tfidfSummariesList.size() - 1 - index);\n\t\t\t\t\twordsToReturn.add(ts.getTerm());\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.frequentWords = new ArrayList<String>(wordsToReturn);\n\t\t}\n\t\tSystem.out.println(\"Numero de palabras frecuentes: \" + this.frequentWords.size());\n\t\tfor (String w : frequentWords) System.out.println(\"FreqWord \" + w);\n\t\treturn this.frequentWords;\n\t}", "public ArrayList<WordMap> countWordOccurrences(String filePaths, WordMap corpus,\n Word.Polarity polarity) {\n\n Scanner sc1, sc2;\n ArrayList<WordMap> wordMaps = new ArrayList<WordMap>();\n\n // Where the training texts are located\n String subFolder;\n if (polarity == Word.Polarity.POSITIVE) subFolder = FOLDER_POSITIVE;\n else if (polarity == Word.Polarity.NEGATIVE) subFolder = FOLDER_NEGATIVE;\n else subFolder = FOLDER_NEUTRAL;\n\n try {\n String previousWord = \"\";\n\n sc1 = new Scanner(new File(filePaths));\n\n //For each training file\n while (sc1.hasNextLine()) {\n // Contains one filename per row\n String currentFile = FOLDER_TXT + subFolder + sc1.nextLine();\n\n sc2 = new Scanner(new File(currentFile));\n WordMap textMap = new WordMap(); // Map for this text\n\n while (sc2.hasNextLine()) {\n String[] words = sc2.nextLine().split(\" \");\n\n for (int j = 0; j < words.length; j++){\n //Replaces all characters which might cause us to miss the key\n String word = words[j].replaceAll(\"\\\\W\", \"\");\n\n //For each word, if it is in the WordMap increment the count\n if (corpus.has(word)) {\n // Store a new word if it has not been created\n if (!textMap.has(words[j])) {\n Word objWord = copyWord(corpus.get(word));\n textMap.put(word, objWord);\n }\n\n //If the words are negated, flip the count\n if (polarity == Word.Polarity.POSITIVE &&\n negations.contains(previousWord)) { // Negate\n textMap.addCountNegative(word);\n } else if (polarity == Word.Polarity.POSITIVE) {\n textMap.addCountPositive(word);\n } else if (polarity == Word.Polarity.NEGATIVE &&\n negations.contains(previousWord)) { // Negate\n textMap.addCountPositive(word);\n } else if (polarity == Word.Polarity.NEGATIVE) {\n textMap.addCountNegative(word);\n } else { // Neutral, don't negate\n textMap.addCountNeutral(word);\n }\n }\n\n previousWord = word;\n }\n }\n\n wordMaps.add(textMap);\n\n sc2.close();\n }\n\n sc1.close();\n } catch (Exception e) {\n System.err.println(\"Error in countWordOccurences\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n return null;\n }\n\n return wordMaps;\n }", "public int countOccurrences(String word) {\n\t\tint i = 0;\n\t\tfor (int j = 0; j < wordList.size(); j++) {\n\t\t\tif (wordList.get(j).equals(word)) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\treturn i;\n\t\t// TODO Add your code here\n\t}", "private Set<String> get5000MostPopularWords(Predicate<String> stringFilter) throws FileNotFoundException {\n InputStream wordIS = this.getClass().getResourceAsStream(\"5000-MostPopularEnglishWords.txt\"); // not the best file since it has dups and words that are one and two characters\n BufferedReader reader = new BufferedReader(new InputStreamReader(wordIS));\n\n return reader.lines()\n .filter(stringFilter)\n .collect(Collectors.toSet());\n }", "@Test\n public void findAnagramWordInEmptyFile() throws IOException {\n \tFileManager fileManager = new AnagramTextFileManager(\"src/test/resources/empty.txt\");\n \tfileManager.find();\n \tassertEquals(0, fileManager.getWordsFound().size());\n }" ]
[ "0.831895", "0.7363984", "0.6811787", "0.68084836", "0.676439", "0.6759347", "0.66774404", "0.65923846", "0.6485155", "0.64306337", "0.6404873", "0.6304407", "0.62841874", "0.6283787", "0.6271617", "0.6244139", "0.61893725", "0.6173178", "0.6130164", "0.61222124", "0.61048126", "0.60909736", "0.6054844", "0.60261226", "0.60164547", "0.60115653", "0.5975473", "0.596426", "0.5953219", "0.5915997", "0.5899631", "0.5872343", "0.58299637", "0.5797824", "0.57928675", "0.57876587", "0.5774803", "0.5769889", "0.57689", "0.57318705", "0.57290584", "0.5728482", "0.57213134", "0.5711405", "0.57078147", "0.5707471", "0.5705928", "0.5699116", "0.5676989", "0.56592244", "0.56499344", "0.5645723", "0.5642977", "0.5631809", "0.56195015", "0.561676", "0.5605053", "0.55957294", "0.5593027", "0.5581922", "0.55749094", "0.5566096", "0.5565498", "0.5560656", "0.55537486", "0.55537486", "0.55455226", "0.5545077", "0.55341583", "0.5525327", "0.55148053", "0.5503605", "0.54947156", "0.5490538", "0.5484075", "0.548404", "0.54817474", "0.5467329", "0.5454652", "0.5445382", "0.54428035", "0.5433036", "0.54282284", "0.54259765", "0.5416328", "0.54139626", "0.54060596", "0.5405437", "0.539816", "0.5379306", "0.53658277", "0.5362141", "0.53606623", "0.53574216", "0.5345561", "0.5336341", "0.53355944", "0.53287554", "0.5322052", "0.5314162" ]
0.82803637
1
returns top 20 frequent words with frequencies
public Object[][] get20MostFrequentWords(File file) throws Exception{ Object[][] ans = new Object[20][2]; HashMap<String,Integer> map = new HashMap<>(); PriorityQueue<String> queue = new PriorityQueue<>(new Comparator<String>(){ public int compare(String s1,String s2){ return map.get(s1) - map.get(s2); } }); BufferedReader br = new BufferedReader(new FileReader(file)); String line; while((line=br.readLine())!=null){ String[] tokens = line.split("\\s+"); for(String token : tokens){ if(token.length()==0)continue; int val = map.getOrDefault(token, 0); map.put(token,val+1); } } br.close(); Set<String> keys = map.keySet(); int count = 0; for(String key : keys){ if(count < 20){ queue.offer(key); count++; } else{ String topMin = queue.peek(); if(map.get(key) > map.get(topMin)){ queue.poll(); queue.offer(key); } } } int index = ans.length-1; while(!queue.isEmpty() && index>=0){ String key = queue.poll(); int value = map.get(key); ans[index][0] = key; ans[index][1] = value; index--; } return ans; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] topHotWords( int count ){\r\n //If the number put in the arguments is greater than the number of distinct hotwords\r\n //in the document, limit it to distinctCount\r\n if (count > distinctCount()){\r\n count = distinctCount();\r\n }\r\n //Creating the array that will hold all the hotwords in order of number of appearances \r\n String[] topWord = new String[words.size()];\r\n //This is the subset of the array above that will return the amount specified by the count argument\r\n String[] output = new String[count];\r\n //Fills the array with blank strings\r\n Arrays.fill(topWord, \"\");\r\n //Iterator for moving through topWord for assignment\r\n int iterator = 0;\r\n //Loop through every hotword in words and puts those words in topWord\r\n for(String key: words.keySet()){\r\n topWord[iterator] = key;\r\n iterator++;\r\n }\r\n //Sorts the words in topword\r\n for(int i = 0; i < words.size(); i++){\r\n for(int j = words.size()-1; j > 0; j-- ){\r\n \r\n if(count(topWord[j]) > count(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n \r\n }\r\n }\r\n //Does a secondary check to be certain all words are in proper appearance number order\r\n for(int i = words.size()-1; i >0; i--){\r\n if(count(topWord[i]) > count(topWord[i-1])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[i-1];\r\n topWord[i-1] = temp;\r\n }\r\n }\r\n //Orders the words with the same number of appearances by order of appearance in the document\r\n for (int i = 0; i < words.size(); i++){\r\n for(int j = i+1; j < words.size(); j++){\r\n if (count(topWord[i]) == count(topWord[j])){\r\n if (consec.indexOf(topWord[j]) < consec.indexOf(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n }\r\n }\r\n }\r\n //Gets the subset requested for return\r\n for (int i = 0; i < count; i++){\r\n output[i] = topWord[i];\r\n }\r\n return output;\r\n\t}", "private static void printMostUsedWords(){\n\t\tMap<String, Integer> words = getWords();\n\t\t\n\t\tString max_count_string[] = new String[3];\n\t\tint max_counts[] = new int[3];\n\t\t\n\t\tfor(String str : words.keySet()){\n\t\t\tint count = words.get(str);\n\t\t\tint index = getMinIndex(max_counts);\n\t\t\t\n\t\t\tif(count > max_counts[index]){\n\t\t\t\tmax_counts[index] = count;\n\t\t\t\tmax_count_string[index] = str;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* printing top 3 most frequently used words */\n\t\tSystem.out.println(\"top 3 most frequently used words : \");\n\t\tfor(int i=0; i<3; i++){\n\t\t\tSystem.out.println(\"Word : \\\"\" + max_count_string[i] + \"\\\" is used \"+ max_counts[i] +\" times\" );\n\t\t}\n\t\tSystem.out.println();\n\t}", "private static ArrayList<sri.Pair<String,Integer>> mostFrequentWords(String path) throws IOException {\r\n PriorityQueue<Pair<String, Integer>> listOfWords = new PriorityQueue<>(10,(o1, o2) -> {\r\n return ((int) o2.getSecond() - (int) o1.getSecond());\r\n });\r\n\r\n HashMap<String,Integer> mapOfWords = new HashMap<>();\r\n\r\n BufferedReader br;\r\n String word;\r\n ArrayList outputList = new ArrayList();\r\n\r\n File file = new File(path);\r\n\r\n br = new BufferedReader(new FileReader(file));\r\n\r\n while ( (word = br.readLine()) != null) {\r\n if (mapOfWords.containsKey(word)) {\r\n mapOfWords.put(word, mapOfWords.get(word) + 1);\r\n } else {\r\n mapOfWords.put(word, 1);\r\n }\r\n }\r\n\r\n for (Map.Entry<String,Integer> entry: mapOfWords.entrySet()){\r\n sri.Pair<String,Integer> tuple = new sri.Pair<String,Integer>(entry.getKey(),entry.getValue());\r\n listOfWords.offer(tuple);\r\n }\r\n\r\n for (int i = 0; i < 5; i++){\r\n outputList.add(new sri.Pair<String,Integer>(listOfWords.peek().getFirst(),listOfWords.poll().getSecond()));\r\n }\r\n\r\n return outputList;\r\n\r\n\r\n }", "public Object[][] get20MostInterestingFrequentWords(File file) throws Exception{\n\t\tObject[][] ans = new Object[20][2];\n\t\tHashMap<String,Integer> map = new HashMap<>();\n\t\tPriorityQueue<String> queue = new PriorityQueue<>(new Comparator<String>(){\n\t\t\tpublic int compare(String s1,String s2){\n\t\t\t\treturn map.get(s1) - map.get(s2);\n\t\t\t}\n\t\t});\n\t\tSet<String> stopwords = getStopWords();\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\tString line;\n\t\twhile((line=br.readLine())!=null){\n\t\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\t\tfor(String token : tokens){\n\t\t\t\t if(stopwords.contains(token) || token.length()==0) continue;\n\t\t\t\t\tint val = map.getOrDefault(token, 0);\n\t\t\t\t\tmap.put(token,val+1);\n\t\t\t\t}\n\t\t}\n\t\tbr.close();\n Set<String> keys = map.keySet();\n int count = 0;\n for(String key : keys){\n \tif(count < 20){\n \t\tqueue.offer(key);\n \t\tcount++;\n \t}\n \telse{\n \t\tString topMin = queue.peek();\n \t\tif(map.get(key) > map.get(topMin)){\n \t\t\tqueue.poll();\n \t\t\tqueue.offer(key);\n \t\t}\n \t}\n }\n int index = ans.length-1;\n while(!queue.isEmpty() && index>=0){\n \tString key = queue.poll();\n \tint value = map.get(key);\n \tans[index][0] = key;\n \tans[index][1] = value;\n \tindex--;\n \t\n }\n\t\t\n\t\treturn ans;\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n public List<Map<String, Double>> getTopWords(Company company) {\n List<Map<String, Double>> topWords = new ArrayList<Map<String, Double>>();\n Map<String, Double> termToTfIdf = new TreeMap<String, Double>();\n Map<String, Integer> tokenMap = tfIdf.get(company.getStockSymbol());\n for (String token : tokenMap.keySet()) {\n double tfIdf = 0;\n double termFrequency = tokenMap.get(token);\n double documentFrequency = calculateDocumentFrequency(token);\n tfIdf = termFrequency / documentFrequency;\n termToTfIdf.put(token, tfIdf);\n }\n List<Entry<String, Double>> entrySet = new ArrayList<Entry<String, Double>>();\n entrySet.addAll(termToTfIdf.entrySet());\n Collections.sort(entrySet, new Comparator() {\n\n @Override\n public int compare(Object o1, Object o2) {\n return ((Entry<String, Double>) o1).getValue().compareTo(\n ((Entry<String, Double>) o2).getValue());\n }\n\n });\n if (entrySet.size() < NO_OF_TOP_WORDS) {\n for (int i = 0; i < entrySet.size(); i++) {\n Map<String, Double> tempMap = new HashMap<String, Double>();\n tempMap.put(entrySet.get(i).getKey(), entrySet.get(i).getValue());\n topWords.add(tempMap);\n }\n } else {\n for (int i = entrySet.size() - NO_OF_TOP_WORDS; i < entrySet.size(); i++) {\n Map<String, Double> tempMap = new HashMap<String, Double>();\n tempMap.put(entrySet.get(i).getKey(), entrySet.get(i).getValue());\n topWords.add(tempMap);\n }\n }\n return topWords;\n }", "private static List<String> computeTwoGramFrequencies(List<String> words, int top_no, List<String> stopwordslist) {\n\t\t\t\n\t\tMap<String, Integer> tempstopmap= new HashMap<String, Integer>();\n\t\tfor (int i=0; i<stopwordslist.size(); i++){\n\t\t\tString tempword = stopwordslist.get(i);\n\t\t\ttempstopmap.put(tempword, 1);\n\t\t}//construct temp stopwordmap\n\t\t\n\t\tint i=0;\n\t\tMap<String, Integer> tempmap= new HashMap<String, Integer>();\n\t\twhile(i<words.size()){\n\t\t\tString temptwogram=\"\";\n\t\t\tString tempword1=\" \";\n\t\t\tString tempword2=\" \";\n\t\t\twhile(true){\n\t\t\t\tif(i>=words.size()-1)\n\t\t\t\t\tbreak;\n\t\t\t\ttempword1=words.get(i);\n\t\t\t\tif(!tempstopmap.containsKey(tempword1))\n\t\t\t\t\tbreak;\n\t\t\t\ti++;\n\t\t\t\ttempword1=\" \";\n\t\t\t}\n\t\t\ti++;\n\t\t\tSystem.out.println(\"b\"+i);\n\t\t\twhile(true){\n\t\t\t\tif(i>=words.size())\n\t\t\t\t\tbreak;\n\t\t\t\ttempword2=words.get(i);\n\t\t\t\tif(!tempstopmap.containsKey(tempword2))\n\t\t\t\t\tbreak;\n\t\t\t\ti++;\n\t\t\t\ttempword2=\" \";\n\t\t\t}//jump for the case that word + stopword +word\n\t\t\t\n\t\t\ttemptwogram = tempword1+\" \"+tempword2; //2-gram\n\t\t\tif (tempmap.containsKey(temptwogram))\n\t\t\t\ttempmap.put(temptwogram, tempmap.get(temptwogram)+1);\n\t\t\telse\n\t\t\t\ttempmap.put(temptwogram, 1);\n\t\t}//construct hashmap to count 2-gram words (key(word), value(frequency))\n\t\tList<Map.Entry<String, Integer>> templist = new ArrayList<Map.Entry<String, Integer>>();\n\t\tfor(Map.Entry<String, Integer> entry: tempmap.entrySet()){\n\t\t\t\n\t\t\t\n\t\t\ttemplist.add(entry);\n\t\t}//construct templist with entry containing word/frequency in map\n\t\t\n\t\tCollections.sort(templist, Collections.reverseOrder(new comparatorByFrequencyReverse()));//sort templist in decresing order\n\n\t\t /*change the templist into sortedlist*/\n\t\tList<String> sortedlist = new ArrayList<String> ();\n\t\tif(templist.size()>=top_no){\n\t\t\tfor (int j=0; j<top_no;j++){\n\t\t\t\tString word = templist.get(j).getKey();\n\t\t\t\tsortedlist.add(word);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tfor (int j=0; j<templist.size();j++){\n\t\t\t\tString word = templist.get(j).getKey();\n\t\t\t\tsortedlist.add(word);\n\t\t\t}\n\t\t}\n\t\treturn sortedlist;\n\t}", "private static void printMostFrequentHashTags(){\n\t\t\n\t\tMap<String, Integer> hashtags = getHashTags();\n\t\tString max_count_hashtag[] = new String[3];\t//stores top 3 most frequent hashtags\n\t\tint max_counts[] = new int[3];\t//stores their count\n\t\t\n\t\tfor(String hashtag : hashtags.keySet()){\n\t\t\tint count = hashtags.get(hashtag);\n\t\t\tint index = getMinIndex(max_counts);\n\t\t\tif(count > max_counts[index]){\n\t\t\t\tmax_counts[index] = count;\n\t\t\t\tmax_count_hashtag[index] = hashtag;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* printing top 3 most freqent hashtags */\n\t\tSystem.out.println(\"top 3 most frequently used hashtags : \");\n\t\tfor(int i=0; i<3; i++){\n\t\t\tSystem.out.println(\"Hashtag : #\" + max_count_hashtag[i] + \" is used \"+ max_counts[i] + \" times.\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t}", "public List<String> topKFrequent(String[] words, int k) {\n HashMap<String, Integer> map = new HashMap<String, Integer>();\n\n for (String s : words) {\n map.put(s, map.getOrDefault(s, 0) + 1);\n }\n \n ArrayList<Integer> allFrequencies = new ArrayList<Integer>();\n\n \n map.forEach((key,v) -> allFrequencies.add(v));\n IO.printArrayList(allFrequencies);\n // Add all the frequencies into allFrequencies arraylist\n int totalAmountOfWords = map.keySet().size();\n \n // Find the k th largest number in the allFrequencies arraylist\n //System.out.println(\"total: \"+totalAmountOfWords);\n int newK = totalAmountOfWords - k;\n //System.out.println(\"newk: \"+ newK);\n int newkth = findKth(allFrequencies, newK);\n //System.out.println(\"new kth element:\"+newkth);\n int newKthElement = newK > 0 ? newkth : 0 ;\n \n TreeMap<Integer, TreeSet<String>> reverseSortedMap = new TreeMap<Integer, TreeSet<String>>(Collections.reverseOrder());\n map.forEach((key,v) -> {if (v >= newKthElement ) {\n if(!reverseSortedMap.containsKey(v)) reverseSortedMap.put(v, new TreeSet<String>());\n reverseSortedMap.get(v).add(key);}});\n \n List<String> result = new ArrayList<String>();\n reverseSortedMap.forEach((key,v) -> {result.addAll(v);});\n \n return result.size() > k? result.subList(0, k): result;\n }", "public Object[][] get20LeastFrequentWords(File file) throws Exception{\n\t\tObject[][] ans = new Object[20][2];\n\t\tHashMap<String,Integer> map = new HashMap<>();\n\t\tPriorityQueue<String> queue = new PriorityQueue<>(new Comparator<String>(){\n\t\t\tpublic int compare(String s1,String s2){\n\t\t\t\treturn -(map.get(s1) - map.get(s2));\n\t\t\t}\n\t\t});\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\tString line;\n\t\twhile((line=br.readLine())!=null){\n\t\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\t\tfor(String token : tokens){\n\t\t\t\tif(token.length()==0)continue;\n\t\t\t\t\tint val = map.getOrDefault(token, 0);\n\t\t\t\t\tmap.put(token,val+1);\n\t\t\t\t}\n\t\t}\n\t\tbr.close();\n Set<String> keys = map.keySet();\n int count = 0;\n for(String key : keys){\n \tif(count < 20){\n \t\tqueue.offer(key);\n \t\tcount++;\n \t}\n \telse{\n \t\tString topMin = queue.peek();\n \t\tif(map.get(key) < map.get(topMin)){\n \t\t\tqueue.poll();\n \t\t\tqueue.offer(key);\n \t\t}\n \t}\n }\n int index = ans.length-1;\n while(!queue.isEmpty() && index>=0){\n \tString key = queue.poll();\n \tint value = map.get(key);\n \tans[index][0] = key;\n \tans[index][1] = value;\n \tindex--;\n \t\n }\n\t\t\n\t\treturn ans;\n\t}", "public String showSearchFrequency(WordCount wordCount, String order) {\n TreeMap<Integer, TreeMap<String, Word>> wordCountMap = wordCount.getWordCount(); //get map ordered by word count\n String returnedString = \"You have searched for these words \";\n if (order.equals(\n \"asc\") || order.equals(\"\")) { //list in ascending displayOrder\n returnedString += \"least:\\n\";\n for (Map.Entry<Integer, TreeMap<String, Word>> entry : wordCountMap.entrySet()) {\n returnedString += entry.getKey() + \" searches -\\n\";\n for (Map.Entry<String, Word> word : entry.getValue().entrySet()) {\n returnedString += word.getKey() + \"\\n\";\n }\n }\n } else { //list in descending displayOrder\n returnedString += \"most:\\n\";\n for (Integer searchCount : wordCountMap.descendingKeySet()) {\n returnedString += searchCount + \" searches -\\n\";\n for (Map.Entry<String, Word> word : wordCountMap.get(searchCount).entrySet()) {\n returnedString += word.getKey() + \"\\n\";\n }\n }\n }\n return returnedString;\n }", "public Pair[] top10Words(){\n Pair[] top10Words = new Pair[10];\n int top10LeastOccurrence = 9;\n\n for (String word : matchedSongs.keySet()){\n int currentSize = matchedSongs.get(word).size();\n //Array is sorted from greatest to least, just need to compare last value to current value.\n //Sorting after insertion will ensure it is in order for next time we perform a compare.\n if (top10Words[top10LeastOccurrence] == null || (int) top10Words[top10LeastOccurrence].getValue() < currentSize){\n top10Words[top10LeastOccurrence] = new Pair(word, currentSize);\n Arrays.sort(top10Words, new SortByHighestPair());\n }\n }\n return top10Words;\n }", "public void apply(GlobalWindow window, Iterable<String> values, \n Collector<Tuple2<String,Integer>> out) throws Exception {\n \t HashMap <String,Integer> countWord = new HashMap<String,Integer>();\n \n for (String value : values) {\n \t \n \t String[] tokens = value.toLowerCase().split(\"\\\\W+\");\n \t for (String token : tokens)\n \t {\t if (token.length() >0) {\n \t\t if (countWord.get(token) != null)\n { countWord.put(token, countWord.get(token)+1);}\n else\n {countWord.put(token, 1);}\n \t }\n \t\t \n \t }\n }\n \n \n //Comparator to sort in reverse\n \t\t\tComparator<String> comparator = new Comparator<String>() {\n \t\t\t public int compare(String o1, String o2) {\n \t\t\t return countWord.get(o1).compareTo(countWord.get(o2));\n \t\t\t }\n \t\t\t};\n\n \t\t\tArrayList<String> words = new ArrayList<String>();\n \t\t\twords.addAll(countWord.keySet());\n\n \t\t\tCollections.sort(words,comparator);\n \t\t\tCollections.reverse(words);\n \t\t\t\n// System.out.println(Arrays.asList(words));\n \t\t\tSystem.out.println(\"10 most frequent words per stream\");\n System.out.println(\"-----------\");\n \n for(int i = 0; i < 10; i++) {\n \tSystem.out.println(words.get(i) + \" : \" + countWord.get(words.get(i)));\n }\n \n \n System.out.println(\"\\n\");\n \n }", "private static void MostFrequentTwoGram() throws Exception{\n\t\tFile file=new File(filenameforpages);\n\t\tList<String> words = Utilities.tokenizeFile(file);\n\t\t\n\t\tList<String> stopwordslist = Utilities.tokenizeFile(new File(filenameforstopwords));\n\t\tList<String> mostfrequenttwogramlist =computeTwoGramFrequencies(words, top_number , stopwordslist);\n\t\tWriteMostFrequentTwoGramsToFile(mostfrequenttwogramlist);\n\t}", "public List<String> getFrequentWords() {\n\t\tif (this.frequentWords == null) {\n\t\t\tSet<String> wordsToReturn = new TreeSet<String>();\n\t\t\tfor (String folder : termFrequencyManager.getTfidfByFolder().keySet()) {\n\t\t\t\tint index = 0;\n\t\t\t\tMap<String, TFIDFSummary> tfidSummaries =\n\t\t\t\t\t\ttermFrequencyManager.getTfidfByFolder().get(folder);\n\t\t\t\tArrayList<TFIDFSummary> tfidfSummariesList = new ArrayList<TFIDFSummary>(tfidSummaries.size());\n\t\t\t\tfor (String term : tfidSummaries.keySet()) {\n\t\t\t\t\ttfidfSummariesList.add(tfidSummaries.get(term));\n\t\t\t\t}\n\t\t\t\tCollections.sort(tfidfSummariesList);\n\n\t\t\t\twhile (index < tfidfSummariesList.size() && index < MAX_NUM_ATTRIBUTES_BY_FOLDER) {\n\t\t\t\t\tTFIDFSummary ts = tfidfSummariesList.get(tfidfSummariesList.size() - 1 - index);\n\t\t\t\t\twordsToReturn.add(ts.getTerm());\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.frequentWords = new ArrayList<String>(wordsToReturn);\n\t\t}\n\t\tSystem.out.println(\"Numero de palabras frecuentes: \" + this.frequentWords.size());\n\t\tfor (String w : frequentWords) System.out.println(\"FreqWord \" + w);\n\t\treturn this.frequentWords;\n\t}", "List<WordCount> topYMoviesReviewTopXWordsCount(final int topMovies, final int topWords) {\n List<String> topYMovies = new ArrayList<>();\n reviewCountPerMovieTopKMovies(topMovies).forEach(movie -> topYMovies.add(movie.getProductId()));\n // similar to moviesReviewWordsCount only filtered by pID\n JavaRDD<WordCount> wordCounts = movieReviews\n .filter(s-> topYMovies.contains(s.getMovie().getProductId()))\n .map(MovieReview::getReview)\n .flatMap(s-> Arrays.asList(s.split(\" \")))\n .mapToPair(s->new Tuple2<>(s, 1))\n .reduceByKey((a, b)-> a + b)\n .map(s->new WordCount(s._1(), s._2()));\n return wordCounts.top(getRealTopK(topWords, wordCounts.count()));\n }", "List<WordCount> moviesReviewWordsCount(final int topK) {\n // get the review, split by \" \" , map to pair with 1, reduce by key to count\n // then map to WordCount CLASS the has it's own comparator and get the topK (validity checked) - (collect)\n JavaRDD<WordCount> wordCounts = movieReviews\n .map(MovieReview::getReview)\n .flatMap(s-> Arrays.asList(s.split(\" \")))\n .mapToPair(s->new Tuple2<>(s, 1))\n .reduceByKey((a, b)-> a + b)\n .map(s->new WordCount(s._1(), s._2()));\n return wordCounts.top(getRealTopK(topK, wordCounts.count()));\n }", "private Set<String> get5000MostPopularWords(Predicate<String> stringFilter) throws FileNotFoundException {\n InputStream wordIS = this.getClass().getResourceAsStream(\"5000-MostPopularEnglishWords.txt\"); // not the best file since it has dups and words that are one and two characters\n BufferedReader reader = new BufferedReader(new InputStreamReader(wordIS));\n\n return reader.lines()\n .filter(stringFilter)\n .collect(Collectors.toSet());\n }", "public abstract String[][] getTopWords();", "private static List<String> getTopNCompetitors(int numCompetitors,\n int topNCompetitors, \n List<String> competitors,\n int numReviews,\n List<String> reviews) {\n\t\t\n\t\t HashMap<String, Integer> map = new HashMap<>();\n\t\t for(String comp : competitors){\n\t map.put(comp.toLowerCase(),0);\n\t }\n\t\t\n\t for(String sentence : reviews){\n\t String[] words = sentence.split(\" \"); // get all the words in one sentence and put them in a String array \n\t for(String word : words){\n\t if(map.containsKey(word.toLowerCase())) { // check if map has any of the words (competitor name). if yes increase its value\n\t map.put(word.toLowerCase(), map.get(word.toLowerCase()) + 1);\n\t }\n\t }\n\t }\n\t \n\t PriorityQueue<String> pq =new PriorityQueue<>((String i1,String i2)->{ \n\t return map.get(i1)-map.get(i2); \n\t });\n\t for(String key:map.keySet()){\n\t pq.add(key);\n\t if(pq.size()>topNCompetitors) pq.poll();\n\t }\n\t List<String> result=new ArrayList<>();\n\t while(!pq.isEmpty())\n\t result.add(pq.poll());\n\t \n\t Collections.reverse(result);\n\t \n\t return result; \n\t \n}", "public static List<String> topKFrequent_pq(String[] words, int k) {\n Map<String, Integer> countMap = new HashMap<>();\n for (String word : words) {\n countMap.put(word, countMap.getOrDefault(word, 0) + 1);\n }\n\n PriorityQueue<String> pq = new PriorityQueue<String>((word1, word2) -> {\n if (countMap.get(word1) == countMap.get(word2)) {\n return word2.compareTo(word1);\n }\n return countMap.get(word1) - countMap.get(word2);\n });\n\n for (String word : countMap.keySet()) {\n pq.offer(word);\n if (pq.size() > k) {\n pq.poll();\n }\n }\n\n List<String> ans = new ArrayList<>();\n while (!pq.isEmpty()) {\n ans.add(pq.poll());\n }\n Collections.reverse(ans);\n return ans;\n }", "public HashMap<String, Integer> getOrder(){\n\t\t\n\t\tHashMap<String, Integer> hm2 = getHashMap();\n\t\n\t\tArrayList fq = new ArrayList<>();\n\t\t\n\t\tHashMap<String, Integer> top10 = new HashMap<String, Integer>();\n\t\t\n\t\tfor(String key : hm2.keySet()){\n\t\t\t\n\t\t\tfq.add(hm2.get(key));\n\t\t}\n\t\t// use Collection to get the order of frequency\n\t\tCollections.sort(fq);\n \tCollections.reverse(fq);\n \t\n \tfor(int i = 0; i<11; i++){\n \t\t\n \t\tfor(String key : hm2.keySet()){\n \t\t// make sure the word not equals to balck space\n \t\tif(hm2.get(key) == fq.get(i) && !key.equals(\"\") ){\n \t\t\t\n \t\t top10.put(key, hm2.get(key));\n \t\t\t\t\n \t\t}\n \t}\t\n\t}\n\t\treturn top10;\n\t}", "public static String getMostFrequentToy() {\n\t\tString name = \"\";\n\t\tint max = 0;\n\t\tfor (int i = 0; i < toyList.size(); i++) {\n\t\t\tif (max < toyList.get(i).getCount()) {\n\t\t\t\tmax = toyList.get(i).getCount();\n\t\t\t\tname = toyList.get(i).getName();\n\t\t\t}\n\t\t}\n\t\treturn name;\n\t}", "public static List<String> topKFrequent_hashmap_opt(String[] words, int k) {\n List<String> ans = new ArrayList<>();\n Map<String, Integer> freqMap = new HashMap<>();\n for (String word : words) {\n freqMap.put(word, freqMap.getOrDefault(word, 0) + 1);\n }\n\n ans.addAll(freqMap.keySet());\n\n Collections.sort(ans, (o1, o2) -> {\n if (freqMap.get(o1) == freqMap.get(o2)) {\n return o1.compareTo(o2);\n }\n\n return freqMap.get(o2) - freqMap.get(o1);\n });\n\n return ans.subList(0, k);\n }", "public static List<String> topKFrequent_pq_opt(String[] words, int k) {\n Map<String, Integer> countMap = new HashMap<>();\n for (String word : words) {\n countMap.put(word, countMap.getOrDefault(word, 0) + 1);\n }\n\n PriorityQueue<String> pq = new PriorityQueue<String>((word1, word2) -> {\n if (countMap.get(word1).equals(countMap.get(word2))) {\n return word1.compareTo(word2);\n }\n return countMap.get(word2) - countMap.get(word1);\n });\n\n for (String word : countMap.keySet()) {\n pq.offer(word);\n }\n\n List<String> ans = new ArrayList<>();\n for (int i = 0; i < k; i++) {\n ans.add(pq.poll());\n }\n\n return ans;\n }", "public ArrayList<String> top5search(String kw1, String kw2) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\tArrayList<String> results = new ArrayList<String>();\n\t\tArrayList<Occurrence> ocArr1 = new ArrayList<Occurrence>();\n\t\tArrayList<Occurrence> ocArr2 = new ArrayList<Occurrence>();\n\t\tArrayList<Occurrence> combined = new ArrayList<Occurrence>();\n\t\t\n\t\tif (keywordsIndex.containsKey(kw1))\n\t\t\tocArr1 = keywordsIndex.get(kw1);\n\t\t\n\t\tif (keywordsIndex.containsKey(kw2))\n\t\t\tocArr2 = keywordsIndex.get(kw2);\n\t\t\n\t\tcombined.addAll(ocArr1);\n\t\tcombined.addAll(ocArr2);\n\t\t\n\t\tif (!(ocArr1.isEmpty()) && !(ocArr2.isEmpty()))\n\t\t{\n\t\t\t// Sort with preference for ocArr1\n\t\t\tfor (int x = 0; x < combined.size()-1; x++)\n\t\t\t{\n\t\t\t\tfor (int y = 1; y < combined.size()-x; y++)\n\t\t\t\t{\n\t\t\t\t\tif (combined.get(y-1).frequency < combined.get(y).frequency)\n\t\t\t\t\t{\n\t\t\t\t\t\tOccurrence temp = combined.get(y-1);\n\t\t\t\t\t\tcombined.set(y-1, combined.get(y));\n\t\t\t\t\t\tcombined.set(y, temp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove duplicates\n\t\t\tfor (int x = 0; x < combined.size()-1; x++)\n\t\t\t{\n\t\t\t\tfor (int y = x + 1; y < combined.size(); y++)\n\t\t\t\t{\n\t\t\t\t\tif (combined.get(x).document == combined.get(y).document)\n\t\t\t\t\t\tcombined.remove(y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Top 5\n\t\twhile (combined.size() > 5)\n\t\t\tcombined.remove(combined.size()-1);\n\t\t\n\t\t//System.out.println(combined);\n\t\t\n\t\tfor (Occurrence oc : combined)\n\t\t\tresults.add(oc.document);\n\n\t\treturn results;\n\t\n\t\t\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\n\t}", "public List<ExplanationFeature> getTopNFeatures() {\n\t\tList<ExplanationFeature> ret = Lists.newArrayList(this.entries);\n\t\tCollections.sort(ret);\n\t\treturn ret;\n\t}", "public Integer eliminateWordByFreq(Integer frequency) {\r\n\r\n\t\tInteger eliminateCount = 0;\r\n\r\n\t\tfor (String word : vocabulary.keySet().toArray(\r\n\t\t\t\tnew String[vocabulary.keySet().size()])) {\r\n\t\t\tif (vocabulary.get(word) < frequency) {\r\n\t\t\t\tvocabulary.remove(word);\r\n\t\t\t\tspamVocab.remove(word);\r\n\t\t\t\tnotSpamVocab.remove(word);\r\n\t\t\t\teliminateCount++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn eliminateCount;\r\n\t}", "public ArrayList<String> top5search(String kw1, String kw2) {\n // COMPLETE THIS METHOD\n ArrayList<Occurrence> Res1 = keywordsIndex.get(getKeyWord(kw1));\n ArrayList<Occurrence> res2 = keywordsIndex.get(getKeyWord(kw1));\n ArrayList<String> arrayList = new ArrayList<String>();\n\n while (arrayList.size() < 6) {\n Occurrence aa = null;\n Occurrence b = null;\n {\n if (Res1 != null) {\n for (Occurrence occr : Res1) {\n if (!arrayList.contains(occr.document)) {\n aa = occr;\n }\n }\n } if(Res1 == null){\n aa = new Occurrence(null, 0);\n }\n else aa = new Occurrence(null,0);\n }\n {\n if(res2 != null){\n for(Occurrence occr : res2){\n if(!arrayList.contains(occr.document)){\n b = occr;\n }\n }\n }\n if(res2 == null){\n b = new Occurrence(null,0);\n }\n else b = new Occurrence(null,0);\n }\n Occurrence[] a = {aa,b};//{search(arrayList, Res1), search(arrayList, res2)};\n Occurrence m = null;\n if (a[0].frequency < a[1].frequency) {\n m = a[1];\n } else m = a[0];\n if (m.document != null) {\n arrayList.add(m.document);\n } else break;\n }\n return arrayList;\n }", "public void getWordFrequency(ArrayList<String> out_words, ArrayList<Integer> out_counts) {\n //... Put in ArrayList so sort entries by frequency\n ArrayList<Map.Entry<String, MutableInteger>> entries =\n new ArrayList<Map.Entry<String, MutableInteger>>(wordFrequency.entrySet());\n Collections.sort(entries, new ComparatorFrequency());\n\n //... Add word and frequency to parallel output ArrayLists.\n for (Map.Entry<String, MutableInteger> ent : entries) {\n out_words.add(ent.getKey());\n out_counts.add(ent.getValue().getValue());\n }\n }", "public static List<String> topKFrequent_hashmap(String[] words, int k) {\n List<String> ans = new ArrayList<>();\n if (words == null || words.length == 0 || k <= 0) {\n return ans;\n }\n\n Map<String, Integer> freqMap = new HashMap<>();\n for (String word : words) {\n freqMap.put(word, freqMap.getOrDefault(word, 0) + 1);\n }\n\n List<Map.Entry<String, Integer>> list = new ArrayList<Map.Entry<String, Integer>>(freqMap.entrySet());\n list.sort((o1, o2) -> {\n if (o1.getValue().equals(o2.getValue())) {\n return o1.getKey().compareTo(o2.getKey());\n }\n\n return o2.getValue() - o1.getValue();\n });\n\n for (Map.Entry<String, Integer> entry : list) {\n ans.add(entry.getKey());\n k--;\n if (k <= 0) {\n return ans;\n }\n }\n\n return ans;\n }", "public static PriorityQueue<WordCount> sortWords(HashMap<String, Integer> counts){\n\t\tPriorityQueue<WordCount> words = new PriorityQueue<WordCount>(99999, new wordCountComparator());\n\t\tWordCount wc = null;\n\t\tfor(Map.Entry<String, Integer> entry : counts.entrySet()){\n\t\t\twc = new WordCount(entry.getKey(), entry.getValue());\n\t\t\twords.add(wc);\n\t\t}\n\t\treturn words;\n\t}", "public ArrayList<String> top5search(String kw1, String kw2) {\n\t\tkw1 = kw1.toLowerCase();\n kw2 = kw2.toLowerCase();\n ArrayList <String> outArr = new ArrayList <String> ();\n ArrayList <Occurrence> kw1Arr = null;\n ArrayList <Occurrence> kw2Arr = null;\n for(String e: keywordsIndex.keySet()) {\n if(e.equals(kw1) == true) {\n kw1Arr = keywordsIndex.get(e);}\n if(e.equals(kw2) == true) {\n kw2Arr = keywordsIndex.get(e);}}\n int kw1Point = 0;\n int kw2Point = 0;\n for(int inc = 0; inc < 5; inc++) {\n int kw1Value = 0;\n Occurrence kw1Occ = null;\n int kw2Value = 0;\n Occurrence kw2Occ = null;\n if(kw1Arr != null && kw1Point < kw1Arr.size()) {\n kw1Occ = kw1Arr.get(kw1Point);\n kw1Value = kw1Occ.frequency;}\n if(kw2Arr != null && kw2Point < kw2Arr.size()) {\n kw2Occ = kw2Arr.get(kw2Point);\n kw2Value = kw2Occ.frequency;}\n if(kw1Value == 0 && kw2Value == 0) {\n \t//will only occur if the if-statements for 212 and 215 are false\n \t//which means that the array doesn't exist or the pointer has iterated through the whole array\n break;}\n if(kw1Value >= kw2Value) {\n outArr.add(kw1Occ.document);\n kw1Point = kw1Point + 1;}\n else {outArr.add(kw2Occ.document);\n kw2Point = kw2Point + 1;}}\n if(outArr.size() == 0) {//no found matches\n return null;}\n else {return outArr;}//found matches\n\t}", "public interface IWordFrequency {\n\n\t/**\n\t * \n\t * @param input\n\t * text string to process\n\t * @param wordNumber\n\t * max number of word in the returned list\n\t * @return for a given non null or empty input text, returns the list of\n\t * words ordered by word frequency, the most frequently occurring\n\t * word first, null otherwise.\n\t * \n\t */\n\tList<String> getWordFrequency(String input, int wordNumber);\n\n}", "int getFreq();", "private void getWordCounts() {\n Map<String, List<String>> uniqueWordsInClass = new HashMap<>();\n List<String> uniqueWords = new ArrayList<>();\n\n for (ClassificationClass classificationClass : classificationClasses) {\n uniqueWordsInClass.put(classificationClass.getName(), new ArrayList<>());\n }\n\n for (Document document : documents) {\n String[] terms = document.getContent().split(\" \");\n\n for (String term : terms) {\n if (term.isEmpty()) {\n continue;\n }\n if (!uniqueWords.contains(term)) {\n uniqueWords.add(term);\n }\n\n for (ClassificationClass docClass : document.getClassificationClasses()) {\n if (!uniqueWordsInClass.get(docClass.getName()).contains(term)) {\n uniqueWordsInClass.get(docClass.getName()).add(term);\n }\n if (totalWordsInClass.containsKey(docClass.getName())) {\n this.totalWordsInClass.put(docClass.getName(), this.totalWordsInClass.get(docClass.getName()) + document.getFeatures().get(term));\n } else {\n this.totalWordsInClass.put(docClass.getName(), document.getFeatures().get(term));\n }\n }\n }\n }\n\n this.totalUniqueWords = uniqueWords.size();\n }", "default List<String> interestingConcepts(int topK, UnitLocation located,\n Set<Location> irrelevantSet){\n // collect frequent words outside the blacklist of locations\n final TokenIterator extractor = new TokenIterator(irrelevantSet);\n located.getUnitNode().accept(extractor);\n\n final WordCounter wordCounter = new WordCounter(extractor.getItems());\n\n return wordCounter.mostFrequent(topK);\n }", "void collectLeastFrequent(FrequencyTable fq);", "public static Entry[] overallMostFrequent(MaxFrequencyHeap h) {\r\n\t\tEntry[] top5 = new Entry[CAPACITY];\r\n\r\n\t\tint top5_counter = 0; // our temporary top5 counter\r\n\r\n\t\t// Iterate through our maxheap until we find the top 5 words\r\n\t\twhile(top5_counter<5){\r\n\t\t\t// If our heap is empty simply return the top5 array\r\n\t\t\tif(h.isEmpty()){\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}else{\r\n\t\t\t\t// Add the current max word from our heap using remove max\r\n\t\t\t\ttop5[top5_counter] = h.removeMax();\r\n\t\t\t\ttop5_counter++; // Increment our top 5 counter\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn top5;\r\n\t}", "public void analyze(ArrayList<String> words) throws IOException\n {\n int[] letterOccurences = new int[regularAlphabet.length];\n double[] percentOccurence = new double[letterOccurences.length];\n int numberOfLetters = 0;\n \n //Loops to calculate number of occurences per letter.\n for(int wordCount = 0; wordCount<words.size(); wordCount++)\n {\n for(int letterCount = 0; letterCount<words.get(wordCount).length(); letterCount++)\n {\n for(int alphabetCharacter = 0; alphabetCharacter<regularAlphabet.length; alphabetCharacter++)\n {\n if(regularAlphabet[alphabetCharacter].equalsIgnoreCase(words.get(wordCount).substring(letterCount, letterCount+1)))\n {\n letterOccurences[alphabetCharacter]++;\n numberOfLetters++;\n }\n }\n }\n }\n \n //Loop to calculate percent occurences of letters.\n for(int index = 0; index<percentOccurence.length; index++)\n {\n percentOccurence[index] = (letterOccurences[index]/(double)numberOfLetters)*100;\n }\n \n PrintWriter outFile = new PrintWriter (new File(\"ciphertextfreq.txt\"));\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%6s | %12s | %11s|\",\"Letter\",\"Frequency\",\"Percent\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.printf(\"|%6s | %12s | %11s|\\n\",\"Letter\",\"Frequency\",\"Percent\");\n System.out.println(\"-------------------------------------------\");\n for(int printIndex = 0; printIndex<regularAlphabet.length; printIndex++)\n {\n outFile.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n System.out.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\\n\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n }\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%5s | %10d | %10d%s|\",\"Total\",numberOfLetters,100,\"%\");\n System.out.printf(\"|%5s | %10d | %10d%s|\\n\",\"Total\",numberOfLetters,100,\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.close();\n }", "private double countWordFrequencyScore(Page page, String[] queryWords) {\n double score = 0;\n for (String word : queryWords) {\n int wordId = this.pb.getIdForWord(word);\n for (double pageWordId : page.getWords()) {\n if (wordId == pageWordId) score++;\n }\n }\n\n return score;\n }", "public String most(String[] sentences) {\n\t\tString words = \"\";\n\t\tfor(int i = 0; i < sentences.length; i++){\n\t\t\twords = words + \" \" + sentences[i];\n\t\t}\n\t\twords = words.toLowerCase();\n\t\tString[] new_words = words.split(\" \"); \n\t\t\n\t\tMap<String, Integer> counting = new TreeMap<String, Integer>();\n\t\tfor(int i = 0; i < new_words.length; i++){\n\t\t\tif(counting.containsKey(new_words[i])){\n\t\t\t\tcounting.put(new_words[i], counting.get(new_words[i]) + 1);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcounting.put(new_words[i], 1);\n\t\t\t}\n\t\t}\n\t\tint max = 0; \n\t\tString max_word = \"\";\n\t\tfor(String s: counting.keySet()){\n\t\t\tif(counting.get(s) > max){\n\t\t\t\tmax = counting.get(s);\n\t\t\t\tmax_word = s;\n\t\t\t}\n\t\t}\n\t\treturn max_word;\n }", "private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}", "java.lang.String getFrequency();", "public String mostCommonWord(String[] tweets) {\n int big = -100000;\n String mostCommon = null;\n for (String tweet : tweets) {// = for(int i = 0 ; i<tweets.length;i++) { String tweet = tweets[i] }\n for (String word : tweet.split(\" \")) {\n int amt = 0;\n for (String tweet2 : tweets)\n for (String word2 : tweet2.split(\" \"))\n if (word2.equals(word))\n amt++;\n if (amt > big) {\n big = amt;\n mostCommon = word;\n }\n }\n }\n return mostCommon;\n}", "@Override\n public void execute(Tuple tuple) {\n\t String word = tuple.getStringByField(\"word\");\n\t Integer count = tuple.getIntegerByField(\"count\");\n\n\t if (_topNMap.size() < _n) {\n\t \t//add word and count if less than N elements in top N\n\t \t_topNMap.put(word, count);\n\t } else {//if (_topNMap.size() > _n) {\n\t\tfor (String w : _topNMap.keySet()) {\n\t\t\tInteger c = _topNMap.get(w);\n\t\t\tif (_topNTreeMap.get(c) == null || _topNTreeMap.get(c).compareTo(w) < 0) {\n\t\t\t\t_topNTreeMap.put(c, w);\n\t\t\t}\n\t\t}\n\t\tInteger minCount = _topNTreeMap.firstKey();\n\t\tString minWord = _topNTreeMap.get(minCount);\n\t \tif (count > minCount) {\n\t\t\t_topNMap.remove(minWord);\n\t\t\t_topNMap.put(word, count);\n\t\t} else if (count == minCount && word.compareTo(minWord) > 0) {\n\t\t\t_topNMap.remove(minWord);\n\t\t\t_topNMap.put(word, count);\n\t\t}\n\t\t_topNTreeMap.clear();\n\t\t \n\t\tString topNList = \"\";\n\t\tint c = 0;\n\t \tfor (String key : _topNMap.keySet()) {\n\t\t\ttopNList += key + \", \";\n\t\t\tc++;\n\t \t}\n\t \ttopNList = topNList.substring(0, topNList.length() - 2);\n\t \tif (c == _n) {\n\t \t\tcollector.emit(new Values(\"top-N\", topNList));\n\t \t}\n\t }\n }", "public Map<String, Integer> findUnicalWord(ArrayList<Word> text)\n {\n String[] words=new String[text.size()];\n for(int i=0; i<text.size(); i++){\n words[i]=text.get(i).toString();\n }\n HashMap<String, Integer> myWordsCount = new HashMap<>();\n for (String s : words){\n if (myWordsCount.containsKey(s)) myWordsCount.replace(s, myWordsCount.get(s) + 1);\n else myWordsCount.put(s, 1);\n }\n\n Map<String, Integer> newWordsCount = myWordsCount\n .entrySet()\n .stream()\n .sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))\n .collect(\n toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2,\n LinkedHashMap::new));\n\n return newWordsCount;\n\n }", "abstract public int docFreq(Term t) throws IOException;", "static String[] sortWordsByScore(String[] words) {\n\n if(words.length == 0) return new String[0];\n String[] sorted = new String[words.length];\n\n int minScore = -1; //minScore(words[0]);\n int currentIndex = 1;\n int index = 0;\n\n getMinScoreWordIndex(words, minScore);\n\n System.out.println(tracker);\n while(currentIndex <= tracker.size()){\n\n\n System.out.println(tracker.get(index));\n \n sorted[index] = words[tracker.get(index)];\n\n index++;\n currentIndex++;\n// tracker.clear();\n }\n\n return sorted;\n }", "public /*TreeMap<String, Float>*/void getTopnTermsOverlapWithQuery() throws IOException, ParseException{\n\t\tString outputfile = \"./output/score/test3.txt\";\n\n\t\tFileOutputStream out = new FileOutputStream(outputfile);\n\t\tPrintStream ps = new PrintStream(out);\n\t\t/*-------------------------------------------------------------------------------*/\n\n\t\tTreeMap<String,Float> termsscoressorted = null;\n\t\tCollectionReader reader = new CollectionReader(indexDir); \n\t\tIndexReader ir = reader.getIndexReader();\t\t\n\n\t\tTopicsInMemory topics = new TopicsInMemory(\"data/CLEF-IP-2010/PAC_test/topics/PAC_topics-test2.xml\"/*omit-PAC-1094.xml\"*/);\n\t\tfor(Map.Entry<String, PatentDocument> topic : topics.getTopics().entrySet()){\n\t\t\tString qUcid = topic.getValue().getUcid();\n\t\t\tString queryid = topic.getKey();\n\t\t\tString queryName = topic.getKey() + \"_\" + topic.getValue().getUcid();\n\t\t\tString queryfile = topic.getKey() + \"_\" + topic.getValue().getUcid() + \".xml\";\n\n\t\t\t/*System.out.println(\"=========================================\");\n\t\t\tSystem.out.println(queryName);\n\t\t\tSystem.out.println(\"=========================================\");*/\n\t\t\t/*int docid = reader.getDocId(\"UN-EP-0663270\", PatentDocument.FileName);\n\t\t\tir.getTermVector(docid, field) getTermVectors(b);*/\n\n\t\t\tEvaluateResults er = new EvaluateResults();\n\t\t\tArrayList<String> tps = er.evaluatePatents(queryid, \"TP\");\n\t\t\tArrayList<String> fps = er.evaluatePatents(queryid, \"FP\");\n\t\t\tHashMap<String, Float> /*TFreqs*/ termsscores = new HashMap<>();\n\n\n\t\t\t/*--------------------------------- Query Words -------------------------------*/\n\t\t\t//\t\t\tHashMap<String, Integer> query_termsfreqspair = reader.gettermfreqpair(qUcid, PatentDocument.Description);\n\t\t\tHashSet<String> query_terms = reader.getDocTerms(qUcid, PatentDocument.Description);\n\t\t\t//\t\t\tSystem.out.println(query_termsfreqspair.size() +\"\\t\"+ query_termsfreqspair);\n//\t\t\tSystem.out.println(query_terms.size() + \"\\t\" + query_terms);\n\t\t\t/*-----------------------------------------------------------------------------*/\t\t\t\n\n\n\t\t\t//\t\t\tSystem.out.println(\"-----TPs----\");\n\t\t\tfor (String tp : tps) {\n\t\t\t\t/*System.out.println(\"---------\");\n\t\t\t\tSystem.out.println(tp);*/\n\t\t\t\tHashMap<String, Integer> termsfreqsTP = reader.gettermfreqpairAllsecs(\"UN-\" + tp);\n\n\t\t\t\tfor(Entry<String, Integer> tfTP:termsfreqsTP.entrySet()){\n\t\t\t\t\tif(termsscores.containsKey(tfTP.getKey())){\n\t\t\t\t\t\ttermsscores.put(tfTP.getKey(), termsscores.get(tfTP.getKey()) + (float)tfTP.getValue()/tps.size());\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//\t\t\t\t\t\tfloat test = (float)t.getValue()/tps.size();\n\t\t\t\t\t\t//\t\t\t\t\t\tSystem.out.println(test);\n\t\t\t\t\t\ttermsscores.put(tfTP.getKey(), (float)tfTP.getValue()/tps.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//\t\t\t\tSystem.out.println(termsscores.size() + \" \" + termsscores);\t\t\t\t\t\n\t\t\t}\n\n\t\t\t/*System.out.println();\n\t\t\tSystem.out.println(\"-----FNs----\");*/\n\t\t\tfor (String fp : fps) {\n\t\t\t\t/*System.out.println(\"---------\");\n\t\t\t\tSystem.out.println(fp);*/\n\t\t\t\tHashMap<String, Integer> termsfreqsFP = reader.gettermfreqpairAllsecs(\"UN-\" + fp);\n\n\t\t\t\tfor(Entry<String, Integer> t:termsfreqsFP.entrySet()){\n\t\t\t\t\tif(termsscores.containsKey(t.getKey())){\n\t\t\t\t\t\ttermsscores.put(t.getKey(), termsscores.get(t.getKey()) - (float)t.getValue()/fps.size());\n\t\t\t\t\t}else{\t\t\t\t\t\t\n\t\t\t\t\t\ttermsscores.put(t.getKey(), -(float)t.getValue()/fps.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//\t\t\t\tSystem.out.println(TFreqs.size() + \" \" + TFreqs);\n\t\t\t}\n\t\t\t//\t\t\tSystem.out.println(termsscores.size() + \" \" + termsscores);\n\t\t\tValueComparator bvc = new ValueComparator(termsscores);\n\t\t\ttermsscoressorted = new TreeMap<String,Float>(bvc);\t\t\t\n\t\t\ttermsscoressorted.putAll(termsscores);\n\t\t\tSystem.out.println(queryid + \"\\t\"+ termsscoressorted.size() + \"\\t\" + termsscoressorted/*.keySet()*/);\n\t\t\tint overlap = 0;\n\t\t\tint i = 0;\n\t\t\tfor(Entry<String, Float> scoresorted:termsscoressorted.entrySet()){\n\t\t\t\ti++;\n\t\t\t\tif(i<=100){\n\t\t\t\t\tif(query_terms.contains(scoresorted.getKey())){\n\t\t\t\t\t\toverlap++;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t\tSystem.out.println(queryName + \"\\t\"+overlap);\n//\t\t\tps.println(queryName + \"\\t\"+overlap);\n\t\t}\n\t}", "private Artist[] getTop10(List<User> users){\n\t\tArtist[] top=new Artist[10];\n\t\tHashMap<Artist, Integer> rank=new HashMap<Artist,Integer>();\n\t\tfor(User u:users) {\n\t\t\tfor(int i=0;i<u.artists.size();i++) {\n\t\t\t\tArtist a=u.artists.get(i);\n\t\t\t\tInteger weight=rank.getOrDefault(a, 0);\n\t\t\t\trank.put(a, weight+u.artistsWeights.get(i));\n\t\t\t}\n\t\t}\n\t\tArrayList<Artist>ranking=new ArrayList<Artist>();\n\t\tranking.addAll(rank.keySet());\n\t\tranking.sort((a1,a2)->rank.get(a2)-rank.get(a1));\n\t\tfor(int i=0;i<10;i++) {\n\t\t\ttop[i]=ranking.get(i);\n\t\t}\n\t\treturn top;\n\t\t\n\t}", "private IDictionary<String, Double> computeTfScores(IList<String> words) {\n IDictionary<String, Double> tfScores = new ChainedHashDictionary<String, Double>();\n IDictionary<String, Double> wordCounts = new ChainedHashDictionary<String, Double>();\n \n // maps each given word to their frequency\n for (String word: words) {\n \t\tif (!wordCounts.containsKey(word)) {\n \t\t\twordCounts.put(word, 1.0);\n \t\t} else {\n \t\t\tDouble count = wordCounts.get(word);\n \t\t\twordCounts.put(word, count + 1.0);\n \t\t} \t\t\n }\n Double totalWords = (double) words.size();\n \n // Computes TF scores\n for (KVPair<String, Double> pair: wordCounts) {\n \t\ttfScores.put(pair.getKey(), pair.getValue() / totalWords);\n }\n return tfScores;\n }", "@Override\n public Map<String, KeyWordBean[]> extractKeyWords(int topN) throws Exception {\n Map<String, KeyWordBean[]> cateKeyWords = new HashMap<>();\n HashMap<String, HashMap<String, Float>> categoryKeyWord = CHIFileUtil.getCateKeyCHIModel(ConstantUtil.CHI_MODEL);\n for (Map.Entry cateEntry : categoryKeyWord.entrySet()) {\n String cate = cateEntry.getKey().toString();\n KeyWordBean[] keyWords = CommonUtil.getTopNWord((HashMap<String, Float>) cateEntry.getValue(), topN);\n cateKeyWords.put(cate, keyWords);\n }\n return cateKeyWords;\n }", "private Double getSentenceTfIdf(String sentence, Article article) {\n Double sentenceTfIdf = 0.0;\n PriorityQueue<Double> topFiveWords = new PriorityQueue<>(Collections.reverseOrder());\n Set<String> alreadyConsideredWords = new HashSet<>();\n\n // Split the words in a sentence\n String[] sentenceTerms = sentence.split(\"\\\\s+\");\n\n for (String term: sentenceTerms) {\n // format the raw term to remove non-alphanumeric characters\n term = term.replaceAll(\"[^a-zA-Z\\\\d]\", \"\").toLowerCase().trim();\n\n if (!term.isEmpty()) {\n // lookup term in unigrams map to get its TF.IDF score\n Unigram correspondingUnigram = article.unigrams.get(term);\n\n if (correspondingUnigram != null && !alreadyConsideredWords.contains(term)) {\n topFiveWords.add(correspondingUnigram.getTf_idf());\n alreadyConsideredWords.add(term);\n }\n }\n }\n\n int limit = Math.min(5, topFiveWords.size());\n for (int i = 0; i < limit; i++) {\n sentenceTfIdf += topFiveWords.poll();\n }\n\n return sentenceTfIdf;\n }", "public String[] topKFrequent(String[] combo, int k) {\n\t if (combo.length == 0) {\n\t return new String[0];\n\t }\n\t // get all the distinct strings at keys and their frequencies as values.\n\t Map<String, Integer> freqMap = getFreqMap(combo);\n\t // NOTICE: using map.Entry as the element type directly so that all the \n\t // operations are mostly efficient.\n//\t Comparator<Map.Entry<String, Integer>> comp = new Comparator<Map.Entry<String, Integer>>() {\n//\t @Override\n//\t public int compare(Map.Entry<String, Integer> e1, Map.Entry<String, Integer> e2) {\n//\t return e1.getValue().compareTo(e2.getValue());\n//\t }\n//\t };\n\t PriorityQueue<Map.Entry<String, Integer>> minHeap = \n\t new PriorityQueue<>(k, new Comparator<Map.Entry<String, Integer>>() {\n\t\t @Override\n\t\t public int compare(Map.Entry<String, Integer> e1, Map.Entry<String, Integer> e2) {\n\t\t return e1.getValue().compareTo(e2.getValue());\n\t\t }\n\t\t });\n\t for (Map.Entry<String, Integer> entry : freqMap.entrySet()) {\n\t \tif (minHeap.size() < k) {\n\t \t\tminHeap.offer(entry);\n\t \t} else if (entry.getValue() > minHeap.peek().getValue()){\n\t \t\tminHeap.poll();\n\t \t\tminHeap.offer(entry);\n\t \t}\n\t }\n\t // since the returned array requires the strings sorted by their frequencies,\n\t // use a separate helper method to do this operation.\n\t return freqArray(minHeap);\n\t}", "private void showWordFrequency() {\n\t\tWordFrequencyProcessor wordFreqProcessor = new WordFrequencyProcessor();\n\t\ttry {\n\t\t\twordFreqProcessor.readFile(FILE_NAME);\n\t\t} catch (IOException e) {\n\t\t\tshowErrorAlert(\"Error\", \"Error Reading File: \", FILE_NAME);\n\t\t\tSystem.exit(0);\n\t\t\treturn;\n\t\t}\n\n\t\tList<WordFrequency> list = wordFreqProcessor.getFrequency();\n\t\tint size = list.size();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tWordFrequency wordFreq = (WordFrequency) list.get(i);\n\t\t\tfreqTable.getItems().add(wordFreq);\n\t\t} // for\n\t}", "private static void printTable(int numberOfDocs) {\n \n Gson gs = new Gson();\n String json = gs.toJson(wor);\n // System.out.println(json);\n \n List<String> queryWords = new ArrayList();\n //to test it for other query word you can change the following two words\n //queryWords.add(\"carpet\");\n //queryWords.add(\"hous\");\n queryWords.add(\"the\");\n queryWords.add(\"crystallin\");\n queryWords.add(\"len\");\n queryWords.add(\"vertebr\");\n queryWords.add(\"includ\");\n \n \n FrequencySummary frequencySummary = new FrequencySummary();\n frequencySummary.getSummary(json,docName, queryWords);\n \n System.exit(0);\n \n Hashtable<Integer,Integer> g = new Hashtable<>();\n \n /* wor.entrySet().forEach((wordToDocument) -> {\n String currentWord = wordToDocument.getKey();\n Map<String, Integer> documentToWordCount = wordToDocument.getValue();\n freq.set(0);\n df.set(0);\n documentToWordCount.entrySet().forEach((documentToFrequency) -> {\n String document = documentToFrequency.getKey();\n Integer wordCount = documentToFrequency.getValue();\n freq.addAndGet(wordCount);\n System.out.println(\"Word \" + currentWord + \" found \" + wordCount +\n \" times in document \" + document);\n \n if(g.getOrDefault(currentWord.hashCode(), null)==null){\n g.put(currentWord.hashCode(),1);\n \n }else {\n System.out.println(\"Hello\");\n \n int i = g.get(currentWord.hashCode());\n System.out.println(\"i \"+i);\n g.put(currentWord.hashCode(), i++);\n }\n // System.out.println(currentWord+\" \"+ g.get(currentWord.hashCode()));\n // g.put(currentWord.hashCode(), g.getOrDefault(currentWord.hashCode(), 0)+wordCount);\n \n });\n // System.out.println(freq.doubleValue());\n \n // System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/freq.doubleValue())));\n });\n // System.out.println(g.get(\"plai\".hashCode()));\n //System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/(double)g.get(\"plai\".hashCode()))));\n */\n }", "int getNumFrequents() {\n return numFrequents;\n }", "void documentFrequncy(Set<String> features,\n int index,\n int troush\n ) {\n for (String str : features) {\n switch (index) {\n case 1:\n for (int i = 0; i < count1; i++) {\n if (economydocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyeco.put(str, e);\n }\n e = 0;\n break;\n case 2:\n for (int i = 0; i < count2; i++) {\n if (educationdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyedu.put(str, e);\n }\n e = 0;\n break;\n case 3:\n for (int i = 0; i < count3; i++) {\n if (sportdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyspo.put(str, e);\n }\n e = 0;\n break;\n case 4:\n for (int i = 0; i < count4; i++) {\n if (culturedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencycul.put(str, e);\n }\n e = 0;\n break;\n case 5:\n for (int i = 0; i < count5; i++) {\n if (accedentdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyaccid.put(str, e);\n }\n e = 0;\n break;\n case 6:\n for (int i = 0; i < count6; i++) {\n if (environmntaldocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyenv.put(str, e);\n }\n e = 0;\n break;\n case 7:\n for (int i = 0; i < count7; i++) {\n if (foreign_affairdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencydep.put(str, e);\n }\n e = 0;\n break;\n case 8:\n for (int i = 0; i < count8; i++) {\n if (law_justicedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencylaw.put(str, e);\n }\n e = 0;\n break;\n case 9:\n for (int i = 0; i < count9; i++) {\n if (agriculture[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyagri.put(str, e);\n }\n e = 0;\n break;\n case 10:\n for (int i = 0; i < count10; i++) {\n if (politicsdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencypoltics.put(str, e);\n }\n e = 0;\n break;\n// case 11:\n//\n// for (int i = 0; i < count11; i++) {\n// if (social_affairsdocument[i].contains(str)) {\n// e++;\n// }\n// }\n// if (e > troush) {\n// documntfrequencysocial.put(str, e);\n// }\n// e = 0;\n// break;\n case 11:\n for (int i = 0; i < count12; i++) {\n if (science_technologydocument[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencysci.put(str, e);\n }\n e = 0;\n break;\n case 12:\n for (int i = 0; i < count13; i++) {\n if (healthdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyhel.put(str, e);\n }\n e = 0;\n break;\n case 13:\n for (int i = 0; i < count14; i++) {\n if (army[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencyarmy.put(str, e);\n }\n e = 0;\n break;\n default:\n break;\n }\n\n }\n }", "public List<DictionaryData> frequencyOrderedList() {\n List<DictionaryData> wordlist = alphabeticalList();\r\n\r\n //using insertion sort\r\n int j;\r\n DictionaryData k;\r\n for (int i = 1; i < wordlist.size(); i++) {\r\n j = i;\r\n\r\n while (j > 0 && compare_dictdata(wordlist.get(j), wordlist.get(j - 1))) {\r\n k = wordlist.get(j);\r\n wordlist.set(j, wordlist.get(j - 1));\r\n wordlist.set(j - 1, k);\r\n j--;\r\n\r\n }\r\n //i++;\r\n }\r\n return wordlist;\r\n }", "private static List<Integer> getTopKFrequentElementsBestCase(int[] nums, int k) {\n if(k > nums.length) {\n return new ArrayList<>();\n }\n\n Map<Integer, Integer> numToCount = new HashMap<>();\n int max = 0;\n for(int i = 0; i < nums.length; i++) {\n numToCount.put(nums[i], numToCount.getOrDefault(nums[i], 0) + 1);\n max = Math.max(max, numToCount.get(nums[i]));\n }\n\n List<Integer>[] numsPerFrequency = new ArrayList[max + 1];\n for(int i = 1; i <= max; i++) {\n numsPerFrequency[i] = new ArrayList<>();\n }\n\n for(Map.Entry<Integer, Integer> entry : numToCount.entrySet()) {\n numsPerFrequency[entry.getValue()].add(entry.getKey());\n }\n\n List<Integer> result = new ArrayList<>();\n\n for(int i = max; i >= 0; i--) {\n List<Integer> numsWithThisFreq = numsPerFrequency[i];\n\n for(int num : numsWithThisFreq) {\n result.add(num);\n if(result.size() == k) {\n return result;\n }\n }\n }\n\n return new ArrayList<>();\n }", "public void score(){\n\t\tscores=new float[3];\n\t\ttop3=new String[3];\n\t\tfor(int i=0;i<3;i++){\n\t\t\ttop3[i]=new String();\n\t\t\tscores[i]=(float)0;\n\t\t}\n\t\t//System.out.println(doclist.size());\n\t\tfor(int i=0;i<doclist.size();i++){\n\t\t\ttry{\n\t\t\t\tDocProcessor dp=new DocProcessor(doclist.get(i));\n\t\t\t\tdp.tokenizing();\n\t\t\t\tdp.stem();\n\t\t\t\t//System.out.println(dp.getContent());\n\t\t\t\t/*for(int j=2;j>=0;j--){\n\t\t\t\t\tSystem.out.println(\"top\"+(3-j)+\": \"+scores[j]);\n\t\t\t\t\tSystem.out.println(top3[j]);\n\t\t\t\t}*/\n\t\t\t\tfloat score=dp.score(this.keywords);\n\t\t\t\tfor(int j=2;j>=0;j--){\n\t\t\t\t\tif(score>scores[j]){\n\t\t\t\t\t\tfor(int k=0;k<j;k++){\n\t\t\t\t\t\t\tscores[k]=scores[k+1];\n\t\t\t\t\t\t\ttop3[k]=top3[k+1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tscores[j]=score;\n\t\t\t\t\t\ttop3[j]=dp.getContent();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/*for(int j=2;j>=0;j--){\n\t\t\t\t\tSystem.out.println(\"top\"+(3-j)+\": \"+scores[j]);\n\t\t\t\t\tSystem.out.println(top3[j]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"*******************************\");*/\n\t\t\t}catch(NullPointerException f){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}", "private static String mostCommonWord(String paragraph, String[] banned) {\n\t String [] words =paragraph.replaceAll(\"[^a-zA-Z\\\\s+]\", \" \").toLowerCase().split(\"\\\\s+\");\r\n\t \r\n\t Set<String> bannedSet = new HashSet<String>();\r\n\t HashMap<String,Integer> map = new HashMap<String,Integer>();\r\n\t \r\n\t for (String string : banned) {\r\n\t \tbannedSet.add(string);\r\n\t }\r\n\t \r\n\t \r\n\t for (String string : words) {\r\n\t\t\t\r\n\t \tif(!bannedSet.contains(string)) {\r\n\t \t\tmap.put(string, map.getOrDefault(string, 0)+1);\r\n\t \t}\r\n\t \t \r\n\t\t}\r\n\t\t \r\n\t List list = new LinkedList(map.entrySet());\r\n\t\t// Defined Custom Comparator here\r\n\t\tCollections.sort(list, new Comparator() {\r\n\t\t\tpublic int compare(Object o1, Object o2) {\r\n\t\t\t\treturn ((Comparable) ((Map.Entry) (o2)).getValue()).compareTo(((Map.Entry) (o1)).getValue());\r\n\t\t\t}\r\n\t\t});\r\n\t \r\n\t\t//System.out.println(map);\r\n\t\t//System.out.println(list);\r\n\t\t\r\n\t\t return (String) ((Map.Entry) list.get(0)).getKey();\t\t\r\n\t}", "private static SortingMachine<Pair<String, Integer>> sortWords(\n Map<String, Integer> words, int numberOfWords) {\n AlphabeticalComparator stringComp = new AlphabeticalComparator();\n IntComparator intComp = new IntComparator();\n\n SortingMachine<Pair<String, Integer>> intMachine = new SortingMachine1L<>(\n intComp);\n SortingMachine<Pair<String, Integer>> stringMachine = new SortingMachine1L<>(\n stringComp);\n\n for (Map.Pair<String, Integer> pair : words) {\n intMachine.add(pair);\n }\n\n intMachine.changeToExtractionMode();\n\n for (int i = 0; i < numberOfWords; i++) {\n Pair<String, Integer> pair = intMachine.removeFirst();\n System.out.println(pair);\n stringMachine.add(pair);\n }\n\n stringMachine.changeToExtractionMode();\n\n return stringMachine;\n }", "private void getTweetsMostCommonHashTag() {\r\n final List<Entry<String, Integer>> list = \r\n getCommonList(countHashtags, countHashtags.size());\r\n list.stream()\r\n .filter(entry -> !searched.contains(entry.getKey().toLowerCase()))\r\n .limit(1)\r\n .forEach(entry -> getTweets(entry.getKey(), geocode, getAuth()));\r\n }", "public int[] numSmallerByFrequency(String[] queries, String[] words) {\n int[] fsWords = new int[11], queryResults = new int[queries.length];\n for (int i = 0; i < queries.length; i++) queryResults[i] = fs(queries[i]);\n for (int i = 0; i < words.length; i++) fsWords[fs(words[i])]++;\n // Iterate all the results to get how many words have the bigger number\n // Given the relation is <, we only need to account for the ones that have a bigger result\n int tmp;\n for (int i = 0; i < queries.length; i++) {\n // Store the target value\n tmp = queryResults[i];\n // Update the results\n queryResults[i] = 0;\n for (int j = tmp + 1; j < fsWords.length; j++) queryResults[i] += fsWords[j];\n }\n return queryResults;\n }", "private static String frequencySort(String s) {\n if (s == null || s.isEmpty()) { return s; }\n\n int[] freq = new int[256];\n for (char c : s.toCharArray()) {\n freq[c]++;\n }\n\n PriorityQueue<Pair<Character, Integer>> pq = new PriorityQueue<>((a, b) -> b.getValue() - a.getValue());\n for (int i = 0; i < freq.length; i++) {\n if (freq[i] == 0) { continue; }\n Pair<Character, Integer> pair = new Pair<>((char) (i), freq[i]);\n pq.offer(pair);\n }\n\n StringBuilder sb = new StringBuilder();\n while (!pq.isEmpty()) {\n Pair<Character, Integer> pair = pq.poll();\n for (int i = 0; i < pair.getValue(); i++) {\n sb.append(pair.getKey());\n }\n }\n return sb.toString();\n }", "public void sortWordTokens (String [] list, int count){\n \n String[] sortedWordsCopy = new String[count];\n \n \n //Makes a copy of list and stores it in sortedWordsCopy\n for (int i = 0; i < count; i++)\n sortedWordsCopy[i] = list[i];\n \n //Sorts sortedWordsCopy which is a copy of list\n Arrays.sort(sortedWordsCopy);\n \n //Copies the sorted list back out to list\n for (int i = 0; i < count; i++)\n list[i] = sortedWordsCopy[i];\n \n }", "Movie mostPopularMovieReviewedByKUsers(final int numOfUsers) {\n // similar to getTopKMoviesAverage only filter by numOfUsers to be as specified\n List<Movie> popularMovieFiltered = movieReviews\n .mapToPair(s-> new Tuple2<>(s.getMovie().getProductId(), new Tuple2<>(s.getMovie().getScore(), 1)))\n .reduceByKey((a, b)-> new Tuple2<>(a._1 + b._1, a._2 + b._2))\n .filter(s -> s._2._2 >= numOfUsers)\n .map(s -> new Movie(s._1, roundFiveDecimal(s._2._1 / s._2._2)))\n .top(1);\n // return null if empty\n return popularMovieFiltered.isEmpty()? null : popularMovieFiltered.get(0);\n }", "public int getWordCount() {\n\t\treturn 10;\n\t}", "private TreeMap<String, Integer> getWordsCount(TreeMap<String, ArrayList<String>> wordFamilies, ArrayList<String> allPatterns) {\r\n \t// get all the patterns first\r\n \tfor (int i = 0; i < allPatterns.size(); i++) {\r\n \t\twordFamilies.put(allPatterns.get(i), new ArrayList<String>());\r\n \t}\r\n \t// add the words into each pattern\r\n \tfor (String s : wordFamilies.keySet()) {\r\n \t\tfor (int i = 0; i < allPatterns.size(); i++) {\r\n \t\t\tif (s.equals(allPatterns.get(i))) {\r\n \t\t\t\tArrayList<String> curr = wordFamilies.get(s);\r\n \t\t\t\tcurr.add(this.activeWords.get(i));\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t// get the number of words in each pattern\r\n \tTreeMap<String, Integer> results = new TreeMap<String, Integer>();\r\n \tfor (String s : wordFamilies.keySet()) {\r\n \t\tresults.put(s, wordFamilies.get(s).size());\r\n \t}\r\n \treturn results;\r\n }", "public void sortCount() {\n\t\tfor(Entry<String, TreeMap<String, Integer>> entry:map.entrySet()){\r\n\t\t\tTreeMap<String, Integer> tmap = entry.getValue();\r\n\t\t\tList<Entry<String, Integer>> sorttmap = MapSort.sortMapByIntegerValue(tmap);\r\n\t\t\t int flag=0;\r\n for(Entry<String, Integer> word:sorttmap){ \r\n \tflag++;\r\n \tkeyword.add(word.getKey());\r\n// System.out.println(mapping.getKey()+\":\"+mapping.getValue()); \r\n \tif(flag==5)\r\n \t\tbreak;\r\n } \r\n\t\t}\r\n\t\r\n\t}", "static void sortByFreq(int arr[], int n){\n Map<Integer, Integer> map = new HashMap<>(); \n List<Integer> outputArray = new ArrayList<>(); \n \n // Assign elements and their count in the list and map \n for (int current : arr) { \n int count = map.getOrDefault(current, 0); \n map.put(current, count + 1); \n outputArray.add(current); \n } \n \n // Compare the map by value \n SortComparator comp = new SortComparator(map); \n \n // Sort the map using Collections CLass \n Collections.sort(outputArray, comp); \n \n // Final Output \n for (Integer i : outputArray) { \n System.out.print(i + \" \"); \n }\n }", "public static List<String> sortUniqueWords(HashMap<String, Integer> tracker, List<String> allWords) {\n List<Integer> frequency = new ArrayList<>(tracker.values());\n frequency.sort(Collections.reverseOrder());\n List<String> result = new ArrayList<>();\n\n while(!tracker.isEmpty()){\n for (String key : allWords) {\n if(frequency.size()!= 0 && frequency.get(0) == tracker.get(key)){\n frequency.remove(0);\n\n result.add(key + \" \" + tracker.get(key));\n tracker.remove(key);\n }\n\n }\n }\n return result;\n\n\n }", "public Collection<Topic> getMostPopularTopics() {\n return gameRepository.getMostPopularTopics();\n }", "public static void getHotItems(int k) throws IOException {\r\n\t\twlist = new ArrayList();\r\n\t\twlist.clear();\r\n\t\tBufferedReader input = new BufferedReader(new FileReader(\r\n\t\t\t\t\"frequency.txt\"));\r\n\t\tString buff = input.readLine();\r\n\t\t// \"sssss#xxx\\n\"\r\n\t\twhile (buff != null) {\r\n\t\t\tString str[] = buff.split(\"#\");\r\n\t\t\tWord w = new Word(str[0]);\r\n\t\t\tw.setfreq(Integer.parseInt(str[1]));\r\n\t\t\twlist.add(w);\r\n\t\t\tbuff = input.readLine();\r\n\t\t}\r\n\t\tinput.close();\r\n\t\tsort(k);\r\n\t\tfor (int i = 0; i < k; i++) {\r\n\t\t\tSystem.out.print(wlist.get(i).getval() + \"|\");\r\n\t\t}\r\n\t}", "public List<String> getTopSearchKey(int number) {\n\t\tString hql = \"select e.keyWords from SearchLog e group by e.keyWords order by count(e.id) desc\";\n\n\t\tSession session = getSession();\n\t\tList<String> list = new ArrayList<>();\n\t\ttry {\n\t\t\tQuery query = session.createQuery(hql);\n\t\t\tquery.setMaxResults(number);\n\t\t\tlist = query.list();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "@Override\n public void buildMsgDistances() {\n msgRelevance = sortByValue(msgRelevance);\n\n System.out.println(\"**************************************\");\n System.out.println(\"The most 50 frequent errors:\");\n\n int c = 0;\n for (Map.Entry<String, Integer> entry : msgRelevance.entrySet()) {\n if (c++ > 50) break;\n System.out.println(entry.getKey() + \"/\" + entry.getValue());\n }\n }", "public String frequencySort(String s) {\n\n\t\t// prepare a frequency map\n\t\tMap<Character, Integer> m = new HashMap<Character, Integer>();\n\t\tfor (char c : s.toCharArray())\n\t\t\tm.put(c, m.getOrDefault(c, 0) + 1);\n\n\t\tPriorityQueue<CKEntry1> pq = new PriorityQueue<>();\n\t\tfor (Entry<Character, Integer> e : m.entrySet()) {\n\t\t\tpq.add(new CKEntry1(e.getKey(), e.getValue()));\n\t\t}\n\t\t\n\t\t// prepare the output now\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile(!pq.isEmpty()) {\n\t\t\tCKEntry1 temp = pq.poll();\n\t\t\tchar[] tempC = new char[temp.count];\n\t\t\tArrays.fill(tempC, temp.c); // repeat c count' times\n\t\t\tsb.append(tempC);\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\n\t}", "public int[] numSmallerByFrequency(String[] queries, String[] words) {\n\t\tint[] res = new int[queries.length];\n\n\t\tint[] cnts = new int[words.length];\n\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\tcnts[i] = smallestFrequency(words[i]);\n\t\t}\n\t\tArrays.sort(cnts);\n\n\t\tfor (int i = 0; i < queries.length; i++) {\n\t\t\tint cur = smallestFrequency(queries[i]);\n\t\t\tres[i] = binary(cnts, cur);\n\t\t}\n\n\t\treturn res;\n\t}", "private String topOrderedSentences(PriorityQueue<Sentence> sortedSentences) {\n StringBuilder summarySentences = new StringBuilder();\n\n List<Sentence> orderedSentences = new ArrayList<>();\n int limit = Math.min(3, sortedSentences.size());\n for (int i = 0; i < limit; i++) {\n Sentence topNthSentence = sortedSentences.poll();\n orderedSentences.add(topNthSentence);\n }\n\n // Sort sentences by order they appeared in the article, and restore punctuation\n orderedSentences.sort(new IndexComparator());\n for (Sentence s: orderedSentences) {\n summarySentences.append(s.getSentence());\n summarySentences.append(\". \");\n }\n\n return summarySentences.toString();\n }", "List<T> findMostPopularTags(Integer firstResult, Integer maxResult);", "public HashMap<String, Double> GetTokenRFScore(Query aQuery, int TopK) throws Exception {\r\n\t\t// Store <token, score> for being returned\r\n\t\tHashMap<String, Double> TokenRFScore = new HashMap<>();\r\n\t\t\r\n\t\t// Get tokens in the given query\r\n\t String[] tokens = aQuery.getQueryContent().split(\" \");\r\n\t \r\n\t // Get feedback docs by the given query using feedback retrieval model\r\n\t List<Classes.Document> feedbackDocs = new QueryRetrievalModel().retrieveQuery(aQuery, TopK);\r\n\r\n\t // Initiate qeuryResult map <docid, <term, tf>> and termFreq map <term, cf>\r\n\t queryResult = new HashMap<>();\r\n\t termFreq = new HashMap<>();\r\n\r\n\t // Search each token appearing in the given query \r\n\t for(String token : tokens) {\r\n\t \t// Determine whether the current token exists in collection \r\n\t \tlong cf = myireader.CollectionFreq(token);\r\n\t \ttermFreq.put(token, cf);\r\n\t \tif(cf == 0) {\r\n\t \t\tcontinue; \r\n\t \t}\r\n\t \r\n\t \tint[][] postingList = myireader.getPostingList(token);\r\n\t \tfor(int[] posting : postingList) {\r\n\t \t\tif(!queryResult.containsKey(posting[0])) { // posting[0]: docid\r\n\t \t\t\tHashMap<String, Integer> tfMap = new HashMap<>();\r\n\t \t\t\ttfMap.put(token, posting[1]); // posting[1]: tf\r\n\t \t\t\tqueryResult.put(posting[0], tfMap);\r\n\t \t\t} else {\r\n\t \t\t\tqueryResult.get(posting[0]).put(token, posting[1]);\r\n\t \t\t}\r\n\t \t}\r\n\t }\r\n\t /*\r\n\t\t * After the for loop, we have the map <docid, <term, term_freq>> for each doc to all terms in the query\r\n\t\t * tokens = [Hong, Kong, economics, Singapore]\r\n\t\t * \r\n\t\t * queryResult : <docid, <term, term_freq>>\r\n\t\t * 1, hong, 15\r\n\t\t * Singapore, 3\r\n\t\t * 3, Singapore, 1\r\n\t\t * kong, 10\r\n\t\t * economics, 30\r\n\t\t * ..., ...\r\n\t\t */\t\r\n\r\n\t // Here all feedback docs are treated as one big pseudo document!!!!!!\r\n\t int len = 0;\r\n\t // Store <term, tf>\r\n\t Map<String, Integer> pseudoDoc = new HashMap<>();\r\n\t for(Classes.Document doc : feedbackDocs) {\r\n\t \tqueryResult.get(Integer.parseInt(doc.getLuceneID())).forEach((term, tf) -> { // Iterate each tfMap\r\n\t \t\tif(!pseudoDoc.containsKey(term)) {\r\n\t \t\t\tpseudoDoc.put(term, tf);\r\n\t \t\t} else {\r\n\t \t\t\tpseudoDoc.put(term, tf + pseudoDoc.get(term));\r\n\t \t\t}\r\n\t \t});\r\n\t \t\r\n\t \t// Accumulate by the current doc's length\r\n\t \tlen += myireader.docLength(Integer.parseInt(doc.getLuceneID()));\r\n\t }\r\n\t \r\n\t /**\r\n\t\t * Dirichlet Prior Smoothing:\r\n\t\t * p(w|D) = (|D|/(|D|+MU))*(c(w,D)/|D|) + (MU/(|D|+MU))*p(w|REF)\r\n\t * score = λ*p_doc + (1-λ)*p_ref\r\n\t * = c1*p_doc + c2*p_ref\r\n\t\t */\r\n\t int pseudoLen = len;\r\n\t double c1 = pseudoLen / (pseudoLen + MU);\r\n\t double c2 = MU / (pseudoLen + MU);\r\n\t // Calculate the probability of pseudoDoc generating each term\r\n\t pseudoDoc.forEach((token, tf) -> {\r\n\t \tlong cf = termFreq.get(token);\r\n\t \tdouble pDoc = (double) tf / pseudoLen; // p(w|D)\r\n\t \tdouble pRef = (double) cf / CORPUS_SIZE; // p(w|REF)\r\n\t \tdouble score = c1 * pDoc + c2 * pRef;\r\n\t \t\r\n\t \t// Get the RF probability of each token \r\n\t \tTokenRFScore.put(token, score); \r\n\t });\r\n\r\n\t\treturn TokenRFScore;\r\n\t}", "private HashSet<String> moviesQuery(HashSet<String> keywords,\n\t\t\tint moviesPerQuery, String name) {\n\t\tHashMap<String, Double> relevance = new HashMap<String, Double>();\n\t\tfor (String movie : movie_names) {\n\t\t\tif (movie.equals(name))\n\t\t\t\tcontinue;\n\t\t\trelevance.put(movie, 0.0);\n\t\t\tArrayList<Double> movieVec = tf_idf_avg(movie);\n\t\t\tfor (String word : keywords) {\n\t\t\t\tint index = vocab.indexOf(word);\n\t\t\t\trelevance\n\t\t\t\t\t\t.put(movie, relevance.get(movie) + movieVec.get(index));\n\t\t\t}\n\t\t}\n\t\tHashSet<String> mostRelevant = new HashSet<String>();\n\t\twhile (mostRelevant.size() < moviesPerQuery) {\n\t\t\tdouble max = 0;\n\t\t\tString best = \"\";\n\t\t\tfor (String movie : relevance.keySet()) {\n\t\t\t\tif (relevance.get(movie) > max && !mostRelevant.contains(movie)) {\n\t\t\t\t\tmax = relevance.get(movie);\n\t\t\t\t\tbest = movie;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmostRelevant.add(best);\n\t\t}\n\t\treturn mostRelevant;\n\t}", "static void returnTfIdfResults() {\n\t\tSet<String> specificWords = findKeywords();\n\n\t\t// for every phrase\n\t\tfor (String word : specificWords) {\n\t\t\t// get the total number of documents\n\t\t\tdouble totalSize = size;\n\n\t\t\t// get the collection of documents containing that word\n\t\t\tCollection<File> containingWordSet = invertedMap.getValues(word);\n\n\t\t\t// makes a new one if null (for ease of code)\n\t\t\tif (containingWordSet == null) {\n\t\t\t\tcontainingWordSet = new HashSet<File>();\n\t\t\t}\n\n\t\t\t// the number containing the word\n\t\t\tdouble numContainingWord = containingWordSet.size();\n\n\t\t\t// get the idf (log(total/(1 + |# contain word|)\n\t\t\t// it is normalize with 1 to prevent division by 0\n\t\t\tdouble idf = Math.log(totalSize / (1 + numContainingWord));\n\n\t\t\t// System.out.println(\"------------------\");\n\t\t\t// System.out.println(word + \" totalSize \" + totalSize);\n\t\t\t// System.out.println(word + \" numContainingWord \" +\n\t\t\t// numContainingWord);\n\t\t\t// System.out.println(word + \" idf \" + idf);\n\t\t\t// System.out.println(\"------------------\");\n\n\t\t\t// set the wordscore to 0\n\t\t\tdouble wordScore = 0;\n\n\t\t\t// for all of the files with the word\n\t\t\tfor (File file : containingWordSet) {\n\t\t\t\tString fileName = file.getName();\n\n\t\t\t\t// get the phrase count for this document\n\t\t\t\tInteger phraseCount = phraseCountMap.get(fileName);\n\t\t\t\tdouble numPhrases = phraseCount.doubleValue();\n\n\t\t\t\t// get the word frequency map for this page\n\t\t\t\tHashMap<String, Integer> docFreqMap = wordFreqMap.get(fileName);\n\t\t\t\tInteger freq = docFreqMap.get(word);\n\n\t\t\t\t// otherwise, get the tf\n\t\t\t\tdouble tf;\n\t\t\t\tif (freq == null) {\n\t\t\t\t\t// if it's not present, it's 0\n\t\t\t\t\ttf = 0;\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, it's the value\n\t\t\t\t\ttf = freq / numPhrases;\n\t\t\t\t\t// System.out.println(tf);\n\t\t\t\t}\n\n\t\t\t\t// multiply for this score\n\t\t\t\tdouble score = tf * idf;\n\n\t\t\t\t// add it to the page score\n\t\t\t\twordScore += score;\n\t\t\t}\n\n\t\t\t// make a node with the sum of tf-idf for all relevant phrases and\n\t\t\t// add to pq\n\t\t\tWordNode w = new WordNode(word, wordScore);\n\t\t\tpq.add(w);\n\t\t}\n\t}", "public String top10Filmes() {\r\n\t\tString top10 = \"Nenhum ingresso vendido ate o momento\";\r\n\t\tint contador = 0;\r\n\t\tif (listaIngresso.isEmpty() == false) {\r\n\t\tfor (int i = 0; i < listaIngresso.size(); i++) {\r\n\t\tcontador = 0;\r\n\t\tfor(int j = 0; j < listaIngresso.size() - 1; j++){\r\n\t\tif(listaIngresso.get(i).getSessao().getFilme() == listaIngresso.get(j).getSessao().getFilme()){\r\n\t\tcontador++;\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\r\n\t\t\t\r\n\t\t}\r\n\t\treturn top10;\r\n\t}", "private void buildFreqMap() {\n\t\toriginalFreq = new HashMap<String, WordOccurence>();\n\n\t\tfor (ListIterator<Caption> itr = original.captionIterator(0); itr\n\t\t\t\t.hasNext();) {\n\t\t\tfinal Caption currentCap = itr.next();\n\t\t\tfinal String[] words = currentCap.getCaption().split(\"\\\\s+\");\n\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\tfinal String lowerCasedWord = words[i].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(lowerCasedWord)) {\n\t\t\t\t\toriginalFreq.get(lowerCasedWord).addOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t} else {\n\t\t\t\t\tfinal WordOccurence occ = new WordOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t\toriginalFreq.put(lowerCasedWord, occ);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < identified.size(); i++) {\n\t\t\tResultChunk curretResult = identified.get(i);\n\t\t\tfinal String[] words = curretResult.getDetectedString().split(\n\t\t\t\t\t\"\\\\s+\");\n\t\t\tint identifiedAt = curretResult.getDetectedAt();\n\t\t\tfor (int j = 0; j < words.length; j++) {\n\t\t\t\tString currentWord = words[j].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(currentWord)) {\n\t\t\t\t\tint detectedAt = (int) (identifiedAt - (words.length - j)\n\t\t\t\t\t\t\t* AVG_WORD_TIME);\n\t\t\t\t\toriginalFreq.get(currentWord).addVoiceDetection(detectedAt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "boolean hasFreq();", "public Map<String, Integer> getWordFrequencies(SortOrder sortBy) {\n ArrayList<Map.Entry<String, MutableInteger>> entries =\n new ArrayList<Map.Entry<String, MutableInteger>>(wordFrequency.entrySet());\n if (sortBy == SortOrder.ALPHABETICALLY_ASCENDING) {\n Collections.sort(entries, SORT_ALPHABETICALLY_ASCENDING);\n } else {\n Collections.sort(entries, SORT_BY_FREQUENCY_DESCENDING);\n }\n \n Map<String, Integer> wordFrequencies = new HashMap<String, Integer>();\n ValueComparator bvc = new ValueComparator(wordFrequencies);\n TreeMap<String, Integer> sorted_map = new TreeMap(bvc);\n \n for (Map.Entry<String, MutableInteger> entry : entries) {\n wordFrequencies.put(entry.getKey(), entry.getValue().getInteger());\n }\n \n sorted_map.putAll(wordFrequencies);\n\n return sorted_map;\n }", "@Override\n public Map<String, List<Pair<String, Double>>> getTopFeatures(int n) {\n Map<String, List<Pair<String, Double>>> map = new HashMap<>();\n for (int i = 0; i < models.size(); i++) {\n Model<Label> m = models.get(i);\n String label = labels.get(i).getLabel();\n Map<String, List<Pair<String, Double>>> modelMap = m.getTopFeatures(n);\n if (modelMap != null) {\n if (modelMap.size() == 1) {\n map.put(label, modelMap.get(Model.ALL_OUTPUTS));\n } else {\n map.merge(label, modelMap.get(label), (List<Pair<String, Double>> l, List<Pair<String, Double>> r) -> {\n l.addAll(r);\n return l;\n });\n }\n }\n }\n return map;\n }", "public List<Token> getMostFrequentVARS(final int k) {\n\t\tList<Token> f = new LinkedList<Token>();\n\t\tfor (Entry<Token, Integer> s : VAR_FREQUENCY.entrySet()) {\n\t\t\tToken t = s.getKey();\n\t\t\tt.frequency = s.getValue();\n\t\t\tf.add(t);\n\t\t}\n\t\tComparator<Token> c = new Comparator<Token>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Token a, Token b) {\n\t\t\t\treturn new Integer(b.frequency).compareTo(new Integer(\n\t\t\t\t\t\ta.frequency));\n\t\t\t}\n\t\t};\n\t\tCollections.sort(f, c);\n\t\tif (k > 0 && f.size() > k) {\n\t\t\tList<Token> nf = new LinkedList<Token>();\n\t\t\tfor (int i = 0; i < k; i++) {\n\t\t\t\tnf.add(f.get(i));\n\t\t\t}\n\t\t\treturn nf;\n\t\t}\n\t\treturn f;\n\t}", "public static void DocumentFrequencies() throws FileNotFoundException {\n for (Entry<String, List<Integer>> entry : dictionary.entrySet()) {\n List<Integer> termfrequency = new ArrayList<>();\n\n termfrequency = entry.getValue();\t// getting each word's termfrequency list\n int i = 0;\n termfrequency.add(0); \t\t\t//maintaining documentfrequency at the 57th index\n Integer documentFrequency = termfrequency.get(totaldocument+1);\n while(i<56) { //iterate 0 to 55 all speeches term frequency\n if(termfrequency.get(i)>0) {\t\t//increment document frequency of that word if termfrequency is greater than 0.0\n documentFrequency++;\t\t\t//increment document frequency\n }\n i++;\t\t//increment index\n }\n termfrequency.set(57, documentFrequency);\t//re-set the documentfrequency and save the current maintained document frequency from 0 to calculated value\n dictionary.put(entry.getKey(), termfrequency);\t\t// place the incremented final value of that word back to the same list in dictionary hashmap\n }\n //save();\n }", "private static double[] calculateYuleK(Map<String, Double> wordFrequencies) \n\t{\n\t\t// m1 = number of different words in document (review)\n\t\tdouble m1 = wordFrequencies.keySet().size();\n\n\t\tMap<Double, Double> yuleMap = Utilities.reverseMap(wordFrequencies);\n\n\t\t// m2 = sum of products of each observed frequency squared and number of \n\t\t// words with that frequency\n\t\tdouble m2 = 0.0;\n\t\tdouble[] legomenas = new double[11];\n\t\tfor(Entry<Double,Double> e : yuleMap.entrySet()){\n\t\t\tDouble freq = e.getKey();\n\t\t\tDouble wordCount = e.getValue();\n\t\t\tm2 += freq*freq*wordCount;\n\t\t\tif (freq.intValue() < legomenas.length)\n\t\t\t\tlegomenas[freq.intValue()] = wordCount;\n\t\t}\n\t\tlegomenas[0] = 10000*(m2-m1)/(m1*m1); \n\t\treturn legomenas;\n\t}", "int getPopularity();", "public ComputeTermFrequencies() { super(); }", "public static List<Integer> findSubstringWordConcatenation(String str, String[] words) {\n assert str != null;\n assert words != null;\n List<String> wordList = new ArrayList<>();\n List<Integer> wordIndex = new ArrayList<>();\n int noOfWords = words.length, wordLength = words[0].length();\n Map<String,Integer> wordFrequencyMap = new HashMap<>();\n for(String word: words) {\n wordFrequencyMap.put(word,wordFrequencyMap.getOrDefault(word,0)+1);\n }\n\n for(int windowStart=0; windowStart <= (str.length() - (wordLength * noOfWords)); windowStart++) {\n HashMap<String, Integer> wordsSeen = new HashMap<>();\n /*now look for words*/\n for(int wrd=0; wrd<noOfWords; wrd++) {\n int wordStartIndex = windowStart + (wrd * wordLength);\n String word = str.substring(wordStartIndex, wordStartIndex+wordLength);\n if(wordFrequencyMap.containsKey(word)) {\n wordsSeen.put(word, wordsSeen.getOrDefault(word,0)+1);\n } else {\n break;// break for loop\n }\n if(wordsSeen.get(word) > wordFrequencyMap.getOrDefault(word,0)) {\n break;// frequency is more then required\n }\n if(wordsSeen.size() == wordFrequencyMap.size()) {\n wordList.add(str.substring(windowStart, wordStartIndex+wordLength));\n wordIndex.add(windowStart);\n }\n }\n }\n return wordIndex;\n }", "public static void main(String[] args) {\n\t\tint[] i = new int[100];\n\t\tint unique = 0;\n\t\tfloat ratio = 0;\n\t\tList<String> inputWords = new ArrayList<String>();\n\t\tMap<String,List<String>> wordcount = new HashMap<String,List<String>>();\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"/Users/huziyi/Documents/NLP file/Assignment1/Twitter messages.txt\"));\n\t\t\tString str;\n\t\t\twhile((str = in.readLine())!=null){\n\t\t\t\tstr = str.toLowerCase();\n\t\t\t\t\n\t\t\t\tString[] words = str.split(\"\\\\s+\");\n\t\t\t\t\n\t\t\t//\tSystem.out.println(words);\n\t\t\t//\tSystem.out.println(\"1\");\n\t\t\t\tfor(String word:words){\n\t\t\t\t\t\n\t\t\t//\t\tString word = new String();\n\t\t\t\t\t\n\t\t\t\t\tword = word.replaceAll(\"[^a-zA-Z]\", \"\");\n\t\t\t\t\tinputWords.add(word);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tfor(int k=0;k<inputWords.size()-1;k++){\n\t\t\tString thisWord = inputWords.get(k);\n\t\t\tString nextWord = inputWords.get(k+1);\n\t\t\tif(!wordcount.containsKey(thisWord)){\n\t\t\t\twordcount.put(thisWord, new ArrayList<String>());\n\t\t\t}\n\t\t\twordcount.get(thisWord).add(nextWord);\n\t\t}\n\t\t for(Entry e : wordcount.entrySet()){\n\t// System.out.println(e.getKey());\n\t\tMap<String, Integer>count = new HashMap<String, Integer>();\n List<String>words = (List)e.getValue();\n for(String s : words){\n if(!count.containsKey(s)){\n count.put(s, 1);\n }\n else{\n count.put(s, count.get(s) + 1);\n }\n }\n \t\n // for(Entry e1 : wordcount.entrySet()){\n for(Entry f : count.entrySet()){\n \n // \tint m = 0;\n //\tint[] i = new int[100];\n //\ti[m] = (Integer) f.getValue();\n \tint n = (Integer) f.getValue();\n \tn = (Integer) f.getValue();\n // \tList<String> values = new ArrayList<String>();\n \t\t// values.addAll(count.g());\n \tif(n>=120){\n \tif(!(e.getKey().equals(\"\"))&&!(f.getKey().equals(\"\"))){\n //\t\t int a = (Integer) f.getValue();\n //\t\t Arrays.sort(a);\n System.out.println(e.getKey()+\" \"+f.getKey() + \" : \" + f.getValue());\n \n \t}\n \t}\n //\tm++;\n \t }\n\t\t }\n\t\t \n\t\n\t\t \n\t\t// Arrays.sort(i);\n\t\t //System.out.println(i[0]+i[1]);\n/*\n\t\t ArrayList<String> values = new ArrayList<String>();\n\t\t values.addAll(count.values());\n\n\t\t Collections.sort(values, Collections.reverseOrder());\n\n\t\t int last_i = -1;\n\n\t\t for (Integer i : values.subList(0, 99)) { \n\t\t if (last_i == i) \n\t\t continue;\n\t\t last_i = i;\n\n\n\n\n\t\t for (String s : wordcount.keySet()) { \n\n\t\t if (wordcount.get(s) == i)\n\t\t \n\t\t \tSystem.out.println(s+ \" \" + i);\n\n\t\t }\n\t\t \n\t\t\t}*/\n\t}", "public static String getMostFrequentType() {\n\t\tint cars = 0;\n\t\tint figures = 0;\n\t\t\n\t\tfor (int i = 0; i < toyList.size(); i++) {\n\t\t\tif (toyList.get(i).getType().equals(\"Car\")) {\n\t\t\t\tcars++;\n\t\t\t}\n\t\t\tif (toyList.get(i).getType().equals(\"Action Figure\")) {\n\t\t\t\tfigures++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (cars > figures) {\n\t\t\treturn \"Car\";\n\t\t}\n\t\telse if (figures > cars) {\n\t\t\treturn \"Action Figure\";\n\t\t}\n\t\telse {\n\t\t\treturn \"Equal amounts of actions figures and cars.\";\n\t\t}\n\t}", "public static void pageRankmain() {\n\t\t\t\n\t\t\tstopWordStore();\n\t\t\t//File[] file_read= dir.listFiles();\n\t\t\t//textProcessor(file_read);// Will be called from LinkCrawler\n\t\t\t//queryProcess();\n\t\t\t//System.out.println(\"docsave \"+ docsave);\n\t\t\t/*for ( Map.Entry<String, ArrayList<String>> entry : docsave.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t List<String> values = entry.getValue();\n\t\t\t System.out.print(\"Key = \" + key);\n\t\t\t System.out.println(\" , Values = \"+ values);\n\t\t\t}*/\n\t\t\t//########## RESPOINSIBLE FOR CREATING INVERTED INDEX OF TERMS ##########\n\t\t\tfor(int i=0;i<vocabulary.size();i++) {\n\t\t\t\tint count=1;\n\t\t\t\tMap<String, Integer> nestMap = new HashMap<String, Integer>();\n\t\t\t\tfor ( Map.Entry<String, ArrayList<String>> entry : docsave.entrySet()) {\n\t\t\t\t String keyMain = entry.getKey();\n\t\t\t\t List<String> values = entry.getValue();\n\t\t\t\t if(values.contains(vocabulary.get(i)))\n\t\t\t\t \t{\n\t\t\t\t \tentryDf.put(vocabulary.get(i), count);//entryDf stores documents frequency of vocabulary word \\\\it increase the count value for specific key\n\t\t\t\t \tcount++;\n\t\t\t\t \t}\n\t\t\t\t \n\t\t\t\t nestMap.put(keyMain, Collections.frequency(values,vocabulary.get(i)));\n\t\t\t \t\n\t\t\t \t//System.out.println(\"VOC \"+ vocabulary.get(i)+ \" KeyMain \" +keyMain+ \" \"+ Collections.frequency(values,vocabulary.get(i)));\n\t\t\t\t\t}\n\t\t\t\t\ttfList.put(vocabulary.get(i), nestMap);\n\t\t\t}\n\t\t\t//########## RESPOINSIBLE FOR CREATING A MAP \"storeIdf\" TO STORE IDF VALUES OF TERMS ##########\n\t\t\tfor ( Map.Entry<String, Integer> endf : entryDf.entrySet()) {\n\t\t\t\tString keydf = endf.getKey();\n\t\t\t\tint valdf = endf.getValue();\n\t\t\t\t//System.out.print(\"Key = \" + \"'\"+keydf+ \"'\");\n\t\t\t //System.out.print(\" , Values = \"+ valdf);\n\t\t\t double Hudai = (double) (docsave.size())/valdf;\n\t\t\t //System.out.println(\"docsave size \"+docsave.size()+ \" valdf \"+ valdf + \" Hudai \"+ Hudai+ \" log Value1 \"+ Math.log(Hudai)+ \" log Value2 \"+ Math.log(2));\n\t\t\t double idf= Math.log(Hudai)/Math.log(2);\n\t\t\t storeIdf.put(keydf, idf);\n\t\t\t //System.out.print(\" idf-> \"+ idf);\n\t\t\t //System.out.println();\n\t\t\t} \n\t\t\t\n\t\t\t//############ Just for Printing ##########NO WORK HERE########\n\t\t\tfor (Map.Entry<String, Map<String, Integer>> tokTf : tfList.entrySet()) {\n\t\t\t\tString keyTf = tokTf.getKey();\n\t\t\t\tMap<String, Integer> valTF = tokTf.getValue();\n\t\t\t\tSystem.out.println(\"Inverted Indexing by Key Word = \" + \"'\"+keyTf+ \"'\");\n\t\t\t\tfor (Map.Entry<String, Integer> nesTf : valTF.entrySet()) {\n\t\t\t\t\tString keyTF = nesTf.getKey();\n\t\t\t\t\tInteger valTf = nesTf.getValue();\n\t\t\t\t\tSystem.out.print(\" Document Consists This Key Word = \" + \"'\"+ keyTF+ \"'\");\n\t\t\t\t\tSystem.out.println(\" , Term Frequencies in This Doc = \"+ valTf);\n\t\t\t\t} \n\t\t\t}\n\t\t\t//########### FOR CALCULATING DOCUMENT LENTH #############//\n\t\t\tfor ( Map.Entry<String, ArrayList<String>> entry_new : docsave.entrySet()) // Iterating Number of Documents\n\t\t\t{\n\t\t\t\tString keyMain_new = entry_new.getKey();\n\t\t\t\t//int countStop=0;\n\t\t\t\tdouble sum=0;\n\t\t\t\t for(Map.Entry<String, Map<String, Integer>> tokTf_new : tfList.entrySet()) // Iterating through the vocabulary\n\t\t\t\t { \n\t\t\t\t\t Map<String, Integer> valTF_new = tokTf_new.getValue();\n\t\t\t\t\t for (Map.Entry<String, Integer> nesTf_new : valTF_new.entrySet()) // Iterating Through the Documents\n\t\t\t\t\t {\n\t\t\t\t\t\t if(keyMain_new.equals(nesTf_new.getKey())) // Only doc name EQUAL with docsave name can enter here\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t double val = nesTf_new.getValue()* (Double) storeIdf.get(tokTf_new.getKey());\n\t\t\t\t\t\t\t sum = sum+ Math.pow(val, 2);\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t //countStop++;\n\t\t\t\t }\n\t\t\t\t docLength.put(keyMain_new, Math.sqrt(sum));\n\t\t\t\t sum=0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"Document Length \"+ docLength);\n\t\t\t//System.out.println(\"tfList \"+tfList);\n\t\t\t\n\t\t\t //########### FOR CALCULATING QUERY LENTH #############///\n\t\t\t\tdouble qrySum=0;\n\t\t\t\t for(String qryTerm: queryList) // Iterating through the vocabulary\n\t\t\t\t {\n\t\t\t\t\t//entryQf.put(qryTerm, Collections.frequency(queryList,qryTerm));// VUl ase\n\t\t\t\t\t \n\t\t\t\t\t\t if(storeIdf.get(qryTerm) != null) \n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t entryQf.put(qryTerm, Collections.frequency(queryList,qryTerm));\n\t\t\t\t\t\t\t double val = entryQf.get(qryTerm)* (Double) storeIdf.get(qryTerm);\n\t\t\t\t\t\t\t qrySum = qrySum+ Math.pow(val, 2);\n\t\t\t\t\t\t }\n\t\t\t\t\t System.out.println(qryTerm+\" \"+entryQf.get(qryTerm)+ \" \"+ (Double) storeIdf.get(qryTerm));\n\t\t\t\t }\n\t\t\t\t qrySum=Math.sqrt(qrySum);\n\t\t\t\t System.out.println(\"qrySum \" + qrySum);\n\t\t\t\t \n\t\t\t\t//########### FOR CALCULATING COSINE SIMILARITY #############///\n\t\t\t\t for ( Map.Entry<String, ArrayList<String>> entry_dotP : docsave.entrySet()) // Iterating Number of Documents\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble sumProduct=0;\n\t\t\t\t\t\tdouble productTfIdf=0;\n\t\t\t\t\t\tString keyMain_new = entry_dotP.getKey(); //Geting Doc Name\n\t\t\t\t\t\t for(Map.Entry<String, Integer> qryTermItr : entryQf.entrySet()) // Iterating through the vocabulary\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t Map<String, Integer> matchTerm = tfList.get(qryTermItr.getKey()); // Getting a map of doc Names by a Query Term as value of tfList\n\n\t\t\t\t\t\t\t\t if(matchTerm.containsKey(keyMain_new)) // Only doc name EQUAL with docsave name can enter here\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t //System.out.println(\"Test \"+ matchTerm.get(keyMain_new) +\" keyMain_new \" + keyMain_new);\n\t\t\t\t\t\t\t\t\t double docTfIdf= matchTerm.get(keyMain_new) * storeIdf.get(qryTermItr.getKey());\n\t\t\t\t\t\t\t\t\t double qryTfIdf= qryTermItr.getValue() * storeIdf.get(qryTermItr.getKey());\n\t\t\t\t\t\t\t\t\t productTfIdf = docTfIdf * qryTfIdf;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t sumProduct= sumProduct+productTfIdf;\n\t\t\t\t\t\t\t //System.out.println(\"productTfIdf \"+productTfIdf+\" sumProduct \"+ sumProduct);\n\t\t\t\t\t\t\t productTfIdf=0;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t cosineProd.put(entry_dotP.getKey(), sumProduct/(docLength.get(entry_dotP.getKey())*qrySum));\n\t\t\t\t\t\t sumProduct=0;\n\t\t\t\t\t\t //System.out.println(entry_dotP.getKey()+ \" \" + docLength.get(entry_dotP.getKey()));\n\t\t\t\t\t}\n\t\t\t\t System.out.println(\"cosineProd \"+ cosineProd);\n\t\t\t\t \n\t\t\t\t System.out.println(\"Number of Top Pages you want to see\");\n\t\t\t\t int topRank = Integer.parseInt(scan.nextLine());\n\t\t\t\t Map<String, Double> result = cosineProd.entrySet().stream()\n\t\t\t .sorted(Map.Entry.comparingByValue(Comparator.reverseOrder())).limit(topRank)\n\t\t\t .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,\n\t\t\t (oldValue, newValue) -> oldValue, LinkedHashMap::new));\n\n\t\t\t\t scan.close();\n\t\t\t //Alternative way\n\t\t\t //Map<String, Double> result2 = new LinkedHashMap<>();\n\t\t\t //cosineProd.entrySet().stream().sorted(Map.Entry.<String, Double>comparingByValue().reversed()).limit(2).forEachOrdered(x -> result2.put(x.getKey(), x.getValue()));\n\n\t\t\t System.out.println(\"Sorted...\");\n\t\t\t System.out.println(result);\n\t\t\t //System.out.println(result2);\n\t}", "public static Map<String,Integer> getCounts(ArrayList<String> words) {\r\n HashMap<String, Integer> map = new HashMap<String, Integer>();\r\n ArrayList<String> uniqueWords = new ArrayList<String>();\r\n for(String word: words) {\r\n if(!uniqueWords.contains(word)) {\r\n map.put(word, Collections.frequency(words, word));\r\n uniqueWords.add(word);\r\n }\r\n }\r\n return map;\r\n }", "private void createTermFreqVector(JCas jcas, Document doc) {\n\n String docText = doc.getText().toLowerCase();\n\n // TODO: construct a vector of tokens and update the tokenList in CAS\n\n String[] wordList = docText.split(\" \");\n HashMap<String, Integer> tokenCount = new HashMap<String, Integer>();\n for (String word : wordList) {\n String newWord = word;\n if(word.charAt(word.length()-1)<'a' || word.charAt(word.length()-1)>'z'){\n newWord = word.substring(0, word.length()-1);\n }\n //if(Utils.GetStopWordFilter().isStopword(newWord))continue;\n if (!tokenCount.containsKey(newWord)) {\n tokenCount.put(newWord, 1);\n } else {\n tokenCount.put(newWord, tokenCount.get(newWord) + 1);\n }\n }\n\n ArrayList<Token> tokenList = new ArrayList<Token>();\n for (String word : tokenCount.keySet()) {\n Token token = new Token(jcas);\n token.setText(word);\n token.setFrequency(tokenCount.get(word));\n tokenList.add(token);\n }\n FSList tokenFSList = Utils.fromCollectionToFSList(jcas, tokenList);\n doc.setTokenList(tokenFSList);\n }" ]
[ "0.75917596", "0.75375485", "0.712213", "0.7019639", "0.6941886", "0.67856395", "0.6749034", "0.6722514", "0.6663473", "0.65435785", "0.6540387", "0.64018875", "0.6352426", "0.63397753", "0.633525", "0.6330475", "0.629919", "0.6239115", "0.62028426", "0.6168569", "0.6144345", "0.61160505", "0.6097999", "0.6078574", "0.60465723", "0.60379606", "0.5983934", "0.5976177", "0.59677804", "0.59608305", "0.59168154", "0.5912137", "0.5889221", "0.57813925", "0.57803005", "0.5744626", "0.5712638", "0.57108295", "0.5686318", "0.566695", "0.5663238", "0.5651517", "0.56363493", "0.56153125", "0.5612873", "0.55915225", "0.5591213", "0.55846244", "0.55778915", "0.5548216", "0.5541588", "0.5526894", "0.55265385", "0.5511572", "0.55059767", "0.547554", "0.54622483", "0.5455549", "0.54423505", "0.5442188", "0.5441277", "0.5403959", "0.53579646", "0.53548175", "0.5351313", "0.53508383", "0.5331005", "0.5325122", "0.5305857", "0.53039944", "0.52804685", "0.52773005", "0.52742827", "0.52705055", "0.5247991", "0.52446413", "0.5232438", "0.52311325", "0.52270466", "0.5225443", "0.5219242", "0.52142805", "0.5213394", "0.5201506", "0.5199927", "0.519359", "0.5186973", "0.51654935", "0.5161484", "0.5156696", "0.5155791", "0.51495963", "0.5139247", "0.513755", "0.5133041", "0.5132921", "0.51316285", "0.5116874", "0.51124746", "0.51101613" ]
0.71258736
2
return top 20 most interesting frequent words
public Object[][] get20MostInterestingFrequentWords(File file) throws Exception{ Object[][] ans = new Object[20][2]; HashMap<String,Integer> map = new HashMap<>(); PriorityQueue<String> queue = new PriorityQueue<>(new Comparator<String>(){ public int compare(String s1,String s2){ return map.get(s1) - map.get(s2); } }); Set<String> stopwords = getStopWords(); BufferedReader br = new BufferedReader(new FileReader(file)); String line; while((line=br.readLine())!=null){ String[] tokens = line.split("\\s+"); for(String token : tokens){ if(stopwords.contains(token) || token.length()==0) continue; int val = map.getOrDefault(token, 0); map.put(token,val+1); } } br.close(); Set<String> keys = map.keySet(); int count = 0; for(String key : keys){ if(count < 20){ queue.offer(key); count++; } else{ String topMin = queue.peek(); if(map.get(key) > map.get(topMin)){ queue.poll(); queue.offer(key); } } } int index = ans.length-1; while(!queue.isEmpty() && index>=0){ String key = queue.poll(); int value = map.get(key); ans[index][0] = key; ans[index][1] = value; index--; } return ans; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void printMostUsedWords(){\n\t\tMap<String, Integer> words = getWords();\n\t\t\n\t\tString max_count_string[] = new String[3];\n\t\tint max_counts[] = new int[3];\n\t\t\n\t\tfor(String str : words.keySet()){\n\t\t\tint count = words.get(str);\n\t\t\tint index = getMinIndex(max_counts);\n\t\t\t\n\t\t\tif(count > max_counts[index]){\n\t\t\t\tmax_counts[index] = count;\n\t\t\t\tmax_count_string[index] = str;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* printing top 3 most frequently used words */\n\t\tSystem.out.println(\"top 3 most frequently used words : \");\n\t\tfor(int i=0; i<3; i++){\n\t\t\tSystem.out.println(\"Word : \\\"\" + max_count_string[i] + \"\\\" is used \"+ max_counts[i] +\" times\" );\n\t\t}\n\t\tSystem.out.println();\n\t}", "public String[] topHotWords( int count ){\r\n //If the number put in the arguments is greater than the number of distinct hotwords\r\n //in the document, limit it to distinctCount\r\n if (count > distinctCount()){\r\n count = distinctCount();\r\n }\r\n //Creating the array that will hold all the hotwords in order of number of appearances \r\n String[] topWord = new String[words.size()];\r\n //This is the subset of the array above that will return the amount specified by the count argument\r\n String[] output = new String[count];\r\n //Fills the array with blank strings\r\n Arrays.fill(topWord, \"\");\r\n //Iterator for moving through topWord for assignment\r\n int iterator = 0;\r\n //Loop through every hotword in words and puts those words in topWord\r\n for(String key: words.keySet()){\r\n topWord[iterator] = key;\r\n iterator++;\r\n }\r\n //Sorts the words in topword\r\n for(int i = 0; i < words.size(); i++){\r\n for(int j = words.size()-1; j > 0; j-- ){\r\n \r\n if(count(topWord[j]) > count(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n \r\n }\r\n }\r\n //Does a secondary check to be certain all words are in proper appearance number order\r\n for(int i = words.size()-1; i >0; i--){\r\n if(count(topWord[i]) > count(topWord[i-1])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[i-1];\r\n topWord[i-1] = temp;\r\n }\r\n }\r\n //Orders the words with the same number of appearances by order of appearance in the document\r\n for (int i = 0; i < words.size(); i++){\r\n for(int j = i+1; j < words.size(); j++){\r\n if (count(topWord[i]) == count(topWord[j])){\r\n if (consec.indexOf(topWord[j]) < consec.indexOf(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n }\r\n }\r\n }\r\n //Gets the subset requested for return\r\n for (int i = 0; i < count; i++){\r\n output[i] = topWord[i];\r\n }\r\n return output;\r\n\t}", "public Object[][] get20MostFrequentWords(File file) throws Exception{\n\t\tObject[][] ans = new Object[20][2];\n\t\tHashMap<String,Integer> map = new HashMap<>();\n\t\tPriorityQueue<String> queue = new PriorityQueue<>(new Comparator<String>(){\n\t\t\tpublic int compare(String s1,String s2){\n\t\t\t\treturn map.get(s1) - map.get(s2);\n\t\t\t}\n\t\t});\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\tString line;\n\t\twhile((line=br.readLine())!=null){\n\t\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\t\tfor(String token : tokens){\n\t\t\t\tif(token.length()==0)continue;\n\t\t\t\t\tint val = map.getOrDefault(token, 0);\n\t\t\t\t\tmap.put(token,val+1);\n\t\t\t\t}\n\t\t}\n\t\tbr.close();\n Set<String> keys = map.keySet();\n int count = 0;\n for(String key : keys){\n \tif(count < 20){\n \t\tqueue.offer(key);\n \t\tcount++;\n \t}\n \telse{\n \t\tString topMin = queue.peek();\n \t\tif(map.get(key) > map.get(topMin)){\n \t\t\tqueue.poll();\n \t\t\tqueue.offer(key);\n \t\t}\n \t}\n }\n int index = ans.length-1;\n while(!queue.isEmpty() && index>=0){\n \tString key = queue.poll();\n \tint value = map.get(key);\n \tans[index][0] = key;\n \tans[index][1] = value;\n \tindex--;\n \t\n }\n\t\t\n\t\treturn ans;\n\t}", "private static ArrayList<sri.Pair<String,Integer>> mostFrequentWords(String path) throws IOException {\r\n PriorityQueue<Pair<String, Integer>> listOfWords = new PriorityQueue<>(10,(o1, o2) -> {\r\n return ((int) o2.getSecond() - (int) o1.getSecond());\r\n });\r\n\r\n HashMap<String,Integer> mapOfWords = new HashMap<>();\r\n\r\n BufferedReader br;\r\n String word;\r\n ArrayList outputList = new ArrayList();\r\n\r\n File file = new File(path);\r\n\r\n br = new BufferedReader(new FileReader(file));\r\n\r\n while ( (word = br.readLine()) != null) {\r\n if (mapOfWords.containsKey(word)) {\r\n mapOfWords.put(word, mapOfWords.get(word) + 1);\r\n } else {\r\n mapOfWords.put(word, 1);\r\n }\r\n }\r\n\r\n for (Map.Entry<String,Integer> entry: mapOfWords.entrySet()){\r\n sri.Pair<String,Integer> tuple = new sri.Pair<String,Integer>(entry.getKey(),entry.getValue());\r\n listOfWords.offer(tuple);\r\n }\r\n\r\n for (int i = 0; i < 5; i++){\r\n outputList.add(new sri.Pair<String,Integer>(listOfWords.peek().getFirst(),listOfWords.poll().getSecond()));\r\n }\r\n\r\n return outputList;\r\n\r\n\r\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n public List<Map<String, Double>> getTopWords(Company company) {\n List<Map<String, Double>> topWords = new ArrayList<Map<String, Double>>();\n Map<String, Double> termToTfIdf = new TreeMap<String, Double>();\n Map<String, Integer> tokenMap = tfIdf.get(company.getStockSymbol());\n for (String token : tokenMap.keySet()) {\n double tfIdf = 0;\n double termFrequency = tokenMap.get(token);\n double documentFrequency = calculateDocumentFrequency(token);\n tfIdf = termFrequency / documentFrequency;\n termToTfIdf.put(token, tfIdf);\n }\n List<Entry<String, Double>> entrySet = new ArrayList<Entry<String, Double>>();\n entrySet.addAll(termToTfIdf.entrySet());\n Collections.sort(entrySet, new Comparator() {\n\n @Override\n public int compare(Object o1, Object o2) {\n return ((Entry<String, Double>) o1).getValue().compareTo(\n ((Entry<String, Double>) o2).getValue());\n }\n\n });\n if (entrySet.size() < NO_OF_TOP_WORDS) {\n for (int i = 0; i < entrySet.size(); i++) {\n Map<String, Double> tempMap = new HashMap<String, Double>();\n tempMap.put(entrySet.get(i).getKey(), entrySet.get(i).getValue());\n topWords.add(tempMap);\n }\n } else {\n for (int i = entrySet.size() - NO_OF_TOP_WORDS; i < entrySet.size(); i++) {\n Map<String, Double> tempMap = new HashMap<String, Double>();\n tempMap.put(entrySet.get(i).getKey(), entrySet.get(i).getValue());\n topWords.add(tempMap);\n }\n }\n return topWords;\n }", "private static void printMostFrequentHashTags(){\n\t\t\n\t\tMap<String, Integer> hashtags = getHashTags();\n\t\tString max_count_hashtag[] = new String[3];\t//stores top 3 most frequent hashtags\n\t\tint max_counts[] = new int[3];\t//stores their count\n\t\t\n\t\tfor(String hashtag : hashtags.keySet()){\n\t\t\tint count = hashtags.get(hashtag);\n\t\t\tint index = getMinIndex(max_counts);\n\t\t\tif(count > max_counts[index]){\n\t\t\t\tmax_counts[index] = count;\n\t\t\t\tmax_count_hashtag[index] = hashtag;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* printing top 3 most freqent hashtags */\n\t\tSystem.out.println(\"top 3 most frequently used hashtags : \");\n\t\tfor(int i=0; i<3; i++){\n\t\t\tSystem.out.println(\"Hashtag : #\" + max_count_hashtag[i] + \" is used \"+ max_counts[i] + \" times.\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t}", "public Object[][] get20LeastFrequentWords(File file) throws Exception{\n\t\tObject[][] ans = new Object[20][2];\n\t\tHashMap<String,Integer> map = new HashMap<>();\n\t\tPriorityQueue<String> queue = new PriorityQueue<>(new Comparator<String>(){\n\t\t\tpublic int compare(String s1,String s2){\n\t\t\t\treturn -(map.get(s1) - map.get(s2));\n\t\t\t}\n\t\t});\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\tString line;\n\t\twhile((line=br.readLine())!=null){\n\t\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\t\tfor(String token : tokens){\n\t\t\t\tif(token.length()==0)continue;\n\t\t\t\t\tint val = map.getOrDefault(token, 0);\n\t\t\t\t\tmap.put(token,val+1);\n\t\t\t\t}\n\t\t}\n\t\tbr.close();\n Set<String> keys = map.keySet();\n int count = 0;\n for(String key : keys){\n \tif(count < 20){\n \t\tqueue.offer(key);\n \t\tcount++;\n \t}\n \telse{\n \t\tString topMin = queue.peek();\n \t\tif(map.get(key) < map.get(topMin)){\n \t\t\tqueue.poll();\n \t\t\tqueue.offer(key);\n \t\t}\n \t}\n }\n int index = ans.length-1;\n while(!queue.isEmpty() && index>=0){\n \tString key = queue.poll();\n \tint value = map.get(key);\n \tans[index][0] = key;\n \tans[index][1] = value;\n \tindex--;\n \t\n }\n\t\t\n\t\treturn ans;\n\t}", "public Pair[] top10Words(){\n Pair[] top10Words = new Pair[10];\n int top10LeastOccurrence = 9;\n\n for (String word : matchedSongs.keySet()){\n int currentSize = matchedSongs.get(word).size();\n //Array is sorted from greatest to least, just need to compare last value to current value.\n //Sorting after insertion will ensure it is in order for next time we perform a compare.\n if (top10Words[top10LeastOccurrence] == null || (int) top10Words[top10LeastOccurrence].getValue() < currentSize){\n top10Words[top10LeastOccurrence] = new Pair(word, currentSize);\n Arrays.sort(top10Words, new SortByHighestPair());\n }\n }\n return top10Words;\n }", "public abstract String[][] getTopWords();", "public List<String> topKFrequent(String[] words, int k) {\n HashMap<String, Integer> map = new HashMap<String, Integer>();\n\n for (String s : words) {\n map.put(s, map.getOrDefault(s, 0) + 1);\n }\n \n ArrayList<Integer> allFrequencies = new ArrayList<Integer>();\n\n \n map.forEach((key,v) -> allFrequencies.add(v));\n IO.printArrayList(allFrequencies);\n // Add all the frequencies into allFrequencies arraylist\n int totalAmountOfWords = map.keySet().size();\n \n // Find the k th largest number in the allFrequencies arraylist\n //System.out.println(\"total: \"+totalAmountOfWords);\n int newK = totalAmountOfWords - k;\n //System.out.println(\"newk: \"+ newK);\n int newkth = findKth(allFrequencies, newK);\n //System.out.println(\"new kth element:\"+newkth);\n int newKthElement = newK > 0 ? newkth : 0 ;\n \n TreeMap<Integer, TreeSet<String>> reverseSortedMap = new TreeMap<Integer, TreeSet<String>>(Collections.reverseOrder());\n map.forEach((key,v) -> {if (v >= newKthElement ) {\n if(!reverseSortedMap.containsKey(v)) reverseSortedMap.put(v, new TreeSet<String>());\n reverseSortedMap.get(v).add(key);}});\n \n List<String> result = new ArrayList<String>();\n reverseSortedMap.forEach((key,v) -> {result.addAll(v);});\n \n return result.size() > k? result.subList(0, k): result;\n }", "private static List<String> getTopNCompetitors(int numCompetitors,\n int topNCompetitors, \n List<String> competitors,\n int numReviews,\n List<String> reviews) {\n\t\t\n\t\t HashMap<String, Integer> map = new HashMap<>();\n\t\t for(String comp : competitors){\n\t map.put(comp.toLowerCase(),0);\n\t }\n\t\t\n\t for(String sentence : reviews){\n\t String[] words = sentence.split(\" \"); // get all the words in one sentence and put them in a String array \n\t for(String word : words){\n\t if(map.containsKey(word.toLowerCase())) { // check if map has any of the words (competitor name). if yes increase its value\n\t map.put(word.toLowerCase(), map.get(word.toLowerCase()) + 1);\n\t }\n\t }\n\t }\n\t \n\t PriorityQueue<String> pq =new PriorityQueue<>((String i1,String i2)->{ \n\t return map.get(i1)-map.get(i2); \n\t });\n\t for(String key:map.keySet()){\n\t pq.add(key);\n\t if(pq.size()>topNCompetitors) pq.poll();\n\t }\n\t List<String> result=new ArrayList<>();\n\t while(!pq.isEmpty())\n\t result.add(pq.poll());\n\t \n\t Collections.reverse(result);\n\t \n\t return result; \n\t \n}", "private Set<String> get5000MostPopularWords(Predicate<String> stringFilter) throws FileNotFoundException {\n InputStream wordIS = this.getClass().getResourceAsStream(\"5000-MostPopularEnglishWords.txt\"); // not the best file since it has dups and words that are one and two characters\n BufferedReader reader = new BufferedReader(new InputStreamReader(wordIS));\n\n return reader.lines()\n .filter(stringFilter)\n .collect(Collectors.toSet());\n }", "List<WordCount> topYMoviesReviewTopXWordsCount(final int topMovies, final int topWords) {\n List<String> topYMovies = new ArrayList<>();\n reviewCountPerMovieTopKMovies(topMovies).forEach(movie -> topYMovies.add(movie.getProductId()));\n // similar to moviesReviewWordsCount only filtered by pID\n JavaRDD<WordCount> wordCounts = movieReviews\n .filter(s-> topYMovies.contains(s.getMovie().getProductId()))\n .map(MovieReview::getReview)\n .flatMap(s-> Arrays.asList(s.split(\" \")))\n .mapToPair(s->new Tuple2<>(s, 1))\n .reduceByKey((a, b)-> a + b)\n .map(s->new WordCount(s._1(), s._2()));\n return wordCounts.top(getRealTopK(topWords, wordCounts.count()));\n }", "public static String getMostFrequentToy() {\n\t\tString name = \"\";\n\t\tint max = 0;\n\t\tfor (int i = 0; i < toyList.size(); i++) {\n\t\t\tif (max < toyList.get(i).getCount()) {\n\t\t\t\tmax = toyList.get(i).getCount();\n\t\t\t\tname = toyList.get(i).getName();\n\t\t\t}\n\t\t}\n\t\treturn name;\n\t}", "List<WordCount> moviesReviewWordsCount(final int topK) {\n // get the review, split by \" \" , map to pair with 1, reduce by key to count\n // then map to WordCount CLASS the has it's own comparator and get the topK (validity checked) - (collect)\n JavaRDD<WordCount> wordCounts = movieReviews\n .map(MovieReview::getReview)\n .flatMap(s-> Arrays.asList(s.split(\" \")))\n .mapToPair(s->new Tuple2<>(s, 1))\n .reduceByKey((a, b)-> a + b)\n .map(s->new WordCount(s._1(), s._2()));\n return wordCounts.top(getRealTopK(topK, wordCounts.count()));\n }", "private static List<String> computeTwoGramFrequencies(List<String> words, int top_no, List<String> stopwordslist) {\n\t\t\t\n\t\tMap<String, Integer> tempstopmap= new HashMap<String, Integer>();\n\t\tfor (int i=0; i<stopwordslist.size(); i++){\n\t\t\tString tempword = stopwordslist.get(i);\n\t\t\ttempstopmap.put(tempword, 1);\n\t\t}//construct temp stopwordmap\n\t\t\n\t\tint i=0;\n\t\tMap<String, Integer> tempmap= new HashMap<String, Integer>();\n\t\twhile(i<words.size()){\n\t\t\tString temptwogram=\"\";\n\t\t\tString tempword1=\" \";\n\t\t\tString tempword2=\" \";\n\t\t\twhile(true){\n\t\t\t\tif(i>=words.size()-1)\n\t\t\t\t\tbreak;\n\t\t\t\ttempword1=words.get(i);\n\t\t\t\tif(!tempstopmap.containsKey(tempword1))\n\t\t\t\t\tbreak;\n\t\t\t\ti++;\n\t\t\t\ttempword1=\" \";\n\t\t\t}\n\t\t\ti++;\n\t\t\tSystem.out.println(\"b\"+i);\n\t\t\twhile(true){\n\t\t\t\tif(i>=words.size())\n\t\t\t\t\tbreak;\n\t\t\t\ttempword2=words.get(i);\n\t\t\t\tif(!tempstopmap.containsKey(tempword2))\n\t\t\t\t\tbreak;\n\t\t\t\ti++;\n\t\t\t\ttempword2=\" \";\n\t\t\t}//jump for the case that word + stopword +word\n\t\t\t\n\t\t\ttemptwogram = tempword1+\" \"+tempword2; //2-gram\n\t\t\tif (tempmap.containsKey(temptwogram))\n\t\t\t\ttempmap.put(temptwogram, tempmap.get(temptwogram)+1);\n\t\t\telse\n\t\t\t\ttempmap.put(temptwogram, 1);\n\t\t}//construct hashmap to count 2-gram words (key(word), value(frequency))\n\t\tList<Map.Entry<String, Integer>> templist = new ArrayList<Map.Entry<String, Integer>>();\n\t\tfor(Map.Entry<String, Integer> entry: tempmap.entrySet()){\n\t\t\t\n\t\t\t\n\t\t\ttemplist.add(entry);\n\t\t}//construct templist with entry containing word/frequency in map\n\t\t\n\t\tCollections.sort(templist, Collections.reverseOrder(new comparatorByFrequencyReverse()));//sort templist in decresing order\n\n\t\t /*change the templist into sortedlist*/\n\t\tList<String> sortedlist = new ArrayList<String> ();\n\t\tif(templist.size()>=top_no){\n\t\t\tfor (int j=0; j<top_no;j++){\n\t\t\t\tString word = templist.get(j).getKey();\n\t\t\t\tsortedlist.add(word);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tfor (int j=0; j<templist.size();j++){\n\t\t\t\tString word = templist.get(j).getKey();\n\t\t\t\tsortedlist.add(word);\n\t\t\t}\n\t\t}\n\t\treturn sortedlist;\n\t}", "public List<String> getFrequentWords() {\n\t\tif (this.frequentWords == null) {\n\t\t\tSet<String> wordsToReturn = new TreeSet<String>();\n\t\t\tfor (String folder : termFrequencyManager.getTfidfByFolder().keySet()) {\n\t\t\t\tint index = 0;\n\t\t\t\tMap<String, TFIDFSummary> tfidSummaries =\n\t\t\t\t\t\ttermFrequencyManager.getTfidfByFolder().get(folder);\n\t\t\t\tArrayList<TFIDFSummary> tfidfSummariesList = new ArrayList<TFIDFSummary>(tfidSummaries.size());\n\t\t\t\tfor (String term : tfidSummaries.keySet()) {\n\t\t\t\t\ttfidfSummariesList.add(tfidSummaries.get(term));\n\t\t\t\t}\n\t\t\t\tCollections.sort(tfidfSummariesList);\n\n\t\t\t\twhile (index < tfidfSummariesList.size() && index < MAX_NUM_ATTRIBUTES_BY_FOLDER) {\n\t\t\t\t\tTFIDFSummary ts = tfidfSummariesList.get(tfidfSummariesList.size() - 1 - index);\n\t\t\t\t\twordsToReturn.add(ts.getTerm());\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.frequentWords = new ArrayList<String>(wordsToReturn);\n\t\t}\n\t\tSystem.out.println(\"Numero de palabras frecuentes: \" + this.frequentWords.size());\n\t\tfor (String w : frequentWords) System.out.println(\"FreqWord \" + w);\n\t\treturn this.frequentWords;\n\t}", "public static List<String> topKFrequent_pq(String[] words, int k) {\n Map<String, Integer> countMap = new HashMap<>();\n for (String word : words) {\n countMap.put(word, countMap.getOrDefault(word, 0) + 1);\n }\n\n PriorityQueue<String> pq = new PriorityQueue<String>((word1, word2) -> {\n if (countMap.get(word1) == countMap.get(word2)) {\n return word2.compareTo(word1);\n }\n return countMap.get(word1) - countMap.get(word2);\n });\n\n for (String word : countMap.keySet()) {\n pq.offer(word);\n if (pq.size() > k) {\n pq.poll();\n }\n }\n\n List<String> ans = new ArrayList<>();\n while (!pq.isEmpty()) {\n ans.add(pq.poll());\n }\n Collections.reverse(ans);\n return ans;\n }", "public List<ExplanationFeature> getTopNFeatures() {\n\t\tList<ExplanationFeature> ret = Lists.newArrayList(this.entries);\n\t\tCollections.sort(ret);\n\t\treturn ret;\n\t}", "private static void MostFrequentTwoGram() throws Exception{\n\t\tFile file=new File(filenameforpages);\n\t\tList<String> words = Utilities.tokenizeFile(file);\n\t\t\n\t\tList<String> stopwordslist = Utilities.tokenizeFile(new File(filenameforstopwords));\n\t\tList<String> mostfrequenttwogramlist =computeTwoGramFrequencies(words, top_number , stopwordslist);\n\t\tWriteMostFrequentTwoGramsToFile(mostfrequenttwogramlist);\n\t}", "public static List<String> topKFrequent_pq_opt(String[] words, int k) {\n Map<String, Integer> countMap = new HashMap<>();\n for (String word : words) {\n countMap.put(word, countMap.getOrDefault(word, 0) + 1);\n }\n\n PriorityQueue<String> pq = new PriorityQueue<String>((word1, word2) -> {\n if (countMap.get(word1).equals(countMap.get(word2))) {\n return word1.compareTo(word2);\n }\n return countMap.get(word2) - countMap.get(word1);\n });\n\n for (String word : countMap.keySet()) {\n pq.offer(word);\n }\n\n List<String> ans = new ArrayList<>();\n for (int i = 0; i < k; i++) {\n ans.add(pq.poll());\n }\n\n return ans;\n }", "public ArrayList<String> top5search(String kw1, String kw2) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\tArrayList<String> results = new ArrayList<String>();\n\t\tArrayList<Occurrence> ocArr1 = new ArrayList<Occurrence>();\n\t\tArrayList<Occurrence> ocArr2 = new ArrayList<Occurrence>();\n\t\tArrayList<Occurrence> combined = new ArrayList<Occurrence>();\n\t\t\n\t\tif (keywordsIndex.containsKey(kw1))\n\t\t\tocArr1 = keywordsIndex.get(kw1);\n\t\t\n\t\tif (keywordsIndex.containsKey(kw2))\n\t\t\tocArr2 = keywordsIndex.get(kw2);\n\t\t\n\t\tcombined.addAll(ocArr1);\n\t\tcombined.addAll(ocArr2);\n\t\t\n\t\tif (!(ocArr1.isEmpty()) && !(ocArr2.isEmpty()))\n\t\t{\n\t\t\t// Sort with preference for ocArr1\n\t\t\tfor (int x = 0; x < combined.size()-1; x++)\n\t\t\t{\n\t\t\t\tfor (int y = 1; y < combined.size()-x; y++)\n\t\t\t\t{\n\t\t\t\t\tif (combined.get(y-1).frequency < combined.get(y).frequency)\n\t\t\t\t\t{\n\t\t\t\t\t\tOccurrence temp = combined.get(y-1);\n\t\t\t\t\t\tcombined.set(y-1, combined.get(y));\n\t\t\t\t\t\tcombined.set(y, temp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove duplicates\n\t\t\tfor (int x = 0; x < combined.size()-1; x++)\n\t\t\t{\n\t\t\t\tfor (int y = x + 1; y < combined.size(); y++)\n\t\t\t\t{\n\t\t\t\t\tif (combined.get(x).document == combined.get(y).document)\n\t\t\t\t\t\tcombined.remove(y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Top 5\n\t\twhile (combined.size() > 5)\n\t\t\tcombined.remove(combined.size()-1);\n\t\t\n\t\t//System.out.println(combined);\n\t\t\n\t\tfor (Occurrence oc : combined)\n\t\t\tresults.add(oc.document);\n\n\t\treturn results;\n\t\n\t\t\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\n\t}", "public void apply(GlobalWindow window, Iterable<String> values, \n Collector<Tuple2<String,Integer>> out) throws Exception {\n \t HashMap <String,Integer> countWord = new HashMap<String,Integer>();\n \n for (String value : values) {\n \t \n \t String[] tokens = value.toLowerCase().split(\"\\\\W+\");\n \t for (String token : tokens)\n \t {\t if (token.length() >0) {\n \t\t if (countWord.get(token) != null)\n { countWord.put(token, countWord.get(token)+1);}\n else\n {countWord.put(token, 1);}\n \t }\n \t\t \n \t }\n }\n \n \n //Comparator to sort in reverse\n \t\t\tComparator<String> comparator = new Comparator<String>() {\n \t\t\t public int compare(String o1, String o2) {\n \t\t\t return countWord.get(o1).compareTo(countWord.get(o2));\n \t\t\t }\n \t\t\t};\n\n \t\t\tArrayList<String> words = new ArrayList<String>();\n \t\t\twords.addAll(countWord.keySet());\n\n \t\t\tCollections.sort(words,comparator);\n \t\t\tCollections.reverse(words);\n \t\t\t\n// System.out.println(Arrays.asList(words));\n \t\t\tSystem.out.println(\"10 most frequent words per stream\");\n System.out.println(\"-----------\");\n \n for(int i = 0; i < 10; i++) {\n \tSystem.out.println(words.get(i) + \" : \" + countWord.get(words.get(i)));\n }\n \n \n System.out.println(\"\\n\");\n \n }", "public String showSearchFrequency(WordCount wordCount, String order) {\n TreeMap<Integer, TreeMap<String, Word>> wordCountMap = wordCount.getWordCount(); //get map ordered by word count\n String returnedString = \"You have searched for these words \";\n if (order.equals(\n \"asc\") || order.equals(\"\")) { //list in ascending displayOrder\n returnedString += \"least:\\n\";\n for (Map.Entry<Integer, TreeMap<String, Word>> entry : wordCountMap.entrySet()) {\n returnedString += entry.getKey() + \" searches -\\n\";\n for (Map.Entry<String, Word> word : entry.getValue().entrySet()) {\n returnedString += word.getKey() + \"\\n\";\n }\n }\n } else { //list in descending displayOrder\n returnedString += \"most:\\n\";\n for (Integer searchCount : wordCountMap.descendingKeySet()) {\n returnedString += searchCount + \" searches -\\n\";\n for (Map.Entry<String, Word> word : wordCountMap.get(searchCount).entrySet()) {\n returnedString += word.getKey() + \"\\n\";\n }\n }\n }\n return returnedString;\n }", "public static List<String> topKFrequent_hashmap_opt(String[] words, int k) {\n List<String> ans = new ArrayList<>();\n Map<String, Integer> freqMap = new HashMap<>();\n for (String word : words) {\n freqMap.put(word, freqMap.getOrDefault(word, 0) + 1);\n }\n\n ans.addAll(freqMap.keySet());\n\n Collections.sort(ans, (o1, o2) -> {\n if (freqMap.get(o1) == freqMap.get(o2)) {\n return o1.compareTo(o2);\n }\n\n return freqMap.get(o2) - freqMap.get(o1);\n });\n\n return ans.subList(0, k);\n }", "public HashMap<String, Integer> getOrder(){\n\t\t\n\t\tHashMap<String, Integer> hm2 = getHashMap();\n\t\n\t\tArrayList fq = new ArrayList<>();\n\t\t\n\t\tHashMap<String, Integer> top10 = new HashMap<String, Integer>();\n\t\t\n\t\tfor(String key : hm2.keySet()){\n\t\t\t\n\t\t\tfq.add(hm2.get(key));\n\t\t}\n\t\t// use Collection to get the order of frequency\n\t\tCollections.sort(fq);\n \tCollections.reverse(fq);\n \t\n \tfor(int i = 0; i<11; i++){\n \t\t\n \t\tfor(String key : hm2.keySet()){\n \t\t// make sure the word not equals to balck space\n \t\tif(hm2.get(key) == fq.get(i) && !key.equals(\"\") ){\n \t\t\t\n \t\t top10.put(key, hm2.get(key));\n \t\t\t\t\n \t\t}\n \t}\t\n\t}\n\t\treturn top10;\n\t}", "default List<String> interestingConcepts(int topK, UnitLocation located,\n Set<Location> irrelevantSet){\n // collect frequent words outside the blacklist of locations\n final TokenIterator extractor = new TokenIterator(irrelevantSet);\n located.getUnitNode().accept(extractor);\n\n final WordCounter wordCounter = new WordCounter(extractor.getItems());\n\n return wordCounter.mostFrequent(topK);\n }", "public String mostCommonWord(String[] tweets) {\n int big = -100000;\n String mostCommon = null;\n for (String tweet : tweets) {// = for(int i = 0 ; i<tweets.length;i++) { String tweet = tweets[i] }\n for (String word : tweet.split(\" \")) {\n int amt = 0;\n for (String tweet2 : tweets)\n for (String word2 : tweet2.split(\" \"))\n if (word2.equals(word))\n amt++;\n if (amt > big) {\n big = amt;\n mostCommon = word;\n }\n }\n }\n return mostCommon;\n}", "public String most(String[] sentences) {\n\t\tString words = \"\";\n\t\tfor(int i = 0; i < sentences.length; i++){\n\t\t\twords = words + \" \" + sentences[i];\n\t\t}\n\t\twords = words.toLowerCase();\n\t\tString[] new_words = words.split(\" \"); \n\t\t\n\t\tMap<String, Integer> counting = new TreeMap<String, Integer>();\n\t\tfor(int i = 0; i < new_words.length; i++){\n\t\t\tif(counting.containsKey(new_words[i])){\n\t\t\t\tcounting.put(new_words[i], counting.get(new_words[i]) + 1);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcounting.put(new_words[i], 1);\n\t\t\t}\n\t\t}\n\t\tint max = 0; \n\t\tString max_word = \"\";\n\t\tfor(String s: counting.keySet()){\n\t\t\tif(counting.get(s) > max){\n\t\t\t\tmax = counting.get(s);\n\t\t\t\tmax_word = s;\n\t\t\t}\n\t\t}\n\t\treturn max_word;\n }", "public ArrayList<String> top5search(String kw1, String kw2) {\n // COMPLETE THIS METHOD\n ArrayList<Occurrence> Res1 = keywordsIndex.get(getKeyWord(kw1));\n ArrayList<Occurrence> res2 = keywordsIndex.get(getKeyWord(kw1));\n ArrayList<String> arrayList = new ArrayList<String>();\n\n while (arrayList.size() < 6) {\n Occurrence aa = null;\n Occurrence b = null;\n {\n if (Res1 != null) {\n for (Occurrence occr : Res1) {\n if (!arrayList.contains(occr.document)) {\n aa = occr;\n }\n }\n } if(Res1 == null){\n aa = new Occurrence(null, 0);\n }\n else aa = new Occurrence(null,0);\n }\n {\n if(res2 != null){\n for(Occurrence occr : res2){\n if(!arrayList.contains(occr.document)){\n b = occr;\n }\n }\n }\n if(res2 == null){\n b = new Occurrence(null,0);\n }\n else b = new Occurrence(null,0);\n }\n Occurrence[] a = {aa,b};//{search(arrayList, Res1), search(arrayList, res2)};\n Occurrence m = null;\n if (a[0].frequency < a[1].frequency) {\n m = a[1];\n } else m = a[0];\n if (m.document != null) {\n arrayList.add(m.document);\n } else break;\n }\n return arrayList;\n }", "public ArrayList<String> top5search(String kw1, String kw2) {\n\t\tkw1 = kw1.toLowerCase();\n kw2 = kw2.toLowerCase();\n ArrayList <String> outArr = new ArrayList <String> ();\n ArrayList <Occurrence> kw1Arr = null;\n ArrayList <Occurrence> kw2Arr = null;\n for(String e: keywordsIndex.keySet()) {\n if(e.equals(kw1) == true) {\n kw1Arr = keywordsIndex.get(e);}\n if(e.equals(kw2) == true) {\n kw2Arr = keywordsIndex.get(e);}}\n int kw1Point = 0;\n int kw2Point = 0;\n for(int inc = 0; inc < 5; inc++) {\n int kw1Value = 0;\n Occurrence kw1Occ = null;\n int kw2Value = 0;\n Occurrence kw2Occ = null;\n if(kw1Arr != null && kw1Point < kw1Arr.size()) {\n kw1Occ = kw1Arr.get(kw1Point);\n kw1Value = kw1Occ.frequency;}\n if(kw2Arr != null && kw2Point < kw2Arr.size()) {\n kw2Occ = kw2Arr.get(kw2Point);\n kw2Value = kw2Occ.frequency;}\n if(kw1Value == 0 && kw2Value == 0) {\n \t//will only occur if the if-statements for 212 and 215 are false\n \t//which means that the array doesn't exist or the pointer has iterated through the whole array\n break;}\n if(kw1Value >= kw2Value) {\n outArr.add(kw1Occ.document);\n kw1Point = kw1Point + 1;}\n else {outArr.add(kw2Occ.document);\n kw2Point = kw2Point + 1;}}\n if(outArr.size() == 0) {//no found matches\n return null;}\n else {return outArr;}//found matches\n\t}", "public static List<String> topKFrequent_hashmap(String[] words, int k) {\n List<String> ans = new ArrayList<>();\n if (words == null || words.length == 0 || k <= 0) {\n return ans;\n }\n\n Map<String, Integer> freqMap = new HashMap<>();\n for (String word : words) {\n freqMap.put(word, freqMap.getOrDefault(word, 0) + 1);\n }\n\n List<Map.Entry<String, Integer>> list = new ArrayList<Map.Entry<String, Integer>>(freqMap.entrySet());\n list.sort((o1, o2) -> {\n if (o1.getValue().equals(o2.getValue())) {\n return o1.getKey().compareTo(o2.getKey());\n }\n\n return o2.getValue() - o1.getValue();\n });\n\n for (Map.Entry<String, Integer> entry : list) {\n ans.add(entry.getKey());\n k--;\n if (k <= 0) {\n return ans;\n }\n }\n\n return ans;\n }", "private void getTweetsMostCommonHashTag() {\r\n final List<Entry<String, Integer>> list = \r\n getCommonList(countHashtags, countHashtags.size());\r\n list.stream()\r\n .filter(entry -> !searched.contains(entry.getKey().toLowerCase()))\r\n .limit(1)\r\n .forEach(entry -> getTweets(entry.getKey(), geocode, getAuth()));\r\n }", "@Override\n public Map<String, KeyWordBean[]> extractKeyWords(int topN) throws Exception {\n Map<String, KeyWordBean[]> cateKeyWords = new HashMap<>();\n HashMap<String, HashMap<String, Float>> categoryKeyWord = CHIFileUtil.getCateKeyCHIModel(ConstantUtil.CHI_MODEL);\n for (Map.Entry cateEntry : categoryKeyWord.entrySet()) {\n String cate = cateEntry.getKey().toString();\n KeyWordBean[] keyWords = CommonUtil.getTopNWord((HashMap<String, Float>) cateEntry.getValue(), topN);\n cateKeyWords.put(cate, keyWords);\n }\n return cateKeyWords;\n }", "private void getWordCounts() {\n Map<String, List<String>> uniqueWordsInClass = new HashMap<>();\n List<String> uniqueWords = new ArrayList<>();\n\n for (ClassificationClass classificationClass : classificationClasses) {\n uniqueWordsInClass.put(classificationClass.getName(), new ArrayList<>());\n }\n\n for (Document document : documents) {\n String[] terms = document.getContent().split(\" \");\n\n for (String term : terms) {\n if (term.isEmpty()) {\n continue;\n }\n if (!uniqueWords.contains(term)) {\n uniqueWords.add(term);\n }\n\n for (ClassificationClass docClass : document.getClassificationClasses()) {\n if (!uniqueWordsInClass.get(docClass.getName()).contains(term)) {\n uniqueWordsInClass.get(docClass.getName()).add(term);\n }\n if (totalWordsInClass.containsKey(docClass.getName())) {\n this.totalWordsInClass.put(docClass.getName(), this.totalWordsInClass.get(docClass.getName()) + document.getFeatures().get(term));\n } else {\n this.totalWordsInClass.put(docClass.getName(), document.getFeatures().get(term));\n }\n }\n }\n }\n\n this.totalUniqueWords = uniqueWords.size();\n }", "public Integer eliminateWordByFreq(Integer frequency) {\r\n\r\n\t\tInteger eliminateCount = 0;\r\n\r\n\t\tfor (String word : vocabulary.keySet().toArray(\r\n\t\t\t\tnew String[vocabulary.keySet().size()])) {\r\n\t\t\tif (vocabulary.get(word) < frequency) {\r\n\t\t\t\tvocabulary.remove(word);\r\n\t\t\t\tspamVocab.remove(word);\r\n\t\t\t\tnotSpamVocab.remove(word);\r\n\t\t\t\teliminateCount++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn eliminateCount;\r\n\t}", "public interface IWordFrequency {\n\n\t/**\n\t * \n\t * @param input\n\t * text string to process\n\t * @param wordNumber\n\t * max number of word in the returned list\n\t * @return for a given non null or empty input text, returns the list of\n\t * words ordered by word frequency, the most frequently occurring\n\t * word first, null otherwise.\n\t * \n\t */\n\tList<String> getWordFrequency(String input, int wordNumber);\n\n}", "private static String mostCommonWord(String paragraph, String[] banned) {\n\t String [] words =paragraph.replaceAll(\"[^a-zA-Z\\\\s+]\", \" \").toLowerCase().split(\"\\\\s+\");\r\n\t \r\n\t Set<String> bannedSet = new HashSet<String>();\r\n\t HashMap<String,Integer> map = new HashMap<String,Integer>();\r\n\t \r\n\t for (String string : banned) {\r\n\t \tbannedSet.add(string);\r\n\t }\r\n\t \r\n\t \r\n\t for (String string : words) {\r\n\t\t\t\r\n\t \tif(!bannedSet.contains(string)) {\r\n\t \t\tmap.put(string, map.getOrDefault(string, 0)+1);\r\n\t \t}\r\n\t \t \r\n\t\t}\r\n\t\t \r\n\t List list = new LinkedList(map.entrySet());\r\n\t\t// Defined Custom Comparator here\r\n\t\tCollections.sort(list, new Comparator() {\r\n\t\t\tpublic int compare(Object o1, Object o2) {\r\n\t\t\t\treturn ((Comparable) ((Map.Entry) (o2)).getValue()).compareTo(((Map.Entry) (o1)).getValue());\r\n\t\t\t}\r\n\t\t});\r\n\t \r\n\t\t//System.out.println(map);\r\n\t\t//System.out.println(list);\r\n\t\t\r\n\t\t return (String) ((Map.Entry) list.get(0)).getKey();\t\t\r\n\t}", "public static Entry[] overallMostFrequent(MaxFrequencyHeap h) {\r\n\t\tEntry[] top5 = new Entry[CAPACITY];\r\n\r\n\t\tint top5_counter = 0; // our temporary top5 counter\r\n\r\n\t\t// Iterate through our maxheap until we find the top 5 words\r\n\t\twhile(top5_counter<5){\r\n\t\t\t// If our heap is empty simply return the top5 array\r\n\t\t\tif(h.isEmpty()){\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}else{\r\n\t\t\t\t// Add the current max word from our heap using remove max\r\n\t\t\t\ttop5[top5_counter] = h.removeMax();\r\n\t\t\t\ttop5_counter++; // Increment our top 5 counter\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn top5;\r\n\t}", "public Map<String, Integer> findUnicalWord(ArrayList<Word> text)\n {\n String[] words=new String[text.size()];\n for(int i=0; i<text.size(); i++){\n words[i]=text.get(i).toString();\n }\n HashMap<String, Integer> myWordsCount = new HashMap<>();\n for (String s : words){\n if (myWordsCount.containsKey(s)) myWordsCount.replace(s, myWordsCount.get(s) + 1);\n else myWordsCount.put(s, 1);\n }\n\n Map<String, Integer> newWordsCount = myWordsCount\n .entrySet()\n .stream()\n .sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))\n .collect(\n toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2,\n LinkedHashMap::new));\n\n return newWordsCount;\n\n }", "@Override\n public void execute(Tuple tuple) {\n\t String word = tuple.getStringByField(\"word\");\n\t Integer count = tuple.getIntegerByField(\"count\");\n\n\t if (_topNMap.size() < _n) {\n\t \t//add word and count if less than N elements in top N\n\t \t_topNMap.put(word, count);\n\t } else {//if (_topNMap.size() > _n) {\n\t\tfor (String w : _topNMap.keySet()) {\n\t\t\tInteger c = _topNMap.get(w);\n\t\t\tif (_topNTreeMap.get(c) == null || _topNTreeMap.get(c).compareTo(w) < 0) {\n\t\t\t\t_topNTreeMap.put(c, w);\n\t\t\t}\n\t\t}\n\t\tInteger minCount = _topNTreeMap.firstKey();\n\t\tString minWord = _topNTreeMap.get(minCount);\n\t \tif (count > minCount) {\n\t\t\t_topNMap.remove(minWord);\n\t\t\t_topNMap.put(word, count);\n\t\t} else if (count == minCount && word.compareTo(minWord) > 0) {\n\t\t\t_topNMap.remove(minWord);\n\t\t\t_topNMap.put(word, count);\n\t\t}\n\t\t_topNTreeMap.clear();\n\t\t \n\t\tString topNList = \"\";\n\t\tint c = 0;\n\t \tfor (String key : _topNMap.keySet()) {\n\t\t\ttopNList += key + \", \";\n\t\t\tc++;\n\t \t}\n\t \ttopNList = topNList.substring(0, topNList.length() - 2);\n\t \tif (c == _n) {\n\t \t\tcollector.emit(new Values(\"top-N\", topNList));\n\t \t}\n\t }\n }", "private Double getSentenceTfIdf(String sentence, Article article) {\n Double sentenceTfIdf = 0.0;\n PriorityQueue<Double> topFiveWords = new PriorityQueue<>(Collections.reverseOrder());\n Set<String> alreadyConsideredWords = new HashSet<>();\n\n // Split the words in a sentence\n String[] sentenceTerms = sentence.split(\"\\\\s+\");\n\n for (String term: sentenceTerms) {\n // format the raw term to remove non-alphanumeric characters\n term = term.replaceAll(\"[^a-zA-Z\\\\d]\", \"\").toLowerCase().trim();\n\n if (!term.isEmpty()) {\n // lookup term in unigrams map to get its TF.IDF score\n Unigram correspondingUnigram = article.unigrams.get(term);\n\n if (correspondingUnigram != null && !alreadyConsideredWords.contains(term)) {\n topFiveWords.add(correspondingUnigram.getTf_idf());\n alreadyConsideredWords.add(term);\n }\n }\n }\n\n int limit = Math.min(5, topFiveWords.size());\n for (int i = 0; i < limit; i++) {\n sentenceTfIdf += topFiveWords.poll();\n }\n\n return sentenceTfIdf;\n }", "List<T> findMostPopularTags(Integer firstResult, Integer maxResult);", "public static PriorityQueue<WordCount> sortWords(HashMap<String, Integer> counts){\n\t\tPriorityQueue<WordCount> words = new PriorityQueue<WordCount>(99999, new wordCountComparator());\n\t\tWordCount wc = null;\n\t\tfor(Map.Entry<String, Integer> entry : counts.entrySet()){\n\t\t\twc = new WordCount(entry.getKey(), entry.getValue());\n\t\t\twords.add(wc);\n\t\t}\n\t\treturn words;\n\t}", "private static SortingMachine<Pair<String, Integer>> sortWords(\n Map<String, Integer> words, int numberOfWords) {\n AlphabeticalComparator stringComp = new AlphabeticalComparator();\n IntComparator intComp = new IntComparator();\n\n SortingMachine<Pair<String, Integer>> intMachine = new SortingMachine1L<>(\n intComp);\n SortingMachine<Pair<String, Integer>> stringMachine = new SortingMachine1L<>(\n stringComp);\n\n for (Map.Pair<String, Integer> pair : words) {\n intMachine.add(pair);\n }\n\n intMachine.changeToExtractionMode();\n\n for (int i = 0; i < numberOfWords; i++) {\n Pair<String, Integer> pair = intMachine.removeFirst();\n System.out.println(pair);\n stringMachine.add(pair);\n }\n\n stringMachine.changeToExtractionMode();\n\n return stringMachine;\n }", "private String topOrderedSentences(PriorityQueue<Sentence> sortedSentences) {\n StringBuilder summarySentences = new StringBuilder();\n\n List<Sentence> orderedSentences = new ArrayList<>();\n int limit = Math.min(3, sortedSentences.size());\n for (int i = 0; i < limit; i++) {\n Sentence topNthSentence = sortedSentences.poll();\n orderedSentences.add(topNthSentence);\n }\n\n // Sort sentences by order they appeared in the article, and restore punctuation\n orderedSentences.sort(new IndexComparator());\n for (Sentence s: orderedSentences) {\n summarySentences.append(s.getSentence());\n summarySentences.append(\". \");\n }\n\n return summarySentences.toString();\n }", "static String[] sortWordsByScore(String[] words) {\n\n if(words.length == 0) return new String[0];\n String[] sorted = new String[words.length];\n\n int minScore = -1; //minScore(words[0]);\n int currentIndex = 1;\n int index = 0;\n\n getMinScoreWordIndex(words, minScore);\n\n System.out.println(tracker);\n while(currentIndex <= tracker.size()){\n\n\n System.out.println(tracker.get(index));\n \n sorted[index] = words[tracker.get(index)];\n\n index++;\n currentIndex++;\n// tracker.clear();\n }\n\n return sorted;\n }", "public int getWordCount() {\n\t\treturn 10;\n\t}", "Movie mostPopularMovieReviewedByKUsers(final int numOfUsers) {\n // similar to getTopKMoviesAverage only filter by numOfUsers to be as specified\n List<Movie> popularMovieFiltered = movieReviews\n .mapToPair(s-> new Tuple2<>(s.getMovie().getProductId(), new Tuple2<>(s.getMovie().getScore(), 1)))\n .reduceByKey((a, b)-> new Tuple2<>(a._1 + b._1, a._2 + b._2))\n .filter(s -> s._2._2 >= numOfUsers)\n .map(s -> new Movie(s._1, roundFiveDecimal(s._2._1 / s._2._2)))\n .top(1);\n // return null if empty\n return popularMovieFiltered.isEmpty()? null : popularMovieFiltered.get(0);\n }", "private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}", "private HashSet<String> moviesQuery(HashSet<String> keywords,\n\t\t\tint moviesPerQuery, String name) {\n\t\tHashMap<String, Double> relevance = new HashMap<String, Double>();\n\t\tfor (String movie : movie_names) {\n\t\t\tif (movie.equals(name))\n\t\t\t\tcontinue;\n\t\t\trelevance.put(movie, 0.0);\n\t\t\tArrayList<Double> movieVec = tf_idf_avg(movie);\n\t\t\tfor (String word : keywords) {\n\t\t\t\tint index = vocab.indexOf(word);\n\t\t\t\trelevance\n\t\t\t\t\t\t.put(movie, relevance.get(movie) + movieVec.get(index));\n\t\t\t}\n\t\t}\n\t\tHashSet<String> mostRelevant = new HashSet<String>();\n\t\twhile (mostRelevant.size() < moviesPerQuery) {\n\t\t\tdouble max = 0;\n\t\t\tString best = \"\";\n\t\t\tfor (String movie : relevance.keySet()) {\n\t\t\t\tif (relevance.get(movie) > max && !mostRelevant.contains(movie)) {\n\t\t\t\t\tmax = relevance.get(movie);\n\t\t\t\t\tbest = movie;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmostRelevant.add(best);\n\t\t}\n\t\treturn mostRelevant;\n\t}", "public List<String> getTopSearchKey(int number) {\n\t\tString hql = \"select e.keyWords from SearchLog e group by e.keyWords order by count(e.id) desc\";\n\n\t\tSession session = getSession();\n\t\tList<String> list = new ArrayList<>();\n\t\ttry {\n\t\t\tQuery query = session.createQuery(hql);\n\t\t\tquery.setMaxResults(number);\n\t\t\tlist = query.list();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "@Override\n public Map<String, List<Pair<String, Double>>> getTopFeatures(int n) {\n Map<String, List<Pair<String, Double>>> map = new HashMap<>();\n for (int i = 0; i < models.size(); i++) {\n Model<Label> m = models.get(i);\n String label = labels.get(i).getLabel();\n Map<String, List<Pair<String, Double>>> modelMap = m.getTopFeatures(n);\n if (modelMap != null) {\n if (modelMap.size() == 1) {\n map.put(label, modelMap.get(Model.ALL_OUTPUTS));\n } else {\n map.merge(label, modelMap.get(label), (List<Pair<String, Double>> l, List<Pair<String, Double>> r) -> {\n l.addAll(r);\n return l;\n });\n }\n }\n }\n return map;\n }", "public /*TreeMap<String, Float>*/void getTopnTermsOverlapWithQuery() throws IOException, ParseException{\n\t\tString outputfile = \"./output/score/test3.txt\";\n\n\t\tFileOutputStream out = new FileOutputStream(outputfile);\n\t\tPrintStream ps = new PrintStream(out);\n\t\t/*-------------------------------------------------------------------------------*/\n\n\t\tTreeMap<String,Float> termsscoressorted = null;\n\t\tCollectionReader reader = new CollectionReader(indexDir); \n\t\tIndexReader ir = reader.getIndexReader();\t\t\n\n\t\tTopicsInMemory topics = new TopicsInMemory(\"data/CLEF-IP-2010/PAC_test/topics/PAC_topics-test2.xml\"/*omit-PAC-1094.xml\"*/);\n\t\tfor(Map.Entry<String, PatentDocument> topic : topics.getTopics().entrySet()){\n\t\t\tString qUcid = topic.getValue().getUcid();\n\t\t\tString queryid = topic.getKey();\n\t\t\tString queryName = topic.getKey() + \"_\" + topic.getValue().getUcid();\n\t\t\tString queryfile = topic.getKey() + \"_\" + topic.getValue().getUcid() + \".xml\";\n\n\t\t\t/*System.out.println(\"=========================================\");\n\t\t\tSystem.out.println(queryName);\n\t\t\tSystem.out.println(\"=========================================\");*/\n\t\t\t/*int docid = reader.getDocId(\"UN-EP-0663270\", PatentDocument.FileName);\n\t\t\tir.getTermVector(docid, field) getTermVectors(b);*/\n\n\t\t\tEvaluateResults er = new EvaluateResults();\n\t\t\tArrayList<String> tps = er.evaluatePatents(queryid, \"TP\");\n\t\t\tArrayList<String> fps = er.evaluatePatents(queryid, \"FP\");\n\t\t\tHashMap<String, Float> /*TFreqs*/ termsscores = new HashMap<>();\n\n\n\t\t\t/*--------------------------------- Query Words -------------------------------*/\n\t\t\t//\t\t\tHashMap<String, Integer> query_termsfreqspair = reader.gettermfreqpair(qUcid, PatentDocument.Description);\n\t\t\tHashSet<String> query_terms = reader.getDocTerms(qUcid, PatentDocument.Description);\n\t\t\t//\t\t\tSystem.out.println(query_termsfreqspair.size() +\"\\t\"+ query_termsfreqspair);\n//\t\t\tSystem.out.println(query_terms.size() + \"\\t\" + query_terms);\n\t\t\t/*-----------------------------------------------------------------------------*/\t\t\t\n\n\n\t\t\t//\t\t\tSystem.out.println(\"-----TPs----\");\n\t\t\tfor (String tp : tps) {\n\t\t\t\t/*System.out.println(\"---------\");\n\t\t\t\tSystem.out.println(tp);*/\n\t\t\t\tHashMap<String, Integer> termsfreqsTP = reader.gettermfreqpairAllsecs(\"UN-\" + tp);\n\n\t\t\t\tfor(Entry<String, Integer> tfTP:termsfreqsTP.entrySet()){\n\t\t\t\t\tif(termsscores.containsKey(tfTP.getKey())){\n\t\t\t\t\t\ttermsscores.put(tfTP.getKey(), termsscores.get(tfTP.getKey()) + (float)tfTP.getValue()/tps.size());\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//\t\t\t\t\t\tfloat test = (float)t.getValue()/tps.size();\n\t\t\t\t\t\t//\t\t\t\t\t\tSystem.out.println(test);\n\t\t\t\t\t\ttermsscores.put(tfTP.getKey(), (float)tfTP.getValue()/tps.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//\t\t\t\tSystem.out.println(termsscores.size() + \" \" + termsscores);\t\t\t\t\t\n\t\t\t}\n\n\t\t\t/*System.out.println();\n\t\t\tSystem.out.println(\"-----FNs----\");*/\n\t\t\tfor (String fp : fps) {\n\t\t\t\t/*System.out.println(\"---------\");\n\t\t\t\tSystem.out.println(fp);*/\n\t\t\t\tHashMap<String, Integer> termsfreqsFP = reader.gettermfreqpairAllsecs(\"UN-\" + fp);\n\n\t\t\t\tfor(Entry<String, Integer> t:termsfreqsFP.entrySet()){\n\t\t\t\t\tif(termsscores.containsKey(t.getKey())){\n\t\t\t\t\t\ttermsscores.put(t.getKey(), termsscores.get(t.getKey()) - (float)t.getValue()/fps.size());\n\t\t\t\t\t}else{\t\t\t\t\t\t\n\t\t\t\t\t\ttermsscores.put(t.getKey(), -(float)t.getValue()/fps.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//\t\t\t\tSystem.out.println(TFreqs.size() + \" \" + TFreqs);\n\t\t\t}\n\t\t\t//\t\t\tSystem.out.println(termsscores.size() + \" \" + termsscores);\n\t\t\tValueComparator bvc = new ValueComparator(termsscores);\n\t\t\ttermsscoressorted = new TreeMap<String,Float>(bvc);\t\t\t\n\t\t\ttermsscoressorted.putAll(termsscores);\n\t\t\tSystem.out.println(queryid + \"\\t\"+ termsscoressorted.size() + \"\\t\" + termsscoressorted/*.keySet()*/);\n\t\t\tint overlap = 0;\n\t\t\tint i = 0;\n\t\t\tfor(Entry<String, Float> scoresorted:termsscoressorted.entrySet()){\n\t\t\t\ti++;\n\t\t\t\tif(i<=100){\n\t\t\t\t\tif(query_terms.contains(scoresorted.getKey())){\n\t\t\t\t\t\toverlap++;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t\tSystem.out.println(queryName + \"\\t\"+overlap);\n//\t\t\tps.println(queryName + \"\\t\"+overlap);\n\t\t}\n\t}", "private Artist[] getTop10(List<User> users){\n\t\tArtist[] top=new Artist[10];\n\t\tHashMap<Artist, Integer> rank=new HashMap<Artist,Integer>();\n\t\tfor(User u:users) {\n\t\t\tfor(int i=0;i<u.artists.size();i++) {\n\t\t\t\tArtist a=u.artists.get(i);\n\t\t\t\tInteger weight=rank.getOrDefault(a, 0);\n\t\t\t\trank.put(a, weight+u.artistsWeights.get(i));\n\t\t\t}\n\t\t}\n\t\tArrayList<Artist>ranking=new ArrayList<Artist>();\n\t\tranking.addAll(rank.keySet());\n\t\tranking.sort((a1,a2)->rank.get(a2)-rank.get(a1));\n\t\tfor(int i=0;i<10;i++) {\n\t\t\ttop[i]=ranking.get(i);\n\t\t}\n\t\treturn top;\n\t\t\n\t}", "private double countWordFrequencyScore(Page page, String[] queryWords) {\n double score = 0;\n for (String word : queryWords) {\n int wordId = this.pb.getIdForWord(word);\n for (double pageWordId : page.getWords()) {\n if (wordId == pageWordId) score++;\n }\n }\n\n return score;\n }", "public Collection<Topic> getMostPopularTopics() {\n return gameRepository.getMostPopularTopics();\n }", "public static String bestWord (String [] word, int [] scoretable)\r\n { \r\n int score = 0;\r\n int maxScore = 0;\r\n String maxScoreString = \"\";\r\n for(String each : word)\r\n { \r\n score = getScore(each, scoretable); \r\n if(score > maxScore)\r\n {\r\n maxScore = score;\r\n maxScoreString = each;\r\n }\r\n } \r\n return maxScoreString;\r\n }", "public static String[] rechercheBigrammePlusFrequent(String text) {\n\t\tint n = text.length();\n\t\tArrayList<String> bigrammes = new ArrayList<String>();\n\t\tString[] bigrammesPlusFrequentsCorrespond = new String[5]; // resultat\n\t\tArrayList<String> bigrammesChiffréPlusFrequents = new ArrayList<String>();\n\t\tArrayList<Integer> nbrBigrammesPlusFrequents = new ArrayList<Integer>();\n\n\t\tfor (int i = 1; i < n - 1; i++) {\n\t\t\tString bigramme = text.substring(i, i + 2);\n\t\t\tbigrammes.add(bigramme);\n\t\t}\n\t\tfor (int j = 0; j < bigrammes.size(); j++) {\n\t\t\tint inter = 1;\n\t\t\tString bi = bigrammes.get(j);\n\t\t\tif ((!bigrammesChiffréPlusFrequents.contains(bi))) {\n\t\t\t\tfor (int k = j + 1; k < bigrammes.size(); k++) {\n\t\t\t\t\tif (bi.equals(bigrammes.get(k))) {\n\t\t\t\t\t\tinter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbigrammesChiffréPlusFrequents.add(bi);\n\t\t\t\tnbrBigrammesPlusFrequents.add(inter);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tint max = 1, id = 0;\n\t\t\tfor (int j = 0; j < bigrammesChiffréPlusFrequents.size(); j++) {\n\t\t\t\tif (nbrBigrammesPlusFrequents.get(j) >= max) {\n\t\t\t\t\tmax = nbrBigrammesPlusFrequents.get(j);\n\t\t\t\t\tid = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbigrammesPlusFrequentsCorrespond[i] = bigrammesChiffréPlusFrequents\n\t\t\t\t\t.get(id);\n\t\t\tnbrBigrammesPlusFrequents.set(id, 0);\n\t\t}\n\t\t// System.out.println(\"liste des bigrammes les plus fréquents\");\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t// System.out.println(bigrammesPlusFrequentsCorrespond[i]);\n\t\t}\n\t\treturn bigrammesPlusFrequentsCorrespond;\n\t}", "public String top10Filmes() {\r\n\t\tString top10 = \"Nenhum ingresso vendido ate o momento\";\r\n\t\tint contador = 0;\r\n\t\tif (listaIngresso.isEmpty() == false) {\r\n\t\tfor (int i = 0; i < listaIngresso.size(); i++) {\r\n\t\tcontador = 0;\r\n\t\tfor(int j = 0; j < listaIngresso.size() - 1; j++){\r\n\t\tif(listaIngresso.get(i).getSessao().getFilme() == listaIngresso.get(j).getSessao().getFilme()){\r\n\t\tcontador++;\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\r\n\t\t\t\r\n\t\t}\r\n\t\treturn top10;\r\n\t}", "public void getWordFrequency(ArrayList<String> out_words, ArrayList<Integer> out_counts) {\n //... Put in ArrayList so sort entries by frequency\n ArrayList<Map.Entry<String, MutableInteger>> entries =\n new ArrayList<Map.Entry<String, MutableInteger>>(wordFrequency.entrySet());\n Collections.sort(entries, new ComparatorFrequency());\n\n //... Add word and frequency to parallel output ArrayLists.\n for (Map.Entry<String, MutableInteger> ent : entries) {\n out_words.add(ent.getKey());\n out_counts.add(ent.getValue().getValue());\n }\n }", "int getNumFrequents() {\n return numFrequents;\n }", "public Set<String> getNLeastDistant(String word, int n) {\n\t\tthis.currentWord = word;\n\t\tSet<String> chosenCandidates = new HashSet<String>();\n\t\tPriorityQueue<String> candidates = new PriorityQueue<String>(dict.size(), new getNLeastDistantComparator());\n\t\tfor (String term : dict.keySet()) {\n\t\t\tcandidates.add(term);\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tchosenCandidates.add(candidates.poll());\n\t\t}\n\t\treturn chosenCandidates;\n\t}", "public String mostCommonWord(String paragraph, String[] banned) {\n String[] arr = paragraph.toLowerCase().trim().split(\"[^a-z]+\");\n Arrays.sort(arr);\n HashSet<String> set = new HashSet<>();\n for(String s: banned){\n set.add(s);\n }\n HashMap<String, Integer> map = new HashMap<>();\n int max = 0;\n int index = 0;\n for(int i = 0; i<arr.length; i++){\n if(set.contains(arr[i])) continue;\n map.put(arr[i], map.getOrDefault(arr[i], 0)+1);\n if(map.get(arr[i])>max){\n max = map.get(arr[i]);\n index = i;\n }\n }\n return arr[index];\n }", "public Set<String> getNBestUnderDistance(String word, int n, int distMax) {\n\t\tSet<String> oldWords = new HashSet<String>();\n\t\tSet<String> newWords = new HashSet<String>();\n\t\tPriorityQueue<String> candidates = new PriorityQueue<String>(11, new getNBestUnderDistanceComparator());\n\t\tSet<String> chosenCandidates = new HashSet<String>();\n\t\toldWords.add(word);\n\t\tfor (int i = 0; i < distMax; i++) {\n\t\t\tfor (String oldWord : oldWords) {\n\t\t\t\tnewWords.addAll(insertionHelper(oldWord));\n\t\t\t\tnewWords.addAll(deletionHelper(oldWord));\n\t\t\t\tnewWords.addAll(replacementHelper(oldWord));\n\t\t\t\tif (oldWord.length() > 1) {\n\t\t\t\t\tnewWords.addAll(transpositionHelper(oldWord));\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (String newWord : newWords) {\n\t\t\t\tif (dict.containsKey(newWord) && !candidates.contains(newWord)) {\n\t\t\t\t\tcandidates.add(newWord);\n\t\t\t\t}\n\t\t\t}\n\t\t\toldWords = newWords;\n\t\t\tnewWords = new HashSet<String>();\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (candidates.size() > 0 && candidates.peek() != null) {\n\t\t\t\tchosenCandidates.add(candidates.poll());\n\t\t\t}\n\t\t}\n\t\treturn chosenCandidates;\n\t}", "public Iterable<DBObject> mostMentioned(DBCollection collection) {\n Iterable<DBObject> ai = collection.aggregate(Arrays.asList(\n new BasicDBObject(\"$match\", new BasicDBObject(\"text\", new BasicDBObject(\"$regex\", rege))),\n new BasicDBObject(\"$project\", new BasicDBObject(\"user\", \"$user\").append(\"texts\", new BasicDBObject(\"$split\", Arrays.asList(\"$text\", \" \")))),\n new BasicDBObject(\"$unwind\", \"$texts\"),\n new BasicDBObject(\"$match\", new BasicDBObject(\"texts\", new BasicDBObject(\"$regex\", rege))),\n new BasicDBObject(\"$group\", new BasicDBObject(\"_id\", \"$texts\").append(\"count\", new BasicDBObject(\"$sum\", 1))),\n new BasicDBObject(\"$sort\", new BasicDBObject(\"count\", -1)),\n new BasicDBObject(\"$limit\", 5)\n )).results();\n return ai;\n }", "private static List<Integer> getTopKFrequentElementsBestCase(int[] nums, int k) {\n if(k > nums.length) {\n return new ArrayList<>();\n }\n\n Map<Integer, Integer> numToCount = new HashMap<>();\n int max = 0;\n for(int i = 0; i < nums.length; i++) {\n numToCount.put(nums[i], numToCount.getOrDefault(nums[i], 0) + 1);\n max = Math.max(max, numToCount.get(nums[i]));\n }\n\n List<Integer>[] numsPerFrequency = new ArrayList[max + 1];\n for(int i = 1; i <= max; i++) {\n numsPerFrequency[i] = new ArrayList<>();\n }\n\n for(Map.Entry<Integer, Integer> entry : numToCount.entrySet()) {\n numsPerFrequency[entry.getValue()].add(entry.getKey());\n }\n\n List<Integer> result = new ArrayList<>();\n\n for(int i = max; i >= 0; i--) {\n List<Integer> numsWithThisFreq = numsPerFrequency[i];\n\n for(int num : numsWithThisFreq) {\n result.add(num);\n if(result.size() == k) {\n return result;\n }\n }\n }\n\n return new ArrayList<>();\n }", "public void score(){\n\t\tscores=new float[3];\n\t\ttop3=new String[3];\n\t\tfor(int i=0;i<3;i++){\n\t\t\ttop3[i]=new String();\n\t\t\tscores[i]=(float)0;\n\t\t}\n\t\t//System.out.println(doclist.size());\n\t\tfor(int i=0;i<doclist.size();i++){\n\t\t\ttry{\n\t\t\t\tDocProcessor dp=new DocProcessor(doclist.get(i));\n\t\t\t\tdp.tokenizing();\n\t\t\t\tdp.stem();\n\t\t\t\t//System.out.println(dp.getContent());\n\t\t\t\t/*for(int j=2;j>=0;j--){\n\t\t\t\t\tSystem.out.println(\"top\"+(3-j)+\": \"+scores[j]);\n\t\t\t\t\tSystem.out.println(top3[j]);\n\t\t\t\t}*/\n\t\t\t\tfloat score=dp.score(this.keywords);\n\t\t\t\tfor(int j=2;j>=0;j--){\n\t\t\t\t\tif(score>scores[j]){\n\t\t\t\t\t\tfor(int k=0;k<j;k++){\n\t\t\t\t\t\t\tscores[k]=scores[k+1];\n\t\t\t\t\t\t\ttop3[k]=top3[k+1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tscores[j]=score;\n\t\t\t\t\t\ttop3[j]=dp.getContent();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/*for(int j=2;j>=0;j--){\n\t\t\t\t\tSystem.out.println(\"top\"+(3-j)+\": \"+scores[j]);\n\t\t\t\t\tSystem.out.println(top3[j]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"*******************************\");*/\n\t\t\t}catch(NullPointerException f){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}", "public void sortCount() {\n\t\tfor(Entry<String, TreeMap<String, Integer>> entry:map.entrySet()){\r\n\t\t\tTreeMap<String, Integer> tmap = entry.getValue();\r\n\t\t\tList<Entry<String, Integer>> sorttmap = MapSort.sortMapByIntegerValue(tmap);\r\n\t\t\t int flag=0;\r\n for(Entry<String, Integer> word:sorttmap){ \r\n \tflag++;\r\n \tkeyword.add(word.getKey());\r\n// System.out.println(mapping.getKey()+\":\"+mapping.getValue()); \r\n \tif(flag==5)\r\n \t\tbreak;\r\n } \r\n\t\t}\r\n\t\r\n\t}", "public static String getMostFrequentType() {\n\t\tint cars = 0;\n\t\tint figures = 0;\n\t\t\n\t\tfor (int i = 0; i < toyList.size(); i++) {\n\t\t\tif (toyList.get(i).getType().equals(\"Car\")) {\n\t\t\t\tcars++;\n\t\t\t}\n\t\t\tif (toyList.get(i).getType().equals(\"Action Figure\")) {\n\t\t\t\tfigures++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (cars > figures) {\n\t\t\treturn \"Car\";\n\t\t}\n\t\telse if (figures > cars) {\n\t\t\treturn \"Action Figure\";\n\t\t}\n\t\telse {\n\t\t\treturn \"Equal amounts of actions figures and cars.\";\n\t\t}\n\t}", "public String findOrder(String [] words, int N, int K)\n {\n Graph g = new Graph(K);\n\t\t \n\t\t for(int i=0;i < words.length && i+1 < words.length;i++) {\n\t\t\t\tString w1 = words[i];\n\t\t\t\tString w2 = words[i+1];\n\t\t\t\tcompare(g,w1,w2);\t\n\t\t\t}\n\t\t \n\t\t return g.topologicalSort(); \n \n }", "public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }", "public String summarize(String article, int maxWords)\n\t{\n\t\t//Build lexical Chains..\n\t\tList<Sentence> sent = dp.getSentencesFromStr(article);\n\t\t\n\t\tList<Score>finalSc = rankSentences(article, sent, maxWords);\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor(int i=0;i<finalSc.size();i++) \n\t\t{\n\t\t\tsb.append(sent.get(finalSc.get(i).getSentId()).toString().trim() +\".. \");\n\t\t}\n\t\t// Pick sentences\t\t\n\t\treturn sb.toString();\n\t}", "public String[] topKFrequent(String[] combo, int k) {\n\t if (combo.length == 0) {\n\t return new String[0];\n\t }\n\t // get all the distinct strings at keys and their frequencies as values.\n\t Map<String, Integer> freqMap = getFreqMap(combo);\n\t // NOTICE: using map.Entry as the element type directly so that all the \n\t // operations are mostly efficient.\n//\t Comparator<Map.Entry<String, Integer>> comp = new Comparator<Map.Entry<String, Integer>>() {\n//\t @Override\n//\t public int compare(Map.Entry<String, Integer> e1, Map.Entry<String, Integer> e2) {\n//\t return e1.getValue().compareTo(e2.getValue());\n//\t }\n//\t };\n\t PriorityQueue<Map.Entry<String, Integer>> minHeap = \n\t new PriorityQueue<>(k, new Comparator<Map.Entry<String, Integer>>() {\n\t\t @Override\n\t\t public int compare(Map.Entry<String, Integer> e1, Map.Entry<String, Integer> e2) {\n\t\t return e1.getValue().compareTo(e2.getValue());\n\t\t }\n\t\t });\n\t for (Map.Entry<String, Integer> entry : freqMap.entrySet()) {\n\t \tif (minHeap.size() < k) {\n\t \t\tminHeap.offer(entry);\n\t \t} else if (entry.getValue() > minHeap.peek().getValue()){\n\t \t\tminHeap.poll();\n\t \t\tminHeap.offer(entry);\n\t \t}\n\t }\n\t // since the returned array requires the strings sorted by their frequencies,\n\t // use a separate helper method to do this operation.\n\t return freqArray(minHeap);\n\t}", "@Override\n public void buildMsgDistances() {\n msgRelevance = sortByValue(msgRelevance);\n\n System.out.println(\"**************************************\");\n System.out.println(\"The most 50 frequent errors:\");\n\n int c = 0;\n for (Map.Entry<String, Integer> entry : msgRelevance.entrySet()) {\n if (c++ > 50) break;\n System.out.println(entry.getKey() + \"/\" + entry.getValue());\n }\n }", "private IDictionary<String, Double> computeTfScores(IList<String> words) {\n IDictionary<String, Double> tfScores = new ChainedHashDictionary<String, Double>();\n IDictionary<String, Double> wordCounts = new ChainedHashDictionary<String, Double>();\n \n // maps each given word to their frequency\n for (String word: words) {\n \t\tif (!wordCounts.containsKey(word)) {\n \t\t\twordCounts.put(word, 1.0);\n \t\t} else {\n \t\t\tDouble count = wordCounts.get(word);\n \t\t\twordCounts.put(word, count + 1.0);\n \t\t} \t\t\n }\n Double totalWords = (double) words.size();\n \n // Computes TF scores\n for (KVPair<String, Double> pair: wordCounts) {\n \t\ttfScores.put(pair.getKey(), pair.getValue() / totalWords);\n }\n return tfScores;\n }", "private void printCommon(int top) {\r\n printCommonList(\"HashTags\", getCommonList(countHashtags, top));\r\n printCommonList(\"Words\", getCommonList(countWords, top));\r\n printCommonList(\"User location\", getCommonList(countLocation, top));\r\n \r\n System.out.println(\"\\nNumber of tweets: \" + numberOfTweets);\r\n }", "long getEmbeddingTokenHigh();", "long getEmbeddingTokenHigh();", "public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }", "public static List<Integer> findSubstringWordConcatenation(String str, String[] words) {\n assert str != null;\n assert words != null;\n List<String> wordList = new ArrayList<>();\n List<Integer> wordIndex = new ArrayList<>();\n int noOfWords = words.length, wordLength = words[0].length();\n Map<String,Integer> wordFrequencyMap = new HashMap<>();\n for(String word: words) {\n wordFrequencyMap.put(word,wordFrequencyMap.getOrDefault(word,0)+1);\n }\n\n for(int windowStart=0; windowStart <= (str.length() - (wordLength * noOfWords)); windowStart++) {\n HashMap<String, Integer> wordsSeen = new HashMap<>();\n /*now look for words*/\n for(int wrd=0; wrd<noOfWords; wrd++) {\n int wordStartIndex = windowStart + (wrd * wordLength);\n String word = str.substring(wordStartIndex, wordStartIndex+wordLength);\n if(wordFrequencyMap.containsKey(word)) {\n wordsSeen.put(word, wordsSeen.getOrDefault(word,0)+1);\n } else {\n break;// break for loop\n }\n if(wordsSeen.get(word) > wordFrequencyMap.getOrDefault(word,0)) {\n break;// frequency is more then required\n }\n if(wordsSeen.size() == wordFrequencyMap.size()) {\n wordList.add(str.substring(windowStart, wordStartIndex+wordLength));\n wordIndex.add(windowStart);\n }\n }\n }\n return wordIndex;\n }", "public void sortWordTokens (String [] list, int count){\n \n String[] sortedWordsCopy = new String[count];\n \n \n //Makes a copy of list and stores it in sortedWordsCopy\n for (int i = 0; i < count; i++)\n sortedWordsCopy[i] = list[i];\n \n //Sorts sortedWordsCopy which is a copy of list\n Arrays.sort(sortedWordsCopy);\n \n //Copies the sorted list back out to list\n for (int i = 0; i < count; i++)\n list[i] = sortedWordsCopy[i];\n \n }", "void collectLeastFrequent(FrequencyTable fq);", "public static List<Integer> findWordConcatenation(String str, String[] words) {\n List<Integer> resultIndices = new ArrayList<Integer>();\n if (str == null || str.isEmpty() || words == null || words.length == 0)\n return resultIndices;\n\n int len = words[0].length();\n Map<String, Integer> freqMap = new HashMap();\n\n for (String word : words)\n freqMap.put(word, freqMap.getOrDefault(word, 0) + 1);\n\n Map<String, Integer> curMap = new HashMap();\n int l = 0, cc = 0;\n int i = 0;\n while (i < str.length() - len + 1) {\n String cur = str.substring(i, i + len);\n if (!freqMap.containsKey(cur)) {\n curMap.clear();\n ++i; l = i;\n continue;\n }\n\n curMap.put(cur, curMap.getOrDefault(cur, 0) + 1);\n if (curMap.get(cur) == freqMap.get(cur))\n cc++;\n\n while(curMap.get(cur) > freqMap.get(cur)) {\n String word1 = str.substring(l, l + len);\n curMap.put(word1, curMap.get(word1) - 1);\n if (curMap.get(word1) < freqMap.get(word1))\n --cc;\n l+=len;\n }\n\n if (cc == freqMap.size())\n resultIndices.add(l);\n i+=len;\n }\n return resultIndices;\n }", "private TreeMap<String, Integer> getWordsCount(TreeMap<String, ArrayList<String>> wordFamilies, ArrayList<String> allPatterns) {\r\n \t// get all the patterns first\r\n \tfor (int i = 0; i < allPatterns.size(); i++) {\r\n \t\twordFamilies.put(allPatterns.get(i), new ArrayList<String>());\r\n \t}\r\n \t// add the words into each pattern\r\n \tfor (String s : wordFamilies.keySet()) {\r\n \t\tfor (int i = 0; i < allPatterns.size(); i++) {\r\n \t\t\tif (s.equals(allPatterns.get(i))) {\r\n \t\t\t\tArrayList<String> curr = wordFamilies.get(s);\r\n \t\t\t\tcurr.add(this.activeWords.get(i));\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t// get the number of words in each pattern\r\n \tTreeMap<String, Integer> results = new TreeMap<String, Integer>();\r\n \tfor (String s : wordFamilies.keySet()) {\r\n \t\tresults.put(s, wordFamilies.get(s).size());\r\n \t}\r\n \treturn results;\r\n }", "private String printTopKLabels() {\n for (int i = 0; i < labelList.size(); ++i) {\n sortedLabels.add(\n new AbstractMap.SimpleEntry<>(labelList.get(i), labelProbArray[0][i]));\n if (sortedLabels.size() > RESULTS_TO_SHOW) {\n sortedLabels.poll();\n }\n }\n String textToShow = \"\";\n final int size = sortedLabels.size();\n for (int i = 0; i < size; ++i) {\n Map.Entry<String, Float> label = sortedLabels.poll();\n textToShow = String.format(\"\\n%s: %4.2f\",label.getKey(),label.getValue()) + textToShow;\n }\n return textToShow;\n }", "private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}", "public List<Token> getMostFrequentVARS(final int k) {\n\t\tList<Token> f = new LinkedList<Token>();\n\t\tfor (Entry<Token, Integer> s : VAR_FREQUENCY.entrySet()) {\n\t\t\tToken t = s.getKey();\n\t\t\tt.frequency = s.getValue();\n\t\t\tf.add(t);\n\t\t}\n\t\tComparator<Token> c = new Comparator<Token>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Token a, Token b) {\n\t\t\t\treturn new Integer(b.frequency).compareTo(new Integer(\n\t\t\t\t\t\ta.frequency));\n\t\t\t}\n\t\t};\n\t\tCollections.sort(f, c);\n\t\tif (k > 0 && f.size() > k) {\n\t\t\tList<Token> nf = new LinkedList<Token>();\n\t\t\tfor (int i = 0; i < k; i++) {\n\t\t\t\tnf.add(f.get(i));\n\t\t\t}\n\t\t\treturn nf;\n\t\t}\n\t\treturn f;\n\t}", "int getPopularity();", "@Override\n public String getValueFromTuple(ITuple tuple) {\n return tuple.getStringByField(\"top_n_words\");\n\t\t// End\n }", "public static void selectFeature() throws IOException {\n\t\tString trainPath = \"./corpus/trainData\";\n\t\tString stopPath = \"./corpus/english.stop\";\n\t\tString outPath = \"./corpus/features\";\n\t\tFileWriter fw = new FileWriter(outPath);\n\t\tFileReader fr = new FileReader(trainPath);\n\t\tFileReader fr2 = new FileReader(stopPath);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tBufferedReader br = new BufferedReader(fr);\n\t\tBufferedReader br2 = new BufferedReader(fr2);\n\t\tString oneline;\n\n\t\tArrayList<String> as = new ArrayList<String>();\n\t\twhile ((oneline = br2.readLine()) != null) {\n\t\t\tas.add(oneline);\n\t\t}\n\t\tString[] stopWords = new String[as.size()];\n\t\tas.toArray(stopWords);\n\n\t\tHashtable<String, Integer> hs = new Hashtable<String, Integer>();\n\n\t\tAnalyzer analyzer = new SnowballAnalyzer(\"English\", stopWords);\n\n\t\ttry {\n\t\t\twhile ((oneline = br.readLine()) != null) {\n\t\t\t\tint pos = oneline.indexOf(\"\\t\");\n\t\t\t\tString topic = oneline.substring(0, pos);\n\t\t\t\tString content = oneline.substring(pos + 1);\n\t\t\t\t// StringTokenizer st=new StringTokenizer(content,\" \");\n\n\t\t\t\tTokenStream stream = analyzer.tokenStream(\"contents\",\n\t\t\t\t\t\tnew StringReader(content));\n\n\t\t\t\twhile (true) {\n\t\t\t\t\tToken token = stream.next();\n\t\t\t\t\tif (token == null)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tString tmp = token.termText();\n\t\t\t\t\tif (!hs.containsKey(tmp)) {\n\t\t\t\t\t\ths.put(tmp, new Integer(1));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tInteger num = hs.get(tmp);\n\t\t\t\t\t\ths.put(tmp, num + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tList<Map.Entry> list = new ArrayList<Map.Entry>(hs.entrySet());\n\t\tCollections.sort(list, new Comparator<Map.Entry>() {\n\t\t\tpublic int compare(Map.Entry e1, Map.Entry e2) {\n\t\t\t\tInteger i1 = (Integer) e1.getValue();\n\t\t\t\tInteger i2 = (Integer) e2.getValue();\n\t\t\t\treturn i2.compareTo(i1);\n\t\t\t}\n\t\t});\n\t\tint count = 0;\n\t\tSystem.out.println(\"word - freq\");\n\t\tSystem.out.println(\"-------------\");\n\t\tfor (Map.Entry e : list) {\n\t\t\tInteger num = (Integer) e.getValue();\n\t\t\tString term = (String) e.getKey();\n\t\t\tif (count++ < 2000) {\n\t\t\t\tbw.write(term);\n\t\t\t\tbw.newLine();\n\t\t\t}\n\n\t\t}\n\n\t\tbw.close();\n\n\t\tSystem.out.println(hs.keySet().size());\n\t\tSystem.out.println(count);\n\n\t}", "public static List<String> sortUniqueWords(HashMap<String, Integer> tracker, List<String> allWords) {\n List<Integer> frequency = new ArrayList<>(tracker.values());\n frequency.sort(Collections.reverseOrder());\n List<String> result = new ArrayList<>();\n\n while(!tracker.isEmpty()){\n for (String key : allWords) {\n if(frequency.size()!= 0 && frequency.get(0) == tracker.get(key)){\n frequency.remove(0);\n\n result.add(key + \" \" + tracker.get(key));\n tracker.remove(key);\n }\n\n }\n }\n return result;\n\n\n }", "static List<String> topToys (int numToys, int topToys, List<String> toys, int numQuotes, List<String> quotes) {\n Map<String, List<Integer>> map = new HashMap<>();\n //Step 2: Put all the toys in hashmap with count 0\n for (String toy : toys) {\n map.put(toy, new ArrayList<>(Arrays.asList(0,0)));\n }\n //Collections.addAll(toys);\n //Step 3: split the quotes\n for (String quote :quotes) {\n //Step 3: Create a hashSet for all the toys\n Set<String> hashSet = new HashSet<>();//Fresh for each quote to count how many different quotes does the toy appear\n String[] splitQuote = quote.toLowerCase().split(\"\\\\W+\");//all non-word characters besides[a-z,0-9]\n for (String sq : splitQuote) {\n if (!map.containsKey(sq)) {//this is none of the toy\n //map.get(sq).set(0,1);\n continue;\n }\n else {\n map.get(sq).set(0,map.get(sq).get(0)+1);//increment the first element of list: this is total count of toys appearance\n if (!hashSet.contains(sq)) {\n map.get(sq).set(1,map.get(sq).get(1)+1);//increment the second element of the list: and then added to hash Set.\n //hashSet and index 1 will decide how many quotes the toys did appear\n }\n System.out.println(\"adding this to hashSet-->\"+sq);\n hashSet.add(sq);\n }\n }\n }\n map.forEach((key, value) -> System.out.println(\"Key=\" + key + \" and Value=\" + value));\n PriorityQueue<String> pq = new PriorityQueue<>((t1,t2) ->{\n if (!map.get(t1).get(0).equals(map.get(t2).get(0))) return map.get(t1).get(0)-map.get(t2).get(0);\n if (!map.get(t1).get(1).equals(map.get(t2).get(1))) return map.get(t1).get(1) - map.get(t2).get(1);\n return t1.compareTo(t2);\n });\n if (topToys > numToys) {\n for (String toy : map.keySet()) {\n if (map.get(toy).get(0)>0) pq.add(toy);\n }\n }\n else {\n for (String toy: toys) {\n pq.add(toy);\n if (pq.size() > topToys) pq.poll();\n }\n }\n List<String> output = new ArrayList<>();\n while (!pq.isEmpty()) {\n output.add(pq.poll());\n }\n Collections.reverse(output);\n return output;\n }", "private static void printTable(int numberOfDocs) {\n \n Gson gs = new Gson();\n String json = gs.toJson(wor);\n // System.out.println(json);\n \n List<String> queryWords = new ArrayList();\n //to test it for other query word you can change the following two words\n //queryWords.add(\"carpet\");\n //queryWords.add(\"hous\");\n queryWords.add(\"the\");\n queryWords.add(\"crystallin\");\n queryWords.add(\"len\");\n queryWords.add(\"vertebr\");\n queryWords.add(\"includ\");\n \n \n FrequencySummary frequencySummary = new FrequencySummary();\n frequencySummary.getSummary(json,docName, queryWords);\n \n System.exit(0);\n \n Hashtable<Integer,Integer> g = new Hashtable<>();\n \n /* wor.entrySet().forEach((wordToDocument) -> {\n String currentWord = wordToDocument.getKey();\n Map<String, Integer> documentToWordCount = wordToDocument.getValue();\n freq.set(0);\n df.set(0);\n documentToWordCount.entrySet().forEach((documentToFrequency) -> {\n String document = documentToFrequency.getKey();\n Integer wordCount = documentToFrequency.getValue();\n freq.addAndGet(wordCount);\n System.out.println(\"Word \" + currentWord + \" found \" + wordCount +\n \" times in document \" + document);\n \n if(g.getOrDefault(currentWord.hashCode(), null)==null){\n g.put(currentWord.hashCode(),1);\n \n }else {\n System.out.println(\"Hello\");\n \n int i = g.get(currentWord.hashCode());\n System.out.println(\"i \"+i);\n g.put(currentWord.hashCode(), i++);\n }\n // System.out.println(currentWord+\" \"+ g.get(currentWord.hashCode()));\n // g.put(currentWord.hashCode(), g.getOrDefault(currentWord.hashCode(), 0)+wordCount);\n \n });\n // System.out.println(freq.doubleValue());\n \n // System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/freq.doubleValue())));\n });\n // System.out.println(g.get(\"plai\".hashCode()));\n //System.out.println(\"IDF for this word: \"+Math.log10( (double)(counter/(double)g.get(\"plai\".hashCode()))));\n */\n }", "List<T> findMostPopularTags(Role role, Integer firstResult, Integer maxResult);", "public String solve1(String s) {\n Map<String, Integer> frequency = new HashMap<>();\n String maxWord = null;\n String[] split = s.split(\" \");\n\n for (String word : split) {\n int newFrequency = frequency.getOrDefault(word, 0) + 1;\n frequency.put(word, newFrequency);\n if (newFrequency > frequency.getOrDefault(maxWord, 0)) {\n maxWord = word;\n }\n }\n\n return maxWord;\n }", "public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }", "void documentFrequncy(Set<String> features,\n int index,\n int troush\n ) {\n for (String str : features) {\n switch (index) {\n case 1:\n for (int i = 0; i < count1; i++) {\n if (economydocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyeco.put(str, e);\n }\n e = 0;\n break;\n case 2:\n for (int i = 0; i < count2; i++) {\n if (educationdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyedu.put(str, e);\n }\n e = 0;\n break;\n case 3:\n for (int i = 0; i < count3; i++) {\n if (sportdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyspo.put(str, e);\n }\n e = 0;\n break;\n case 4:\n for (int i = 0; i < count4; i++) {\n if (culturedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencycul.put(str, e);\n }\n e = 0;\n break;\n case 5:\n for (int i = 0; i < count5; i++) {\n if (accedentdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyaccid.put(str, e);\n }\n e = 0;\n break;\n case 6:\n for (int i = 0; i < count6; i++) {\n if (environmntaldocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyenv.put(str, e);\n }\n e = 0;\n break;\n case 7:\n for (int i = 0; i < count7; i++) {\n if (foreign_affairdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencydep.put(str, e);\n }\n e = 0;\n break;\n case 8:\n for (int i = 0; i < count8; i++) {\n if (law_justicedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencylaw.put(str, e);\n }\n e = 0;\n break;\n case 9:\n for (int i = 0; i < count9; i++) {\n if (agriculture[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyagri.put(str, e);\n }\n e = 0;\n break;\n case 10:\n for (int i = 0; i < count10; i++) {\n if (politicsdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencypoltics.put(str, e);\n }\n e = 0;\n break;\n// case 11:\n//\n// for (int i = 0; i < count11; i++) {\n// if (social_affairsdocument[i].contains(str)) {\n// e++;\n// }\n// }\n// if (e > troush) {\n// documntfrequencysocial.put(str, e);\n// }\n// e = 0;\n// break;\n case 11:\n for (int i = 0; i < count12; i++) {\n if (science_technologydocument[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencysci.put(str, e);\n }\n e = 0;\n break;\n case 12:\n for (int i = 0; i < count13; i++) {\n if (healthdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyhel.put(str, e);\n }\n e = 0;\n break;\n case 13:\n for (int i = 0; i < count14; i++) {\n if (army[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencyarmy.put(str, e);\n }\n e = 0;\n break;\n default:\n break;\n }\n\n }\n }", "private void displayWords() {\r\n\t\tList<String> words = results.getSortedResults();\r\n\t\tif (words.size() == 0) {\r\n\t\t\tSystem.out.println(\"NO results to display.\");\r\n\t\t} else {\r\n\t\t\tfor (String word : words) {\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private List<Entry<String, Integer>> getCommonList(\r\n Map<String, Integer> count, int top) {\r\n \r\n final List<Entry<String, Integer>> topList = new ArrayList<>();\r\n \r\n final Set<Integer> setCount = new HashSet();\r\n setCount.addAll(count.values());\r\n setCount.remove(1);\r\n \r\n final List<Integer> counts = new ArrayList<>(setCount);\r\n Collections.sort(counts, Collections.reverseOrder());\r\n \r\n if (counts.isEmpty()) {\r\n return topList;\r\n }\r\n \r\n if (counts.size() < top) {\r\n top = counts.size();\r\n }\r\n \r\n final int countCommon = counts.get(top - 1);\r\n \r\n final Stream<Entry<String, Integer>> common = count.entrySet().stream()\r\n .filter(entry -> entry.getValue() >= countCommon);\r\n final Map<String, Integer> commonMap = new HashMap();\r\n common.forEach(entry -> commonMap.put(entry.getKey(), entry.getValue()));\r\n \r\n for (int i = 0; i < top; i++) {\r\n final int cc = counts.get(i);\r\n commonMap.entrySet().stream()\r\n .filter(entry -> entry.getValue() == cc)\r\n .forEach(entry -> topList.add(entry));\r\n }\r\n \r\n return topList;\r\n }" ]
[ "0.7681558", "0.7669305", "0.72500056", "0.7207187", "0.68462205", "0.68076855", "0.67381346", "0.65925705", "0.65176296", "0.65055", "0.64617735", "0.6450031", "0.6410723", "0.631178", "0.6294867", "0.6276551", "0.62327695", "0.6225723", "0.62138516", "0.6204233", "0.6155973", "0.61091363", "0.61079246", "0.60944927", "0.6059879", "0.6050372", "0.60396844", "0.5988815", "0.59778655", "0.59356457", "0.58906883", "0.58798313", "0.5795108", "0.5791638", "0.57743466", "0.57077134", "0.5690402", "0.5651743", "0.56425667", "0.5630157", "0.5622174", "0.56063336", "0.5598732", "0.558855", "0.5546987", "0.55295", "0.54733", "0.5464214", "0.54629403", "0.5458734", "0.5430851", "0.5405755", "0.53863615", "0.53701043", "0.53697896", "0.5369374", "0.5365945", "0.5356771", "0.53470993", "0.533803", "0.53341305", "0.53335786", "0.53327274", "0.5331413", "0.531773", "0.5288176", "0.52757335", "0.5269763", "0.52673125", "0.5265169", "0.52551407", "0.52513134", "0.5251043", "0.5218124", "0.52133363", "0.51982", "0.517608", "0.5173075", "0.5173075", "0.5170535", "0.5162302", "0.515715", "0.5154238", "0.5145006", "0.5139985", "0.5131686", "0.5121691", "0.5103387", "0.50879616", "0.5086096", "0.50813544", "0.5073026", "0.5072404", "0.5071093", "0.50610715", "0.50428087", "0.5019353", "0.50140214", "0.5013026", "0.5012688" ]
0.7367295
2
returns least 20 frequent words
public Object[][] get20LeastFrequentWords(File file) throws Exception{ Object[][] ans = new Object[20][2]; HashMap<String,Integer> map = new HashMap<>(); PriorityQueue<String> queue = new PriorityQueue<>(new Comparator<String>(){ public int compare(String s1,String s2){ return -(map.get(s1) - map.get(s2)); } }); BufferedReader br = new BufferedReader(new FileReader(file)); String line; while((line=br.readLine())!=null){ String[] tokens = line.split("\\s+"); for(String token : tokens){ if(token.length()==0)continue; int val = map.getOrDefault(token, 0); map.put(token,val+1); } } br.close(); Set<String> keys = map.keySet(); int count = 0; for(String key : keys){ if(count < 20){ queue.offer(key); count++; } else{ String topMin = queue.peek(); if(map.get(key) < map.get(topMin)){ queue.poll(); queue.offer(key); } } } int index = ans.length-1; while(!queue.isEmpty() && index>=0){ String key = queue.poll(); int value = map.get(key); ans[index][0] = key; ans[index][1] = value; index--; } return ans; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] topHotWords( int count ){\r\n //If the number put in the arguments is greater than the number of distinct hotwords\r\n //in the document, limit it to distinctCount\r\n if (count > distinctCount()){\r\n count = distinctCount();\r\n }\r\n //Creating the array that will hold all the hotwords in order of number of appearances \r\n String[] topWord = new String[words.size()];\r\n //This is the subset of the array above that will return the amount specified by the count argument\r\n String[] output = new String[count];\r\n //Fills the array with blank strings\r\n Arrays.fill(topWord, \"\");\r\n //Iterator for moving through topWord for assignment\r\n int iterator = 0;\r\n //Loop through every hotword in words and puts those words in topWord\r\n for(String key: words.keySet()){\r\n topWord[iterator] = key;\r\n iterator++;\r\n }\r\n //Sorts the words in topword\r\n for(int i = 0; i < words.size(); i++){\r\n for(int j = words.size()-1; j > 0; j-- ){\r\n \r\n if(count(topWord[j]) > count(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n \r\n }\r\n }\r\n //Does a secondary check to be certain all words are in proper appearance number order\r\n for(int i = words.size()-1; i >0; i--){\r\n if(count(topWord[i]) > count(topWord[i-1])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[i-1];\r\n topWord[i-1] = temp;\r\n }\r\n }\r\n //Orders the words with the same number of appearances by order of appearance in the document\r\n for (int i = 0; i < words.size(); i++){\r\n for(int j = i+1; j < words.size(); j++){\r\n if (count(topWord[i]) == count(topWord[j])){\r\n if (consec.indexOf(topWord[j]) < consec.indexOf(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n }\r\n }\r\n }\r\n //Gets the subset requested for return\r\n for (int i = 0; i < count; i++){\r\n output[i] = topWord[i];\r\n }\r\n return output;\r\n\t}", "private static void printMostUsedWords(){\n\t\tMap<String, Integer> words = getWords();\n\t\t\n\t\tString max_count_string[] = new String[3];\n\t\tint max_counts[] = new int[3];\n\t\t\n\t\tfor(String str : words.keySet()){\n\t\t\tint count = words.get(str);\n\t\t\tint index = getMinIndex(max_counts);\n\t\t\t\n\t\t\tif(count > max_counts[index]){\n\t\t\t\tmax_counts[index] = count;\n\t\t\t\tmax_count_string[index] = str;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* printing top 3 most frequently used words */\n\t\tSystem.out.println(\"top 3 most frequently used words : \");\n\t\tfor(int i=0; i<3; i++){\n\t\t\tSystem.out.println(\"Word : \\\"\" + max_count_string[i] + \"\\\" is used \"+ max_counts[i] +\" times\" );\n\t\t}\n\t\tSystem.out.println();\n\t}", "public List<String> getFrequentWords() {\n\t\tif (this.frequentWords == null) {\n\t\t\tSet<String> wordsToReturn = new TreeSet<String>();\n\t\t\tfor (String folder : termFrequencyManager.getTfidfByFolder().keySet()) {\n\t\t\t\tint index = 0;\n\t\t\t\tMap<String, TFIDFSummary> tfidSummaries =\n\t\t\t\t\t\ttermFrequencyManager.getTfidfByFolder().get(folder);\n\t\t\t\tArrayList<TFIDFSummary> tfidfSummariesList = new ArrayList<TFIDFSummary>(tfidSummaries.size());\n\t\t\t\tfor (String term : tfidSummaries.keySet()) {\n\t\t\t\t\ttfidfSummariesList.add(tfidSummaries.get(term));\n\t\t\t\t}\n\t\t\t\tCollections.sort(tfidfSummariesList);\n\n\t\t\t\twhile (index < tfidfSummariesList.size() && index < MAX_NUM_ATTRIBUTES_BY_FOLDER) {\n\t\t\t\t\tTFIDFSummary ts = tfidfSummariesList.get(tfidfSummariesList.size() - 1 - index);\n\t\t\t\t\twordsToReturn.add(ts.getTerm());\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.frequentWords = new ArrayList<String>(wordsToReturn);\n\t\t}\n\t\tSystem.out.println(\"Numero de palabras frecuentes: \" + this.frequentWords.size());\n\t\tfor (String w : frequentWords) System.out.println(\"FreqWord \" + w);\n\t\treturn this.frequentWords;\n\t}", "public Object[][] get20MostFrequentWords(File file) throws Exception{\n\t\tObject[][] ans = new Object[20][2];\n\t\tHashMap<String,Integer> map = new HashMap<>();\n\t\tPriorityQueue<String> queue = new PriorityQueue<>(new Comparator<String>(){\n\t\t\tpublic int compare(String s1,String s2){\n\t\t\t\treturn map.get(s1) - map.get(s2);\n\t\t\t}\n\t\t});\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\tString line;\n\t\twhile((line=br.readLine())!=null){\n\t\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\t\tfor(String token : tokens){\n\t\t\t\tif(token.length()==0)continue;\n\t\t\t\t\tint val = map.getOrDefault(token, 0);\n\t\t\t\t\tmap.put(token,val+1);\n\t\t\t\t}\n\t\t}\n\t\tbr.close();\n Set<String> keys = map.keySet();\n int count = 0;\n for(String key : keys){\n \tif(count < 20){\n \t\tqueue.offer(key);\n \t\tcount++;\n \t}\n \telse{\n \t\tString topMin = queue.peek();\n \t\tif(map.get(key) > map.get(topMin)){\n \t\t\tqueue.poll();\n \t\t\tqueue.offer(key);\n \t\t}\n \t}\n }\n int index = ans.length-1;\n while(!queue.isEmpty() && index>=0){\n \tString key = queue.poll();\n \tint value = map.get(key);\n \tans[index][0] = key;\n \tans[index][1] = value;\n \tindex--;\n \t\n }\n\t\t\n\t\treturn ans;\n\t}", "private static ArrayList<sri.Pair<String,Integer>> mostFrequentWords(String path) throws IOException {\r\n PriorityQueue<Pair<String, Integer>> listOfWords = new PriorityQueue<>(10,(o1, o2) -> {\r\n return ((int) o2.getSecond() - (int) o1.getSecond());\r\n });\r\n\r\n HashMap<String,Integer> mapOfWords = new HashMap<>();\r\n\r\n BufferedReader br;\r\n String word;\r\n ArrayList outputList = new ArrayList();\r\n\r\n File file = new File(path);\r\n\r\n br = new BufferedReader(new FileReader(file));\r\n\r\n while ( (word = br.readLine()) != null) {\r\n if (mapOfWords.containsKey(word)) {\r\n mapOfWords.put(word, mapOfWords.get(word) + 1);\r\n } else {\r\n mapOfWords.put(word, 1);\r\n }\r\n }\r\n\r\n for (Map.Entry<String,Integer> entry: mapOfWords.entrySet()){\r\n sri.Pair<String,Integer> tuple = new sri.Pair<String,Integer>(entry.getKey(),entry.getValue());\r\n listOfWords.offer(tuple);\r\n }\r\n\r\n for (int i = 0; i < 5; i++){\r\n outputList.add(new sri.Pair<String,Integer>(listOfWords.peek().getFirst(),listOfWords.poll().getSecond()));\r\n }\r\n\r\n return outputList;\r\n\r\n\r\n }", "public Object[][] get20MostInterestingFrequentWords(File file) throws Exception{\n\t\tObject[][] ans = new Object[20][2];\n\t\tHashMap<String,Integer> map = new HashMap<>();\n\t\tPriorityQueue<String> queue = new PriorityQueue<>(new Comparator<String>(){\n\t\t\tpublic int compare(String s1,String s2){\n\t\t\t\treturn map.get(s1) - map.get(s2);\n\t\t\t}\n\t\t});\n\t\tSet<String> stopwords = getStopWords();\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\tString line;\n\t\twhile((line=br.readLine())!=null){\n\t\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\t\tfor(String token : tokens){\n\t\t\t\t if(stopwords.contains(token) || token.length()==0) continue;\n\t\t\t\t\tint val = map.getOrDefault(token, 0);\n\t\t\t\t\tmap.put(token,val+1);\n\t\t\t\t}\n\t\t}\n\t\tbr.close();\n Set<String> keys = map.keySet();\n int count = 0;\n for(String key : keys){\n \tif(count < 20){\n \t\tqueue.offer(key);\n \t\tcount++;\n \t}\n \telse{\n \t\tString topMin = queue.peek();\n \t\tif(map.get(key) > map.get(topMin)){\n \t\t\tqueue.poll();\n \t\t\tqueue.offer(key);\n \t\t}\n \t}\n }\n int index = ans.length-1;\n while(!queue.isEmpty() && index>=0){\n \tString key = queue.poll();\n \tint value = map.get(key);\n \tans[index][0] = key;\n \tans[index][1] = value;\n \tindex--;\n \t\n }\n\t\t\n\t\treturn ans;\n\t}", "private void getWordCounts() {\n Map<String, List<String>> uniqueWordsInClass = new HashMap<>();\n List<String> uniqueWords = new ArrayList<>();\n\n for (ClassificationClass classificationClass : classificationClasses) {\n uniqueWordsInClass.put(classificationClass.getName(), new ArrayList<>());\n }\n\n for (Document document : documents) {\n String[] terms = document.getContent().split(\" \");\n\n for (String term : terms) {\n if (term.isEmpty()) {\n continue;\n }\n if (!uniqueWords.contains(term)) {\n uniqueWords.add(term);\n }\n\n for (ClassificationClass docClass : document.getClassificationClasses()) {\n if (!uniqueWordsInClass.get(docClass.getName()).contains(term)) {\n uniqueWordsInClass.get(docClass.getName()).add(term);\n }\n if (totalWordsInClass.containsKey(docClass.getName())) {\n this.totalWordsInClass.put(docClass.getName(), this.totalWordsInClass.get(docClass.getName()) + document.getFeatures().get(term));\n } else {\n this.totalWordsInClass.put(docClass.getName(), document.getFeatures().get(term));\n }\n }\n }\n }\n\n this.totalUniqueWords = uniqueWords.size();\n }", "public int getWordCount() {\n\t\treturn 10;\n\t}", "public List<String> topKFrequent(String[] words, int k) {\n HashMap<String, Integer> map = new HashMap<String, Integer>();\n\n for (String s : words) {\n map.put(s, map.getOrDefault(s, 0) + 1);\n }\n \n ArrayList<Integer> allFrequencies = new ArrayList<Integer>();\n\n \n map.forEach((key,v) -> allFrequencies.add(v));\n IO.printArrayList(allFrequencies);\n // Add all the frequencies into allFrequencies arraylist\n int totalAmountOfWords = map.keySet().size();\n \n // Find the k th largest number in the allFrequencies arraylist\n //System.out.println(\"total: \"+totalAmountOfWords);\n int newK = totalAmountOfWords - k;\n //System.out.println(\"newk: \"+ newK);\n int newkth = findKth(allFrequencies, newK);\n //System.out.println(\"new kth element:\"+newkth);\n int newKthElement = newK > 0 ? newkth : 0 ;\n \n TreeMap<Integer, TreeSet<String>> reverseSortedMap = new TreeMap<Integer, TreeSet<String>>(Collections.reverseOrder());\n map.forEach((key,v) -> {if (v >= newKthElement ) {\n if(!reverseSortedMap.containsKey(v)) reverseSortedMap.put(v, new TreeSet<String>());\n reverseSortedMap.get(v).add(key);}});\n \n List<String> result = new ArrayList<String>();\n reverseSortedMap.forEach((key,v) -> {result.addAll(v);});\n \n return result.size() > k? result.subList(0, k): result;\n }", "private Set<String> get5000MostPopularWords(Predicate<String> stringFilter) throws FileNotFoundException {\n InputStream wordIS = this.getClass().getResourceAsStream(\"5000-MostPopularEnglishWords.txt\"); // not the best file since it has dups and words that are one and two characters\n BufferedReader reader = new BufferedReader(new InputStreamReader(wordIS));\n\n return reader.lines()\n .filter(stringFilter)\n .collect(Collectors.toSet());\n }", "public Set<String> getNLeastDistant(String word, int n) {\n\t\tthis.currentWord = word;\n\t\tSet<String> chosenCandidates = new HashSet<String>();\n\t\tPriorityQueue<String> candidates = new PriorityQueue<String>(dict.size(), new getNLeastDistantComparator());\n\t\tfor (String term : dict.keySet()) {\n\t\t\tcandidates.add(term);\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tchosenCandidates.add(candidates.poll());\n\t\t}\n\t\treturn chosenCandidates;\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n public List<Map<String, Double>> getTopWords(Company company) {\n List<Map<String, Double>> topWords = new ArrayList<Map<String, Double>>();\n Map<String, Double> termToTfIdf = new TreeMap<String, Double>();\n Map<String, Integer> tokenMap = tfIdf.get(company.getStockSymbol());\n for (String token : tokenMap.keySet()) {\n double tfIdf = 0;\n double termFrequency = tokenMap.get(token);\n double documentFrequency = calculateDocumentFrequency(token);\n tfIdf = termFrequency / documentFrequency;\n termToTfIdf.put(token, tfIdf);\n }\n List<Entry<String, Double>> entrySet = new ArrayList<Entry<String, Double>>();\n entrySet.addAll(termToTfIdf.entrySet());\n Collections.sort(entrySet, new Comparator() {\n\n @Override\n public int compare(Object o1, Object o2) {\n return ((Entry<String, Double>) o1).getValue().compareTo(\n ((Entry<String, Double>) o2).getValue());\n }\n\n });\n if (entrySet.size() < NO_OF_TOP_WORDS) {\n for (int i = 0; i < entrySet.size(); i++) {\n Map<String, Double> tempMap = new HashMap<String, Double>();\n tempMap.put(entrySet.get(i).getKey(), entrySet.get(i).getValue());\n topWords.add(tempMap);\n }\n } else {\n for (int i = entrySet.size() - NO_OF_TOP_WORDS; i < entrySet.size(); i++) {\n Map<String, Double> tempMap = new HashMap<String, Double>();\n tempMap.put(entrySet.get(i).getKey(), entrySet.get(i).getValue());\n topWords.add(tempMap);\n }\n }\n return topWords;\n }", "void collectLeastFrequent(FrequencyTable fq);", "public static List<String> topKFrequent_pq(String[] words, int k) {\n Map<String, Integer> countMap = new HashMap<>();\n for (String word : words) {\n countMap.put(word, countMap.getOrDefault(word, 0) + 1);\n }\n\n PriorityQueue<String> pq = new PriorityQueue<String>((word1, word2) -> {\n if (countMap.get(word1) == countMap.get(word2)) {\n return word2.compareTo(word1);\n }\n return countMap.get(word1) - countMap.get(word2);\n });\n\n for (String word : countMap.keySet()) {\n pq.offer(word);\n if (pq.size() > k) {\n pq.poll();\n }\n }\n\n List<String> ans = new ArrayList<>();\n while (!pq.isEmpty()) {\n ans.add(pq.poll());\n }\n Collections.reverse(ans);\n return ans;\n }", "public interface IWordFrequency {\n\n\t/**\n\t * \n\t * @param input\n\t * text string to process\n\t * @param wordNumber\n\t * max number of word in the returned list\n\t * @return for a given non null or empty input text, returns the list of\n\t * words ordered by word frequency, the most frequently occurring\n\t * word first, null otherwise.\n\t * \n\t */\n\tList<String> getWordFrequency(String input, int wordNumber);\n\n}", "public static List<String> topKFrequent_pq_opt(String[] words, int k) {\n Map<String, Integer> countMap = new HashMap<>();\n for (String word : words) {\n countMap.put(word, countMap.getOrDefault(word, 0) + 1);\n }\n\n PriorityQueue<String> pq = new PriorityQueue<String>((word1, word2) -> {\n if (countMap.get(word1).equals(countMap.get(word2))) {\n return word1.compareTo(word2);\n }\n return countMap.get(word2) - countMap.get(word1);\n });\n\n for (String word : countMap.keySet()) {\n pq.offer(word);\n }\n\n List<String> ans = new ArrayList<>();\n for (int i = 0; i < k; i++) {\n ans.add(pq.poll());\n }\n\n return ans;\n }", "public Pair[] top10Words(){\n Pair[] top10Words = new Pair[10];\n int top10LeastOccurrence = 9;\n\n for (String word : matchedSongs.keySet()){\n int currentSize = matchedSongs.get(word).size();\n //Array is sorted from greatest to least, just need to compare last value to current value.\n //Sorting after insertion will ensure it is in order for next time we perform a compare.\n if (top10Words[top10LeastOccurrence] == null || (int) top10Words[top10LeastOccurrence].getValue() < currentSize){\n top10Words[top10LeastOccurrence] = new Pair(word, currentSize);\n Arrays.sort(top10Words, new SortByHighestPair());\n }\n }\n return top10Words;\n }", "public Integer eliminateWordByFreq(Integer frequency) {\r\n\r\n\t\tInteger eliminateCount = 0;\r\n\r\n\t\tfor (String word : vocabulary.keySet().toArray(\r\n\t\t\t\tnew String[vocabulary.keySet().size()])) {\r\n\t\t\tif (vocabulary.get(word) < frequency) {\r\n\t\t\t\tvocabulary.remove(word);\r\n\t\t\t\tspamVocab.remove(word);\r\n\t\t\t\tnotSpamVocab.remove(word);\r\n\t\t\t\teliminateCount++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn eliminateCount;\r\n\t}", "int getNumFrequents() {\n return numFrequents;\n }", "public String mostCommonWord(String[] tweets) {\n int big = -100000;\n String mostCommon = null;\n for (String tweet : tweets) {// = for(int i = 0 ; i<tweets.length;i++) { String tweet = tweets[i] }\n for (String word : tweet.split(\" \")) {\n int amt = 0;\n for (String tweet2 : tweets)\n for (String word2 : tweet2.split(\" \"))\n if (word2.equals(word))\n amt++;\n if (amt > big) {\n big = amt;\n mostCommon = word;\n }\n }\n }\n return mostCommon;\n}", "private static void printMostFrequentHashTags(){\n\t\t\n\t\tMap<String, Integer> hashtags = getHashTags();\n\t\tString max_count_hashtag[] = new String[3];\t//stores top 3 most frequent hashtags\n\t\tint max_counts[] = new int[3];\t//stores their count\n\t\t\n\t\tfor(String hashtag : hashtags.keySet()){\n\t\t\tint count = hashtags.get(hashtag);\n\t\t\tint index = getMinIndex(max_counts);\n\t\t\tif(count > max_counts[index]){\n\t\t\t\tmax_counts[index] = count;\n\t\t\t\tmax_count_hashtag[index] = hashtag;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* printing top 3 most freqent hashtags */\n\t\tSystem.out.println(\"top 3 most frequently used hashtags : \");\n\t\tfor(int i=0; i<3; i++){\n\t\t\tSystem.out.println(\"Hashtag : #\" + max_count_hashtag[i] + \" is used \"+ max_counts[i] + \" times.\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t}", "public abstract String[][] getTopWords();", "public static List<String> topKFrequent_hashmap_opt(String[] words, int k) {\n List<String> ans = new ArrayList<>();\n Map<String, Integer> freqMap = new HashMap<>();\n for (String word : words) {\n freqMap.put(word, freqMap.getOrDefault(word, 0) + 1);\n }\n\n ans.addAll(freqMap.keySet());\n\n Collections.sort(ans, (o1, o2) -> {\n if (freqMap.get(o1) == freqMap.get(o2)) {\n return o1.compareTo(o2);\n }\n\n return freqMap.get(o2) - freqMap.get(o1);\n });\n\n return ans.subList(0, k);\n }", "private static List<String> computeTwoGramFrequencies(List<String> words, int top_no, List<String> stopwordslist) {\n\t\t\t\n\t\tMap<String, Integer> tempstopmap= new HashMap<String, Integer>();\n\t\tfor (int i=0; i<stopwordslist.size(); i++){\n\t\t\tString tempword = stopwordslist.get(i);\n\t\t\ttempstopmap.put(tempword, 1);\n\t\t}//construct temp stopwordmap\n\t\t\n\t\tint i=0;\n\t\tMap<String, Integer> tempmap= new HashMap<String, Integer>();\n\t\twhile(i<words.size()){\n\t\t\tString temptwogram=\"\";\n\t\t\tString tempword1=\" \";\n\t\t\tString tempword2=\" \";\n\t\t\twhile(true){\n\t\t\t\tif(i>=words.size()-1)\n\t\t\t\t\tbreak;\n\t\t\t\ttempword1=words.get(i);\n\t\t\t\tif(!tempstopmap.containsKey(tempword1))\n\t\t\t\t\tbreak;\n\t\t\t\ti++;\n\t\t\t\ttempword1=\" \";\n\t\t\t}\n\t\t\ti++;\n\t\t\tSystem.out.println(\"b\"+i);\n\t\t\twhile(true){\n\t\t\t\tif(i>=words.size())\n\t\t\t\t\tbreak;\n\t\t\t\ttempword2=words.get(i);\n\t\t\t\tif(!tempstopmap.containsKey(tempword2))\n\t\t\t\t\tbreak;\n\t\t\t\ti++;\n\t\t\t\ttempword2=\" \";\n\t\t\t}//jump for the case that word + stopword +word\n\t\t\t\n\t\t\ttemptwogram = tempword1+\" \"+tempword2; //2-gram\n\t\t\tif (tempmap.containsKey(temptwogram))\n\t\t\t\ttempmap.put(temptwogram, tempmap.get(temptwogram)+1);\n\t\t\telse\n\t\t\t\ttempmap.put(temptwogram, 1);\n\t\t}//construct hashmap to count 2-gram words (key(word), value(frequency))\n\t\tList<Map.Entry<String, Integer>> templist = new ArrayList<Map.Entry<String, Integer>>();\n\t\tfor(Map.Entry<String, Integer> entry: tempmap.entrySet()){\n\t\t\t\n\t\t\t\n\t\t\ttemplist.add(entry);\n\t\t}//construct templist with entry containing word/frequency in map\n\t\t\n\t\tCollections.sort(templist, Collections.reverseOrder(new comparatorByFrequencyReverse()));//sort templist in decresing order\n\n\t\t /*change the templist into sortedlist*/\n\t\tList<String> sortedlist = new ArrayList<String> ();\n\t\tif(templist.size()>=top_no){\n\t\t\tfor (int j=0; j<top_no;j++){\n\t\t\t\tString word = templist.get(j).getKey();\n\t\t\t\tsortedlist.add(word);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tfor (int j=0; j<templist.size();j++){\n\t\t\t\tString word = templist.get(j).getKey();\n\t\t\t\tsortedlist.add(word);\n\t\t\t}\n\t\t}\n\t\treturn sortedlist;\n\t}", "default List<String> interestingConcepts(int topK, UnitLocation located,\n Set<Location> irrelevantSet){\n // collect frequent words outside the blacklist of locations\n final TokenIterator extractor = new TokenIterator(irrelevantSet);\n located.getUnitNode().accept(extractor);\n\n final WordCounter wordCounter = new WordCounter(extractor.getItems());\n\n return wordCounter.mostFrequent(topK);\n }", "public Map<String, Integer> findUnicalWord(ArrayList<Word> text)\n {\n String[] words=new String[text.size()];\n for(int i=0; i<text.size(); i++){\n words[i]=text.get(i).toString();\n }\n HashMap<String, Integer> myWordsCount = new HashMap<>();\n for (String s : words){\n if (myWordsCount.containsKey(s)) myWordsCount.replace(s, myWordsCount.get(s) + 1);\n else myWordsCount.put(s, 1);\n }\n\n Map<String, Integer> newWordsCount = myWordsCount\n .entrySet()\n .stream()\n .sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))\n .collect(\n toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2,\n LinkedHashMap::new));\n\n return newWordsCount;\n\n }", "public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }", "public static List<String> topKFrequent_hashmap(String[] words, int k) {\n List<String> ans = new ArrayList<>();\n if (words == null || words.length == 0 || k <= 0) {\n return ans;\n }\n\n Map<String, Integer> freqMap = new HashMap<>();\n for (String word : words) {\n freqMap.put(word, freqMap.getOrDefault(word, 0) + 1);\n }\n\n List<Map.Entry<String, Integer>> list = new ArrayList<Map.Entry<String, Integer>>(freqMap.entrySet());\n list.sort((o1, o2) -> {\n if (o1.getValue().equals(o2.getValue())) {\n return o1.getKey().compareTo(o2.getKey());\n }\n\n return o2.getValue() - o1.getValue();\n });\n\n for (Map.Entry<String, Integer> entry : list) {\n ans.add(entry.getKey());\n k--;\n if (k <= 0) {\n return ans;\n }\n }\n\n return ans;\n }", "public static List<Integer> findWordConcatenation(String str, String[] words) {\n List<Integer> resultIndices = new ArrayList<Integer>();\n if (str == null || str.isEmpty() || words == null || words.length == 0)\n return resultIndices;\n\n int len = words[0].length();\n Map<String, Integer> freqMap = new HashMap();\n\n for (String word : words)\n freqMap.put(word, freqMap.getOrDefault(word, 0) + 1);\n\n Map<String, Integer> curMap = new HashMap();\n int l = 0, cc = 0;\n int i = 0;\n while (i < str.length() - len + 1) {\n String cur = str.substring(i, i + len);\n if (!freqMap.containsKey(cur)) {\n curMap.clear();\n ++i; l = i;\n continue;\n }\n\n curMap.put(cur, curMap.getOrDefault(cur, 0) + 1);\n if (curMap.get(cur) == freqMap.get(cur))\n cc++;\n\n while(curMap.get(cur) > freqMap.get(cur)) {\n String word1 = str.substring(l, l + len);\n curMap.put(word1, curMap.get(word1) - 1);\n if (curMap.get(word1) < freqMap.get(word1))\n --cc;\n l+=len;\n }\n\n if (cc == freqMap.size())\n resultIndices.add(l);\n i+=len;\n }\n return resultIndices;\n }", "public static List<Integer> findSubstringWordConcatenation(String str, String[] words) {\n assert str != null;\n assert words != null;\n List<String> wordList = new ArrayList<>();\n List<Integer> wordIndex = new ArrayList<>();\n int noOfWords = words.length, wordLength = words[0].length();\n Map<String,Integer> wordFrequencyMap = new HashMap<>();\n for(String word: words) {\n wordFrequencyMap.put(word,wordFrequencyMap.getOrDefault(word,0)+1);\n }\n\n for(int windowStart=0; windowStart <= (str.length() - (wordLength * noOfWords)); windowStart++) {\n HashMap<String, Integer> wordsSeen = new HashMap<>();\n /*now look for words*/\n for(int wrd=0; wrd<noOfWords; wrd++) {\n int wordStartIndex = windowStart + (wrd * wordLength);\n String word = str.substring(wordStartIndex, wordStartIndex+wordLength);\n if(wordFrequencyMap.containsKey(word)) {\n wordsSeen.put(word, wordsSeen.getOrDefault(word,0)+1);\n } else {\n break;// break for loop\n }\n if(wordsSeen.get(word) > wordFrequencyMap.getOrDefault(word,0)) {\n break;// frequency is more then required\n }\n if(wordsSeen.size() == wordFrequencyMap.size()) {\n wordList.add(str.substring(windowStart, wordStartIndex+wordLength));\n wordIndex.add(windowStart);\n }\n }\n }\n return wordIndex;\n }", "public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }", "private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}", "public String most(String[] sentences) {\n\t\tString words = \"\";\n\t\tfor(int i = 0; i < sentences.length; i++){\n\t\t\twords = words + \" \" + sentences[i];\n\t\t}\n\t\twords = words.toLowerCase();\n\t\tString[] new_words = words.split(\" \"); \n\t\t\n\t\tMap<String, Integer> counting = new TreeMap<String, Integer>();\n\t\tfor(int i = 0; i < new_words.length; i++){\n\t\t\tif(counting.containsKey(new_words[i])){\n\t\t\t\tcounting.put(new_words[i], counting.get(new_words[i]) + 1);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcounting.put(new_words[i], 1);\n\t\t\t}\n\t\t}\n\t\tint max = 0; \n\t\tString max_word = \"\";\n\t\tfor(String s: counting.keySet()){\n\t\t\tif(counting.get(s) > max){\n\t\t\t\tmax = counting.get(s);\n\t\t\t\tmax_word = s;\n\t\t\t}\n\t\t}\n\t\treturn max_word;\n }", "public static String getMostFrequentToy() {\n\t\tString name = \"\";\n\t\tint max = 0;\n\t\tfor (int i = 0; i < toyList.size(); i++) {\n\t\t\tif (max < toyList.get(i).getCount()) {\n\t\t\t\tmax = toyList.get(i).getCount();\n\t\t\t\tname = toyList.get(i).getName();\n\t\t\t}\n\t\t}\n\t\treturn name;\n\t}", "static int numCommonWords (int m, int n)\n {\n\tint numCommon = 0;\n\tfor (int j=0; j<M; j++) {\n\t if ((data[j][m] > 0) && (data[j][n] > 0)) {\n\t\tnumCommon ++;\n\t }\n\t}\n\treturn numCommon;\n }", "public static String[] rechercheBigrammePlusFrequent(String text) {\n\t\tint n = text.length();\n\t\tArrayList<String> bigrammes = new ArrayList<String>();\n\t\tString[] bigrammesPlusFrequentsCorrespond = new String[5]; // resultat\n\t\tArrayList<String> bigrammesChiffréPlusFrequents = new ArrayList<String>();\n\t\tArrayList<Integer> nbrBigrammesPlusFrequents = new ArrayList<Integer>();\n\n\t\tfor (int i = 1; i < n - 1; i++) {\n\t\t\tString bigramme = text.substring(i, i + 2);\n\t\t\tbigrammes.add(bigramme);\n\t\t}\n\t\tfor (int j = 0; j < bigrammes.size(); j++) {\n\t\t\tint inter = 1;\n\t\t\tString bi = bigrammes.get(j);\n\t\t\tif ((!bigrammesChiffréPlusFrequents.contains(bi))) {\n\t\t\t\tfor (int k = j + 1; k < bigrammes.size(); k++) {\n\t\t\t\t\tif (bi.equals(bigrammes.get(k))) {\n\t\t\t\t\t\tinter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbigrammesChiffréPlusFrequents.add(bi);\n\t\t\t\tnbrBigrammesPlusFrequents.add(inter);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tint max = 1, id = 0;\n\t\t\tfor (int j = 0; j < bigrammesChiffréPlusFrequents.size(); j++) {\n\t\t\t\tif (nbrBigrammesPlusFrequents.get(j) >= max) {\n\t\t\t\t\tmax = nbrBigrammesPlusFrequents.get(j);\n\t\t\t\t\tid = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbigrammesPlusFrequentsCorrespond[i] = bigrammesChiffréPlusFrequents\n\t\t\t\t\t.get(id);\n\t\t\tnbrBigrammesPlusFrequents.set(id, 0);\n\t\t}\n\t\t// System.out.println(\"liste des bigrammes les plus fréquents\");\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t// System.out.println(bigrammesPlusFrequentsCorrespond[i]);\n\t\t}\n\t\treturn bigrammesPlusFrequentsCorrespond;\n\t}", "private static void MostFrequentTwoGram() throws Exception{\n\t\tFile file=new File(filenameforpages);\n\t\tList<String> words = Utilities.tokenizeFile(file);\n\t\t\n\t\tList<String> stopwordslist = Utilities.tokenizeFile(new File(filenameforstopwords));\n\t\tList<String> mostfrequenttwogramlist =computeTwoGramFrequencies(words, top_number , stopwordslist);\n\t\tWriteMostFrequentTwoGramsToFile(mostfrequenttwogramlist);\n\t}", "Iterator<List<VocabWord>> miniBatches();", "@Override\n public int getNumberOfWords() {\n return 0;\n }", "public void apply(GlobalWindow window, Iterable<String> values, \n Collector<Tuple2<String,Integer>> out) throws Exception {\n \t HashMap <String,Integer> countWord = new HashMap<String,Integer>();\n \n for (String value : values) {\n \t \n \t String[] tokens = value.toLowerCase().split(\"\\\\W+\");\n \t for (String token : tokens)\n \t {\t if (token.length() >0) {\n \t\t if (countWord.get(token) != null)\n { countWord.put(token, countWord.get(token)+1);}\n else\n {countWord.put(token, 1);}\n \t }\n \t\t \n \t }\n }\n \n \n //Comparator to sort in reverse\n \t\t\tComparator<String> comparator = new Comparator<String>() {\n \t\t\t public int compare(String o1, String o2) {\n \t\t\t return countWord.get(o1).compareTo(countWord.get(o2));\n \t\t\t }\n \t\t\t};\n\n \t\t\tArrayList<String> words = new ArrayList<String>();\n \t\t\twords.addAll(countWord.keySet());\n\n \t\t\tCollections.sort(words,comparator);\n \t\t\tCollections.reverse(words);\n \t\t\t\n// System.out.println(Arrays.asList(words));\n \t\t\tSystem.out.println(\"10 most frequent words per stream\");\n System.out.println(\"-----------\");\n \n for(int i = 0; i < 10; i++) {\n \tSystem.out.println(words.get(i) + \" : \" + countWord.get(words.get(i)));\n }\n \n \n System.out.println(\"\\n\");\n \n }", "private static String mostCommonWord(String paragraph, String[] banned) {\n\t String [] words =paragraph.replaceAll(\"[^a-zA-Z\\\\s+]\", \" \").toLowerCase().split(\"\\\\s+\");\r\n\t \r\n\t Set<String> bannedSet = new HashSet<String>();\r\n\t HashMap<String,Integer> map = new HashMap<String,Integer>();\r\n\t \r\n\t for (String string : banned) {\r\n\t \tbannedSet.add(string);\r\n\t }\r\n\t \r\n\t \r\n\t for (String string : words) {\r\n\t\t\t\r\n\t \tif(!bannedSet.contains(string)) {\r\n\t \t\tmap.put(string, map.getOrDefault(string, 0)+1);\r\n\t \t}\r\n\t \t \r\n\t\t}\r\n\t\t \r\n\t List list = new LinkedList(map.entrySet());\r\n\t\t// Defined Custom Comparator here\r\n\t\tCollections.sort(list, new Comparator() {\r\n\t\t\tpublic int compare(Object o1, Object o2) {\r\n\t\t\t\treturn ((Comparable) ((Map.Entry) (o2)).getValue()).compareTo(((Map.Entry) (o1)).getValue());\r\n\t\t\t}\r\n\t\t});\r\n\t \r\n\t\t//System.out.println(map);\r\n\t\t//System.out.println(list);\r\n\t\t\r\n\t\t return (String) ((Map.Entry) list.get(0)).getKey();\t\t\r\n\t}", "private Double getSentenceTfIdf(String sentence, Article article) {\n Double sentenceTfIdf = 0.0;\n PriorityQueue<Double> topFiveWords = new PriorityQueue<>(Collections.reverseOrder());\n Set<String> alreadyConsideredWords = new HashSet<>();\n\n // Split the words in a sentence\n String[] sentenceTerms = sentence.split(\"\\\\s+\");\n\n for (String term: sentenceTerms) {\n // format the raw term to remove non-alphanumeric characters\n term = term.replaceAll(\"[^a-zA-Z\\\\d]\", \"\").toLowerCase().trim();\n\n if (!term.isEmpty()) {\n // lookup term in unigrams map to get its TF.IDF score\n Unigram correspondingUnigram = article.unigrams.get(term);\n\n if (correspondingUnigram != null && !alreadyConsideredWords.contains(term)) {\n topFiveWords.add(correspondingUnigram.getTf_idf());\n alreadyConsideredWords.add(term);\n }\n }\n }\n\n int limit = Math.min(5, topFiveWords.size());\n for (int i = 0; i < limit; i++) {\n sentenceTfIdf += topFiveWords.poll();\n }\n\n return sentenceTfIdf;\n }", "int totalWords();", "private double countWordFrequencyScore(Page page, String[] queryWords) {\n double score = 0;\n for (String word : queryWords) {\n int wordId = this.pb.getIdForWord(word);\n for (double pageWordId : page.getWords()) {\n if (wordId == pageWordId) score++;\n }\n }\n\n return score;\n }", "public int getNumWords() {\n // TODO: count the number of distinct words,\n // ie. the number of non-null counter objects.\n int count = 0;\n for (int i = 0; i < counters.length; i++){\n if (counters[i] != null) {\n count++;\n }\n }\n return count;\n }", "List<WordCount> moviesReviewWordsCount(final int topK) {\n // get the review, split by \" \" , map to pair with 1, reduce by key to count\n // then map to WordCount CLASS the has it's own comparator and get the topK (validity checked) - (collect)\n JavaRDD<WordCount> wordCounts = movieReviews\n .map(MovieReview::getReview)\n .flatMap(s-> Arrays.asList(s.split(\" \")))\n .mapToPair(s->new Tuple2<>(s, 1))\n .reduceByKey((a, b)-> a + b)\n .map(s->new WordCount(s._1(), s._2()));\n return wordCounts.top(getRealTopK(topK, wordCounts.count()));\n }", "public static LinkedList<Word> getPracticedWords() {\n return favWords;\n }", "private int numEnglishWords(String str) {\n int numWords = 0;\n String[] strings = str.split(\" \");\n for (String word : strings) {\n if (english.contains(word)) {\n numWords ++;\n }\n }\n return numWords;\n }", "@Override\n public int getNumberOfWords(int count) {\n return restOfSentence.getNumberOfWords(count + 1);\n }", "public int getWordLength();", "public int minWordBreak(String s, Set<String> dict) {\n Map<String, List<String>> map = new HashMap<String, List<String>>();\n List<String> possibles = wordBreakHelper(s,dict,map);\n int minCut = s.length();\n for (String possible: possibles) {\n int cut = possible.split(\" \").length;\n if (minCut > cut)\n minCut = cut;\n }\n return minCut;\n}", "long getEmbeddingTokenHigh();", "long getEmbeddingTokenHigh();", "public int expressiveWords(String S, String[] words) {\n if (S == null || S.length() == 0) return 0;\n RLE base = new RLE(S);\n int ans = 0;\n for (String w : words) {\n RLE current = new RLE(w);\n if (base.chars.size() != current.chars.size()) continue;\n boolean canExtend = true;\n for (int i = 0; i < base.chars.size(); i++) {\n if (base.chars.get(i) != current.chars.get(i)) {\n canExtend = false;\n break;\n }\n int bc = base.counts.get(i);\n int cc = current.counts.get(i);\n //base count <= 2 , or base count > 2\n if ((bc <= 2 && bc != cc) || (bc > 2 && cc > bc)) {\n canExtend = false;\n break;\n }\n }\n if (canExtend) ans++;\n }\n return ans;\n }", "public AllWordsCounter() {\n counters = new SingleWordCounter[MAX_WORDS];\n // TODO: initialize instance variable to hold MAX_WORDS objects\n\n }", "public int getNumWords() {\n return wordMap.get(\"TOTAL_WORDS\").intValue();\n }", "public String showSearchFrequency(WordCount wordCount, String order) {\n TreeMap<Integer, TreeMap<String, Word>> wordCountMap = wordCount.getWordCount(); //get map ordered by word count\n String returnedString = \"You have searched for these words \";\n if (order.equals(\n \"asc\") || order.equals(\"\")) { //list in ascending displayOrder\n returnedString += \"least:\\n\";\n for (Map.Entry<Integer, TreeMap<String, Word>> entry : wordCountMap.entrySet()) {\n returnedString += entry.getKey() + \" searches -\\n\";\n for (Map.Entry<String, Word> word : entry.getValue().entrySet()) {\n returnedString += word.getKey() + \"\\n\";\n }\n }\n } else { //list in descending displayOrder\n returnedString += \"most:\\n\";\n for (Integer searchCount : wordCountMap.descendingKeySet()) {\n returnedString += searchCount + \" searches -\\n\";\n for (Map.Entry<String, Word> word : wordCountMap.get(searchCount).entrySet()) {\n returnedString += word.getKey() + \"\\n\";\n }\n }\n }\n return returnedString;\n }", "public int countOfKnownWord() {\n\t\tint count = 0;\t\t\n\t\ttry {\n \t\t\tClass.forName(DRIVER);\n \t\t} catch (ClassNotFoundException e1) {\n \t\t\t// TODO Auto-generated catch block\n \t\t\te1.printStackTrace();\n \t\t}\t\t\n\t\ttry ( Connection con = DriverManager.getConnection(URL, USER, PW)) {\n\t\t\tStatement stmt = con.createStatement();\n\t\t\tString sql;\n\t\t\tsql = \"SELECT count(*) countWordLevel from \" + tbl_USER_DIC + \" WHERE \" + Constants.FLD_KNOW + \" = \" + Constants.WORD_KNOWN + \";\";\n\t\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t\twhile (rs.next()) {\n\t\t\t\tcount = rs.getInt(\"countWordLevel\");\n\t\t\t}\n\t\t\t\n\t stmt.close();\n\t con.close();\n\t\t} catch(Exception e) {\n\t\t\tlogger.info(\"fail to open mysql\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn count;\t\n\t}", "WordCounter(){\r\n }", "public String[] topKFrequent(String[] combo, int k) {\n\t if (combo.length == 0) {\n\t return new String[0];\n\t }\n\t // get all the distinct strings at keys and their frequencies as values.\n\t Map<String, Integer> freqMap = getFreqMap(combo);\n\t // NOTICE: using map.Entry as the element type directly so that all the \n\t // operations are mostly efficient.\n//\t Comparator<Map.Entry<String, Integer>> comp = new Comparator<Map.Entry<String, Integer>>() {\n//\t @Override\n//\t public int compare(Map.Entry<String, Integer> e1, Map.Entry<String, Integer> e2) {\n//\t return e1.getValue().compareTo(e2.getValue());\n//\t }\n//\t };\n\t PriorityQueue<Map.Entry<String, Integer>> minHeap = \n\t new PriorityQueue<>(k, new Comparator<Map.Entry<String, Integer>>() {\n\t\t @Override\n\t\t public int compare(Map.Entry<String, Integer> e1, Map.Entry<String, Integer> e2) {\n\t\t return e1.getValue().compareTo(e2.getValue());\n\t\t }\n\t\t });\n\t for (Map.Entry<String, Integer> entry : freqMap.entrySet()) {\n\t \tif (minHeap.size() < k) {\n\t \t\tminHeap.offer(entry);\n\t \t} else if (entry.getValue() > minHeap.peek().getValue()){\n\t \t\tminHeap.poll();\n\t \t\tminHeap.offer(entry);\n\t \t}\n\t }\n\t // since the returned array requires the strings sorted by their frequencies,\n\t // use a separate helper method to do this operation.\n\t return freqArray(minHeap);\n\t}", "public HashMap<String, Integer> getOrder(){\n\t\t\n\t\tHashMap<String, Integer> hm2 = getHashMap();\n\t\n\t\tArrayList fq = new ArrayList<>();\n\t\t\n\t\tHashMap<String, Integer> top10 = new HashMap<String, Integer>();\n\t\t\n\t\tfor(String key : hm2.keySet()){\n\t\t\t\n\t\t\tfq.add(hm2.get(key));\n\t\t}\n\t\t// use Collection to get the order of frequency\n\t\tCollections.sort(fq);\n \tCollections.reverse(fq);\n \t\n \tfor(int i = 0; i<11; i++){\n \t\t\n \t\tfor(String key : hm2.keySet()){\n \t\t// make sure the word not equals to balck space\n \t\tif(hm2.get(key) == fq.get(i) && !key.equals(\"\") ){\n \t\t\t\n \t\t top10.put(key, hm2.get(key));\n \t\t\t\t\n \t\t}\n \t}\t\n\t}\n\t\treturn top10;\n\t}", "public Set<String> getWords() {\n return wordsOccurrences.keySet();\n }", "public int[] numSmallerByFrequency(String[] queries, String[] words) {\n\t\tint[] res = new int[queries.length];\n\n\t\tint[] cnts = new int[words.length];\n\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\tcnts[i] = smallestFrequency(words[i]);\n\t\t}\n\t\tArrays.sort(cnts);\n\n\t\tfor (int i = 0; i < queries.length; i++) {\n\t\t\tint cur = smallestFrequency(queries[i]);\n\t\t\tres[i] = binary(cnts, cur);\n\t\t}\n\n\t\treturn res;\n\t}", "public String solve1(String s) {\n Map<String, Integer> frequency = new HashMap<>();\n String maxWord = null;\n String[] split = s.split(\" \");\n\n for (String word : split) {\n int newFrequency = frequency.getOrDefault(word, 0) + 1;\n frequency.put(word, newFrequency);\n if (newFrequency > frequency.getOrDefault(maxWord, 0)) {\n maxWord = word;\n }\n }\n\n return maxWord;\n }", "public int distinctCount(){\r\n int distinct = 0;\r\n //Loop through each key in words\r\n for(String key: words.keySet()){\r\n //If they appear in the file\r\n if(words.get(key) != 0){\r\n //count it\r\n distinct++;\r\n }\r\n }\r\n return distinct;\r\n\t}", "private static int searchStandardDictionary(String word) {\n if (word.length() < 4) {\n return Arrays.binarySearch(STANDARD_DICTIONARY, 0, FOUR_LETTER_WORDS_OFFSET, word.toUpperCase(Locale.ENGLISH));\n } else {\n return Arrays.binarySearch(STANDARD_DICTIONARY, FOUR_LETTER_WORDS_OFFSET, STANDARD_DICTIONARY.length, word.toUpperCase(Locale.ENGLISH));\n }\n }", "@Override\n public int getTermFrequency(String term) {\n return 0;\n }", "public List<ExplanationFeature> getTopNFeatures() {\n\t\tList<ExplanationFeature> ret = Lists.newArrayList(this.entries);\n\t\tCollections.sort(ret);\n\t\treturn ret;\n\t}", "public int getNumberOfConcatenatedWords() {\n return concatenatedWords.size();\n }", "private List<String> getFilteredWords() {\r\n\t\tArrayList<String> filteredWords = new ArrayList<String>(16);\r\n\t\t\r\n\t\tfor (String word : allWords) {\r\n\t\t\tif (matchesFilter(word) == true) {\r\n\t\t\t\tfilteredWords.add(word);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn filteredWords;\r\n\t}", "private static double[] calculateYuleK(Map<String, Double> wordFrequencies) \n\t{\n\t\t// m1 = number of different words in document (review)\n\t\tdouble m1 = wordFrequencies.keySet().size();\n\n\t\tMap<Double, Double> yuleMap = Utilities.reverseMap(wordFrequencies);\n\n\t\t// m2 = sum of products of each observed frequency squared and number of \n\t\t// words with that frequency\n\t\tdouble m2 = 0.0;\n\t\tdouble[] legomenas = new double[11];\n\t\tfor(Entry<Double,Double> e : yuleMap.entrySet()){\n\t\t\tDouble freq = e.getKey();\n\t\t\tDouble wordCount = e.getValue();\n\t\t\tm2 += freq*freq*wordCount;\n\t\t\tif (freq.intValue() < legomenas.length)\n\t\t\t\tlegomenas[freq.intValue()] = wordCount;\n\t\t}\n\t\tlegomenas[0] = 10000*(m2-m1)/(m1*m1); \n\t\treturn legomenas;\n\t}", "protected final static int numWords( final long size ) {\n\t\tif ( ASSERTS ) assert ( size + WORD_MASK ) >>> LOG2_BITS_PER_WORD <= Integer.MAX_VALUE;\n\t\treturn (int)( ( size + WORD_MASK ) >>> LOG2_BITS_PER_WORD );\n\t}", "public static void findDuplicateWords(String inputString)\r\n\t{\r\n\t\t// split the words in words array \r\n\t\tString words[]= inputString.split(\" \");\r\n\t\t\r\n\t\t//Create HashMap for count the words \r\n\t\tHashMap<String, Integer> wordcount = new HashMap<String, Integer>();\r\n\t\t\r\n\t\t// to check each word in given array \r\n\t\t\r\n\t\tfor(String word: words )\r\n\t\t{\r\n\t\t\t//if word is present \r\n\t\t\tif(wordcount.containsKey(word)) {\r\n\t\t\t\twordcount.put(word.toLowerCase(), wordcount.get(word)+1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twordcount.put(word,1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//extracting all the keys of map : wordcount\r\n\t\tSet<String> wordInString = wordcount.keySet();\r\n\t\t\r\n\t\t// iterate the loop through all the wors in wordCount \r\n\t\tfor(String word : wordInString)\r\n\t\t{\r\n\t\t\tif(wordcount.get(word)>1)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(word+ \" : \" + wordcount.get(word));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "abstract public int docFreq(Term t) throws IOException;", "public int count( String hotWord ){\r\n String x = hotWord.toLowerCase();\r\n //If the word is a hotword then get the count and return it\r\n if(words.containsKey(x)){\r\n return words.get(x);\r\n }\r\n //If not, then return -1\r\n else{\r\n return -1;\r\n }\r\n\t}", "private IDictionary<String, Double> computeTfScores(IList<String> words) {\n IDictionary<String, Double> tfScores = new ChainedHashDictionary<String, Double>();\n IDictionary<String, Double> wordCounts = new ChainedHashDictionary<String, Double>();\n \n // maps each given word to their frequency\n for (String word: words) {\n \t\tif (!wordCounts.containsKey(word)) {\n \t\t\twordCounts.put(word, 1.0);\n \t\t} else {\n \t\t\tDouble count = wordCounts.get(word);\n \t\t\twordCounts.put(word, count + 1.0);\n \t\t} \t\t\n }\n Double totalWords = (double) words.size();\n \n // Computes TF scores\n for (KVPair<String, Double> pair: wordCounts) {\n \t\ttfScores.put(pair.getKey(), pair.getValue() / totalWords);\n }\n return tfScores;\n }", "public int getTotalUniqueWords() {\n return totalUniqueWords;\n }", "private void countWords(String text, String ws) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8))));\n String line;\n\n // Get words and respective count\n while (true) {\n try {\n if ((line = reader.readLine()) == null)\n break;\n String[] words = line.split(\"[ ,;:.?!“”(){}\\\\[\\\\]<>']+\");\n for (String word : words) {\n word = word.toLowerCase();\n if (\"\".equals(word)) {\n continue;\n }\n if (lista.containsKey(word)){\n lista.get(word).add(ws);\n }else{\n HashSet<String> temp = new HashSet<>();\n temp.add(ws);\n lista.put(word, temp);\n }\n\n /*if (!countMap.containsKey(word)) {\n countMap.put(word, 1);\n }\n else {\n countMap.put(word, countMap.get(word) + 1);\n }*/\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n // Close reader\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Display words and counts\n /*for (String word : countMap.keySet()) {\n if (word.length() >= 3) { // Shall we ignore small words?\n //System.out.println(word + \"\\t\" + countMap.get(word));\n }\n }*/\n }", "int getFreq();", "public int numWordsCurrent() {\r\n return 0;\r\n }", "boolean hasFreq();", "public long getNumberOfWords() {\n return numberOfWords;\n }", "public static PriorityQueue<WordCount> sortWords(HashMap<String, Integer> counts){\n\t\tPriorityQueue<WordCount> words = new PriorityQueue<WordCount>(99999, new wordCountComparator());\n\t\tWordCount wc = null;\n\t\tfor(Map.Entry<String, Integer> entry : counts.entrySet()){\n\t\t\twc = new WordCount(entry.getKey(), entry.getValue());\n\t\t\twords.add(wc);\n\t\t}\n\t\treturn words;\n\t}", "public static int minLength(String[] words) {\n ArrayList<String> minimized = new ArrayList<>();\n int len = words[0].length() + 1;\n minimized.add(words[0]);\n\n for (int i = 1; i < words.length; i++) {\n for (int j = 0; j < minimized.size(); j++) {\n if (encoded(minimized.get(j), words[i])) {\n break;\n }\n if (encoded(words[i], minimized.get(j))) {\n len -= minimized.get(j).length();\n minimized.remove(j);\n\n len += words[i].length();\n minimized.add(words[i]);\n break;\n }\n\n if (j == minimized.size() - 1) {\n minimized.add(words[i]);\n len += (words[i].length() + 1);\n break;\n }\n }\n }\n\n return len;\n }", "public Set<String> getNBestUnderDistance(String word, int n, int distMax) {\n\t\tSet<String> oldWords = new HashSet<String>();\n\t\tSet<String> newWords = new HashSet<String>();\n\t\tPriorityQueue<String> candidates = new PriorityQueue<String>(11, new getNBestUnderDistanceComparator());\n\t\tSet<String> chosenCandidates = new HashSet<String>();\n\t\toldWords.add(word);\n\t\tfor (int i = 0; i < distMax; i++) {\n\t\t\tfor (String oldWord : oldWords) {\n\t\t\t\tnewWords.addAll(insertionHelper(oldWord));\n\t\t\t\tnewWords.addAll(deletionHelper(oldWord));\n\t\t\t\tnewWords.addAll(replacementHelper(oldWord));\n\t\t\t\tif (oldWord.length() > 1) {\n\t\t\t\t\tnewWords.addAll(transpositionHelper(oldWord));\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (String newWord : newWords) {\n\t\t\t\tif (dict.containsKey(newWord) && !candidates.contains(newWord)) {\n\t\t\t\t\tcandidates.add(newWord);\n\t\t\t\t}\n\t\t\t}\n\t\t\toldWords = newWords;\n\t\t\tnewWords = new HashSet<String>();\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (candidates.size() > 0 && candidates.peek() != null) {\n\t\t\t\tchosenCandidates.add(candidates.poll());\n\t\t\t}\n\t\t}\n\t\treturn chosenCandidates;\n\t}", "public void countWord() {\n\t\tiniStorage();\n\t\tWordTokenizer token = new WordTokenizer(\"models/jvnsensegmenter\",\n\t\t\t\t\"data\", true);\n\t\t// String example =\n\t\t// \"Nếu bạn đang tìm kiếm một chiếc điện thoại Android? Đây là, những smartphone đáng để bạn cân nhắc nhất. Thử linh tinh!\";\n\t\t// token.setString(example);\n\t\t// System.out.println(token.getString());\n\n\t\tSet<Map.Entry<String, String>> crawlData = getCrawlData().entrySet();\n\t\tIterator<Map.Entry<String, String>> i = crawlData.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tMap.Entry<String, String> pageContent = i.next();\n\t\t\tSystem.out.println(pageContent.getKey());\n\t\t\tPageData pageData = gson.fromJson(pageContent.getValue(),\n\t\t\t\t\tPageData.class);\n\t\t\ttoken.setString(pageData.getContent().toUpperCase());\n\t\t\tString wordSegment = token.getString();\n\t\t\tString[] listWord = wordSegment.split(\" \");\n\t\t\tfor (String word : listWord) {\n\t\t\t\taddToDictionary(word, 1);\n\t\t\t\tDate date;\n\t\t\t\ttry {\n\t\t\t\t\tdate = simpleDateFormat.parse(pageData.getTime().substring(\n\t\t\t\t\t\t\t0, 10));\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\taddToStatByDay(date, word, 1);\n\t\t\t}\n\t\t}\n\t}", "public int count(){\r\n\t\tint sum = 0;\r\n for(Integer value: words.values()){\r\n sum += value;\r\n }\r\n return sum;\r\n\t}", "public ArrayList<String> top5search(String kw1, String kw2) {\n\t\tkw1 = kw1.toLowerCase();\n kw2 = kw2.toLowerCase();\n ArrayList <String> outArr = new ArrayList <String> ();\n ArrayList <Occurrence> kw1Arr = null;\n ArrayList <Occurrence> kw2Arr = null;\n for(String e: keywordsIndex.keySet()) {\n if(e.equals(kw1) == true) {\n kw1Arr = keywordsIndex.get(e);}\n if(e.equals(kw2) == true) {\n kw2Arr = keywordsIndex.get(e);}}\n int kw1Point = 0;\n int kw2Point = 0;\n for(int inc = 0; inc < 5; inc++) {\n int kw1Value = 0;\n Occurrence kw1Occ = null;\n int kw2Value = 0;\n Occurrence kw2Occ = null;\n if(kw1Arr != null && kw1Point < kw1Arr.size()) {\n kw1Occ = kw1Arr.get(kw1Point);\n kw1Value = kw1Occ.frequency;}\n if(kw2Arr != null && kw2Point < kw2Arr.size()) {\n kw2Occ = kw2Arr.get(kw2Point);\n kw2Value = kw2Occ.frequency;}\n if(kw1Value == 0 && kw2Value == 0) {\n \t//will only occur if the if-statements for 212 and 215 are false\n \t//which means that the array doesn't exist or the pointer has iterated through the whole array\n break;}\n if(kw1Value >= kw2Value) {\n outArr.add(kw1Occ.document);\n kw1Point = kw1Point + 1;}\n else {outArr.add(kw2Occ.document);\n kw2Point = kw2Point + 1;}}\n if(outArr.size() == 0) {//no found matches\n return null;}\n else {return outArr;}//found matches\n\t}", "@Override\n public Builder minWordFrequency(int minWordFrequency) {\n super.minWordFrequency(minWordFrequency);\n return this;\n }", "private TreeMap<String, Integer> getWordsCount(TreeMap<String, ArrayList<String>> wordFamilies, ArrayList<String> allPatterns) {\r\n \t// get all the patterns first\r\n \tfor (int i = 0; i < allPatterns.size(); i++) {\r\n \t\twordFamilies.put(allPatterns.get(i), new ArrayList<String>());\r\n \t}\r\n \t// add the words into each pattern\r\n \tfor (String s : wordFamilies.keySet()) {\r\n \t\tfor (int i = 0; i < allPatterns.size(); i++) {\r\n \t\t\tif (s.equals(allPatterns.get(i))) {\r\n \t\t\t\tArrayList<String> curr = wordFamilies.get(s);\r\n \t\t\t\tcurr.add(this.activeWords.get(i));\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t// get the number of words in each pattern\r\n \tTreeMap<String, Integer> results = new TreeMap<String, Integer>();\r\n \tfor (String s : wordFamilies.keySet()) {\r\n \t\tresults.put(s, wordFamilies.get(s).size());\r\n \t}\r\n \treturn results;\r\n }", "public Iterable<String> getAllValidWords(BoggleBoard board) {\n int rows = board.rows();\n int cols = board.cols();\n ArrayList<String> all = new ArrayList<String>();\n // 1. enumerate all strings that can be composed by adj dice\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < cols; j++)\n depthFirstSearch(board, i, j, all);\n }\n\n // 2. for each string, check the longest prefix\n // 2. store the word\n wordsSoFar = all;\n return wordsSoFar;\n }", "public int getWordCount(){\r\n\t\treturn wordCount;\r\n\t}", "void documentFrequncy(Set<String> features,\n int index,\n int troush\n ) {\n for (String str : features) {\n switch (index) {\n case 1:\n for (int i = 0; i < count1; i++) {\n if (economydocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyeco.put(str, e);\n }\n e = 0;\n break;\n case 2:\n for (int i = 0; i < count2; i++) {\n if (educationdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyedu.put(str, e);\n }\n e = 0;\n break;\n case 3:\n for (int i = 0; i < count3; i++) {\n if (sportdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyspo.put(str, e);\n }\n e = 0;\n break;\n case 4:\n for (int i = 0; i < count4; i++) {\n if (culturedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencycul.put(str, e);\n }\n e = 0;\n break;\n case 5:\n for (int i = 0; i < count5; i++) {\n if (accedentdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyaccid.put(str, e);\n }\n e = 0;\n break;\n case 6:\n for (int i = 0; i < count6; i++) {\n if (environmntaldocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyenv.put(str, e);\n }\n e = 0;\n break;\n case 7:\n for (int i = 0; i < count7; i++) {\n if (foreign_affairdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencydep.put(str, e);\n }\n e = 0;\n break;\n case 8:\n for (int i = 0; i < count8; i++) {\n if (law_justicedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencylaw.put(str, e);\n }\n e = 0;\n break;\n case 9:\n for (int i = 0; i < count9; i++) {\n if (agriculture[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyagri.put(str, e);\n }\n e = 0;\n break;\n case 10:\n for (int i = 0; i < count10; i++) {\n if (politicsdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencypoltics.put(str, e);\n }\n e = 0;\n break;\n// case 11:\n//\n// for (int i = 0; i < count11; i++) {\n// if (social_affairsdocument[i].contains(str)) {\n// e++;\n// }\n// }\n// if (e > troush) {\n// documntfrequencysocial.put(str, e);\n// }\n// e = 0;\n// break;\n case 11:\n for (int i = 0; i < count12; i++) {\n if (science_technologydocument[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencysci.put(str, e);\n }\n e = 0;\n break;\n case 12:\n for (int i = 0; i < count13; i++) {\n if (healthdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyhel.put(str, e);\n }\n e = 0;\n break;\n case 13:\n for (int i = 0; i < count14; i++) {\n if (army[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencyarmy.put(str, e);\n }\n e = 0;\n break;\n default:\n break;\n }\n\n }\n }", "public int[] numSmallerByFrequency(String[] queries, String[] words) {\n int[] fsWords = new int[11], queryResults = new int[queries.length];\n for (int i = 0; i < queries.length; i++) queryResults[i] = fs(queries[i]);\n for (int i = 0; i < words.length; i++) fsWords[fs(words[i])]++;\n // Iterate all the results to get how many words have the bigger number\n // Given the relation is <, we only need to account for the ones that have a bigger result\n int tmp;\n for (int i = 0; i < queries.length; i++) {\n // Store the target value\n tmp = queryResults[i];\n // Update the results\n queryResults[i] = 0;\n for (int j = tmp + 1; j < fsWords.length; j++) queryResults[i] += fsWords[j];\n }\n return queryResults;\n }", "private List<String> getContextWords(Tree tree) {\r\n List<String> words = null;\r\n if (op.trainOptions.useContextWords) {\r\n words = Generics.newArrayList();\r\n List<Label> leaves = tree.yield();\r\n for (Label word : leaves) {\r\n words.add(word.value());\r\n }\r\n }\r\n return words;\r\n }", "public ArrayList<String> top5search(String kw1, String kw2) {\n // COMPLETE THIS METHOD\n ArrayList<Occurrence> Res1 = keywordsIndex.get(getKeyWord(kw1));\n ArrayList<Occurrence> res2 = keywordsIndex.get(getKeyWord(kw1));\n ArrayList<String> arrayList = new ArrayList<String>();\n\n while (arrayList.size() < 6) {\n Occurrence aa = null;\n Occurrence b = null;\n {\n if (Res1 != null) {\n for (Occurrence occr : Res1) {\n if (!arrayList.contains(occr.document)) {\n aa = occr;\n }\n }\n } if(Res1 == null){\n aa = new Occurrence(null, 0);\n }\n else aa = new Occurrence(null,0);\n }\n {\n if(res2 != null){\n for(Occurrence occr : res2){\n if(!arrayList.contains(occr.document)){\n b = occr;\n }\n }\n }\n if(res2 == null){\n b = new Occurrence(null,0);\n }\n else b = new Occurrence(null,0);\n }\n Occurrence[] a = {aa,b};//{search(arrayList, Res1), search(arrayList, res2)};\n Occurrence m = null;\n if (a[0].frequency < a[1].frequency) {\n m = a[1];\n } else m = a[0];\n if (m.document != null) {\n arrayList.add(m.document);\n } else break;\n }\n return arrayList;\n }", "public void mapFrequentItem(ArrayList<String> allKeywords, OntologyInteractionImpl oi) {\n ArrayList<String> freqItLst, keyWrdLst;\n Keyword kw = new Keyword(\"\");\n \n // get all concepts related to this frequent item\n \n // compare frequent item with all keyword list to see if there is a match\n\n // calculate similarity distance\n loadKeywordsRelated(allKeywords);\n \n for (Keyword kwrd : keywordsRelated) {\n kwrd.loadConceptsRelated(oi);\n }\n // create new concept related and add it to conceptRelated list\n }", "public static int countWords(final List<String> tokens) {\n\tint nWords = 0;\n\n\tfor (final String token : tokens) {\n\t if (!StringUtils.isComposedOf(token, ALL_DELIMS)) {\n\t\tnWords++;\n\t }\n\t}\n\n\treturn nWords;\n }", "private void getTweetsMostCommonHashTag() {\r\n final List<Entry<String, Integer>> list = \r\n getCommonList(countHashtags, countHashtags.size());\r\n list.stream()\r\n .filter(entry -> !searched.contains(entry.getKey().toLowerCase()))\r\n .limit(1)\r\n .forEach(entry -> getTweets(entry.getKey(), geocode, getAuth()));\r\n }", "public static int getNbClefs() {\r\n\t\treturn clefsMinimum;\r\n\t}" ]
[ "0.7283334", "0.70374274", "0.6994593", "0.6827094", "0.6814877", "0.6744936", "0.63254046", "0.63041264", "0.6289487", "0.62664455", "0.6239517", "0.62134874", "0.62113047", "0.60922486", "0.6072606", "0.602451", "0.60242015", "0.6014236", "0.6009533", "0.6009434", "0.59898835", "0.59243083", "0.5904551", "0.5890907", "0.5880859", "0.5878193", "0.58612686", "0.5828532", "0.58112574", "0.58097804", "0.58094746", "0.58049625", "0.5792863", "0.5788189", "0.57320243", "0.5729036", "0.5710333", "0.56822026", "0.5663513", "0.5656024", "0.5643254", "0.56218326", "0.56190675", "0.5614783", "0.56010705", "0.55697155", "0.5532438", "0.55203253", "0.5520162", "0.5516019", "0.5515822", "0.55131453", "0.55131453", "0.55019855", "0.5500521", "0.54914474", "0.54820263", "0.54712594", "0.5465723", "0.54643714", "0.54578614", "0.5454", "0.5453858", "0.54527587", "0.54503924", "0.5448218", "0.54331523", "0.5418666", "0.5416261", "0.54115075", "0.53956056", "0.5387204", "0.53867424", "0.53862137", "0.536839", "0.53553224", "0.53535134", "0.53525615", "0.53429294", "0.5342254", "0.53414327", "0.53401977", "0.5338644", "0.5338625", "0.5334013", "0.53274167", "0.5317356", "0.5314421", "0.5310139", "0.5308583", "0.53078485", "0.53049475", "0.5302601", "0.5297756", "0.5294214", "0.5287034", "0.5286696", "0.5282096", "0.52789015", "0.5276352" ]
0.69671214
3
method to populate most commonly used words in a set
public Set<String> getStopWords() throws Exception{ File file = new File("stopWords/stopwords.txt"); HashSet<String> stopwords = new HashSet<>(); BufferedReader br = new BufferedReader(new FileReader(file)); String line; while((line=br.readLine())!=null){ String[] tokens = line.split(" "); for(String token : tokens){ if(!stopwords.contains(token)){ stopwords.add(token); } } } br.close(); return stopwords; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void fillSet() {\r\n\t\tString regex = \"\\\\p{L}+\";\r\n\t\tMatcher matcher = Pattern.compile(regex).matcher(body);\r\n\t\twhile (matcher.find()) {\r\n\t\t\tif (!matcher.group().isEmpty()) {\r\n\t\t\t\twords.add(matcher.group());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void addWordToCandidatesSet(String word) {\n candidates.add(word);\n }", "private void populateDictionaryBySynonyms() {\n\n Enumeration e = dictionaryTerms.keys();\n while (e.hasMoreElements()) {\n String word = (String) e.nextElement();\n String tag = dictionaryTerms.get(word);\n\n ArrayList<String> synonyms = PyDictionary.findSynonyms(word);\n\n for (int i = 0; i < synonyms.size(); i++) {\n if (!dictionaryTerms.containsKey(synonyms.get(i))) {\n dictionaryTerms.put(synonyms.get(i), tag);\n }\n }\n }\n }", "public String[] topHotWords( int count ){\r\n //If the number put in the arguments is greater than the number of distinct hotwords\r\n //in the document, limit it to distinctCount\r\n if (count > distinctCount()){\r\n count = distinctCount();\r\n }\r\n //Creating the array that will hold all the hotwords in order of number of appearances \r\n String[] topWord = new String[words.size()];\r\n //This is the subset of the array above that will return the amount specified by the count argument\r\n String[] output = new String[count];\r\n //Fills the array with blank strings\r\n Arrays.fill(topWord, \"\");\r\n //Iterator for moving through topWord for assignment\r\n int iterator = 0;\r\n //Loop through every hotword in words and puts those words in topWord\r\n for(String key: words.keySet()){\r\n topWord[iterator] = key;\r\n iterator++;\r\n }\r\n //Sorts the words in topword\r\n for(int i = 0; i < words.size(); i++){\r\n for(int j = words.size()-1; j > 0; j-- ){\r\n \r\n if(count(topWord[j]) > count(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n \r\n }\r\n }\r\n //Does a secondary check to be certain all words are in proper appearance number order\r\n for(int i = words.size()-1; i >0; i--){\r\n if(count(topWord[i]) > count(topWord[i-1])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[i-1];\r\n topWord[i-1] = temp;\r\n }\r\n }\r\n //Orders the words with the same number of appearances by order of appearance in the document\r\n for (int i = 0; i < words.size(); i++){\r\n for(int j = i+1; j < words.size(); j++){\r\n if (count(topWord[i]) == count(topWord[j])){\r\n if (consec.indexOf(topWord[j]) < consec.indexOf(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n }\r\n }\r\n }\r\n //Gets the subset requested for return\r\n for (int i = 0; i < count; i++){\r\n output[i] = topWord[i];\r\n }\r\n return output;\r\n\t}", "private void getWordCounts() {\n Map<String, List<String>> uniqueWordsInClass = new HashMap<>();\n List<String> uniqueWords = new ArrayList<>();\n\n for (ClassificationClass classificationClass : classificationClasses) {\n uniqueWordsInClass.put(classificationClass.getName(), new ArrayList<>());\n }\n\n for (Document document : documents) {\n String[] terms = document.getContent().split(\" \");\n\n for (String term : terms) {\n if (term.isEmpty()) {\n continue;\n }\n if (!uniqueWords.contains(term)) {\n uniqueWords.add(term);\n }\n\n for (ClassificationClass docClass : document.getClassificationClasses()) {\n if (!uniqueWordsInClass.get(docClass.getName()).contains(term)) {\n uniqueWordsInClass.get(docClass.getName()).add(term);\n }\n if (totalWordsInClass.containsKey(docClass.getName())) {\n this.totalWordsInClass.put(docClass.getName(), this.totalWordsInClass.get(docClass.getName()) + document.getFeatures().get(term));\n } else {\n this.totalWordsInClass.put(docClass.getName(), document.getFeatures().get(term));\n }\n }\n }\n }\n\n this.totalUniqueWords = uniqueWords.size();\n }", "public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }", "public static Hashtable<String,Thought> buildWordSet(Vector<Thought> words) {\r\n\t\tHashtable<String,Thought> ret = new Hashtable<String,Thought>();\r\n\t\tfor(Thought word : words) {\r\n\t\t\tret.put(word.representation, word);\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "private ISet<String> getKeySet(IList<String> words) {\n\t\tISet<String> keySet = new ChainedHashSet<String>();\n\t\tfor (String word: words) {\n\t\t\tkeySet.add(word);\n\t\t}\n\t\treturn keySet;\n }", "default List<String> interestingConcepts(int topK, UnitLocation located,\n Set<Location> irrelevantSet){\n // collect frequent words outside the blacklist of locations\n final TokenIterator extractor = new TokenIterator(irrelevantSet);\n located.getUnitNode().accept(extractor);\n\n final WordCounter wordCounter = new WordCounter(extractor.getItems());\n\n return wordCounter.mostFrequent(topK);\n }", "private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}", "private static Map<Character, Set<Character>> genLessMap(String[] words) throws Exception {\n Map<Character, Set<Character>> map = new HashMap<>();\n for (int i = 1; i < words.length; i ++) {\n String a = words[i - 1];\n String b = words[i];\n boolean allEqual = true;\n for (int j = 0; j < a.length() && j < b.length(); j ++) {\n if (a.charAt(j) == b.charAt(j))\n continue;\n allEqual = false;\n Set<Character> sb = map.get(a.charAt(j));\n if (sb == null) {\n sb = new HashSet<Character>();\n map.put(a.charAt(j), sb);\n }\n sb.add(b.charAt(j));\n break;\n }\n if (allEqual && a.length() > b.length())\n throw new Exception(\"Invalid.\");\n }\n return map;\n }", "private static void printMostUsedWords(){\n\t\tMap<String, Integer> words = getWords();\n\t\t\n\t\tString max_count_string[] = new String[3];\n\t\tint max_counts[] = new int[3];\n\t\t\n\t\tfor(String str : words.keySet()){\n\t\t\tint count = words.get(str);\n\t\t\tint index = getMinIndex(max_counts);\n\t\t\t\n\t\t\tif(count > max_counts[index]){\n\t\t\t\tmax_counts[index] = count;\n\t\t\t\tmax_count_string[index] = str;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* printing top 3 most frequently used words */\n\t\tSystem.out.println(\"top 3 most frequently used words : \");\n\t\tfor(int i=0; i<3; i++){\n\t\t\tSystem.out.println(\"Word : \\\"\" + max_count_string[i] + \"\\\" is used \"+ max_counts[i] +\" times\" );\n\t\t}\n\t\tSystem.out.println();\n\t}", "private static List<String> getCandidates(String w, Set<String> words) {\n List<String> result = new LinkedList<>();\n for (int i = 0; i < w.length(); i++) {\n char[] chars = w.toCharArray();\n for (char ch = 'A'; ch <= 'Z'; ch++) {\n chars[i] = ch;\n String candidate = new String(chars);\n if (words.contains(candidate)) {\n result.add(candidate);\n }\n }\n }\n return result;\n }", "public static Set<String> getEnglishWords()\n{\n return english_words;\n}", "public static Set<String> createSet() {\n Set<String> set = new HashSet<>();\n set.add(\"lesson\");\n set.add(\"large\");\n set.add(\"link\");\n set.add(\"locale\");\n set.add(\"love\");\n set.add(\"light\");\n set.add(\"limitless\");\n set.add(\"lion\");\n set.add(\"line\");\n set.add(\"lunch\");\n set.add(\"level\");\n set.add(\"lamp\");\n set.add(\"luxurious\");\n set.add(\"loop\");\n set.add(\"last\");\n set.add(\"lie\");\n set.add(\"lose\");\n set.add(\"lecture\");\n set.add(\"little\");\n set.add(\"luck\");\n\n return set;\n }", "public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}", "public static String findReplacements(TreeSet<String> dictionary, \n\t\t\t\t\t String word)\n\t{\n\t String replacements = \"\";\n\t String leftHalf, rightHalf, newWord;\n\t int deleteAtThisIndex, insertBeforeThisIndex;\n\t char index;\n\t TreeSet<String> alreadyDoneNewWords = new TreeSet<String>();\n\t /* The above TreeSet<String> will hold words that the spell checker\n\t suggests as replacements. By keeping track of what has already\n\t been suggested, the method can make sure not to output the\n\t same recommended word twice. For instance, the word \n\t \"mispelled\" would ordinarily result in two of the same suggested\n\t replacements: \"misspelled\" (where the additional \"s\" is added to \n\t different locations.) */\n\t \n\t // First, we'll look for words to make by subtracting one letter\n\t // from the misspelled word.\n\t for(deleteAtThisIndex = 0; deleteAtThisIndex < word.length();\n\t\tdeleteAtThisIndex ++)\n\t\t{\n\t\t if(deleteAtThisIndex == 0)\n\t\t\t{\n\t\t\t leftHalf = \"\";\n\t\t\t rightHalf = word;\n\t\t\t}\n\t\t else\n\t\t\t{\n\t\t\t leftHalf = word.substring(0, deleteAtThisIndex);\n\t\t\t rightHalf = word.substring(deleteAtThisIndex+1,\n\t\t\t\t\t\t word.length());\n\t\t\t}\n\n\t\t newWord = \"\";\n\t\t newWord = newWord.concat(leftHalf);\n\t\t newWord = newWord.concat(rightHalf);\n\t\t if(dictionary.contains(newWord) &&\n\t\t !alreadyDoneNewWords.contains(newWord))\n\t\t\t{\n\t\t\t replacements = replacements.concat(newWord + \"\\n\");\n\t\t\t alreadyDoneNewWords.add(newWord);\n\t\t\t}\n\t\t}\n\n\t // The rest of this method looks for words to make by adding a \n\t // new letter to the misspelled word.\n\t for(insertBeforeThisIndex = 0; \n\t\tinsertBeforeThisIndex <= word.length();\n\t\tinsertBeforeThisIndex ++)\n\t\t{\n\t\t if(insertBeforeThisIndex == word.length())\n\t\t\t{\n\t\t\t leftHalf = word;\n\t\t\t rightHalf = \"\";\n\t\t\t}\n\t\t else\n\t\t\t{\n\t\t\t leftHalf = word.substring(0,insertBeforeThisIndex);\n\t\t\t rightHalf = word.substring(insertBeforeThisIndex,\n\t\t\t\t\t\t word.length());\n\t\t\t}\n\t\t \n\t\t for(index = 'a'; index <= 'z'; index ++)\n\t\t\t{\n\t\t\t newWord = \"\";\n\t\t\t newWord = newWord.concat(leftHalf);\n\t\t\t newWord = newWord.concat(\"\" + index + \"\");\n\t\t\t newWord = newWord.concat(rightHalf);\n\t\t\t \n\t\t\t if(dictionary.contains(newWord) &&\n\t\t\t !alreadyDoneNewWords.contains(newWord))\n\t\t\t\t{\n\t\t\t\t replacements \n\t\t\t\t\t= replacements.concat(newWord + \"\\n\");\n\t\t\t\t alreadyDoneNewWords.add(newWord);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t return replacements;\n\t}", "private Set<String> replacementHelper(String word) {\n\t\tSet<String> replacementWords = new HashSet<String>();\n\t\tfor (char letter : LETTERS) {\n\t\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\t\treplacementWords.add(word.substring(0, i) + letter + word.substring(i + 1));\n\t\t\t}\n\t\t}\n\t\treturn replacementWords;\n\t}", "public HashMap<String, TreeSet<String>> availableWords(TreeSet<String> wordSet, String dashes, char letter){\n\t\tHashMap<String, TreeSet<String>> wordList = new HashMap<String, TreeSet<String>>();\n\t\tIterator<String> iter = wordSet.iterator();\n\t\twhile(iter.hasNext()){\n\t\t\tString addWord = iter.next();\n\t\t\tString key = buildKey(dashes, addWord, letter);\n\t\t\tif(wordList.containsKey(key)){\n\t\t\t\twordSet = wordList.get(key);\n\t\t\t}\n\t\t\telse{\n\t\t\t\twordSet = new TreeSet<String>();\n\t\t\t}\n\t\t\twordSet.add(addWord);\n\t\t\twordList.put(key, wordSet);\n\t\t}\n\n\t\treturn wordList;\n\t}", "public Set<String> hyponyms(String word) {\n HashSet<String> set = new HashSet<String>();\n for (Integer id: synsets.keySet()) {\n TreeSet<String> hs = synsets.get(id);\n if (hs.contains(word)) {\n for (String s: hs) {\n set.add(s);\n }\n TreeSet<Integer> ids = new TreeSet<Integer>();\n ids.add(id);\n Set<Integer> desc = GraphHelper.descendants(dg, ids);\n for (Integer i: desc) {\n for (String s: synsets.get(i)) {\n set.add(s);\n }\n }\n }\n }\n return set;\n }", "public Collection<String> words() {\n Collection<String> words = new ArrayList<String>();\n TreeSet<Integer> keyset = new TreeSet<Integer>();\n keyset.addAll(countToWord.keySet());\n for (Integer count : keyset) {\n words.addAll(this.countToWord.get(count));\n }\n return words;\n }", "public void setNoms(){\r\n\t\tDSElement<Verbum> w = tempWords.first;\r\n\t\tint count = tempWords.size(); // failsafe counter\r\n\t\twhile(count > 0){\r\n\t\t\tGetNom(w.getItem());\r\n\t\t\t//System.out.println(w.getItem().nom);\r\n\t\t\tw = w.getNext();\r\n\t\t\tif(w == null)\r\n\t\t\t\tw = tempWords.first;\r\n\t\t\tcount--;\r\n\t\t}\r\n\t}", "private Set<String> get5000MostPopularWords(Predicate<String> stringFilter) throws FileNotFoundException {\n InputStream wordIS = this.getClass().getResourceAsStream(\"5000-MostPopularEnglishWords.txt\"); // not the best file since it has dups and words that are one and two characters\n BufferedReader reader = new BufferedReader(new InputStreamReader(wordIS));\n\n return reader.lines()\n .filter(stringFilter)\n .collect(Collectors.toSet());\n }", "public Set<String> getNLeastDistant(String word, int n) {\n\t\tthis.currentWord = word;\n\t\tSet<String> chosenCandidates = new HashSet<String>();\n\t\tPriorityQueue<String> candidates = new PriorityQueue<String>(dict.size(), new getNLeastDistantComparator());\n\t\tfor (String term : dict.keySet()) {\n\t\t\tcandidates.add(term);\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tchosenCandidates.add(candidates.poll());\n\t\t}\n\t\treturn chosenCandidates;\n\t}", "public void buildWordFileMap(){\n hashWords.clear();\n DirectoryResource dr = new DirectoryResource();\n for (File f : dr.selectedFiles()){ //for all the files selected make the hashWords hashmap\n addWordsFromFile(f);\n }\n \n }", "public Map<String, Integer> findUnicalWord(ArrayList<Word> text)\n {\n String[] words=new String[text.size()];\n for(int i=0; i<text.size(); i++){\n words[i]=text.get(i).toString();\n }\n HashMap<String, Integer> myWordsCount = new HashMap<>();\n for (String s : words){\n if (myWordsCount.containsKey(s)) myWordsCount.replace(s, myWordsCount.get(s) + 1);\n else myWordsCount.put(s, 1);\n }\n\n Map<String, Integer> newWordsCount = myWordsCount\n .entrySet()\n .stream()\n .sorted(Collections.reverseOrder(Map.Entry.comparingByValue()))\n .collect(\n toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2,\n LinkedHashMap::new));\n\n return newWordsCount;\n\n }", "void Create(){\n map = new TreeMap<>();\r\n\r\n // Now we split the words up using punction and spaces\r\n String wordArray[] = wordSource.split(\"[{ \\n\\r.,]}}?\");\r\n\r\n // Now we loop through the array\r\n for (String wordArray1 : wordArray) {\r\n String key = wordArray1.toLowerCase();\r\n // If this word is not present in the map then add it\r\n // and set the word count to 1\r\n if (key.length() > 0){\r\n if (!map.containsKey(map)){\r\n map.put(key, 1);\r\n }\r\n else {\r\n int wordCount = map.get(key);\r\n wordCount++;\r\n map.put(key, wordCount);\r\n }\r\n }\r\n } // end of for loop\r\n \r\n // Get all entries into a set\r\n // I think that before this we just have key-value pairs\r\n entrySet = map.entrySet();\r\n \r\n }", "default List<String> assignedConcepts(int topK, List<Source> sources, Set<String> relevantSet){\n\n final ExecutorService service = newExecutorService(sources.size());\n final WordCounter counter = new WordCounter();\n\n for(Source each : sources){\n service.execute(() -> counter.addAll(assignedConcepts(each, relevantSet)));\n }\n\n // shuts down the executor service\n shutdownExecutorService(service);\n\n return counter.mostFrequent(topK);\n\n }", "public Set<String> hyponyms(String word) {\n hypernymSet = new TreeSet<String>();\n firstsIDset = new HashSet<Integer>();\n for (String[] synStrings : sFile.values()) {\n for (String synset : synStrings) {\n if (synset.equals(word)) {\n for (String synset2 : synStrings) {\n hypernymSet.add(synset2);\n }\n for (Integer key : sFile.keySet()) {\n if (sFile.get(key).equals(synStrings)) {\n firstsIDset.add(key);\n }\n }\n }\n }\n }\n\n sIDset = GraphHelper.descendants(theDigraph, firstsIDset);\n for (Integer id : sIDset) {\n synsetWordStrings = sFile.get(id);\n for (String word2 : synsetWordStrings) {\n hypernymSet.add(word2);\n }\n }\n return hypernymSet;\n }", "public Set<String> hyponyms(String word) {\n HashSet<String> allhyponyms = new HashSet<String>();\n int maxV = synset.size();\n // int maxV = 0;\n // for (Integer i : synset.keySet()) {\n // if (maxV < i) {\n // maxV = i;\n // }\n // }\n // maxV += 1;\n Digraph digraph = new Digraph(maxV);\n\n // ArrayList<Integer> hypoKeys = new ArrayList<Integer>();\n // for (int i = 0; i < hyponym.size(); i++) {\n // hypoKeys.add(hyponym.get(0).get(i));\n // }\n \n for (ArrayList<Integer> a : hyponym) {\n int key = a.get(0);\n for (int j = 1; j < a.size(); j++) {\n digraph.addEdge(key, a.get(j));\n }\n }\n\n // get synonyms (in same synset), ex. given \"jump\", will get \"parachuting\" as well as \"leap\"\n ArrayList<String> strArray = new ArrayList<String>();\n for (Integer k : getSynsetKeys(word)) {\n strArray.addAll(synset.get(k));\n }\n for (String str : strArray) {\n allhyponyms.add(str);\n }\n\n // for each int from set<int> with all synset IDS\n for (Integer s : GraphHelper.descendants(digraph, getSynsetKeys(word))) {\n for (String t : synset.get(s)) {\n allhyponyms.add(t);\n }\n }\n return allhyponyms;\n }", "public static Set<String> preprocessStemAndTokenizeAddBigramsInSet(String data) {\n\t\t//System.out.println(\"Preprocess data, remove stop words, stem, tokenize and get bi-grams ..\");\n\n\t\tSet<String> transformedSet = new LinkedHashSet<String>();\n\t\tList<String> stemmedList = new ArrayList<String>();\n\n\t\t//System.out.println(\"Stop words length:\" + stopwords.size());\n\t\tTokenizer analyzer = new Tokenizer(Version.LUCENE_30);\n\t\tTokenStream tokenStream = analyzer.tokenStream(\"\", new StringReader(data));\n\t\tTermAttribute termAttribute;\n\t\tString term;\n\t\ttry {\n\t\t\twhile (tokenStream.incrementToken()) {\n\t\t\t\ttermAttribute = tokenStream.getAttribute(TermAttribute.class);\n\t\t\t\tterm = termAttribute.term();\n\t\t\t\tif (digitPattern.matcher(term).find()) //ignore digits\n\t\t\t\t\tcontinue;\n\t\t\t\tif (stopwords.contains(term)) //ignore stopwords\n\t\t\t\t\tcontinue;\n\t\t\t\tif (term.length() <= 1) //ignore single letter words\n\t\t\t\t\tcontinue;\n\t\t\t\tstemmer.setCurrent(term);\n\t\t\t\tstemmer.stem();\n\t\t\t\tstemmedList.add(stemmer.getCurrent());\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] ds = stemmedList.toArray(new String[0]);\n\n\t\t/*for(int i=0; i<stemmedList.size(); i++)\n\t\t\tSystem.out.print(ds[i]+\"\\t\");*/\n\n\t\t//add bi-grams\n\t\tfinal int size = 2;\n\t\tfor (int i = 0; i < ds.length; i++) {\n\t\t\ttransformedSet.add(ds[i]); //add single words\n\t\t\tif (i + size <= ds.length) {\n\t\t\t\tString t = \"\";\n\t\t\t\tfor (int j = i; j < i + size; j++) {\n\t\t\t\t\tt += \" \" + ds[j];\n\t\t\t\t}\n\t\t\t\tt = t.trim().replaceAll(\"\\\\s+\", \"_\");\n\t\t\t\ttransformedSet.add(t); //add bi-gram combined with \"_\"\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\" \")\n\t\tstemmedList.clear();\n\t\tstemmedList = null;\n\t\tds = null;\n\t\treturn transformedSet;\n\t}", "private void getSynsets(HashSet<WordProvider.Word> words) {\n HashMap<String, String> synsets_map = new HashMap<>();\n for (WordProvider.Word word: words) {\n ArrayList<String> synsetList = new ArrayList<>(Arrays.asList(word.getSynsets().trim().split(\" \")));\n for (String synset_tag: synsetList)\n synsets_map.put(synset_tag, word.getPos());\n }\n // for each synset load the meanings in the background\n final Object[] params= {synsets_map};\n new FetchRows().execute(params);\n }", "private static void addAllSynset(ArrayList<String> synsets, String chw, IDictionary dictionary) {\n\t\tWordnetStemmer stemmer = new WordnetStemmer(dictionary);\n\t\tchw = stemmer.findStems(chw, POS.NOUN).size()==0?chw:stemmer.findStems(chw, POS.NOUN).get(0);\n\t\t\n\t\tIIndexWord indexWord = dictionary.getIndexWord(chw, POS.NOUN);\n\t\tList<IWordID> sensesID = indexWord.getWordIDs();\n\t\tList<ISynsetID> relaWordID = new ArrayList<ISynsetID>();\n\t\tList<IWord> words;\n\t\t\n\t\tfor(IWordID set : sensesID) {\n\t\t\tIWord word = dictionary.getWord(set);\n\t\t\t\n\t\t\t//Add Synonym\n\t\t\trelaWordID.add(word.getSynset().getID());\n\n\t\t\t//Add Antonym\n\t\t\trelaWordID.addAll(word.getSynset().getRelatedSynsets(Pointer.ANTONYM));\n\t\t\t\n\t\t\t//Add Meronym\n\t\t\trelaWordID.addAll(word.getSynset().getRelatedSynsets(Pointer.MERONYM_MEMBER));\n\t\t\trelaWordID.addAll(word.getSynset().getRelatedSynsets(Pointer.MERONYM_PART));\n\t\t\t\n\t\t\t//Add Hypernym\n\t\t\trelaWordID.addAll(word.getSynset().getRelatedSynsets(Pointer.HYPERNYM));\n\t\t\t\n\t\t\t//Add Hyponym\n\t\t\trelaWordID.addAll(word.getSynset().getRelatedSynsets(Pointer.HYPONYM));\n\t\t}\n\t\t\n\t\tfor(ISynsetID sid : relaWordID) {\n\t\t\twords = dictionary.getSynset(sid).getWords();\n\t\t\tfor(Iterator<IWord> i = words.iterator(); i.hasNext();) {\n\t\t\t\tsynsets.add(i.next().getLemma());\n\t\t\t}\n\t\t}\n\t}", "public static Set<String> getUniqueWords(String input) {\r\n HashSet<String> hSet = new HashSet<String>();\r\n ArrayList<String> words = getWords(input);\r\n for(String word: words) {\r\n if(!hSet.contains(word)) {\r\n hSet.add(word);\r\n }\r\n }\r\n return hSet;\r\n }", "private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}", "public Set<String> hyponyms(String word) {\n Set<Integer> synIDs = new TreeSet<Integer>();\n Set<Integer> synKeys = synsetMap.keySet();\n for (Integer id : synKeys) {\n if (synsetMap.get(id).contains(word)) {\n synIDs.add(id);\n }\n }\n Set<Integer> hypIDs = GraphHelper.descendants(g, synIDs);\n Set<String> result = new TreeSet<String>();\n\n for (Integer i : hypIDs) {\n ArrayList<String> al = synsetMap.get(i);\n result.addAll(al);\n }\n return result;\n }", "@Override\n\tpublic Set<String> getWordSet() {\n\t\tlock.lockReadOnly();\n\t\ttry {\n\t\t\treturn super.getWordSet();\n\t\t} finally {\n\t\t\tlock.unlockReadOnly();\n\t\t}\n\t}", "public void populate(Iterable<String> words) {\n\t\tif (words == null) {\n\t\t\tthrow new IllegalArgumentException(\"words should not be null.\");\n\t\t}\n\t\t\n\t\tfor (String word : words) {\n\t\t\tthis.populateWord(word);\n\t\t}\n\t}", "private static void initializeAllGenresList(){\n\t\tfor(int i = 0; i < 13; i ++){\n\t\t\tALL_GENRES.add(new HashSet<String>());\n\t\t}\n\t}", "private void exercise6() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> result;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n result = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .map(String::toLowerCase)\n .sorted()\n .collect(toList());\n }\n\n result.forEach(System.out::println);\n }", "public void mapFrequentItem(ArrayList<String> allKeywords, OntologyInteractionImpl oi) {\n ArrayList<String> freqItLst, keyWrdLst;\n Keyword kw = new Keyword(\"\");\n \n // get all concepts related to this frequent item\n \n // compare frequent item with all keyword list to see if there is a match\n\n // calculate similarity distance\n loadKeywordsRelated(allKeywords);\n \n for (Keyword kwrd : keywordsRelated) {\n kwrd.loadConceptsRelated(oi);\n }\n // create new concept related and add it to conceptRelated list\n }", "private void exercise7() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> result;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n result = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .map(String::toLowerCase)\n .sorted(comparingInt(String::length))\n .collect(toList());\n }\n\n result.forEach(System.out::println);\n }", "@Override\n\tpublic void setTraining(String text) {\n\t\tmyWords = text.split(\"\\\\s+\");\n\t\tmyMap = new HashMap<String , ArrayList<String>>();\n\t\t\n\t\tfor (int i = 0; i <= myWords.length-myOrder; i++)\n\t\t{\n\t\t\tWordGram key = new WordGram(myWords, i, myOrder);\n\t\t\tif (!myMap.containsKey(key))\n\t\t\t{\n\t\t\t\tArrayList<String> list = new ArrayList<String>();\n\t\t\t\tif (i+myOrder != myWords.length)\n\t\t\t\t{\n\t\t\t\t\tlist.add(myWords[i+myOrder]);\n\t\t\t\t\tmyMap.put(key, list);\n\t\t\t\t} else {\n\t\t\t\t\tlist.add(PSEUDO_EOS);\n\t\t\t\t\tmyMap.put(key, list);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (i+myOrder != myWords.length)\n\t\t\t\t{\n\t\t\t\t\t((ArrayList<String>) myMap.get(key)).add(myWords[i+myOrder]);\n\t\t\t\t} else {\n\t\t\t\t\t((ArrayList<String>) myMap.get(key)).add(PSEUDO_EOS);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void populateDisplayedList() {\n \t\t// putting first five words into wordsDisplayed\n \t\tcurrFirstLetters = new HashSet<Character>();\n \t\tfor (int i = 0; i < numWordsDisplayed; i++) {\n \t\t\twhile (currFirstLetters.contains(wordsList[nextWordIndex].charAt(0))) {\n \t\t\t\tnextWordIndex++;\n \t\t\t}\n \t\t\tcurrFirstLetters.add(wordsList[nextWordIndex].charAt(0));\n \t\t\twordsDisplayed[i] = nextWordIndex;\n \t\t\tcurrWordIndex = i;\n \t\t\tsetChanged();\n \t\t\tnotifyObservers(States.update.FINISHED_WORD);\n\t\t}\n\t\tnextWordIndex++;\n \t\tcurrWordIndex = -1;\n \t}", "private static ArrayList<sri.Pair<String,Integer>> mostFrequentWords(String path) throws IOException {\r\n PriorityQueue<Pair<String, Integer>> listOfWords = new PriorityQueue<>(10,(o1, o2) -> {\r\n return ((int) o2.getSecond() - (int) o1.getSecond());\r\n });\r\n\r\n HashMap<String,Integer> mapOfWords = new HashMap<>();\r\n\r\n BufferedReader br;\r\n String word;\r\n ArrayList outputList = new ArrayList();\r\n\r\n File file = new File(path);\r\n\r\n br = new BufferedReader(new FileReader(file));\r\n\r\n while ( (word = br.readLine()) != null) {\r\n if (mapOfWords.containsKey(word)) {\r\n mapOfWords.put(word, mapOfWords.get(word) + 1);\r\n } else {\r\n mapOfWords.put(word, 1);\r\n }\r\n }\r\n\r\n for (Map.Entry<String,Integer> entry: mapOfWords.entrySet()){\r\n sri.Pair<String,Integer> tuple = new sri.Pair<String,Integer>(entry.getKey(),entry.getValue());\r\n listOfWords.offer(tuple);\r\n }\r\n\r\n for (int i = 0; i < 5; i++){\r\n outputList.add(new sri.Pair<String,Integer>(listOfWords.peek().getFirst(),listOfWords.poll().getSecond()));\r\n }\r\n\r\n return outputList;\r\n\r\n\r\n }", "public void apply(GlobalWindow window, Iterable<String> values, \n Collector<Tuple2<String,Integer>> out) throws Exception {\n \t HashMap <String,Integer> countWord = new HashMap<String,Integer>();\n \n for (String value : values) {\n \t \n \t String[] tokens = value.toLowerCase().split(\"\\\\W+\");\n \t for (String token : tokens)\n \t {\t if (token.length() >0) {\n \t\t if (countWord.get(token) != null)\n { countWord.put(token, countWord.get(token)+1);}\n else\n {countWord.put(token, 1);}\n \t }\n \t\t \n \t }\n }\n \n \n //Comparator to sort in reverse\n \t\t\tComparator<String> comparator = new Comparator<String>() {\n \t\t\t public int compare(String o1, String o2) {\n \t\t\t return countWord.get(o1).compareTo(countWord.get(o2));\n \t\t\t }\n \t\t\t};\n\n \t\t\tArrayList<String> words = new ArrayList<String>();\n \t\t\twords.addAll(countWord.keySet());\n\n \t\t\tCollections.sort(words,comparator);\n \t\t\tCollections.reverse(words);\n \t\t\t\n// System.out.println(Arrays.asList(words));\n \t\t\tSystem.out.println(\"10 most frequent words per stream\");\n System.out.println(\"-----------\");\n \n for(int i = 0; i < 10; i++) {\n \tSystem.out.println(words.get(i) + \" : \" + countWord.get(words.get(i)));\n }\n \n \n System.out.println(\"\\n\");\n \n }", "private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }", "private void createGenres() {\n ArrayList<String> gen = new ArrayList<>();\n //\n for (Movie mov : moviedb.getAllMovies()) {\n for (String genre : mov.getGenre()) {\n if (!gen.contains(genre.toLowerCase()))\n gen.add(genre.toLowerCase());\n }\n }\n\n Collections.sort(gen);\n\n genres = gen;\n }", "private HashSet<String> buildsetofterms(String filename)\r\n\t{\r\n\t\tString readLine, terms[];\r\n HashSet<String> fileTerms = new HashSet<String>();\r\n try \r\n {\r\n BufferedReader reader = new BufferedReader(new FileReader(filename));\r\n while ((readLine = reader.readLine()) != null)\r\n {\r\n terms = (readLine.toLowerCase().replaceAll(\"[.,:;'\\\"]\", \" \").split(\" +\"));\r\n for (String term : terms)\r\n {\r\n if (term.length() > 2 && !term.equals(\"the\"))\r\n fileTerms.add(term);\r\n }\r\n }\r\n }\r\n catch(IOException e){\r\n e.printStackTrace();\r\n }\r\n return fileTerms;\r\n }", "void documentFrequncy(Set<String> features,\n int index,\n int troush\n ) {\n for (String str : features) {\n switch (index) {\n case 1:\n for (int i = 0; i < count1; i++) {\n if (economydocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyeco.put(str, e);\n }\n e = 0;\n break;\n case 2:\n for (int i = 0; i < count2; i++) {\n if (educationdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyedu.put(str, e);\n }\n e = 0;\n break;\n case 3:\n for (int i = 0; i < count3; i++) {\n if (sportdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyspo.put(str, e);\n }\n e = 0;\n break;\n case 4:\n for (int i = 0; i < count4; i++) {\n if (culturedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencycul.put(str, e);\n }\n e = 0;\n break;\n case 5:\n for (int i = 0; i < count5; i++) {\n if (accedentdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyaccid.put(str, e);\n }\n e = 0;\n break;\n case 6:\n for (int i = 0; i < count6; i++) {\n if (environmntaldocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyenv.put(str, e);\n }\n e = 0;\n break;\n case 7:\n for (int i = 0; i < count7; i++) {\n if (foreign_affairdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencydep.put(str, e);\n }\n e = 0;\n break;\n case 8:\n for (int i = 0; i < count8; i++) {\n if (law_justicedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencylaw.put(str, e);\n }\n e = 0;\n break;\n case 9:\n for (int i = 0; i < count9; i++) {\n if (agriculture[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyagri.put(str, e);\n }\n e = 0;\n break;\n case 10:\n for (int i = 0; i < count10; i++) {\n if (politicsdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencypoltics.put(str, e);\n }\n e = 0;\n break;\n// case 11:\n//\n// for (int i = 0; i < count11; i++) {\n// if (social_affairsdocument[i].contains(str)) {\n// e++;\n// }\n// }\n// if (e > troush) {\n// documntfrequencysocial.put(str, e);\n// }\n// e = 0;\n// break;\n case 11:\n for (int i = 0; i < count12; i++) {\n if (science_technologydocument[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencysci.put(str, e);\n }\n e = 0;\n break;\n case 12:\n for (int i = 0; i < count13; i++) {\n if (healthdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyhel.put(str, e);\n }\n e = 0;\n break;\n case 13:\n for (int i = 0; i < count14; i++) {\n if (army[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencyarmy.put(str, e);\n }\n e = 0;\n break;\n default:\n break;\n }\n\n }\n }", "public Set<String> getWords() {\n return wordsOccurrences.keySet();\n }", "public WordGraph(Iterator<Word> words) {\n wordSet = new HashSet<>();\n wordMap = new HashMap<>();\n while(words.hasNext())\n wordSet.add(words.next());\n \n for(Word word : wordSet) {\n for(int i = 0; i < word.length(); i++) {\n Word w = word.deleteLetter(i);\n if(wordSet.contains(w)) {\n addToMap(word, w);\n addToMap(w, word);\n }\n }\n }\n }", "public List<String> getFrequentWords() {\n\t\tif (this.frequentWords == null) {\n\t\t\tSet<String> wordsToReturn = new TreeSet<String>();\n\t\t\tfor (String folder : termFrequencyManager.getTfidfByFolder().keySet()) {\n\t\t\t\tint index = 0;\n\t\t\t\tMap<String, TFIDFSummary> tfidSummaries =\n\t\t\t\t\t\ttermFrequencyManager.getTfidfByFolder().get(folder);\n\t\t\t\tArrayList<TFIDFSummary> tfidfSummariesList = new ArrayList<TFIDFSummary>(tfidSummaries.size());\n\t\t\t\tfor (String term : tfidSummaries.keySet()) {\n\t\t\t\t\ttfidfSummariesList.add(tfidSummaries.get(term));\n\t\t\t\t}\n\t\t\t\tCollections.sort(tfidfSummariesList);\n\n\t\t\t\twhile (index < tfidfSummariesList.size() && index < MAX_NUM_ATTRIBUTES_BY_FOLDER) {\n\t\t\t\t\tTFIDFSummary ts = tfidfSummariesList.get(tfidfSummariesList.size() - 1 - index);\n\t\t\t\t\twordsToReturn.add(ts.getTerm());\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.frequentWords = new ArrayList<String>(wordsToReturn);\n\t\t}\n\t\tSystem.out.println(\"Numero de palabras frecuentes: \" + this.frequentWords.size());\n\t\tfor (String w : frequentWords) System.out.println(\"FreqWord \" + w);\n\t\treturn this.frequentWords;\n\t}", "protected abstract Set<String> _addToSet(String key, Collection<String> str);", "private void populateDictionary() {\n Scanner scanner = null;\n try {\n scanner = new Scanner(new FileInputStream(filePath));\n while(scanner.hasNextLine()) {\n String word = scanner.nextLine();\n rwDictionary.put(reducedWord(word), word);\n lcDictionary.put(word.toLowerCase(), word);\n }\n } catch(IOException e) {\n System.err.println(e.toString());\n e.printStackTrace();\n } finally {\n if(scanner != null) {\n scanner.close();\n }\n }\n }", "public Set<String> hyponyms(String word) {\n Set<Integer> wordIds = revrseSynsetMapper.get(word);\n Set<String> superSet = new HashSet<String>();\n Set<Integer> descendant = GraphHelper.descendants(hypGraph, wordIds);\n Iterator<Integer> iter = descendant.iterator();\n while (iter.hasNext()) {\n Set<String> string_word = synsetMapper.get(iter.next());\n Iterator<String> A = string_word.iterator();\n while (A.hasNext()) {\n superSet.add(A.next());\n }\n }\n return superSet;\n }", "private void buildFreqMap() {\n\t\toriginalFreq = new HashMap<String, WordOccurence>();\n\n\t\tfor (ListIterator<Caption> itr = original.captionIterator(0); itr\n\t\t\t\t.hasNext();) {\n\t\t\tfinal Caption currentCap = itr.next();\n\t\t\tfinal String[] words = currentCap.getCaption().split(\"\\\\s+\");\n\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\tfinal String lowerCasedWord = words[i].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(lowerCasedWord)) {\n\t\t\t\t\toriginalFreq.get(lowerCasedWord).addOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t} else {\n\t\t\t\t\tfinal WordOccurence occ = new WordOccurence(\n\t\t\t\t\t\t\t(int) currentCap.getTime());\n\t\t\t\t\toriginalFreq.put(lowerCasedWord, occ);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < identified.size(); i++) {\n\t\t\tResultChunk curretResult = identified.get(i);\n\t\t\tfinal String[] words = curretResult.getDetectedString().split(\n\t\t\t\t\t\"\\\\s+\");\n\t\t\tint identifiedAt = curretResult.getDetectedAt();\n\t\t\tfor (int j = 0; j < words.length; j++) {\n\t\t\t\tString currentWord = words[j].toLowerCase();\n\t\t\t\tif (originalFreq.containsKey(currentWord)) {\n\t\t\t\t\tint detectedAt = (int) (identifiedAt - (words.length - j)\n\t\t\t\t\t\t\t* AVG_WORD_TIME);\n\t\t\t\t\toriginalFreq.get(currentWord).addVoiceDetection(detectedAt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static List<String> sortUniqueWords(HashMap<String, Integer> tracker, List<String> allWords) {\n List<Integer> frequency = new ArrayList<>(tracker.values());\n frequency.sort(Collections.reverseOrder());\n List<String> result = new ArrayList<>();\n\n while(!tracker.isEmpty()){\n for (String key : allWords) {\n if(frequency.size()!= 0 && frequency.get(0) == tracker.get(key)){\n frequency.remove(0);\n\n result.add(key + \" \" + tracker.get(key));\n tracker.remove(key);\n }\n\n }\n }\n return result;\n\n\n }", "HashSet<String> removeDuplicates(ArrayList<String> words) {\n\t\tHashSet<String> keywords = new HashSet<String>();\n\t\tkeywords.addAll(words);\n\t\treturn keywords;\n\t}", "String init() {\n StringBuilder output = new StringBuilder();\n output.setLength(0);\n for (String word: wordList) {\n boolean hasMultipleMatches = false;\n boolean hasAmbiguousMatch = false;\n String bestMatch = null;\n List<String> matches = findExactMatches(word);\n if (matches.size()==1) {\n bestMatch = matches.get(0);\n } else if (matches.size()>1) { // One or more exact matches were found.\n // Multiple matches found. Check to see if there is one which is shorted than the others\n List<String> multipleSameLengthMatches = findLongestMatch(matches);\n bestMatch = multipleSameLengthMatches.get(0);\n if (multipleSameLengthMatches.size()>1) {\n hasMultipleMatches = true;\n }\n } else { // No exact match was found, find longest matching substring\n bestMatch = findBestMatch(word);\n hasAmbiguousMatch = true;\n }\n output.append(bestMatch);\n output.append(hasMultipleMatches?\"!\":\"\");\n output.append(hasAmbiguousMatch?\"?\":\"\");\n output.append(\"\\n\");\n }\n return output.toString();\n }", "public static void checkMagazine(String[] magazine, String[] ransom) {\n HashMap<String, Integer> usableWords = makeMap(magazine);\n for (int i = 0; i < ransom.length; i++) {\n if (usableWords.containsKey(ransom[i]) && usableWords.get(ransom[i]) > 0) {\n usableWords.merge(ransom[i], -1, Integer::sum); // uses the word\n } else {\n System.out.println(\"No\");\n return;\n }\n }\n System.out.println(\"Yes\");\n}", "public Set<String> getCommonTerms(Collection<String> main, Collection<String> searcher, Collection<String> stopwords, boolean lemmatised) {\n Set<String> result = new HashSet();\n\n List<String> newMain = new ArrayList();\n // Remove stopwords in new list\n for (String word : main) {\n if (!stopwords.contains(word.toLowerCase()))\n newMain.add(lemmatise(word.trim()));\n }\n // Get common words\n for (String word : searcher) {\n String nextWord = lemmatise(word.trim());\n if (newMain.contains(nextWord)) {\n if (lemmatised) result.add(nextWord.trim());\n else result.add(word.trim());\n }\n }\n\n return result;\n }", "private StopWords() {\r\n\t\tPath source = Paths.get(\"./dat/zaustavne_rijeci.txt\");\r\n\t\ttry {\r\n\t\t\tbody = new String(Files.readAllBytes(source),\r\n\t\t\t\t\tStandardCharsets.UTF_8);\r\n\t\t} catch (IOException ignorable) {\r\n\t\t}\r\n\t\twords = new LinkedHashSet<>();\r\n\t\tfillSet();\r\n\t}", "public abstract String[][] getTopWords();", "private void addCustomWords() {\r\n\r\n }", "@Test\n\tpublic void singleWordGrepTest4() throws Exception {\n\t\t// word is 'undocumented'\n\t\tHashSet<String> grepFound = loadGrepResults(\"undocumented\");\n\t\tCollection<Page> index = queryTest.query(\"undocumented\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\t\t\n\t\t// tests set equality \n\t\tassertEquals(indexFound, grepFound);\n\t}", "public void getThesaurusMap (String wordTofind) {\r\n\t \tfor (Entry<String, List> entry : tMap.entrySet()) {\r\n\t \t\tList singleListofSynonims = entry.getValue();\r\n\t \t\tif (singleListofSynonims.contains(wordTofind)){\r\n\t \t\t\t\r\n\t \t\t\tmappedList.add(singleListofSynonims);\r\n\t \t\t\tGoogleToThesarus.put(wordTofind,singleListofSynonims);\r\n\t \t\t}\r\n\t \t\telse {\r\n\t \t\t\t//System.out.println(\"value not in map\");\r\n\t \t}\r\n\t \t}\r\n\t }", "private void initiateWordCount(){\n for(String key: DataModel.bloomFilter.keySet()){\n WordCountHam.put(key, 0);\n WordCountSpam.put(key, 0);\n }\n }", "public HangmanManager(Set<String> words) {\r\n \t//Check Preconditions\r\n \tif (words == null || words.size() <= 0) {\r\n \t\tthrow new IllegalArgumentException(\"pre: words != null, words.size() > 0\");\r\n \t}\r\n \t\r\n \t//Build Dictionary ArrayList using iterator\r\n \tdictionary = new ArrayList <String>();\r\n \tIterator<String> iterator = words.iterator();\r\n \twhile (iterator.hasNext()) {\r\n \t\tdictionary.add(iterator.next());\r\n \t}\r\n }", "Set<Keyword> listKeywords();", "public interface IWordFrequency {\n\n\t/**\n\t * \n\t * @param input\n\t * text string to process\n\t * @param wordNumber\n\t * max number of word in the returned list\n\t * @return for a given non null or empty input text, returns the list of\n\t * words ordered by word frequency, the most frequently occurring\n\t * word first, null otherwise.\n\t * \n\t */\n\tList<String> getWordFrequency(String input, int wordNumber);\n\n}", "public static HashSet<Word> createHashSet (Scanner input){\n HashSet<Word> temp = new HashSet<>();\n while (input.hasNext()){\n Word inputWord = new Word(input.next());\n temp.add(inputWord);\n }\n return temp;\n }", "public EfficientWordMarkov()\n\t{\n\t\tsuper();\n\t\tmyMap = new HashMap<WordGram , ArrayList<String>>();\n\t}", "private Set<String> insertionHelper(String word) {\n\t\tSet<String> insertionWords = new HashSet<String>();\n\t\tfor (char letter : LETTERS) {\n\t\t\tfor (int i = 0; i <= word.length(); i++) {\n\t\t\t\tinsertionWords.add(word.substring(0, i) + letter + word.substring(i));\n\t\t\t}\n\t\t}\n\t\treturn insertionWords;\n\t}", "private static List<List<String>> groupAnagramsBestCase(String[] strings) {\n List<List<String>> result = new ArrayList<>();\n Map<String, List<String>> keyToValues = new HashMap<>();\n\n for(String str : strings) {\n String key = getKey(str);\n List<String> anagrams = keyToValues.getOrDefault(key, new ArrayList<>());\n anagrams.add(str);\n\n keyToValues.put(key, anagrams);\n }\n\n result.addAll(keyToValues.values());\n return result;\n }", "private void initLegits(Set<String> s) {\n\t\ts.addAll(letters);\n\t\ts.addAll(digits);\n }", "public Set<String> hyponyms(String word) {\n Set<String> toReturn = new HashSet<String>();\n Set<Integer> wordIndexes = new HashSet<Integer>();\n wordIndexes = wnetsi.get(word);\n Set<Integer> toReturnInt = GraphHelper.descendants(g, wordIndexes);\n Object[] returnArray = toReturnInt.toArray();\n for (int i = 0; i < returnArray.length; i += 1) {\n Set<String> stringReturn = wnetis.get(returnArray[i]);\n Iterator<String> strIter = stringReturn.iterator();\n while (strIter.hasNext()) {\n toReturn.add(strIter.next());\n }\n }\n return toReturn;\n }", "public static void setAuthFreq(Map<String, AuthorMod> models)\n\t{\n\t\tfor (AuthorMod curAuth: models.values()) \n\t\t{\n\t\t\tfor(String uGram: curAuth.ug.getAll()) \n\t\t\t{\n\t\t\t\tint ucount = curAuth.ug.getCount(uGram);\n/*>>>>\t \t\tif (ucount<2) {curAuth.unks++;\t\t\t\t*** unkown word handling\n \t\t\t\tif (curAuth.ug.contains(\"<unk>\")) \n\t\t\t\t\t{ curAuth.ug.updateSeen(\"<unk>\");}\n\t\t\t\t\telse{ curAuth.ug.addNew(\"<unk>\");}\n*/\n\t\t\t\tdouble ufreq= ((double)ucount/curAuth.trainSize);\n\t\t\t\tcurAuth.ug.setFreq(uGram, ufreq);\n\t\t\t}\n\n\t\t//set bigram HT entries for frequency, \n\t\t//calculated by normalizing BG count by prefix count\n\t\t\tfor(Pair<String, String> bGram: curAuth.bg.getAll())\n\t\t\t{\n/*\t>>>\t\t\t\t-first, need a test to see if the unigram count for either word in bigram is less than 2. If yes, we will replace with <unk> tag\n\t\t\t\t\t\t\t- code to get counts for each word in bigram would look like curAuth.ug.getCount(bgram.getFirst()) \n\t\t\t\t\t-make new bg, with the count 1 word replaced with <Unk> tag. Use the parametered Pair<String, String> constructor with arguements (word, <unk>) depending on which is unk (or both)\n\t\t\t\t\t-do an updateSeen(bigram) or addNew(bigram) on curAuth.bg depending on if this new bigram has been seen (use curAuth.bg.contains(**this new bigram**)) \n\t\t\t\t\t-use data structure to remember what still needs updating (some type of set. we want something with no duplicates) \n\t\t\t\t\t-remove original bigram, put updated bigram in set\n\t\t\t\t\t-skip rest of loop for this bigram, and update the freq for the set after the loop */\n\t\t\t\t\t\n\t\t\t\t\tint bcount = curAuth.bg.getBgCount(bGram);\n\t\t\t\t\tint pcount = curAuth.ug.getCount(bGram.getFirst()); //sets p count to count of prefix from unigram table\n\t\t\t\t\tdouble bfreq = ((double)bcount)/pcount;\n\t\t\t\t\tcurAuth.bg.setFreq(bGram, bfreq);\n\t\t\t}\n\t\t\t//set frequncies for items we placed in set of bigrams containing the <unk> tag\n\t\t}\n\t}", "private List<String> help(String s, Set<String> wordDict) {\n\t\tList<String> ret = new ArrayList<>();\n\n\t\tif (wordDict.contains(s))\n\t\t\tret.add(s);\n\t\telse\n\t\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\t\tif (wordDict.contains(s.substring(0, i + 1))) {\n\n//\t\t\t\t\tSystem.out.println(s.substring(0, i + 1));\n\n\t\t\t\t\tList<String> tmp = help(s.substring(i + 1), wordDict);\n\t\t\t\t\tif (tmp.size() > 0) {\n\t\t\t\t\t\tret.add(s.substring(0, i + 1));\n\t\t\t\t\t\tret.addAll(tmp);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\treturn ret;\n\t}", "private static SortingMachine<Pair<String, Integer>> sortWords(\n Map<String, Integer> words, int numberOfWords) {\n AlphabeticalComparator stringComp = new AlphabeticalComparator();\n IntComparator intComp = new IntComparator();\n\n SortingMachine<Pair<String, Integer>> intMachine = new SortingMachine1L<>(\n intComp);\n SortingMachine<Pair<String, Integer>> stringMachine = new SortingMachine1L<>(\n stringComp);\n\n for (Map.Pair<String, Integer> pair : words) {\n intMachine.add(pair);\n }\n\n intMachine.changeToExtractionMode();\n\n for (int i = 0; i < numberOfWords; i++) {\n Pair<String, Integer> pair = intMachine.removeFirst();\n System.out.println(pair);\n stringMachine.add(pair);\n }\n\n stringMachine.changeToExtractionMode();\n\n return stringMachine;\n }", "public Set<String> getWords() {\n return wordMap.keySet();\n }", "public AllWordsCounter() {\n counters = new SingleWordCounter[MAX_WORDS];\n // TODO: initialize instance variable to hold MAX_WORDS objects\n\n }", "@Test\n\tpublic void singleWordGrepTest3() throws Exception {\n\t\t// word is 'mistress'\n\t\tHashSet<String> grepFound = loadGrepResults(\"mistress\");\n\t\tCollection<Page> index = queryTest.query(\"mistress\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\t\t\n\t\t// tests set equality \n\t\tassertEquals(indexFound, grepFound);\n\t}", "private Set<Integer> getSynsetKeys(String word) {\n HashSet<Integer> kset = new HashSet<Integer>();\n\n for (ArrayList<String> o : synsetRev.keySet()) {\n for (String p : o) {\n if (p.equals(word)) {\n kset.add(synsetRev.get(o));\n }\n }\n }\n return kset;\n }", "public static void wordsToGuess(String [] myWords){\n myWords[0] = \"tesseract\";\n myWords[1] = \"vibranium\";\n myWords[2] = \"mjolnir\";\n myWords[3] = \"jarvis\";\n myWords[4] = \"avengers\";\n myWords[5] = \"wakanda\";\n myWords[6] = \"mixtape\";\n myWords[7] = \"assemble\";\n myWords[8] = \"queens\";\n myWords[9] = \"inevitable\";\n }", "private void createItemsetsOfSize1() {\n itemsets = new ArrayList<>();\n for (int i = 0; i < numItems; i++) {\n String[] cand = {words.get(i)};\n itemsets.add(cand);\n }\n }", "public static void main(String[] args) {\n Set<String> mySet = new HashSet<String>(100,50);\n mySet.add(\"APPLE\");\n mySet.add(\"LG\");\n mySet.add(\"HTTC\");\n mySet.add(\"APPLE\");\n mySet.add(\"SAMSUNG\");\n Iterator<String> iterator = mySet.iterator();\n while (iterator.hasNext()){\n System.out.println(iterator.next());\n }\n\n\n\n }", "public String mostCommonWord(String[] tweets) {\n int big = -100000;\n String mostCommon = null;\n for (String tweet : tweets) {// = for(int i = 0 ; i<tweets.length;i++) { String tweet = tweets[i] }\n for (String word : tweet.split(\" \")) {\n int amt = 0;\n for (String tweet2 : tweets)\n for (String word2 : tweet2.split(\" \"))\n if (word2.equals(word))\n amt++;\n if (amt > big) {\n big = amt;\n mostCommon = word;\n }\n }\n }\n return mostCommon;\n}", "public HangmanManager(Set<String> words) {\r\n \tif (words == null || words.size() <= 0) {\r\n \t\tthrow new IllegalArgumentException();\r\n \t}\r\n \tthis.words = new HashSet<String>();\r\n \tfor (String s : words) {\r\n \t\tthis.activeWords.add(s);\r\n \t}\r\n }", "public abstract Set<String> getTerms(Document doc);", "public void replaceThesarusWordwithGoogleWord ( ) {\r\n\t \t\t \t\r\n\t \tfor (Map.Entry<String, List<String>> entry : GoogleToThesarus.entrySet()) {\r\n\t String key = entry.getKey();\r\n\t List<String> values = entry.getValue();\r\n\t //String wordIsReplaced=null;\r\n\t \r\n\t for (String temp: values) {\r\n\t \t//why is this null\r\n\t \t\r\n\t \tif (splitto.equals(temp)) {\r\n\t \t\tsplitto=key;\r\n\t \t\tif(!replacedWordList.contains(splitto))\r\n\t \t\t\treplacedWordList.add(splitto);\r\n \t\t\r\n\t \t \t\t \t\t}\r\n\t \telse {\r\n\t \t\t//wordIsReplaced=splitto;\r\n\t \t\t//System.out.println(\"failed\");\r\n\t \t}\r\n\t \t\t }\r\n\t \t}\r\n\t }", "private Suggestion buildSuggestion(String linearization,\n Interpretation interpretation,\n Map<String, WordType> originalWords, boolean matchAllWords) {\n String[] words = linearization.split(\"\\\\s+\");\n\n Map<String, Integer> namesMissing = new HashMap(\n interpretation.getNameTypeCounts().counts);\n\n int additionalNamesCount = 0;\n\n Set<String> wordsNotMatched = new HashSet<>(originalWords.keySet());\n for (Entry<String, WordType> entry : originalWords.entrySet()) {\n if (entry.getValue() == WordType.Name) {\n wordsNotMatched.remove(entry.getKey());\n }\n }\n int additionalGrammarWordsCount = 0;\n\n\n for (String word : words) {\n\n //name word\n if (defTempl.isVariable(word)) {\n String nameType = word.substring(2, word.length() - 2);\n if (namesMissing.containsKey(nameType)) {\n Integer missingCount = namesMissing.get(nameType);\n if (missingCount > 1) {\n namesMissing.put(nameType, missingCount - 1);\n }\n else {\n namesMissing.remove(nameType);\n }\n }\n else {\n additionalNamesCount++;\n }\n }\n //grammar word\n else {\n String lowerCaseWord = word.toLowerCase();\n\n if (wordsNotMatched.contains(lowerCaseWord)) {\n wordsNotMatched.remove(lowerCaseWord);\n }\n else {\n additionalGrammarWordsCount++;\n }\n }\n }\n\n //if removing words from query is not allowed\n if (matchAllWords && !wordsNotMatched.isEmpty()) {\n return null;\n }\n\n int grammarWordsAltered = wordsNotMatched.size();\n int grammarWordsAdded = additionalGrammarWordsCount - grammarWordsAltered;\n\n return new Suggestion(linearization, false,\n additionalNamesCount, grammarWordsAdded, grammarWordsAltered);\n }", "void updateFilteredUndoneTaskListNamePred(Set<String> keywords);", "public void populateWord(String word) {\n\t\tthis.add(word);\n\t}", "public Set<String> hyponyms(String word) {\n Set<String> hyponyms = new HashSet<String>();\n Set<Integer> ids = new HashSet<Integer>();\n for (Integer key: synsetNouns.keySet()) {\n if (synsetNouns.get(key).contains(word)) {\n ids.add(key);\n }\n }\n Set<Integer> descendants = GraphHelper.descendants(hyponym, ids);\n for (Integer j: descendants) {\n for (String value: synsetNouns.get(j)) {\n hyponyms.add(value);\n }\n }\n return hyponyms;\n }", "public String get_all_words(){\n\t\tString found_words = \"\";\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs){\n\t\t\t\tfound_words += child.get_all_words();\n\t\t}\n\t\tif(current_word != null && !found_words.equals(\"\"))\n\t\t\treturn current_word + \"#\" + found_words;\n\t\telse if(current_word != null && found_words.equals(\"\"))\n\t\t\treturn current_word+ \"#\";\n\t\telse //current_word == null && found_words != null\n\t\t\treturn found_words;\n\t}", "void collectLeastFrequent(FrequencyTable fq);", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "public String get_all_words_and_definitions(){\n\t\tString found_words = \"\";\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs){\n\t\t\t\tfound_words += child.get_all_words_and_definitions();\n\t\t}\n\t\tif(current_word != null && !found_words.equals(\"\"))\n\t\t\treturn current_word +\" & \" + definition + \"\\n\" + found_words ;\n\t\telse if(current_word != null && found_words.equals(\"\"))\n\t\t\treturn current_word +\" & \" + definition + \"\\n\";\n\t\telse //current_word == null && found_words != null\n\t\t\treturn found_words;\n\t}", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "private void initialise(String initialWord, int size, SimpleGraph<String, DefaultEdge> graph){\n\t\tHashtable<String, ArrayList<String>> progress = new Hashtable<String, ArrayList<String>>(size);\t\t\t\t\t\n\t\tfor(String s: words){\n\t\t\tif(!(progress.containsKey(s)))\n\t\t\t\tprogress.put(s, matchingWords(s));\n\t\t}\n\t\tEnumeration<String> key = progress.keys();\n\t\tString keyword;\n\t\tArrayList<String> values = new ArrayList<String>();\n\t\twhile(key.hasMoreElements()){\n\t\t\tkeyword=(String)key.nextElement();\n\t\t\tvalues = progress.get(keyword);\n\t\t\tif(!(graph.containsVertex(keyword))){\n\t\t\t\tgraph.addVertex(keyword);\n\t\t\t\tfor(String s: values){\n\t\t\t\t\tgraph.addVertex(s);\n\t\t\t\t\tgraph.addEdge(keyword, s);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tfor(String s: values){\n\t\t\t\t\tif(!(graph.containsEdge(keyword,s))){\n\t\t\t\t\t\tgraph.addVertex(s);\n\t\t\t\t\t\tgraph.addEdge(keyword, s);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.68167204", "0.62357724", "0.62323505", "0.6225075", "0.62243724", "0.6144336", "0.6111064", "0.6078224", "0.60661405", "0.60139513", "0.5966626", "0.5946943", "0.59342426", "0.5914515", "0.5888118", "0.58874506", "0.5858773", "0.582985", "0.5804909", "0.5768792", "0.5760607", "0.57179964", "0.5709095", "0.5695044", "0.56934536", "0.56898016", "0.5683244", "0.56824845", "0.5681858", "0.5667088", "0.5659732", "0.565878", "0.5658306", "0.5647534", "0.5618387", "0.5604551", "0.55724347", "0.5563394", "0.5560112", "0.5557464", "0.55538845", "0.5553406", "0.55354035", "0.55353135", "0.5532229", "0.5526798", "0.5514812", "0.55112225", "0.55106276", "0.5499449", "0.5485067", "0.5483731", "0.5483248", "0.54746705", "0.54741424", "0.5460804", "0.5457563", "0.54527664", "0.5446428", "0.544107", "0.54339474", "0.54322004", "0.5431559", "0.54265267", "0.5424136", "0.541411", "0.54028463", "0.5399563", "0.53993845", "0.5399202", "0.53964597", "0.53929996", "0.53856325", "0.5382939", "0.53777796", "0.53756887", "0.53613335", "0.5358417", "0.5355925", "0.53419286", "0.53409004", "0.5334726", "0.5321865", "0.53207105", "0.53132296", "0.5300277", "0.52877223", "0.52781427", "0.527732", "0.52772605", "0.5275344", "0.5269621", "0.52679336", "0.52661824", "0.52654475", "0.5259649", "0.52389324", "0.5237569", "0.52324754", "0.52277416", "0.52267724" ]
0.0
-1
page = 1; xiala = 0;
@Override public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) { new DataTask().execute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setThisManual()\n { \n actual = 1;\n \n nextPage = new Label();\n addObject(nextPage, 1132, 2001);\n \n prePage = new Label();\n addObject(prePage, 122, 2007);\n \n prePage.setImage(new GreenfootImage(\"\", 0, null, null));\n nextPage.setImagine(\"sipka1\");\n \n callMenu = new CallMenu();\n addObject(callMenu, 667, 60);\n }", "public void renitialiser() \n\t{\n\t\tbuffer = new byte[Constants.PAGESIZE];\n\t\tidDeLaPage = null;\n\t\tpin_count = 0;\n\t\tflagDirty = 0;\n\t\testCharge = false;\n\t}", "public void ejec(){\n int num = 0;\n while (num==0){\n intro();\n System.out.println(\"\");\n if (opcion.equals(\"salir\")){}\n else {setnum();}\nswitch(opcion){\n case \"pies\":System.out.println( num1 + \" pulgada(s) son(es) \" + num1*0.0833333333 + \" pies\");\n break;\n case \"yardas\":System.out.println( num1 + \" pulgada(s) son(es) \" + num1*0.0277777778 + \" yardas\");\n break;\n case \"cm\":System.out.println( num1 + \" pulgada(s) son(es) \" + num1*2.54 + \"cm\");\n break;\n case \"salir\":\n num=9;\n break;\n default:System.out.println(\"Elección erronea\");\n break;}}}", "public void iniciar(){\nSystem.out.println(\"El primer contador comenzara en el número 0\");\ncontador=0;\nSystem.out.println(\"El segundo contador comenzara en el número 100\");\ncontador2=100;}", "void setPageStart(short start);", "public void prepararPago(){\n pago = (float) 0.00;\n nuevoSaldo = (float) 0.00;\n intereses = (float) 0.00;\n mora = (float) 0.00;\n pagoValido = false;\n }", "public static void look() {\r\n\t\t\r\n\t\tif (ths.page == 2) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "public void setPage(int page) {\n this.page = page;\n }", "protected void elaboraPagina() {\n testoPagina = VUOTA;\n\n //header\n testoPagina += this.elaboraHead();\n\n //body\n testoPagina += this.elaboraBody();\n\n //footer\n //di fila nella stessa riga, senza ritorno a capo (se inizia con <include>)\n testoPagina += this.elaboraFooter();\n\n //--registra la pagina principale\n if (dimensioniValide()) {\n testoPagina = testoPagina.trim();\n\n if (pref.isBool(FlowCost.USA_DEBUG)) {\n testoPagina = titoloPagina + A_CAPO + testoPagina;\n titoloPagina = PAGINA_PROVA;\n }// end of if cycle\n\n //--nelle sottopagine non eseguo il controllo e le registro sempre (per adesso)\n if (checkPossoRegistrare(titoloPagina, testoPagina) || pref.isBool(FlowCost.USA_DEBUG)) {\n appContext.getBean(AQueryWrite.class, titoloPagina, testoPagina, summary);\n logger.info(\"Registrata la pagina: \" + titoloPagina);\n } else {\n logger.info(\"Non modificata la pagina: \" + titoloPagina);\n }// end of if/else cycle\n\n //--registra eventuali sottopagine\n if (usaBodySottopagine) {\n uploadSottoPagine();\n }// end of if cycle\n }// end of if cycle\n\n }", "public void setPageInfo(){\n\t\tif(AllP>=1){\n\t\t\tPageInfo=\"<table border='0' cellpadding='3'><tr><td>\";\n\t\t\tPageInfo+=\"Show: \"+PerR+\"/\"+AllR+\" Records!&nbsp;\";\n\t\t\tPageInfo+=\"Current page: \"+CurrentP+\"/\"+AllP;\n\t\t\tPageInfo+=\"</td></tr></table>\";\t\t\t\n\t\t}\t\t\t\t\n\t}", "public static void craft() {\r\n\t\t\r\n\t\tif (ths.page == 5) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic int nombrePage() {\n\t\treturn 0;\r\n\t}", "public void setPage(Integer page) {\n this.page = page;\n }", "public void setPage(SQLInteger page) {\n\t\tthis.page = page;\n\t}", "public void startOver() {\n this.pagesRead = 0;\n }", "public static void give() {\r\n\t\t\r\n\t\tif (ths.page == 6) {\r\n\t\t\tths.page++;\r\n\t\t\tths.updates1 = updates;\r\n\t\t}\r\n\t}", "@Override\n\tprotected void actionPerformed(GuiButton par1GuiButton)\n {\n\n if (par1GuiButton.enabled)\n {\n if (par1GuiButton.id == 1)\n {\n if (this.currPage < this.totalPages - 1)\n {\n ++this.currPage;\n }\n }\n else if (par1GuiButton.id == 2)\n {\n if (this.currPage > 0)\n {\n --this.currPage;\n }\n }\n else if (par1GuiButton.id == 8)\n {\n this.index = true;\n this.currPage = 0;\n this.totalPages = (this.maxResearch - (this.maxResearch % 5))/5 + 1;\n }\n else if (par1GuiButton.id == 9)\n {\n if (this.currentResearch == this.bookmarkpage) {\n \tthis.bookmarkpage = this.maxResearch + 1;\n \tSystem.out.println(\"changed\");\n }\n else\n {\n \tthis.bookmarkpage = this.currentResearch;\n \tSystem.out.println(\"changed\");\n }\n editingPlayer.inventory.mainInventory[editingPlayer.inventory.currentItem].stackTagCompound.setInteger(\"SelectedResearch\", this.bookmarkpage);\n updateBookmark();\n\n }\n else if (par1GuiButton.id > 2)\n {\n\t this.index = false;\n\t this.currentResearch = par1GuiButton.id + (currPage*5) - 2;\n\t NBTTagCompound var4 = itemstack.getTagCompound();\n\t this.researchKey = itemstack.stackTagCompound.getCompoundTag(Integer.toString(this.currentResearch)).getString(\"Research\");\n\t this.complete = itemstack.stackTagCompound.getCompoundTag(Integer.toString(this.currentResearch)).getInteger(\"Complete\");\n\t \tif (itemstack.stackTagCompound.getCompoundTag(Integer.toString(this.currentResearch)).getInteger(\"Complete\") == 1) {\n\t this.totalPages = ResearchDictionary.researchList.get(researchKey).description.size();\n\t }\n\t this.currPage = 0;\n }\n\n this.updateButtons();\n }\n }", "int getPage();", "public void setPages(int pages) {\n this.pages = pages;\n }", "public void loadPreviousPage() {\n// System.out.println(\"index :\"+i);\r\n// System.out.println(\"##########\");\r\n lisOfProduct = serv.read();\r\n CurrP--;\r\n if (CurrP < nbP) {\r\n i = 0;\r\n indexOfImage = CurrP * 6 + i;\r\n loadImage1(lisOfProduct.get(x).getImg_url());\r\n i++;\r\n x = CurrP * 6 + i;\r\n System.out.println(\" i: \" + i + \"Curr: \" + CurrP + \"i in page: \" + x);\r\n\r\n loadImage1(lisOfProduct.get(indexOfImage).getImg_url());\r\n indexOfImage++;\r\n loadImage2(lisOfProduct.get(indexOfImage).getImg_url());\r\n indexOfImage++;\r\n loadImage3(lisOfProduct.get(indexOfImage).getImg_url());\r\n indexOfImage++;\r\n loadImage4(lisOfProduct.get(indexOfImage).getImg_url());\r\n indexOfImage++;\r\n loadImage5(lisOfProduct.get(indexOfImage).getImg_url()); \r\n indexOfImage++;\r\n loadImage6(lisOfProduct.get(indexOfImage).getImg_url());\r\n \r\n indexOfImage++;\r\n }\r\n indexOfImage -= 5;\r\n// IntStream.range(0, 1).forEach(\r\n// i -> next.fire()\r\n// ); \r\n\r\n// CurrP = 0;\r\n// i = 0;\r\n }", "public void setPrecioc(int p){\n this.precioc=p;\n \n }", "public void reiniciar() {\r\n\t\tauxiliar = primeira;//auxiliar recebe a primeira\r\n\t}", "public static void take() {\r\n\t\t\r\n\t\tif (ths.page == 4) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "public static void move() {\r\n\t\t\r\n\t\tif (ths.page == 1) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "public Leiho4ZerbitzuGehigarriak(Ostatua hartutakoOstatua, double prezioTot, Date dataSartze, Date dataIrtetze,\r\n\t\t\tint logelaTot, int pertsonaKop) {\r\n\t\tsetIconImage(Toolkit.getDefaultToolkit().getImage(\".\\\\Argazkiak\\\\logoa.png\"));\r\n\t\tgetContentPane().setLayout(null);\r\n\t\tthis.setBounds(350, 50, 600, 600);\r\n\t\tthis.setResizable(false); // neurketak ez aldatzeko\r\n\t\tthis.setSize(new Dimension(600, 600));\r\n\t\tthis.setTitle(\"Airour ostatu bilatzailea\");\r\n\t\tprezioTot2 = prezioTot;\r\n\t\t// botoiak\r\n\t\tbtn_next.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tMetodoakLeihoAldaketa.bostgarrenLeihoa(hartutakoOstatua, prezioTot2, dataSartze, dataIrtetze, logelaTot,\r\n\t\t\t\t\t\tpertsonaKop, cboxPentsioa.getSelectedItem() + \"\", zerbitzuArray, gosaria);\r\n\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_next.setBounds(423, 508, 122, 32);\r\n\t\tbtn_next.setFont(new Font(\"Tahoma\", Font.ITALIC, 16));\r\n\t\tbtn_next.setBackground(Color.LIGHT_GRAY);\r\n\t\tbtn_next.setForeground(Color.RED);\r\n\t\tgetContentPane().add(btn_next);\r\n\r\n\t\tbtn_prev.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// System.out.println(hartutakoOstatua.getOstatuMota());\r\n\t\t\t\tif (hartutakoOstatua.getOstatuMota().equals(\"H\"))\r\n\t\t\t\t\tMetodoakLeihoAldaketa.hirugarrenLeihoaHotelak(hartutakoOstatua, dataSartze, dataIrtetze);\r\n\t\t\t\telse\r\n\t\t\t\t\tMetodoakLeihoAldaketa.hirugarrenLeihoaEtxeak(hartutakoOstatua, prezioTot, dataIrtetze, dataIrtetze);\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_prev.setBounds(38, 508, 107, 32);\r\n\t\tbtn_prev.setFont(new Font(\"Tahoma\", Font.ITALIC, 16));\r\n\t\tbtn_prev.setForeground(Color.RED);\r\n\t\tbtn_prev.setBackground(Color.LIGHT_GRAY);\r\n\t\tgetContentPane().add(btn_prev);\r\n\r\n\t\trestart.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tMetodoakLeihoAldaketa.lehenengoLeihoa();\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\trestart.setBounds(245, 508, 72, 32);\r\n\t\trestart.setForeground(Color.RED);\r\n\t\trestart.setBackground(Color.LIGHT_GRAY);\r\n\t\tgetContentPane().add(restart);\r\n\r\n\t\t// panela\r\n\t\tlblIzena.setText(hartutakoOstatua.getIzena());\r\n\t\tlblIzena.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblIzena.setFont(new Font(\"Verdana\", Font.BOLD | Font.ITALIC, 21));\r\n\t\tlblIzena.setBounds(0, 13, 594, 32);\r\n\t\tgetContentPane().add(lblIzena);\r\n\r\n\t\tlblLogelak.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tlblLogelak.setBounds(210, 114, 72, 25);\r\n\t\tgetContentPane().add(lblLogelak);\r\n\r\n\t\ttxtLogelak = new JTextField();\r\n\t\ttxtLogelak.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\ttxtLogelak.setEditable(false);\r\n\t\ttxtLogelak.setText(logelaTot + \"\");\r\n\t\ttxtLogelak.setBounds(285, 116, 32, 20);\r\n\t\ttxtLogelak.setColumns(10);\r\n\t\tgetContentPane().add(txtLogelak);\r\n\r\n\t\tlblPentsioa.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tlblPentsioa.setBounds(210, 165, 72, 14);\r\n\t\tif (!hartutakoOstatua.getOstatuMota().equals(\"H\"))\r\n\t\t\tlblPentsioa.setVisible(false);\r\n\t\tgetContentPane().add(lblPentsioa);\r\n\r\n\t\tcboxPentsioa.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tcboxPentsioa.addItem(\"Pentsiorik ez\");\r\n\t\tcboxPentsioa.addItem(\"Erdia\");\r\n\t\tcboxPentsioa.addItem(\"Osoa\");\r\n\t\tcboxPentsioa.setBounds(285, 162, 111, 20);\r\n\t\tgetContentPane().add(cboxPentsioa);\r\n\t\tif (!hartutakoOstatua.getOstatuMota().equals(\"H\"))\r\n\t\t\tcboxPentsioa.setVisible(false);\r\n\r\n\t\tcboxPentsioa.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tint gauak = (int) ((dataIrtetze.getTime() - dataSartze.getTime()) / 86400000);\r\n\r\n\t\t\t\tif (cboxPentsioa.getSelectedItem().equals(\"Pentsiorik ez\")) {\r\n\t\t\t\t\tprezioTot2 = prezioTot2 - pentsioPrez;\r\n\t\t\t\t\tpentsioPrez = 0;\r\n\t\t\t\t} else if (cboxPentsioa.getSelectedItem().equals(\"Erdia\")) {\r\n\t\t\t\t\tprezioTot2 = prezioTot2 - pentsioPrez;\r\n\t\t\t\t\tpentsioPrez = 5 * gauak;\r\n\t\t\t\t\tprezioTot2 = prezioTot2 + pentsioPrez;\r\n\t\t\t\t} else if (cboxPentsioa.getSelectedItem().equals(\"Osoa\")) {\r\n\t\t\t\t\tprezioTot2 = prezioTot2 - pentsioPrez;\r\n\t\t\t\t\tpentsioPrez = 10 * gauak;\r\n\t\t\t\t\tprezioTot2 = prezioTot2 + pentsioPrez;\r\n\t\t\t\t}\r\n\t\t\t\ttxtPrezioa.setText(prezioTot2 + \" €\");\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tchckbxGosaria.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tchckbxGosaria.setBounds(245, 201, 97, 23);\r\n\t\tchckbxGosaria.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tint gauak = (int) ((dataIrtetze.getTime() - dataSartze.getTime()) / 86400000);\r\n\t\t\t\tdouble gosariPrezioa = 3 * gauak;\r\n\t\t\t\tif (chckbxGosaria.isSelected()) {\r\n\t\t\t\t\tprezioTot2 = prezioTot2 + gosariPrezioa;\r\n\t\t\t\t\tgosaria = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tgosaria = false;\r\n\t\t\t\t\tprezioTot2 = prezioTot2 - gosariPrezioa;\r\n\t\t\t\t}\r\n\t\t\t\ttxtPrezioa.setText(prezioTot2 + \" €\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tgetContentPane().add(chckbxGosaria);\r\n\r\n\t\tlblZerbitzuak.setFont(new Font(\"Verdana\", Font.BOLD, 16));\r\n\t\tlblZerbitzuak.setBounds(51, 244, 230, 25);\r\n\t\tgetContentPane().add(lblZerbitzuak);\r\n\r\n\t\t// gehigarriak\r\n\t\tzerbitzuArray = MetodoakKontsultak.zerbitzuakOstatuanMet(hartutakoOstatua);\r\n\r\n\t\tmodelo.addColumn(\"Izena:\");\r\n\t\tmodelo.addColumn(\"Prezio gehigarria:\");\r\n\t\tmodelo.addColumn(\"Hartuta:\");\r\n\r\n\t\t// tabla datuak\r\n\t\ttable = new JTable(modelo);\r\n\t\ttable.setShowVerticalLines(false);\r\n\t\ttable.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\ttable.setFont(new Font(\"Verdana\", Font.PLAIN, 14));\r\n\r\n\t\ttable.getColumnModel().getColumn(0).setPreferredWidth(150);\r\n\t\ttable.getColumnModel().getColumn(1).setPreferredWidth(150);\r\n\t\ttable.getColumnModel().getColumn(1).setPreferredWidth(150);\r\n\r\n\t\ttable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n\t\ttable.getTableHeader().setResizingAllowed(false);\r\n\t\ttable.setRowHeight(32);\r\n\t\ttable.setBackground(Color.LIGHT_GRAY);\r\n\t\ttable.setBounds(24, 152, 544, 42);\r\n\t\ttable.getTableHeader().setFont(new Font(\"Verdana\", Font.BOLD, 15));\r\n\t\ttable.getTableHeader().setReorderingAllowed(false);\r\n\t\tgetContentPane().add(table);\r\n\r\n\t\ttable.addMouseListener(new java.awt.event.MouseAdapter() {\r\n\t\t\tpublic void mousePressed(MouseEvent me) {\r\n\t\t\t\tif (me.getClickCount() == 1) {\r\n\t\t\t\t\ti = 1;\r\n\t\t\t\t\tif (table.getValueAt(table.getSelectedRow(), 2).equals(\"Ez\"))\r\n\t\t\t\t\t\ti = 1;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\ti = 2;\r\n\t\t\t\t\tif (i == 1) {\r\n\t\t\t\t\t\ttable.setValueAt(\"Bai\", table.getSelectedRow(), 2);\r\n\t\t\t\t\t\tprezioTot2 = prezioTot2 + zerbitzuArray.get(table.getSelectedRow()).getPrezioa();\r\n\t\t\t\t\t\tzerbitzuArray.get(table.getSelectedRow()).setHartuta(\"Bai\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (i == 2) {\r\n\t\t\t\t\t\ttable.setValueAt(\"Ez\", table.getSelectedRow(), 2);\r\n\t\t\t\t\t\tprezioTot2 = prezioTot2 - zerbitzuArray.get(table.getSelectedRow()).getPrezioa();\r\n\t\t\t\t\t\tzerbitzuArray.get(table.getSelectedRow()).setHartuta(\"Ez\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttxtPrezioa.setText(prezioTot2 + \" €\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\ti = 1;\r\n\t\t\t\t\t\tif (table.getValueAt(table.getSelectedRow(), 2).equals(\"Ez\"))\r\n\t\t\t\t\t\t\ti = 1;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\ti = 2;\r\n\t\t\t\t\t\tif (i == 1) {\r\n\t\t\t\t\t\t\ttable.setValueAt(\"Bai\", table.getSelectedRow(), 2);\r\n\t\t\t\t\t\t\tprezioTot2 = prezioTot2 + zerbitzuArray.get(table.getSelectedRow()).getPrezioa();\r\n\t\t\t\t\t\t\tzerbitzuArray.get(table.getSelectedRow()).setHartuta(\"Bai\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (i == 2) {\r\n\t\t\t\t\t\t\ttable.setValueAt(\"Ez\", table.getSelectedRow(), 2);\r\n\t\t\t\t\t\t\tprezioTot2 = prezioTot2 - zerbitzuArray.get(table.getSelectedRow()).getPrezioa();\r\n\t\t\t\t\t\t\tzerbitzuArray.get(table.getSelectedRow()).setHartuta(\"Ez\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttxtPrezioa.setText(prezioTot2 + \" €\");\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tscrollPane = new JScrollPane(table);\r\n\t\tscrollPane.setViewportBorder(null);\r\n\t\tscrollPane.setBounds(20, 282, 562, 188);\r\n\r\n\t\tgetContentPane().add(scrollPane);\r\n\r\n\t\tfor (HartutakoOstatuarenZerbitzuak zerb : zerbitzuArray) {\r\n\t\t\tarray[0] = zerb.getIzena();\r\n\t\t\tarray[1] = zerb.getPrezioa() + \" €\";\r\n\t\t\tarray[2] = \"Ez\";\r\n\t\t\tmodelo.addRow(array);\r\n\t\t}\r\n\t\ttable.setModel(modelo);\r\n\r\n\t\tlblPrezioa.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\tlblPrezioa.setBounds(210, 72, 63, 14);\r\n\t\tgetContentPane().add(lblPrezioa);\r\n\r\n\t\ttxtPrezioa = new JTextField();\r\n\t\ttxtPrezioa.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\ttxtPrezioa.setText(prezioTot2 + \" €\");\r\n\t\ttxtPrezioa.setEditable(false);\r\n\t\ttxtPrezioa.setBounds(274, 70, 136, 20);\r\n\t\ttxtPrezioa.setColumns(10);\r\n\t\tgetContentPane().add(txtPrezioa);\r\n\r\n\t}", "int getPageNumber();", "public void setPages(int pages) {\n this.pages = pages;\n }", "short getPageStart();", "public void setStartingPage(int startingPage) {\n if(startingPage <= 0){\n this.startingPage = 1;\n }else{\n this.startingPage = startingPage;\n }\n }", "public void VaciarPila()\n {\n this.tope = 0;\n }", "public void nourrir() {\n if (!autoriseOperation()) {\n return;\n }\n\n incrFaim(-2);\n incrPoids(1);\n incrHumeur(1);\n incrXp(1);\n\n System.out.println(tamagoStats.getXp());\n setChanged();\n notifyObservers();\n\n }", "@Override // Métodos que fazem a anulação\n\tpublic void pagaIR() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "public void resetPagina()\r\n {\r\n this.pagina = null;\r\n }", "void verEnPantalla() {\r\n\t\tSystem.out.println( numEnPantalla );\r\n\t}", "public static void main(String[] args) throws IOException {\n\n int[] h = new int[26];\n\n// String[] hItems = scanner.nextLine().split(\" \");\n// scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n// for (int i = 0; i < 26; i++) {\n// int hItem = Integer.parseInt(hItems[i]);\n// h[i] = hItem;\n// }\n h[0] = 1;\n h[1] = 3;\n h[2] = 1;\n h[3] = 3;\n h[4] = 1;\n h[5] = 4;\n h[6] = 1;\n h[7] = 3;\n h[8] = 2;\n h[9] = 5;\n h[10] = 5;\n h[11] = 5;\n h[12] = 5;\n h[13] = 5;\n h[14] = 5;\n h[15] = 5;\n h[16] = 5;\n h[17] = 5;\n h[18] = 5;\n h[19] = 5;\n h[20] = 5;\n h[21] = 5;\n h[22] = 5;\n h[23] = 5;\n h[24] = 5;\n h[25] = 7;\n\n\n String word = \"zaba\";\n\n int result = designerPdfViewer(h, word);\n\n// bufferedWriter.write(String.valueOf(result));\n// bufferedWriter.newLine();\n//\n// bufferedWriter.close();\n\n// scanner.close();\n }", "@Override\r\n\tpublic void mypage() {\n\t\t\r\n\t}", "private void procedureBasePrDessin(){\n if(courante == null){\n reset();\n courante = new Tortue(simpleLogo.getFeuille(), true);\n simpleLogo.setBarreOutilsVisible(true);\n }\n }", "public void init() {\n\n\n verdiend = 133;\n\n verdeling = verdiend / 4;\n }", "public void setPage(int value) {\n this.page = value;\n }", "@Override\n\tpublic void maasHesapla() {\n\t\tSystem.out.println(\"isciler icin maas 5000 tl \");\n \t\t\n\t}", "public void act(){\n if(mainMenu!=null){\n if((Greenfoot.mouseClicked(callMenu.getCallMenu()))) {\n Greenfoot.setWorld(mainMenu); \n }\n }\n if(pauseMenu!=null){\n if((Greenfoot.mouseClicked(callMenu.getCallMenu()))) {\n Greenfoot.setWorld(pauseMenu); \n }\n }\n if(choiceMenu!=null){\n if((Greenfoot.mouseClicked(callMenu.getCallMenu()))) {\n Greenfoot.setWorld(choiceMenu); \n }\n }\n if(actual == 1){\n prePage.setImage(new GreenfootImage(\"\", 0, null, null));\n nextPage.setImagine(\"sipka1\");\n if((Greenfoot.mouseClicked(nextPage.getLabel()))) {\n setBackground(\"images/manual2.png\");\n actual = 2;\n }\n }\n else if(actual == 2){\n nextPage.setImagine(\"sipka1\");\n prePage.setImagine(\"sipka0\");\n if((Greenfoot.mouseClicked(nextPage.getLabel()))) {\n setBackground(\"images/manual3.png\");\n actual = 3;\n }\n if((Greenfoot.mouseClicked(prePage.getLabel()))) {\n setBackground(\"images/manual1.png\");\n actual = 1;\n }\n }\n else if(actual == 3){\n nextPage.setImagine(\"sipka1\");\n if((Greenfoot.mouseClicked(nextPage.getLabel()))) {\n setBackground(\"images/manual4.png\");\n actual = 4;\n }\n if((Greenfoot.mouseClicked(prePage.getLabel()))) {\n setBackground(\"images/manual2.png\");\n actual = 2;\n }\n }\n else if(actual == 4){\n nextPage.setImagine(\"sipka1\");\n if((Greenfoot.mouseClicked(nextPage.getLabel()))) {\n setBackground(\"images/manual5.png\");\n actual = 5;\n }\n if((Greenfoot.mouseClicked(prePage.getLabel()))) {\n setBackground(\"images/manual3.png\");\n actual = 3;\n }\n }\n else if(actual == 5){\n nextPage.setImage(new GreenfootImage(\"\", 0, null, null));\n if((Greenfoot.mouseClicked(prePage.getLabel()))) {\n setBackground(\"images/manual4.png\");\n actual = 4;\n }\n }\n }", "@Override\r\n\tpublic int[] calPageParameter(int curPage) {\n\t\tint start = curPage*BATCH_NUM+1;\r\n\t\tint end = (curPage+1)*BATCH_NUM;\r\n return new int[]{start,end};\r\n\t}", "private static int prework(HtmlPage page) {\n\t\tint freeIndex=-1;\n\t\tfor (int i=1; i<25; i++) {\n\t\t\ttry {\n\t\t\t\tString slnValue=page.getElementByName(\"sln\"+i).getAttribute(\"value\");\n\t\t\t\tif (slnValue==DomElement.ATTRIBUTE_NOT_DEFINED \n\t\t\t\t\t\t|| slnValue==DomElement.ATTRIBUTE_VALUE_EMPTY || slnValue.length()==0) {\n\t\t\t\t\tfreeIndex=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (ElementNotFoundException e) {}\n\t\t}\n\t\treturn freeIndex;\n\t}", "public void hitunganRule1(){\n penebaranBibitSedikit = 1200;\r\n hariPanenSedang = 50;\r\n \r\n //menentukan niu\r\n nBibit = (1500 - penebaranBibitSedikit) / (1500 - 500);\r\n \r\n //menentukan niu hari panen sedang\r\n if ((hariPanenSedang >=40) && (hariPanenSedang <=80)) {\r\n nPanen = (hariPanenSedang - 40) / (80 - 40);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a1 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a1 = nPanen;\r\n }\r\n \r\n //tentukan Z1\r\n z1 = (penebaranBibitSedikit + hariPanenSedang) * 700;\r\n System.out.println(\"a1 = \" + String.valueOf(a1));\r\n System.out.println(\"z1 = \" + String.valueOf(z1));\r\n }", "public void precioFinal(){\r\n if(getConsumoEnergetico() == Letra.A){\r\n precioBase = 100+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.B)){\r\n precioBase = 80+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.C){\r\n precioBase = 60+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.D)){\r\n precioBase = 50+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.E){\r\n precioBase = 30+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.F)){\r\n precioBase = 10+precioBase;\r\n }\r\n else{\r\n aux=1;\r\n System.out.println(\"...No existe...\");\r\n }\r\n if (aux==0){\r\n peso();\r\n }\r\n \r\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int frames = 0, numPaginas = 0, cupoRevisado = 0, punteroExiste = -1, fallos = 0;\n boolean existe = false;\n String paginasIngresadas = \"\", accion = \"\";\n\n ArrayList paginas = new ArrayList();\n ArrayList bitPaginas = new ArrayList();\n ArrayList paginasAccedidas = new ArrayList();\n\n System.out.print(\"Ingrese numero de frames: \");\n frames = sc.nextInt();\n \n System.out.println(\"\");\n\n System.out.print(\"Ingrese cantidad de paginas: \");\n numPaginas = sc.nextInt();\n \n System.out.println(\"\");\n \n for (int i = 0; i < numPaginas; i++) {\n paginas.add((int)Math.floor(Math.random() * 20) + 1);\n }\n// System.out.print(\"Ingrese paginas separadas por coma (ej: 1,2,3,4): \");\n// paginasIngresadas = sc.next();\n\n// String[] paginasParseadas = paginasIngresadas.split(\",\");\n// numPaginas = paginasParseadas.length;\n//\n// for(int i = 0; i < paginasParseadas.length; i++) {\n// paginas.add(Integer.parseInt(paginasParseadas[i]));\n// }\n \n paginasAccedidas.add(paginas.get(0));\n bitPaginas.add(1);\n fallos++;\n\n accion = \"Se ingreso la pagina \" + paginasAccedidas.get(0) + \" con bit inicialzado en 1\";\n accion += \", fallos = \" + fallos;\n\n System.out.println(\"\");\n\n //Algoritmo de segunda oportunidad\n for(int i = 0; i < numPaginas; i++) {\n cupoRevisado = 0;\n existe = false;\n\n if(paginasAccedidas.size() == frames){\n for(int j = 0; j < paginasAccedidas.size(); j++) {\n if(((int)paginasAccedidas.get(j) == ((int)paginas.get(i)))){\n existe = true;\n if(((int)bitPaginas.get(j)) == 0) {\n bitPaginas.set(j, 1);\n accion = \"La pagina \" + paginasAccedidas.get(j) + \" ya existe en la tabla de paginas, su bit cambio de 0 a 1\";\n\n j = paginasAccedidas.size();\n }\n }\n }\n\n if(!existe){\n for(int j = 0; j < paginasAccedidas.size(); j++) {\n if(((int)bitPaginas.get(j)) == 0) {\n accion = \"Se reemplazo la pagina \" + paginasAccedidas.get(j) + \" con bit 0 por la pagina entrante \" + paginas.get(i) + \" inicializada con bit 1\";\n paginasAccedidas.set(j, paginas.get(i));\n fallos++;\n\n accion += \", fallos = \" + fallos;\n\n bitPaginas.set(j, 1);\n \n j = paginasAccedidas.size(); \n } else {\n cupoRevisado++;\n }\n }\n }\n\n if(cupoRevisado == frames) {\n for(int j = 0; j < paginasAccedidas.size(); j++) {\n bitPaginas.set(j, 0);\n }\n\n for(int j = 0; j < paginasAccedidas.size(); j++) {\n if(((int)bitPaginas.get(j)) == 0) {\n accion = \"Todas las paginas son irremplazables, se cambiaron todos los bits de 1 a 0 y se reemplazo la pagina \" + paginasAccedidas.get(j) + \" por la pagina entrante \" + paginas.get(i);\n paginasAccedidas.set(j, paginas.get(i));\n fallos++;\n\n accion += \", fallos = \" + fallos;\n\n bitPaginas.set(j, 1);\n \n j = paginasAccedidas.size(); \n } else {\n cupoRevisado++;\n }\n }\n }\n } else {\n for(int j = 0; j < paginasAccedidas.size(); j++) {\n if(((int)paginasAccedidas.get(j) == ((int)paginas.get(i)))){\n existe = true;\n if(((int)bitPaginas.get(j)) == 0) {\n accion = \"La pagina \" + paginasAccedidas.get(j) + \" ya existe en la tabla de paginas, su bit cambio de 0 a 1\";\n bitPaginas.set(j, 1);\n\n j = paginasAccedidas.size();\n }\n } else {\n if(!existe) {\n paginasAccedidas.add(paginas.get(i));\n fallos++;\n\n accion = \"Se ingreso la pagina \" + paginas.get(i) + \" con bit inicializado en 1\";\n accion += \", fallos = \" + fallos;\n\n bitPaginas.add(1);\n\n j = paginasAccedidas.size();\n }\n }\n }\n }\n\n if(accion != \"\"){\n for(int j = 0; j < frames; j++){\n if(j < paginasAccedidas.size()){\n System.out.print(\" [ \" + paginasAccedidas.get(j) + \" ]\" + \"[ \" + bitPaginas.get(j) + \" ] \");\n } else {\n System.out.print(\" [ ][ ] \");\n }\n }\n \n System.out.println(\" Accion realizada: \" + accion);\n accion = \"\";\n\n System.out.println();\n } else {\n for(int j = 0; j < frames; j++){\n if(j < paginasAccedidas.size()){\n System.out.print(\" [ \" + paginasAccedidas.get(j) + \" ]\" + \"[ \" + bitPaginas.get(j) + \" ] \");\n } else {\n System.out.print(\" [ ][ ] \");\n }\n }\n \n System.out.println(\" Accion realizada: La pagina entrante \" + paginas.get(i) + \" ya existe en la tabla y su bit esta inicializado en 1\");\n accion = \"\";\n\n System.out.println();\n }\n }\n\n System.out.println(\"El numero de fallos fue: \" + fallos);\n \n }", "public void setAnio(int anio){\r\n \r\n \r\n this.anio = anio;\r\n \r\n }", "@Override\n public void movimiento_especial(){\n\n movesp=ataque/2;\n defensa+=5;\n PP= PP-4;\n }", "void showPage1(){\n displayPage();\n up.setVisible(false);\n if(page != maxPage){\n down.setVisible(true);\n }\n back.setVisible(true);\n next.setVisible(true);\n go.setVisible(true);\n txtPage.setVisible(true);\n for(int i = 0; i < lbl.size() && i < max;i++){\n lbl.get(i).setVisible(true);\n select.get(i).setVisible(true);\n deselect.get(i).setVisible(true);\n if(chars.contains(i)){\n select.get(i).setEnabled(false);\n deselect.get(i).setEnabled(true);\n }else{\n select.get(i).setEnabled(true);\n deselect.get(i).setEnabled(false);\n }\n }\n }", "public static void talk() {\r\n\t\t\r\n\t\tif (ths.page == 3) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "int getNumPages();", "private void forwardPage()\n {\n page++;\n open();\n }", "public static void main(String[] args) {\n\t\tScanner keyboard = new Scanner(System.in);\r\n\t\tRandom r = new Random();\r\n\t\tint frames = 0;\r\n\t\tint fault = 0;\r\n\t\tint pointer = 0;\r\n\t\tint ref_len = 100;\r\n\t\tint buffer[];\r\n\t\tint reference[];\r\n\t\treference = new int [ref_len];\r\n\t\tint mem_layout[][];\r\n\t\t\r\n\t\t//get number of frames\r\n\t\tSystem.out.println(\"Enter number of page frames available\");\r\n\t\tframes = keyboard.nextInt();\r\n\t\t\r\n\t\t//validate number of frames is between 2 and 7\r\n\t\twhile(frames > 7 || frames < 2){\r\n\t\t\tSystem.out.println(\"Please enter a valid number\");\r\n\t\t\tframes = keyboard.nextInt();\r\n\t\t}\r\n\t\t\r\n\t\tmem_layout = new int[ref_len][frames];\r\n\t\tbuffer = new int[frames];\r\n\t\t\r\n\t\t//fill reference with pages\r\n\t\tfor(int i = 0; i < ref_len; i++)\r\n {\r\n\t\t\tint address = r.nextInt(65536);\r\n\t\t\tint page = address / 4096;\r\n reference[i] = page;\r\n }\r\n\t\t\r\n\t\tSystem.out.println();\r\n for(int i = 0; i < ref_len; i++)\r\n {\r\n int search = -1;\r\n for(int j = 0; j < frames; j++) //sets search to be equal to page if no page is available to replace and moves to next frame\r\n {\r\n if(buffer[j] == reference[i])\r\n {\r\n search = j;\r\n break;\r\n } \r\n }\r\n if(search == -1) //replaces page and increments fault \r\n {\r\n buffer[pointer] = reference[i]; \r\n fault++;\r\n pointer++;\r\n if(pointer == frames)\r\n pointer = 0;\r\n }\r\n for(int j = 0; j < frames; j++)\r\n mem_layout[i][j] = buffer[j];\r\n }\r\n System.out.println(\"Page Reference\");\r\n for(int i = 0; i < ref_len; i++){\r\n \tSystem.out.printf(\"%3d \", reference[i]);\r\n }\r\n System.out.println();\r\n System.out.println();\r\n System.out.println(\"Frames\");\r\n //output layout of frames and how they change\r\n for(int i = 0; i < frames; i++)\r\n {\r\n for(int j = 0; j < ref_len; j++)\r\n System.out.printf(\"%3d \",mem_layout[j][i]);\r\n System.out.println();\r\n }\r\n \r\n System.out.println(\"The number of Faults: \" + fault);\r\n keyboard.close();\r\n\t}", "public void setCp(int currentPage) {\n\t\tthis.currentPage = currentPage;\n\t}", "public void setPageLink(String gowhich){\n\t\tif(gowhich==null)\n\t\t\tgowhich=\"\";\n\t\tif(gowhich.indexOf(\"?\")>=0)\n\t\t\tgowhich+=\"&\";\n\t\telse\n\t\t\tgowhich+=\"?\";\n\t\tif(AllP>1){\n\t\t\tPageLink=\"<table border='0' cellpadding='3'><tr><td>\";\n\t\t\tif(CurrentP>1){\n\t\t\t\tPageLink+=\"<a href='\"+gowhich+\"showpage=1'>��First��</a>&nbsp;\";\n\t\t\t\tPageLink+=\"<a href='\"+gowhich+\"showpage=\"+(CurrentP-1)+\"'>��Previous��</a>&nbsp;\";\n\t\t\t}\n\t\t\tif(CurrentP<AllP){\n\t\t\t\tPageLink+=\"<a href='\"+gowhich+\"showpage=\"+(CurrentP+1)+\"'>��Next��</a>&nbsp;\";\n\t\t\t\tPageLink+=\"<a href='\"+gowhich+\"showpage=\"+AllP+\"'>��Last��</a>\";\n\t\t\t}\n\t\t\tPageLink+=\"</td></tr></table>\";\t\t\t\n\t\t}\t\t\n\t}", "public void setcurrentPara(int p){\r\n currentPara= p;\r\n \r\n }", "private void posicionInicial(int ancho){\r\n posicionX = ancho;\r\n Random aleatroio = new Random();\r\n int desplazamiento = aleatroio.nextInt(150)+100;\r\n \r\n \r\n cazaTie = new Rectangle2D.Double(posicionX, desplazamiento, anchoEnemigo, alturaEnemigo);\r\n }", "public void pintar(PApplet app) {\n\t\tapp.image(pantallasImg[pantalla], 0, 0, app.width, app.height);\n\t\tpintarCamposRegistro(app, index);\n\t\tlistarUsuarios(app);\n\n\t\tif (pantalla == 0) {\n\t\t\tif (app.mouseX >= 10 && app.mouseX <= 190 && app.mouseY >= 580 && app.mouseY <= 630) {\n\t\t\t\tapp.image(iniS2, 10, 580);\n\n\t\t\t} else {\n\t\t\t\tapp.image(iniS, 10, 580);\n\t\t\t}\n\n\t\t\tif (app.mouseX >= 200 && app.mouseX <= 600 && app.mouseY >= 580 && app.mouseY <= 630) {\n\t\t\t\tapp.image(reg2, 200, 580);\n\t\t\t} else {\n\t\t\t\tapp.image(reg, 200, 580);\n\n\t\t\t}\n\n\t\t\tapp.image(quit, 50, 650);\n\n\t\t} else if (pantalla == 1) {\n\n\t\t\tif (app.mouseX >= 45 && app.mouseX <= 394 && app.mouseY >= 20 && app.mouseY <= 60) {\n\t\t\t\tapp.image(back1, 45, 20);\n\t\t\t} else {\n\t\t\t\tapp.image(back, 45, 20);\n\t\t\t}\n\t\t\t// BOTON CUANDO NO TIENE CUENTA Y LE DA CLICK EN REGISTRARSE\n\t\t\tapp.image(noacount, 70, 650);\n\n\t\t\t// BOTON PARA ENTRAR\n\t\t\tif (app.mouseX >= 70 && app.mouseX <= 332 && app.mouseY >= 500 && app.mouseY <= 573) {\n\t\t\t\tapp.image(entrar, 69, 498, 265, 78);\n\t\t\t} else {\n\t\t\t\tapp.image(entrar, 70, 500, 262, 73);\n\t\t\t}\n\n\t\t\tapp.image(ask, 330, 435);\n\n\t\t} else if (pantalla == 2) {\n\n\t\t\t// BOTON PARA DEVOLVERSE\n\t\t\tif (app.mouseX >= 45 && app.mouseX <= 394 && app.mouseY >= 20 && app.mouseY <= 60) {\n\t\t\t\tapp.image(back1, 45, 20);\n\t\t\t} else {\n\t\t\t\tapp.image(regback, 45, 20);\n\t\t\t}\n\n\t\t\t/// BOTON PARA SUBIR FOTO\n\t\t\tif (app.mouseX >= 110 && app.mouseX <= 270 && app.mouseY >= 90 && app.mouseY <= 237) {\n\t\t\t\tapp.image(photo, 109, 84, 165, 165);\n\t\t\t} else {\n\t\t\t\tapp.image(photo, 110, 85, 162, 162);\n\t\t\t}\n\n\t\t\t// BOTON PARA FINALIZAR REGISTRO\n\n\t\t\tif (app.mouseX >= 60 && app.mouseX <= 331 && app.mouseY >= 600 && app.mouseY <= 674) {\n\t\t\t\tapp.image(finish, 59, 599, 273, 77);\n\t\t\t} else {\n\t\t\t\tapp.image(finish, 60, 600);\n\t\t\t}\n\n\t\t} else if (pantalla == 3) {\n\n\t\t\t// BOTON PARA DEVOLVERSE\n\t\t\tif (app.mouseX >= 45 && app.mouseX <= 394 && app.mouseY >= 20 && app.mouseY <= 60) {\n\t\t\t\tapp.image(back1, 45, 20);\n\t\t\t} else {\n\t\t\t\tapp.image(instrucciones, 45, 20);\n\t\t\t}\n\n\t\t\t// BOTON PARA EMPEZAR EL TEST\n\t\t\tif (app.mouseX >= 60 && app.mouseX <= 331 && app.mouseY >= 600 && app.mouseY <= 674) {\n\t\t\t\tapp.image(next, 60, 609, 273, 78);\n\t\t\t} else {\n\t\t\t\tapp.image(next, 60, 610, 270, 75);\n\t\t\t}\n\n\t\t} else if (pantalla > 3 && pantalla < 16) {\n\n\t\t\t// BOTON PARA DEVOLVERSE\n\t\t\tif (app.mouseX >= 45 && app.mouseX <= 394 && app.mouseY >= 20 && app.mouseY <= 60) {\n\t\t\t\tapp.image(back1, 45, 20);\n\t\t\t} else {\n\t\t\t\tapp.image(volver, 45, 20);\n\t\t\t}\n\n\t\t} else if (pantalla == 16) {\n\n\t\t\tif (app.mouseX >= 60 && app.mouseX <= 341 && app.mouseY >= 550 && app.mouseY <= 632) {\n\t\t\t\tapp.image(startnow, 60, 549, 283, 85);\n\t\t\t} else {\n\t\t\t\tapp.image(startnow, 60, 550);\n\t\t\t}\n\n\t\t} else if (pantalla == 17) {\n\n\t\t\t// BUTTON MENU DESPLEGABLE\n\t\t\tif (app.mouseX >= 340 && app.mouseX <= 380 && app.mouseY >= 23 && app.mouseY <= 60) {\n\t\t\t\tapp.image(iconmenu, 330, 19, 62, 46);\n\t\t\t} else {\n\t\t\t\tapp.image(iconmenu, 330, 20, 59, 43);\n\t\t\t}\n\n\t\t\t// BOTONES PRINCIPALES\n\t\t\tif (app.mouseX > 0 && app.mouseX < 200 && app.mouseY > 310 && app.mouseY < 510) {\n\t\t\t\tapp.image(crearplans, 0, 310);\n\t\t\t} else {\n\t\t\t\tapp.image(crearplan, 0, 310);\n\t\t\t}\n\n\t\t\tif (app.mouseX > 0 && app.mouseX < 200 && app.mouseY > 505 && app.mouseY < 705) {\n\t\t\t\tapp.image(topics, 0, 505);\n\t\t\t} else {\n\t\t\t\tapp.image(topic, 0, 505);\n\t\t\t}\n\t\t\tif (app.mouseX > 198 && app.mouseX < 400 && app.mouseY > 310 && app.mouseY < 510) {\n\t\t\t\tapp.image(toptens, 198, 310);\n\t\t\t} else {\n\t\t\t\tapp.image(topten, 198, 310);\n\t\t\t}\n\n\t\t\tif (app.mouseX > 198 && app.mouseX <= 400 && app.mouseY > 505 && app.mouseY < 705) {\n\t\t\t\tapp.image(perfils, 198, 505);\n\t\t\t} else {\n\t\t\t\tapp.image(perfil, 198, 505);\n\t\t\t}\n\n\t\t} else if (pantalla == 18) {\n\n\t\t\t// BUTTON MENU DESPLEGABLE\n\t\t\tif (app.mouseX > 340 && app.mouseX < 380 && app.mouseY > 23 && app.mouseY < 60) {\n\t\t\t\tapp.image(iconmenun, 330, 19, 62, 46);\n\t\t\t} else {\n\t\t\t\tapp.image(iconmenun, 330, 20, 59, 43);\n\t\t\t}\n\n\t\t\tif (app.mouseX > 0 && app.mouseX < 323 && app.mouseY > 140 && app.mouseY < 200) {\n\t\t\t\tapp.image(opmenups, -3, 140);\n\t\t\t} else {\n\t\t\t\tapp.image(opmenup, -3, 140);\n\t\t\t}\n\t\t\tif (app.mouseX > 0 && app.mouseX < 323 && app.mouseY > 200 && app.mouseY < 260) {\n\t\t\t\tapp.image(opmenuts, -3, 200);\n\t\t\t} else {\n\t\t\t\tapp.image(opmenut, -3, 200);\n\t\t\t}\n\t\t\tif (app.mouseX > 0 && app.mouseX < 323 && app.mouseY > 260 && app.mouseY < 320) {\n\t\t\t\tapp.image(opmenucsel, -3, 260);\n\t\t\t} else {\n\t\t\t\tapp.image(opmenuc, -3, 260);\n\t\t\t}\n\t\t\tif (app.mouseX > 0 && app.mouseX < 323 && app.mouseY > 320 && app.mouseY < 380) {\n\t\t\t\tapp.image(opmenucpsel, -3, 320);\n\t\t\t} else {\n\t\t\t\tapp.image(opmenucp, -3, 320);\n\t\t\t}\n\t\t\tif (app.mouseX > 0 && app.mouseX < 323 && app.mouseY > 380 && app.mouseY < 440) {\n\t\t\t\tapp.image(opmenuccs, -3, 380);\n\t\t\t} else {\n\t\t\t\tapp.image(opmenucc, -3, 380);\n\t\t\t}\n\t\t\tif (app.mouseX > 0 && app.mouseX < 323 && app.mouseY > 440 && app.mouseY < 500) {\n\t\t\t\tapp.image(opmenuas, -3, 440);\n\t\t\t} else {\n\t\t\t\tapp.image(opmenua, -3, 440);\n\t\t\t}\n\t\t\tif (app.mouseX > 0 && app.mouseX < 323 && app.mouseY > 620 && app.mouseY < 680) {\n\t\t\t\tapp.image(opmenucssel, -3, 620);\n\t\t\t} else {\n\t\t\t\tapp.image(opmenucs, -3, 620);\n\t\t\t}\n\t\t} else if (pantalla == 19) {\n\n\t\t\t/// CREAR PLAN\n\t\t\tapp.image(cpscreen, 0, 0);\n\n\t\t\tapp.image(cpscreen2, 0, 600);\n\t\t\tif (app.mouseX > 82 && app.mouseX < 638 && app.mouseY > 623 && app.mouseY < 685) {\n\t\t\t\tapp.image(results, 75, 619, 260, 70);\n\t\t\t} else {\n\t\t\t\tapp.image(results, 75, 620, 257, 67);\n\t\t\t}\n\n\t\t\t// BUTTON MENU DESPLEGABLE\n\t\t\tif (app.mouseX >= 340 && app.mouseX <= 380 && app.mouseY >= 23 && app.mouseY <= 60) {\n\t\t\t\tapp.image(iconmenu, 330, 19, 62, 46);\n\t\t\t} else {\n\t\t\t\tapp.image(iconmenu, 330, 20, 59, 43);\n\t\t\t}\n\n\t\t} else if (pantalla == 20) {\n\n\t\t\t// BUTTON MENU DESPLEGABLE\n\t\t\tif (app.mouseX >= 340 && app.mouseX <= 380 && app.mouseY >= 23 && app.mouseY <= 60) {\n\t\t\t\tapp.image(iconmenu, 330, 19, 62, 46);\n\t\t\t} else {\n\t\t\t\tapp.image(iconmenu, 330, 20, 59, 43);\n\t\t\t}\n\t\t\t\n\t\tapp.image(sup_resultados, 0, 0);\n\t\t\t\n\t\t\t\n\t\t} else if (pantalla == 21) {\n\n\t\t\t// BUTTON MENU DESPLEGABLE\n\t\t\tif (app.mouseX >= 340 && app.mouseX <= 380 && app.mouseY >= 23 && app.mouseY <= 60) {\n\t\t\t\tapp.image(iconmenu, 330, 19, 62, 46);\n\t\t\t} else {\n\t\t\t\tapp.image(iconmenu, 330, 20, 59, 43);\n\t\t\t}\n\t\t} else if (pantalla == 23) {\n\t\t\t// BUTTON MENU DESPLEGABLE\n\t\t\tif (app.mouseX > 340 && app.mouseX < 380 && app.mouseY > 23 && app.mouseY < 60) {\n\t\t\t\tapp.image(iconmenu, 330, 19, 62, 46);\n\t\t\t} else {\n\t\t\t\tapp.image(iconmenu, 330, 20, 59, 43);\n\t\t\t}\n\n\t\t\tif (app.mouseX > 38 && app.mouseX < 128 && app.mouseY > 302 && app.mouseY < 392) {\n\t\t\t\tapp.image(friendsselect, 35, 300);\n\t\t\t} else {\n\t\t\t\tapp.image(friends, 35, 300);\n\t\t\t}\n\n\t\t\tif (app.mouseX > 150 && app.mouseX < 241 && app.mouseY > 302 && app.mouseY < 392) {\n\t\t\t\tapp.image(likessel, 150, 300);\n\t\t\t} else {\n\t\t\t\tapp.image(likes, 150, 300);\n\t\t\t}\n\n\t\t\tif (app.mouseX > 266 && app.mouseX < 356 && app.mouseY > 302 && app.mouseY < 392) {\n\n\t\t\t\tapp.image(planesselect, 265, 300);\n\t\t\t} else {\n\t\t\t\tapp.image(planes, 265, 300);\n\t\t\t}\n\t\t} else if (pantalla == 24) {\n\n\n\n\t\t\t// BUTTON MENU DESPLEGABLE\n\t\t\tif (app.mouseX > 340 && app.mouseX < 380 && app.mouseY > 23 && app.mouseY < 60) {\n\t\t\t\tapp.image(iconmenu, 330, 19, 62, 46);\n\t\t\t} else {\n\t\t\t\tapp.image(iconmenu, 330, 20, 59, 43);\n\t\t\t}\n\t\t\t\n\t\t\tif(app.mouseX > 0 && app.mouseX<196 && app.mouseY >93 && app.mouseY <398 ){\n\t\t\t\tapp.image(btn_natures, 0, 93);\n\t\t\t}else {\n\t\t\t\tapp.image(btn_nature, 0, 93);\n\t\t\t}\n\t\t\t\n\t\t\tif(app.mouseX > 196 && app.mouseX<800 && app.mouseY >93 && app.mouseY <398){\n\t\t\tapp.image(btn_deportes, 197, 93);\n\t\t\t}else {\n\t\t\t\tapp.image(btn_deporte, 197, 93);\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(app.mouseX > 0 && app.mouseX<196 && app.mouseY >398 && app.mouseY <700 ){\n\t\t\tapp.image(btn_culturas, 0, 400);\n\t\t\t}else {\n\t\t\t\tapp.image(btn_cultura, 0, 400);\n\t\t\t}\n\t\t\t\n\t\t\tif(app.mouseX > 196 && app.mouseX<800 && app.mouseY >398 && app.mouseY <700 ){\n\t\t\tapp.image(btn_hobbies, 197, 400);\n\t\t\t}else {\n\t\t\t\tapp.image(btn_hobbie, 197, 400);\n\t\t\t}\n\n\t\t\n\t\t\n\t\t\t\n\n\t\t} if (pantalla == 25) {}\n\n\t}", "public void setPageX(Integer pageX) {\n this.pageX = pageX;\n }", "public static void main(String[] args) {\n\t\tScanner entrada = new Scanner(System.in);\n\t\tString tipo, tipo_pagamento;\n\t\tdouble quant, valor=0,preco_desc=0;\n\t\t\n\t\tSystem.out.print(\"Tipo: \");\n\t\ttipo = entrada.nextLine().toLowerCase();\n\t\tSystem.out.print(\"Quantidade: \");\n\t\tquant = entrada.nextDouble();\n\t\tentrada.nextLine();\n\t\tSystem.out.print(\"Tipo de pagamento: \");\n\t\ttipo_pagamento = entrada.nextLine();\n\t\t\n\t\tif(quant>5) {\n\t\t\tif (tipo.intern()==\"file\")\n\t\t\t\tvalor = quant*5.8;\n\t\t\telse if(tipo.intern() == \"alcatra\")\n\t\t\t\tvalor = quant*6.8;\n\t\t\telse if(tipo.intern() == \"picanha\")\n\t\t\t\tvalor = quant*7.8;\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Não esta funcionando:\"+tipo);\n\t\t}\n\t\t\n\t\telse {\n\t\t\tif (tipo.intern()==\"file\")\n\t\t\t\tvalor = quant*4.9;\n\t\t\telse if(tipo.intern() == \"Alcatra\")\n\t\t\t\tvalor = quant*5.9;\n\t\t\telse if(tipo.intern() == \"Picanha\")\n\t\t\t\tvalor = quant*6.9;\n\t\t}\n\t\t\n\t\tif (tipo_pagamento.intern() == \"cartão tabajara\")\n\t\t\tpreco_desc = valor*0.95;\n\t\t\n\t\tSystem.out.println(\"Tipo: \"+tipo);\n\t\tSystem.out.println(\"Quantidade \"+quant+\" Kg\");\n\t\tSystem.out.println(\"Preco total: R$\"+valor);\n\t\tSystem.out.println(\"Tipo de pagamento: \"+tipo_pagamento);\n\t\tSystem.out.println(\"Valor do desconto: R$\"+(Math.round(valor-preco_desc)));\n\t\tSystem.out.println(\"Valor a pagar: R$\"+preco_desc);\n\t\t\n\t\tentrada.close();\n\t}", "public void setPage(Page page) {this.page = page;}", "public Maquina() {\n savia = 0;\n reflejosLagrimas = 0;\n estado = false;\n }", "public void setAno( int ano ){\n this.ano = ano;\n }", "String getStartpage();", "public void setAnio(int p) { this.anio = p; }", "public void atrapar() {\n if( una == false) {\n\t\tif ((app.mouseX > 377 && app.mouseX < 591) && (app.mouseY > 336 && app.mouseY < 382)) {\n\t\t\tint aleotoridad = (int) app.random(0, 4);\n\n\t\t\tif (aleotoridad == 3) {\n\n\t\t\t\tSystem.out.print(\"Lo atrapaste\");\n\t\t\t\tcambioEnemigo = 3;\n\t\t\t\tsuerte = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\t\t\tif (aleotoridad == 1 || aleotoridad == 2 || aleotoridad == 0) {\n\n\t\t\t\tSystem.out.print(\"Mala Suerte\");\n\t\t\t\tcambioEnemigo = 4;\n\t\t\t\tmal = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\n\t\t}\n }\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int t = sc.nextInt();\n while (t-- > 0) {\n int n = sc.nextInt();\n int i =0;\n int[] page = new int[n];\n while (i< n){\n page[i] = sc.nextInt();\n i++;\n }\n int capacity = sc.nextInt();\n System.out.println(findNoOfPageFault(page,capacity));\n }\n\n }", "void imprimeCalculos(){\n int a,b;\n a=calculaX();\n b=calculaY();\n System.out.println(\"Valor de X=\"+a);\n System.out.println(\"Valor de Y=\"+b);\n if(a==0){\n proporcion=0;\n }else{\n proporcion=(b/a);\n System.out.println(\"Valor de proporcion es: \"+proporcion);\n }\n }", "private static void menuno(int menuno2) {\n\t\t\r\n\t}", "@Override\n public void pp(){\n PP=3+2*nivel;\n }", "Integer getPage();", "public void showPageWord(int page) {\n ArrayList<Word> fullDictionary = dictionaryManagement.getDictionary().getWords();\n System.out.println(\"No\\t|English\\t|Type\\t|Vietnamese\");\n \n for (int i = (page - 1) * 20; i < (page - 1) * 20 + 20; i ++) {\n if (i < fullDictionary.size()) {\n String aWord = String.valueOf(i + 1) + \"\\t|\" + fullDictionary.get(i).getWordTarget()\n + \"\\t|\" + fullDictionary.get(i).getWordExplain();\n System.out.println(aWord);\n }\n }\n }", "private void GongGaoTongZhi(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\n\t\tInteger page = request.getParameter(\"page\") == \"\" || request.getParameter(\"page\") == null ? 1\r\n\t\t\t\t: Integer.valueOf(request.getParameter(\"page\"));\r\n\t\trequest.setAttribute(\"page\", page);\r\n\t\tUser user = (User) request.getSession().getAttribute(SessionKey.USER_LOGIN);\r\n\t\tList<Notice> list = service.selectAll((page - 1) * 5, 5, user);\r\n\t\trequest.setAttribute(\"list\", list);\r\n\t\trequest.setAttribute(\"count\", list.size());\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/jsp/GongGaoTongZhi.jsp\").forward(request, response);\r\n\t}", "protected int getInitialPage(HttpServletRequest request) {\n return 0;\n }", "@Override\n public void inicio() {\n // inicializa el objetivo\n miObjetivo = \"\";\n // inicializa variables para explorar sucesores\n j = 0;\n m = 0;\n nodo = null;\n suc = null;\n succ = null;\n // inicializa objetos\n actual = \"\";\n g = graph.getGraphics();\n // comienza por el primer nodo\n nodo = graph.getNodes().get(0);\n actual = nodo.toString();\n // siguiente paso\n Step = 0;\n }", "public void run() {\n int lastpage = 0xFFFFFFFF - 0xFFF;\n Page P = (Page) MAGIC.cast2Struct(lastpage);\n P.data[0] = 2;\n\n }", "@Override\n public void adDisplayed(Ad ad) {\n numberOfPageSelected = 0;\n// pageThresHold *= 2;\n }", "public void setPageNo(int pageNo) {\n this.pageNo = pageNo;\n }", "public void promptNumPages(int numPages)\n {\n if(numPages >= MIN_PAGES) {\n this.numPages = numPages;\n } \n else {\n System.out.println(\"Please enter a number greater than 9\");\n } \n }", "protected void countPageChange(int x)\n {\n if (x > getWidth() - 40\n && mCurScreen < getTotalPage() - 1 && mScroller.isFinished()\n && x > startX + 10)\n {\n snapToScreen(mCurScreen + 1);\n } else if (x < 40\n && mCurScreen > 0 && mScroller.isFinished() && x < startX - 10)\n {\n snapToScreen(mCurScreen - 1);\n }\n }", "public void pagar(int precio){\r\n this.dinero -=precio;\r\n }", "Point onPage();", "public void pintartabla(){\n\t\tSystem.out.println(\" H G F E D C B A\");//0\n\t\tSystem.out.println(\"8\"+fw+\" O \"+nr+\" O \"+fw+\" O \"+nr+\" O \"+fw+\" O \"+nr+\" O \"+fw+\" O \"+nr+\" O \"+reset+\"1\");//1\n\t\tSystem.out.println(\"7\"+nr+\" O \"+fw+\" O \"+nr+\" O \"+fw+\" O \"+nr+\" O \"+fw+\" O \"+nr+\" O \"+fw+\" O \"+reset+\"2\");//2\n\t\tSystem.out.println(\"6\"+fw+\" O \"+fn+\" O \"+fw+\" O \"+fn+\" O \"+fw+\" O \"+fn+\" O \"+fw+\" O \"+fn+\" O \"+reset+\"3\");//3\n\t\tSystem.out.println(\"5\"+fn+\" O \"+fw+\" O \"+fn+\" O \"+fw+\" O \"+fn+\" O \"+fw+\" O \"+fn+\" O \"+fw+\" O \"+reset+\"4\");//4\n\t\tSystem.out.println(\"4\"+fw+\" O \"+fn+\" O \"+fw+\" O \"+fn+\" O \"+fw+\" O \"+fn+\" O \"+fw+\" O \"+fn+\" O \"+reset+\"5\");//5\n\t\tSystem.out.println(\"3\"+fn+\" O \"+fw+\" O \"+fn+\" O \"+fw+\" O \"+fn+\" O \"+fw+\" O \"+fn+\" O \"+fw+\" O \"+reset+\"6\");//6\n\t\tSystem.out.println(\"2\"+fw+\" O \"+nw+\" O \"+fw+\" O \"+nw+\" O \"+fw+\" O \"+nw+\" O \"+fw+\" O \"+nw+\" O \"+reset+\"7\");//7\n\t\tSystem.out.println(\"1\"+nw+\" O \"+fw+\" O \"+nw+\" O \"+fw+\" O \"+nw+\" O \"+fw+\" O \"+nw+\" O \"+fw+\" O \"+reset+\"8\");//8\n\t\tSystem.out.println(\" A B C D E F G H\");//fin\n\n\t}", "public boolean AddionalQuestionnairePage(int ColumnCounter,String mode) throws AWTException, InterruptedException\n\t \t{\t\n\t\t \n\t\t boolean flag=false;\n\t\t//AddionalQuestionnairePage\t\n\t\t \n\t\t\t//Methods Xpath\n\t\tString UsernameXpath=\"//*[@class='header2 font-accent ']\";\n\t\tString UsernametypeXpath=\"//*[@class='font-accent']\";\n\t\tString CountryXpath=\"//*[@id='prg-hdr-main']//*[@class='font-accent highlight-blue']\";\n\t\t\n\t\t\n\n\t\t\n\t\t//String AddionalQuestionnaireSaveButtonXpath=\".//*[@id='btnSave']\"; \n\t\t\n\t\t\n\t\t//Excel sheet Data collection\n\t\tString TestcaseID=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 0, ColumnCounter);\n\t\tString AddionalQuestionnaireScenerio=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 2, ColumnCounter);\n\t\tString AddionalQuestionnaireTestcaseDescription=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 3, ColumnCounter);\t\t\n\t\tString AddionalQuestionnairePageURL=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 4, ColumnCounter);\n\t\tString AddionalQuestionnaireID=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 5, ColumnCounter);\t\t\t\n\t\tString AddionalQuestionnairetextQ1=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 6, ColumnCounter);\n\t/*\tString AddionalQuestionnaireQ2=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 7, ColumnCounter);\n\t\tString AddionalQuestionnaireQ3=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 8, ColumnCounter);\n\t\tString AddionalQuestionnaireQ4=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 9, ColumnCounter);\n\t\tString AddionalQuestionnaireQ5=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 10, ColumnCounter);\n\t\tString AddionalQuestionnaireQ6=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 11, ColumnCounter); \t\n\t\tString AddionalQuestionnaireQ7=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 12, ColumnCounter); \n\t\tString AddionalQuestionnaireQ8=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 13, ColumnCounter); \n\t\tString AddionalQuestionnaireQ9=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 14, ColumnCounter); \n\t\tString AddionalQuestionnaireQ10=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 15, ColumnCounter); \n\t\tString AddionalQuestionnaireQ11=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 16, ColumnCounter); \n\t\tString AddionalQuestionnaireQ12=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 17, ColumnCounter);\n\t\tString AddionalQuestionnaireQ13=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 18, ColumnCounter);\n\t\tString AddionalQuestionnaireQ14=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 19, ColumnCounter);\n\t\tString AddionalQuestionnaireQ15=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 20, ColumnCounter);\n\t\tString AddionalQuestionnaireQ16=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 21, ColumnCounter);\n\t\tString AddionalQuestionnaireQ17=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 22, ColumnCounter);\n\t\tString AddionalQuestionnaireQ18=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 23, ColumnCounter);\n\t\tString AddionalQuestionnaireQ19=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 24, ColumnCounter);\n\t\tString AddionalQuestionnaireQ20=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 25, ColumnCounter);\n\t\tString AddionalQuestionnaireQ21=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 26, ColumnCounter);\n\t\tString AddionalQuestionnaireQ22=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 27, ColumnCounter);\n\t\tString AddionalQuestionnaireQ23=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 28, ColumnCounter);\n\t\tString AddionalQuestionnaireQ24=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 29, ColumnCounter);\n\t\tString AddionalQuestionnaireQ25=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 30, ColumnCounter);\n\t\tString AddionalQuestionnaireQ26=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 31, ColumnCounter);\n\t\tString AddionalQuestionnaireQ27=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 32, ColumnCounter);\n\t\tString AddionalQuestionnaireQ28=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 33, ColumnCounter);\n\t\tString AddionalQuestionnaireQ29=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 34, ColumnCounter);\n\t\tString AddionalQuestionnaireQ30=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 35, ColumnCounter);\n\t\tString AddionalQuestionnaireQ31=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 36, ColumnCounter);\n\t\tString AddionalQuestionnaireQ32=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 37, ColumnCounter);\n\t\tString AddionalQuestionnaireQ33=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 38, ColumnCounter);\n\t\tString AddionalQuestionnaireQ34=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 39, ColumnCounter);\n\t\tString AddionalQuestionnaireQ35=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 40, ColumnCounter);\n\t\tString AddionalQuestionnaireQ36=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 41, ColumnCounter);\n\t\tString AddionalQuestionnaireQ37=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 42, ColumnCounter);\n\t\tString AddionalQuestionnaireQ38=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 43, ColumnCounter);\n\t\tString AddionalQuestionnaireQ39=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 44, ColumnCounter);\n\t\tString AddionalQuestionnaireQ40=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 45, ColumnCounter);\n\t\tString AddionalQuestionnaireQ41=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 46, ColumnCounter);\n\t\tString AddionalQuestionnaireQ42=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 47, ColumnCounter);\n\t\tString AddionalQuestionnaireQ43=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 48, ColumnCounter);\n\t\tString AddionalQuestionnaireQ44=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 49, ColumnCounter);\n\t\tString AddionalQuestionnaireQ45=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 50, ColumnCounter);\n\t\tString AddionalQuestionnaireQ46=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 51, ColumnCounter);\n\t\tString AddionalQuestionnaireQ47=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 52, ColumnCounter);\n\t\tString AddionalQuestionnaireQ48=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 53, ColumnCounter);\n\t\t\n\t\t\n\t\t\n\t\tString AddionalQuestionnaireQQE_DD=UtilFunction.getCellData(\"Test Data.xls\", \"AddionalQuestionnaire\", 54, ColumnCounter);\n*/\n\t\t//String Radio=\".//*[@class='question-group'][xx]//*[@class='question-option']/label[1]//*[@id]\";\n\t\tString Radio=\".//*[@class='question-group'][xx]//*[@class='question-option']//input[1]\";\n\t\tString Counter=\".//*[@class='question-group']\";\n\t\t//String Textbox=\".//*[@class='form-horizontal']/*[@class='question-group'][xx]/div[2]//textarea\";\n\t\tString Textbox=\".//*[@class='question-group'][xx]//*[@class='control-group'][2]//*[contains(@class,'control-explainationtext')]\";\n\t\tString Xpathnew1=\".//*[@class='control-group']//*[@class='controls']//*[@id]\";\n\t\tString Xpathnew2=\".//*[@class='control-group'][xx]//*[@class='controls']//*[@id]\";\n\t\t\n\t\t/////////////////////////////////URL FETCH///////////////////////////////////\n\t\tString QuestionarieName=\"Additional Questions\";\n\t\t//String URLwithID=UtilFunction.geturl(QuestionarieName);\n\t\tURLwithID=utilfunc.geturldirect(QuestionarieName);\n\t\t\n\t\tboolean Flag =false;\n\t\ttestcaseid=TestcaseID;\n\t\tscenerio=AddionalQuestionnaireScenerio;\n\t\tdescription=AddionalQuestionnaireTestcaseDescription;\n\t\t String ACTION=\"New\";\n\t\t String ACTION1=\"Edit\";\n\t\t String ACTION2=\"Delete\";\n\t\t \n\t\t if(URLwithID.equals(\"\")){\n\t\t\t utilfunc.closesidebar();\n\t\t\t\tFlag=false; \n\t\t\t }else{\n\t\t\t \n\t\t \n\t\t if(mode.equals(ACTION)|mode.equals(ACTION1)){\n\t\t\t try{\n\t\t\t\t /*String AddionalQuestionnaireURLwithID=AddionalQuestionnairePageURL+AddionalQuestionnaireID;\n\t\t\t\t \n\t\t\t\t utilfunc.NavigatetoURL(AddionalQuestionnaireURLwithID);*/\n\t\t\t\t \n\t\t\t\t try{\n\t\t\t\t\t utilfunc.NavigatetoURL(URLwithID);\n\t\t\t\t\t utilfunc.ServerErrorHandler();\n\t\t\t\t\t Thread.sleep(2000);\n\t\t\t\t\t }catch(Exception error){}\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t \n\t\t\t\t String Usernametext=utilfunc.MakeElement(UsernameXpath).getText();\n\t\t\t\t String Usernametypetext=utilfunc.MakeElement(UsernametypeXpath).getText();\n\t\t\t\t Usernametext=Usernametext+Usernametypetext;\n\t\t\t\t\t\n\t\t\t\t int ObjCount=utilfunc.GetObjectCount(Counter);\n\t\t\t\t \n\t\t\t\t \ttry{\t\t\t \n\t\t\t\t\t\t for(int count=1; count<=ObjCount; count++)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t try{\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t String NewRadio=Radio.replace(\"xx\", Integer.toString(count));\n\t\t\t\t\t\t\t\t utilfunc.MakeElement(NewRadio).click();\n\t\t\t\t\t\t\t\t// Thread.sleep(1000);\n\t\t\t\t\t\t\t\t try{\n\t\t\t\t\t\t\t\t\t String NewTextbox=Textbox.replace(\"xx\", Integer.toString(count));\n\t\t\t\t\t\t\t\t\t String Questionnaire=\"AddionalQuestionnairetextQ\"+count;\n\t\t\t\t\t\t\t\t\t utilfunc.MakeElement(NewTextbox).clear();\n\t\t\t\t\t\t\t\t\t utilfunc.MakeElement(NewTextbox).sendKeys(Questionnaire);\n\t\t\t\t\t\t\t\t }catch(Exception f){\n\t\t\t\t\t\t\t\t\t System.out.println(\"Exception1-->\"+f);\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t }catch(Exception f){\n\t\t\t\t\t\t\t\t System.out.println(\"Exception2-->\"+f);\n\t\t\t\t\t\t\t }\n\t\t \n\t\t\t\t\t\t }\n\t\t\t\t \t}catch(Exception error){}\n\n\n\t\t\t\t\t\t //function to call the dynamic text data\n\t\t\t\t\ttry{\n\t\t\t\t\t\tutilfunc.dynamic_data(Xpathnew1, Xpathnew2);\n\t\t\t\t\t\t}catch(Exception error){}\n\n\t\t\t\t\t \t /*String SaveButtonXpath=\".//*[@id='btnSave']\";\t\t\t\t\t\n\t\t\t\t\t utilfunc.MakeElement(SaveButtonXpath).click();*/\n\t\t\t\t\t \tutilfunc.savebutton();\n\n\t\t\t\t\t boolean error_flag=utilfunc.ErrorMessagehandler();\n\t\t\t\t\t\t if (error_flag){\n\t\t\t\t\t\t\t Flag=true;\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t Flag=false;\n\t\t\t\t\t\t }\n\t\t\t\n\t\t\t\t }\n\t\t\t catch(Exception e){\n\n\t\t\t\t System.out.println(\"Exception ---->\"+e);\n\n\t\t\t }\n\t\t }else if(mode.equals(ACTION2)){\n\n\t\t\t try{\n\t\t\t\t\tutilfunc.ErrorMessage=\"\";\n\t\t\t\t\tutilfunc.ErrorMessage1=\"\";\n\t\t\t\t\tutilfunc.ErrorMessage4=\"\";\n\t\t\t\t\tutilfunc.ErrorMessage5=\"\";\n\t\t\t\t \ttestcaseid=\"TC001\";\n\t\t\t\t\tscenerio=\"Positive\";\n\t\t\t\t\tdescription=\"Verify that If Click on Delete Button Expected Result-Successfully Deleted\";\n\t\t\t\t\t\n\t\t\t\t\tutilfunc.NavigatetoURL(URLwithID);\n\t\t\t\t\t\n\t\t\t\t\tutilfunc.ServerErrorHandler();\n\t\t\t\t\t\n\t\t\t\t\tString deletexpath=\".//*[@class='table table-item-list']//tr[1]//*[@class='icon-trash']\";\n\t\t\t\t\tutilfunc.MakeElement(deletexpath).click();\n\t\t\t\t\tutilfunc.isAlertPresent();\n\t\t\t\t\t\n\t\t\t\t\tboolean error_flag=utilfunc.ErrorMessagehandler();\n\t\t\t\t\t if (error_flag){\n\t\t\t\t\t\t Flag=true;\n\t\t\t\t\t }else{\n\t\t\t\t\t\t Flag=false;\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t}catch(Exception z){\n\t\t\t\t\t\tutilfunc.ErrorMessage=\"\";\n\t\t\t\t\t\tutilfunc.ErrorMessage1=\"\";\t\t\t\t\t\t\t\n\t\t\t\t\t\tutilfunc.ErrorMessage4=\"\";\n\t\t\t\t\t\tutilfunc.ErrorMessage5=\"\";\n\t\t\t\t\t\tDeletecheck=\"Delete\";\n\t\t\t\t\t\ttestcaseid=\"TC001\";\n\t\t\t\t\t\tscenerio=\"Positive\";\n\t\t\t\t\t\tdescription=\"Verify that If Click on Delete Button Expected Result-Successfully Deleted\";\n\t\t\t\t\t\tutilfunc.ErrorMessage2=\"Delete option is not Implimented in Additional Questionnaire Module.\";\n\t\t\t\t\t\tutilfunc.TakeScreenshot();\n\t\t\t\t\t\tFlag=false;\n\t\t\t\t}\t\t\t\n\t\t\t \n\t\t }\n\t\t \n\t\t\t }///////////url ckeck end\n\t\t \n\t\treturn Flag;\n\t \t}", "public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tisButtonClick = true;\r\n\t\t\t\t\tpageSize = 0;\r\n\t\t\t\t\tcurrentPage = 1;\r\n\t\t\t\t\tgetQx();\r\n\t\t\t\t}", "public void hitunganRule4(){\n penebaranBibitBanyak = 1900;\r\n hariPanenLama = 110;\r\n \r\n //menentukan niu bibit\r\n nBibit = (penebaranBibitBanyak - 1500) / (3000 - 1500);\r\n \r\n //menentukan niu hari panen sedang\r\n if ((hariPanenLama >=80) && (hariPanenLama <=120)) {\r\n nPanen = (hariPanenLama - 100) / (180 - 100);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a4 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a4 = nPanen;\r\n }\r\n \r\n //tentukan Z3\r\n z4 = (penebaranBibitBanyak + hariPanenLama) * 500;\r\n System.out.println(\"a4 = \" + String.valueOf(a4));\r\n System.out.println(\"z4 = \" + String.valueOf(z4));\r\n }", "static void checkPrime(){\n\t\tint n1=78;\r\n\t}", "public void home ()\r\n\t{\r\n\t\tthis.sector = this.head = this.cylinder = 0;\r\n\t}", "manExp15(){ \r\n\r\n\tcount++; \r\n\r\n\tSystem.out.println(count); \r\n\r\n\t}", "@Override\r\n\t\tpublic int getCurrentpage() throws Exception\r\n\t\t\t{\n\t\t\t\treturn 0;\r\n\t\t\t}", "public void recarga(){\n \tthis.fuerza *= 1.1;\n \tthis.vitalidad *= 1.1; \n }", "public void setPage(ICPage page) {\n \t\t_page = page;\n \t}", "@Override\n public void asignaParametros() {\n paso = request.getParameter(\"pasoSig\")!=null?request.getParameter(\"pasoSig\"):\"0\";\n String paginaSig = \"\";\n HashMap param = new HashMap();\n Documento doc = new Documento();\n switch (Integer.parseInt(paso)){\n case 0:\n //paso inicial: obtener la vista de los parametros\n datos.clear();\n String vista = request.getParameter(\"vista\")!=null?request.getParameter(\"vista\"):\"\";\n String idoperacion = request.getParameter(\"operacion\")!=null?request.getParameter(\"operacion\"):\"\";\n //cargar los parametros al hash de datos\n datos.put(\"idoperacion\", idoperacion);\n sesion.setPaginaSiguiente(vista);\n break;\n case 1: case 6: case 50: case 51: case 52: case 53: case 97: case 98: case 99:\n paginaSig = request.getParameter(\"paginaSig\")!=null?request.getParameter(\"paginaSig\"):\"\";\n sesion.setPaginaSiguiente(paginaSig);\n break;\n case 3: case 5: case 7:\n //editar documento(3) || baja de documentos(5) || activar documento(7)\n doc.setId(Integer.parseInt(request.getParameter(\"idDoc\")));\n datos.put(\"documento\", doc);\n datos.put(\"varios\", request.getParameter(\"varios\"));\n paginaSig = request.getParameter(\"paginaSig\")!=null?request.getParameter(\"paginaSig\"):\"\";\n sesion.setPaginaSiguiente(paginaSig);\n break;\n case 8:\n //imprimir los docs seleccionados\n datos.put(\"reporte\", application.getRealPath(\"WEB-INF/Reportes/Nomina/Personal/documentosemple.jasper\"));\n //parametros\n param = new HashMap();\n param.put(\"LOGO\", application.getRealPath(\"/Imagenes/\"+datos.get(\"logo\").toString()));\n param.put(\"RUTAIMGS\", application.getRealPath(\"/Imagenes/Personal/Documentos\"));\n Empleado empl = (Empleado)datos.get(\"empleado\");\n param.put(\"EMPLEADO\", new Integer(empl.getNumempleado()));\n param.put(\"DOCS\", request.getParameter(\"dato1\"));\n datos.put(\"parametros\", param);\n break;\n }\n datos.put(\"paso\", paso);\n }", "private void resetLexeme(){\n\t\tcola = \"\";\n\t}", "NavePosicao(int frame, double angulo) {\r\n\t\tthis.frame = frame;\r\n\t\tthis.angulo = angulo;\r\n }", "public void setPage(Page page) {\n this.page=page;\n }", "public void setPage(Page page) {\n this.page=page;\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint num, num1,num2;\n\t\tSystem.out.println(\"Eliga una opcion\");\n\t\tSystem.out.println(\"1.Primera opcion suma de dos numeros \");\n\t\tSystem.out.println(\"2.Segunda opcion resta de dos numeros\");\n\t\tSystem.out.println(\"3.Tercera opcion multiplicar dos numeros\");\n\t\tSystem.out.println(\"4.Cuarta opcion divison de dos numeros\");\n\t\tSystem.out.println(\"5.Quinta opcion factorial de un numero\");\n\n\t\tnum=sc.nextInt();\n\t\tif (num==1){\n\t\t\tSystem.out.println(\"Introduzca un numero\");\n\t\t\tnum1=sc.nextInt();\n\t\t\tSystem.out.println(\"Introduzca otro numero\");\n\t\t\tnum2=sc.nextInt();\n\t\t\tsuma(num,num1,num2);\n\t\n\t\t}\n\t\tif (num==2) {\n\t\t\tSystem.out.println(\"Introduzca un numero\");\n\t\t\tnum1=sc.nextInt();\n\t\t\tSystem.out.println(\"Introduzca otro numero\");\n\t\t\tnum2=sc.nextInt();\n\t\t\tresta(num,num1,num2);\n\t\t\t\n\t\t}\n\t\tif (num==3) {\n\t\t\tSystem.out.println(\"Introduzca un numero\");\n\t\t\tnum1=sc.nextInt();\n\t\t\tSystem.out.println(\"Introduzca otro numero\");\n\t\t\tnum2=sc.nextInt();\n\t\t\tmultiplicacion(num,num1,num2);\n\t\t\t\n\t}\n\t\tif (num==4) {\n\t\t\tSystem.out.println(\"Introduzca un numero\");\n\t\t\tnum1=sc.nextInt();\n\t\t\tSystem.out.println(\"Introduzca otro numero\");\n\t\t\tnum2=sc.nextInt();\n\t\t\tdivision(num,num1,num2);\n\t}\n\t\tif (num==5) {\n\t\t\tSystem.out.println(\"Introduzca un numero\");\n\t\t\tnum1=sc.nextInt();\n\t\t\tfactorial(num1);\n\t\t\t\n\t\t}\n\t}", "private static void cajas() {\n\t\t\n\t}", "int getPagesAmount();" ]
[ "0.59788316", "0.5906136", "0.57717127", "0.5708561", "0.5690006", "0.56684214", "0.5652142", "0.5639709", "0.55620396", "0.5545064", "0.55211425", "0.55045295", "0.5500875", "0.545073", "0.5405951", "0.5401357", "0.5397184", "0.5385495", "0.535011", "0.53376234", "0.5335792", "0.5331598", "0.53257257", "0.53251576", "0.5313783", "0.5311645", "0.52709764", "0.52686757", "0.5263524", "0.52600557", "0.52590114", "0.52504903", "0.52480525", "0.5236522", "0.5231388", "0.52305675", "0.5224897", "0.52213293", "0.52183205", "0.5215741", "0.5215268", "0.5204004", "0.5203338", "0.52004457", "0.5186498", "0.51838857", "0.5171252", "0.5167041", "0.5164177", "0.5159768", "0.51595426", "0.51568407", "0.5155443", "0.5152594", "0.5141577", "0.5139928", "0.51397353", "0.51067555", "0.5102695", "0.50968117", "0.50926507", "0.50900286", "0.5079818", "0.50782394", "0.50651515", "0.5058461", "0.5053557", "0.5049399", "0.50489265", "0.50427467", "0.50404376", "0.5027778", "0.501642", "0.50156057", "0.5011734", "0.50072634", "0.5004968", "0.49993932", "0.49971274", "0.49958366", "0.49950796", "0.4994767", "0.49924552", "0.49856037", "0.49822596", "0.49821016", "0.49819627", "0.49804583", "0.497466", "0.49694645", "0.49634832", "0.496217", "0.4958395", "0.4957001", "0.4955432", "0.4954531", "0.49504247", "0.49504247", "0.49502134", "0.49470714", "0.49455458" ]
0.0
-1
page++; xiala = 1;
@Override public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) { new DataTask().execute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "manExp15(){ \r\n\r\n\tcount++; \r\n\r\n\tSystem.out.println(count); \r\n\r\n\t}", "public void iniciar(){\nSystem.out.println(\"El primer contador comenzara en el número 0\");\ncontador=0;\nSystem.out.println(\"El segundo contador comenzara en el número 100\");\ncontador2=100;}", "private static void setCounter() {++counter;}", "public static void move() {\r\n\t\t\r\n\t\tif (ths.page == 1) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "public static void take() {\r\n\t\t\r\n\t\tif (ths.page == 4) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "public Ej_varclase1() {\n\t\t//contador++; \n\t\tcontador = contador + 1;\n\t\t\n\t}", "private void forwardPage()\n {\n page++;\n open();\n }", "public static void give() {\r\n\t\t\r\n\t\tif (ths.page == 6) {\r\n\t\t\tths.page++;\r\n\t\t\tths.updates1 = updates;\r\n\t\t}\r\n\t}", "public static void look() {\r\n\t\t\r\n\t\tif (ths.page == 2) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "void increase()\n {\n a++;\n b++ ;\n }", "public void incPagesCrawled() {\n pagesCrawled++;\n }", "public void ejec(){\n int num = 0;\n while (num==0){\n intro();\n System.out.println(\"\");\n if (opcion.equals(\"salir\")){}\n else {setnum();}\nswitch(opcion){\n case \"pies\":System.out.println( num1 + \" pulgada(s) son(es) \" + num1*0.0833333333 + \" pies\");\n break;\n case \"yardas\":System.out.println( num1 + \" pulgada(s) son(es) \" + num1*0.0277777778 + \" yardas\");\n break;\n case \"cm\":System.out.println( num1 + \" pulgada(s) son(es) \" + num1*2.54 + \"cm\");\n break;\n case \"salir\":\n num=9;\n break;\n default:System.out.println(\"Elección erronea\");\n break;}}}", "public void incCounter()\n {\n counter++;\n }", "public void incCounter(){\n counter++;\n }", "public void inicia(){\n\t \tanimacion2.start();\n\t \tSystem.out.print(num);\n\t num++;\t\n\t }", "public void increment() {\n increment(1);\n }", "public void incA() {\n this.countA++;\n }", "void increase();", "void increase();", "public static void craft() {\r\n\t\t\r\n\t\tif (ths.page == 5) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "public void inc() {\n inc(1);\n }", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "public static void increase(){\n c++;\n }", "public void increment(){\n value+=1;\n }", "private void puntuacion(){\n timer++;\n if(timer == 10){\n contador++;\n timer = 0;\n }\n }", "public void act() \n {\n // Add your action code here.\n contaP++;\n if(contaP == 25)\n {\n baja();\n contaP=0;\n }\n }", "private void incrementCounter()\r\n\t{\r\n\t\tthis.counter++;\r\n\t}", "public void setcurrentPara(int p){\r\n currentPara= p;\r\n \r\n }", "public void incrementRefusals() {\n\t}", "public void inc(){\n this.current += 1;\n }", "public int incrementar(int contador){\nSystem.out.println(\"Escoge la cantidad a incrementar\");\nnum=teclado.nextInt();\nfor(int i=0 ; i<num ; i++){\ncontador=contador+1;}\nreturn contador;}", "public void nextIteration()\n {\n actuelIteration++;\n }", "public static void chartNext() {\n\t\tchartId = (chartId+(hsPage = 1)) % chary.length;\n\t}", "public int getPageIncrement() {\n \tcheckWidget();\n \treturn pageIncrement;\n }", "public void increment(){\n\t\twordCount += 1;\n\t}", "public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}", "public static void talk() {\r\n\t\t\r\n\t\tif (ths.page == 3) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "public void incrementCount(){\n count+=1;\n }", "public void nextTextureIndexX() {\n/* 245 */ this.particleTextureIndexX++;\n/* */ }", "int getPageNumber();", "public void incrementCount () {\n count = count + 1; // == count++ == count += 1 \n if (count == modulus) {\n count = 0;\n }\n }", "private void increment() {\n for (int i=0; i < 10000; i++) {\n count++;\n }\n }", "private void aumentarPilha() {\n this.pilhaMovimentos++;\n }", "public void setPage(int page) {\n this.page = page;\n }", "public void run() {\n int lastpage = 0xFFFFFFFF - 0xFFF;\n Page P = (Page) MAGIC.cast2Struct(lastpage);\n P.data[0] = 2;\n\n }", "public void Increase()\n {\n Increase(1);\n }", "public void startOver() {\n this.pagesRead = 0;\n }", "public void nextIteration() {t++;}", "protected void incrementCurrent() {\n current++;\n }", "int getPage();", "public void reiniciar() {\r\n\t\tauxiliar = primeira;//auxiliar recebe a primeira\r\n\t}", "public void setThisManual()\n { \n actual = 1;\n \n nextPage = new Label();\n addObject(nextPage, 1132, 2001);\n \n prePage = new Label();\n addObject(prePage, 122, 2007);\n \n prePage.setImage(new GreenfootImage(\"\", 0, null, null));\n nextPage.setImagine(\"sipka1\");\n \n callMenu = new CallMenu();\n addObject(callMenu, 667, 60);\n }", "@Override\r\n\tpublic int nombrePage() {\n\t\treturn 0;\r\n\t}", "public int rekisteroi() {\r\n alId = seuraavaNro;\r\n seuraavaNro++;\r\n\r\n return seuraavaNro;\r\n }", "@Override\n public void pp(){\n PP=3+2*nivel;\n }", "public void renitialiser() \n\t{\n\t\tbuffer = new byte[Constants.PAGESIZE];\n\t\tidDeLaPage = null;\n\t\tpin_count = 0;\n\t\tflagDirty = 0;\n\t\testCharge = false;\n\t}", "public void setPage(Integer page) {\n this.page = page;\n }", "void incrementCount();", "static void m1318a() {\n f1109a++;\n }", "p3(){ \n cnt++; // Increment the static variable by 1 for each object creation. \n }", "public void somaVezes(){\n qtVezes++;\n }", "public void addPage(int newPage) {\r\n\t\tpage.addAtTail(newPage);\r\n\t}", "private static void increaseReference(Counter counter) {\n counter.advance(1);\n }", "public void VaciarPila()\n {\n this.tope = 0;\n }", "public void incrementTotal(){\n total++;\n }", "public void incCount() { }", "@Override\n public void movimiento_especial(){\n\n movesp=ataque/2;\n defensa+=5;\n PP= PP-4;\n }", "public void incrementPages(String page)\r\n {\r\n // Check if page already Indexed.\r\n\tif(checkAlreadyFound(page))\r\n\t return;\r\n pageNames.addElement(page);\r\n\t\r\n\t// provide feedback to the user.\r\n\tstatusArea.setText(\"Search Page: \"+pageNames.size());\r\n }", "public void nascitaAgnello() {\n\t\tpecore.add(new Agnello());\n\t\tnumeroAgelli++;\n\t}", "void verEnPantalla() {\r\n\t\tSystem.out.println( numEnPantalla );\r\n\t}", "static void checkPrime(){\n\t\tint n1=78;\r\n\t}", "public void setPrecioc(int p){\n this.precioc=p;\n \n }", "public void setPage(SQLInteger page) {\n\t\tthis.page = page;\n\t}", "void incUsage() {\n incUsage(1);\n }", "public void setPage(int value) {\n this.page = value;\n }", "private void priorizar() {\r\n if (ini == fin) {\r\n return;\r\n }\r\n\r\n int t1 = fin, t2 = fin - 1;\r\n TDAPrioridad aux = new TDAPrioridad(0, '0');\r\n while (t1 != ini) {\r\n if (datos[t1].getPrioridad() > datos[t2].getPrioridad()) {\r\n aux.setObjeto(datos[t1]);\r\n datos[t1].setObjeto(datos[t2]);\r\n datos[t2].setObjeto(aux);\r\n t2--;\r\n t1--;\r\n } else {\r\n break;\r\n }\r\n }\r\n }", "public void increment() {\r\n\t\tcurrentSheeps++;\r\n\t}", "void incCount() {\n ++refCount;\n }", "public int numAristas() { return numA; }", "public void increasecounter() {\n\t\tmPref.edit().putInt(PREF_CONVERTED, counter + 1).commit();\r\n\t}", "public void loadPreviousPage() {\n// System.out.println(\"index :\"+i);\r\n// System.out.println(\"##########\");\r\n lisOfProduct = serv.read();\r\n CurrP--;\r\n if (CurrP < nbP) {\r\n i = 0;\r\n indexOfImage = CurrP * 6 + i;\r\n loadImage1(lisOfProduct.get(x).getImg_url());\r\n i++;\r\n x = CurrP * 6 + i;\r\n System.out.println(\" i: \" + i + \"Curr: \" + CurrP + \"i in page: \" + x);\r\n\r\n loadImage1(lisOfProduct.get(indexOfImage).getImg_url());\r\n indexOfImage++;\r\n loadImage2(lisOfProduct.get(indexOfImage).getImg_url());\r\n indexOfImage++;\r\n loadImage3(lisOfProduct.get(indexOfImage).getImg_url());\r\n indexOfImage++;\r\n loadImage4(lisOfProduct.get(indexOfImage).getImg_url());\r\n indexOfImage++;\r\n loadImage5(lisOfProduct.get(indexOfImage).getImg_url()); \r\n indexOfImage++;\r\n loadImage6(lisOfProduct.get(indexOfImage).getImg_url());\r\n \r\n indexOfImage++;\r\n }\r\n indexOfImage -= 5;\r\n// IntStream.range(0, 1).forEach(\r\n// i -> next.fire()\r\n// ); \r\n\r\n// CurrP = 0;\r\n// i = 0;\r\n }", "void setPageStart(short start);", "private static void calc1(int x) {\n\t\tx+=1;\n\t}", "public static void metodo01 ( int x )\r\n {\r\n // repetir enquanto valor maior que zero\r\n while ( x > 0 )\r\n {\r\n // mostrar valor\r\n IO.println ( \"Valor = \" + x );\r\n // passar ao próximo\r\n x = x - 1;\r\n } // fim se\r\n }", "int getNumPages();", "public void setPages(int pages) {\n this.pages = pages;\n }", "public void gagne()\r\n\t{\r\n\t\tthis.nbVictoires++;\r\n\t}", "public void pagar(int precio){\r\n this.dinero -=precio;\r\n }", "void upCount(){\n count++;\n }", "public void mo33138e() {\n this.f23891d++;\n }", "static void primeNumberSeries(){\n\t}", "public void add(){\n contador += 100;\n }", "public static void increment() {\n\t\tcount.incrementAndGet();\n//\t\tcount++;\n\t}", "public int getPages(){\n return pages;\n }", "public int counter()\n {\n if(count<=825){\n return count++;\n }\n else{ \n count = 0;\n return count;\n }\n }", "protected void countPageChange(int x)\n {\n if (x > getWidth() - 40\n && mCurScreen < getTotalPage() - 1 && mScroller.isFinished()\n && x > startX + 10)\n {\n snapToScreen(mCurScreen + 1);\n } else if (x < 40\n && mCurScreen > 0 && mScroller.isFinished() && x < startX - 10)\n {\n snapToScreen(mCurScreen - 1);\n }\n }", "public void incrementFrameNumber()\n {\n\tframeNumber++;\n }", "public void IncrementCounter()\r\n {\r\n \tsetCurrentValue( currentValue.add(BigInteger.ONE)); \r\n \r\n log.debug(\"counter now: \" + currentValue.intValue() );\r\n \r\n }", "int getPagesAmount();", "public int get_num_p(){ return num_p; }", "@Override\n\tprotected void actionPerformed(GuiButton par1GuiButton)\n {\n\n if (par1GuiButton.enabled)\n {\n if (par1GuiButton.id == 1)\n {\n if (this.currPage < this.totalPages - 1)\n {\n ++this.currPage;\n }\n }\n else if (par1GuiButton.id == 2)\n {\n if (this.currPage > 0)\n {\n --this.currPage;\n }\n }\n else if (par1GuiButton.id == 8)\n {\n this.index = true;\n this.currPage = 0;\n this.totalPages = (this.maxResearch - (this.maxResearch % 5))/5 + 1;\n }\n else if (par1GuiButton.id == 9)\n {\n if (this.currentResearch == this.bookmarkpage) {\n \tthis.bookmarkpage = this.maxResearch + 1;\n \tSystem.out.println(\"changed\");\n }\n else\n {\n \tthis.bookmarkpage = this.currentResearch;\n \tSystem.out.println(\"changed\");\n }\n editingPlayer.inventory.mainInventory[editingPlayer.inventory.currentItem].stackTagCompound.setInteger(\"SelectedResearch\", this.bookmarkpage);\n updateBookmark();\n\n }\n else if (par1GuiButton.id > 2)\n {\n\t this.index = false;\n\t this.currentResearch = par1GuiButton.id + (currPage*5) - 2;\n\t NBTTagCompound var4 = itemstack.getTagCompound();\n\t this.researchKey = itemstack.stackTagCompound.getCompoundTag(Integer.toString(this.currentResearch)).getString(\"Research\");\n\t this.complete = itemstack.stackTagCompound.getCompoundTag(Integer.toString(this.currentResearch)).getInteger(\"Complete\");\n\t \tif (itemstack.stackTagCompound.getCompoundTag(Integer.toString(this.currentResearch)).getInteger(\"Complete\") == 1) {\n\t this.totalPages = ResearchDictionary.researchList.get(researchKey).description.size();\n\t }\n\t this.currPage = 0;\n }\n\n this.updateButtons();\n }\n }" ]
[ "0.6377674", "0.62777615", "0.60320926", "0.60162026", "0.5958705", "0.59188426", "0.5891989", "0.58839864", "0.5875603", "0.5863468", "0.583328", "0.5823433", "0.5820795", "0.58064747", "0.5778922", "0.5767247", "0.57555014", "0.5752914", "0.5752914", "0.5745798", "0.57397217", "0.5729155", "0.5693776", "0.5672431", "0.56700325", "0.5668127", "0.5662833", "0.5642433", "0.5640691", "0.5637734", "0.56368303", "0.56332105", "0.56222224", "0.56053096", "0.55843526", "0.558272", "0.55798817", "0.55764556", "0.5561108", "0.5545658", "0.5528283", "0.54968107", "0.5479264", "0.5475848", "0.54754156", "0.5473672", "0.5465715", "0.5463679", "0.54565513", "0.5434845", "0.54159176", "0.5408765", "0.54024994", "0.5379026", "0.53713185", "0.5360767", "0.5359903", "0.5345081", "0.5328114", "0.5323003", "0.53216904", "0.5319704", "0.53134155", "0.5310209", "0.53024817", "0.5292776", "0.52819115", "0.5281136", "0.5270589", "0.5270376", "0.52642083", "0.5253028", "0.5251531", "0.52484846", "0.5241655", "0.523917", "0.523738", "0.5236146", "0.5227772", "0.52179563", "0.52150697", "0.5206544", "0.5205567", "0.51991266", "0.51959753", "0.51945335", "0.5191931", "0.5191209", "0.5185436", "0.51752836", "0.51751065", "0.51736856", "0.5171454", "0.5170185", "0.5168253", "0.5166833", "0.51628715", "0.51625896", "0.516183", "0.51598704", "0.51587826" ]
0.0
-1
Simulates a background job.
@Override protected String[] doInBackground(Void... params) { try { Thread.sleep(2000); } catch (InterruptedException e) { } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void scheduleJob() {\n\n }", "private void backgroundExecution() {\n // This moves the time consuming operation to a child thread.\n Thread thread=new Thread(null, doBackgroundThreadProcessing, \"Background\");\n thread.start();\n }", "public void backgroundProcess();", "void backgroundProcess();", "void schedule(ScheduledJob job);", "@NonNull\n @Override\n public Result doWork() {\n\n Log.d(TAG, \"doWork: \");\n savedata();\n createNotification();\n\n OneTimeWorkRequest oneTimeWorkRequest = new OneTimeWorkRequest.Builder(MyWorkManager.class)\n .setInitialDelay(5, TimeUnit.SECONDS).build();\n WorkManager.getInstance().enqueueUniqueWork(\"aaa\", ExistingWorkPolicy.APPEND, oneTimeWorkRequest);\n\n\n return Result.success();\n\n }", "public void scheduleJobs();", "private void startBackgroundWorker() {\n\t\tworker.execute(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\tif (!buildList.isEmpty()) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tTestsResultQueueEntry testsResultQueueEntry = buildList.get(0);\n\t\t\t\t\t\t\tTestsResult testsResult = pluginServices.getTestsResult(testsResultQueueEntry.jobId, testsResultQueueEntry.buildId);\n\t\t\t\t\t\t\tOctaneResponse response = pushTestsResult(testsResult);\n\t\t\t\t\t\t\tif (response.getStatus() == HttpStatus.SC_ACCEPTED) {\n\t\t\t\t\t\t\t\tlogger.info(\"tests result push SUCCEED\");\n\t\t\t\t\t\t\t\tbuildList.remove(0);\n\t\t\t\t\t\t\t} else if (response.getStatus() == HttpStatus.SC_SERVICE_UNAVAILABLE) {\n\t\t\t\t\t\t\t\tlogger.info(\"tests result push FAILED, service unavailable; retrying after a breathe...\");\n\t\t\t\t\t\t\t\tbreathe(SERVICE_UNAVAILABLE_BREATHE_INTERVAL);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// case of any other fatal error\n\t\t\t\t\t\t\t\tlogger.error(\"tests result push FAILED, status \" + response.getStatus() + \"; dropping this item from the queue\");\n\t\t\t\t\t\t\t\tbuildList.remove(0);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tlogger.error(\"tests result push failed; will retry after \" + SERVICE_UNAVAILABLE_BREATHE_INTERVAL + \"ms\", e);\n\t\t\t\t\t\t\tbreathe(SERVICE_UNAVAILABLE_BREATHE_INTERVAL);\n\t\t\t\t\t\t} catch (Throwable t) {\n\t\t\t\t\t\t\tlogger.error(\"tests result push failed; dropping this item from the queue \", t);\n\t\t\t\t\t\t\tbuildList.remove(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreathe(LIST_EMPTY_INTERVAL);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public interface JobSimulator {\n\n /**\n * Starts the job in simulation mode in a separate thread.\n *\n * @param job The job to simulate.\n *\n * @return A {@link Future} containing the simulation results after the execution finishes.\n */\n Future<Map<String, SimulationResult>> simulateJob(Job job);\n\n /**\n * Cancels all running simulations of the provided job.\n *\n * @param jobId The job's ID.\n */\n void cancelAllSimulations(String jobId);\n\n /**\n * Cancels all running simulations that are active for too long without processing any events.\n */\n void cancelStaleSimulations();\n\n /**\n * Called by Spring if a {@link JobTriggerEvent} is fired. Takes care, that the event is handed over to the correct job, if it\n * is currently executed in simulation mode.\n *\n * @param jobTriggerEvent The event to hand over to a simulated job.\n */\n @SuppressWarnings(\"unused\")\n void onJobTriggerEvent(JobTriggerEvent jobTriggerEvent);\n\n}", "@Override\n public boolean onStartJob(JobParameters params) {\n Log.d(TAG, \"Job started\");\n doBackgroundWork(params);\n\n return true;\n }", "public void run() {\n jobDescriptor j = null;\n\n while (!exit) {\n try {\n // wait for work\n syncObject.acquire();\n\n // get next job descriptor\n j = jobQueue.poll();\n if (j == null)\n continue;\n\n j.outputObject.started();\n\n if (!executor.executeTask(new MyRunnable(j.codeToBeExecuted, j.outputObject))) {\n j.outputObject.error(\"... cancelled!\");\n }\n } catch (Throwable e) {\n logger.error(e.getMessage());\n }\n }\n }", "public void execute() {\n\t\tlaunch();\n\t}", "public void scheduleJob(View v) {\n // Set application context.\n audioServiceBinder.setContext(getApplicationContext());\n // Start audio in background service.\n// audioServiceBinder.startAudio();\n// for (int i = 1; i < 2; i++) { // just for debugging\n for (int i = 1; i < 101; i++) { // queue up jobs for the next 8 minutes\n this.scheduleJobInSeconds(i * 5);\n }\n }", "private void scheduleJob() {\n Log.d(TAG, \"Long lived task is done.\");\n }", "public void run() {\n TransactionBuilder builder = new TransactionBuilder();\n builder.asciiMessage(\"Hello World!\");\n Transaction toSubmit = builder.build();\n context.getConfiguration();\n\n try {\n while (true) {\n\n ixi.submit(toSubmit);\n System.out.println(\"Sende\");\n\n Thread.sleep(10000);\n }\n } catch (InterruptedException e) {\n if (isRunning()) {\n e.printStackTrace();\n\n throw new RuntimeException(e);\n }\n }\n }", "void execute(Runnable job);", "public void run(){\n Timer time = new Timer(); // Instantiate Timer Object\n\n ScheduledClass st = new ScheduledClass(this.job,this.shm,time,this.stopp); // Instantiate SheduledTask class\n time.schedule(st, 0, this.periodicwait); // Create Repetitively task for every 1 secs\n }", "@Test\n\tpublic void simpleSubmitAndWaitForeverTest() {\n\t\ttry {\n\t\t\tSession session = SessionFactory.getFactory().getSession();\n\n\t\t\tsession.init(contactName);\n\t\t\tJobTemplate jt = session.createJobTemplate();\n\t\t\t\n\t\t\t// Note: The test will fail if the user's home directory does not\n\t\t\t// exist on the execute node.\n\t\t\tjt.setWorkingDirectory(System.getProperty(\"user.home\"));\n\t\t\tjt.setRemoteCommand(\"/bin/sleep\");\n\t\t\tjt.setArgs(Collections.singletonList(\"10\"));\n\t\t\tjt.setJobName(SimpleTest.class.getSimpleName());\n\t\t\tString jobId = session.runJob(jt);\n\t\t\t\n\t\t\tassertNotNull(jobId);\n\t\t\tassertTrue(jobId.length() > 0);\n\t\t\t\n\t\t\t// Delete the template\n\t\t\tsession.deleteJobTemplate(jt);\n\n\t\t\t// Wait for the job to complete\n\t\t\tJobInfo jobInfo = session.wait(jobId, Session.TIMEOUT_WAIT_FOREVER);\n\n\t\t\tassertNotNull(jobInfo);\n\t\t\t\n\t\t\t// Exit the session\n\t\t\tsession.exit();\n\t\t} catch (Exception de) {\n\t\t\tde.printStackTrace();\n\t\t\tfail(de.getMessage());\n\t\t}\n\t}", "@Override\n public void teleopPeriodic()\n {\n Scheduler.getInstance().run();\n }", "public void doWork() {\n Thread thread = new Thread( hva != null ? hva : this);\n thread.start();\n }", "abstract void doJob();", "public static void main(String[] args) {\n BackgroundBot bg = new BackgroundBot();\n try {\n while(true) {\n bg.getAnswer();\n Thread.sleep(5000);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tint i = 0;\r\n\t\t\t\twhile (i < 50) {\r\n\t\t\t\t\tString job = Thread.currentThread().getName() + \"---\" + new Random(99999L).toString();\r\n\t\t\t\t\tprinter.addJob(job);\r\n\t\t\t\t\tSystem.out.println(\"Added \" + job + \" to Printer Queue\");\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(15);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}", "public void testPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public static void scheduleJob() {\n Set<JobRequest> jobRequests = JobManager.instance().getAllJobRequestsForTag(MobssJob.TAG);\n if (!jobRequests.isEmpty()) {\n return;\n }\n\n new JobRequest.Builder(MobssJob.TAG)\n .setPeriodic(AlarmManager.INTERVAL_DAY)\n .setUpdateCurrent(true) // cancel any preexisting job with the same tag while being scheduled.\n// .setRequiredNetworkType(JobRequest.NetworkType.CONNECTED) // since the sync service needs network connection\n// .setRequirementsEnforced(true) // makes sure that all the requirements are met before starting the sync service, if at least one of the requirements is not met then the sync service will be rescheduled and not run\n .build()\n .schedule();\n }", "public void scheduleJob() {\n JobInfo.Builder builder = null;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n builder = new JobInfo.Builder(mJobId++, mServiceComponent);\n builder.setMinimumLatency(1000);\n builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY);\n // Extras, work duration.\n PersistableBundle extras = new PersistableBundle();\n extras.putLong(WORK_DURATION_KEY, Long.valueOf(1) * 1000);\n extras.putString(\"gsonData\", gsonDataa);\n extras.putInt(\"servicetype\", 1);\n builder.setExtras(extras);\n // Schedule job\n Log.d(TAG, \"Scheduling job\");\n JobScheduler tm = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);\n tm.schedule(builder.build());\n\n }\n\n\n\n }", "public void run() {\n\t\t\t\twhile (queue.size() > 0) {\n\t\t\t\t\tJobQueue urlList = queue.poll();\n\t\t\t\t\tdoRequests(urlList);\n\t\t\t\t}\n\t\t\t}", "static void enqueueWork(Context context, Intent work) {\n enqueueWork(context, ParkSensorBackgroundService.class, JOB_ID, work);\n if (spiFileHandler == -1) {\n spiFileHandler = initSPIDevice();\n }\n if (spiFileHandler != -1) {\n Log.i(\"BackgroundService\", \"Initialized. \" + spiFileHandler);\n }\n }", "@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n \n }", "public void teleopPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void run() {\n\t\tthis.launch( null );\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }", "public void teleopPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tstartRecallJobTask();\n\t\t\t\tmHandler.postDelayed(mHandlerTask, INTERVAL);\n\t\t\t}", "private void backgroundTimerHandler() {\n if (timer == null);\n timer = new Timer();\n\n TimerTask timerTask = new TimerTask() {\n @Override\n public void run() {\n ReportSender.sendReport();\n }\n };\n\n timer.schedule(timerTask, timerTime);\n }", "@Override\n public void autonomousPeriodic()\n {\n Scheduler.getInstance().run();\n }", "public void run() {\r\n\t\twhile(!quit) {\r\n\t\t\ttry {\r\n\t\t\t\tArrayList<Coupon>allCoupons = (ArrayList<Coupon>) couponDaoDB.getAllCoupons();\r\n\t\t\t\tfor (Coupon c : allCoupons) {\r\n\t\t\t\t\tif(couponDaoDB.expiriedCoupon(c)){\r\n\t\t\t\t\t\tcouponDaoDB.removeCoupon(c);\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"**Daily Job have been Activated**\");\r\n\t\t\t\tSystem.out.println(\"**All exipired Coupons have been Deleted**\");\r\n\t\t\t\tSystem.out.println(\"**going into Sleep of: \"+ sleepTime +\" hours**\");\r\n\t\t\t\tTimeUnit.HOURS.sleep(sleepTime);\r\n\t\t\t//\tTimeUnit.MINUTES.sleep(2); //for Testing\r\n\r\n\t\t\t} catch (InterruptedException | CouponSystemException e) {\r\n\t\t\t}\r\n\t\t}\r\n\t}", "java.util.concurrent.Future<StartJobRunResult> startJobRunAsync(StartJobRunRequest startJobRunRequest);", "@Override\n public boolean onStartJob(JobParameters job) {\n Log.d(LOG_TAG, \"Sync job started...\");\n new Thread(new SyncRunnable(job)).start();\n return true;\n }", "@Override\n public void execute() {\n Time.sleep(3000);\n Starting.execute();\n }", "public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n }", "public static void main(String[] args) {\n\t\t\r\n\t\ttimer = new Timer();\r\n//\t\ttimer.schedule(new WorkTask(), 5000, 3000);\r\n\t\ttimer.schedule(new WorkTask(), 1000);\r\n\t}", "public void run() {\n\t\tZMQ.Socket sender = context.socket(ZMQ.PUSH);\n\t\tsender.bind(\"tcp://*:5557\");\n\t\t\n\t\t//this lets you go to another machine to start a worker\n\t\tSystem.out.println(\"Press Enter when the workers are ready: \");\n\t\ttry {\n\t\t\tSystem.in.read();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// Messaging sending loop\n\t\tSystem.out.println(\"Sending tasks to workers\\n\");\n\t\twhile (!Thread.interrupted()) {\n\t\t\ttry {\n\t\t\t\t// If there are jobs to be sent, send them\n\t\t\t\t// Synchronize access to workParts structure before accessing it\n\t\t\t\tsynchronized (Master.lock) {\n\t\t\t\t\tif (!workParts.isEmpty()) {\t\n\t\t\t\t\t\tfor (Computation comp : workParts.values()) {\n\t\t\t\t\t\t\t// Submit only unsubmitted jobs\n\t\t\t\t\t\t\tif (!comp.isSubmitted()) {\n\t\t\t\t\t\t\t\tfor (int i=0; i < comp.getNumOfSubmissions(); i++) {\n\t\t\t\t\t\t\t\t\tsendJob(sender, comp);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Set submitted flag\n\t\t\t\t\t\t\t\tcomp.setSubmitted(true);\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\t// Take a short break before reading the job list again\n\t\t\t\tThread.sleep(10);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void doTask() throws InterruptedException {\n Thread.sleep(5000);\n }", "@Override\n public void teleopPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }", "@Override\n public void run() {\n \n mLogger.info(this.id+\" Started.\");\n \n // run till interrupted\n while (!Thread.currentThread().isInterrupted()) {\n \n // execute our job\n super.run();\n \n // job is done, lets sleep it off for a bit\n try {\n mLogger.debug(this.id + \" SLEEPING for \" + this.sleepTime + \" milliseconds ...\");\n Thread.sleep(this.sleepTime);\n } catch (InterruptedException e) {\n mLogger.info(this.id + \" INTERRUPT: \" + e.getMessage());\n break;\n }\n }\n\n mLogger.info(this.id+\" Done.\");\n }", "@Override\n public void run() {\n schedule();\n }", "private void go() {\n\n new Thread(this).start();\n }", "public void autonomousPeriodic() {\r\n Scheduler.getInstance().run();\r\n }", "@Override\r\n\tpublic void doWork() {\n\t\tSystem.out.println(\"Barking Bow Bow\");\r\n\t}", "@Override\n\tpublic void startWork() {\n\t\tSystem.out.println(\"Robot is working\");\n\t}", "@InSequence(1)\n @Test\n public void worksAfterDeployment() throws InterruptedException {\n int sum = sendMessages(10);\n runJob();\n Assert.assertEquals(10, collector.getLastItemCount());\n Assert.assertEquals(sum, collector.getLastSum());\n Assert.assertEquals(1, collector.getNumberOfJobs());\n }", "@Override\npublic void run() {\n\tCalendar oFecha = Calendar.getInstance();\n \n\tint minuto = 25;\n\t\n\tSystem.out.println(\n\t\t\toFecha.getTime().toLocaleString() + \n\t\t\t\" MinJob trigged by scheduler - \" + minuto );\n\t\n\ttry {\n\t\tSystem.out.println(Configuracion.getInstance().getProperty(\"clave\") );\n\t} catch(Exception e) {\n\t\te.printStackTrace();\n\t}\n\t\n\tif (oFecha.get(Calendar.MINUTE) == minuto)\t\n\t\tHourlyJob.realizarBackup();\n \n }", "public void submit(final Job job) {\n deque.add(new DelayedJob(job, System.nanoTime()));\n }", "public void triggerAsyncConnectorPing() {\n forcePing = true;\n try {\n // then fire a job immediately\n // use 'fireJobAt' here, instead of 'fireJob' to make sure the job can always be triggered\n // 'fireJob' checks for a job from the same job-class to already exist\n // 'fireJobAt' though allows to pass a name for the job - which can be made unique, thus does not conflict/already-exist\n logger.debug(\"triggerAsyncConnectorPing: firing job to trigger heartbeat\");\n getScheduler().schedule(this, getScheduler().NOW().name(NAME+UUID.randomUUID()));\n } catch (Exception e) {\n logger.info(\"triggerAsyncConnectorPing: Could not trigger heartbeat: \" + e);\n }\n }", "private void backgroundThreadProcessing() {\n // [ ... Time consuming operations ... ]\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\tpublic void doJob() {\n\t\tSystem.out.println(\"Studying\");\n\t}", "public void run(){\n\t\tstart();\n\t\tdoStuff();\n\t\tshutDown();\n\t}", "private void run()\n\t\t{\n\t\tObjectItemBuf<JobSchedulerMessage> buf =\n\t\t\tObjectBuf.buffer ((JobSchedulerMessage) null);\n\t\tStatus status = null;\n\t\tJobSchedulerMessage message = null;\n\t\tJobFrontendRef frontend = null;\n\n\t\treceiveloop : for (;;)\n\t\t\t{\n\t\t\t// Receive a message from any channel.\n\t\t\ttry\n\t\t\t\t{\n\t\t\t\tstatus = myChannelGroup.receive (null, null, buf);\n\t\t\t\t}\n\t\t\tcatch (ChannelGroupClosedException exc)\n\t\t\t\t{\n\t\t\t\t// Normal termination.\n\t\t\t\tbreak receiveloop;\n\t\t\t\t}\n\t\t\tcatch (Throwable exc)\n\t\t\t\t{\n\t\t\t\tmyLog.log (\"Exception while receiving message\", exc);\n\t\t\t\tbreak receiveloop;\n\t\t\t\t}\n\t\t\tmessage = buf.item;\n\n\t\t\t// Get job frontend proxy associated with channel.\n\t\t\tfrontend = (JobFrontendRef) status.channel.info();\n\n\t\t\t// Process message.\n\t\t\ttry\n\t\t\t\t{\n\t\t\t\tmessage.invoke (this, frontend);\n\t\t\t\t}\n\t\t\tcatch (Throwable exc)\n\t\t\t\t{\n\t\t\t\tmyLog.log (\"Exception while processing message\", exc);\n\t\t\t\t}\n\n\t\t\t// Enable garbage collection of no-longer-needed objects while\n\t\t\t// waiting to receive next message.\n\t\t\tbuf.item = null;\n\t\t\tstatus = null;\n\t\t\tmessage = null;\n\t\t\tfrontend = null;\n\t\t\t}\n\t\t}", "@Override\r\n\t\tpublic void run() {\n\t\t\twhile(true){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tTimeUnit.SECONDS.sleep(10);\r\n\t\t\t\t} catch (InterruptedException 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}\r\n\t\t}", "@Test(enabled = false, retryAnalyzer = Retry.class, testName = \"Sanity Tests\", description = \" Backup running in background -> make sure process keeps alive and completes its queue even in background AND if taking new shots they are automatically backed up\",\n\t\t\tgroups = { \"Sanity Android\" })\n\tpublic void backupInBackground() throws Exception, Throwable {\n\t\tdriver.lockScreen(60);\n\t\t\n\t\t//Bring App back to foreground & make sure that backup has finished successfully\n\t\t\n\t\t\n\t\t//Verify that the backup is completed\n\t\t\n\t\t\n\t\t// Make sure that a random image is open successfully\n\t\n\n\t\t// Make sure that the \"Image not available\" text doesn't displayed\n\t\t\n\n\n\t}", "public void run() {\n try {\n Thread.sleep(1000000);\n } catch (InterruptedException ie) {\n }\n }", "void completeJob();", "@Test\n public void testTimerTracking_JobCount_Background() {\n final int standbyBucket = WORKING_INDEX;\n JobStatus jobBg1 = createJobStatus(\"testTimerTracking_JobCount_Background\", 1);\n JobStatus jobBg2 = createJobStatus(\"testTimerTracking_JobCount_Background\", 2);\n ExecutionStats stats;\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(jobBg1, null);\n mQuotaController.maybeStartTrackingJobLocked(jobBg2, null);\n\n stats = mQuotaController.getExecutionStatsLocked(SOURCE_USER_ID,\n SOURCE_PACKAGE, standbyBucket);\n }\n assertEquals(0, stats.jobCountInRateLimitingWindow);\n\n setProcessState(ActivityManager.PROCESS_STATE_TOP_SLEEPING);\n synchronized (mQuotaController.mLock) {\n mQuotaController.prepareForExecutionLocked(jobBg1);\n }\n advanceElapsedClock(10 * SECOND_IN_MILLIS);\n synchronized (mQuotaController.mLock) {\n mQuotaController.prepareForExecutionLocked(jobBg2);\n }\n advanceElapsedClock(10 * SECOND_IN_MILLIS);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStopTrackingJobLocked(jobBg1, null, false);\n }\n advanceElapsedClock(10 * SECOND_IN_MILLIS);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStopTrackingJobLocked(jobBg2, null, false);\n }\n\n assertEquals(2, stats.jobCountInRateLimitingWindow);\n }", "@Override\n\tpublic void runJob(final Runnable job)\n\t{\n\t\tThread thread = new Thread(new Runnable()\n\t\t{\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tjob.run();\n\t\t\t\t}\n\t\t\t\tcatch (Exception e)\n\t\t\t\t{\n\t\t\t\t\tM_log.warn(\"runJob: \", e);\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\t// clear any bound current values\n\t\t\t\t\tthreadLocalService().clear();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthread.setDaemon(true);\n\t\tthread.start();\n\t}", "@Override\n public void run() {\n start(10, 500);\n }", "public void run() {\n long creationInterval = MILLISEC_PER_SEC / this.generationRate;\n\n int curIndex = 0;\n long startTime, endTime, diff, sleepTime, dur = this.test_duration;\n\n do {\n // startTime = System.nanoTime();\n startTime = System.currentTimeMillis();\n\n Request r = new DataKeeperRequest((HttpClient) this.clients[curIndex], this.appserverID, this.url);\n curIndex = (curIndex + 1) % clientsPerNode;\n this.requests.add(r);\n\n try {\n r.setEnterQueueTime();\n this.requestQueue.put(r);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n\n // endTime = System.nanoTime();\n endTime = System.currentTimeMillis();\n diff = endTime - startTime;\n dur -= diff;\n sleepTime = creationInterval - diff;\n if (sleepTime < 0) {\n continue;\n }\n\n try {\n // Thread.sleep(NANO_PER_MILLISEC / sleepTime, (int) (NANO_PER_MILLISEC % sleepTime));\n Thread.sleep(sleepTime);\n } catch (InterruptedException e) {\n throw new RuntimeException(e);\n }\n\n dur -= sleepTime;\n } while (dur > 0);\n\n try {\n this.requestQueue.put(new ExitRequest());\n this.requestQueueHandler.join();\n } catch (InterruptedException e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n\t\tpublic void run() {\n\t\t\ttask();\n\t\t}", "@Override\n\tpublic void run() {\n\t\tsuper.run();\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(500);\n\t\t\t}catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n\t\t\t\ttry {Thread.sleep(1000000000);} catch (InterruptedException ie) {}\n\t\t\t}", "@Test\n\tpublic void simpleSubmitAndWaitWithTimeoutTest() {\n\t\ttry {\n\t\t\tSession session = SessionFactory.getFactory().getSession();\n\n\t\t\tsession.init(contactName);\n\t\t\tJobTemplate jt = session.createJobTemplate();\n\t\t\t\n\t\t\t// Note: The test will fail if the user's home directory does not\n\t\t\t// exist on the execute node.\n\t\t\tjt.setWorkingDirectory(System.getProperty(\"user.home\"));\n\t\t\tjt.setRemoteCommand(\"/bin/sleep\");\n\t\t\tjt.setArgs(Collections.singletonList(\"10\"));\n\t\t\tjt.setJobName(SimpleTest.class.getSimpleName());\n\t\t\tString jobId = session.runJob(jt);\n\t\t\t\n\t\t\tassertNotNull(jobId);\n\t\t\tassertTrue(jobId.length() > 0);\n\t\t\t\n\t\t\t// Delete the template\n\t\t\tsession.deleteJobTemplate(jt);\n\n\t\t\t// Wait for the job to complete for (5 minutes at most)...\n\t\t\tJobInfo jobInfo = session.wait(jobId, 300);\n\n\t\t\tassertNotNull(jobInfo);\n\t\t\t\n\t\t\t// Exit the session\n\t\t\tsession.exit();\n\t\t} catch (DrmaaException de) {\n\t\t\tde.printStackTrace();\n\t\t\tfail(de.getMessage());\n\t\t}\n\t}", "@Override\n\tvoid startWork() {\n\t\t\n\t}", "@Override\n\tvoid startWork() {\n\t\t\n\t}", "void runAppInBackground(int seconds);", "public void start() {\n notifyStart();\n simloop();\n notifyStop();\n }", "public void run();", "public void run();", "public void run();", "public void run();", "public void run();", "public void schedule(Runnable job, long delay, TimeUnit unit);", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\t\n\t}", "@Override\n public boolean onStartJob(final JobParameters jobParameters) {\n // Here's where we make an AsyncTask so that this is no longer on the main thread\n mBackgroundTask = new BackgroundAsyncTask(new JobCallback() {\n @Override\n public void resultCallback(ArrayList<News> news) {\n Context context = NewsJobService.this;\n // Prepare to show notification\n NotificationUtils.generateNotificationLayout(context, news);\n //Override onPostExecute and called jobFinished. Pass the job parameters\n // and false to jobFinished. This will inform the JobManager that your job is done\n // and that you do not want to reschedule the job.\n\n /*\n * Once the AsyncTask is finished, the job is finished. To inform JobManager that\n * you're done, you call jobFinished with the jobParamters that were passed to your\n * job and a boolean representing whether the job needs to be rescheduled. This is\n * usually if something didn't work and you want the job to try running again.\n */\n jobFinished(jobParameters, false);\n }\n });\n // Execute the AsyncTask\n mBackgroundTask.execute();\n return true;\n }", "private void scheduleJob(RemoteMessage remoteMessage) {\n Bundle myExtrasBundle = new Bundle();\n myExtrasBundle.putString(\"title\", remoteMessage.getData().get(\"title\"));\n myExtrasBundle.putString(\"message\", remoteMessage.getData().get(\"message\"));\n\n FirebaseJobDispatcher dispatcher =\n new FirebaseJobDispatcher(new GooglePlayDriver(this));\n Job myJob = dispatcher.newJobBuilder()\n .setService(MyJobService.class)\n .setTag(\"my-job-tag\")\n .setRecurring(false)\n .setLifetime(Lifetime.UNTIL_NEXT_BOOT)\n .setTrigger(Trigger.executionWindow(0, 30))\n .setReplaceCurrent(false)\n .setRetryStrategy(RetryStrategy.DEFAULT_EXPONENTIAL)\n .setConstraints(\n Constraint.ON_UNMETERED_NETWORK,\n Constraint.DEVICE_CHARGING\n )\n .setExtras(myExtrasBundle)\n .build();\n dispatcher.mustSchedule(myJob);\n }", "private static void runStandalone(ApplicationContext context) throws InterruptedException {\r\n\t\tJobParameters jobParameters = new JobParametersBuilder()\r\n\t\t\t.addString(\"user\", \"satadru02\").toJobParameters(); \r\n \t\r\n \tJobLauncher launcher = (JobLauncher)context.getBean(JobLauncher.class);\r\n \tJob dbToCsvJob = (Job)context.getBean(Job.class);\r\n \t\r\n \tJobExecution jobExecution = null;\r\n \ttry{\r\n \t jobExecution = launcher.run(dbToCsvJob, jobParameters);\r\n \t}catch(JobExecutionException e)\r\n \t{\r\n \t\tSystem.out.println(\"#### OOPS #### Job Launch Exception !!\" + e.getMessage());\r\n \t\tSystem.exit(0);\r\n\t }\r\n \t\r\n \tBatchStatus batchStatus = jobExecution.getStatus();\r\n \twhile(batchStatus.isRunning()){\r\n \t\tSystem.out.println(\"..... Batch Is running .....................\");\r\n \t\tThread.sleep(5000);\r\n \t}\r\n\t\t\tExitStatus exitStatus = jobExecution.getExitStatus();\r\n\t\t\tString exitCode = exitStatus.getExitCode();\r\n\t\t\tSystem.out.println(String.format(\"###### Exit status: %s\", exitCode));\r\n\r\n\t\t\tif(exitStatus.equals(ExitStatus.COMPLETED)){\r\n\t\t\t\tSystem.out.println(\"####### COMPLETED STATUS #######\");\r\n\t\t\t}\r\n\t}", "public static void reloadAsynch()\r\n {\r\n instance.processor.submit(instance.reloader);\r\n }", "private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}" ]
[ "0.65596265", "0.63640285", "0.6346608", "0.625504", "0.6223231", "0.6136318", "0.6134095", "0.6056807", "0.59102213", "0.5873411", "0.58626723", "0.5843962", "0.5830519", "0.5801023", "0.57894534", "0.5788195", "0.5772872", "0.5687358", "0.56393415", "0.5622726", "0.5616332", "0.5596886", "0.55679715", "0.5560619", "0.555705", "0.555705", "0.555705", "0.555705", "0.55353254", "0.55327827", "0.5526741", "0.5521618", "0.5509568", "0.5481749", "0.547473", "0.54737335", "0.54611546", "0.54611546", "0.54611546", "0.5448248", "0.5446455", "0.5441746", "0.54355574", "0.5416123", "0.5375533", "0.536768", "0.536513", "0.5362923", "0.5355691", "0.53489697", "0.5337603", "0.532855", "0.5325971", "0.53188413", "0.5318592", "0.5311296", "0.53015023", "0.5298625", "0.52892417", "0.52841157", "0.52669823", "0.52486956", "0.52440125", "0.5243978", "0.52362347", "0.52362347", "0.52362347", "0.52362347", "0.52362347", "0.52362347", "0.5225469", "0.52235734", "0.5218314", "0.5216259", "0.5212783", "0.52117294", "0.5209086", "0.5204667", "0.5203087", "0.5200006", "0.5195323", "0.51915604", "0.51870966", "0.51863384", "0.5179658", "0.51692235", "0.51692235", "0.51671624", "0.51618135", "0.51525277", "0.51525277", "0.51525277", "0.51525277", "0.51525277", "0.5151752", "0.514848", "0.51484257", "0.5147594", "0.5145707", "0.513979", "0.51392657" ]
0.0
-1
Should not render variable inside section.
@Test void shouldNotRenderVariableInside() throws Exception { MatcherAssert.assertThat( new Variable( new SquareIndicate() ).render( "[[#2]][[1]][[/2]][[^4]][[5]][[/4]] [[#7]][[6]][[>9]][[/7]]", new MapOf<>( new MapEntry<>("1", "A"), new MapEntry<>("5", "B"), new MapEntry<>("6", "C") ) ), Matchers.is( "[[#2]][[1]][[/2]][[^4]][[5]][[/4]] [[#7]][[6]][[>9]][[/7]]" ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void shouldNotRenderVariableInsideNested() throws Exception {\n MatcherAssert.assertThat(\n new Variable(\n new SquareIndicate()\n ).render(\n \"[[#2]][[11]] [[^4]][[15]][[/4]] [[/2]]\",\n new MapOf<CharSequence, Object>(\n new MapEntry<>(\"11\", \"AA\"),\n new MapEntry<>(\"15\", \"BB\")\n )\n ),\n Matchers.is(\"[[#2]][[11]] [[^4]][[15]][[/4]] [[/2]]\")\n );\n }", "@Override\n\tpublic Object visitSection(Section section) {\n\t\treturn null;\n\t}", "@Override\n void collectMixedSectionItems(MixedSectionCollection mixedItems) {\n assert false;\n }", "@Test\n\tpublic void section1DisplaysParagraph() {\n\t\tassertTrue(AccordionLogic.section1DisplaysParagraph());\n\t}", "public boolean renderAsNormalBlock(){\r\n return false;\r\n }", "protected boolean shouldIgnoreContent() {\n return empty;\n }", "@Override\n\tpublic Object visitSubsection(Subsection subsection) {\n\t\treturn null;\n\t}", "public boolean renderAsNormalBlock()\r\n {\r\n return false;\r\n }", "public boolean renderAsNormalBlock()\n {\n return false;\n }", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "@Test\n void shouldRenderValidTags() throws Exception {\n MatcherAssert.assertThat(\n new Variable(\n new SquareIndicate()\n ).render(\n \"[[ aA0._ ]] \",\n new MapOf<>(\"aA0._\", \"XX\")\n ),\n Matchers.is(\"XX \")\n );\n }", "@Then(\"there is no Article entry for that Article\")\r\n\tpublic void checkNoArticleEntryInResponse(){\n\t\tXmlReaderHelper xmlReader = new XmlReaderHelper(responseBody);\r\n\t\tint sectionIndex = xmlReader.getIndexOfNodeWithValue(\"/feed/entry/category[@term=\\\"article\\\"]\", \"\");\r\n\r\n\t\tSystem.out.println(\"sectionIndex is: \" + sectionIndex);\r\n\t\tassertThat(sectionIndex, is(-1));\r\n\t}", "@DefaultMessage(\"Section already added to the template\")\n @Key(\"template.sectionAddedToTemplate\")\n String template_sectionAddedToTemplate();", "@Override\n\tpublic final boolean renderAsNormalBlock()\n\t{\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean hasContent() {\n\t\treturn false;\n\t}", "public void forceNotInsideHeader() {\n insideHeader = false;\n }", "public void setSection(String section) {\n if(section==null){\n section=\"\";\n }\n this.section = section;\n }", "public void XXXtestEmptyContentDescription() throws Throwable {\n view.setTitle(\"RawIViewPart\");\n verifySettings(\"RawIViewPart\", \"RawIViewPart\", \"\");\n verifyEvents(true, false, true);\n }", "public boolean renderAsNormalBlock()\r\n/* 166: */ {\r\n/* 167:184 */ return false;\r\n/* 168: */ }", "boolean isDummy() {\n return var == null;\n }", "@Override\n public void sectionTitle_()\n {\n }", "public boolean isVariable() {\n return false;\n }", "public boolean renderAsNormalBlock()\n\t {\n\t return false;\n\t }", "@Test\n public void testRemoveSection() {\n System.out.println(\"removeSection\");\n int position = 0;\n \n if (instance.getNumberOfSections() > 0) \n instance.removeSection(position);\n else {\n instance.addSection(new Section(1, null, null, null, position));\n instance.removeSection(0);\n }\n int result = instance.getNumberOfSections();\n assertTrue (\"Was not removed\", result == 0);\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "@Override\r\n\tpublic boolean renderAsNormalBlock ( )\r\n\t{\n\t\treturn ( Configuration.Cosmetic.renderFallback ) ;\r\n\t}", "@Test\n public void testGetSection() {\n System.out.println(\"getSection\");\n int ID = 0;\n \n Section section = null;\n instance.addSection(section);\n \n Section result = instance.getSection(ID);\n assertNull(\"Something is wrong\", result);\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "@Override\n public boolean visit(JsVar x, JsContext<JsVar> ctx) {\n return !(x.getName().getIdent().startsWith(PREFIX));\n }", "@Test\n\tpublic void section1DisplaysParagraphTab3() {\n\t\tassertTrue(AccordionLogic.section1DisplaysParagraphTab3());\n\t}", "private void assertStreamItemViewHasNoTag() {\n Object tag = mView.getTag();\n assertNull(\"should not have a tag\", tag);\n }", "protected boolean shouldShowItemNone() {\n return false;\n }", "boolean isOmitResourceId();", "@Test\n\tpublic void section1DisplaysParagraphTab2() {\n\t\tassertTrue(AccordionLogic.section1DisplaysParagraphTab2());\n\t}", "protected abstract boolean skipAttributesInView(String code, boolean includeSecure);", "public boolean isSection(String key)\n {\n return getSection(key) != null;\n }", "void createdSection(TestResult tr, Section section);", "@Override\n public View checkContentValidation() {\n return null;\n }", "@Override\n public View checkContentValidation() {\n return null;\n }", "@Test\n public void testSection() {\n \n Report instance = new Report();\n\n ArrayList<Section> section = new ArrayList<Section>();\n \n Section section1 = new Section();\n Section section2 = new Section();\n \n assertNotSame(section1, section2);\n\n /**************/\n /** Phase 1 **/\n /**************/\n // Test of getter\n assertEquals(section, instance.getSection());\n\n /**************/\n /** Phase 2 **/\n /**************/\n\n section.add(section1);\n section.add(section2);\n\n instance.setSection(section);\n\n // Test of setter\n assertEquals(section, instance.getSection());\n\n /**************/\n /** Phase 3 **/\n /**************/\n Report instance2 = new Report();\n\n instance2.addSection(section1);\n instance2.addSection(section2);\n\n assertEquals(section, instance.getSection());\n }", "protected boolean inSomeBlock() {\n return !enclosingBlocks.isEmpty();\n }", "@Override\n public void sectionTitle()\n {\n }", "@Override\n public boolean isNoTitle() {\n return true;\n }", "@Override\r\n\tprotected String buildContent() {\n\t\treturn null;\r\n\t}", "@Override\n protected boolean isNotAddTitle() {\n return true;\n }", "public void testBlogEntryHasNoTags() throws Exception {\n blogEntry.setExcerpt(\"Excerpt - here is some text\");\n blogEntry.setBody(\"Body - here is some text\");\n context.setMedia(ContentDecoratorContext.HTML_PAGE);\n decorator.decorate(context, blogEntry);\n assertEquals(\"Excerpt - here is some text\", blogEntry.getExcerpt());\n assertEquals(\"Body - here is some text\", blogEntry.getBody());\n }", "public void validate_GrocerySubOption_NotDisplay() {\n List<WebElement> list = getDriver().findElements(By.name(\"substitution\"));\n Assert.assertTrue(\"=== Grocery Substitution Option Field Not Present!\", list.size() == 0);\n }", "private void switchToNoContentView() {\n no_content.setVisibility(View.VISIBLE);\n mRecyclerView.setVisibility(View.GONE);\n }", "@Test(expectedExceptions = ParseException.class)\n\tpublic void testDictionaryLiteralMissingValue() throws ParseException {\n\t\tparser(\"<%={a:}%>\").block();\n\t}", "public void setSectionNo(String sectionNo)\r\n\t{\r\n\t\tthis.sectionNo = sectionNo;\r\n\t}", "@DefaultMessage(\"\\\"View\\\" permission must not be unchecked for a section\")\n @Key(\"gen.viewPermRequiredException\")\n String gen_viewPermRequiredException();", "@Test\n public void test015() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.span();\n Hidden hidden0 = new Hidden(block0, \"x_O/V\", \"x_O/V\");\n hidden0._setParent((Component) errorPage0);\n }", "@Override\n\tpublic boolean isInside() {\n\t\treturn false;\n\t}", "private boolean isUnunsedVariable(final String message) {\n\t\treturn message.contains(\"Unused variable\"); //$NON-NLS-1$\n\t}", "@Test\n public void testEmptyTemplate() {\n util.fillTemplate(\"test.template.empty\", \"no_arg\", null);\n }", "public boolean isPartialView() {\n return true;\n }", "public void setSection(final String section) {\n this.section = section;\n }", "public boolean isDontCare(){\n return hasDontCare;\n }", "abstract void checkWhetherVariable(SyntaxUnit use);", "public void mo66448b(SectionNoImgViewHolder sectionNoImgViewHolder) {\n C32569u.m150519b(sectionNoImgViewHolder, C6969H.m41409d(\"G618CD91EBA22\"));\n super.mo66448b(sectionNoImgViewHolder);\n Section section = (Section) sectionNoImgViewHolder.mo108896M();\n CatalogFragment catalogFragment = this.f53758a;\n Integer valueOf = Integer.valueOf(section.index.global);\n String str = section.f40387id;\n C32569u.m150513a((Object) str, C6969H.m41409d(\"G60979B13BB\"));\n catalogFragment.mo78147a(valueOf, str);\n }", "@Then(\"^the \\\"([^\\\"]*)\\\" is not displayed in Project Page$\")\n public void theIsNotDisplayedInProjectPage(final String data) {\n assertion.assertFalse(project.isVisibleStory(DataInterpreter.getValue(data).toString()));\n }", "public void testNullMode()\r\n {\r\n try\r\n {\r\n new IncludeDirective( null, null, \"value\", PROPERTIES );\r\n fail( \"no-NPE\" );\r\n }\r\n catch( NullPointerException e )\r\n {\r\n // success\r\n }\r\n }", "public void testNullValue()\r\n {\r\n try\r\n {\r\n new IncludeDirective( IncludeDirective.REF, null, null, PROPERTIES );\r\n fail( \"no-NPE\" );\r\n }\r\n catch( NullPointerException e )\r\n {\r\n // success\r\n }\r\n }", "@Override\n public void localRender(OrchidContext oc) throws OrchidException, IOException\n {\n super.localRender(oc);\n\n if (parentBlogLink == null) {\n Device device = oc.getDevice();\n device.println(\"Warning: This blog posting is not associated with a blog.\");\n } else {\n parentBlogLink.render(oc);\n }\n }", "public String getSection(){\n return mSection;\n }", "public String getSection(){\n return sectionsText;\n }", "@Test\n public void testWellTemplatedRefToMissingData() throws Exception {\n Assert.assertTrue(CaseTestUtils.xpathEvalAndCompare(evalCtx, \"instance('casedb')/casedb/case[@case_id = 'parent_node']/index/parent\", \"\"));\n Assert.assertTrue(CaseTestUtils.xpathEvalAndCompare(evalCtx, \"instance('casedb')/casedb/case[@case_id = 'parent_node']/anything_can_go_here\", \"\"));\n Assert.assertTrue(CaseTestUtils.xpathEvalAndCompare(evalCtx, \"instance('casedb')/casedb/case[@case_id = 'parent_node']/index/anything_can_go_here\", \"\"));\n Assert.assertTrue(CaseTestUtils.xpathEvalAndCompare(evalCtx, \"instance('casedb')/casedb/case[@case_id = 'parent_node']/index/anything_can_go_here/@case_type\", \"\"));\n Assert.assertTrue(CaseTestUtils.xpathEvalAndCompare(evalCtx, \"instance('casedb')/casedb/case[@case_id = 'parent_node']/index/anything_can_go_here/@relationship\", \"\"));\n Assert.assertTrue(CaseTestUtils.xpathEvalAndCompare(evalCtx, \"instance('casedb')/casedb/case[@case_id = 'parent_node']/attachment/anything_can_go_here\", \"\"));\n }", "public void testUnconditionalBreakDirective()\n {\n assertEvalEquals(\"1\", \"#foreach($i in [1..5])$i#break #end\");\n }", "protected String subtitle () { return null; }", "@Test\n public void testASSY1HasNoSubComponents() {\n assertThat( hasSubComponents( ASSY1_WITHOT_SUB_COMP ), is( false ) );\n }", "public void showMyComments(){\n String nothing=null;\n }", "public void testing() {\n\t\tprotectedInstanceVariable = \"\";\n\t}", "private void assertNoUnloppedLCVol2(String id) \n\t{\n\t solrFldMapTest.assertSolrFldHasNoValue(testFilePath, id, fldName, lcVol2Shelfkey);\n\t}", "@Test\n public void test142() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.em();\n Block block1 = (Block)block0.renderHint((CharSequence) \"V\\\"i%{rPYE$\");\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(block0._isGeneratedId());\n }", "@Override\n public void beforeRender()\n {\n\n }", "public String getSection() {\n return section;\n }", "public String getSection() {\n return section;\n }", "private void doBeforeRenderResponse(final PhaseEvent arg0) {\n\t}", "@Test\n public void skipTask_noHint() {\n initiateTest(ParticipantType.NOHINT);\n\n // Make sure the search results, paging are hidden and noresults is shown\n validateHidingSearchResults();\n\n // also check the experiment elements\n validateQuestion();\n\n assertFalse(\"Expecting hints element to be hidden\", experimentsPage.hintIsDisplayed());\n }", "@Then ( \"^Unselected patient text is displayed when no patient is selected.$\" )\r\n public void noPatientSelectedText () {\r\n waitForAngular();\r\n assertTextPresent( \"Please select a patient for which to view Obstetrics Records.\" );\r\n }", "protected String checkCollectionKey(String section) throws ActionException {\n\t\tlog.debug(\"evaluating section val: \" + section);\n\t\tString key = StringUtil.checkVal(section).toUpperCase();\n\t\ttry {\n\t\t\tSection.valueOf(key);\n\t\t} catch (Exception e) {\n\t\t\tthrow new ActionException(\"Unknown section value: \" + section);\n\t\t}\n\t\treturn key;\n\t}", "@Test\r\n public void studNoText() {\r\n onView(withId(R.id.Stud_id)).perform(typeText(\"123456\"));\r\n }", "@Test\n public void test064() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.ins();\n }", "private void assertNoUnloppedLCVol1(String id) \n\t{\n\t solrFldMapTest.assertSolrFldHasNoValue(testFilePath, id, fldName, lcVol1Shelfkey);\n\t}", "private void prepareLayoutForNoVideoAndNoThumbnail() {\n mBinding.tvDesc.setText(vm.getStep().getDescription());\n mBinding.exoplayer.setVisibility(View.GONE);\n mBinding.ivRecipeImage.setVisibility(View.GONE);\n /*If it came here then we cannot display a video */\n }", "public void washingtonFalse(View view) {\n washington = false;\n }", "@Test\n public void testRenderscriptDidNotRun() throws Exception {\n Map<String, ProjectBuildOutput> multi =\n project.executeAndReturnOutputMultiModel(\"compileDebugRenderscript\");\n assertThat(\n project.getBuildResult()\n .getTask(\":compileDebugRenderscript\")\n .getExecutionState()\n .toString())\n .isEqualTo(\"SKIPPED\");\n }", "public Snippet visit(NotExpression n, Snippet argu) {\n\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 _ret.returnTemp = \"! \"+f1.returnTemp;\n\t return _ret;\n\t }", "@Test\n\tvoid transformTagNonExistingValue() throws JspException {\n\t\tPageContext pc = createPageContext();\n\t\tTestBean tb = new TestBean();\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tServletRequestDataBinder binder = new ServletRequestDataBinder(tb, \"tb\");\n\t\tCustomDateEditor l = new CustomDateEditor(df, true);\n\t\tbinder.registerCustomEditor(Date.class, l);\n\t\tpc.getRequest().setAttribute(BindingResult.MODEL_KEY_PREFIX + \"tb\", binder.getBindingResult());\n\n\t\t// try with non-existing value\n\t\tBindTag bind = new BindTag();\n\t\tbind.setPageContext(pc);\n\t\tbind.setPath(\"tb.name\");\n\t\tbind.doStartTag();\n\n\t\tTransformTag transform = new TransformTag();\n\t\ttransform.setPageContext(pc);\n\t\ttransform.setValue(null);\n\t\ttransform.setParent(bind);\n\t\ttransform.setVar(\"theString2\");\n\t\ttransform.doStartTag();\n\n\t\tassertThat(pc.getAttribute(\"theString2\")).isNull();\n\t}", "public void setNotVisibleIfNotBlockedAndReplaced() {\n\t\tif (!isBlocked && getReplacementAttribute() == null) {\n\t\t\tthis.isVisible = false;\n\t\t}\n\t}", "public final boolean isSection() {\n return !children.isEmpty();\n }", "@Test\n\tpublic void testSectionsLoaded() throws Exception {\n\t\ttry {\n\t\t\tcmService.getSection(\"biology_101_01_lec01\");\n\t\t} catch (IdNotFoundException ide) {\n\t\t\tAssert.fail();\n\t\t}\n\t}", "private void dieIfNoTreasures(){\n if(this.hiddenTreasures.isEmpty() && this.visibleTreasures.isEmpty()){\n this.die();\n }\n }", "void hidePlaceholder();", "public void renderBefore(String alias);", "@Override protected String getSection(final String param) {\n return getBrowser().getDrbdXML().getSection(param);\n }", "IParser setOmitResourceId(boolean theOmitResourceId);", "boolean getOutputPartialsBeforeLanguageDecision();", "@Then(\"no results appear in the search list\")\n public void no_results_appear_in_the_search_list() {\n assert true;\n }" ]
[ "0.6481793", "0.59695286", "0.53771186", "0.5152658", "0.5134701", "0.5094508", "0.5072066", "0.5043655", "0.50329405", "0.50047565", "0.50047565", "0.50047565", "0.50047565", "0.49986696", "0.499085", "0.4981514", "0.49084884", "0.49019873", "0.48997435", "0.48867267", "0.48854944", "0.48801127", "0.48788843", "0.48771292", "0.4857793", "0.48525602", "0.48407498", "0.48319808", "0.48317724", "0.4796043", "0.47677886", "0.476", "0.4756443", "0.47551328", "0.47478896", "0.47420385", "0.4730162", "0.47265884", "0.47182602", "0.47182602", "0.47151655", "0.46960995", "0.46855128", "0.46839496", "0.46790355", "0.46752173", "0.46670207", "0.46609172", "0.46569914", "0.46505654", "0.46489173", "0.4636732", "0.462506", "0.46139085", "0.46055746", "0.4596042", "0.45886678", "0.45838737", "0.4582114", "0.4563997", "0.456339", "0.45581508", "0.45521215", "0.45478344", "0.453988", "0.45384273", "0.45358962", "0.45273536", "0.45264912", "0.45244065", "0.45190328", "0.45165294", "0.4507423", "0.4504254", "0.44880843", "0.44823432", "0.4480353", "0.4480353", "0.44713706", "0.44576967", "0.444901", "0.44482663", "0.44442445", "0.44430465", "0.4442406", "0.44401038", "0.44383365", "0.44332924", "0.4433065", "0.44301897", "0.44295448", "0.44235936", "0.4420443", "0.44203085", "0.44144428", "0.44132495", "0.44120783", "0.44109228", "0.44092667", "0.44021147" ]
0.6515125
0
Should not render variable inside nested section.
@Test void shouldNotRenderVariableInsideNested() throws Exception { MatcherAssert.assertThat( new Variable( new SquareIndicate() ).render( "[[#2]][[11]] [[^4]][[15]][[/4]] [[/2]]", new MapOf<CharSequence, Object>( new MapEntry<>("11", "AA"), new MapEntry<>("15", "BB") ) ), Matchers.is("[[#2]][[11]] [[^4]][[15]][[/4]] [[/2]]") ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void shouldNotRenderVariableInside() throws Exception {\n MatcherAssert.assertThat(\n new Variable(\n new SquareIndicate()\n ).render(\n \"[[#2]][[1]][[/2]][[^4]][[5]][[/4]] [[#7]][[6]][[>9]][[/7]]\",\n new MapOf<>(\n new MapEntry<>(\"1\", \"A\"),\n new MapEntry<>(\"5\", \"B\"),\n new MapEntry<>(\"6\", \"C\")\n )\n ),\n Matchers.is(\n \"[[#2]][[1]][[/2]][[^4]][[5]][[/4]] [[#7]][[6]][[>9]][[/7]]\"\n )\n );\n }", "@Override\n\tpublic Object visitSection(Section section) {\n\t\treturn null;\n\t}", "protected final void validateNotBuildingInner()\n {\n Validate.stateIsNull(myInner,What.INNERBLOCK);\n }", "@Test\n public void testWellTemplatedRefToMissingData() throws Exception {\n Assert.assertTrue(CaseTestUtils.xpathEvalAndCompare(evalCtx, \"instance('casedb')/casedb/case[@case_id = 'parent_node']/index/parent\", \"\"));\n Assert.assertTrue(CaseTestUtils.xpathEvalAndCompare(evalCtx, \"instance('casedb')/casedb/case[@case_id = 'parent_node']/anything_can_go_here\", \"\"));\n Assert.assertTrue(CaseTestUtils.xpathEvalAndCompare(evalCtx, \"instance('casedb')/casedb/case[@case_id = 'parent_node']/index/anything_can_go_here\", \"\"));\n Assert.assertTrue(CaseTestUtils.xpathEvalAndCompare(evalCtx, \"instance('casedb')/casedb/case[@case_id = 'parent_node']/index/anything_can_go_here/@case_type\", \"\"));\n Assert.assertTrue(CaseTestUtils.xpathEvalAndCompare(evalCtx, \"instance('casedb')/casedb/case[@case_id = 'parent_node']/index/anything_can_go_here/@relationship\", \"\"));\n Assert.assertTrue(CaseTestUtils.xpathEvalAndCompare(evalCtx, \"instance('casedb')/casedb/case[@case_id = 'parent_node']/attachment/anything_can_go_here\", \"\"));\n }", "@Override\n\tpublic Object visitSubsection(Subsection subsection) {\n\t\treturn null;\n\t}", "@Override\n void collectMixedSectionItems(MixedSectionCollection mixedItems) {\n assert false;\n }", "@Test\n public void test015() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.span();\n Hidden hidden0 = new Hidden(block0, \"x_O/V\", \"x_O/V\");\n hidden0._setParent((Component) errorPage0);\n }", "boolean hasNested();", "@Then(\"there is no Article entry for that Article\")\r\n\tpublic void checkNoArticleEntryInResponse(){\n\t\tXmlReaderHelper xmlReader = new XmlReaderHelper(responseBody);\r\n\t\tint sectionIndex = xmlReader.getIndexOfNodeWithValue(\"/feed/entry/category[@term=\\\"article\\\"]\", \"\");\r\n\r\n\t\tSystem.out.println(\"sectionIndex is: \" + sectionIndex);\r\n\t\tassertThat(sectionIndex, is(-1));\r\n\t}", "public boolean renderAsNormalBlock(){\r\n return false;\r\n }", "protected boolean inSomeBlock() {\n return !enclosingBlocks.isEmpty();\n }", "@Test\n\tpublic void section1DisplaysParagraph() {\n\t\tassertTrue(AccordionLogic.section1DisplaysParagraph());\n\t}", "@Override\n boolean areNestedRefsProhibited() {\n return true;\n }", "boolean hasNestedField();", "boolean isNested();", "@Test\n void shouldRenderValidTags() throws Exception {\n MatcherAssert.assertThat(\n new Variable(\n new SquareIndicate()\n ).render(\n \"[[ aA0._ ]] \",\n new MapOf<>(\"aA0._\", \"XX\")\n ),\n Matchers.is(\"XX \")\n );\n }", "@Override\n protected boolean shouldVisitSubtreeOfInternalMatchedNode(IMNode node) {\n return (node.getSchemaTemplateId() == NON_TEMPLATE)\n && super.shouldVisitSubtreeOfFullMatchedNode(node);\n }", "@Override\n protected boolean shouldVisitSubtreeOfInternalMatchedNode(IMNode node) {\n return (node.getSchemaTemplateId() == NON_TEMPLATE)\n && super.shouldVisitSubtreeOfFullMatchedNode(node);\n }", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isInside() {\n\t\treturn false;\n\t}", "public boolean renderAsNormalBlock()\n {\n return false;\n }", "public boolean renderAsNormalBlock()\r\n {\r\n return false;\r\n }", "@Test\n public void testTRK2HasNoSubComponents() {\n assertThat( hasSubComponents( TRK2_WITHOT_SUB_COMP ), is( false ) );\n }", "boolean ignoreInner();", "boolean hasFieldNested();", "@Test\n public void testTRK3HasNoSubComponents() {\n assertThat( hasSubComponents( TRK3_WITHOT_SUB_COMP ), is( false ) );\n }", "@Override\n protected boolean shouldVisitSubtreeOfFullMatchedNode(IMNode node) {\n return (node.getSchemaTemplateId() == NON_TEMPLATE)\n && super.shouldVisitSubtreeOfFullMatchedNode(node);\n }", "@Override\n protected boolean shouldVisitSubtreeOfFullMatchedNode(IMNode node) {\n return (node.getSchemaTemplateId() == NON_TEMPLATE)\n && super.shouldVisitSubtreeOfFullMatchedNode(node);\n }", "@Test\n public void testASSY1HasNoSubComponents() {\n assertThat( hasSubComponents( ASSY1_WITHOT_SUB_COMP ), is( false ) );\n }", "public void validate_GrocerySubOption_NotDisplay() {\n List<WebElement> list = getDriver().findElements(By.name(\"substitution\"));\n Assert.assertTrue(\"=== Grocery Substitution Option Field Not Present!\", list.size() == 0);\n }", "@Override\n public void localRender(OrchidContext oc) throws OrchidException, IOException\n {\n super.localRender(oc);\n\n if (parentBlogLink == null) {\n Device device = oc.getDevice();\n device.println(\"Warning: This blog posting is not associated with a blog.\");\n } else {\n parentBlogLink.render(oc);\n }\n }", "boolean hasNestedOuterField();", "@Override\n\tpublic final boolean renderAsNormalBlock()\n\t{\n\t\treturn false;\n\t}", "public boolean renderAsNormalBlock()\r\n/* 166: */ {\r\n/* 167:184 */ return false;\r\n/* 168: */ }", "public boolean renderAsNormalBlock()\n\t {\n\t return false;\n\t }", "@Test\n\tpublic void section1DisplaysParagraphTab2() {\n\t\tassertTrue(AccordionLogic.section1DisplaysParagraphTab2());\n\t}", "private void assertNoUnloppedLCVol2(String id) \n\t{\n\t solrFldMapTest.assertSolrFldHasNoValue(testFilePath, id, fldName, lcVol2Shelfkey);\n\t}", "@Test\n\tpublic void section1DisplaysParagraphTab3() {\n\t\tassertTrue(AccordionLogic.section1DisplaysParagraphTab3());\n\t}", "protected boolean shouldIgnoreContent() {\n return empty;\n }", "@Test(groups = {\"unreachable\"})\n\tpublic void testUnreachableNestedBraceless()\n\t{\n\t\tString[] src = {\n\t\t\t\"(function() {\",\n\t\t \" var x;\",\n\t\t \" if (!x)\",\n\t\t \" return function() {\",\n\t\t \" if (!x) x = 0;\",\n\t\t \" return;\",\n\t\t \" };\",\n\t\t \" return;\",\n\t\t \"}());\"\n\t\t};\n\t\t\n\t th.test(src);\n\t}", "@Test\n @DisplayName(\"Test Filtering of the Metrics with includedKeyValues for not existed key of Monitoring Exporter on \"\n + \" sub level.\")\n void testFilterIncludedNotExistedKeysSubLevel() throws Exception {\n logger.info(\"Testing filtering included not existed servlet names in the metrics \");\n List<String> checkIncluded = new ArrayList<>();\n checkIncluded.add(\"\");\n List<String> checkExcluded = new ArrayList<>();\n checkExcluded.add(\"servletName=\");\n replaceConfigurationWithFilter(RESOURCE_DIR\n + \"/exporter/rest_filter_included_not_existedkey_sublevel.yaml\",checkIncluded, checkExcluded);\n }", "@Test\n @DisplayName(\"Test Filtering of the Metrics with excludedKeyValues for not existed key of Monitoring Exporter on \"\n + \" sub level.\")\n void testFilterExcludedNotExistedKeysSubLevel() throws Exception {\n logger.info(\"Testing filtering excluded not existing servlet in the metrics \");\n List<String> checkIncluded = new ArrayList<>();\n checkIncluded.add(\"servletName=\");\n List<String> checkExcluded = new ArrayList<>();\n checkExcluded.add(\"servletName=notexisted\");\n replaceConfigurationWithFilter(RESOURCE_DIR\n + \"/exporter/rest_filter_excluded_not_existedkey_sublevel.yaml\",checkIncluded, checkExcluded);\n }", "private void assertNoUnloppedDeweyVol2(String id) \n\t{\n\t solrFldMapTest.assertSolrFldHasNoValue(testFilePath, id, fldName, deweyVol2Shelfkey);\n\t}", "@Test\n public void testGetSection() {\n System.out.println(\"getSection\");\n int ID = 0;\n \n Section section = null;\n instance.addSection(section);\n \n Section result = instance.getSection(ID);\n assertNull(\"Something is wrong\", result);\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "private void assertStreamItemViewHasNoTag() {\n Object tag = mView.getTag();\n assertNull(\"should not have a tag\", tag);\n }", "@Override\r\n\tpublic boolean renderAsNormalBlock ( )\r\n\t{\n\t\treturn ( Configuration.Cosmetic.renderFallback ) ;\r\n\t}", "public void testChildIsHidden() throws Exception\n {\n VFSContext context = getVFSContext(\"simple\");\n VirtualFileHandler root = context.getRoot();\n VirtualFileHandler child = context.getChild(root, \"child\");\n assertFalse(child.isHidden());\n }", "private TreeNode getOnlyChild() {\n return templateRoot.getChildren().get(0);\n }", "public void testUnconditionalBreakDirective()\n {\n assertEvalEquals(\"1\", \"#foreach($i in [1..5])$i#break #end\");\n }", "@Test\n public void testSection() {\n \n Report instance = new Report();\n\n ArrayList<Section> section = new ArrayList<Section>();\n \n Section section1 = new Section();\n Section section2 = new Section();\n \n assertNotSame(section1, section2);\n\n /**************/\n /** Phase 1 **/\n /**************/\n // Test of getter\n assertEquals(section, instance.getSection());\n\n /**************/\n /** Phase 2 **/\n /**************/\n\n section.add(section1);\n section.add(section2);\n\n instance.setSection(section);\n\n // Test of setter\n assertEquals(section, instance.getSection());\n\n /**************/\n /** Phase 3 **/\n /**************/\n Report instance2 = new Report();\n\n instance2.addSection(section1);\n instance2.addSection(section2);\n\n assertEquals(section, instance.getSection());\n }", "public void forceNotInsideHeader() {\n insideHeader = false;\n }", "private void assertNoUnloppedLCVol1(String id) \n\t{\n\t solrFldMapTest.assertSolrFldHasNoValue(testFilePath, id, fldName, lcVol1Shelfkey);\n\t}", "private void switchToNoContentView() {\n no_content.setVisibility(View.VISIBLE);\n mRecyclerView.setVisibility(View.GONE);\n }", "@Override\n\tpublic boolean hasContent() {\n\t\treturn false;\n\t}", "@Test\n public void testRemainingResourceStringValidDeepString() {\n Matcher mtch = filter.getMatcher(FULL_URI + \"/something/very/deep/nested\");\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"resource string differs\", REMAINING_RES_STRING, filter.getRootResourceString(mtch));\n }", "public boolean isPartialView() {\n return true;\n }", "@Override\n public boolean visit(JsVar x, JsContext<JsVar> ctx) {\n return !(x.getName().getIdent().startsWith(PREFIX));\n }", "@Override\n public View checkContentValidation() {\n return null;\n }", "@Override\n public View checkContentValidation() {\n return null;\n }", "private View inflateSectionView(RecyclerView parent) {\n trace();\n return LayoutInflater.from(parent.getContext())\n .inflate(R.layout.app_list_section, parent, false);\n }", "@Test\n\tvoid transformTagNonExistingValue() throws JspException {\n\t\tPageContext pc = createPageContext();\n\t\tTestBean tb = new TestBean();\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tServletRequestDataBinder binder = new ServletRequestDataBinder(tb, \"tb\");\n\t\tCustomDateEditor l = new CustomDateEditor(df, true);\n\t\tbinder.registerCustomEditor(Date.class, l);\n\t\tpc.getRequest().setAttribute(BindingResult.MODEL_KEY_PREFIX + \"tb\", binder.getBindingResult());\n\n\t\t// try with non-existing value\n\t\tBindTag bind = new BindTag();\n\t\tbind.setPageContext(pc);\n\t\tbind.setPath(\"tb.name\");\n\t\tbind.doStartTag();\n\n\t\tTransformTag transform = new TransformTag();\n\t\ttransform.setPageContext(pc);\n\t\ttransform.setValue(null);\n\t\ttransform.setParent(bind);\n\t\ttransform.setVar(\"theString2\");\n\t\ttransform.doStartTag();\n\n\t\tassertThat(pc.getAttribute(\"theString2\")).isNull();\n\t}", "@Test\n public void testRemoveSection() {\n System.out.println(\"removeSection\");\n int position = 0;\n \n if (instance.getNumberOfSections() > 0) \n instance.removeSection(position);\n else {\n instance.addSection(new Section(1, null, null, null, position));\n instance.removeSection(0);\n }\n int result = instance.getNumberOfSections();\n assertTrue (\"Was not removed\", result == 0);\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "public boolean isVariable() {\n return false;\n }", "@DefaultMessage(\"Section already added to the template\")\n @Key(\"template.sectionAddedToTemplate\")\n String template_sectionAddedToTemplate();", "boolean isDummy() {\n return var == null;\n }", "public int doStartTag() throws JspException {\n /* set the nested reference for possible inclusions etc */\n HttpServletRequest request =\n (HttpServletRequest) pageContext.getRequest();\n\n // get al the originals\n originalName = name;\n originalNesting = NestedPropertyHelper.getCurrentProperty(request);\n originalNestingName =\n NestedPropertyHelper.getCurrentName(request, this);\n\n // set what we have to\n if (name != null) {\n NestedPropertyHelper.setProperty(request, \"\");\n NestedPropertyHelper.setName(request, this.name);\n }\n\n // do the JSP thing\n return (EVAL_BODY_TAG);\n }", "public void setHaveSub(){\n\t\tthis.haveSub = true;\n\t}", "@Test(expectedExceptions = ParseException.class)\n\tpublic void testDictionaryLiteralMissingValue() throws ParseException {\n\t\tparser(\"<%={a:}%>\").block();\n\t}", "public void XXXtestEmptyContentDescription() throws Throwable {\n view.setTitle(\"RawIViewPart\");\n verifySettings(\"RawIViewPart\", \"RawIViewPart\", \"\");\n verifyEvents(true, false, true);\n }", "@Override\r\n\tprotected String buildContent() {\n\t\treturn null;\r\n\t}", "public boolean isEmptyNestedClauses ();", "@Test\n public void test064() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.ins();\n }", "public final boolean isSection() {\n return !children.isEmpty();\n }", "public void testBlogEntryHasNoTags() throws Exception {\n blogEntry.setExcerpt(\"Excerpt - here is some text\");\n blogEntry.setBody(\"Body - here is some text\");\n context.setMedia(ContentDecoratorContext.HTML_PAGE);\n decorator.decorate(context, blogEntry);\n assertEquals(\"Excerpt - here is some text\", blogEntry.getExcerpt());\n assertEquals(\"Body - here is some text\", blogEntry.getBody());\n }", "private void assertNoUnloppedDeweyVol1(String id) \n\t{\n\t solrFldMapTest.assertSolrFldHasNoValue(testFilePath, id, fldName, deweyVol1Shelfkey);\n\t}", "@Test\n public void test076() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.var();\n }", "boolean isOmitResourceId();", "public boolean isSection(String key)\n {\n return getSection(key) != null;\n }", "@Test\n public void test061() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.link();\n // Undeclared exception!\n try {\n FormElement formElement0 = errorPage0.hidden(\"Col component can e added onlG to a TableBlock.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Form elements can be created only by compoents that are attached to a form component.\n //\n }\n }", "protected boolean shouldShowItemNone() {\n return false;\n }", "@Test(priority = 7)\n public void rightSectionIsDisplayedTest() {\n assertTrue(driver.findElement(By.name(\"log-sidebar\")).isDisplayed());\n }", "public void testRootIsHidden() throws Exception\n {\n VFSContext context = getVFSContext(\"simple\");\n VirtualFileHandler root = context.getRoot();\n assertFalse(root.isHidden());\n }", "private void dieIfNoTreasures(){\n if(this.hiddenTreasures.isEmpty() && this.visibleTreasures.isEmpty()){\n this.die();\n }\n }", "@Override\n public boolean isMissingNode() { return false; }", "public void assertNoUnboundLabels() {\n if (Assert.ASSERTS_ENABLED) {\n Assert.that(!entry.isUnbound() && !continuation.isUnbound(), \"unbound label\");\n }\n }", "private void assertNoLoppedLC(String id) \n\t{\n\t solrFldMapTest.assertSolrFldHasNoValue(testFilePath, id, fldName, lcLoppedShelfkey);\n\t}", "public boolean isChild(){\n return false;\n }", "@Then(\"^the \\\"([^\\\"]*)\\\" is not displayed in Project Page$\")\n public void theIsNotDisplayedInProjectPage(final String data) {\n assertion.assertFalse(project.isVisibleStory(DataInterpreter.getValue(data).toString()));\n }", "private void checkRep() {\n\t\tif (CHECK_CONSTANT) {\n\t\tassert (label != null && childNode != null);\n\t\t}\n\t}", "@Test\n @DisplayName(\"Test Filtering of the Metrics with includedKeyValues for not existed key of Monitoring Exporter on \"\n + \" top level.\")\n void testFilterIncludedNotExistedKeysTopLevel() throws Exception {\n logger.info(\"Testing filtering included not existed app names in the metrics \");\n List<String> checkIncluded = new ArrayList<>();\n checkIncluded.add(\"\");\n List<String> checkExcluded = new ArrayList<>();\n checkExcluded.add(\"app=\");\n replaceConfigurationWithFilter(RESOURCE_DIR\n + \"/exporter/rest_filter_included_not_existedkey.yaml\",checkIncluded, checkExcluded);\n }", "@Test\n public void testParseDOMToExistenceValidationWidgetOnlySucceeds()\n {\n FixtureProperties properties = parser.parse(DefaultConfigurationParserMockDOMs\n .createDOMToExistenceValidationWidgetOnly());\n verifyCommonPropertiesAssertions(properties);\n }", "java.lang.String getNested();", "protected void doDisposeNestedParts() {\n\t}", "@Test(expectedExceptions = ParseException.class)\n\tpublic void testUnbalancedELTag() throws ParseException {\n\t\tparser(\"a<%=b()\").block();\n\t}", "public SubSectionDetail() {\r\n\t}", "public void hideDetails () {\n\t\tdetailDisplay.show(\"empty\");\n\t}", "@Test // DATAMONGO-774\n\t@Disabled\n\tvoid shouldRenderNestedIndexedFieldReference() {\n\t\tassertThat(transformValue(\"foo[3].bar\")).isEqualTo(\"$foo[3].bar\");\n\t}" ]
[ "0.6631525", "0.53359026", "0.52622694", "0.51503515", "0.5109612", "0.5086291", "0.50853825", "0.5055587", "0.50047237", "0.50029105", "0.50017405", "0.4988266", "0.49804866", "0.4974046", "0.49711975", "0.4967463", "0.49622482", "0.49622482", "0.49601835", "0.49601835", "0.49601835", "0.49601835", "0.49534735", "0.49459302", "0.49413693", "0.49231517", "0.4919495", "0.48997933", "0.48938587", "0.48922548", "0.48922548", "0.4880231", "0.4874483", "0.48691335", "0.48680004", "0.4846817", "0.48197427", "0.48087633", "0.47735247", "0.4750699", "0.46978426", "0.46898726", "0.46526682", "0.46345145", "0.46338725", "0.46285862", "0.46252403", "0.46128288", "0.46093282", "0.46047541", "0.45984015", "0.45954123", "0.45940414", "0.459092", "0.4589352", "0.45884067", "0.458683", "0.45832193", "0.45743638", "0.4570791", "0.45666277", "0.45666277", "0.45554084", "0.45447668", "0.452078", "0.45150322", "0.45134336", "0.45132867", "0.4512497", "0.4508248", "0.45016286", "0.45008707", "0.4485068", "0.4480413", "0.4477131", "0.4474821", "0.44713196", "0.4459567", "0.4457668", "0.44361952", "0.44307053", "0.44299388", "0.44278193", "0.44259185", "0.442275", "0.44205558", "0.4417927", "0.44123927", "0.4396766", "0.43953627", "0.4394821", "0.43892393", "0.43822333", "0.43802512", "0.43783313", "0.4373726", "0.43679616", "0.4356152", "0.43495762", "0.43450204" ]
0.7229694
0
Should render valid tags.
@Test void shouldRenderValidTags() throws Exception { MatcherAssert.assertThat( new Variable( new SquareIndicate() ).render( "[[ aA0._ ]] ", new MapOf<>("aA0._", "XX") ), Matchers.is("XX ") ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testTournamentTagsFormat() {\r\n\t\tassertTrue(cl.checkTournamentTagsFormat(tags));\r\n\t\tassertFalse(cl.checkTournamentTagsFormat(tags2));\r\n\t}", "private boolean checkTagPattern(TextInputLayout tags) {\n if (!Objects.requireNonNull(tags.getEditText()).getText().toString().matches(TAG_REGEX)) {\n tags.setErrorEnabled(true);\n tags.setError(getString(R.string.tag_not_valid));\n return false;\n }\n return true;\n }", "@Override\n public List<String> validationErrors(String str){\n List<String> errors = new ArrayList<String>();\n Tidy tidy = TIDY_POOL.get();\n tidy.parseDOM(new StringReader(\"<html><head><title>Test</title></head><body>\" + str + \"</body></html>\"), null);\n if (tidy.getParseErrors() > 0 || tidy.getParseWarnings() > 1) {\n errors.add(\"contains bad HTML\");\n }\n\n Matcher m = htmlTagPattern.matcher(str.toUpperCase());\n while (m.find()) {\n if (!ArrayUtils.contains(allowedHtmlTags, m.group(1))) {\n errors.add(\"contains not allowed HTML tag \" + m.group(1));\n }\n }\n\n long brackets_count = 0;\n for (int i = 0; i < brackets.length; i++) {\n if (i%2 != 0) {\n for (int j = 0; j < str.length(); j++) {\n if (str.charAt(j) == brackets[i]) {\n brackets_count--;\n }\n }\n if (brackets_count != 0) {\n errors.add(\"contains unclosed bracket '\" + String.valueOf(brackets[i]) + \"'\");\n }\n brackets_count = 0;\n } else {\n for (int j = 0; j < str.length(); j++) {\n if (str.charAt(j) == brackets[i]) {\n brackets_count++;\n }\n }\n }\n }\n return errors;\n }", "@Override\n public boolean isTagged() {\n for (List<String> t : tags.values()) {\n if(!t.isEmpty()) return true;\n }\n return false;\n }", "public void testBlogEntryHasTagsAndMediaIsHtml() throws Exception {\n Category category = new Category(\"/java\", \"Java\");\n category.setBlog(blog);\n category.setTags(\"java\");\n blogEntry.addCategory(category);\n blogEntry.setExcerpt(\"Excerpt - here is some text\");\n blogEntry.setBody(\"Body - here is some text\");\n blogEntry.setTags(\"junit, automated unit testing\");\n context.setMedia(ContentDecoratorContext.HTML_PAGE);\n decorator.decorate(context, blogEntry);\n\n StringBuffer tags = new StringBuffer();\n tags.append(\"<div class=\\\"tags\\\"><span>Technorati Tags : </span>\");\n tags.append(\"<a href=\\\"http://technorati.com/tag/automatedunittesting\\\" target=\\\"_blank\\\" rel=\\\"tag\\\">automatedunittesting</a>, \");\n tags.append(\"<a href=\\\"http://technorati.com/tag/java\\\" target=\\\"_blank\\\" rel=\\\"tag\\\">java</a>, \");\n tags.append(\"<a href=\\\"http://technorati.com/tag/junit\\\" target=\\\"_blank\\\" rel=\\\"tag\\\">junit</a>\");\n tags.append(\"</div>\");\n\n assertEquals(\"Excerpt - here is some text\" + tags, blogEntry.getExcerpt());\n assertEquals(\"Body - here is some text\" + tags, blogEntry.getBody());\n }", "boolean hasTags();", "private static boolean hasTag(String value) {\n return value.contains(\"<\") || value.contains(\">\");\n }", "@Override\n\tpublic boolean validateContent()\n\t{\n\t\treturn true;\n\t}", "private boolean checkTag(String tag) {\n if (tag.length() < 1) {\n return false;\n }\n char c = tag.charAt(0);\n if (!(c >= 'a' && c <= 'z')) {\n return false;\n }\n for (int i = 1; i < tag.length(); ++i) {\n c = tag.charAt(i);\n if (!(c >= 'a' && c <= 'z' || c >= '0' && c <= '9' || c == '-')) {\n return false;\n }\n }\n return true;\n }", "protected void validateTag(AudioMetaData data) throws IOException { \n assertEquals(TITLE, data.getTitle());\n assertEquals(ARTIST, data.getArtist());\n assertEquals(ALBUM, data.getAlbum());\n assertEquals(COMMENT, data.getComment());\n assertEquals(TRACK, data.getTrack());\n assertEquals(YEAR, data.getYear());\n assertEquals(GENRE, data.getGenre());\n }", "private void assertStreamItemViewHasNoTag() {\n Object tag = mView.getTag();\n assertNull(\"should not have a tag\", tag);\n }", "public static boolean shouldRender(InfoUUID uuid) {\n\t\treturn uuid.identity != -2;\n\t}", "private static boolean checkForInnerTags(String line, int lineCounter) {\n String sub = line.substring(3, line.length() - 4);\n if (sub.contains(\"<\") || sub.contains(\"</\")) {\n char tag = sub.charAt(sub.indexOf('<') + 1);\n if (sub.substring(sub.indexOf('>')).indexOf(tag) != -1) {\n System.out.println(\"Error on line \" + lineCounter + \": Error type : Syntax \" + \": Unclosed tag : \" + tag);\n return false;\n }\n }\n return true;\n }", "private void validateTagSyntax(List<String> tagList, String tagType)\n throws IllegalArgumentException {\n final String DEBUG_HEADER = \"validateTagSyntax(): \";\n String message = null;\n\n // Loop through the tag list precondition tags.\n for (String tag : tagList) {\n if (log.isDebug3()) log.debug3(DEBUG_HEADER + \"tag = \" + tag);\n\n // Check whether it is a weak validator tag.\n if (tag.toUpperCase().startsWith(HTTP_WEAK_VALIDATOR_PREFIX)) {\n\t// Yes: Check whether weak validator tags are not allowed.\n\tif (!allowWeakValidatorTags) {\n\t // Yes: Report the problem.\n\t message = \"Invalid \" + tagType + \" entity tag '\" + tag + \"'\";\n\t log.error(message);\n\t throw new IllegalArgumentException(message);\n\t}\n\t// No: Check whether it is an asterisk.\n } else if (\"*\".equals(tag)) {\n\t// Yes: Check whether the asterisk does not appear just by itself.\n\tif (tagList.size() > 1) {\n\t // Yes: Report the problem.\n\t message = \"Invalid \" + tagType + \" entity tag mix\";\n\t log.error(message);\n\t throw new IllegalArgumentException(message);\n\t}\n\t// No: Check whether a normal tag is not delimited by double quotes.\n } else if (!tag.startsWith(\"\\\"\") || !tag.endsWith(\"\\\"\")) {\n\t// Yes: Report the problem.\n\tmessage = \"Invalid \" + tagType + \" entity tag '\" + tag + \"'\";\n\tlog.error(message);\n\tthrow new IllegalArgumentException(message);\n }\n }\n }", "@Test\n public void testAccept() {\n Tag tag = new BaseTag(HtmlElement.DIV);\n TagVisitorMockup visitor = new TagVisitorMockup();\n tag.accept(visitor);\n assertEquals(\"Wrong CompositeTag\", tag, visitor.getBaseTag());\n }", "@org.junit.Test\n public static final void testSgmlShortTags() {\n junit.framework.TestCase.assertEquals(\"<p></p>\", eu.stamp_project.reneri.instrumentation.StateObserver.observe(\"org.owasp.html.HtmlSanitizerTest|testSgmlShortTags()|0\", org.owasp.html.HtmlSanitizerTest.sanitize(\"<p/b/\")));// Short-tag discarded.\n\n junit.framework.TestCase.assertEquals(\"<p></p>\", eu.stamp_project.reneri.instrumentation.StateObserver.observe(\"org.owasp.html.HtmlSanitizerTest|testSgmlShortTags()|1\", org.owasp.html.HtmlSanitizerTest.sanitize(\"<p<b>\")));// Discard <b attribute\n\n // This behavior for short tags is not ideal, but it is safe.\n junit.framework.TestCase.assertEquals(\"<p href=\\\"/\\\">first part of the text&lt;/&gt; second part</p>\", eu.stamp_project.reneri.instrumentation.StateObserver.observe(\"org.owasp.html.HtmlSanitizerTest|testSgmlShortTags()|2\", org.owasp.html.HtmlSanitizerTest.sanitize(\"<p<a href=\\\"/\\\">first part of the text</> second part\")));\n }", "public boolean shouldRender(CodePackageTag cpt) {\n\t\treturn null == this.getKey() || this.getKey().equals(cpt.getKey());\n\t}", "boolean hasTigTag();", "public boolean contains(String tagName, PageContext pageContext) throws IOException\n {\n /*\n * TODO JSPs using a different encoding then the system default will break here if the values for the characters in the opening\n * or closing tags are different. Not sure how to grab the encoding from the JSP that created the current content automatically.\n * Maybe add a filter parameter to specify the encoding if it's different then default.\n */\n byte[] tagNameBytes = tagName.getBytes();\n byte[] openTagBytes = new byte[tagNameBytes.length + 2];\n openTagBytes[0] = LESS_THAN;\n for (int i = 0; i < tagNameBytes.length; i++)\n {\n openTagBytes[i + 1] = tagNameBytes[i];\n }\n openTagBytes[openTagBytes.length - 1] = GREATER_THAN;\n\n int openTagIndex = indexOf(content, openTagBytes);\n if (openTagIndex >= 0)\n {\n byte[] closedTagBytes = new byte[tagNameBytes.length + 3];\n closedTagBytes[0] = LESS_THAN;\n closedTagBytes[1] = SOLIDUS;\n for (int i = 0; i < tagNameBytes.length; i++)\n {\n closedTagBytes[i + 2] = tagNameBytes[i];\n }\n closedTagBytes[closedTagBytes.length - 1] = GREATER_THAN;\n\n int closeTagIndex = lastIndexOf(content, closedTagBytes);\n return (closeTagIndex > openTagIndex);\n }\n else\n {\n return false;\n }\n }", "@Test(expectedExceptions = ParseException.class)\n\tpublic void testUnbalancedELTag() throws ParseException {\n\t\tparser(\"a<%=b()\").block();\n\t}", "public boolean hasTags() {\n return isTagged();\n }", "public void validateRpd3s5()\n {\n // <b> and <i> are not allowed.\n String key = \"rpd3s5.invalidMarkup\";\n assertFalse(Type.ERROR, key, containsElement(ELEM_BOLD));\n assertFalse(Type.ERROR, key, containsElement(ELEM_ITALIC));\n }", "public void validateRpd3s1()\n {\n // <b> and <i> are not allowed.\n assertFalse(Type.ERROR, \"rpd3s1.boldMarkup\", containsElement(\"b\"));\n assertFalse(Type.ERROR, \"rpd3s1.italicMarkup\", containsElement(\"i\"));\n }", "public static void printInvalidTagsLine(String tags) {\n logger.log(Level.WARNING, \"User did not supply valid tags.\");\n printMessage(String.format((INVALID_TAGS_LINE), tags));\n }", "public abstract void doTagLogic() throws JspException, IOException;", "@Test\n\tpublic void html_test() {\n\t\tString text = \"\";\n\t\tassertEquals(\"<html></html>\", createHTML(text));\n\t}", "public static boolean hasHtmlTag(final String str) {\n return !isNullOrEmpty(str)\n && str.contains(\"<\")\n && str.contains(\"/>\");\n }", "boolean hasTagValue();", "public boolean matchesTag(int tag) {\n if (super.matchesTag(tag)) {\n return true;\n }\n if (this.mLayout != null) {\n Spanned text = (Spanned) this.mLayout.getText();\n for (RCTRawText span : (RCTRawText[]) text.getSpans(0, text.length(), RCTRawText.class)) {\n if (span.getReactTag() == tag) {\n return true;\n }\n }\n }\n return false;\n }", "@Test\n public void testParseDOMToExistenceValidationWidgetOnlySucceeds()\n {\n FixtureProperties properties = parser.parse(DefaultConfigurationParserMockDOMs\n .createDOMToExistenceValidationWidgetOnly());\n verifyCommonPropertiesAssertions(properties);\n }", "@org.junit.Test\n public static final void testOptionalEndTags() {\n junit.framework.TestCase.assertEquals(\"<ol><li>A</li><li>B</li><li>C </li></ol>\", eu.stamp_project.reneri.instrumentation.StateObserver.observe(\"org.owasp.html.HtmlSanitizerTest|testOptionalEndTags()|0\", org.owasp.html.HtmlSanitizerTest.sanitize(\"<ol> <li>A</li> <li>B<li>C </ol>\")));\n }", "private Boolean isTag(String tagID) {\n\t\t\n\t\tif (tagManager.resolve(tagID) != null) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tlog.warn(DEBUG_PREFIX + \"Tag ID passed in tags argument is invalid: \" + tagID);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "boolean isSetTag();", "public boolean matchesTagPatterns(final String tag) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean isValid() {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean isItemValid(ItemStack stack) {\n\t\treturn true;\n\t}", "@Test\n\tvoid transformTagWithHtmlEscape() throws JspException {\n\t\tPageContext pc = createPageContext();\n\t\tTestBean tb = new TestBean();\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tServletRequestDataBinder binder = new ServletRequestDataBinder(tb, \"tb\");\n\t\tCustomDateEditor l = new CustomDateEditor(df, true);\n\t\tbinder.registerCustomEditor(Date.class, l);\n\t\tpc.getRequest().setAttribute(BindingResult.MODEL_KEY_PREFIX + \"tb\", binder.getBindingResult());\n\n\t\t// try another time, this time using Strings\n\t\tBindTag bind = new BindTag();\n\t\tbind.setPageContext(pc);\n\t\tbind.setPath(\"tb.name\");\n\t\tbind.doStartTag();\n\n\t\tTransformTag transform = new TransformTag();\n\t\ttransform.setPageContext(pc);\n\t\ttransform.setValue(\"na<me\");\n\t\ttransform.setParent(bind);\n\t\ttransform.setVar(\"theString\");\n\t\ttransform.setHtmlEscape(true);\n\t\ttransform.doStartTag();\n\n\t\tassertThat(pc.getAttribute(\"theString\")).isNotNull();\n\t\tassertThat(pc.getAttribute(\"theString\")).isEqualTo(\"na&lt;me\");\n\t}", "public static void checkTagPattern(String tagValue) {\n if (tagValue == null || tagValue.isEmpty()) {\n throw new IllegalArgumentException(\"Invalid value '\" + tagValue + \"' for \" + NODE_NAME_KEY);\n }\n\n int numPrefix = StringUtils.countMatches(tagValue, TemplatedTags.PREFIX);\n int numSuffix = StringUtils.countMatches(tagValue, TemplatedTags.SUFFIX);\n if (numPrefix != numSuffix) {\n throw new IllegalArgumentException(\n \"Number of '\"\n + TemplatedTags.PREFIX\n + \"' does not \"\n + \"match '\"\n + TemplatedTags.SUFFIX\n + \"' count in \"\n + tagValue);\n }\n\n // Find all the content repeated within all the \"{\" and \"}\". These will be matched againt\n // supported keywords for tags.\n Pattern pattern =\n Pattern.compile(\n \"\\\\\"\n + TemplatedTags.DOLLAR\n + \"\\\\\"\n + TemplatedTags.LBRACE\n + \"(.*?)\\\\\"\n + TemplatedTags.SUFFIX);\n Matcher matcher = pattern.matcher(tagValue);\n Set<String> keys = new HashSet<String>();\n while (matcher.find()) {\n String match = matcher.group(1);\n if (keys.contains(match)) {\n throw new IllegalArgumentException(\"Duplicate \" + match + \" in \" + NODE_NAME_KEY + \" tag.\");\n }\n if (!TemplatedTags.RESERVED_TAGS.contains(match)) {\n throw new IllegalArgumentException(\n \"Invalid variable \"\n + match\n + \" in \"\n + NODE_NAME_KEY\n + \" tag. Should be one of \"\n + TemplatedTags.RESERVED_TAGS);\n }\n keys.add(match);\n }\n log.trace(\"Found tags keys : \" + keys);\n\n if (!tagValue.contains(TemplatedTags.INSTANCE_ID)) {\n throw new IllegalArgumentException(\n \"'\"\n + TemplatedTags.INSTANCE_ID\n + \"' should be part of \"\n + NODE_NAME_KEY\n + \" value \"\n + tagValue);\n }\n }", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "private boolean endTagRequired(UAElement element) {\n \t\tString elementName = element.getElementName();\n \t\tif (\"a\".equalsIgnoreCase(elementName)) return true; //$NON-NLS-1$\n \t\tif (\"p\".equalsIgnoreCase(elementName)) return true; //$NON-NLS-1$\n \t\tif (\"div\".equalsIgnoreCase(elementName)) return true; //$NON-NLS-1$\n \t\tif (\"script\".equalsIgnoreCase(elementName)) return true; //$NON-NLS-1$\n \t\tif (\"textarea\".equalsIgnoreCase(elementName)) return true; //$NON-NLS-1$\n \t\treturn false;\n \t}", "@Override\n\t\tpublic boolean isValid() {\n\t\t\treturn false;\n\t\t}", "public boolean isSetTags() {\n return this.Tags != null;\n }", "@Test\n public void testIsComposite() {\n Tag tag = new BaseTag();\n assertFalse(\"BaseTag reported as composite\", tag.isComposite());\n }", "@Override\n public View checkContentValidation() {\n return null;\n }", "@Override\n public View checkContentValidation() {\n return null;\n }", "@Ignore\n @Test(expected = NullPointerException.class)\n public void failOnNullTag() throws Exception {\n }", "@Override\r\n public boolean validate() {\n return true;\r\n }", "private boolean isTag(String item) {\n return storiesToTags.keySet().contains(item);\n }", "private boolean containsHtml(final String str) {\n if (str == null)\n return false;\n return str.indexOf('<') != -1 || str.indexOf('&') != -1;\n }", "public void testBlogEntryHasNoTags() throws Exception {\n blogEntry.setExcerpt(\"Excerpt - here is some text\");\n blogEntry.setBody(\"Body - here is some text\");\n context.setMedia(ContentDecoratorContext.HTML_PAGE);\n decorator.decorate(context, blogEntry);\n assertEquals(\"Excerpt - here is some text\", blogEntry.getExcerpt());\n assertEquals(\"Body - here is some text\", blogEntry.getBody());\n }", "private boolean isComplete() {\n if (this.content.charAt(0) != '<' || this.content.charAt(this.content.length() - 1) != '>') {\n throw new IllegalArgumentException(\"Invalid XML file.\");\n }\n Stack<String> xmlTags = new Stack<>();\n for (int i = 0; i < this.content.length();) {\n String currTag = \"\";\n int j = 0;\n for (j = 0; i + j < this.content.length(); ++j) {\n if (this.content.charAt(i + j) == '>') {\n currTag = this.content.substring(i, i + j + 1);\n break;\n }\n }\n String word = \"\";\n if (currTag.charAt(1) == '/') {\n word = currTag.substring(2, currTag.length() - 1);\n if (!word.equals(xmlTags.peek())) {\n throw new IllegalArgumentException(\"Invalid end tag: should be \"\n + xmlTags.peek() + \", but got \" + word);\n }\n xmlTags.pop();\n if (xmlTags.size() == 0 && i + word.length() + 3 < this.content.length() - 1) {\n throw new IllegalArgumentException(\"Content after root tag.\");\n }\n this.result.add(\"end:\" + word);\n }\n else {\n word = currTag.substring(1, currTag.length() - 1);\n if (checkTag(word)) {\n xmlTags.push(word);\n this.result.add(\"start:\" + word);\n }\n else {\n throw new IllegalArgumentException(\"Invalid tag.\");\n }\n }\n i = i + j + 1;\n for (j = i; j < this.content.length(); ++j) {\n if (this.content.charAt(j) == '<') {\n break;\n }\n }\n word = \"\";\n if (i != j) {\n word = this.content.substring(i, j);\n }\n if (word.length() > 0) {\n this.result.add(\"char:\" + word);\n }\n i = j;\n }\n return xmlTags.empty();\n }", "@java.lang.Override\n public boolean hasPositiveInputTagsCount() {\n return positiveInputTagsCount_ != null;\n }", "@Ignore\n @Test\n public void renderTemplate() {\n\n Content html = views.html.index.render(\"Your new application is ready.\");\n assertThat(html.contentType(), is(\"text/html\"));\n assertThat(contentAsString(html), containsString(\"Your new application is ready.\"));\n }", "private void IfTreeIsValid(HttpServletRequest request, HttpServletResponse response) throws IOException {\n XMLTree tree;\n tree = XMLTree.getInstance();\n response.getWriter().write(tree.validate());\n }", "@Override\r\n\tpublic boolean validate() {\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean validate() {\n\t\treturn true;\r\n\t}", "protected boolean shouldIgnoreContent() {\n return empty;\n }", "public void testGetTagType_1_accuracy() {\n instance.setTagType(\"tagtype\");\n assertEquals(\"The type is not set properly.\", \"tagtype\", instance.getTagType());\n }", "private boolean isIgnoredByTag(ExtensionContext context) {\n AnnotatedElement element = context.getElement().get();\n return isIgnoredByTag(element);\n }", "@Override\n\tpublic boolean isTagged() {\n\t\treturn tagged;\n\t}", "@Test(expected = IllegalArgumentException.class)\n public void testParseDOMFormElemEmptyExistenceValidationWidgetFails()\n {\n parser.parse(DefaultConfigurationParserMockDOMs.createDOMFormElemEmptyExistenceValidationWidget());\n fail(\"Should have thrown an IllegalArgumentException\");\n }", "@Test\n public void testParseDOMToExistenceValidationWidgetPlusIgnoredElemSucceeds()\n {\n FixtureProperties properties = parser.parse(DefaultConfigurationParserMockDOMs\n .createDOMToExistenceValidationWidgetPlusIgnoredElem());\n verifyCommonPropertiesAssertions(properties);\n }", "@Test\n\tpublic void testValidatePrettyPrint() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validatePrettyPrint(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validatePrettyPrint(\"Invalid value.\");\n\t\t\t\tfail(\"The pretty print value was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tAssert.assertEquals(true, SurveyResponseValidators.validatePrettyPrint(\"true\"));\n\t\t\tAssert.assertEquals(false, SurveyResponseValidators.validatePrettyPrint(\"false\"));\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic boolean validate() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean validate() {\n\t\treturn false;\n\t}", "public static void validate(EndElement endElement, String tag) {\n String elementTag = getElementName(endElement);\n if (!tag.equals(elementTag))\n throw new RuntimeException(logger.parserExpectedEndTag(\"</\" + tag + \">. Found </\" + elementTag + \">\"));\n }", "public static boolean canCreateTags(@Nonnull QueryContext context) {\n final DisjunctivePrivilegeGroup orPrivilegeGroups = new DisjunctivePrivilegeGroup(\n ImmutableList.of(\n new ConjunctivePrivilegeGroup(ImmutableList.of(\n PoliciesConfig.CREATE_TAGS_PRIVILEGE.getType())),\n new ConjunctivePrivilegeGroup(ImmutableList.of(\n PoliciesConfig.MANAGE_TAGS_PRIVILEGE.getType()))\n ));\n\n return AuthorizationUtils.isAuthorized(\n context.getAuthorizer(),\n context.getActorUrn(),\n orPrivilegeGroups);\n }", "public boolean isValidContent() { \n\t\tSLLStack<Character> stringStack = new SLLStack<>();\n\t\tfor(int i = 0; i < s.length(); i++){\n\t\t\tif(!Character.isAlphabetic(s.charAt(i))) { return false; }\n\t\t\tif(Character.isUpperCase(s.charAt(i))) { stringStack.push(s.charAt(i)); }\n\t\t\telse{\n\t\t\t\tif(stringStack.isEmpty()) { return false; }\n\t\t\t\tif(stringStack.top() == Character.toUpperCase(s.charAt(i))) { stringStack.pop(); }\n\t\t\t\telse { stringStack.push(s.charAt(i)); }\n\t\t\t}\n\t\t}\n\t\treturn stringStack.isEmpty();\n\t}", "public boolean isBlank() {\n return (tags.length() == 0);\n }", "public static void main(String[] args) {\n\t\tQueue<HtmlTag> tags = new LinkedList<HtmlTag>();\n\t\ttags.add(new HtmlTag(\"b\", true)); // <b>\n\t\ttags.add(new HtmlTag(\"b\", false)); // </b>\n\t\ttags.add(new HtmlTag(\"br\")); // <br/>\n\t\t\n\t\t// Your code here\t\n HtmlValidator test = new HtmlValidator(tags);\n System.out.println(\"Before modifications: \" + test.getTags()); \n HtmlTag tagC = new HtmlTag(\"c\"); \n test.addTag(tagC);\n System.out.println(\"After adding <C>:\" + test.getTags());\n test.removeAll(\"b\");\n System.out.println(\"After removing <b>:\" + test.getTags()); \n System.out.println(\"Validation:\");\n test.validate();\n\t}", "protected boolean isValid() {\n \t\t\treturn fStart > -1 && fEnd > -1 && fText != null;\n \t\t}", "boolean isNilTag();", "@Override\n public boolean isToBeRendered()\n {\n return true;\n }", "boolean canRender(IModel model, Entity entity);", "public boolean hasTags() {\n return fieldSetFlags()[4];\n }", "public boolean isSetTag() {\n return this.tag != null;\n }", "public boolean canDisplay(){\n if(title.isEmpty() && body.isEmpty()){\n return false;\n }\n\n return true;\n }", "@Test\n public void testGetVerifiedAssociatedTags() {\n String insertedTagList = \" #awesome, #dry, #newTag \";\n List<Tag> verifiedTags = tagServ.getVerifiedAssociatedTags(insertedTagList);\n List<Tag> allTags = tagServ.getAllTags();\n Assert.assertEquals(5, allTags.size());\n Assert.assertEquals(3, verifiedTags.size());\n }", "@Test\n\tvoid transformTagNonExistingValue() throws JspException {\n\t\tPageContext pc = createPageContext();\n\t\tTestBean tb = new TestBean();\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tServletRequestDataBinder binder = new ServletRequestDataBinder(tb, \"tb\");\n\t\tCustomDateEditor l = new CustomDateEditor(df, true);\n\t\tbinder.registerCustomEditor(Date.class, l);\n\t\tpc.getRequest().setAttribute(BindingResult.MODEL_KEY_PREFIX + \"tb\", binder.getBindingResult());\n\n\t\t// try with non-existing value\n\t\tBindTag bind = new BindTag();\n\t\tbind.setPageContext(pc);\n\t\tbind.setPath(\"tb.name\");\n\t\tbind.doStartTag();\n\n\t\tTransformTag transform = new TransformTag();\n\t\ttransform.setPageContext(pc);\n\t\ttransform.setValue(null);\n\t\ttransform.setParent(bind);\n\t\ttransform.setVar(\"theString2\");\n\t\ttransform.doStartTag();\n\n\t\tassertThat(pc.getAttribute(\"theString2\")).isNull();\n\t}", "@Test(expected = IllegalArgumentException.class)\n public void testParseDOMFormElemNoExistenceValidationWidgetFails()\n {\n parser.parse(DefaultConfigurationParserMockDOMs.createDOMFormElemNoExistenceValidationWidget());\n fail(\"Should have thrown an IllegalArgumentException\");\n }", "public static boolean shouldRenderChildren(UIComponent component) {\n for (int i = 0; i < component.getChildCount(); i++) {\n if (component.getChildren().get(i).isRendered()) {\n return true;\n }\n }\n\n return false;\n }", "private boolean isListValid()\n {\n boolean isValid = true;\n Collection<RecognizedElement> elementsList = tree.getChildren();\n for (Iterator<RecognizedElement> iterator = elementsList.iterator(); iterator.hasNext();)\n {\n RecognizedElement recognizedElement = (RecognizedElement) iterator.next();\n if (isSpreadsheet)\n {\n if (recognizedElement instanceof Style || recognizedElement instanceof Regex)\n {\n isValid = false;\n break;\n }\n }\n else\n {\n if (recognizedElement instanceof Column)\n {\n isValid = false;\n break;\n }\n }\n }\n return isValid;\n }", "@Override\r\n\tpublic boolean isHtmlbyTemplate() {\n\t\treturn singleItem || headless?false:freeMarkerSupport.isHtmlbyTemplate();\r\n\t}", "@Override\r\n\tprotected void validate() {\n\t}", "boolean isValidAndHandleSpecial(String title) {\n\t\tif (skipReportElement) {\n\t\t\tskipReportElement = false;\n\t\t\treturn false;\n\t\t}\n\n\t\tswitch (elementData) {\n\t\tcase NONE:\n\t\t\tbreak;\n\t\tcase CLASS_DOC:\n\t\t\ttest.addProperty(\"Class Documentation\", title);\n\t\t\ttest.setDescription(title);\n\t\t\telementData = NONE;\n\t\t\treturn false;\n\t\tcase TEST_DOC:\n\t\t\ttest.addProperty(\"Test Documentation\", title);\n\t\t\ttest.setDescription(title);\n\t\t\telementData = NONE;\n\t\t\treturn false;\n\t\tcase USER_DOC:\n\t\t\ttest.addProperty(\"User Documentation\", title);\n\t\t\ttest.setDescription(title);\n\t\t\telementData = NONE;\n\t\t\treturn false;\n\t\tcase TEST_BREADCUMBS:\n\t\t\ttest.addProperty(\"Breadcrumb\", title.replace(\"</span>\", \"\"));\n\t\t\telementData = NONE;\n\t\t\t// This also closes the span\n\t\t\tspanTrace--;\n\t\t\treturn false;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tif (StringUtils.isEmpty(title)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (title.contains(SPAN_OPEN_TAG)) {\n\t\t\t// ITAI: This is a ugly hack, When we execute from the IDE there\n\t\t\t// is a missing span close tag, so we\n\t\t\t// Never increase the number of the span trace above one.\n\t\t\tif (!(JSystemProperties.getInstance().isExecutedFromIDE() && spanTrace == 1)) {\n\t\t\t\tspanTrace++;\n\t\t\t}\n\t\t}\n\t\tif (spanTrace > 0) {\n\t\t\t// In span, let's search for that special elements\n\t\t\tswitch (title) {\n\t\t\tcase SPAN_OPEN_CLASS_DOC_TAG:\n\t\t\t\telementData = CLASS_DOC;\n\t\t\t\tskipReportElement = true;\n\t\t\t\tbreak;\n\t\t\tcase SPAN_OPEN_TEST_DOC_TAG:\n\t\t\t\telementData = TEST_DOC;\n\t\t\t\tskipReportElement = true;\n\t\t\t\tbreak;\n\t\t\tcase SPAN_OPEN_USER_DOC_TAG:\n\t\t\t\telementData = USER_DOC;\n\t\t\t\tskipReportElement = true;\n\t\t\t\tbreak;\n\t\t\tcase SPAN_OPEN_BREADCRUMBS_TAG:\n\t\t\t\telementData = TEST_BREADCUMBS;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (title.contains(SPAN_CLOSE_TAG)) {\n\t\t\tspanTrace--;\n\t\t\treturn false;\n\t\t}\n\n\t\t// ITAI: When running from the IDE, there are missing span closing\n\t\t// tags, so we do not increase the span trace after level one. The\n\t\t// result is that the span trace may have a negative value\n\t\treturn spanTrace <= 0;\n\t}", "@Override\n\t\tpublic boolean isInvalid() {\n\t\t\treturn false;\n\t\t}", "protected boolean isEmptyXmlTagExpanded() {\n return false;\n }", "@Test\n public void testHtmlElementConstructor() {\n Tag result = new BaseTag(HtmlElement.DIV);\n assertEquals(\"Wrong tag name\", \"div\", result.getTagName());\n }", "public boolean validImageContent() {\n\t\treturn input.validFile(list);\n\t}", "public static boolean isMarkup(int c) {\n return c == '<' || c == '&' || c == '%';\n }", "protected boolean isValid()\r\n {\r\n \treturn true;\r\n }", "public boolean checkTag(String tagToCheck){\r\n \t\treturn tags.containsKey(tagToCheck);\r\n \t}", "private boolean isInputValid() {\n return true;\n }", "@Override\n\tboolean validate(Vector<String> tokens) {\n\t\treturn false;\n\t}", "@Test\r\n\tpublic void testInvalid01() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid01\");\r\n\t}", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "public LanguageAssert hasTag(String tag) {\n\t\tassertThat(actual.getLanguageTag()).as(descriptionText() + \" tag\").isEqualTo(tag);\n\t\treturn this;\n\t}", "public abstract boolean isRendered();" ]
[ "0.61598", "0.6122031", "0.59659207", "0.58742535", "0.5865626", "0.58405626", "0.581156", "0.57782435", "0.57082266", "0.55355906", "0.55174863", "0.54802", "0.5478917", "0.54682934", "0.54582626", "0.54575825", "0.5378124", "0.53586966", "0.53452885", "0.5333904", "0.53002775", "0.5283023", "0.5257547", "0.52397156", "0.52085435", "0.5190717", "0.5188612", "0.51783997", "0.51685447", "0.5151757", "0.5135743", "0.5122075", "0.5104978", "0.509063", "0.5067013", "0.50627327", "0.5058025", "0.5049153", "0.5040719", "0.5040719", "0.5040719", "0.5040088", "0.50227964", "0.50199693", "0.50128996", "0.49986714", "0.49986714", "0.4997205", "0.49880132", "0.49661636", "0.49629402", "0.4955417", "0.49499774", "0.49477202", "0.49458605", "0.494294", "0.49407554", "0.49407554", "0.49104866", "0.49097782", "0.48969227", "0.4894352", "0.4893318", "0.48860484", "0.48821282", "0.48791382", "0.48791382", "0.48751593", "0.48725435", "0.4871283", "0.4861403", "0.48571646", "0.485417", "0.48490152", "0.482937", "0.48149765", "0.48145545", "0.4813989", "0.48130348", "0.48124358", "0.47988605", "0.47813407", "0.47698054", "0.4769416", "0.47591427", "0.47470838", "0.47393745", "0.47257555", "0.47221914", "0.46991575", "0.46955585", "0.46954927", "0.46902904", "0.4690012", "0.4686578", "0.4675856", "0.4671181", "0.46658742", "0.46647695", "0.46642718" ]
0.7103792
0
/http .authorizeRequests() .antMatchers("/CascadingStyleSheets/", "/js/", "/register", "/loginpage").permitAll() .antMatchers("/productlist").hasAnyAuthority("admin","user") .anyRequest().authenticated() .and() .formLogin() .loginPage("/loginpage") .permitAll() .and() .logout() .permitAll();
@Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests().antMatchers("/login","/register","/addtocart","/view","/","/removecart","/cart").permitAll(). antMatchers("/checkout").hasAnyAuthority("user"). antMatchers("/product").hasAnyAuthority("admin").and().formLogin() .loginProcessingUrl("/spring_login_check") // Submit URL .loginPage("/login")// .defaultSuccessUrl("/")// .failureUrl("/login?error=true")// .usernameParameter("userId")// .passwordParameter("password").and().exceptionHandling().accessDeniedHandler(accessDeniedHandler()); // Cấu hình cho Logout Page. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void configure(HttpSecurity http) throws Exception {\n\n\n http\n .csrf().disable()\n .authorizeRequests()\n .antMatchers(\"/admin/**\").hasRole(\"ADMIN\")\n .antMatchers(\"/anonymous*\").anonymous()\n .antMatchers(\"/login*\").permitAll()\n .anyRequest().authenticated()\n .and()\n .formLogin();\n\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n \thttp\n .authorizeRequests()\n .antMatchers(resources).permitAll() \n .antMatchers(\"/\",\"/index\", \"/usuarioForm\").permitAll()\n .anyRequest().authenticated()\n .and()\n .formLogin()\n .loginPage(\"/login\")\n .permitAll()\n .defaultSuccessUrl(\"/usuarioForm\")\n .failureUrl(\"/login?error=true\")\n .usernameParameter(\"username\")\n .passwordParameter(\"password\")\n .and()\n .csrf().disable()\n .logout()\n .permitAll()\n .logoutSuccessUrl(\"/login?logout\");\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n http.csrf().disable().authorizeRequests()\n .antMatchers(\"/**.html\").permitAll();\n http.httpBasic().and()\n .authorizeRequests().anyRequest().authenticated().and()\n .formLogin().loginPage(\"/login\")\n //.loginProcessingUrl(\"/login\")\n .defaultSuccessUrl(\"/\")\n\n //.successHandler(loginHandler)\n //.failureHandler(failureHandler)\n .permitAll();\n\n\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n http\n .csrf().disable()\n .sessionManagement()\n .sessionCreationPolicy(SessionCreationPolicy.STATELESS)\n //.antMatchers(\"/api/user/login\").permitAll()\n\n\n //.anyRequest().authenticated()\n .and()\n .addFilterBefore(new JWTLoginFilter(\"/api/user/login\", authenticationManager()),\n UsernamePasswordAuthenticationFilter.class)\n .addFilterBefore(new JWTAuthenticationFilter(),\n UsernamePasswordAuthenticationFilter.class)\n .authorizeRequests()\n //.anyRequest().authenticated()\n .antMatchers(\"/api/user\").hasRole(\"ADMIN\")\n .antMatchers(\"/api/article\").hasRole(\"ADMIN\")\n .antMatchers(\"/api/address/add\").authenticated()\n .antMatchers(\"/api/basket\").authenticated();\n\n }", "@Override\r\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\thttp.authorizeRequests()\r\n\t\t.antMatchers(\"/admin\").hasRole(\"ADMIN\")\r\n\t\t.antMatchers(\"/user\").hasAnyRole(\"USER\",\"ADMIN\")\r\n\t\t.antMatchers(\"/\").permitAll()\r\n\t\t.and().formLogin();\r\n\t}", "@Override\n protected void configure(HttpSecurity http) throws Exception{\n\n http.authorizeRequests()\n .antMatchers(\"/admin/**\").hasRole(\"ADMIN\")\n .antMatchers(\"/manager/**\").hasRole(\"MANAGER\")\n .antMatchers(\"/user/**\").hasRole(\"USER\")\n .antMatchers(\"/\", \"/**\").permitAll() // access of the home page only for authenticated\n .and().formLogin().loginPage(\"/login\");\n\n // cross-side request forgery protection - by default by Spring\n //http.csrf().disable();\n //http.headers().frameOptions().disable();\n }", "@Override\r\n\tprotected void configure(HttpSecurity http) throws Exception {\r\n\t\t\t\thttp.authorizeRequests()\r\n\t\t .antMatchers(\"/\").permitAll()\r\n\t\t .antMatchers(\"/h2-console/**\").permitAll()\r\n\t\t .antMatchers(\"/employees.html\").access(\"hasRole('ROLE_ADMIN')\")\r\n\t\t .and().formLogin();\r\n\t\t\r\n\t\t\t\thttp.csrf().disable();\r\n\t\t\t\thttp.headers().frameOptions().disable();\r\n\t}", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n http.\n csrf().disable()\n .authorizeRequests()\n .antMatchers(\"/vehicle/add\").hasAuthority(\"User\")\n .antMatchers(\"/employee/register\").hasAuthority(\"Merchant\")\n .anyRequest().authenticated()\n .and().httpBasic();\n /* http.csrf().disable().authorizeRequests()\n .antMatchers(\"/vehicle/add\").hasAuthority(Email)//USER role can access /users/**\n //.antMatchers(\"/admin/**\").has(\"ADMIN\")//ADMIN role can access /admin/**\n // .antMatchers(\"/quests/**\").permitAll()// anyone can access /quests/**\n .anyRequest().authenticated();//any other request just need authentication\n //enable form login\n\n /* http.authorizeRequests().anyRequest().hasAnyRole(\"ADMIN\", \"User\")\n .and()\n .httpBasic(); // Authenticate users with HTTP basic authentication*/\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception\n {\n http\n .csrf().disable()\n .authorizeRequests()\n\n .antMatchers(\n \"/\",\n \"**/favicon.ico\",\n \"/login**\",\n \"/error/**\",\n \"/webjars/**\",\n \"/img/**\",\n \"/css/**\",\n \"/js/**\").permitAll();\n //.antMatchers(\"/employees/**\").access(\"hasRole('WRITER')\")\n //.antMatchers(\"/**\").access(\"hasRole('ADMIN')\")\n //.and().exceptionHandling().accessDeniedPage(\"/error/403\");\n http\n .authorizeRequests()\n .anyRequest()\n .authenticated();\n http\n .authorizeRequests()\n .and().formLogin()\n //.loginProcessingUrl(\"/j_spring_security_check\")\n //.loginPage(\"/login\")\n .defaultSuccessUrl(\"/\")\n //.failureUrl(\"/login?error=true\")\n .usernameParameter(\"username\").passwordParameter(\"password\")\n .and().logout().logoutUrl(\"/logout\").logoutSuccessUrl(\"/\");\n\n // Config Remember Me.\n http.authorizeRequests().and()\n .rememberMe()\n .tokenRepository(this.persistentTokenRepository())\n .tokenValiditySeconds(1 * 24 * 60 * 60); // 24h\n }", "@Override\r\n\tprotected void configure(HttpSecurity http) throws Exception {\r\n\t\t\r\n\thttp\r\n\t\t.csrf().disable()\r\n\t\t.authorizeRequests().antMatchers(\"/home\").authenticated()\r\n\t\t.and()\r\n\t\t.formLogin().usernameParameter(\"username\").passwordParameter(\"password\").loginPage(\"/login\")\r\n\t\t.failureUrl(\"/login?error\")\r\n\t .and()\r\n\t .logout().logoutSuccessUrl(\"/login?logout\")\r\n\t .and()\r\n\t .exceptionHandling().accessDeniedPage(\"/403\");\r\n\t\r\n\t\r\n\t\r\n\t}", "@Override\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\thttp.authorizeRequests().antMatchers(\"/\", \"/home\").permitAll().antMatchers(\"/admin\").hasRole(\"ADMIN\")\n\t\t.anyRequest().authenticated().and().formLogin().failureUrl(\"/login?error\").permitAll()\n\t\t.and()//.addFilterAfter(loginFilter(), BasicAuthenticationFilter.class)\n\t\t.logout().logoutRequestMatcher(new AntPathRequestMatcher(\"/logout\"));\n\t\thttp.exceptionHandling().accessDeniedPage(\"/error\");\n\t\t/*\n\t\t * http.csrf().disable().authorizeRequests().antMatchers(\"/getlist\").hasAnyRole(\n\t\t * \"user\").and().formLogin();\n\t\t * http.csrf().disable().authorizeRequests().antMatchers(\"/home\").hasAnyRole(\n\t\t * \"user\").and().formLogin();\n\t\t * http.csrf().disable().authorizeRequests().antMatchers(\"/mainHome\").hasAnyRole\n\t\t * (\"user\").and().formLogin();\n\t\t * http.csrf().disable().authorizeRequests().antMatchers(\"/index\").hasAnyRole(\n\t\t * \"user\").and().formLogin();\n\t\t * http.csrf().disable().authorizeRequests().antMatchers(\"/empform\").hasAnyRole(\n\t\t * \"user\").and().formLogin();\n\t\t * http.csrf().disable().authorizeRequests().antMatchers(\"/getDepartmentslist\").\n\t\t * hasAnyRole(\"admin\").and().formLogin();\n\t\t * http.csrf().disable().authorizeRequests().antMatchers(\"/departmentform\").\n\t\t * hasAnyRole(\"admin\").and().formLogin();\n\t\t * http.csrf().disable().authorizeRequests().antMatchers(\"/mainHome\").hasAnyRole\n\t\t * (\"admin\").and().formLogin();\n\t\t */\n\n\t}", "@Override\n\tpublic void configure(HttpSecurity http) throws Exception {\n\t\thttp.authorizeRequests()\n\t\t\t\t\t\t.antMatchers(\"/\", \"/css/**\", \"/js/**\", \"/images/**\", \"/listar\").permitAll() // Páginas sin autenticación, puede entrar cualquier usuario sin autenticarse\n\t\t\t\t\t\t.antMatchers(\"/ver/**\").hasAnyRole(\"USER\")\n\t\t\t\t\t\t.antMatchers(\"/uploads/**\").hasAnyRole(\"USER\")\n\t\t\t\t\t\t.antMatchers(\"/form/**\").hasAnyRole(\"ADMIN\") // Solo ADMIN\n\t\t\t\t\t\t.antMatchers(\"/eliminar/**\").hasAnyRole(\"ADMIN\") // Solo ADMIN\n\t\t\t\t\t\t.antMatchers(\"/factura/**\").hasAnyRole(\"ADMIN\") // Solo ADMIN\n\t\t\t\t\t\t.anyRequest().authenticated()\n\t\t\t\t\t\t.and()\n\t\t\t\t\t\t.formLogin().loginPage(\"/login\").permitAll()// Implementamos formulario de login\n\t\t\t\t\t\t.and()\n\t\t\t\t\t\t.logout().permitAll(); \n\t\t\n\t}", "@Override\n\tpublic void configure(HttpSecurity http) throws Exception {\n\t\thttp.authorizeRequests().antMatchers(\"/\",\"/Inicio\",\"/Contactanos\",\"/Volver a inicio\",\"/Login\",\"/Volver al inicio\",\"/Inicio1\",\"/Contactos1\",\"/Singup1\",\"/Regresa1\"\n\t\t\t\t,\"/Inicio2\",\"/Contactos2\",\"/Singup2\",\"/Descargando book2\",\"/Regresa2\"\n\t\t\t\t,\"/Inicio3\",\"/Contactos3\",\"/Singup3\",\"/Descargando book3\",\"/Regresa3\"\n\t\t\t\t,\"/Inicio4\",\"/Contactos4\",\"/Singup4\",\"/Regresa4\"\n\t\t\t\t,\"/Inicio5\",\"/Contactos5\",\"/Singup5\",\"/Regresa5\",\"/css/**\",\"/img/**\",\"/libros/**\")\n\t\t.permitAll()\n\t\t.antMatchers(\"/book1/**\",\"/book2/**\",\"/book3/**\",\"/book4/**\",\"/book5/**\").hasAnyAuthority(\"Manuel\")\n\t\t.antMatchers(\"/book1/**\",\"/book2/**\",\"/book3/**\",\"/book4/**\",\"/book5/**\").hasAnyRole(\"Perlera89\")\n\t\t.antMatchers(\"/book1/**\",\"/book2/**\",\"/book3/**\",\"/book4/**\",\"/book5/**\").hasAnyAuthority(\"rigo\")\n\t\t.anyRequest().authenticated()\n\t\t.and()\n\t\t.formLogin().loginPage(\"/Login\")\n\t\t.permitAll()\n\t\t.and()\n\t\t.logout().permitAll();\n\t\t}", "@Override\n public void init(HttpSecurity http) throws Exception {\n http\n // disable csrf because of API mode\n .csrf().disable().sessionManagement()\n .sessionCreationPolicy(SessionCreationPolicy.STATELESS)\n\n .and()\n // manage routes securisation here\n .authorizeRequests().antMatchers(HttpMethod.OPTIONS).permitAll()\n\n // manage routes securisation here\n .and().authorizeRequests().antMatchers(HttpMethod.OPTIONS).permitAll()\n\n .antMatchers(\"/logout\", \"/\", \"/unsecured\").permitAll() //\n // .antMatchers(\"/**/catalog\").authenticated() //\n // .antMatchers(\"/**/catalog\").hasRole(\"CATALOG_MANAGER\") //\n\n .anyRequest().authenticated();\n\n }", "@Override\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\t\n\t http\n\t\t.authorizeRequests()\n\t\t.antMatchers(\"/login\", \"/static/**\", \"/login/**\").permitAll()\n\t\t.antMatchers(\"/oauth/confirm_access\").permitAll()\n\t\t.antMatchers(\"/oauth/token\").permitAll()\n\t\t.antMatchers(\"/oauth/authorize\").permitAll()\n\t\t.antMatchers(\"/student/\").access(\"hasRole('STUDENT')\")\n\t\t.antMatchers(\"/studentview/\").access(\"hasRole('STUDENT')\")\n\t\t.antMatchers(\"/vendor/\").access(\"hasRole('VENDOR')\")\n\t\t.antMatchers(\"/collegeadmin/\").access(\"hasRole('COLLEGEADMIN')\")\n\t\t/*.antMatchers(\"/basicDetail/**\").access(\"hasRole('USER')\")*/\n\t\t.antMatchers(\"/db/\").access(\"hasRole('ADMIN') and hasRole('DBA')\")\n\t\t.antMatchers(\"/admin/\").access(\"hasRole('ADMIN')\").anyRequest().authenticated()\n\t\t.and().formLogin().loginPage(\"/login\").successHandler(customSuccessHandler)\n\t\t.usernameParameter(\"username\").passwordParameter(\"password\")\n\t\t.and()\n\t\t\n\t\t.csrf()\n\t\t.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())\n\t\t.requireCsrfProtectionMatcher(new AntPathRequestMatcher(\"/oauth/authorize\"))\n\t\t/*.disable()*/\n\t\t.and()\n\t\t.logout()\n\t\t.logoutUrl(\"/logout\")\n\t\t.and().exceptionHandling().accessDeniedPage(\"/Access_Denied/\")\n\t\t/*.and()\n\t\t.formLogin()\n\t\t.loginProcessingUrl(\"/login\")*/;\n\t}", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n http\n .csrf().disable()\n .authorizeRequests()\n .mvcMatchers(HttpMethod.POST,\"*/users\").permitAll()\n .mvcMatchers(HttpMethod.GET,\"*/users\").hasRole(\"ADMIN\")\n .mvcMatchers(\"/spaces\").hasRole(\"USER,ADMIN\")\n .anyRequest().authenticated()\n .and().httpBasic()\n .and().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)\n .and().sessionManagement().disable();\n }", "@Override\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\t\n\t\t\t\t\t\n\t\thttp\n\t\t.csrf().disable()\n\t\t.authorizeRequests()\n\t\t.antMatchers(\"/admin/Login**\")\t\n\t\t.permitAll()\n\t\t.antMatchers(\"/admin/**\")\n\t\t.hasAnyRole(\"ADMIN\")\n\t\t.antMatchers(\"/manager/**\")\n\t\t.hasAnyRole(\"ADMIN\",\"MANAGER\")\n\t\t.anyRequest()\n\t\t.permitAll();\n\t\t\n\t\thttp\n\t\t.formLogin()\n\t\t.loginProcessingUrl(\"/admin/Login\")\n\t\t.loginPage(UrlConstance.LOGIN_URL)\n\t\t.usernameParameter(\"email\")\n\t\t.passwordParameter(\"password\")\n\t\t.defaultSuccessUrl(\"/default\")\n\t\t.failureUrl(\"/Login?error=true\");\n\t\t\n\t\thttp.logout()\n\t\t.logoutUrl(\"/admin/Logout\")\n\t\t.logoutSuccessUrl(UrlConstance.LOGIN_URL)\n\t\t.deleteCookies(\"JSESSIONID\");\n\t\t\n\t\thttp.exceptionHandling()\n\t\t.accessDeniedPage(\"/error/403\");\n\n\t}", "@Override\n public void configure(WebSecurity web) throws Exception {\n web.ignoring().antMatchers(\"/login\");\n }", "@Override\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\thttp.authorizeRequests().antMatchers(\"/admin/**\").hasRole(\"admin\").antMatchers(\"/user/**\")\n\t\t\t\t.hasAnyRole(\"admin\", \"user\").anyRequest().authenticated().and().formLogin().loginPage(\"/login.html\")\n\t\t\t\t.loginProcessingUrl(\"/login\").successHandler(new AuthenticationSuccessHandler() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onAuthenticationSuccess(HttpServletRequest req, HttpServletResponse resp,\n\t\t\t\t\t\t\tAuthentication authentication) throws IOException, ServletException {\n\t\t\t\t\t\tresp.setContentType(\"application/json;charset=utf-8\");\n\t\t\t\t\t\tSysUsers users = (SysUsers) authentication.getPrincipal();\n\t\t\t\t\t\tusers.setPassword(null);\n\t\t\t\t\t\tPrintWriter out = resp.getWriter();\n\t\t\t\t\t\tList<Object> list = new ArrayList<Object>();\n\t\t\t\t\t\tlist.add(\"success\");\n\t\t\t\t\t\tlist.add(users);\n\t\t\t\t\t\tout.write(new ObjectMapper().writeValueAsString(list));\n\t\t\t\t\t\tout.flush();\n\t\t\t\t\t\tout.close();\n\t\t\t\t\t}\n\t\t\t\t}).failureHandler((req, resp, e) -> {\n\t\t\t\t\tresp.setContentType(\"application/json;charset=utf-8\");\n\t\t\t\t\tPrintWriter out = resp.getWriter();\n\t\t\t\t\tout.write(e.getMessage());\n\t\t\t\t\tout.flush();\n\t\t\t\t\tout.close();\n\t\t\t\t}).permitAll().and().logout()\n\t\t\t\t// 默认注销行为为logout,可以通过下面的方式来修改\n\t\t\t\t.logoutUrl(\"/logout\").logoutSuccessHandler(new LogoutSuccessHandler() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onLogoutSuccess(HttpServletRequest req, HttpServletResponse resp,\n\t\t\t\t\t\t\tAuthentication authentication) throws IOException, ServletException {\n\t\t\t\t\t\tresp.setContentType(\"application/json;charset=utf-8\");\n\t\t\t\t\t\tPrintWriter out = resp.getWriter();\n\t\t\t\t\t\tout.write(new ObjectMapper().createObjectNode().put(\"msg\", \"注销成功!\").toString());\n\t\t\t\t\t\tout.flush();\n\t\t\t\t\t\tout.close();\n\t\t\t\t\t}\n\t\t\t\t}).permitAll().and().csrf().disable().exceptionHandling()\n\t\t\t\t.accessDeniedHandler(new AccessDeniedHandler() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(HttpServletRequest request, HttpServletResponse response,\n\t\t\t\t\t\t\tAccessDeniedException accessDeniedException) throws IOException, ServletException {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\t\t\t\t\t\tresponse.setContentType(\"application/json\");\n\t\t\t\t\t\tresponse.getWriter()\n\t\t\t\t\t\t\t\t.println(new ObjectMapper().createObjectNode().put(\"msg\", \"没有权限访问呀!\").toString());\n\t\t\t\t\t\tresponse.getWriter().flush();\n\t\t\t\t\t\tresponse.getWriter().close();\n\n\t\t\t\t\t}\n\t\t\t\t}).authenticationEntryPoint(new AuthenticationEntryPoint() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void commence(HttpServletRequest request, HttpServletResponse response,\n\t\t\t\t\t\t\torg.springframework.security.core.AuthenticationException authException)\n\t\t\t\t\t\t\tthrows IOException, ServletException { // TODO Auto-generated method stub\n\t\t\t\t\t\tresponse.setCharacterEncoding(\"UTF-8\");\n\t\t\t\t\t\tresponse.setContentType(\"application/json\");\n\t\t\t\t\t\tresponse.getWriter()\n\t\t\t\t\t\t\t\t.println(new ObjectMapper().createObjectNode().put(\"msg\", \"请先登录!\").toString());\n\t\t\t\t\t\tresponse.getWriter().flush();\n\t\t\t\t\t\tresponse.getWriter().close();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t//控制一个用户只能在一个客户端登陆\n\t\thttp.sessionManagement().maximumSessions(1).expiredUrl(\"/login\");\n\n\t}", "@Override\r\n\tprotected void configure(HttpSecurity http) throws Exception {\r\n\t\thttp.authorizeRequests()\r\n\t\t\t\t// \"/admin\" can only be accessed by admin\r\n\t\t\t\t.antMatchers(\"/admin\").hasRole(\"ADMIN\")\r\n\t\t\t\t// \"/user can only be accessed by user\"\r\n\t\t\t\t.antMatchers(\"/user\").hasAnyRole(\"ADMIN\", \"USER\")\r\n\t\t\t\t// \"/\" can be accessed by all.\r\n\t\t\t\t.antMatchers(\"/\").permitAll()\r\n\t\t\t\t// prompt a login form?\r\n\t\t\t\t.and().formLogin();\r\n\t}", "@Override\r\n protected void configure(HttpSecurity http) throws Exception {\r\n http.authorizeRequests()\r\n .antMatchers(\"/login\", \"/registration\", \"/resources/**\")\r\n .permitAll()\r\n .antMatchers(\"/**\")\r\n .hasAnyRole(\"ADMIN\", \"USER\")\r\n .and()\r\n .formLogin()\r\n .loginPage(\"/login\")\r\n .defaultSuccessUrl(\"/loginSuccess\")\r\n .failureUrl(\"/login?error=true\")\r\n .permitAll()\r\n .and()\r\n .logout()\r\n .logoutSuccessUrl(\"/login?logout=true\")\r\n .invalidateHttpSession(true)\r\n .permitAll()\r\n .and()\r\n .csrf().disable();\r\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n\n http.authorizeRequests()\n .antMatchers(\"/\").permitAll()\n .antMatchers(\"/admin/**\")\n .access(\"hasRole('USER') or hasRole('ADMIN') or hasRole('DBA')\")\n .antMatchers(\"/user/updatePassword*\", \"/user/savePassword*\", \"/updatePassword*\").hasAuthority(\"CHANGE_PASSWORD_PRIVILEGE\")\n .and()\n .formLogin()\n .loginPage(\"/login\")\n .loginProcessingUrl(\"/login\").usernameParameter(\"userName\").passwordParameter(\"password\")\n .defaultSuccessUrl(\"/admin/dashboard\")\n \n .and()\n .sessionManagement()\n //.invalidSessionUrl(\"/invalidSession.html\")\n // .invalidSessionUrl(\"/invalidSession\")\n .maximumSessions(1).sessionRegistry(sessionRegistry()).and()\n .sessionFixation().none()\n .and()\n .logout()\n //.logoutSuccessHandler(myLogoutSuccessHandler)\n //.invalidateHttpSession(false)\n //.logoutSuccessUrl(\"/login?logSucc=true\")\n .deleteCookies(\"JSESSIONID\")\n .permitAll() \n \n .and()\n .rememberMe().rememberMeParameter(\"remember-me\").tokenRepository(tokenRepository)\n //.tokenValiditySeconds(86400).and().csrf().and().exceptionHandling().accessDeniedPage(\"/Access_Denied\");\n .tokenValiditySeconds(86400).and().csrf().disable().exceptionHandling().accessDeniedPage(\"/Access_Denied\");\n \n /* \n .failureUrl(\"/login?error=true\")\n .successHandler(myAuthenticationSuccessHandler)\n .failureHandler(authenticationFailureHandler)\n .and()\n .sessionManagement()\n //.invalidSessionUrl(\"/invalidSession.html\")\n .invalidSessionUrl(\"/invalidSession.html\")\n .maximumSessions(1).sessionRegistry(sessionRegistry()).and()\n .sessionFixation().none()\n .and()\n .logout()\n .logoutSuccessHandler(myLogoutSuccessHandler)\n .invalidateHttpSession(false)\n .logoutSuccessUrl(\"/logout.html?logSucc=true\")\n .deleteCookies(\"JSESSIONID\")\n .permitAll() \n \n .and()\n .rememberMe().rememberMeParameter(\"remember-me\").tokenRepository(tokenRepository)\n //.tokenValiditySeconds(86400).and().csrf().and().exceptionHandling().accessDeniedPage(\"/Access_Denied\");\n .tokenValiditySeconds(86400).and().csrf().disable().exceptionHandling().accessDeniedPage(\"/Access_Denied\");\n \n */\n \n \n }", "@Override\n\tprotected void configure(HttpSecurity http) throws Exception {\n\n\t\t// @formatter:off\n\t\thttp\n\t\t\t.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().authorizeRequests().antMatchers(HttpMethod.OPTIONS).anonymous()\n\t\t\t.and()\n\t\t\t.csrf().disable()\n\t\t\t.authorizeRequests().antMatchers(\"/rest/inscription\",\"/rest/inscription/**\").permitAll()\n\t\t\t.and()\n\t\t\t.authorizeRequests().antMatchers(\"/rest/**\").permitAll()//authenticated().and().httpBasic()\n\n\t\t\t.and()\n\t\t\t.authorizeRequests().anyRequest().permitAll(); //\n//\t\thttp.authorizeRequests()\n//\t\t\t.antMatchers(\"/\").permitAll()\n//\t\t\t.antMatchers(\"/bootstrap/**\").permitAll()\n//\t\t\t.antMatchers(\"/matiere\",\"/matiere/**\").hasAnyRole(\"ADMIN\")\n//\t\t\t.antMatchers(\"/admin\",\"/admin/**\").authenticated()\n//\t\t\t.antMatchers(\"/**\").authenticated().and()\n//\t\t\t.formLogin()\n//\t\t\t\t.loginPage(\"/login\")\n//\t\t\t\t//.loginProcessingUrl(\"/perform\")//page qui apparait pendant l'authentification\n//\t\t\t\t.defaultSuccessUrl(\"/home\")\n//\t\t\t\t.failureUrl(\"/login?error=true\").permitAll()\n//\t\t\t.and()\n//\t\t\t.logout().logoutUrl(\"/logout\").logoutSuccessUrl(\"/\").permitAll();\n\t\t// @formatter:on\n\t}", "@Override\r\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\thttp.authorizeRequests().antMatchers(\"/admin\").hasRole(\"ADMIN\").antMatchers(\"/user\").hasRole(\"USER\")\r\n\t\t\t\t.antMatchers(\"/\").permitAll().antMatchers(\"/h2-console/**\").permitAll().and().formLogin();\r\n\r\n\t\thttp.csrf().disable();\r\n\t\thttp.headers().frameOptions().disable();\r\n\t}", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n http.authorizeRequests()\n .antMatchers(\"/greet/director\").hasRole(\"Director\")\n .and()\n .authorizeRequests()\n .antMatchers(\"/greet/avenger\").hasAnyRole(\"Director\", \"Avenger\")\n .and()\n .authorizeRequests()\n .antMatchers(\"/greet\").permitAll()\n .and().httpBasic(); // to allow api calls from post mand with basic auth\n\n // so that it also allow login / logout via browser\n http.formLogin()\n .loginPage(\"/login\").permitAll()\n .and()\n .logout().permitAll();\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n http\n .csrf().disable();\n// .loginPage(\"/login\").and().logout().permitAll();\n// .authorizeRequests().anyRequest().authenticated()\n// .and().httpBasic()\n// .httpBasic()\n// .and().sessionManagement().disable();\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n\n http\n .authorizeRequests().antMatchers(\"/oauth/**\", \"/login/**\", \"/logout\", \"/webjars/**\").permitAll()\n .and()\n .authorizeRequests().anyRequest().authenticated()\n .and()\n .formLogin().and()\n .httpBasic();\n }", "protected void configure(HttpSecurity http) throws Exception {\n\n http.csrf().disable();//pour desactiver les failles csrf\n http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);\n http.authorizeRequests().antMatchers(\"/login/**\",\"/register/**\",\"/**\").permitAll();\n\n http.authorizeRequests().anyRequest().authenticated();//pour indiquer à spring que toutes les ressource doivent etre authentifier\n //http.addFilter(new JWTauthentificationFilter(authenticationManager()));\n //http.addFilterBefore(new JWTauthorizationFilter(), UsernamePasswordAuthenticationFilter.class);\n\n http.logout().logoutUrl(\"/logout\");\n http.logout().logoutRequestMatcher(new AntPathRequestMatcher(\"/logout\"))\n .logoutSuccessUrl(\"/?logout\").deleteCookies(\"remember-me\").permitAll()\n .and()\n .rememberMe();\n http.formLogin().failureForwardUrl(\"/login?error\");\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception{\n http\n .csrf().disable()\n .httpBasic().disable()\n .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)\n .and()\n .authorizeRequests()\n .antMatchers(HttpMethod.GET, \"/home\").permitAll()\n .antMatchers(HttpMethod.POST, \"/login\").permitAll()\n .antMatchers(HttpMethod.GET, \"/signup\").permitAll()\n .antMatchers(HttpMethod.POST,\"/signup\").permitAll()\n .antMatchers(HttpMethod.GET, \"/verifyemail/**\").permitAll()\n .antMatchers(HttpMethod.GET,\"/userinfo\").authenticated()\n .antMatchers(HttpMethod.PUT, \"/userinfo\").authenticated()\n .antMatchers(HttpMethod.GET, \"/resetpassword/**\").permitAll()\n .antMatchers(HttpMethod.PUT, \"/resetpassword/newpassword/**\").permitAll()\n .antMatchers(HttpMethod.POST, \"/resetpassword\").permitAll()\n .antMatchers(HttpMethod.PUT, \"/resetimage\").authenticated()\n .anyRequest().permitAll()\n .and()\n .apply(new JwtConfigurer(jwtTokenProvider));\n }", "@Override\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\t\n\t\t\n\t\thttp.authorizeRequests()\n\t\t// Los recursos estáticos no requieren autenticación\n\t\t.antMatchers(\"/css/**\", \"/\").permitAll()\n\t\t.antMatchers(\n\t\t\t\t\"/vendors/**\",\n\t\t\t\t\"/img/**\",\n\t\t\t\t\"/js/**\",\n\t\t\t\t\"/scss/**\",\n\t\t\t\t\"/node_modules/**\").permitAll()\n\t\t\t\t\t//Asignar permisos a URLs por ROLES \n\t\t.antMatchers(\"/monedas/**\").hasAnyAuthority(\"ROLE_USER\") \n\t\t.antMatchers(\"/tasas/**\").hasAnyAuthority(\"ROLE_USER\")\n\n\t\t\t\t\t\n\t\t// Todas las demás URLs de la Aplicación requieren autenticación\n\t\t.anyRequest().authenticated()\n\t\t// El formulario de Login no requiere autenticacion\n\t\t//.and().formLogin().permitAll(); //Asi se usa para usar el por dedecto de spring security\n\t\t// El formulario de Login no requiere autenticacion\n\t\t//.and().formLogin().loginPage(\"/login\").permitAll()\n\t\t.and().formLogin().loginPage(\"/login\").failureUrl(\"/login-error\").defaultSuccessUrl(\"/\").permitAll()\n\t\t.and().logout().permitAll();\n\t\t\t\n\t\t\n\t}", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n /*http\n .csrf().disable()\n .addFilterAfter(new JWTAuthorizationFilter(), UsernamePasswordAuthenticationFilter.class)\n .authorizeRequests()\n .antMatchers(HttpMethod.POST, \"/api/authentication/**\").permitAll()\n .anyRequest().authenticated();\n */\n http\n .csrf().disable()\n .addFilterAfter(new JWTAuthorizationFilter(), UsernamePasswordAuthenticationFilter.class)\n .authorizeRequests().\n anyRequest().permitAll();\n }", "@Override\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\thttp.cors().and().csrf().disable()\n\t\t\t.exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and()\n\t\t\t.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()\n\t\t\t.authorizeRequests()\n\t\t\t.antMatchers(\"/admin/teamsize/**\").hasAnyRole(\"ADMIN\", \"STUDENT\")\n\t\t\t.antMatchers(\"/admin/**\").hasRole(\"ADMIN\")\n//\t\t\t.antMatchers(\"/user/register\").hasRole(\"ADMIN\")\n\t\t\t.antMatchers(\"/guide/**\").hasAnyRole(\"GUIDE\",\"ADMIN\")\n\t .antMatchers(\"/student/**\").hasAnyRole(\"STUDENT\",\"ADMIN\")\n\t\t\t//.antMatchers(\"/student/**\").permitAll()\n\t\t\t.antMatchers(\"/user/**\").permitAll()\n\t .antMatchers(\"/\").hasAnyRole(\"ADMIN\",\"GUIDE\",\"STUDENT\")\n\t .antMatchers(\"/v2/api-docs\", \"/configuration/**\", \"/swagger*/**\", \"/webjars/**\").permitAll().anyRequest().authenticated();\n//\t\t\t.and()\n//\t\t\t.formLogin().loginPage(\"/user/login\").permitAll();\n\t\t\n\t\t // If a user try to access a resource without having enough permissions\n//\t\thttp.exceptionHandling().accessDeniedPage(\"/user/login\");\n\t\thttp.addFilterBefore(authTokenFilter, UsernamePasswordAuthenticationFilter.class);\n\t}", "@Override\r\n\tprotected void configure(HttpSecurity http) throws Exception {\r\n\t\thttp.csrf()\r\n\t\t\t.disable().authorizeRequests()\r\n\t\t\t.antMatchers(\"/**\").hasRole(\"USER\")\r\n\t\t\t.and()\r\n\t\t\t.httpBasic(); // displays browser alerts\r\n\t\t\t//.formLogin(); // dsiplays form\r\n\t}", "@Override\n\tpublic void configure(HttpSecurity httpSecurity) throws Exception {\n\n\t\thttpSecurity.authorizeRequests()\n\t\t\t\t.antMatchers(\"/css/**\").permitAll() // for css folder\n\t\t\t\t.antMatchers(\"/\").hasRole(\"EMPLOYEE\")\n\t\t\t\t.antMatchers(\"/leaders/**\").hasRole(\"MANAGER\")\n\t\t\t\t.antMatchers(\"/systems/**\").hasRole(\"ADMIN\")\n\t\t\t\t.and()\n\t\t\t\t.formLogin()\n\t\t\t\t.loginPage(\"/showMyLoginPage\")\n\t\t\t\t.loginProcessingUrl(\"/authenticateTheUser\") // url provided by spring\n\t\t\t\t.permitAll()\n\t\t\t\t.and().logout().permitAll() // gives logout support, which provides! default url (/logout)\n\t\t\t\t.and().exceptionHandling().accessDeniedPage(\"/access-denied\");\n\n\t}", "@Override\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\t\n\t\thttp.csrf();\n\t\t\n\t\thttp.authorizeRequests().antMatchers(\"/css/**\", \"/js/**\", \"/img/**\", \"/bootstrap/**\", \"/resources/**\").permitAll()\n\t\t.antMatchers(\"/\", \"/createAdminUser\", \"/index\", \"/signUp\", \"/user/activate\", \"/news\", \"/about\", \"/contact\", \"/taebo\", \"/crossfit\", \"/aerotonus\", \"/total50\").permitAll()\n .antMatchers(\"/user/**\").hasRole(\"USER\")\n .antMatchers(\"/admin/**\", \"/user/**\").hasRole(\"ADMIN\")\n .anyRequest().authenticated()\n .and().formLogin().loginPage(\"/login\").successForwardUrl(\"/\").failureUrl(\"/login?error\").permitAll().and()\n\t\t.logout().logoutUrl(\"/logout\").logoutSuccessUrl(\"/\");\n\t}", "@Override\n protected void configure(HttpSecurity httpSecurity) throws Exception {\n httpSecurity.cors().configurationSource(request -> {\n var cors = new CorsConfiguration();\n cors.setAllowedOrigins(List.of(\"*\"));\n cors.setAllowedMethods(List.of(\"GET\",\"POST\", \"PUT\", \"DELETE\", \"OPTIONS\"));\n cors.setAllowedHeaders(List.of(\"*\"));\n return cors;\n })\n .and()\n .csrf()\n .disable()\n .authorizeRequests()\n .antMatchers(DOCS_WHITELIST).permitAll()\n\n .antMatchers(HttpMethod.POST, jwtConfig.getUri() + \"/login\").permitAll()\n\n .antMatchers(HttpMethod.POST, \"/users/**\").permitAll()\n .antMatchers(HttpMethod.GET, \"/users/me/\").permitAll()\n .antMatchers(HttpMethod.GET, \"/users/**\").hasAnyRole(\"USER\", \"MODERATOR\", \"ADMIN\")\n .antMatchers(HttpMethod.DELETE, \"/users/**\").hasAnyRole(\"ADMIN\")\n .antMatchers(HttpMethod.PUT, \"/users/{userId}/\").hasAnyRole(\"ADMIN\")\n\n .antMatchers(\"/rooms/{roomId}/reservations/\").permitAll()\n\n .antMatchers(HttpMethod.GET, \"/buildings/**\").hasAnyRole(\"USER\", \"MODERATOR\", \"ADMIN\")\n .antMatchers(HttpMethod.POST,\"/buildings/**\").hasAnyRole(\"ADMIN\", \"MODERATOR\")\n .antMatchers(HttpMethod.PUT,\"/buildings/**\").hasAnyRole(\"ADMIN\", \"MODERATOR\")\n .antMatchers(HttpMethod.DELETE, \"/buildings/**\").hasRole(\"ADMIN\")\n\n .antMatchers(HttpMethod.GET, \"/rooms/**\").hasAnyRole(\"USER\", \"MODERATOR\", \"ADMIN\")\n .antMatchers(HttpMethod.POST,\"/rooms/**\").hasAnyRole(\"ADMIN\", \"MODERATOR\")\n .antMatchers(HttpMethod.PUT,\"/rooms/**\").hasAnyRole(\"ADMIN\", \"MODERATOR\")\n .antMatchers(HttpMethod.DELETE, \"/rooms/**\").hasRole(\"ADMIN\")\n\n .antMatchers(HttpMethod.GET, \"/sections/**\").hasAnyRole(\"USER\", \"MODERATOR\", \"ADMIN\")\n .antMatchers(HttpMethod.POST,\"/sections/**\").hasAnyRole(\"ADMIN\", \"MODERATOR\")\n .antMatchers(HttpMethod.PUT,\"/sections/**\").hasAnyRole(\"ADMIN\", \"MODERATOR\")\n .antMatchers(HttpMethod.DELETE, \"/sections/**\").hasRole(\"ADMIN\")\n\n .antMatchers(\"/admin/**\").hasRole(\"ADMIN\")\n\n .anyRequest()\n .authenticated()\n .and()\n .exceptionHandling()\n .authenticationEntryPoint(\n (req, res, e) -> {\n res.setContentType(\"application/json\");\n res.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n res.getOutputStream().println(\"{ \\\"message\\\": \\\"Brukernavn eller passord er feil\\\"}\");\n })\n .and()\n .addFilter(new JWTUsernamePasswordAuthenticationFilter(refreshTokenService, authenticationManager(), jwtConfig))\n .addFilterAfter(new JWTAuthenticationFilter(jwtConfig, jwtUtil, userDetailsService), UsernamePasswordAuthenticationFilter.class)\n .sessionManagement()\n .sessionCreationPolicy(SessionCreationPolicy.STATELESS);\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n http\n .csrf().csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())\n .and()\n .authorizeRequests()\n .antMatchers(\"/api/test\",\"/api/login\",\"/api/register\",\"/api/populate\",\"/#/**\",\"/\").permitAll()\n .antMatchers(\"/api/admin/**\").hasRole(\"ADMIN\")\n .antMatchers(\"/api/**\").hasRole(\"USER\")\n .anyRequest().authenticated()\n .and()\n .exceptionHandling()\n .and()\n .sessionManagement()\n .sessionCreationPolicy(SessionCreationPolicy.STATELESS);\n http.addFilterBefore(jwtFilter, UsernamePasswordAuthenticationFilter.class);\n }", "@Override\n\tprotected void configure(HttpSecurity http) throws Exception {\n\n\t\t// Cái csrf là cái middle gì đó nó được RUN khi extends\n\t\t// WebSecurityConfigurerAdapter\n\t\t// Cái này có tác dụng Ngăn chặn cái gì đó (hiện tại đang thấy nó đang ngăn chặn\n\t\t// method POST, không ngăn chặn GET)\n\t\t// đoạn code http.csrf().ignoringAntMatchers sẽ là từ bỏ việc ngăn chặn, tức là\n\t\t// cho nó hoạt động\n\t\thttp.csrf().disable(); // TẮT lệnh này cũng bị lỗi 405\n\t\t// BẬT lệnh này bị lỗi 405\n\t\t// http.csrf().ignoringAntMatchers(\"/ajax/**\");\n\n\t\t// Các trang không yêu cầu login\n\t\thttp.authorizeRequests().antMatchers(\"/\", \"/login\", \"/logout\", \"/admin/login\").permitAll();\n\n\t\t// Trang /userInfo yêu cầu phải login với vai trò ROLE_USER hoặc ROLE_ADMIN.\n\t\t// Nếu chưa login, nó sẽ redirect tới trang /login.\n\t\thttp.authorizeRequests().antMatchers(\"/checkout/payment\").access(\"hasAnyRole('ROLE_USER', 'ROLE_ADMIN')\");\n\t\thttp.authorizeRequests().antMatchers(\"/comment/**\").access(\"hasAnyRole('ROLE_USER', 'ROLE_ADMIN')\");\n\t\thttp.authorizeRequests().antMatchers(\"/account/**\").access(\"hasAnyRole('ROLE_USER', 'ROLE_ADMIN')\");\n\n\t\t// Trang chỉ dành cho ADMIN\n\t\thttp.authorizeRequests().antMatchers(\"/admin/**\").access(\"hasRole('ROLE_ADMIN')\");\n\t\thttp.authorizeRequests().antMatchers(\"/api/v1/admin/**\").access(\"hasRole('ROLE_ADMIN')\");\n\n\t\t// Khi người dùng đã login, với vai trò XX.\n\t\t// Nhưng truy cập vào trang yêu cầu vai trò YY,\n\t\t// Ngoại lệ AccessDeniedException sẽ ném ra.\n\t\thttp.authorizeRequests().and().exceptionHandling().accessDeniedPage(\"/403\");\n\n\t\t// Cấu hình cho Login Form.\n\t\thttp.authorizeRequests().and().formLogin()\n\t\t\t\t// Chỉ định Url sẽ được submit login\n\t\t\t\t// Khi submit URL này thì Security sẽ gọi Provider đã được setup ở\n\t\t\t\t// configureGlobal để xử lý check\n\t\t\t\t// .loginProcessingUrl(\"/j_spring_security_check\") // Submit URL\n\t\t\t\t.loginProcessingUrl(\"/login-check\") // Submit URL\n\t\t\t\t.loginPage(\"/login\")//\n\t\t\t\t.defaultSuccessUrl(\"/home\")//\n\t\t\t\t.failureUrl(\"/login?error=true\")//\n\t\t\t\t.usernameParameter(\"username\")//\n\t\t\t\t.passwordParameter(\"password\");\n//\t\t\t\t.successHandler(authenticationSuccessHandler);\n\n\t\t// Cấu hình cho Logout Page.\n\t\thttp.authorizeRequests().and().logout().logoutUrl(\"/logout\").logoutSuccessUrl(\"/home\");\n\n\t\t// Cấu hình Remember Me.\n\t http.authorizeRequests().and() //\n\t .rememberMe()\n\t // .alwaysRemember(true) // default : false : ko remember, phải chọn remember\n\t .rememberMeParameter(\"remember-me\") // default : remember-me\n\t .rememberMeCookieName(\"RememberMeApp\") // default : remember-me\n\t .tokenRepository(this.persistentTokenRepository()) //\n\t .tokenValiditySeconds(1 * 24 * 60 * 60); // custom 24h // default : 2 weeks\n\t}", "@PreAuthorize(\"hasRole('ADMIN') AND hasRole('USER')\") \n\t@RequestMapping(\"/home\")\n @ResponseBody\n public String home(){\n\t return \"home\";\n }", "@Override\n public void configure(WebSecurity web) throws Exception {\n web\n .ignoring()\n .antMatchers(\"/resources/**\", \"/static/**\", \"/css/**\", \"/js/**\", \"/images/**\",\"/documents/**\");\n }", "@Override\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\thttp.authorizeRequests().antMatchers(EMPLOYEE_ROLES_HOME_PAGE_URL_ACCESS)\n\t\t\t\t.hasAnyRole(\"EMPLOYEE\", \"ADMIN\", \"MANAGER\").antMatchers(MANAGER_ROLES_PAGE_URL_ACCESS)\n\t\t\t\t.hasRole(\"MANAGER\").antMatchers(ADMIN_ROLES_PAGE_URL_ACCESS).hasRole(\"ADMIN\").and().formLogin()\n\t\t\t\t.loginPage(LOGIN_PAGE_URL).loginProcessingUrl(LOGIN_PROCESSING_URL_TO_AUTHENTICATE).permitAll().and()\n\t\t\t\t.logout().permitAll().and().exceptionHandling().accessDeniedPage(ACCESS_DENIED_MAPPING_URL);\n\t}", "protected void configure(HttpSecurity http) throws Exception {\n http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)\n .and()\n .cors().configurationSource(new CorsConfigurationSource() {\n @Override\n public CorsConfiguration getCorsConfiguration(HttpServletRequest request) {\n CorsConfiguration config = new CorsConfiguration();\n config.setAllowedOrigins(Collections.singletonList(\"http://localhost:4200\"));\n config.setAllowedMethods(Collections.singletonList(\"*\"));\n config.setAllowCredentials(true);\n config.setAllowedHeaders(Collections.singletonList(\"*\"));\n config.setExposedHeaders(Arrays.asList(\"Authorization\"));\n config.setMaxAge(3600L);\n return config;\n }\n }).and().csrf().disable()\n .addFilterBefore(new RequestValidationBeforeFilter(), BasicAuthenticationFilter.class)\n .addFilterAfter(new AuthoritiesLoggingAfterFilter(),BasicAuthenticationFilter.class)\n .addFilterBefore(new JWTTokenValidatorFilter(), BasicAuthenticationFilter.class)\n .addFilterAfter(new JWTTokenGeneratorFilter(), BasicAuthenticationFilter.class)\n .addFilterAt(new AuthoritiesLoggingAtFilter(),BasicAuthenticationFilter.class)\n .authorizeRequests()\n .antMatchers(\"/accounts\").hasRole(\"USER\")\n .antMatchers(\"/balance\").hasAnyRole(\"USER\",\"ADMIN\")\n .antMatchers(\"/loans\").hasRole(\"ROOT\")\n .antMatchers(\"/cards\").authenticated()\n .antMatchers(\"/notice\").permitAll()\n .antMatchers(\"/contact\").permitAll()\n .antMatchers(\"/welcome\").permitAll()\n .and()\n .formLogin()\n .and()\n .httpBasic();\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n\n\n http\n .httpBasic().disable()\n .csrf().disable()\n .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)\n .and()\n .authorizeRequests()\n .antMatchers(\"/admin/*\").hasRole(\"ADMIN\")\n .antMatchers(\"/user/*\").hasRole(\"USER\")\n .antMatchers(\"/api/*\", \"/auth\").permitAll()\n .antMatchers(\"/register\", \"/auth\").permitAll()\n .and()\n .addFilterBefore(jwtFilter, UsernamePasswordAuthenticationFilter.class);\n }", "@Override\n public void configure(WebSecurity web) throws Exception {\n web\n .ignoring()\n .antMatchers(\"/*.js\",\"/css/*.css\",\"/*.ico\",\"/*.json\");\n }", "@PreAuthorize(\"hasAuthority('ROLE_ADMIN')\")\n @RequestMapping\n public String admin() {\n return \"admin\";\n }", "@Override\r\n\tprotected void configure(HttpSecurity http) throws Exception {\r\n\t\thttp.csrf().disable().cors()\r\n\t\t\t.and()\r\n\t\t\t\t.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)\r\n\t\t\t.and()\r\n\t\t\t\t.authorizeRequests()\r\n\t\t\t\t.antMatchers(\"/api/auth/**\").permitAll()\r\n\t\t\t\t.antMatchers(HttpMethod.POST, \"/tarefa/**\", \"/categoria/**\", \"/usuario/**\").hasRole(\"ADMIN\")\r\n\t\t\t\t.antMatchers(HttpMethod.PUT, PATHS).hasRole(\"ADMIN\")\r\n\t\t\t\t.antMatchers(HttpMethod.DELETE, PATHS).hasRole(\"ADMIN\")\r\n\t\t\t\t.antMatchers(HttpMethod.GET, PATHS).hasAnyRole(\"ADMIN\", \"USER\")\r\n\t\t\t\t.antMatchers(\"/h2-console/**\").permitAll()\r\n\t\t\t\t.anyRequest().authenticated()\r\n\t\t\t.and()\r\n\t\t\t\t.addFilterBefore(authenticationJwtTokenFilter(), UsernamePasswordAuthenticationFilter.class)\r\n\t\t\t.exceptionHandling().authenticationEntryPoint(unauthorizedHandler);\r\n\t}", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n http.authorizeRequests().antMatchers(\"/v2/api-docs\",\n \"/configuration/ui\",\n \"/swagger-resources/**\",\n \"/configuration/security\",\n \"/swagger-ui.html\",\n \"/webjars/**\").permitAll();\n\n http.authorizeRequests()\n .antMatchers(\"/\", \"/css/**\", \"/js/**\", \"/images/**\").permitAll()\n .anyRequest()\n .authenticated()\n .and()\n .addFilter(new JWTAuthenticationFilter(authenticationManager(), jwtService))\n .addFilter(new JWTAuthorizationFilter(authenticationManager(), jwtService))\n .csrf().disable()\n .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);\n }", "@Override\n\tprotected void configure(HttpSecurity http) throws Exception{\n http = http.cors().and().csrf().disable();\n\n // Set session management to stateless\n http = http\n .sessionManagement()\n .sessionCreationPolicy(SessionCreationPolicy.STATELESS)\n .and();\n\n // Set unauthorized requests exception handler\n http = http\n .exceptionHandling()\n .authenticationEntryPoint(\n (request, response, ex) -> {\n response.sendError(\n HttpServletResponse.SC_UNAUTHORIZED,\n ex.getMessage()\n );\n }\n )\n .and();\n \n //To be modified to fit project endpoints\n\t\thttp.authorizeRequests().antMatchers(\"/public/**\").permitAll()\n\t\t.antMatchers(\"/admin\").hasRole(\"ADMIN\")\n\t\t.antMatchers(\"/user\").hasAnyRole(\"USER\",\"ADMIN\",\"DRIVER\")\n\t\t.anyRequest().authenticated()\n\t\t.and().oauth2ResourceServer().jwt();\n\t}", "public void configure(HttpSecurity http) throws Exception{\n\t\thttp.csrf().disable();\n\t\thttp.headers().frameOptions().disable();\n\t\thttp.authorizeRequests()\n\t\t.antMatchers(\"/list\").hasRole(\"PROFESSOR\")\n\t\t.antMatchers(\"/add\").hasRole(\"PROFESSOR\")\n\t\t.antMatchers(\"/view\").hasAnyRole(\"PROFESSOR\",\"STUDENT\")\n\t\t.antMatchers(HttpMethod.POST, \"/register\").permitAll()\n\t\t.antMatchers(\"/\", \"/register\", \"/css/**\", \"/images/**\", \"/js/**\", \"/**\").permitAll()\n\t\t.antMatchers(\"/h2-console/**\").permitAll()\n\t\t.anyRequest().authenticated()\n\t\t.and()\n\t\t.formLogin()\n\t\t.loginPage(\"/login\")\n\t\t.permitAll()\n\t\t.and()\n\t\t.logout()\n\t\t.invalidateHttpSession(true)\n\t\t.clearAuthentication(true)\n\t\t.logoutRequestMatcher(new AntPathRequestMatcher(\"/logout\"))\n\t\t.logoutSuccessUrl(\"/login?logout\")\n\t\t.permitAll()\n\t\t.and()\n\t\t.exceptionHandling()\n\t\t.accessDeniedHandler(accessDeniedHandler);\n\t}", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n http.csrf().disable()\n // Register our CustomRequestCache that saves unauthorized access attempts, so\n // the user is redirected after login.\n .requestCache().requestCache(new CustomRequestCache())\n // Restrict access to our application.\n .and().authorizeRequests()\n // Allow all flow internal requests.\n .requestMatchers(SecurityUtils::isFrameworkInternalRequest).permitAll() //\n // Allow all requests by logged in users.\n .anyRequest().authenticated()\n // Configure the login page.\n .and().formLogin().loginPage(LOGIN_URL).permitAll()\n .loginProcessingUrl(LOGIN_PROCESSING_URL)\n .failureUrl(LOGIN_FAILURE_URL)\n // Configure logout\n .and()\n .logout(logout -> logout\n .logoutUrl(LOGOUT_URL)\n .logoutSuccessUrl(LOGOUT_SUCCESS_URL)\n .invalidateHttpSession(true)\n .deleteCookies()\n );\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n http\n .httpBasic()\n .and()\n .authorizeRequests()\n .antMatchers(\"/topics\").hasRole(\"admin\")\n .antMatchers(\"/topics/**\").hasRole(\"admin\")\n .antMatchers(\"/courses/**\").hasRole(\"admin\")\n .and()\n .csrf().disable()\n .formLogin().disable();\n }", "@Override\n public void configure(HttpSecurity http) throws Exception {\n\n String[] unsecuredResources = new String[] { \"/login\", \"/security/**\", \"/services/rest/login\",\n \"/services/rest/logout\" };\n\n http\n //\n .userDetailsService(this.userDetailsService)\n // define all urls that are not to be secured\n .authorizeRequests().antMatchers(unsecuredResources).permitAll().anyRequest().authenticated().and()\n\n // activate crsf check for a selection of urls (but not for login & logout)\n .csrf().requireCsrfProtectionMatcher(new CsrfRequestMatcher()).and()\n\n // configure parameters for simple form login (and logout)\n .formLogin().successHandler(new SimpleUrlAuthenticationSuccessHandler()).defaultSuccessUrl(\"/\")\n .failureUrl(\"/login.html?error\").loginProcessingUrl(\"/j_spring_security_login\").usernameParameter(\"username\")\n .passwordParameter(\"password\").and()\n // logout via POST is possible\n .logout().logoutSuccessUrl(\"/login.html\").and()\n\n // register login and logout filter that handles rest logins\n .addFilterAfter(getSimpleRestAuthenticationFilter(), BasicAuthenticationFilter.class)\n .addFilterAfter(getSimpleRestLogoutFilter(), LogoutFilter.class);\n\n if (this.corsEnabled) {\n http.addFilterBefore(getCorsFilter(), CsrfFilter.class);\n }\n }", "@Override\n public void configure(WebSecurity web) throws Exception {\n web.ignoring().antMatchers(HttpMethod.GET,\"/api/posts/**\")\n .antMatchers(\"api/users/**\");\n }", "@Override\n public void configure(HttpSecurity http) throws Exception {\n http\n .addFilterBefore(getFirebaseAuthenticationFilter(), BasicAuthenticationFilter.class).authorizeRequests()\n .antMatchers(HttpMethod.OPTIONS,\"/api/**\").permitAll()\n .antMatchers(\"/api/**\").hasAnyRole(Roles.ANONYMOUS, Roles.USER, Roles.ADMIN)\n .antMatchers(\"/**\").denyAll()\n .and().csrf().disable()\n .anonymous().authorities(Roles.ROLE_ANONYMOUS)\n .and().exceptionHandling().authenticationEntryPoint(entryPoint)\n .and().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.NEVER).disable();\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n http.authorizeRequests()\n .antMatchers(\"/\", \"/home\", \"/error\", \"/api/**\", \"/css/**\", \"/img/**\", \"/js/**\").permitAll()\n .antMatchers(\"/admin\").hasAnyAuthority(\"WEBADMIN\", \"DBADMIN\")\n .antMatchers(h2ConsolePath + \"/**\").hasAuthority(\"DBADMIN\")\n .antMatchers(\"/**\").hasAuthority(\"WEBADMIN\")\n .and()\n .formLogin().loginPage(\"/login\").permitAll().successHandler(successHandler())\n .and()\n .logout().permitAll();\n\n // H2 Console security config\n http.csrf().ignoringAntMatchers(h2ConsolePath + \"/**\");\n http.headers().frameOptions().disable();\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n String[] allowed = {\"/api/auth/**\", \"/static/**\", \"/*.ico\"};\n\n http.cors()\n .and()\n .csrf()\n .disable()\n .exceptionHandling()\n .authenticationEntryPoint(unauthorizedHandler)\n .and()\n .sessionManagement()\n .sessionCreationPolicy(SessionCreationPolicy.STATELESS)\n .and()\n .authorizeRequests()\n .antMatchers(allowed)\n .permitAll()\n .anyRequest()\n .authenticated()\n .and()\n .formLogin()\n // uncommenting this should enable a default login form\n // we need to replace this with a custom one\n .loginPage(\"/\")\n .permitAll()\n .and()\n .logout()\n .permitAll();\n\n /*\n * This is key for exposing csrf tokens in apis that are outside\n * of the browser. We will need these headers in react and for\n * testing with postman etc.\n */\n http.addFilterBefore(\n new JwtAuthenticationFilter(tokenProvider, customUserDetailsService),\n UsernamePasswordAuthenticationFilter.class);\n }", "@Override\n\t\tprotected void configure(HttpSecurity http) throws Exception {\n\t\t\thttp.cors().and().csrf().disable()\n\t\t\t\t\t.addFilterAfter(new JWTAuthorizationFilter(), UsernamePasswordAuthenticationFilter.class)\n\t\t\t\t\t.authorizeRequests()\n\t\t\t\t\t.antMatchers(\"/admin/**\").hasRole(\"ADMIN\")\n\t\t\t\t\t.antMatchers(\"/user/**\").hasRole(\"USER\")\n\t\t\t\t\t.antMatchers(HttpMethod.POST, \"/login\").permitAll()\n\t\t\t\t\t.antMatchers(HttpMethod.GET, \"/articulos\").permitAll()\n\t\t\t\t\t.and()\n\t\t\t\t\t.authorizeRequests()\n\t\t\t\t\t.antMatchers(\"/h2-console/**\").permitAll()\n\t\t\t\t\t.anyRequest().authenticated();\n\t\t\thttp.headers().frameOptions().disable();\n\n\t\t}", "@RequestMapping(\"/\")\n public String home(HttpServletRequest request) {\n if(!request.isUserInRole(\"ROLE_ADMIN\")){\n return \"home\";\n }\n else {\n return \"redirect:/admin/pocetna\";\n }\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n\n http\n .authorizeRequests()\n // The code below is to allow H2 console to be accessed (even for users that are not logged in)\n .antMatchers(\"/h2/**\", \"/console/**\").permitAll()\n\n .antMatchers(\"/index\", \"/\", \"/**\").hasAnyRole(\"USER\")\n .antMatchers(\"/api\").hasAnyRole(\"USER\")\n .antMatchers(\"/period/**\").hasAnyRole(\"ADMIN\")\n\n .anyRequest().authenticated()\n .and()\n .formLogin().loginPage(\"/login\").permitAll()\n .and()\n .logout().permitAll()\n .logoutSuccessUrl(\"/login\")\n .and()\n .exceptionHandling().accessDeniedHandler(accessDeniedHandler);\n\n http.csrf().disable();\n http.headers().frameOptions().disable();\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n VaadinSpringSecurity.configure(http);\n // Ignore the login processing url and vaadin endpoint calls\n http.csrf().ignoringAntMatchers(\"/login\", \"/connect/**\");\n // specify the URL of the login view, the value of the parameter\n // is the defined route for the login view component.\n http.formLogin().loginPage(\"/login\").permitAll();\n }", "@Override\n protected void configure(HttpSecurity httpSecurity) throws Exception {\n httpSecurity\n .csrf().disable()\n .exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and()\n // non abbiamo bisogno di una sessione\n .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()\n .cors().and()\n .authorizeRequests()\n .antMatchers(\n //HttpMethod.GET,\n \"/\",\n \"/*.html\",\n \"/favicon.ico\",\n \"/**/*.html\",\n \"/**/*.css\",\n \"/**/*.js\"\n ).permitAll()\n .antMatchers(\"/chat-websocket/**\", \"/public/**\", \"/swagger-ui/**\", \"/api-docs\", \"/api-docs/**\").permitAll()\n //.antMatchers(\"/api/v1/targets/**\").hasRole(\"ADMIN\")\n .antMatchers(HttpMethod.OPTIONS).permitAll()\n .anyRequest().authenticated();\n\n // Filtro Custom JWT\n httpSecurity.addFilterBefore(authenticationTokenFilterBean(), UsernamePasswordAuthenticationFilter.class);\n httpSecurity.headers().cacheControl();\n }", "@GetMapping(path = \"/addUser\")\n @PreAuthorize(\"hasAnyRole('ROLE_ADMIN')\")\n public String addUser(Model model){\n return \"addUser\";\n }", "@Override\n\tpublic void configure(HttpSecurity http) throws Exception {\n\t\thttp.authorizeRequests().antMatchers(\"/**\").authenticated()\n\t\t.and().exceptionHandling().accessDeniedHandler(new OAuth2AccessDeniedHandler());\n//\t\thttp.authorizeRequests().antMatchers(HttpMethod.GET, \"/**\").access(\"#oauth2.hasScope('read')\")\n//\t\t\t\t.antMatchers(HttpMethod.POST, \"/**\").access(\"#oauth2.hasScope('write')\")\n//\t\t\t\t.antMatchers(HttpMethod.DELETE, \"/**\").access(\"#oauth2.hasScope('write')\");\n\t}", "@Override\n public void configure(WebSecurity web) throws Exception {\n web\n .ignoring()\n .antMatchers(\"/resources/**\");\n }", "@Override\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\thttp\n\t\t\t\n\t\t.cors()\n \t.and()\n .csrf()\n \t.disable()\n .formLogin()\n \t.disable()\n .httpBasic()\n \t.disable()\n .exceptionHandling()\n \t.authenticationEntryPoint(jwtUnauthorizedHandlerEntryPoint)\n \t.and()\n\t\t.authorizeRequests()\n\t\t\t\t.antMatchers(\"/\",\n \"/favicon.ico\",\n \"/**/*.png\",\n \"/**/*.gif\",\n \"/**/*.svg\",\n \"/**/*.jpg\",\n \"/**/*.html\",\n \"/**/*.css\",\n \"/**/*.js\",\n \"/error\", \n \"/webjars/**\").permitAll()\n\t\t\t\t.antMatchers(\"/app/**\").permitAll()\n\t\t\t.anyRequest().authenticated()\n\t\t\t.and()\n\t\t\t.logout()\n\t\t\t\t.logoutSuccessUrl(\"/logout\").permitAll()\n\t\t\t.and()\n\t\t\t.oauth2Login()\n\t\t\t\t.authorizationEndpoint()\n\t\t\t\t.baseUri(\"/oauth2/authorize/\")\n\t\t\t\t.authorizationRequestRepository(customAuthorizationRequestRepository)\n\t\t\t\t.and()\n\t\t\t.userInfoEndpoint()\n\t\t\t\t.userService(customOauth2UserService)\n\t\t\t\t.and()\n .redirectionEndpoint()\n \t.baseUri(\"/oauth2/callback/*\")\n \t.and()\n .successHandler(customAuthenticationSuccessHandler)\n .failureHandler(customAuthenticationFailureHandler)\n .and()\n .addFilterBefore(jwtfilt , UsernamePasswordAuthenticationFilter.class );\n \n \n//\t\t\t.failureHandler((request, response, exception) -> {\n//\t\t\t request.getSession().setAttribute(\"error.message\", exception.getMessage());\n//\t\t\t authenticationFailureHandler.onAuthenticationFailure(request, response, exception);\n// })\n//\t\t\t\t.authorizationEndpoint()\n//\t\t\t\t\t.baseUri(\"/oauth2/authorize\")\n//\t\t\t\t\t.and()\n//\t\t\t\t.redirectionEndpoint()\n//\t\t\t\t\t.baseUri(\"/oauth2/callback/*\")\n//\t\t\t\t\t.and()\n//\t\t\t\t.userInfoEndpoint()\n//\t\t\t\t\t.userService(oauth2UserService)\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t}", "protected void configure(HttpSecurity http) throws Exception {\n\n\t\thttp\n\t\t\t\t// .csrf().disable()\n\t\t\t\t.csrf().disable().headers().frameOptions().disable()\n\t\t\t\t// .authorizeRequests()\n\t\t\t\t// .antMatchers(\"*/xomeq/login*\")\n\t\t\t\t// .anonymous()\n\t\t\t\t// .and()\n\t\t\t\t.authorizeRequests().antMatchers(\"/public/**\").permitAll().antMatchers(\"/login*\").permitAll() // Para\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// poder\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// cambiar\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// el\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// lenguaje\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// en\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// el\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// login\n\t\t\t\t// .antMatchers(\"/**\").authenticated()\n\t\t\t\t.and().formLogin().loginPage(\"/login\").failureUrl(\"/login?error=true\").successHandler(successHandler())\n\t\t\t\t// .loginProcessingUrl(\"/rest/login\")\n\t\t\t\t// .defaultSuccessUrl(\"/genome\",true)\n\t\t\t\t.permitAll()\n\n\t\t\t\t// .failureHandler(authenticationFailureHandler)\n\t\t\t\t.and().logout()\n\t\t\t\t// .logoutSuccessUrl(\"/\")\n\t\t\t\t.permitAll();\n\t}", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n http\n .csrf().disable()\n .cors().disable()\n .authorizeRequests()\n .antMatchers(\"/**\").permitAll()\n .anyRequest().authenticated()\n .and()\n .anonymous()\n .and()\n .servletApi()\n .and()\n .exceptionHandling()\n .authenticationEntryPoint(new Http403ForbiddenEntryPoint())\n .and()\n .headers()\n .cacheControl()\n\n ;\n\n http.addFilterBefore(statelessAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n\n http.csrf().disable().cors().and().authorizeRequests().anyRequest().authenticated().and().httpBasic(); //csrf().disable()\n\n }", "@Override\n\t// This method configure the HttpSecurity object\n\tprotected void configure(HttpSecurity http) throws Exception {\n\t\thttp.authorizeRequests().\n\t\t/* antMatchers(\"/**\"). */\n\t\t\t\tantMatchers(PUBLIC_MATCHERS).permitAll().anyRequest().authenticated();\n\n\t\t// Cross-site request forgery\n\t\thttp.csrf().disable()\n\t\t\t\t// Cross-Origin Resource Sharing\n\t\t\t\t.cors().disable().\n\t\t\t\t// Here is a login form\n\t\t\t\t// Here Spring check the login and pwd if it success it redirect us to \"/\" with\n\t\t\t\t// the \"authenticated\" label and show us the \"Logout\" navbar because we are\n\t\t\t\t// authenticated otherwise it redirect us to the \"/login\" in case of wrong url\n\t\t\t\t// or \"/login?error\" in case of wrong login and pwd\n\t\t\t\tformLogin().failureUrl(\"/login?error\").defaultSuccessUrl(\"/\").loginPage(\"/login\").permitAll().\n\n\t\t\t\tand()\n\t\t\t\t// Here it specifies where to beredirected and how when the user log out\n\t\t\t\t// To access a request parameter Thymeleaf use the \"param\" variable\n\t\t\t\t.logout().logoutRequestMatcher(new AntPathRequestMatcher(\"/logout\")).logoutSuccessUrl(\"/login?logout\")\n\t\t\t\t.deleteCookies(\"remember-me\").permitAll().and().rememberMe();\n\t}", "@RequestMapping(\"/login\")\n\tpublic String login() {\n\t\tconfig.output();\n\t\tAuthentication auth = SecurityContextHolder.getContext().getAuthentication();\n\t\tif (auth instanceof AnonymousAuthenticationToken) {\n\t\t\treturn \"login\";\n\t\t} else {\n\t\t\treturn \"home\"; \n\t\t}\n\t}", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\r\n\tpublic ModelAndView login() {\r\n\t\treturn new ModelAndView(\"admin/login\");\r\n\t}", "protected void configure(HttpSecurity http) throws Exception {\n\t\tsuper.configure(http);\n\t\thttp.authorizeRequests()\n\t\t.antMatchers(\"/user/add**\").hasAuthority(\"ROLE_ADD_PERMISSION\")\n\t\t.antMatchers(HttpMethod.POST,\"/user/edit**\").hasAnyAuthority(\"ROLE_ADD_PERMISSION\",\"ROLE_EDIT_PERMISSION\")\n\t\t.antMatchers(HttpMethod.DELETE, \"/user/user**\").hasAuthority(\"ROLE_DELETE_PERMISSION\")\n\t\t.antMatchers(HttpMethod.GET,\"/user/user**\").hasAnyAuthority(\"ROLE_READ_PERMISSION\")\n\t\t.antMatchers(\"/user/me\").permitAll()\n\t\t.and()\n\t\t.csrf().disable();\n\t}", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n http.authorizeRequests().anyRequest().fullyAuthenticated();\n http.httpBasic();\n http.csrf().disable();\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n http.cors().and().csrf().disable()\n .exceptionHandling().authenticationEntryPoint(jwtAuthenticationEntryPoint)\n .and()\n .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)\n .and()\n .authorizeRequests().antMatchers(\"/users\", \"/session\").permitAll()\n .anyRequest().authenticated()\n .and()\n .addFilter(jwtAuthenticationFilter());\n }", "@Override\n public void onAuthenticationSuccess(HttpServletRequest httpServletRequest,\n HttpServletResponse httpServletResponse,\n Authentication authentication)\n throws IOException, ServletException {\n HttpSession httpSession = httpServletRequest.getSession();\n httpSession.setMaxInactiveInterval(50000);\n\n\n\n\n System.out.println(\"Jab Ban: \" + httpServletRequest.getSession().getAttribute(\"EHAN_REDIRECT_URI\"));\n\n\n String redirectURI = (String) httpServletRequest.getSession().getAttribute(\"EHAN_REDIRECT_URI\");\n\n if (redirectURI == null)\n redirectURI = \"/\";\n\n\n for (GrantedAuthority grantedAuthority:\n authentication.getAuthorities()) {\n\n System.out.println(grantedAuthority.getAuthority());\n\n System.out.println(\"==============getDetails================\");\n System.out.println(authentication.getDetails());\n System.out.println(\"==============getPrincipal================\");\n System.out.println(authentication.getPrincipal());\n System.out.println(\"==============getCredentials================\");\n System.out.println(authentication.getCredentials());\n System.out.println(\"===============getAuthorities===============\");\n System.out.println(authentication.getAuthorities());\n System.out.println(\"===============getName===============\");\n System.out.println(authentication.getName());\n\n\n if (grantedAuthority.getAuthority().equals(\"ROLE_ADMIN\")) {\n redirectURI = \"/admin\";\n break;\n }\n else if (grantedAuthority.getAuthority().equals(\"ROLE_DBA\")) {\n redirectURI = \"/dba\";\n break;\n }\n else if (grantedAuthority.getAuthority().equals(\"ROLE_USER\")) {\n redirectURI = \"/user\";\n break;\n }\n \n }\n\n httpServletResponse.sendRedirect(redirectURI);\n\n }", "@Override\n\tpublic void configure(HttpSecurity http) throws Exception {\n\t\thttp\n\t\t.authorizeRequests()\n\t\t\t.antMatchers(\"/info.html\").permitAll()\n\t\t.and().antMatcher(\"/oma/**\").addFilterBefore(authConf.getReqAuthFilter(), BasicAuthenticationFilter.class)\n\t\t\t.authenticationProvider(authProv)\n\t\t\t.authorizeRequests().antMatchers(\"/oma/**\").authenticated()\n\t\t.and().authorizeRequests()\n\t\t\t.anyRequest().denyAll();\n\t}", "@Override\n public void configure(final WebSecurity web) throws Exception {\n web.ignoring()\n .antMatchers(HttpMethod.OPTIONS, \"/**\")\n .antMatchers(HttpMethod.POST, \"/api/v1/user\")\n .antMatchers(HttpMethod.GET, \"/api/v1/*/public**\")\n .antMatchers(HttpMethod.GET, \"/api/v1/*/public/**\");\n }", "@Override\r\n\tprotected void configure(HttpSecurity http) throws Exception {\r\n\t\thttp.csrf().disable() // Disable csrf for REST API\r\n\t\t\t\t.authorizeRequests()\r\n\t\t\t\t.antMatchers(HttpMethod.POST, SIGN_UP_URL).permitAll() // permit without authentication\r\n\t\t\t\t.antMatchers(HttpMethod.POST, SecurityConstants.FEEDBACK_URL).permitAll()\r\n\t\t\t\t.antMatchers(HttpMethod.GET, SecurityConstants.FEEDBACK_URL).permitAll()\r\n\t\t\t\t.antMatchers(\"/v2/api-docs\",\r\n \"/configuration/ui\",\r\n \"/swagger-resources/**\",\r\n \"/configuration/security\",\r\n \"/swagger-ui.html\",\r\n \"/webjars/**\").permitAll()\r\n\t\t\t\t.anyRequest() // for any other request\r\n\t\t\t\t.authenticated() // do authentication\r\n\t\t\t\t.and().addFilter(getAuthenticaitonFilter()) // Add Authentication Filter\r\n\t\t\t\t.addFilter(new AuthorizationFilter(authenticationManager(), userRepository)).sessionManagement()\r\n\t\t\t\t.sessionCreationPolicy(SessionCreationPolicy.STATELESS);\r\n\t}", "@Override\r\n public void configure(WebSecurity web) throws Exception {\r\n web.ignoring().antMatchers(HttpMethod.OPTIONS, \"/**\");\r\n }", "@GetMapping(\"/login\")\n public String viewLoginPage() {\n\n return \"login/login\";\n }", "@RequestMapping(value = \"/login\", method = GET)\r\n\tpublic String login() {\r\n\t\treturn \"admin/login\";\r\n\t}", "@Override\n public void configure(WebSecurity web) throws Exception {\n web.ignoring().antMatchers(\"/v2/api-docs\", \"/configuration/ui\", \"/swagger-resources\",\n \"/configuration/security\", \"/swagger-ui.html\", \"/webjars/**\", \"/v2/swagger.json\");\n }", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\tpublic String loginPage(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tif (isCurrentAuthenticationAnonymous()) {\r\n\t\t\treturn \"login\";\r\n\t\t} else {\r\n\t\t\treturn \"redirect:/list\";\r\n\t\t}\r\n\t}", "@RequestMapping(\"/login\")\n public String login(Model model){\n model.addAttribute(\"categories\", categoryRepository.findAll());\n return \"login\";\n }", "@RequestMapping(\"login\")\r\n\tpublic String loginUser() {\n\t\treturn \"login\";\r\n\t}", "@RequestMapping(\"/admin\")\n public String admin() {\n \t//当前用户凭证\n\t\tSeller principal = (Seller)SecurityUtils.getSubject().getPrincipal();\n\t\tSystem.out.println(\"拿取用户凭证\"+principal);\n return \"index管理员\";\n\n }", "@GetMapping(value = \"/\")\n public String indexLoginLogout(@RequestParam(value = \"error\", required = false) String error,\n @RequestParam(value = \"logout\", required = false) String logout,\n Model model, HttpServletRequest request) throws WebException{\n model.addAttribute(\"error\", error != null);\n model.addAttribute(\"logout\", logout != null);\n model.addAttribute(\"date\", new Date());\n String login = SecurityContextHolder.getContext().getAuthentication().getName();\n model.addAttribute(\"login\", login);\n String role = String.valueOf(model.asMap().get(\"role\"));\n if((role != null) && !(role.equals(\"null\"))) {\n try {\n //putting userId into to session!!!!!!\n long userId = userService.findByLogin(login).getId();\n request.getSession(true).setAttribute(\"user_id\", userId);\n if (role.matches(\"CLIENT\")) {\n return \"redirect:/market/user/usermain\";\n } else if (role.matches(\"ADMIN\")) {\n return \"redirect:/market/admin/adminmain\";\n }\n } catch (ServiceException e) {\n throw new WebException(e);\n }\n }\n return \"index\";\n }", "@Override\n protected void configure(HttpSecurity http) throws Exception {\n http.csrf().disable();\n\n // Allow GET-Requests on *all* URLs (Frontend will handle 404 and permission)\n // except paths under \"/v1\" (because that's where the backend is reachable)\n // but allow the login, setup and password reset endpoints\n // Deny the other HTTP methods on all paths\n http.authorizeRequests()\n .antMatchers(HttpMethod.POST, \"/v1/login/**\", \"/v1/setup\").permitAll()\n .antMatchers(HttpMethod.GET, \"/v1/login/requestPasswordReset/**\", \"/v1/login/resetPassword/**\").permitAll()\n .antMatchers(\"/v1/**\").authenticated()\n .antMatchers(HttpMethod.GET).permitAll()\n .anyRequest().denyAll();\n\n http.addFilter(getJWTAuthenticationFilter(authenticationManager()))\n .addFilter(new JWTAuthorizationFilter(authenticationManager(), configuration))\n .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);\n\n http.exceptionHandling()\n .authenticationEntryPoint(new HttpStatusEntryPoint(HttpStatus.UNAUTHORIZED));\n }", "@Override\n\tprotected void configure(HttpSecurity security) throws Exception{\n\t\t\n\t\tsecurity.authorizeRequests()\n\t\t\t.antMatchers(\"/\").permitAll()\n\t\t\t.antMatchers(\"/member/**\").fullyAuthenticated()\n\t\t\t.antMatchers(\"/manager/**\").hasRole(\"MANAGER\")\n\t\t\t.antMatchers(\"/admin/**\").hasRole(\"ADMIN\");\n\t\t\n\t\tsecurity.csrf().disable();\n//\t\tsecurity.formLogin();\n\t\tsecurity.formLogin().loginPage(\"/login\").defaultSuccessUrl(\"/loginSuccess\", true);\n\t\tsecurity.exceptionHandling().accessDeniedPage(\"/accessDenied\");\n\t\tsecurity.logout().invalidateHttpSession(true).logoutSuccessUrl(\"/login\");\n\t\t\n\t\tsecurity.userDetailsService(boardUserDetailService);\n\t}", "@PreAuthorize(\"hasRole('ADMIN')\")\n public ProductDto retrieveAuthorizedProducts() { \n return new ProductDto(\"1\", \"iPhone\", 999.99f);\n }", "@Override \n\t\t public void postHandle(HttpServletRequest request, HttpServletResponse response, \n\t\t Object object, ModelAndView modelAndView) throws Exception {\n\t\t\t List<String> exclusionsScreens = (List<String>) request.getSession(true).getAttribute(\"exclusionesScreens\");\n\t\t\t System.out.println(\"exclusionsScreens: \"+exclusionsScreens+\" view: \"+modelAndView.getViewName());\n\t\t\t if (null==exclusionsScreens && !\"login\".equalsIgnoreCase(modelAndView.getViewName())){\n\t\t\t\n\t\t\t\t System.out.println(\"Usuario No logueado o la session ha caducado\");\n\t\t\t\t throw new RestrictedPageException(\"Favor de loguearse\");\n\t\t\t \n\t\t\t\t }else if(null!=exclusionsScreens && exclusionsScreens.contains(modelAndView.getViewName())){\n\t\t\t\t\t System.out.println(\"no tiene acceso!!!!!! a la pagina: \"+request.getRequestURL().toString());\n\t\t\t\t\t //response.sendRedirect(\"/sanantial/forbidden\");\n\t\t\t\t\t throw new RestrictedPageException(\"No tiene acceso a la pagina solicitada\");\n\t\t\t\t }\n\t\t\t\t \n\t\t\t \n\t\t }", "@GetMapping(value={\"/login\"})\n public String login(){\n return \"login\";\n }", "@RequestMapping(value = \"/403\", method = RequestMethod.GET)\n \tpublic ModelAndView accesssDenied() {\n\n \t ModelAndView model = new ModelAndView();\n \t\t\n \t //check if user is login\n \t Authentication auth = SecurityContextHolder.getContext().getAuthentication();\n \t if (!(auth instanceof AnonymousAuthenticationToken)) {\n \t\tUserDetails userDetail = (UserDetails) auth.getPrincipal();\t\n \t\tmodel.addObject(\"username\", userDetail.getUsername());\n \t }\n \t\t\n \t model.setViewName(\"403\");\n \t return model;\n\n \t}", "@PostMapping(\"/login\") //method handles POST requests with this path (login)\n public ResponseEntity<?> authenticateUser(@Valid @RequestBody LoginRequest loginRequest) {\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(loginRequest.getUsername(), loginRequest.getPassword()));\n\n // update the SecurityContext\n SecurityContextHolder.getContext().setAuthentication(authentication);\n\n // generate JWT token\n String jwt = jwtUtils.generateJwtToken(authentication);\n\n // get UserDetails\n UserDetailsImpl userDetails = (UserDetailsImpl) authentication.getPrincipal();\n List<String> roles = userDetails.getAuthorities().stream()\n .map(GrantedAuthority::getAuthority)\n .collect(Collectors.toList());\n\n // return response with JWT token and UserDetails\n return ResponseEntity.ok(new JwtResponse(jwt,\n userDetails.getId(),\n userDetails.getUsername(),\n userDetails.getEmail(),\n roles,\n userDetails.getCategory()\n ));\n }", "@Override\n public void configure(WebSecurity web) throws Exception {\n web.ignoring().antMatchers(\"/v2/api-docs\")//\n .antMatchers(\"/swagger-resources/**\")//\n .antMatchers(\"/swagger-ui.html\")//\n .antMatchers(\"/configuration/**\")//\n .antMatchers(\"/webjars/**\")//\n .antMatchers(\"/public\")\n \n // Un-secure H2 Database (for testing purposes, H2 console shouldn't be unprotected in production)\n .and()\n .ignoring()\n .antMatchers(\"/h2-console/**/**\");;\n }", "@Override\n public void onAuthenticationSuccess(HttpServletRequest httpServletRequest,\n HttpServletResponse httpServletResponse,\n Authentication authentication) throws IOException, ServletException {\n httpServletResponse.setStatus(HttpServletResponse.SC_OK);\n\n for (GrantedAuthority auth : authentication.getAuthorities()) {\n if (\"ADMIN\".equals(auth.getAuthority())) {\n httpServletResponse.sendRedirect(\"/dashboard\");\n }\n }\n }", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n public String login(Principal principal) { \n return principal == null ? \"login\" : \"index\";\n }", "@RequestMapping(value=\"/\" , method = RequestMethod.GET)\n public ModelAndView welcome_login(){\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n String currentUserName = authentication.getName();\n\n UserEntity userEntity= iUserService.findUserByCurrentUserName(currentUserName);\n ModelAndView welcome = new ModelAndView(\"welcome\");\n welcome.getModel().put(\"currentUserName\", currentUserName);\n welcome.getModel().put(\"userEntity\", userEntity);\n\n return welcome;\n }", "@Override\n\t public void configure(HttpSecurity http) throws Exception {\n\t\t http.requestMatchers()\n\t\t\t.antMatchers(\"/api/**\")\n\t\t\t.and() \n\t\t\t.authorizeRequests()\n\t\t\t.antMatchers(\"/api/guest/**\").permitAll()\n\t\t\t.antMatchers(\"/oauth/token\").permitAll()\n\t\t \t.anyRequest().authenticated()\n\t\t \t.and()\n\t\t \t.exceptionHandling().accessDeniedHandler(new OAuth2AccessDeniedHandler());\n\t }", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n public ModelAndView login() {\n ModelAndView modelAndView = new ModelAndView();\n modelAndView.setViewName(\"user/login\");\n return modelAndView;\n }" ]
[ "0.80845", "0.80526006", "0.76551986", "0.76231056", "0.759509", "0.742309", "0.73179084", "0.7288372", "0.72838706", "0.71776384", "0.70928216", "0.70344007", "0.69964015", "0.6980794", "0.69712406", "0.6941467", "0.6898145", "0.6896896", "0.687533", "0.68208617", "0.6819552", "0.67507374", "0.6744837", "0.6654091", "0.6629801", "0.66295576", "0.65735143", "0.65714025", "0.6559949", "0.65568393", "0.6552389", "0.6546689", "0.6544813", "0.6527827", "0.65256023", "0.6518055", "0.6513309", "0.6499847", "0.6442794", "0.6405528", "0.63912064", "0.63650143", "0.63490516", "0.63428026", "0.63018775", "0.62940276", "0.6271398", "0.6266504", "0.6243791", "0.6243164", "0.6239819", "0.6231015", "0.61911863", "0.61439544", "0.6132846", "0.6119531", "0.61097676", "0.6098445", "0.6096516", "0.609192", "0.6085316", "0.60788304", "0.603763", "0.60316855", "0.60011816", "0.5995966", "0.5993214", "0.5983784", "0.5964413", "0.5953632", "0.59354573", "0.5928166", "0.58931375", "0.58875567", "0.5883086", "0.58778805", "0.58761376", "0.58632594", "0.585065", "0.5839449", "0.5828208", "0.58088243", "0.5803376", "0.5798465", "0.5792939", "0.5789991", "0.5785519", "0.57634753", "0.5760414", "0.57520986", "0.57498", "0.5739002", "0.57356", "0.5729107", "0.57093054", "0.57060754", "0.5693638", "0.56934786", "0.5685083", "0.56846017" ]
0.78940505
2
Displays the details of the order
private String getOrderDetails(Order order) { String message = getString(R.string.total) + "\n" + getString(R.string.name) + ": " + order.getCustomerName() + "\n" + getString(R.string.add_cream) + "? " + String.valueOf(order.isHasWhippedCream()) + "\n" + getString(R.string.add_chocolate) + "? " + String.valueOf(order.isHasChocolate()) + "\n" + getString(R.string.quantity) + ": " + order.getCupsNumber() + "\n" + getString(R.string.resut) + ": $" + MainActivity.calculatePrice(order) + "\n" + getString(R.string.thanks) + "!"; return message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void viewOrderDetails(){\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"StatisticsTab\"), \"StatisticsTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"OrdersTab\"), \"OrdersTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"BtnOrderDetails\"), \"Order Details Button\");\t\n\t}", "public void displayOrder(Order order) {\n ProductType productType;\n// State state;\n \n productType = order.getProductType();\n// state = order.getState();\n \n ui.say(\n \"Customer Name: \" + order.getCustomerName() + \"\\n\" +\n \"State: \" + order.getState().getName() + \"\\n\" + \n \"Product Type: \" + productType.getName() + \"\\n\" +\n \"Area: \" + order.getArea()+ \" sq ft\\n\" + \n// \"Material Cost Per Square Foot: $\" + productType.getMaterialCostPerSquareFoot() + \"\\n\" +\n \"Material Cost: $\" + order.getMaterialCost() + \"\\n\" +\n// \"Labor Cost Per Square Foot: $\" + productType.getLaborCostPerSquareFoot() + \"\\n\" +\n \"Labor Cost: $\" + order.getLaborCost() + \"\\n\" + \n// \"Tax Rate: \" + state.getTaxRate() + \"\\n\" +\n \"Tax: $\" + order.getTax() + \"\\n\" +\n \"Total: $\" + order.getTotal() \n );\n }", "private void showOrderDetails(Order order) {\n\t\tString status, shownOption;\n\n\t\tif (order.getStatus()) {\n\t\t\tstatus = new String();\n\t\t\tstatus = \"Processed\";\n\n\t\t\tshownOption = new String();\n\t\t\tshownOption = \"Return\";\n\t\t}\n\t\telse {\n\t\t\tstatus = new String();\n\t\t\tshownOption = new String();\n\n\t\t\tstatus = \"Pending\";\n\t\t\tshownOption = \"Set Processed\";\n\t\t}\n\n\t\tString orderDetailsMessage = \"ORDER DATE : \" + order.getDate();\n\t\torderDetailsMessage += \"\\nSTATUS: \" + status;\n\t\torderDetailsMessage += \"\\nITEMS: \";\n\t\tfor (StockItem stockItem : order.getOrderEntryList()) {\n\t\t\torderDetailsMessage += \"\\n \" + stockItem.getQuantity() + \" \\t x \\t \"\n\t\t\t\t\t+ stockItem.getProduct().getProductName() + \" \\t\\t\\t Subtotal: \\t\\u20ac\"\n\t\t\t\t\t+ (stockItem.getProduct().getRetailPrice() * stockItem.getQuantity());\n\t\t}\n\n\t\torderDetailsMessage += \"\\n\\nCUSTOMER ID: \" + order.getPerson().getId()\n\t\t\t\t+ \"\\nPersonal Details: \";\n\t\torderDetailsMessage += \"\\n Name: \\t\" + order.getPerson().getName();\n\t\torderDetailsMessage += \"\\n Phone: \\t\" + order.getPerson().getContactNumber();\n\t\torderDetailsMessage += \"\\n Address: \\t\" + order.getPerson().getAddress();\n\t\torderDetailsMessage += \"\\n\\nThe total order value is \\t\\u20ac\"\n\t\t\t\t+ order.getGrandTotalOfOrder() + \"\\n\";\n\n\t\tObject[] options = { \"OK\", shownOption };\n\t\tint n = JOptionPane.showOptionDialog(null, orderDetailsMessage, \"ORDER ID: \"\n\t\t\t\t+ (order.getId()) + \" STAFF ID: \" + order.getCurrentlyLoggedInStaff().getId()\n\t\t\t\t+ \" STATUS : \" + status /* order.isStatus() */, JOptionPane.YES_NO_OPTION,\n\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, options, options[0]);\n\t\tif (n == 1) {\n\t\t\torder.setStatus(true);\n\t\t}\n\t}", "public void display() {\n System.out.println(\"Displaying Order properties:\\n Order ID number: \" + getOrderID() + \"\\n Customer ID Number: \" + getCustomerID() + \"\\n Order Status: \" + getStatus());\n }", "public static void viewOrder() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Viewing existing orders************\");\n\t\t// TODO - implement RRPSS.viewOrder\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\t\tOrderedPackageManager orderedPackageManager = new OrderedPackageManager();\n\t\tList listOfOrderedPromotionalPackage = null;\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to view the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tlistOfOrderedItems = orderedItemManager\n\t\t\t\t\t.retrieveOrderedItemsByOrderID(order.getId());\n\t\t\tlistOfOrderedPromotionalPackage = orderedPackageManager\n\t\t\t\t\t.retrieveOrderedPackageByOrderID(order.getId());\n\n\t\t\tif (listOfOrderedItems.size() == 0\n\t\t\t\t\t&& listOfOrderedPromotionalPackage.size() == 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\tSystem.out.println(\"Order is empty!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tif (listOfOrderedItems.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"All Cart Items Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedItems.size(); j++) {\n\t\t\t\t\tOrderedItem orderedItem = (OrderedItem) listOfOrderedItems\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedItem.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\n\t\t\tif (listOfOrderedPromotionalPackage.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"Promotional Packages Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedPromotionalPackage.size(); j++) {\n\t\t\t\t\tOrderedPackage orderedPackage = (OrderedPackage) listOfOrderedPromotionalPackage\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedPackage.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of viewing orders************\");\n\t}", "private void requestOrderDetail() {\n\n ModelHandler.OrderRequestor.requestOrderDetail(client, mViewData.getOrder().getId(), (order) -> {\n mViewData.setOrder(order);\n onViewDataChanged();\n }, this::showErrorMessage);\n }", "public void view() {\n\t\t\t\n\t\t\tSystem.out.println(\"Poping up window to show each order of customer @ AdminSaleController\");\n\t\t\tCustomerOrderMain vo = new CustomerOrderMain();\n\t\t vo.start(ps);\n\t\t\t\n\t\t}", "void showOrderText(int ID) throws OrderNotFoundException;", "public void showCustomerOrders() {\n\t\ttextArea.setText(\"\");\n\t\tfor (int i = 0; i < driver.getOrderDB().getCustomerOrderList().size(); i++) {\n\t\t\tOrder order = (driver.getOrderDB().getCustomerOrderList().get(i));\n\t\t\ttextArea.append(\"Order \" + order.getId() + \" was created by \"\n\t\t\t\t\t+ order.getCurrentlyLoggedInStaff().getName() + \"\\nCustomer ID : \"\n\t\t\t\t\t+ ((Customer) order.getPerson()).getId() + \"\\nItems in this order :\");\n\t\t\tfor (int j = 0; j < order.getOrderEntryList().size(); j++) {\n\t\t\t\tStockItem stockItem = order.getOrderEntryList().get(j);\n\t\t\t\ttextArea.append(\"\\n \" + stockItem.getQuantity() + \" \"\n\t\t\t\t\t\t+ stockItem.getProduct().getProductName() + \" \"\n\t\t\t\t\t\t+ (stockItem.getProduct().getRetailPrice() * stockItem.getQuantity()));\n\t\t\t}\n\t\t\ttextArea.append(\"\\nThe total order value is \" + order.getGrandTotalOfOrder() + \"\\n\\n\\n\");\n\t\t}\n\t}", "void showOrdersText();", "@SuppressWarnings(\"Duplicates\")\n private double printOrderDetails(@NotNull Order o) {\n printHeader(\"Order #\" + o.getOrderID() + \"\", 60);\n System.out.println(\"Order ID: \" + o.getOrderID());\n System.out.println(\"Order State: \" + ((o.getOrderState() == Order.OrderState.ORDER_PAID) ? \"Paid\" : \"Unpaid\"));\n System.out.println(\"Order Started On: \" + DateTimeFormatHelper.formatMillisToDateTime(o.getCreatedAt()));\n System.out.println(\"Staff Handling Order: \" + ((o.getStaff() == null) ? \"Unknown Staff\" : \"[\" + o.getStaff().getStaffId() + \"] \" + o.getStaff().getStaffName()));\n System.out.println(\"Table Number: \" + ((o.getTable() == null) ? \"Unknown Table\" : o.getTable().getTableNum()));\n System.out.println(\"List of Order Items:\");\n printBreaks(60);\n if (o.getOrderItems().size() == 0) System.out.println(\"No Items in Order\");\n else {\n o.calculateSubtotal(); // Calculate Subtotal\n OrderMenuUI.printOrderItems(o.getOrderItems(), true);\n }\n printBreaks(60);\n // Do final caclulation\n o.calculateSubtotal();\n double tax = 0.07 * o.getSubtotal();\n double total = tax + o.getSubtotal();\n System.out.printf(\"%50s $%-6.2f\\n\", \"Order Subtotal: \", o.getSubtotal());\n System.out.printf(\"%50s $%-6.2f\\n\", \"GST (7%): \", tax);\n printBreaks(60);\n System.out.printf(\"%50s $%-6.2f\\n\", \"Total: \", total);\n printBreaks(60);\n System.out.println(\"\\n\");\n return total;\n }", "public void showOrderGui(int ID) throws OrderNotFoundException;", "@RequestMapping(value = \"/orders\")\r\n\tpublic ModelAndView openOrdersPage() {\r\n\t\tList<Order> orders = databaseInfo.selectOrders();\r\n\r\n\t\treturn new ModelAndView(\"orders\", \"orderslist\", orders);\r\n\t}", "public void listOrders() {\n\t\tSystem.out.println(\"\\nMostrant tots els orders\");\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.peek(System.out::println)\n\t\t\t.flatMap(o -> o.getDetails().stream())\n\t\t\t.forEach(System.out::println);\n\t}", "private void printCreateOrderMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Opret Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Tilføj Medarbejder\");\n System.out.println(\"(2) Tilføj Kunde\");\n System.out.println(\"(3) Tilføj Produkt\");\n System.out.println(\"(4) Bekræft\");\n System.out.print(\"Valg: \");\n }", "public String displayDetails()\n\t{\n\t\tString displayDetail = \"\";\n\t\t \n\t\tdisplayDetail = (\"Make of your System\\t\\t=>\\t\" + make + \n\t\t\t\t\t\t\"\\nModel of your System\\t\\t=>\\t\" + model + \n\t\t\t\t\t\t\"\\nSpeed of your System\\t\\t=>\\t\" + speed + \n\t\t\t\t\t\t\"\\nMemory of your System\\t\\t=>\\t\" + memorySize + \" MB \" +\n\t\t\t\t\t\t\"\\nHard Disk of your System\\t=>\\t\" + hardDiskSize + \" GB \" +\n\t\t\t\t\t\t\"\\nPurchase Cost of your System\\t=>\\t\" + purchaseCost);\n\t\t\n\t\treturn displayDetail;\n\t}", "@GetMapping(\"/order\")\n\t public String getAllOrders() {\n\t \tList<Order> orders = oService.getAllOrers();\n\t StringBuffer ordertext = new StringBuffer();\n\t orders.parallelStream().forEach(ord->{\n\t \t ordertext.append(\"<tr><td>\"+ord.getOrdid()+\"</td>\") ;\n\t ordertext.append(\"<td><span class=\\\"badge badge-secondary\\\">\"+ord.getPaymentstatus()\n\t +\"</span></td>\") ;\n\t ordertext.append(\"<td>\"+ord.getPaymentgroup()+\"</td>\") ; \n\t ordertext.append(\"<td><span class=\\\"badge badge-success\\\">\"+ord.getOrdstatus()+\"</span></td>\");\n\t ordertext.append(\"<td>\"+ord.getOrderdate()+\"</td>\") ;\n\t ordertext.append(\"<td>\"+ord.getTotal()+\"</td>\") ;\n\t ordertext.append(\"<td><span class=\\\"fa fa-eye\\\" style=\\\"cursor:pointer;\\\" onclick=\\\"showprd('\"+ord.getOrdid()+\"')\\\" title=\\\"view details\\\"> </span>\") ;\n\t ordertext.append(\"<span class=\\\"fa fa-remove\\\" style=\\\"cursor:pointer;\\\" onclick=\\\"\\\" title=\\\"cancel\\\"></span></td>\") ;\n\t });\n\t return ordertext.toString() ;\n\t }", "public void printOrderItem(){\r\n\t\tSystem.out.print(this.quantity+\" x \"+this.menuItem.getName()+\" ---- \");\r\n\t\tSystem.out.printf(\"$%.2f\\n\",this.calculatePrice());\r\n\t}", "public String displayOrderList(){\r\n // display = addFood() + \"\\n\" + addDrink() + \"\\n\" + addDessert();\r\n ArrayList<String> output = new ArrayList<>(); \r\n for(int i =0; i < allOrder.size(); i++){\r\n output.add(allOrder.get(i));\r\n }\r\n return String.valueOf(output);\r\n }", "private String displayOrder(int number) {\n TextView priceTextView = (TextView) findViewById(R.id.order_summary_text_view);\n EditText myNameText = (EditText) findViewById(R.id.enter_name_view);\n myName = myNameText.getText().toString();\n\n String message = \"Name: \" + myName + \"\\n\" +\n \"Add whipped cream? \" + myCheckedStateWhipped + \"\\n\"+\n \"Add chocolate? \" + myCheckedStateChocolate + \"\\n\"+\n \"Quantity: \" + myQuantity + \"\\n\" +\n \"Total: \" + NumberFormat.getCurrencyInstance().format(number) +\"\\n\";\n priceTextView.setText(message);\n\n return message;\n }", "public List getOrderDetails(OrderDetail orderDetail);", "@Override\n public void onClick(View v) {\n CommonUtils.sendMsg(\"获取订单详情\", DeliveryActivity.SHOW_LOADING_TEXT, handler);\n\n ApisManager.getOrderDetailInfoByOrderId(odi.order_id, new ApiCallback() {\n @Override\n public void success(Object object) {\n CommonUtils.sendMsg(\"\", DeliveryActivity.HIDE_LOADING, handler);\n OrderDetailInfo odi = new OrderDetailInfo();\n JSONObject obj = (JSONObject) object;\n JSONObject objSO = obj.getJSONObject(\"store_order\");\n StoreOrder so = com.alibaba.fastjson.JSONObject.parseObject(CommonUtils.converBooleanToInt(objSO.toString()), StoreOrder.class);\n odi.store_order = so;\n odi.take_serial_number = so.take_serial_number;\n odi.list_charge_items_all = so.order_items;\n\n Message msg = new Message();\n msg.what = DeliveryActivity.SHOW_ORDER_DETAIL_INFO;\n msg.obj = odi;\n handler.sendMessage(msg);\n }\n\n @Override\n public void error(BaseApi.ApiResponse response) {\n CommonUtils.sendMsg(\"\", DeliveryActivity.HIDE_LOADING, handler);\n CommonUtils.sendMsg(response.error_message, DeliveryActivity.SHOW_ERROR_MESSAGE, handler);\n }\n });\n\n }", "public void display() {\r\n System.out.println(\" Cart Information \" + System.lineSeparator() +\r\n \"=========================\" + System.lineSeparator() +\r\n \"Customer ID: \" + getCustID() + System.lineSeparator() + \r\n \"Cart Total: \" + getTotal()+ System.lineSeparator());\r\n items.display();\r\n }", "public String showCurrentOrder(){\n stringBuilder = new StringBuilder();\n for (int i = 0; i < OrderManager.getInstance().getOrder().size(); i++) {\n stringBuilder.append((i + 1) + \". \" + OrderManager.getInstance().getOrder().get(i).toString() + \"\\n\");\n }\n return stringBuilder.toString();\n }", "public void display() {\n \t\tSystem.out.printf(\"|%6s \", String.valueOf(idNumber));\n\t\tSystem.out.printf(\"|%13s |\", name);\n\t\tSystem.out.printf(\"%10s |\", quantity);\n\t\tSystem.out.printf(\"%8.2f |\", price);\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.printf(\"%16s |\", \" \");\n\t\tSystem.out.println();\n }", "public String getAmountOrderDetailPage()\n\t{\n\t\twaitForVisibility(amountOnDetailPage);\n\t\treturn amountOnDetailPage.getText();\n\t}", "public String toStringOrder(){\n\t\treturn \" CustomerID: \" + customerID + \"\\n Name: \" + name + \"\\n Address: \" + address + \"\\n Email: \" + email + \"\\n\\n\";\n\t}", "public void retrieveOrderContentById_Order(int i) {\n\t\tSystem.out.println(\"\\nMostrat detalls del Order \" + i);\n\t\tObjectSet result = db.queryByExample(new Order(i, null, null, null, null));\n\t\t\n\t\tOrder aConsultar = (Order) result.next();\n\t\taConsultar.getDetails().stream()\n\t\t\t\t.forEach(System.out::println);\n\t}", "@Override\n public String toString(){\n return \"\\n\"+String.valueOf(orderId) + \" $\"+String.valueOf(amount)+ \" Name:\"+String.valueOf(vendor);\n }", "public boolean showOrders(Connection conn, int order_no) {\r\n\t\ttry {\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select * from order_XXXX where orderno=\" + order_no);\r\n\r\n\t\t\t// Print the no and name\r\n\t\t\tSystem.out.println(\"Order No\\t\\t\\tItem No\\t\\t\\tOrder Quantity\\t\\t\\tOrder Date\\t\\t\\tCustomer No\");\r\n\t\t\tSystem.out.println(\"_________________________________________________________________\");\r\n\t\t\tif (!rset.isBeforeFirst())\r\n\t\t\t\treturn true;\r\n\t\t\telse {\r\n\t\t\t\twhile (rset.next()) {\r\n\t\t\t\t\tSystem.out.println(rset.getInt(1) + \"\\t\\t\\t\" + rset.getInt(2) + \"\\t\\t\\t\" + rset.getInt(3) + \"\\t\\t\\t\"\r\n\t\t\t\t\t\t\t+ rset.getString(4) + \"\\t\\t\\t\" + rset.getString(5));\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void Show(int _order){\n\t\tSystem.out.println(_order + \": \" + name + \" is at floor #\" + actualFloor + \", he wants to go to floor #\" + targetFloor);\n\t}", "public void display()\n\t{\n\t\tSystem.out.println(\"Bike No.\\t\"+\n\t\t\t\t\"Phone no.\\t\"+\n\t\t\t\t\"Name\\t\"+\n\t\t\t\t\"No. of days\\t\"+\n\t\t\t\t\"Charge\");\n\t\tSystem.out.println(bno+\n\t\t\t\t\"\\t\"+phno+\n\t\t\t\t\"\\t\"+name+\n\t\t\t\t\"\\t\"+days+\n\t\t\t\t\"\\t\"+charge);\n\t}", "void showOrdersGui();", "public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}", "@Path(\"showorderdetails\")\n @GET\n @Produces(MediaType.TEXT_PLAIN)\n public String getOrderDetails(@QueryParam(\"jsonpcallback\") String jsonpcallback) {\n return jsonpcallback + \"(\" + ods.getAllOrderDetails().toJSONString() + \")\";\n }", "public void printCustomerDetails()\r\n {\r\n System.out.println(title + \" \" + firstName + \" \" \r\n + lastName + \"\\n\" +getAddress() \r\n + \"\\nCard Number: \" + cardNumber \r\n + \"\\nPoints available: \" + points);\r\n }", "public abstract String showDetails();", "public void display()\r\n {\r\n System.out.println(\"Description: \" +description);\r\n if(!customersName.equals(\"\")) {\r\n System.out.println(\"Customer Name: \" +customersName);\r\n }\r\n }", "public void displayOrders(HashMap<Integer, Order> orders) {\n Set<Integer> orderNumbers;\n \n orderNumbers = orders.keySet();\n for (var orderNumber: orderNumbers) {\n ui.say(\"\\n======== ORDER \" + orderNumber + \" ========\");\n displayOrder(orders.get(orderNumber));\n }\n }", "public void showDetails (EventTable details) {\n\t\tdetailDisplay.show(\"details\");\n\t\tthis.details.showDetails(details);\n\t}", "public void displayOrder(Connection connection, Logger logger) throws ApplicationRuntimeException {\n productDao.display(connection, logger);\n\n }", "public void print(){\r\n\t\tint ListLength = this.promo.size();\r\n\t\tSystem.out.println(\"Type: \"+this.Type);\r\n\t\tSystem.out.println(\"Name: \"+this.name);\r\n\t\tSystem.out.println(\"Description: \"+this.description);\r\n\t\tSystem.out.printf(\"$%.2f\\n\", this.price);\r\n\t\tSystem.out.println(\"Featured dishes:\");\r\n\t\tfor (int i =0; i<ListLength; i++){\r\n\t\t\tSystem.out.print(\"\\t\"+(i+1) + \". \");\r\n\t\t\tSystem.out.println(this.promo.get(i).getName()); //print name of ala-carte item in promo array\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void showInfo(){\n\t\tfor (int i = 0; i < this.cd.size(); i++) {\n\t\t\tthis.cd.get(i).showInfo();\n\t\t}\n\t\tSystem.out.println(\"\\tToatl amount: \" + calTotalAmount());\n\t}", "public void ShowOrderDetailInJTable(){\n ArrayList<OrderDetail> list = getOrderDetailList();\n \n Object[] row = new Object[5];\n for (int i = 0; i < list.size(); i++) {\n row[0] = list.get(i).getOrderNumber();\n row[1] = list.get(i).getProductID();\n row[2] = \"Rp. \" + list.get(i).getUnitPrice();\n row[3] = list.get(i).getQuantity();\n row[4] = list.get(i).getDiscount()==0.05 ? \"5%\" : \"30%\";\n //total price\n double tempDiscount = list.get(i).getUnitPrice()*list.get(i).getQuantity()*list.get(i).getDiscount();\n// System.out.println(String.format(\"%.2f\",tempDiscount));\n double tempTotal = list.get(i).getUnitPrice()*list.get(i).getQuantity() - tempDiscount;\n// System.out.println(String.format(\"%.2f\", tempTotal));\n total=tempTotal+total;\n \n \n model2.addRow(row);\n }\n }", "public String viewDetailShop() throws Exception {\n\t\t\n\t\treturn SUCCESS;\n\t}", "public void ViewOrder(ArrayList<Order>order, Scanner in,ArrayList<Orderdetails>details,Order ORDER) throws FileNotFoundException {\r\n\ttry {\r\n\t\tOrderdetails od = new Orderdetails(ORDER);\r\n\t\tod.ViewOrder(order, in, details);\r\n\t}\r\n\tcatch(RuntimeException ex) {\r\n\t\tSystem.out.println(\"Error input, pls retry\");\r\n\t}\r\n\t}", "public String showDetails() {\n\t\treturn \"Person Name is : \" + name + \"\\n\" + \"Person Address is : \" + address;\n\t}", "private AlertDialog showOrderDetails(int pos) {\n AlertDialog.Builder diabuilder = new AlertDialog.Builder(this);\n diabuilder .setTitle(R.string.alertOrderTitle)\n .setMessage(helpInfo[pos])\n .setPositiveButton(R.string.btnOK, this)\n .setIcon(R.drawable.cart);\n diabuilder.create();\n return diabuilder.show();\n }", "private void printUpdateOrderMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Opdater Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Opdater Medarbejder\");\n System.out.println(\"(2) Opdater Kunde\");\n System.out.println(\"(3) Opdater Produkt\");\n System.out.println(\"(4) Tilføj Produkt\");\n System.out.println(\"(5) Bekræft\");\n System.out.print(\"Valg: \");\n }", "@Override\r\n\tpublic void printTransdetails() {\n\t\t\r\n\t}", "@GetMapping(\"/view-order/{id}\")\n\tpublic ResponseEntity<Object> getOrderById(@PathVariable Long id) throws OrderNotFoundException {\n\t\tLOGGER.info(\"view-Order URL is opened\");\n\t\tLOGGER.info(\"viewOrder() is initiated\");\n\t\tOrderDTO orderDTO = orderService.getOrderById(id);\n\t\tLOGGER.info(\"viewOrder() has executed\");\n\t\treturn new ResponseEntity<>(orderDTO, HttpStatus.OK);\n\t}", "public OrderDetail getOrderDetail(final String id);", "private String getOrderSummary() {\n final int numberOfCoffees = getNumberOfCoffees();\n if (numberOfCoffees == 0) {\n return Constants.FREE_MESSAGE;\n }\n\n final String name = ((EditText) findViewById(R.id.name_edit_text))\n .getText().toString();\n\n return Constants.NAME + \": \" +\n (name.isEmpty() ? Constants.DEFAULT_NAME : name) + \"\\n\" +\n getToppingsSummary() + \"\\n\" +\n Constants.QUANTITY + \": \" + numberOfCoffees + \"\\n\" +\n Constants.TOTAL + \": \" +\n NumberFormat.getCurrencyInstance().format(getTotalPrice()) + \"\\n\" +\n Constants.BYE_GREETING;\n }", "public void displayModelDetails() {\n System.out.println(\"Name: \" + getFirstName() + \" \" + getLastName());\n System.out.println(\"Height: \" + getHeightInFeetAndInches());\n System.out.println(\"Weight: \" + getWeight() + \" pounds\");\n String travelMessage = canTravel ? \"yep\" : \"nope\";\n System.out.println(\"Travels: \" + travelMessage);\n String smokeMessage = smokes ? \"yep\" : \"nope\";\n System.out.println(\"Smokes\" + smokeMessage);\n System.out.println(\"Hourly rate: $\" + calculatePayDollarsPerHour());\n }", "public void printOrder(){\n System.out.println(count);\n \n double price=0;\n for (product object : this.pro_o) {\n System.out.println(object.getName() + \" quantity : \" + object.getQuantity()+\" price : \" + object.getPrice());\n price+=object.getQuantity()*object.getPrice();\n }\n System.out.println(\"total : \" + price );\n }", "public List<OrderDetail> getOrderDetailByOrder(Long orderId);", "@Override\n\tpublic ProductVO detailOrderList(int p_num) {\n\t\treturn sql.selectOne(\"detailOrderList\", p_num);\n\t}", "public void printPaymentSummary() {\n System.out.print(\"+========================+\\n\");\n System.out.print(\"| Payment Summary |\\n\");\n System.out.print(\"+========================+\\n\");\n System.out.printf(\"Payment_ID: %s\\n\", payment_id);\n System.out.printf(\"STAFF_NAME: %s\\t\\t\\tSTAFF_ID : %s\\n\", order_staff.getName().toUpperCase(),\n order_staff.getId());\n System.out.printf(\"CUST_NAME : %s\\t\\tCurrent_Date: %s\\n\", order_member.getName().toUpperCase(),\n java.time.LocalDate.now());\n System.out.printf(\"CUST_ICNO : %s\\t\\tCurrent_Time: %s\\n\", order_member.getMemberIC(),\n java.time.LocalTime.now());\n System.out.print(\"----------------------------------------------------------------\\n\");\n System.out.printf(\"Total : %.2f\\n\", total_sales_of_transaction);\n System.out.printf(\"Payment Type Used : %s\\n\", payment_used);\n System.out.printf(\"Bike Brand : %s\\n\", order.getBike().getBrand());\n System.out.printf(\"Bike Price : %.2f\\n\", order.getBike().getPrice());\n System.out.println(\"\\n\");\n System.out.println(\"\\n\");\n }", "public void display() {\n System.out.println(\"Title: \" + this.title);\n System.out.println(\"Description: \" + this.des);\n System.out.println(\"Price Per Night: $\" + this.price);\n System.out.println(\"Max Guests: \" + this.guests);\n System.out.println(\"Length of stay: \" + this.days + \" days\");\n System.out.println(\"Total for stay: $\" + this.total);\n System.out.println(\"-----------------------------------\");\n }", "public void orderSummaryPage(View v){\n\n String order = gatherOrder(v);\n\n Intent redirect = new Intent(this, SummaryActivity.class);\n redirect.putExtra(EXTRA_MESSAGE,order);\n startActivity(redirect);\n }", "private static void displayReceipt()\r\n\t{\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tSystem.out.println(\"Receipt \");\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tSystem.out.println(\"Waiter/waitress: \"+name);\r\n\t\tSystem.out.println(\"Table Number: \"+tableNo);\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tSystem.out.println(\"ID Item Name Unit Price Quantity Sub-total\");\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tBillingSystemFormatter.receiptFormatter(orderList,menu,subTotalList);\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tBillingSystemFormatter.billFormatter(total, tax, tip, grandTotal);\r\n\t}", "@Override\n\tpublic String toString() {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tstringBuilder\n\t\t\t\t.append(\"ID \").append(id).append(\"\\n\")\n\t\t\t\t.append(\"Date \").append(date).append(\"\\n\")\n\t\t\t\t.append(\"INVOICE_NUMBER \").append(invoiceNumber).append(\"\\n\")\n\t\t\t\t.append(\"CUSTOMER_ID \").append(customer.getId()).append(\"\\n\")\n\t\t\t\t.append(\"Name \").append(customer.getName()).append(\"\\n\")\n\t\t\t\t.append(\"Address \").append(customer.getAddress()).append(\"\\n\")\n\t\t\t\t.append(\"Products == \").append(\"\\n\");\n\t\tfor (Order o : orderList){\n\t\t\tstringBuilder\n\t\t\t\t\t.append(\"Product Manufac \").append(o.getManufacturer()).append(\"\\n\")\n\t\t\t\t\t.append(\"Product model \").append(o.getModel()).append(\"\\n\")\n\t\t\t\t\t.append(\"Product IEMI \").append(o.getImeiNumber()).append(\"\\n\")\n\t\t\t\t\t.append(\"Product Rate \").append(o.getRate()).append(\"\\n\")\n\t\t\t\t\t.append(\"Product ID\").append(o.getP().getId()).append(\"\\n\");\n\t\t}\n\t\tstringBuilder.append(\"Payment Mode \").append(paymentMode).append(\"\\n\");\n\t\treturn stringBuilder.toString();\n\t}", "public void gotoDetailSalesOrder() {\n\t}", "private void getTradeDetail() {\n\t\t\tsendData(\"<get></get>\");\n\t}", "public boolean showOrders(Connection conn) {\r\n\t\ttry {\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select * from order_XXXX\");\r\n\r\n\t\t\t// Print the no and name\r\n\t\t\tSystem.out.println(\"Order No\\t\\t\\tItem No\\t\\t\\tOrder Quantity\\t\\t\\tOrder Date\\t\\t\\tCustomer No\");\r\n\t\t\tSystem.out.println(\"_________________________________________________________________\");\r\n\t\t\tif (!rset.isBeforeFirst())\r\n\t\t\t\treturn true;\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\twhile (rset.next()) {\r\n\t\t\t\t\tSystem.out.println(rset.getInt(1) + \"\\t\\t\\t\" + rset.getInt(2) + \"\\t\\t\\t\" + rset.getInt(3) + \"\\t\\t\\t\"\r\n\t\t\t\t\t\t\t+ rset.getString(4) + \"\\t\\t\\t\" + rset.getString(5));\r\n\t\t\t\t}\r\n\t\t\t return false;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void makeOrder(Order order) {\n for(Order_Item x : order.getOrdered()){\n TableRow item_row = build_row(x.getItem().getName(), String.valueOf(x.getQuantity()), (x.getPrice()*x.getQuantity()) + \"€\");\n orderLayout.addView(item_row);\n }\n\n refreshPriceView();\n }", "public void printDetails()\r\n\t{\r\n\t\tSystem.out.println(flightNumber);\r\n\t\tSystem.out.println(departurePoint);\r\n\t\tSystem.out.println(destination);\r\n\t\tSystem.out.println(departureTime);\r\n\t\tSystem.out.println(arrivalTime);\r\n\t\tSystem.out.println(checkedInPassengers);\r\n\t\tif(status == 'S')\r\n\t\t\tSystem.out.println(\"Scheduled\");\r\n\t\t\t\r\n\t\tif(status == 'B')\r\n\t\t\tSystem.out.println(\"Boarding\");\r\n\t\tif(status == 'D')\r\n\t\t\tSystem.out.println(\"Departed\");\r\n\t\tif(status == 'C')\r\n\t\t\tSystem.out.println(\"Canceled\");\r\n\t\t\r\n\t\t\t\t\r\n\t}", "@GetMapping(\"/order\")\r\n\tprivate ResponseEntity<Object> getAllOrder() \r\n\t{\tOrderDetailsResponse response = new OrderDetailsResponse();\r\n\t\tList<OrderDetailsRequest> ordersDetails = new ArrayList<OrderDetailsRequest>();\r\n\t\tList<OrderDetails> orders = orderService.getAllOrder();\r\n\t\t\r\n\t\tfor(OrderDetails order : orders) {\r\n\t\t\t\r\n\t\t\tOrderDetailsRequest details = new OrderDetailsRequest();\r\n\t\t\tconstructResponseData(order,details);\r\n\t\t\tList<OrderItemDetails> items = restClientService.findByOrderid(order.getId());\r\n\t\t\tdetails.setProductDetails(items);\r\n\t\t\tordersDetails.add(details);\r\n\t\t}\r\n\t\tresponse.setOrders(ordersDetails);\r\n\t\tresponse.setMessage(\"SUCCESS\");\r\n\t\tresponse.setStatus((long) 200);\r\n\t\treturn new ResponseEntity<Object>(response, HttpStatus.OK);\r\n\t}", "public String navigatePurchaseOrderList() {\n Product attachedSelected = this.getAttachedSelected();\n\n if (attachedSelected != null) {\n purchaseOrderListController.setItems(this.getAttachedSelected().getPurchaseOrderList());\n purchaseOrderListController.setLazyItems(this.getAttachedSelected().getPurchaseOrderList());\n }\n return this.mobilePageController.getMobilePagesPrefix() + \"/crud/purchaseOrder/index?faces-redirect=true\";\n }", "public void printProduct() {\n System.out.println(\"nom_jeu : \" + name);\n System.out.println(\"price : \" + price);\n System.out.println(\"uniqueID : \" + identifier);\n System.out.println(\"stock : \" + stock);\n System.out.println(\"image : \" + image);\n System.out.println(\"genre : \" + genre);\n System.out.println(\"plateforme : \" + platform);\n System.out.println();\n }", "private void displayContactDetails() {\n System.out.println(\"displaying contact details :\");\n for (int i = 0; i < contactList.size(); i++) {\n System.out.println(\"contact no\" + (i + 1));\n Contact con = contactList.get(i);\n System.out.println(\"first name is :\" + con.getFirstName());\n\n System.out.println(\" last name is :\" + con.getLastName());\n\n System.out.println(\" address is :\" + con.getAddress());\n\n System.out.println(\" city name is :\" + con.getCity());\n\n System.out.println(\" state name is :\" + con.getState());\n\n System.out.println(\" zip code is :\" + con.getZip());\n\n System.out.println(\" phone number is :\" + con.getPhone());\n\n System.out.println(\" email address is :\" + con.getEmail());\n }\n }", "public ORDER_INFO() {\n this.setUndecorated(true);\n initComponents();\n init();\n }", "public void Display(){\n System.out.println(\"************************************************************\");\n System.out.println(\"Customer Account Number: \"+getAccountNo());\n System.out.println(\"Customer Account Id: \"+getAccountId());\n System.out.println(\"Customer Type: \"+getAccountType());\n System.out.println(\"Customer Balance: $\"+getAccountBal());\n System.out.println(\"Thank you for banking with us!\");\n System.out.println(\"************************************************************\");\n }", "public void print() {\n System.out.println(\"Code: \"+this.productCode);\n System.out.println(\"Name: \"+ this.productName);\n System.out.println(\"Price: \"+this.price);\n System.out.println(\"Discount: \"+this.discount+\"%\");\n }", "void printOrder(double newBonus) {\n System.out.println(getDate());\n System.out.println();\n System.out.println(getCode());\n System.out.println();\n System.out.println(\"buyer name :\" + getBuyer().getName() + \" - \" + \"buyer id :\" + getBuyer().getCode());\n System.out.println();\n for(Product x : getBuy()) {\n System.out.println(\"code: - \" + x.getCode() + \", product: - \" + x.getName() + \" - amount - \" + x.getAmt() + \" prise - \" + x.getPrice() + \" sum - \" + x.getAmt()*x.getPrice());\n sum += x.getAmt()*x.getPrice();\n }\n System.out.println();\n System.out.println(\"your bonus is - \" + getBuyer().getBonus());\n System.out.println();\n System.out.println(\"the amount of your purchase - \" + (getSum()-getBuyer().getBonus()));\n System.out.println();\n System.out.println();\n System.out.println(\"Your bonus will be with the next purchase - \" + newBonus);\n\n }", "public void viewDetails(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(roads.get(i).getName());\n System.out.println(roads.get(i).getNorthStatus() + \" - \" + roads.get(i).getNorthAdvisory());\n System.out.println(roads.get(i).getSouthStatus() + \" - \" + roads.get(i).getSouthAdvisory() + \"\\n\");\n }\n }", "private void viewOrder() {\r\n\r\n System.out.println();\r\n System.out.println(\" View Orders\");\r\n System.out.println();\r\n\r\n\r\n //asks user to select which variable they would like to search by\r\n Scanner scanner = new Scanner(System.in);\r\n\r\n System.out.println(\"What would you like to search by: \");\r\n System.out.println(\" a. Product ID \\n b. Customer Email \\n c. Customer Location \\n d. Order Date \\n\");\r\n String attribute = console.next();\r\n\r\n\r\n //if a is selected, enter the product id to search for\r\n if (attribute.equals(\"a\")){\r\n System.out.println(\"Enter the product id you would like to search for: \");\r\n String searchProductId = console.next();\r\n OrderItem pIdSearchingFor = null;\r\n int count1 = 0;\r\n for (int i=0; i<orderInfo.size(); i++ ){\r\n if (searchProductId.equalsIgnoreCase(orderInfo.get(i).getProductId())) { // if product id is found print data\r\n \tpIdSearchingFor = orderInfo.get(i); \r\n \r\n \r\n System.out.println();\r\n\r\n System.out.println(\"Product ID: \" + pIdSearchingFor.getProductId()+ \" \"\r\n + \"Quantity: \" + pIdSearchingFor.getQuantity()+ \" \"\r\n + \"Customer Email: \" + pIdSearchingFor.getCustomerEmail()+ \" \"\r\n + \"Customer Zip Code: \" + pIdSearchingFor.getCustomerLocation()+ \" \"\r\n + \"Order Date: \" + pIdSearchingFor.getOrderDate());\r\n \r\n \r\n }\r\n \r\n else{\r\n count1++; //if product id is not found, add to count and compare to array size. If greater than or equal display product id not found\r\n if(count1 >= orderInfo.size()){\r\n System.out.println();\r\n System.out.println(\"Product ID Not Found.\");\r\n System.out.println();\r\n }\r\n}\r\n }\r\n //prompt to continue viewing orders or exit program\r\n System.out.println();\r\n System.out.println(\"Would you like to continue viewing orders? Enter yes or no: \");\r\n String cont = console.next();\r\n if(cont.equalsIgnoreCase(\"yes\")){\r\n viewOrder();\r\n }\r\n\r\n }\r\n //if b is selected enter the customer email\r\n else if(attribute.equals(\"b\")) {\r\n System.out.println(\"Enter the Customer Email you would like to search for: \");\r\n String searchCustomerEmail = console.next();\r\n OrderItem custSearchingFor = null;\r\n int count2 = 0;\r\n for (int j=0; j<orderInfo.size(); j++ ){\r\n if (searchCustomerEmail.equalsIgnoreCase(orderInfo.get(j).getCustomerEmail())) { // if customer email is found print data\r\n custSearchingFor = orderInfo.get(j); \r\n\r\n \r\n System.out.println();\r\n\r\n System.out.println(\"Product ID: \" + custSearchingFor.getProductId()+ \" \"\r\n + \"Quantity: \" + custSearchingFor.getQuantity()+ \" \"\r\n + \"Customer Email: \" + custSearchingFor.getCustomerEmail()+ \" \"\r\n + \"Customer Zip Code: \" + custSearchingFor.getCustomerLocation()+ \" \"\r\n + \"Order Date: \" + custSearchingFor.getOrderDate());\r\n \r\n \r\n } \r\n else{\r\n count2++; //if email is not found, add to count and compare to array size. If greater than or equal display email not found\r\n if(count2 >= orderInfo.size()){\r\n System.out.println();\r\n System.out.println(\"Email Not Found.\");\r\n System.out.println();\r\n }\r\n \r\n }\r\n }\r\n //prompt to continue viewing orders or exit program\r\n System.out.println();\r\n System.out.println(\"Would you like to continue viewing orders? Enter yes or no: \");\r\n String cont = console.next();\r\n if(cont.equalsIgnoreCase(\"yes\")){\r\n viewOrder();\r\n }\r\n\r\n }\r\n //if c is selected enter the customer zip code\r\n else if(attribute.equals(\"c\")) {\r\n System.out.println(\"Enter the Customer ZIP code you would like to search for: \");\r\n String searchCustomerLoc = console.next();\r\n OrderItem locSearchingFor = null;\r\n int count3 = 0;\r\n for (int j=0; j<orderInfo.size(); j++ ){\r\n if (searchCustomerLoc.equalsIgnoreCase(orderInfo.get(j).getCustomerLocation())) { // if zip code is found display data\r\n \tlocSearchingFor = orderInfo.get(j); \r\n\r\n \r\n System.out.println();\r\n\r\n System.out.println(\"Product ID: \" + locSearchingFor.getProductId() + \" \"\r\n + \"Quantity: \" + locSearchingFor.getQuantity() + \" \"\r\n + \"Customer Email: \" + locSearchingFor.getCustomerEmail() + \" \"\r\n + \"Customer Zip Code: \" + locSearchingFor.getCustomerLocation() + \" \"\r\n + \"Order Date: \" + locSearchingFor.getOrderDate());\r\n\r\n }\r\n \r\n \r\n else{\r\n count3++; //if zip code is not found, add to count and compare to array size. If greater than or equal display zip code not found\r\n if(count3 >= orderInfo.size()){\r\n System.out.println();\r\n System.out.println(\"Zip Code Not Found.\");\r\n System.out.println();\r\n }\r\n }\r\n }\r\n //prompt to continue viewing orders or exit program\r\n System.out.println();\r\n System.out.println(\"Would you like to continue viewing orders? Enter yes or no: \");\r\n String cont = console.next();\r\n if(cont.equalsIgnoreCase(\"yes\")){\r\n viewOrder();\r\n }\r\n\r\n }\r\n\r\n //if d is selected enter the customer order date\r\n else if (attribute.equals(\"d\")){\r\n System.out.println(\"Enter the date of the order you would like to search for in the format(Year-month-day e.g. 2020-01-13): \");\r\n String searchOrderDate = console.next();\r\n OrderItem dateSearchingFor = null;\r\n int count4 = 0;\r\n for (int k=0; k<orderInfo.size(); k++ ){\r\n if (searchOrderDate.equalsIgnoreCase(orderInfo.get(k).getOrderDate())) { // if date is found display data\r\n \tdateSearchingFor = orderInfo.get(k); \r\n\r\n \r\n System.out.println();\r\n\r\n System.out.println(\"Product ID: \" + dateSearchingFor.getProductId()+ \" \"\r\n + \"Quantity: \" + dateSearchingFor.getQuantity() + \" \"\r\n + \"Customer Email: \" + dateSearchingFor.getCustomerEmail() + \" \"\r\n + \"Customer Zip Code: \" + dateSearchingFor.getCustomerLocation() + \" \"\r\n + \"Order Date: \" + dateSearchingFor.getOrderDate());}\r\n \r\n \r\n \r\n else{\r\n count4++; //if date is not found, add to count and compare to array size. If greater than or equal display date not found\r\n if(count4 >= orderInfo.size()){\r\n System.out.println();\r\n System.out.println(\"Order Date Not Found.\");\r\n System.out.println();\r\n }\r\n \r\n }\r\n }\r\n //prompt to continue viewing orders or exit program\r\n System.out.println();\r\n System.out.println(\"Would you like to continue viewing orders? Enter yes or no: \");\r\n String cont = console.next();\r\n if(cont.equalsIgnoreCase(\"yes\")){\r\n viewOrder();\r\n }\r\n }\r\n }", "public void display()\r\n\t{\r\n\t\tSystem.out.println(\"Dollar: $\"+getAmount());\r\n\t\tSystem.out.println(\"Rupiah: Rp.\"+dollarTorp());\r\n\t}", "@Path(\"showorder\")\n @GET\n @Produces(MediaType.TEXT_PLAIN)\n public String getOrder(@QueryParam(\"jsonpcallback\") String jsonpcallback) {\n return jsonpcallback + \"(\" + os.getAllOrders().toJSONString() + \")\";\n }", "private void printCurrentOrderMenu(Shop shop) {\n System.out.println(shop.orderListToString());\n }", "public Order viewOrders() {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\t//Order nextOrder = \r\n\t\treturn nextOrder;\r\n\t}", "@Override\n\tpublic ActionForward execute(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tActionForward forward=null;\n\t\t\n\t\tint order_num=Integer.parseInt(request.getParameter(\"order_num\"));\n\t\t\n\t\tOrderDetailSvc orderDetailSvc=new OrderDetailSvc();\n\t\tPro_order order = orderDetailSvc.getOrder(order_num);\n\t\tArrayList<OrderView> orderItemList = orderDetailSvc.getItemList(order_num);\n\t\t\n\t\trequest.setAttribute(\"order\", order);\n\t\trequest.setAttribute(\"itemList\", orderItemList);\n\t\t\n\t\tforward = new ActionForward(\"/order/myOrderDetail.jsp\",false);\n\t\t\n\t\treturn forward;\n\t}", "@GetMapping(\"/checkOrder\")\n public String fetchOderList(Model model){\n List<OrderDetails> orderList = sportyShoesService.fetchOderList();\n model.addAttribute(\"orderList\", orderList);\n model.addAttribute(\"appName\", appName);\n return \"fetchOrderDetails\";\n }", "void displayDetails(String title, String description);", "@Override\r\n\tpublic String detail() {\n\t\tSystem.out.println(\"detailView.\");\r\n\t\t//javax.servlet.http.HttpSession session=request.getSession();\r\n\t\t//javax.servlet.ServletContext application=request.getServletContext();\r\n\t\t\r\n\t\t//String vId=request.getParameter(\"id\");\r\n\t\tif(!SysFun.isNullOrEmpty(id)) {\r\n\t\t\tLong iId=SysFun.parseLong(id);\r\n\t\t\tHeadLine bean=headLineService.load(iId);\r\n\t\t\tif(bean!=null) {\r\n\t\t\t\trequest.put(\"bean\", bean);\r\n\t\t\t\treturn \"detail\";\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"detail\";\r\n\t}", "public void printDetails() {\n PrintFormatter pf = new PrintFormatter();\n\n String first = \"############# Armor Details #############\";\n System.out.println(first);\n pf.formatText(first.length(), \"# Items stats for: \" + name);\n pf.formatText(first.length(), \"# Armor Type: \" + itemsType);\n pf.formatText(first.length(), \"# Slot: \" + slot);\n pf.formatText(first.length(), \"# Armor level: \" + level);\n\n if (baseStats.getHealth() > 0)\n pf.formatText(first.length(), \"# Bonus HP: \" + baseStats.getHealth());\n\n if (baseStats.getStrength() > 0)\n pf.formatText(first.length(), \"# Bonus Str: \" + baseStats.getStrength());\n\n if (baseStats.getDexterity() > 0)\n pf.formatText(first.length(), \"# Bonus Dex: \" + baseStats.getDexterity());\n\n if (baseStats.getIntelligence() > 0)\n pf.formatText(first.length(), \"# Bonus Int: \" + baseStats.getIntelligence());\n\n System.out.println(\"########################################\");\n\n }", "public void printDetails()\n {\n System.out.println(title);\n System.out.println(\"by \" + author);\n System.out.println(\"no. of pages: \" + pages);\n \n if(refNumber == \"\"){\n System.out.println(\"reference no.: zzz\");\n }\n else{\n System.out.println(\"reference no.: \" + refNumber);\n }\n \n System.out.println(\"no. of times borrowed: \" + borrowed);\n }", "public void showInfo()\n\t{\n\t\tSystem.out.println(\"Account Number : \"+getAccountNumber());\n\t\tSystem.out.println(\"Balance : \"+getBalance());\n\t\tSystem.out.println(\"Tenure Year : \"+tenureYear);\n\t}", "public String toString() {\r\n\t\treturn super.display() + \"\\n\" + listAllCards() + \r\n\t\t\t\t\"Purchased tickets: \\n\" + listAllTickets() +\r\n\t\t\t\t\"___________________________________________\";\r\n\t}", "public String getOrderID() {return orderID;}", "public OrderDetail getOrderDetail(int order_detail_id) {\n SQLiteDatabase db = this.getReadableDatabase();\n String sqlSelectQuery = \"SELECT * FROM \" + CoffeeShopDatabase.OrderDetailTable.TABLE_NAME +\n \" WHERE \" + CoffeeShopDatabase.OrderDetailTable._ID + \" = \" + order_detail_id;\n Cursor cursor = db.rawQuery(sqlSelectQuery, null);\n if (cursor != null) {\n cursor.moveToFirst();\n }\n OrderDetail orderDetail = new OrderDetail(\n cursor.getInt(cursor.getColumnIndex(CoffeeShopDatabase.OrderDetailTable._ID)),\n cursor.getInt(cursor.getColumnIndex(CoffeeShopDatabase.OrderDetailTable.COLUMN_NAME_ORDER_ID)),\n cursor.getInt(cursor.getColumnIndex(CoffeeShopDatabase.OrderDetailTable.COLUMN_NAME_DRINK_ID)),\n cursor.getInt(cursor.getColumnIndex(CoffeeShopDatabase.OrderDetailTable.COLUMN_NAME_QUANTITY))\n );\n return orderDetail;\n }", "public Order viewOrder(int on) {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\tOrder found = em.find(Order.class, on);\r\n\t\tem.close();\r\n\t\treturn found;\r\n\t}", "public void submitOrder(View view) {\n //int price = calculatePrice();\n String priceMessage = createOrderSummary();\n\n displayMessage(priceMessage);\n\n }", "@GetMapping(\"/order/{id}\")\r\n\tprivate ResponseEntity<Object> getOrder(@PathVariable(\"id\") int id) \r\n\t{\r\n\t\tOrderDetailsResponse response = new OrderDetailsResponse();\r\n\t\tresponse.setMessage(\"SUCCESS\");\r\n\t\tresponse.setStatus((long) 200);\r\n\t\tOrderDetailsRequest details = new OrderDetailsRequest();\r\n\t\tconstructResponseData(orderService.getOrderById(id),details);\r\n\t\tif(details != null && details.getCustomername()== null) {\r\n\t\t\tlogger.error(\"No order found for the id \"+id);\r\n\t\t\tthrow new OrderNotFoundException();\r\n\t\t}else {\r\n\t\t\tList<OrderItemDetails> order = restClientService.findByOrderid( details.getId());\r\n\t\t\tdetails.setProductDetails(order);\r\n\t\t}\r\n\t\tList<OrderDetailsRequest> orders = new ArrayList<OrderDetailsRequest>();\r\n\t\torders.add(details);\r\n\t\tresponse.setOrders(orders);\r\n\t\treturn new ResponseEntity<Object>(response, HttpStatus.OK);\r\n\r\n\t}", "public void displayCart() {\n\t\tSystem.out.println(cart.toString());\n\t}", "public DisplayOrderDto viewOrder(String email, long orderId)\n {\n User user = userRepository.findByEmail(email);\n Customer customer = customerRepository.findCustomerById(user.getId());\n\n DisplayOrderDto displayOrderDto = new DisplayOrderDto();\n\n // getting order from order id\n Orders orders = ordersRepository.findById(orderId);\n\n // checking for valid order id\n if (orders == null)\n {\n throw new OrderNotFoundException(\"Invalid Order id.\");\n }\n\n // checking if order belong to currently logged in customer\n if(customer.getId() != orders.getCustomer().getId())\n {\n throw new OrderNotFoundException(\"No order found in your order list with id: \"+orderId);\n }\n\n // setting dto values\n displayOrderDto.setOrderId(orders.getId());\n displayOrderDto.setCreationDate(orders.getDateCreated());\n displayOrderDto.setPaymentMethod(orders.getPaymentMethod());\n displayOrderDto.setTotalAmount(orders.getAmountPaid());\n\n Address customerAddress = new Address();\n customerAddress.setAddressLine(orders.getCustomerAddressAddressLine());\n customerAddress.setCity(orders.getCustomerAddressCity());\n customerAddress.setCountry(orders.getCustomerAddressCountry());\n customerAddress.setLabel(orders.getCustomerAddressLabel());\n customerAddress.setState(orders.getCustomerAddressState());\n customerAddress.setZipCode(orders.getCustomerAddressZipCode());\n\n displayOrderDto.setAddress(customerAddress);\n\n // list to be passed in displayOrderDto\n List<OrderProductWithStatusDto> orderProductWithStatusDtoList = new ArrayList<>();\n\n // getting all order products for the order\n List<OrderProduct> orderProductList = orderProductRepository.findOrderProductForOrderId(orders.getId());\n\n for (OrderProduct orderProduct: orderProductList) {\n\n // getting product variation for particular orderProduct\n Product product = productRepository\n .findById(productVariationRepository\n .getProductIdForVariationId(orderProduct.getProductVariation()\n .getId()));\n\n // getting the status of particular order product\n OrderStatus orderStatus = orderStatusRepository.findById(orderProduct.getId());\n OrderProductWithStatusDto orderProductWithStatusDto = new OrderProductWithStatusDto();\n\n orderProductWithStatusDto.setStatus(orderStatus.getToStatus().toString());\n orderProductWithStatusDto.setMetadata(orderProduct.getProductVariationMetadata());\n orderProductWithStatusDto.setPrice(orderProduct.getPrice());\n orderProductWithStatusDto.setQuantity(orderProduct.getQuantity());\n orderProductWithStatusDto.setVariationId(orderProduct.getProductVariation().getId());\n orderProductWithStatusDto.setName(product.getName());\n\n // adding to the list of orderProductWithStatusDto that will be passed in displayOrderDto\n orderProductWithStatusDtoList.add(orderProductWithStatusDto);\n }\n\n // setting the orderProductWithStatusDtoList to displayOrderDto\n displayOrderDto.setProducts(orderProductWithStatusDtoList);\n return displayOrderDto;\n }", "public void showOrder() {\n warning.setText(\"\");\n String orderNumber = orderNo.getText();\n if (orderNumber.equals(\"\")) {\n warning.setText(emptyOrderNum);\n } else if (!Validation.isValidOrderNumber(orderNumber)) {\n warning.setText(invalidOrderNum);\n } else {\n PlanDAO planDAO = new PlanDAO();\n UserDAO userDAO = new UserDAO();\n User user = userDAO.getUser(logname.getText());\n try {\n rsAllEntries = planDAO.showByOrderNumber(orderNumber, user);\n } catch (NullPointerException e) {\n warning.setText(\"No data to display\");\n }\n String productType = \"\";\n String worker = \"\";\n String workersList[] = new String[6];\n String plTime = \"\";\n String actTime = \"\";\n String orderStatus = \"\";\n try {\n if (rsAllEntries.next()) {\n ObservableList order = FXCollections.observableArrayList();\n for (int i = 1; i <= rsAllEntries.getMetaData().getColumnCount(); i++) {\n order.add(rsAllEntries.getString(i));\n }\n productType = (String) order.get(1);\n plTime = (String) order.get(3);\n actTime = (String) order.get(4);\n orderStatus = (String) order.get(5);\n worker = (String) order.get(2);\n int countCommas = 0;\n if (worker.contains(\",\")) {\n Pattern pattern = Pattern.compile(\"[^,]*,\");\n Matcher matcher = pattern.matcher(worker);\n while (matcher.find()) {\n countCommas++;\n }\n System.out.println(\"Number of commas: \" + countCommas);\n String[] parts = worker.split(\", \", countCommas + 1);\n for (int i = 0; i < countCommas + 1; i++) {\n workersList[i] = parts[i];\n System.out.println(i + \". parts \" + parts[i]);\n System.out.println(\"workersList \" + workersList[i]);\n }\n } else workersList[0] = worker;\n System.out.println(\"Order data added \" + order);\n } else {\n warning.setText(\"No data to display\");\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Failure getting order data from SQL \");\n ex.printStackTrace();\n }\n orderNo.setText(orderNumber);\n rbListAddElement();\n for (int i = 0; i < rbProductType.size(); i++) {\n selectRadioButton(rbProductType.get(i), productType);\n }\n cbListAddElement();\n for (int i = 0; i < cbWorker.size(); i++) {\n selectCheckBox(cbWorker.get(i), workersList);\n }\n plannedTime.setText(plTime);\n actualTime.setText(actTime);\n comboStatus.valueProperty().set(orderStatus);\n }\n }", "public SMplace_order() {\n initComponents();\n table();\n }", "public static void cylinderorderlist(){\n\t\tAccount a = (Account) Cache.get(\"authUser\");\r\n\t\t\r\n\t\t\r\n\t\tList<OrderCylinder> o = OrderCylinder.findAll();\r\n\t\t\r\n\t\tSystem.out.println(\"The Dealers for Whom Order has beed placed \"+ o);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Current Dealer Logged in\"+a);\r\n\t\t\r\n\t\t// Get the Dealer Details of him\r\n\t\tDealer d = Dealer.find(\"byDealershipId\",a.uniquenumber).first();\r\n\t\t\r\n\t\tSystem.out.println(\"Dealer for the Account\"+d);\r\n\t\t// Now, get the Ordered Cylinders\r\n\t\tList<OrderCylinder> l = OrderCylinder.find(\"byDealerId\", d).fetch();\r\n\t\t\r\n\t\t//Orders placed for the Dealer are as follows\r\n\t\t\r\n\t\tSystem.out.println(\"Orders Placed for Dealer are as follows\"+l);\r\n\t\t\r\n\t\trender(a,l);\r\n\t\t\r\n\t}", "@Override\n\tpublic String toString(){\n\t\tString out = \"\";\n\t\tfor (Order o : orders){\n\t\t\tout += o.toString() + \"\\n\";\n\t\t}\n\t\treturn out;\n\t}" ]
[ "0.78774416", "0.75746065", "0.75376064", "0.730151", "0.71241665", "0.6980099", "0.6931306", "0.67961305", "0.67526346", "0.6684945", "0.6628145", "0.66272306", "0.65555364", "0.6470067", "0.64533645", "0.64427257", "0.643451", "0.6367323", "0.63602763", "0.63574994", "0.6352957", "0.6349521", "0.6325113", "0.63211477", "0.63108224", "0.62838304", "0.6208575", "0.61885685", "0.6166183", "0.6164725", "0.61638546", "0.6163332", "0.6138165", "0.61253476", "0.61163646", "0.61138827", "0.61088264", "0.6098556", "0.6096991", "0.6074706", "0.6066239", "0.60607415", "0.605197", "0.60476196", "0.60414654", "0.6038789", "0.603825", "0.6037275", "0.6036475", "0.6032021", "0.60272443", "0.60270125", "0.60201895", "0.60167754", "0.601321", "0.60011816", "0.5994361", "0.5979704", "0.59751153", "0.5971242", "0.5956829", "0.5945729", "0.5925838", "0.5922283", "0.5918802", "0.59165764", "0.5908819", "0.59024", "0.58986396", "0.58920205", "0.5889955", "0.5884954", "0.5884146", "0.58796203", "0.5875806", "0.5872453", "0.585231", "0.5839515", "0.58293444", "0.58201784", "0.5818387", "0.5812527", "0.58010054", "0.5798394", "0.57982445", "0.5784369", "0.5781907", "0.57814854", "0.5775214", "0.576512", "0.57648057", "0.5756423", "0.57562673", "0.5754986", "0.57543826", "0.5748237", "0.57428765", "0.57420343", "0.573998", "0.5734101" ]
0.67453283
9
Opens a post app with the filled fields
public void sendOrder(View view) { Intent gIntent = new Intent(); gIntent.setAction(Intent.ACTION_SENDTO); gIntent.setData(Uri.parse("mailto:")); gIntent.putExtra(Intent.EXTRA_SUBJECT, "StarBox order for " + order.getCustomerName()); gIntent.putExtra(Intent.EXTRA_TEXT, getOrderDetails(order)); gIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(gIntent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void newPost() {\n\t\tIntent intent = new Intent(this, EditTopicActivity.class);\n\t\tintent.putExtra(EditPostActivity.IS_NEW, true);\n\n\t\tstartActivity(intent);\n\t}", "public void Post(View V) {\n Intent intent = new Intent(getApplicationContext(), PostActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent intent = PostEditActivity.newIntent(contex);\n intent.putExtra(\"PostKey\", postKey);\n contex.startActivity(intent);\n }", "public void post(ActionEvent actionEvent) throws IOException, ClassNotFoundException {\n Post post;\n if (postPic != null) {\n post = new Post(thisUser.getUser().getUsername(), title.getText()\n , description.getText(), new Date(), thisUser.getUser().getProfileImage(), postPic);\n post.setPostPicAddress(file.toString());\n } else {\n post = new Post(thisUser.getUser().getUsername(), title.getText()\n , description.getText(), new Date(), thisUser.getUser().getProfileImage());\n post.setPostPicAddress(\"No postPic\");\n }\n\n post.setOwner(thisUser.getUser().getUsername());\n\n CommandSender commandSender = new CommandSender(CommandType.NEWPOST\n , post);\n\n Client.getObjectOutputStream().writeObject(commandSender);\n\n thisUser.setSearchedUser(thisUser.getUser());\n Main.loadAPage(actionEvent\n , \"../FXMLs/MyProfile.fxml\"\n , \"SBUgram - Your Profile\"\n );\n\n }", "private void postNewPost() {\n if (mIsReplyOnBulletin) {\n OperationManager operationManager = OperationManager.getInstance(NewPostActivity.this);\n operationManager.postNewReply(etNewPostMsg.getText().toString(),\n getIntent().getExtras().getLong(EXTRA_POST_ID), NewPostActivity.this);\n } else {\n OperationManager operationManager = OperationManager.getInstance(NewPostActivity.this);\n operationManager.postNewBulletin(etNewPostSubject.getText().toString()\n , etNewPostMsg.getText().toString(), mFilesAdapter.getData(), NewPostActivity.this);\n\n }\n finish();\n }", "private void publishFeedDialog() {\n\t\tBundle postParams = new Bundle();\n postParams.putString(\"name\", \"Care Apps\");\n postParams.putString(\"description\", description);\n postParams.putString(\"picture\", profile_path);\n \n\t WebDialog feedDialog = (new WebDialog.FeedDialogBuilder(this,com.facebook.Session.getActiveSession(),postParams))\n\t .setOnCompleteListener(new OnCompleteListener() {\n\t @Override\n\t public void onComplete(Bundle values,\n\t FacebookException error) {\n\t if (error == null) {\n\t final String postId = values.getString(\"post_id\");\n\t if (postId != null) {\n\t Toast.makeText(FB_ShareActivity.this,\n\t \"Posted story, id: \"+postId,\n\t Toast.LENGTH_SHORT).show();\n\t onBackPressed();\n\t } else {\n\t Toast.makeText(FB_ShareActivity.this, \n\t \"Publish cancelled\", \n\t Toast.LENGTH_SHORT).show();\n\t onBackPressed();\n\t }\n\t } \n\t else if (error instanceof FacebookOperationCanceledException) {\n\t Toast.makeText(FB_ShareActivity.this, \n\t \"Publish cancelled\", \n\t Toast.LENGTH_SHORT).show();\n\t onBackPressed();\n\t } \n\t else {\n\t Toast.makeText(FB_ShareActivity.this, \n\t \"Error posting story\", \n\t Toast.LENGTH_SHORT).show();\n\t onBackPressed();\n\t }\n\t }\n\t })\n\t .build();\n\t feedDialog.show();\n\t}", "private void createPost() {\n PostModel model = new PostModel(23, \"New Title\", \"New Text\");\n Call<PostModel> call = jsonPlaceHolderAPI.createPost(model);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getUserId() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }", "public final void startPostActivity(Post post) {\r\n EventTracker eventTracker2 = this.eventTracker;\r\n if (eventTracker2 == null) {\r\n Intrinsics.throwUninitializedPropertyAccessException(\"eventTracker\");\r\n }\r\n eventTracker2.logCustom(\"View Post\", new CustomAttributes().put(\"from\", \"recommend\"));\r\n ActionLogUtil actionLogUtil2 = this.actionLogUtil;\r\n if (actionLogUtil2 == null) {\r\n Intrinsics.throwUninitializedPropertyAccessException(\"actionLogUtil\");\r\n }\r\n ActionLogUtil.defineCurrentWindow$default(actionLogUtil2, \"Personalized_Recommend\", \"\", 0, 4, null);\r\n Intent intent = new Intent(this, PostActivity.class);\r\n intent.putExtra(\"post_id\", post.getId());\r\n Image coverImage = post.getCoverImage();\r\n intent.putExtra(\"post_cover\", coverImage != null ? coverImage.getUrl() : null);\r\n ActivityOptionsCompat makeCustomAnimation = ActivityOptionsCompat.makeCustomAnimation(this, C0001R$anim.slide_right, C0001R$anim.fade_out);\r\n Intrinsics.checkExpressionValueIsNotNull(makeCustomAnimation, \"ActivityOptionsCompat.ma…e_right, R.anim.fade_out)\");\r\n startActivity(intent, makeCustomAnimation.toBundle());\r\n }", "@Override\n public void onClick(View view) {\n CreatePost createPost = new CreatePost(context, selectedPic);\n createPost.execute(title.getText().toString(), description.getText().toString());\n }", "public PostPO clickOnNewPost() {\n\t\tnewPost.click();\n\t\treturn new PostPO();\n\t}", "public PostDetails(Post post, String userid) {\n\t\tpostStage = new Stage();\n\t\tpostStage.initModality(Modality.APPLICATION_MODAL);\n\t\tpostDetailsController = new PostDetailsController();\n\t\tuserId = userid;\n\t\t\n\t\tbp = new BorderPane();\n\t\tbp.setPadding(new Insets(5));\n\t\tbp.setTop(showTitle(post));\n\t\tbp.setCenter(showPostDetails(post));\n\t\tbp.setBottom(showReplyList(post));\n\t\t\n\t\tScene mainScene = new Scene(bp, 1000, 600);\n\t\tpostStage.setScene(mainScene);\n\n\t\tpostStage.show();\n\t}", "public static Result postAddPaper() {\n Form<PaperFormData> formData = Form.form(PaperFormData.class).bindFromRequest();\n Paper info1 = new Paper(formData.get().title, formData.get().authors, formData.get().pages,\n formData.get().channel);\n info1.save();\n return redirect(routes.PaperController.listProject());\n }", "@Override\n public void onClick(View view) {\n Post info_post = ControladoraPresentacio.getpost_perName(view.getContentDescription().toString());\n ControladoraPosts.settitle(info_post.getTitle());\n ControladoraPosts.setDescripcion(info_post.getDescription());\n ControladoraPosts.setuser(info_post.getUser());\n ControladoraPosts.setid(info_post.getId());\n ControladoraPosts.setdate(info_post.getTime());\n //Nos vamos a la ventana de VisualizeListOUser\n Intent intent = new Intent(PersonalPosts.this, VisualizePosts.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n //finish();\n }", "private void onWhatTokenButtonClick() {\r\n\r\n //Open related web post\r\n Intent i = new Intent(Intent.ACTION_VIEW);\r\n i.setData(Uri.parse(getString(R.string.url_github_about_tokens)));\r\n startActivity(i);\r\n }", "@SuppressWarnings(\"deprecation\")\n\tprotected void postToWall() {\n\t\tBundle parameters = new Bundle();\n\n\t\tparameters.putString(\"link\", link);\n\t\tfacebook.dialog(FacebookActivity.this, \"feed\", parameters,\n\t\t\t\tnew DialogListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onCancel() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onComplete(Bundle values) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(DialogError e) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFacebookError(FacebookError e) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n\t}", "public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), employer_add_posts.class);\n startActivity(intent);\n\n // your handler code here\n EditText employer_companyname = findViewById(R.id.employer_company_name);\n EditText employer_phone = findViewById(R.id.employer_email);\n EditText employer_email = findViewById(R.id.employer_phone_cyte);\n EditText employer_password = findViewById(R.id.employer_pass_cyte);\n EditText employer_location = findViewById(R.id.employer_location_cyte);\n\n // Pull input from text boxes\n String employee_name1 = employer_companyname.getText().toString();\n String employee_phone1 = employer_phone.getText().toString();\n String employee_email1 = employer_email.getText().toString();\n String employee_password1 = employer_password.getText().toString();\n String employee_location1 = employer_location.getText().toString();\n\n emperdb.addEmployer(employer_companyname, employer_phone, employer_email, employer_password, employer_location);\n\n // Send username and password to the database and check\n\n //login_button.setText(username + \" \" + password); // Get rid of this\n Toast.makeText(getApplicationContext(), \"Your data is stored\", Toast.LENGTH_SHORT).show();\n\n }", "void editMyPost(Post post);", "public void publishEvents() {\n Bundle params = new Bundle();\n params.putString(\"name\", \"Reserva Cancha Finder\");\n params.putString(\"caption\", \"CanchaFinder\");\n params.putString(\"description\", Seleccion);\n params.putString(\"link\", \"http://www.solweb.co/reservas/CanchaFinder/index.php\");\n params.putString(\"picture\",\"http://www.solweb.co/reservas/api_movil/ic_launcher.png\");\n\n WebDialog feedDialog = (new WebDialog.FeedDialogBuilder(this,currentSession, params))\n .setOnCompleteListener(new WebDialog.OnCompleteListener() {\n\n @Override\n public void onComplete(Bundle values,FacebookException error) {\n if (error == null) {\n // When the story is posted, echo the success\n // and the post Id.\n final String postId = values.getString(\"post_id\");\n if (postId != null) {\n // do some stuff\n } else {\n // User clicked the Cancel button\n Toast.makeText(getApplicationContext(),\n \"Publish cancelled\", Toast.LENGTH_SHORT).show();\n }\n } else if (error instanceof FacebookOperationCanceledException) {\n // User clicked the \"x\" button\n Toast.makeText(getApplicationContext(),\n \"Publish cancelled\", Toast.LENGTH_SHORT).show();\n } else {\n // Generic, ex: network error\n Toast.makeText(getApplicationContext(),\n \"Error posting story\", Toast.LENGTH_SHORT).show();\n }\n }\n\n }).setFrom(\"\").build();\n feedDialog.show();\n\n }", "private void sendPost() {\n Map<String,Object> values = new HashMap<>();\n values.put(Constants.MANAGEMENT,management);\n values.put(Constants.GENERAL_INFORMATION,generalnformation);\n values.put(Constants.SYMPTOMS,symptoms);\n\n FireBaseUtils.mDatabaseDiseases.child(caseStudyUrl).child(url).updateChildren(values);\n Toast.makeText(DiseaseEditActivity.this, \"Item Posted\",LENGTH_LONG).show();\n finish();\n }", "public CreatePost(Context context) {\n this.context = context;\n }", "@Override\n public void onClick(View view) {\n if(!lastIntent.getBooleanExtra(\"isNew\", true)) {\n if (isValidPost(editTitle.getText().toString(), editDescription.getText().toString(), editBody.getText().toString(), editDeadline.getText().toString(), editPayment.getText().toString())) {\n String key = lastIntent.getBundleExtra(\"post\").getString(\"id\");\n Post post = new Post(editTitle.getText().toString(), editDeadline.getText().toString(), editPayment.getText().toString(), editDescription.getText().toString(), editBody.getText().toString(), mUser.getUid(), key);\n Map<String, Object> postValues = post.toMap();\n Map<String, Object> childUpdates = new HashMap<>();\n Map<String, Object> userUpdates = new HashMap<>();\n\n childUpdates.put(\"/posts/\" + key, postValues);\n userUpdates.put(\"/users/\" + FirebaseAuth.getInstance().getCurrentUser().getUid() + \"/posts/\" + key, postValues);\n\n mDatabase.updateChildren(childUpdates);\n mDatabase.updateChildren(userUpdates);\n\n startActivity(new Intent(getApplicationContext(), HomeWithDrawer.class));\n }\n }\n\n //Otherwise we will create a a new post. Find a way to simplify these two blocks!!\n else {\n if (isValidPost(editTitle.getText().toString(), editDescription.getText().toString(), editBody.getText().toString(), editDeadline.getText().toString(), editPayment.getText().toString())) {\n\n String key = mDatabase.child(\"posts\").push().getKey();\n //System.out.println(\"Make Post Description: \" + editDescription.getText().toString());\n Post post = new Post(editTitle.getText().toString(), editDeadline.getText().toString(), editPayment.getText().toString(), editDescription.getText().toString(), editBody.getText().toString(), mUser.getUid(), key);\n Map<String, Object> postValues = post.toMap();\n Map<String, Object> childUpdates = new HashMap<>();\n Map<String, Object> userUpdates = new HashMap<>();\n childUpdates.put(\"/posts/\" + key, postValues);\n userUpdates.put(\"/users/\" + FirebaseAuth.getInstance().getCurrentUser().getUid() + \"/posts/\" + key, postValues);\n\n mDatabase.updateChildren(childUpdates);\n mDatabase.updateChildren(userUpdates);\n\n Intent listenerIntent = new Intent(getApplicationContext(), NotificationListener.class);\n\n postBundle = new Bundle();\n postBundle.putString(\"postId\", key);\n postBundle.putString(\"postTitle\", editTitle.getText().toString());\n listenerIntent.putExtra(\"requestInfo\", postBundle);\n\n //Starts the NotificationListener for the post described by the postBundle.\n startService(listenerIntent);\n startActivity(new Intent(getApplicationContext(), HomeWithDrawer.class));\n }\n }\n }", "@FormUrlEncoded\n @POST(\"posts/\")\n Call<Post> createPostUrlFormatted(\n @Field(\"userId\") Integer id,\n @Field(\"title\") String title,\n @Field(\"body\") String body\n );", "public void postToFB(View view) {\n\n// Toast.makeText(getBaseContext(), \"Posted Story on Timeline\", Toast.LENGTH_SHORT).show();\n\n if (ShareDialog.canShow(ShareLinkContent.class)) {\n ShareLinkContent linkContent = null;\n try {\n linkContent = new ShareLinkContent.Builder()\n .setContentTitle(basic.getString(\"title\"))\n .setContentUrl(Uri.parse(basic.getString(\"viewItemURL\")))\n .setContentDescription(\n ((TextView) findViewById(R.id.price)).getText().toString() + \"\\n\" +\n ((TextView) findViewById(R.id.shippingInfo)).getText().toString()\n )\n .setImageUrl(Uri.parse(basic.getString(\"galleryURL\")))\n .build();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n// if(linkContent != null)\n shareDialog.show(linkContent);\n\n// ShareLinkContent content = new ShareLinkContent.Builder()\n// .setContentUrl(Uri.parse(\"https://developers.facebook.com\"))\n// .build();\n//\n// shareDialog.show(content);\n\n\n }\n }", "public void setPost(WPPost post) {this.post = post;}", "private void launch() {\n Intent intent = new Intent(getActivity(), ForumAddActivity.class);\n startActivity(intent);\n }", "@RequestMapping(value = \"/blog/newpost\", method = RequestMethod.POST)\n\tpublic String newPost(HttpServletRequest request, Model model) {\n\t\tString title=request.getParameter(\"title\");\n\t\tString body=request.getParameter(\"body\");\n\t\t\n\t\t//Validate parameters if not valid send back to form w/ error message\n\t\tif (title==\"\" || body==\"\"){\n\t\t\tif (title!=\"\"){\n\t\t\t\tmodel.addAttribute(\"title\",title);\n\t\t\t}\n\t\t\tif(body!=\"\"){\n\t\t\t\tmodel.addAttribute(\"body\",body);\n\t\t\t}\n\t\t\tmodel.addAttribute(\"error\",\"Post must have a Title and Body!\");\n\t\t\treturn \"newpost\";\n\t\t}\n\t\t\n\t\t//if they validate, create a new post\n\t\tInteger userId = (Integer) request.getSession().getAttribute(AbstractController.userSessionKey);\n\t\tUser author= userDao.findByUid(userId);\n\t\tPost post = new Post(title,body,author);\n\t\tpostDao.save(post);\n\t\tmodel.addAttribute(\"post\", post);\n\t\treturn \"redirect:\"+ post.getAuthor().getUsername()+\"/\"+ post.getUid(); \t\t\n\t}", "@RequestMapping(value = \"add\", method = RequestMethod.GET)\n public String displayAddPostForm(Model model) {\n\n model.addAttribute(\"title\", \"New Post\");\n model.addAttribute(\"post\", new Post());\n return \"post/add\";\n }", "public static Result posts() {\n\t\tPost post = new Post();\n\t\tUser user = UserController.loggedInUser();\n\t\tif (user != null) {\n\t\t\tpost.city= user.city;\n\t\t\tpost.state = user.state;\n\t\t\tpost.country = user.country;\n\t\t\tpost.zipcode = user.zipcode;\n\t\t\tpost.createdBy = user.userName;\t\t\t\n\t\t}\n\t\t//TODO:Use bind() instead of the above to avoid 0.0 in price field\n\t\treturn ok(index.render(Post.listPosts(), form(Post.class).fill(post), user));\n\t}", "@FormUrlEncoded\n @POST(\"posts\")\n Call<Post> createPost(@Field(\"userId\") int userId, @Field(\"title\") String title, @Field(\"body\") String text);", "@Override\n public void onClick(View view) {\n Intent detailIntent = Post.starter(mContext, mCurrentPost.getComment());\n\n //Start the detail activity\n mContext.startActivity(detailIntent);\n }", "void displayPostWithId(String id);", "public void createPost( BlogPost post );", "@OnClick(R.id.fab_add_forum_post)\n void onClick() {\n CreateDiscussionFragment createDiscussionFragment = new CreateDiscussionFragment();\n createDiscussionFragment.show(getFragmentManager(), \"Create Discussion\");\n }", "@Test(enabled=true)\n\tpublic void createCompletePost() {\n\t\tPosts posts = new Posts(\"5\", \"Lakers\", \"Horry\");\n\t\t\n\t\tString id =\n\n\t\tgiven()\n\t\t.contentType(ContentType.JSON)\n\t\t.body(posts)\n\t\t.when()\n\t\t.post(\"http://localhost:3000/posts/\")\n\t\t.then()\n\t\t.statusCode(201)\n\t\t.extract()\n\t\t.path(\"id\");\n\t\t\n\t\tgiven()\n\t\t.pathParams(\"id\", id)\n\t\t.when().get(\"http://localhost:3000/posts/{id}\")\n\t\t.then()\n\t\t.statusCode(200)\n\t\t.body(\"id\", is(posts.getId()))\n\t\t.body(\"title\",is(posts.getTitle()))\n\t\t.body(\"author\",is(posts.getAuthor()));\n\t}", "@Override\n public void onClick(View view) {\n startPosting();\n\n }", "public static GridPane showPostDetails(Post post) {\n\t\tGridPane grid = new GridPane();\n\t\tgrid.setHgap(10);\n\t\tgrid.setVgap(10);\n\t\tgrid.setPadding(new Insets(20, 20, 20, 20));\n\t\t\n\t\tString imagePath = post.getImagePath();\n\t\tif(imagePath.equalsIgnoreCase(\"none\") || imagePath.isEmpty()) {\n\t\t\timagePath = \"../../Images/No_image_available.jpg\";\n\t\t}\n\t\tImageView image = new ImageView(new Image(\"file:\" + imagePath, 300, 300, false, false));\n\t\tgrid.add(image, 0, 0);\n\t\t\n\t\tButton uploadImage = new Button(\"Upload Image\");\n\t\tuploadImage.setOnAction(PostDetailsController.uploadImageHandler(postStage, post));\n\t\tHBox hbBtn = new HBox(300);\n\t\thbBtn.getChildren().add(uploadImage);\n\t\thbBtn.setAlignment(Pos.BOTTOM_CENTER);\n\t\tgrid.add(hbBtn, 0, 1);\n\t\t\n\t\tVBox details = new VBox();\n\t\tdetails.setSpacing(10);\n\t\t\n\t\tdetails.getChildren().add(getLabel(\"Post ID: \", post.getId(), false, \"string\"));\n\t\tdetails.getChildren().add(getLabel(\"Title: \", post.getTitle(), true, \"string\"));\n\t\tdetails.getChildren().add(getLabel(\"Description: \", post.getDescription(), true, \"string\"));\n\t\tdetails.getChildren().add(getLabel(\"Creator ID: \", post.getCid(), false, \"string\"));\n\t\tdetails.getChildren().add(getLabel(\"Status: \", post.getStatus(), false, \"string\"));\n\t\tif(post instanceof Event) {\n\t\t\tdetails.getChildren().add(getLabel(\"Venue: \", ((Event) post).getVenue(), true, \"string\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Date: \", ((Event) post).getDate(), true, \"date\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Capacity: \", Integer.toString(((Event) post).getCapacity()), true, \"int\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Attendee Count: \", Integer.toString(((Event) post).getAttcount()), false, \"int\"));\n\t\t}\n\t\telse if(post instanceof Job) {\n\t\t\tdetails.getChildren().add(getLabel(\"Proposed Price: \", Double.toString(((Job) post).getProprice()), true, \"double\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Lowest Offer: \", Double.toString(((Job) post).getLowoffer()), false, \"double\"));\n\t\t}\n\t\telse {\n\t\t\tdetails.getChildren().add(getLabel(\"Highest Offer: \", Double.toString(((Sale) post).getHighoffer()), false, \"double\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Minimum Raise: \", Double.toString(((Sale) post).getMinraise()), true, \"double\"));\n\t\t\tdetails.getChildren().add(getLabel(\"Asking Price: \", Double.toString(((Sale) post).getAskprice()), true, \"double\"));\n\t\t}\n\t\tgrid.add(details, 3, 0);\n\t\t\n\t\tButton closePost = new Button(\"Close Post\");\n\t\tclosePost.setOnAction(PostDetailsController.closePostHandler(userId));\n\t\t\n\t\tButton deletePost = new Button(\"Delete Post\");\n\t\tdeletePost.setOnAction(PostDetailsController.deletePostHandler(userId));\n\t\t\n\t\tButton savePost = new Button(\"Save(after edit)\");\n\t\tsavePost.setOnAction(PostDetailsController.savePostHandler(userId, post));\n\t\t\n\t\tRegion region1 = new Region();\n HBox.setHgrow(region1, Priority.ALWAYS);\n Region region2 = new Region();\n HBox.setHgrow(region2, Priority.ALWAYS);\n\t\tHBox btn = new HBox(closePost, region1, deletePost, region2, savePost);\n\t\t\n\t\tbtn.setAlignment(Pos.BOTTOM_CENTER);\n\t\tgrid.add(btn, 3, 1, 10, 1);\n\t\t\n\t\treturn grid;\n\t}", "public void viewPosts(String typeOfScheme) {\n\t\tSchemeData postData = new SchemeData();\n\t\tHashMap<String, Scheme> data = postData.getSchemeData(typeOfScheme);\n\t\tif (data == null) {\n\t\t\tSystem.out.println(\"empty\");\n\t\t} else\n\t\tSystem.out.println(data.toString());\n\t}", "@Override\n\tpublic void showPostLocation() {\n\t\t\n\t}", "@GetMapping(path = \"create_post\")\n public String create_post(Model model){\n model.addAttribute(\"feed\" , new Feed() );\n return \"create_post\";\n }", "private void verifyPost() {\n if(TextUtils.isEmpty(newArticleTitle)){\n articleTitle.setError(\"Your post requires a title!\");\n articleTitle.requestFocus();\n return;\n }\n\n if(TextUtils.isEmpty(newArticleContent)){\n articleContent.setError(\"Your post requires a some content!\");\n articleContent.requestFocus();\n return;\n }\n\n // Pass in the calling activity such that official and team news are separated\n databaseReference = FirebaseDatabase.getInstance().getReference(callingActivity);\n\n String postId = databaseReference.push().getKey();\n\n NewsPost newsPost = new NewsPost(newArticleTitle, newArticleContent,\n newArticlePosterUsername, newArticlePosterProfileImage, dayDate, dayTime);\n\n databaseReference.child(postId).setValue(newsPost);\n\n // Close the activity\n finish();\n }", "public void help (ArrayList<Post> post)\n {\n adminRecView = findViewById(R.id.adminRecView);\n posts = post;\n ModRecAdapter adapt = new ModRecAdapter(posts, this);\n adminRecView.setAdapter(adapt);\n adminRecView.setLayoutManager(new LinearLayoutManager(this));\n }", "@Test (groups = \"create_post\")\n public void DTest_Show_Post_success(){\n\n System.out.println(\"Show PostID# \"+ createdPost);\n System.out.println(\"Generated Post Title: \"+ createdTitle);\n System.out.println(\"Generated Post Content: \"+ createdContent);\n System.out.println(\"Request to: \" + resourcePath + \"/\" + createdPost);\n\n given()\n .spec(RequestSpecs.generateToken())\n .get(String.format(\"%s/%s\",resourcePath,createdPost.toString()))\n .then()\n .body(\"data.id\", equalTo(createdPost))\n .and()\n .body(\"data.title\", equalTo(createdTitle))\n .and()\n .body(\"data.content\", equalTo(createdContent))\n .and()\n .statusCode(200)\n .spec(ResponseSpecs.defaultSpec());\n }", "@Override\n public void onClick(View view) {\n // Get the clicked post\n int position = getAdapterPosition();\n // Valid Position\n if (position != RecyclerView.NO_POSITION) {\n Post post = posts.get(position);\n Intent intent = new Intent(context, DetailsActivity.class);\n // Doing the post parcelable means converting its attributes to a String\n intent.putExtra(\"postDetails\", Parcels.wrap(post));\n context.startActivity(intent);\n }\n }", "private void genSharedPostOnFacebook () {\n shareLinkContent = new ShareLinkContent.Builder()\n .setContentTitle(\"Your Title\")\n .setContentDescription(\"Your Description\")\n .setContentUrl(Uri.parse(\"URL[will open website or app]\"))\n .setImageUrl(Uri.parse(\"image or logo [if playstore or app store url then no need of this image url]\"))\n .build();\n\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tnew AlertDialog.Builder(MainActivity.this) \n\t\t\t\t\t.setTitle(\"Post to Facebook\") \n\t\t\t\t\t.setPositiveButton(\"Post Current Weather\", new DialogInterface.OnClickListener() { \n\t\t\t\t\t @Override \n\t\t\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t\t \tSession.openActiveSession(MainActivity.this, true, new Session.StatusCallback() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void call(Session session,\n\t\t\t\t\t\t\t\t\t\tSessionState state, Exception exception) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tif (session.isOpened()) {\n\t\t\t\t\t\t\t\t\t\tRequest.newMeRequest(session, new Request.GraphUserCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onCompleted(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGraphUser user,\n\t\t\t\t\t\t\t\t\t\t\t\t\tResponse response) {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublishfeed(\"current\", jsonRoot);\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}).executeAsync();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \t\t\n\t\t\t\t\t \t});\n\t\t\t\t\t } \n\t\t\t\t\t}) \n\t\t\t\t\t.setNegativeButton(\"Cancel\",null ) \n\t\t\t\t\t.show(); \n\t\t\t\t}", "private void submit(){\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tMyApp app = new MyApp();\n\t\t\t\tapp.user = mUser.getText().toString();\n\t\t\t\tapp.password = mPassword.getText().toString();\n\t\t\t\tMyDbHelper dbHelper = MyDbHelper.getInstance(getApplicationContext());\n\t\t\t\ttry {\n\t\t\t\t\tdbHelper.insert(MyDbHelper.TABLE_NAME, null, app.toContentValues());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally{\n\t\t\t\t\tdbHelper.close();\n\t\t\t\t\tdbHelper = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}).start();\n\t\t//finish self\n\t\tfinish();\n\t}", "public void bind(Post post) {\n // Profile Picture\n // Username\n tvUsername.setText(post.getUser().getUsername());\n // Post Image\n ParseFile postImage = post.getImage();\n if (postImage != null) {\n Glide.with(context).load(postImage.getUrl()).fitCenter().into(ivPostImage);\n }\n // Description\n tvDescription.setText(post.getDescription());\n // Profile Picture Comment\n // Time Ago\n Date createdAt = post.getCreatedAt();\n String timeAgo = Post.calculateTimeAgo(createdAt);\n tvTimeAgo.setText(timeAgo);\n }", "public PostForm(String id,\n IModel<Discussion> discussionModel,\n IModel<Post> postModel) {\n super(id);\n\n\n this.discussionModel = discussionModel;\n this.postModel = postModel;\n }", "private void publishFeedExample() {\n final OnPublishListener onPublishListener = new OnPublishListener() {\n\n @Override\n public void onFail(String reason) {\n hideDialog();\n // insure that you are logged in before publishing\n Log.w(TAG, \"Failed to publish\");\n }\n\n @Override\n public void onException(Throwable throwable) {\n hideDialog();\n }\n\n @Override\n public void onThinking() {\n // show progress bar or something to the user while publishing\n toast(\"Processing\");\n showDialog();\n }\n\n @Override\n public void onComplete(String postId) {\n hideDialog();\n toast(\"Published successfully. The new post id = \" + postId);\n post_id=postId;\n }\n };\n\n // feed builder\n final Feed feed = new Feed.Builder()\n .setMessage(\"Album\")\n .setName(\"Album android App\")\n .setCaption(\"Its all about sharing moments\")\n .setDescription(\"This app provides you to share your photos. Like App official page.\")\n .setPicture(\"http://img1.wikia.nocookie.net/__cb20140420205329/ssb/images/b/bf/Abc.png\").setLink(\"https://www.facebook.com/pages/Album/1399781043626089\").build();\n\n // click on button and publish\n mButtonPublishFeed.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mSimpleFacebook.publish(feed, true, onPublishListener);\n }\n });\n }", "@Override\n public void onClick(View view) {\n\n TextView txtTitulo;\n Button btnGuardar;\n final TextInputEditText txtTituloPost;\n final TextInputEditText txtContenidoPost;\n\n dialogAgregarPost.setContentView(R.layout.activity_agregar);\n dialogAgregarPost.setCancelable(true);\n dialogAgregarPost.create();\n dialogAgregarPost.show();\n\n txtTitulo=dialogAgregarPost.findViewById(R.id.txtTitulo);\n btnGuardar=dialogAgregarPost.findViewById(R.id.btnGuardar);\n\n txtTituloPost=dialogAgregarPost.findViewById(R.id.titulo);\n txtContenidoPost=dialogAgregarPost.findViewById(R.id.contenido);\n\n\n //****** SE CREA UNA VARIABLE ESTÁTICA \"agregarEditar\" PARA VALIDAR Y CAMBIARLE EL TÍTULO AL DIALOG SEGÚN SEA INSERCION O ACTUALIZACION******//\n\n\n agregarEditar=\"AGREGAR\";\n\n if(PostActivity.agregarEditar==\"AGREGAR\")\n {\n txtTitulo.setText(\"AGREGAR POST\");\n }\n else\n {\n txtTitulo.setText(\"EDITAR POST\");\n }\n\n //****** EVENTO CLICK DE GUARDAR EN EL FORM DE INSERCION DE POSTS ******//\n\n btnGuardar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n //****** SE CREA LA URL ******//\n String url = \"https://jsonplaceholder.typicode.com/posts\";\n\n //****** SE CREA UNA SOLICITUD DE COLA DONDE SE LE MANDA EL MÉTODO \"POST\", LA URL Y SE CREAN LOS EVENTOS \"RESPONSE\" Y \"ON ERROR RESPONSE\" ******//\n\n StringRequest requestCrearPost = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n\n //****** SI LA SOLICITUD SE COMPLETA CORRECTAMENTE Y EL RESPONSE ES \"OK\", SE MUESTRA UN TOAST DE CONFIRMACIÓN Y SE RE-CREA LA ACTIVIDAD******//\n Toast.makeText(PostActivity.this, \"POST CREADO CORRECTAMENTE\", Toast.LENGTH_SHORT).show();\n recreate();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n //****** SI LA SOLICITU NO SE COMPLETA CORRECTAMENTE, SE MUESTRA UN TOAST CON EL ERROR ******//\n Toast.makeText(getApplicationContext(), error.toString(), Toast.LENGTH_SHORT).show();\n\n }\n }) {\n\n //****** SE MAPEAN Y SE RETORNAN LOS PARÁMETROS MANDÁNDOLE EL NOMBRE (COMO LO PIDE EL SERVIDOR) Y EL VALOR ******//\n @Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"title\", txtTituloPost.getText().toString());\n params.put(\"body\", txtContenidoPost.getText().toString());\n params.put(\"userId\", MainActivity.idUsuario);\n\n return params;\n }\n };\n //****** SE AGREGA A LA COLA DE SOLICITUDES LA SOLICITUD \"requestCrearPost\" ******//\n queue.add(requestCrearPost);\n }\n\n });\n\n }", "private void generatePost(final JSONObject jsonRoot) {\n\t\t\tpostCurrent.setText(\"Post Current Weather\");\n\t\t\tpostForecast.setText(\"Post Weather Forecast\");\n\t\t\tpostCurrent.setFocusable(true);\n\t\t\tpostForecast.setFocusable(true);\n\t\t\tpostCurrent.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tnew AlertDialog.Builder(MainActivity.this) \n\t\t\t\t\t.setTitle(\"Post to Facebook\") \n\t\t\t\t\t.setPositiveButton(\"Post Current Weather\", new DialogInterface.OnClickListener() { \n\t\t\t\t\t @Override \n\t\t\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t\t \tSession.openActiveSession(MainActivity.this, true, new Session.StatusCallback() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void call(Session session,\n\t\t\t\t\t\t\t\t\t\tSessionState state, Exception exception) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tif (session.isOpened()) {\n\t\t\t\t\t\t\t\t\t\tRequest.newMeRequest(session, new Request.GraphUserCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onCompleted(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGraphUser user,\n\t\t\t\t\t\t\t\t\t\t\t\t\tResponse response) {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublishfeed(\"current\", jsonRoot);\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}).executeAsync();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \t\t\n\t\t\t\t\t \t});\n\t\t\t\t\t } \n\t\t\t\t\t}) \n\t\t\t\t\t.setNegativeButton(\"Cancel\",null ) \n\t\t\t\t\t.show(); \n\t\t\t\t}\n\t\t\t});\n\t\t\t\n postForecast.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tnew AlertDialog.Builder(MainActivity.this) \n\t\t\t\t\t.setTitle(\"Post to Facebook\") \n\t\t\t\t\t.setPositiveButton(\"Post Weather Forecast\", new DialogInterface.OnClickListener() { \n\t\t\t\t\t @Override \n\t\t\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t\t \tSession.openActiveSession(MainActivity.this, true, new Session.StatusCallback() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void call(Session session,\n\t\t\t\t\t\t\t\t\t\tSessionState state, Exception exception) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tif (session.isOpened()) {\n\t\t\t\t\t\t\t\t\t\tRequest.newMeRequest(session, new Request.GraphUserCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onCompleted(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGraphUser user,\n\t\t\t\t\t\t\t\t\t\t\t\t\tResponse response) {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublishfeed(\"forecast\", jsonRoot);\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}).executeAsync();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \t\t\n\t\t\t\t\t \t});\n\t\t\t\t\t } \n\t\t\t\t\t}) \n\t\t\t\t\t.setNegativeButton(\"Cancel\",null ) \n\t\t\t\t\t.show(); \n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t}", "public static void openPlayStoreEntry()\n\t{\n\t\tApp.getInstance().startActivity(new Intent(Intent.ACTION_VIEW)\n\t\t\t\t.setData(Uri.parse(\"market://details?id=\" + General.PKG_MESSENGERAPI+\"&referrer=utm_source%3D\"+App.getInstance().getPackageName()+\"%26utm_medium%3DAPIMethod%26utm_campaign%3DAPICampaign\"))\n\t\t\t\t.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));\n\t}", "@Test\n\tpublic void TC001_create_Hello_world_post() {\n\t\tString postContent = \"Hello World\";\n\t\tString emailId = ConfigSettings.getEmailId();\n\t\tString password = ConfigSettings.getPassword();\n\t\t\n\t\tloginPage.login(emailId, password);\n\t\thomePage.clickPost();\n\t\tcreatePostPage.setPostText(postContent);\n\t\tcreatePostPage.clickPostButton();\n\t\t\n\t\tdriver.navigate().refresh();\n\t\tboolean result = driver.getPageSource().contains(postContent);\n\t\tassertTrue(result, \"able to post and see the posted content in the home page\");\n\t}", "void sendPost(String title, String body);", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v= inflater.inflate(R.layout.fragment_submit_prompt, container, false);\n\n user_email=(EditText) v.findViewById(R.id.userEmail);\n user_password=(EditText) v.findViewById(R.id.userPassword);\n\n Button b= (Button) v.findViewById(R.id.signUpButton);\n b.setOnClickListener(this);\n\n dailyPromptView=(TextView) v.findViewById(R.id.promptView);\n\n final EditText et = (EditText) v.findViewById(R.id.editText);\n\n\n\n Button submitPrompt = (Button) v.findViewById(R.id.button5);\n submitPrompt.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String prompt= et.getText().toString();\n dailyPrompt = new DailyPrompt(prompt);\n\n\n\n\n putInFireBase(prompt);\n }\n });\n\n\n // Add value event listener to the post\n // [START post_value_event_listener]\n mDatabase = FirebaseDatabase.getInstance().getReference(\"Daily_WP\").child(\"0\");\n ValueEventListener postListener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // Get Post object and use the values to update the UI\n DailyPrompt dp = dataSnapshot.getValue(DailyPrompt.class);\n\n dailyPromptView.setText(dp.content);\n Toast.makeText(getContext(),\"content \"+dp.content,Toast.LENGTH_SHORT).show();\n // [START_EXCLUDE]\n\n // [END_EXCLUDE]\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n // Getting Post failed, log a message\n Log.w(TAG, \"loadPost:onCancelled\", databaseError.toException());\n // [START_EXCLUDE]\n\n // [END_EXCLUDE]\n }\n };\n mDatabase.addValueEventListener(postListener);\n // [END post_value_event_listener]\n\n return v;\n }", "@GetMapping(\"/posts/create\")\n @ResponseBody\n public String postCreateGet() {\n return \"view the form for creating a post 'Create a post'\";\n //http://localhost:8080/posts/create\n }", "public void postButtonPressed(View view){\n if (isOnline()) {\n Toast.makeText(this, getResources().getString(R.string.sharing_facebook_toast), Toast.LENGTH_SHORT).show();\n mPendingAction = true;\n Session session = Session.getActiveSession();\n if (session == null) {\n session = new Session(getApplicationContext());\n Session.OpenRequest openSessionRequest = new Session.OpenRequest(this);\n }\n else{\n if (session.getState().equals(SessionState.CREATED)){\n // Session is not opened or closed, session is created but not opened.\n session = new Session(this);\n Session.setActiveSession(session);\n session.openForPublish(new Session.OpenRequest(this).setCallback(callback).setPermissions(PERMISSION));\n }\n else{\n onSessionStateChange(session, session.getState(), null);\n }\n }\n Session.setActiveSession(session);\n }else{\n Toast.makeText(this, getResources().getString(R.string.sharing_facebook_toast_no_internet), Toast.LENGTH_SHORT).show();\n\n }\n\n }", "private void display()\n {\n //Displaying the posts\n newsFeed.show();\n \n }", "public void verifyPageRedirectingToCreateAdPageOnClickingPostButtonInThePopup() throws Exception {\n\t\t\tOverviewTradusPROPage overviewObj=new OverviewTradusPROPage(driver);\n\t\t\twaitTill(2000);\n\t\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\t\tloginPage.setAccountEmailAndPassword(\"[email protected]\", \"sunfra123\");\n\t\t\tjsClick(driver, loginPage.LoginButton);\n\t\t\twaitTill(5000);\n\t\t\tif(!verifyElementPresent(overviewObj.PostYourAdButtonOnWelcomePopup))\n\t\t\t{\n\t\t\t\tdriver.navigate().refresh();\n\t\t\t}\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.PostYourAdButtonOnWelcomePopup);\n\t\t\tjsClick(driver, overviewObj.PostYourAdButtonOnWelcomePopup);\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.createStockPageVerificationElement);\n\t\t\tAssert.assertTrue(getCurrentUrl(driver).equals(\"https://pro.tradus.com/lms/ads/create\"),\n\t\t\t\t\t\t\"Page not redirected to create ad page on clicking post button on welcome popup\");\n\t\t\tjsClick(driver, overviewObj.overviewOptioninSiderBar);\n\t\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.overviewPageVerificationElement);\n\t\t}", "public void facebookWallPost()\n\t{\n\t\tPreferences preferences = new Preferences(getActivity());\n\t\tString accessToken = preferences.getFacebookAccessToken();\n\t\tlong expiration = preferences.getFacebookAccessExpiration();\n\n\t\tif(accessToken != null) mFacebook.setAccessToken(accessToken);\n\t\tif(expiration != 0) mFacebook.setAccessExpires(expiration);\n\t\t\n\t\tif(mFacebook.isSessionValid())\n\t\t{\n\t\t\t// parameters\n\t\t\tBundle bundle = new Bundle();\n\t\t\t//bundle.putString(\"to\", \"123456789\");\n\t\t\tbundle.putString(\"name\", \"Name\");\n\t\t\tbundle.putString(\"description\", \"Description\");\n\t\t\tbundle.putString(\"picture\", \"http://placedog.com/200/200\");\n\t\t\tbundle.putString(\"link\", \"http://example.com\");\n\t\t\t\n\t\t\tmFacebook.dialog(getActivity(), \"feed\", bundle, new DialogListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void onComplete(Bundle values)\n\t\t\t\t{\n\t\t\t\t\t// TODO: run callbacks in TaskFragment.runTaskCallback()\n\t\t\t\t\t\n\t\t\t\t\tLogcat.d(\"Fragment.facebookWallPost().onComplete(): \" + mFacebook.getAccessToken());\n\t\t\t\t}\n\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onFacebookError(FacebookError e)\n\t\t\t\t{\n\t\t\t\t\tLogcat.d(\"Fragment.facebookWallPost().onFacebookError(): \" + e.getErrorType() + \" / \" + e.getLocalizedMessage() + \" / \" + e.getMessage());\n\t\t\t\t\t\n\t\t\t\t\t// toast\n\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onError(DialogError e)\n\t\t\t\t{\n\t\t\t\t\tLogcat.d(\"Fragment.facebookWallPost().onError(): \" + e.getLocalizedMessage() + \" / \" + e.getMessage());\n\t\t\t\t\t\n\t\t\t\t\t// toast\n\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onCancel()\n\t\t\t\t{\n\t\t\t\t\tLogcat.d(\"Fragment.facebookWallPost().onCancel()\");\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tToast.makeText(getActivity(), \"You are logged out.\", Toast.LENGTH_LONG).show();\n\t\t}\n\t}", "public Post() {\n\t\t\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CREATE_NEW_POST) {\n if (resultCode == RESULT_OK) {\n String user = data.getStringExtra(PostingActivity.USER);\n String subject = data.getStringExtra(PostingActivity.SUBJECT);\n String question = data.getStringExtra(PostingActivity.QUESTION);\n\n Post post = new Post(user, subject, question);\n postQuestion(post);\n }\n }\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) \n\t\t\t\t\t{\n\t\t\t\t\t\tString url = \"https://www.facebook.com/dialog/feed?app_id=1507764116109075&\" +\n\t\t\t\t\t\t\t\t \t \"link=https://play.google.com/store/apps/details?id=com.achyuthnfn.cnbfinal&\" +\n\t\t\t\t\t\t\t\t \t \"caption=GuessIn&\" +\n\t\t\t\t\t\t\t\t \t \"description=\"+Uri.parse(\"My smartphone just thought of a word and I guessed it in \"+attempts+\" attempts. Check out the new game by @nfnlabs called GuessIn!\")+\n\t\t\t\t\t\t\t\t \t \"&redirect_uri=https://www.facebook.com/connect/login_success.html\"+\n\t\t\t\t\t\t\t\t \t \"&picture=http://nfnlabs.in/wp-content/uploads/2014/06/Share%20Image.png\";\n\t\t\t\t\t\tIntent intent=new Intent(Intent.ACTION_VIEW);\n\t\t\t\t\t\tintent.setData(Uri.parse(url));\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t}", "public BlogPostView() {\n this.blogPost = new BlogPost();\n }", "@Override\n public void onClick(View view) {\n\n Intent intent = new Intent(context, PostDetailActivity.class);\n intent.putExtra(\"postId\",pId);\n context.startActivity(intent);\n }", "public void onClick(DialogInterface dialog,int id) {\n ref_number = userInput.getText().toString();\n new PostClass(context).execute();\n }", "private void buildIntent() {\n ReportLogic.report(this, \"POST\", mInfo.c_rpt, 0, null);\n Intent intent = new Intent();\n Bundle bundle = new Bundle();\n bundle.putString(PKG_NAME, mInfo.href);\n bundle.putString(APP_NAME, mInfo.name);\n intent.putExtra(DetailActivity.DETAIL, bundle);\n intent.setClass(this, DetailActivity.class);\n startActivity(intent);\n }", "public void onClick(View view) {\n if(validate_info(newRecipe)) {\n\n String date = new Date().toString();\n newRecipe.posted = date;\n newRecipe.updateDB();\n // go to menu\n Intent intent = new Intent(PostActivity.this, MenuActivity.class);\n Toast.makeText(PostActivity.this, \"Post successful\", Toast.LENGTH_SHORT).show();\n startActivity(intent);\n\n //change intent?\n }\n else {\n\n }\n\n }", "public void openEventsForm(String data);", "private void createPostXML() {\n Call<PostModel> call = jsonPlaceHolderAPI.createPostXML(23, \"New Title\", \"New Text\");\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getUserId() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }", "public Home(String title,String post,String id,String password) {\n initComponents();\n this.setVisible(true);\n this.setTitle(title+\" Panel\");\n this.showDetails(title, post, id);\n UserInfo.accessLevel=title;\n UserInfo.userId=id;\n UserInfo.post=post;\n UserInfo.password=password;\n this.menuItemPermission();\n \n }", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.btnPost:\n String s = mTxtPost.getText().toString().trim();\n post(s);\n }\n }", "public void bind(final Post post) {\n SpannableStringBuilder str = new SpannableStringBuilder(post.getUser().getUsername() +\n \" \" + post.getDescription());\n str.setSpan(new android.text.style.StyleSpan(android.graphics.Typeface.BOLD), 0,\n post.getUser().getUsername().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n descriptionTextView.setText(str);\n\n usernameTextView.setText(post.getUser().getUsername());\n relativeDate = DateUtils.getRelativeTimeSpanString(post.getCreatedAt().getTime()) + \"\";\n timestampText.setText(DateUtils.getRelativeTimeSpanString(post.getCreatedAt().getTime()));\n final ParseFile image = post.getImage();\n if (image != null) {\n Glide.with(context).load(image.getUrl()).into(imgView);\n }\n final ParseFile profilePic = post.getUser().getParseFile(\"profilePic\");\n if (profilePic != null) {\n GlideApp.with(context)\n .load(profilePic.getUrl())\n .transform(new CircleCrop())\n .into(profileImgView);\n } else {\n GlideApp.with(context)\n .load(R.drawable.instagram_user_filled_24)\n .transform(new CircleCrop())\n .into(profileImgView);\n }\n imgView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(context, PostDetailsActivity.class);\n intent.putExtra(\"KEY_DESCRIPTION\", post.getDescription());\n intent.putExtra(\"KEY_CREATED_KEY\", relativeDate);\n intent.putExtra(\"KEY_USER\", Parcels.wrap(post.getUser()));\n intent.putExtra(\"KEY_IMAGE\", Parcels.wrap(image));\n context.startActivity(intent);\n }\n });\n usernameTextView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(context, ProfileFragment.class);\n// intent.putExtra(\"KEY_USER\", post.getUser());\n intent.putExtra(\"KEY_IMAGE\", Parcels.wrap(image));\n context.startActivity(intent);\n }\n });\n }", "public void bind(Post post) {\n tvDesc.setText(post.getDescription());\n tvUser.setText(post.getUser().getUsername());\n ParseFile image = post.getImage();\n if(image != null) {\n Glide.with(context).load(post.getImage().getUrl()).into(ivPost);\n }\n createdAt = post.getCreatedAt();\n timeAgo = post.calculateTimeAgo(createdAt);\n tvTime.setText(timeAgo);\n }", "protected abstract void postOpen();", "public void onClick(View v) {\n post.setTitle(titleEditText.getText().toString());\n post.setContent(descriptionEditText.getText().toString());\n post.setImageUrl((String) gallery.getSelectedItem());\n\n PostAction.curatePost(post, jsonForSelectedSharers(), PostCurateActivity.this, true, new PostAction.OnActionComplete() {\n\n @Override\n public void onActionComplete(Post in, Post out) {\n Intent i = new Intent();\n i.putExtra(\"postToAdd\", out);\n i.putExtra(\"postToRemove\", in);\n PostCurateActivity.this.setResult(TabPostsListActivity.RESULT_ADD_CURATED_AND_REMOVE_CURABLE, i);\n PostCurateActivity.this.finish();\n }\n });\n }", "public void gotoPostNewJob(View v){\n startActivity( new Intent( ViewSingleJobActivity.this, PostJobActivity.class));\n finish();\n }", "public void clickCreateNewPostBtn() {\n createPostBtn.get(0).click();\n }", "public PostViewBean() {\n }", "@Test(enabled=false)\n\tpublic void createPostCheckBodyContents() {\n\t\tPosts posts = new Posts(\"4\", \"Packers\", \"Favre\");\n\t\t\n\t\tgiven().\n\t\twhen().contentType(ContentType.JSON).\n\t\tbody(posts).\n\t\tpost(\"http://localhost:3000/posts/\").\n\t\tthen().\n\t\tstatusCode(201).\n\t\tbody(\"id\", is(posts.getId())).\n\t\tbody(\"title\",is(posts.getTitle())).\n\t\tbody(\"author\",is(posts.getAuthor()));\n\t}", "public String post();", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tnew AlertDialog.Builder(MainActivity.this) \n\t\t\t\t\t.setTitle(\"Post to Facebook\") \n\t\t\t\t\t.setPositiveButton(\"Post Weather Forecast\", new DialogInterface.OnClickListener() { \n\t\t\t\t\t @Override \n\t\t\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t\t \tSession.openActiveSession(MainActivity.this, true, new Session.StatusCallback() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void call(Session session,\n\t\t\t\t\t\t\t\t\t\tSessionState state, Exception exception) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tif (session.isOpened()) {\n\t\t\t\t\t\t\t\t\t\tRequest.newMeRequest(session, new Request.GraphUserCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onCompleted(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGraphUser user,\n\t\t\t\t\t\t\t\t\t\t\t\t\tResponse response) {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublishfeed(\"forecast\", jsonRoot);\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}).executeAsync();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \t\t\n\t\t\t\t\t \t});\n\t\t\t\t\t } \n\t\t\t\t\t}) \n\t\t\t\t\t.setNegativeButton(\"Cancel\",null ) \n\t\t\t\t\t.show(); \n\t\t\t\t}", "@Test(enabled=false)\n\tpublic void basicPost() {\t\n\t\tResponse res = \n\t\tgiven().\n\t\tbody(\" { \\\"id\\\": \\\"2\\\",\"\n\t\t\t\t+ \"\\\"title\\\": \\\"Cleveland\\\", \"\n\t\t\t\t+ \"\\\"author\\\": \\\"Kyrie\\\" }\").\n\t\twhen().\n\t\tcontentType(ContentType.JSON).\n\t\tpost(\"http://localhost:3000/posts/\");\n\t\n\t\tSystem.out.println(res.asString());\n\t}", "public void Call_My_Blog(View v) {\n Intent intent = new Intent(MainActivity.this, My_Blog.class);\n startActivity(intent);\n\n }", "public void showPosts() {\n\t\tpostsList.getItems().clear();\n\t\tList<Text> toPost = getPosts();\n\t\tfor(Text text : toPost) {\n\t\t\tSystem.out.println(text);\n\t\t\ttext.wrappingWidthProperty().bind(postsList.widthProperty());\n\t\t\tpostsList.getItems().add(text);\n\t\t}\n\t}", "@Test\n public void getAppSubmissionFormTest() throws ApiException {\n String appId = null;\n String naked = null;\n // String response = api.getAppSubmissionForm(appId, naked);\n\n // TODO: test validations\n }", "public void setPostUrl(String postUrl) {\r\n\t\tthis.postUrl = postUrl;\r\n\t}", "public void run() {\n Intent intent = new Intent(MainActivity.this, Summit.class);\n String description = woeid.getWoeid();\n intent.putExtra(EXTRA_MESSAGE, description);\n // Log.d(\"Long\", description);\n startActivity(intent);\n }", "public Post(){\n\n }", "@Test\r\n\t @Given(\"the application is in Post Free Ad Form Page\")\r\n\t public void the_application_is_in_Post_Free_Ad_Form_Page() {\n\t\t\t\tdriver = new ChromeDriver();\r\n\t\t\t\tdriver.get(\"https://www.quikr.com/pets/post-classifieds-ads+allindia?postadcategoryid=1392\");\r\n\t }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.paper);\r\n\t\tIntent intent = this.getIntent();\r\n\t\tPaper paper = (Paper) intent.getSerializableExtra(\"paper\");\r\n if(paper == null){\r\n \tpaper = new Paper();\r\n }\r\n viewPaper(paper);\r\n\r\n\t}", "@PostMapping(\"/posts\")\n ResponseEntity<?> createPost(@RequestBody Post post) {\n post.setOwner(SecurityContextHolder.getContext().getAuthentication().getName());\n post.setDateCreated(LocalDateTime.now());\n\n EntityModel<Post> newPost = modelAssembler.toModel(postRepository.save(post));\n return ResponseEntity.created(newPost.getRequiredLink(IanaLinkRelations.SELF).toUri()).body(newPost);\n }", "public void bind(Post post) {\n tvUsername.setText(post.getUser().getUsername());\n String descriptionString = \"<b>\" + post.getUser().getUsername() + \"</b> \" + post.getDescription();\n tvDescription.setText(Html.fromHtml(descriptionString));\n //Log.i(\"Posts Adapter\", post.getDescription() + post.getCreatedAt());\n tvDate.setText(post.getCreatedAt().toString());\n ParseFile image = post.getImage();\n if(image != null){\n Glide.with(context).load(image.getUrl()).into(ivImage);\n }\n ParseFile imageProfile = post.getUser().getParseFile(\"profileImage\");\n if(imageProfile != null){\n Glide.with(context).load(imageProfile.getUrl()).transform(new CircleCrop()).into(ivProfilePic);\n }\n rlPostProfile.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n int position = getAdapterPosition();\n //Log.i(\"myApp\", \"on click\");\n // make sure the position is valid, i.e. actually exists in the view\n if (position != RecyclerView.NO_POSITION) {\n // get the movie at the position, this won't work if the class is static\n Post post = posts.get(position);\n // create intent for the new activity\n Intent intent = new Intent(context, UserPostActivity.class);\n // serialize the movie using parceler, use its short name as a key\n intent.putExtra(Post.class.getSimpleName(), Parcels.wrap(post));\n ///intent.putExtra(Tweet.class.getSimpleName(), Parcels.wrap(tweet));\n // show the activity\n context.startActivity(intent);\n }\n }\n });\n }", "private void createPostMap() {\n Map<String, String> map = new HashMap<>();\n map.put(\"userId\", \"12\");\n map.put(\"title\", \"New Title\");\n Call<PostModel> call = jsonPlaceHolderAPI.createPostMap(map);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getTitle() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }", "@PostMapping(\"/posts/create\")\n public String createPost(\n Model model,\n @RequestParam(name = \"title\") String title,\n @RequestParam(name = \"body\") String body,\n @RequestParam(name = \"team\") String teamIDString,\n @RequestParam(name = \"sport\") String sportIDString) {\n\n long teamID = Long.parseLong(teamIDString);\n long sportID = Long.parseLong(sportIDString);\n\n Team thisTeam = teamRepository.findOne(teamID);\n Sport thisSport = sportRepository.findOne(sportID);\n\n\n// Which user is being assigned to this post?\n\n User foundUser = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n User dbUser = userRepository.findOne(foundUser.getId());\n\n\n\n\n// Now it's time to actually make the post.\n\n Post post = new Post();\n post.setTitle(title);\n post.setBody(body);\n post.setSport(thisSport);\n post.setTeam(thisTeam);\n post.setAuthor(dbUser);\n\n postRepository.save(post);\n\n// After post is created, give user options to do something next\n\n Post createdPost = postRepository.findOne(post.getId());\n model.addAttribute(\"createdPost\", createdPost);\n\n\n// Send email commented out for now so I don't send an email every time\n\n// emailService.prepareAndSend(post, \"Congratulations James! You have been hired for this position\", \"You have been hired for this position: 1007A McDonalds Region Manager\");\n\n return \"posts/create-success\";\n }", "public void onClick(View v) {\n String itemString = newItem.getText().toString();\n String descString = newDesc.getText().toString();\n String contactString = newContact.getText().toString();\n String categoryString = newCategory.getSelectedItem().toString();\n // get the bitmap from the imageview\n Bitmap bitmap = ((BitmapDrawable)postImageView.getDrawable()).getBitmap();\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n // Compress image to lower quality scale 1\n bitmap.compress(Bitmap.CompressFormat.WEBP, 1, stream);\n byte[] image = stream.toByteArray();\n // if the image exceeds the allowable number of bytes\n if (image.length >= max)\n {\n // set byte array to default image\n image = noImg;\n // give appropriate comment to user\n // Code from:\n // http://developer.android.com/guide/topics/ui/notifiers/toasts.html\n Context context = getApplicationContext();\n CharSequence text = \"Image too big. Go to My Posts and choose another!\";\n int duration = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n\n }\n // Construct new post\n Posts newPost = new Posts(itemString, descString, categoryString, image, contactString);\n // Push post to parse\n parse.pushPost(newPost);\n finish();\n }", "public WPPost getPost() {return post;}", "@PostMapping(\"/posts/create\")\n @ResponseBody\n public String createPost() {\n return \"Create new post.\";\n }", "private void publish(){\n solo.waitForView(R.id.search_action_button);\n solo.clickOnView(solo.getView(R.id.navigation_publish));\n\n // Click on \"Publish New Experiment\" button\n solo.clickOnView(solo.getView(R.id.new_publish_button));\n solo.waitForView(R.id.geo_location_toggle);\n\n //Click on measurement\n solo.clickOnView(solo.getView(R.id.measurement_experiment_radio));\n\n //Click on add a description editText\n EditText descriptionBox = (EditText) solo.getView(R.id.experiment_description_input);\n solo.clickOnView(descriptionBox);\n solo.sleep(1000);\n\n //Type in a description\n solo.typeText(descriptionBox, description);\n\n //Click on geo location required toggle\n solo.clickOnView(solo.getView(R.id.geo_location_toggle));\n\n //Click on min trials editText\n EditText minTrialsBox = (EditText) solo.getView(R.id.minimum_trials_input);\n solo.clickOnView(minTrialsBox);\n solo.sleep(500);\n\n //Type in minTrials\n solo.typeText(minTrialsBox, minTrials);\n\n //Click on experiment region\n EditText regionBox = (EditText) solo.getView(R.id.experiment_region_input);\n solo.clickOnView(regionBox);\n solo.sleep(500);\n\n //Type in a region\n solo.typeText(regionBox, region);\n\n //Click on unit\n EditText unitBox = (EditText) solo.getView(R.id.experiment_variable_name_input);\n solo.clickOnView(unitBox);\n solo.sleep(500);\n\n //Type in a unit\n solo.typeText(unitBox, unit);\n\n //Click on publish\n solo.clickOnView(solo.getView(R.id.publish_experiment_button));\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(context, ChatActivity.class);\n intent.putExtra(\"hisUid\", post.getRequester_UID());\n intent.putExtra(\"requestPost\", post);\n intent.putExtra(\"cplatformPost\", postData);\n context.startActivity(intent);\n activity.finish();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetTranslucentStatus();\n\t\tsetContentView(R.layout.layout_postlist);\n\t\tMyApplication.getInstance().addActivity(this);\n\t\tiniView();\n\t\tsetListeners();\n\t\tmIntent = this.getIntent();\n\t\tif (mIntent.getStringExtra(\"ArticleID\") == null) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tArticleID = mIntent.getStringExtra(\"ArticleID\");\n\t\t}\n\t\t// iniCHKInfo();\n\t\tif (hasInternetConnected()) {\n\t\t\t// imageLoader = ImageLoader.getInstance();\n\t\t\t// imageLoader.init(ImageLoaderConfiguration.createDefault(PostList.this));\n\t\t\tsearchPostList();\n\t\t} else {\n\t\t\tToast.makeText(ReplyAct.this, R.string.msgUninternet,\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t}\n\n\t}" ]
[ "0.61062324", "0.5934314", "0.5891674", "0.5619966", "0.5610581", "0.5552256", "0.5548374", "0.5482533", "0.54438585", "0.54165125", "0.5392921", "0.5389614", "0.53756446", "0.5332392", "0.5323969", "0.5315167", "0.5310544", "0.5299023", "0.5295557", "0.52899367", "0.52882814", "0.5270427", "0.5254652", "0.52511394", "0.523478", "0.5227255", "0.5226409", "0.52182674", "0.52049416", "0.5202782", "0.5199531", "0.5153228", "0.51497006", "0.5144511", "0.5135533", "0.51142275", "0.51058865", "0.5100498", "0.5084927", "0.50783926", "0.50647116", "0.506419", "0.506101", "0.5060738", "0.50519925", "0.50422215", "0.5039682", "0.5034785", "0.5030742", "0.500805", "0.49996397", "0.49975622", "0.49886855", "0.49883223", "0.49871162", "0.49829274", "0.4982487", "0.49797264", "0.4965791", "0.49657828", "0.49532768", "0.49528468", "0.49445868", "0.4942315", "0.49399626", "0.49333075", "0.4925795", "0.49252757", "0.49205554", "0.49157482", "0.4903772", "0.49016398", "0.48998588", "0.48919842", "0.48904458", "0.48885807", "0.48721787", "0.48679444", "0.48662025", "0.48610336", "0.4860196", "0.48505124", "0.48408285", "0.48353055", "0.48270682", "0.48174047", "0.48135477", "0.48049802", "0.48037428", "0.4801176", "0.47972777", "0.47945413", "0.47874117", "0.4784422", "0.47812212", "0.47740874", "0.47734267", "0.47691193", "0.47543657", "0.47518307", "0.47471982" ]
0.0
-1
Get a connection to our SQLite database.
public static Connection getConnection() throws SQLException { Connection conn = DriverManager.getConnection(DB_URL, DB_USERNAME, DB_PASSWORD); System.out.println("Connection to SQLite has been established."); return conn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Connection getConnection() {\n try {\n return DriverManager.getConnection(\"jdbc:sqlite:\" + dbName);\n } catch (SQLException e) {\n return null;\n }\n }", "private Connection connect() {\n String url = \"jdbc:sqlite:\" + dbPath + dbName;\n Connection con = null;\n try {\n con = DriverManager.getConnection(url);\n }\n catch (SQLException e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n\n return con;\n }", "private Connection connect() {\n // SQLite connection string\n \tString url = \"jdbc:sqlite:DataBase/\" + database;\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "private Connection getDBConnection(){\n\t\tConnection conn = null;\n\t\t\t\t\n\t\ttry{\n\t\t\t\t// name of the database\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch(ClassNotFoundException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\t\t\n\t\ttry{\n\t\t\t// type of the database file\n\t\t\tString url = \"jdbc:sqlite:vehicles.sqlite\";\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t}catch(SQLException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn conn;\n\t}", "public Connection connect() {\n // SQLite connection string\n String url = \"jdbc:sqlite:c:/Carapaca/server/db/database.db\";\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}", "public static Connection dbConnection()\r\n\t{\r\n\t\t\r\n\t\t Connection c = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\r\n\t\t} \r\n\t\tcatch (ClassNotFoundException e1) \r\n\t\t{\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tc = DriverManager.getConnection(\"jdbc:sqlite:Patients.db\");\r\n\t\t\t\t\r\n\t\t\t\treturn c;\r\n\t\t\t} \r\n\t\t\t\tcatch (SQLException e) \r\n\t\t\t\t{\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\treturn c;\r\n\t\t\r\n\t}", "private Connection connect() {\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\"); //make sure jdbc exists and can be found\n c = DriverManager.getConnection(\"jdbc:sqlite:\" + url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n return c;\n }", "protected static Connection connect() {\n // SQLite connection string\n String url = \"jdbc:sqlite:database1.db\";\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(\"Connect: \" + e.getMessage());\n }\n return conn;\n }", "public Connection createConnection() {\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n c = DriverManager.getConnection(\"jdbc:sqlite:ase_i3.db\");\n } catch (Exception e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n return null;\n }\n System.out.println(\"Database connection succeed.\");\n return c;\n }", "private static Connection connect(){\n Connection conn = null;\n try{\n Class.forName(\"org.sqlite.JDBC\");\n conn = DriverManager.getConnection(\"jdbc:sqlite:devices.db\");\n } catch (ClassNotFoundException | SQLException e){\n System.out.println(e.toString());\n }\n return conn;\n }", "protected static Connection connect() throws SQLException, ClassNotFoundException {\r\n String url = \"jdbc:sqlite:\" + databasePath;\r\n Connection conn;\r\n\r\n Class.forName(DRIVER);\r\n SQLiteConfig config = new SQLiteConfig();\r\n config.enforceForeignKeys(true);\r\n conn = DriverManager.getConnection(url, config.toProperties());\r\n\r\n return conn;\r\n }", "private Connection connect() {\n\t String url = \"jdbc:sqlite:\" + this.db;\r\n\t Connection conn = null;\r\n\t try {\r\n\t \t// Incercam conexiunea la baza de date\r\n\t conn = DriverManager.getConnection(url);\r\n\t } catch (SQLException e) {\r\n\t System.out.println(e.getMessage());\r\n\t }\r\n\t return conn; // returnam conexiunea, daca aceasta s-a facut fara erori\r\n\t }", "public Connection connect() throws SQLException {\n Connection connection = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n String url = \"jdbc:sqlite:\" + dbName;\n connection = DriverManager.getConnection(url);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n return connection;\n }", "private Connection getConnection() throws SQLException { //gets and returns a connection to the database at the file path specified when the object was instantiated\n return DriverManager.getConnection(\"jdbc:sqlite:\" + databasePath); //returns the connection to the specified database\n }", "public Connection connectToDb() {\n\t\ttry {\n\t\t\t // load the SQLite-JDBC driver using the current class loader\n\t\t Class.forName(\"org.sqlite.JDBC\");\n\t\t myDb = DriverManager.getConnection(\"jdbc:sqlite:Auth.db\");\n\t\t Statement statement = myDb.createStatement();\n\t\t statement.setQueryTimeout(30); // set timeout to 30 seconds.\n\t\t return myDb;\n\t\t}catch(Exception e){\n\t\t\tJOptionPane.showMessageDialog(null,\n\t \t\t \"Cannot Connect to DB\",\n\t \t\t \"Error\",\n\t \t\t JOptionPane.ERROR_MESSAGE);\n\t\t\t\n\t\t\treturn null;\n\t\t}\n\t}", "public Connection connectDB (){\n try{\n Class.forName(\"org.sqlite.JDBC\");\n Connection conn = DriverManager.getConnection(\"jdbc:sqlite:awesomexDB.db\");\n //System.out.println(\"connection estd...\");\n return conn;\n } catch(Exception e){\n System.out.println(\"unable to connect\");\n return null;\n }\n }", "public Connection openConnection(){\n try {\n c = DriverManager.getConnection(\"jdbc:sqlite:LIB.db\");\n s = c.createStatement();\n\n System.out.println(\"Database connection open\");\n return c;\n }catch (SQLException e) {\n System.err.println(\"Opening connection failed: \" + e.getMessage());\n }\n return null;\n }", "public Connection my_connection() {\n String url = \"jdbc:sqlite:Database/Project1.db\";\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n System.out.println(\"Connection to SQLite has been established.\");\n } catch (SQLException e) {\n System.out.println(\"In Exception Block Error\"); \n System.out.println(e.getMessage());\n }\n return conn;\n }", "private SQLiteDatabase openConnection() {\n\n sqlLiteHelper = new SQLLiteHelper(DatabaeServiceContext);\n return sqlLiteHelper.getWritableDatabase();\n\n }", "private Connection connect() throws SQLException {\n\t\treturn DriverManager.getConnection(\"jdbc:sqlite:database/scddata.db\");\n\t}", "public static Connection connectToDB(){\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n c = DriverManager.getConnection(\"jdbc:sqlite:C:\\\\Users\\\\abbas\\\\Documents\\\\NetBeansProjects\\\\Plookify\\\\build\\\\classes\\\\Abbas\\\\plookifyDB.sqlite\");\n c.setAutoCommit(false);\n System.out.println(\"Opened database successfully\");\n } catch ( Exception e ) {\n System.err.println( e.getClass().getName() + \": \" + e.getMessage() );\n }\n //System.out.println(\"Opened database successfully\");\n return c;\n }", "public static Connection getConnection() {\n Connection con = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n con = DriverManager.getConnection(\n \"jdbc:hsqldb:mem:avdosdb\", \"sa\", \"\");\n } catch(Exception e) {\n e.printStackTrace();\n }\n return con;\n }", "private Connection createConnection() {\r\n\tConnection result = null;\r\n\r\n\ttry {\r\n\t Class.forName(\"org.sqlite.JDBC\");\r\n\t result = DriverManager.getConnection(\"jdbc:sqlite:\" + fileName);\r\n\t} catch (Exception e) {\r\n\t result = null;\r\n\t}\r\n\r\n\treturn result;\r\n }", "public static Connection getConnection() {\n if(connection == null) {\n Statement statement = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n connection = DriverManager.getConnection(\"jdbc:sqlite::memory:\");\n \n statement = connection.createStatement();\n \n BufferedReader input = new BufferedReader(new FileReader(\"db/schema.sql\"));\n String contents;\n String sql = \"\";\n while((contents = input.readLine()) != null) {\n sql += contents;\n }\n input.close();\n \n statement.executeUpdate(sql);\n }\n catch (Exception e) \n { \n e.printStackTrace(); \n }\n finally {\n try {\n statement.close();\n }\n catch (Exception e) \n { \n e.printStackTrace(); \n }\n }\n }\n return connection;\n }", "public Connection getConnection() {\n if(connection == null) throw new RuntimeException(\"Attempt to get database connection before it was initialized\");\n return connection;\n }", "public Connection getDBConnection() {\n Connection con = connectDB();\n createTables(con);\n return con;\n }", "public Connection getDBConnection()\r\n {\r\n Connection conn = null;\r\n try\r\n {\r\n // Quitamos los drivers\r\n Enumeration e = DriverManager.getDrivers();\r\n while (e.hasMoreElements())\r\n {\r\n DriverManager.deregisterDriver((Driver) e.nextElement());\r\n }\r\n DriverManager.registerDriver(new com.geopista.sql.GEOPISTADriver());\r\n String sConn = aplicacion.getString(UserPreferenceConstants.LOCALGIS_DATABASE_URL);\r\n conn = DriverManager.getConnection(sConn);\r\n AppContext app = (AppContext) AppContext.getApplicationContext();\r\n conn = app.getConnection();\r\n conn.setAutoCommit(false);\r\n } catch (Exception e)\r\n {\r\n return null;\r\n }\r\n return conn;\r\n }", "private static Connection getConnection(Connection connection) {\n\n\t\tif (connection == null) {\n\n\t\t\ttry {\n\t\t\t\tconnection = DriverManager.getConnection(\"jdbc:sqlite:lingo.db.sqlite3\");\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\n\t\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t\t}\n\t\t}\n\t\treturn connection;\n\t}", "public static Connection getConnectionToDB() {\n\t\tProperties properties = getProperties();\n\n\t\ttry {\n\t\t\tmyConnection = DriverManager.getConnection(JDBC_URL, properties);\n\t\t\treturn myConnection;\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public Connection getConnection(){\n try {\n return connectionFactory.getConnection(); // wird doch schon im Konstruktor von TodoListApp aufgerufen ???\n } catch (SQLException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }", "public static Connection getConnection() {\n\t\ttry {\n\t\t\treturn DBUtil.getInstance().ds.getConnection();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\n\t}", "public static DatabaseConnection getDb() {\n return db;\n }", "public Connection getConnection() {\n try {\n return ds.getConnection();\n } catch (SQLException e) {\n System.err.println(\"Error while connecting to database: \" + e.toString());\n }\n return null;\n }", "public static Connection getConnection() {\r\n\t\tConnection connection = null;\r\n\t\ttry {\r\n\t\t\tString dbDirectory = \"C:/Users/MAX-Student/Desktop/java/db\";\r\n\t\t\tSystem.setProperty(\"derby.system.home\", dbDirectory);\r\n\r\n\t\t\t// set the db url, username, and password\r\n\t\t\tString url = \"jdbc:derby:InspirationalDB\";\r\n\t\t\tString username = \"\";\r\n\t\t\tString password = \"\";\r\n\r\n\t\t\tconnection = DriverManager.getConnection(url, username, password);\r\n\t\t\treturn connection;\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\tfor (Throwable t : e)\r\n\t\t\t\tt.printStackTrace(); // for debugging\r\n\t\t\treturn null;\r\n\t\t }\r\n\t}", "public IDatabaseConnection getConnection() {\n try {\n DatabaseConnection databaseConnection = new DatabaseConnection(getDataSource().getConnection());\n editConfig(databaseConnection.getConfig());\n return databaseConnection;\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public Connection connection()\n {\n String host = main.getConfig().getString(\"db.host\");\n int port = main.getConfig().getInt(\"db.port\");\n String user = main.getConfig().getString(\"db.user\");\n String password = main.getConfig().getString(\"db.password\");\n String db = main.getConfig().getString(\"db.db\");\n\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setServerName(host);\n dataSource.setPort(port);\n dataSource.setUser(user);\n if (password != null ) dataSource.setPassword(password);\n dataSource.setDatabaseName(db);\n Connection connection = null;\n try\n {\n connection = dataSource.getConnection();\n }\n catch (SQLException sqlException)\n {\n sqlException.printStackTrace();\n }\n return connection;\n }", "public static Connection getConnection()\n {\n if (ds == null) {\n try {\n initCtx = new InitialContext();\n envCtx = (Context) initCtx.lookup(\"java:comp/env\");\n ds = (DataSource) envCtx.lookup(dbName);\n }\n catch (javax.naming.NamingException e) {\n Logger.log(Logger.ERROR, \"A problem occurred while retrieving a DataSource object\");\n Logger.log(Logger.ERROR, e.toString());\n }\n }\n\n Connection dbCon = null;\n try {\n dbCon = ds.getConnection();\n }\n catch (java.sql.SQLException e) {\n Logger.log(Logger.ERROR, \"A problem occurred while connecting to the database.\");\n Logger.log(Logger.ERROR, e.toString());\n }\n return dbCon;\n }", "public Connection getConnection(){\n\n String url1 = \"jdbc:sqlite:\"+ System.getProperty(\"user.dir\") +\"\\\\..\\\\..\\\\..\\\\database\\\\student_report_card.db\";\n\n try{\n //Class.forName(\"com.mysql.cj.jdbc.Driver\");\n System.out.println(System.getProperty(\"user.dir\"));\n Class.forName(\"org.sqlite.JDBC\");\n System.out.println(\"Connecting to SQLite database\");\n databaseLink = DriverManager.getConnection(url1);\n System.out.println(\"Connection to SQLite database has been established.\");\n }catch (Exception e){\n e.printStackTrace();\n }\n\n return databaseLink;\n }", "public static Connection getDbConnection() throws SQLException {\n return getDbConnection(FxContext.get().getDivisionId());\n }", "private SQLite sqLiteConnect(DatabaseConfig config){\n SQLite result;\n String filePath = String.format(\"database\\\\%s.db\", config.getSqlName());\n result = new SQLite(filePath);\n\n if(result.connect())\n ItemBox.getLogger().info(\"[Database] connect successful \" + filePath);\n\n else{\n ItemBox.getLogger().severe(\"[Database] connect fail \" + filePath);\n return null;\n }\n\n SQLiteTable sqLiteTable = convertToSQLiteTable(config);\n SQLite.Status sqLiteResult = result.createTable(sqLiteTable);\n\n if(sqLiteResult == SQLite.Status.SUCCESS){\n ItemBox.getLogger().info(String.format(\"[Database] add table \\\"%s\\\" to %s\", config.getTableName(), filePath));\n }else{\n ItemBox.getLogger().info(String.format(\"[Database] found table \\\"%s\\\" from %s\", config.getTableName(), filePath));\n }\n\n ItemBox.getLogger().info(String.format(\"[Database] sql \\\"%s\\\" connected\", config.getSqlName()));\n return result;\n }", "private Connection getDb() throws TzException {\n if (conn != null) {\n return conn;\n }\n\n try {\n dbPath = cfg.getDbPath();\n\n if (debug()) {\n debug(\"Try to open db at \" + dbPath);\n }\n\n conn = DriverManager.getConnection(\"jdbc:h2:\" + dbPath,\n \"sa\", \"\");\n\n final ResultSet rset =\n conn.getMetaData().getTables(null, null,\n aliasTable, null);\n if (!rset.next()) {\n clearDb();\n loadInitialData();\n }\n } catch (final Throwable t) {\n // Always bad.\n error(t);\n throw new TzException(t);\n }\n\n return conn;\n }", "public static Connection getConnection() {\n return singleInstance.createConnection();\n }", "private static Connection getDBConnection() {\n\n\t\tConnection dbConnection = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(DB_DRIVER);\n\n\t\t} catch (ClassNotFoundException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\n\t\ttry {\n\n\t\t\tdbConnection = DriverManager.getConnection(DB_CONNECTION, DB_USER,\n\t\t\t\t\tDB_PASSWORD);\n\t\t\treturn dbConnection;\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\n\t\treturn dbConnection;\n\n\t}", "public static Connection getConnection() {\r\n\r\n\t\tConfigLoader loader = new ConfigLoader();\r\n\t\tProperties properties = null;\r\n\t\t;\r\n\t\ttry {\r\n\t\t\tproperties = loader.loadConfigurations();\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(e.getStackTrace().toString());\r\n\t\t}\r\n\t\tConnection connection = null;\r\n\t\ttry {\r\n\t\t\tString url = properties.getProperty(\"hsqldb.url\");\r\n\t\t\tString user = properties.getProperty(\"hsqldb.user\");\r\n\t\t\tString password = properties.getProperty(\"hsqldb.password\");\r\n\t\t\tlogger.info(\"Connecting to hsqlDB with db:\" + url);\r\n\t\t\tconnection = DriverManager.getConnection(url, user, password);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(e.getStackTrace().toString());\r\n\t\t}\r\n\t\treturn connection;\r\n\t}", "public static Connection getDBInstance() {\r\n\t\tif (db == null)\r\n\t\t\ttry {\r\n\t\t\t\tloadDBDriver();\r\n\t\t\t\tdb = DriverManager.getConnection(url, user, password);\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\treturn db;\r\n\t}", "private Connection connect(String dbName) {\r\n\t\tString url = \"jdbc:sqlite:\" + dbName; // dbName is looked in project folder\r\n\t\tConnection conn = null;\r\n\t\ttry {\r\n\t\t\t// create a connection to the db\r\n\t\t\tconn = DriverManager.getConnection(url);\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace(System.out);\t\r\n\t\t}\r\n\t\treturn conn;\r\n\t}", "private Connection getDBConnection() {\n\n\t\tConnection dbConnection = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(dbDriver);\n\n\t\t} catch (ClassNotFoundException e) {\n\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t}\n\n\t\ttry {\n\n\t\t\tdbConnection = DriverManager.getConnection(dbConnectionURL, dbUser, dbPassword);\n\t\t\treturn dbConnection;\n\n\t\t} catch (SQLException e) {\n\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t}\n\n\t\treturn dbConnection;\n\n\t}", "public static Connection getConnection() {\r\n\t\tConnection conn = null;\r\n\t\ttry {\r\n\t\t\tClass.forName(DB_DRIVER);\r\n\t\t\tconn = DriverManager.getConnection(DRIVER_URL, DB_USERNAME,\r\n\t\t\t\t\tDB_PASSWORD);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn conn;\r\n\t}", "public Connection getConnection() throws SQLException {\n\t\treturn Database.getConnection();\n\t}", "public static Connection getConnection() {\n\t\t\n\t\treturn conn;\n\t}", "public static Connection getConnection() throws SQLException {\n\t\t// Create a connection reference var\n\t\tConnection con = null;\n\n\t\t// Int. driver obj from our dependency, connect w/ JDBC\n\t\tDriver postgresDriver = new Driver();\n\t\tDriverManager.registerDriver(postgresDriver);\n\n\t\t// Get database location/credentials from environmental variables\n\t\tString url = System.getenv(\"db_url\");\n\t\tString username = System.getenv(\"db_username\");\n\t\tString password = System.getenv(\"db_password\");\n\t\t\n\t\t// Connect to db and assign to con var.\n\t\tcon = DriverManager.getConnection(url, username, password);\n\n\t\t// Return con, allowing calling class/method etc to use the connection\n\t\treturn con;\n\t}", "public static Connection establishConnection() {\n\t\tProperties props = new Properties();\n\t\tprops.setProperty(\"gssEncMode\", \"disable\");\n\t\tprops.setProperty(\"user\", \"pi\");\n\t\tprops.setProperty(\"password\", \"Bdw040795\"); // Should probably find a way to not have password in plaintext\n\t\tprops.setProperty(\"sslmode\", \"disable\");\n\t\tConnection WeatherDB;\n\t\ttry {\n\t\tWeatherDB = DriverManager.getConnection(\"jdbc:postgresql://10.0.0.100:5433/weather_app\", props);\n\t\treturn WeatherDB;\n\t\t} catch (SQLException e) {\n\t\te.printStackTrace();\n\t\tWeatherDB = null;\n\t\treturn WeatherDB;\n\t\t}\n\t}", "private Connection getConnection() {\n if (_connection != null) return _connection;\n\n Element ncElement = getNetcdfElement();\n \n //See if we can get the database connection from a JNDI resource.\n String jndi = ncElement.getAttributeValue(\"jndi\");\n if (jndi != null) {\n try {\n Context initCtx = new InitialContext();\n Context envCtx = (Context) initCtx.lookup(\"java:comp/env\");\n DataSource ds = (DataSource) envCtx.lookup(jndi);\n _connection = ds.getConnection();\n } catch (Exception e) {\n String msg = \"Failed to get database connection from JNDI: \" + jndi;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n }\n return _connection;\n }\n\n //Make the connection ourselves.\n String connectionString = ncElement.getAttributeValue(\"connectionString\");\n String dbUser = ncElement.getAttributeValue(\"dbUser\");\n String dbPassword = ncElement.getAttributeValue(\"dbPassword\");\n String jdbcDriver = ncElement.getAttributeValue(\"jdbcDriver\");\n \n try {\n Class.forName(jdbcDriver);\n _connection = DriverManager.getConnection(connectionString, dbUser, dbPassword);\n } catch (Exception e) {\n String msg = \"Failed to get database connection: \" + connectionString;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n } \n \n return _connection;\n }", "public Connection openConnection() throws DataAccessException {\n try {\n //The Structure for this Connection is driver:language:path\n //The path assumes you start in the root of your project unless given a non-relative path\n final String CONNECTION_URL = \"jdbc:sqlite:myfamilymap.sqlite\";\n\n // Open a database connection to the file given in the path\n conn = DriverManager.getConnection(CONNECTION_URL);\n\n // Start a transaction\n conn.setAutoCommit(false);\n } catch (SQLException e) {\n e.printStackTrace();\n throw new DataAccessException(\"Unable to open connection to database\");\n }\n\n return conn;\n }", "public static Connection conectDB(){\r\n \r\n \r\n try {\r\n Class.forName(\"org.sqlite.JDBC\");\r\n Connection conn = DriverManager.getConnection(\"jdbc:sqlite:Users.sqlite\"); //povezava \r\n System.out.println(\"Povezano z sql\"); // to sm naredu zato da vidim ce dela oz ce se je pravilno connectalo \r\n return conn;\r\n \r\n \r\n \r\n \r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, e);\r\n return null;\r\n \r\n \r\n }\r\n }", "private static Connection getConnection() throws SQLException {\n return DriverManager.getConnection(\"jdbc:derby:derbyDB\");\n }", "public Connection getConnection() {\n\t\t\tConnection conn = null;\n\t\t\tProperties prop = new Properties();\n\n\t\t\ttry {\n\t\t\t\tString url = \"jdbc:postgresql://java2010rev.cfqzgdfohgof.us-east-2.rds.amazonaws.com:5432/postgres?currentSchema=jensquared\";\n\t\t\t\tString username = \"jenny77\";\n\t\t\t\tString password = \"zeus1418\";\n//\t\t\t\tClassLoader loader = Thread.currentThread().getContextClassLoader();\n//\t prop.load(loader.getResourceAsStream(\"database.properties\"));\n//\t\t\t\tconn = DriverManager.getConnection(prop.getProperty(\"url\"),\n//\t\t\t\t\t\tprop.getProperty(\"username\"),prop.getProperty(\"password\"));\n\t\t\t\tconn = DriverManager.getConnection(url, username, password);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n//\t\t\t} catch (FileNotFoundException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n//\t\t\t} catch (IOException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn conn;\n\t\t}", "public static Connection getConnection() {\n Connection localConnection = connection;\n if (localConnection == null) synchronized (DB_ConnectionProvider.class) {\n\n // multi thread supported, double checker lock\n\n localConnection = connection;\n if (localConnection == null) {\n try {\n Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n // oracle driver: oracle.jdbc.driver.OracleDriver\n // mysql driver: com.mysql.jdbc.Driver\n connection = localConnection = DriverManager.getConnection(\n \"jdbc:oracle:thin:@localhost:1521:XE\", USERNAME, PASSWORD);\n // mysql url: jdbc:mysql://localhost:3306/world\n // oracle url: jdbc:oracle:thin:@localhost:1521:XE\n } catch (Exception ex) {\n System.out.println(\"Could not connect with the database.\");\n }\n }\n }\n return localConnection;\n }", "public static Connection createConnection() {\n\t\treturn new FabricaDeConexoes().getConnection();\n\t}", "public static Connection getConnection() {\r\n\t\tsetProperties();\r\n\t\tConnection connection = null;\r\n\t\ttry {\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tconnection = (Connection) DriverManager.getConnection(DBURL,\r\n\t\t\t\t\tproperties);\r\n//\t\t\tSystem.err.println(\"Connection Established\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"connection Not Established\");\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t}\r\n\t\treturn connection;\r\n\t}", "private Connection getConnection() throws ClassNotFoundException, SQLException {\n\n log.info(\"Get DB connection\");\n\n String url = AppConfig.getInstance().getProperty(\"db.URL\") +\n AppConfig.getInstance().getProperty(\"db.schema\") +\n AppConfig.getInstance().getProperty(\"db.options\");\n String sDBUser = AppConfig.getInstance().getProperty(\"db.user\");\n String sDBPassword = AppConfig.getInstance().getProperty(\"db.password\");\n\n if (sDBUser != null && sDBPassword != null && sDBPassword.startsWith(\"crypt:\")) {\n AltEncrypter cypher = new AltEncrypter(\"cypherkey\" + sDBUser);\n sDBPassword = cypher.decrypt(sDBPassword.substring(6));\n }\n\n return DriverManager.getConnection(url, sDBUser, sDBPassword);\n }", "public static Connection getConnection() {\n Connection conn = null;\n\n try {\n DataSource dataSource = (DataSource) new InitialContext().lookup(\"jdbc/library\");\n conn = dataSource.getConnection();\n } catch (SQLException | NamingException e) {\n LOG.error(e.getMessage(), e);\n }\n return conn;\n }", "public Connection getConnection(){\n try{\n if(connection == null || connection.isClosed()){\n connection = FabricaDeConexao.getConnection();\n return connection;\n } else return connection;\n } catch (SQLException e){throw new RuntimeException(e);}\n }", "protected Connection getConnection()\n {\n Connection connection = null;\n try\n {\n connection = DriverManager.getConnection(url, user, password);\n }\n catch (SQLException ex)\n {\n Logger.getLogger(DB_Utils.class.getName()).log(Level.SEVERE, null, ex);\n }\n return connection;\n }", "public static Connection getDBConnection(){\n\t\tConnection conn = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t/*InputStream is = DBConfig.class.getClass().\r\n\t\t\t\t\tgetResourceAsStream(\"/resources/db.properties\");\r\n\t\t\tprop.load(is);\r\n\t\t\tClass.forName(prop.getProperty(\"drivername\"));\r\n\t\t\tconn = DriverManager.getConnection(prop.getProperty(\"jdbcurl\"),\r\n\t\t\t\t\tprop.getProperty(\"username\"),prop.getProperty(\"password\"));*/\r\n\t\t\t\r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\t\tconn = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:orcl\",\"fred\",\"flintstone\");\r\n\t\t\t/*Statement stmt = conn.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(\"SELECT LOCATION_NAME FROM LOCATIONS\");\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tSystem.out.println(rs.getString(\"LOCATION_NAME\"));\r\n\t\t\t}*/\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} /*catch (FileNotFoundException e){\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}*/\r\n\t\t\r\n\t\treturn conn;\r\n\t}", "private void connect() {\n try {\n Class.forName(\"org.sqlite.JDBC\");\n this.conn = DriverManager.getConnection(\"jdbc:sqlite:settings.db\");\n } catch (ClassNotFoundException | SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n }\n }", "protected Connection getConnection() throws PersistenceException {\r\n try {\r\n if (this.connectionName == null) {\r\n return dbConnectionFactory.createConnection();\r\n } else {\r\n return dbConnectionFactory.createConnection(connectionName);\r\n }\r\n } catch (DBConnectionException e) {\r\n StringBuffer sb = new StringBuffer(\"failed to obtain connection:\");\r\n sb.append((connectionName == null) ? \"default connection\" : connectionName);\r\n throw new PersistenceException(sb.toString(), e);\r\n }\r\n }", "public static Connection getInstance() {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/restaurant?useSSL=false\", \"root\", \"1234\");\n\t\t} catch (SQLException e) {\n\t\t\te.getStackTrace();\n\t\t}\n\t\treturn conn;\n\t}", "public Connection getConnection() throws DBAccessException;", "protected Connection connection() {\n\t\tif (connection == null) {\n\t\t\ttry {\n\t\t\t\tdblogger.info(\"Connecting to \" + connectionUrlString);\n\t\t\t\tconnection = DriverManager.getConnection(connectionUrlString,\n\t\t\t\t\t\tusername, password);\n\t\t\t} catch (SQLException exception) {\n\t\t\t\tdblogger.fatal(\"Failed to connect to database using \"\n\t\t\t\t\t\t+ connectionUrlString + \" User: \" + username\n\t\t\t\t\t\t+ \" Password: \" + password);\n\t\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\t\"Failed to connect to the database using \"\n\t\t\t\t\t\t\t\t+ connectionUrlString\n\t\t\t\t\t\t\t\t+ \". Please contact your DBA.\");\n\t\t\t}\n\t\t}\n\t\treturn connection;\n\t}", "public DatabaseConnection getDatabaseConnection() {\n return query.getDatabaseConnection();\n }", "static Connection getDBConnection(){\r\n\t\t if(mainConnection != null)\r\n\t\t\t return mainConnection;\r\n\t\t \r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\t// loading Oracle Driver\r\n\t\t \t\tSystem.out.print(\"Looking for Oracle's jdbc-odbc driver ... \");\r\n\t\t\t \tDriverManager.registerDriver(new oracle.jdbc.OracleDriver());\r\n\t\t\t \tSystem.out.println(\", Loaded.\");\r\n\r\n\t\t\t\t\tString URL = \"jdbc:oracle:thin:@localhost:1521:orcl\";\r\n\t\t\t \tString userName = \"system\";\r\n\t\t\t \tString password = \"password\";\r\n\r\n\t\t\t \tSystem.out.print(\"Connecting to DB...\");\r\n\t\t\t \tmainConnection = DriverManager.getConnection(URL, userName, password);\r\n\t\t\t \tSystem.out.println(\", Connected!\");\r\n\t\t \t\t}\r\n\t\t \t\tcatch (Exception e)\r\n\t\t \t\t{\r\n\t\t \t\tSystem.out.println( \"Error while connecting to DB: \"+ e.toString() );\r\n\t\t \t\te.printStackTrace();\r\n\t\t \t\tSystem.exit(-1);\r\n\t\t \t\t}\r\n\t\t\t\treturn mainConnection;\r\n\t\t \r\n\t}", "public static Connection getConnection() {\n \t\treturn connPool.getConnection();\n \t}", "public static Connection getConnection() {\n\t\treturn null;\r\n\t}", "public static Connection connect() throws SQLException {\n\t\tif (connection != null) {\n\t\t\treturn connection;\n\t\t} else {\n\n\t\t\tDBConnection db = new DBConnection();\n\t\t\treturn db.connection;\n\t\t}\n\n\t}", "public static Connection getConnection() {\n\t\treturn null;\n\t}", "private Connection connect() throws ConnectException {\n try {\n Class.forName(\"org.sqlite.JDBC\");\n return DriverManager.getConnection(this.databaseFile);\n } catch (SQLException | ClassNotFoundException e) {\n throw new ConnectException(\n String.format(\"Failed to create a database connection. %s\\n%s\", e.getMessage(), e));\n }\n }", "public static DbConnection getInstance() {\n if (!DbConnectionHolder.INSTANCE.isInitialized.get()) {\n synchronized (lock) {\n DbConnectionHolder.INSTANCE.initialize();\n }\n }\n return DbConnectionHolder.INSTANCE;\n }", "private Connection getConnection() {\n if ( conn==null ) {\n conn = Util.getConnection( \"root\", \"\" );\n }\n return conn;\n }", "private Connection getConnection() {\n\t\tlog.debug(\"getConnection start\");\n\t\tif (con != null)\n\t\t\treturn con;\n\t\tString url = \"jdbc:mysql://localhost:3306/\" + db;\n\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\").newInstance();\n\t\t\tlog.debug(\"getConnection obtained driver\");\n\t\t\tcon = DriverManager.getConnection(url, user, password);\n\t\t\tlog.debug(\"getConnection got connection\");\n\t\t} catch (Exception ex) {\n\t\t\tlog.error(\"getConnection: error:\" + ex.getMessage(), ex);\n\t\t\treturn null;\n\t\t}\n\t\treturn con;\n\t}", "public Connection getConexao() {\t\n\t\ttry {\n\t\t\t\n\t\t\tif (this.conn!=null) {\n\t\t\t\treturn this.conn;\n\t\t\t}\n\t\t\t\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/\"+this.db,this.user,this.pass);\n\t\t\t\n\t\t} catch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn this.conn;\n\t}", "public static MyConnection getConnection() throws SQLException{\n\t\treturn MyConnection.getConnection();\n\t}", "static Connection getDatabaseConnection(String path_to_config_json) {\n if (connection == null) {\n Gson gson = new Gson();\n Reader reader;\n try {\n reader = new FileReader(path_to_config_json);\n } catch (FileNotFoundException e) {\n logger.info(\"FileNotFoundException: \" + e.getMessage());\n return null;\n }\n DatabaseConfig config = gson.fromJson(reader, DatabaseConfig.class);\n logger.info(\"Connecting to database \" + config.database + \"...\");\n String username = config.username;\n String password = config.password;\n String database = String.format(\"%s%s:%s/%s%s\", config.jdbc_prefix, config.host, config.port,\n config.database, config.jdbc_setting);\n try {\n connection = DriverManager.getConnection(database, username, password);\n connection.setAutoCommit(false);\n logger.info(\"Connected to \" + config.database);\n } catch (Exception e) {\n logger.info(\"Cannot connect to database:'\" + database + \"' with error \" + e.getMessage());\n }\n }\n return connection;\n }", "public Connection DbConnection() throws Exception {\n Class.forName(\"com.mysql.jdbc.Driver\");\n\n // Creating a new connection\n // String myDB = \"jdbc:sqlite:C:\\\\Users\\\\kapersky\\\\Documents\\\\NetBeansProjects\\\\Library Management System\\\\src\\\\librarydb.db\";\n String myDB = \"jdbc:mysql://localhost:3306/librarydb\";\n con = DriverManager.getConnection(myDB, \"root\", \"\");\n return con;\n\n }", "protected void openConnection() {\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(\"jdbc:sqlite:\" + name);\n\t\t\tif (conn == null) {\n\t\t\t\tconnectionOpened = false;\n\t\t\t} else {\n\t\t\t\tconnectionOpened = true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Connect problem: \" + e.getMessage());\n\t\t\tconn = null;\n\t\t}\n\t}", "public Connection getDbConnect() {\n return dbConnect;\n }", "public static Connection getConnection() {\n\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = getConnectionPool().getConnection();\n\t\t} catch (Exception e) {\n\n\t\t\tthrow new SystemException(\"Getting Connection from DB Connection Pool\",e,SystemCode.UNABLE_TO_EXECUTE);\n\t\t}\n\t\treturn conn;\n\n\t}", "private Connection getConnection() {\n Connection conn = null;\n\n // Force the class loader to load the JDBC driver\n try { \n // The newInstance() call is a work around for some \n // broken Java implementations\n Class.forName(jdbcDriver).newInstance(); \n } catch (Exception ex) { \n System.err.println(\"Failed to load the JDBC driver: \" + jdbcDriver);\n }\n\n // Include the username and password on the URL\n StringBuffer url = new StringBuffer();\n url.append(jdbcUrl);\n if (jdbcUsername != null) {\n url.append(\"?user=\" + jdbcUsername);\n if (jdbcPassword != null) {\n url.append(\"&password=\" + jdbcPassword);\n }\n }\n\n // Establish a connection to the database\n try {\n conn = DriverManager.getConnection(url.toString());\n } catch (SQLException ex) {\n System.err.println(\"Failed to establish a database connection: url=\" + url.toString());\n System.err.println(\"SQLException: \" + ex.getMessage()); \n System.err.println(\"SQLState: \" + ex.getSQLState()); \n System.err.println(\"VendorError: \" + ex.getErrorCode()); \n ex.printStackTrace();\n }\n\n return conn;\n }", "public Connection getDatabaseConnection() {\n return con;\n }", "public static Connection getConnection() throws SQLException {\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\"); //registering Oracle Driver\n\t\t}\n\t\tcatch(ClassNotFoundException ex) {\n\t\t\tex.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tString url = System.getenv(\"DB_URL\"); // best not to hard code in your db credentials ! \n\t\tString username = System.getenv(\"DB_USERNAME\");\n\t\tString password = System.getenv(\"DB_PASSWORD\");\n\t\tif(connection == null || connection.isClosed()) {\n\t\t\tconnection = DriverManager.getConnection(url, username, password);\n\t\t\tSystem.out.println(connection.getMetaData().getDriverName());\n\t\t}\n\t\treturn connection;\n\t}", "private static Connection getConnection(){\n Connection conn = THREAD_CONNECTION.get();\n if(conn == null){\n try {\n conn = DATA_SOURCE.getConnection();\n } catch (SQLException e) {\n e.printStackTrace();\n LOGGER.error(\"getConnection error\", e);\n throw new RuntimeException(e);\n } finally {\n THREAD_CONNECTION.set(conn);\n }\n }\n AssertUtil.notNull(conn);\n return conn;\n }", "public Connection getConnection() throws PersistenceException {\r\n\t\tConnection connection;\r\n\r\n\t\tString password = null; \r\n\r\n\t\tProperties prop = new Properties();\r\n\t\tInputStream input = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\t\r\n\r\n\t\t\tprop.load(getClass().getClassLoader().getResourceAsStream(\"config.properties\"));\r\n\t\t\t// get the property value and print it out\r\n\r\n\t\t\tpassword = prop.getProperty(\"MYSQL_PASSWORD\");\r\n\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (input != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t} catch (IOException 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\r\n\r\n\t\ttry {\r\n\t\t\tClass.forName(driver);\r\n\t\t\t//Class.forName(\"org.postgresql.Driver\");\t\t//driver class loading\r\n\t\t\t/*\r\n\t\t\t * Now the driver is registered at DriverManager (postgreSQL driver automatically\r\n\t\t\t * registers itself at DriverManager once his class is loaded).\r\n\t\t\t * Since driver is loaded and registered, I can obtain a connection to the database \r\n\t\t\t */\r\n\t\t\tconnection = DriverManager.getConnection(dbURI, userName, password);\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tSystem.out.println(\"Where is your MySQL JDBC Driver?\");\r\n\t\t\t//\t\t\tSystem.out.println(\"Where is your postgreSQL JDBC Driver?\");\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new PersistenceException(e.getMessage());\r\n\t\t} catch(SQLException e) {\r\n\t\t\tthrow new PersistenceException(e.getMessage());\r\n\t\t}\r\n\t\treturn connection;\r\n\t}", "public final Connection getConnection() throws SQLException {\n\t\tString[] threadCredentials = (String[]) this.threadBoundCredentials.get();\n\t\tif (threadCredentials != null) {\n\t\t\treturn doGetConnection(threadCredentials[0], threadCredentials[1]);\n\t\t}\n\t\telse {\n\t\t\treturn doGetConnection(this.username, this.password);\n\t\t}\n\t}", "public final DBI getConnect() {\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n // String dbc = System.getenv(\"DB_CONNECTION\");\n // if (dbc == null || dbc.equals(\"\")) {\n // dbc = \"localhost:3306\";\n // }\n // DBI dbi = new DBI(\"jdbc:mysql://\" + dbc + \"/MLPXX?allowPublicKeyRetrieval=true&useSSL=false\", \"MLPXX\", \"MLPXX\");\n DBI dbi = new DBI(\"jdbc:mysql://localhost:3306/MLPXX?allowPublicKeyRetrieval=true&useSSL=false\", \"MLPXX\", \"MLPXX\");\n\n //DBI dbi = new DBI(\"jdbc:mysql://\" + dbc + \"/MLPXX?useSSL=false\", \"MLPXX\", \"MLPXX\");\n // dbi.setSQLLog(new PrintStreamLog());\n return dbi;\n } catch (ClassNotFoundException e) {\n //return null;\n throw new RuntimeException(e);\n }\n }", "public Connection getConnection() {\n java.sql.Connection connection = null;\n try {\n connection = DriverManager.getConnection(\n \"jdbc:postgresql://cslvm74.csc.calpoly.edu:5432/bfung\", \"postgres\",\n \"\");\n } catch (SQLException e) {\n System.out.println(\"Connection Failed! Check output console\");\n e.printStackTrace();\n return null;\n }\n return connection;\n }", "protected Connection openConnection() throws PersistenceException {\n\n String connectionName = getConnectionName();\n if ( connectionName == null){\n \tLOGGER.log(Level.INFO, new LogMessage(null, null, \"creating db connection using default connection\"));\n } else {\n \tLOGGER.log(Level.INFO, new LogMessage(null, null, \"creating db connection using connection name: \" + connectionName));\n }\n Connection conn = Helper.createConnection(getConnectionFactory(),\n connectionName);\n try {\n \tif(useManualCommit) {\n \t\tconn.setAutoCommit(false);\n \t}\n return conn;\n } catch (SQLException e) {\n throw new PersistenceException(\"Error occurs when setting \"\n + (connectionName == null ? \"the default connection\"\n : (\"the connection '\" + connectionName + \"'\"))\n + \" to support transaction.\", e);\n }\n\n }", "protected Connection createConnection() {\n Properties connectionProperties = new Properties();\n JdbcPropertyAdapter adapter = getPropertyAdapter(dbType, properties);\n adapter.getExtraProperties(connectionProperties);\n\n String url = translator.getUrl(properties);\n logger.info(\"Opening connection to: \" + url);\n Connection connection;\n try {\n connection = DriverManager.getConnection(url, connectionProperties);\n connection.setAutoCommit(false);\n } catch (SQLException x) {\n throw translator.translate(x);\n }\n return connection;\n }", "public Connection getConnection() {\n if (con == null) {\n try {\n con = DriverManager.getConnection(url, user, password);\n return con;\n } catch (SQLException e) {\n System.err.println(e.getMessage());\n }\n }\n\n return con;\n }", "public static Connection connectDB(){\n Connection conn = null; //initialize the connection\n try {\n //STEP 2: Register JDBC driver\n Class.forName(\"org.apache.derby.jdbc.ClientDriver\");\n\n //STEP 3: Open a connection\n System.out.println(\"Connecting to database...\");\n conn = DriverManager.getConnection(DB_URL);\n } catch (SQLException se) {\n //Handle errors for JDBC\n se.printStackTrace();\n } catch (Exception e) {\n //Handle errors for Class.forName\n e.printStackTrace();\n }\n return conn;\n }" ]
[ "0.81897515", "0.79797155", "0.7928559", "0.78769046", "0.7747184", "0.7746095", "0.77130556", "0.76507086", "0.7607046", "0.7602146", "0.75096875", "0.74486107", "0.7438923", "0.74337816", "0.74122643", "0.7373237", "0.7363082", "0.7362976", "0.73074055", "0.7222664", "0.72168404", "0.714728", "0.71171004", "0.70818025", "0.695156", "0.69340336", "0.6900608", "0.6872092", "0.6867421", "0.6860937", "0.6824733", "0.6823772", "0.68236965", "0.68184555", "0.68172485", "0.68126297", "0.6805815", "0.68045455", "0.6792333", "0.67901146", "0.67710304", "0.6751344", "0.67495817", "0.6749467", "0.6730196", "0.6730155", "0.67299104", "0.6715064", "0.6697948", "0.6673747", "0.6672487", "0.6664764", "0.6640421", "0.663451", "0.6613464", "0.660233", "0.6594486", "0.6583383", "0.65585506", "0.6547807", "0.6522779", "0.6521772", "0.6515396", "0.6500779", "0.64638215", "0.6459496", "0.64572316", "0.6442446", "0.64378166", "0.64338416", "0.64144355", "0.64101064", "0.6404675", "0.6403903", "0.6383815", "0.63814557", "0.6380484", "0.6376364", "0.63699967", "0.63668627", "0.6351774", "0.6350574", "0.6348344", "0.6345242", "0.63423884", "0.63415027", "0.63341904", "0.6324411", "0.63238996", "0.6316695", "0.63135475", "0.63092536", "0.63039833", "0.63022596", "0.6302103", "0.62946236", "0.6291883", "0.6284093", "0.62726724", "0.62719584" ]
0.77653533
4
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Tk25)) { return false; } Tk25 other = (Tk25) object; if ((this.tknummer == null && other.tknummer != null) || (this.tknummer != null && !this.tknummer.equals( other.tknummer))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public int getId(){ return id; }", "public int getId() {return id;}", "public int getId() {return Id;}", "public int getId(){return id;}", "public void setId(long id) {\n id_ = id;\n }", "private int getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId(){return id;}", "public int id() {return id;}", "public long getId(){return this.id;}", "public int getId(){\r\n return this.id;\r\n }", "@Override public String getID() { return id;}", "public Long id() { return this.id; }", "public Integer getId() { return id; }", "@Override\n\tpublic Integer getId() {\n return id;\n }", "@Override\n public Long getId () {\n return id;\n }", "@Override\n public long getId() {\n return id;\n }", "public Long getId() {return id;}", "public Long getId() {return id;}", "public String getId(){return id;}", "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "public Integer getId() { return this.id; }", "@Override\r\n public int getId() {\n return id;\r\n }", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "public int getId() {\n return id;\n }", "public long getId() { return _id; }", "public int getId() {\n/* 35 */ return this.id;\n/* */ }", "public long getId() { return id; }", "public long getId() { return id; }", "public void setId(Long id) \n {\n this.id = id;\n }", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "public void setId(String id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Long id) {\n\t}", "public Long getId() {\n return id;\n }", "public long getId() { return this.id; }", "public int getId()\n {\n return id;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}", "protected abstract String getId();", "@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}", "public int getID() {return id;}", "public int getID() {return id;}", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }", "public int getId ()\r\n {\r\n return id;\r\n }", "@Override\n public int getField(int id) {\n return 0;\n }", "public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }", "public int getId(){\r\n return localId;\r\n }", "void setId(int id) {\n this.id = id;\n }", "@Override\n public Integer getId() {\n return id;\n }", "@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "public int getId()\r\n {\r\n return id;\r\n }", "public void setId(Long id){\n this.id = id;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "private void clearId() {\n \n id_ = 0;\n }", "final protected int getId() {\n\t\treturn id;\n\t}", "public abstract Long getId();", "public void setId(Long id) \r\n {\r\n this.id = id;\r\n }", "@Override\n public long getId() {\n return this.id;\n }", "public String getId(){ return id.get(); }", "@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "public Long getId() \n {\n return id;\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "public int getID(){\n return id;\n }", "public int getId()\n {\n return id;\n }", "public String getID(){\n return Id;\n }" ]
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.6477893", "0.6426692", "0.6418966", "0.6416817", "0.6401561", "0.63664836", "0.63549376", "0.63515353", "0.6347672", "0.6324549", "0.6319196", "0.6301484", "0.62935394", "0.62935394", "0.62832105", "0.62710917", "0.62661785", "0.6265274", "0.6261401", "0.6259253", "0.62559646", "0.6251244", "0.6247282", "0.6247282", "0.6245526", "0.6238957", "0.6238957", "0.6232451", "0.62247443", "0.6220427", "0.6219304", "0.6211484", "0.620991", "0.62023336", "0.62010616", "0.6192621", "0.61895776", "0.61895776", "0.61893976", "0.61893976", "0.61893976", "0.6184292", "0.618331", "0.61754644", "0.6173718", "0.6168409", "0.6166131", "0.6161708", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.61556244", "0.61556244", "0.61430943", "0.61340135", "0.6128617", "0.6127841", "0.61065215", "0.61043483", "0.61043483", "0.6103568", "0.61028486", "0.61017346", "0.6101399", "0.6098963", "0.6094214", "0.6094", "0.6093529", "0.6093529", "0.6091623", "0.60896", "0.6076881", "0.60723215", "0.6071593", "0.6070138", "0.6069936", "0.6069529" ]
0.0
-1
Create a new repository assignment POJO
public RepositoryAssignment() { teamMembers = new ArrayList<String>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Assignment createAssignment();", "Assignment createAssignment();", "Assign createAssign();", "Policy_Repository createPolicy_Repository();", "TRepo createRepo();", "RepositoryType createRepositoryType();", "SourceBuilder createRepository();", "void setRepository(Repository repository);", "@Test\n public void create_ValidAssignment_ShouldReturnAssignment() throws Exception {\n when(service.save(Mockito.any(Assignment.class))).thenAnswer(a -> a.getArguments()[0]);\n final Assignment postedAssignment = RENTOKIL;\n final String postedAssignmentJSON = objectMapper.writeValueAsString(postedAssignment);\n\n // When we post a new assignment\n final String response = mockMvc.perform(post(ENDPOINT)\n .contentType(MediaType.APPLICATION_JSON)\n .content(postedAssignmentJSON))\n .andExpect(status().isCreated())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))\n .andReturn().getResponse().getContentAsString();\n\n // Then we get a JSON object, containing the full details of the assignment\n final Assignment returnedAssignment = objectMapper.readValue(response, Assignment.class);\n assertEquals(postedAssignment, returnedAssignment);\n }", "ProjetoRN createProjetoRN();", "TIAssignment createTIAssignment();", "WithCreate withRepoUrl(String repoUrl);", "public Assignment createAssignment(Assignment assignment) throws Exception {\n\t\ttry{ \n\t\t\tLog.d(\"AssignmentDataSource\",\"Create Assignment\");\n\t\t\tContentValues values = new ContentValues();\n\n\t\t\tvalues.put(MySQLiteHelper.ASSIGNMENT_TITLE,assignment.getTitle());\n\t\t\tvalues.put(MySQLiteHelper.ASSIGNMENT_SUBJECTS, assignment.getSubjects_id());\n\t\t\tif(assignment.getDescription()==null||assignment.getDescription().equals(\"\")){\n\t\t\t\tvalues.putNull(MySQLiteHelper.ASSIGNMENT_DESCRIPTION);\n\t\t\t}else{\n\t\t\t\tvalues.put(MySQLiteHelper.ASSIGNMENT_DESCRIPTION, assignment.getDescription());\n\t\t\t}\n\t\t\tLog.d(\"AssignmentDataSource\",\"assignment description : \"+assignment.getDescription());\n\t\t\tvalues.put(MySQLiteHelper.ASSIGNMENT_DUEDATE, assignment.getDueDate());\n\t\t\tvalues.put(MySQLiteHelper.ASSIGNMENT_DUETIME, assignment.getDueTime());\n\t\t\tif(assignment.getAlarm()==null||assignment.getAlarm().equals(\"\")){\n\t\t\t\tvalues.putNull(MySQLiteHelper.ASSIGNMENT_ALARM);\n\t\t\t}else{\n\t\t\t\tvalues.put(MySQLiteHelper.ASSIGNMENT_ALARM, assignment.getAlarm());\n\t\t\t}\n\t\t\tvalues.put(MySQLiteHelper.ASSIGNMENT_ACADEMIC,assignment.getAcademic_id());\n\n\t\t\tlong newId = database.insert(MySQLiteHelper.TABLE_ASSIGNMENT,\n\t\t\t\t\tnull,values);\n\n\t\t\tLog.d(\"AssignmentDataSource\",\"newId : \"+newId);\n\t\t\tCursor cursor = database.query(MySQLiteHelper.TABLE_ASSIGNMENT,\n\t\t\t\t\tallColumns, MySQLiteHelper.ASSIGNMENT_ID + \" = \" + newId, null,\n\t\t\t\t\tnull, null, null);\n\t\t\tcursor.moveToFirst();\n\t\t\tAssignment newAssignment = cursorToAssignment(cursor);\n\t\t\tcursor.close();\n\t\t\treturn newAssignment;\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tthrow e;\n\t\t}\n\t}", "private void createNewRepository() {\n\t\tRepositoryConfiguration conf = repositorySettingsJPanel\n\t\t\t\t.getRepositoryConfiguration();\n\n\t\t/*\n\t\t * if (RepositoryType.HTTP.equals(conf.getType())) { new\n\t\t * MessageDialog(this, \"TBD\",\n\t\t * \"The support for HTTP repository is not implemented yet\"\n\t\t * ).setVisible(true); return; }\n\t\t */\n\n\t\tif (!validateRepositoryConfiguration(conf)) {\n\t\t\t// fixme igor; mark what is wrong!!\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tContextHolder.getInstance().getApplicationConfiguration()\n\t\t\t\t\t.addRepositoryConfiguration(conf);\n\t\t} catch (AddRepositoryException e) {\n\t\t\tnew MessageDialog(this, \"Cannot create new repository\",\n\t\t\t\t\te.getMessage()).setVisible(true);\n\t\t\treturn;\n\t\t}\n\n\t\tAppEventsManager.getInstance().fireRepositoriesChanagedEvent(this);\n\t\tdispose();\n\t}", "public abstract void createAssignment(int p);", "@Override\n\tpublic void addAssignment(Assignment assignment) {\n\t\tassignRepo.save(assignment);\n\n\t}", "public ProductoRepository() {}", "public Repository() {\n\n }", "@Test\n\tpublic void addAssignment() {\n\t\tfinal Date dueDate = new Date();\n\t\tfinal Template template = new Template(\"Template 1\");\n\t\ttemplate.addStep(new TemplateStep(\"Step 1\", 1.0));\n\t\tfinal Assignment asgn = new Assignment(\"Assignment 1\", dueDate, template);\n\t\tasgn.addTask(new Task(\"Task 1\", 1, 1, asgn.getID()));\n\t\t\n\t\tfinal String asgnId = asgn.getID();\n\t\t\n\t\ttry {\n\t\t\tStorageService.addTemplate(template);\n\t\t\tStorageService.addAssignment(asgn);\n\t\t} catch (final StorageServiceException e) {\n\t\t\tfail(e.getMessage());\n\t\t}\n\t\t\n\t\tfinal Assignment afterAsgn = StorageService.getAssignment(asgnId);\n\t\tassertEquals(asgn.fullString(), afterAsgn.fullString());\n\t}", "private IAssignmentElement createAssignment() throws RodinDBException {\n\t\tfinal IMachineRoot mch = createMachine(\"mch\");\n\t\tfinal IEvent event = createEvent(mch, \"event\");\n\t\treturn event.createChild(IAction.ELEMENT_TYPE, null, null);\n\t}", "@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }", "ISModificationRepository createISModificationRepository();", "interface WithRepoUrl {\n /**\n * Specifies the repoUrl property: The repo url of the source control..\n *\n * @param repoUrl The repo url of the source control.\n * @return the next definition stage.\n */\n WithCreate withRepoUrl(String repoUrl);\n }", "@Repository\r\npublic interface AssignmentRepository extends CrudRepository<Assignment, String> {\r\n\r\n}", "@Test(enabled = true)\n public void createPerson() {\n List <Account> accounts = new ArrayList<>();\n List<Subscription> sub = new ArrayList<>();\n \n Contact contact = new Contact.Builder().emailaddress(\"[email protected]\").phoneNumber(\"021345685\").build();\n Address address = new Address.Builder().location(\"Daveyton\").streetName(\"Phaswane Street\").houseNumber(45).build();\n \n repo = ctx.getBean(PersonsRepository.class);\n Person p = new Person.Builder()\n .firstname(\"Nobu\")\n .lastname(\"Tyokz\")\n .age(25)\n .account(accounts)\n .sub(sub)\n .contact(contact)\n .address(address)\n .build();\n repo.save(p);\n id = p.getId();\n Assert.assertNotNull(p);\n\n }", "void createRepository(String projectKey, String repoName, String parentProjectKey) throws VersionControlException;", "public static void saveAssignment(Assignment assignment) {\n\n assert conn != null;\n String sqlStatement;\n\n try {\n\n sqlStatement = String.format(\"CREATE TABLE IF NOT EXISTS %s (id SERIAL UNIQUE, \" +\n \"%s UUID primary key, %s UUID references units(uuid), %s DATE, %s INTEGER)\",\n TABLE_ASSIGNMENTS, COLUMN_UUID, COLUMN_UNIT, COLUMN_DATE, COLUMN_TYPE);\n statement = conn.prepareStatement(sqlStatement);\n statement.execute();\n\n if (!checkAssignmentExists(assignment.getUuid())) {\n sqlStatement = String.format(\"INSERT INTO %s (%s, %s, %s, %s) VALUES (?, ?, ?, ?)\",\n TABLE_ASSIGNMENTS, COLUMN_UUID, COLUMN_UNIT, COLUMN_DATE, COLUMN_TYPE);\n statement = conn.prepareStatement(sqlStatement);\n statement.setObject(1, assignment.getUuid());\n statement.setObject(2, assignment.getUnitObject().getUuid());\n statement.setDate(3, assignment.getDate());\n statement.setInt(4, assignment.getTypeInt());\n statement.executeUpdate();\n }\n\n } catch (Exception e) {\n System.err.printf(\"%s: %s\", e.getClass().getName(), e.getMessage());\n } finally {\n try {\n if (statement != null) {\n statement.close();\n }\n } catch (Exception e) {\n System.err.printf(\"%s: %s\", e.getClass().getName(), e.getMessage());\n }\n }\n\n }", "TypeRepository createTypeRepository();", "protected void createRepository() throws Exception {\r\n\t\t\r\n\t\t//Creating MLSesame Connection object Using MarkLogicRepositoryConfig\r\n\t\t\r\n\t\tMarkLogicRepositoryConfig adminconfig = new MarkLogicRepositoryConfig();\r\n\t\tadminconfig.setHost(host);\r\n\t\tadminconfig.setAuth(\"DIGEST\");\r\n\t\tadminconfig.setUser(\"admin\");\r\n\t\tadminconfig.setPassword(\"admin\");\r\n\t\tadminconfig.setPort(restPort);\r\n\t\tRepositoryFactory factory = new MarkLogicRepositoryFactory();\r\n Assert.assertEquals(\"marklogic:MarkLogicRepository\", factory.getRepositoryType());\r\n try {\r\n\t\t\ttestAdminRepository = (MarkLogicRepository) factory.getRepository(adminconfig);\r\n\t\t} catch (RepositoryConfigException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n try {\r\n\t\t\ttestAdminRepository.initialize();\r\n\t\t\ttestAdminCon = (MarkLogicRepositoryConnection) testAdminRepository.getConnection();\r\n\t\t} catch (RepositoryException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n // Creating testAdminCon with MarkLogicRepositoryConfig constructor\r\n testAdminCon.close();\r\n testAdminRepository.shutDown();\r\n testAdminRepository = null; \r\n testAdminCon = null; \r\n \r\n adminconfig = new MarkLogicRepositoryConfig(host,restPort,\"admin\",\"admin\",\"DIGEST\");\r\n Assert.assertEquals(\"marklogic:MarkLogicRepository\", factory.getRepositoryType());\r\n testAdminRepository = (MarkLogicRepository) factory.getRepository(adminconfig);\r\n testAdminRepository.initialize();\r\n \r\n testAdminCon = testAdminRepository.getConnection();\r\n Assert.assertTrue(testAdminCon instanceof MarkLogicRepositoryConnection);\r\n \r\n Repository otherrepo = factory.getRepository(adminconfig);\r\n RepositoryConnection conn = null;\r\n try{\r\n \t //try to get connection without initializing repo, will throw error\r\n conn = otherrepo.getConnection();\r\n Assert.assertTrue(false);\r\n }\r\n catch(Exception e){\r\n \tAssert.assertTrue(e instanceof RepositoryException);\r\n \tAssert.assertTrue(conn == null);\r\n \totherrepo.shutDown();\r\n }\r\n \r\n Assert.assertTrue(testAdminCon instanceof MarkLogicRepositoryConnection);\r\n graph1 = testAdminCon.getValueFactory().createURI(\"http://marklogic.com/Graph1\");\r\n graph2 = testAdminCon.getValueFactory().createURI(\"http://marklogic.com/Graph2\");\r\n dirgraph = testAdminCon.getValueFactory().createURI(\"http://marklogic.com/dirgraph\");\r\n dirgraph1 = testAdminCon.getValueFactory().createURI(\"http://marklogic.com/dirgraph1\");\r\n \r\n \r\n //Creating MLSesame Connection object Using MarkLogicRepository overloaded constructor\r\n if(testReaderCon == null || testReaderRepository ==null){\r\n \ttestReaderRepository = new MarkLogicRepository(host, restPort, \"reader\", \"reader\", \"DIGEST\");\r\n\t try {\r\n\t\t\t\ttestReaderRepository.initialize();\r\n\t\t\t\tAssert.assertNotNull(testReaderRepository);\r\n\t\t\t\ttestReaderCon = (MarkLogicRepositoryConnection) testReaderRepository.getConnection();\r\n\t\t\t} catch (RepositoryException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t Assert.assertTrue(testReaderCon instanceof MarkLogicRepositoryConnection);\r\n\t \r\n\t }\r\n \r\n \r\n //Creating MLSesame Connection object Using MarkLogicRepository(databaseclient) constructor\r\n if (databaseClient == null){\r\n \tdatabaseClient = DatabaseClientFactory.newClient(host, restPort, \"writer\", \"writer\", DatabaseClientFactory.Authentication.valueOf(\"DIGEST\"));\r\n }\r\n \t\t\r\n\t\tif(testWriterCon == null || testWriterRepository ==null){\r\n\t\t\ttestWriterRepository = new MarkLogicRepository(databaseClient);\r\n\t\t\tqmgr = databaseClient.newQueryManager();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\ttestWriterRepository.initialize();\r\n\t\t\t\tAssert.assertNotNull(testWriterRepository);\r\n\t\t\t\ttestWriterCon = (MarkLogicRepositoryConnection) testWriterRepository.getConnection();\r\n\t\t\t} catch (RepositoryException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void populate(){\n salesRepRepository.save(new SalesRep(\"Maddy\"));\n salesRepRepository.save(new SalesRep(\"Jegor\"));\n salesRepRepository.save(new SalesRep(\"Natalia\"));\n salesRepRepository.save(new SalesRep(\"Joao\"));\n }", "@Test @Ignore(\"Only to run on test vertec instance\")\n public void canCreateOrganisation() {\n Organisation org = new Organisation();\n org.setActive(true);\n org.setBuildingName(\"building name\");\n org.setBusinessDomain(\"business domain\");\n org.setCategory(\"category\");\n org.setCity(\"city\");\n org.setCountry(\"country\");\n org.setName(\"GEBO test org\");\n org.setOwnedOnVertecBy(\"Sales Team\");\n org.setOwnerId(5295L);\n org.setStreet(\"street\");\n org.setStreet_no(\"street_no\");\n org.setWebsite(\"website\");\n org.setZip(\"zip\");\n org.setParentOrganisation(TESTVertecOrganisation2); //TODO figure out what to do here\n\n String uri = baseURI + \"/organisation\";\n ResponseEntity<String> res = postToVertec(org, uri, String.class);\n assertEquals(HttpStatus.CREATED, res.getStatusCode());\n\n }", "For createFor();", "Individual createIndividual();", "Relationship createRelationship();", "private ArtifactRepository createRepository( String url, String repositoryId )\n {\n // snapshots vs releases\n // offline = to turning the update policy off\n\n //TODO: we'll need to allow finer grained creation of repositories but this will do for now\n\n String updatePolicyFlag = ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS;\n\n String checksumPolicyFlag = ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN;\n\n ArtifactRepositoryPolicy snapshotsPolicy =\n new ArtifactRepositoryPolicy( true, updatePolicyFlag, checksumPolicyFlag );\n\n ArtifactRepositoryPolicy releasesPolicy =\n new ArtifactRepositoryPolicy( true, updatePolicyFlag, checksumPolicyFlag );\n\n return artifactRepositoryFactory.createArtifactRepository( repositoryId, url, defaultArtifactRepositoryLayout,\n snapshotsPolicy, releasesPolicy );\n }", "@Test\n\tpublic void testAddAssignment() {\n\t}", "public Assigner (String type){\n\t\tif(type.equals(\"owner\"))\n\t\t\tassignId(1);\n\t\telse\n\t\t\tassignId(2);\n\t}", "private void createDriver() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L,\n new Licence(\"Full for over 2 years\", \"YXF87231\",\n LocalDate.parse(\"12/12/2015\", formatter),\n LocalDate.parse(\"12/12/2020\", formatter)));\n }", "public void createProject(Project newProject);", "public Repository() {\n allShips = new ArrayList<>();\n }", "Account create();", "AssignmentRule createAssignmentRule();", "Project createProject();", "Project createProject();", "Project createProject();", "AchievementModel createAchievementModel(AchievementModel achievementModel);", "public interface AssignmentRepository extends JpaRepository<Assignment, Integer>, JpaSpecificationExecutor<Assignment> {\n}", "GoalModel createGoalModel();", "public UserInfoGenerator(IRepository repository) {\n this.repository = repository;\n }", "public static Projects createEntity() {\n Projects projects = new Projects();\n projects = new Projects()\n .name(DEFAULT_NAME)\n .startDate(DEFAULT_START_DATE)\n .endDate(DEFAULT_END_DATE)\n .status(DEFAULT_STATUS);\n return projects;\n }", "public interface OrganisationRepository extends Repository<Organisation, Long> {\n}", "OperacionColeccion createOperacionColeccion();", "public ProduktRepositoryImpl() {\n this.conn = DatabaseConnectionManager.getDatabaseConnection();\n }", "public interface ProjectMilestoneRepository extends MongoRepository<ProjectMilestone,String> {\n\n}", "Article createArticle();", "DomainModel createDomainModel();", "public Person create() {\n\t\treturn personRepository.create();\n\t}", "CreationData creationData();", "Operacion createOperacion();", "private EmployeeRepository(){\n\t\t\n\t}", "Repository getRepository();", "void setRepoType(String repoType);", "public long createAssignment(Assignment assignment) {\n long id = -1;\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues assignmentContentValues = new ContentValues();\n assignmentContentValues.put(Config.COLUMN_ASSIGNMENT_TITLE,\n assignment.getAssignmentTitle());\n assignmentContentValues.put(Config.COLUMN_COURSE_ID,\n assignment.getCourseID());\n assignmentContentValues.put(Config.COLUMN_ASSIGNMENT_GRADE,\n assignment.getGrade());\n\n try {\n id = db.insert(Config.TABLE_NAME_ASSIGNMENT,\n null, assignmentContentValues);\n } catch (SQLException e) {\n Log.d(TAG, \"Exception: \" + e.getMessage());\n Toast.makeText(context,\n \"Operation Failed: \" + e.getMessage(), Toast.LENGTH_LONG).show();\n } finally {\n db.close();\n }\n return id;\n }", "public LunchModel(LunchRepo repo) {\n this.repo = repo;\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\trepositoryEClass = createEClass(REPOSITORY);\n\t\tcreateEAttribute(repositoryEClass, REPOSITORY__NAME);\n\t\tcreateEAttribute(repositoryEClass, REPOSITORY__LOCATION);\n\n\t\trepositoryManagerEClass = createEClass(REPOSITORY_MANAGER);\n\t}", "public static void createRepo(String entityName,\n\t\t\tString idClass,\n\t\t\tString tableName,\n\t\t\tString repoName) throws Exception{\n VelocityEngine ve = new VelocityEngine();\n //ve.setProperty(RuntimeConstants.RESOURCE_LOADER, \"classpath\");\n // ve.setProperty(\"classpath.resource.loader.class\", ClasspathResourceLoader.class.getName());\n ve.init();\t\t\n /* next, get the Template */\n Template t = ve.getTemplate( \"./src/javautils/repositoryInterface.vm\" );\n /* create a context and add data */\n \n\n String idClassPack = (StringUtils.endsWith(idClass, \"PK\"))?\n \t\t\"import com.tb.aol.domain.entity.\" + idClass +\";\" : \"\";\n\n \t\n \t\n VelocityContext context = new VelocityContext();\n context.put(\"idclasspack\", idClassPack);\n context.put(\"idclass\", idClass);\n \n context.put(\"table\", tableName);\n context.put(\"fname\", repoName);\n context.put(\"entity\", entityName);\n \n \n \n /* now render the template into a StringWriter */\n StringWriter writer = new StringWriter();\n t.merge( context, writer );\n \n File file = new File(\"C:/rearch/temp/\"+repoName + \".java\");\n \n FileUtils.writeStringToFile(file, writer.toString(), \"UTF-8\");\n \n \t\t\n\t}", "public void setRepository(String repository) {\n this.repository = repository;\n }", "public void setRepository(String repository) {\n this.repository = repository;\n }", "Entity createEntity();", "Relation createRelation();", "Authorizor createAuthorizor();", "@Override\n public Room create(RoomResponseDTO roomResponseDTO) {\n return roomRepository.save(new Room(\n roomResponseDTO.getClassroomNumber()\n ));\n }", "public Repo() {\n //this.app = Init.application;\n }", "RentalAgency createRentalAgency();", "public static String findAndCreateRepositoryDescription(\n\t\t\tServiceExecutor executor) throws Throwable {\n\n\t\t// Find if exists\n\t\tString id = findRepositoryDescription(executor);\n\n\t\t// Create if needed\n\t\tif (id == null) {\n\t\t\tXmlDocMaker dm = new XmlDocMaker(\"args\");\n\t\t\tdm = new XmlDocMaker(\"args\");\n\t\t\tdm.add(\"namespace\", ASSET_NAMESPACE);\n\t\t\tdm.add(\"name\", ASSET_NAME);\n\n\t\t\t// Put a basic ACL on the objects. The system:manager needs to be\n\t\t\t// able to\n\t\t\t// manipulate it. End users should have the ability to see it.\n\t\t\tdm.push(\"acl\");\n\t\t\tdm.add(\"actor\", new String[] { \"type\", \"role\" },\n\t\t\t\t\t\"pssd.object.admin\");\n\t\t\tdm.add(\"access\", \"read-write\");\n\t\t\tdm.pop();\n\t\t\t//\n\t\t\tdm.push(\"acl\");\n\t\t\tdm.add(\"actor\", new String[] { \"type\", \"role\" }, \"pssd.model.user\");\n\t\t\tdm.add(\"access\", \"read\");\n\t\t\tdm.pop();\n\n\t\t\t// Do it\n\t\t\tXmlDoc.Element r2 = executor.execute(\"asset.create\", dm.root());\n\t\t\tid = r2.value(\"id\");\n\t\t}\n\n\t\t// Return id\n\t\treturn id;\n\t}", "E create(Resource data);", "@Override\r\n\tpublic Libro create(Libro libro) {\n\t\treturn libroRepository.save(libro);\r\n\t}", "public CountryResource(CountryRepository repository) {\n this.repository = repository;\n }", "Rental createRental();", "public void create(){}", "public interface ReviewAssignmentProjectManager extends Configurable {\n /**\n * Adds reviewers to project and extends some project phases if necessary.\n *\n * @param reviewAuction\n * Review auction.\n * @param project\n * the Project.\n * @param assignment\n * Set of approved review applications.\n *\n * @throws IllegalArgumentException\n * If any argument is null or assignment contains null key.\n * @throws ReviewAssignmentProjectManagementException\n * If any other error with managing projects resources and phases occurs.\n */\n public void addReviewersToProject(ReviewAuction reviewAuction, Project project,\n Set<ReviewApplication> assignment)\n throws ReviewAssignmentProjectManagementException;\n}", "public interface Repository {\n public void addPrg(PrgState prg);\n public List<PrgState> getAll();\n public void setAll(List<PrgState> _newPrgs);\n public void removeCurrent();\n public void logPrgStateExec() throws FileNotFoundException, UnsupportedEncodingException;\n public void logPrgStateExec(PrgState p) throws FileNotFoundException;\n public void serialize(PrgState prgState,String fname);\n public PrgState deserialize(String fname);\n PrgState getCurrent();\n}", "private void register_to_data_table() {\n\n\t\t\tfinal DataClient dc = this.task.data_client;\n\t\t\tfinal Transaction tx = dc.beginTransaction();\n\n\t\t\tfinal String repoid = this.op_repo;\n\t\t\tString uid = this.op_user;\n\n\t\t\tAliasDAO alias_dao = new AliasDAO(dc);\n\t\t\tuid = alias_dao.findUser(uid);\n\n\t\t\tRepoDTM repoinfo = dc.get(uid, RepoDTM.class);\n\t\t\tif (repoinfo == null) {\n\t\t\t\trepoinfo = new RepoDTM();\n\t\t\t\tdc.insert(uid, repoinfo);\n\t\t\t}\n\n\t\t\tMap<String, RepoItem> tab = repoinfo.getTable();\n\t\t\tif (tab.containsKey(repoid)) {\n\t\t\t\tString msg = \"the repo with name [%s] exists.\";\n\t\t\t\tmsg = String.format(msg, repoid);\n\t\t\t\tthrow new SnowflakeException(msg);\n\t\t\t}\n\n\t\t\tURI location = this.repo.getComponentContext().getURI();\n\n\t\t\tRepoItem item = new RepoItem();\n\t\t\titem.setName(repoid);\n\t\t\titem.setLocation(location.toString());\n\t\t\titem.setDescriptor(this.getRepoDescriptorId().toString());\n\t\t\ttab.put(repoid, item);\n\n\t\t\tdc.update(repoinfo);\n\n\t\t\ttx.commit();\n\n\t\t}", "public abstract AbstractTask createTask(String repositoryUrl, String id, String summary);", "public HawtDBAggregationRepository() {\n }", "Person createPerson();", "public HawtDBAggregationRepository(String repositoryName) {\n StringHelper.notEmpty(repositoryName, \"repositoryName\");\n this.repositoryName = repositoryName;\n }", "public OwlimRepositoryFactory() {\n\t\t\tthis(IWBFileUtil.getFileInDataFolder(Config.getConfig()\n\t\t\t\t\t\t\t.getRepositoryName()).getAbsolutePath()); \n\t\t}", "public interface PrimaryRepository extends MongoRepository<PrimaryMongoObject, String> {\n}", "public interface Repository {}", "public Person createPerson(Person p);", "RoomModel createRoomModel(RoomModel roomModel);", "public void createRepository() throws VcsException {\n final FossilSimpleCommand fossilCommand = new FossilSimpleCommand(myProject, myRepoPath.getParentFile(), FCommandName.new_);\n fossilCommand.addParameters(myRepoPath.getPath());\n String result = fossilCommand.run();\n result = result.replace(\"\\r\", \"\");\n final String[] split = result.split(\"\\n\");\n final List<String> lines = new ArrayList<String>(3);\n for (String line : split) {\n if (! StringUtil.isEmptyOrSpaces(line)) {\n lines.add(line.trim());\n }\n }\n\n if (lines.size() != 3) {\n throw new FossilException(\"Can not parse 'new' output: '\" + result + \"'\");\n }\n final String[] expectedHeaders = {\"project-id:\", \"server-id:\", \"admin-user:\"};\n for (int i = 0; i < lines.size(); i++) {\n final String line = lines.get(i);\n if (! line.startsWith(expectedHeaders[i])) {\n throw new FossilException(\"Can not parse 'new' output, line #\" + (i + 1) + \": '\" + result + \"'\");\n }\n }\n myProjectId = new String(lines.get(0).substring(expectedHeaders[0].length() + 1));\n myServerId = new String(lines.get(1).substring(expectedHeaders[1].length()) + 1);\n final String userPswd = lines.get(2).substring(expectedHeaders[2].length()).trim();\n final int idxSpace = userPswd.indexOf(' ');\n if (idxSpace == -1) {\n throw new FossilException(\"Can not parse 'new' output, user-password area: '\" + result + \"'\");\n }\n myUserName = new String(userPswd.substring(0, idxSpace));\n final int quot1 = userPswd.indexOf('\"', idxSpace + 1);\n int quot2 = -1;\n if (quot1 >= 0) {\n quot2 = userPswd.indexOf('\"', quot1 + 1);\n }\n if (quot1 == -1 || quot2 == -1) {\n throw new FossilException(\"Can not parse 'new' output, user-password area: '\" + result + \"'\");\n }\n myPassword = userPswd.substring(quot1 + 1 , quot2);\n }", "Active_Digital_Artifact createActive_Digital_Artifact();", "public static void providePOJOsEverythingForAOneRelation(\n final FileWriterWrapper writer,\n final String entityCodeName)\n throws IOException {\n char[] workingName = entityCodeName.toCharArray();\n workingName[0] = Character.toLowerCase(workingName[0]);\n String lowcaseName = new String(workingName);\n\n writer.write(\" private Integer \" + lowcaseName + \"Id = null;\\n\\n\");\n\n writer.write(\" public Integer get\" + entityCodeName + \"Id() {\\n\");\n writer.write(\" return \" + lowcaseName + \"Id;\\n\");\n writer.write(\" }\\n\\n\");\n\n writer.write(\" public void set\" + entityCodeName + \"Id(Integer new\"\n + entityCodeName + \") {\\n\");\n writer.write(\" \" + lowcaseName + \"Id = new\" + entityCodeName\n + \";\\n\");\n writer.write(\" }\\n\\n\");\n }", "public AssignmentDaoImpl(MongoDao mongoDao) {\n this.mongoDatabase = mongoDao.getDBConnection();\n }", "private Repository getAssayReportRepository()\r\n {\r\n RepositoryBuilder repoBuilder = new RepositoryBuilder(\"optionalModules\", \"assayreport\", LicenseType.LABKEY_LICENSE, BranchType.TRUNK);\r\n return repoBuilder.buildRepository();\r\n }", "public ParcoursDataService() {\n this.repository = new JeeRepository();\n }", "public AbstractRepositoryImplConfig() {\n\t}", "private void onNewRepo() {\n RepositoryImpl repoImpl = BugtrackingUtil.createRepository();\n if(repoImpl == null) {\n return;\n }\n Repository repo = repoImpl.getRepository();\n repositoryComboBox.addItem(repo);\n repositoryComboBox.setSelectedItem(repo);\n }" ]
[ "0.69625", "0.69625", "0.6712645", "0.6710585", "0.6570327", "0.6266032", "0.6152828", "0.6116344", "0.59691197", "0.5946063", "0.58611465", "0.58383644", "0.5783573", "0.5743921", "0.5689286", "0.5643586", "0.56142044", "0.55845", "0.55817693", "0.5557134", "0.5432064", "0.542626", "0.54240745", "0.54099053", "0.5407313", "0.53874195", "0.53723574", "0.5361622", "0.534028", "0.5297984", "0.5281524", "0.527347", "0.5270414", "0.5243753", "0.52319825", "0.5218091", "0.52170366", "0.52167237", "0.52005583", "0.51948655", "0.51946896", "0.51929337", "0.5190591", "0.5190591", "0.5190591", "0.5184117", "0.51826274", "0.51759356", "0.51736313", "0.5163252", "0.51552886", "0.51529086", "0.5151484", "0.51393175", "0.5135826", "0.51340973", "0.51230997", "0.5121983", "0.511998", "0.5113534", "0.51075816", "0.51075757", "0.51059103", "0.5104016", "0.50885516", "0.5081579", "0.50593764", "0.50593764", "0.5059245", "0.5057059", "0.5034928", "0.5031855", "0.5030334", "0.50302154", "0.5027971", "0.50254494", "0.50197756", "0.50043863", "0.4993822", "0.499067", "0.49888837", "0.49875584", "0.4977681", "0.49739212", "0.49709615", "0.49644694", "0.49573794", "0.49570736", "0.4953525", "0.49524355", "0.49494734", "0.49488178", "0.49461645", "0.49388373", "0.49273932", "0.49261183", "0.49220943", "0.49212244", "0.4915775", "0.491456" ]
0.60157156
8
Return the team name
public String getTeamId() { return teamName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getName() {\r\n\t\treturn \"[\" + teamNo + \"] \" + name;\r\n\t}", "public String getTeamName() {\r\n return teamName;\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn teamName;\n\t}", "public String getProjectTeamName(){\n return \"The name of the project of this researcher is \"+\n name_of_project_team +\n \"\\n*******\\n\";\n }", "public String getTeamName() {\n\t\treturn teamName;\n\t}", "public String getTeamName() {\n\t\treturn teamName;\n\t}", "@Override\r\n\tpublic String getTeam() {\n\t\treturn team;\r\n\t}", "public String getTeam() {\n return team;\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"[\" + teamNo + \"] \" + name;\r\n\t}", "@Override\n public String getTeam(){\n return this.team;\n }", "public String getAwayName(String team) {\n\n return getGameInfo(team, \"away_team_name\");\n }", "public String getTeam() {\r\n\t\treturn Team;\r\n\t}", "String getWonTeam() {\r\n return this.teamName;\r\n }", "java.lang.String getGameName();", "java.lang.String getGameName();", "public String getTeam() {\n\t\treturn team;\n\t}", "public String getName(){\n\t\treturn this.tournamentName;\n\t}", "private Team getTeam(String teamName) {\n return scoreboard.getTeam(trimString(teamName));\n }", "public String getHomeName(String team) {\n\n return getGameInfo(team, \"home_team_name\");\n }", "public String getHomeTeam();", "public String getTeamNameById(int id) {\n\t\tString t = \"\";\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamByIdRecords_sql = \"SELECT name FROM \" + team_table + \" WHERE id='\" + id + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tt = rs.getString(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn t;\n\t}", "public void setTeamName(String name) {\n\t\tteamName = name;\n\t}", "public String getHomeTeam(){\n\t\treturn _homeTeam.getTeamName();\n\t}", "@Override\r\n\tpublic String getTeam() {\n\t\treturn null;\r\n\t}", "public String[] getTeamNames()\r\n\t{\r\n\t\t\r\n\t\tString[] names = new String[NUM_TEAMS];\r\n\t\t\r\n\t\tfor(int i = 0; i < teams.size(); i++)\r\n\t\t{\r\n\t\t\tnames[i] = teams.get(i).getName();\t\r\n\t\t}\r\n\r\n\t\treturn names;\r\n\t}", "public Team(String name) {\n this.name = name;\n }", "public String getAwayTeam();", "String getPlayerName();", "public String getTeam(int id){\r\n\t\treturn teamList.get(id);\r\n\t}", "public void setTeamName(String teamName) {\r\n this.teamName = teamName;\r\n }", "public String getDisplayName ( ) {\n\t\treturn handleOptional ( ).map ( Player :: getDisplayName ).orElse ( name );\n\t}", "String getName() {\n return getStringStat(playerName);\n }", "public int getTeam() {\n return team_;\n }", "Team findByName(String name);", "Team getMyTeam();", "public int getTeam() {\n return team_;\n }", "public Team getTeam() {\n return team;\n }", "TeamMember(String _name, String _title) {\r\n this.name = _name;\r\n this.title = _title;\r\n }", "int getTeam();", "public String getHomeTeam() {\n return homeTeam;\n }", "public Team getTeam() {\r\n\t\treturn team;\r\n\t}", "public int getTeam() {\n return team;\n }", "public League getLeagueName() {\n return leagueName;\n }", "@Override //TODO\n public String toString() {\n String s = \"\";\n s += name + \" \";\n for(Pokemon p : team)\n s += p + \"\\n\";\n return s;\n }", "public static String getNameOne() {\n\tString name;\n\tname = playerOneName.getText();\n\treturn name;\n\n }", "public String getScoreboardName() {\n/* 1999 */ return getGameProfile().getName();\n/* */ }", "public String getToolteam() {\r\n return toolteam;\r\n }", "public String getName(){\r\n\t\treturn playerName;\r\n\t}", "public short getTeam() {\n\n return m_team;\n }", "@Override\r\n\tpublic TeamPO findTeamByName(String name) {\n\t\treturn teams.findTeamByShortName(name);\r\n\t}", "public String getName()\r\n\t{\r\n\t\treturn this.playerName;\r\n\t}", "public static void saveTeamNames() {\r\n\t\tMain.team1 = Main.teamOne.name;\r\n\t\tMain.team2 = Main.teamTwo.name;\r\n\t}", "@Override\n\tpublic int getTeam() {\n\t\treturn 0;\n\t}", "String getName(){\n\t\treturn playerName;\n\t}", "public void setTeamName(String teamName) {\n\t\tthis.teamName = teamName;\n\t}", "public String getName(){\n\t\treturn players.get(0).getName();\n\t}", "public String getTeamId() {\n\t\treturn teamId;\n\t}", "public String getTeamId() {\n\t\treturn teamId;\n\t}", "public String nodeTeam(String id)\n\t{\n\t\treturn getNode(id).team;\n\t}", "public void cmdShowTeam(User teller, Team team) {\n Formatter msg = new Formatter();\n msg.format(\" Team %s:\\\\n\", team.getTeamCode());\n msg.format(\" %4s: %s\\\\n\", \"Name\", team.getRealName());\n msg.format(\" %4s: %s\\\\n\", \"Loc.\", team.getLocation());\n msg.format(\" %4s: %s\\\\n\", \"Web \", team.getWebsite());\n msg.format(\" %4s: %s\\\\n\", \"Div \", team.getDivision());\n msg.format(\" Team Members:\\\\n\");\n int indent = 0;\n for (Player player : team.getPlayers()) {\n int len = player.getHandle().length();\n if (len > indent) {\n indent = len;\n }\n }\n String fmt = \" %s\\\\n\";\n for (Player player : team.getPlayers()) {\n msg.format(fmt, player);\n }\n command.qtell(teller, msg);\n }", "public String getPlayerName() {\n return props.getProperty(\"name\");\n }", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();" ]
[ "0.83718127", "0.8302313", "0.81429857", "0.8040645", "0.79852605", "0.79852605", "0.75481606", "0.75140554", "0.7456863", "0.7452218", "0.73920214", "0.7358873", "0.7357559", "0.73330665", "0.73330665", "0.73205847", "0.7237387", "0.72040814", "0.7172358", "0.7111914", "0.70991445", "0.7089209", "0.7080944", "0.7054597", "0.6951725", "0.69033736", "0.6886298", "0.6881575", "0.68396044", "0.67816836", "0.66953564", "0.66485775", "0.66404945", "0.66069454", "0.6550142", "0.6525318", "0.6513288", "0.6495784", "0.6489061", "0.6480904", "0.64780504", "0.6434859", "0.6427764", "0.64276564", "0.641517", "0.64063936", "0.6398517", "0.6390222", "0.63883567", "0.6371525", "0.63690764", "0.6366443", "0.6346726", "0.6343086", "0.6341003", "0.63370633", "0.633111", "0.633111", "0.6318501", "0.63139683", "0.63107544", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866", "0.6309866" ]
0.7536609
7
Set the team name
public void setTeamId(String teamId) { this.teamName = teamId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTeamName(String name) {\n\t\tteamName = name;\n\t}", "public void setName(String name){\n\t\tthis.tournamentName = name;\n\t}", "public void setTeamName(String teamName) {\r\n this.teamName = teamName;\r\n }", "private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\r\n\t}", "public Team(String name) {\n this.name = name;\n }", "public void setName(String name)\r\n\t{\r\n\t\tthis.playerName = name;\r\n\t}", "public void setName(String name)\n {\n playersName = name;\n }", "public void setTeamName(String teamName) {\n\t\tthis.teamName = teamName;\n\t}", "void setName(String name) {\n setStringStat(name, playerName);\n }", "public void setTeam(String team) {\r\n\t\tTeam = team;\r\n\t}", "void setGameName(String gameName);", "public static void saveTeamNames() {\r\n\t\tMain.team1 = Main.teamOne.name;\r\n\t\tMain.team2 = Main.teamTwo.name;\r\n\t}", "public static void editTeamName(League theLeague, Team theTeam, Scanner keyboard) {\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"---Edit Team Name---\");\r\n\t\tSystem.out.println(\"Enter your new team name: (max 32 characters)\");\r\n\t\tSystem.out.println(\"0 - Return to Team Menu\");\r\n\t\t\r\n\t\tString teamName;\r\n\t\tdo {\r\n\t\t\tteamName = Input.validString(32, keyboard);\r\n\t\t\tif (teamName.equals(\"0\")) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tfor (int y = 0; y < theLeague.getNumTeams(); y++) {\r\n\t\t\t\tif (teamName.equalsIgnoreCase(theLeague.getTeam(y).getTeamName())) {\r\n\t\t\t\t\tSystem.out.println(\"That team name is already being used.\");\r\n\t\t\t\t\tteamName = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} while (teamName.isEmpty());\r\n\t\ttheTeam.setTeamName(teamName);\r\n\t}", "public String getTeamName() {\r\n return teamName;\r\n }", "void setName(String name_);", "public void setName(String n) {\r\n name = n;\r\n }", "public void setName (String n){\n\t\tname = n;\n\t}", "public final void setName(String name) {_name = name;}", "public void setName (String n) {\n name = n;\n }", "public static void setName(String n){\n\t\tname = n;\n\t}", "TeamMember(String _name, String _title) {\r\n this.name = _name;\r\n this.title = _title;\r\n }", "public void setName(String newname)\n {\n name = newname;\n \n }", "public void setName(final String name);", "@Override\r\n\tpublic void setOpponentName(String name) {\n\t\tmain.setOpponentUsername(name);\r\n\t}", "public void setName(String name){\r\n gotUserName = true;\r\n this.name = name;\r\n }", "public void setName(String newname){\n name = newname; \n }", "void setName(String name);", "void setName(String name);", "void setName(String name);", "void setName(String name);", "void setName(String name);", "void setName(String name);", "public void setNames() {\n\t\tPlayer1 = \"COMPUTER\";\n\t\tPlayer2 = JOptionPane.showInputDialog(null, \"Enter your Name:\");\n\t\tnames_set = true;\n\t}", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name){\n \t\tthis.name = name;\n \t}", "public String setName(String name){\n return personName = name;\n }", "public void setCurrentPlayerName(String name)\n {\n currentPlayerName = name;\n startGame();\n }", "public void setName (String name){\n \n boyName = name;\n }", "public String getTeamName() {\n\t\treturn teamName;\n\t}", "public String getTeamName() {\n\t\treturn teamName;\n\t}", "public void setName(String new_name){\n this.name=new_name;\n }", "public void setName(String val) {\n name = val;\n }", "public void cmdSetTeam(User teller, Team team, String var, StringBuffer setting) throws MalformedURLException, InvalidNameException {\n String value = setting.toString();\n var = var.toLowerCase();\n if (\"name\".equals(var)) {\n team.setRealName(value);\n } else if (ComparisionHelper.anyEquals(var, \"loc\", \"loc.\", \"location\")) {\n team.setLocation(value);\n } else if (ComparisionHelper.anyEquals(var, \"web\", \"webpage\", \"website\")) {\n team.setWebsite(value);\n } else if (ComparisionHelper.anyEquals(var, \"div\", \"division\")) {\n team.setDivision(value);\n } else {\n command.tell(teller, \"Unknown variable: \" + var);\n return;\n }\n cmdShowTeam(teller, team);\n tournamentService.updateTeam(team);\n tournamentService.flush();\n }", "public void setName(String n){ name=n; }", "public void setName(String n) {\n this.name = n;\n }", "public void setTeam(String team) {\n\t\tthis.team = team;\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "void setName(java.lang.String name);", "void setName(java.lang.String name);", "void setName(java.lang.String name);", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName(String name){\r\n this.name = name;\r\n }", "public void setName(String value) {\n this.name = value;\n }", "public void setName(String name) {\n \tthis.name = name;\n }", "public void setName(String name) {\n \tthis.name = name;\n }", "public void setName(String nameIn) {\n name = nameIn;\n }", "public void setPlayerName(String name){\n\t\tplayerName = name;\n\t\trepaint();\n\t}", "public void setName(String name) \n {\n this.name = name;\n }", "public void setName(String s) {\n this.name = s;\n }", "public void setName(String name) {\n _name = name;\n }", "public void setName(String name)\n \t{\n \t\tthis.name = name;\n \t}", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name) {\n fName= name;\n }", "public void setName(String inName)\n {\n name = inName;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName(String name){\n this.name = name;\n }", "public void setName( final String name ) throws RemoteException {\r\n playerState.name = name;\r\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name)\r\n\t{\t\t\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\t_name = name;\r\n\t}", "public void setTeam(String team) {\n\t\tthis.teamOfPlayer = team;\n\t}", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public static void setTeam(UserTeam team) {\n\t\tgame.setTmpTeam(team);\n\t\tint i=0;\n\t\tfor (Iterator<FootballPlayer> iterator = team.getPlayers().values().iterator(); iterator\n\t\t\t\t.hasNext();) {\n\t\t\tFootballPlayer player = iterator.next();\n\t\t\tnamesLabels.get(i).setText(game.getLastName(player.getName()));\n\t\t\tshirtLabels.get(i).setIcon(MainGui.getShirt(player.getTeamName()));\n\t\t\tbuttonArray[i].setText(\"X\");\n\t\t\ti++;\n\t\t}\n\t}", "public void setName(String name) {\t\t\r\n\t\tthis.name = name;\t\t\r\n\t}", "public void setName( String name )\n {\n this.name = name;\n }", "public void setName( String name )\n {\n this.name = name;\n }", "public void setName(String name)\r\n {\r\n this.name = name;\r\n }", "public void setName(String name)\r\n {\r\n this.name = name;\r\n }", "public void setName(String name)\r\n {\r\n this.name = name;\r\n }", "public void setName(String name)\r\n {\r\n this.name = name;\r\n }", "public void setName(String n) {\r\n\t\tthis.name = n;\r\n\t}" ]
[ "0.7989557", "0.7855458", "0.77984023", "0.74417883", "0.74411535", "0.7384282", "0.73659635", "0.72651887", "0.7202818", "0.71291745", "0.7066221", "0.7062859", "0.7055154", "0.70395833", "0.7005092", "0.69706476", "0.6954885", "0.6953086", "0.6939963", "0.6939398", "0.69168466", "0.6913339", "0.68833137", "0.6879548", "0.6879179", "0.68631417", "0.6856347", "0.6856347", "0.6856347", "0.6856347", "0.6856347", "0.6856347", "0.6825896", "0.6816635", "0.6816635", "0.6816635", "0.6816635", "0.6816635", "0.6816635", "0.6816635", "0.6816635", "0.6816635", "0.6816635", "0.6816635", "0.68090105", "0.68081397", "0.6785122", "0.6778484", "0.6776622", "0.6776622", "0.6774412", "0.6773115", "0.6772824", "0.6769747", "0.67687225", "0.6762102", "0.6760073", "0.6760073", "0.6760073", "0.67586046", "0.67586046", "0.67586046", "0.6757798", "0.6757798", "0.6757798", "0.67540663", "0.67472124", "0.67472124", "0.67369324", "0.673564", "0.6731993", "0.6731924", "0.67319125", "0.67271656", "0.6716187", "0.6714582", "0.6710967", "0.67103946", "0.67103946", "0.67103946", "0.67103946", "0.67103946", "0.67103946", "0.67103946", "0.6708523", "0.6707788", "0.67075616", "0.67051786", "0.67006457", "0.67003036", "0.67003036", "0.67003036", "0.66990274", "0.6689755", "0.668885", "0.668885", "0.6688245", "0.6688245", "0.6688245", "0.6688245", "0.6686107" ]
0.0
-1
Return the list of team member IDs
public List<String> getTeamMembers() { return teamMembers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Integer> getMemberIDs() {\n return memberIDs;\n }", "java.util.List<java.lang.Long> getParticipantsList();", "public java.util.List<java.lang.Long>\n getPlayerIdsList() {\n return playerIds_;\n }", "public java.util.List<java.lang.Long>\n getPlayerIdsList() {\n return java.util.Collections.unmodifiableList(playerIds_);\n }", "Set<String> getMemberSet(String teamName) throws RemoteException, InterruptedException;", "List<Team> getTeamsFromApi(List<Long> teamIds);", "public List<StaffMember> getTeamMembers(){\n\t\tSet<StaffMember> team = teamleader.getDirectSubordinates();\n\t\tStaffMemberIterator iterator = new StaffMemberIterator(team);\n\t\tList<StaffMember> listOfMembers = iterator.listOfStaffMember;\n\t\tlistOfMembers.add(teamleader);\n\t\tCollections.sort(listOfMembers);\n\t\treturn listOfMembers;\n\t}", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "java.util.List<java.lang.Long> getPlayerBagIdList();", "List<Team> findByIds(List<Long> teamIds);", "public java.util.List<java.lang.Long>\n getParticipantsList() {\n return participants_;\n }", "public Set<URI> getMemberIdentities() {\n\t\tSet<URI> result = new HashSet<>();\n\t\tfor (URI memberURI : members) {\n\t\t\tTopLevel member = this.getSBOLDocument().getTopLevel(memberURI);\n\t\t\tif(member != null) {\n\t\t\t\tresult.add(member.getIdentity());\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public List getAllIds();", "public java.util.List<java.lang.Long>\n getParticipantsList() {\n return java.util.Collections.unmodifiableList(participants_);\n }", "public String memberList() {\n\treturn roomMembers.stream().map(id -> {\n\t try {\n\t\treturn api.getUserById(id).get().getNicknameMentionTag();\n\t } catch (InterruptedException | ExecutionException e) {\n\t\te.printStackTrace();\n\t }\n\t return \"\";\n\t}).collect(Collectors.joining(\"\\n\"));\n }", "@Override\n\tpublic List<String> getTeamNames(Integer id) {\n\t\treturn null;\n\t}", "public com.google.protobuf.ProtocolStringList\n getInviteeIdsList() {\n return inviteeIds_;\n }", "public PagedList<String> getFriendListIds() {\n return this.getFriendListIds(\"me\");\n }", "java.util.List<java.lang.Long> getIdsList();", "public com.google.protobuf.ProtocolStringList\n getInviteeIdsList() {\n return inviteeIds_.getUnmodifiableView();\n }", "public List<TeamMember> findByUser(int userId) {\n return select().where(\"user_id\", userId).execute();\n }", "public String[] getPlayers() {\r\n return playerIds;\r\n }", "public long getPlayerIds(int index) {\n return playerIds_.get(index);\n }", "@Override\n public List<TeamPreferences> getUidByTid(int tid) {\n String sql = \"select * from vwb_team_member a where a.tid=?\";\n return getJdbcTemplate().query(sql, new Object[] { tid }, prefMapper);\n }", "@GetMapping(value = \"/getProjectMembers/{theId}\")\n\tpublic List<ProjectMember> getProjectMemebers(@PathVariable (value=\"theId\") Long theId)\n\t{\n\t\treturn this.integrationClient.getAllProjectMembers(theId);\n\t}", "public long getPlayerIds(int index) {\n return playerIds_.get(index);\n }", "public int getInviteeIdsCount() {\n return inviteeIds_.size();\n }", "public int getTeamId() {\n return teamId;\n }", "public String getGroupUserIds() {\n return groupUserIds;\n }", "public ArrayList<Integer> getGroupMembersIds(int idGroupe) throws RemoteException {\r\n\t\t\t\r\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\r\n\t\t\t\r\n\t\t String requete = \"SELECT ga_idEtudiant FROM GroupeAssoc WHERE ga_idGroupe =\" + idGroupe;\r\n\t\t \r\n\t\t System.out.println(\"requete : \" + requete);\r\n\t\t \r\n\t\t DataSet data = database.executeQuery(requete);\r\n\t\t \r\n\t\t while (data.hasMoreElements()) {\r\n\t\t \t\r\n\t\t \tlist.add(Integer.parseInt((data.getColumnValue(\"ga_idEtudiant\"))));\r\n\t\t }\r\n\t\t \r\n\t\t return list;\r\n\t\t}", "public ArrayList<CollegeFootballTeam> getTeamList();", "public java.util.List<String> getIds() {\n return ids;\n }", "List<String> findAllIds();", "public static List<Integer> findAllIdsUsers( )\n {\n return _dao.selectAllIdsUser( _plugin );\n }", "public int getInviteeIdsCount() {\n return inviteeIds_.size();\n }", "public static List<Member> getProjectMembers(String projectId) {\n try {\n String url = BASE_URL + \"projects/\" + projectId + \"/members\";\n return extractMembers(sendAuthenticated(new HttpGet(url)));\n } catch (Exception e) {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }", "public Vector<String> getAllLaunchersIds() {\n\t\tVector<String> visibleIds = new Vector<>();\n\n\t\tfor (EnemyLauncher el : enemyLauncherArr) {\n\t\t\tif (el.isAlive()) {\n\t\t\t\tvisibleIds.add(el.getLauncherId());\n\t\t\t}\n\t\t}\n\n\t\tif (visibleIds.size() == 0)\n\t\t\treturn null;\n\n\t\treturn visibleIds;\n\t}", "public String getMember_id() {\r\n return member_id;\r\n }", "public String getMember_id() {\r\n return member_id;\r\n }", "@java.lang.Override\n public java.util.List<java.lang.Integer>\n getLobbyIdList() {\n return lobbyId_;\n }", "public List<String> getPlanItemIds();", "List<Long> getTransmissionIds();", "public ArrayList<String> getStatsIds() {\n\t\tArrayList<String> arr = new ArrayList<String>();\n\t\tNodeList nl = getStats();\n\t\tint len = nl.getLength();\n\t\tString str = \"\";\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tString id = ParserHelper.requiredAttributeGetter((Element) nl.item(i), \"id\");\n\t\t\tif (id != null) {\n\t\t\t\tarr.add(id);\n\t\t\t\tstr += (id + \"\\n\");\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}", "public int count () {\n return member_id_list.length;\r\n }", "public String getTeamId() {\r\n\t\treturn teamName;\r\n\t}", "Set<II> getIds();", "public java.lang.String getInviteeIds(int index) {\n return inviteeIds_.get(index);\n }", "List<User> getMembers(String companyId, String name);", "public Stream<Long> members() {\n\treturn roomMembers.stream();\n }", "public static ImmutableSet<Integer> getIds(){\n\t\t\treturn m_namesMap.rightSet();\n\t\t}", "public int getPlayerIdsCount() {\n return playerIds_.size();\n }", "public List<String> getListOfIds() {\n return listOfIds;\n }", "public List<User> getMembers() {\n return members;\n }", "@Nonnull\n List<ResourceMember> getMembers(@Nonnull final String telegrafID);", "public List<Team> getListOfTeams(){\n \tMap<String, Object> myMap = new HashMap<String, Object>();\n\t\tJSONObject jsonobj = null;\n\t\tList<Team> team = new ArrayList<>();\n\t\tTeamsJsonReader reader = new TeamsJsonReader();\n\t\tJSONParser parser = new JSONParser();\n\t\tObject obj = null;\n\n\t\ttry {\n\t\t\tobj = parser.parse(new FileReader(\"src/main/resources/db.json\"));\n\t\t\tJSONObject jsonObject = (JSONObject) obj;\n\t\t\tJSONArray jsonarr = (JSONArray) jsonObject.get(\"teams\");\n\t\t\tfor (int size = 0; size < jsonarr.size(); size++) {\n\t\t\t\tList<Individual> individualList = new ArrayList<>();\n\t\t\t\tjsonobj = (JSONObject) jsonarr.get(size);\n\t\t\t\tmyMap.put(\"name\", jsonobj.get(\"name\"));\n\t\t\t\tmyMap.put(\"id\", ((Long) jsonobj.get(\"id\")).intValue());\n\t\t\t\tJSONArray memberArray = (JSONArray) jsonobj.get(\"members\");\n\n\t\t\t\tfor (int index = 0; index < memberArray.size(); index++) {\n\n\t\t\t\t\tindividualList.add(reader.getIndividualById(((Long) memberArray.get(index)).intValue()));\n\n\t\t\t\t}\n\t\t\t\tmyMap.put(\"members\", individualList);\n\t\t\t\t\n\t\t\t\tteam.add(new Team(myMap));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn team;\n }", "List<Team> findTeamsByUserId(UserId userId);", "List<InviteEntity> getUpcomingInvitationsByMemberId(Integer memberId);", "public int getPlayerIdsCount() {\n return playerIds_.size();\n }", "java.util.List<java.lang.Integer> getOtherIdsList();", "protected ArrayList<Long> getRoomMembers() {\n\treturn roomMembers;\n }", "public List<UserId> getUserIds() {\n\t\treturn this.userIds;\n\t}", "public int[] getUserIds() {\n return this.mInjector.getUserManager().getUserIds();\n }", "@Get\n public String getMembers(){\n ArrayList<String> members = new ArrayList<>();\n try {\n members.addAll(controller.getMembers(getQueryValue(\"id\")));\n }catch(MenuException e){\n System.out.println(e.getMessage());\n }\n return new YaGson().toJson(members, ArrayList.class);\n }", "public java.lang.String getInviteeIds(int index) {\n return inviteeIds_.get(index);\n }", "public Set<Long> allActorIds() {\n return new HashSet<Long>( );\n }", "public static int getMembers() {\n\t\treturn members; \n\t}", "public String getMemberId() {\n return memberId;\n }", "public String getMemberId() {\n return memberId;\n }", "public ArrayList<Member> getAllSubteamMembers(String j) {\n\t\tArrayList<Member> subteamMembers = new ArrayList<>();\n\t\tfor(int i=0; i<members.size(); i++){\n\t\t\tif(members.get(i).getSubteam().equals(j)) {\n\t\t\t\tsubteamMembers.add(members.get(i));\n\t\t\t}\n\t\t}\n\t\treturn subteamMembers;\n\t\t\n\t}", "public String getMemberID() {\n return memberID;\n }", "Enumeration getIds();", "long getParticipants(int index);", "public List<String> getActivityIdsFeed(Identity ownerIdentity, int offset, int limit);", "private String getIds(List<UserTO> userList) {\r\n\t\tSet<String> idSet = new HashSet<String>();\r\n\t\tfor (UserTO user : userList) {\r\n\t\t\tidSet.add(user.getOrgNodeId());\r\n\t\t\tif (null != user.getOrgNodeCodePath()) {\r\n\t\t\t\tString[] orgHierarchy = user.getOrgNodeCodePath().split(\"~\");\r\n\t\t\t\tSet<String> orgHierarchySet = new HashSet<String>(Arrays.asList(orgHierarchy));\r\n\t\t\t\tidSet.addAll(orgHierarchySet);\r\n\t\t\t}\r\n\t\t}\r\n\t\tString ids = idSet.toString();\r\n\t\tids = ids.substring(1, ids.length() - 1);\r\n\t\treturn ids;\r\n\t}", "public Integer getMemberId() {\n return memberId;\n }", "public Integer getMemberId() {\n return memberId;\n }", "public Integer getMemberId() {\n return (Integer) get(2);\n }", "public String getMembers() {\r\n \t\tString members = _creator;\r\n \t\tfor (String member : _otherMembersList) {\r\n \t\t\tmembers.concat(\", \" + member);\r\n \t\t}\r\n \t\treturn members;\r\n \t}", "public String getMemberid() {\n\t\treturn memberid;\n\t}", "public String getTeamId() {\n\t\treturn teamId;\n\t}", "public String getTeamId() {\n\t\treturn teamId;\n\t}", "List<S> memberOf(String memberUuid);", "public final ArrayList<Account> getMemberList()\n\t{\n\t\treturn members;\n\t}", "public List<EventMember> getTimeKeepingEventMemberListByEventId( long eventId);", "List<IRoleDto> getRoles(Integer memberId);", "public int getTeamId() {\n\t\treturn teamId;\n\t}", "public int getMembers() {\n\t\treturn members;\n\t}", "public ArrayList<memberjoin> getUserList() {\n\t\treturn Tdao.selectticketList();\r\n\t}", "public ArrayList<Member> getMemberList(int i) {\n\t\treturn dao.selectMemberList(i);\r\n\t}", "@Override\n\tpublic List<MemberDTO> getListMember() {\n\t\treturn mdao.getListMember();\n\t}", "private List<Integer> getLstRunnerIds(InflatedMarketPrices thisMarket) {\n\t\tList<Integer> lstRunnerIds = new ArrayList<Integer>();\r\n\t\tfor (InflatedRunner thisRunner : thisMarket.getRunners()) {\r\n\t\t\tlstRunnerIds.add(thisRunner.getSelectionId());\r\n\t\t}\r\n\t\tCollections.sort(lstRunnerIds);\r\n\t\treturn lstRunnerIds;\r\n\t}", "public String getIds() {\n return this.ids;\n }", "public String getIds() {\n return ids;\n }", "public String getIds() {\n return ids;\n }", "public Collection<AccessUser> getMembers()\n {\n return username_to_profile.values();\n }", "public ArrayList<Team> getTeamList(){\n\t\treturn this.teamList;\n\t}" ]
[ "0.7049354", "0.68085676", "0.6793475", "0.66440564", "0.6454343", "0.64182425", "0.64111435", "0.6283327", "0.6283327", "0.6283327", "0.6283327", "0.6283327", "0.6283327", "0.6248815", "0.6240958", "0.62235606", "0.6222252", "0.6206105", "0.6204812", "0.6192655", "0.61490065", "0.60973215", "0.60678023", "0.6004189", "0.596785", "0.5938171", "0.5938059", "0.590972", "0.5874721", "0.5868208", "0.58484375", "0.5843362", "0.58386934", "0.582384", "0.5816141", "0.5809643", "0.5804784", "0.58019334", "0.5798171", "0.5794292", "0.57848626", "0.5771293", "0.5771293", "0.5769799", "0.57681286", "0.5745017", "0.574242", "0.573628", "0.5735386", "0.57256615", "0.5724478", "0.57228935", "0.57199484", "0.57063824", "0.56874865", "0.56866914", "0.5686264", "0.5678205", "0.5676278", "0.56751996", "0.5674641", "0.5672978", "0.56722355", "0.5669747", "0.5663052", "0.5652121", "0.5649185", "0.56420624", "0.5626617", "0.56243426", "0.56205624", "0.56205624", "0.5620278", "0.5618896", "0.56047654", "0.56022745", "0.5599957", "0.5577315", "0.5574065", "0.5574065", "0.5568361", "0.555954", "0.5558038", "0.555667", "0.555667", "0.55523187", "0.5546568", "0.5541403", "0.55305654", "0.55256605", "0.55199116", "0.551788", "0.55146116", "0.55047244", "0.5495244", "0.54949737", "0.54896253", "0.54896253", "0.5486852", "0.54822415" ]
0.6810143
1
Add a team member ID to the list of team members
public void addTeamMember(String teamMember) { teamMembers.add(teamMember); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void memberAdded(final String id);", "public static void registerMember(int character_id, int team_id) {\n team_members.put(character_id, team_id);\n }", "public void addMember()\r\n\t{\r\n\t\tlistOfMembers.add(new Member(\r\n\t\t\t\tgetUserString(\"Enter Member's First Name\"),\r\n\t\t\t\tgetUserString(\"Enter Member's Surname\"),\r\n\t\t\t\tgetUserString(\"Enter Member's Email\"),\r\n\t\t\t\tgetUserString(\"Enter Member's Telephone\"),\r\n\t\t\t\tgetUserInt(\"Enter Member's Number\"),\r\n\t\t\t\tgetUserString(\"Enter Member's Type\")\r\n\t\t\t\t));\r\n\t\t\r\n\t}", "public void addTeamMembers(final Artifact artifact, final List<User> users);", "private void addTeamMembers(IInternalContest contest, int count, int numberOnMtea) {\n\n Account[] accounts = getTeamAccounts(contest);\n\n for (int tid = 0; tid < accounts.length && tid < count; tid++) {\n\n Account account = accounts[tid];\n if (account.getMemberNames() == null || account.getMemberNames().length == 0) {\n\n List<String> names = new ArrayList<>();\n\n for (int i = 0; i < numberOnMtea; i++) {\n String name = pickRandom(SampleContest.GIRL_NAMES);\n names.add(name);\n }\n\n String[] newNames = (String[]) names.toArray(new String[names.size()]);\n account.setMemberNames(newNames);\n }\n contest.updateAccount(account);\n }\n }", "@PostMapping(path=\"/add/{id}/team\")\n public @ResponseBody Object assignTeamMember(@PathVariable long id, @RequestParam Team team){\n TeamMember tm = teamMemberRepository.getOne(id);\n tm.setTeam(team); // Retrieving the list of team members and adding new team member\n return teamMemberRepository.saveAndFlush(tm);\n }", "public void addMember(Player player) {\n this.members.add(player.getUniqueId().toString());\n }", "protected void addMember() {\n\t\tString mPhoneNumber = phoneEditView.getText().toString();\n\t\t\n\t\tApiProxy apiProxy = new ApiProxy(this);\n\t\tapiProxy.addMember(mPhoneNumber);\n\t\t\n\t\tgoToFriendListPage();\n\t}", "void addMember(final PartyMember member);", "@Override\n public void addTeamIdentifier(TeamIdentifier teamIdentifier) {\n }", "public void addParticipant(String uid) {\n\r\n if (!participants.contains(uid))\r\n participants.add(uid);\r\n }", "void addMyTeam(Team team) throws HasTeamAlreadyException;", "public void addID(int id){\n IDList.add(id);\n }", "public void setMemberID(String memberID){ this.memberID=memberID; }", "public void addMember(String uuid) {\n this.members.add(uuid);\n }", "@Nonnull\n ResourceMember addMember(@Nonnull final String memberID, @Nonnull final String telegrafID);", "public void setMemberId(String string) {\n\t\t\n\t}", "private void addPlayer(long gameId, long memberId)\r\n\t{\r\n\t\tGame game = gameService.lookupGame(gameId);\r\n\t\tMember member = memberDao.findById(memberId);\r\n\t\tlogger.debug(\"addPlayer game=\"+game.getName()+ \" member=\"+ member.getId());\r\n\t\t\r\n\t\t// check if member already in game, if so do not add (throw error too?)\r\n\t\tfor (Player p : game.getPlayers()) {\r\n\t\t\tif (p.getMember().getId() == member.getId()) {\r\n\t\t\t\tlogger.error(\"Member is already a player\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tPlayer player = new Player();\r\n\t\tplayer.setGame(game);\r\n\t\tplayer.setMember(member);\r\n\t\tplayer.setOrder(findNextPlayerOrder(game));\r\n\t\tplayerDao.create(player);\r\n\t\t\r\n\r\n\t}", "public void addTeam(Team team){\n\t\tthis.teamList.add(team);\n\t}", "protected void addMember(MondrianMember member) {\r\n aMembers.add(member);\r\n }", "@Put\n public void addMember(){\n try {\n controller.addMember(getQueryValue(\"id\"), getQueryValue(\"name\"));\n }catch(MenuException e){\n System.out.println(e.getMessage());\n }\n }", "public void addMember(Player player) {\n\t\tif (members.isEmpty()) {\n\t\t\tcacheParty(this); // Caches the party if it went from empty to not empty\n\t\t}\n\t\tmembers.add(player.getUniqueId());\n\t}", "public void addMember (String name) {\r\n\t\tgetMemberList().add(name);\r\n\t\tsaveMemberList();\r\n\t}", "@Override\n public void addParticipantToTeam(Id teamId, Participant participant) throws AlfredException {\n if (!this.participantList.contains(participant.getId())) {\n throw new ModelValidationException(\"Participant does not exist in participantList\");\n }\n Team targetTeam;\n try {\n targetTeam = this.getTeam(teamId);\n } catch (MissingEntityException e) {\n throw e;\n }\n try {\n boolean isSuccessful = targetTeam.addParticipant(participant);\n if (!isSuccessful) {\n throw new AlfredModelException(\"Participant is already present in team\");\n }\n } catch (Exception e) {\n throw new AlfredModelException(e.getMessage());\n }\n }", "private void addUsertoTeams(List<Team> teams) {\n \tfor(Team team: teams) {\n \t\tteam.setUser(getUserFromTeam(team));\n \t}\n }", "public void addMember(IMember member);", "public void addTeamMember(final Artifact artifact);", "public void setMemberIDs(ArrayList<Integer> memberIDs) {\n this.memberIDs = memberIDs;\n }", "public void addMember(Member m) {\n\t\tmembers.add(m);\n\t}", "public void addMember(Person person) {\n\t\tmembers.add(person);\n\t}", "@Override\n public void addMentorToTeam(Id teamId, Mentor mentor) throws AlfredException {\n if (!this.mentorList.contains(mentor.getId())) {\n throw new ModelValidationException(\"Mentor does not exist in mentorList.\");\n }\n Team targetTeam;\n try {\n targetTeam = this.getTeam(teamId);\n } catch (MissingEntityException e) {\n throw e;\n }\n boolean isSuccessful = targetTeam.addMentor(mentor);\n if (!isSuccessful) {\n throw new AlfredModelException(\"Team already has a mentor\");\n }\n }", "@Override\n public void add(User member) {\n super.add(member);\n members.add(member);\n }", "String createTeam(String userName, String teamName, Set<String> members) throws RemoteException, InterruptedException;", "public void setMemberId(Integer value) {\n set(2, value);\n }", "public void setMemberId(Integer memberId) {\n this.memberId = memberId;\n }", "public void setMemberId(Integer memberId) {\n this.memberId = memberId;\n }", "private void updateMemberList(Set<ChatRoomUser> chatRoomUserSet,\n boolean removeMember)\n {\n Iterator<ChatRoomUser> it = chatRoomUserSet.iterator();\n\n while (it.hasNext())\n {\n ChatRoomUser user = it.next();\n String uid = user.getScreenname().getFormatted();\n\n // we want to add a member and he/she is not in our member list\n if (!removeMember && !participants.containsKey(uid)\n && !uid.equals(provider.getAccountID().getUserID()))\n {\n OperationSetPersistentPresenceIcqImpl presenceOpSet =\n (OperationSetPersistentPresenceIcqImpl) getParentProvider()\n .getOperationSet(OperationSetPersistentPresence.class);\n\n Contact participant =\n presenceOpSet.getServerStoredContactList()\n .findContactByScreenName(uid);\n\n participants.put(uid, participant);\n\n fireParticipantPresenceEvent(participant,\n AdHocChatRoomParticipantPresenceChangeEvent.CONTACT_JOINED,\n null);\n }\n // we want to remove a member and found him/her in our member list\n if (removeMember && participants.containsKey(uid))\n {\n Contact participant = participants.get(uid);\n\n participants.remove(uid);\n\n fireParticipantPresenceEvent(participant,\n AdHocChatRoomParticipantPresenceChangeEvent.CONTACT_LEFT,\n null);\n }\n }\n }", "User addMember(String companyId, String name, String memberEmail, boolean isGroupLead)\n throws InvalidRequestException;", "public void addToFollowedUsers(List<String> followedUsers);", "private void addAttendee(int attendeeId) {\n if (!attendToRepo.getMeetingIDs(attendeeId).contains(_Meeting_Id)) {\n Log.d(tag, \"Insert attendee \" + attendeeId + \" to meeting \" + _Meeting_Id);\n AttendTo attendTo = new AttendTo();\n attendTo.meeting_ID = _Meeting_Id;\n attendTo.attendee_ID = attendeeId;\n attendToRepo.insert(attendTo);\n }\n\n /* Updating attendees list */\n ArrayList<Integer> idList = attendToRepo.getAttendeeIDs(_Meeting_Id);\n ArrayList<HashMap<String, String>> attendeeList = new ArrayList<>();\n for(int id : idList){\n HashMap<String, String> attendeeMap = new HashMap<>();\n attendeeMap.put(\"id\", String.valueOf(attendeeRepo.getAttendeeById(id).attendee_ID));\n attendeeMap.put(\"name\", attendeeRepo.getAttendeeById(id).name);\n attendeeList.add(attendeeMap);\n }\n\n /* Refreshing ListView */\n ListAdapter adapter = new SimpleAdapter(this, attendeeList, edit_attendee_entry,\n new String[]{\"id\", \"name\"}, new int[]{R.id.attendee_Id, R.id.attendee_name});\n attendeeListView.setAdapter(adapter);\n }", "public void setTeamId(int value) {\n this.teamId = value;\n }", "public void addStaffID(String id, String username) {\n profile.addStaffID(id, username);\n }", "public void setMemberId(Integer memberId) {\n\t\tthis.memberId = memberId;\n\t}", "public void add(String name)\n/* 15: */ {\n/* 16:14 */ this.members.add(name);\n/* 17: */ }", "public void AddMember(final Member member) {\n members.put(member.email, member);\n }", "public void addTeams(SoccerTeam team) throws TeamNotFoundException {\n if (teams.contains(team)){\n throw new TeamNotFoundException(\"Team Already added to the Tournament\");\n }\n this.teams.add(team);\n }", "@Override\r\n\tpublic ResultMessage addTeam(TeamPO oneTeam) {\n\t\treturn teams.addTeam(oneTeam) ;\r\n\t}", "public void addMember(List<Member> members , Member member) throws WorkShopException {\n try {\n members.add(member);\n fileService.writeMembers(members);\n } catch (WorkShopException e) {\n throw e;\n } catch (Exception e) {\n throw new WorkShopException(e);\n }\n }", "public boolean addTeam(T team){\n if (teams.contains(team)){\n System.out.println(\"Cant add team is allready in the league list.\");\n return false;\n }else{\n teams.add(team);\n return true;\n }\n }", "@Override\n public void addToModel() {\n for (final Person person : team.observableTeamMembers()) {\n person.setTeam(team);\n }\n\n // Add team to project\n organisation.getTeams().add(team);\n }", "public void addMember(Account account) {\n\t\tthis.members.add(account);\n\t}", "public void addStudentWithId(int id) {\n\t\tfor(Team team : this.schoolClass.getTeams()) {\n\t\t\tif(team.containsStudentWithId(id)) {\n\t\t\t\tSystem.out.println(\"Adding a Student From Team \" + team.getName());\n\t\t\t\tif(activeTurnTeamIndex < 0) {\n\t\t\t\t\tactiveTurnTeamIndex = 0;\n\t\t\t\t}\n\t\t\t\tclearUpToDateStatus();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public void addToFollowedUsers(String followedUsers);", "public Team addMember(Contestant contestant) {\r\n\t\tif (members.size() == MAX_MEMBERS)\r\n\t\t\tthrow new UnsupportedOperationException(\"team is full!\");\r\n\t\tmembers.add(contestant);\r\n\t\treturn this;\r\n\t}", "public void addFriendList(FriendList list);", "public String getMemberId() {\n return memberId;\n }", "public String getMemberId() {\n return memberId;\n }", "List<InviteEntity> getUpcomingInvitationsByMemberId(Integer memberId);", "public void setMember_id(String member_id) {\r\n this.member_id = member_id;\r\n }", "public void setMember_id(String member_id) {\r\n this.member_id = member_id;\r\n }", "public ArrayList<Integer> getMemberIDs() {\n return memberIDs;\n }", "public void addHero(Hero h) {\r\n if (team.size() < MAX_MEMBER_IN_A_TEAM) {\r\n team.add(h);\r\n }\r\n }", "@WebMethod public Team addTeam(String name) throws TeamAlreadyExists;", "@Override\n\tpublic void insertMember(MemberDTO mdto) {\n\t\tmdao.insertMember(mdto);\n\t}", "@Nonnull\n ResourceMember addMember(@Nonnull final User member, @Nonnull final Telegraf telegraf);", "@Override\n\tpublic void onUserListMemberAddition(User addedMember, User listOwner, UserList list) {\n\n\t}", "public void add(Member member) {\n\t\t//member.setCreated(new Date());\r\n\t\tdao.add(member);\r\n\t}", "public String getMember_id() {\r\n return member_id;\r\n }", "public String getMember_id() {\r\n return member_id;\r\n }", "public String addMember()//value=\"addmember\", method=RequestMethod.)\n\t{\n\t\treturn \"addmember\";\n\t}", "public int insertTeamMember(Member_Project mp) {\n\t\treturn sqlSession.insert(\"member_projectMapper.insertTeamMember\", mp);\r\n\t}", "public void addTeam(final TeamController team) {\r\n\t\tteamList.add(team);\r\n\t}", "public Integer getMemberId() {\n return memberId;\n }", "public Integer getMemberId() {\n return memberId;\n }", "@Override\r\n\tpublic void add() {\n\t\tif(alreadyAdded()) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Member is already added\");\r\n\t\t}else {\r\n\t\t\t\r\n\t\t\t\ttry(Connection connection= db.getConnection();) {\r\n\t \t\r\n\t\t\t\t\r\n\t\t\t\tString addString=\"INSERT INTO members VALUES(?,?,?,?)\";\r\n\t\t\t\tpreparedStatement=connection.prepareStatement(addString);\r\n\t\t\t\tpreparedStatement.setString(1, super.getIdString());\r\n\t\t\t\tpreparedStatement.setString(2, super.getNameString());\r\n\t\t\t\tpreparedStatement.setString(3, super.getSurnameString());\r\n\t\t\t\tpreparedStatement.setString(4, super.getEmailString());\r\n\t\t\t\t\r\n\t\t\t\tpreparedStatement.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Something went wrong\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t}", "public boolean addMember(Member member) {\n\t\tfor (Iterator<Member> it = db.iterator(); it.hasNext(); ) {\n\t\t\tMember m = it.next();\n\t\t\tif (m.getPersonalNumber().contentEquals(member.getPersonalNumber())) {\n\t\t\t\tSystem.err.println(\"ERROR: ID: \" + m.getPersonalNumber() + \" is already an registered user\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.totalMembers++;\n\t\tmember.setId(this.totalMembers);\n\t\tdb.add(member);\n\t\tthis.saveDatabase();\n\t\treturn true;\n\t\t\n\t}", "@Override\n public void insertEntry(Entry entry) {\n members.add(entry);\n\n }", "public void setMemberId(long memberId) {\n _sTransaction.setMemberId(memberId);\n }", "public void addMember(Member m) {\r\n\t\tint index=isDuplicate(m);\r\n\t\tif((index==-1)&&(!m.getName().equals(\"000\"))) {ms.add(m);}\r\n\t\tif(index!=-1) {\r\n\t\t\tif(!m.getName().equals(\"000\")) {ms.get(index).setName(m.getName());}\r\n\t\t\tif(m.hasAddress()) {ms.get(index).setAddress(m.getAddress());ms.get(index).setHasAddress();}\r\n\t\t\tif(m.hasBirthday()) {ms.get(index).setBirthday(Member.updateBirthday(m.getBirthday()));ms.get(index).setHasBirthday();}\r\n\t\t\tif(m.hasPoints()) {ms.get(index).setPoints(m.getPoints());ms.get(index).setHasPoints();}\r\n\t\t\tif(m.hasMileage()) {ms.get(index).setMileage(m.getMileage());ms.get(index).setHasMileage();}\r\n\t\t\tif(m.hasTier()) {ms.get(index).setTier(m.getTier());ms.get(index).setHasTier();}\r\n\t\t}\r\n\t}", "public int getMemberId() {\n\t\treturn memberIDCounter++;\n\t}", "@Override\n @Transactional\n public Team addTeam(Team team) {\n KeyHolder keyHolder = new GeneratedKeyHolder();\n String sql = \"INSERT INTO Team (teamname, userid) VALUES (?, ?)\";\n\n jdbc.update((Connection connection) -> {\n PreparedStatement prep = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n prep.setString(1, team.getName());\n prep.setInt(2, team.getUser().getId());\n return prep;\n }, keyHolder);\n team.setId(keyHolder.getKey().intValue());\n return team;\n }", "public void setMemberId(String memberId) {\n this.memberId = memberId == null ? null : memberId.trim();\n }", "public void setMemberId(String memberId) {\n this.memberId = memberId == null ? null : memberId.trim();\n }", "public String getMemberID() {\n return memberID;\n }", "public static void add(MemberSession ms) {\n//\t\taddMemberSession(ms, GPortalExecutionContext.getRequest().getSessionContext().getId());\n\t\tadd(ms, GPortalExecutionContext.getRequest().getSessionContext().getId());\n\t}", "protected void addTeamMembersPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Requirement_teamMembers_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Requirement_teamMembers_feature\", \"_UI_Requirement_type\"),\n\t\t\t\t Y3853992Package.Literals.REQUIREMENT__TEAM_MEMBERS,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t true,\n\t\t\t\t null,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}", "public void addPerson(String name, String id) {\n if (personIds.contains(id)) {\n return;\n }\n personNames.add(name);\n personIds.add(id);\n personPhotos.add(getBitmapFromId(context, id));\n personSelections.add(new HashSet<Integer>());\n }", "II addId();", "User addMember(final User user, GroupAssociation groupAssociation);", "public boolean addMember(final MemberPo po);", "public synchronized void addGroupMember(String groupName, String member) {\n\t\t\tgroupList.get(groupName).addMember(member);\n\t\t}", "@Override\n public void onClick(View v) {\n\n String firstName = firstName_et.getText().toString();\n String lastName = lastName_et.getText().toString();\n String emailId = email_et.getText().toString();\n\n addMember(firstName, lastName, emailId);\n\n }", "public void addActor(){\n actorProfileList.add(new ActorProfile());\n }", "void add(Member node, long now);", "public void mDeptMembers(List<Long> pamDeptIds) {\n \n PersistenceManager pm = PMF.get().getPersistenceManager(); // TODO necessary? common?\n Query q = pm.newQuery(Member.class, \":p.contains(deptId)\");\n q.setOrdering(\"deptId asc, id asc\"); \n members = (List<Member>)q.execute(pamDeptIds);\n List<Member> tempDeptMembers = new ArrayList<Member>();\n for (Long d : pamDeptIds){\n for (Member m : members) {\n if (m.getdeptId().equals(d)){\n tempDeptMembers.add(m);\n }\n }\n mDeptMembers.put(d, tempDeptMembers);\n }\n System.out.println(\"Members qty inside deptMembers: \" + members.size()); \n System.out.println(\"Exit: deptMembers\");\n }", "public synchronized static String getMemberId() {\n return \"222222222222\";\n }", "public Integer getMemberId() {\n\t\treturn memberId;\n\t}", "private void addFriendList(\n int index, People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureFriendListIsMutable();\n friendList_.add(index, value);\n }", "public String getMemberid() {\n\t\treturn memberid;\n\t}", "public static void addThief() {\r\n playerTeam.clearDead();\r\n if (playerTeam.teamSize() >= 4) {\r\n updateMessage(\"Time cheio\");\r\n return;\r\n }\r\n\r\n Thief newMember = new Thief(getPersonName(), 0);\r\n playerTeam.addMember(newMember);\r\n\r\n updateMessage(\"Adiocionado Ladrao\" + newMember.getName());\r\n }" ]
[ "0.6702218", "0.6687797", "0.6406423", "0.63920933", "0.63432187", "0.6326017", "0.62589073", "0.62038046", "0.6140903", "0.61247", "0.61216545", "0.61207634", "0.61079806", "0.60787046", "0.60687363", "0.6065134", "0.604397", "0.59936875", "0.5944043", "0.59379953", "0.58942634", "0.5880283", "0.5860223", "0.58320314", "0.58308387", "0.5821983", "0.5817499", "0.5790747", "0.57778883", "0.57613224", "0.5748086", "0.57344663", "0.5732571", "0.57321256", "0.5691382", "0.5691382", "0.5657677", "0.56354856", "0.561565", "0.560989", "0.5595237", "0.55933607", "0.5577107", "0.5560847", "0.55593073", "0.55444765", "0.55340666", "0.55266726", "0.5517542", "0.5515031", "0.5511208", "0.54702264", "0.54689115", "0.5460897", "0.5459487", "0.54486763", "0.54486763", "0.54436815", "0.54295343", "0.54295343", "0.54218113", "0.540707", "0.5393643", "0.5390084", "0.5388198", "0.5387862", "0.5380315", "0.5379231", "0.5379231", "0.53688776", "0.53673035", "0.5354453", "0.53529394", "0.53529394", "0.53514093", "0.53513527", "0.5350623", "0.5338866", "0.53380907", "0.5337216", "0.53291625", "0.531325", "0.531325", "0.53109163", "0.5295256", "0.5291799", "0.5288051", "0.52867734", "0.52757245", "0.52672386", "0.52649945", "0.5262817", "0.5255897", "0.52467227", "0.5240285", "0.52339923", "0.52234656", "0.52210885", "0.5220062", "0.52168626" ]
0.6946473
0
Create the NotificationChannel, but only on API 26+ because the NotificationChannel class is new and not in the support library
private void createNotificationChannel() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { CharSequence name = getString(R.string.channel_name); String description = getString(R.string.channel_description); int importance = NotificationManager.IMPORTANCE_DEFAULT; NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance); channel.setDescription(description); // Register the channel with the system; you can't change the importance // or other notification behaviors after this NotificationManager notificationManager = getSystemService(NotificationManager.class); notificationManager.createNotificationChannel(channel); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createNotificationChannel(){\n // Create the NotificationChannel, but only on API 26+ because\n // the NotificationChannel class is new and not in the support library\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n Log.v(\"notification_channel \", \"true\");\n CharSequence name = \"channel_name2\";\n String description = \"channel_description2\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"channel_id2\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n String name = NOTIFICATION_CHANNEL_NAME;\n String descriptionText = NOTIFICATION_CHANNEL_DESCRIPTION;\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(descriptionText);\n\n // Register the channel with the system\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n // Create the NotificationChannel, but only on API 26+ because\n // the NotificationChannel class is new and not in the support library\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Inwentaryzacja\";\n String description = \"Powiadomienia\";\n int importance = NotificationManager.IMPORTANCE_LOW; // low importance - no sound\n NotificationChannel channel = new NotificationChannel(C.CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"NOTIFICATION\";\n String description = \"NOTIFICATION\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(NOTIFICATION_CHANNEL, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = (NotificationManager)getSystemService(NotificationManager.class);\n\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n mNotificationManager = getSystemService(NotificationManager.class);\n mNotificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n Log.d(TAG, \"createNotificationChannel: \" + Build.VERSION.SDK_INT);\n // Importance applicable to all the notifications in this Channel\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n\n NotificationChannel notificationChannel =\n new NotificationChannel(NOTIFICATION_CHANNEL_ID, CHANNEL_NAME, importance);\n\n String channelDescription = \"This is channel description\";\n notificationChannel.setDescription(channelDescription);\n notificationChannel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);\n\n //finally create notification channel\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n if (notificationManager != null) {\n notificationManager.createNotificationChannel(notificationChannel);\n }\n }\n }", "private void createNotificationChannel() {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"ReminderChannel\";\n String description = \"Hello channel\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"notifyAnkit\", name, importance);\n channel.setDescription(description);\n\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"1\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"31\", \"test\", importance);\n channel.setDescription(\"hihi\");\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n// CharSequence name = getString(R.string.channel_name);\n// String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"myChannelId\", \"channelName\", importance);\n channel.setDescription(\"this is channel myChannelId\");\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getActivity().getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = \"\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"push\";//getString(R.string.channel_name);\n String description = \"pushnotif\";//getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"CHANNEL_ID\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = MyShardPrefernces.myNotificationChannelName;\n\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(MyShardPrefernces.myNoficataionChannelID, name, importance);\n channel.setDescription(\"Notifications for alert Messenging\");\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"channel_name\";\n String description =\"channel_description\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"1\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Channel 1\";\n String description = \"For testing\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Channel1\";\n String description = \"Channel discription\";\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(channelId, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.notification);\n String description =getString(R.string.notification);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"lemubitA\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_HIGH;\n\n // crate a channel with high priority\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID_1, name, importance);\n\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n\n// // Create an Intent for the activity you want to start\n// Intent resultIntent = new Intent(this, MainActivity.class);\n// // Create the TaskStackBuilder and add the intent, which inflates the back stack\n// TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\n// stackBuilder.addNextIntentWithParentStack(resultIntent);\n// // Get the PendingIntent containing the entire back stack\n// PendingIntent resultPendingIntent =\n// stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);\n }\n\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"hello\";\n String description = \"getString(R.string.channel_description)\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"CHANNEL_ID\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Tracker\";\n String description = getString(R.string.app_name);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "public void createNotificationChannel() {\n mNotificationManager =\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // Notification channels are only available in OREO and higher.\n // So, add a check on SDK version.\n if (android.os.Build.VERSION.SDK_INT >=\n android.os.Build.VERSION_CODES.O) {\n\n // Create the NotificationChannel with all the parameters.\n NotificationChannel notificationChannel = new NotificationChannel\n (PRIMARY_CHANNEL_ID,\n \"Stand up notification\",\n NotificationManager.IMPORTANCE_HIGH);\n\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Notifies every 15 minutes to \" +\n \"stand up and walk\");\n mNotificationManager.createNotificationChannel(notificationChannel);\n }\n }", "public void CrearNotificacionChannel(){\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n CharSequence name = \"Notificacion name\";\n NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, name, NotificationManager.IMPORTANCE_DEFAULT);\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(notificationChannel);\n }\n }", "@TargetApi(Build.VERSION_CODES.O)\n private void createNotificationChannel() {\n CharSequence name = getString(R.string.appName);\n String description = getString(R.string.appName);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(name.toString(), name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }", "public void createNotificationChannel() {\n mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // Notification channels are only available in OREO and higher.\n // So, add a check on SDK version.\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n // Create the NotificationChannel with all the parameters.\n NotificationChannel notificationChannel = new NotificationChannel(PRIMARY_CHANNEL_ID,\"Log the game!\", NotificationManager.IMPORTANCE_HIGH);\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Reminder to log your game on Friday's at 3:05 pm\");\n mNotificationManager.createNotificationChannel(notificationChannel);\n }\n }", "private void createNotificationChannel(){\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n CharSequence name = \"DailyReminderChannel\";\n String desc = \"Channel for daily reminders\";\n NotificationChannel channel = new NotificationChannel(\"dailyReminders\", name, NotificationManager.IMPORTANCE_DEFAULT);\n channel.setDescription(desc);\n\n NotificationManager manager = getActivity().getSystemService(NotificationManager.class);\n manager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n mNotificationManager =\r\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\r\n\r\n // Notification channels are only available in OREO and higher.\r\n // So, add a check on SDK version.\r\n if (android.os.Build.VERSION.SDK_INT >=\r\n android.os.Build.VERSION_CODES.O) {\r\n\r\n // Create the NotificationChannel with all the parameters.\r\n NotificationChannel notificationChannel = new NotificationChannel\r\n (PRIMARY_CHANNEL_ID,\r\n \"Stand up notification\",\r\n NotificationManager.IMPORTANCE_HIGH);\r\n\r\n notificationChannel.enableLights(true);\r\n notificationChannel.setLightColor(Color.RED);\r\n notificationChannel.enableVibration(true);\r\n notificationChannel.setDescription(\"Daje znać użytkownikowi \" +\r\n \"by wprowadził swoje wydatki\");\r\n mNotificationManager.createNotificationChannel(notificationChannel);\r\n }\r\n }", "static private void createNotificationChannel(Context context) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"lw_notification_channel\";\n String description = \"lw_notification_channel_desc\";\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(Constants.WEATHER_NOTIFICATION_CHANNEL, name, importance);\n channel.setDescription(description);\n\n // Register Notification channel\n NotificationManager notificationManager = (NotificationManager)\n context.getSystemService(Context.NOTIFICATION_SERVICE);\n if (notificationManager != null) {\n notificationManager.createNotificationChannel(channel);\n }\n }\n }", "public void createNotificationChannel()\n {\n //Instantiate the NotificationManager\n mNotifyManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n //Notification Channel constructed\n NotificationChannel notificationChannel = new NotificationChannel(PRIMARY_CHANNEL_ID, \"Simple Notification\", NotificationManager.IMPORTANCE_HIGH);\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Simple Notification\");\n\n //Create the channel with the NotificationManager\n mNotifyManager.createNotificationChannel(notificationChannel);\n }", "public void createNotificationChannel() {\n weatherNotificationManager =\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // Notification channels are only available in OREO and higher.\n // So, add a check on SDK version.\n if (android.os.Build.VERSION.SDK_INT >=\n android.os.Build.VERSION_CODES.O) {\n\n // Create the NotificationChannel with all the parameters.\n NotificationChannel notificationChannel = new NotificationChannel\n (PRIMARY_CHANNEL_ID,\n \"Weather change.\",\n NotificationManager.IMPORTANCE_HIGH);\n\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription\n (\"Conditions have are below threshold\");\n weatherNotificationManager.createNotificationChannel(notificationChannel);\n\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"channel1\";\n String description = \"First Notification Channel\";\n NotificationChannel channel = new NotificationChannel( \"ch1\", name, NotificationManager.IMPORTANCE_DEFAULT);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Test\";\n String description = \"Test noti\";\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(\"Vuongpro1\", name, importance);\n channel.setVibrationPattern(new long[]{300, 300, 300});\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private static void createNotificationChannel(Context context) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = context.getString(R.string.channel_name);\n String description = context.getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = context.getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel(Context context) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = context.getString(R.string.channel_name);\n String description = context.getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = context.getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "public void setUpNotificationChannel() {\n Log.d(TAG, \"Build.version.SDK_INT: \" + Build.VERSION.SDK_INT);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\n if (notificationManager == null) {\n\n // get access to Notification Service through a Notification Manager object\n notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n int importance = NotificationManager.IMPORTANCE_HIGH;\n\n NotificationChannel notificationChannel =\n new NotificationChannel(channelId, channelName, importance);\n\n notificationManager.createNotificationChannel(notificationChannel);\n }\n\n }\n }", "static public void createNotificationChannel(Context ctx) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = ctx.getString(R.string.channel_name);\n String description = ctx.getString(R.string.channel_description);\n String CHANNEL_ID = ctx.getString(R.string.channel_id);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = ctx.getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n if(status.connection_status == enums.connection_status.connected)\n {\n CharSequence name = \"Sample VPN\";\n String description = \"VPN notification\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = home_model.getInstance().getHomeInstance().getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }\n }", "private void createNotificationChannels() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel1 = new NotificationChannel(CHANNEL_REMINDER_ID, \"Reminder Channel\",NotificationManager.IMPORTANCE_HIGH);\n channel1.setDescription(\"Reminder to drink water\");\n\n NotificationManager manager = getSystemService(NotificationManager.class);\n manager.createNotificationChannel(channel1);\n\n\n }\n }", "public void createChannels() {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID,\n CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT);\n\n getManager().createNotificationChannel(channel);\n }\n\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\r\n CharSequence name = \"Picture upload\";\r\n String description =\"PRIKACENA SLIKA\";\r\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\r\n NotificationChannel channel = new NotificationChannel(\"slika1\", name, importance);\r\n channel.setDescription(description);\r\n // Register the channel with the system; you can't change the importance\r\n // or other notification behaviors after this\r\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\r\n notificationManager.createNotificationChannel(channel);\r\n }\r\n }", "private void createStatusNotificationChannel(){\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n statusChannel = new NotificationChannel(\"2\",\"Status\",NotificationManager.IMPORTANCE_DEFAULT);\n statusChannel.setDescription(\"This is a status notification channel\");\n\n NotificationManager notificationManager = ctx.getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(statusChannel);\n }\n }", "public void createNotificationChannels(){\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n NotificationChannel notificationChannel = new NotificationChannel(\n CHANNEL_1_ID, \"Channel 1\", NotificationManager.IMPORTANCE_HIGH\n );\n notificationChannel.enableLights(true);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Alarm Message\");\n\n NotificationManager manager = getSystemService(NotificationManager.class);\n manager.createNotificationChannel(notificationChannel);\n }\n\n }", "@RequiresApi(Build.VERSION_CODES.O)\n private void createChannel() {\n NotificationManager\n mNotificationManager =\n (NotificationManager) this\n .getSystemService(NOTIFICATION_SERVICE);\n // The id of the channel.\n String id = CHANNEL_ID;\n // The user-visible name of the channel.\n CharSequence name = \"Media playback\";\n // The user-visible description of the channel.\n String description = \"Media playback controls\";\n int importance = NotificationManager.IMPORTANCE_LOW;\n NotificationChannel mChannel = new NotificationChannel(id, name, importance);\n // Configure the notification channel.\n mChannel.setDescription(description);\n mChannel.setShowBadge(false);\n mChannel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);\n mNotificationManager.createNotificationChannel(mChannel);\n }", "public void createChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(\"Stopwatch\", \"StopWatch\", NotificationManager.IMPORTANCE_DEFAULT);\n channel.setDescription(\"Stopwatch Notifications\");\n Objects.requireNonNull(this.getSystemService(NotificationManager.class)).createNotificationChannel(channel);\n }\n }", "public void createNotificationChannel(Activity activity) {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\n CharSequence name = \"notifier\";\n String description = \"notifies the firebaseUser about app activities\";\n\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = activity.getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "public NotificationCompat.Builder getChannelNotification() {\r\n return new NotificationCompat.Builder(getApplicationContext(), notificationChannelID)\r\n .setContentTitle(\"Liebes Tagebuch...\")\r\n .setContentText(\"Don't forget to write a diary entry today!\")\r\n .setSmallIcon(R.drawable.stift_png_24dpi);\r\n\r\n\r\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\nvoid configureNotificationChannel(){\n String CHANNEL_ID = TORNADO_WARNING_CHANNEL;\n NotificationChannel channel = new NotificationChannel(\n CHANNEL_ID,\n \"tornado warning\",\n NotificationManager.IMPORTANCE_DEFAULT);\n channel.enableLights(true);\n channel.enableVibration(true);\n channel.setDescription(\"warnings about tornados\");\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }", "private void createErrorNotificationChannel(){\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n errorChannel = new NotificationChannel(\"1\",\"Error\", NotificationManager.IMPORTANCE_DEFAULT);\n errorChannel.setDescription(\"This is a error notification channel\");\n NotificationManager notificationManager = ctx.getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(errorChannel);\n }\n }", "public NotificationHelper(Context base) {\n super(base);\n if(Build.VERSION.SDK_INT>= Build.VERSION_CODES.O) {\n createChannels();\n }\n }", "private void initializeNotificationChannels() {\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n createEmergencyChannel(notificationManager);\n createNormalChannel(notificationManager);\n createExtrasChannel(notificationManager);\n }", "private Notification.Builder createNotificationWithOutChannel(String title, String message){\n PendingIntent pendingIntent = setIntent(title,message);\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT_WATCH) {\n Notification.Action action = new Notification.Action.Builder(\n android.R.drawable.ic_menu_send,\n \"See details\",\n pendingIntent\n ).build();\n }\n\n return new Notification.Builder(getApplicationContext())\n .setContentTitle(title)\n .setContentIntent(pendingIntent)\n .setContentText(message)\n .setSmallIcon(android.R.drawable.stat_notify_chat)\n .setAutoCancel(true);\n }", "public static void buildChannels(Context context) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationManager notificationManager = context.getSystemService(NotificationManager.class);\n\n CharSequence name = \"Morning Notifications\";\n String description = \"Morning update notifications\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel morningChannel = new NotificationChannel(MORNING_NOTIFICATION_CHANNEL, name, importance);\n morningChannel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n notificationManager.createNotificationChannel(morningChannel);\n\n name = \"Evening Notifications\";\n description = \"Evening update notifications\";\n importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel eveningChannel = new NotificationChannel(EVENING_NOTIFICATION_CHANNEL, name, importance);\n eveningChannel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n notificationManager.createNotificationChannel(eveningChannel);\n }\n }", "public void putChannel(NotificationsChannel notiChannel) throws Exception;", "@RequiresApi(api = Build.VERSION_CODES.O)\n public void notifChannel(NotificationManager mNotificationManager) {\n String id = getChannelId();\n CharSequence name = \"Today Information\";\n String description = \"Calendar App Today Information\";\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel mChannel = new NotificationChannel(id, name, importance);\n\n mChannel.setDescription(description);\n mChannel.enableLights(true);\n mChannel.setLightColor(Color.RED);\n\n mNotificationManager.createNotificationChannel(mChannel);\n }", "@NonNull\n\tNotificationBuilder newNotification();", "public NotificationCompat.Builder getChannel1Notification(String title, String message) {\n\n return new NotificationCompat.Builder(getApplicationContext(),CHANNEL_ID)\n .setContentTitle(title)\n .setContentText(message)\n .setSmallIcon(R.drawable.ic_event_note_black_24dp);\n\n }", "@SuppressWarnings(\"deprecation\")\n\tprivate Notification makeNotification(){\n \tNotification notice = new Notification(R.drawable.ic_action_about, \n \t\t\tgetString(R.string.notice_ticker), System.currentTimeMillis());\n \tnotice.setLatestEventInfo(this, getString(R.string.notice_title), getString(R.string.notice_content), \n \t\t\tPendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class).\n \t\t\t\t\tsetFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP), 0));\n\n \tnotice.flags |= Notification.FLAG_NO_CLEAR;\n \t\n \treturn notice;\n\n }", "private NotificationCompat.Builder getNotificationBuilder()\n {\n //Launches the application once the user clicks the notification\n //Pending intent that is sent when the user clicks on the notification in the notification bar\n Intent notificationIntent = new Intent(this, MainActivity.class);\n PendingIntent notificationPendingIntent = PendingIntent.getActivity(this, NOTIFICATION_ID, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder notifyBuilder = new NotificationCompat.Builder(this, PRIMARY_CHANNEL_ID)\n .setContentTitle(\"You've been notified!\")\n .setContentText(\"This is your notification text.\")\n .setContentIntent(notificationPendingIntent)\n .setSmallIcon(R.drawable.ic_stat_name);\n return notifyBuilder;\n }", "static void makeStatusNotification(String message,Context context) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n // Create the NotificationChannel, but only on API 26+ because\n // the NotificationChannel class is new and not in the support library\n CharSequence name = \"bookNotificationChannel\";\n String description = \"Notification channel for sending book title weekly\";\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel =\n new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n\n // Add the channel\n NotificationManager notificationManager =\n (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n if (notificationManager != null) {\n notificationManager.createNotificationChannel(channel);\n }\n }\n\n // Create the notification\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID)\n .setSmallIcon(R.drawable.ic_launcher_foreground)\n .setContentTitle(\"Book of the Week\")\n .setContentText(message)\n .setPriority(NotificationCompat.PRIORITY_HIGH)\n .setVibrate(new long[0]);\n\n // Show the notification\n NotificationManagerCompat.from(context).notify(NOTIFICATION_ID, builder.build());\n }", "public NotificationsChannel getChannel(String channelId) throws Exception;", "@Override\n public void notifyNotificationWithChannel(java.lang.String platformTag, int platformID,\n android.app.Notification notification, java.lang.String channelName)\n throws android.os.RemoteException {}", "public void oreo(String t, String d){\n String id = \"messange\";\n\n NotificationManager nm = (NotificationManager) getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE);\n NotificationCompat.Builder builder = new NotificationCompat.Builder(getApplicationContext(),id);\n Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);\n Intent intent = new Intent(getApplicationContext(), Menu_principla_Activity.class);\n\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n NotificationChannel nc = new NotificationChannel(id,\"nuevo\",NotificationManager.IMPORTANCE_HIGH);\n nc.setDescription(\"Notification FCM\");\n nc.setShowBadge(true);\n assert nm != null;\n System.out.println(\"Bandera 1\");\n nm.createNotificationChannel(nc);\n }\n/*\n\n\n // intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(),1,intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n builder.setAutoCancel(true)\n .setWhen(System.currentTimeMillis())\n .setContentTitle(t).setCategory(Notification.CATEGORY_SERVICE)\n .setDefaults(Notification.DEFAULT_ALL)\n .setSound(soundUri)\n .setTicker(\"Nueva notification\")\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentText(d)\n .setContentIntent(pendingIntent)\n .setContentInfo(\"nuevo\")\n .setVibrate(new long[]{100, 200, 300, 400, 500, 400, 300, 200, 400});\n\n Random random = new Random();\n int idNotify = random.nextInt(8000);\n\n assert nm != null;\n nm.notify(idNotify,builder.build());\n\n */\n PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(),1,intent, PendingIntent.FLAG_UPDATE_CURRENT);\n notification = new NotificationCompat.Builder(getApplicationContext())\n .setContentIntent(pendingIntent)\n .setSmallIcon(R.drawable.ic_medical_services_black_24dp)\n .setSound(soundUri)\n .setAutoCancel(true)\n .setContentTitle(t).setCategory(Notification.CATEGORY_SERVICE)\n .setContentText(d).build();\n nm.notify(1,notification);\n\n System.out.println(\"Bandera 2\");\n }", "public void sendTestNotification() {\n\n Log.d(TAG, \"version: \" + Build.VERSION.SDK_INT);\n // Create an explicit intent for an Activity in your app\n Intent intent = new Intent(context, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n\n final int NOTIFICATION_ID = 1;\n final String NOTIFICATION_CHANNEL_ID = \"my_notification_channel\";\n\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context, channelId)\n .setSmallIcon(R.drawable.alarm_sound_icon) // icon must be right size for all supported APIs. Icon is changeable\n .setContentTitle(\"IDO\") // changeable\n .setContentText(\"Become A Better Spouse Today!\") // changeable\n .setPriority(NotificationCompat.PRIORITY_DEFAULT) // changeable\n .setContentIntent(pendingIntent)\n .setVisibility(Notification.VISIBILITY_PUBLIC) // changeable\n .setAutoCancel(true);\n\n NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);\n\n // notificationId is a unique int for each notification that you must define\n notificationManager.notify(NOTIFICATION_ID, mBuilder.build());\n\n }", "EventChannel create();", "private void handleNow(RemoteMessage remoteMessage) {\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n String CHANNEL_ID_CHAT = \"myapp-01\";\n String CHANNEL_ID_GENERAL = \"myapp-02\";\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\n // Channel 1\n CharSequence chatChannel = \"Chat\";\n String chatChannelDesc = \"Notifications from chat app\";\n int chatImportance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel mChatChannel = new NotificationChannel(CHANNEL_ID_CHAT, chatChannel, chatImportance);\n mChatChannel.setDescription(chatChannelDesc);\n mChatChannel.enableLights(true);\n mChatChannel.setLightColor(Color.BLUE);\n notificationManager.createNotificationChannel(mChatChannel);\n\n // Channel 2\n CharSequence generalChannel = \"General\";\n String generalChannelDesc = \"General notifications\";\n int generalImportance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel mGeneralChannel = new NotificationChannel(CHANNEL_ID_GENERAL, generalChannel, generalImportance);\n mGeneralChannel.setDescription(generalChannelDesc);\n mGeneralChannel.enableLights(true);\n mGeneralChannel.setLightColor(Color.BLUE);\n notificationManager.createNotificationChannel(mGeneralChannel);\n\n }\n\n // Sending push notification to spesific channel\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n Intent intent1 = new Intent(getApplicationContext(), MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(), 123, intent1, PendingIntent.FLAG_UPDATE_CURRENT);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(getApplicationContext(), CHANNEL_ID_CHAT)\n .setSmallIcon(R.drawable.xmen)\n .setBadgeIconType(R.drawable.xmen)\n .setChannelId(CHANNEL_ID_CHAT)\n .setAutoCancel(true)\n .setContentIntent(pendingIntent)\n .setNumber(1)\n .setSound(defaultSoundUri)\n .setColor(ContextCompat.getColor(this, R.color.white))\n .setWhen(System.currentTimeMillis());\n\n if (remoteMessage.getData().size() > 0) {\n notificationBuilder.setContentTitle(remoteMessage.getData().get(\"title\"));\n notificationBuilder.setContentText(remoteMessage.getData().get(\"message\"));\n }\n\n notificationManager.notify(getID(), notificationBuilder.build());\n }", "private Notification buildForegroundNotification() {\n //registerNotifChnnl(this.context);\n\n Intent stopIntent = new Intent(this.context, BackgroundIntentService.class);\n //stopIntent.setAction(context.getString(R.string.intent_action_turnoff));\n\n PendingIntent pendingIntent = PendingIntent.getService(this.context,0, stopIntent, 0);\n\n NotificationCompat.Builder b=new NotificationCompat.Builder(this.context,CHANNEL_ID);\n\n b.setOngoing(true)\n .setContentTitle(\"WifiHotSpot is On\")\n// .addAction(new NotificationCompat.Action(\n// R.drawable.turn_off,\n// \"TURN OFF HOTSPOT\",\n// pendingIntent\n// ))\n .setPriority(NotificationCompat.PRIORITY_LOW)\n .setCategory(Notification.CATEGORY_SERVICE);\n // .setSmallIcon(R.drawable.notif_hotspot_black_24dp);\n\n\n return(b.build());\n }", "@SuppressLint(\"WrongConstant\")\n private Notification prepareNotification() {\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O &&\n mNotificationManager.getNotificationChannel(FOREGROUND_CHANNEL_ID) == null) {\n CharSequence name = getString(R.string.text_name_notification);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(FOREGROUND_CHANNEL_ID, name, importance);\n channel.enableVibration(false);\n mNotificationManager.createNotificationChannel(channel);\n }\n\n Intent notificationIntent = new Intent(this, Principal.class);\n notificationIntent.setAction(Constants.ACTION.MAIN_ACTION);\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n\n // if min sdk goes below honeycomb\n /*if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) {\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n } else {\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n }*/\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // make a stop intent\n Intent stopIntent = new Intent(this, Servicio_cargar_punto_google.class);\n stopIntent.setAction(Constants.ACTION.STOP_ACTION);\n PendingIntent pendingStopIntent = PendingIntent.getService(this, 0, stopIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n RemoteViews remoteViews = new RemoteViews(getPackageName(), R.layout.notification);\n //remoteViews.setOnClickPendingIntent(R.id.btn_stop, pendingStopIntent);\n remoteViews.setTextViewText(R.id.tv_fecha, fecha);\n\n // if it is connected\n switch (stateService) {\n case Constants.STATE_SERVICE.NOT_CONNECTED:\n remoteViews.setTextViewText(R.id.tv_estado, \"Sin conexión a internet . . .\");\n remoteViews.setImageViewResource(R.id.im_estado, R.drawable.ic_advertencia);\n break;\n case Constants.STATE_SERVICE.CONNECTED:\n remoteViews.setTextViewText(R.id.tv_estado, \"Traigo en camino\");\n remoteViews.setImageViewResource(R.id.im_estado, R.drawable.ic_carrito_verde);\n break;\n case Constants.STATE_SERVICE.GPS_INACTIVO:\n remoteViews.setTextViewText(R.id.tv_estado, \"GPS inactivo\");\n remoteViews.setImageViewResource(R.id.im_estado, R.drawable.ic_advertencia);\n break;\n case Constants.STATE_SERVICE.SIN_INTERNET:\n remoteViews.setTextViewText(R.id.tv_estado, \"Sin conexión a internet . .\");\n remoteViews.setImageViewResource(R.id.im_estado, R.drawable.ic_advertencia);\n break;\n }\n\n // notification builder\n NotificationCompat.Builder notificationBuilder;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n notificationBuilder = new NotificationCompat.Builder(this, FOREGROUND_CHANNEL_ID);\n } else {\n notificationBuilder = new NotificationCompat.Builder(this);\n }\n notificationBuilder\n .setContent(remoteViews)\n .setSmallIcon(R.drawable.ic_carrito_verde)\n .setCategory(NotificationCompat.CATEGORY_SERVICE)\n .setOnlyAlertOnce(true)\n .setOngoing(true)\n .setAutoCancel(true)\n .setContentIntent(pendingIntent);\n\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n notificationBuilder.setVisibility(Notification.VISIBILITY_PUBLIC);\n }\n\n return notificationBuilder.build();\n }", "public interface INotificationFactory {\n\n /**\n * Implements a query to get user's device list, that is, mobile device unique ID value.\n *\n * @param idUser the ID of user\n * @param type the ID of notification type\n * @return the set of String,devices list\n */\n @Deprecated\n Set<NotificationMessageContainer> getUserDevice(long idUser, int type, EnumOperationSystem os);\n\n /**\n * Implements a query to get a user's follower mobile device ID to \"push notification\"\n *\n * @param idUser the ID of user\n * @param idChannel the ID of channel, if channel is private we get only the channel memberships device list\n * @param isPrivately define should device list generated for private push notification\n * @param type the type of notification activity\n * @return the set of String of devices\n */\n Set<NotificationMessageContainer> getUserMultiDevice(long idUser, long idChannel, boolean isPrivately, int type, EnumOperationSystem os);\n\n /**\n * Implements a query to get a user's follower mobile device ID to \"push LIVE notification\"\n *\n * @param idUserFrom the ID of user\n * @param idChannel the ID of channel, if channel is private we get only the channel memberships device list\n * @param key key for redis store\n * @param isPrivately define should device list generated for private push notification\n */\n Long setLiveNotificationUsers(long idUserFrom, long idChannel, long key, boolean isPrivately);\n}", "public static Notification createNotification(XmlAppConfigurationProvider appConfigurationProvider,\n Context context, String title, String content, Bundle intentExtras) {\n int smallNotificationIconResourceId = appConfigurationProvider.getSmallNotificationIconResourceId();\n if (smallNotificationIconResourceId == 0) {\n Log.d(TAG, \"Small notification icon resource was not found. Will use the app icon when \" +\n \"displaying notifications.\");\n smallNotificationIconResourceId = appConfigurationProvider.getApplicationIconResourceId();\n }\n\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context);\n notificationBuilder.setTicker(title);\n notificationBuilder.setAutoCancel(true);\n\n // Create broadcast intent that will fire when the notification has been opened. To action on these messages,\n // register a broadcast receiver that listens to intent <your_package_name>.intent.APPBOY_NOTIFICATION_OPENED\n // and <your_package_name>.intent.APPBOY_PUSH_RECEIVED.\n String pushOpenedAction = context.getPackageName() + \".intent.APPBOY_NOTIFICATION_OPENED\";\n Intent pushOpenedIntent = new Intent(pushOpenedAction);\n if (intentExtras != null) {\n pushOpenedIntent.putExtras(intentExtras);\n }\n PendingIntent pushOpenedPendingIntent = PendingIntent.getBroadcast(context, 0, pushOpenedIntent, PendingIntent.FLAG_ONE_SHOT);\n notificationBuilder.setContentIntent(pushOpenedPendingIntent);\n\n\n // Sets the icon used in the notification bar itself.\n notificationBuilder.setSmallIcon(smallNotificationIconResourceId);\n notificationBuilder.setContentTitle(title);\n notificationBuilder.setContentText(content);\n\n // Setting notification sounds are supported after Honeycomb.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB && intentExtras != null) {\n // Retrieve sound uri if included in intentExtras bundle.\n if (intentExtras.containsKey(Constants.APPBOY_PUSH_NOTIFICATION_SOUND_KEY)) {\n String soundURI = intentExtras.getString(Constants.APPBOY_PUSH_NOTIFICATION_SOUND_KEY);\n if(soundURI != null) {\n if (soundURI.equals(Constants.APPBOY_PUSH_NOTIFICATION_SOUND_DEFAULT_VALUE)) {\n notificationBuilder.setDefaults(Notification.DEFAULT_SOUND);\n } else {\n notificationBuilder.setSound(Uri.parse(soundURI));\n }\n\n }\n }\n }\n\n // From Honeycomb to ICS, we can use a custom view for our notifications which will allow them to be taller than\n // the standard one line of text.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB && Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {\n Resources resources = context.getResources();\n String packageName = context.getPackageName();\n\n int layoutResourceId = resources.getIdentifier(APPBOY_NOTIFICATION_ID, \"layout\", packageName);\n int titleResourceId = resources.getIdentifier(APPBOY_NOTIFICATION_TITLE_ID, \"id\", packageName);\n int contentResourceId = resources.getIdentifier(APPBOY_NOTIFICATION_CONTENT_ID, \"id\", packageName);\n int iconResourceId = resources.getIdentifier(APPBOY_NOTIFICATION_ICON_ID, \"id\", packageName);\n int timeViewResourceId = resources.getIdentifier(APPBOY_NOTIFICATION_TIME_ID, \"id\", packageName);\n int twentyFourHourFormatResourceId = resources.getIdentifier(APPBOY_NOTIFICATION_TWENTY_FOUR_HOUR_FORMAT_ID, \"string\", packageName);\n int twelveHourFormatResourceId = resources.getIdentifier(APPBOY_NOTIFICATION_TWELVE_HOUR_FORTMAT_ID, \"string\", packageName);\n\n String twentyFourHourTimeFormat = getOptionalStringResource(resources,\n twentyFourHourFormatResourceId, Constants.DEFAULT_TWENTY_FOUR_HOUR_TIME_FORMAT);\n String twelveHourTimeFormat = getOptionalStringResource(resources,\n twelveHourFormatResourceId, Constants.DEFAULT_TWELVE_HOUR_TIME_FORMAT);\n\n if (layoutResourceId == 0 || titleResourceId == 0 || contentResourceId == 0 || iconResourceId == 0\n || timeViewResourceId == 0) {\n Log.w(TAG, String.format(\"Couldn't find all resource IDs for custom notification view, extended view will \" +\n \"not be used for push notifications. Received %d for layout, %d for title, %d for content, %d for icon, \" +\n \"and %d for time.\",\n layoutResourceId, titleResourceId, contentResourceId, iconResourceId, timeViewResourceId));\n } else {\n Log.d(TAG, \"Using RemoteViews for rendering of push notification.\");\n RemoteViews remoteViews = new RemoteViews(packageName, layoutResourceId);\n remoteViews.setTextViewText(titleResourceId, title);\n remoteViews.setTextViewText(contentResourceId, content);\n remoteViews.setImageViewResource(iconResourceId, smallNotificationIconResourceId);\n\n // Custom views cannot be used as part of a RemoteViews so we're using a TextView widget instead. This\n // view will always display the time without date information (even after the day has changed).\n SimpleDateFormat timeFormat = new SimpleDateFormat(\n android.text.format.DateFormat.is24HourFormat(context) ? twentyFourHourTimeFormat : twelveHourTimeFormat);\n String notificationTime = timeFormat.format(new Date());\n remoteViews.setTextViewText(timeViewResourceId, notificationTime);\n notificationBuilder.setContent(remoteViews);\n return notificationBuilder.build();\n }\n }\n\n // If we're using Jelly Bean, we can use the Big View Style, which lets the notification layout size grow to\n // accommodate longer text and images.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n\n // Summary text which appears with content in expanded view.\n String summaryText = \"\";\n\n // If there is an image url found in the extras payload and the image can be downloaded, then\n // use the android BigPictureStyle as the notification. Else, use the BigTextStyle instead.\n if (intentExtras != null) {\n\n // Retrieve summary text if included in intentExtras bundle.\n if (intentExtras.containsKey(Constants.APPBOY_PUSH_SUMMARY_TEXT_KEY)) {\n summaryText = intentExtras.getString(Constants.APPBOY_PUSH_SUMMARY_TEXT_KEY);\n }\n\n // Set a custom notification priority if defined in the bundle.\n notificationBuilder.setPriority(getNotificationPriority(intentExtras));\n\n Bundle extrasBundle = getExtrasBundle(intentExtras);\n if (extrasBundle!=null && extrasBundle.containsKey(Constants.APPBOY_PUSH_BIG_IMAGE_URL_KEY)) {\n String imageUrl = extrasBundle.getString(Constants.APPBOY_PUSH_BIG_IMAGE_URL_KEY);\n Bitmap imageBitmap = downloadImageBitmap(imageUrl);\n if (imageBitmap != null) {\n Log.d(TAG, \"Rendering push notification with BigPictureStyle\");\n\n return getBigPictureNotification(notificationBuilder, imageBitmap, content, summaryText);\n } else {\n Log.d(TAG, \"Bitmap download failed for push notification\");\n }\n }\n }\n Log.d(TAG, \"Rendering push notification with BigTextStyle\");\n return getBigTextNotification(notificationBuilder, content, summaryText);\n }\n return notificationBuilder.build();\n }", "private Notification getNotification() {\n NotificationCompat.Builder builder = new NotificationCompat.Builder(this)\n .setColor(getResources().getColor(R.color.tt_primary))\n .setSmallIcon(R.drawable.ic_action_my_location)\n .setContentTitle(getText(R.string.app_name));\n\n builder.setContentText(getText(R.string.notif_text_tracking));\n\n builder.addAction(\n R.drawable.ic_action_close,\n getString(R.string.action_stop_tracking),\n getServicePendingIntent(ACTION_CLOSE)\n );\n\n builder.setContentIntent(getActivityPendingIntent());\n\n return builder.build();\n }", "public NotificationCompat.Builder getChannel(String title, ArrayList <String> message){\n\n\n\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(getApplicationContext(),CHANNELID)\n .setContentTitle(title)\n .setContentText(\"contentText\")\n .setSmallIcon(R.drawable.task_selector);\n NotificationCompat.InboxStyle inboxStyle =\n new NotificationCompat.InboxStyle();\n\n //Inbox Style notification (Expandable)\n inboxStyle.setBigContentTitle(\"Schedule:\");\n\n //If message is empty, set text to notify user there aren't any overdue or upcomming events\n if(message.size()==0){\n inboxStyle.addLine(\"No upcoming events!\");\n }\n else {\n\n for (int i = 0; i < message.size(); i++) {\n if (message.get(i) != null) {\n inboxStyle.addLine(message.get(i));\n }\n }\n }\n\n //Moves the expanded inbox style layout object into the notification object.\n mBuilder.setStyle(inboxStyle);\n\n return mBuilder;\n\n }", "EventChannel create(Context context);", "@Override\r\n\tpublic void onChannelPersonalCreateNotify(AirChannel ch)\r\n\t{\n\t\tif (ch != null)\r\n\t\t{\r\n\t\t\tAirtalkeeChannel.getInstance().ChannelMemberGet(ch.getId());\r\n\t\t\tAirSession session = AirtalkeeSessionManager.getInstance().SessionMatch(ch.getId());\r\n\t\t\tif (session != null)\r\n\t\t\t{\r\n\t\t\t\tString tip = String.format(AirServices.getInstance().getString(R.string.talk_channel_tip_create), ch.getCreatorName());\r\n\t\t\t\tAirtalkeeMessage.getInstance().MessageSystemGenerate(session, tip, true);\r\n\t\t\t}\r\n\r\n\t\t\tif (channelListener != null)\r\n\t\t\t{\r\n\t\t\t\tchannelListener.onChannelPersonalCreateNotify(ch);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void showNotification() {\n // You only need to create the channel on API 26+ devices\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n createChannel();\n }\n android.support.v4.app.NotificationCompat.Builder builder =\n new android.support.v4.app.NotificationCompat.Builder(this, CHANNEL_ID);\n builder.addAction(R.drawable.ic_action_playback_prev, Constants.ACTION_PREV,\n MediaButtonReceiver.buildMediaButtonPendingIntent\n (this, PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS));\n if (state == PlaybackStateCompat.STATE_PLAYING) {\n builder.addAction(\n R.drawable.ic_pause, Constants.ACTION_PAUSE,\n MediaButtonReceiver.buildMediaButtonPendingIntent(this,\n PlaybackStateCompat.ACTION_PAUSE));\n } else {\n builder.addAction(\n R.drawable.ic_play_arrow, Constants.ACTION_PLAY,\n MediaButtonReceiver.buildMediaButtonPendingIntent(this,\n PlaybackStateCompat.ACTION_PLAY));\n }\n builder.addAction(R.drawable.ic_action_playback_next, Constants.ACTION_NEXT,\n MediaButtonReceiver.buildMediaButtonPendingIntent\n (this, PlaybackStateCompat.ACTION_SKIP_TO_NEXT));\n\n builder.addAction(R.drawable.ic_action_cancel, Constants.ACTION_STOP,\n MediaButtonReceiver.buildMediaButtonPendingIntent\n (this, PlaybackStateCompat.ACTION_STOP));\n\n Intent intent = new Intent(getApplicationContext(), SongsActivity.class);\n intent.addCategory(Intent.ACTION_MAIN);\n intent.addCategory(Intent.CATEGORY_LAUNCHER);\n intent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n intent.setClass(this, SongsActivity.class);\n PendingIntent contentPendingIntent = PendingIntent.getActivity\n (this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n builder.setContentTitle(getString(R.string.app_name))\n .setContentText(getSongTitle())\n .setContentIntent(contentPendingIntent)\n .setSmallIcon(R.drawable.ic_music_note)\n .setLargeIcon(Constants.getDefaultAlbumArt(this))\n .setVisibility(android.support.v4.app.NotificationCompat.VISIBILITY_PUBLIC)\n .setStyle(new android.support.v4.media.app.NotificationCompat.MediaStyle()\n .setMediaSession(sessionToken)\n .setShowActionsInCompactView(0, 1));\n Notification notification = builder.build();\n startForeground(Constants.NOTIFICATION_ID.FOREGROUND_SERVICE,\n notification);\n }", "private Notification prepareNotification() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && mNotificationManager.getNotificationChannel(FOREGROUND_CHANNEL_ID) == null) {\n CharSequence name = getString(R.string.text_name_notification);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(FOREGROUND_CHANNEL_ID, name, importance);\n channel.enableVibration(false);\n mNotificationManager.createNotificationChannel(channel);\n }\n\n Intent notificationIntent = new Intent(this, MainUIActivity.class);\n notificationIntent.setAction(Constants.ACTION.MAIN_ACTION);\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n\n // if min sdk goes below honeycomb\n /*if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) {\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n } else {\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n }*/\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // make a stop intent\n Intent stopIntent = new Intent(this, MyService.class);\n stopIntent.setAction(Constants.ACTION.STOP_ACTION);\n PendingIntent pendingStopIntent = PendingIntent.getService(this, 0, stopIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n RemoteViews remoteViews = new RemoteViews(getPackageName(), R.layout.service_notification);\n remoteViews.setOnClickPendingIntent(R.id.btn_stop, pendingStopIntent);\n\n // if it is connected\n switch (stateService) {\n case Constants.STATE_SERVICE.NOT_CONNECTED:\n remoteViews.setTextViewText(R.id.tv_state, \"Help Desk DISCONNECTED\");\n remoteViews.setTextColor(R.id.tv_state, getResources().getColor(android.R.color.holo_red_light));\n break;\n case Constants.STATE_SERVICE.CONNECTED:\n remoteViews.setTextColor(R.id.tv_state, getResources().getColor(android.R.color.black));\n remoteViews.setTextViewText(R.id.tv_state, \"Help Desk CONNECTED\");\n break;\n }\n\n // notification builder\n NotificationCompat.Builder notificationBuilder;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n notificationBuilder = new NotificationCompat.Builder(this, FOREGROUND_CHANNEL_ID);\n } else {\n notificationBuilder = new NotificationCompat.Builder(this);\n }\n notificationBuilder\n .setContent(remoteViews)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setCategory(NotificationCompat.CATEGORY_SERVICE)\n .setOnlyAlertOnce(true)\n .setOngoing(true)\n .setAutoCancel(true)\n .setContentIntent(pendingIntent);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n notificationBuilder.setVisibility(Notification.VISIBILITY_SECRET);\n }\n\n return notificationBuilder.build();\n }", "public INotification createNotification()\n throws OculusException;", "@Override\n public void onReceive(Context context, Intent intent) {\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, \"channel\")\n .setSmallIcon(R.drawable.ic_baseline_message_24)\n .setContentTitle(\"You have an upcoming event!!\")\n .setContentText(\"Click on the message to view more\")\n .setPriority(NotificationCompat.PRIORITY_HIGH);\n NotificationManagerCompat notificationManager = NotificationManagerCompat.from( context);\n notificationManager.notify(200,builder.build());\n }", "public native boolean createChannel(String appId, String channelKey, String name, int uid, RecordingConfig config);", "public interface Channels {\n \n public void createChannel();\n\n}", "@Override\n public void notifyNotificationWithChannel(java.lang.String platformTag, int platformID,\n android.app.Notification notification, java.lang.String channelName)\n throws android.os.RemoteException {\n android.os.Parcel _data = android.os.Parcel.obtain();\n android.os.Parcel _reply = android.os.Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(platformTag);\n _data.writeInt(platformID);\n _Parcel.writeTypedObject(_data, notification, 0);\n _data.writeString(channelName);\n boolean _status = mRemote.transact(\n Stub.TRANSACTION_notifyNotificationWithChannel, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }", "public interface IGcmNotification {\n\n\tint getId();\n\n\tvoid onGcmRecieve(Context context);\n\n\t/**\n\t * Enum mapping string name of notification to end class for instantiation\n\t */\n\tenum NotificationName {\n\t\tDELETE_NOTIF(\"delete_not\", DeleteNotification.class),\n\t\tURI(\"uri\", UriNotification.class),\n\t\tDEVICE_ADDED(\"sensor_add\", DeviceAddedNotification.class),\n\t\tDEVICE_LOW_BATTERY(\"sensor_bat\", DeviceLowBatteryNotification.class),\n\t\tDEVICE_LOW_SIGNAL(\"sensor_sig\", DeviceLowSignalNotification.class),\n\t\tGATE_ADDED(\"adapter_add\", GateAddedNotification.class),\n\t\tGATE_OFFLINE(\"adapter_off\", GateOfflineNotification.class);\n\n\t\tprivate final String mName;\n\t\tprivate final Class<? extends BaseNotification> mClass;\n\n\t\tNotificationName(String name, Class<? extends BaseNotification> baseClass) {\n\t\t\tmName = name;\n\t\t\tmClass = baseClass;\n\t\t}\n\n\t\tpublic static NotificationName fromValue(String value) {\n\t\t\tfor (NotificationName item : values()) {\n\t\t\t\tif (value.equalsIgnoreCase(item.getName()))\n\t\t\t\t\treturn item;\n\t\t\t}\n\t\t\tthrow new IllegalArgumentException(\"Invalid State value\");\n\t\t}\n\n\t\tpublic String getName() {\n\t\t\treturn mName;\n\t\t}\n\n\t\tpublic Class<? extends BaseNotification> getBaseClass() {\n\t\t\treturn mClass;\n\t\t}\n\t}\n\n\tenum NotificationType {\n\t\tINFO(\"info\", 300),\n\t\tADVERT(\"advert\", 200),\n\t\tALERT(\"alert\", 400),\n\t\tCONTROL(\"control\", 100);\n\n\t\tprivate final String mValue;\n\t\tprivate final int mLevel;\n\n\t\tNotificationType(String value, int level) {\n\t\t\tmValue = value;\n\t\t\tmLevel = level;\n\t\t}\n\n\t\tpublic static NotificationType fromValue(String value) throws IllegalArgumentException {\n\t\t\tfor (NotificationType item : values()) {\n\t\t\t\tif (value.equalsIgnoreCase(item.getName()))\n\t\t\t\t\treturn item;\n\t\t\t}\n\t\t\tthrow new IllegalArgumentException(\"Invalid State value\");\n\t\t}\n\n\t\tpublic static NotificationType fromValue(int value) throws IllegalArgumentException {\n\t\t\tfor (NotificationType item : values()) {\n\t\t\t\tif (value == item.getLevel())\n\t\t\t\t\treturn item;\n\t\t\t}\n\t\t\tthrow new IllegalArgumentException(\"Invalid State value\");\n\t\t}\n\n\t\tpublic String getName() {\n\t\t\treturn mValue;\n\t\t}\n\n\t\tpublic int getLevel() {\n\t\t\treturn mLevel;\n\t\t}\n\t}\n}", "public void notifyNotificationWithChannel(java.lang.String platformTag, int platformID,\n android.app.Notification notification, java.lang.String channelName)\n throws android.os.RemoteException;", "static private Notification getNotificationForEvent(GGEventModel event) {\n Context ctx = SplashActivity.getAppContext();\n\n // Create an explicit intent for an Activity in your app\n Intent intent = new Intent(ctx, EventsActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n PendingIntent pendingIntent = PendingIntent.getActivity(ctx, 0, intent, 0);\n\n // Builder builder = new Builder(ctx, channel_id)\n Builder builder;\n builder = new Builder(ctx, ctx.getResources().getString(R.string.channel_id) )\n .setSmallIcon(R.drawable.laguilde_logo)\n .setContentTitle(event.getTitle())\n .setContentText(event.getDescription())\n .setPriority(PRIORITY_DEFAULT)\n .setGroup(\"LaGuilde\")\n // Set the intent that will fire when the user taps the notification\n .setContentIntent(pendingIntent)\n .setAutoCancel(true)\n //.setTimeoutAfter(5000)\n // .setUsesChronometer(true)\n .setShowWhen(true)\n //.setWhen( System.currentTimeMillis() - 1000*60*60 )\n .setWhen( event.getDate().getTime() )\n .setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))\n ;\n\n // todo: ajouter une image\n\n return builder.build();\n }", "protected Channel createChannel() throws IOException, TimeoutException, NoSuchAlgorithmException {\n LOGGER.debug(\"Creating channel\");\n Channel channel = connectionProducer.getConnection(config).createChannel();\n LOGGER.debug(\"Created channel\");\n return channel;\n }", "public static void createNotification(MainActivity a, CustomFBProfile profile, IMessagingMetaData meta, HashMap<String, String> loc) {\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(a)\n .setSmallIcon(R.drawable.acba)\n .setContentTitle(\"New Message\")\n .setContentText(meta.getName().toUpperCase()).setTicker(\"New Message!!\");\n NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();\n mBuilder.setStyle(inboxStyle);\n mBuilder.setVibrate(new long[]{2000, 2000, 1000});\n mBuilder.setLights(Color.RED, 3000, 3000);\n mBuilder.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION));\n mBuilder.setAutoCancel(true);\n\n// Creates an explicit intent for an Activity in your app\n Intent resultIntent = a.startMessagingActivityFromAnywhereInApp(profile, meta, loc);\n\n// The stack builder object will contain an artificial back stack for the\n// started Activity.\n// This ensures that navigating backward from the Activity leads out of\n// your application to the Home screen.\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(a);\n// Adds the back stack for the Intent (but not the Intent itself)\n stackBuilder.addParentStack(MainActivity.class);\n// Adds the Intent that starts the Activity to the top of the stack\n stackBuilder.addNextIntent(resultIntent);\n PendingIntent resultPendingIntent =\n stackBuilder.getPendingIntent(\n 0,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n mBuilder.setContentIntent(resultPendingIntent);\n NotificationManager mNotificationManager =\n (NotificationManager) a.getSystemService(Context.NOTIFICATION_SERVICE);\n// mId allows you to update the notification later on.\n mNotificationManager.notify(1, mBuilder.build());\n }", "private void initNotification() {\n Notification.Builder notificationBuilder =\n new Notification.Builder(this).setSmallIcon(R.drawable.notification_anim)\n .setContentTitle(\"Streaming\")\n .setContentText(\"Display mode stream\")\n .setTicker(\"Stream in progress\");\n notificationBuilder.setAutoCancel(true);\n if (notificationManager != null)\n notificationManager.notify(12345, notificationBuilder.build());\n }", "abstract ManagedChannel createChannel(List<ServerInfo> servers);", "public interface ChannelFactory<T extends Channel> {\n T newChannel();\n}", "public void sendNotification(View view) {\n\n NotificationManager nm= (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.O){\n\n //We have to create a notification channel\n NotificationChannel nc = new NotificationChannel(\"srminterns\",\"SRM NOTIFICATIONS\",NotificationManager.IMPORTANCE_HIGH);\n nm.createNotificationChannel(nc);\n\n }\n\n // we have to normally write notification code.\n\n NotificationCompat.Builder builder=new NotificationCompat.Builder(this,\"srminterns\");\n builder.setSmallIcon(R.drawable.umbrella);\n builder.setContentTitle(\"Sample Notification\");\n builder.setContentText(\"This is the description of the notification\");\n builder.setAutoCancel(true);\n\n /* Pending Intent\n * - It is the description of the operation to be performed\n * - can be created using the following methods\n * -getActivity() - if you want to open an activity with pending Intent\n * -getService() - if you want to strat a service with Pending Intent\n * -getBroadcast() - if you want to send a broadcast with Pending Intent\n *\n * Requires 4 Arguments\n * -context\n * -Pending Intent ID (Can be any Integer)\n * -Intent(Action that you want to perform)\n * - FLAG (This flag will tell the existing pending Intent about what to do if there\n * is a new Pending Intent (Arrival) */\n\n PendingIntent pi = PendingIntent.getActivity(this,12,new Intent(this, MainActivity.class)\n ,PendingIntent.FLAG_UPDATE_CURRENT);\n\n builder.setContentIntent(pi);\n\n /*\n * Step1: is to convert any image format that you want to display into a Bitmap image format\n * Step2: is to create bigPicture style before you issue the notification.\n *\n *\n *\n *\n * */\n\n Bitmap bitmap= BitmapFactory.decodeResource(getResources(),R.drawable.kathmandu);\n builder.setStyle(new NotificationCompat.BigPictureStyle().bigPicture(bitmap));\n nm.notify(42,builder.build());\n }", "private void createNotification() {\n\t\tIntent notifyIntent = new Intent(this, BirthdayActivity.class);\r\n\t\t// Sets the Activity to start in a new, empty task\r\n\t\tnotifyIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t// Creates the PendingIntent\r\n\t\tPendingIntent pendingIntent = PendingIntent.getActivity(this,\r\n\t\t\t\t(int) System.currentTimeMillis(), notifyIntent,\r\n\t\t\t\tPendingIntent.FLAG_UPDATE_CURRENT);\r\n\r\n\t\tNotificationManagerUtil notificationManagerUtil = NotificationManagerUtil\r\n\t\t\t\t.getInstance();\r\n\t\tnotificationManagerUtil.createNotifications(this, 1, \"Message\",\r\n\t\t\t\tpendingIntent);\r\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n int id = new Random().nextInt(200);\n String titulo = intent.getStringExtra(\"titulo\");\n String texto = intent.getStringExtra(\"texto\");\n String channelId = intent.getStringExtra(\"channelid\");\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, channelId)\n .setSmallIcon(R.drawable.ic_baseline_notifications_24)\n .setContentTitle(titulo)\n .setContentText(texto)\n .setPriority(NotificationCompat.PRIORITY_MAX);\n\n NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(context);\n\n notificationManagerCompat.notify(id, builder.build());\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n Uri alarmsound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);\n\n Intent intent1 = new Intent(context, Reminderku.class);\n intent1.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n TaskStackBuilder taskStackBuilder = TaskStackBuilder.create(context);\n taskStackBuilder.addParentStack(Reminderku.class);\n taskStackBuilder.addNextIntent(intent1);\n\n PendingIntent intent2 = taskStackBuilder.getPendingIntent(1,PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context);\n\n NotificationChannel channel = null;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n channel = new NotificationChannel(\"my_channel_01\",\"hello\", NotificationManager.IMPORTANCE_HIGH);\n }\n\n Notification notification = builder.setContentTitle(\"KitaFit\")\n .setContentText(intent.getStringExtra(\"Message\")).setAutoCancel(true)\n .setSound(alarmsound).setSmallIcon(R.mipmap.ic_launcher_round)\n .setContentIntent(intent2)\n .setChannelId(\"my_channel_01\")\n .build();\n\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n notificationManager.createNotificationChannel(channel);\n }\n notificationManager.notify(1, notification);\n\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n NotificationChannel notificationChannel = new NotificationChannel(\"CHANNELID\", \"name\", NotificationManager.IMPORTANCE_HIGH );\n NotificationManager notificationManager = context.getSystemService(NotificationManager.class);\n\n notificationManager.createNotificationChannel(notificationChannel);\n\n Intent i = new Intent(context, DisplayMedication.class);\n\n // FIXME - hardcoded values\n i.putExtra(\"MedicationName\",\"Vicodin\" + \"\");\n i.putExtra(\"DoseAmount\",\"1\" + \"\");\n i.putExtra(\"HourlyFrequency\",\"2\" + \"\");\n i.putExtra(\"DaysBetweenDose\",\"7\" + \"\");\n /* <--- above this line ---> */\n\n\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, i, PendingIntent.FLAG_UPDATE_CURRENT);\n\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, \"CHANNELID\")\n .setSmallIcon(R.drawable.icon)\n .setContentTitle(\"Medication Time\")\n .setContentText(\"Time to take a medication\")\n .setPriority(NotificationManager.IMPORTANCE_HIGH)\n .setContentIntent(pendingIntent);\n NotificationManagerCompat notificationManagerCompat = NotificationManagerCompat.from(context);\n notificationManagerCompat.notify(0, builder.build());\n\n\n }", "private void showSmallNotification_channel(NotificationCompat.Builder mBuilder, int icon, String title, String message, String timeStamp, PendingIntent resultPendingIntent, Uri alarmSound, String channel) {\n\n NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();\n inboxStyle.addLine(message);\n String channelId = mContext.getString(R.string.default_notification_channel_id);\n String channelName = mContext.getString(R.string.default_notification_channel_name);\n\n //This is the intent of PendingIntent\n Intent intentAction = new Intent(mContext,ActionReceiverNotification.class);\n //This is optional if you have more than one buttons and want to differentiate between two\n intentAction.putExtra(\"notify\",\"getReplay\");\n PendingIntent pIntentAction = PendingIntent.getBroadcast(mContext,NotificationID.getID(),intentAction,PendingIntent.FLAG_ONE_SHOT);\n\n // Add Replay Action to Notification\n\n String KEY_TEXT_REPLY = \"key_text_reply\";\n\n RemoteInput remoteInput = new RemoteInput.Builder(KEY_TEXT_REPLY)\n .setLabel(\"Replay\")\n .build();\n\n //Notification Action with RemoteInput instance added.\n NotificationCompat.Action replyAction = new NotificationCompat.Action.Builder(\n android.R.drawable.sym_action_chat, \"REPLY\", pIntentAction)\n .addRemoteInput(remoteInput)\n .setAllowGeneratedReplies(true)\n .build();\n\n\n\n\n NotificationCompat.Builder notificationBuilder =\n new NotificationCompat.Builder(mContext, get_Channel_ID(channel))\n .setSmallIcon(icon)\n .setTicker(title)\n .addAction(replyAction)\n .setOngoing(true)\n .setAutoCancel(true)\n .setContentTitle(title)\n .setContentIntent(resultPendingIntent)\n .setSound(alarmSound)\n .setStyle(inboxStyle)\n .setWhen(getTimeMilliSec(timeStamp));\n // .setSmallIcon(R.mipmap.ic_launcher)\n // .setLargeIcon(BitmapFactory.decodeResource(mContext.getResources(), icon));\n // .setStyle(new NotificationCompat.BigTextStyle().bigText(message));\n\n\n\n NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);\n // Since android Oreo notification channel is needed.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channelNotification = new NotificationChannel(get_Channel_ID(channel),\n channel,\n NotificationManager.IMPORTANCE_DEFAULT);\n notificationManager.createNotificationChannel(channelNotification);\n }\n\n notificationManager.notify(NotificationID.getID() /* ID of notification */, notificationBuilder.build());\n }", "public static void createNotification1(Context context, Reminder reminder) {\n\n\n Intent intent = new Intent(context, SplashActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0 /* Request code */, intent,\n PendingIntent.FLAG_ONE_SHOT);\n\n String channelId = context.getString(R.string.default_notification_channel_id);\n Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n NotificationCompat.Builder notificationBuilder =\n new NotificationCompat.Builder(context, channelId)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(reminder.getTitle())\n .setContentText(reminder.getContent())\n .setAutoCancel(true)\n .setSound(defaultSoundUri)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n // Since android Oreo notification channel is needed.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(channelId,\n \"Channel human readable title\",\n NotificationManager.IMPORTANCE_DEFAULT);\n notificationManager.createNotificationChannel(channel);\n }\n\n notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());\n\n DeleteNotification(reminder,context);\n }", "KafkaChannel buildChannel(String id, SelectionKey key, int maxReceiveSize) throws KafkaException;", "private static final devplugin.ChannelGroup createChannelGroup(final String id) {\r\n return new devplugin.ChannelGroupImpl(id, id, \"\");\r\n }" ]
[ "0.8664989", "0.8571009", "0.8557506", "0.854956", "0.85185015", "0.85140026", "0.85118574", "0.84991014", "0.8488404", "0.8488404", "0.8481756", "0.8478001", "0.84752333", "0.8468807", "0.8443895", "0.8429045", "0.8416299", "0.8413787", "0.8368849", "0.83556217", "0.834722", "0.8342883", "0.8309675", "0.82939255", "0.82884634", "0.8284012", "0.82820195", "0.82737327", "0.8272823", "0.82508606", "0.82303107", "0.81768715", "0.81740767", "0.8099339", "0.80612445", "0.80116343", "0.7992695", "0.7987249", "0.7961489", "0.79549736", "0.79405993", "0.7904532", "0.7880883", "0.7876335", "0.785421", "0.7790523", "0.7689625", "0.75815994", "0.7467969", "0.7231207", "0.714734", "0.70810694", "0.68748647", "0.68718255", "0.66703904", "0.66003394", "0.6481696", "0.6468665", "0.640519", "0.6366512", "0.6300701", "0.6275395", "0.62411165", "0.6221672", "0.6166909", "0.6165398", "0.6144746", "0.61443627", "0.6119227", "0.61100185", "0.6106553", "0.6083499", "0.6082913", "0.605643", "0.6046537", "0.6045104", "0.6040825", "0.5991803", "0.59528023", "0.5936479", "0.59115195", "0.5906056", "0.58997625", "0.58777463", "0.5876706", "0.58520937", "0.5780694", "0.57700604", "0.57629514", "0.5760256", "0.57552606", "0.5745596", "0.5735302", "0.57290685", "0.57261425", "0.5709149", "0.5690436", "0.5687357", "0.56863403" ]
0.85113966
8
check to see if patient is actually dead
private Date getdDay() { return this.dDay; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isDead();", "@Override\n\tpublic boolean isDead() {\n\t\treturn mProgress>mLife && mLife>=0;\n\t}", "public boolean checkDeath() {\r\n\t\tif (death) {\r\n\t\t\tdeath = false;\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Override\n public boolean isDead() {\n return (this.getLife() <= 0);\n }", "Boolean isDead();", "public boolean isDead()\n {\n // TODO: replace this line with your code\n }", "@Override\n\tpublic boolean isDead() {\n\t\treturn dead;\n\t}", "public boolean isDead() {\r\n \t\treturn this.isDead;\r\n \t}", "public boolean isDead() {\r\n\t\treturn health <= 0;\r\n\t}", "public boolean isDead() {\n\t\treturn dead;\n\t}", "public boolean isDead() {\r\n\t\treturn this.lives == 0;\r\n\t}", "@Override\n\tpublic boolean isDead() {\n\t\treturn mRemainedCounters == 0;\n\t}", "public boolean isDead() {\n\t\tif (_currentHealth <= 0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean isAlive(){\r\n\t\tif(dead==true){\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}", "public boolean isDead() {\r\n return this.dead;\r\n }", "public boolean isDead() {\n\t\treturn (currentHP<=0);\n\t}", "public boolean getDead();", "public boolean isDeadByChance() {\n\t\tdouble deathChance = 0.0001 * this.age * this.sicknessLevel;\n\t\tif (deathChance < 0.5) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean isDead() {\r\n\t\tif (health <= 0.0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public boolean isDead() {\r\n\t\treturn !isAlive();\r\n\t}", "public boolean isDead() {\n return isDead;\n }", "public boolean isDead() {\n return isDead;\n }", "protected boolean isDead(int x, int y){\n \tclearAllSigns();\n \treturn noLife(x, y);\n\t}", "public boolean isDead() {\n return this.isDead;\n }", "public static boolean isDead(Entity e) {\r\n return e.getAttribute(\"state:death\", false);\r\n }", "public boolean hasDied() {\n return !isAlive();\n }", "public static boolean characterDeathCheck(){\n if (MainCharacter.hpNow <= 0){\n return true;\n }\n return false;\n }", "public boolean isDeath() {\n return death;\n }", "public boolean isDead ( ) {\n\t\treturn extract ( handle -> handle.isDead ( ) );\n\t}", "public boolean isDead() {\n\t\tif(parts==0) return true; // if no parts left, the snake is dead\n\t\treturn false; // otherwise it's still alive\n\t}", "public boolean mustDie() {\n\t\tif (this.not_fed == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "default public boolean dead() {\n return life().dead();\n }", "public boolean isConstructingPastrRobotDead(int currentTurn, int lastTurn) {\r\n\t\treturn (currentTurn - lastTurn) > ( (declareDeadInterval * 2) + 100) ;\r\n\t}", "public boolean isOccupied(){\n \t\treturn occupiedSeconds > 0;\n \t}", "@Test\n\tpublic void testIsDead() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(23);\n\t\tnpc.calHealth();\n\t\tassertFalse(npc.isDead());\n\t\tnpc.changeHealth(-23);\n\t\tassertTrue(npc.isDead());\n\t\tnpc.changeHealth(-100);\n\t\tassertTrue(npc.isDead());\n\t}", "boolean updateDeathsTillForget() {\n\t\tdeathsTillForget -= 1;\n\t\treturn (deathsTillForget < 1);\n\t}", "public boolean isDead() {\n return hullStrength <= 0;\n }", "private void Dead() {\n\t\thunger -= 5;\n\t\tthirst -= 5;\n\t\tif ((thirst < 25) && (hunger < 25)){\t\t\t// Player is very weak\n\t\t\thealth -= 15;\n\t\t}else if ((thirst < 25) || (hunger < 25)){\t\t// Player is kinda weak\n\t\t\thealth -= 5;\n\t\t}\n\t\tif (health <= 0){\t\t\t\t\t\t\t\t// Player is dead\n\t\t\taddMessage(\"Overcome by your weakness you succumb.\", \"AI\");\n\t \t\taddMessage(\"You have died\", \"AI\");\n\t \t\tmenu = MENU.GAME_OVER;\n\t\t}\n\t}", "private void deathRoom()\n {\n if(currentRoom.equals(deathRoom4))\n {\n alive = false;\n }\n }", "public void deadcheck()\n\t{\n\t\tif (this.shield <= 0)\n\t\t{\n\t\t\tthis.drawMissile = false;\n\t\t}\n\t\telse \n\t\t\tthis.drawMissile = true;\n\t}", "public boolean add(Patient p) {\n\t\tif (currentTimeOccupied.plus(p.timeToHealth()).toMillis() <= timeLeftInDay.toMillis()) {\n\t\t\tpatients.add(p);\n\t\t\t//currentTimeOccupied = currentTimeOccupied.plus(p.timeToHealth());\n\t\t\ttimeLeftInDay = timeLeftInDay.minus(p.timeToHealth());\n\t\t\t\n\t\t\tif (patients.size() < MAX_PATIENTS) {\n\t\t\t\tSystem.out.println(\"Patient added to list! \" + p.timeToHealth().toMinutes() + \" minutes!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"A patient has been booted to add this one!\");\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"This doctor can't take this patient due to time constraints.\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n\t}", "private void bringToLife(){\n this.dead = false;\n }", "boolean hasPatientInAppointmentSchedule(Patient patient);", "private boolean killerHasNotDeath(String killer) {\n\t\tfor (LogLineData d : dataList) {\n\t\t\tif (d.getDeadName().equals(killer)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "void dead() { this.alive = false; }", "public void setIsDead(boolean isDead) {\n this.isDead = isDead;\n }", "public void checkHealth()\n {\n if(player.getHealth() <= 0)\n {\n System.out.println(\"\\n\" + \"You are dead :(\" + \"\\n\");\n alive = false;\n }\n }", "public void isDeceased(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "public boolean notAlive() {\r\n\r\n if (LOG.isLoggable(Level.FINEST)) {\r\n LOG.finest(\"notAlive ( ) called \");\r\n }\r\n\r\n return !alive();\r\n }", "public boolean isRobotDead(int currentTurn, int lastTurn) {\r\n\t\treturn (currentTurn - lastTurn > declareDeadInterval * 2 );\r\n\t}", "public boolean isSetPatient()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(PATIENT$2) != 0;\n }\n }", "private boolean checkDeadLine(int recordNum){\n\t\tif(delta < 0){\n\t\t\treturn recordNum + delta >= deadLineValue;\n\t\t}else{\n\t\t\treturn recordNum + delta <= deadLineValue;\n\t\t}\n\t}", "public boolean isDeletable() {\n \t\t\n \t\tlong currentAge = (new Date()).getTime() - timestamp;\n \t\t\n \t\tboolean retval = Math.abs(lat) > 89 || Math.abs(lon) > 179 || !inService || currentAge >= 1000*60*10;\n \t\t\n \t\t/*if (retval) {\n \t\t\tSystem.out.println(\"[\"+uid+\"] \"+\n \t\t\t\t\t\" Math.abs(lat) > 89:\"+(Math.abs(lat) > 89)+\n \t\t\t\t\t\" Math.abs(lon) > 179:\"+(Math.abs(lon) > 179) +\n \t\t\t\t\t\" !inService:\"+!inService+\n \t\t\t\t\t\" age >= 1000*60*10:\"+(age >= 1000*60*10));\n \t\t}*/\n \t\t\n \t\treturn retval;\n \t}", "public boolean isVacant() {\r\n\treturn !isOccupied() || !isAvailable();\r\n }", "private boolean checkTime(){\n\t\treturn false;\r\n\t}", "public boolean isDead() {\n if (getHealth() == 0){\n this.world.destroyBody(this.b2body);\n return true;\n }\n return false;\n }", "public boolean deathTick(Game game) {\n\t\treturn false;\n\t}", "public boolean isDead(int[] fighter) {\n return (fighter[LIFE] == 0);\n }", "boolean hasDowntimeJailDuration();", "private void checkDeath() {\n\t\tif (player.getLives() == 0) {\n shooty.setIv(new Image(\"/img/shipdeath.png\"));\n\t\t\tdie();\n\t\t}\n\t\t// another way to die: the blocks hit you\n\t\tif(btnList.get(0).getLayoutY() >= FATAL_BUTTON_DIST) {\n\t\t\tendGame.play();\n\t\t\tdie();\n\t\t}\n\t}", "public static boolean monsterDeathCheck(){\n if (currentMonster.currentHp <= 0){\n return true;\n }\n return false;\n }", "public boolean isDead() {\n if (this.x + this.radius/2 < 0\n || this.x - this.radius/2 > World.MAP_WIDTH\n || this.y + this.radius < 0\n || this.y - this.radius > World.MAP_HEIGHT) {\n return true;\n }\n return false;\n }", "public void setDead(boolean dead) {\n this.isDead = dead;\n }", "public boolean isDeadEnd() {\n return getClosedFuses().size() <= 1;\n }", "public boolean isAlive() {\r\n\t\treturn life > 0;\r\n\t}", "@Override\n public boolean isAlive() {\n return health > 0f;\n }", "public boolean canDie() {\n\t\treturn false;\n\t}", "public void setDead(boolean dead) {\n isDead = dead;\n }", "boolean getHealthy();", "public boolean isExpired()\n\t{\n\t\tif (TimeRemaining == 0) \n\t\t\treturn true;\n\t\telse return false;\n\t}", "private void checkVictory()\n {\n if(throne.getEnemyHealth() <= 0)\n {\n System.out.println(\"Congrats! The land is now free from all chaos and destruction. You are now very rich and wealthy. Yay\");\n alive = false;\n }\n }", "@Override\r\n\tpublic void patientDisease() {\n\t\t\r\n\t\tSystem.out.println(\"Here I have attached the patients information\");\r\n\t\t\r\n\t}", "public boolean isNationDead(final int nationId) {\n return nationsToDead.get(nationId);\n }", "public void setDead(boolean dead) {\r\n this.dead = dead;\r\n }", "public boolean isAlive(){\n if(this.hp <= 0){\n return false;\n }\n else{\n return true;\n }\n }", "public boolean isAlive(){\n\t\treturn lifeForce > 0;\n\t}", "void doCheckHealthy();", "public boolean validatePatient() {\n\t\tif (dateOfBirth == null)\n\t\t\treturn false;\n\t\tif (insuranceProvider == null)\n\t\t\treturn false;\n\t\tif (subscriberID == null)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "public boolean havePatientDetails() {\n\t\treturn _havePatientDetails;\n\t}", "public boolean deathChecker(NPC[] Mobs) {\n\tint length = Mobs.length;\n\tint healthSum = 0;\n\tfor (int c = 0; c < length; c++) {\n\t healthSum+=Mobs[c].getHealth();\n\t}\n\treturn (healthSum <= 0);\n }", "public boolean isOccupied() {\n return !(getLease() == null);\r\n }", "public boolean isAlive() {\n return health > 0;\n }", "public boolean hasExpired() {\n return (time.milliseconds() - this.lastRecordTime) > this.inactiveSensorExpirationTimeMs;\n }", "public boolean checkVisibility() {\n LocalDateTime now = LocalDateTime.now();\n return (this.viewer != 0 && !now.isAfter(this.destructTime));\n }", "public boolean isLate(){\n Date d = givenBack != null ? givenBack : new Date();\n return expirationDate.before(d);\n }", "boolean isDeletable() {\n return life == 0;\n }", "public boolean sendDeath() {\n return true;\n }", "public boolean hasDetonated()\r\n\t{\r\n\t\treturn detonated;\r\n\t}", "public boolean isConstructingNoiseTowerDead(int currentTurn, int lastTurn) {\r\n\t\treturn (currentTurn - lastTurn) > ( (declareDeadInterval * 2) + 150);\r\n\t}", "boolean hasDoctorInAppointmentSchedule(Doctor doctor);", "boolean hasVisitEndtime();", "boolean hasVisitEndtime();", "public boolean isExpired() {\n return age() > this.timeout;\n }", "@Override\n\tpublic void declarehealthy(Patient patient) {\n\t\tsf.getCurrentSession().evict(patient);\n\n\t\tpatient.setHealthy(true);\n\n\t\tsf.getCurrentSession().update(patient);\n\n\t}", "boolean hasDepositEndTime();", "public boolean checkTimeout(){\n\t\tif((System.currentTimeMillis()-this.activeTime.getTime())/1000 >= this.expire){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void setDead(boolean dead) {\n\t\tthis.dead = dead;\n\t}", "private void checkDeathCondition() {\n float speed = body.getLinearVelocity().x;\n if (prevSpeed >= 0.1 && speed < 0.1)\n kill();\n prevSpeed = speed;\n }", "public boolean isHolding();", "public boolean isExpired() {\n final LocalDateTime now = LocalDateTime.now().minusSeconds(10L);\n return now.isAfter(startTime.plusMinutes(exam.getExamTime())) || endTime != null;\n }", "public boolean hasWarning() {\n\t\treturn !fdpVisaAgentBool() || !fdpVisaDirecBool() || !fdpVisaRespBool();\n\t}" ]
[ "0.7031985", "0.6979182", "0.69700575", "0.69627005", "0.68603605", "0.6853731", "0.679652", "0.677824", "0.6720231", "0.67155695", "0.66915345", "0.66728795", "0.6660212", "0.6645349", "0.6600418", "0.65894365", "0.6578813", "0.655393", "0.65452105", "0.6521762", "0.6492679", "0.6492679", "0.64579356", "0.64223075", "0.63318336", "0.632383", "0.63176495", "0.62380683", "0.6210935", "0.6205307", "0.61749196", "0.61629224", "0.6143541", "0.61378795", "0.60642034", "0.6056437", "0.60380375", "0.60247445", "0.60225844", "0.60061693", "0.5977024", "0.59759516", "0.59488404", "0.5899995", "0.58333164", "0.58324856", "0.5812825", "0.5810541", "0.5803224", "0.57983017", "0.57844794", "0.57824767", "0.57780546", "0.5776405", "0.5764483", "0.57632375", "0.5731691", "0.57184863", "0.570871", "0.5703044", "0.57019466", "0.56919754", "0.5689204", "0.5687507", "0.56862885", "0.56804514", "0.5677232", "0.5671622", "0.5666604", "0.56613374", "0.5659685", "0.5635256", "0.5633411", "0.5624911", "0.5623272", "0.56114465", "0.5609136", "0.55976003", "0.5594771", "0.55860907", "0.5582698", "0.5581491", "0.5575486", "0.55743337", "0.5567097", "0.55653787", "0.5561906", "0.5557713", "0.55540264", "0.55517894", "0.55516905", "0.55516905", "0.5548734", "0.5548349", "0.5537545", "0.55345964", "0.55285925", "0.55284655", "0.5526467", "0.55229414", "0.5519706" ]
0.0
-1
the last physician in the ArrayList is the current physician make a different class for doctor to add start and stop dates for patients?
private Physician getPhysician() { return this.physician; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addPatient()\n {\n Scanner sc=new Scanner(System.in);\n System.out.println(\"Enter name of patient\");\n String name=sc.nextLine();\n int pos,id;\n\n do\n {\n System.out.println(\"Enter doctor id to assign to\");\n id=sc.nextInt();\n pos=checkDoctor(id);\n if(pos==-1)\n System.out.println(\"Invalid doctor id\");\n }\n while(pos==-1);\n String docname=doc.get(pos).getName();\n Patient p=new Patient(name,id,docname);\n pt.add(p);\n\n }", "public void insertDoctors(List<Doctor> drlist);", "public ArrayList<ArrayList<Dog>> getVetSchedule() {\n\t\t\tint initialCapacity = 10;\r\n\t\t\tArrayList<ArrayList<Dog>> list = new ArrayList<ArrayList<Dog>>(initialCapacity); //list to put in lists of dogs\r\n\t\t\t//intialize ArrayList with size ArrayList\r\n\t\t\tlist.add(new ArrayList<Dog>());\r\n\t\t\t/*for(int i=0; i<=10; i++){\r\n\t\t\t\tlist.add(new ArrayList<Dog>());\r\n\t\t\t}\r\n\t\t\t*/\r\n\t\t\tDogShelterIterator iterator = new DogShelterIterator();\r\n\t\t\twhile(iterator.hasNext()){\r\n\t\t\t\tDog nextDog = iterator.next();\r\n\t\t\t\tint index = nextDog.getDaysToNextVetAppointment()/7;\r\n\t\t\t\tif(index < list.size())list.get(index).add(nextDog);\r\n\t\t\t\telse{\r\n\t\t\t\t\t//index out of range --> create larger list\r\n\t\t\t\t\tArrayList<ArrayList<Dog>> newList = new ArrayList<ArrayList<Dog>>(index+1);\r\n\t\t\t\t\tnewList.addAll(list); //add all lists from the old list\r\n\t\t\t\t\tfor(int i=0; i<(index+1)-list.size(); i++){ //initialize the other half with new ArrayLists\r\n\t\t\t\t\t\tnewList.add(new ArrayList<Dog>());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlist = newList; //update list to the larger newList\r\n\t\t\t\t\tlist.get(index).add(nextDog);\r\n\t\t\t\t}\r\n\t\t\t}\r\n return list;\r\n\t\t}", "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 }", "@Override\n\tpublic void takeAppointment() {\n\t\tsearchByMobile();\n\t\tif (count == 0) {\n\t\t\tnew ManagerServiceImplementation().addPatient();\n\t\t}\n\t\tnew DoctorServiceImplementation().showDoctorDetails();\n\t\tSystem.out.println(\"Enter doctor's ID:\");\n\t\tString dID = UtilityClinic.readString();\n\t\tfor (int i = 0; i < UtilityClinic.docJson.size(); i++) {\n\t\t\tJSONObject obj = (JSONObject) UtilityClinic.docJson.get(i);\n\t\t\tif (obj.get(\"Doctor's ID\").toString().equals(dID)) {\n\t\t\t\tif (UtilityClinic.docWisePatCounter.isEmpty()) {\n\t\t\t\t\tfor (int j = 0; j < UtilityClinic.docJson.size(); j++) {\n\t\t\t\t\t\tUtilityClinic.docWisePatCounter.add(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (UtilityClinic.docWisePatCounter.get(i) < 5) {\n\t\t\t\t\tnew Appointment(obj.get(\"Doctor's name\").toString(), dID, pName, pId,\n\t\t\t\t\t\t\tobj.get(\"Availibility time\").toString());\n\t\t\t\t\tUtilityClinic.docWisePatCounter.add(i, UtilityClinic.docWisePatCounter.get(i) + 1);\n\n\t\t\t\t\tif (UtilityClinic.appFile == null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tutil.accessExistingAppJson();\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t\t\tutil.createAppJson();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tutil.readFromAppJson(util.appFile);\n\t\t\t\t\tJSONObject appObject = new JSONObject();\n\t\t\t\t\tAppointment app = new Appointment(obj.get(\"Doctor's name\").toString(), dID, pName, pId,\n\t\t\t\t\t\t\tobj.get(\"Availibility time\").toString());\n\t\t\t\t\tappObject.put(\"Patient's name\", app.getPatientName());\n\t\t\t\t\tappObject.put(\"Patient's ID\", app.getPatientId());\n\t\t\t\t\tappObject.put(\"Doctor's name\", app.getDoctorName());\n\t\t\t\t\tappObject.put(\"Doctor's ID\", app.getDoctorId());\n\t\t\t\t\tappObject.put(\"Time stamp\", app.getTime());\n\t\t\t\t\tUtilityClinic.appJson.add(appObject);\n\t\t\t\t\tutil.writetoJson(UtilityClinic.appJson, util.getAppFileName());\n\t\t\t\t\tutil.readFromAppJson(util.getAppFileName());\n\t\t\t\t\tSystem.out.println(\"Appointment done.....\\n\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Sorry!!! Doctor is not available....Please try on next day.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void creatBirth(){\n\n for (int i = 0; i < repeatLunar.size() - 1; i++) {\n mLunar = repeatLunar.get(i);\n mLunarDay = mLunar.getLunarDay();\n mLunarMonth = mLunar.getLunarMonth();\n mLunarYear = mLunar.getLunarYear();\n mRepeat = mLunar.getRepeat();\n\n createEvent(getDate(mLunarYear, mLunarMonth, mLunarDay));\n\n\n }\n\n\n\n }", "public void setupDays() {\n\n //if(days.isEmpty()) {\n days.clear();\n int day_number = today.getActualMaximum(Calendar.DAY_OF_MONTH);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEEE\");\n SimpleDateFormat sdfMonth = new SimpleDateFormat(\"MMM\");\n today.set(Calendar.DATE, 1);\n for (int i = 1; i <= day_number; i++) {\n OrariAttivita data = new OrariAttivita();\n data.setId_utente(mActualUser.getID());\n\n //Trasformare in sql date\n java.sql.Date sqldate = new java.sql.Date(today.getTimeInMillis());\n data.setGiorno(sqldate.toString());\n\n data.setDay(i);\n data.setMonth(today.get(Calendar.MONTH) + 1);\n\n data.setDay_of_week(today.get(Calendar.DAY_OF_WEEK));\n Date date = today.getTime();\n String day_name = sdf.format(date);\n data.setDay_name(day_name);\n data.setMonth_name(sdfMonth.format(date));\n\n int indice;\n\n if (!attivitaMensili.isEmpty()) {\n if ((indice = attivitaMensili.indexOf(data)) > -1) {\n OrariAttivita temp = attivitaMensili.get(indice);\n if (temp.getOre_totali() == 0.5) {\n int occurence = Collections.frequency(attivitaMensili, temp);\n if (occurence == 2) {\n for (OrariAttivita other : attivitaMensili) {\n if (other.equals(temp) && other.getCommessa() != temp.getCommessa()) {\n data.setOtherHalf(other);\n data.getOtherHalf().setModifica(true);\n }\n }\n\n }\n }\n data.setFromOld(temp);\n data.setModifica(true);\n }\n }\n isFerie(data);\n\n\n //Aggiungi la data alla lista\n days.add(data);\n\n //Aggiugni un giorno alla data attuale\n today.add(Calendar.DATE, 1);\n }\n\n today.setTime(actualDate);\n\n mCalendarAdapter.notifyDataSetChanged();\n mCalendarList.setAdapter(mCalendarAdapter);\n showProgress(false);\n }", "List<Appointment> getCurrentlyAppointment();", "private void initDate(){\n\n owa = findViewById(R.id.OWA);\n sda = findViewById(R.id.SWA);\n fida = findViewById(R.id.FIDA);\n fda = findViewById(R.id.FDA);\n trda = findViewById(R.id.TRDA);\n tda = findViewById(R.id.TDA);\n hier = findViewById(R.id.HIER);\n\n dateList.add(hier);\n dateList.add(tda);\n dateList.add(trda);\n dateList.add(fda);\n dateList.add(fida);\n dateList.add(sda);\n dateList.add(owa);\n\n }", "private List<Encounter> randomizeEncounterDates(List<Obs> patientObsList){\n\t\tInteger flag=0;\n\t\tList<Date> randomizedEncounterDateList = new ArrayList<Date>();\n\t\tList<Encounter> en = new ArrayList<Encounter>();\n\t\tfor(Obs o : patientObsList){\n\t\t\ten.add(o.getEncounter());\n\t\t}\n\t\tint year,month,date;\n\t\ttry{\n\t\t\tfor(int i=0; i<patientObsList.size();i++){\n\t\t\t\tDate d= new Date();\n\t\t\t\tif(flag==0){\n\t\t\t\t\td.setDate(en.get(0).getEncounterDatetime().getDate());\n\t\t\t\t\td.setMonth(en.get(0).getEncounterDatetime().getMonth());\n\t\t\t\t\td.setYear(en.get(0).getEncounterDatetime().getYear());\n\t\t\t\t\tflag=1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\td.setDate(en.get(i-1).getEncounterDatetime().getDate());\n\t\t\t\t\td.setMonth(en.get(i-1).getEncounterDatetime().getMonth());\n\t\t\t\t\td.setYear(en.get(i-1).getEncounterDatetime().getYear());\n\t\t\t\t}\n\t\t\t\tyear=d.getYear()+1900;\n\t\t\t\tmonth=d.getMonth();\n\t\t\t\tdate=d.getDate();\n\n\t\t\t\t//Randomize\n\t\t\t\tyear= randBetween(year+1, year+2) ;\n\t\t\t\tmonth = randBetween(month, 12);\n\t\t\t\tdate= randBetween(date, 30);\n\n\t\t\t\t//Set date\n\t\t\t\td.setYear(year-1900);\n\t\t\t\td.setMonth(month);\n\t\t\t\td.setDate(date);\n\t\t\t\ten.get(i).setEncounterDatetime(d);\n\t\t\t\trandomizedEncounterDateList.add(d);\n\t\t\t}\n\t\t}\n\t\tcatch(APIException e){\n\t\t\tlog.error(\"Exception in randomizing encounter dates\", e);\n\t\t}\n\t\treturn en;\n\t}", "@Override\n public Set PatientsOlderThenEnlistedAfter() {\n Set<Patient> patients = new HashSet<>();\n patientRepository.findAll().forEach(patients::add);\n Set<Patient>olderThanEnlistedSince = new HashSet<>();\n if(patients != null)\n {\n patients.forEach((patient) ->\n {\n if(patient.getAge() > 21 && patient.getEnlistmentDate().after(new Date(01-01-2020))){\n olderThanEnlistedSince.add(patient);\n }else {\n System.out.println(\"No patients older than 21 enlisted after 1.1.2020.\");\n }\n });\n }\n\n return olderThanEnlistedSince;\n }", "public void trierListeCrudDateCroissante(){\r\n\t\tint i,j;\r\n\t\tObject [] tmp = new Object [6];\r\n\t\t\r\n\t\tif (listeRdvCrud.size()>1){\r\n\t\t\tfor (i = 0; i< listeRdvCrud.size(); i++){\r\n\t\t\t\tfor (j = 0; j< listeRdvCrud.size(); j++){\r\n\t\t\t\t\ttmp = listeRdvCrud.get(i);\r\n\t\t\t\t\tif(compareDate(listeRdvCrud.get(j)[0].toString(),listeRdvCrud.get(j)[1].toString(),\r\n\t\t\t\t\ttmp[0].toString(),tmp[1].toString()) > 0){\r\n\t\t\t\t\t\tlisteRdvCrud.set(i, listeRdvCrud.get(j));\r\n\t\t\t\t\t\tlisteRdvCrud.set(j, tmp);\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}", "private List<Obs> getEncountersOfPatient(Patient patient, List<Obs> patientObsList, Integer pid){\n\t\tpatientObsList = getFinalObsList(patient, patientObsList, pid);\t\t\n\t\tList<Encounter> randomizedEncounterList = randomizeEncounterDates(patientObsList);\n\t\tList<Date> randomizedEncounterDateList= new ArrayList<Date>();\n\t\tfor(Encounter e : randomizedEncounterList){\n\t\t\trandomizedEncounterDateList.add(e.getEncounterDatetime());\n\t\t}\n\t\tfor(int i=0; i<randomizedEncounterDateList.size();i++){\n\t\t\tEncounter e = patientObsList.get(i).getEncounter();\n\t\t\te.setEncounterDatetime(randomizedEncounterDateList.get(i));\n\t\t\tpatientObsList.get(i).setEncounter(e);\n\t\t}\n\t\tfor(int i=0; i<patientObsList.size();i++){\n\t\t\tLocation loc = new Location();\n\t\t\tloc.setAddress1(accessLocationPropFile());\n\t\t\tpatientObsList.get(i).setLocation(loc);\n\t\t}\n\t\treturn patientObsList;\n\t}", "public Staff2 ()\n {\n staffList = new StaffMember2[8];\n\n staffList[0] = new Executive2 (\"Sam\", \"123 Main Line\",\n \"555-0469\", \"123-45-6789\", 2423.07);\n\n staffList[1] = new Employee2 (\"Carla\", \"456 Off Line\",\n \"555-0101\", \"987-65-4321\", 1246.15);\n staffList[2] = new Employee2 (\"Woody\", \"789 Off Rocker\",\n \"555-0000\", \"010-20-3040\", 1169.23);\n\n staffList[3] = new Hourly2 (\"Diane\", \"678 Fifth Ave.\",\n \"555-0690\", \"958-47-3625\", 10.55);\n\n staffList[4] = new Volunteer2 (\"Norm\", \"987 Suds Blvd.\",\n \"555-8374\");\n staffList[5] = new Volunteer2 (\"Cliff\", \"321 Duds Lane\",\n \"555-7282\");\n\n staffList[6] = new Commission (\"Ron\", \"546 Mainland Dr.\",\n \t\"555-8141\", \"547-87-9845\", 11.75, .20);\n staffList[7] = new Commission (\"Sammy\", \"180 Barkley Lane\",\n \t\"555-6256\", \"695-14-3824\", 14.50, .15);\n\n ((Executive2)staffList[0]).awardBonus (500.00);\n\n ((Commission)staffList[6]).addHours(35);\n ((Commission)staffList[6]).addSales(400);\n\n ((Commission)staffList[7]).addHours(40);\n ((Commission)staffList[7]).addSales(950);\n\n ((Hourly2)staffList[3]).addHours (40);\n }", "public List<flight> timeSwich(List<flight> FlightInfo, List<airportInformation> airport){\n\t flight ThisInfo = new flight();\n\t airportInformation ai = new airportInformation();\n\t Iterator AllInfo = FlightInfo.iterator();\n\t \n\t SimpleDateFormat OTime = new SimpleDateFormat(\"yyyy_MM_dd HH:mm\");\n\t OTime.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\t SimpleDateFormat NTime = new SimpleDateFormat(\"yyyy_MM_dd HH:mm\");\n\t String[] parts;\n\t String ThisTime;\n\t String[] airportName = ai.sortAirportName(airport);\n\t \n\t while (AllInfo.hasNext())\n\t { \n\t ThisInfo= (flight)AllInfo.next();//From this we can get the arriving airport and departing airport\n\t String date = ThisInfo.getDepartingDate()+\" \"+ThisInfo.getDepartingTime();\n\t Date FTime = null;\n\t switch (ai.getAirportRank(airportName, ThisInfo.getDepartingAirport())){\n\t case 0:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Anchorage\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 1:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/New_York\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 2:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 3:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 4:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 5:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 6:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Chicago\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 7:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Chicago\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 8:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 9:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 10:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 11:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 12:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Denver\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 13:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Detroit\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 14:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 15:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 16:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 17:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"Pacific/Honolulu\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 18:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 19:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 20:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Indiana/Indianapolis\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 21:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 22:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 23:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Los_Angeles\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 24:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 25:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 26:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 27:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 28:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 29:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/New_York\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 30:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/New_York\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 31:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 32:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 33:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 34:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 35:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 36:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Phoenix\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 37:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 38:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 39:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 40:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Mountain\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 41:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 42:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 43:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 44:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 45:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Paciifc\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 46:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 47:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 48:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 49:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t case 50:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTime= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTime);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setDepartingDate(parts[0]);\n\t ThisInfo.setDepartingTime(parts[1]);\n\t break;\n\t \n\t }\n\t }\n\t Iterator AllInf = FlightInfo.iterator(); \n\t while (AllInf.hasNext())\n\t { ThisInfo=(flight)AllInf.next();\n\t String date = ThisInfo.getArrivingDate()+\" \"+ThisInfo.getArrivingTime();\n\t Date FTim = null;\n\t switch (ai.getAirportRank(airportName, ThisInfo.getArrivingAirport())){\n\t case 0:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Anchorage\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 1:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/New_York\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 2:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 3:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 4:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 5:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 6:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Chicago\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 7:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Chicago\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 8:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 9:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 10:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 11:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 12:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Denver\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 13:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Detroit\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 14:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 15:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 16:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 17:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"Pacific/Honolulu\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 18:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 19:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 20:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Indiana/Indianapolis\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 21:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 22:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 23:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Los_Angeles\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 24:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 25:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 26:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 27:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 28:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 29:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/New_York\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 30:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/New_York\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 31:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 32:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 33:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 34:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 35:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 36:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"America/Phoenix\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 37:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 38:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 39:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 40:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Mountain\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 41:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 42:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 43:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 44:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 45:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Paciifc\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 46:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Pacific\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 47:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 48:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 49:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t case 50:\n\t NTime.setTimeZone(TimeZone.getTimeZone(\"US/Eastern\"));\n\t try{\n\t FTim= OTime.parse(date);\n\t } catch (ParseException e) {\n\t e.printStackTrace();\n\t }\n\t ThisTime = NTime.format(FTim);\n\t parts = ThisTime.split(\" \");\n\t ThisInfo.setArrivingDate(parts[0]);\n\t ThisInfo.setArrivingTime(parts[1]);\n\t break;\n\t \n\t }\n\t }\n\t \n\t return FlightInfo;\n\t }", "public void caltotaltraveltime()\n {\n \t\n \t switch(this.mLegs.size())\n \t {\n \t case 0:\n \t {\n \t\t this.mTravelTime=0;\n \t\t break;\n \t }\n \t case 1:\n \t { \n \t\t this.mTravelTime=this.mLegs.get(0).flighttime();\n \t\t break;\n \t }\n \t case 2:\n \t {\n \t\t Date arrivalt = this.mLegs.get(1).arrivaldate();\n \t\t Date departt = this.mLegs.get(0).departuredate();\n \t\t long diff = (arrivalt.getTime() - departt.getTime())/60000;\n \t\t this.mTravelTime=diff;\n \t\t break;\n \t }\n \t case 3:\n \t {\n \t Date arrivalt = this.mLegs.get(2).arrivaldate();\n \t Date departt = this.mLegs.get(0).departuredate();\n \t long diff = (arrivalt.getTime() - departt.getTime())/60000;\n \t this.mTravelTime=diff;\n \t break;\n \t }\n \t }\n }", "public void addListDataToDB() {\n\n for (int i = 1; i < 10; i++) {\n TimerDisplay timer = new TimerDisplay();\n timer.setCurrentDate(\"Jan 0\" + i + \" 2017 00:00\");\n timer.setEndDate(\"Jan 0\" + (i + 2) + \" 2017 00:00\");\n timer.setPercentage();\n\n databaseHelper.addDate(timer);\n //listTimers.add(timer);\n }\n }", "private ArrayList<Meal> getMealsFromDates(ArrayList<String> dateList) {\n ArrayList<Meal> mealArrayList = new ArrayList<>();\n for (int i = 0; i < dateList.size(); i++) {\n if (dataCont.findPlan(dateList.get(i)) != null) {\n mealArrayList.add(dataCont.findPlan(dateList.get(i)).getPlannedMeal());\n }\n }\n return mealArrayList;\n }", "private ArrayList<CourseCompo> addCourseComp(int courseType){\n ArrayList<String> dateAndTime = new ArrayList<String>();\n ArrayList<CourseCompo> courseCompoList = new ArrayList<CourseCompo>();\n CourseCompo courseCompo = new CourseCompo(null,null,null);\n System.out.println(\"\\nPlease enter the date and time for lecture:\\n\");\n dateAndTime = this.dateTimeSelection();\n \n courseCompoList.add(new CourseCompo(\"LEC\",dateAndTime.get(0),dateAndTime.get(1)));\n if(courseType ==2){\n\n System.out.println(\"\\nPlease enter the date and time for tutorial:\\n\");\n dateAndTime = this.dateTimeSelection();\n courseCompoList.add(new CourseCompo(\"TUT\",dateAndTime.get(0),dateAndTime.get(1)));\n }\n else if (courseType ==3){\n System.out.println(\"\\nPlease enter the date and time for tutorial:\\n\");\n dateAndTime = this.dateTimeSelection();\n courseCompoList.add(new CourseCompo(\"TUT\",dateAndTime.get(0),dateAndTime.get(1)));\n\n System.out.println(\"\\nPlease enter the date and time for lab:\\n\");\n dateAndTime = this.dateTimeSelection();\n courseCompoList.add(new CourseCompo(\"LAB\",dateAndTime.get(0),dateAndTime.get(1)));\n\n \n\n \n }\n return courseCompoList;\n }", "public List<String> recordedDateList();", "Doctor getDoctor();", "public static void main(String[] args) {\n\t\t\r\n\t\tString[] days= {\"SUNDAY\",\"MONDAY\",\"TUESDAY\",\"WEDNESDAY\",\"THURSDAY\",\"FRIDAY\",\"SATURDAY\"};\r\n\t\t\r\n//\t\tSystem.out.println(\"First day\"+days[0]);\r\n//\t\tSystem.out.println(\"Number of days:\"+days.length);\r\n\t\t\r\n\t\t//\r\n\t\tString[] patients=new String[10];\r\n\t\t\r\n\t\tpatients =new String[] {\"sdfd\",\"sdfsd\",\"sdfsd\",\"sffgf\",\"sdfsd\",\"dfsdfs\",\"hgfhf\"};\r\n\t\tSystem.out.println(\"Patient 5 :\"+patients[5]);\r\n\t\tSystem.out.println(\"Patient 6 :\"+patients[6]);\r\n\t\t\r\n\t\t\r\n\t\tArrayList students=new ArrayList();\r\n\t\tstudents.add(\"First\");\r\n\t\tstudents.add(\"Second\");\r\n\t\tstudents.add(0, \"El\");\r\n\t\tstudents.set(0, \"NewStudent\");\r\n\t\tfor(Object s: students)\r\n\t\t{\r\n\t\t\tSystem.out.println(s);\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0;i<students.size();i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(students.get(i));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Number of Students :\"+students.size());\r\n\t\tSystem.out.println(\"Student at position 1 :\"+students.get(0));\r\n\t\tSystem.out.println(students.isEmpty());\r\n\t\t\r\n\t\tArrayList list=new ArrayList();\r\n\t\tInteger i=10;\r\n\t\tint in=10;\r\n\t\tlist.add(Integer.valueOf(in));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private void makeSubPlan(Plan plan,Time currentTime,ArrayList<POI> POIs,Time timeEnd,Trip trip,Plan mPlan,boolean skip){\n if(mPlan!=null) \n plan.makeCalculations(trip.getStartTime(),trip.getEndTime(),mPlan.getFullCost(),mPlan);\n else\n plan.makeCalculations(trip.getStartTime(),trip.getEndTime(),0,mPlan);\n POI last=plan.getLastPOI();\n for(int i=0; i< POIs.size();i++){\n // Check if iam in Time range or not\n if(!currentTime.compare(timeEnd))\n break;\n else{\n if(canInsertLast(plan, POIs.get(i), trip, currentTime,mPlan,skip)){\n // update current time & plan\n Time from = new Time (0,0);\n Time to = new Time (0,0);\n if(last!=null){\n // cal travel time\n currentTime.add(last.getShortestPath(POIs.get(i).getId()));\n // cal waste time\n int x = Time.substract(currentTime, POIs.get(i).getOpenTime());\n if(skip&&x!=-1)\n currentTime.add(x);\n \n from.hour = currentTime.hour;\n from.min = currentTime.min;\n // cal poi duration \n currentTime.add(POIs.get(i).getDuration());\n to.hour = currentTime.hour;\n to.min = currentTime.min;\n }\n else{\n if(mPlan==null){\n int x = Time.substract(currentTime, POIs.get(i).getOpenTime());\n if(skip&&x!=-1)\n currentTime.add(x);\n from.hour = currentTime.hour;\n from.min = currentTime.min;\n currentTime.add(POIs.get(i).getDuration());\n to.hour = currentTime.hour;\n to.min = currentTime.min;\n }\n else{\n POI mLast = mPlan.getLastPOI();\n if(mLast!=null)\n currentTime.add(mLast.getShortestPath(POIs.get(i).getId()));\n int x = Time.substract(currentTime, POIs.get(i).getOpenTime());\n if(skip&&x!=-1)\n currentTime.add(x);\n from.hour = currentTime.hour;\n from.min = currentTime.min;\n currentTime.add(POIs.get(i).getDuration());\n to.hour = currentTime.hour;\n to.min = currentTime.min;\n }\n }\n plan.insert(POIs.get(i), plan.getNOV(),from,to,null);\n if(mPlan!=null)\n plan.makeCalculations(trip.getStartTime(), trip.getEndTime(),mPlan.getFullCost(),mPlan);\n else\n plan.makeCalculations(trip.getStartTime(),trip.getEndTime(),0,mPlan);\n last=POIs.get(i);\n // Remove poi from POIs\n POIs.remove(i);\n i--;\n }\n }\n }\n }", "public void saveMealPlanner(){\n Data.<Days>saveList(ObservableWeekList, mealPlannerFile);\n }", "public ItineraryLeg(LocalDate date, Walk walk, int startTime) {\n this.date = date;\n this.walk = walk;\n this.origin = walk.getOrigin();\n this.destination = walk.getDestination();\n this.startTime = startTime;\n this.endTime = startTime + walk.walkingTime();\n }", "public ArrayList<RdV> afficherRdV(LocalDate d1, LocalDate d2) {\n ArrayList<RdV> plage_RdV = new ArrayList();\n if (this.getAgenda() != null) {\n for (RdV elem_agenda : this.getAgenda()) {\n //si le rdv inscrit dans l'agenda est compris entre d1 et d2\n //d1<elem_agenda<d2 (OU d2<elem_agenda<d1 si d2<d1)\n if ((elem_agenda.getDate().isAfter(d1) && elem_agenda.getDate().isBefore(d2))\n || (elem_agenda.getDate().isAfter(d2) && elem_agenda.getDate().isBefore(d1))) {\n plage_RdV.add(elem_agenda);\n }\n }\n //on print la liste de rdv avant tri\n System.out.print(plage_RdV);\n //on print la liste de rdv avant tri\n System.out.print(\"\\n\");\n Collections.sort(plage_RdV);\n System.out.print(plage_RdV);\n\n }\n\n return plage_RdV;\n\n }", "public void finishDiary() {\n DiaryElement stay;\n if (this.activities.size() == 1) {\n stay = this.activities.get(0);\n stay.start_min = 0;\n stay.end_min = ONE_DAY;\n stay.purpose = 0;\n stay.purposeDetailed = 0;\n stay.purposeDescription = \"At home\";\n stay.home = true;\n stay.stay = true;\n //this.addDiaryElement(stay);\n } else {\n\n //check if the last trip was going home!\n DiaryElement pre = this.activities.get(this.activities.size() - 1);\n if (!pre.home) {// && !pre.isRoundTrip()){\n numOfDiariesNotEndingAtHome++;\n//\t\t\t\t\tif(purposeNonHomeEndTrip.get(pre.purpose)==null){\n//\t\t\t\t\t\tpurposeNonHomeEndTrip.put(pre.purpose,1);\n//\t\t\t\t\t}\n//\t\t\t\t\telse{\n//\t\t\t\t\t\tpurposeNonHomeEndTrip.put(pre.purpose,purposeNonHomeEndTrip.get(pre.purpose)+1);\n//\t\t\t\t\t}\n //System.out.println(\"Purp: \"+pre.purpose+\"/\"+pre.purposeDetailed+\" Dest: \"+pre.tripDestination);\n //oops fit it: Insert a stay (5min) and a trip back home\n DiaryElement auxStay = new DiaryElement();\n auxStay.start_min = pre.end_min;\n auxStay.end_min = auxStay.start_min + 5;\n auxStay.purpose = pre.purpose;\n auxStay.purposeDetailed = pre.purposeDetailed;\n auxStay.purposeDescription = pre.purposeDescription;\n auxStay.home = false;\n auxStay.stay = true;\n this.addDiaryElement(auxStay);\n // now insert a trip home.\n //Only problem: how long should it be?\n //Assumption: look back for the last trip from home and take this time!\n pre = new DiaryElement(); //this will be the preceeding trip for the rest of the code!\n pre.start_min = auxStay.end_min;\n //now look for the duration of the last trip from home\n int duration = 5; //safety value\n for (int i = this.activities.size() - 2; i >= 0; --i) {\n DiaryElement lastStayHome = this.activities.get(i);\n if (lastStayHome.home && lastStayHome.stay) {\n duration = this.activities.get(i + 1).getDurtation();\n break;\n }\n }\n\n\n pre.end_min = pre.start_min + duration;\n pre.purpose = 8;\n pre.purposeDetailed = 3307;\n pre.purposeDescription = \" Automatic trip back home\";\n pre.home = true;\n pre.stay = false;\n this.addDiaryElement(pre);\n\n }\n\n stay = new DiaryElement();\n\n stay.start_min = pre.end_min;\n stay.end_min = Math.max(ONE_DAY, pre.end_min + 1);\n stay.purpose = pre.home ? 0 : pre.purpose;\n stay.purposeDetailed = pre.home ? 0 : pre.purposeDetailed;\n stay.purposeDescription = \"At home\";\n stay.home = true;\n stay.stay = true;\n this.addDiaryElement(stay);\n\n //Collections.sort(this.activities);\n\n //now update the tournumbers\n pre = this.activities.get(0);\n int actTourNumber;\n DiaryElement act = null;\n List<Integer> toursWithWork = new LinkedList<>();\n //first home stays are always tour 0 trips are 1...\n actTourNumber = 1; // start with the first tour\n for (int i = 1; i < this.activities.size(); ++i) {\n act = this.activities.get(i);\n if (act.stay) { //a stay allways gets the tournumber of its last trip\n if (act.home) act.tourNumber = 0;\n else act.tourNumber = pre.tourNumber;\n } else {\n act.tourNumber = actTourNumber; //update the tour number\n }\n\n if (act.purpose == 1 || act.purpose == 2) {\n toursWithWork.add(actTourNumber);\n }\n if (!act.stay && act.home) // a tour ending at home: all succeding trips are a new tour\n {\n actTourNumber++;\n }\n pre = act;\n }\n //now fix all trips within a workchain\n if (toursWithWork.size() > 0) {\n for (int i = 1; i < this.activities.size() - 1; ++i) {\n act = this.activities.get(i);\n if (!(act.home && act.stay) && toursWithWork.contains(act.tourNumber)) {\n act.workchain = true;\n }\n }\n }\n\n //now fix 0-min stays:\n this.totalTravelTime = 0;\n int addTime;\n for (int i = 1; i < this.activities.size(); ++i) {\n act = this.activities.get(i);\n pre = this.activities.get(i - 1);\n //fix starts at midnight\n if (act.start_min == 0) {\n pre.end_min = act.start_min = 1;\n }\n addTime = 1 - act.getDurtation();\n if (act.getDurtation() <= 0) {\n act.end_min += addTime;\n for (int j = i + 1; j < this.activities.size(); ++j) {\n this.activities.get(j).start_min += addTime;\n this.activities.get(j).end_min += addTime;\n }\n }\n if (!act.stay) {\n this.totalTravelTime += act.getDurtation();\n }\n }\n for (int i = 1; i < this.activities.size(); ++i) {\n act = this.activities.get(i);\n pre = this.activities.get(i - 1);\n if (act.start_min == pre.start_min) System.out.println(\"argh!\");\n }\n\n }\n\n\n }", "public void addToReminders(List<Date> reminders);", "private String addIDatentraegerNew(List<Datentraeger> list) {\n\t\tString iD = \"\";\n\t\tfor( int i = 0 ; i < list.size(); i++ ){\n\t\t\tif( i == list.size() - 1 ){\n\t\t\t\tiD = iD + list.get( i ).iD;\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\tiD = iD + list.get( i ).iD + DEFAULT_DELIMMTER;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn iD;\n\t}", "private void createClinicList(){\n\n ArrayList<Clinic> clinics = LogIn.clinicDAO.getAllClinics();\n for(Clinic cn : clinics){\n double avgRating = LogIn.rateDAO.getAvgRating(cn.getClinicID());\n clinicList.add(new ClinicItem(cn.getClinicName(), drawable.clinic_logo, \"Singapore\", Double.toString(avgRating)));\n }\n }", "public StationList()\r\n {\r\n //your data add comes here\r\n Station s_01 = new Station(\"Bristol Temple Meads\", 1, 8, 00);\r\n Station s_02 = new Station(\"Cardiff\", 1, 8, 15);\r\n Station s_03 = new Station(\"Dursley\", 1, 8, 30);\r\n Station s_04 = new Station(\"Edinburgh\", 2, 8, 45);\r\n Station s_05 = new Station(\"Gloucester\", 1, 9, 00);\r\n Station s_06 = new Station(\"Liverpool\", 2, 9, 15);\r\n \r\n Station s_07 = new Station(\"Bristol Temple Meads\", 1, 9, 30);\r\n Station s_08 = new Station(\"Cardiff\", 1, 9, 45);\r\n Station s_09 = new Station(\"Dursley\", 1, 10, 00);\r\n Station s_10 = new Station(\"Edinburgh\", 2, 10, 15);\r\n Station s_11 = new Station(\"Gloucester\", 1, 10, 30);\r\n Station s_12 = new Station(\"Liverpool\", 2, 10, 45);\r\n \r\n Station s_13 = new Station(\"Bristol Temple Meads\", 1, 11, 00);\r\n Station s_14 = new Station(\"Cardiff\", 1, 11, 15);\r\n Station s_15 = new Station(\"Dursley\", 1, 11, 30);\r\n Station s_16 = new Station(\"Edinburgh\", 2, 11, 45);\r\n Station s_17 = new Station(\"Gloucester\", 1, 12, 00);\r\n Station s_18 = new Station(\"Liverpool\", 2, 12, 15);\r\n \r\n Station s_19 = new Station(\"Bristol Temple Meads\", 1, 12, 30);\r\n Station s_20 = new Station(\"Cardiff\", 1, 12, 45);\r\n Station s_21 = new Station(\"Dursley\", 1, 13, 00);\r\n Station s_22 = new Station(\"Edinburgh\", 2, 13, 15);\r\n Station s_23 = new Station(\"Gloucester\", 1, 13, 30);\r\n Station s_24 = new Station(\"Liverpool\", 2, 13, 45);\r\n \r\n Station s_25 = new Station(\"Bristol Temple Meads\", 1, 14, 00);\r\n Station s_26 = new Station(\"Cardiff\", 1, 14, 15);\r\n Station s_27 = new Station(\"Dursley\", 1, 14, 30);\r\n Station s_28 = new Station(\"Edinburgh\", 2, 14, 45);\r\n Station s_29 = new Station(\"Gloucester\", 1, 15, 00);\r\n Station s_30 = new Station(\"Liverpool\", 2, 15, 15);\r\n \r\n Station s_31 = new Station(\"Bristol Temple Meads\", 1, 15, 30);\r\n Station s_32 = new Station(\"Cardiff\", 1, 15, 45);\r\n Station s_33 = new Station(\"Dursley\", 1,16, 00);\r\n Station s_34 = new Station(\"Edinburgh\", 2, 16, 15);\r\n Station s_35 = new Station(\"Gloucester\", 1, 16, 30);\r\n Station s_36 = new Station(\"Liverpool\", 2, 16, 45);\r\n \r\n Station s_37 = new Station(\"Bristol Temple Meads\", 1, 17, 00);\r\n Station s_38 = new Station(\"Cardiff\", 1, 17, 15);\r\n Station s_39 = new Station(\"Dursley\", 1, 17, 30);\r\n Station s_40 = new Station(\"Edinburgh\", 2, 17, 45);\r\n Station s_41 = new Station(\"Gloucester\", 1, 18, 00);\r\n Station s_42 = new Station(\"Liverpool\", 2, 18, 15);\r\n \r\n Station s_43 = new Station(\"Bristol Temple Meads\", 1, 18, 30);\r\n Station s_44 = new Station(\"Cardiff\", 1, 18, 45);\r\n Station s_45 = new Station(\"Dursley\", 1, 19, 00);\r\n Station s_46 = new Station(\"Edinburgh\", 2, 19, 15);\r\n Station s_47 = new Station(\"Gloucester\", 1, 19, 30);\r\n Station s_48 = new Station(\"Liverpool\", 2, 19, 45);\r\n \r\n Station s_49 = new Station(\"Bristol Temple Meads\", 1, 20, 00);\r\n Station s_50 = new Station(\"Cardiff\", 1, 20, 15);\r\n Station s_51 = new Station(\"Dursley\", 1, 20, 30);\r\n Station s_52 = new Station(\"Edinburgh\", 2, 20, 45);\r\n Station s_53 = new Station(\"Gloucester\", 1, 21, 00);\r\n Station s_54 = new Station(\"Liverpool\", 2, 21, 15);\r\n \r\n Station s_55 = new Station(\"Bristol Temple Meads\", 1, 21, 30);\r\n Station s_56 = new Station(\"Cardiff\", 1, 21, 45);\r\n Station s_57 = new Station(\"Dursley\", 1, 22, 00);\r\n Station s_58 = new Station(\"Edinburgh\", 2, 22, 15);\r\n Station s_59 = new Station(\"Gloucester\", 1, 22, 30);\r\n Station s_60 = new Station(\"Liverpool\", 2, 22, 45);\r\n \r\n stationList.add(s_01);\r\n stationList.add(s_02);\r\n stationList.add(s_03);\r\n stationList.add(s_04);\r\n stationList.add(s_05);\r\n stationList.add(s_06);\r\n stationList.add(s_07);\r\n stationList.add(s_08);\r\n stationList.add(s_09);\r\n stationList.add(s_10);\r\n stationList.add(s_11);\r\n stationList.add(s_12);\r\n stationList.add(s_13);\r\n stationList.add(s_14);\r\n stationList.add(s_15);\r\n stationList.add(s_16);\r\n stationList.add(s_17);\r\n stationList.add(s_18);\r\n stationList.add(s_19);\r\n stationList.add(s_20);\r\n stationList.add(s_21);\r\n stationList.add(s_22);\r\n stationList.add(s_23);\r\n stationList.add(s_24);\r\n stationList.add(s_25);\r\n stationList.add(s_26);\r\n stationList.add(s_27);\r\n stationList.add(s_28);\r\n stationList.add(s_29);\r\n stationList.add(s_30);\r\n stationList.add(s_31);\r\n stationList.add(s_32);\r\n stationList.add(s_33);\r\n stationList.add(s_34);\r\n stationList.add(s_35);\r\n stationList.add(s_36);\r\n stationList.add(s_37);\r\n stationList.add(s_39);\r\n stationList.add(s_40);\r\n stationList.add(s_41);\r\n stationList.add(s_42);\r\n stationList.add(s_43);\r\n stationList.add(s_44);\r\n stationList.add(s_45);\r\n stationList.add(s_46);\r\n stationList.add(s_47);\r\n stationList.add(s_48);\r\n stationList.add(s_49);\r\n stationList.add(s_50);\r\n stationList.add(s_51);\r\n stationList.add(s_52);\r\n stationList.add(s_53);\r\n stationList.add(s_54);\r\n stationList.add(s_55);\r\n stationList.add(s_56);\r\n stationList.add(s_57);\r\n stationList.add(s_58);\r\n stationList.add(s_59);\r\n stationList.add(s_60);\r\n\r\n\r\n \r\n }", "public void addAppointment(DateTime startTim, DateTime endTim, String desc, Date date)\n {\n Appointment app = Appointment(startTim, endTim, desc);\n if(cal.containsKey(date)){\n cal.getClass(date).append(app);\n \n }else{\n List y;\n y.append(app);\n cal.put(date, y);\n }\n }", "private ArrayList<TTC> generateSegmentsHelper(ArrayList<TTC> reference_list) {\n\n ArrayList<TTC> copy = new ArrayList<> (reference_list);\n int start = 0;\n int end = 0;\n\n while (!copy.get(start).equals(START_STATION)) {\n start += 1;\n }\n while (!copy.get(end).equals(endStation)) {\n end += 1;\n }\n if (start < end) {\n return new ArrayList<>(copy.subList(start, end + 1));\n } else if (start == end) {\n return new ArrayList<>(); // if enter and exit at the same station.\n } else {\n Collections.reverse(copy);\n return new ArrayList<>(copy.subList(end, start + 1));\n }\n }", "List<Venta1> consultarVentaPorFecha(Date desde, Date hasta, Persona cliente) throws Exception;", "private void findStop(Airport departAPT, double distanceNeed, double maxRange){\n\t\t\tint stopIndex=-1;\r\n\t\t\tdouble stopDist=0;\r\n\t\t\tdouble stopToDestnDistance=999999999; //distance from depart to destination\r\n\t\t\tdouble startToStopDistance; //depart to stop distance\r\n\t\t\tdouble testDistance;\r\n\t\t\tString id;\r\n\r\n\t\t\tfor(int i=0; i<apt.size();++i){ //test every airport\r\n\t\t\t\t//cannot be destination or departing airport or dead end airport;\r\n\t\t\t\tid=apt.get(i).getID();\r\n\t\t\t\tif(id!=departAPT.getID() && id!=destnAPT.getID() && !deadEnd.contains(id)){\r\n\t\t\t\t\t//test avaliable fuel for this airplane type\r\n\t\t\t\t\tif(apt.get(i).getFuelType().contains(usePlane.getMatchType())){\r\n\t\t\t\t\t\tstartToStopDistance=findDistance(departAPT.getLat(),departAPT.getLon(),apt.get(i).getLat(),apt.get(i).getLon());\r\n\t\t\t\t\t\t//test if distance between depart and stop is in airplane's max travel range and if not same range as previous stop\r\n\t\t\t\t\t\tif(startToStopDistance<=maxRange && !stopAPTDist.contains(startToStopDistance)){\r\n\t\t\t\t\t\t\ttestDistance=findDistance(apt.get(i).getLat(),apt.get(i).getLon(),destnAPT.getLat(),destnAPT.getLon());\r\n\t\t\t\t\t\t\tif(testDistance<stopToDestnDistance){\r\n\t\t\t\t\t\t\t\tstopDist=startToStopDistance;\r\n\t\t\t\t\t\t\t\tstopIndex=i;\r\n\t\t\t\t\t\t\t\tstopToDestnDistance=testDistance;\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\tif(stopIndex!=-1){ //when stop is avaliable add this stop to info list\r\n\t\t\t\tstopAPT.add(apt.get(stopIndex));\r\n\t\t\t\tstopAPTDist.add(stopDist);\r\n\t\t\t\tif(stopToDestnDistance<=usePlane.getMaxRange()){ //if stop can reach destination, add final round and return to plan method\r\n\t\t\t\t\tstopAPT.add(destnAPT);\r\n\t\t\t\t\tstopAPTDist.add(findDistance(apt.get(stopIndex).getLat(),apt.get(stopIndex).getLon(),destnAPT.getLat(),destnAPT.getLon()));\r\n\t\t\t\t\tdeadEnd.clear();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse findStop(apt.get(stopIndex),stopToDestnDistance, usePlane.getMaxRange());\r\n\t\t\t}\r\n\t\t\telse { //when no stop is find, break the plan and clear everything\r\n\t\t\t\tif(stopAPT.isEmpty() || deadEnd.size()>5){\r\n\t\t\t\t\tstopAPT.clear();\r\n\t\t\t\t\tstopAPTDist.clear();\r\n\t\t\t\t\tdeadEnd.clear();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse{ //when stops routine cannot reach destination, clear all and start another path\r\n\t\t\t\tdeadEnd.add(departAPT.getID());\r\n\t\t\t\tstopAPT.clear();\r\n\t\t\t\tstopAPTDist.clear();\r\n\t\t\t\tif(startAPT.getFuelType().contains(usePlane.getMatchType())){\r\n\t\t\t\t\tfindStop(startAPT,dist,usePlane.getMaxRange());\r\n\t\t\t\t}else findStop(startAPT,dist,((fuelTank/usePlane.getFuelTank())*usePlane.getMaxRange()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t\t}", "private GxyService getGxyService() {\r\n\t\tthis.visitNo = 0;\r\n\t\tfor (int i = 0; i < this.visitTime.length; i++) {\r\n\t\t\tif (visitTime[i] != null) {\r\n\t\t\t\tthis.visitNo = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\tGxyService gxyService = new GxyService();\r\n\r\n\t\tdoctors[visitNo] = new Doctor();\r\n\t\tdoctors[visitNo].setDoctorId(this.doctorId[visitNo]);\r\n\t\tgxyService.setId(System.nanoTime());\r\n\t\tgxyService.setDoctor(doctors[visitNo]);\r\n\t\tBp[visitNo] = Bp[visitNo] & this.drugReaction[visitNo];\r\n\t\tgxyService.setIf_BpOK(this.Bp[visitNo]);\r\n\t\t// gxyService.setOtherDeal(otherDeal);\r\n\t\tgxyService.setServiceNumberInYear(visitNo + 1);\r\n\t\tgxyService.setServiceTime(this.visitTime[visitNo]);\r\n\t\treturn gxyService;\r\n\t}", "public VitalSignsHistory(){\n \n vitalSignsHistory = new ArrayList<VitalSigns>(); //Initiaizing ArrayList\n \n }", "public java.util.List<org.landxml.schema.landXML11.TimingDocument.Timing> getTimingList()\r\n {\r\n final class TimingList extends java.util.AbstractList<org.landxml.schema.landXML11.TimingDocument.Timing>\r\n {\r\n public org.landxml.schema.landXML11.TimingDocument.Timing get(int i)\r\n { return IntersectionImpl.this.getTimingArray(i); }\r\n \r\n public org.landxml.schema.landXML11.TimingDocument.Timing set(int i, org.landxml.schema.landXML11.TimingDocument.Timing o)\r\n {\r\n org.landxml.schema.landXML11.TimingDocument.Timing old = IntersectionImpl.this.getTimingArray(i);\r\n IntersectionImpl.this.setTimingArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.TimingDocument.Timing o)\r\n { IntersectionImpl.this.insertNewTiming(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.TimingDocument.Timing remove(int i)\r\n {\r\n org.landxml.schema.landXML11.TimingDocument.Timing old = IntersectionImpl.this.getTimingArray(i);\r\n IntersectionImpl.this.removeTiming(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfTimingArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new TimingList();\r\n }\r\n }", "List<Doctor> getAvailableDoctors(java.util.Date date, String slot) throws CliniqueException;", "public boolean add(Patient p) {\n\t\tif (currentTimeOccupied.plus(p.timeToHealth()).toMillis() <= timeLeftInDay.toMillis()) {\n\t\t\tpatients.add(p);\n\t\t\t//currentTimeOccupied = currentTimeOccupied.plus(p.timeToHealth());\n\t\t\ttimeLeftInDay = timeLeftInDay.minus(p.timeToHealth());\n\t\t\t\n\t\t\tif (patients.size() < MAX_PATIENTS) {\n\t\t\t\tSystem.out.println(\"Patient added to list! \" + p.timeToHealth().toMinutes() + \" minutes!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"A patient has been booted to add this one!\");\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"This doctor can't take this patient due to time constraints.\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n\t}", "public void createWeeklyList(){\n\t\tArrayList<T> days=new ArrayList<T>();\n\t\tArrayList<ArrayList<T>> weeks=new ArrayList<ArrayList<T>> ();\n\t\tList<ArrayList<ArrayList<T>>> years=new ArrayList<ArrayList<ArrayList<T>>> ();\n\t\tif(models.size()!=0) days.add(models.get(models.size()-1));\n\t\telse return;\n\t\tfor(int i=modelNames.size()-2;i>=0;i--){\n\t\t\t//check the new entry\n\t\t\tCalendar pre=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i+1)));\n\t\t\tCalendar cur=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i)));\n\t\t\tif (pre.get(Calendar.YEAR)==cur.get(Calendar.YEAR)){\n\t\t\t\tif(pre.get(Calendar.WEEK_OF_YEAR)==cur.get(Calendar.WEEK_OF_YEAR)){\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tweeks.add(days);\n\t\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tweeks.add(days);\n\t\t\t\tyears.add(weeks);\n\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\tdays.add(models.get(i));\n\t\t\t\tweeks=new ArrayList<ArrayList<T>> ();\n\t\t\t}\n\t\t}\n\t\tweeks.add(days);\n\t\tyears.add(weeks);\n\t\tweeklyModels=years;\n\n\t}", "private boolean addContestantToList() {\r\n\t\tContestant toAdd = new Contestant();\r\n\t\ttoAdd.setFName(fNameField.getText());\r\n\t\ttoAdd.setLName(lNameField.getText());\r\n\t\tif (mInitField.getText().length() != 0) {\r\n\t\t\ttoAdd.setMInit(mInitField.getText());\r\n\t\t}\r\n\t\ttoAdd.setPhoneNo(phoneNumberField.getText());\r\n\t\ttoAdd.setEmail(emailField.getText());\r\n\t\ttoAdd.setImgURL(filePath);\r\n\t\tint[] a = new int[2];\r\n\t\tswitch (ageField.getSelectedIndex()) {\r\n\t\t\tcase 0:\r\n\t\t\t\t//to print invalid in\r\n\t\t\t\t//break;\r\n\t\t\tcase 1: \r\n\t\t\t\ta[0] = 0;\r\n\t\t\t\ta[1] = 3;\r\n\t\t\t\ttoAdd.setAgeRange(a);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2: \r\n\t\t\t\ta[0] = 4;\r\n\t\t\t\ta[1] = 7;\r\n\t\t\t\ttoAdd.setAgeRange(a);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3: \r\n\t\t\t\ta[0] = 8;\r\n\t\t\t\ta[1] = 11;\r\n\t\t\t\ttoAdd.setAgeRange(a);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4: \r\n\t\t\t\ta[0] = 12;\r\n\t\t\t\ta[1] = 15;\r\n\t\t\t\ttoAdd.setAgeRange(a);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5: \r\n\t\t\t\ta[0] = 16;\r\n\t\t\t\ta[1] = 18;\r\n\t\t\t\ttoAdd.setAgeRange(a);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6: \r\n\t\t\t\ta[0] = 19;\r\n\t\t\t\ta[1] = 24;\r\n\t\t\t\ttoAdd.setAgeRange(a);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7: \r\n\t\t\t\ta[0] = 25;\r\n\t\t\t\ta[1] = 30;\r\n\t\t\t\ttoAdd.setAgeRange(a);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8: \r\n\t\t\t\ta[0] = 31;\r\n\t\t\t\ta[1] = Integer.MAX_VALUE;\r\n\t\t\t\ttoAdd.setAgeRange(a);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tboolean result = myList.addContestant(toAdd);\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public MainList getDetailForcast(String date) {\n\t\t\t\n\t\t\tMainList mainLists = new MainList();\n\t\t\tList<Forcast> forcasts = new ArrayList<>();\n\t\t\tList<Forcast> forcastLists = this.mainList.getListItem();\n\t\t\t\n\t\t\tSystem.out.println(\"date>> \"+date);\n\t\t\t\n\t\t\tforcasts = forcastLists.stream().filter(p -> (formatData(p.getDt_txt())).equals(formatData(date))).collect(Collectors.toList());\n\t\t\t\n\t\t\tmainLists.setListItem(forcasts);\n\t\t\tmainLists.setCity(this.mainList.getCity());\n\t\t\t\n\t\t\treturn mainLists;\n\t\t}", "public ArrayList<Timestamp> generateNonSportSchedule(int faculties[], String course[] ,Date startDate, Date endDate){\r\n \t\r\n \t\r\n \tArrayList<CourseStructure > allCourseStructure = new ArrayList<CourseStructure>();\r\n \tArrayList<CourseStructure > tempCourseStructure = new ArrayList<CourseStructure>();\r\n \tArrayList<Timestamp> allFreeSlot = new ArrayList<Timestamp>();\r\n \t\r\n \t\r\n \t// get all structureCourse based on faculty\r\n \tif(faculties.length>0){\r\n \t\tFacultyCourseManager facultyCourseManager = new FacultyCourseManager();\r\n \t\tallCourseStructure = facultyCourseManager.getCourseByFaculty(faculties);\r\n \t}//end if(faculties.length>0)\r\n \t\r\n \t//get all structureCourse based on course\r\n \tif(course.length>0){\r\n \t\tCourseStructureManager coursestructure = new CourseStructureManager();\r\n \t\ttempCourseStructure = coursestructure.getAllCourseStructureByCourse(course);\r\n \t}//end if(course.length>0)\r\n \t\r\n \t//merge both CourseStructure Arraylist\r\n \tfor(int i =0 ; i<tempCourseStructure.size();i++){\r\n \t\tif(!allCourseStructure.contains(tempCourseStructure.get(i))){\r\n \t\t\tallCourseStructure.add(tempCourseStructure.get(i));\r\n \t\t}//end if(!allCourseStructure.contains(tempCourseStructure.get(i))){\r\n \t}//for(int i =0 ; i<tempCourseStructure.size();i++)\r\n \t\r\n \t\r\n \t\r\n \t /* implement a genetic algorithm\r\n \t * to find the best fit date\r\n \t */\r\n \t//variables\r\n \tArrayList<Timestamp> allSolutions = new ArrayList<Timestamp>();\r\n \tArrayList<Integer> solutionFitness = new ArrayList<Integer>();\r\n \tint totalTime,fitnessValue=0;\r\n \tTimestamp time = new Timestamp(startDate.getYear(), startDate.getMonth(), startDate.getDate(), 8, 0, 0, 0);\r\n \tboolean result;\r\n \t//initialize population\r\n \t/*university start at 8a.m to 8p.m\r\n \t * This makes 12 hr\r\n \t * Total time = (endDate -StartDate) * 12\r\n \t */\r\n \t \r\n \t\r\n \tlong daysBetween = endDate.getTime()- startDate.getTime();\r\n \t\r\n totalTime = (int)( (daysBetween * 12)/ (1000 * 60 * 60 * 24) );\r\n allSolutions.add(time);\r\n Calendar calender = Calendar.getInstance();\r\n \tfor(int i=1;i<totalTime;i++){\r\n \t\tif(time.getHours()>0 && time.getHours()<20){\r\n \t\t\tcalender.setTime(time);\r\n \t\t\t\r\n \t\t\tcalender.add(Calendar.HOUR, 1);\r\n \t\t\tlong tim = calender.getTime().getTime();\r\n \t\t\ttime = new Timestamp(tim);\r\n \t\t\tallSolutions.add(time);\r\n \t\t}//end if(time.getHours()>0 && time.getHours()<8){\r\n \t\telse{\r\n \t\t\tcalender.setTime(time);\r\n \t\t\t\r\n \t\t\tcalender.add(Calendar.HOUR, 12);\r\n \t\t\tlong tim = calender.getTime().getTime();\r\n \t\t\ttime = new Timestamp(tim);\r\n \t\t\tallSolutions.add(time); \t\t\t\r\n \t\t}//end else \t\t \t\t\r\n \t}//end for(int i=1;i<totalTime;i++){\r\n \t\r\n \t\r\n \t//fitness\r\n \t/*\r\n \t * if current timetable slot is free = increase by 1\r\n \t * if module is not in current timetable slot = increase by 1\r\n \t * if module is not a degree = increase by 1\r\n \t * if module is not year 3 = increase by 1 \r\n \t */\r\n \tTimetableManager timetableManager = new TimetableManager();\r\n \t//travel through population\r\n \tfor(int i=0; i<allSolutions.size();i++){\r\n \t\t//travel through course Structure\r\n \r\n \t\tfor(int j=0;j<allCourseStructure.size();j++){\r\n \t\t\t\r\n \t\t\t//check for current timetable slot\r\n \t\tint day = allSolutions.get(i).getDay();\r\n \t\tTime temTime = new Time(allSolutions.get(i).getTime());\r\n \t\t\r\n \t\t//check for course structure timetable slot\r\n \t\tresult = timetableManager.findTimetableByDayTime(temTime, getDays(day), allCourseStructure.get(j).getCourse_structure_id());\r\n \t\tif(!result){\r\n \t\t\tfitnessValue++;\r\n \t\t}//end if(!result) \r\n \t\t\t\r\n \t\t}//end for(int j=0;j<allCourseStructure.size();j++){\r\n \t\t\r\n \t\tsolutionFitness.add(fitnessValue);\r\n \t\tfitnessValue = 0;\r\n \t}//end for (int i=0; i<allSolutions.size();i++){\r\n \t\r\n \tint maxFitness = Collections.max(solutionFitness);\r\n \tfor(int i =0 ; i<allSolutions.size();i++){\r\n \t\tif(solutionFitness.get(i) == maxFitness){\r\n \t\t\tallFreeSlot.add(allSolutions.get(i));\r\n \t\t}\t\r\n \t}\r\n \t\r\n \t\r\n \t\r\n \treturn allFreeSlot; \t\r\n }", "private void buildDateTimeHypos(ArrayList<DateTimeHypo> hypos, String type, String[] subslots)\n {\n hypos.clear();\n \n SlotHypo[] subHypos = new SlotHypo[subslots.length];\n \n \n for ( SlotHypo sh : slot_hypos )\n {\n if ( !sh.name.startsWith(type) ) continue;\n for ( int i = 0; i < subslots.length; ++i )\n if ( sh.name.equals(type+\".\"+subslots[i]) )\n subHypos[i] = sh;\n }\n \n DateTimeHypo nh = new DateTimeHypo(type);\n nh.belief_prob = 1;\n hypos.add(nh);\n \n int bound = 1;\n for ( SlotHypo sh : subHypos )\n {\n if ( sh == null || sh.value_hypos.isEmpty() )\n continue;\n \n for ( ValueHypo vh : sh.value_hypos )\n {\n for ( int i = 0; i < bound; ++i )\n {\n DateTimeHypo th = new DateTimeHypo(hypos.get(i));\n th.addSVP(new SVP(sh.name,vh.name));\n th.belief_prob = hypos.get(i).belief_prob * vh.belief_prob;\n if ( th.belief_prob > 0.0001 )\n hypos.add(th);\n }\n }\n for ( int i = 0; i < bound; ++i )\n hypos.get(i).belief_prob *= sh.nullProb;\n \n prune(hypos);\n \n bound = hypos.size();\n }\n \n Iterator iter = hypos.iterator();\n if ( iter.hasNext() ) iter.next(); //skip the first\n while ( iter.hasNext() )\n {\n DateTimeHypo h = (DateTimeHypo)iter.next();\n \n /*\n boolean observed = false;\n for ( DateTimeHypo ht : observed_date_time_history )\n {\n if ( ht.equals(h) )\n {\n observed = true;\n break;\n }\n }\n if ( !observed )\n * */\n if ( !h.isValid() )\n iter.remove();\n }\n }", "public void sort() {\n\t\tArrayList<Medication> dayList = new ArrayList<Medication>();\n\t\tupcomingMedsLabel.setText(\"\");\n\t\tDate dt = new Date();\n\t\tDateFormat df = new SimpleDateFormat(\"EEEE\");\n\t\tString currentDay = df.format(dt);\n\t\t\n\t\t//Runs through all elements in the array\n\t\tfor(int i = 0; i < medList.size(); i++) {\n\t\t\t//Checks to see if the medication needs to be taken today\n\t\t\tif(medList.get(i).getMedDateTime().contains(currentDay)) {\n\t\t\t\tboolean added = false;\n\t\t\t\t//If no other element has been added, added the element\n\t\t\t\tif(dayList.size() == 0) {\n\t\t\t\t\tdayList.add(medList.get(i));\n\t\t\t\t} else {\n\t\t\t\t\t//Checks all other medications in the dayList to order them chronologicaly\n\t\t\t\t\tfor(int j = 0; j < dayList.size(); j++) {\n\t\t\t\t\t\t//Get the hour of element at j and compare it again element at i of medList\n\t\t\t\t\t\tint hour = Integer.parseInt(dayList.get(j).getHour());\n\t\t\t\t\t\t//If < add at j, if equal check minutes else add later\n\t\t\t\t\t\tif(Integer.parseInt(medList.get(i).getHour()) < hour) {\n\t\t\t\t\t\t\tdayList.add(j, medList.get(i));\n\t\t\t\t\t\t\tadded = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if (Integer.parseInt(medList.get(i).getHour()) == hour) {\n\t\t\t\t\t\t\tadded = true;\n\t\t\t\t\t\t\t//Checks against minutes\n\t\t\t\t\t\t\tint minute = Integer.parseInt(dayList.get(j).getMinute());\n\t\t\t\t\t\t\tif(Integer.parseInt(medList.get(i).getMinute()) < minute) {\n\t\t\t\t\t\t\t\tdayList.add(j, medList.get(i));\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\tif(dayList.size() > (j + 1)) {\n\t\t\t\t\t\t\t\t\tdayList.add(j+1, medList.get(i));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdayList.add(medList.get(i));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(added == false) {\n\t\t\t\t\t\tdayList.add(medList.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Update the upcomingMedsLabel\n\t\tfor(int i = 0; i < dayList.size(); i++) {\n\t\t\tupcomingMedsLabel.setText(upcomingMedsLabel.getText() + \"\\n\\n\" + dayList.get(i));\n\t\t}\n\t}", "public long reserva_de_entradas(int identificador_evento, Date fechaevento, Horario[] listahorarios ) throws ParseException {\n fgen.info (\"Identificador del evento\" + identificador_evento);\n fgen.info (\"Fecha del evento\" + fechaevento);\n ArrayList<Horario> horariosReserva = new ArrayList<Horario>();\n for (int i = 0; i < listahorarios.length; i++) {\n \n Horario horario = listahorarios[i];\n fgen.info (\"Horario : \" + horario.getHorario().toString()); \n horariosReserva.add(horario);\n List<Disponibilidad> listadisponibles = listahorarios[i].disponibilidades;\n for (int j = 0; j < listadisponibles.size() ; j++) { \n fgen.info (\" Disponibilidad - Cantidad: \" + listadisponibles.get(j).getCantidad());\n fgen.info (\" Disponibilidad - Precio: \" + listadisponibles.get(j).getPrecio());\n fgen.info (\" Disponibilidad - Sector: \" + listadisponibles.get(j).getSector());\n } \n \n \n } \n //Inicializo o tomo lo que esta en memoria de la lista de reservas\n ListaReservas reservas= new ListaReservas(); \n // busco el evento y que la lista de horarios sea en la que quiero reservar\n ListaEventos eventos = new ListaEventos();\n Calendar c = Calendar.getInstance();\n c.setTime(fechaevento);\n Evento e = eventos.buscarEvento(identificador_evento, c);\n List<Horario> horariosRetornar = new ArrayList<Horario>();\n if(e != null)\n {\n horariosRetornar = e.getHorarios();\n } \n \n if (horariosRetornar != null)\n {\n for (int i = 0; i < horariosRetornar.size(); i++) {\n for (int j = 0; j < listahorarios.length; j++) {\n Date fechaE = horariosRetornar.get(i).getHorario().getTime(); \n Date fechaEventoDate = listahorarios[j].hora.getTime(); \n if(fechaE.equals(fechaEventoDate)) \n { for (int k = 0; k < horariosRetornar.get(i).disponibilidades.size(); k++) {\n for (int l = 0; l < listahorarios[j].disponibilidades.size(); l++) {\n Disponibilidad d= horariosRetornar.get(i).disponibilidades.get(k);\n Disponibilidad r= listahorarios[j].disponibilidades.get(l);\n if (d.cantidad >= r.cantidad && d.sector.equalsIgnoreCase(r.sector) && d.precio==r.precio)\n {\n d.setCantidad(d.cantidad-r.cantidad);\n //Reserva reserv= new Reserva();\n //reservas.contador_Id= reservas.contador_Id +1;\n //reserv.idReserva= reservas.contador_Id;\n //reserv.Estado=1;\n //reserv.idEvento = identificador_evento;\n //reserv.horarios.add(listahorarios[j]);\n //reservas.listaReserva.add(reserv);\n //return reserv.idReserva;\n }\n else if(d.cantidad < r.cantidad && d.sector.equalsIgnoreCase(r.sector) && d.precio==r.precio)\n {\n //Si hay alguna solicitud de de reserva que no se pueda cumplir. Re reorna 0.\n //TODO: Hay que volver para atras las cantidades modificadas.\n return 0;\n }\n \n }\n \n }\n }\n }\n }\n Reserva reserv= new Reserva();\n reservas.contador_Id= reservas.contador_Id +1;\n reserv.idReserva= reservas.contador_Id;\n reserv.Estado=1;\n reserv.idEvento = identificador_evento;\n reserv.horarios = horariosReserva;\n reserv.fechaEvento = c;\n reservas.listaReserva.add(reserv);\n return reserv.idReserva;\n }\n \n return 0;\n }", "private static List<CustomerDetails> buildInput() {\r\n\t\tList<CustomerDetails> iList = new ArrayList<CustomerDetails>();\r\n\t\tiList.add(new CustomerDetails(\"Abhay\", \"[email protected]\", \"11001\", 7402,\r\n\t\t\t\t\"22-06-2012 11:23\", \"2348723\"));\r\n\t\tiList.add(new CustomerDetails(\"\", \"\", \"\", 5000, \"22-06-2012 13:48\",\r\n\t\t\t\t\"3830283\"));\r\n\t\tiList.add(new CustomerDetails(\"Anant\", \"[email protected]\", \"11002\",\r\n\t\t\t\t3839, \"22-06-2012 15:39\", \"2939303\"));\r\n\t\tiList.add(new CustomerDetails(\"Ashish\", \"[email protected]\", \"11003\",\r\n\t\t\t\t13890, \"22-06-2012 17:15\", \"2828939\"));\r\n\t\tiList.add(new CustomerDetails(\"\", \"\", \"11001\", 12083,\r\n\t\t\t\t\"23-06-2012 11:38\", \"3839403\"));\r\n\t\tiList.add(new CustomerDetails(\"Abhimanyu\", \"[email protected]\", \"11004\",\r\n\t\t\t\t33283, \"23-06-2012 14:18\", \"1384839\"));\r\n\t\tiList.add(new CustomerDetails(\"\", \"\", \"\", 5984, \"23-06-2012 19:56\",\r\n\t\t\t\t\"8383939\"));\r\n\t\tiList.add(new CustomerDetails(\"\", \"\", \"11003\", 38103,\r\n\t\t\t\t\"24-06-2012 15:38\", \"9388383\"));\r\n\t\tiList.add(new CustomerDetails(\"Anant\", \"[email protected]\", \"11002\",\r\n\t\t\t\t7281, \"24-06-2012 19:18\", \"2938381\"));\r\n\t\tiList.add(new CustomerDetails(\"\", \"\", \"\", 1038, \"24-06-2012 20:00\",\r\n\t\t\t\t\"8383383\"));\r\n\t\tiList.add(new CustomerDetails(\"Abhijeet\", \"[email protected]\", \"11005\",\r\n\t\t\t\t17937, \"25-06-2012 18:83\", \"3833838\"));\r\n\r\n\t\t// Collections.unmodifiableList(iList);\r\n\t\treturn iList;\r\n\t}", "@Override\n public IPatient next() {\n if (patientID == 0) {\n lastTime = LocalDateTime.now();\n return new Patient(lastTime, new Urgency(urgencyLevel--), treat, ++patientID);\n }\n if (LocalDateTime.now().isAfter(lastTime.plus(pause))) {\n if (urgencyLevel < MIN_URGENCY_LEVEL) urgencyLevel = MAX_URGENCY_LEVEL;\n lastTime = LocalDateTime.now();\n return new Patient(lastTime, new Urgency(urgencyLevel--), treat, ++patientID);\n }\n return null;\n }", "public Breakdown generateReport(Date startDate, Date endDate, ArrayList<User> userList, double total) {\n\n //INTIATING VARIABLES\n Breakdown result = new Breakdown();\n\n HashMap<String, Breakdown> intenseMap = new HashMap<String, Breakdown>();\n HashMap<String, Breakdown> normalMap = new HashMap<String, Breakdown>();\n HashMap<String, Breakdown> mildMap = new HashMap<String, Breakdown>();\n\n int intenseCount = 0;\n int normalCount = 0;\n int mildCount = 0;\n\n result.addInList(intenseMap);\n result.addInList(normalMap);\n result.addInList(mildMap);\n\n AppUsageDAO auDAO = new AppUsageDAO();\n\n //If it is without demographic, userList is null\n if (userList == null) {\n userList = auDAO.retrieveUsers(startDate, endDate);\n }\n for (int i = 0; i < userList.size(); i++) {\n User currUser = userList.get(i);\n\n //get current user's app usge\n ArrayList<AppUsage> userUsage = auDAO.retrieveByUser(currUser.getMacAddress(), startDate, endDate);\n double totalSeconds = 0;\n\n Date nextDay = new Date(startDate.getTime() + 60 * 60 * 1000 * 24);\n\n Date oldTime = null;\n if (userUsage.size() > 0) {\n oldTime = userUsage.get(0).getDate();\n if (oldTime.after(nextDay)) {\n nextDay = new Date(nextDay.getTime() + 60 * 60 * 1000 * 24);\n }\n }\n\n for (int j = 1; j < userUsage.size(); j++) {\n AppUsage au = userUsage.get(j);\n Date newTime = au.getDate();\n boolean beforeAppeared = false;\n if (newTime.before(nextDay)) {\n beforeAppeared = true;\n //difference between app usage timing\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n\n //If difference less than/equal 2 minutes\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n totalSeconds += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n totalSeconds += 10;\n }\n\n } else { // NEW TIMING AFTER NEXT DAY\n nextDay = new Date(nextDay.getTime() + 60 * 60 * 1000 * 24);\n\n if (!beforeAppeared) {\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n totalSeconds += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n totalSeconds += 10;\n }\n }\n }\n\n oldTime = newTime;\n\n }\n\n if (oldTime.before(nextDay)) {\n long difference = Utility.secondsBetweenDates(oldTime, nextDay);\n if (difference < 10) {\n totalSeconds += difference;\n } else {\n totalSeconds += 10;\n }\n } else {\n totalSeconds += 10;\n }\n\n //DIVIDE TO GET INTO DAYS\n long days = (endDate.getTime() - startDate.getTime()) / (1000 * 60 * 60 * 24) + 1;\n totalSeconds /= days;\n\n //FILTER USER'S USAGE INTO CATEGORIES\n double totalHours = totalSeconds / (60 * 60);\n\n if (totalHours > 0) {\n if (totalHours < 1.0) {\n //MILD\n mildCount++;\n\n } else if (totalHours < 5.0) {\n //NORMAL\n normalCount++;\n\n } else {\n //INTENSE\n intenseCount++;\n\n }\n }\n\n }\n //Calculate percentage\n if (total == -1) {\n total = mildCount + normalCount + intenseCount;\n\n }\n\n int mildPercent = (int) Math.round(mildCount / total * 100);\n int normalPercent = (int) Math.round(normalCount / total * 100);\n int intensePercent = (int) Math.round(intenseCount / total * 100);\n\n //Put in maps\n intenseMap.put(\"intense-count\", new Breakdown(\"\" + intenseCount));\n intenseMap.put(\"intense-percent\", new Breakdown(\"\" + intensePercent));\n\n normalMap.put(\"normal-count\", new Breakdown(\"\" + normalCount));\n normalMap.put(\"normal-percent\", new Breakdown(\"\" + normalPercent));\n\n mildMap.put(\"mild-count\", new Breakdown(\"\" + mildCount));\n mildMap.put(\"mild-percent\", new Breakdown(\"\" + mildPercent));\n\n return result;\n }", "public void addPatientToList(Patient tempPatient)\r\n\t{\r\n\t\tarrayPatients[nextPatientLocation] = tempPatient;\r\n\t\tnextPatientLocation++;\r\n\t}", "private void startWeek(int amtTellers) {\n for (int i =0; i< amtTellers; i++) {\n employees.add(new Teller(i+1, this));\n }\n }", "public Patient (String patientID) {\n this.patientID = patientID;\n this.associatedDoctor = new ArrayList<>();\n }", "abstract public Date getServiceAppointment();", "public static void fareDTOadd() {\n\t\tint count = peopleList.size(); // projectList.size()이걸 변수로 저장해서 쓰면 projectList.size()를 쓸 때마다 계속 속도가 느려진다.\n\t\tfor (int i = 0; i < count; i++) { // index 값으로 어느 부분에서 프로젝트 네임 인지확인하고\n\t\t\tpeopleFare.add(\n\t\t\t\t\tnew FareDTO(peopleList.get(i).getYear(), \n\t\t\t\t\t\t\t1.250* peopleList.get(i).getTotalSenior(), \n\t\t\t\t\t\t\t1.000* peopleList.get(i).getTotalSenior() ,\n\t\t\t\t\t\t\t 0.675* peopleList.get(i).getTotalSenior(),\n\t\t\t\t\t\t\t0.375* peopleList.get(i).getTotalSenior()) );\n\n\t\t}\n\n\t}", "public void addToStopList(Stop s){ this.stopList.add(s); }", "@Override\n\tpublic ArrayList<Dday> ddayMain(String memberNo) {\n\t\treturn dDao.ddayMain(sqlSession, memberNo);\n\t}", "public List<Stop> getListStopByMoreTime(Date time){\n List<Stop> items = null;\n Session session = beanHibernateUtil.getSession();\n try {\n session.beginTransaction();\n Criteria criteria = session.createCriteria(Stop.class);\n criteria.add(Restrictions.gt(\"arrivalTime\",time.getTime()-2*60*60000));//lay du lieu tu 16h hom trc toi 18h sau tranh luc giao ke hoạch 18h bi thieu 1 stop\n criteria.addOrder(Order.asc(\"arrivalTime\"));//de chuan thi phai ket hop dc ca du lieu arrivalTime va departureTime cong lai moi het dc cac truong hop\n items = criteria.list();\n session.getTransaction().commit();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n beanHibernateUtil.closeSession(session);\n }\n\n return items;\n }", "@Override\r\n\tpublic ArrayList printTransactions(String phone,LocalDateTime sd, LocalDateTime ed) {\n\t\tArrayList li = new ArrayList<>();\r\n\t\tfor (WalletTransactions walletTransac: transacList){\r\n\t\t\tif(walletTransac.getPhoneNum()==phone) {\r\n\t\t\t\r\n\t\t\tif(walletTransac.getDate().isAfter(sd) && walletTransac.getDate().isBefore(ed))\r\n\t\t\t{\r\n\t\t\t\tli.add(walletTransac);\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}\r\n\t\treturn li;\r\n\r\n\t\r\n\r\n}", "public static void main(String[] args) {\n\n CalendarEvent b = new CalendarEvent(\"assignment2\",29,11,2014,\"14:00\",\"20:00\",\"Test1\");\n\n CalendarEvent c = new CalendarEvent(\"assignment3\",27,2,2010,\"2:00\",\"20:00\",\"Test2\");\n\n CalendarEvent d = new CalendarEvent(\"assignment4\",12,7,2013,\"14:00\",\"20:00\",\"Test3\");\n\n CalendarEvent e = new CalendarEvent(\"assignment5\",29,11,2014,\"12:00\",\"20:00\",\"Test4\");\n\n\n CalendarEvent l = new CalendarEvent(\"assignment1a\",30,9,2014,\"14:00\",\"20:00\",\"Test\");\n CalendarEvent f = new CalendarEvent(\"assignment1\",31,9,2014,\"14:00\",\"20:00\",\"Test\");\n CalendarEvent g = new CalendarEvent(\"assignment1\",21,9,2014,\"14:00\",\"20:00\",\"Test\");\n CalendarEvent h = new CalendarEvent(\"assignment1\",21,9,2014,\"14:00\",\"20:00\",\"Test\");\n CalendarEvent i = new CalendarEvent(\"assignment1\",29,9,2014,\"14:00\",\"20:00\",\"Test\");\n CalendarEvent j = new CalendarEvent(\"assignment1\",18,9,2014,\"14:00\",\"20:00\",\"Test\");\n CalendarEvent k = new CalendarEvent(\"assignment1\",1,9,2014,\"14:00\",\"20:00\",\"Test\");\n\n \n \n \n ArrayList<CalendarEvent> listOfEvents = new ArrayList<CalendarEvent>();\n // listOfEvents.add(a);\n listOfEvents.add(b);\n listOfEvents.add(c);\n listOfEvents.add(d);\n listOfEvents.add(e);\n\n Display myDisObject = new Display();\n //myDisObject.displayAssignments(listOfEvents);\n\n \n \n listOfEvents.add(f);\n listOfEvents.add(g);\n listOfEvents.add(h);\n listOfEvents.add(i);\n listOfEvents.add(j);\n listOfEvents.add(k);\n listOfEvents.add(l);\n \n //myDisObject.displayAssignments(listOfEvents);\n myDisObject.displayMonth(10, listOfEvents);\n }", "public List<SwipeDetailResult> calEmpWorkHours(List<SwipeDetails> list) {\n\t\tint count = 0;\n\t\tMap<String, List<SwipeDetails>> map = splitListByDate(list);\n\t\tList<SwipeDetailResult> resultList = new ArrayList<SwipeDetailResult>();\n\t\tList<String> keyList = new ArrayList<>();\n\t\t// Map<String, List<SwipeDetails>> cloneMap = map;\n\t\tfor (Map.Entry<String, List<SwipeDetails>> entry : map.entrySet()) {\n\t\t\t// keyList.add(entry.getKey());\n\t\t\tif ((count < map.size() - 1) || map.size() == 1) {\n\n\t\t\t\tSwipeDetailResult reult = findStartEndTimeings(map, keyList);\n\t\t\t\t// cloneMap.remove(entry.getKey());\n\t\t\t\tcount++;\n\t\t\t\tresultList.add(reult);\n\t\t\t\t// break;\n\t\t\t}\n\t\t}\n\n\t\treturn resultList;\n\t}", "@Override\n\tpublic List<Tourneys> getTourneysByDate() {\n\t\treturn null;\n\t}", "Movement() {\n record=0;\n ID =0 ;\n filedate = \"\";\n lat= new ArrayList<Float>();\n lon = new ArrayList<Float>();\n alt=new ArrayList<Float>();\n day1899=new ArrayList<Float>();\n date=new ArrayList<String>();\n time=new ArrayList<String>();\n stay = new ArrayList<Location>();\n record = 0;\n }", "void addEvent(String name, int[] startDate, int[] endDate, boolean visible, String notes) {\n\n// index of the current node (event)\n int current = 0;\n\n// loops through Events until it has an earlier date than the next Event, adds new Event\n for (Event event : events) {\n if (wasSooner(startDate, event.startDate)) {\n events.add(current, new Event(this, name, startDate, endDate, visible, notes));\n return;\n }\n current++;\n }\n events.add(current, new Event(this, name, startDate, endDate, visible, notes));\n }", "@Override\r\n public List<Registration> getRegistrationList(Long doctorId, Registration.Status stuats) {\n Doctor doctor = doctorDao.getOne(doctorId);\r\n List<Registration> registrationList;\r\n if (doctor.getDoctorType() == Doctor.Doctor_Type.Clinic_Boss) {\r\n List<Long> doctorList = Lists.newArrayList();\r\n doctorDao.findDocAndSubDoctorPage(doctorId).forEach(doc -> doctorList.add(doc.getId()));\r\n\r\n registrationList = registrationDao.findByDoctorIdAndStatusOrderByCreateOn(doctorList, stuats, DateUtils.getDayEndMaxTime());\r\n } else {\r\n registrationList = registrationDao.findByDoctorIdAndStatusOrderByCreateOn(doctorId, stuats, DateUtils.getDayEndMaxTime());\r\n }\r\n //现场挂号List\r\n List<Registration> localeRegList = Lists.newArrayList();\r\n //正在叫号微信List\r\n List<Registration> nowCallList = Lists.newArrayList();\r\n //已经过号微信List\r\n List<Registration> passWxList = Lists.newArrayList();\r\n //排队中微信List\r\n List<Registration> paiDuiWxList = Lists.newArrayList();\r\n\r\n long nowDate = new Date().getTime();\r\n registrationList.forEach(registration -> {\r\n //如果是微信排队\r\n if (registration.getRegistrationType() == Registration.RegistrationTypeEnum.WECHAT) {\r\n // 开始时间 >=现在 && 结束时间 <=现在 说明是 正在叫号队列\r\n if (registration.getCreateOn().getTime() <= nowDate && registration.getCompleteOn().getTime() >= nowDate) {\r\n nowCallList.add(registration);\r\n } else //开始时间 <现在 说明还没到预约时间 进入正常排队队列\r\n if (registration.getCreateOn().getTime() > nowDate) {\r\n paiDuiWxList.add(registration);\r\n } else //结束时间已经小于现在时间 说明 微信预约已经过号 进入过号队列\r\n if (registration.getCompleteOn().getTime() < nowDate) {\r\n passWxList.add(registration);\r\n }\r\n //如果是现场挂号\r\n } else {\r\n localeRegList.add(registration);\r\n }\r\n });\r\n // 微信排队和现场排队进行时间排序\r\n paiDuiWxList.addAll(localeRegList);\r\n paiDuiWxList.addAll(passWxList);\r\n paiDuiWxList.sort((o1, o2) -> {\r\n if (o1.getCreateOn().getTime() <= o2.getCreateOn().getTime()) {\r\n return -1;\r\n }\r\n return 0;\r\n });\r\n\r\n// nowCallList.addAll(passWxList);\r\n nowCallList.addAll(paiDuiWxList);\r\n\r\n return nowCallList.size() > 12 ? nowCallList.subList(0, 12) : nowCallList;\r\n }", "public DoctorRecord(Integer id, Integer age, Integer workTime, Byte sex, String name, String url, Byte duty, String hospitalCode, String certificateCode, String professionalCode, Date registerTime, String registerHospital, String mobile, Integer titleId, BigDecimal consultationPrice, String treatDisease, Byte status, Integer userId, Byte isDelete, Timestamp createTime, Timestamp updateTime, Timestamp onDutyTime, Byte isOnDuty, Byte canConsultation, Integer avgAnswerTime, Integer consultationNumber, BigDecimal avgCommentStar, Integer attentionNumber, String userToken, Timestamp authTime, BigDecimal consultationTotalMoney, Byte isFetch, String signature) {\n super(Doctor.DOCTOR);\n\n set(0, id);\n set(1, age);\n set(2, workTime);\n set(3, sex);\n set(4, name);\n set(5, url);\n set(6, duty);\n set(7, hospitalCode);\n set(8, certificateCode);\n set(9, professionalCode);\n set(10, registerTime);\n set(11, registerHospital);\n set(12, mobile);\n set(13, titleId);\n set(14, consultationPrice);\n set(15, treatDisease);\n set(16, status);\n set(17, userId);\n set(18, isDelete);\n set(19, createTime);\n set(20, updateTime);\n set(21, onDutyTime);\n set(22, isOnDuty);\n set(23, canConsultation);\n set(24, avgAnswerTime);\n set(25, consultationNumber);\n set(26, avgCommentStar);\n set(27, attentionNumber);\n set(28, userToken);\n set(29, authTime);\n set(30, consultationTotalMoney);\n set(31, isFetch);\n set(32, signature);\n }", "public List<Login> getUniqueDates();", "public ObservableList<Date> getStudentDays(int studentID);", "private ArrayList<String> dateTimeSelection(){\n int choice;\n String weekDay=null,startTime=null,endTime=null;\n Calendar startCal=null, endCal = null;\n String[] dateTimeSplit;\n ArrayList<String> dateAndTime = new ArrayList<String>();\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"*****************Please choose a date*****************\");\n System.out.println(\" Weekdays \");\n System.out.println(\"______________________________________________________\\n\");\n System.out.println(\"|1. Monday ||2.Tuesday |\");\n System.out.println(\"|3. Wednesday ||4.Thursday |\");\n System.out.println(\"|5. Friday || |\");\n System.out.println(\"______________________________________________________\");\n\n do {\n while (!sc.hasNextInt()) {\n System.out.println(\"Invalid input! Please enter your choice:\");\n sc.next();\n }\n choice = sc.nextInt();\n if((choice < 1) || (choice > 5))\n System.out.println(\"Invalid input! Please enter your choice:\");\n } while ((choice < 1) || (choice > 5));\n\n switch(choice){\n case 1:\n weekDay = \"MON\";\n break;\n case 2:\n weekDay = \"TUE\";\n break;\n case 3:\n weekDay = \"WED\";\n break;\n case 4:\n weekDay = \"THU\";\n break;\n case 5:\n weekDay = \"FRI\";\n break;\n }\n\n dateAndTime.add(weekDay);\n\n sc.nextLine();\n do {\n\n System.out.println(\"\\nPlease input start time (HH mm)\");\n startTime = sc.nextLine();\n while(!startTime.matches(\"^\\\\d{2} \\\\d{2}$\"))\n {\n System.out.println(\"\\nInvalid input! Please enter start time again!\");\n System.out.println(\"\\nPlease enter start time (HH mm):\");\n startTime = sc.nextLine();\n }\n dateTimeSplit = startTime.split(\" \");\n startTime = dateTimeSplit[0]+\":\"+dateTimeSplit[1];\n startCal = DateTimeManager.convertCourseCompoStrToCalendar(weekDay + \" \" + startTime);\n if (startCal == null) {\n System.out.println(\"\\nInvalid input! Please enter start time again!\");\n continue;\n }\n\n System.out.println(\"Please enter end time (HH mm):\");\n endTime = sc.nextLine();\n while (!endTime.matches(\"^\\\\d{2} \\\\d{2}$\")) {\n System.out.println(\"Invalid input! Please enter end time again!\");\n System.out.println(\"Please enter end time (HH mm):\");\n endTime = sc.nextLine();\n }\n dateTimeSplit = endTime.split(\" \");\n endTime = dateTimeSplit[0] + \":\" + dateTimeSplit[1];\n endCal = DateTimeManager.convertCourseCompoStrToCalendar(weekDay + \" \" + endTime);\n if (endCal==null){\n System.out.println(\"Invalid input! Please enter end time again!!\");\n }\n\n else if((endCal.before(startCal))||(endCal.equals(startCal)))\n System.out.println(\"Start time can't be later than equal to end time!\");\n }while((endCal == null)||(startCal == null)||endCal.equals(startCal)||endCal.before(startCal));\n\n dateAndTime.add(startTime+\"-\"+endTime);\n\n return dateAndTime;\n\n }", "public List<Tupel<Artist, Integer>> getLastReleaseDateOfEachArtist();", "public DateList() {\n DateNode ln = new DateNode(null);\n first = ln;\n last = ln;\n }", "@Override\r\n\tpublic List<Cita> getAppointmentList() {\r\n\r\n\t\t// find all users\r\n\t\tList<User> users = (List<User>) userService.findAll();\r\n\t\t// create a new arrayList of appointments\r\n\t\tList<Cita> appointments = new ArrayList<>();\r\n\r\n\t\t// iterate over the list of all the users\r\n\t\tfor (Iterator<User> user = users.iterator(); user.hasNext();) {\r\n\t\t\t// get the user from the forEach\r\n\t\t\tUser getUser = user.next();\r\n\r\n\t\t\t// iterate over the AppointmentList\r\n\t\t\tfor (Cita item : getUser.getCitas()) {\r\n\r\n\t\t\t\t// check if the class is not empty\r\n\t\t\t\tif (item != null) {\r\n\t\t\t\t\tappointments.add(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn appointments;\r\n\t}", "public ArrayList<Patient> getPatientList(String DocName)\r\n {\n\t ArrayList<Patient> names = new ArrayList<Patient>();\r\n\t \r\n\t try \r\n\t {\r\n\t\tResultSet rs = stmt.executeQuery( \"SELECT * FROM PATIENTDATA;\" );\r\n\t\tint i =0;\r\n\t\twhile (rs.next())\r\n\t\t{\r\n\t\t\tString fname = rs.getString(\"firstname\");\r\n\t\t\tString lname = rs.getString(\"lastname\");\r\n\t\t\tString userName = rs.getString(\"username\");\r\n\t\t\tString passWord = rs.getString(\"password\");\r\n\t\t\tString secAns = rs.getString(\"securityans\");\r\n\t\t\tString check = rs.getString(\"doctorsname\");\r\n\t\t\tint Notify = rs.getInt(\"notification\");\r\n\t\t\t// if the name matches the doctor's name, then Add to the Patient Arraylist.\r\n\t\t\tif (check.equals(DocName))\t\r\n\t\t\t{\r\n\t\t\t\tint symp[]= new int[7];\r\n\t\t\t\tint pr1[]=new int[7];\r\n\t\t\t\tint pr2[]=new int[7];\r\n\t\t\t\tint thrs[]=new int[7]; \r\n\t\t\t\t\r\n\t\t\t\tsymp[0] = rs.getInt(\"SYMPTOM1\");\r\n\t\t\t\tsymp[1] = rs.getInt(\"SYMPTOM2\");\r\n\t\t\t\tsymp[2] = rs.getInt(\"SYMPTOM3\");\r\n\t\t\t\tsymp[3] = rs.getInt(\"SYMPTOM4\");\r\n\t\t\t\tsymp[4] = rs.getInt(\"SYMPTOM5\");\r\n\t\t\t\tsymp[5] = rs.getInt(\"SYMPTOM6\");\r\n\t\t\t\tsymp[6] = rs.getInt(\"SYMPTOM7\");\r\n\t\t\t\t\r\n\t\t\t\tpr1[0] = rs.getInt(\"PrevSYMPTOM1_1\");\r\n\t\t\t\tpr1[1] = rs.getInt(\"PrevSYMPTOM1_2\");\r\n\t\t\t\tpr1[2] = rs.getInt(\"PrevSYMPTOM1_3\");\r\n\t\t\t\tpr1[3] = rs.getInt(\"PrevSYMPTOM1_4\");\r\n\t\t\t\tpr1[4] = rs.getInt(\"PrevSYMPTOM1_5\");\r\n\t\t\t\tpr1[5] = rs.getInt(\"PrevSYMPTOM1_6\");\r\n\t\t\t\tpr1[6] = rs.getInt(\"PrevSYMPTOM1_7\");\r\n\t\t\t\t\r\n\t\t\t\tpr2[0] = rs.getInt(\"PrevSYMPTOM2_1\");\r\n\t\t\t\tpr2[1] = rs.getInt(\"PrevSYMPTOM2_2\");\r\n\t\t\t\tpr2[2] = rs.getInt(\"PrevSYMPTOM2_3\");\r\n\t\t\t\tpr2[3] = rs.getInt(\"PrevSYMPTOM2_4\");\r\n\t\t\t\tpr2[4] = rs.getInt(\"PrevSYMPTOM2_5\");\r\n\t\t\t\tpr2[5] = rs.getInt(\"PrevSYMPTOM2_6\");\r\n\t\t\t\tpr2[6] = rs.getInt(\"PrevSYMPTOM2_7\");\r\n\r\n\t\t\t\t\r\n\t\t\t\tthrs[0] = rs.getInt(\"SYMPTOM1Thresh\");\r\n\t\t\t\tthrs[1] = rs.getInt(\"SYMPTOM2Thresh\");\r\n\t\t\t\tthrs[2] = rs.getInt(\"SYMPTOM3Thresh\");\r\n\t\t\t\tthrs[3] = rs.getInt(\"SYMPTOM4Thresh\");\r\n\t\t\t\tthrs[4] = rs.getInt(\"SYMPTOM5Thresh\");\r\n\t\t\t\tthrs[5] = rs.getInt(\"SYMPTOM6Thresh\");\r\n\t\t\t\tthrs[6] = rs.getInt(\"SYMPTOM7Thresh\");\r\n\t\t\t\t\r\n\t\t\t\t//make new Patient object with the patient informations.\r\n\t\t\t\tPatient P1 = new Patient(fname,lname,userName,passWord,secAns,DocName,symp,pr1,pr2,thrs);\r\n\t\t\t\tP1.setFlag(Notify);\r\n\t\t\t\tnames.add(P1); //Added to the Patient Arraylist\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn names; // Return list of patients\r\n\t\t\r\n\t\t\r\n\t } \r\n\t catch (SQLException e) \r\n\t {\r\n\t\t\r\n\t\te.printStackTrace();\r\n\t }\r\n\t \r\n\t return names;\r\n\t \r\n\t \r\n }", "private List<Pelicula> getLista() {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\tList<Pelicula> lista = null;\n\t\ttry {\n\t\t\tlista = new LinkedList<>();\n\n\t\t\tPelicula pelicula1 = new Pelicula();\n\t\t\tpelicula1.setId(1);\n\t\t\tpelicula1.setTitulo(\"Power Rangers\");\n\t\t\tpelicula1.setDuracion(120);\n\t\t\tpelicula1.setClasificacion(\"B\");\n\t\t\tpelicula1.setGenero(\"Aventura\");\n\t\t\tpelicula1.setFechaEstreno(formatter.parse(\"02-05-2017\"));\n\t\t\t// imagen=\"cinema.png\"\n\t\t\t// estatus=\"Activa\"\n\n\t\t\tPelicula pelicula2 = new Pelicula();\n\t\t\tpelicula2.setId(2);\n\t\t\tpelicula2.setTitulo(\"La bella y la bestia\");\n\t\t\tpelicula2.setDuracion(132);\n\t\t\tpelicula2.setClasificacion(\"A\");\n\t\t\tpelicula2.setGenero(\"Infantil\");\n\t\t\tpelicula2.setFechaEstreno(formatter.parse(\"20-05-2017\"));\n\t\t\tpelicula2.setImagen(\"bella.png\"); // Nombre del archivo de imagen\n\n\t\t\tPelicula pelicula3 = new Pelicula();\n\t\t\tpelicula3.setId(3);\n\t\t\tpelicula3.setTitulo(\"Contratiempo\");\n\t\t\tpelicula3.setDuracion(106);\n\t\t\tpelicula3.setClasificacion(\"B\");\n\t\t\tpelicula3.setGenero(\"Thriller\");\n\t\t\tpelicula3.setFechaEstreno(formatter.parse(\"28-05-2017\"));\n\t\t\tpelicula3.setImagen(\"contratiempo.png\"); // Nombre del archivo de imagen\n\n\t\t\tPelicula pelicula4 = new Pelicula();\n\t\t\tpelicula4.setId(4);\n\t\t\tpelicula4.setTitulo(\"Kong La Isla Calavera\");\n\t\t\tpelicula4.setDuracion(118);\n\t\t\tpelicula4.setClasificacion(\"B\");\n\t\t\tpelicula4.setGenero(\"Accion y Aventura\");\n\t\t\tpelicula4.setFechaEstreno(formatter.parse(\"06-06-2017\"));\n\t\t\tpelicula4.setImagen(\"kong.png\"); // Nombre del archivo de imagen\n\t\t\tpelicula4.setEstatus(\"Inactiva\"); // Esta pelicula estara inactiva\n\t\t\t\n\t\t\t// Agregamos los objetos Pelicula a la lista\n\t\t\tlista.add(pelicula1);\n\t\t\tlista.add(pelicula2);\n\t\t\tlista.add(pelicula3);\n\t\t\tlista.add(pelicula4);\n\n\t\t\treturn lista;\n\t\t} catch (ParseException e) {\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "public void add(T e) {\n\t\tif(!this.isEmpty()) {\n\t\t\tsuper.put(e, new Duet<T>(last, null));\n\t\t\tthis.get(last).setLast(e);\n\t\t\tlast = e;\n\t\t} else {\n\t\t\tsuper.put(e, new Duet<T>(null, null));\n\t\t\tfirst = e;\n\t\t\tlast = e;\n\t\t}\n\t}", "public Trimestre(){\n id_trimestre=0;\n numero=0;\n debut_trimestre= new Date(2012,8,12);\n fin_trimestre=new Date(2013,1,13);\n id_anneeScolaire=0;\n }", "public void appendToReminders(List<Date> reminders);", "@Override\n public Set<Badminton> dateDetails(int personId, Date date) {\n /**\n * check the date is valid or not\n * start time will always less than end time and end time will always less than or equal to current time\n * date will always less than or equal to current date\n */\n validator.validDate(date);\n try {\n ResultSet resultSet = badmintonDao.dateDetails(personId,date);\n Set<Badminton> setDetails = new HashSet<Badminton>();\n\n /**\n * insert all details in set and return\n */\n while (resultSet.next()) {\n Timing timing = new Timing(resultSet.getTime(\"startTime\"), resultSet.getTime(\"endTime\"),\n resultSet.getDate(\"day\"));\n\n Badminton badminton = new Badminton(resultSet.getInt(\"badminton_id\"), resultSet.getInt(\"personid\"),\n timing, resultSet.getInt(\"numPlayers\"), resultSet.getString(\"result\"));\n\n setDetails.add(badminton);\n }\n return setDetails;\n }catch (SQLException e) {\n throw new ApplicationException(500,\"Sorry, some internal error comes in badminton service\");\n }\n }", "private void setDate() {\n\n for (int i = 0; i < historicList.size(); i++) {\n if (i == 0) {\n dateList.get(0).setText(\"Hier\");\n }\n if (i == 1) {\n dateList.get(0).setText(\"Avant - hier\");\n dateList.get(1).setText(\"Hier\");\n }\n\n if (i == 2) {\n dateList.get(0).setText(\"Il y a trois jours\");\n dateList.get(1).setText(\"Avant - hier\");\n dateList.get(2).setText(\"Hier\");\n\n }\n\n if (i == 3) {\n dateList.get(0).setText(\"Il y a quatre jours\");\n dateList.get(1).setText(\"Il y a trois jours\");\n dateList.get(2).setText(\"Avant - hier\");\n dateList.get(3).setText(\"Hier\");\n }\n\n if (i == 4) {\n dateList.get(0).setText(\"Il y a cinq jours\");\n dateList.get(1).setText(\"Il y a quatre jours\");\n dateList.get(2).setText(\"Il y a trois jours\");\n dateList.get(3).setText(\"Avant - hier\");\n dateList.get(4).setText(\"Hier\");\n }\n\n if (i == 5) {\n dateList.get(0).setText(\"Il y a six jours\");\n dateList.get(1).setText(\"Il y a cinq jours\");\n dateList.get(2).setText(\"Il y a quatre jours\");\n dateList.get(3).setText(\"Il y a trois jours\");\n dateList.get(4).setText(\"Avant - hier\");\n dateList.get(5).setText(\"Hier\");\n }\n\n if (i == 6) {\n dateList.get(0).setText(\"Il y a une semaine\");\n dateList.get(1).setText(\"Il y a six jours\");\n dateList.get(2).setText(\"Il y a cinq jours\");\n dateList.get(3).setText(\"Il y a quatre jours\");\n dateList.get(4).setText(\"Il y a trois jours\");\n dateList.get(5).setText(\"Avant - hier\");\n dateList.get(6).setText(\"Hier\");\n }\n\n }\n }", "@Override\n\tpublic Date getLastServiced() {\n\t\treturn lastServiced;\n\t}", "public void popularDoctores(){\n doctores = new ArrayList<>();\r\n doctores.add(new Doctor(22, \"Victor\", \"Gonzalez\", \"Romero\"));\r\n doctores.add(new Doctor(38, \"Jose\", \"Ramirez\", \"Bagarin\"));\r\n doctores.add(new Doctor(15, \"Patricio\", \"Arellano\", \"Vega\"));\r\n }", "Date getNextTodo();", "List<Asistencia> listarAsistencia(Integer id, Date inicio, Date fin, Integer crrId);", "public DateTime getDepartDateTime() {\n return departDateTime;\n }", "@Override\n public Persona Last() {\n return array.get(tamano - 1);\n }", "public ArrayList<Menu> buscarPorFecha(Date fechaIni,Date fechaTer );", "public Breakdown generateDiurnalReport(Date startDate, String[] demoArr) {\n\n Breakdown result = new Breakdown();\n AppUsageDAO auDAO = new AppUsageDAO();\n Date startHour = startDate;\n SimpleDateFormat sdf = new SimpleDateFormat(\"HH:00\");\n //for each hour (for 24 loop)\n for (int i = 0; i < 24; i++) {\n\n HashMap<String, Breakdown> miniMap = new HashMap<String, Breakdown>();\n result.addInList(miniMap);\n\n Date endHour = new Date(startHour.getTime() + 1000 * 60 * 60);\n miniMap.put(\"period\", new Breakdown(sdf.format(startHour) + \"-\" + sdf.format(endHour)));\n\n //get number of targetted users\n Date endDate = new Date(startDate.getTime() + 1000 * 60 * 60 * 24);\n ArrayList<User> targetList = auDAO.retrieveUserByDemo(startDate, endDate, demoArr);\n int targetCount = targetList.size();\n //get userList for this hour, filtered by demo\n ArrayList<User> userList = auDAO.retrieveUserByDemo(startHour, endHour, demoArr);\n double secondsThisHour = 0;\n\n //for each user\n for (User user : userList) {\n\n //retrieve appUsageList\n ArrayList<AppUsage> auList = auDAO.retrieveByUserHourly(user.getMacAddress(), startHour, endHour);\n\n Date oldTime = null;\n if (auList.size() > 0) {\n oldTime = auList.get(0).getDate();\n }\n\n //For each appusage in appUsageList\n for (int j = 1; j < auList.size(); j++) {\n Date newTime = auList.get(j).getDate();\n\n //calculate usageTime and add to secondsThisHour\n //difference between app usage timing\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n\n //If difference less than/equal 2 minutes\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n secondsThisHour += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n secondsThisHour += 10;\n }\n\n oldTime = newTime;\n\n }\n //Add 10 seconds for the last appusage in the list\n if (auList.size() > 0) {\n Date lastTime = auList.get(auList.size() - 1).getDate();\n\n long difference = Utility.secondsBetweenDates(lastTime, endHour);\n\n if (difference > 10) {\n difference = 10;\n }\n secondsThisHour += difference;\n\n }\n\n }\n //divide by all users in this hour to get average usage time in this hour\n if (targetCount > 0) {\n secondsThisHour /= targetCount;\n\n }\n\n //store in breakdown\n long time = Math.round(secondsThisHour);\n miniMap.put(\"duration\", new Breakdown(\"\" + time));\n\n startHour = endHour;\n }\n\n return result;\n }", "private ResultPersonRespList getLatestLocation(ResultPersonRespList personRespList) {\n\t\tResultDataIPC tmpIPC = null;\n\t\tfor (ResultDataPerson dataPerson: personRespList.getDataPersonList()) {\n\t\t\tfor (ResultDataMap dataMap: dataPerson.getDataMapList()) {\n\t\t\t\tfor (ResultDataIPC dataIPC: dataMap.getDataIpcList()) {\n\t\t\t\t\tif (tmpIPC==null ||\n\t\t\t\t\t\ttmpIPC.getDataFaceList().get(0).getPhotoDate().getTime() < dataIPC.getDataFaceList().get(0).getPhotoDate().getTime()) {\n\t\t\t\t\t\ttmpIPC = dataIPC;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\ttmpIPC.setLatest(true);\n\t\t\ttmpIPC = null;\n\t\t}\n\t\treturn personRespList;\n\t}", "public static List<Punto> getPuntos(){\n\t\t\n\t\tList<Punto> puntos = new ArrayList<Punto>();\n\t\ttry{\n\n\t\t\t//-12.045916, -75.195270\n\t\t\t\n\t\t\tPunto p1 = new Punto(1,-12.037512,-75.183327,0.0);\n\t\t\tp1.setDatos(getDatos(\"16/06/2017 09:00:00\", 2 , 1));\n\t\t\t\n\t\t\tPunto p2 = new Punto(2,-12.041961,-75.184786,0.0);\n\t\t\tp2.setDatos(getDatos(\"16/06/2017 09:00:00\",1 , 2));\n\t\t\t\n\t\t\tPunto p3 = new Punto(3,-12.0381,-75.1841,0.0);\n\t\t\tp3.setDatos(getDatos(\"16/06/2017 09:00:00\",2 , 2));\n\t\t\t\n\t\t\tPunto p4 = new Punto(4,-12.041542,-75.185816,0.0);\n\t\t\tp4.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p5 = new Punto(5,-12.037764,-75.181096,0.0);\n\t\t\tp5.setDatos(getDatos(\"16/06/2017 11:15:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p6 = new Punto(6,-12.042801,-75.190108,0.0);\n\t\t\tp6.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p7 = new Punto(7,-12.04364,-75.184014,0.0);\n\t\t\tp7.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p8 = new Punto(8,-12.045739,-75.185387,0.0);\n\t\t\tp8.setDatos(getDatos(\"16/06/2017 11:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p9 = new Punto(9,-12.04683,-75.187361,0.0);\n\t\t\tp9.setDatos(getDatos(\"16/06/2017 11:50:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p10 = new Punto(10,-12.050775,-75.187962,0.0);\n\t\t\tp10.setDatos(getDatos(\"16/06/2017 12:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p11 = new Punto(11,-12.053797,-75.184271,0.0);\n\t\t\tp11.setDatos(getDatos(\"16/06/2017 13:00:00\",0 , 0));\n\t\t\t\n\t\t\tpuntos.add(p8);\n\t\t\tpuntos.add(p9);\n\t\t\tpuntos.add(p3);\n\t\t\tpuntos.add(p4);\n\t\t\tpuntos.add(p5);\n\t\t\tpuntos.add(p6);\n\t\t\tpuntos.add(p7);\n\t\t\tpuntos.add(p10);\n\t\t\tpuntos.add(p1);\n\t\t\tpuntos.add(p2);\n\t\t\tpuntos.add(p11);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e ){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn puntos;\n\t\n\t}", "public FormInfoAdministration(Calendar newTTL) {\n if (newTTL.after(Calendar.getInstance())) {\n this.TTL = newTTL;\n } else {\n throw new IllegalArgumentException(\"Given date is not later than the current time!\");\n }\n \n this.forms = new ArrayList<>();\n }", "net.opengis.gml.x32.TimeInstantPropertyType addNewEnd();", "@Override\n\tpublic List<LoanRepaymentSchedule> generateRepaymentScheduleByMultipleDisbursement(LoanLineOfCredit loanLoc, Money sanctionAmount, List<LoanRepaymentSchedule> myltipleRepaymentScheduleList, Date businessDate, Date firstInstallmentDate , String loanType , Long borrowingLoc ) {\n\t\tlogger.info(\"Start : Generating default repayment schedule to loan repayment schedule table in generateRepaymentSchedule() method.\");\n\t\tPacsLoanApplication loanApplication = loanLoc.getPacsLoanApplication();\n\t\tMoney prevOutstandingAmount = Money.ZERO;\n\t\tString reducingFrequency = null;\n\t\tdouble reducingFreq = 0;\n\t\tint reducingFreqInt = 0;\n\t\tList<LoanRepaymentSchedule> repaymentScheduleList = new ArrayList<LoanRepaymentSchedule>();\n\t\tif (loanApplication != null && loanLoc != null) {\n\t\t\tDate sanctionDate = null;\n\t\t\t//Date firstDueDate = null;\n\t\t\tInteger numOfInstallments = null;\n\t\t\tif(myltipleRepaymentScheduleList.size() > 0) {\n\t\t\t\tsanctionDate = businessDate;\n\t\t\t\tlogger.info(\" sanctionDate : \" + sanctionDate);\n\t\t\t\t//firstDueDate = myltipleRepaymentScheduleList.get(0).getInstallmentDate();\n\t\t\t\t//logger.info(\" firstDueDate : \" + firstDueDate);\n\t\t\t\tnumOfInstallments = myltipleRepaymentScheduleList.size();\n\t\t\t\tlogger.info(\" numOfInstallments : \" + numOfInstallments);\n\t\t\t\tlogger.info(\" sanctionAmount : \" + sanctionAmount);\n\t\t\t\tInteger loanPeriod = loanApplication.getLoanPeriod();\n\t\t\t\tlogger.info(\" loanPeriod : \" + loanPeriod);\n\t\t\t\tInteger frequencyValue = loanApplication.getInstallmentFrequency().getValue();\n\t\t\t\tlogger.info(\" frequencyValue : \" + frequencyValue);\n\t\t\t\tProduct product = loanApplication.getProduct();\n\t\t\t\tInterestCategory interestCategory = loanApplication.getInterestCategory();\n\t\t\t\tif (product != null && interestCategory != null) {\n\t\t\t\t\tRepaymentSchedule repaymentSchedule = product.getRepaymentSchedule();\n\t\t\t\t\tlogger.info(\" repaymentSchedule : \" + repaymentSchedule.getValue());\n\t\t\t\t\tRepaymentType repaymentType = product.getRepaymentType();\n\t\t\t\t\tlogger.info(\" repaymentType : \" + repaymentType.getValue());\n\t\t\t\t\tMoney principalAmountSum = Money.ZERO;\n\t\t\t\t\tMoney principalAmount = calculatePrincipalAmount(sanctionAmount, numOfInstallments);\n\t\t\t\t\tMoney tempPrincipalAmount = Money.ZERO;\n\t\t\t\t\tlogger.info(\" principalAmount : \" + principalAmount);\n\t\t\t\t\tMoney interestAmount = Money.ZERO;\n\t\t\t\t\tMoney tempInterestAmount = Money.ZERO;\n\t\t\t\t\t\n\t\t\t\t\tInteger interestCategoryId = interestCategory.getId();\n\t\t\t\t\tif(\"B\".equalsIgnoreCase(loanType)){\n\t\t\t\t\tinterestCategoryId=\tKLSServiceFactory.getBorrowingProductService().getProductById(loanLoc.getProduct().getBorrowingProductId()).getInterestCategoryId();\n\t\t\t\t\t}else{\n\t\t\t\t\tinterestCategoryId =\tinterestCategory.getId();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tList<SlabwiseInterestRate> interestSlabs = getInterestSlabs(interestCategoryId, sanctionDate);\n\t\t\t\t\tBigDecimal interestRate = (getInterestRate(interestSlabs, sanctionAmount)).divide(BigDecimal.valueOf(100));\n\t\t\t\t\tlogger.info(\" interestRate per annum : \" + interestRate);\n\t\t\t\t\tdouble interestRatePerMonth = 0d;\n\t\t\t\t\tif(frequencyValue != null) {\n\t\t\t\t\t\tif(frequencyValue == 1) {\n\t\t\t\t\t\t\tinterestRatePerMonth = interestRate.doubleValue() / 12;\n\t\t\t\t\t\t} else if(frequencyValue == 3) {\n\t\t\t\t\t\t\tinterestRatePerMonth = interestRate.doubleValue() / 4;\n\t\t\t\t\t\t} else if(frequencyValue == 6) {\n\t\t\t\t\t\t\tinterestRatePerMonth = interestRate.doubleValue() / 2;\n\t\t\t\t\t\t} else if(frequencyValue == 12) {\n\t\t\t\t\t\t\tinterestRatePerMonth = interestRate.doubleValue() / 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlogger.info(\" interestRate per month : \" + interestRatePerMonth);\n\t\t\t\t\tMoney outstandingAmount = sanctionAmount;\n\t\t\t\t\tMoney tempOutstandingAmount = Money.ZERO;\n\t\t\t\t\t//Date installmentDate = firstDueDate;\n\t\t\t\t\tMoney installmentAmount = principalAmount.add(interestAmount);\n\t\t\t\t\tMoney tempInstallmentAmount = Money.ZERO;\n\t\t\t\t\tboolean isEquated = RepaymentSchedule.PRINCIPAL_AND_INTEREST.equals(repaymentSchedule)\n\t\t\t\t\t\t\t&& RepaymentType.EQUATED_INSTALLMENTS.equals(repaymentType);\n\t\t\t\t\tlogger.info(\" isEquated : \" + isEquated);\n\t\t\t\t\tboolean isNonEquated = RepaymentSchedule.PRINCIPAL_AND_INTEREST.equals(repaymentSchedule)\n\t\t\t\t\t\t\t&& RepaymentType.NON_EQUATED_INSTALLMENTS.equals(repaymentType);\n\t\t\t\t\tlogger.info(\" isNonEquated : \" + isNonEquated);\n\t\t\t\t\tif (isEquated) {\n\t\t\t\t\t\tinstallmentAmount = calculateInstallmentAmount(outstandingAmount, numOfInstallments, interestRatePerMonth);\n\t\t\t\t\t} else if (isNonEquated) {\n\t\t\t\t\t\treducingFrequency = PropertiesUtil.getRepaymentProperty(ServiceConstants.REDUCING_FREQUENCY);\n\t\t\t\t\t\treducingFreq = new Double(reducingFrequency).doubleValue();\n\t\t\t\t\t\treducingFreqInt = new Double(reducingFrequency).intValue();\n\t\t\t\t\t\tlogger.info(\" reducingFreq : \" + reducingFreq);\n\t\t\t\t\t\tlogger.info(\" interestRate : \" + interestRate);\n\t\t\t\t\t}\n\t\t\t\t\tlogger.info(\" installmentAmount : \" + installmentAmount);\n\t\t\t\t\tlogger.info(\" interestAmount : \" + interestAmount);\n\t\t\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\t\t\tfor (int i = 0; i < numOfInstallments; i++) {\n\t\t\t\t\t\tLoanRepaymentSchedule loanRepaymentSchedule = myltipleRepaymentScheduleList.get(i);\n\t\t\t\t\t\tif (isEquated) {\n\t\t\t\t\t\t\tinterestAmount = calculateInterestAmount(outstandingAmount, interestRatePerMonth);\n\t\t\t\t\t\t\tprincipalAmount = installmentAmount.subtract(interestAmount);\n\t\t\t\t\t\t\tlogger.info(\" principalAmount : \" + principalAmount);\n\t\t\t\t\t\t\tprevOutstandingAmount = outstandingAmount;\n\t\t\t\t\t\t\tlogger.info(\" prevOutstandingAmount : \" + prevOutstandingAmount);\n\t\t\t\t\t\t} else if (isNonEquated) {\n\t\t\t\t\t\t\tint j = i+1;\n\t\t\t\t\t\t\tif ((reducingFreqInt != 0 && (j % reducingFreqInt) == 1) || reducingFreqInt == 1) {\n\t\t\t\t\t\t\t\tlogger.info(\" interestRate per annum reducing frequency : \" + interestRate);\n\t\t\t\t\t\t\t\tinterestAmount = calculateInterestAmount(outstandingAmount, interestRate.doubleValue(), reducingFreq);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tinstallmentAmount = principalAmount.add(interestAmount);\n\t\t\t\t\t\t\tlogger.info(\" installmentAmount reducing frequency : \" + installmentAmount);\n\t\t\t\t\t\t\tprevOutstandingAmount = outstandingAmount;\n\t\t\t\t\t\t\tlogger.info(\" prevOutstandingAmount : \" + prevOutstandingAmount);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlogger.info(\" interestAmount : \" + interestAmount);\n\t\t\t\t\t\ttempInterestAmount = loanRepaymentSchedule.getInterestAmount().add(interestAmount);\n\t\t\t\t\t\tloanRepaymentSchedule.setInterestAmount(tempInterestAmount);\n\t\t\t\t\t\ttempInterestAmount = Money.ZERO;\n\t\t\t\t\t\ttempInstallmentAmount = loanRepaymentSchedule.getInstallmentAmount().add(installmentAmount);\n\t\t\t\t\t\tloanRepaymentSchedule.setInstallmentAmount(tempInstallmentAmount);\n\t\t\t\t\t\ttempInstallmentAmount = Money.ZERO;\n//\t\t\t\t\t\tloanRepaymentSchedule.setInstallmentDate(installmentDate);\n\t\t\t\t\t\t//installmentDate = Date.valueOf(getInstallmentDate(calendar, installmentDate, frequencyValue));\n\t\t\t\t\t\t//logger.info(\" installmentDate : \" + installmentDate);\n\t\t\t\t\t\toutstandingAmount = outstandingAmount.subtract(principalAmount);\n\t\t\t\t\t\tlogger.info(\" outstandingAmount : \" + outstandingAmount);\n\t\t\t\t\t\ttempOutstandingAmount = loanRepaymentSchedule.getLoanOutstandingAmount().add(outstandingAmount);\n\t\t\t\t\t\tloanRepaymentSchedule.setLoanOutstandingAmount(tempOutstandingAmount);\n\t\t\t\t\t\ttempPrincipalAmount =loanRepaymentSchedule.getPrincipalAmount().add(principalAmount);\n\t\t\t\t\t\tloanRepaymentSchedule.setPrincipalAmount(tempPrincipalAmount);\n\t\t\t\t\t\ttempPrincipalAmount = Money.ZERO;\n\t\t\t\t\t\tif(loanRepaymentSchedule.getLoanRepaymentScheduleId() == null) {\n\t\t\t\t\t\t\tLoanRepaymentScheduleId id = new LoanRepaymentScheduleId();\n\t\t\t\t\t\t\tif(\"B\".equalsIgnoreCase(loanType)){\n\t\t\t\t\t\t\tid.setLineOfCreditId(borrowingLoc);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tid.setLineOfCreditId(loanLoc.getId());\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid.setInstallmentNumber(i);\n\t\t\t\t\t\t\tloanRepaymentSchedule.setLoanRepaymentScheduleId(id);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (RepaymentSchedule.PRINCIPAL.equals(repaymentSchedule)) {\n\t\t\t\t\t\t\tprincipalAmountSum = principalAmountSum.add(principalAmount);\n\t\t\t\t\t\t\tlogger.info(\" principalAmountSum : \" + principalAmountSum);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (i == numOfInstallments) {\n\t\t\t\t\t\t\tif (RepaymentSchedule.PRINCIPAL.equals(repaymentSchedule)) {\n\t\t\t\t\t\t\t\tMoney adjustment = sanctionAmount.subtract(principalAmountSum);\n\t\t\t\t\t\t\t\tlogger.info(\" adjustment : \" + adjustment.getAmount());\n\t\t\t\t\t\t\t\tif (!adjustment.isZero()) {\n\t\t\t\t\t\t\t\t\tloanRepaymentSchedule.setLoanOutstandingAmount(Money.ZERO);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tprincipalAmount = principalAmount.add(adjustment);\n\t\t\t\t\t\t\t\tlogger.info(\" principalAmount after adjustment : \" + principalAmount);\n\t\t\t\t\t\t\t\tinstallmentAmount = principalAmount.add(interestAmount);\n\t\t\t\t\t\t\t\tlogger.info(\" installmentAmount after adjustment : \" + installmentAmount);\n\t\t\t\t\t\t\t\ttempInstallmentAmount = loanRepaymentSchedule.getInstallmentAmount().add(installmentAmount);\n\t\t\t\t\t\t\t\tloanRepaymentSchedule.setInstallmentAmount(tempInstallmentAmount);\n\t\t\t\t\t\t\t} else if (isEquated) {\n\t\t\t\t\t\t\t\tprincipalAmount = prevOutstandingAmount;\n\t\t\t\t\t\t\t\tlogger.info(\" principalAmount for the last schedule : \" + principalAmount);\n\t\t\t\t\t\t\t\tinstallmentAmount = principalAmount.add(interestAmount);\n\t\t\t\t\t\t\t\tlogger.info(\" installmentAmount for the last schedule : \" + installmentAmount);\n\t\t\t\t\t\t\t\ttempInstallmentAmount = loanRepaymentSchedule.getInstallmentAmount().add(installmentAmount);\n\t\t\t\t\t\t\t\tloanRepaymentSchedule.setInstallmentAmount(tempInstallmentAmount);\n\t\t\t\t\t\t\t\tloanRepaymentSchedule.setLoanOutstandingAmount(Money.ZERO);\n\t\t\t\t\t\t\t} else if (isNonEquated) {\n\t\t\t\t\t\t\t\tprincipalAmount = prevOutstandingAmount;\n\t\t\t\t\t\t\t\tlogger.info(\" principalAmount for the last schedule : \" + principalAmount);\n\t\t\t\t\t\t\t\tinstallmentAmount = principalAmount.add(interestAmount);\n\t\t\t\t\t\t\t\tlogger.info(\" installmentAmount for the last schedule : \" + installmentAmount);\n\t\t\t\t\t\t\t\ttempInstallmentAmount = loanRepaymentSchedule.getInstallmentAmount().add(installmentAmount);\n\t\t\t\t\t\t\t\tloanRepaymentSchedule.setInstallmentAmount(tempInstallmentAmount);\n\t\t\t\t\t\t\t\tloanRepaymentSchedule.setLoanOutstandingAmount(Money.ZERO);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttempPrincipalAmount = loanRepaymentSchedule.getPrincipalAmount().add(principalAmount);\n\t\t\t\t\t\t\tloanRepaymentSchedule.setPrincipalAmount(tempPrincipalAmount);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trepaymentScheduleList.add(loanRepaymentSchedule);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\trepaymentScheduleList = generateRepaymentSchedule(loanLoc, sanctionAmount, businessDate, firstInstallmentDate , loanType , borrowingLoc);\n\t\t\t}\n\t\t}\n\t\tlogger.info(\"End : Generating default repayment schedule to loan repayment schedule table in generateRepaymentSchedule() method.\");\n\t\treturn repaymentScheduleList;\n\t}", "public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic ArrayList<Domanda> getDomande() {\n\t\tDB db = getDB();\n\t\tArrayList<Domanda> domande = new ArrayList<Domanda>();\n\t\tMap<Long, Domanda> list = db.getTreeMap(\"domande\");\n\t\tfor(Map.Entry<Long, Domanda> domanda : list.entrySet())\n\t\t\tif(domanda.getValue() instanceof Domanda)\n\t\t\t\tdomande.add((Domanda)domanda.getValue());\n\t\treturn domande;\n\t}", "@Override\r\n\tpublic CalendarDTO calendarLogs(Date empJoiningDateObj, Date fromDate, Date toDate,\r\n\t\t\tList<AttendanceLogDTO> attendanceLogDtoList, List<AttendanceRegularizationRequestDTO> arRequestDtoList,\r\n\t\t\tString[] weekOffPatternArray, List<HolidayDTO> holidayDtoList, Shift shiftNameObj,\r\n\t\t\tList<LeaveEntryDTO> leaveEntryDtoList, HalfDayRuleDTO halfDayRuleDto) {\r\n\r\n\t\tLong maxRequireHour = halfDayRuleDto.getMaximumRequireHour();\r\n\t\tLong minRequireHour = halfDayRuleDto.getMinimumRequireHour();\r\n\r\n\t\tSimpleDateFormat dayFormat = new SimpleDateFormat(\"dd\");\r\n\t\t/*\r\n\t\t * SimpleDateFormat monthFormat = new SimpleDateFormat(\"MM\"); int month =\r\n\t\t * Integer.parseInt(monthFormat.format(fromDate));\r\n\t\t * System.out.println(\"Month ---->\" + month);\r\n\t\t */\r\n\t\t// int days = Integer.parseInt(dayFormat.format(toDate));\r\n\r\n\t\tCalendarDTO calendarDto = new CalendarDTO();\r\n\r\n\t\tSimpleDateFormat simdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tString strDate = simdf.format(fromDate);\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\ttry {\r\n\t\t\tc.setTime(simdf.parse(strDate));\r\n\t\t} catch (ParseException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\tList<MonthAttendanceDTO> monthAttendanceDtoList = new ArrayList<MonthAttendanceDTO>();\r\n\t\tList<DaysAttendanceLogDTO> daysAttendanceLogDtoList = new ArrayList<DaysAttendanceLogDTO>();\r\n\r\n\t\tfor (int i = 1; i <= Integer.parseInt(dayFormat.format(toDate)); i++) {\r\n\t\t\tint j = 0;\r\n\t\t\tj++;\r\n\t\t\tMonthAttendanceDTO monthAttendanceDto = new MonthAttendanceDTO();\r\n\t\t\tmonthAttendanceDto.setActionDate(c.getTime());\r\n\r\n\t\t\tmonthAttendanceDtoList.add(monthAttendanceDto);\r\n\t\t\tc.add(Calendar.DATE, j);\r\n\r\n\t\t}\r\n\r\n\t\tDate empJoiningDate = empJoiningDateObj!= null ? empJoiningDateObj : null;\r\n\t\tfor (MonthAttendanceDTO monthAttendance : monthAttendanceDtoList) {\r\n\r\n\t\t\tString inTime = null;\r\n\t\t\tString outTime = null;\r\n\t\t\tString mode = null;\r\n\t\t\t// Date actionDate = null;\r\n\t\t\tDaysAttendanceLogDTO daysAttendanceLogDto = new DaysAttendanceLogDTO();\r\n\t\t\t/* DayLogsDTO dayLogsDto = new DayLogsDTO(); */\r\n\t\t\t/*\r\n\t\t\t * Attendance\r\n\t\t\t */\r\n\r\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\tString actDate = dateFormat.format(monthAttendance.getActionDate());\r\n\r\n\t\t\tDate currentData = new Date();\r\n\t\t\t// String currentData = dateFormat.format(crntDate);\r\n\r\n\t\t\tDate actionDate = null;\r\n\t\t\ttry {\r\n\t\t\t\tactionDate = dateFormat.parse(actDate);\r\n\t\t\t} catch (ParseException e1) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\tif (currentData.compareTo(actionDate) > 0) {\r\n\r\n\t\t\t\tif (empJoiningDate.compareTo(actionDate) < 0) {\r\n\r\n\t\t\t\t\t// attendanceLogDtoList.forEach(attendanceLog -> {\r\n\t\t\t\t\tfor (AttendanceLogDTO attendanceLog : attendanceLogDtoList) {\r\n\r\n\t\t\t\t\t\tString attendanceDate = dateFormat.format(attendanceLog.getAttendanceDate());\r\n\r\n\t\t\t\t\t\tif (attendanceDate.equals(actDate)) {\r\n\r\n\t\t\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"hh:mm:ss\");\r\n\r\n\t\t\t\t\t\t\tDate outDate = null;\r\n\t\t\t\t\t\t\tDate inDate = null;\r\n\r\n\t\t\t\t\t\t\toutTime = attendanceLog.getOutTime();\r\n\t\t\t\t\t\t\tinTime = attendanceLog.getInTime();\r\n\t\t\t\t\t\t\tmode = attendanceLog.getMode();\r\n\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\toutDate = (Date) sdf.parse(outTime);\r\n\t\t\t\t\t\t\t\tinDate = (Date) sdf.parse(inTime);\r\n\t\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t\t * dayLogsDto.setFirstIn(inTime); dayLogsDto.setLastOut(outTime);\r\n\t\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\t\tLong diff = outDate.getTime() - inDate.getTime();\r\n\t\t\t\t\t\t\t\tLong diffHours = diff / (60 * 60 * 1000) % 24;\r\n\r\n\t\t\t\t\t\t\t\tif (minRequireHour < diffHours) {\r\n\t\t\t\t\t\t\t\t\tif (maxRequireHour > diffHours) {\r\n\t\t\t\t\t\t\t\t\t\tdaysAttendanceLogDto.setTitle(StatusMessage.HALFDAY_CODE);\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif (maxRequireHour <= diffHours) {\r\n\t\t\t\t\t\t\t\t\t\tdaysAttendanceLogDto.setTitle(StatusMessage.PRESENT_CODE);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t} catch (ParseException e) {\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t * ARRequest\r\n\t\t\t\t\t\t\t * \r\n\t\t\t\t\t\t\t */\r\n\r\n\t\t\t\t\t\t\tfor (AttendanceRegularizationRequestDTO ar : arRequestDtoList) {\r\n\r\n\t\t\t\t\t\t\t\tif (ar.getStatus().equals(StatusMessage.ABSENT_CODE)) {\r\n\r\n\t\t\t\t\t\t\t\t\tlong diff = ar.getFromDate().getTime() - ar.getToDate().getTime();\r\n\t\t\t\t\t\t\t\t\tlong diffDays = diff / (24 * 60 * 60 * 1000);\r\n\t\t\t\t\t\t\t\t\tList<String> dateList = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\tfinal Calendar calendar = Calendar.getInstance();\r\n\r\n\t\t\t\t\t\t\t\t\tcalendar.setTime(ar.getFromDate());\r\n\t\t\t\t\t\t\t\t\tString date = dateFormat.format(calendar.getTime());\r\n\t\t\t\t\t\t\t\t\tdateList.add(date);\r\n\r\n\t\t\t\t\t\t\t\t\tfor (int i = 1; i <= diffDays; i++) {\r\n\t\t\t\t\t\t\t\t\t\tcalendar.add(Calendar.DAY_OF_YEAR, i);\r\n\t\t\t\t\t\t\t\t\t\tString attDate = dateFormat.format(calendar.getTime());\r\n\t\t\t\t\t\t\t\t\t\tdateList.add(attDate);\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tif (dateList.contains(actDate))\r\n\t\t\t\t\t\t\t\t\t\tdaysAttendanceLogDto.setTitle(StatusMessage.AR_CODE);\r\n\r\n\t\t\t\t\t\t\t\t} else {\r\n\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\t * EmpLeaveEntry\r\n\t\t\t\t\t\t\t\t\t */\r\n\r\n\t\t\t\t\t\t\t\t\tfor (LeaveEntryDTO leaveEntry : leaveEntryDtoList) {\r\n\r\n\t\t\t\t\t\t\t\t\t\tlong leaveDiff = leaveEntry.getFromDate().getTime()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- leaveEntry.getToDate().getTime();\r\n\t\t\t\t\t\t\t\t\t\tlong leaveDiffDays = leaveDiff / (24 * 60 * 60 * 1000);\r\n\t\t\t\t\t\t\t\t\t\tList<String> leavedDteList = new ArrayList<String>();\r\n\r\n\t\t\t\t\t\t\t\t\t\tfinal Calendar leaveCalendar = Calendar.getInstance();\r\n\r\n\t\t\t\t\t\t\t\t\t\tleaveCalendar.setTime(leaveEntry.getFromDate());\r\n\t\t\t\t\t\t\t\t\t\tString leavedate = dateFormat.format(leaveCalendar.getTime());\r\n\t\t\t\t\t\t\t\t\t\tleavedDteList.add(leavedate);\r\n\t\t\t\t\t\t\t\t\t\tfor (int i = 1; i <= leaveDiffDays; i++) {\r\n\t\t\t\t\t\t\t\t\t\t\tleaveCalendar.add(Calendar.DAY_OF_YEAR, i);\r\n\t\t\t\t\t\t\t\t\t\t\tString leaveDate = dateFormat.format(leaveCalendar.getTime());\r\n\t\t\t\t\t\t\t\t\t\t\tleavedDteList.add(leaveDate);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (leavedDteList.contains(actDate)) {\r\n\t\t\t\t\t\t\t\t\t\t\tif (\"A\".equals(leaveEntry.getStatus())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (\"H\".equals(leaveEntry.getHalf_fullDay()))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdaysAttendanceLogDto.setTitle(StatusMessage.HALFDAY_CODE);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (\"F\".equals(leaveEntry.getHalf_fullDay()))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdaysAttendanceLogDto.setTitle(StatusMessage.PRESENT_CODE);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t\t\t\t\t * Holiday\r\n\t\t\t\t\t\t\t\t\t\t\t * \r\n\t\t\t\t\t\t\t\t\t\t\t */\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tfor (HolidayDTO holiday : holidayDtoList) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tlong holiDayDiff = holiday.getFromDate().getTime()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t- holiday.getToDate().getTime();\r\n\t\t\t\t\t\t\t\t\t\t\t\tlong holiDayDiffDays = holiDayDiff / (24 * 60 * 60 * 1000);\r\n\t\t\t\t\t\t\t\t\t\t\t\tList<String> holiDayDateList = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\tfinal Calendar holiDatCalendar = Calendar.getInstance();\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tholiDatCalendar.setTime(holiday.getFromDate());\r\n\t\t\t\t\t\t\t\t\t\t\t\tString holiDayDate = dateFormat.format(holiDatCalendar.getTime());\r\n\t\t\t\t\t\t\t\t\t\t\t\tholiDayDateList.add(holiDayDate);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tfor (int i = 1; i <= holiDayDiffDays; i++) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tholiDatCalendar.add(Calendar.DAY_OF_YEAR, i);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tString holidayDate = dateFormat.format(holiDatCalendar.getTime());\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tholiDayDateList.add(holidayDate);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (holiDayDateList.contains(actDate)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdaysAttendanceLogDto.setTitle(StatusMessage.HALFDAY_CODE);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\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}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/*\r\n\t\t\t * WeekOff\r\n\t\t\t */\r\n\t\t\tif (currentData.compareTo(actionDate) > 0) {\r\n\t\t\t\tif (empJoiningDate.compareTo(actionDate) < 0) {\r\n\t\t\t\t\tList<String> weekDayList = Arrays.asList(weekOffPatternArray);\r\n\t\t\t\t\tSimpleDateFormat simpleDateformat = new SimpleDateFormat(\"EEE\");\r\n\t\t\t\t\tString dayName = simpleDateformat.format(monthAttendance.getActionDate());\r\n\r\n\t\t\t\t\tif (weekDayList.contains(dayName.toUpperCase())) {\r\n\t\t\t\t\t\tdaysAttendanceLogDto.setTitle(null);\r\n\t\t\t\t\t\tdaysAttendanceLogDto.setTitle(StatusMessage.OFF_CODE);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (daysAttendanceLogDto.getTitle() == null) {\r\n\t\t\t\t\t\tdaysAttendanceLogDto.setTitle(StatusMessage.ABSENT_CODE);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/*\r\n\t\t\t * shift\r\n\t\t\t */\r\n\t\t\tif (currentData.compareTo(actionDate) > 0) {\r\n\t\t\t\tif (empJoiningDate.compareTo(actionDate) < 0) {\r\n\t\t\t\t\tString title = \"\";\r\n\t\t\t\t\tString shift = null;\r\n\t\t\t\t\tif (daysAttendanceLogDto.getTitle() != null) {\r\n\t\t\t\t\t\ttitle = daysAttendanceLogDto.getTitle();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (shiftNameObj!=null) {\r\n\t\t\t\t\t shift = shiftNameObj.getShiftFName();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * dayLogsDto.setShift(shift); dayLogsDto.setAttendance(title);\r\n\t\t\t\t\t */\r\n\t\t\t\t\tdaysAttendanceLogDto.setTitle(title);\r\n\t\t\t\t\tdaysAttendanceLogDto.setInTime(inTime);\r\n\t\t\t\t\tdaysAttendanceLogDto.setOutTime(outTime);\r\n\t\t\t\t\tdaysAttendanceLogDto.setMode(mode);\r\n\t\t\t\t\tdaysAttendanceLogDto.setShift(shift);;\r\n\t\t\t\t\tdaysAttendanceLogDto.setStart(actDate);\r\n\t\t\t\t\t// dayLogsDto.setActionDate(actDate);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/*\r\n\t\t\t * Date empJoiningDate = empJoiningDateObj[0] != null ? (Date)\r\n\t\t\t * (empJoiningDateObj[0]) : null; try { actionDate = dateFormat.parse(actDate);\r\n\t\t\t * } catch (ParseException e) { e.printStackTrace(); }\r\n\t\t\t * \r\n\t\t\t * if (empJoiningDate.compareTo(actionDate) > 0)\r\n\t\t\t * daysAttendanceLogDto.setTitle(\"\");\r\n\t\t\t */\r\n\r\n\t\t\t// dayLogsDto.setAttendance(daysAttendanceLogDto.getTitle());\r\n\r\n\t\t\tdaysAttendanceLogDtoList.add(daysAttendanceLogDto);\r\n\r\n\t\t\t/* dayLogsMap.put(actDate, dayLogsDto); */\r\n\t\t}\r\n\t\tcalendarDto.setEvents(daysAttendanceLogDtoList);\r\n\t\treturn calendarDto;\r\n\t}", "private List<LocalDate> getBackDatedEntitlementDates(List<LocalDate> newChildrenDatesOfBirth, LocalDate cycleStartDate) {\n LocalDate earliestDateOfBirth = min(newChildrenDatesOfBirth);\n LocalDate rollingEntitlementDate = cycleStartDate.minusDays(entitlementCalculationDurationInDays);\n List<LocalDate> backDatedEntitlementDates = new ArrayList<>();\n\n while (rollingEntitlementDate.isAfter(earliestDateOfBirth) || rollingEntitlementDate.isEqual(earliestDateOfBirth)) {\n backDatedEntitlementDates.add(rollingEntitlementDate);\n rollingEntitlementDate = rollingEntitlementDate.minusDays(entitlementCalculationDurationInDays);\n }\n\n return backDatedEntitlementDates;\n }", "private void addData() {\n Details d1 = new Details(\"Arpitha\", \"+91-9448907664\", \"25/05/1997\");\n Details d2 = new Details(\"Abhijith\", \"+91-993602342\", \"05/10/1992\");\n details.add(d1);\n details.add(d2);\n }", "public void startDateQuestionSet() {\n this.dateQuestionSet = new HashSet<>();//creates a new dateQuestionSet\n for (Question q : this.getForm().getQuestionList()) {//for every question in the question list of the current form\n if (q.getType().getId() == 4) {//if the question is type Date Question\n Quest newQuest = new Quest();//creates a new Quest\n newQuest.setqQuestion(q);//adds the current question to the new Quest\n this.dateQuestionSet.add(newQuest);//adds the new Quest to the new dateQuestionSet\n }\n }\n }", "public void addDoctor()\n {\n Scanner sc=new Scanner(System.in);\n System.out.println(\"Enter name of doctor\");\n String name=sc.nextLine();\n\n Doctor dr=new Doctor(name);\n dr.display();\n doc.add(dr);\n\n }", "public void toPunish() {\n\n //// TODO: 24/03/2017 delete the following lines\n// dalDynamic.addRowToTable2(\"23/03/2017\",\"Thursday\",4,walkingLength,deviation)\n\n\n\n int dev,sum=0;\n long id;\n id=dalDynamic.getRecordIdAccordingToRecordName(\"minutesWalkTillEvening\");\n Calendar now = Calendar.getInstance();//today\n Calendar calendar = Calendar.getInstance();\n SimpleDateFormat dateFormat=new SimpleDateFormat(\"dd/MM/yyyy\");\n String date;\n for (int i = 0; i <DAYS_DEVIATION ; i++) {\n date=dateFormat.format(calendar.getTime());\n Log.v(\"Statistic\",\"date \"+date);\n dev = dalDynamic.getDeviationAccordingToeventTypeIdAnddate(id,date);\n sum+=dev;\n calendar.add(Calendar.DATE,-1);//// TODO: -1-i????\n }\n if(sum==DAYS_DEVIATION){\n Intent intent = new Intent(context,BlankActivity.class);\n context.startActivity(intent);\n //todo:punishment\n }\n\n }", "public Date getDepartureDate();" ]
[ "0.52910596", "0.52863514", "0.5134139", "0.51217735", "0.5072127", "0.5060358", "0.50438744", "0.5037297", "0.50358796", "0.5032081", "0.5030144", "0.5007906", "0.49944368", "0.49931052", "0.49738216", "0.4951164", "0.49478477", "0.49456578", "0.4940431", "0.49144638", "0.49059996", "0.48955056", "0.4887805", "0.48824438", "0.486515", "0.48610964", "0.4854744", "0.4840864", "0.48406962", "0.48186904", "0.48061368", "0.48030287", "0.48009783", "0.48008484", "0.47961444", "0.47956738", "0.47945538", "0.47938454", "0.47917345", "0.47768274", "0.47756648", "0.47719944", "0.47684497", "0.47658587", "0.47625056", "0.47614703", "0.47576052", "0.47555095", "0.47421867", "0.4738768", "0.47337112", "0.47310302", "0.4728137", "0.47263452", "0.47240713", "0.47227228", "0.4720585", "0.47161672", "0.4713053", "0.47051632", "0.4704776", "0.46947497", "0.46922213", "0.46892667", "0.4688224", "0.46873602", "0.46857953", "0.4683464", "0.46823218", "0.46803355", "0.46635804", "0.46628407", "0.4660825", "0.46589473", "0.4653143", "0.46517938", "0.4651268", "0.46507135", "0.46487132", "0.4648465", "0.4647851", "0.46469697", "0.4646588", "0.46459362", "0.4644244", "0.4643922", "0.46412605", "0.4634827", "0.46327457", "0.46288744", "0.46261808", "0.46233088", "0.4622286", "0.46174446", "0.46116087", "0.46084726", "0.460355", "0.45996544", "0.45963326", "0.45947886", "0.45935756" ]
0.0
-1
if != null, ask for start date of new doctor and calculate stop date of old doctor. Also remove patient from physician active patient list with a stop date
private void setPhysician(Physician physician) { this.physician = physician; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setStudAccPeriod() throws IOException {\n\n Scanner sc = new Scanner(System.in);\n\n String startDateTime,endDateTime=null;\n Calendar startCal = null, endCal = null;\n String[] dateTimeSplit;\n\n do {\n System.out.println(\"\\nPlease enter start date and time (yyyy MM dd HH mm):\");\n startDateTime = sc.nextLine();\n while(!startDateTime.matches(\"^\\\\d{4} \\\\d{2} \\\\d{2} \\\\d{2} \\\\d{2}$\"))\n {\n System.out.println(\"Invalid input! Please enter again!\");\n System.out.println(\"\\nPlease enter start date and time (yyyy MM dd HH mm):\");\n startDateTime = sc.nextLine();\n }\n dateTimeSplit = startDateTime.split(\" \");\n startDateTime = dateTimeSplit[0]+\"-\"+dateTimeSplit[1]+\"-\"+dateTimeSplit[2]+\" \"+dateTimeSplit[3]+\":\"+dateTimeSplit[4];\n\n startCal = DateTimeManager.convertAccessStringToCalendar(startDateTime);\n\n if(startCal == null){\n System.out.println(\"Invalid input! Please enter again!\");\n continue;\n }\n\n System.out.println(\"Please enter end date and time (yyyy MM dd HH mm):\");\n endDateTime = sc.nextLine();\n while(!endDateTime.matches(\"^\\\\d{4} \\\\d{2} \\\\d{2} \\\\d{2} \\\\d{2}$\"))\n {\n System.out.println(\"Invalid input! Please enter again!\");\n System.out.println(\"Please enter end date and time (yyyy MM dd HH mm):\");\n endDateTime = sc.nextLine();\n }\n dateTimeSplit = endDateTime.split(\" \");\n endDateTime = dateTimeSplit[0]+\"-\"+dateTimeSplit[1]+\"-\"+dateTimeSplit[2]+\" \"+dateTimeSplit[3]+\":\"+dateTimeSplit[4];\n endCal = DateTimeManager.convertAccessStringToCalendar(endDateTime);\n if (endCal==null){\n System.out.println(\"Invalid input! Please enter again!\");\n continue;\n }\n\n if((endCal.before(startCal))||(endCal.equals(startCal)))\n System.out.println(\"Start access period can't be later than equal to end access period!\");\n }while(endCal.before(startCal)||(endCal == null)||(startCal == null)||endCal.equals(startCal));\n\n\n this.adminManager.addAccessPeriod(startDateTime, endDateTime);\n\n System.out.println(\"\\nSet student access period successfully!\\n\");\n\n }", "private void removeExistingMeasurementsFromCurrentDate(Treatment treatment, Vital vitalToSync) {\n logger.info(String.format(CLEANING_EXISTING_MEASUREMENTS_FOR_TODAY_S, getCurrentDate()));\n final VitalsSynchronization vitalsSynchronization = getVitalsSynchronization(treatment);\n final VitalMeasurement vitalMeasurement = getVitalMeasurement(vitalToSync, vitalsSynchronization);\n if (vitalMeasurement.getMeasurements() != null && !vitalMeasurement.getMeasurements().isEmpty()) {\n final List<Measurement> measurementsFromCurrentDate = vitalMeasurement.getMeasurements().stream().filter(measurement -> measurement.getDate().compareTo(getCurrentDate()) == 0).collect(Collectors.toList());\n for (Measurement measurementToDelete : measurementsFromCurrentDate) {\n logger.info(String.format(REMOVING_MEASUREMENT_S, measurementToDelete.toString()));\n vitalMeasurement.getMeasurements().remove(measurementToDelete);\n }\n }\n }", "private void updStudAccPeriod() throws IOException {\n\n int choice = 0;\n String startDateTime = null,endDateTime = null;\n String[] dateTimeSplit;\n Scanner sc = new Scanner(System.in);\n\n ArrayList <String> accessDateTimeStrList = DateTimeManager.readAccessPeriodFromDB();\n\n Calendar startCal=null, endCal=null;\n if ((accessDateTimeStrList.get(0) == null) && (accessDateTimeStrList.get(1) == null)) {\n System.out.println(\"\\nThe student access period is empty.\");\n System.out.println(\"\\n*****Would you like to set student access period ?*****\");\n System.out.println(\" Set Student Access Period \");\n System.out.println(\"______________________________________________________\\n\");\n System.out.println(\"|1. Yes |\");\n System.out.println(\"|2. No |\");\n System.out.println(\"______________________________________________________\");\n\n\n choice = sc.nextInt();\n\n\n do {\n while (!sc.hasNextInt()) {\n System.out.println(\"Invalid input! Please enter your choice:\");\n sc.next();\n }\n choice = sc.nextInt();\n if((choice < 1) || (choice > 2))\n System.out.println(\"Invalid input! Please enter your choice:\");\n } while ((choice < 1) || (choice > 2));\n if(choice == 1){\n this.setStudAccPeriod();\n return;\n }\n else\n return;\n\n }\n\n else if(accessDateTimeStrList.get(0)==null){\n System.out.println(\"\\nThe student start access period is empty.\");\n System.out.println(\"Please update student start access period first.\");\n endDateTime = accessDateTimeStrList.get(1);\n endCal = DateTimeManager.convertAccessStringToCalendar(endDateTime);\n choice = 1;\n }\n else if (accessDateTimeStrList.get(1)==null){\n System.out.println(\"\\nThe student end access period is empty.\");\n System.out.println(\"Please update student end access period first.\");\n startDateTime = accessDateTimeStrList.get(0);\n startCal = DateTimeManager.convertAccessStringToCalendar(startDateTime);\n choice = 2;\n }\n else{\n startDateTime = accessDateTimeStrList.get(0);\n endDateTime = accessDateTimeStrList.get(1);\n startCal = DateTimeManager.convertAccessStringToCalendar(startDateTime);\n endCal = DateTimeManager.convertAccessStringToCalendar(endDateTime);\n System.out.println(\"\\nThe current student access period is from \"+startDateTime+\" to \"+endDateTime);\n System.out.println(\"\\n*****Which access period would you like to update ?*****\");\n System.out.println(\" Update Student Access Period \");\n System.out.println(\"______________________________________________________\\n\");\n System.out.println(\"|1. Update student start access period |\");\n System.out.println(\"|2. Update student end access period |\");\n System.out.println(\"|3. Update both |\");\n System.out.println(\"|----------------------------------------------------|\");\n System.out.println(\"|0. Return to admin menu page |\");\n System.out.println(\"|----------------------------------------------------|\");\n System.out.println(\"______________________________________________________\");\n\n do {\n while (!sc.hasNextInt()) {\n System.out.println(\"Invalid input! Please enter your choice:\");\n sc.next();\n }\n choice = sc.nextInt();\n if((choice < 0) || (choice > 3))\n System.out.println(\"Invalid input! Please enter your choice:\");\n } while ((choice < 0) || (choice > 3));\n }\n\n sc.nextLine();\n switch(choice){\n case 1:\n do{\n System.out.println(\"Please enter start date and time (yyyy MM dd hh mm):\");\n startDateTime = sc.nextLine();\n while(!startDateTime.matches(\"^\\\\d{4} \\\\d{2} \\\\d{2} \\\\d{2} \\\\d{2}$\"))\n {\n System.out.println(\"Invalid input! Please enter again!\");\n System.out.println(\"Please enter start date and time (yyyy MM dd hh mm):\");\n startDateTime = sc.nextLine();\n }\n dateTimeSplit = startDateTime.split(\" \");\n startDateTime = dateTimeSplit[0]+\"-\"+dateTimeSplit[1]+\"-\"+dateTimeSplit[2]+\" \"+dateTimeSplit[3]+\":\"+dateTimeSplit[4];\n\n startCal = DateTimeManager.convertAccessStringToCalendar(startDateTime);\n if(startCal == null){\n System.out.println(\"Invalid input! Please enter again!\");\n }\n if((endCal.before(startCal))||(endCal.equals(startCal)))\n System.out.println(\"Start access period can't be later than or equal to end access period!\");\n\n }while(endCal.before(startCal)||endCal.equals(startCal)||(startCal == null));\n\n break;\n case 2:\n do{\n System.out.println(\"Please enter end date and time (yyyy MM dd hh mm):\");\n endDateTime = sc.nextLine();\n while(!endDateTime.matches(\"^\\\\d{4} \\\\d{2} \\\\d{2} \\\\d{2} \\\\d{2}$\"))\n {\n System.out.println(\"Invalid input! Please enter again!\");\n System.out.println(\"Please enter end date and time (yyyy MM dd hh mm):\");\n endDateTime = sc.nextLine();\n }\n\n dateTimeSplit = endDateTime.split(\" \");\n endDateTime = dateTimeSplit[0]+\"-\"+dateTimeSplit[1]+\"-\"+dateTimeSplit[2]+\" \"+dateTimeSplit[3]+\":\"+dateTimeSplit[4];\n\n endCal = DateTimeManager.convertAccessStringToCalendar(endDateTime);\n if(endCal == null){\n System.out.println(\"Invalid input! Please enter again!\");\n }\n if((endCal.before(startCal))||(endCal.equals(startCal)))\n System.out.println(\"Start access period can't be later than or equal to end access period!\");\n }while(endCal.before(startCal)||endCal.equals(startCal)||(endCal == null));\n\n break;\n case 3:\n this.setStudAccPeriod();\n return;\n default:\n return;\n\n }\n adminManager.addAccessPeriod(startDateTime, endDateTime);\n System.out.println(\"\\nUpdate successfully!\\n\");\n\n }", "@Override\n\tpublic Long updateStartDate() {\n\t\treturn null;\n\t}", "public void setDepartureDate(Date departureDate);", "private void findStop(Airport departAPT, double distanceNeed, double maxRange){\n\t\t\tint stopIndex=-1;\r\n\t\t\tdouble stopDist=0;\r\n\t\t\tdouble stopToDestnDistance=999999999; //distance from depart to destination\r\n\t\t\tdouble startToStopDistance; //depart to stop distance\r\n\t\t\tdouble testDistance;\r\n\t\t\tString id;\r\n\r\n\t\t\tfor(int i=0; i<apt.size();++i){ //test every airport\r\n\t\t\t\t//cannot be destination or departing airport or dead end airport;\r\n\t\t\t\tid=apt.get(i).getID();\r\n\t\t\t\tif(id!=departAPT.getID() && id!=destnAPT.getID() && !deadEnd.contains(id)){\r\n\t\t\t\t\t//test avaliable fuel for this airplane type\r\n\t\t\t\t\tif(apt.get(i).getFuelType().contains(usePlane.getMatchType())){\r\n\t\t\t\t\t\tstartToStopDistance=findDistance(departAPT.getLat(),departAPT.getLon(),apt.get(i).getLat(),apt.get(i).getLon());\r\n\t\t\t\t\t\t//test if distance between depart and stop is in airplane's max travel range and if not same range as previous stop\r\n\t\t\t\t\t\tif(startToStopDistance<=maxRange && !stopAPTDist.contains(startToStopDistance)){\r\n\t\t\t\t\t\t\ttestDistance=findDistance(apt.get(i).getLat(),apt.get(i).getLon(),destnAPT.getLat(),destnAPT.getLon());\r\n\t\t\t\t\t\t\tif(testDistance<stopToDestnDistance){\r\n\t\t\t\t\t\t\t\tstopDist=startToStopDistance;\r\n\t\t\t\t\t\t\t\tstopIndex=i;\r\n\t\t\t\t\t\t\t\tstopToDestnDistance=testDistance;\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\tif(stopIndex!=-1){ //when stop is avaliable add this stop to info list\r\n\t\t\t\tstopAPT.add(apt.get(stopIndex));\r\n\t\t\t\tstopAPTDist.add(stopDist);\r\n\t\t\t\tif(stopToDestnDistance<=usePlane.getMaxRange()){ //if stop can reach destination, add final round and return to plan method\r\n\t\t\t\t\tstopAPT.add(destnAPT);\r\n\t\t\t\t\tstopAPTDist.add(findDistance(apt.get(stopIndex).getLat(),apt.get(stopIndex).getLon(),destnAPT.getLat(),destnAPT.getLon()));\r\n\t\t\t\t\tdeadEnd.clear();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse findStop(apt.get(stopIndex),stopToDestnDistance, usePlane.getMaxRange());\r\n\t\t\t}\r\n\t\t\telse { //when no stop is find, break the plan and clear everything\r\n\t\t\t\tif(stopAPT.isEmpty() || deadEnd.size()>5){\r\n\t\t\t\t\tstopAPT.clear();\r\n\t\t\t\t\tstopAPTDist.clear();\r\n\t\t\t\t\tdeadEnd.clear();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse{ //when stops routine cannot reach destination, clear all and start another path\r\n\t\t\t\tdeadEnd.add(departAPT.getID());\r\n\t\t\t\tstopAPT.clear();\r\n\t\t\t\tstopAPTDist.clear();\r\n\t\t\t\tif(startAPT.getFuelType().contains(usePlane.getMatchType())){\r\n\t\t\t\t\tfindStop(startAPT,dist,usePlane.getMaxRange());\r\n\t\t\t\t}else findStop(startAPT,dist,((fuelTank/usePlane.getFuelTank())*usePlane.getMaxRange()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t\t}", "public static void resetDates() {\n arrivalDate = LocalDate.now();\n departureDate = arrivalDate.plusDays(1);\n }", "protected void deadlineLeasing() {\n log.info(\"OrdersBean : deadlineLeasing\");\n List<OrdersEntity> ordersEntitiesDeadline = ordersServices.findAllOrdersByIdUserAndStatusIsValidate(usersBean.getUsersEntity().getId());\n if (!ordersEntitiesDeadline.isEmpty()) {\n contractsBean.findAllContractsInAllMyOrdersForLeasingAndDeadlineIsLowerThan1Month(ordersEntitiesDeadline);\n }\n }", "@Override\n\tpublic Long updateEndDate() {\n\t\treturn null;\n\t}", "private void calculateDepreciationAndCurrentValue(List<DepreciationInputs> depreciationInputsList,\n\t\t\tList<DepreciationDetail> depDetList, List<CurrentValue> currValList, Long fromDate, Long toDate) {\n\n\t\tdepreciationInputsList.forEach(a -> {\n\t\t\t// getting the amt to be depreciated\n\t\t\tBigDecimal amtToBeDepreciated = getAmountToBeDepreciated(a, fromDate, toDate);\n\n\t\t\t// calculating the valueAfterDepreciation\n\t\t\tBigDecimal valueAfterDep = a.getCurrentValue().subtract(amtToBeDepreciated);\n\n\t\t\t// adding the depreciation detail object to list\n\t\t\tdepDetList.add(DepreciationDetail.builder().assetId(a.getAssetId())\n\t\t\t\t\t.depreciationRate(a.getDepreciationRate()).depreciationValue(amtToBeDepreciated)\n\t\t\t\t\t.valueAfterDepreciation(valueAfterDep).valueBeforeDepreciation(a.getCurrentValue()).build());\n\n\t\t\t// adding currval to the currval list\n\t\t\tcurrValList.add(CurrentValue.builder().assetId(a.getAssetId()).assetTranType(TransactionType.DEPRECIATION)\n\t\t\t\t\t.currentAmount(valueAfterDep).transactionDate(toDate).tenantId(a.getTenantId()).build());\n\t\t});\n\t}", "public boolean DeleteDate(TimePeriod tp)\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"DELETE FROM Available WHERE available_hid = '\"+hid+\"' AND startDate = '\"+tp.stringStart+\"'\"\n\t\t\t\t\t+ \" AND endDate = '\"+tp.stringEnd+\"'\"; \n\t\t\tint result = con.stmt.executeUpdate(query); \t\n\t\t\t\n\t\t\tif(result > 0)\n\t\t\t{\n\t\t\t\tint index = -1; \n\t\t\t\tSystem.out.println(openDates.size()); \n\t\t\t\tfor(int k = 0; k < openDates.size(); k++)\n\t\t\t\t{\t\t\n\t\t\t\t\tif(openDates.get(k).stringStart.equals(tp.stringStart) && openDates.get(k).stringEnd.equals(tp.stringEnd))\n\t\t\t\t\t{\n\t\t\t\t\t\tindex = k; \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\topenDates.remove(index); \n\t\t\t\t\n\t\t\t\tcon.closeConnection();\n\t\t\t\treturn true; \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false; \n\t}", "@Override\n public PatientCaseDto updateByDoctor(PatientCaseDto patientCaseDto) {\n return null;\n }", "void unsetFoundingDate();", "public void setREQ_END_DATE(java.sql.Date value)\n {\n if ((__REQ_END_DATE == null) != (value == null) || (value != null && ! value.equals(__REQ_END_DATE)))\n {\n _isDirty = true;\n }\n __REQ_END_DATE = value;\n }", "public void generateImpatedRecords ()\r\n\t{\n\t\tRequest req = table.createRequest();\r\n\t\treq.setXPathFilter(path_to_id.format()+\"='\" + id +\"'\");\r\n\t\tRequestResult res = req.execute();\r\n\t\tshow(\"got results \" + res.getSize() );\r\n\t\tAdaptation ada = res.nextAdaptation();\r\n\t\tshow (\"STARTDATE: \" + startdate + \" ENDDATE: \" + enddate);\r\n\t\tshow(\"________________________________________________\");\r\n\t\twhile (ada!=null)\r\n\t\t{ \r\n\t\t\t\r\n\t\t\tDate adaStartDate = ada.getDate(path_to_start);\r\n\t\t\tDate adaEndDate = ada.getDate(path_to_end);\r\n\t\t\t//check im not me!\r\n\t\t\tif (!(ada.getOccurrencePrimaryKey().format().equals(newRecord.getOccurrencePrimaryKey().format())))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t// the record has been updated but date has not changed\r\n\t\t\t\tif (enddate!=null&&adaEndDate!=null&&(adaStartDate.equals(startdate)&&adaEndDate.equals(enddate)))\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tshow(\"The Record needs Spliting\");\r\n\t\t\t\t\trecordToSplit = ada;\r\n\t\t\t\t\tnewEndDate = addDays(startdate,-1);\r\n\t\t\t\t\tbeforeRecord = ada;\r\n\t\t\t\t\tnewStartDate = addDays(enddate,+1);\r\n\t\t\t\t\tafterRecord = ada;\r\n\t\t\t\t}\r\n\t\t\t\telse if (enddate!=null&&adaEndDate!=null&&(adaStartDate.before(startdate)&&adaEndDate.after(enddate)))\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\tshow(\"The Record needs Spliting\");\r\n\t\t\t\t\t\t\trecordToSplit = ada;\r\n\t\t\t\t\t\t\tnewEndDate = addDays(startdate,-1);\r\n\t\t\t\t\t\t\tbeforeRecord = ada;\r\n\t\t\t\t\t\t\tnewStartDate = addDays(enddate,+1);\r\n\t\t\t\t\t\t\tafterRecord = ada;\r\n\t\t\t\t\t\t}\r\n\t\t\t\telse if (adaStartDate == null && adaEndDate == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tshow (\"set end date on existing record\");\r\n\t\t\t\t\tbeforeRecord= ada;\r\n\t\t\t\t\tnewEndDate = addDays (startdate, -1);\r\n\t\t\t\t}\r\n\t\t\t\t\t\telse if (adaStartDate.before(startdate)&& adaEndDate==null)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tshow (\"set end date on existing record\");\r\n\t\t\t\t\t\t\tbeforeRecord= ada;\r\n\t\t\t\t\t\t\tnewEndDate = addDays (startdate, -1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\telse if (adaStartDate.before(startdate) && adaEndDate.after(startdate))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tshow (\"need to move existing end date\");\r\n\t\t\t\t\t\t\tbeforeRecord= ada;\r\n\t\t\t\t\t\t\tnewEndDate = addDays (startdate, -1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if (enddate!=null&&enddate==null&&adaStartDate.after(enddate))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tshow (\"need to end date new record\");\r\n\t\t\t\t\t\t\tbeforeRecord = newRecord;\r\n\t\t\t\t\t\t\tnewEndDate = addDays(adaStartDate, -1);\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\tada = res.nextAdaptation();\r\n\t}\r\n\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "void setTripDates(Calendar departureDate, Calendar arrivalDate);", "void aDayPasses(){\n\t\t\n\t\t/**\n\t\t * Modify wait time if still exists\n\t\t */\n\t\tif(!daysUntilStarts.equals(0)){\n\t\t\tdaysUntilStarts--;\n\t\t\tif((!hasInstructor() || getSize() == 0) && daysUntilStarts.equals(0)){\n\t\t\t\tif(hasInstructor())\n\t\t\t\t\tinstructor.unassignCourse();\n\t\t\t\tfor(Student student : enrolled){\n\t\t\t\t\tstudent.dropCourse();\n\t\t\t\t}\n\t\t\t\tsubject.unassign();\n\t\t\t\tinstructor = null;\n\t\t\t\tenrolled = new ArrayList<Student>();\n\t\t\t\tcancelled = true;\n\t\t\t} else if (daysUntilStarts.equals(0)) {\n\t\t\t\tsubject.unassign();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * Modify run time if still exists\n\t\t */\n\t\tif(!daysToRun.equals(0)){\n\t\t\tdaysToRun--;\n\t\t}\n\t\t/**\n\t\t * If couse finished un-assigned people from it\n\t\t */\n\t\tif(daysToRun.equals(0) && !finished){\n\t\t\tfor(Student student : enrolled){\n\t\t\t\tstudent.graduate(subject);\n\n\t\t\t}\n\t\t\tinstructor.unassignCourse();\n\t\t\tinstructor = null;\n\t\t\tfinished = true;\n\t\t}\n\t}", "OffsetDateTime stopDateTime();", "@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 }", "public void reset(){\r\n maxDate = null;\r\n minDate = null;\r\n }", "int updateNameIncludingDtNameEndDate(String cdNameSuffix, int idPerson, String indNameInvalid,\n String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle, int idName,\n Date lastUpdate);", "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 }", "public int removeHistory(String type, Date startDate, Date endDate);", "private void cleanSweep(){\n // Corrects the reminder dates for those reminders which will be repeating.\n refreshAllRepeatReminderDates();\n\n // Starts removing expired reminders.\n Calendar timeRightNow = Calendar.getInstance();\n boolean cleanList;\n for (int outerCounter=0; outerCounter<reminderItems.size();outerCounter++) {\n cleanList=true;\n for (int counter = 0; counter < reminderItems.size(); counter++) {\n int year = reminderItems.get(counter).getReminderYear();\n int month = reminderItems.get(counter).getReminderMonth();\n int day = reminderItems.get(counter).getReminderDay();\n int hour = reminderItems.get(counter).getReminderHour();\n int minute = reminderItems.get(counter).getReminderMinute();\n int second = 0;\n\n Calendar timeOfDeletion = Calendar.getInstance();\n timeOfDeletion.set(year, month, day, hour, minute, second);\n\n if (timeOfDeletion.before(timeRightNow)) {\n deleteReminderItem(counter);\n cleanList=false;\n break;\n }\n }\n if(cleanList){\n break;\n }\n }\n\n // Refreshes the reminder date descriptions (correcting \"Today\" and \"Tomorrow\" depending on the date).\n refreshAllDateDescriptions();\n }", "void removeProblem(String stopOrLineId, Date time) throws Exception;", "@Override\n\tpublic List<Discomfort> getDiscomfortData(String patientId, String start, String end) {\n\t\treturn null;\n\t}", "private List<LocalDate> getBackDatedEntitlementDates(List<LocalDate> newChildrenDatesOfBirth, LocalDate cycleStartDate) {\n LocalDate earliestDateOfBirth = min(newChildrenDatesOfBirth);\n LocalDate rollingEntitlementDate = cycleStartDate.minusDays(entitlementCalculationDurationInDays);\n List<LocalDate> backDatedEntitlementDates = new ArrayList<>();\n\n while (rollingEntitlementDate.isAfter(earliestDateOfBirth) || rollingEntitlementDate.isEqual(earliestDateOfBirth)) {\n backDatedEntitlementDates.add(rollingEntitlementDate);\n rollingEntitlementDate = rollingEntitlementDate.minusDays(entitlementCalculationDurationInDays);\n }\n\n return backDatedEntitlementDates;\n }", "private void makeSubPlan(Plan plan,Time currentTime,ArrayList<POI> POIs,Time timeEnd,Trip trip,Plan mPlan,boolean skip){\n if(mPlan!=null) \n plan.makeCalculations(trip.getStartTime(),trip.getEndTime(),mPlan.getFullCost(),mPlan);\n else\n plan.makeCalculations(trip.getStartTime(),trip.getEndTime(),0,mPlan);\n POI last=plan.getLastPOI();\n for(int i=0; i< POIs.size();i++){\n // Check if iam in Time range or not\n if(!currentTime.compare(timeEnd))\n break;\n else{\n if(canInsertLast(plan, POIs.get(i), trip, currentTime,mPlan,skip)){\n // update current time & plan\n Time from = new Time (0,0);\n Time to = new Time (0,0);\n if(last!=null){\n // cal travel time\n currentTime.add(last.getShortestPath(POIs.get(i).getId()));\n // cal waste time\n int x = Time.substract(currentTime, POIs.get(i).getOpenTime());\n if(skip&&x!=-1)\n currentTime.add(x);\n \n from.hour = currentTime.hour;\n from.min = currentTime.min;\n // cal poi duration \n currentTime.add(POIs.get(i).getDuration());\n to.hour = currentTime.hour;\n to.min = currentTime.min;\n }\n else{\n if(mPlan==null){\n int x = Time.substract(currentTime, POIs.get(i).getOpenTime());\n if(skip&&x!=-1)\n currentTime.add(x);\n from.hour = currentTime.hour;\n from.min = currentTime.min;\n currentTime.add(POIs.get(i).getDuration());\n to.hour = currentTime.hour;\n to.min = currentTime.min;\n }\n else{\n POI mLast = mPlan.getLastPOI();\n if(mLast!=null)\n currentTime.add(mLast.getShortestPath(POIs.get(i).getId()));\n int x = Time.substract(currentTime, POIs.get(i).getOpenTime());\n if(skip&&x!=-1)\n currentTime.add(x);\n from.hour = currentTime.hour;\n from.min = currentTime.min;\n currentTime.add(POIs.get(i).getDuration());\n to.hour = currentTime.hour;\n to.min = currentTime.min;\n }\n }\n plan.insert(POIs.get(i), plan.getNOV(),from,to,null);\n if(mPlan!=null)\n plan.makeCalculations(trip.getStartTime(), trip.getEndTime(),mPlan.getFullCost(),mPlan);\n else\n plan.makeCalculations(trip.getStartTime(),trip.getEndTime(),0,mPlan);\n last=POIs.get(i);\n // Remove poi from POIs\n POIs.remove(i);\n i--;\n }\n }\n }\n }", "abstract public void setServiceAppointment(Date serviceAppointment);", "public static void updateDept() {\n\t}", "public Doctor editProfile(Doctor currentDoctor) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint docID = currentDoctor.getDocID();\n\t\tString doctorName = currentDoctor.getName();\n\t\tString docBirthDate = currentDoctor.getBirthDate();\n\t\tString docSSN = currentDoctor.getSSN();\n\t\t\n\t\tDoctor updatedDoctor = currentDoctor;\n\t\t\n\t\tSystem.out.println(\"\\t1. Name: \" + doctorName + \"\\n\\t2. Birthday: \" + docBirthDate + \"\\n\\t3. SSN: \" + docSSN);\n\t\tSystem.out.println(\"What would you like to edit? (input an integer to select)\");\n \t String selectedInput = input.next();\n \twhile (!selectedInput.matches(\"([1-3])\")) {\n \tSystem.out.println(\"\\n** Incorrect input. Please try again. **\");\n \t\tSystem.out.println(\"What would you like to edit? (input an integer to select)\");\n\t \tselectedInput = input.next();\n \t}\n\t \n\t try {\n\t \tswitch(selectedInput) {\n\t \t \tcase \"1\"://name\n\t \t \t\tSystem.out.println(\"Current Name: \" + doctorName);\n\t \t \t\tSystem.out.println(\"Please enter new doctor name: \");\n\t \t \t\tinput.nextLine();\n\t \t \t\tdoctorName = input.nextLine();\n\t \t \t\twhile (!doctorName.matches(\"([a-zA-Z.\\\\s]+)\")) {\n\t \t \t\t\tSystem.out.println(\"\\n** Incorrect input. Please try again. **\");\n\t\t \t \t\tSystem.out.println(\"Please enter new doctor name: \");\n\t\t \t \t\tdoctorName = input.nextLine();\n\t \t \t\t}\n\t \t \t\tupdatedDoctor.setName(doctorName);\n\t \t \t\tbreak;\n\t \t \tcase \"2\"://birthday\n\t \t \t\tSystem.out.println(\"Current Birthday: \" + docBirthDate);\n\t \t \t\tSystem.out.println(\"Please enter birthday: (in the form YYYY-MM-DD)\");\n\t \t \t\tinput.nextLine();\n\t \t \t\tString doctorBirthDate = input.nextLine();\t\n\t \t \t\t//add error checking for making sure dates are current\n\t \t \t\twhile (!doctorBirthDate.matches(\"(\\\\d{4}-\\\\d{2}-\\\\d{2})\")) {\n\t \t \t\t\tSystem.out.println(\"\\n** Incorrect input. Please try again. **\");\n\t \t \t\t\tSystem.out.println(\"Please enter birthday: (in the form YYYY-MM-DD)\");\n\t \t \t\t\tdoctorBirthDate = input.nextLine();\n\t \t \t\t}\n\t \t \t\tupdatedDoctor.setBirthDate(doctorBirthDate);\n\t \t \t\tbreak;\n\t \t \tcase \"3\"://ssn\n\t \t \t\tSystem.out.println(\"Current SSN: \" + docSSN);\n\t \t \t\tSystem.out.println(\"What would you like to change it to?\");\n\t \t \t\tinput.nextLine();\n\t \t \t\tdocSSN = input.nextLine();\n\t \t \t\twhile (!docSSN.matches(\"(\\\\d{3}-\\\\d{2}-\\\\d{4})\")){\n\t \t \t\t\tSystem.out.println(\"\\n** Incorrect input. Please try again. **\");\n\t \t \t\t\tSystem.out.println(\"Please enter SSN: (in the following format '###-##-####')\");\n\t \t \t\t\tdocSSN = input.next();\n\t \t \t\t}\n\t \t \t\tupdatedDoctor.setSSN(docSSN);\n\t \t \t\tbreak;\n\t \t \tdefault:\n\t \t \t\tSystem.out.println(\"Sorry, you did not enter a valid option. Bye.\");\n\t \t }\n\t }\n\t catch(Exception e) {\n\t \tSystem.out.println(e);\n\t }\n\t\t\n\t\treturn updatedDoctor;\n\t}", "private PtoPeriodDTO deductTimeOff(PtoPeriodDTO init) {\n\t\tLong totalRequestedHours = (long) 0;\n\t\t\n\t\tList<PtoRequest> ptoRequests = ptoRequestRepository.findPtoRequestsForEmployee(init.getEmployeeId());\n\t\tfor(PtoRequest p : ptoRequests){\n\t\t\ttotalRequestedHours += p.getHoursRequested();\n\t\t}\n\t\t\n\t\tinit.setHoursRemaining(init.getHoursAllowed() - totalRequestedHours);\n\t\t\n\t\t//Also change the accrued hours to reflect this:\n\t\tLong updateAccrued = init.getHoursAccrued() - totalRequestedHours;\n\t\tinit.setHoursAccrued(updateAccrued);\n\t\t\n\t\treturn init;\n\t}", "void unsetSearchRecurrenceStart();", "public void compareStartEndDate() {\n String[] startDateArray = startDate.split(dateOperator);\n String[] endDateArray = endDate.split(dateOperator);\n \n // Compares year first, then month, and then day.\n if (Integer.parseInt(startDateArray[2]) > Integer.parseInt(endDateArray[2])) {\n endDate = endDateArray[0] +\"/\"+ endDateArray[1] +\"/\"+ startDateArray[2];\n } else if (Integer.parseInt(startDateArray[2]) == Integer.parseInt(endDateArray[2])) {\n if (Integer.parseInt(startDateArray[1]) > Integer.parseInt(endDateArray[1])) {\n endDate = endDateArray[0] +\"/\"+endDateArray[1] +\"/\"+(Integer.parseInt(startDateArray[2])+1);\n } else if (Integer.parseInt(startDateArray[1]) == Integer.parseInt(endDateArray[1]) && \n Integer.parseInt(startDateArray[0]) > Integer.parseInt(endDateArray[0])) {\n endDate = endDateArray[0] +\"/\"+endDateArray[1] +\"/\"+(Integer.parseInt(startDateArray[2])+1);\n }\n }\n }", "public void checkOutAttendance(Date d, String staffID) {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date date = Calendar.getInstance().getTime();\n Timestamp ts = new Timestamp(date.getTime());\n AttendanceRecord ar = new AttendanceRecord();\n\n for(AttendanceRecord a:arDao.findByStaff(sDao.findByStaffId(staffID).get(0)) ){\n if(df.format(a.getDate()).equals(df.format(d)) ){\n ar = a;\n }\n }\n\n ar.setCheckOutTime(ts);\n arDao.save(ar);\n }", "private void updateMonitorsForDeparture(int trainNumber,String departureStation,Date departureTime) throws MetroSystemDaoException, ServiceValidationException{\n\t\tTrainJourneyMonitorDTO departureStationMonitor = trainJourneyMonitorDao.queryMonitorForStation(trainNumber, departureStation);\n\t\tif(departureTime.compareTo(departureStationMonitor.getScheduledDepartureTime()) < 0){\n\t\t\tthrow new ServiceValidationException(\"Train cannot depart from station \" + departureStation + \" before scheduled departure time: \" + \n\t\t departureStationMonitor.getScheduledDepartureTime());\n\t\t}\n\t\tdepartureStationMonitor.setCurrentStationFlag(\"N\");\n\t\tdepartureStationMonitor.setActualDepartureTime(departureTime);\n\t\ttrainJourneyMonitorDao.update(departureStationMonitor);\n\t\t\n\t\tlong delay = getDateDifference(departureTime,departureStationMonitor.getScheduledDepartureTime(), TimeUnit.MILLISECONDS);\n\t\tif(delay > 0){\n\t\t\t//Get the monitors for stations after departure station and update their scheduled arrival times and departure times accordingly\n\t\t\tList<TrainJourneyMonitorDTO> monitors = trainJourneyMonitorDao.queryMonitorsForNextStations(trainNumber, departureStation);\n\t\t\tupdateNextStationsMonitors(monitors, delay);\n\t\t}\n\t\t\n\t}", "public void setDEPARTURE_FROM_LOC_DATE(java.sql.Date value)\n {\n if ((__DEPARTURE_FROM_LOC_DATE == null) != (value == null) || (value != null && ! value.equals(__DEPARTURE_FROM_LOC_DATE)))\n {\n _isDirty = true;\n }\n __DEPARTURE_FROM_LOC_DATE = value;\n }", "public void removeFromReminders(Date reminders);", "@Override\n public Set PatientsOlderThenEnlistedAfter() {\n Set<Patient> patients = new HashSet<>();\n patientRepository.findAll().forEach(patients::add);\n Set<Patient>olderThanEnlistedSince = new HashSet<>();\n if(patients != null)\n {\n patients.forEach((patient) ->\n {\n if(patient.getAge() > 21 && patient.getEnlistmentDate().after(new Date(01-01-2020))){\n olderThanEnlistedSince.add(patient);\n }else {\n System.out.println(\"No patients older than 21 enlisted after 1.1.2020.\");\n }\n });\n }\n\n return olderThanEnlistedSince;\n }", "private void checkReservationValidityAndRemove(){\n\t\t\n\t\tfor (Reservation r: reservationArray){\n\t\t\tif (r.getBookingDateAndTime().get(Calendar.DAY_OF_MONTH)==Calendar.getInstance().get(Calendar.DAY_OF_MONTH)){\n\t\t\t\tif (r.getBookingDateAndTime().get(Calendar.MONTH)==Calendar.getInstance().get(Calendar.MONTH)){\n\t\t\t\t\tif (r.getBookingDateAndTime().get(Calendar.HOUR_OF_DAY)==Calendar.getInstance().get(Calendar.HOUR_OF_DAY)){\n\t\t\t\t\t\tif (r.getBookingDateAndTime().get(Calendar.MINUTE) > 30 + r.getBookingDateAndTime().get(Calendar.MINUTE) ){\n\t\t\t\t\t\t\treservationArray.remove(r);\n\t\t\t\t\t\t\ttablemanager.increaseAvailable();;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void toPunish() {\n\n //// TODO: 24/03/2017 delete the following lines\n// dalDynamic.addRowToTable2(\"23/03/2017\",\"Thursday\",4,walkingLength,deviation)\n\n\n\n int dev,sum=0;\n long id;\n id=dalDynamic.getRecordIdAccordingToRecordName(\"minutesWalkTillEvening\");\n Calendar now = Calendar.getInstance();//today\n Calendar calendar = Calendar.getInstance();\n SimpleDateFormat dateFormat=new SimpleDateFormat(\"dd/MM/yyyy\");\n String date;\n for (int i = 0; i <DAYS_DEVIATION ; i++) {\n date=dateFormat.format(calendar.getTime());\n Log.v(\"Statistic\",\"date \"+date);\n dev = dalDynamic.getDeviationAccordingToeventTypeIdAnddate(id,date);\n sum+=dev;\n calendar.add(Calendar.DATE,-1);//// TODO: -1-i????\n }\n if(sum==DAYS_DEVIATION){\n Intent intent = new Intent(context,BlankActivity.class);\n context.startActivity(intent);\n //todo:punishment\n }\n\n }", "@Override\n public void clear() {\n date1 = Long.MIN_VALUE;\n date2 = Long.MIN_VALUE;\n }", "@Test\n public void getShiftsByDate(){\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n employeeResource.createEmployee(new Employee(\"dummy3\",\"dummy3\",\"dummy3\",\"dummy3\",\"dummy3\", 1));\n\n assertNotNull(shiftListFunctionResource.getShiftsByDate(\"2017-01-01\"));\n\n //clean up\n employeeResource.removeEmployee(\"dummy3\");\n shiftListResource.removeShiftlist(new Date(2017-01-01),1,\"dummy3\");\n userDAO.removeUser((\"dummy3\"));\n\n }", "@Test\r\n public void testCalculDureeEffectiveLocation() {\r\n LocalDate date1 = LocalDate.parse(\"2018-04-02\");\r\n LocalDate date2 = LocalDate.parse(\"2018-04-10\");\r\n\r\n int res1 = DateUtil.calculDureeEffectiveLocation(Date.from(date1.atStartOfDay(ZoneId.systemDefault()).toInstant()),\r\n Date.from(date2.atStartOfDay(ZoneId.systemDefault()).toInstant()));\r\n assertEquals(7, res1);\r\n\r\n date1 = LocalDate.parse(\"2018-01-10\");\r\n date2 = LocalDate.parse(\"2018-01-17\");\r\n\r\n int res2 = DateUtil.calculDureeEffectiveLocation(Date.from(date1.atStartOfDay(ZoneId.systemDefault()).toInstant()),\r\n Date.from(date2.atStartOfDay(ZoneId.systemDefault()).toInstant()));\r\n assertEquals(5, res2);\r\n\r\n date1 = LocalDate.parse(\"2018-04-30\");\r\n date2 = LocalDate.parse(\"2018-05-09\");\r\n\r\n int res3 = DateUtil.calculDureeEffectiveLocation(Date.from(date1.atStartOfDay(ZoneId.systemDefault()).toInstant()),\r\n Date.from(date2.atStartOfDay(ZoneId.systemDefault()).toInstant()));\r\n assertEquals(6, res3);\r\n }", "public void updateDoctor() {\n\n\t\tSystem.out.println(\"\\n----Update Doctor----\");\n\t\tSystem.out.print(\"\\nEnter Doctor Id : \");\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString did = sc.nextLine();\n\n\t\tMap<String, String> map = null;\n\t\ttry {\n\t\t\tmap = doctorDao.searchById(did);\n\t\t} catch (SQLException e) {\n\t\t\tlogger.info(e.getMessage());\n\t\t\treturn;\n\t\t}\n\n\t\tif (map == null || map.size() == 0) {\n\t\t\tlogger.info(\"Doctor Not Found!\");\n\t\t} else {\n\n\t\t\tprintPreviousDataOfDoctor(map);\n\n\t\t\tSystem.out.print(\"\\nEnter New Doctor Name : \");\n\t\t\tmap.put(\"dname\", sc.nextLine());\n\t\t\tSystem.out.print(\"\\nEnter New Doctor Speciality : \");\n\t\t\tmap.put(\"speciality\", sc.nextLine());\n\n\t\t\ttry {\n\t\t\t\tif (doctorDao.update(map) > 0) {\n\t\t\t\t\tlogger.info(\"Data Update Successfully...\");\n\t\t\t\t} else {\n\t\t\t\t\tlogger.info(\"Data update unsucessful!\");\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.info(e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testChangeReservationEndWithNullDate() throws Exception {\n\t\tReservation res1 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), validStartDate,\n\t\t\t\tvalidEndDate);\n\n\t\tbookingManagement.changeReservationEnd(res1.getId(), null);\n\t}", "public Calendar setReservationDate(){\n\t\t\n\t\t\n\t\tint currentMonth = Calendar.getInstance().get(Calendar.MONTH)+1; //Month starts from zero in Java\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint currentDate = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);\n\t\tint currentHour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\n\t\tint currentMinute = Calendar.getInstance().get(Calendar.MINUTE);\n\t\t\n\t\t\n\t\tSystem.out.println(\"Current Year \"+ currentYear );\n\t\tSystem.out.println(\"Current Month \"+ currentMonth );\n\t\tSystem.out.println(\"Today's date \"+ currentDate );\n\t\tSystem.out.println(\"Current Hour \"+ currentHour );\n\t\tSystem.out.println(\"Current Minute \"+ currentMinute );\n\t\tSystem.out.println(\"\\t---\\t---\\t---\\t---\\t---\");\n\t\tint inputMonth, inputYear, inputDate, inputHour, inputMinute;\n\t\t\n\t\tCalendar reserveDate = Calendar.getInstance();\n\t\t\n\t\tSystem.out.print(\"Enter the year: \");\n\t\tinputYear = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile( inputYear < currentYear){\n\t\t\tSystem.out.println(\"Old year entry is not allowed !\\n\");\n\t\t\tSystem.out.print(\"Enter the year: \");\n\t\t\tinputYear = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\t\n\t\treserveDate.set(Calendar.YEAR,inputYear); \n\t\n\t\tSystem.out.print(\"Enter the month: \");\n\t\tinputMonth = scan.nextInt();\t\n\t\tscan.nextLine();\n\t\t\n\t\twhile (inputMonth < 1 || inputMonth > 12){\n\t\t\tSystem.out.println(\"Invalid Month entry!\");\n\t\t\tSystem.out.print(\"Enter the month again: \");\n\t\t\tinputMonth = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile((inputMonth < currentMonth) && (inputYear == currentYear)){\n\t\t\t\t\t\n\t\t\tSystem.out.println(\"Old month entry is not allowed !\\n\");\n\t\t\tSystem.out.print(\"Enter the month: \");\n\t\t\tinputMonth = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t\t\n\t\t}\n\t\treserveDate.set(Calendar.MONTH,inputMonth-1);//MONTH is from 0 to 11.\n\t\t\n\t\tSystem.out.print(\"Enter the date for reservation: \");\n\t\tinputDate = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile( inputDate < 1 || inputDate > 31){\n\t\t\tSystem.out.println(\"Invalid date entry!\");\n\t\t\tSystem.out.print(\"Enter the date again: \");\n\t\t\tinputDate = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile((inputDate < currentDate) && (inputMonth == currentMonth)&&(inputYear==currentYear)){\n\t\t\tSystem.out.println(\"Past Day is not allowed!\\n\");\n\t\t\tSystem.out.print(\"Enter the date for reservation: \");\n\t\t\tinputDate = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\treserveDate.set(Calendar.DAY_OF_MONTH,inputDate);\n\t\t\n\t\tSystem.out.print(\"Enter hour (24-hr format): \");\n\t\tinputHour = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile( inputHour < 0 || inputHour > 23){\n\t\t\tSystem.out.println(\"Invalid hour entry!\");\n\t\t\tSystem.out.print(\"Enter the hour again: \");\n\t\t\tinputHour = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile(inputHour < currentHour && inputDate == currentDate&&inputMonth == currentMonth&&inputYear==currentYear){\n\t\t\t\n\t\t\tif (inputHour < 0 && inputHour > 23){\n\t\t\t\tSystem.out.println(\"Invalid Hour entry\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Past hour is not allowed!\\n\");\n\t\t\t\tSystem.out.print(\"Enter hour (24-hr format): \");\n\t\t\t\tinputHour = scan.nextInt();\n\t\t\t\tscan.nextLine();\n\t\t\t}\n\t\t}\n\t\treserveDate.set(Calendar.HOUR_OF_DAY,inputHour); //This uses 24 hour clock\n\t\t\n\t\tSystem.out.print(\"Enter minute: \");\n\t\tinputMinute = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile(inputMinute < 0 || inputMinute > 59){\n\t\t\tSystem.out.println(\"Invalid Minute entry\");\n\t\t\tSystem.out.print(\"Enter minute again: \");\n\t\t\tinputMinute = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile((inputMinute-currentMinute) <= 0 && inputHour == currentHour){\n\t\t\t\n\t\t\t//System.out.println(\"Reservation can only be made 30 minutes earlier or invalid input !\");\n\t\t\tSystem.out.print(\"Invalid minute\");\n\t\t\tSystem.out.print(\"Enter minute again: \");\n\t\t\tinputMinute = scan.nextInt();\t\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\treserveDate.set(Calendar.MINUTE,inputMinute);\n\t\tSystem.out.println(\"Date Reserved!\");\n\t\treturn reserveDate;\n\t}", "public void calculateVacationDays(){\n }", "public void removeByTodoDateTime(Date todoDateTime);", "public void calculateTimeDifferences() {\n\n findExits();\n\n try {\n\n\n if (accumulate.size() > 0) {\n\n for (int i = 1; i < accumulate.size() - 1; i++) {\n if (accumulate.get(i).value > accumulate.get(i - 1).value\n && timeOfExists.size() > 0) {\n\n double timeOfEntry = accumulate.get(i).timeOfChange;\n double timeOfExit = timeOfExists.get(0);\n\n timeOfExists.remove(timeOfExit);\n timeOfChanges.add(timeOfExit - timeOfEntry);\n }\n\n }\n }\n } catch (IndexOutOfBoundsException exception) {\n LOG_HANDLER.logger.severe(\"calculateTimeDifferences \"\n + \"Method as thrown an OutOfBoundsException: \"\n + exception\n + \"Your timeOfChanges seems to be null\");\n }\n }", "private void getDetailedDebitAgingDATE(List<DebtorsDetailedAgingHelper> agingList, Date atDate, EMCUserData userData) {\n getDetailedDebitAgingNONE(agingList, atDate, userData);\n\n for (DebtorsDetailedAgingHelper agingHelper : agingList) {\n//Lines to be removed from aging helper. (Transactions allocated in full) These should be ignored while processing.\n//List<DebtorsDetailedAgingLineDS> toRemove = new ArrayList<DebtorsDetailedAgingLineDS>();\n\n//Get all debit and credit transactions in date range and allocate. Allocate credits to debits.\n//The list of aging lines will be ordered by date.\ncredit: for (DebtorsDetailedAgingLineDS agingLine : agingHelper.getAgingLines()) {\n if (agingLine.getAmount().compareTo(BigDecimal.ZERO) < 0 && agingLine.getBalance().compareTo(BigDecimal.ZERO) != 0) {\n DebtorsDetailedAgingLineDS credit = agingLine;\n\n//Loop again, looking for debits\ndebit: for (DebtorsDetailedAgingLineDS otherAgingLine : agingHelper.getAgingLines()) {\n if (otherAgingLine.getAmount().compareTo(BigDecimal.ZERO) < 0 && otherAgingLine.getBalance().compareTo(BigDecimal.ZERO) != 0) {\n DebtorsDetailedAgingLineDS debit = otherAgingLine;\n\n //Get difference between debit and credit balances.\n BigDecimal difference = debit.getBalance().add(credit.getBalance());\n if (difference.compareTo(BigDecimal.ZERO) > 0) {\n //Debit greater than credit. Allocate credit in full.\n credit.setBalance(BigDecimal.ZERO);\n debit.setBalance(debit.getBalance().add(credit.getBalance()));\n\n //toRemove.add(credit);\n\n //Credit consumed. Continue outer loop.\n continue credit;\n } else if (difference.compareTo(BigDecimal.ZERO) < 0) {\n //Credit greater than debit.\n debit.setBalance(BigDecimal.ZERO);\n credit.setBalance(credit.getBalance().subtract(debit.getBalance()));\n\n //toRemove.add(debit);\n\n //Debit consumed\n continue;\n } else {\n //Debit == credit. Consume both.\n debit.setBalance(BigDecimal.ZERO);\n credit.setBalance(BigDecimal.ZERO);\n\n //toRemove.add(credit);\n //toRemove.add(debit);\n\n //Credit consumed. Continue outer loop.\n continue credit;\n }\n } else {\n //Credit, continue to next line.\n continue;\n }\n }\n } else {\n //Debit, continue to next line\n continue;\n }\n }\n\n //Remove balanced lines.\n //agingHelper.getAgingLines().removeAll(toRemove);\n }\n }", "private void setComputedDatesForLeaveTypes(String leaveDates,float totalDays, float lwp,List<String> dateTokensList) {\n\t\t //computing dates for one page leave history report\n\t\t // String leaveDates=entity.getLeaveDates();\n\t\t String leaveDatesToken[]=leaveDates.split(\",\");\n\t\t //handle dates for Leaves first.\n\t\t float totaLeavesType=totalDays-lwp;//3.5 and lwp=1.5\n\t\t int totalLeaveCount=(int)Math.ceil(totaLeavesType);\n\t\t int totalLeaveLessCount=(int)Math.floor(totaLeavesType);\n\t\t StringBuilder compDateBuilder=new StringBuilder();\n\t\t for(int x=0;x<totalLeaveCount;x++) {\n\t\t\t String compDate=leaveDatesToken[x];\n\t\t\t String dd=compDate.split(\"-\")[2];\n\t\t\t if((x+1)==totalLeaveCount) { //last date\n\t\t\t \t if(totalLeaveCount>totalLeaveLessCount){\n\t\t\t \t \t//float tempLeave=totalLeaveCount-totaLeavesType;\n\t\t\t \t\t float tempLeave=(float)(totaLeavesType - Math.floor(totaLeavesType)); \n\t\t\t \t\t compDateBuilder.append(dd+\"(\"+tempLeave+\"),\");\n\t\t\t \t } else{\n\t\t\t \t \t compDateBuilder.append(dd+\"(1),\");\n\t\t\t \t }\n\t\t\t }else {\n\t\t\t \tcompDateBuilder.append(dd+\"(1),\");\n\t\t\t }\n\t\t }\n\t\t //handle dates for LWP.\n\t\t int totalLwpCount=(int)Math.ceil(lwp);\n\t\t int totalLwpLessCount=(int)Math.floor(lwp);\n\t\t //float \n\t\t //5->>2\n\t\t StringBuilder compLwpDateBuilder=new StringBuilder();\n\t\t for(int x=leaveDatesToken.length-totalLwpCount;x<leaveDatesToken.length;x++) {\n\t\t\t String compDate=leaveDatesToken[x];\n\t\t\t String dd=compDate.split(\"-\")[2];\n\t\t\t if(compDateBuilder.toString().length()==0 && ((x+1)==leaveDatesToken.length)) {\n\t\t\t \t if(totalLwpCount>totalLwpLessCount){\n\t\t\t \t \t float templwp=totalLwpCount-lwp;\n\t\t\t \t \t compLwpDateBuilder.append(dd+\"(\"+templwp+\"),\");\n\t\t\t \t }else{\n\t\t\t \t \t compLwpDateBuilder.append(dd+\",\");\n\t\t\t \t } \n\t\t\t }\n\t\t\t else if(compDateBuilder.toString().length()>0 && x==(leaveDatesToken.length-totalLwpCount)) { //first date\n\t\t\t \t if(totalLwpCount>totalLwpLessCount){\n\t\t\t \t \t //float templwp=totalLwpCount-lwp;\n\t\t\t \t \t float templwp=(float)(lwp - Math.floor(lwp)); \n\t\t\t \t \t compLwpDateBuilder.append(dd+\"(\"+templwp+\"),\");\n\t\t\t \t }else{\n\t\t\t \t \t compLwpDateBuilder.append(dd+\"(1),\");\n\t\t\t \t }\n\t\t\t }else {\n\t\t\t \t compLwpDateBuilder.append(dd+\"(1),\");\n\t\t\t }\n\t\t }\n\t\t dateTokensList.add(compDateBuilder.toString());\n\t\t dateTokensList.add(compLwpDateBuilder.toString());\n\t}", "private int beforeNowAfter(Date lectureDate, int start, int end){\n Date now = new Date();\n if(lectureDate.getYear()<now.getYear()){\n return 0;\n }else if(lectureDate.getYear()>now.getYear()){\n return 2;\n }else{\n if(lectureDate.getMonth()<now.getMonth()){\n return 0;\n }else if(lectureDate.getMonth()>now.getMonth()){\n return 2;\n }else{\n if(lectureDate.getDate()<now.getDate()){\n return 0;\n }else if(lectureDate.getDate()>now.getDate()){\n return 2;\n }else{\n if(end==now.getHours()&&now.getMinutes()>15){ //Lectures end officially after 15min past the end hour.\n return 0;\n }else if(end<now.getHours()){\n return 0;\n }else if(start>now.getHours()){\n return 2;\n }else{\n return 1;\n }\n }\n }\n }\n }", "@Test\n public void getShiftListByDate(){\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n\n assertNotNull(shiftListResource.getShiftListsByDate(new Date(2017-01-01)));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01),1,\"dummy3\");\n userDAO.removeUser((\"dummy3\"));\n\n }", "@Override\n public void removeCheckInDates() {\n\n List<String> theDatesToRemove = new ArrayList<>(checkInTimeList.getSelectedValuesList());\n DefaultListModel theModel = (DefaultListModel)checkInTimeList.getModel();\n \n //Remote the dates\n for( String aStr : theDatesToRemove )\n theModel.removeElement(aStr); \n \n }", "@Test\n public void getShiftListByDateAndId(){\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n\n assertNotNull(shiftListResource.getShiftListsByDateAndShiftId(\"2017-01-01\",1));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01),1,\"dummy3\");\n userDAO.removeUser((\"dummy3\"));\n\n }", "protected void deletePlannedCalendar(PlannedCalendar calendar) {\n deleteEpochs(calendar.getEpochs());\n }", "public Appointment assignDoctorToAppt(Appointment currentAppt, Doctor currentDoctor) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint apptID = currentAppt.getApptID();\n\t\tString apptDate = currentAppt.getDate();\n\t\tString apptTime = currentAppt.getTime();\n\t\tString apptNotes = currentAppt.getNotes();\n\t\tString preferredDoc = currentAppt.getPreferredDoc();\n\t\tAppointment updatedAppt = currentAppt;\n\t\tDoctor currentDoc = currentDoctor;\n\t\t\n\t\ttry {\n System.out.println(\"Appt ID: \" + apptID + \"\\n\\t1. Appt Date: \" + apptDate + \"\\n\\t2. Appt Time: \" + apptTime + \"\\n\\t3. Appt Notes: \" + apptNotes+ \"\\n\\t4. Preferred Doctor: \" + preferredDoc);\n \t\tpreferredDoc = currentDoc.getName();\n \t\tSystem.out.println(\"The new preferred doctor is: \" + preferredDoc);\n updatedAppt.setPreferredDoc(preferredDoc);\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn updatedAppt;\n\t}", "@Test\n public void testRemoveEventConvinienceMethod() {\n // Start and end dates to query for\n java.util.Calendar cal = getInstance();\n Date start = cal.getTime();\n cal.add(MONTH, 1);\n Date end = cal.getTime();\n // Ensure no events\n Assert.assertEquals(0, calendar.getEvents(start, end).size());\n // Add an event\n CalendarEvent event = new BasicEvent(\"Test\", \"Test\", start);\n calendar.addEvent(event);\n // Ensure event exists\n Assert.assertEquals(1, calendar.getEvents(start, end).size());\n // Remove event\n calendar.removeEvent(event);\n // Ensure no events\n Assert.assertEquals(0, calendar.getEvents(start, end).size());\n }", "@Override\n\tpublic Patientstreatments ubdatepatienttreat(patienttreatmentDto ptd, int id) {\n\t\tPatientstreatments pt=patreatrep.findById(id).orElseThrow(()->\n\t\t\t\tnew DataNotFoundException(\"patienttreatments with id \" + id + \" not found\") );\n\t\tpt.setOther_Details(ptd.getOtherdetails());\n\n\t\tPatients pp = new Patients();\n\t\t//pp.setDateOfbirth(ptd.getDateOfbirth());\n\t\tpt.setPatient(pp);\n\n\t\tTreatments treat = new Treatments();\n\t\ttreat.setTreatmentcost(ptd.getTreatmentcost());\n\t\ttreat.setMedicationorsugery(ptd.getMedicationorsugery());\n\t\ttreat.setOtherdetails(ptd.getOtherdetails());\n\t\tpt.setTreatment(treat);\n\n\t\tRefcalendar cal = new Refcalendar();\n\t\tcal.setDay_Date_Time(ptd.getDay_Date_Time());\n\t\tcal.setDay_Number(ptd.getDay_Number());\n\t\tpt.setRefCalendar(cal);\n\n\t\tHelpscore help = new Helpscore();\n\t\thelp.setHelp_Score(ptd.getHelp_Score());\n\t\tpt.setHelpScore(help);\n\n\t\tSideeffectscores side = new Sideeffectscores();\n\t\tside.setSide_Effect_Score(ptd.getSide_Effect_Score());\n\t\tpt.setSideEffectScore(side);\n\n\t\treturn patreatrep.save(pt);\n\t}", "public void updateView() {\n// LocalDate startDate = LocalDate.of(2017, Month.SEPTEMBER, 1);\n// LocalDate endDate = LocalDate.of(2017, Month.SEPTEMBER, 6);\n// getRecords(startDate, endDate);\n }", "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 }", "private void verifyPeriod(Date start, Date end){\n List dates = logRepositoy.findAllByDateGreaterThanEqualAndDateLessThanEqual(start, end);\n if(dates.isEmpty()){\n throw new ResourceNotFoundException(\"Date range not found\");\n }\n }", "public static void promptDate(ArrayList<Task> taskList) {\n String prompt = \"change the date of\"; // initializing the prompt to the user\n Task task; // declaring the task variable for date changing\n int index = promptIndex(taskList, prompt); // prompting, receiving, and error checking the user's input\n if (index != -1) { // if the index exists\n task = taskList.get(index); // assigning the variable pointer to the task at this index\n // declaring the integer variables for the month, day, and year numbers\n int month; // month number\n int day; // day number\n int year; // year number\n // month prompting and error checking\n do { // error checking for correct month value\n System.out.print(\"Enter valid month #: \"); // prompting the user for month number\n month = input.nextInt(); // receiving the user's input for month\n input.nextLine(); // preventing the nextInt/nextLine error\n } while (month < 1 || month > 12); // while the user does not enter a valid input for month\n // year prompting and error checking\n do {\n System.out.print(\"Enter valid year #: \"); // prompting the user for year number\n year = input.nextInt(); // receiving the user's input for year\n input.nextLine(); // preventing the nextInt/nextLine error\n } while (year < 0); // while the user does not enter a valid input for day\n // day prompting and error checking\n do { // error checking for correct day value\n System.out.print(\"Enter valid day #: \"); // prompting the user for day number\n day = input.nextInt(); // receiving the user's input for day\n input.nextLine(); // preventing the nextInt/nextLine error\n } while (day > checkDaysInMonth(month, year) || day <= 0); // while the user does not enter a valid input for day\n String formattedDate = String.format(\"%02d/%02d/%04d\", month, day, year); // formatting the date into String format of mm/dd/yyyy\n task.setDate(formattedDate); // setting the date of the Task object\n } \n System.out.print(\"\\n\"); // printing a newline for formatting\n pause(); // pausing the screen\n }", "public void updateAttendance(Date date);", "@Test\n public void testStartAndEndDateChange() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n Calendar date = Calendar.getInstance();\n date.setTimeInMillis(date.getTimeInMillis() + TimeUnit.HOURS.toMillis(2));\n deltaEvent.setStartDate(DateTimeUtil.getDateTime(date));\n date.setTimeInMillis(date.getTimeInMillis() + TimeUnit.HOURS.toMillis(2));\n deltaEvent.setEndDate(DateTimeUtil.getDateTime(date));\n\n updateEventAsOrganizer(deltaEvent);\n\n /*\n * Check that dates has been updated\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.NEEDS_ACTION, CustomConsumers.ACTIONS);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"The appointment was rescheduled.\");\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testChangeReservationEndWithStartDateAfterEndDate() throws Exception {\n\t\tReservation res1 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), validStartDate,\n\t\t\t\tvalidEndDate);\n\t\tbookingManagement.changeReservationEnd(res1.getId(), validStartDate);\n\t}", "public void removeFromReminders(List<Date> reminders);", "public void changeStartDate(DateToken startToken) {\r\n\t\tDateTime now = new DateTime();\r\n\t\tif (Interval.nowStub != null) now = Interval.nowStub;\r\n\t\t\r\n\t\tstartDateExplicitlySet = true;\r\n\t\t\r\n\t\tif (this.start == null) {\r\n\t\t\tDateTime start = startToken.mergeInto(now).withTime(0, 0, 0, 0);\r\n\r\n\t\t\t// not leaping forward a year here; date should be taken as is\r\n\t\t\t\r\n\t\t\tthis.start = start;\r\n\t\t\tend = start.withTime(23, 59, 0, 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// a time has already been set\r\n\t\t\tDateTime start = startToken.mergeInto(this.start);\r\n\t\t\tthis.start = start;\r\n\t\t\tif (end.isBefore(this.start)) {\r\n\t\t\t\tend = this.start.plusHours(1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tend = startToken.mergeInto(end);\r\n\t\t\t\tif (end.isBefore(start)) {\r\n\t\t\t\t\tend = start.plusHours(1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void onBeforeUpdate(Record record) throws DeadlineExceededException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tint newStatus = (Integer) record.getValue(\"resignationstatusid\");\r\n\t\tint oldStatus = (Integer) record.getOldValue(\"resignationstatusid\");\r\n\t\tif((oldStatus == HRISConstants.RESIGNATION_NEW || oldStatus == HRISConstants.RESIGNATION_ONHOLD || oldStatus == HRISConstants.RESIGNATION_REJECTED)&& newStatus == HRISConstants.RESIGNATION_ACCEPTED){\r\n\t\t\t\r\n\t\t\tString TODAY_DATE = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(SystemParameters.getCurrentDateTime());\r\n\t\t\trecord.addUpdate(\"approveddate\",TODAY_DATE);\r\n\t\t}\r\n\t}", "public void stopToSee(Date dateI, Date dateF) {\n\t\t\n\t}", "public void resetDates() {\r\n selectedDate = null;\r\n currentDate = Calendar.getInstance();\r\n }", "public static boolean deleteAllDayReserveTimesBetweenDays(int startDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t int endDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t int unitID)\n {\n Connection conn = DBConnection.getConnection();\n try {\n\t\t\tString command = \"UPDATE RESERVETIMES \" +\n\t\t\t\t\t\" SET \" +\n\t\t\t\t\t\" STATUS = \" + ReserveTimeStatus.DELETED.getValue() +\n\t\t\t\t\t\" WHERE\" +\n\t\t\t\t\t\" DAY_ID BETWEEN \" + startDate + \" AND \" + endDate +\n\t\t\t\t\t\" AND UNIT_ID = \" + unitID +\n\t\t\t\t\t\" AND STATUS != \" + ReserveTimeStatus.RESERVED.getValue();\n PreparedStatement ps = conn.prepareStatement(command);\n int i = ps.executeUpdate();\n return i >= 0 ;\n }catch(SQLException e)\n {\n Logger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n return false;\n }finally\n {\n if(conn != null)\n {\n try\n {\n conn.close();\n } catch (SQLException e)\n {\n Logger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n }\n }\n }\n }", "public void departure_date(String departureDatePicker) throws ParseException\r\n\t{\r\n\t\t\r\n\t\tSimpleDateFormat df1;\r\n\t\t\r\n\r\n\t\tif(departuredate.getAttribute(\"placeholder\").equals(\"mm/dd/yyyy\")){\r\n\t\t\t df1 = new SimpleDateFormat(\"MM/dd/yyyy\");\r\n\r\n\t\t}else{\r\n\t\t\t df1 = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\t}\r\n\t\t\r\n\t\t//Formats date based on BE customer date format\r\n\t\tdf1 = new SimpleDateFormat(departuredate.getAttribute(\"placeholder\"));\r\n\t\t\t\t\r\n\t\t//Converts the String text from Data file into a Date object\r\n\t\tDate dateForDeparture = df1.parse(departureDatePicker);\r\n\t\t\t\t\r\n\t\t//Suppose to create the current date\r\n\t\tDate currentDate = new Date();\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"This is current date from departure_date() \" + currentDate);\r\n\t\t\t\r\n\r\n\t\t//will use this attriute to find out the date format\r\n\t\tSystem.out.println(departuredate.getAttribute(\"placeholder\"));\r\n\t\t\r\n\t\t\r\n\t\tif ( dateForDeparture.before(currentDate)){\r\n\t\t\t \r\n\t\t\tdateForDeparture.setDate(currentDate.getDate() + 6);\r\n\t\t }\r\n\t\t\r\n\t\tformattedDate1 = df1.format(dateForDeparture);\r\n\t\t\r\n\t\tSystem.out.println(\"This is the departure date reformat from departure_date() \" + formattedDate1);\r\n\t\t\r\n\t\t\r\n\t\tif (departuredate.isDisplayed()) \r\n\t\t{\r\n\t\t\tdeparturedate.click();\r\n\t\t\tdeparturedate.clear();\r\n\t\t\tTypeInField(departuredate, formattedDate1);\r\n\t\t\t//departuredate.sendKeys(formattedDate1);\r\n\t\t\tSystem.out.println(\"departuredate is entered successfully\");\r\n\t\t\tlogger.info(\"departuredate is entered successfully\");\r\n\t\t\ttest.log(Status.INFO, \"departuredate is entered successfully\");\r\n\r\n\t\t} else {\r\n\t\t\t//System.out.println(\"departuredate TextBox not found\");\r\n\t\t\tlogger.error(\"departuredate TextBox not found\");\r\n\t\t\ttest.log(Status.FAIL, \"departuredate TextBox not found\");\r\n\r\n\t\t}\r\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}", "@Override\n public Long getRunningTimeInDays() {\n return null;\n }", "@Test\n\tpublic void testChangeReservationEndReduceEnd() throws Exception {\n\n\t\tCalendar cal = Calendar.getInstance();\n\t\tDate start = cal.getTime();\n\t\tcal.add(Calendar.HOUR, 4);\n\t\tDate end = cal.getTime();\n\t\tcal.add(Calendar.HOUR, -1);\n\t\tDate newEnd = cal.getTime();\n\n\t\tReservation res1 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), start, end);\n\n\t\tbookingManagement.changeReservationEnd(res1.getId(), newEnd);\n\n\t\tres1 = bookingManagement.getReservation(res1.getId());\n\t\tassertNotNull(res1);\n\t\t// check if reservation is changed successfully\n\t\tassertEquals(newEnd, res1.getEndTime());\n\t\tassertEquals(start, res1.getStartTime());\n\t}", "private void removeOutOfDateData(List<DetailedData> detailedDatas)\n {\n for (Iterator<DetailedData> it = detailedDatas.iterator(); it.hasNext();)\n {\n DetailedData data = it.next();\n if (TuvState.OUT_OF_DATE.getName().equalsIgnoreCase(data.getState()))\n {\n it.remove();\n }\n }\n }", "public void setValidatedTo(Date validatedTo);", "void unsetDate();", "void removeStartingHadithNo(Object oldStartingHadithNo);", "@Override\n @SuppressWarnings(\"fallthrough\")\n public Date remove(final int index) {\n final Date previous = get(index);\n switch (index) {\n case 0: date1 = date2; // Fallthrough\n case 1: date2 = Long.MIN_VALUE; break;\n }\n modCount++;\n return previous;\n }", "protected void beforeTimeSlices()\n\t\tthrows DbCompException\n\t{\n dates = new ArrayList<Date>();\n\t}", "public Date getDepartureDate();", "@Test\n public void testValidateUpdateLifeTimeWithGoodDates() {\n updates.add(mockAssetView(\"endDate\", new Timestamp(20000).toString()));\n updates.add(mockAssetView(\"startDate\", new Timestamp(25000).toString()));\n defaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n verify(assetService).addError(eq(RuleProperty.END_DATE), anyString()); \n }", "@Override\n\tpublic void handle(Patient patient, User originalVoidingUser, Date origParentVoidedDate, String unused) {\n\t\tif (patient.getId() != null) {\n\t\t\t//unvoid all the encounter that got voided as a result of the patient getting voided\n\t\t\tEncounterService es = Context.getEncounterService();\n\t\t\tEncounterSearchCriteria encounterSearchCriteria = new EncounterSearchCriteriaBuilder()\n\t\t\t\t.setPatient(patient)\n\t\t\t\t.setIncludeVoided(true)\n\t\t\t\t.createEncounterSearchCriteria();\n\t\t\tList<Encounter> encounters = es.getEncounters(encounterSearchCriteria);\n\t\t\tif (CollectionUtils.isNotEmpty(encounters)) {\n\t\t\t\tfor (Encounter encounter : encounters) {\n\t\t\t\t\tif (encounter.getVoided() && encounter.getDateVoided().equals(origParentVoidedDate)\n\t\t\t\t\t && encounter.getVoidedBy().equals(originalVoidingUser)) {\n\t\t\t\t\t\tes.unvoidEncounter(encounter);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//unvoid all the orders that got voided as a result of the patient getting voided\n\t\t\tOrderService os = Context.getOrderService();\n\t\t\tList<Order> orders = os.getAllOrdersByPatient(patient);\n\t\t\tif (CollectionUtils.isNotEmpty(orders)) {\n\t\t\t\tfor (Order order : orders) {\n\t\t\t\t\tif (order.getVoided() && order.getDateVoided().equals(origParentVoidedDate)\n\t\t\t\t\t && order.getVoidedBy().equals(originalVoidingUser)) {\n\t\t\t\t\t\tos.unvoidOrder(order);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tCohortService cs = Context.getCohortService();\n\t\t\tcs.notifyPatientUnvoided(patient, originalVoidingUser, origParentVoidedDate);\n\t\t}\n\t}", "public void updateResv(RoomMgr rm, Reservation r, int choice, int numGuest) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tLocalDate localDateNow = LocalDate.now();\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd-MMM-yyyy\");\n\t\t\n\t\tswitch (choice) {\n\t\tcase 1:\n\t\t\trm.viewAllVacantRoom(numGuest);\n\t\t\twhile (true) {\n\t\t\t\tSystem.out.print(\"Enter Room No to book: \");\n\t\t\t\tString roomNo = sc.nextLine();\n\t\t\t\tif (rm.checkRoomEmpty(roomNo)) {\n\t\t\t\t\tr.setRoomNo(roomNo);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Error input!\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\tint adultNo = errorCheckingInt(\"Enter number of adult: \");\n\t\t\tr.setAdultNo(adultNo);\n\t\t\tbreak;\n\n\t\tcase 3:\n\t\t\tint kidNo = errorCheckingInt(\"Enter number of kids: \");\t\n\t\t\tsc.nextLine();\n\t\t\tr.setKidNo(kidNo);\n\t\t\tbreak;\n\n\t\tcase 4:\n\t\t\twhile (true) {\n\t\t\t\tSystem.out.print(\"Enter date check-in (dd-MM-yyyy): \");\n\t\t\t\tString dateIn = sc.nextLine();\n\n\t\t\t\ttry {\n\t\t\t\t\tLocalDate localDateIn = LocalDate.parse(dateIn, format);\n\t\t\t\t\tif (localDateIn.isBefore(localDateNow)) {\n\t\t\t\t\t\tSystem.out.println(\"Error input. Check in date must be after today!\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(format.format(localDateIn));\n\t\t\t\t\tr.setDateCheckIn(localDateIn);\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (DateTimeParseException e) {\n\t\t\t\t\tSystem.out.println(\"Error input. dd-MM-yyyy = 01-02-2018\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 5:\n\t\t\twhile (true) {\n\t\t\t\tSystem.out.print(\"Enter date check-out (dd-MM-yyyy): \");\n\t\t\t\tString dateOut = sc.nextLine();\n\n\t\t\t\ttry {\n\n\t\t\t\t\tLocalDate localDateOut = LocalDate.parse(dateOut, format);\n\t\t\t\t\tif (localDateOut.isBefore(localDateNow)) {\n\t\t\t\t\t\tSystem.out.println(\"Error input. Check in date must be after today!\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(format.format(localDateOut));\n\t\t\t\t\tr.setDateCheckOut(localDateOut);\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (DateTimeParseException e) {\n\t\t\t\t\tSystem.out.println(\"Error input. dd-MM-yyyy = 01-02-2018\");\n\t\t\t\t}\n\t\t\t}\n\n\t\tcase 6:\n\t\t\tSystem.out.printf(\"\\n===>Please select from the following:\\n\");\n\t\t\tSystem.out.println(\"(1) \" + rStatus[0]);\n\t\t\tSystem.out.println(\"(2) \" + rStatus[1]);\n\t\t\tSystem.out.println(\"(3) \" + rStatus[2]);\n\t\t\tSystem.out.println(\"(4) \" + rStatus[3]);\n\t\t\tSystem.out.println(\"(5) Return\");\n\t\t\tchoice = errorCheckingInt(\"Select option: \", 5);\n\t\t\tsc.nextLine();\n\n\t\t\tif (choice != 5) {\n\t\t\t\tr.setResvStatus(rStatus[choice - 1]);\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 7:\n\t\t\tSystem.out.println(\"Returning.....\");\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tSystem.out.println(\"Error input\");\n\t\t\tbreak;\n\n\t\t}\n\t}", "public void setStartDate(Date start)\r\n {\r\n this.startDate = start;\r\n }", "void deleteDoctor(Doctor target);", "@Test\n public void testValidateUpdateLifeTimeWithBadDates() {\n updates.add(mockAssetView(\"endDate\", new Timestamp(25000).toString()));\n updates.add(mockAssetView(\"startDate\", new Timestamp(20000).toString()));\n defaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n verify(assetService, never()).addError(eq(RuleProperty.END_DATE), anyString()); \n }", "private static void incrementDate() {\n\t\ttry {\r\n\t\t\tint days = Integer.valueOf(input(\"Enter number of days: \")).intValue();\r\n\t\t\tcalculator.incrementDate(days); // variable name changes CAL to calculator\r\n\t\t\tlibrary.checkCurrentLoans(); // variable name changes LIB to library\r\n\t\t\toutput(sdf.format(cal.date())); // variable name changes SDF to sdf , CAL to cal , method changes Date() to date()\r\n\t\t\t\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\t output(\"\\nInvalid number of days\\n\");\r\n\t\t}\r\n\t}", "List<Doctor> getAvailableDoctors(java.util.Date date, String slot) throws CliniqueException;", "public void update(ReservationBean reservation) throws SQLException {\n\t\tString query = \"Update reservation_journal\";\n\t\tDate startDate = reservation.getDReserveDate();\n\t\tDate endDate = reservation.getDReserveDate();\n\t\t\n\t\tif (!reservation.getRepeating().isEmpty())\n\t\t{\n\t\t\tendDate = reservation.getDRepeatTo();\n\t\t}\n\t\t\n\t\tSystem.out.println(startDate+\"start date\");\n\n\t\twhile (!startDate.after(endDate))\n\t\t{\tPreparedStatement pstmt = dataSource.getConnection().prepareStatement(query);\n\t\t\t\n\t\t\tpstmt.setString(1, reservation.getDeviceSerialNo());\n\t\t\tpstmt.setString(2, \"admin\");\n\t\t\tpstmt.setDate(3, new java.sql.Date(startDate.getTime()));\n\t\t\tpstmt.setTime(4, reservation.getTTimeFrom());\n\t\t\tSystem.out.println(reservation.getTTimeTo()+\"timeto\");\n\t\t\tpstmt.setTime(5, reservation.getTTimeTo());\n\t\t\tpstmt.setString(6, reservation.getLocation() );\n\t\t\tpstmt.setString(7, reservation.getAddInfo());\n\t\t\t\n\t\t\tpstmt.execute();\n\t\t\tstartDate = getNextDate(reservation.getRepeating() , startDate);\n\t\t\tSystem.out.println(startDate+\"date after\");\n\t\t}\n\t}", "public void retireLead()\r\n\t{\r\n\t\tisleader = false;\r\n\t}", "public void setDtEnd(Date dtEnd) {\r\n this.dtEnd = dtEnd;\r\n }", "public void generatePlan(Integer id,Date fromDate, Date toDate) throws Exception;", "public void makeValidDate() {\n\t\tdouble jd = swe_julday(this.year, this.month, this.day, this.hour, SE_GREG_CAL);\n\t\tIDate dt = swe_revjul(jd, SE_GREG_CAL);\n\t\tthis.year = dt.year;\n\t\tthis.month = dt.month;\n\t\tthis.day = dt.day;\n\t\tthis.hour = dt.hour;\n\t}", "public void setDtStart(Date dtStart) {\r\n this.dtStart = dtStart;\r\n }", "protected void validateDepartureAndArrivalDateTimeRange(final FareFinderForm fareFinderForm, final Errors errors)\n\t{\n\n\t\tif (StringUtils.equalsIgnoreCase(fareFinderForm.getTripType(), TripType.RETURN.name()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tfinal SimpleDateFormat formatter = new SimpleDateFormat(TravelservicesConstants.DATE_PATTERN);\n\n\t\t\t\tfinal Date departingDate = formatter.parse(fareFinderForm.getDepartingDateTime());\n\t\t\t\tfinal Date arrivalDate = formatter.parse(fareFinderForm.getReturnDateTime());\n\n\t\t\t\tif (departingDate.after(arrivalDate))\n\t\t\t\t{\n\t\t\t\t\trejectValue(errors, FIELD_DEPARTING_DATE_TIME, ERROR_TYPE_OUT_OF_RANGE);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (final ParseException e)\n\t\t\t{\n\t\t\t\tLOGGER.error(\"Unable to pharse String data to Date object:\", e);\n\t\t\t}\n\t\t}\n\t}", "public void deleteFreezed (Timestamp dateCurrent){\r\n try (Connection connection = jdbcUtils.getConnection();){\r\n preparedStatement = connection.prepareStatement(DELETE_FOLLOWERS_BY_END_DATE_SQL);\r\n preparedStatement.setTimestamp(DATE_DELETE_FOLLOWERS_BY_END_DATE_SQL_NUMBER, dateCurrent);\r\n preparedStatement.executeUpdate();\r\n }catch (SQLException ex) {\r\n configLog.init();\r\n logger.info(LOG_SQL_EXCEPTION_MESSAGE + AdminDao.class.getName());\r\n Logger.getLogger(AdminDao.class.getName()).log(Level.SEVERE, null, ex);\r\n throw new RuntimeException();\r\n }\r\n }", "public void clearDateALR() {\r\n\t\t//System.out.println(\"Clear= \" + counter);\r\n\t\twhile (historyDate.size() != counter) {\r\n\t\t\thistoryDate.removeLast();\r\n\t\t\thistoryAL.removeLast();\r\n\t\t}\r\n\t}" ]
[ "0.5709972", "0.5408926", "0.5326161", "0.523557", "0.5132673", "0.50694555", "0.5058854", "0.50544226", "0.50320244", "0.5032015", "0.5016871", "0.5008406", "0.49585557", "0.49405926", "0.49319863", "0.49269065", "0.48861864", "0.4877558", "0.48613", "0.48323697", "0.48292446", "0.48236662", "0.48189935", "0.48188898", "0.47962034", "0.47894087", "0.47840866", "0.47525132", "0.47453734", "0.47132206", "0.46921858", "0.4685159", "0.46774796", "0.4672602", "0.46699125", "0.466844", "0.46677303", "0.4658441", "0.4642838", "0.46415034", "0.4641342", "0.463306", "0.4632782", "0.46310908", "0.46277818", "0.46270072", "0.462536", "0.46180525", "0.46153393", "0.4613156", "0.46048746", "0.4574838", "0.45690534", "0.45592737", "0.45563152", "0.45497873", "0.45235917", "0.45215547", "0.45208693", "0.4519716", "0.45196098", "0.451042", "0.45078298", "0.45060948", "0.45044494", "0.44987372", "0.44983056", "0.44977748", "0.44963244", "0.4493075", "0.44894826", "0.44880062", "0.4481011", "0.4480384", "0.4479746", "0.44764188", "0.44680974", "0.44617015", "0.4458891", "0.4458121", "0.44551933", "0.4455126", "0.44550556", "0.44471854", "0.44383678", "0.4437498", "0.44349098", "0.44346642", "0.44339693", "0.44309488", "0.44263035", "0.44238153", "0.44232622", "0.44197875", "0.44192213", "0.44159064", "0.4415096", "0.44128045", "0.4407923", "0.4404793", "0.44044718" ]
0.0
-1
call this from the PatientManager
private void addStudy(Study study) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showPatients() {\n\t\t\t\n\t}", "public void careForPatient(Patient patient);", "protected void recordPatientVisit() {\r\n\r\n\t\t// obtain unique android id for the device\r\n\t\tString android_device_id = Secure.getString(getApplicationContext().getContentResolver(),\r\n Secure.ANDROID_ID); \r\n\t\t\r\n\t\t// add the patient record to the DB\r\n\t\tgetSupportingLifeService().createPatientAssessment(getPatientAssessment(), android_device_id);\r\n\t}", "@Override\r\n\tpublic void patientDisease() {\n\t\t\r\n\t\tSystem.out.println(\"Here I have attached the patients information\");\r\n\t\t\r\n\t}", "private void onAddPatient() {\n\t\tGuiManager.openFrame(GuiManager.FRAME_ADD_PATIENT);\n\t}", "public void registerPatientMethod1(Patient p);", "public Patient (String patientID) {\n this.patientID = patientID;\n this.associatedDoctor = new ArrayList<>();\n }", "public void setPatientId(int patientId) {\n\t\t\t\n\t\tthis.patientId=patientId;\t\t\n\t}", "public void setPatientID(java.lang.String param){\n \n this.localPatientID=param;\n \n\n }", "public void setPatientID(java.lang.String param){\n \n this.localPatientID=param;\n \n\n }", "private static void changePatient(){\r\n // opretter ny instans af tempPatinet som overskriver den gamle\r\n Patient p = new Patient(); // det her kan udskiftes med en nulstil funktion for at forsikre at der altid kun er en patient.\r\n Patient.setCprNumber((Long) null);\r\n }", "public Patient (){\r\n }", "public Patient() {\r\n\r\n\t}", "private void setThePatient() {\n String ppsn = mPPSN.getText().toString();\n thePatient.set_id(ppsn.substring(ppsn.indexOf(\":\")+1).trim());\n\n String name = mName.getText().toString();\n thePatient.setName(name.substring(name.indexOf(\":\")+1).trim());\n\n String illness = mCondition.getText().toString();\n thePatient.setIllness(illness.substring(illness.indexOf(\":\")+1).trim());\n\n Address a = new Address();\n String addressLine1 = mAddressLine1.getText().toString();\n a.setAddressLine1(addressLine1.substring(addressLine1.indexOf(\":\")+1).trim());\n\n String addressLine2 = mAddressLine2.getText().toString();\n a.setAddressLine2(addressLine2.substring(addressLine2.indexOf(\":\")+1).trim());\n\n String city = mCity.getText().toString();\n a.setCity(city.substring(city.indexOf(\":\")+1).trim());\n\n String county = mCounty.getText().toString();\n a.setCounty(county.substring(county.indexOf(\":\")+1).trim());\n\n String country = mCountry.getText().toString();\n a.setCountry(country.substring(country.indexOf(\":\")+1).trim());\n\n String postcode = mPostCode.getText().toString();\n a.setPostCode(postcode.substring(postcode.indexOf(\":\")+1).trim());\n\n thePatient.setAddress(a);\n }", "public Patient() {\n\t\t\n\t}", "public void setPatientName(String patientName)\n {\n this.patientName = patientName;\n }", "protected void contructPatientInstance() {\r\n\t\tResources resources = getApplicationContext().getResources();\r\n\t\r\n \t// constuct the patient instance\r\n try {\r\n \tsetPatientAssessment((new PatientHandlerUtils()).populateCcmPatientDetails(resources, getReviewItems()));\t\r\n\t\t} catch (ParseException e) {\r\n\t\t\tLoggerUtils.i(LOG_TAG, \"Parse Exception thrown whilst constructing patient instance\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "void AddPatiant(Patient p) throws Exception;", "public Patient() {\n\t\tsuper();\n\t\t/*\n\t\t * TODO initialize lists\n\t\t */\n\t\ttreatments = Collections.emptyList();\n\t}", "private void getAllPatients () throws MqttException {\n MqttMessage message = new MqttMessage(new Gson().toJson(dao.getAllPatients()).getBytes());\n message.setQos(0);\n publishThread(\"patient\", message, UniMed.mqttClient);\n }", "public void setPatientId(String patientId)\n {\n this.patientId = patientId;\n }", "public void setPatientName(String patientName){\n\t\tthis.patientName = patientName;\n\t}", "void updatePatientInfo(PatientInfo patientInfo);", "public Patient() {\n }", "@Override\n\tpublic void addPatients(String name, int id, Long mobilenumber, int age) {\n\t\t\n\t}", "public void setPatientID(int patientID) {\n\t\tthis.patientID = patientID;\n\t}", "public PatientList()\r\n\t{\r\n\t\treadPatientListFromFile();\r\n\t\t//showPatientList();\r\n\t}", "public java.lang.String getPatientID(){\n return localPatientID;\n }", "public java.lang.String getPatientID(){\n return localPatientID;\n }", "public String getPatientId()\n {\n return patientId;\n }", "Reference getPatient();", "public void setPatientId(String patientId){\n\t\tthis.patientId = patientId;\n\t}", "private void populatePatientData() {\n\n // Set the activity title\n setTitle(mPatient.getName());\n\n int urgency = mPatient.getUrgency();\n String urgencyFormat;\n if (urgency <= 1)\n urgencyFormat = \"Non-urgent (%d)\";\n else if (urgency == 2)\n urgencyFormat = \"Less urgent (%d)\";\n else\n urgencyFormat = \"Urgent (%d)\";\n setText(mUrgencyView, getString(R.string.urgency), String.format(urgencyFormat, urgency));\n\n // Populate the Vital Signs section with the patient's temperature, blood pressure, and heart rate.\n String[] patientVitalSignsLabels = getResources().getStringArray(R.array.patient_vital_signs_labels);\n\n VitalSigns vitalSigns = mPatient.getLatestVitalSigns();\n String temperature, bloodPressure, heartRate;\n if (vitalSigns != null) {\n temperature = String.format(\"%.1f\", vitalSigns.getTemperature());\n bloodPressure = String.format(\"%.0f / %.0f\", vitalSigns.getSystolicBloodPressure(), vitalSigns.getDiastolicBloodPressure());\n heartRate = String.format(\"%.0f\", vitalSigns.getHeartRate());\n } else {\n temperature = getString(R.string.none_recorded);\n bloodPressure = getString(R.string.none_recorded);\n heartRate = getString(R.string.none_recorded);\n }\n\n setText(mTemperatureView, patientVitalSignsLabels[0], temperature);\n setText(mBloodPressureView, patientVitalSignsLabels[1], bloodPressure);\n setText(mHeartRateView, patientVitalSignsLabels[2], heartRate);\n\n // Populate the Info section with the patient's name, birth date, health card number, arrival time and symptoms.\n String[] patientInfoLabels = getResources().getStringArray(R.array.patient_info_labels);\n\n String formattedBirthDate = dateFormat.format(mPatient.getBirthDate().getTime());\n String formattedArrivalTime = dateTimeFormat.format(mPatient.getArrivalTime().getTime());\n\n setText(mNameView, patientInfoLabels[0], mPatient.getName());\n setText(mBirthDateView, patientInfoLabels[1], formattedBirthDate);\n setText(mHealthCardNumberView, patientInfoLabels[2], mPatient.getHealthCardNumber());\n setText(mArrivalTimeView, patientInfoLabels[3], formattedArrivalTime);\n\n // Populate the Symptoms section\n String symptoms = mPatient.getLatestSymptoms();\n TextView symptomsTextView = (TextView) mSymptomsView.findViewById(android.R.id.text1);\n if (symptoms != null)\n symptomsTextView.setText(symptoms);\n else\n symptomsTextView.setText(getString(R.string.none_recorded));\n\n // Populate the prescriptions section\n List<String> prescription = mPatient.getLatestPrescription();\n if (prescription != null)\n setText(mPrescriptionsView, prescription.get(0), prescription.get(1));\n else {\n String placeholder = getString(R.string.none_recorded);\n setText(mPrescriptionsView, placeholder, placeholder);\n }\n\n SimpleDateFormat timeDateFormat = new SimpleDateFormat(\"h:mma, EEE, MMM d, yyyy\");\n String fLastSeenByDoctor;\n if (mPatient.hasBeenSeenByDoctor()) {\n Calendar lastSeenByDoctor = mPatient.getLastSeenByDoctor();\n fLastSeenByDoctor = timeDateFormat.format(lastSeenByDoctor.getTime());\n } else\n fLastSeenByDoctor = getString(R.string.none_recorded);\n TextView doctorTextView = (TextView) mDoctorView.findViewById(android.R.id.text1);\n doctorTextView.setText(fLastSeenByDoctor);\n }", "private void init(){\n //Get instance of Members to access Members Lists\n Members members = Members.getInstance();\n \n //add to patient members list\n members.getPatients().addMember(this);\n }", "HospitalSystem(Patient patient, Action action){\r\n\t\tthis.patient=patient;\r\n\t\treferredTo=action;\r\n\t\t\r\n\t\t//call the selection action method which will process the patient\r\n\t\tselectAction();\r\n\t\t\r\n\t}", "public int getPatientID() {\r\n\t\treturn patientID;\r\n\t}", "public String getPatientName()\n {\n return patientName;\n }", "public void requirePatientId() {\n hasPatientIdParam = true;\n }", "private void onViewPatient() {\n\t\tint selectedRowIndex = tablePatients.getSelectedRow();\n\n\t\tif (selectedRowIndex < 0)\n\t\t\t// No row has been selected\n\t\t\treturn;\n\n\t\t// Gets the patient ID\n\t\tbyte[] patientId = (byte[]) tablePatients.getValueAt(selectedRowIndex, PatientTable.ID);\n\n\t\t// Sets the patient ID as the current one\n\t\tPatientManager.setCurrentPatientId(patientId);\n\n\t\t// Opens the patient frame\n\t\tGuiManager.openFrame(GuiManager.FRAME_PATIENT);\n\t}", "public String getPatientId(){\n\t\treturn patientId;\n\t}", "private void loadPatient() {\n patient = PatientsDatabaseAccessObject.getInstance().getPatients();\n table.getItems().clear();\n for (int i = 0; i < patient.size(); ++i) {\n table.getItems().add(patient.get(i));\n }\n table.refresh();\n }", "@Transactional(readOnly = true)\n\tpublic void seekPatient(TreeManager docMtl) {\n//\t\tpublic void seekPatient(SchemaMtl schemaMtl) {\n\t\t\n\t\tlog.debug(docMtl.getEditPatientC());\n\t\tString sql = \"FROM Patient p \",sql2=\"\";\n\t\tint sl = sql.length();\n\t\tint fl = docMtl.getEditPatientC().getForename().length();\n\t\tif(fl>0){\n\t\t\tsql2+=sql2.length()==0?\"\":\" OR \";\n\t\t\tsql2+=\" lower(substring(p.forename,1,\" +fl +\"))='\" \n\t\t\t+docMtl.getEditPatientC().getForename().toLowerCase() +\"'\";\n\t\t}\n\t\tint pl = docMtl.getEditPatientC().getPatient().length();\n\t\tif(pl>0){\n\t\t\tsql2+=sql2.length()==0?\"\":\" OR \";\n\t\t\tsql2+=\" lower(substring(p.patient,1,\" +pl +\"))='\" \n\t\t\t+docMtl.getEditPatientC().getPatient().toLowerCase() +\"'\";\n\t\t\tif(fl==0){\n\t\t\t\tsql2+=\" OR lower(substring(p.forename,1,\" +pl +\"))='\" \n\t\t\t\t+docMtl.getEditPatientC().getPatient().toLowerCase() +\"'\";\n\t\t\t}\n\t\t}\n\t\tif(docMtl.getEditPatientC().getSex()!=null){\n\t\t\tsql+=sql.length()==sl?\" WHERE \":\" AND \";\n\t\t\tsql+=\" p.sex = '\" +docMtl.getEditPatientC().getSex() +\"' \";\n\t\t}\n\t\tif(sql2.length()>0){\n\t\t\tsql+=sql.length()==sl?\" WHERE \":\" AND \";\n\t\t\tsql+=\"(\" +sql2 +\")\";\n\t\t}\n\t\tlog.debug(sql);\n\t\tdocMtl.setPatientL(em.createQuery(sql).setMaxResults(10).getResultList());\n\t}", "@Override\n\tpublic void showPatientDetails() {\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"S.No Patient's name ID Mobile Age\");\n\t\tfor (int i = 1; i <= UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i - 1);\n\t\t\tSystem.out.print(\" \" + i + \" \" + jsnobj.get(\"Patient's name\") + \" \" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t+ \" \" + jsnobj.get(\"Mobile\") + \" \" + jsnobj.get(\"Age\") + \"\\n\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public Patient(String userID, String fullName, String address, String telephone){\n super(userID, fullName, address, telephone);\n }", "public void addSessionPatient(TreeManager docM) {\n//\t\tpublic void addSessionPatient(SchemaMtl docM) {\n\t\tPatient patientO = owsSession.getPatientO();\n\t\tlog.debug(patientO);\n\t\tif(patientO!=null){\n\t\t\tList<Patient> patientL = docM.getPatientL();\n\t\t\tif(patientL==null){\n\t\t\t\tpatientL = new ArrayList<Patient>();\n\t\t\t\tdocM.setPatientL(patientL);\n\t\t\t}\n\t\t\tpatientL.add(patientO);\n\t\t}\n\t}", "public void updateUpdatePatientPanel() {\n\t\tupdateNameTF.setText(getDoctor(tempDoctorId).getPatient(tempPatientId)\n\t\t\t\t.getPName());\n\t\tupdateAddressTA.setText(getDoctor(tempDoctorId).getPatient(\n\t\t\t\ttempPatientId).getPAddress());\n\t\tupdatePhoneNoTA\n\t\t\t\t.setText(\"\"\n\t\t\t\t\t\t+ getDoctor(tempDoctorId).getPatient(tempPatientId)\n\t\t\t\t\t\t\t\t.getPPhone());\n\t}", "public String getPatientName(){\n\t\treturn patientName;\n\t}", "@Override\n public void run(LifecycleOwner owner) {\n recordViewModel.getRecordsByPatient(patient.getId()).observe(owner, new Observer<List<Record>>() {\n @Override\n public void onChanged(List<Record> records) {\n onRecordsChanged(records, path);\n recordViewModel.getRecordsByPatient(patient.getId()).removeObserver(this);\n }\n });\n }", "public PatientVO getPatientVO()\n {\n return patientVO;\n }", "@Override\n @Transactional\n public void addPatient(Patient patient) {\n patientDAO.addPatient(patient);\n }", "public String getPatientName() {\n return patientName;\n }", "public void sendToOutpatients(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "public void setPatientCode(String patientCode) {\r\n\t\tthis.patientCode = patientCode;\r\n\t}", "@GET(PATIENT_PATH)\n\tPatient getCurrentPatient();", "public void showPatientList()\r\n\t{\n\t\tfor(int i=0; i<nextPatientLocation; i++)\r\n\t\t{\r\n\t\t\tString currentPositionPatientData = arrayPatients[i].toString();\r\n\t\t\tSystem.out.println(\"Patient \" + i + \" is \" + currentPositionPatientData);\r\n\t\t}\r\n\t}", "public interface PatientService {\n\n /**\n * 新增病人获取ID\n *\n * @return\n */\n Long getNewPid(Patient patient);\n\n /**\n * 新增病人\n *\n * @param patient\n * @return\n */\n JSONObject newPatient(Patient patient);\n\n\n /**\n * 复诊输入病人条件查询\n *\n * @param patient\n * @return\n */\n JSONObject revisit(Patient patient);\n\n\n /**\n * 获取地址列表\n * @return\n */\n JSONObject getPlace();\n\n\n /**\n * 获取病人列表\n * @return\n */\n JSONObject getPatientList(String pName,Integer pageSize,Integer pageNum);\n\n\n /**\n * 获取病人基本信息\n * @param pId\n * @return\n */\n JSONObject getPatientInfo(Long pId);\n\n /**\n * 更新病人基本信息\n * @param patient\n * @return\n */\n JSONObject updatePatientInfo(Patient patient);\n\n\n /**\n * 复诊时,有重复条件者获取病人列表\n */\n JSONObject getRevisitList(Patient patient,Integer pageSize,Integer pageNum);\n\n\n /**\n * 删除病人\n * @param patientId\n * @return\n */\n JSONObject deletePatient(Long patientId);\n\n /**\n * 将选中的病人的病历保存到Word文档\n */\n void saveObjToWord(List<Long> inquiryIdList, boolean all,Long patientId, HttpServletResponse response);\n}", "private void getPatient (String id) throws MqttException {\n MqttMessage message = new MqttMessage(new Gson().toJson(dao.getPatient(id)).getBytes());\n message.setQos(0);\n publishThread(\"patient\", message, UniMed.mqttClient);\n }", "private void savePatientToDatabase(Patient patient){\n DatabaseAdapter cateDB = new DatabaseAdapter(AddPatientActivity.this);\n try {\n cateDB.openDatabaseForRead();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n patient.printPatient();\n cateDB.insertPatient(patient);\n\n cateDB.closeDatabase();\n }", "@SystemAPI\n\tPatient getPatient();", "public Patient(String n, String type){\n name =\"Brendan\";\n pid = \"01723-X72312-7123\";\n birthDate = new Date();\n nationalID = n;\n sex =\"Female\";\n mothersName = \"Mary\";\n fathersName = \"John\";\n enrolledSchema = new Schema();\n doctype = 1;\n }", "public void setPatient(org.hl7.fhir.ResourceReference patient)\n {\n generatedSetterHelperImpl(patient, PATIENT$2, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "public void updatePatient(View view) {\r\n\t\tboolean seenByDoctor;\r\n\t\t\r\n\t\tIntent intent = getIntent();\r\n\r\n\t\t// Get the staff member from AccessRecordActivity.\r\n\t StaffMember staff = (StaffMember) intent.getSerializableExtra(\"staff\");\r\n\t \r\n\t // Get Record from AccessRecordActivity\r\n\t Record record = (Record) intent.getSerializableExtra(\"record\");\r\n\t \r\n\t // Sets patient's new blood pressure measurement . \r\n\t EditText pressure = (EditText) findViewById(R.id.blood_pressure);\r\n\t String bloodPressureString = pressure.getText().toString();\r\n\t int bloodPressure = Integer.parseInt(bloodPressureString);\r\n\t \r\n\t // Sets patient's new heart rate measurement .\r\n\t EditText rate = (EditText) findViewById(R.id.heart_rate);\r\n\t String heartRateString = rate.getText().toString();\r\n\t int heartRate = Integer.parseInt(heartRateString);\r\n\t \r\n\t // Sets patient's new blood pressure measurement .\r\n\t EditText seenBy = (EditText) findViewById(R.id.prescription_name);\r\n\t String seenByDoctorString = seenBy.getText().toString();\r\n\t \r\n\t //Sets in the record whether this patient has seen a doctor yet. \r\n\t seenByDoctor = seenByDoctorString.equalsIgnoreCase(\"Yes\");\r\n\t \r\n\t // Sets the new patient's symptoms.\r\n\t EditText symptom = \r\n\t \t\t(EditText) findViewById(R.id.prescription_instructions);\r\n\t String symptoms = symptom.getText().toString();\r\n\t \r\n\t // Sets the new patient's temperature. \r\n\t EditText temp = (EditText) findViewById(R.id.temperature);\r\n\t String temperatureString = temp.getText().toString();\r\n\t double temperature = Double.parseDouble(temperatureString);\r\n\t \r\n\t try {\r\n\t \t//This patient's record exists add to it.\r\n\t \tstaff.setTemperature(record, temperature);\r\n\t \tstaff.setBloodPressure(record, bloodPressure);\r\n\t\t staff.setHeartRate(record, heartRate);\r\n\t\t staff.setSeenByDoctor(record, seenByDoctor,\r\n\t\t \t\tthis.getApplicationContext());\r\n\t\t staff.setSymptoms(record, symptoms);\r\n\t\t staff.updateUrgency(record);\r\n\t\t \r\n\t\t} catch (Exception e) {\r\n\t\t\t// prompt for a record\r\n\t\t\t Intent reenter = new Intent(this, RetryUpdateInfo.class);\r\n\t\t\t reenter.putExtra(\"staff\", staff);\r\n\t\t\t startActivity(reenter);\r\n\t\t}\r\n\t \r\n\t\ttry {\r\n\t\t\tif (StaffMember.getRecords().getUrgencyRecords().\r\n\t\t\t\t\tcontains(record.getHealthCardNum())){\r\n\t\t\t StaffMember.getRecords().removePatientFromUrgency(record);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tStaffMember.getRecords().removePatient(record.getHealthCardNum());\r\n\t\t\tStaffMember.getRecords().add(record);\r\n\t\t\tStaffMember.getRecords().saveRecordsToFile(\"PatientsAndRecords\", \r\n\t\t\t\t\topenFileOutput(\"PatientsAndRecords\",\r\n\t\t\t\t\t\t\tContext.MODE_PRIVATE));\r\n\t\t\t\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t //With this patient dealt with the previous activity is returned too.\r\n\t Intent intent1 = new Intent(this, UpdatePatientActivity.class);\r\n\t intent1.putExtra(\"staff\", staff);\r\n\t intent1.putExtra(\"record\", record);\r\n\t startActivity(intent1);\t \r\n\t}", "PatientInfo getPatientInfo(int patientId);", "public String getPatientId() {\n\t\treturn patientId;\n\t}", "public int getPatientId() {\n\t\t\n\t\treturn this.patientId;\n\t}", "public Patient getSelectedPatient(){\n return (Patient)DoctorCreatePerscriptionPatientSelector.getSelectedItem();\n }", "public Patient(Name alias) {\n this(alias, PATIENT);\n }", "void dischargePatient(int id);", "private void getPatientInfo(String patientId){\n mFirestore.collection(\"users\")\n .document(patientId)\n .addSnapshotListener(new EventListener<DocumentSnapshot>() {\n @Override\n public void onEvent(@Nullable DocumentSnapshot snapshot,\n @Nullable FirebaseFirestoreException e) {\n if (e != null) {\n Log.w(TAG, \"Listen failed.\", e);\n return;\n }\n\n String source = snapshot != null && snapshot.getMetadata().hasPendingWrites()\n ? \"Local\" : \"Server\";\n\n if (snapshot != null && snapshot.exists()) {\n Log.d(TAG, source + \" data: \" + snapshot.getData());\n\n User existingPatient = localUser.getPatientById(snapshot.getId());\n if(existingPatient!=null){\n localUser.changeExistingPatient(existingPatient, setPatientData(snapshot));\n } else {\n localUser.addPatient(setPatientData(snapshot));\n }\n\n // TODO add PatientChangeListener\n //localUser.getIUserDataChangeListener().onUserDataChanged(null);\n\n } else {\n Log.d(TAG, source + \" data: null\");\n }\n }\n });\n }", "public PatientExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void consultDentist() {\n\t\tSystem.out.println(\"Patient \" + id + \" is consulting the dentist.\"); \n\t}", "@Override\n @Transactional\n public List<Patient> allPatients() {\n return patientDAO.allPatients();\n }", "@Override\n protected void onResume() {\n super.onResume();\n\n // Populate the views with patient data.\n if (mPatient != null)\n populatePatientData();\n }", "public void patientsCredentials() {\n\t\tutil.ClickElement(prop.getValue(\"locators.register.click\"));\n\t\tlogreport.info(\"Patient registration is clicked\");\n\t}", "public ArrayList<Patient> getPatients() {\n return this.patients;\n }", "public Patient(String iD, String givenName, String surName)\n {\n super(iD, givenName, surName); \n }", "public SinglePatientPN() {\n initComponents();\n }", "public void setPatientName(java.lang.String param) {\r\n localPatientNameTracker = param != null;\r\n\r\n this.localPatientName = param;\r\n }", "@Override\n public Patient savePatient(Patient patient) {\n return patientRepository.save(patient);\n }", "@Override\n public Patient editPatient(Patient patient) {\n return patientRepository.save(patient);\n }", "public Patient_Info() {\n initComponents();\n }", "public Patient(String iD, String addLine1, String city, String postcode, String givenName, String surName, String sex, int age, String password) {\n super(iD, givenName, surName, sex, age, password);\n this.addLine1 = addLine1;\n this.city = city;\n this.postcode = postcode;\n }", "public void showHealthCarePersonaledata(){\n }", "public Patient(String id, String givenName, String familyName){\n this.id = id;\n this.givenName = givenName;\n this.familyName = familyName;\n }", "public void ventilationServices() {\n\t\tSystem.out.println(\"FH----overridden method from hospital management--parent class of fortis hospital\");\n\t}", "public String getPatientCode() {\r\n\t\treturn patientCode;\r\n\t}", "private void setPlayerInformations() {\n\t\t\t\n\t\t\t\n\t\t}", "@Override\n\tpublic void takeAppointment() {\n\t\tsearchByMobile();\n\t\tif (count == 0) {\n\t\t\tnew ManagerServiceImplementation().addPatient();\n\t\t}\n\t\tnew DoctorServiceImplementation().showDoctorDetails();\n\t\tSystem.out.println(\"Enter doctor's ID:\");\n\t\tString dID = UtilityClinic.readString();\n\t\tfor (int i = 0; i < UtilityClinic.docJson.size(); i++) {\n\t\t\tJSONObject obj = (JSONObject) UtilityClinic.docJson.get(i);\n\t\t\tif (obj.get(\"Doctor's ID\").toString().equals(dID)) {\n\t\t\t\tif (UtilityClinic.docWisePatCounter.isEmpty()) {\n\t\t\t\t\tfor (int j = 0; j < UtilityClinic.docJson.size(); j++) {\n\t\t\t\t\t\tUtilityClinic.docWisePatCounter.add(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (UtilityClinic.docWisePatCounter.get(i) < 5) {\n\t\t\t\t\tnew Appointment(obj.get(\"Doctor's name\").toString(), dID, pName, pId,\n\t\t\t\t\t\t\tobj.get(\"Availibility time\").toString());\n\t\t\t\t\tUtilityClinic.docWisePatCounter.add(i, UtilityClinic.docWisePatCounter.get(i) + 1);\n\n\t\t\t\t\tif (UtilityClinic.appFile == null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tutil.accessExistingAppJson();\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t\t\tutil.createAppJson();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tutil.readFromAppJson(util.appFile);\n\t\t\t\t\tJSONObject appObject = new JSONObject();\n\t\t\t\t\tAppointment app = new Appointment(obj.get(\"Doctor's name\").toString(), dID, pName, pId,\n\t\t\t\t\t\t\tobj.get(\"Availibility time\").toString());\n\t\t\t\t\tappObject.put(\"Patient's name\", app.getPatientName());\n\t\t\t\t\tappObject.put(\"Patient's ID\", app.getPatientId());\n\t\t\t\t\tappObject.put(\"Doctor's name\", app.getDoctorName());\n\t\t\t\t\tappObject.put(\"Doctor's ID\", app.getDoctorId());\n\t\t\t\t\tappObject.put(\"Time stamp\", app.getTime());\n\t\t\t\t\tUtilityClinic.appJson.add(appObject);\n\t\t\t\t\tutil.writetoJson(UtilityClinic.appJson, util.getAppFileName());\n\t\t\t\t\tutil.readFromAppJson(util.getAppFileName());\n\t\t\t\t\tSystem.out.println(\"Appointment done.....\\n\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Sorry!!! Doctor is not available....Please try on next day.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public interface PatientListPresenter {\n\n //void retreivePatientsFromServer();\n List<PatientItem> retreivePatientsFromServer();\n void filterPatientsResult(String text,List<PatientItem> dataSet);\n List <PatientItem> retreiveLocalPatientsFromDatabase(Context mContext);\n Cursor retreiveAllPatientsFromDatabase(Context mContext);\n void addPatientsFromLocalToServer(List<PatientItem> dataSet,Context mContext);\n void addPatientsFromServerToLocal(List<PatientItem> dataSet,Context mContext);\n\n}", "@Override\r\n\tpublic void getRegimeAlimentaire() {\n\t\t\r\n\t}", "public void setPatientId(String patientId) {\n\t\tif (patientId == null) {\n\t\t\tthis.patientId = \"\";\n\t\t} else {\n\t\t\tthis.patientId = patientId;\n\t\t}\n\t}", "private void addPatient(Patient patient) {\n Location location = mLocationTree.findByUuid(patient.locationUuid);\n if (location != null) { // shouldn't be null, but better to be safe\n if (!mPatientsByLocation.containsKey(location)) {\n mPatientsByLocation.put(location, new ArrayList<Patient>());\n }\n mPatientsByLocation.get(location).add(patient);\n }\n }", "@Override\n public void measurementPatient(int value, int timestamp) {\n }", "public PatientPanelPrescription() {\n initComponents();\n set();\n }", "@Override\n\tpublic List<Patient> listOfPatients() {\n\t\treturn null;\n\t}", "public void cleanPatient(Patient patient);", "@Override\r\n public void onFailure(Call<PatientResponse> call, Throwable t) {\n Toast.makeText(getApplicationContext(),\"Failure\", Toast.LENGTH_SHORT).show();\r\n }", "@Override\n @Transactional\n public List<Patient> selectPatientsByAttendingDoctor(String doctorFullname) {\n return patientDAO.getByAttendingDoctor(doctorFullname);\n }", "public void displayPatientPicture(Resident res){\n }", "private void storePatient(final Patient patient) {\n\n\t\ttry {\n\t\t\tpatients.put(patient.getIdentifierFirstRep().getValue(), patient);\n\t\t\t// if storing is successful the notify the listeners that listens on\n\t\t\t// any patient => patient/*\n\n\t\t\tfinal String bundleToString = currentPatientsAsJsonString();\n\n\t\t\tbroadcaster\n\t\t\t\t\t.broadcast(new OutboundEvent.Builder().name(\"patients\").data(String.class, bundleToString).build());\n\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@RequestMapping(value = \"/retrieveInfo\", method = RequestMethod.GET)\n\tpublic ModelAndView retrievePatientsInfo() {\n\t\t\n\t\t\n\t\n\t\t\n\t\tlogger.info(\"Retrieve 1 :\");\n\t\t\n\t\t patientDetailsProcessor.retrieveInfoByEmailId();\n\t\t\n\t\treturn new ModelAndView(\"success\");\n\t}" ]
[ "0.65992665", "0.6474254", "0.64202815", "0.63381666", "0.62839955", "0.6250932", "0.62239254", "0.6223296", "0.62109435", "0.62109435", "0.6191185", "0.61457235", "0.6142659", "0.61296463", "0.61148643", "0.6113893", "0.6042545", "0.603445", "0.60218227", "0.6017084", "0.6015831", "0.59923387", "0.596724", "0.594092", "0.5940403", "0.593801", "0.59342337", "0.5911561", "0.5911561", "0.5909982", "0.58976126", "0.58780926", "0.5876103", "0.5860597", "0.58290935", "0.58236945", "0.58207273", "0.5817087", "0.58098096", "0.57880145", "0.5759182", "0.5757745", "0.57285374", "0.57096124", "0.5693092", "0.5692732", "0.56699437", "0.5664533", "0.56427693", "0.5641035", "0.56360155", "0.56128573", "0.56119144", "0.5610407", "0.56094813", "0.5595903", "0.5595397", "0.5584752", "0.5577197", "0.5562795", "0.5546338", "0.5532082", "0.5529979", "0.55138654", "0.54936904", "0.54930997", "0.5490188", "0.54896706", "0.5487689", "0.54837996", "0.54725647", "0.5470915", "0.5452903", "0.54478997", "0.5422789", "0.5413147", "0.5412732", "0.5389875", "0.5389714", "0.53753525", "0.5372781", "0.5357999", "0.5357636", "0.5350282", "0.53501004", "0.5349096", "0.53488916", "0.5344432", "0.5339283", "0.53391796", "0.53358513", "0.5335031", "0.5331676", "0.5326278", "0.5321401", "0.53198224", "0.5316909", "0.5312468", "0.53089625", "0.53075796", "0.53066057" ]
0.0
-1
make sure there is a study to remove first in StudyManager call this from the PatientManager
private void removeStudy(int studyID) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void unsetPatient()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(PATIENT$2, 0);\n }\n }", "protected void deleteStudyTool() {\n regularPresenter.selectStudyToolToDeletePrompt();\n String studyToolID = scanner.nextLine();\n\n if (verifyRightToEdit(studyToolID)) {\n studyToolManager.deleteStudyTool(studyToolID);\n } else {\n regularPresenter.sayNoStudyToolToDelete();\n }\n }", "private void onRemovePatient() {\n\t\tfinal int selectedRowIndex = tablePatients.getSelectedRow();\n\n\t\tif (selectedRowIndex < 0)\n\t\t\t// No row has been selected\n\t\t\treturn;\n\n\t\t// Gets the patient ID\n\t\tbyte[] patientId = (byte[]) tablePatients.getValueAt(selectedRowIndex, PatientTable.ID);\n\n\t\t// Confirms the action\n\t\tif (! GuiManager.showConfirmationDialog(this, \"¿Eliminar paciente?\", \"Está a punto de eliminar un paciente y todos sus estudios asociados.\" + System.lineSeparator() + \"Esta acción no puede revertirse.\" + System.lineSeparator() + \"¿Está seguro que desea continuar?\"))\n\t\t\t// The action was canceled\n\t\t\treturn;\n\n\t\t// Locks the window\n\t\tlock();\n\n\t\t// Removes the patient\n\t\tRemovePatientCaller caller = new RemovePatientCaller() {\n\n\t\t\tpublic void onRemovePatientSuccess() {\n\t\t\t\t// Removes the patient's row\n\t\t\t\ttablePatients.removePatientSummary(selectedRowIndex);\n\n\t\t\t\t// Unlocks the window\n\t\t\t\tunlock();\n\n\t\t\t\t// Calls the selection callback method\n\t\t\t\tonSelectPatient();\n\t\t\t}\n\n\t\t};\n\t\tRemovePatientWorker worker = new RemovePatientWorker(caller, patientId);\n\t\tworker.execute();\n\t}", "protected void undeleteStudyTool() {\n regularPresenter.selectStudyToolToUndeletePrompt();\n String studyToolID = scanner.nextLine();\n\n if (verifyRightToUndelete(studyToolID)) {\n studyToolManager.revertDeletedStudyTool(studyToolID);\n } else {\n regularPresenter.sayNoStudyToolToUndelete();\n }\n }", "public void cleanPatient(Patient patient);", "@Override\n\tpublic boolean delete(Patient model) {\n\t\treturn false;\n\t}", "@Override\n public boolean delete(Patient patient) {\n return false;\n }", "public void deleteByStudy(Study study) {\n List<WeeklyTracking> weeklyTrackingAttachedToStudy = weeklyTrackingRepository.findByStudy(study);\n\n for (WeeklyTracking weeklyTracking : weeklyTrackingAttachedToStudy) {\n weeklyTrackingRepository.delete(weeklyTracking);\n }\n }", "public void onRemovePatientSuccess() {\n\t\t\t\ttablePatients.removePatientSummary(selectedRowIndex);\n\n\t\t\t\t// Unlocks the window\n\t\t\t\tunlock();\n\n\t\t\t\t// Calls the selection callback method\n\t\t\t\tonSelectPatient();\n\t\t\t}", "void deletePatient(Patient target);", "@Override\n public void delete(JavaStudyClub javaStudyClub) {\n entityManager.remove(javaStudyClub);\n }", "private Patient removePatientIdentifer(Patient patient){\n\t\ttry{\n\t\t\tSet<PatientIdentifier> s=patient.getIdentifiers();\n\t\t\tfor(PatientIdentifier pi : s)\n\t\t\t\tpatient.removeIdentifier(pi);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn patient;\n\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "public void remove()\n {\n domain.removeParticipant(participant);\n }", "@Test\n public void testRemovePatient() throws RemoveException {\n register.registerPatient(\"Mikke\",\"Mus\",\"24120012345\", \"Doctor Proctor\");\n register.registerPatient( \"Donald\", \"Duck\",\"16120012345\", \"Doctor Proctor\");\n register.removePatient(\"24120012345\"); // Remove Mikke Mus\n assertEquals(1, register.getRegisterSize());\n }", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "public void remove() {\n\n }", "@Override\n public void remove() {\n }", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}", "public void removePatient(String name){\r\n current = front;\r\n afterCurrent = front.getNext();\r\n \r\n if (current.getPatient().getName().trim().equalsIgnoreCase(name)){\r\n front = afterCurrent;\r\n current = null;\r\n counter--;\r\n }\r\n else {\r\n while (!afterCurrent.getPatient().getName().trim().equalsIgnoreCase(name)){\r\n afterCurrent = afterCurrent.getNext();\r\n current = current.getNext();\r\n }\r\n if (afterCurrent.getNext() == null){\r\n current.setNext(null);\r\n back = current;\r\n afterCurrent = null;\r\n counter--;\r\n }\r\n else{\r\n current.setNext(afterCurrent.getNext());\r\n afterCurrent = null;\r\n counter--;\r\n }\r\n }\r\n }", "private void onRemoveClicked() {\r\n\t\t\r\n\t\tString givenName = Window.showStudentDialog();\r\n\t\t\r\n\t\tif (givenName != null) {\r\n\t\t\tif(!chart.removeStudentName(givenName)) {\r\n\t\t\t\tWindow.msg(\"This student was not found.\");\r\n\t\t\t}\r\n\t\t\tupdate();\r\n\t\t}\r\n\r\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "public void deleteStudent(){\r\n\t\t\r\n\t}", "@Override\n\tpublic Patient delete(Patient patient) {\n\t\t// setting logger info\n\t\tlogger.info(\"delete the patient details \");\n\t\tpatientRepo.delete(patient);\n\t\treturn patient;\n\t}", "public void remove() {\r\n //\r\n }", "@Override\n\tpublic void removeCampus(Campus campus) {\n\t\tEntityManager em=emf.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\ttry {\n\t\t\tem.remove(em.merge(campus));\n\t\t\tem.getTransaction().commit();\n\t\t} finally {\n\t\t\t// TODO: handle finally clause\n\t\t\tif (em.getTransaction().isActive()) {\n\t\t\t\tem.getTransaction().rollback();\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void removePatientFromDB(Patient P1)\r\n {\r\n \t String sql1 = \"DELETE from PATIENTDATA where firstname='\"+P1.firstName+\"' AND lastname='\"+P1.lastName+\"';\";\r\n try {\r\n\t\tstmt.executeUpdate(sql1);\r\n\t} catch (SQLException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t}\r\n }", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void remove() {\n\t }", "@Override\n public void remove() {\n }", "@Override\r\n\tpublic boolean removeExamManager(IUser user) {\n\t\treturn false;\r\n\t}", "public void removeCaregiverFromPatient(final Patient patient, final String caregiverId, final Context context){\n db.collection(Constants.PATIENTS_COLLECTION_FIELD).document(patient.getId()).get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {\n @Override\n public void onSuccess(DocumentSnapshot documentSnapshot) {\n Patient dbPatient = documentSnapshot.toObject(Patient.class);\n if (dbPatient != null){\n dbPatient.removeCaregiver(caregiverId);\n updatePatientInDatabase(dbPatient);\n Toast.makeText(context, context.getString(R.string.removed_caregiver_message), Toast.LENGTH_LONG).show();\n }\n else {\n Toast.makeText(context, context.getString(R.string.unable_to_remove_caregiver_message), Toast.LENGTH_LONG).show();\n }\n }\n });\n }", "@Override\n\tpublic boolean resetDraftStudyByCustomStudyId(String customStudy) {\n\t\tlogger.info(\"StudyServiceImpl - resetDraftStudyByCustomStudyId() - Starts\");\n\t\tboolean flag = false;\n\t\ttry {\n\t\t\tSessionObject object = null;\n\t\t\tflag = studyDAO.resetDraftStudyByCustomStudyId(customStudy,\n\t\t\t\t\tFdahpStudyDesignerConstants.RESET_STUDY, object);\n\t\t\tif (flag)\n\t\t\t\tflag = studyDAO.deleteLiveStudy(customStudy);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\n\t\t\t\t\t\"StudyServiceImpl - resetDraftStudyByCustomStudyId() - Error\",\n\t\t\t\t\te);\n\t\t}\n\t\tlogger.info(\"StudyServiceImpl - resetDraftStudyByCustomStudyId() - Ends\");\n\t\treturn flag;\n\t}", "@Test\n public void removeShiftCatch(){\n Shift dummy = new Shift(4, 1, 1, 1);\n shiftDAO.createShift(dummy);\n\n //test\n assertFalse(shiftDAO.removeShift(5));\n //clean up\n shiftDAO.removeShift(dummy.getShift_id());\n }", "private void addStudy(Study study) {\n\t\t\r\n\t}", "@Override\n @Transactional\n public void deletePatient(Patient patient) {\n patientDAO.deletePatient(patient);\n }", "public void onRemoveParticipant() {\n Participant participant = outputParticipants.getSelectionModel().getSelectedItem();\n\n if (participant == null) {\n AlertHelper.showError(LanguageKey.ERROR_PARTICIPANT_NULL, null);\n return;\n }\n\n if (controller.removeParticipant(participant)) {\n return;\n }\n\n AlertHelper.showError(LanguageKey.ERROR_PARTICIPANT_REMOVE, null);\n }", "@Override\n\tpublic void remove() { }", "public void deleteStudent(Student s) {\n\t\tstudents.remove(s);\n\t\tisStudentsListChanged = true;\n\t\tdataChangedNotify();\n\t}", "@Override\n public void removeFromDb() {\n }", "public void remove() {\n\tString fname = stdin.next();\n\tString lname = stdin.next();\n\tStudent s = new Instate(fname,lname,1,1); //temporary Instate object to allow us to remove\n\n\tboolean successfullyRemoved = cs213.remove(s);\n\tif (!successfullyRemoved) {\n\t\tSystem.out.println(fname + \" \" + lname + \" is not a student!\");\n\t\t}\n\t\telse {\n\t\tSystem.out.println(fname + \" \" + lname + \" has been removed!\");\n\t\t}\n\t\treturn;\n\t}", "@Override\n\tpublic void deletepatienttreat(int id) {\n\t\tpatreatrep.deleteById(id);\n\t\t\n\t}", "@Override\r\n\t\tpublic void remove() {\n\r\n\t\t}", "public void remove() {\n\t}", "public void remove() {\n\t}", "public void remove(){\n }", "public void remove() {\r\n super.remove();\r\n }", "@Test\n public void removeShift(){\n Shift dummy = new Shift(4, 1, 1, 1);\n shiftDAO.createShift(dummy);\n\n //clean up and test\n assertTrue(shiftResource.removeShift(dummy.getShift_id()));\n }", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "public void deleteStudent(String rollNo) {\n\t\t\r\n\t}", "public void removePatient(String ssn) throws RemoveException {\n boolean success = false;\n for (int i = 0; i < patients.size(); i++) {\n if (patients.get(i).getSsn().equals(ssn)) {\n patients.remove(i);\n success = true;\n }\n }\n if (!success) {\n throw new RemoveException(\"Unable to remove patient. Patient not found\");\n }\n }", "public void removeRow(Patient o)\n\t{\n\t\tthis.data.remove(o);\n\t\tthis.fireTableChanged(null);\n\t}", "public void remove(Student s1){\r\n this.studentList.remove(s1);\r\n }", "public void removed() {\n }", "public void clickedSpeakerDelete() {\n\t\tif(mainWindow.getSelectedRowSpeaker().length <= 0) ApplicationOutput.printLog(\"YOU DID NOT SELECT ANY PRESENTATION\");\n\t\telse if(mainWindow.getSelectedRowSpeaker().length > 1) ApplicationOutput.printLog(\"Please select only one presentation to edit\");\n\t\telse {\n\t\t\tint tmpSelectedRow = mainWindow.getSelectedRowSpeaker()[0];\n\t\t\tSpeakers tmpSpeaker = speakersList.remove(tmpSelectedRow);\t\t\t\n\t\t\tappDriver.hibernateProxy.deleteSpeaker(tmpSpeaker);\t\n\t\t\trefreshSpeakerTable();\t\t\t\n\t\t}\n\t}", "public final void remove () {\r\n }", "public Student removeStudent()\r\n {\r\n Student student = null;\r\n\r\n if(first_node != null)\r\n {\r\n student = first_node.getData();\r\n first_node = first_node.getNextNode();\r\n\r\n number_of_entries--;\r\n removeID(student.getStudent_ID());\r\n updateAcademicLevels(\"remove\", student.getAcademic_year());\r\n }\r\n return student;\r\n }", "@Override\r\n\tpublic boolean removeExam(IExam exam) {\n\t\treturn false;\r\n\t}", "public void onClick(DialogInterface dialog, int id) {\n study1.delete(l_name);\n listItems.remove(l_name);\n adapter.notifyDataSetChanged();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "@Override\n public void remove(SpectatorComponent spectatorComponent) {\n }", "public void processRemoveStation() {\n AppYesNoDialogSingleton dialog = AppYesNoDialogSingleton.getSingleton();\n \n // POP UP THE DIALOG\n dialog.show(\"Remove Station\", \"Are you sure you want to remove this station?\");\n \n // DO REMOVE LINE \n dataManager.removeStation(); \n }", "public void removeStudent(Student InStudent)\n\t{\n\t\tclassRoll.remove (InStudent);\n\t\tsaveNeed = true;\n\n\t}", "void unsetSpecimen();", "void handleResourceRemoval(String resourceName) {\n boolean lowestInstanceState = resourceRepository.countAllByAvailableIsTrueAndIsRedundantIsFalse() <= 1\n && resourceRepository.countAllByAvailableIsTrueAndIsRedundantIsTrue() <= 1;\n if (!lowestInstanceState) {\n Optional<Resource> resource = resourceRepository.findByName(resourceName);\n if (resource.isPresent()) {\n resource.get().setAvailable(false);\n resource.get().setMarkedForKill(true);\n resourceRepository.save(resource.get());\n }\n }\n }", "public void removeStadium(int stadiumID){\n\t}", "@Override\n public void deleteInstitution() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"deleteInstitution\");\n }\n\n deleteInstitution(selectedInstitution);\n }", "public void remove() {\r\n return;\r\n }", "@Override\n\tpublic int delete(int student) {\n\n\t\treturn 0;\n\t}", "public void remove(String patient, String index) {\n database.get(patient).remove(Integer.parseInt(index));\n }", "public void removePatientFromDB(String fname, String lname)\r\n {\r\n \t String sql1 = \"DELETE from PATIENTDATA where firstname='\"+fname+\"' AND lastname='\"+lname+\"';\";\r\n try {\r\n\t\tstmt.executeUpdate(sql1);\r\n\t} catch (SQLException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t}\r\n }", "public void deletePatientByPrimaryKey(long id) throws PatientExn;", "public void destroy() {\n\t\tlog.info(\"Destroy StudentDAO\");\n\t}", "public abstract void onRemove();", "public void deleteSamSyndicator() {\r\n deletePublisher(TckPublisher.getSamPublisherId());\r\n }", "@Override\n\t\tpublic void removeStudentById(Integer id) \n\t\t{\n\t\t\tStudent stu=(Student) sessionFactory.getCurrentSession().load(Student.class,id);\n\t if(null!=stu)\n\t {\n\t sessionFactory.getCurrentSession().delete(stu);\n\t }\n\t\t\t\n\t\t}", "public void remove () {}", "@Override\n public void remove(int no) throws Exception {\n \n }", "public void remove()\r\n {\r\n if(bookCount>0)\r\n {\r\n bookCount-=1;\r\n }\r\n }", "protected abstract void checkRemoved();", "private void removeStudentButtonActionPerformed(java.awt.event.ActionEvent evt) {\n removeStudent();\n }", "public void removeCheckedStudents(View v)\n {\n for(Student aStudent: studentsList)\n {\n if(aStudent.isDeletable()) {\n //myDBHelper.removeStudent(aStudent);\n //studentAdapter.remove(aStudent);\n myDBHelper.removeStudent(aStudent);\n //adapter.remove(aTeacher);\n //\n studentsList = myDBHelper.getAllStudents();\n //Instantiated an adapter\n studentAdapter = new StudentAdapter(this, R.layout.activity_list_item, studentsList);\n ListView listTeachers = (ListView) findViewById(R.id.lstStudentsView);\n listTeachers.setAdapter(studentAdapter);\n studentAdapter.notifyDataSetChanged();\n }\n }\n if(studentsList.isEmpty())\n btnEdit.setEnabled(false);\n imgStudentImage.setImageResource(R.mipmap.noimgavail);\n //clear all fields\n txtFirstName.setText(\"\");\n txtLastName.setText(\"\");\n txtAge.setText(\"\");\n txtYear.setText(\"\");\n }", "public void unsetMedication()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(MEDICATION$10, 0);\n }\n }", "void removeHadithChapterIntro(Object oldHadithChapterIntro);" ]
[ "0.6155786", "0.6151266", "0.6029756", "0.60127765", "0.58688", "0.58666116", "0.58663243", "0.58511406", "0.5843834", "0.57948697", "0.5778949", "0.5760194", "0.57469136", "0.57469136", "0.5722453", "0.56368196", "0.56351", "0.5620889", "0.5604611", "0.5601281", "0.55965996", "0.5595634", "0.5592423", "0.5592423", "0.5580479", "0.5571029", "0.5561946", "0.5554525", "0.5550737", "0.55423874", "0.55423874", "0.55423874", "0.5498358", "0.5462583", "0.5449847", "0.54418004", "0.54375035", "0.5435322", "0.541517", "0.5404837", "0.5402589", "0.5397764", "0.53943264", "0.53895664", "0.5384019", "0.5383886", "0.53816193", "0.53816193", "0.53787714", "0.537504", "0.53747445", "0.5371137", "0.5371137", "0.5371137", "0.5371137", "0.5371137", "0.5371137", "0.5371137", "0.5371137", "0.53702116", "0.53618526", "0.5344085", "0.5339468", "0.5336142", "0.5329378", "0.53202444", "0.5317444", "0.53118634", "0.53096884", "0.5302523", "0.5302523", "0.5302523", "0.5302523", "0.5302523", "0.5302523", "0.5302523", "0.5298847", "0.5287828", "0.52875453", "0.5283749", "0.52835816", "0.52823406", "0.5282014", "0.5277323", "0.5276905", "0.5263499", "0.5263282", "0.5257204", "0.5256774", "0.5245264", "0.5244532", "0.5236789", "0.5235234", "0.52351403", "0.52186865", "0.52133584", "0.52107346", "0.5202504", "0.52004236", "0.5199207" ]
0.74011934
0
TODO Autogenerated method stub
@Override public int signUp(userData user) { String pwd = user.getUser_pwd(); System.out.println(user.getUser_phone()+" get "+ pwd + "key:"+user.getKey()+" phone:"+user.getUser_phone()); pwd = MD5.md5_salt(pwd); System.out.println(user.getUser_phone()+" final: "+ pwd); HashMap<String,String> t = new HashMap(); t.put("key", user.getKey()); t.put("value", user.getUser_phone()); String phone = AES.decode(t); System.out.println("phone:"+phone+" identity:"+user.getIdentity()+"final: "+ pwd); user_table u = new user_table(); u.setUserphone(phone); u.setIdentity(user.getIdentity()); u.setUserpwd(pwd); try { try{ user_table chong = this.userRespository.findById(phone).get(); return -1; }catch (Exception e) { this.userRespository.save(u); return 1; } }catch (Exception e) { 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 int login(userData user) { String pwd = user.getUser_pwd(); System.out.println(user.getUser_phone()+" get "+ pwd + "key:"+user.getKey()+" phone:"+user.getUser_phone()); pwd = MD5.md5_salt(pwd); System.out.println(user.getUser_phone()+" final: "+ pwd); HashMap<String,String> t = new HashMap(); t.put("key", user.getKey()); t.put("value", user.getUser_phone()); String phone = AES.decode(t); System.out.println("phone:"+phone+"final: "+ pwd); List<user_table> res = this.userRespository.login(phone, pwd); if(res.size() == 1) { user_table u = res.get(0); String identity = u.getIdentity(); try { if(identity.equals("S")){ System.out.println("检查学生信息完善?"); student_table st = this.student.findByPhone(u.getUserphone()); if(st == null) return 801; return 400; }else{ System.out.println("检查老师信息完善?"); teacher_table tea = this.teacher.findByPhone(u.getUserphone()); if(tea == null) return 802; return 500; } }catch(Exception e) { System.out.println("800"); return 800; } }else { return 401; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public int forget_pwd(userData user) { try { String pwd = MD5.md5_salt(user.getUser_pwd()); HashMap<String,String> t = new HashMap(); t.put("key", user.getKey()); t.put("value", user.getUser_phone()); String phone = AES.decode(t); System.out.println("修改密码phone:"+phone+"final: "+ pwd); this.userRespository.forget_pwd(pwd, phone); return 201; }catch(Exception e) { e.printStackTrace(); return 400; } }
{ "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 showIdentity(String phone) { user_table t = this.userRespository.findByUserphone(phone); return t.getIdentity(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
Processes requests for both HTTP GET and POST methods.
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); response.setCharacterEncoding("UTF-8"); request.setCharacterEncoding("UTF-8"); String nascimento = request.getParameter("dataNascimento"); String sexo = request.getParameter("sexo"); String matricula = request.getParameter("matricula"); String rg = request.getParameter("rg"); String cpf = request.getParameter("cpf"); String nome = request.getParameter("nome"); String email = request.getParameter("email"); String telFixo = request.getParameter("telFixo"); String telCelular = request.getParameter("telCelular"); String endereco = request.getParameter("endereco"); String numero = request.getParameter("numero"); String bairro = request.getParameter("bairro"); String cidade = request.getParameter("cidade"); String estado = request.getParameter("estado"); String cep = request.getParameter("cep"); CadTecnicoAdmModel cadTecnicoAdmModel = new CadTecnicoAdmModel(nome, nascimento,sexo, matricula, rg, cpf, email, telFixo, telCelular, endereco, numero,bairro, cidade, estado, cep ); CadTecnicoAdmDao cadTecnicoAdmDao = new CadTecnicoAdmDao(); cadTecnicoAdmDao.salvar(cadTecnicoAdmModel); request.getRequestDispatcher("cadTecnicoAdm.jsp").forward(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);\n }\n }", "private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n // only POST should be used\n doPost(request, response);\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\nSystem.err.println(\"=====================>>>>>123\");\n\t\tString key=req.getParameter(\"method\");\n\t\tswitch (key) {\n\t\tcase \"1\":\n\t\t\tgetProvinces(req,resp);\n\t\t\tbreak;\n\t\tcase \"2\":\n\t\t\tgetCities(req,resp);\t\t\t\n\t\t\tbreak;\n\t\tcase \"3\":\n\t\t\tgetAreas(req,resp);\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t\tdoGet(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n processRequest(request, response);\n }", "@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tprocessRequest(request, response);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tprocessRequest(request, response);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t\t\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }" ]
[ "0.7004024", "0.66585696", "0.66031146", "0.6510023", "0.6447109", "0.64421695", "0.64405906", "0.64321136", "0.6428049", "0.6424289", "0.6424289", "0.6419742", "0.6419742", "0.6419742", "0.6418235", "0.64143145", "0.64143145", "0.6400266", "0.63939095", "0.63939095", "0.639271", "0.63919044", "0.63919044", "0.63903785", "0.63903785", "0.63903785", "0.63903785", "0.63887113", "0.63887113", "0.6380285", "0.63783026", "0.63781637", "0.637677", "0.63761306", "0.6370491", "0.63626", "0.63626", "0.63614637", "0.6355308", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896", "0.63546896" ]
0.0
-1
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //processRequest(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doGet( )\n {\n \n }", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}", "void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metGet(request, response);\n }", "public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"GET log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) return;\r\n\tif (\"get-response\".equals( requestId )) {\r\n\t try {\r\n\t\tonMEVPollsForResponse( req, resp );\r\n\t } catch (Exception e) {\r\n\t\tlogError( req, resp, e, \"MEV polling error\" );\r\n\t\tsendError( resp, \"MEV polling error: \" + e.toString() );\r\n\t }\r\n\t}\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n \r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t\t\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "public void doGet() throws IOException {\n\n // search ressource\n byte[] contentByte = null;\n try {\n contentByte = ToolBox.readFileByte(RESOURCE_DIRECTORY, this.url);\n this.statusCode = OK;\n ContentType contentType = new ContentType(this.extension);\n sendHeader(statusCode, contentType.getContentType(), contentByte.length);\n } catch (IOException e) {\n System.out.println(\"Ressource non trouvé\");\n statusCode = NOT_FOUND;\n contentByte = ToolBox.readFileByte(RESPONSE_PAGE_DIRECTORY, \"pageNotFound.html\");\n sendHeader(statusCode, \"text/html\", contentByte.length);\n }\n\n this.sendBodyByte(contentByte);\n }", "public HttpResponseWrapper invokeGET(String path) {\n\t\treturn invokeHttpMethod(HttpMethodType.HTTP_GET, path, \"\");\n\t}", "@Override\n\tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t}", "public Result get(Get get) throws IOException;", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) {\n System.out.println(\"[Servlet] GET request \" + request.getRequestURI());\n\n response.setContentType(FrontEndServiceDriver.APP_TYPE);\n response.setStatus(HttpURLConnection.HTTP_BAD_REQUEST);\n\n try {\n String url = FrontEndServiceDriver.primaryEventService +\n request.getRequestURI().replaceFirst(\"/events\", \"\");\n HttpURLConnection connection = doGetRequest(url);\n\n if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n PrintWriter pw = response.getWriter();\n JsonObject responseBody = (JsonObject) parseResponse(connection);\n\n response.setStatus(HttpURLConnection.HTTP_OK);\n pw.println(responseBody.toString());\n }\n }\n catch (Exception ignored) {}\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"get\");\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \tSystem.out.println(\"---here--get--\");\n processRequest(request, response);\n }", "@Override\n public final void doGet() {\n try {\n checkPermissions(getRequest());\n // GET one\n if (id != null) {\n output(api.runGet(id, getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER)));\n } else if (countParameters() == 0) {\n throw new APIMissingIdException(getRequestURL());\n }\n // Search\n else {\n\n final ItemSearchResult<?> result = api.runSearch(Integer.parseInt(getParameter(PARAMETER_PAGE, \"0\")),\n Integer.parseInt(getParameter(PARAMETER_LIMIT, \"10\")), getParameter(PARAMETER_SEARCH),\n getParameter(PARAMETER_ORDER), parseFilters(getParameterAsList(PARAMETER_FILTER)),\n getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER));\n\n head(\"Content-Range\", result.getPage() + \"-\" + result.getLength() + \"/\" + result.getTotal());\n\n output(result.getResults());\n }\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n }\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tthis.service(req, resp);\r\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t}", "@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n public void get(@PathVariable(\"id\") String id, HttpServletRequest req){\n throw new NotImplementedException(\"To be implemented\");\n }", "@Override\npublic void get(String url) {\n\t\n}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString action = req.getParameter(\"action\");\r\n\t\t\r\n\t\tif(action == null) {\r\n\t\t\taction = \"List\";\r\n\t\t}\r\n\t\t\r\n\t\tswitch(action) {\r\n\t\t\tcase \"List\":\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest request, \n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tSystem.out.println(\"Routed to doGet\");\n\t}", "@NonNull\n public String getAction() {\n return \"GET\";\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "@Override\r\nprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t process(req,resp);\r\n\t }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}", "@Override\n\tpublic HttpResponse get(final String endpoint) {\n\t\treturn httpRequest(HTTP_GET, endpoint, null);\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste doget\");\r\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/plain\");\n // Actual logic goes here.\n PrintWriter out = response.getWriter();\n out.println(\"Wolken,5534-0848-5100,0299-6830-9164\");\n\ttry \n\t{\n Get g = new Get(Bytes.toBytes(request.getParameter(\"userid\")));\n Result r = table.get(g);\n byte [] value = r.getValue(Bytes.toBytes(\"v\"),\n Bytes.toBytes(\"\"));\n\t\tString valueStr = Bytes.toString(value);\n\t\tout.println(valueStr);\n\t}\n\tcatch (Exception e)\n\t{\n\t\tout.println(e);\n\t}\n }", "@Override\r\n public void doGet(String path, HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\r\n // throw new UnsupportedOperationException();\r\n System.out.println(\"Inside the get\");\r\n response.setContentType(\"text/xml\");\r\n response.setCharacterEncoding(\"utf-8\");\r\n final Writer w = response.getWriter();\r\n w.write(\"inside the get\");\r\n w.close();\r\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n System.out.println(\"Console: doGET visited\");\n String result = \"\";\n //get the user choice from the client\n String choice = (request.getPathInfo()).substring(1);\n response.setContentType(\"text/plain;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n //methods call appropriate to user calls\n if (Integer.valueOf(choice) == 3) {\n result = theBlockChain.toString();\n if (result != null) {\n out.println(result);\n response.setStatus(200);\n //set status if result output is not generated\n } else {\n response.setStatus(401);\n return;\n }\n }\n //verify chain method\n if (Integer.valueOf(choice) == 2) {\n response.setStatus(200);\n boolean validity = theBlockChain.isChainValid();\n out.print(\"verifying:\\nchain verification: \");\n out.println(validity);\n }\n }", "@Override\n public DataObjectResponse<T> handleGET(DataObjectRequest<T> request)\n {\n if(getRequestValidator() != null) getRequestValidator().validateGET(request);\n\n DefaultDataObjectResponse<T> response = new DefaultDataObjectResponse<>();\n try\n {\n VisibilityFilter<T, DataObjectRequest<T>> visibilityFilter = visibilityFilterMap.get(VisibilityMethod.GET);\n List<Query> queryList = new LinkedList<>();\n if(request.getQueries() != null)\n queryList.addAll(request.getQueries());\n\n if(request.getId() != null)\n {\n // if the id is specified\n queryList.add(new ById(request.getId()));\n }\n\n DataObjectFeed<T> feed = objectPersister.retrieve(queryList);\n if(feed == null)\n feed = new DataObjectFeed<>();\n List<T> filteredObjects = visibilityFilter.filterByVisible(request, feed.getAll());\n response.setCount(feed.getCount());\n response.addAll(filteredObjects);\n }\n catch(PersistenceException e)\n {\n ObjectNotFoundException objectNotFoundException = new ObjectNotFoundException(String.format(OBJECT_NOT_FOUND_EXCEPTION, request.getId()), e);\n response.setErrorResponse(ErrorResponseFactory.objectNotFound(objectNotFoundException, request.getCID()));\n }\n return response;\n }", "public void handleGet( HttpExchange exchange ) throws IOException {\n switch( exchange.getRequestURI().toString().replace(\"%20\", \" \") ) {\n case \"/\":\n print(\"sending /MainPage.html\");\n sendResponse( exchange, FU.readFromFile( getReqDir( exchange )), 200);\n break;\n case \"/lif\":\n // send log in page ( main page )\n sendResponse ( exchange, FU.readFromFile(getReqDir(exchange)), 200);\n //\n break;\n case \"/home.html\":\n\n break;\n case \"/book.html\":\n\n break;\n default:\n //checks if user is logged in\n\n //if not send log in page\n //if user is logged in then\n print(\"Sending\");\n String directory = getReqDir( exchange ); // dont need to do the / replace as no space\n File page = new File( getReqDir( exchange) );\n\n // IMPLEMENT DIFFERENT RESPONSE CODE FOR HERE IF EXISTS IS FALSE OR CAN READ IS FALSE\n sendResponse(exchange, FU.readFromFile(directory), 200);\n break;\n }\n }", "public int handleGET(String requestURL) throws ClientProtocolException, IOException{\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\thttpGet = new HttpGet(requestURL);\t\t\r\n\t\t\t\t\t\t\r\n\t\tinputsource=null;\r\n\t\t\t\r\n\t\toutputString=\"\";\r\n\t\t\r\n\t\t//taking response by executing http GET object\r\n\t\tCloseableHttpResponse response = httpclient.execute(httpGet);\t\t\r\n\t\r\n\t\t/* \r\n\t\t * \tThe underlying HTTP connection is still held by the response object\r\n\t\t\tto allow the response content to be streamed directly from the network socket.\r\n\t\t\tIn order to ensure correct deallocation of system resources\r\n\t\t\tthe user MUST call CloseableHttpResponse.close() from a finally clause.\r\n\t\t\tPlease note that if response content is not fully consumed the underlying\r\n\t\t\tconnection cannot be safely re-used and will be shut down and discarded\r\n\t\t\tby the connection manager.\r\n\t\t */\r\n\t\t\r\n\t\t\tstatusLine= response.getStatusLine().toString();\t\t//status line\r\n\t\t\t\r\n\t\t\tHttpEntity entity1 = response.getEntity();\t\t\t\t//getting response entity from server response \t\r\n\t\t\t\t\t\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(entity1.getContent()));\r\n\r\n\t\t\tString line;\r\n\t\t\twhile((line=br.readLine())!=null)\r\n\t\t\t{\r\n\t\t\t\toutputString=outputString+line.toString();\r\n\t }\r\n\t\t\t\r\n\t\t\t//removing spaces around server response string.\r\n\t\t\toutputString.trim();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t//converting server response string into InputSource.\r\n\t\t\tinputsource = new InputSource(new StringReader(outputString));\t\r\n\t\t\t\r\n\t\t\t// and ensure it is fully consumed\r\n\t\t\tEntityUtils.consume(entity1);\t\t\t//consuming entity.\r\n\t\t\tresponse.close();\t\t\t\t\t\t//closing response.\r\n\t\t\tbr.close();\t\t\t\t\t\t\t\t//closing buffered reader\r\n\t\t\t\r\n\t\t\t//returning response code\r\n\t\t\treturn response.getStatusLine().getStatusCode();\r\n\t\r\n\t}", "@Override\n\tprotected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t logger.error(\"BISHUNNN CALLED\");\n\t\tString category = request.getParameter(\"category\").trim();\n\t\tGetHttpCall getHttpCall = new GetHttpCall();\n\t\turl = APIConstants.baseURL+category.toLowerCase();\n\t\tresponseString = getHttpCall.execute(url);\n\t\tresponse.getWriter().write(responseString);\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n //processRequest(request, response);\r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tPrintWriter out = resp.getWriter();\n\t\tout.print(\"<h1>Hello from your doGet method!</h1>\");\n\t}", "public void doGet(HttpServletRequest request,\n HttpServletResponse response)\n throws IOException, ServletException {\n response.setContentType(TYPE_TEXT_HTML.label);\n response.setCharacterEncoding(UTF8.label);\n request.setCharacterEncoding(UTF8.label);\n String path = request.getRequestURI();\n logger.debug(RECEIVED_REQUEST + path);\n Command command = null;\n try {\n command = commands.get(path);\n command.execute(request, response);\n } catch (NullPointerException e) {\n logger.error(REQUEST_PATH_NOT_FOUND);\n request.setAttribute(JAVAX_SERVLET_ERROR_STATUS_CODE, 404);\n command = commands.get(EXCEPTION.label);\n command.execute(request, response);\n }\n }", "public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString search = req.getParameter(\"searchBook\");\n\t\tString output=search;\n\n\t\t//redirect output to view search.jsp\n\t\treq.setAttribute(\"output\", output);\n\t\tresp.setContentType(\"text/json\");\n\t\tRequestDispatcher view = req.getRequestDispatcher(\"search.jsp\");\n\t\tview.forward(req, resp);\n\t\t\t\n\t}", "public void doGet( HttpServletRequest request, HttpServletResponse response )\n throws ServletException, IOException\n {\n handleRequest( request, response, false );\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response handleGet() {\n Gson gson = GSONFactory.getInstance();\n List allEmployees = getAllEmployees();\n\n if (allEmployees == null) {\n allEmployees = new ArrayList();\n }\n\n Response response = Response.ok().entity(gson.toJson(allEmployees)).build();\n return response;\n }", "@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\tsuper.doGet(request, response);\t\t\t\n\t}", "private static String sendGET(String getURL) throws IOException {\n\t\tURL obj = new URL(getURL);\n\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\t\tcon.setRequestMethod(\"GET\");\n\t\tString finalResponse = \"\";\n\n\t\t//This way we know if the request was processed successfully or there was any HTTP error message thrown.\n\t\tint responseCode = con.getResponseCode();\n\t\tSystem.out.println(\"GET Response Code : \" + responseCode);\n\t\tif (responseCode == HttpURLConnection.HTTP_OK) { // success\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t\tString inputLine;\n\t\t\tStringBuffer buffer = new StringBuffer();\n\n\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\tbuffer.append(inputLine);\n\t\t\t}\n\t\t\tin.close();\n\n\t\t\t// print result\n\t\t\tfinalResponse = buffer.toString();\n\t\t} else {\n\t\t\tSystem.out.println(\"GET request not worked\");\n\t\t}\n\t\treturn finalResponse;\n\t}", "@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}", "public BufferedReader reqGet(final String route) throws\n ServerStatusException, IOException {\n System.out.println(\"first reqGet\");\n return reqGet(route, USER_AGENT);\n }", "HttpGet getRequest(HttpServletRequest request, String address) throws IOException;", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}", "protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\r\n\r\n try {\r\n switch (action)\r\n {\r\n case \"/getUser\":\r\n \tgetUser(request, response);\r\n break;\r\n \r\n }\r\n } catch (Exception ex) {\r\n throw new ServletException(ex);\r\n }\r\n }", "@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}", "@Test\r\n\tpublic void doGet() throws Exception {\n\t\tCloseableHttpClient httpClient = HttpClients.createDefault();\r\n\t\t// Create a GET object and pass a url to it\r\n\t\tHttpGet get = new HttpGet(\"http://www.google.com\");\r\n\t\t// make a request\r\n\t\tCloseableHttpResponse response = httpClient.execute(get);\r\n\t\t// get response as result\r\n\t\tSystem.out.println(response.getStatusLine().getStatusCode());\r\n\t\tHttpEntity entity = response.getEntity();\r\n\t\tSystem.out.println(EntityUtils.toString(entity));\r\n\t\t// close HttpClient\r\n\t\tresponse.close();\r\n\t\thttpClient.close();\r\n\t}", "private void requestGet(String endpoint, Map<String, String> params, RequestListener listener) throws Exception {\n String requestUri = Constant.API_BASE_URL + ((endpoint.indexOf(\"/\") == 0) ? endpoint : \"/\" + endpoint);\n get(requestUri, params, listener);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint i = request.getRequestURI().lastIndexOf(\"/\") + 1;\n\t\tString action = request.getRequestURI().substring(i);\n\t\tSystem.out.println(action);\n\t\t\n\t\tString view = \"Error\";\n\t\tObject model = \"service Non disponible\";\n\t\t\n\t\tif (action.equals(\"ProductsList\")) {\n\t\t\tview = productAction.productsList();\n\t\t\tmodel = productAction.getProducts();\n\t\t}\n\t\t\n\t\trequest.setAttribute(\"model\", model);\n\t\trequest.getRequestDispatcher(prefix + view + suffix).forward(request, response); \n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t throws ServletException, IOException {\n\tprocessRequest(request, response);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tcommandAction(request,response);\r\n\t}" ]
[ "0.7589609", "0.71665615", "0.71148175", "0.705623", "0.7030174", "0.70291144", "0.6995984", "0.697576", "0.68883485", "0.6873811", "0.6853569", "0.6843572", "0.6843572", "0.6835363", "0.6835363", "0.6835363", "0.68195957", "0.6817864", "0.6797789", "0.67810035", "0.6761234", "0.6754993", "0.6754993", "0.67394847", "0.6719924", "0.6716244", "0.67054695", "0.67054695", "0.67012346", "0.6684415", "0.6676695", "0.6675696", "0.6675696", "0.66747975", "0.66747975", "0.6669016", "0.66621476", "0.66621476", "0.66476154", "0.66365504", "0.6615004", "0.66130257", "0.6604073", "0.6570195", "0.6551141", "0.65378064", "0.6536579", "0.65357745", "0.64957607", "0.64672184", "0.6453189", "0.6450501", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.6411481", "0.64067316", "0.6395873", "0.6379907", "0.63737476", "0.636021", "0.6356937", "0.63410467", "0.6309468", "0.630619", "0.630263", "0.63014317", "0.6283933", "0.62738425", "0.62680805", "0.62585783", "0.62553537", "0.6249043", "0.62457556", "0.6239428", "0.6239428", "0.62376446", "0.62359244", "0.6215947", "0.6207376", "0.62067443", "0.6204527", "0.6200444", "0.6199078", "0.61876005", "0.6182614", "0.61762017", "0.61755335", "0.61716276", "0.6170575", "0.6170397", "0.616901" ]
0.62125194
87
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "public void doPost( )\n {\n \n }", "@Override\n public String getMethod() {\n return \"POST\";\n }", "public String post();", "@Override\n\tpublic void doPost(HttpRequest request, AbstractHttpResponse response)\n\t\t\tthrows IOException {\n\t\t\n\t}", "@Override\n public String getMethod() {\n return \"POST\";\n }", "public ResponseTranslator post() {\n setMethod(\"POST\");\n return doRequest();\n }", "protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n }", "public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException {\n\n\t}", "public void postData() {\n\n\t}", "@Override\n public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {\n logger.warn(\"doPost Called\");\n handle(req, res);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metPost(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tpublic void postHandle(WebRequest request, ModelMap model) throws Exception {\n\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\t\r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}", "@Override\n\tprotected void handlePostBody(HashMap<String, HashMap<String, String>> params, DataFormat format) throws Exception {\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n }", "@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n\n\tpublic void handlePOST(CoapExchange exchange) {\n\t\tFIleStream read = new FIleStream();\n\t\tread.tempWrite(Temp_Path, exchange.getRequestText());\n\t\texchange.respond(ResponseCode.CREATED, \"POST successfully!\");\n\t\t_Logger.info(\"Receive post request:\" + exchange.getRequestText());\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.getWriter().println(\"go to post method in manager\");\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "public abstract boolean handlePost(FORM form, BindException errors) throws Exception;", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.doPost(req, resp);\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\n\t\t\t\n\t\t \n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "public void processPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n }", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\n\t}", "public void doPost(HttpServletRequest request ,HttpServletResponse response){\n\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "public void post(){\n\t\tHttpClient client = new HttpClient();\n\n\t\tPostMethod post = new PostMethod(\"http://211.138.245.85:8000/sso/POST\");\n//\t\tPostMethod post = new PostMethod(\"/eshopclient/product/show.do?id=111655\");\n//\t\tpost.addRequestHeader(\"Cookie\", cookieHead);\n\n\n\t\ttry {\n\t\t\tSystem.out.println(\"��������====\");\n\t\t\tint status = client.executeMethod(post);\n\t\t\tSystem.out.println(status);\n\t\t} catch (HttpException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n//\t\ttaskCount++;\n//\t\tcountDown--;\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"POST log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) {\r\n\t try {\r\n\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t } catch (IOException ex) {\r\n\t }\r\n\t logError( req, resp, new Exception(\"Unrecognized POST\"), \"\" );\r\n\t sendError(resp, \"Unrecognized POST\");\r\n\t} else\r\n\t if (\"post-request\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onMEVPostsRequest( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"MEV POST error\" );\r\n\t\t sendError( resp, \"MEV POST error: \" + e.toString() );\r\n\t\t}\r\n\t } else if (\"post-response\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onPVMPostsResponse( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"PVM POST error\" );\r\n\t\t sendError( resp, \"PVM POST error: \" + e.toString() );\r\n\t\t}\r\n\t }\r\n }", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest req, HttpServletResponse resp, Object handler, ModelAndView m)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}", "@Override\n public final void doPost() {\n try {\n checkPermissions(getRequest());\n final IItem jSonStreamAsItem = getJSonStreamAsItem();\n final IItem outputItem = api.runAdd(jSonStreamAsItem);\n\n output(JSonItemWriter.itemToJSON(outputItem));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }", "@Override\n\tvoid post() {\n\t\t\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\tSystem.out.println(\"=========interCpetor Post=========\");\r\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString method = request.getParameter(\"method\");\n\t\tswitch(method){\n\t\tcase \"Crawl\":\n\t\t\tcrawl(request, response);\n\t\t\tbreak;\n\t\tcase \"Extract\":\n\t\t\textract(request, response);\n\t\t\tbreak;\n\t\tcase \"JDBC\":\n\t\t\tjdbc(request, response);\n\t\t\tbreak;\n\t\tcase \"Indexer\":\n\t\t\tindexer(request, response);\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste dopost\");\r\n }", "protected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response)\r\n\t/* 43: */throws ServletException, IOException\r\n\t/* 44: */{\r\n\t\t/* 45:48 */doGet(request, response);\r\n\t\t/* 46: */}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tprocess(req, resp);\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tprocess(req,resp);\r\n\t}", "public void handlePost(SessionSrvc session, IObjectContext context)\n throws Exception\n {\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tdoGet(request, response);\r\n\t}", "@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}", "@Override\n protected void doPost\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (JSONException ex) {\r\n Logger.getLogger(PDCBukUpload.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\r\n protected void doPost(HttpServletRequest request,\r\n HttpServletResponse response)\r\n throws ServletException,\r\n IOException {\r\n processRequest(request,\r\n response);\r\n\r\n }", "@Override\r\n\tpublic void doPost(CustomHttpRequest request, CustomHttpResponse response) throws Exception {\n\t\tdoGet(request, response);\r\n\t}", "@Override\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response,\n\t\t\tObject handler, ModelAndView modelAndView) throws Exception {\n\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoHandle(request, response);\n\t}", "private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n public void postHandle(HttpServletRequest request,\n HttpServletResponse response, Object handler,\n ModelAndView modelAndView) throws Exception {\n\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (Exception ex) {\n Logger.getLogger(PedidoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }" ]
[ "0.73289514", "0.71383566", "0.7116213", "0.7105215", "0.7100045", "0.70236707", "0.7016248", "0.6964149", "0.6889435", "0.6784954", "0.67733276", "0.67482096", "0.66677034", "0.6558593", "0.65582114", "0.6525548", "0.652552", "0.652552", "0.652552", "0.65229493", "0.6520197", "0.6515622", "0.6513045", "0.6512626", "0.6492367", "0.64817846", "0.6477479", "0.64725804", "0.6472099", "0.6469389", "0.6456206", "0.6452577", "0.6452577", "0.6452577", "0.6450273", "0.6450273", "0.6438126", "0.6437522", "0.64339423", "0.64253825", "0.6422238", "0.6420897", "0.6420897", "0.6420897", "0.6407662", "0.64041835", "0.64041835", "0.639631", "0.6395677", "0.6354875", "0.63334197", "0.6324263", "0.62959254", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6288832", "0.6280875", "0.6272104", "0.6272104", "0.62711537", "0.62616795", "0.62544584", "0.6251865", "0.62274224", "0.6214439", "0.62137586", "0.621211", "0.620854", "0.62023044", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61775357", "0.61638993", "0.61603814", "0.6148914", "0.61465937", "0.61465937", "0.614548", "0.6141879", "0.6136717", "0.61313903", "0.61300284", "0.6124381", "0.6118381", "0.6118128", "0.61063534", "0.60992104", "0.6098801", "0.6096766" ]
0.0
-1
Returns a short description of the servlet.
@Override public String getServletInfo() { return "Short description"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getServletInfo()\n {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}", "@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo()\n {\n return \"Short description\";\n }", "@Override\r\n\tpublic String getServletInfo() {\r\n\t\treturn \"Short description\";\r\n\t}", "@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n return \"Short description\";\n }" ]
[ "0.8763708", "0.8732414", "0.8732414", "0.8732414", "0.8732414", "0.8732414", "0.8732414", "0.8732414", "0.8732414", "0.8732414", "0.8732414", "0.86993164", "0.86993164", "0.86993164", "0.86993164", "0.86993164", "0.86993164", "0.85319316", "0.85319316", "0.85287464", "0.85287464", "0.85287464", "0.85282564", "0.85282564", "0.85282564", "0.85282564", "0.85282564", "0.85282564", "0.85176504", "0.8512932", "0.85120165", "0.85110646", "0.8497134" ]
0.0
-1
Creates new form ConfEGTaskPanel
public ConfEGTaskPanel() { initComponents(); initListenerButton(); initState(); initApplyCellCheckBox(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void makePanelTask() {\r\n if (panelTask == null) {\r\n panelTask = makePanel(jframe, BorderLayout.CENTER,\r\n \"Task Details\", 180, 50, 200, 25);\r\n\r\n JLabel createLabelName = makeJLabel(\"Name: \", 10, 100, 80, 25);\r\n JLabel createLabelDescription = makeJLabel(\"Description: \", 10, 130, 80, 25);\r\n JLabel createLabelDueDate = makeJLabel(\"Due Date: \", 10, 160, 80, 25);\r\n JLabel createLabelPriority = makeJLabel(\"Priority Level: \", 10, 190, 80, 25);\r\n\r\n addToTodoTaskGui(createLabelName, createLabelDescription, createLabelDueDate, createLabelPriority);\r\n\r\n JButton clickSave = makeButton(\"saveTask\", \"Save\", 80, 250, 150, 25,\r\n JComponent.BOTTOM_ALIGNMENT, \"cli.wav\");\r\n panelTask.add(clickSave);\r\n\r\n JButton clickCancel = makeButton(\"cancelTask\", \"Cancel\", 280, 250, 150, 25,\r\n JComponent.BOTTOM_ALIGNMENT, \"cli.wav\");\r\n panelTask.add(clickCancel);\r\n }\r\n }", "public TaskMasterPanel()\n\t{\n\t\tJPanel controlPanel = new JPanel();\n\t\tdescriptionField = new JTextField(15);\n\t\tthis.setPreferredSize(new Dimension(500, 400));\n\t\tthis.setBackground(Color.GRAY);\n\t\tsetLayout(new BorderLayout());\n\t\tlistPanel = new ToDoListPanel(\"Activity 19 List\");\n\t\ttoDoListScrollPane = new JScrollPane(listPanel);\n\t\ttoDoListScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n\t\ttoDoListScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n\t\tthis.add(toDoListScrollPane, BorderLayout.CENTER);\n\t\tlistPanel.addTask(new Task(\"Activity 19\"));\n\t\tlistPanel.addTask(new Task(\"Activity 20\"));\n\t\tlistPanel.addTask(new Task(\"Activity 21\"));\n\t\tthis.addTask = new JButton(\"Add Task\");\n\t\tthis.getWork = new JButton(\"Get Work\");\n\t\tthis.addTask.addActionListener(new AddTaskButtonListener());\n\t\tthis.getWork.addActionListener(new GetWorkButtonListener());\n\t\tcontrolPanel.add(descriptionField);\n\t\tcontrolPanel.add(addTask);\n\t\tcontrolPanel.add(getWork);\n\t\tthis.add(controlPanel, BorderLayout.SOUTH);\n\t}", "public void newTask() {\r\n\r\n todoTaskGui(\"Create\", null);\r\n }", "private void addTask(JPanel panel,Tasks task){\n Task taskPane = new Task(task, this.agenda.getConnector());\n this.setUpSize(taskPane,1920,50,AgendaConstants.ALL);\n panel.add(taskPane);\n if(add) {\n agenda.getConnector().addTask(task);\n }\n this.updateComponent(panel);\n }", "private void addToTodoTaskGui(JLabel createLabelName, JLabel createLabelDescription,\r\n JLabel createLabelDueDate, JLabel createLabelPriority) {\r\n panelTask.add(createLabelName);\r\n panelTask.add(createLabelDescription);\r\n panelTask.add(createLabelDueDate);\r\n panelTask.add(createLabelPriority);\r\n panelTask.add(textFieldDueDate);\r\n\r\n panelTask.add(textFieldName);\r\n panelTask.add(textFieldDescription);\r\n panelTask.add(textFieldDueDate);\r\n panelTask.add(comboPriority);\r\n\r\n }", "public CreateNewEventJPanel() {\n }", "public AddNewJobPanel() {\n initComponents();\n\n DateTime now = new DateTime();\n initializeComboBoxes();\n }", "public Project_Create_Process() {\n initComponents();\n }", "public AbstractProjectTaskPanel(String title, Model model, int width, int height, Color colour) {\n this.model = model;\n setLayout(null);\n this.setSize(width, height);\n this.setBorder(BorderFactory.createLineBorder(colour));\n\n JLabel panelLabel = new JLabel(title, SwingConstants.CENTER);\n panelLabel.setBounds(0, 2, width, 15);\n panelLabel.setForeground(colour);\n panelLabel.setFocusable(false);\n this.add(panelLabel);\n\n JLabel titleLabel = new JLabel(\"Title:\");\n titleLabel.setBounds(5, 22, FIELD_START - 2, 15);\n titleLabel.setFocusable(false);\n this.add(titleLabel);\n titleEntry = new JTextField();\n titleEntry.setBounds(FIELD_START, 18, 240, 20);\n this.add(titleEntry);\n \n JLabel descriptionLabel = new JLabel(\"Description:\");\n descriptionLabel.setBounds(5, 40, FIELD_START - 2, 15);\n descriptionLabel.setFocusable(false);\n this.add(descriptionLabel);\n descriptionEntry = new JTextField();\n descriptionEntry.setBounds(FIELD_START, 38, 340, 20);\n this.add(descriptionEntry);\n\n JLabel parentLabel = new JLabel(\"Parent: \");\n parentLabel.setBounds(5, 60, FIELD_START - 2, 15);\n parentLabel.setFocusable(false);\n this.add(parentLabel);\n parentEntry = new JComboBox<>();\n parentEntry.setModel(model.getProjectComboBoxModel());\n parentEntry.setBounds(FIELD_START, 58, 240, 20);\n this.add(parentEntry);\n\n JLabel due_Date = new JLabel(\"Due Date: \");\n due_Date.setBounds(5, 80, FIELD_START - 2, 15);\n due_Date.setFocusable(false);\n this.add(due_Date);\n\n dueDateModel = new UtilCalendarModel();\n JDatePanelImpl dueDatePanel = new JDatePanelImpl(dueDateModel);\n JDatePickerImpl dueDatePicker = new JDatePickerImpl(dueDatePanel);\n dueDatePicker.setBounds(FIELD_START, 74, 150, 22);\n this.add(dueDatePicker);\n\n addButton = new JButton(\"Add\");\n addButton.setBounds(width - 65, height - 25, 60, 20);\n addButton.setEnabled(true);\n addButton.addActionListener(this::addProjectTask);\n this.add(addButton);\n\n modifyButton = new JButton(\"Modify\");\n modifyButton.setBounds(width - 65, height - 25, 60, 20);\n modifyButton.setEnabled(false);\n modifyButton.setVisible(false);\n modifyButton.addActionListener(this::modifyProjectTask);\n this.add(modifyButton);\n \n model.addSelectionListener(this::treeSelectionChanged);\n }", "public ToDoPanel() {\n this.setLayout(new BorderLayout());\n this.text = ResourceBundle.getBundle((\"i18n/todoStrings\"));\n\n taskList = new JPanel(new GridLayout(0, 1, 10, 10));\n buttonPanel = new JPanel();\n\n newTaskButton = new JButton(text.getString(\"newTaskString\"));\n newTaskButton.setPreferredSize(new Dimension(300, 100));\n buttonPanel.add(newTaskButton);\n\n ToDoPanelButtonListener listenerNewTask = new ToDoPanelButtonListener(this);\n newTaskButton.addActionListener(listenerNewTask);\n\n this.add(taskList, BorderLayout.CENTER);\n this.add(buttonPanel, BorderLayout.SOUTH);\n }", "public Project_Create() {\n initComponents();\n }", "public TaskDetailUpdateForm() {\n initComponents();\n }", "public CreateAccountPanel() {\n initComponents();\n initializeDateChooser();\n }", "public void createNewTask(View view) {\n try{\n newTaskLayout.checkTaskLayoutIsValid();\n ImageView taskImage = (ImageView) findViewById(R.id.imageViewBoard);\n String layoutImagePath = takeScreenshot(taskImage);\n newTaskLayout.setImagePath(layoutImagePath);\n\n // save new task\n HashMap<String, Integer> instructions = convertSpinnersToHashMap();\n Task newTask = new Task(newTaskLayout, instructions);\n Task.saveTask(getApplicationContext(), newTask);\n\n // alert user task created and return to task menu.\n Toast.makeText(this, \"new task created\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(getApplicationContext(), TaskOptionsActivity.class));\n } catch (TaskLayoutException | InstructionsRequiredException e) {\n // layout was not valid on insufficient instructions set.\n makeMessageDialogue(e.getMessage());\n }\n }", "private Component doInit() {\n\t\tJXPanel panel = new JXPanel();\n\t\tpanel.setLayout(new BorderLayout());\n\n\t\t// create a label\n\t\tfinal JXLabel label = new JXLabel();\n\t\tlabel.setFont(new Font(\"Segoe UI\", Font.BOLD, 14));\n\t\tlabel.setText(\"task pane item 1 : a label\");\n\t\tlabel.setIcon(Images.NetworkDisconnected.getIcon(32, 32));\n\t\tlabel.setHorizontalAlignment(JXLabel.LEFT);\n\t\tlabel.setBackgroundPainter(getPainter());\n\n\t\t// tweak with the UI defaults for the taskpane and taskpanecontainer\n\t\tchangeUIdefaults();\n\n\t\t// create a taskpanecontainer\n\t\tJXTaskPaneContainer taskpanecontainer = new JXTaskPaneContainer();\n\n\t\t// create a taskpane, and set it's title and icon\n\t\tJXTaskPane taskpane = new JXTaskPane();\n\t\ttaskpane.setTitle(\"My Tasks\");\n\t\ttaskpane.setIcon(Images.Quit.getIcon(24, 24));\n\n\t\t// add various actions and components to the taskpane\n\t\ttaskpane.add(label);\n\t\ttaskpane.add(new AbstractAction() {\n\t\t\tprivate static final long serialVersionUID = -7314920635669764914L;\n\t\t\t{\n\t\t\t\tputValue(Action.NAME, \"task pane item 2 : an action\");\n\t\t\t\tputValue(Action.SHORT_DESCRIPTION, \"perform an action\");\n\t\t\t\tputValue(Action.SMALL_ICON,\n\t\t\t\t\t\tImages.NetworkConnected.getIcon(32, 32));\n\t\t\t}\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlabel.setText(\"an action performed\");\n\t\t\t}\n\t\t});\n\n\t\t// add the task pane to the taskpanecontainer\n\t\ttaskpanecontainer.add(taskpane);\n\n\t\t// set the transparency of the JXPanel to 50% transparent\n\t\tpanel.setAlpha(0.7f);\n\n\t\tpanel.add(taskpanecontainer, BorderLayout.CENTER);\n\t\tpanel.setPreferredSize(new Dimension(250, 200));\n\n\t\treturn panel;\n\t}", "private JPanel buildMainPanel() {\n FormLayout layout = new FormLayout(\"pref:grow\",\n \"pref, 3dlu, pref, 3dlu, pref, 12dlu, pref, 3dlu, pref, pref, \"\n + \"pref, pref, 9dlu, pref, 3dlu, pref, \"\n + \"pref, pref, pref, 0:grow, pref\");\n\n PanelBuilder builder = new PanelBuilder(layout);\n // Bottom border\n builder.setBorder(Borders.createEmptyBorder(\"1dlu, 3dlu, 2dlu, 3dlu\"));\n CellConstraints cc = new CellConstraints();\n\n int row = 1;\n\n builder.addSeparator(Translation.getTranslation(\"status_tab.status\"),\n cc.xy(1, row));\n row += 2;\n builder.add(synchronizationStatusLabel, cc.xy(1, row));\n row += 2;\n builder.add(synchronizationDateLabel, cc.xy(1, row));\n row += 2;\n\n builder.addSeparator(Translation.getTranslation(\"status_tab.you_have\"),\n cc.xy(1, row));\n row += 2;\n builder.add(newNoticesLine.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(filesAvailableLine.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(downloadsLine.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(uploadsLine.getUIComponent(), cc.xy(1, row));\n row += 2;\n\n builder.addSeparator(\n Translation.getTranslation(\"status_tab.online_storage.title\"),\n cc.xy(1, row));\n row += 2;\n builder.add(onlineStorageAccountLabel.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(onlineStorageSection.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(licenseInfoSection.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(buyNowLabel.getUIComponent(), cc.xy(1, row));\n if (PreferencesEntry.SHOW_TELL_A_FRIEND\n .getValueBoolean(getController()))\n {\n row += 2;\n builder.add(tellFriendLabel.getUIComponent(), cc.xy(1, row));\n }\n\n return builder.getPanel();\n }", "public ProcedureFormPanel() {\n initComponents();\n }", "public NewJFrame() {\n initComponents();\n \n \n //combo box\n comboCompet.addItem(\"Séléction officielle\");\n comboCompet.addItem(\"Un certain regard\");\n comboCompet.addItem(\"Cannes Courts métrages\");\n comboCompet.addItem(\"Hors compétitions\");\n comboCompet.addItem(\"Cannes Classics\");\n \n \n //redimension\n this.setResizable(false);\n \n planning = new Planning();\n \n \n }", "private void btnNewActionPerformed(java.awt.event.ActionEvent evt) {\n\n initPanel();\n }", "public TemporizadorPanel() {\n initComponents();\n }", "public NewJPanel() {\n initComponents();\n }", "public NewJPanel() {\n initComponents();\n }", "private void createSchedulePanel()\n\t{\n\t\t//newWeek=new Week(selectedId);\n\t\t//contentPane.add(newWeek,BorderLayout.SOUTH);\n\t\t//System.out.println(\"first time load:\"+selectedId);\n\t\tschedule=new Schedule(selectedId, isSprinklerSelected);\n\t\tschedulePane=new JPanel();\n\t\tschedulePane.setLayout(new FlowLayout(FlowLayout.CENTER));\n\t\tschedulePane.add(schedule);\n\t\tcontentPane.add(schedulePane,BorderLayout.CENTER);//add to content pane\n\t}", "public JPanelCreateClient() {\r\n\t\tsuper(new BorderLayout());\r\n\t\tthis.title = new CustomLabel(ConstantView.TITLE_CREATE_CLIENT, null, Color.decode(\"#2E5569\"));\r\n\t\tthis.okButton = new JButton(\"REGISTRAR CLIENTE\");\r\n\t\tthis.returnButton = new JButton(ConstantView.BUTTON_RETURN_SIGNIN);\r\n\t\tthis.jPanelFormClient = new JPanelFormClient();\r\n\t\tControlClient.getInstance().setjPanelCreateClient(this);\r\n\t\tthis.init();\r\n\t}", "public JPanel createPanel() {\n\t\t\r\n\t\tJPanel mainPanel = new JPanel();\r\n\t\tmainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));\r\n\t\tmainPanel.setBackground(Color.WHITE);\r\n\t\tmainPanel.setBorder(new CompoundBorder(\r\n\t\t\t\tBorderFactory.createLineBorder(new Color(0x3B70A3), 4),\r\n\t\t\t\tnew EmptyBorder(10, 20, 10, 20)));\r\n\r\n\t\t/*\r\n\t\t * Instruction\r\n\t\t */\t\r\n\t\tmainPanel.add(instructionPanel());\r\n\t\t\r\n\t\t\r\n\t\t// TODO: set task order for each group - make first 3 tasks = groups tasks\r\n\t\tmainPanel.add(messagesPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(phonePanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(clockPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(cameraPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\t\r\n\r\n\t\tmainPanel.add(contactPanel());\r\n\t\tmainPanel.add(Box.createRigidArea(new Dimension(this.getWidth(), 5)));\r\n\r\n\t\tmainPanel.add(galleryPanel());\r\n\t\t\r\n\t\treturn mainPanel;\r\n\t}", "private void makePanelList() {\r\n if (panelList == null) {\r\n panelList = makePanel(jframe, BorderLayout.CENTER,\r\n \"List of Tasks\", 180, 50, 200, 25);\r\n list = makeList(10, 10, 100, 470, 500);\r\n\r\n JButton clickUpdate = makeButton(\"updateTask\", \"Update\",\r\n 20, 620, 100, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n\r\n JButton clickDelete = makeButton(\"deleteTask\", \"Delete\",\r\n 125, 620, 100, 25, JComponent.CENTER_ALIGNMENT, null);\r\n\r\n JButton clickComplete = makeButton(\"completeTask\", \"Complete\",\r\n 230, 620, 100, 25, JComponent.CENTER_ALIGNMENT, null);\r\n\r\n JButton clickIncomplete = makeButton(\"IncompleteTask\", \"UndoComplete\",\r\n 335, 620, 130, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n\r\n JButton clickCreate = makeButton(\"newTask\", \"Create A Task\",\r\n 175, 670, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n\r\n JButton showComplete = makeButton(\"showComplete\", \"Show Completed\",\r\n 175, 700, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n showComplete.getModel().setPressed(showCompleted);\r\n\r\n JButton clickSave = makeButton(\"saveTodo\", \"Save List\",\r\n 175, 730, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n\r\n addElementsToPanelList(list, clickUpdate, clickDelete, clickComplete, clickIncomplete, clickCreate,\r\n showComplete, clickSave);\r\n }\r\n }", "private void setupForm() {\n\t\tlabelIp = new JLabel(\"IP Address:\");\n\t\tconstraints.gridx = 0;\n\t\tconstraints.gridy = 0;\n\t\tadd(labelIp, constraints);\t\n\t\tfieldIp = new JTextField(30);\n\t\tfieldIp.setText(DataStore.getInstance().getConfig().getIPAddr());\n\t\tconstraints.gridx = 1;\n\t\tconstraints.fill = GridBagConstraints.HORIZONTAL;\n\t\tadd(fieldIp, constraints);\n\t\t\n\t\tlabelPort = new JLabel(\"Port number: \");\n\t\tconstraints.gridx = 0;\n\t\tconstraints.gridy = 1;\n\t\tadd(labelPort, constraints);\t\n\t\tfieldPort = new JTextField(30);\n\t\tfieldPort.setText(DataStore.getInstance().getConfig().getPort());\n\t\tconstraints.gridx = 1;\n\t\tconstraints.fill = GridBagConstraints.HORIZONTAL;\n\t\tadd(fieldPort, constraints);\n\t\t\n\t\tlabelEmail = new JLabel(\"User Email:\");\n\t\tconstraints.gridx = 0;\n\t\tconstraints.gridy = 2;\n\t\tadd(labelEmail, constraints);\t\n\t\tfieldEmail = new JTextField(30);\n\t\tfieldEmail.setText(DataStore.getInstance().getConfig().getEAddr());\n\t\tconstraints.gridx = 1;\n\t\tconstraints.fill = GridBagConstraints.HORIZONTAL;\n\t\tadd(fieldEmail, constraints);\n\t\t\n\t\tlabelPass = new JLabel(\"Password: \");\n\t\tconstraints.gridx = 0;\n\t\tconstraints.gridy = 3;\n\t\tadd(labelPass, constraints);\n\t\tfieldPass = new JPasswordField(30);\n\t\tfieldPass.setText(DataStore.getInstance().getConfig().getpWrd());\n\t\tfieldPass.setEchoChar('*');\n\t\tconstraints.gridx = 1;\n\t\tconstraints.fill = GridBagConstraints.HORIZONTAL;\n\t\tadd(fieldPass, constraints);\n\t\t\n\t\tJPanel buttonPanel = new JPanel();\n\t\tsaveButton = new ConfigSave(al, med, this);\n\t\tsaveButton.setFont(new Font(\"Arial\", Font.BOLD, 16));\n\t\tconstraints.gridx = 0;\n\t\tconstraints.gridy = 4;\n\t\tconstraints.gridheight = 2;\n\t\tconstraints.gridwidth = 2;\n\t\t\n\t\tbuttonPanel.add(saveButton);\n\t\t\n\t\tcancelButton = new CancelButton(al, med, this);\n\t\tcancelButton.setFont(new Font(\"ariel\", Font.BOLD, 14));\n\t\tconstraints.gridx = 0;\n\t\tconstraints.gridy = 4;\n\t\tconstraints.gridwidth = 2;\n\t\tconstraints.gridheight = 2;\n\t\tbuttonPanel.add(cancelButton);\n\t\t\n\t\tadd(buttonPanel, constraints);\n\t}", "public ControladorPanel() { }", "public CreateProjectPanel() {\n isFinished = true;\n }", "public PreferencesPanel() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n pnlFooter = new javax.swing.JPanel();\n btnFechar = new javax.swing.JButton();\n lblTask = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n mnuControl = new javax.swing.JToolBar();\n btnPlay = new javax.swing.JButton();\n jSeparator2 = new javax.swing.JToolBar.Separator();\n btnStop = new javax.swing.JButton();\n jSeparator1 = new javax.swing.JToolBar.Separator();\n lblTime = new javax.swing.JLabel();\n pgcIndo = new javax.swing.JTabbedPane();\n tblTask = new javax.swing.JPanel();\n scrollTaskInfo = new javax.swing.JScrollPane();\n edtTaskInfo = new javax.swing.JTextArea();\n tblParam = new javax.swing.JPanel();\n scrollParamInfo = new javax.swing.JScrollPane();\n edtParamInfo = new javax.swing.JTextArea();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblParameters = new javax.swing.JTable();\n jScrollPane2 = new javax.swing.JScrollPane();\n tblTasks = new javax.swing.JTable();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Service Execution\");\n setResizable(false);\n addComponentListener(new java.awt.event.ComponentAdapter() {\n public void componentShown(java.awt.event.ComponentEvent evt) {\n formComponentShown(evt);\n }\n });\n\n pnlFooter.setBackground(new java.awt.Color(192, 192, 192));\n\n btnFechar.setBackground(new java.awt.Color(192, 192, 192));\n btnFechar.setText(\"Close\");\n btnFechar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnFecharActionPerformed(evt);\n }\n });\n\n lblTask.setForeground(new java.awt.Color(255, 255, 255));\n lblTask.addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n lblTaskPropertyChange(evt);\n }\n });\n\n jButton1.setBackground(new java.awt.Color(192, 192, 192));\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/save-as-icon.png\"))); // NOI18N\n jButton1.setText(\"Save Results\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout pnlFooterLayout = new javax.swing.GroupLayout(pnlFooter);\n pnlFooter.setLayout(pnlFooterLayout);\n pnlFooterLayout.setHorizontalGroup(\n pnlFooterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlFooterLayout.createSequentialGroup()\n .addGap(297, 297, 297)\n .addComponent(lblTask, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnFechar, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n pnlFooterLayout.setVerticalGroup(\n pnlFooterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlFooterLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(pnlFooterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnFechar)\n .addComponent(lblTask)\n .addComponent(jButton1))\n .addContainerGap())\n );\n\n mnuControl.setFloatable(false);\n mnuControl.setRollover(true);\n\n btnPlay.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/control-play-blue-icon32.png\"))); // NOI18N\n btnPlay.setText(\"Start\");\n btnPlay.setFocusable(false);\n btnPlay.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);\n btnPlay.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n btnPlay.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnPlayActionPerformed(evt);\n }\n });\n mnuControl.add(btnPlay);\n mnuControl.add(jSeparator2);\n\n btnStop.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/control-stop-blue-icon32.png\"))); // NOI18N\n btnStop.setText(\"Stop\");\n btnStop.setEnabled(false);\n btnStop.setFocusable(false);\n btnStop.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);\n btnStop.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n btnStop.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnStopActionPerformed(evt);\n }\n });\n mnuControl.add(btnStop);\n mnuControl.add(jSeparator1);\n\n lblTime.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/time-icon.png\"))); // NOI18N\n lblTime.setText(\"Time Elapsed [00:00:00]\");\n lblTime.setEnabled(false);\n mnuControl.add(lblTime);\n\n pgcIndo.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n edtTaskInfo.setEditable(false);\n edtTaskInfo.setColumns(20);\n edtTaskInfo.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n edtTaskInfo.setRows(5);\n edtTaskInfo.setWrapStyleWord(true);\n edtTaskInfo.addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n edtTaskInfoPropertyChange(evt);\n }\n });\n scrollTaskInfo.setViewportView(edtTaskInfo);\n\n javax.swing.GroupLayout tblTaskLayout = new javax.swing.GroupLayout(tblTask);\n tblTask.setLayout(tblTaskLayout);\n tblTaskLayout.setHorizontalGroup(\n tblTaskLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(scrollTaskInfo, javax.swing.GroupLayout.DEFAULT_SIZE, 649, Short.MAX_VALUE)\n );\n tblTaskLayout.setVerticalGroup(\n tblTaskLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(scrollTaskInfo, javax.swing.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)\n );\n\n pgcIndo.addTab(\"Workflow Information\", new javax.swing.ImageIcon(getClass().getResource(\"/images/Services.png\")), tblTask); // NOI18N\n\n edtParamInfo.setEditable(false);\n edtParamInfo.setColumns(20);\n edtParamInfo.setFont(new java.awt.Font(\"Tahoma\", 0, 13)); // NOI18N\n edtParamInfo.setRows(5);\n edtParamInfo.setWrapStyleWord(true);\n scrollParamInfo.setViewportView(edtParamInfo);\n\n javax.swing.GroupLayout tblParamLayout = new javax.swing.GroupLayout(tblParam);\n tblParam.setLayout(tblParamLayout);\n tblParamLayout.setHorizontalGroup(\n tblParamLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(scrollParamInfo, javax.swing.GroupLayout.DEFAULT_SIZE, 649, Short.MAX_VALUE)\n );\n tblParamLayout.setVerticalGroup(\n tblParamLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(scrollParamInfo, javax.swing.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)\n );\n\n pgcIndo.addTab(\"Parameter Information\", new javax.swing.ImageIcon(getClass().getResource(\"/images/recycle-bag-icon.png\")), tblParam); // NOI18N\n\n tblParameters.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"\", \"Parameter\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tblParameters.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\n tblParameters.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n tblParametersMouseReleased(evt);\n }\n });\n jScrollPane1.setViewportView(tblParameters);\n if (tblParameters.getColumnModel().getColumnCount() > 0) {\n tblParameters.getColumnModel().getColumn(0).setResizable(false);\n tblParameters.getColumnModel().getColumn(0).setPreferredWidth(20);\n tblParameters.getColumnModel().getColumn(1).setResizable(false);\n tblParameters.getColumnModel().getColumn(1).setPreferredWidth(150);\n }\n\n tblTasks.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"\", \"Task\", \"Operation\", \"Connectors\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tblTasks.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);\n tblTasks.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n tblTasks.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n tblTasksMousePressed(evt);\n }\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n tblTasksMouseReleased(evt);\n }\n });\n jScrollPane2.setViewportView(tblTasks);\n if (tblTasks.getColumnModel().getColumnCount() > 0) {\n tblTasks.getColumnModel().getColumn(0).setResizable(false);\n tblTasks.getColumnModel().getColumn(0).setPreferredWidth(20);\n tblTasks.getColumnModel().getColumn(1).setResizable(false);\n tblTasks.getColumnModel().getColumn(1).setPreferredWidth(150);\n tblTasks.getColumnModel().getColumn(2).setResizable(false);\n tblTasks.getColumnModel().getColumn(2).setPreferredWidth(200);\n tblTasks.getColumnModel().getColumn(3).setResizable(false);\n tblTasks.getColumnModel().getColumn(3).setPreferredWidth(400);\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(pnlFooter, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(mnuControl, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(pgcIndo, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 515, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(mnuControl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 301, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(pgcIndo, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(pnlFooter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n setSize(new java.awt.Dimension(676, 636));\n setLocationRelativeTo(null);\n }", "public NewFetureKeyPanel() {\n initComponents();\n }", "public NewProjectDialog(String pt) {\n\t\t\t\n\t\t\tsuper(frame, \"Add new project\");\n\t\t\tresetFields();\n\t\t\tpType = pt;\n\t\t\t\n\t\t\tfinal JDialog npd = this;\n\t\t\t\n\t\t\tpSDate.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpDeadline.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpEndDate.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpBudget.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpTotalCost.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\tpCompletion.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\t\t\n\t\t\tint x = frame.getLocation().x;\n\t\t\tint y = frame.getLocation().y;\n\t\t\t\n\t\t\tint pWidth = frame.getSize().width;\n\t\t\tint pHeight = frame.getSize().height;\n\t\t\t\n\t\t\tgetContentPane().setLayout(new BorderLayout());\n\t\t\t\n\t\t\tfinal JPanel fieldPanel = new JPanel();\n\t\t\t\n\t\t\tpCode.setText(portfolio.getNewCode());\n\t\t\tpCode.setEditable(false);\n\t\t\t\n\t\t\tif(pType.equals(\"o\")) {\n\t\t\t\tfieldPanel.setLayout(new GridLayout(7,3));\n\t\t\t\tSystem.out.println(\"ongoing\");\n\t\t\t\tthis.setPreferredSize(new Dimension(600,230));\n\t\t\t} else if(pType.equals(\"f\")) {\n\t\t\t\tfieldPanel.setLayout(new GridLayout(6,3));\n\t\t\t\tSystem.out.println(\"finished\");\n\t\t\t\tthis.setPreferredSize(new Dimension(600,200));\n\t\t\t}\n\t\t\tfieldPanel.add(new JLabel(\"Project Code :\"));\n\t\t\tfieldPanel.add(pCode);\n\t\t\tfieldPanel.add(msgCode);\t\t\n\t\t\tfieldPanel.add(new JLabel(\"Project Name :\"));\n\t\t\tfieldPanel.add(pName);\n\t\t\tfieldPanel.add(msgName);\n\t\t\tfieldPanel.add(new JLabel(\"Client :\"));\n\t\t\tfieldPanel.add(pClient);\n\t\t\tfieldPanel.add(msgClient);\n\t\t\tfieldPanel.add(new JLabel(\"Start date: \"));\n\t\t\tfieldPanel.add(pSDate);\n\t\t\tfieldPanel.add(msgSDate);\n\t\t\tmsgSDate.setText(DATE_FORMAT);\n\t\t\t\n\t\t\tif(pType.equals(\"o\")) {\n\t\t\t\tfieldPanel.add(new JLabel(\"Deadline :\"));\n\t\t\t\tfieldPanel.add(pDeadline);\n\t\t\t\tfieldPanel.add(msgDeadline);\n\t\t\t\tmsgDeadline.setText(DATE_FORMAT);\n\t\t\t\tfieldPanel.add(new JLabel(\"Budget :\"));\n\t\t\t\tfieldPanel.add(pBudget);\n\t\t\t\tfieldPanel.add(msgBudget);\n\t\t\t\tfieldPanel.add(new JLabel(\"Completion :\"));\n\t\t\t\tfieldPanel.add(pCompletion);\t\t\t\n\t\t\t\tfieldPanel.add(msgCompletion);\n\t\t\t\t\n\t\t\t} else if(pType.equals(\"f\")) {\n\t\t\t\tfieldPanel.add(new JLabel(\"End Date :\"));\n\t\t\t\tfieldPanel.add(pEndDate);\n\t\t\t\tfieldPanel.add(msgEndDate);\n\t\t\t\tmsgEndDate.setText(DATE_FORMAT);\n\t\t\t\tfieldPanel.add(new JLabel(\"Total Cost :\"));\n\t\t\t\tfieldPanel.add(pTotalCost);\n\t\t\t\tfieldPanel.add(msgTotalCost);\n\t\t\t}\n\t\t\t\n\t\t\tJPanel optionButtons = new JPanel();\n\t\t\toptionButtons.setLayout(new FlowLayout());\n\t\t\t\n\t\t\tJButton btnAdd = new JButton(\"Add\");\n\t\t\tbtnAdd.addActionListener(new ActionListener() {\n\n\t\t\t\t/**\n\t\t\t\t * Validates the information entered by the user and adds the project to the\n\t\t\t\t * Portfolio object if data is valid.\n\t\t\t\t */\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tif(validateForm()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tProject prj = compileProject();\n\t\t\t\t\t\tportfolio.add(prj,config.isUpdateDB());\n\t\t\t\t\t\tif(prj instanceof OngoingProject) {\n\t\t\t\t\t\t\tProjectTableModel tm = (ProjectTableModel) opTable.getModel();\n\t\t\t\t\t\t\ttm.addRow(prj.toTable());\n\t\t\t\t\t\t\topTable.setModel(tm);\n\t\t\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\t\ttoggleSaved(false);\n\t\t\t\t\t\t\tsel.add(pCode.getText());\n\t\t\t\t\t\t} else if (prj instanceof FinishedProject) {\n\t\t\t\t\t\t\tProjectTableModel tm = (ProjectTableModel) fpTable.getModel();\n\t\t\t\t\t\t\ttm.addRow(prj.toTable());\n\t\t\t\t\t\t\tfpTable.setModel(tm);\n\t\t\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\t\ttoggleSaved(false);\n\t\t\t\t\t\t\tsel.add(pCode.getText());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnpd.dispose();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\toptionButtons.add(btnAdd);\n\t\t\t\n\t\t\tJButton btnClose = new JButton(\"Close\");\n\t\t\tbtnClose.addActionListener(new ActionListener() {\n\n\t\t\t\t/* Closes the NewProjectDialog window. */\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tnpd.dispose();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\toptionButtons.add(btnClose);\n\t\t\tgetContentPane().add(new JLabel(\"Enter the data for your new \" + getPType(pType) + \" project:\"), BorderLayout.PAGE_START);\n\t\t\tthis.add(fieldPanel, BorderLayout.CENTER);\n\t\t\tthis.add(optionButtons, BorderLayout.PAGE_END);\n\n\t\t\tthis.pack();\n\t\t\t\t\t\n\t\t\tint width = this.getSize().width;\n\t\t\tint height = this.getSize().height;\n\t\t\t\n\t\t\tthis.setLocation(new Point((x+pWidth/2-width/2),(y+pHeight/2-height/2)));\n\t\t\tthis.setVisible(true);\n\t\t}", "public ProcessWorkRequestJPanel() {\n initComponents();\n }", "public PreferencesPanel()\n {\n initComponents();\n CB_CHECK_NEW.setSelected( Main.get_long_prop(Preferences.CHECK_NEWS) > 0);\n CB_CACHE_MAILS.setSelected( Main.get_long_prop(Preferences.CACHE_MAILFILES) > 0);\n\n\n\n COMBO_UI.removeAllItems();\n ArrayList<String> ui_names = UI_Generic.get_ui_names();\n for (int i = 0; i < ui_names.size(); i++)\n {\n String string = ui_names.get(i);\n COMBO_UI.addItem(string);\n }\n\n last_ui = (int)Main.get_long_prop(Preferences.UI, 0l);\n if (last_ui < COMBO_UI.getItemCount())\n COMBO_UI.setSelectedIndex( last_ui );\n else\n COMBO_UI.setSelectedIndex( 0 );\n\n String ds = Main.get_prop( Preferences.DEFAULT_STATION );\n if (ds != null && ds.length() > 0)\n {\n ParseToken pt = new ParseToken(ds);\n String ip = pt.GetString(\"IP:\");\n long po = pt.GetLongValue(\"PO:\");\n boolean only_this = pt.GetBoolean(\"OT:\");\n TXT_SERVER_IP.setText(ip);\n if (po > 0)\n TXT_SERVER_PORT.setText(Long.toString(po) );\n CB_NO_SCANNING.setSelected(only_this);\n }\n\n String l_code = Main.get_prop( Preferences.COUNTRYCODE, \"DE\");\n\n if (l_code.compareTo(\"DE\") == 0)\n COMBO_LANG.setSelectedIndex(0);\n if (l_code.compareTo(\"EN\") == 0)\n COMBO_LANG.setSelectedIndex(1); \n }", "public void crearPanel(){\n\n panel = new JPanel();\n this.getContentPane().add(panel);\n panel.setBackground(Color.CYAN);\n panel.setLayout(null);\n }", "private void newTask()\n {\n \t//TODO add alarm\n \tTask task = new Task(taskName.getText().toString(), taskDetails.getText().toString());\n \tdb.createTask(task);\n \t//TODO Tie notification to an alarm\n \t//Create notification\n \tIntent notifyIntent = new Intent(this, TaskNotification.class);\n \tnotifyIntent.putExtra(\"title\", task.name); //add title name\n \tnotifyIntent.putExtra(\"id\", (int) task.id); //add id\n \tstartActivity(notifyIntent); //create the intent\n \t\n \trefreshData();\n }", "public FDRSettingsPanel() {\n initComponents();\n }", "private void todoTaskGui(String actionTitle, Task task) {\r\n panelSelectFile.setVisible(false);\r\n panelList.setVisible(false);\r\n jframe.setTitle(actionTitle);\r\n\r\n makePanelTask();\r\n populateFromTask(actionTitle, task);\r\n assignComponents();\r\n\r\n jframe.setTitle(\"Task View\");\r\n panelTask.setBackground(Color.WHITE);\r\n panelTask.setVisible(true);\r\n }", "public void createControl(Composite parent) {\n\t\tComposite comp = new Composite(parent, SWT.NONE);\r\n\t\tsetControl(comp);\r\n\r\n\t\tLaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_MAIN_TAB);\r\n\r\n\t\tGridLayout topLayout = new GridLayout();\r\n\t\ttopLayout.marginHeight = 10;\r\n\t\tcomp.setLayout(topLayout);\r\n\t\t\r\n\t\tcreateTargetCommGroup(comp, 1);\r\n\t\tcreateVerticalSpacer(comp, 1);\r\n\t\tcreateTargetInfoGroup(comp, 1);\r\n\t\t\r\n\t\tLaunchUIPlugin.setDialogShell(parent.getShell());\r\n\t}", "private void setupToDoPanel() {\n\t\tpnlToDo = new JPanel(new GridBagLayout());\n\t\tgc.fill = GridBagConstraints.HORIZONTAL;\n\t\tgc.anchor = GridBagConstraints.CENTER;\n\t\tgc.insets = new Insets(10, 10, 10, 10);\n\t\tgc.gridx = 0;\n\t\tfor (int i = 0; i < txtTodo.size(); i++) {\n\t\t\tgc.gridy = i;\n\t\t\tpnlToDo.add(txtTodo.get(i), gc);\n\t\t}\n\t\tgc.gridx = 1;\n\t\tfor (int i = 0; i < check.size(); i++) {\n\t\t\tgc.gridy = i;\n\t\t\tpnlToDo.add(check.get(i), gc);\n\t\t}\n\t\tscroll = new JScrollPane(pnlToDo);\n\n\t\tpnlButton = new JPanel();\n\t\tpnlButton.setLayout(new BoxLayout(pnlButton, BoxLayout.X_AXIS));\n\t\tpnlButton.add(Box.createHorizontalGlue());\n\t\tpnlButton.add(btnAddTask);\n\t\tpnlButton.add(Box.createRigidArea(new Dimension(5, 0)));\n\t\tpnlButton.add(btnSave);\n\t\tpnlButton.add(Box.createHorizontalGlue());\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tString description = descriptionField.getText();\n\t\t\tlistPanel.addTask(new Task(description));\n\t\t}", "public MainForm(IEngine engine) {\n\n this.engine = engine;\n generalConfigurationButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n PanelForm panelForm = new PanelForm(engine);\n panelForm.initialize();\n }\n });\n //preferencje\n edytujPreferencjeButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n Choice preferencje=new Choice(engine,preferences);\n }\n });\n\n generateButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n List<Group> g= DataLoader.loadGroups();\n List<Room> r = DataLoader.loadRooms();\n try {\n List<Teacher> t = DataLoader.loadTeachers(preferences);\n JOptionPane.showMessageDialog(new JFrame(), GenereteTametable.generuj(g,r,t) );\n }\n catch (Exception e)\n {\n JOptionPane.showMessageDialog(new JFrame(), \"Brak przedmiotu! \\n\" +\n \"Przedmioty odpowiadaja prowadzacy w kolejnosci wpisywania\\n\" +\n \"upewnij sie ze dane zostaly wprowadzone poprawnie!\");\n }\n\n }\n });\n }", "private void crearPanel() {\r\n\t\tJLabel lbl_Empresa = new JLabel(\"Empresa:\");\r\n\t\tlbl_Empresa.setBounds(10, 52, 72, 14);\r\n\t\tadd(lbl_Empresa);\r\n\r\n\t\ttxField_Empresa = new JTextField();\r\n\t\ttxField_Empresa.setBounds(116, 49, 204, 20);\r\n\t\tadd(txField_Empresa);\r\n\t\ttxField_Empresa.setColumns(10);\r\n\r\n\t\tlbl_Oferta = new JLabel(\" \");\r\n\t\tlbl_Oferta.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlbl_Oferta.setBounds(10, 11, 742, 20);\r\n\t\tadd(lbl_Oferta);\r\n\r\n\t\tJLabel lbl_sueldoMin = new JLabel(\"Sueldo Minimo:\");\r\n\t\tlbl_sueldoMin.setBounds(10, 83, 96, 14);\r\n\t\tadd(lbl_sueldoMin);\r\n\r\n\t\ttxField_sueldoMin = new JTextField();\r\n\t\ttxField_sueldoMin.setColumns(10);\r\n\t\ttxField_sueldoMin.setBounds(116, 80, 93, 20);\r\n\t\tadd(txField_sueldoMin);\r\n\r\n\t\tJLabel lbl_sueldoMax = new JLabel(\"Sueldo Maximo:\");\r\n\t\tlbl_sueldoMax.setBounds(10, 115, 96, 14);\r\n\t\tadd(lbl_sueldoMax);\r\n\r\n\t\ttxField_sueldoMax = new JTextField();\r\n\t\ttxField_sueldoMax.setColumns(10);\r\n\t\ttxField_sueldoMax.setBounds(116, 112, 93, 20);\r\n\t\tadd(txField_sueldoMax);\r\n\r\n\t\tJLabel lbl_experiencia = new JLabel(\"A\\u00F1os de experiencia minimos:\");\r\n\t\tlbl_experiencia.setBounds(10, 143, 185, 14);\r\n\t\tadd(lbl_experiencia);\r\n\r\n\t\ttxField_experiencia = new JTextField();\r\n\t\ttxField_experiencia.setColumns(10);\r\n\t\ttxField_experiencia.setBounds(205, 140, 93, 20);\r\n\t\tadd(txField_experiencia);\r\n\r\n\t\tJLabel lbl_aspectosValorar = new JLabel(\"Aspectos a valorar:\");\r\n\t\tlbl_aspectosValorar.setBounds(10, 178, 137, 14);\r\n\t\tadd(lbl_aspectosValorar);\r\n\r\n\t\ttxArea_aspectosValorar = new JTextArea();\r\n\t\ttxArea_aspectosValorar.setBorder(UIManager.getBorder(\"TextField.border\"));\r\n\t\ttxArea_aspectosValorar.setBounds(157, 172, 253, 41);\r\n\t\tadd(txArea_aspectosValorar);\r\n\r\n\t\tJLabel lbl_aspectosImpres = new JLabel(\"Aspectos imprescindibles:\");\r\n\t\tlbl_aspectosImpres.setBounds(10, 238, 133, 14);\r\n\t\tadd(lbl_aspectosImpres);\r\n\r\n\t\ttxArea_aspectosImpres = new JTextArea();\r\n\t\ttxArea_aspectosImpres.setBorder(UIManager.getBorder(\"TextField.border\"));\r\n\t\ttxArea_aspectosImpres.setBounds(157, 232, 253, 41);\r\n\t\tadd(txArea_aspectosImpres);\r\n\r\n\t\tJLabel lbl_descripcion = new JLabel(\"Descripcion:\");\r\n\t\tlbl_descripcion.setBounds(10, 302, 107, 14);\r\n\t\tadd(lbl_descripcion);\r\n\r\n\t\ttxArea_descripcion = new JTextArea();\r\n\t\ttxArea_descripcion.setBorder(UIManager.getBorder(\"TextField.border\"));\r\n\t\ttxArea_descripcion.setBounds(10, 328, 465, 149);\r\n\t\tadd(txArea_descripcion);\r\n\r\n\t\tJLabel lbl_conocimientos = new JLabel(\"Conocimientos requeridos:\");\r\n\t\tlbl_conocimientos.setBounds(537, 125, 169, 14);\r\n\t\tadd(lbl_conocimientos);\r\n\r\n\t\tpa_conocimientos = new PanelListaDoble(Usuario.getConocimientosTotales(), miOferta.getConocimientos());\r\n\t\tpa_conocimientos.setBounds(537, 174, 215, 180);\r\n\t\tadd(pa_conocimientos);\r\n\r\n\t\ttxField_buscarCono = new JTextField();\r\n\t\ttxField_buscarCono.setBounds(537, 140, 135, 20);\r\n\t\tadd(txField_buscarCono);\r\n\t\ttxField_buscarCono.setColumns(10);\r\n\r\n\t\tJButton btn_buscar = new JButton(\"\");\r\n\t\tbtn_buscar.setBounds(682, 138, 24, 23);\r\n\t\tadd(btn_buscar);\r\n\r\n\t\tbtn_crear = new JButton(\"\");\r\n\t\tbtn_crear.setBounds(716, 138, 24, 23);\r\n\t\tadd(btn_crear);\r\n\r\n\t\ttxField_lugar = new JTextField();\r\n\t\ttxField_lugar.setEditable(false);\r\n\t\ttxField_lugar.setColumns(10);\r\n\t\ttxField_lugar.setBounds(506, 49, 234, 20);\r\n\t\tadd(txField_lugar);\r\n\r\n\t\tJLabel lbl_lugar = new JLabel(\"Lugar de trabajo:\");\r\n\t\tlbl_lugar.setBounds(392, 52, 104, 14);\r\n\t\tadd(lbl_lugar);\r\n\r\n\t\tJLabel lbl_contrato = new JLabel(\"Tipo de contrato:\");\r\n\t\tlbl_contrato.setBounds(392, 83, 104, 14);\r\n\t\tadd(lbl_contrato);\r\n\r\n\t\tcombo_contrato = new JComboBox<Contrato>();\r\n\t\tcombo_contrato.addItem(Contrato.INDEFINIDO_TIEMPO_COMPLETO);\r\n\t\tcombo_contrato.addItem(Contrato.INDEFINIDO_TIEMPO_PARCIAL);\r\n\t\tcombo_contrato.addItem(Contrato.TEMPORAL_TIEMPO_COMPLETO);\r\n\t\tcombo_contrato.addItem(Contrato.TEMPORTAL_TIEMPO_PARCIAL);\r\n\t\tcombo_contrato.setBounds(506, 83, 159, 20);\r\n\t\tadd(combo_contrato);\r\n\t\t// d\r\n\t\tinicializar(miOferta);\r\n\t\tdesHabCampos(false);\r\n\t\tif (miOferta.getEmpresa().getNumID().compareToIgnoreCase(Aplicacion.getUsuario().getNumID()) == 0) {\r\n\t\t\tbtnEliminar = new JButton(\"Eliminar\");\r\n\t\t\tbtnEliminar.setToolTipText(\"Eliminar\");\r\n\t\t\tbtnEliminar.setBounds(492, 384, 125, 41);\r\n\t\t\tadd(btnEliminar);\r\n\r\n\t\t\tbtnRetirar = new JButton(\"\\uD83D\\uDC40\");\r\n\t\t\tbtnRetirar.setToolTipText(\"Retirar Oferta\");\r\n\t\t\tbtnRetirar.setBounds(627, 384, 125, 41);\r\n\t\t\tadd(btnRetirar);\r\n\r\n\t\t\tbutton_Editar = new JButton(\"Editar\");\r\n\t\t\tbutton_Editar.setToolTipText(\"Editar\");\r\n\t\t\tbutton_Editar.setBounds(627, 436, 125, 41);\r\n\t\t\tadd(button_Editar);\r\n\r\n\t\t\tbutton_Editar.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\tdesHabCampos(true);\r\n\t\t\t\t\tbutton_Editar.setVisible(false);\r\n\t\t\t\t\tbtnEliminar.setVisible(false);\r\n\t\t\t\t\tbtnRetirar.setVisible(false);\r\n\t\t\t\t\tbtn_crear.setVisible(false);\r\n\r\n\t\t\t\t\tbtn_guardar = new JButton(\"Guardar\");\r\n\t\t\t\t\tbtn_guardar.setToolTipText(\"Guardar\");\r\n\t\t\t\t\tbtn_guardar.setBounds(627, 436, 125, 41);\r\n\t\t\t\t\tadd(btn_guardar);\r\n\r\n\t\t\t\t\tbtn_cancelar = new JButton(\"Cancelar\");\r\n\t\t\t\t\tbtn_cancelar.setToolTipText(\"Cancelar\");\r\n\t\t\t\t\tbtn_cancelar.setBounds(492, 436, 125, 41);\r\n\t\t\t\t\tadd(btn_cancelar);\r\n\r\n\t\t\t\t\tbtn_cancelar.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\t\tbtn_guardar.removeAll();\r\n\t\t\t\t\t\t\tbtn_cancelar.removeAll();\r\n\t\t\t\t\t\t\tbtn_cancelar.setVisible(false);\r\n\t\t\t\t\t\t\tbtn_guardar.setVisible(false);\r\n\t\t\t\t\t\t\tbtnEliminar.setVisible(true);\r\n\t\t\t\t\t\t\tbutton_Editar.setVisible(true);\r\n\t\t\t\t\t\t\tbtnRetirar.setVisible(true);\r\n\t\t\t\t\t\t\tbtn_crear.setVisible(true);\r\n\t\t\t\t\t\t\tinicializar(miOferta);\r\n\t\t\t\t\t\t\tdesHabCampos(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tbtn_guardar.addMouseListener(new MouseAdapter() {\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\t\tEmergenteCambios.createWindow(\"┐Desea guardar los cambios?\", (TieneEmergente) padre);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}", "public ProvisioningForm() {\n//\t\tsuper(new BorderLayout());\n//\n//\t\tfinal ResourceManagementService resources = ProvisioningActivator.getResourceService();\n//\n//\t\tConfigurationService config = ProvisioningActivator.getConfigurationService();\n//\n//\t\tenableCheckBox = new SIPCommCheckBox(resources.getI18NString(\"plugin.provisioning.ENABLE_DISABLE\"));\n//\n//\t\tdhcpButton = new SIPCommRadioButton(resources.getI18NString(\"plugin.provisioning.DHCP\"));\n//\n//\t\tdnsButton = new SIPCommRadioButton(resources.getI18NString(\"plugin.provisioning.DNS\"));\n//\n//\t\tbonjourButton = new SIPCommRadioButton(resources.getI18NString(\"plugin.provisioning.BONJOUR\"));\n//\n//\t\tmanualButton = new SIPCommRadioButton(resources.getI18NString(\"plugin.provisioning.MANUAL\"));\n//\n//\t\turiField = new SIPCommTextField(resources.getI18NString(\"plugin.provisioning.URI\"));\n//\n//\t\tJPanel mainPanel = new TransparentPanel();\n//\n//\t\tadd(mainPanel, BorderLayout.NORTH);\n//\n//\t\tmainPanel.setLayout(new GridBagLayout());\n//\n//\t\tGridBagConstraints c = new GridBagConstraints();\n//\n//\t\tenableCheckBox.setAlignmentX(Component.LEFT_ALIGNMENT);\n//\n//\t\tc.fill = GridBagConstraints.HORIZONTAL;\n//\t\tc.weightx = 1.0;\n//\t\tc.gridx = 0;\n//\t\tc.gridy = 0;\n//\t\tc.insets = new Insets(0, 0, 10, 0);\n//\t\tmainPanel.add(enableCheckBox, c);\n//\n//\t\tfinal ButtonGroup buttonGroup = new ButtonGroup();\n//\n//\t\tbuttonGroup.add(dhcpButton);\n//\t\tbuttonGroup.add(bonjourButton);\n//\t\tbuttonGroup.add(dnsButton);\n//\t\tbuttonGroup.add(manualButton);\n//\n//\t\tfinal JPanel radioButtonPanel = new TransparentPanel(new GridLayout(0, 1));\n//\n//\t\tradioButtonPanel.setBorder(BorderFactory.createTitledBorder(resources.getI18NString(\"plugin.provisioning.AUTO\")));\n//\n//\t\tradioButtonPanel.add(dhcpButton);\n//\t\tradioButtonPanel.add(bonjourButton);\n//\t\tradioButtonPanel.add(dnsButton);\n//\n//\t\tc.fill = GridBagConstraints.HORIZONTAL;\n//\t\tc.weightx = 1.0;\n//\t\tc.insets = new Insets(0, 20, 0, 0);\n//\t\tc.gridx = 0;\n//\t\tc.gridy = 1;\n//\t\tmainPanel.add(radioButtonPanel, c);\n//\n//\t\tc.fill = GridBagConstraints.HORIZONTAL;\n//\t\tc.weightx = 1.0;\n//\t\tc.insets = new Insets(0, 26, 0, 0);\n//\t\tc.gridx = 0;\n//\t\tc.gridy = 2;\n//\t\tmainPanel.add(manualButton, c);\n//\n//\t\tc.fill = GridBagConstraints.HORIZONTAL;\n//\t\tc.weightx = 1.0;\n//\t\tc.insets = new Insets(0, 51, 0, 0);\n//\t\tc.gridx = 0;\n//\t\tc.gridy = 3;\n//\t\tmainPanel.add(uriField, c);\n//\n//\t\tJPanel uuidPanel = new TransparentPanel(new FlowLayout(FlowLayout.LEFT));\n//\n//\t\tfinal JTextField uuidPane = new JTextField();\n//\t\tuuidPane.setEditable(false);\n//\t\tuuidPane.setOpaque(false);\n//\t\tuuidPane.setText(config.getString(ProvisioningServiceImpl.PROVISIONING_UUID_PROP));\n//\n//\t\tuuidPanel.add(new JLabel(resources.getI18NString(\"plugin.provisioning.UUID\")));\n//\t\tuuidPanel.add(uuidPane);\n//\n//\t\tc.fill = GridBagConstraints.HORIZONTAL;\n//\t\tc.weightx = 0;\n//\t\tc.insets = new Insets(10, 10, 0, 0);\n//\t\tc.gridwidth = GridBagConstraints.REMAINDER;\n//\t\tc.gridx = 0;\n//\t\tc.gridy = 4;\n//\t\tmainPanel.add(uuidPanel, c);\n//\n//\t\tJButton clipboardBtn = new JButton(resources.getI18NString(\"plugin.provisioning.COPYTOCLIPBOARD\"));\n//\t\tclipboardBtn.addActionListener(new ActionListener() {\n//\t\t\t/**\n//\t\t\t * {@inheritsDoc}\n//\t\t\t */\n//\t\t\tpublic void actionPerformed(ActionEvent evt)\n//\t\t\t{\n//\t\t\t\tClipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();\n//\t\t\t\tif (clipboard != null) {\n//\t\t\t\t\tString selection = uuidPane.getText();\n//\t\t\t\t\tStringSelection data = new StringSelection(selection);\n//\t\t\t\t\tclipboard.setContents(data, data);\n//\t\t\t\t}\n//\t\t\t\telse {\n//\t\t\t\t\tJOptionPane.showMessageDialog(ProvisioningForm.this, resources.getI18NString(\"plugin.provisioning.CLIPBOARD_FAILED\"),\n//\t\t\t\t\t\tresources.getI18NString(\"plugin.provisioning.CLIPBOARD_FAILED\"), JOptionPane.ERROR_MESSAGE);\n//\t\t\t\t}\n//\t\t\t}\n//\t\t});\n//\n//\t\tc.fill = GridBagConstraints.HORIZONTAL;\n//\t\tc.weightx = 1.0;\n//\t\tc.insets = new Insets(5, 10, 0, 0);\n//\t\tc.gridwidth = 0;\n//\t\tc.gridx = 0;\n//\t\tc.gridy = 5;\n//\t\tmainPanel.add(clipboardBtn, c);\n//\n//\t\tJPanel userPassPanel = new TransparentPanel(new BorderLayout());\n//\t\tuserPassPanel.setBorder(BorderFactory.createTitledBorder(ProvisioningActivator.getResourceService().getI18NString(\"plugin.provisioning.CREDENTIALS\")));\n//\t\tJPanel labelPanel = new TransparentPanel(new GridLayout(0, 1));\n//\t\tlabelPanel.setBorder(BorderFactory.createEmptyBorder(4, 8, 4, 0));\n//\t\tJPanel valuesPanel = new TransparentPanel(new GridLayout(0, 1));\n//\t\tvaluesPanel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 0));\n//\t\tlabelPanel.add(new JLabel(ProvisioningActivator.getResourceService().getI18NString(\"plugin.simpleaccregwizz.LOGIN_USERNAME\")));\n//\t\tlabelPanel.add(new JLabel(ProvisioningActivator.getResourceService().getI18NString(\"service.gui.PASSWORD\")));\n//\t\tusernameField = new JTextField();\n//\t\tusernameField.setEditable(false);\n//\t\tpasswordField = new JPasswordField();\n//\t\tpasswordField.setEditable(false);\n//\t\tvaluesPanel.add(usernameField);\n//\t\tvaluesPanel.add(passwordField);\n//\t\tuserPassPanel.add(labelPanel, BorderLayout.WEST);\n//\t\tuserPassPanel.add(valuesPanel, BorderLayout.CENTER);\n//\t\tJPanel buttonPanel = new TransparentPanel(new FlowLayout(FlowLayout.RIGHT));\n//\t\tforgetPasswordButton = new JButton(resources.getI18NString(\"plugin.provisioning.FORGET_PASSWORD\"));\n//\t\tbuttonPanel.add(forgetPasswordButton);\n//\t\tuserPassPanel.add(buttonPanel, BorderLayout.SOUTH);\n//\t\tc.fill = GridBagConstraints.HORIZONTAL;\n//\t\tc.weightx = 1.0;\n//\t\tc.insets = new Insets(5, 10, 0, 0);\n//\t\tc.gridwidth = 0;\n//\t\tc.gridx = 0;\n//\t\tc.gridy = 6;\n//\t\tmainPanel.add(userPassPanel, c);\n//\n//\t\tJTextPane pane = new JTextPane();\n//\t\tpane.setForeground(Color.RED);\n//\t\tpane.setEditable(false);\n//\t\tpane.setOpaque(false);\n//\t\tpane.setText(ProvisioningActivator.getResourceService().getI18NString(\"plugin.provisioning.RESTART_WARNING\",\n//\t\t\tnew String[] { ProvisioningActivator.getResourceService().getSettingsString(\"service.gui.APPLICATION_NAME\") }));\n//\n//\t\tc.gridy = 7;\n//\t\tmainPanel.add(pane, c);\n//\n//\t\tinitButtonStates();\n//\t\tinitListeners();\n\t}", "public SettingsForm() {\n initComponents();\n }", "public PanelControl() {\r\n initComponents();\r\n VersionEImageIcon versionEImageIcon = new VersionEImageIcon();\r\n versionEImageIcon.newColorFromPanel(panelColor);\r\n jLabel1.setText(INFO_LABEL);\r\n Usuario usuarioTipo = Login.getUsuario();\r\n this.administrador = usuarioTipo.isAdmin();\r\n if (!administrador)\r\n {\r\n rangos.setEnabled(false);\r\n controles.setEnabled(false);\r\n alta_usuarios.setEnabled(false);\r\n verificacion.setEnabled(false);\r\n }\r\n }", "public SettingsPanel() {\n initComponents();\n }", "public CadastroProdutoNew() {\n initComponents();\n }", "private void newTodo() {\r\n String myTodoName = \"Unknown\";\r\n for (Component component : panelSelectFile.getComponents()) {\r\n if (component instanceof JTextField) {\r\n if (component.getName().equals(\"Name\")) {\r\n JTextField textFieldName = (JTextField) component;\r\n myTodoName = textFieldName.getText();\r\n }\r\n }\r\n }\r\n if (myTodoName == null || myTodoName.isEmpty()) {\r\n JOptionPane.showMessageDialog(null, \"New Todo List name not entered!\");\r\n return;\r\n }\r\n myTodo = new MyTodoList(myTodoName);\r\n int reply = JOptionPane.showConfirmDialog(null, \"Do you want to save this todoList?\",\r\n \"Save New Todolist\", JOptionPane.YES_NO_OPTION);\r\n if (reply == JOptionPane.YES_OPTION) {\r\n saveTodo();\r\n }\r\n fileName = null;\r\n todoListGui();\r\n }", "private void setUpList(JPanel panel){\n panel.setLayout(new BorderLayout());\n JPanel holder = new JPanel();\n holder.setLayout(new BoxLayout(holder,BoxLayout.Y_AXIS));\n for(Object t: agenda.getConnector().getTasks(currentList)) {\n Tasks task = (Tasks)t;\n add = false;\n this.addTask(holder,task);\n add = true;\n }\n JScrollPane scrollPane = new JScrollPane(holder,ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n JButton showCompleted = new JButton(\"Show completed\");\n showCompleted.addActionListener(e -> {\n JPanel completedPanels = new JPanel();\n this.setUpSize(completedPanels,400,400,AgendaConstants.ALL);\n completedPanels.setLayout(new BoxLayout(completedPanels,BoxLayout.Y_AXIS));\n for(Object o: agenda.getConnector().getCTasks(currentList)){\n CompletedTodo t = (CompletedTodo) o;\n Task task = new Task(t);\n this.setUpSize(task,390,50,AgendaConstants.MAXIMUM);\n completedPanels.add(task);\n }\n JOptionPane.showMessageDialog(null,completedPanels);\n });\n panel.add(showCompleted,BorderLayout.NORTH);\n panel.add(scrollPane,BorderLayout.CENTER);\n this.updateComponent(panel);\n }", "public void showFormInstitucion(ActionEvent event) {\r\n\t\tlog.info(\"-------------------------------------Debugging showFormInstitucion-------------------------------------\");\r\n\t\tlog.info(\"blnShowFormInstitucion: \"+getBlnShowFormInstitucion());\r\n\t\tsetBlnShowFormInstitucion(true);\r\n\t\tsetOnNewDisabledInsti(true); //Deshabilita los controles por defecto cuando se desea crear un nuevo registro.\r\n\t\tsetRenderConfigN1(false);\r\n\t\tsetStrBtnAgregarN1(\"Agregar Configuración\");\r\n\t\tsetRenderProcesPlanillaN1(false);\r\n\t\tsetRenderAdministraN1(false);\r\n\t\tsetRenderCobChequesN1(false);\r\n\t\tlimpiarFormInstitucion();\r\n\t}", "public ScheduleForm() {\n initComponents();\n }", "public exerciseAddGUI() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Exit = new javax.swing.JLabel();\n createSubIdTxt = new javax.swing.JTextField();\n createSubId = new javax.swing.JLabel();\n createSubNameTxt = new javax.swing.JTextField();\n createSubName = new javax.swing.JLabel();\n createDepIdTxt = new javax.swing.JComboBox<>();\n createLecId = new javax.swing.JLabel();\n createDepId = new javax.swing.JLabel();\n createLecIdTxt = new javax.swing.JComboBox<>();\n sumbit = new javax.swing.JButton();\n noticeBack = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Create Course\");\n setResizable(false);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n Exit.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/exit.png\"))); // NOI18N\n Exit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n Exit.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n ExitMouseClicked(evt);\n }\n });\n getContentPane().add(Exit, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 20, -1, -1));\n\n createSubIdTxt.setFont(new java.awt.Font(\"Calibri\", 0, 18)); // NOI18N\n getContentPane().add(createSubIdTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 160, 150, 25));\n\n createSubId.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n createSubId.setForeground(new java.awt.Color(255, 255, 255));\n createSubId.setText(\"Subject ID\");\n getContentPane().add(createSubId, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 160, -1, -1));\n\n createSubNameTxt.setFont(new java.awt.Font(\"Calibri\", 0, 18)); // NOI18N\n getContentPane().add(createSubNameTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 240, 300, 30));\n\n createSubName.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n createSubName.setForeground(new java.awt.Color(255, 255, 255));\n createSubName.setText(\"Subject Name\");\n getContentPane().add(createSubName, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 240, -1, -1));\n\n getContentPane().add(createDepIdTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 60, -1, -1));\n\n createLecId.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n createLecId.setForeground(new java.awt.Color(255, 255, 255));\n createLecId.setText(\"Lecturer ID\");\n getContentPane().add(createLecId, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 320, -1, -1));\n\n createDepId.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n createDepId.setForeground(new java.awt.Color(255, 255, 255));\n createDepId.setText(\"Department ID\");\n getContentPane().add(createDepId, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 60, -1, -1));\n\n getContentPane().add(createLecIdTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 320, -1, -1));\n\n sumbit.setText(\"Submit\");\n sumbit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n sumbit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sumbitActionPerformed(evt);\n }\n });\n getContentPane().add(sumbit, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 410, -1, -1));\n\n noticeBack.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/interface1.jpg\"))); // NOI18N\n noticeBack.setPreferredSize(new java.awt.Dimension(600, 500));\n getContentPane().add(noticeBack, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));\n\n pack();\n setLocationRelativeTo(null);\n }", "@Override\r\n\tpublic void setTaskPanel(BackOfficePanel panel) {\n\t\ttaskPanel = (TaskPanel) panel;\r\n\t}", "public NewJFrame() {\r\n initComponents();\r\n }", "public frmVenda() {\n initComponents();\n }", "private void initComponents() {\n panel1 = new JPanel();\n jtpPflegeakte = new JTabbedPane();\n\n //======== this ========\n setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));\n\n //======== panel1 ========\n {\n panel1.setLayout(new FormLayout(\n \"default:grow\",\n \"default:grow\"));\n\n //======== jtpPflegeakte ========\n {\n jtpPflegeakte.setTabPlacement(SwingConstants.BOTTOM);\n jtpPflegeakte.addChangeListener(e -> jtpPflegeakteStateChanged(e));\n }\n panel1.add(jtpPflegeakte, CC.xy(1, 1, CC.FILL, CC.FILL));\n }\n add(panel1);\n // JFormDesigner - End of component initialization //GEN-END:initComponents\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n BotonCancelar = new javax.swing.JButton();\n BotonAceptar = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n CampoNombre = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Crear Tema\");\n setIconImage(null);\n setModal(true);\n setResizable(false);\n\n BotonCancelar.setText(\"Cancelar\");\n BotonCancelar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BotonCancelarActionPerformed(evt);\n }\n });\n\n BotonAceptar.setText(\"Aceptar\");\n BotonAceptar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n BotonAceptarActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Introduce el nombre del tema:\");\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 .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(BotonCancelar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21, Short.MAX_VALUE)\n .addComponent(BotonAceptar))\n .addComponent(CampoNombre, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE))\n .addGap(32, 32, 32))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(CampoNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 53, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(BotonAceptar)\n .addComponent(BotonCancelar))\n .addGap(24, 24, 24))\n );\n\n pack();\n }", "public frmConfiguracion() {\n initComponents();\n iniciarObjetos();\n }", "private void createComponents() {\r\n // create a title\r\n indexTitle = new JLabel(\"Indexing\");\r\n indexTitle.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\r\n dirUrl = new JTextField();\r\n dirUrl.setColumns(70);\r\n dirUrl.setEditable(false);\r\n\r\n openDir = new JButton(\"Open Dir\");\r\n fileChooser = new JFileChooser();\r\n\r\n startIndexing = new JButton(\"Start\");\r\n startIndexing.setPreferredSize(new Dimension(95, 22));\r\n\r\n indexProgress = new JProgressBar();\r\n //progressBar.setStringPainted(true);\r\n // progressBar.setString(\"Indexing State..\");\r\n\r\n addExistingCheck = new JCheckBox();\r\n }", "public frmMain() {\n initComponents();\n pnlMemoria.setBackground(Color.GRAY);\n g = pnlMemoria.getGraphics();\n pnlMemoria.paintComponents(g);\n txtTablaProcesos.setEditable(false);\n listProcesos.setModel(procesos_en_disco);\n Proceso proceso = new Proceso(\"Sistema Operativo\");\n proceso.start();\n }", "public NewJFrame()\r\n {\r\n initComponents();\r\n }", "public TodoGUI() {\r\n todoChooserGui();\r\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 jPanel1 = new javax.swing.JPanel();\n nameLabel = new javax.swing.JLabel();\n menuOpsPanel = new javax.swing.JPanel();\n settingsButton = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n nameField = new javax.swing.JTextField();\n subjectField = new javax.swing.JTextField();\n descrField = new javax.swing.JTextField();\n createClassButton = new javax.swing.JButton();\n\n setBackground(java.awt.Color.white);\n setMaximumSize(new java.awt.Dimension(860, 560));\n setMinimumSize(new java.awt.Dimension(860, 560));\n setPreferredSize(new java.awt.Dimension(860, 560));\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/download.jpg\"))); // NOI18N\n\n nameLabel.setFont(new java.awt.Font(\"DejaVu Sans\", 1, 24)); // NOI18N\n nameLabel.setForeground(new java.awt.Color(1, 1, 1));\n nameLabel.setText(\"Welcome back, [name]!\");\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 .addGap(120, 120, 120)\n .addComponent(nameLabel)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(56, Short.MAX_VALUE))\n );\n\n menuOpsPanel.setBackground(new java.awt.Color(72, 186, 244));\n menuOpsPanel.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n settingsButton.setText(\"Account Settings\");\n settingsButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n settingsButtonActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"Add/Remove User\");\n\n jButton4.setText(\"Add/Remove Class\");\n\n javax.swing.GroupLayout menuOpsPanelLayout = new javax.swing.GroupLayout(menuOpsPanel);\n menuOpsPanel.setLayout(menuOpsPanelLayout);\n menuOpsPanelLayout.setHorizontalGroup(\n menuOpsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(menuOpsPanelLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(menuOpsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(settingsButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n menuOpsPanelLayout.setVerticalGroup(\n menuOpsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(menuOpsPanelLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(settingsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jLabel2.setFont(new java.awt.Font(\"Verdana\", 0, 24)); // NOI18N\n jLabel2.setText(\"Create a new Course\");\n\n jLabel3.setFont(new java.awt.Font(\"Verdana\", 0, 14)); // NOI18N\n jLabel3.setText(\"Name\");\n\n jLabel4.setFont(new java.awt.Font(\"Verdana\", 0, 14)); // NOI18N\n jLabel4.setText(\"Subject:\");\n\n jLabel5.setFont(new java.awt.Font(\"Verdana\", 0, 14)); // NOI18N\n jLabel5.setText(\"Description:\");\n\n nameField.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n nameFieldFocusLost(evt);\n }\n });\n\n subjectField.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n subjectFieldFocusLost(evt);\n }\n });\n\n descrField.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n descrFieldFocusLost(evt);\n }\n });\n\n createClassButton.setText(\"Create Class\");\n createClassButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n createClassButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(37, 37, 37)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(nameField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 372, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(subjectField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 372, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(descrField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 372, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(225, 225, 225)\n .addComponent(createClassButton)))\n .addContainerGap(44, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(56, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(nameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(subjectField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(descrField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(38, 38, 38)\n .addComponent(createClassButton)\n .addContainerGap())\n );\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 .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(64, 64, 64))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addComponent(jLabel1)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(56, 56, 56)\n .addComponent(menuOpsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(menuOpsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(39, 39, 39))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(27, 27, 27)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(35, 35, 35)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(44, Short.MAX_VALUE))))\n );\n }", "public FrameCadastro(String tipo[]){\r\n\t\tsuper(\"ApartManager-Cadastro\");\r\n\t\t\r\n\t\tPanelCadastro panelC = new PanelCadastro(tipo);\r\n\t\t\r\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\r\n\t\tsetSize(700, 700);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetVisible(true);\r\n\t\tsetResizable(false);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tsetContentPane(panel);\r\n\t\tpanel.setLayout(null);\r\n\t\tpanelC.setBounds(0, 0, 700, 700);\r\n\t\tpanel.add(panelC);\r\n\t\tpanel.setVisible(true);\r\n\t}", "@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 txtServer = new javax.swing.JTextField();\n txtRemoteDir = new javax.swing.JTextField();\n txtUserId = new javax.swing.JTextField();\n txtPass = new javax.swing.JTextField();\n btnGenerateTask = new javax.swing.JButton();\n jLabel8 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n\n setClosable(true);\n setTitle(\"Ftp Task\");\n setVisible(true);\n\n jLabel1.setText(\"Server :\");\n\n jLabel2.setText(\"Remote Dir :\");\n\n jLabel3.setText(\"User Id :\");\n\n jLabel4.setText(\"Password :\");\n\n btnGenerateTask.setText(\"Generate Ftp Task\");\n btnGenerateTask.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnGenerateTaskActionPerformed(evt);\n }\n });\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel8.setText(\"!\");\n\n jLabel7.setText(\"To do :\");\n\n jLabel5.setText(\"Node Path :\");\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 0, 14));\n jLabel6.setText(\"!\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(94, 94, 94)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 157, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnGenerateTask, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(18, 18, 18)\n .addComponent(txtPass, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(29, 29, 29)\n .addComponent(txtServer, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtUserId, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtRemoteDir, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGroup(layout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 384, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel8))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel6)))))\n .addContainerGap(51, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(23, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(jLabel8))\n .addGap(18, 18, 18)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtServer, 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(txtRemoteDir, 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(txtUserId, 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.TRAILING)\n .addComponent(jLabel4)\n .addComponent(txtPass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(btnGenerateTask, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(62, 62, 62))\n );\n\n pack();\n }", "private void addProjectTask(ActionEvent e) {\n Calendar dueDate = dueDateModel.getValue();\n String title = titleEntry.getText();\n String description = descriptionEntry.getText();\n Project parent = (Project) parentEntry.getSelectedItem();\n addProjectTask(title, description, parent, dueDate);\n }", "@Override\r\n public void actionPerformed(ActionEvent actionEvent) {\r\n createManualJPanel();\r\n }", "public NewJFrame() {\n initComponents();\n }", "public NewJFrame() {\n initComponents();\n }", "public NewJFrame() {\n initComponents();\n }", "public NewJFrame() {\n initComponents();\n }", "public NewJFrame() {\n initComponents();\n }", "public NewJFrame() {\n initComponents();\n }", "public NewJFrame() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "@FXML\n void addTaskClicked(ActionEvent event)\n {\n createTask();\n }", "private void crearComponentes(){\n\tjdpFondo.setSize(942,592);\n\t\n\tjtpcContenedor.setSize(230,592);\n\t\n\tjtpPanel.setTitle(\"Opciones\");\n\tjtpPanel2.setTitle(\"Volver\");\n \n jpnlPanelPrincilal.setBounds(240, 10 ,685, 540);\n \n }", "public NewJFrame() {\n initComponents();\n \n }", "public NewJFrame() {\n initComponents();\n IniciarTabla();\n \n \n // ingreso al githup \n \n }", "private JPanel initButtonPanel() {\n JPanel buttonPanel = new JPanel();\n buttonPanel.setLayout(new FlowLayout(SwingUtilities.HORIZONTAL));\n\n completeButton = new JButton(new AbstractAction(\"Complete\") {\n\n @Override\n public void actionPerformed(ActionEvent e) {\n task.setStatus(TaskStatus.COMPLETED);\n dialog.setVisible(false);\n }\n });\n buttonPanel.add(completeButton);\n\n closeButton = new JButton(new AbstractAction(\"Close\") {\n\n @Override\n public void actionPerformed(ActionEvent e) {\n dialog.setVisible(false);\n }\n });\n buttonPanel.add(closeButton);\n\n return buttonPanel;\n }", "private void createButton() {\n\t\tbtnAddTask = new JButton(\"Add Task\");\n\t\tbtnSave = new JButton(\"Save\");\n\t\tbtnCancel = new JButton(\"Cancel\");\n\n\t\tbtnAddTask.addActionListener(new ToDoAction());\n\t\tbtnSave.addActionListener(new ToDoAction());\n\t\tbtnCancel.addActionListener(new ToDoAction());\n\t}", "private JPanel buildMainPanel() {\n\t\t\n\t\tint row;\n\t\tGridBagLayout layout;\n\t\tGridBagConstraints constraints;\n\t\tJPanel main;\n\t\tJLabel label;\t\t\n\t\t\n\t\tlayout = new GridBagLayout();\n\t\tconstraints = new GridBagConstraints();\n\t\tmain = new JPanel(layout);\n\t\trow = 0;\t\n\t\tGUIUtils.add(main, new JLabel(stringFactory.getString(\n\t\t\t\tLabelStringFactory.SAVEASCONFIG_FRAME_CURRENT_CONFIGURATION)),\n\t\t\t\tlayout, constraints, row, 0, 1, 1, GridBagConstraints.EAST, \n\t\t\t\tGridBagConstraints.NONE, GUIUtils.MED_INSETS);\n\t\tGUIUtils.add(main, label = new JLabel(userPrefs.getConfiguration()), \n\t\t\t\tlayout, constraints, row++, 1, 1, 1, GridBagConstraints.WEST, \n\t\t\t\tGridBagConstraints.NONE, GUIUtils.SMALL_INSETS);\n\t\tlabel.setForeground(Color.BLUE);\t\t\n\t\tGUIUtils.add(main, new JSeparator(), layout, constraints, row++, 0, 1, \n\t\t\t\t2, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, \n\t\t\t\tGUIUtils.MED_INSETS);\n\t\tGUIUtils.add(main, new JLabel(stringFactory.getString(\n\t\t\t\tLabelStringFactory.SAVEASCONFIG_FRAME_CONFIGURATION_NAME)),\n\t\t\t\tlayout, constraints, row, 0, 1, 1, GridBagConstraints.NORTHEAST, \n\t\t\t\tGridBagConstraints.NONE, GUIUtils.SMALL_INSETS);\n\t\tGUIUtils.add(main, new JScrollPane(configurationName = \n\t\t\t\tnew JTextField(20)), layout, constraints, row++, 1, 1, 1, \n\t\t\t\tGridBagConstraints.WEST, GridBagConstraints.NONE, \n\t\t\t\tGUIUtils.SMALL_INSETS);\t\t\n\t\tGUIUtils.add(main, new JLabel(stringFactory.getString(\n\t\t\t\tLabelStringFactory.SAVEASCONFIG_FRAME_MAKE_DEFAULT)),\n\t\t\t\tlayout, constraints, row, 0, 1, 1, GridBagConstraints.EAST, \n\t\t\t\tGridBagConstraints.NONE, GUIUtils.SMALL_INSETS);\n\t\tGUIUtils.add(main, makeDefault = new JCheckBox(), layout, \n\t\t\t\tconstraints, row++, 1, 1, 1, GridBagConstraints.WEST, \n\t\t\t\tGridBagConstraints.NONE, GUIUtils.SMALL_INSETS);\n\t\treturn main;\n\t}", "@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 txtname = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n txtdesc = new javax.swing.JTextArea();\n jLabel3 = new javax.swing.JLabel();\n lblctask = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n lblttask = new javax.swing.JLabel();\n btnstart = new javax.swing.JButton();\n btnback = new javax.swing.JButton();\n btnnext = new javax.swing.JButton();\n btnend = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n mnushowall = new javax.swing.JMenuItem();\n mnuexit = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n mnureplace = new javax.swing.JMenuItem();\n mnuremove = new javax.swing.JMenuItem();\n mnurestore = new javax.swing.JMenuItem();\n mnuclear = new javax.swing.JMenuItem();\n jMenu3 = new javax.swing.JMenu();\n mnubefore = new javax.swing.JMenuItem();\n mnuafter = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Name: \");\n\n jLabel2.setText(\"Description: \");\n\n txtdesc.setColumns(20);\n txtdesc.setRows(5);\n jScrollPane1.setViewportView(txtdesc);\n\n jLabel3.setText(\"Current Task\");\n\n lblctask.setText(\"N/A\");\n lblctask.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n jLabel5.setText(\"Total Tasks: \");\n\n lblttask.setText(\" 0\");\n lblttask.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n btnstart.setText(\"|<\");\n btnstart.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnstartActionPerformed(evt);\n }\n });\n\n btnback.setText(\"<\");\n\n btnnext.setText(\">\");\n btnnext.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnnextActionPerformed(evt);\n }\n });\n\n btnend.setText(\">|\");\n btnend.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnendActionPerformed(evt);\n }\n });\n\n jMenu1.setText(\"File\");\n\n mnushowall.setText(\"Show All Tasks\");\n jMenu1.add(mnushowall);\n\n mnuexit.setText(\"Exit\");\n jMenu1.add(mnuexit);\n\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Edit\");\n\n mnureplace.setText(\"Replace Current Task\");\n mnureplace.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mnureplaceActionPerformed(evt);\n }\n });\n jMenu2.add(mnureplace);\n\n mnuremove.setText(\"Remove Current Task\");\n mnuremove.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mnuremoveActionPerformed(evt);\n }\n });\n jMenu2.add(mnuremove);\n\n mnurestore.setText(\"Restore Current Task To Screen\");\n jMenu2.add(mnurestore);\n\n mnuclear.setText(\"Clear Screen\");\n mnuclear.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mnuclearActionPerformed(evt);\n }\n });\n jMenu2.add(mnuclear);\n\n jMenuBar1.add(jMenu2);\n\n jMenu3.setText(\"Insert\");\n\n mnubefore.setText(\"Before Current Task\");\n jMenu3.add(mnubefore);\n\n mnuafter.setText(\"After Current Task\");\n mnuafter.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mnuafterActionPerformed(evt);\n }\n });\n jMenu3.add(mnuafter);\n\n jMenuBar1.add(jMenu3);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(42, 42, 42)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(27, 27, 27)\n .addComponent(lblctask, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(jLabel5)\n .addGap(18, 18, 18)\n .addComponent(lblttask, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(15, 15, 15)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE)\n .addComponent(txtname))))\n .addContainerGap(90, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnstart)\n .addGap(18, 18, 18)\n .addComponent(btnback)\n .addGap(18, 18, 18)\n .addComponent(btnnext)\n .addGap(18, 18, 18)\n .addComponent(btnend)\n .addGap(82, 82, 82))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtname, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(lblctask, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5)\n .addComponent(lblttask, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(42, 42, 42)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnstart)\n .addComponent(btnback)\n .addComponent(btnnext)\n .addComponent(btnend))\n .addContainerGap())\n );\n\n pack();\n }", "private void createFrame(){\n JPanel jPanelID = new JPanel();\n jPanelID.setLayout(new GridBagLayout());\n JLabel labelText = new JLabel(this.dialogName);\n labelText.setHorizontalAlignment(JLabel.CENTER);\n AddComponent.add(jPanelID,labelText, 0, 0, 2, 1);\n for (int field = 0; field < labelString.length; field++) {\n labelText = new JLabel(labelString[field]);\n AddComponent.add(jPanelID, labelText, 0, field + 1, 1, 1);\n AddComponent.add(jPanelID, fieldID.get(labelString[field]), 1, field + 1, 1, 1);\n }\n int offset = labelString.length + 1;\n labelText = new JLabel(DATE_OF_BIRTH);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, jDateChooser, 1, offset, 1, 1);\n offset++;\n labelText = new JLabel(GROUP);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, group, 1, offset, 1, 1);\n dialog.add(jPanelID, BorderLayout.NORTH);\n JButton okButton = new JButton(dialogName);\n okButton.addActionListener(actionEvent -> checkAndSave());\n dialog.add(okButton, BorderLayout.SOUTH);\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 }", "public tlConferencia() {\n initComponents();\n }", "public CentralAC_GUI(HVACGUI hvacForm) {\n\n //setting the content pane\n setContentPane(rootPanel);\n\n setPreferredSize(new Dimension(500, 500));\n pack();\n setVisible(true);\n //using the dispose on close to close the form\n setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n //setting the hvac form to false so its not the active form\n hvacForm.setEnabled(false);\n //calling the addToList method\n addToList();\n //making the hvac gui form active\n hvacForm.setEnabled(true);\n\n }", "public frmDashBoard() {\n initComponents();\n }", "public NewJFrame() {\n Connect();\n initComponents();\n }", "private MenuServicios(){\n super(\"Gym Manager Servicios a Socios\");\n setBackground(Color.WHITE);\n\tgetContentPane().setLayout(null);\n setResizable(false);\n\tsetDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n pack();\n\tsetSize(942,592);\n\tsetLocationRelativeTo(null);\n image_path = \"jar:\" + getClass().getProtectionDomain().getCodeSource().\n getLocation().toString() + \"!/imagenes/\";\n \n jdpFondo = new JDesktopPane();\n jdpFondo.setBackground(Color.WHITE);\n jtpcContenedor = new JXTaskPaneContainer();\n jtpPanel = new JXTaskPane();\n jtpPanel2 = new JXTaskPane();\n jpnlPanelPrincilal = new JPanel();\n jpnlPanelPrincilal.setBackground(Color.WHITE);\n jtpcContenedor.setBackground(Color.LIGHT_GRAY);\n \n paginaInicio();\n crearComponentes();\n addToPanel();\n accionComponentes();\n \n }", "private void addToPanel(){\n getContentPane().add(jdpFondo);\n jtpcContenedor.add(jtpPanel);\n\tjtpcContenedor.add(jtpPanel2);\n jdpFondo.add(jtpcContenedor, BorderLayout.CENTER);\n jdpFondo.add(jpnlPanelPrincilal);\n }", "public AppoinmentPanel() {\n initComponents();\n }", "public AddCourseJPanel() { \n initComponents(); \n }", "public void createGui() {\r\n setResizable(false);\r\n setSize(500, 300);\r\n setTitle(\"TechAndCrack StopWatch\");\r\n setLocation(s.width / 2 - getWidth() / 2, s.height / 2 - getHeight()\r\n / 2);\r\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n setLayout(new BorderLayout());\r\n \r\n textarea.setEditable(false);\r\n textarea.setLineWrap(true);\r\n JScrollPane scrollpane = new JScrollPane(textarea);\r\n \r\n toppanel.add(scrollpane);\r\n toppanel.setLayout(new GridLayout());\r\n add(toppanel, BorderLayout.NORTH);\r\n \r\n labeltimer.setForeground(Color.GRAY);\r\n labeltimer.setFont(new Font(\"Courier New\", Font.BOLD, 36));\r\n centerpanel.add(labeltimer);\r\n add(centerpanel, BorderLayout.CENTER);\r\n \r\n add(bottompanel, BorderLayout.PAGE_END);\r\n bottompanel.setLayout(new GridLayout());\r\n bottompanel.add(btstart);\r\n bottompanel.add(btreset);\r\n bottompanel.add(btlap);\r\n \r\n btstart.addActionListener(new buttonstart());\r\n btreset.addActionListener(new buttonreset());\r\n btlap.addActionListener(new buttonlap());\r\n \r\n setVisible(true);\r\n }", "public Creacion() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public Punto_venta() {\n initComponents();\n }", "private JPanel buildNorthPanel() {\n\t\t\n\t\tGridBagLayout layout;\n\t\tGridBagConstraints constraints;\n\t\tJPanel panel;\n\t\tint row, col;\n\t\t\n\t\tlayout = new GridBagLayout();\n\t\tconstraints = new GridBagConstraints();\n\t\tpanel = new JPanel(layout);\n\t\trow = 0;\n\t\tcol = 0;\n\t\tJLabel headerLabel = new JLabel(stringFactory.getString(\n\t\t\t\tLabelStringFactory.SAVEASCONFIG_FRAME_SAVE_NEW_CONFIGURATION));\n\t\theaderLabel.setFont(new Font(\"arial\", Font.PLAIN, 18));\n\t\tGUIUtils.add(panel, headerLabel, layout, constraints, row++, col, \n\t\t\t1, 1, 1, 1, GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH,\n\t\t\tGUIUtils.MED_LARGE_INSETS);\n\t\treturn panel;\n\t}" ]
[ "0.7525725", "0.68904847", "0.67805356", "0.6475142", "0.64118326", "0.6409885", "0.6392955", "0.63642657", "0.634878", "0.63337207", "0.63266486", "0.62331235", "0.61740613", "0.6152718", "0.61370325", "0.6112055", "0.6091963", "0.6061451", "0.603846", "0.6035744", "0.60195756", "0.60195756", "0.60086757", "0.60050935", "0.5993759", "0.5945978", "0.5943319", "0.59251016", "0.59194875", "0.5914171", "0.59078497", "0.58974457", "0.5896185", "0.58850557", "0.5883759", "0.5875931", "0.5866966", "0.58621824", "0.5852575", "0.58454514", "0.5825063", "0.5787053", "0.57866806", "0.5780886", "0.577392", "0.5768387", "0.57602024", "0.5755871", "0.5752862", "0.5731688", "0.5728746", "0.57230985", "0.5718819", "0.57164186", "0.5703848", "0.5701794", "0.56991243", "0.5694947", "0.5690587", "0.5689708", "0.5680282", "0.567993", "0.56789356", "0.5677712", "0.56759465", "0.5670963", "0.56667906", "0.56631494", "0.5662523", "0.5661976", "0.5657792", "0.5657792", "0.5657792", "0.5657792", "0.5657792", "0.5657792", "0.5657792", "0.56575143", "0.5656523", "0.5653073", "0.5650444", "0.5648622", "0.56481963", "0.56478375", "0.56462324", "0.56420803", "0.5642007", "0.5634319", "0.5631913", "0.56240195", "0.5623508", "0.5612339", "0.5607869", "0.56000215", "0.5593376", "0.5592386", "0.55868864", "0.55843717", "0.5583961", "0.55811256" ]
0.70091635
1